Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 114b1864512dcb83751e4ff5004dc2d41df9f2c9
https://github.com/WebKit/WebKit/commit/114b1864512dcb83751e4ff5004dc2d41df9f2c9
Author: Yulun Wu <[email protected]>
Date: 2026-09-16 (Wed, 16 Sep 2026)
Changed paths:
A LayoutTests/fast/grid/grid-item-zero-percentage-margin-expected.txt
A LayoutTests/fast/grid/grid-item-zero-percentage-margin.html
M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp
Log Message:
-----------
[GFC] Correctly handle zero percent margins
https://bugs.webkit.org/show_bug.cgi?id=324375
rdar://187611293
Reviewed by Sammy Gill.
This PR fixes a bug where a grid item with a zero percentage margin asserts
during layout.
gridLayoutAvoidanceReason() admits zero margin grid items, causing a 0% margin
item to be
run through GFC. This causes a debug assert to be hit in
GridLayoutUtils::usedMarginsForAxis()
where only fied margins are resolved.
We should handle zero percent margins admitted through coverage.
Test: fast/grid/grid-item-zero-percentage-margin.html
* LayoutTests/fast/grid/grid-item-zero-percentage-margin-expected.txt: Added.
* LayoutTests/fast/grid/grid-item-zero-percentage-margin.html: Added.
* Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp:
(WebCore::Layout::GridLayoutUtils::usedMarginsForAxis):
Canonical link: https://commits.webkit.org/321294@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications