Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 9ff40711991962a45f64cc0c36beec81d5eb7367 https://github.com/WebKit/WebKit/commit/9ff40711991962a45f64cc0c36beec81d5eb7367 Author: Matthieu Dubet <m_du...@apple.com> Date: 2023-11-11 (Sat, 11 Nov 2023)
Changed paths: M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/at-scope-parsing-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/at-scope-parsing.html M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/idlharness-expected.txt M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-cssom-expected.txt M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml M Source/WebCore/CMakeLists.txt M Source/WebCore/DerivedSources-input.xcfilelist M Source/WebCore/DerivedSources-output.xcfilelist M Source/WebCore/DerivedSources.make M Source/WebCore/Sources.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/bindings/js/JSCSSRuleCustom.cpp M Source/WebCore/bindings/js/WebCoreBuiltinNames.h M Source/WebCore/contentextensions/ContentExtensionParser.cpp M Source/WebCore/css/CSSPageRule.cpp A Source/WebCore/css/CSSScopeRule.cpp A Source/WebCore/css/CSSScopeRule.h A Source/WebCore/css/CSSScopeRule.idl M Source/WebCore/css/CSSStyleRule.cpp M Source/WebCore/css/StyleRule.cpp M Source/WebCore/css/StyleRule.h M Source/WebCore/css/StyleRuleType.h M Source/WebCore/css/StyleSheetContents.cpp M Source/WebCore/css/parser/CSSAtRuleID.cpp M Source/WebCore/css/parser/CSSAtRuleID.h M Source/WebCore/css/parser/CSSParser.cpp M Source/WebCore/css/parser/CSSParser.h M Source/WebCore/css/parser/CSSParserContext.cpp M Source/WebCore/css/parser/CSSParserContext.h M Source/WebCore/css/parser/CSSParserEnum.h M Source/WebCore/css/parser/CSSParserImpl.cpp M Source/WebCore/css/parser/CSSParserImpl.h M Source/WebCore/css/parser/CSSSelectorParser.cpp M Source/WebCore/css/parser/CSSSelectorParser.h M Source/WebCore/dom/SelectorQuery.cpp M Source/WebCore/inspector/InspectorStyleSheet.cpp M Source/WebCore/inspector/agents/InspectorDOMAgent.cpp M Source/WebCore/style/RuleSetBuilder.cpp M Source/WebCore/testing/Internals.cpp Log Message: ----------- [CSS] @scope parsing https://bugs.webkit.org/show_bug.cgi?id=264498 rdar://118180841 Reviewed by Antti Koivisto. This is boilerplate code to add initial support for the @scope CSS rule and its parsing. https://drafts.csswg.org/css-cascade-6/#scope-syntax It also contains a renaming of "parseCSSSelector" to the more exact name "parseCSSSelectorList". * LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/at-scope-parsing-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/at-scope-parsing.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/idlharness-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-cssom-expected.txt: * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/CMakeLists.txt: * Source/WebCore/DerivedSources-input.xcfilelist: * Source/WebCore/DerivedSources-output.xcfilelist: * Source/WebCore/DerivedSources.make: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/bindings/js/JSCSSRuleCustom.cpp: (WebCore::toJSNewlyCreated): * Source/WebCore/bindings/js/WebCoreBuiltinNames.h: * Source/WebCore/contentextensions/ContentExtensionParser.cpp: (WebCore::ContentExtensions::isValidCSSSelector): * Source/WebCore/css/CSSPageRule.cpp: (WebCore::CSSPageRule::setSelectorText): * Source/WebCore/css/CSSScopeRule.cpp: Added. (WebCore::CSSScopeRule::CSSScopeRule): (WebCore::CSSScopeRule::create): (WebCore::CSSScopeRule::styleRuleScope const): (WebCore::CSSScopeRule::cssText const): (WebCore::CSSScopeRule::start const): (WebCore::CSSScopeRule::end const): * Source/WebCore/css/CSSScopeRule.h: Added. * Source/WebCore/css/CSSScopeRule.idl: Added. * Source/WebCore/css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::setSelectorText): * Source/WebCore/css/StyleRule.cpp: (WebCore::StyleRuleBase::createCSSOMWrapper const): (WebCore::StyleRuleBase::visitDerived): (WebCore::StyleRuleWithNesting::StyleRuleWithNesting): (WebCore::m_originalSelectorList): (WebCore::StyleRuleWithNesting::create): (WebCore::StyleRuleScope::create): (WebCore::StyleRuleScope::copy const): (WebCore::StyleRuleScope::StyleRuleScope): (WebCore::StyleRuleScope::scopeStart const): (WebCore::StyleRuleScope::scopeEnd const): * Source/WebCore/css/StyleRule.h: (WebCore::StyleRuleBase::isScopeRule const): (isType): * Source/WebCore/css/StyleRuleType.h: * Source/WebCore/css/StyleSheetContents.cpp: (WebCore::StyleSheetContents::traverseSubresources const): * Source/WebCore/css/parser/CSSAtRuleID.cpp: (WebCore::cssAtRuleID): * Source/WebCore/css/parser/CSSAtRuleID.h: * Source/WebCore/css/parser/CSSParser.cpp: (WebCore::CSSParser::parseSelectorList): (WebCore::CSSParser::parseSelector): Deleted. * Source/WebCore/css/parser/CSSParser.h: * Source/WebCore/css/parser/CSSParserContext.cpp: (WebCore::add): * Source/WebCore/css/parser/CSSParserContext.h: * Source/WebCore/css/parser/CSSParserEnum.h: * Source/WebCore/css/parser/CSSParserImpl.cpp: (WebCore::filterProperties): (WebCore::CSSParserImpl::parsePageSelector): (WebCore::computeNewAllowedRules): (WebCore::CSSParserImpl::consumeAtRule): (WebCore::CSSParserImpl::consumeQualifiedRule): (WebCore::CSSParserImpl::consumeImportRule): (WebCore::fontFeatureValuesTypeMappings): (WebCore::CSSParserImpl::consumeFontFeatureValuesRuleBlock): (WebCore::CSSParserImpl::consumeFontFeatureValuesRule): (WebCore::CSSParserImpl::consumeFontPaletteValuesRule): (WebCore::CSSParserImpl::consumeKeyframesRule): (WebCore::CSSParserImpl::consumePageRule): (WebCore::CSSParserImpl::consumeScopeRule): (WebCore::CSSParserImpl::consumeStyleRule): (WebCore::CSSParserImpl::consumeBlockContent): (WebCore::CSSParserImpl::consumeDeclarationListInNewNestingContext): * Source/WebCore/css/parser/CSSParserImpl.h: * Source/WebCore/css/parser/CSSSelectorParser.cpp: (WebCore::parseCSSSelectorList): (WebCore::CSSSelectorParser::consumeComplexForgivingSelectorList): (WebCore::CSSSelectorParser::consumeNestedComplexForgivingSelectorList): (WebCore::CSSSelectorParser::consumePseudo): (WebCore::parseCSSSelector): Deleted. (WebCore::CSSSelectorParser::consumeForgivingComplexSelectorList): Deleted. * Source/WebCore/css/parser/CSSSelectorParser.h: * Source/WebCore/dom/SelectorQuery.cpp: (WebCore::SelectorQueryCache::add): * Source/WebCore/inspector/InspectorStyleSheet.cpp: (WebCore::flatteningStrategyForStyleRuleType): (WebCore::isValidRuleHeaderText): * Source/WebCore/inspector/agents/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::highlightSelector): * Source/WebCore/style/RuleSetBuilder.cpp: (WebCore::Style::RuleSetBuilder::addChildRule): * Source/WebCore/testing/Internals.cpp: (WebCore::Internals::selectorFilterHashCounts): Canonical link: https://commits.webkit.org/270590@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes