Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 72484044d578b61dd47382f9a28c0376ea3015dd
https://github.com/WebKit/WebKit/commit/72484044d578b61dd47382f9a28c0376ea3015dd
Author: Sammy Gill <[email protected]>
Date: 2025-09-24 (Wed, 24 Sep 2025)
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/TrackSizingAlgorithm.cpp
A Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.h
Log Message:
-----------
[GFC] Initial implementation of grid and track sizing with fixed sized tracks.
https://bugs.webkit.org/show_bug.cgi?id=299406
rdar://problem/161210933
Reviewed by Alan Baradlay.
Adds the initial support and implementation of track sizing with a focus
on fixed-size columns and rows. Like the patches before, we provide the
overall architecture that will be fleshed out over a series of patches.
At a high level, this code should eventually fully implement the "Grid
Sizing Algorithm" and "Track Sizing Algorithm," portions of the spec:
https://drafts.csswg.org/css-grid-1/#algo-grid-sizing
https://drafts.csswg.org/css-grid-1/#algo-track-sizing
For simplicity, we only implement steps one and two of the grid sizing
algorithm: first pass of column sizing and first pass of row sizing.
Since we are dealing with fixed-size tracks, we do not need to worry
about the available space portion of the text.
As input to this, we need the PlacedGridItems along with the track sizing
functions for each track. We output the used track sizes that come as a
result of the steps in the algorithm. Needless to say, this input and
output may need to change as we consider the more complicated and
involved portions of the algorithm, but this seems sufficient for now.
One thing that may be notable is that for the most part, the spec does
not distinguish between columns and rows in the steps of the track
sizing algorithm (i.e. it operates on a set of tracks without regard
to the dimension), so we will attempt to do the same in the code.
One small exception to this is that depending on which step we
are in within the grid sizing algorithm, the available space for the track
sizing algorithm may change.
* Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.cpp: Added.
(WebCore::Layout::TrackSizingAlgorithm::sizeTracks):
(WebCore::Layout::TrackSizingAlgorithm::initializeTrackSizes):
For fixed size tracks this is fairly straightforward since both the base
size and growth limit get set to the size specified for the track.
Canonical link: https://commits.webkit.org/300467@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes