Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8d29616f91ef6b902037c77ff921ee89a2083940
https://github.com/WebKit/WebKit/commit/8d29616f91ef6b902037c77ff921ee89a2083940
Author: Sammy Gill <[email protected]>
Date: 2026-08-25 (Tue, 25 Aug 2026)
Changed paths:
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp
M Source/WebCore/layout/formattingContexts/grid/GridLayout.h
A Source/WebCore/layout/formattingContexts/grid/GridSizer.cpp
A Source/WebCore/layout/formattingContexts/grid/GridSizer.h
Log Message:
-----------
[GFC][Cleanup] Move the grid sizing algorithm into a GridSizer class
https://bugs.webkit.org/show_bug.cgi?id=322534
rdar://problem/185829927
Reviewed by Tim Nguyen.
GridLayout::layout() ran the grid sizing algorithm inline, alongside grid item
placement, grid item layout, and alignment. Move this logic into its own class
so that it is a bit more modular.
GridSizer takes the grid formatting context and the layout state, and each entry
point takes the placed grid items plus the track sizing functions for both axes.
Building those track sizing functions stays in GridLayout, since grid item
sizing
still needs them once the tracks have been sized, so there is nothing to be
gained from moving their construction and handing it back out again.
The fast path where the caller only needs the column sizes resolved by step 1 is
sizeColumnsOnlyFastPath(), which delegates to sizeColumnTracks(), the
counterpart
to sizeRowTracks().
No change in behavior.
Canonical link: https://commits.webkit.org/319845@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications