[webkit-changes] [WebKit/WebKit] 3c5823: Implement Masonry Track Sizing

Brandon Stewart noreply at github.com
Thu Dec 22 20:00:46 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3c5823bb309e94722ae6028f80166daa2d448f4e
      https://github.com/WebKit/WebKit/commit/3c5823bb309e94722ae6028f80166daa2d448f4e
  Author: Brandon Stewart <brandonstewart at apple.com>
  Date:   2022-12-22 (Thu, 22 Dec 2022)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-overflow-left-side-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-overflow-left-side-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-overflow-left-side.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-overflow-right-side-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-overflow-right-side-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-overflow-right-side.html
    M Source/WebCore/rendering/GridMasonryLayout.h
    M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
    M Source/WebCore/rendering/RenderGrid.cpp

  Log Message:
  -----------
  Implement Masonry Track Sizing
https://bugs.webkit.org/show_bug.cgi?id=248287

Reviewed by Matt Woodrow.

Track sizing will only include blocks if they meet the below criteria in the track sizing algorithm.

- Items placed at the first implicit line in the masonry axis.
- Items that have a specified definite placement in the grid axis
- Items that span all grid axis tracks.

The masonry calling code needed to be heavily refactored to a later step in layout pipeline.
This ended breaking quite a few test cases, which will be addressed in future patches.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-overflow-left-side-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-overflow-left-side.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-overflow-right-side-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-overflow-right-side.html: Added.
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-overflow-left-side-expected.txt: Added.
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-overflow-right-side-expected.txt: Added.
* Source/WebCore/rendering/GridMasonryLayout.h:
(WebCore::GridMasonryLayout::gridGap const):
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::accumulateIntrinsicSizesForTrack):
(WebCore::GridTrackSizingAlgorithm::run):
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::autoPlacementMinorAxisDirection const):

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




More information about the webkit-changes mailing list