Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 66a86d6045492a307bf8c94e1136ad26c2e65917
https://github.com/WebKit/WebKit/commit/66a86d6045492a307bf8c94e1136ad26c2e65917
Author: Sammy Gill <[email protected]>
Date: 2026-08-26 (Wed, 26 Aug 2026)
Changed paths:
M Source/WebCore/rendering/GridLanesLayout.cpp
Log Message:
-----------
[Grid Lanes] GridLanesLayout attempts to populate positions before layout
https://bugs.webkit.org/show_bug.cgi?id=322609
rdar://problem/185913304
Reviewed by Vitor Roriz.
performGridLanesPlacement() began by calling
RenderGrid::populateGridPositionsForDirection()
for both axes, handing the half-built GridLanesLayout back to RenderGrid before
a single item
had been placed. Neither call was doing anything useful, and for the stacking
axis the value
they wrote was wrong.
Nothing reads them during placement. GridLanesLayout only asks RenderGrid for
the grid, the
style, the content box sizes and gridAreaBreadthForGridItem(), none of which
touch positions.
The positions get populated once placement and sizing are done which is how
grid layout on
RenderGrid behaves.
For the stacking axis the early call was actively wrong rather than merely
redundant.
populateGridPositionsForDirection() sets positions[lastLine] to
gridContentSize() +
positions[0] when the direction is the stacking axis, but placement had not run
yet, so
gridContentSize() was still 0 and the last line collapsed onto the first.
RenderGrid also no longer calls back into a GridLanesLayout whose content size
is still being
computed, which is a step toward returning the placement result rather than
reading it back off
the object.
Canonical link: https://commits.webkit.org/319906@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications