Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8005782a4cc14d5f41d138cd43a1e3692bb6d182
https://github.com/WebKit/WebKit/commit/8005782a4cc14d5f41d138cd43a1e3692bb6d182
Author: Sammy Gill <[email protected]>
Date: 2026-10-09 (Fri, 09 Oct 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/grid/ExplicitGridResolver.cpp
M Source/WebCore/layout/formattingContexts/grid/ExplicitGridResolver.h
M Source/WebCore/layout/formattingContexts/grid/ExplicitGridTrackSizes.h
M Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.h
M Source/WebCore/layout/integration/grid/LayoutIntegrationGridLayout.cpp
M Source/WebCore/layout/integration/grid/LayoutIntegrationGridLayout.h
Log Message:
-----------
[GFC][Integration] Update RenderGrid's explicit grid state after layout.
https://bugs.webkit.org/show_bug.cgi?id=326888
Reviewed by Alan Baradlay.
After a GFC layout, out-of-flow boxes whose containing block is the grid are
still laid out by
RenderGrid. It resolves their grid lines against an explicit grid made up of
the track sizes in
style plus Grid::autoRepeatTracks(), offset by Grid::explicitGridStart(). Only
the legacy grid
item placement sets these, so after a GFC layout both stay 0. Negative lines
then resolve
against too few tracks, and lines are not offset by the implicit tracks before
the explicit grid.
ExplicitGridResolver now also returns which of the explicit grid's tracks came
from an
auto-repeat. GridFormattingContext::layout returns the number of those tracks
and the number of
leading implicit tracks, and they are used to set the legacy grid's
auto-repeated track counts
and explicit grid start after a GFC layout.
* Source/WebCore/layout/formattingContexts/grid/ExplicitGridResolver.cpp:
(WebCore::Layout::ExplicitGridResolver::resolveTrackSizes): Return the range of
explicit grid
tracks that the auto-fill repetitions generated.
* Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp:
(WebCore::Layout::GridFormattingContext::layout): Return the number of
auto-repeated tracks
and the number of leading implicit tracks so integration can use them.
This gets put into GridLayoutResult and is plumbed all the way to
integration to use.
(WebCore::LayoutIntegration::GridLayout::updateFormattingContextRootRenderer):
Set the legacy
grid's auto-repeated track counts and explicit grid start.
* Source/WebCore/layout/integration/grid/LayoutIntegrationGridLayout.h:
The comment that was at the top of this function was useful when it was
first introduced since it highlighted a single exception that could be
learned without having to read the code. Now the comment has grown much
larger so one might as well read the code to figure out how we are
updating RenderGrid.
Canonical link: https://commits.webkit.org/323234@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications