Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1d8fb899bfcd5127e50b2bdee05d34a8e7ffa957
https://github.com/WebKit/WebKit/commit/1d8fb899bfcd5127e50b2bdee05d34a8e7ffa957
Author: Sammy Gill <[email protected]>
Date: 2026-10-01 (Thu, 01 Oct 2026)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-flex-spanning-items-001-expected.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-flex-spanning-items-001-ref.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-lanes/items/column-flex-spanning-items-expected.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-lanes/items/column-flex-spanning-items-ref.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-gutters-and-flex-content-001.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-width-minmax-tracks-001.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-content-sized-columns-resolution-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-content-sized-columns-resolution.html
M Source/WebCore/layout/integration/grid/LayoutIntegrationGridCoverage.cpp
Log Message:
-----------
[GFC][Integration] Allow grid items that span multiple tracks.
https://bugs.webkit.org/show_bug.cgi?id=325674
rdar://182725333
Reviewed by Alan Baradlay.
Now that we have support in item placement and track sizing for items
that span multiple tracks let's allow it to run through GFC. Note that
doing this exposed some tests that need to be rebaselined. In most cases
these come from the fact that the spec has changed at some point in the
past but it seems like other engines do not implement the updated
version of the spec. In one case I believe all engines were wrong but
GFC is now correct. I go over each of these changes in more detail
below.
* LayoutTests/TestExpectations:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-flex-spanning-items-001-expected.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-flex-spanning-items-001-ref.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-lanes/items/column-flex-spanning-items-expected.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-lanes/items/column-flex-spanning-items-ref.html:
This test has a grid with width: min-content and grid-template-columns:
1fr 30px. It has a single item spanning both tracks and nothing really
happens until we start distributing extra space into the flexible
tracks. When distributing space for the flexible tracks we need to
accommodate the item's limited min-content contribution which was 300px.
This ends up putting 270px into the flexible track.
Legacy grid was using the minimum contribution which ends up being 0px
in this case and is not what the spec says we should be using. From a
cursory look at other engines it seems like they have their own special
logic but from my understanding GFC is correct here.
I created a spec issue for this here:
https://github.com/w3c/csswg-drafts/issues/14538
Also since Grid Lanes is currently tied to legacy grid this causes the ref,
which now runs through GFC, to differ from the test rendering so we need
to mark it as fail.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-intrinsic-width-minmax-tracks-001.html:
In this testcase we have a grid with grid-template-columns: auto auto
and width: max-content. The test asserts that the width of the grid
should end up being 80px but this is incorrect and instead should be
110px. This is because of the following:
- For size tracks to fit non-spanning items the base size of the second
column should be 20px (from the limited min-content contribution) and
the growth limit should be 80px (because of its max-content
contribution).
- During space distribution we have 60px of space to distribute between
the two tracks so each gets 30px. Base size of first column becomes
30px and the second column becomes 50px.
- At the end of space distribution the second column grows to the growth
limit of 80px.
Sum of the columns becomes 110px.
The reason this was 80px at some point in time was because in a previous
version of the spec we would have used the max-content contribution of
the item which would have affected space distribution later. This ended
up changing in https://github.com/w3c/csswg-drafts/issues/3565
It seems like no engine currently supports this spec change but GFC now
does.
The tests below all have to do with the new addition of the "Distribute
space to non-affected tracks," of the space distribution algorithm:
https://github.com/w3c/csswg-drafts/issues/3648
*
LayoutTests/fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution-expected.txt:
Previously, during the "for max-content minimums," distribution step all
space would go to column one. Now we distribute it to column two since
that is a non-affected track with a growth limit that can be
accommodated.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-gutters-and-flex-content-001.html:
For the first grid under the "for content based minimums step," the 1px
of extra space that would get distributed to column one goes to column
two instead.
Similarly, for the second grid that has been changed we do the same
exact thing for the "for content based minimums step." In addition we
distribute even more space to it in the "max-content minimums," step
since column one is at its growth limit.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-content-sized-columns-resolution-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-content-sized-columns-resolution.html:
The first two sets of grids the extra space gets distributed into
non-affected tracks with a fixed max track sizing function.
For gridFixedMinContentAndMaxContentUnsortedConstrained we end up
distributing extra space into the first column for "max-content
minimums," since the second column is already at its growth limit.
Basically the same idea with the other two remaining.
Canonical link: https://commits.webkit.org/322402@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications