Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 176cd6ce42f9c81d68c5583eceb8d93c693e4307
https://github.com/WebKit/WebKit/commit/176cd6ce42f9c81d68c5583eceb8d93c693e4307
Author: Yulun Wu <[email protected]>
Date: 2026-07-07 (Tue, 07 Jul 2026)
Changed paths:
M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
Log Message:
-----------
[Grid] Clarify grid item min content contributions when the grid item
"behaves as auto"
https://bugs.webkit.org/show_bug.cgi?id=318355
<rdar://181146154>
Reviewed by Sammy Gill.
This PR removes an incorrect FIXME and updates inline documentation
to clarify behavior.
Per spec:
https://drafts.csswg.org/css-grid/#algo-single-span-items
Specifically, if the item’s computed preferred size behaves as auto
or depends on the size of its containing block in the relevant axis,
its minimum contribution is the outer size that would result from assuming
the item’s used minimum size as its preferred size; else the item’s
minimum contribution is its min-content contribution.
Per the 'behaves as auto' and html 'width'/'height' spec:
https://www.w3.org/TR/css-sizing-3/#behave-as-auto
https://www.w3.org/TR/CSS2/visudet.html#the-width-property
https://www.w3.org/TR/CSS2/visudet.html#the-height-property
'width' and 'height' behave as auto when the 'width' or 'height'
depend on the values of other properties. Note that these cases
are caught by dependsOnContainingBlockSize(), so we do not need
to test for these cases in behavesAsAuto().
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithmStrategy::minContributionForGridItem const):
Canonical link: https://commits.webkit.org/316697@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications