Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c2cb2f43b38d604aa1ad69640e342ce7156c68a4
https://github.com/WebKit/WebKit/commit/c2cb2f43b38d604aa1ad69640e342ce7156c68a4
Author: Sammy Gill <[email protected]>
Date: 2026-08-21 (Fri, 21 Aug 2026)
Changed paths:
R
LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-inline-001-expected.html
R
LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-inline-001.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/margin-trim-computed-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/margin-trim-computed.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/margin-trim-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-box/parsing/margin-trim.html
M Source/WebCore/css/CSSProperties.json
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Box.cpp
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/style/computed/data/StyleNonInheritedRareData.h
M Source/WebCore/style/values/box/StyleMarginTrim.cpp
M Source/WebCore/style/values/box/StyleMarginTrim.h
M Source/WebCore/style/values/primitives/StyleKeyword+Mappings.h
Log Message:
-----------
[margin-trim] Drop inline values from syntax
https://bugs.webkit.org/show_bug.cgi?id=322106
rdar://185527437
Reviewed by Alan Baradlay.
The CSSWG resolved that margin-trim no longer applies to flex and grid
containers (w3c/csswg-drafts#14284). With those layout systems out of scope the
property only applies to block containers and multi-column containers, where it
has no effect on the inline-axis margins of its children, so the inline,
inline-start and inline-end keywords could never do anything. The syntax is now:
none | block | [ block-start || block-end ]
In this patch we basically remove it from the style and layout code so
that it is now consistent with the new grammar. With respect to the
layout code it was basically dead code anyways since the inline values
did not have any effect outside of flex and grid.
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Box.cpp:
(WebCore::CSSPropertyParserHelpers::consumeMarginTrim):
No longer needs to build a value list: a single side
serializes as itself and both sides collapse to block, so the four-keyword
"block inline" case and the canonical-order FIXME both go away.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-inline-001-expected.html:
Removed.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-inline-001.html:
Removed.
This test asserted that margin-trim: inline does not trim
the inline margins of block-level children; that declaration no longer parses,
so
the test would pass vacuously and is removed.
* Source/WebCore/style/values/box/StyleMarginTrim.cpp:
(WebCore::Style::CSSValueConversion<MarginTrim>::operator):
Since all we get get is a keyword value now the logic related to the
CSSValueList is dead and can be removed as well.
Canonical link: https://commits.webkit.org/319622@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications