[webkit-changes] [WebKit/WebKit] e07871: [CSS Nesting] Don't serialize first implicit style...
Matthieu Dubet
noreply at github.com
Fri May 12 02:46:09 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e07871e21ea87327296cc3bc0003266655fa1bc0
https://github.com/WebKit/WebKit/commit/e07871e21ea87327296cc3bc0003266655fa1bc0
Author: Matthieu Dubet <m_dubet at apple.com>
Date: 2023-05-12 (Fri, 12 May 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/parsing-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/parsing.html
M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/serialize-group-rules-with-decls.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/serialize-group-rules-with-decls.tentative.html
M Source/WebCore/css/CSSGroupingRule.cpp
M Source/WebCore/css/CSSStyleRule.cpp
Log Message:
-----------
[CSS Nesting] Don't serialize first implicit style rule inside group rule
https://bugs.webkit.org/show_bug.cgi?id=256647
rdar://109208359
Reviewed by Antti Koivisto.
Orphaned properties in group rule are implicitly added
to a style rule with '&' as selector ;
this implicit style rule should not be serialized.
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/parsing-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/parsing.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/serialize-group-rules-with-decls.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/serialize-group-rules-with-decls.tentative.html:
Import from WPT
* Source/WebCore/css/CSSGroupingRule.cpp:
(WebCore::CSSGroupingRule::appendCSSTextForItems const):
(WebCore::CSSGroupingRule::cssTextForDeclsAndRules const):
* Source/WebCore/css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::cssTextForDeclsAndRules const):
This behavior only concerns group rule, not style rule (where a property can't be orphaned)
Canonical link: https://commits.webkit.org/264003@main
More information about the webkit-changes
mailing list