Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a3126d48da2b71051dd4a4891b899d021359d11c
https://github.com/WebKit/WebKit/commit/a3126d48da2b71051dd4a4891b899d021359d11c
Author: Sammy Gill <[email protected]>
Date: 2026-10-13 (Tue, 13 Oct 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/grid/GridItemSizingFunctions.cpp
M Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp
M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp
M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.h
Log Message:
-----------
[GFC] Clamp the content size suggestion of grid items with a preferred aspect
ratio.
https://bugs.webkit.org/show_bug.cgi?id=327307
rdar://problem/189848571
Reviewed by Alan Baradlay.
https://drafts.csswg.org/css-grid-1/#min-size-auto
The content size suggestion is the min-content size in the relevant axis,
clamped, if it has a preferred aspect ratio, by any definite opposite-axis
minimum and maximum sizes converted through the aspect ratio.
We now implementing this clamping to complete the implemention of the
content size suggestion functions. This is done by plumbing in the grid
area size for that axis so that potentially any percentages can be
resolved.
Note that in the case of the grid area block size for the inline content
size suggestion the passed in block size is optional. This is because
when we are running the very first pass of column sizing we may or may
not have a grid area block size that can be used. That block size exists
only if the item spans rows that have a definite max track sizing
function that can be used to compute that area size otherwise it is
infinite. We use the optional to distinguish these cases so that we know
we do not have a grid area block size we can resolve against.
Canonical link: https://commits.webkit.org/323655@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications