Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c4a2b3c243d1a981a386b625a45b0f507727f07c
https://github.com/WebKit/WebKit/commit/c4a2b3c243d1a981a386b625a45b0f507727f07c
Author: Ahmad Saleem <[email protected]>
Date: 2026-09-29 (Tue, 29 Sep 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/placement-implicit-area-line-name-suffix-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/placement-implicit-area-line-name-suffix.html
M Source/WebCore/style/values/grid/StyleGridPositionsResolver.cpp
Log Message:
-----------
Subgrid implicit grid-area line name is matched by first substring instead of
suffix
https://bugs.webkit.org/show_bug.cgi?id=324993
rdar://188203288
Reviewed by Sammy Gill.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
Implicit grid line names are formed as "<area>-start" / "<area>-end". When
resolving such a name for a subgrid, StyleGridPositionsResolver located the
suffix with String::find(), which matches the first occurrence anywhere in
the name. For an area whose own name ends in "-end" (e.g. "x-end"), the line
name "x-end-end" matched the leading "-end" and was attributed to area "x"
instead of "x-end", placing the item on the wrong line.
Match the "-start"/"-end" suffix with endsWith() and strip it from the end of
the name so the correct area name is recovered.
Test:
imported/w3c/web-platform-tests/css/css-grid/subgrid/placement-implicit-area-line-name-suffix.html
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/placement-implicit-area-line-name-suffix-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/placement-implicit-area-line-name-suffix.html:
Added.
* Source/WebCore/style/values/grid/StyleGridPositionsResolver.cpp:
(WebCore::Style::NamedLineCollectionBase::NamedLineCollectionBase):
Canonical link: https://commits.webkit.org/322238@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications