[webkit-changes] [WebKit/WebKit] 48fe5d: Fork out Masonry into a separate layout function

Brandon Stewart noreply at github.com
Tue Jan 31 21:56:13 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 48fe5d10f6d2a56957f07a669bdb9aa8627c5aff
      https://github.com/WebKit/WebKit/commit/48fe5d10f6d2a56957f07a669bdb9aa8627c5aff
  Author: Brandon Stewart <brandonstewart at apple.com>
  Date:   2023-01-31 (Tue, 31 Jan 2023)

  Changed paths:
    M Source/WebCore/rendering/GridMasonryLayout.cpp
    M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
    M Source/WebCore/rendering/GridTrackSizingAlgorithm.h
    M Source/WebCore/rendering/RenderGrid.cpp
    M Source/WebCore/rendering/RenderGrid.h

  Log Message:
  -----------
  Fork out Masonry into a separate layout function
https://bugs.webkit.org/show_bug.cgi?id=251459

Reviewed by Matt Woodrow.

I have been finding a significant amount of special cases are getting added to
the grid code to handle masonry. This has been getting rather messy to maintain,
and splitting these two would allow easier changes to the layout to support masonry without
worrying about breaking grid.

* Source/WebCore/rendering/GridMasonryLayout.cpp:
(WebCore::GridMasonryLayout::collectMasonryItems):
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrack::cachedTrackSize const):
* Source/WebCore/rendering/GridTrackSizingAlgorithm.h:
(WebCore::GridTrack::cachedTrackSize const): Deleted.
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::layoutGrid):
(WebCore::RenderGrid::layoutMasonry):
* Source/WebCore/rendering/RenderGrid.h:

Canonical link: https://commits.webkit.org/259662@main




More information about the webkit-changes mailing list