Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7c7768a8c255435ce5887979dad89f3bb514ffaf
https://github.com/WebKit/WebKit/commit/7c7768a8c255435ce5887979dad89f3bb514ffaf
Author: Sammy Gill <[email protected]>
Date: 2026-10-01 (Thu, 01 Oct 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp
M Source/WebCore/layout/formattingContexts/grid/GridLayout.h
Log Message:
-----------
[GFC] Move grid sizing out of GridLayout::layout and into
GridFormattingContext
https://bugs.webkit.org/show_bug.cgi?id=325865
rdar://problem/188859364
Reviewed by Alan Baradlay.
GridLayout::layout built the track sizing functions, ran the grid sizing
algorithm through GridSizer, and then laid out and aligned the grid items.
A GridLayoutScope parameter let intrinsic width computation stop after
column sizing.
Move everything up to and including the GridSizer calls into
GridFormattingContext, so GridLayout::layout only lays out and aligns the
grid items against track sizes it is handed. This is a step toward making
the grid layout algorithm more modular, and puts the "Find the size of the
grid container" step in GridFormattingContext, where it can be implemented
by driving the grid sizing algorithm more than once.
GridLayoutScope is removed. computeIntrinsicWidths now calls
GridSizer::sizeColumnsOnlyFastPath directly for the columns-only path and
GridSizer::sizeGrid otherwise. The full path still lays out the grid items
afterwards and discards the result, preserving the existing side effects of
doing so during intrinsic sizing.
No behavior change.
Canonical link: https://commits.webkit.org/322422@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications