[webkit-changes] [WebKit/WebKit] fb1992: CSS Nesting: nesting at-rule inside style rule
Matthieu Dubet
noreply at github.com
Fri Jan 6 14:14:39 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fb1992149cc152d60241cfe53faae4986c6499c7
https://github.com/WebKit/WebKit/commit/fb1992149cc152d60241cfe53faae4986c6499c7
Author: Matthieu Dubet <m_dubet at apple.com>
Date: 2023-01-06 (Fri, 06 Jan 2023)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/invalid-inner-rules-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/invalidation-004-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/nesting-basic-expected.html
M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/nesting-basic.html
M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/parsing-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/serialize-group-rules-with-decls.tentative-expected.txt
M Source/WebCore/css/CSSSelector.cpp
M Source/WebCore/css/CSSSelector.h
M Source/WebCore/css/StyleRule.cpp
M Source/WebCore/css/StyleRule.h
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSParserImpl.h
M Source/WebCore/css/parser/CSSParserSelector.h
M Source/WebCore/css/parser/CSSSelectorParser.cpp
M Source/WebCore/css/parser/CSSSelectorParser.h
M Source/WebCore/style/RuleSetBuilder.cpp
M Source/WebCore/style/RuleSetBuilder.h
Log Message:
-----------
CSS Nesting: nesting at-rule inside style rule
https://bugs.webkit.org/show_bug.cgi?id=250042
rdar://103147312
Reviewed by Antti Koivisto.
In both RuleSetBuilder and CSSParserImpl, we use
a member object to maintain the state of the
style rule stack.
ParserImpl methods should always work with the top of the stack context
via the topContext() method.
Some WPT are failing because:
- exact serialization is still in flux
- we don't handle top-level nesting selector
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/invalid-inner-rules-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/invalidation-004-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/nesting-basic-expected.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/nesting-basic.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/parsing-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/serialize-group-rules-with-decls.tentative-expected.txt:
* Source/WebCore/css/CSSSelector.cpp:
(WebCore::CSSSelector::replaceNestingParentByNotAll):
* Source/WebCore/css/CSSSelector.h:
* Source/WebCore/css/StyleRule.cpp:
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::create):
* Source/WebCore/css/StyleRule.h:
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::parseValue):
(WebCore::CSSParserImpl::parseCustomPropertyValue):
(WebCore::CSSParserImpl::parseInlineStyleDeclaration):
(WebCore::CSSParserImpl::parseDeclarationList):
(WebCore::CSSParserImpl::supportsDeclaration):
(WebCore::CSSParserImpl::consumeQualifiedRule):
(WebCore::CSSParserImpl::runInNewNestingContext):
(WebCore::CSSParserImpl::createNestingParentRule):
(WebCore::CSSParserImpl::consumeRegularRuleList):
(WebCore::CSSParserImpl::consumeMediaRule):
(WebCore::CSSParserImpl::consumeSupportsRule):
(WebCore::CSSParserImpl::consumeFontFaceRule):
(WebCore::CSSParserImpl::consumeFontPaletteValuesRule):
(WebCore::CSSParserImpl::consumePageRule):
(WebCore::CSSParserImpl::consumeCounterStyleRule):
(WebCore::CSSParserImpl::consumeLayerRule):
(WebCore::CSSParserImpl::consumeContainerRule):
(WebCore::CSSParserImpl::consumePropertyRule):
(WebCore::CSSParserImpl::consumeKeyframeStyleRule):
(WebCore::CSSParserImpl::consumeStyleRule):
(WebCore::CSSParserImpl::consumeDeclarationListOrStyleBlockHelper):
(WebCore::CSSParserImpl::consumeDeclarationList):
(WebCore::CSSParserImpl::consumeStyleBlock):
(WebCore::CSSParserImpl::consumeDeclaration):
(WebCore::CSSParserImpl::consumeCustomPropertyValue):
(WebCore::CSSParserImpl::consumeDeclarationValue):
* Source/WebCore/css/parser/CSSParserImpl.h:
(WebCore::CSSParserImpl::topContext):
(WebCore::CSSParserImpl::isNestedContext):
(WebCore::CSSParserImpl::consumeQualifiedRule): Deleted.
(WebCore::CSSParserImpl::consumeStyleRule): Deleted.
(WebCore::CSSParserImpl::consumeDeclarationListOrStyleBlockHelper): Deleted.
(WebCore::CSSParserImpl::consumeStyleBlock): Deleted.
* Source/WebCore/css/parser/CSSParserSelector.h:
* Source/WebCore/css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::consumeSimpleSelector):
(WebCore::CSSSelectorParser::resolveNestingParent):
* Source/WebCore/css/parser/CSSSelectorParser.h:
* Source/WebCore/style/RuleSetBuilder.cpp:
(WebCore::Style::RuleSetBuilder::addChildRules):
(WebCore::Style::RuleSetBuilder::addChildRule):
(WebCore::Style::RuleSetBuilder::populateStyleRuleResolvedSelectorList):
(WebCore::Style::RuleSetBuilder::addStyleRule):
* Source/WebCore/style/RuleSetBuilder.h:
Canonical link: https://commits.webkit.org/258560@main
More information about the webkit-changes
mailing list