Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 57fdd17822df399a4c26a0a3f3ad8342051c1eff
https://github.com/WebKit/WebKit/commit/57fdd17822df399a4c26a0a3f3ad8342051c1eff
Author: Sammy Gill <[email protected]>
Date: 2023-12-19 (Tue, 19 Dec 2023)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-grid-indefinite-height-min-height-flex-row-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-grid-indefinite-height-min-height-flex-row.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-size-grid-indefinite-height-min-height-flex-row-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-size-grid-indefinite-height-min-height-flex-row.html
M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
M Source/WebCore/rendering/RenderGrid.h
Log Message:
-----------
[css-contain][css-grid] Relax size containment constraints on "Expand
Flexible Tracks," portion of grid track sizing algorithm.
https://bugs.webkit.org/show_bug.cgi?id=266506
rdar://119736473
Reviewed by Alan Baradlay.
This patch expands upon 272085@main which fixed a bug related to an
interaction between grid layout and size containment. In particular,
the patch allowed the grid track sizing algorithm to stretch auto sized
tracks even during size containment.
For the exact same reason we also want to relax the size containment
constraint imposed upon the grid track sizing algorithm to allow it to
perform portions of the "Expand Flexible Tracks," section. The only
portion of this step we want to skip is when we are computing the flex
fraction and the free space is indefinite, since this is the only part of
this section that takes into consideration the grid's contents. To
compute the flex fraction in this case, the spec says that it is the
maximum of:
- For each flexible track, if the flexible track’s flex factor is
greater than one, the result of dividing the track’s base size by its
flex factor; otherwise, the track’s base size.
- For each grid item that crosses a flexible track, the result of
finding the size of an fr using all the grid tracks that the item
crosses and a space to fill of the item’s max-content contribution.
During the size containment "Sizing as if empty," phase we can
completely take into consideration the first computation, but we should
not compute or consider the second.
https://drafts.csswg.org/css-contain/#containment-size
https://drafts.csswg.org/css-grid-2/#algo-flex-tracks
*
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-grid-indefinite-height-min-height-flex-row-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-inline-size-grid-indefinite-height-min-height-flex-row.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-size-grid-indefinite-height-min-height-flex-row-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-size-grid-indefinite-height-min-height-flex-row.html:
Added.
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const):
(WebCore::GridTrackSizingAlgorithm::run):
* Source/WebCore/rendering/RenderGrid.h:
Canonical link: https://commits.webkit.org/272276@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes