Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6c08f4a9a68070ba40b75379506e2c0108a72eeb
https://github.com/WebKit/WebKit/commit/6c08f4a9a68070ba40b75379506e2c0108a72eeb
Author: Yulun Wu <[email protected]>
Date: 2026-02-25 (Wed, 25 Feb 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/grid/ImplicitGrid.cpp
Log Message:
-----------
[GFC] Fix crash in auto-placement when grid has no explicit rows
https://bugs.webkit.org/show_bug.cgi?id=308569
<rdar://171098357>
Reviewed by Sammy Gill.
When a grid does not have grid-template-rows, explicitly placed items, or
items locked to a given row, the implicit grid starts with 0 rows.
This causes a crash when in the auto placement algorithm when placing the
first auto placed item because it checks if the cell the cursor is pointing
to is empty before it exists.
This is because we previously only called growRowsToFit() when wrapping to a
new row,
but this never happens on the first iteration. moving this out of the wrapping
condidtional
so rows are created before accessing the grid.
* Source/WebCore/layout/formattingContexts/grid/ImplicitGrid.cpp:
(WebCore::Layout::ImplicitGrid::placeAutoPositionedItemWithAutoColumnAndRow):
Canonical link: https://commits.webkit.org/308217@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications