Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fb308a41a3c173416d5c05adade179cd7909c10a
https://github.com/WebKit/WebKit/commit/fb308a41a3c173416d5c05adade179cd7909c10a
Author: Sammy Gill <[email protected]>
Date: 2026-02-06 (Fri, 06 Feb 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp
M Source/WebCore/layout/integration/grid/LayoutIntegrationGridCoverage.cpp
Log Message:
-----------
[GFC][Integration] Begin allowing grid items with automatic inline sizes.
https://bugs.webkit.org/show_bug.cgi?id=303592
rdar://165883075
Reviewed by Vitor Roriz.
In 303843@main we added some initial support for computing the automatic
inline size of grid items. Specifically, support was added for the case
where the grid item is non-replaced, does not have an aspect-ratio, and
its alignment stretches it into the grid area because of normal
alignment.
So in this patch we:
1.) Move the justify alignment checks above the width calculation.
2.) Modify the width check to look at the restrictions above, including
the alignment, in the case where width is auto.
One small change we had to make is that if we are resolving justify-self
against the parent, because it was auto, then we return
ItemPosition::Normal if the grid's justify-items is legacy to match the
behavior described in:
https://drafts.csswg.org/css-align-3/#justify-items-property
We also need to make the same mapping change in GridFormattingContext so
that the used value of justify-self for the grid item is normal.
Canonical link: https://commits.webkit.org/306990@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications