Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f14c8d82e651277c1133a711ac7c5805f5c27ec3
https://github.com/WebKit/WebKit/commit/f14c8d82e651277c1133a711ac7c5805f5c27ec3
Author: Sammy Gill <[email protected]>
Date: 2026-01-21 (Wed, 21 Jan 2026)
Changed paths:
M Source/WebCore/layout/integration/grid/LayoutIntegrationGridCoverage.cpp
Log Message:
-----------
[GFC][Integration] Begin allowing automatic placement with row auto flow.
https://bugs.webkit.org/show_bug.cgi?id=303585
rdar://165061123
Reviewed by Brandon Stewart.
This patch relaxes our restrictions for GFC with regards to item
placement to start allowing some form of auto placement to run. The
simplest styling to begin auto placement for is when the values for
grid-item-start and grid-item-end are both auto.
One tricky bit that we need to check alongside this, however, is if
there are potentially too many items locked to a given row. This is
because if there are too many items that are forced to a particular row
than there are number of columns in the explicit grid, then we will need
to potentially add columns to the implicit grid in order to accommodate
them. Since we are focusing on placement within the explicit grid for
now, we need to check for this case and bail if we find ourselves
potentially in that state.
* Source/WebCore/layout/integration/grid/LayoutIntegrationGridCoverage.cpp:
(WebCore::LayoutIntegration::hasValidColumnEnd):
New overload to help with the case where grid-column-start is auto. For
now, we only support grid-column-end: auto and bail in all other cases.
(WebCore::LayoutIntegration::gridLayoutAvoidanceReason):
To determine whether there are potentially too many items in a row, we
need to start keeping track of the number of grid items explicitly
placed in a row. We can do this by using a Vector where each index
corresponds to a row in the grid and the value is the number of items in
that row. While we are checking a grid item's row positioning, we will
increment the value that corresponds with the row it is in if it is
explicitly placed.
Canonical link: https://commits.webkit.org/305990@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications