Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2d6f59ccf8235b27ed9a71e6684fb9b68a235fab
https://github.com/WebKit/WebKit/commit/2d6f59ccf8235b27ed9a71e6684fb9b68a235fab
Author: Sammy Gill <[email protected]>
Date: 2026-07-29 (Wed, 29 Jul 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp
Log Message:
-----------
[GFC] Items with content based size do not have a specified size suggestion
https://bugs.webkit.org/show_bug.cgi?id=320589
rdar://problem/183563686
Reviewed by Alan Baradlay.
The inline/block specified size suggestion functions only handled a
fixed, percentage/calc, or auto preferred size and hit
ASSERT_NOT_IMPLEMENTED_YET() for everything else. Style::PreferredSize
also has the intrinsic sizing keywords (min-content, max-content,
fit-content) along with the non-standard intrinsic/min-intrinsic
keywords, and stretch/-webkit-fill-available that needs to be taken into
consideration
https://www.w3.org/TR/css-grid-2/#specified-size-suggestion says the
specified size suggestion only exists when the item's preferred size in
the relevant axis is definite. The intrinsic sizing keywords all size the
box from its contents, so they are not definite and there is no specified
size suggestion for them. Returning std::nullopt makes the caller
continue on to the transferred size suggestion or the content size
suggestion, which is what we want.
stretch/-webkit-fill-available resolve to the stretch-fit size, so like a
percentage they are only definite once the grid area size is known. When
it is not known (during track sizing) there is no specified size
suggestion. We defer to implementing the logic for the stretch fit size
in a follow up patch.
Canonical link: https://commits.webkit.org/318216@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications