Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 90d00dc15a7b02dda4a6088e22cbdc363b66e567 https://github.com/WebKit/WebKit/commit/90d00dc15a7b02dda4a6088e22cbdc363b66e567 Author: Matthieu Dubet <m_du...@apple.com> Date: 2023-03-31 (Fri, 31 Mar 2023)
Changed paths: M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/cssom-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/invalid-inner-rules-expected.txt M Source/WebCore/css/CSSGroupingRule.cpp M Source/WebCore/css/CSSGroupingRule.h M Source/WebCore/css/CSSRule.cpp M Source/WebCore/css/CSSRule.h M Source/WebCore/css/CSSStyleRule.cpp M Source/WebCore/css/CSSStyleSheet.cpp M Source/WebCore/css/CSSStyleSheet.h M Source/WebCore/css/StyleRule.cpp M Source/WebCore/css/StyleRule.h M Source/WebCore/css/StyleSheetContents.h M Source/WebCore/css/parser/CSSParser.cpp M Source/WebCore/css/parser/CSSParser.h M Source/WebCore/css/parser/CSSParserImpl.cpp M Source/WebCore/css/parser/CSSParserImpl.h M Source/WebCore/css/parser/CSSSelectorParser.cpp Log Message: ----------- [CSS] Implement CSSOM insertRule() on StyleRule https://bugs.webkit.org/show_bug.cgi?id=254601 rdar://107322119 Reviewed by Antti Koivisto. This patch handles the transformation of old-school StyleRule object (without a children vector) to a StyleRuleWithNesting object when necessary. * LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/cssom-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/invalid-inner-rules-expected.txt: * Source/WebCore/css/CSSGroupingRule.cpp: (WebCore::CSSGroupingRule::insertRule): (WebCore::CSSGroupingRule::prepareChildStyleRuleForNesting): * Source/WebCore/css/CSSGroupingRule.h: * Source/WebCore/css/CSSRule.cpp: (WebCore::CSSRule::hasStyleRuleAncestor const): (WebCore::CSSRule::prepareChildStyleRuleForNesting): * Source/WebCore/css/CSSRule.h: * Source/WebCore/css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::setSelectorText): (WebCore::CSSStyleRule::cssTextForDeclsAndRules const): (WebCore::CSSStyleRule::insertRule): (WebCore::CSSStyleRule::deleteRule): * Source/WebCore/css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::prepareChildStyleRuleForNesting): * Source/WebCore/css/CSSStyleSheet.h: * Source/WebCore/css/StyleRule.cpp: (WebCore::m_originalSelectorList): (WebCore::StyleRuleWithNesting::StyleRuleWithNesting): (WebCore::StyleRuleWithNesting::create): * Source/WebCore/css/StyleRule.h: (WebCore::StyleRuleBase::isStyleRule const): * Source/WebCore/css/StyleSheetContents.h: * Source/WebCore/css/parser/CSSParser.cpp: (WebCore::CSSParser::parseRule): * Source/WebCore/css/parser/CSSParser.h: * Source/WebCore/css/parser/CSSParserImpl.cpp: (WebCore::CSSParserImpl::CSSParserImpl): (WebCore::CSSParserImpl::parseRule): (WebCore::CSSParserImpl::consumeDeclarationListOrStyleBlockHelper): * Source/WebCore/css/parser/CSSParserImpl.h: (WebCore::CSSParserImpl::isNestedContext): * Source/WebCore/css/parser/CSSSelectorParser.cpp: (WebCore::CSSSelectorParser::consumeNestedSelectorList): Canonical link: https://commits.webkit.org/262394@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes