Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3a633e3e57c55d4abe012301360c6506164e94ed
      
https://github.com/WebKit/WebKit/commit/3a633e3e57c55d4abe012301360c6506164e94ed
  Author: Tim Nguyen <[email protected]>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-has-invalidation.tentative-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-has-invalidation.tentative.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-has-matching.tentative-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-has-matching.tentative.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-invalidation.tentative-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-invalidation.tentative.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-matching-quirks.tentative-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-matching-quirks.tentative.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-matching.tentative-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-matching.tentative.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-queryselector.tentative-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-queryselector.tentative.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-class-prefix.tentative-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-class-prefix.tentative.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has-class-prefix.tentative-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has-class-prefix.tentative.html
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/css/CSSSelector.cpp
    M Source/WebCore/css/CSSSelector.h
    M Source/WebCore/css/SelectorChecker.cpp
    M Source/WebCore/css/parser/CSSParserContext.cpp
    M Source/WebCore/css/parser/CSSParserContext.h
    M Source/WebCore/css/parser/CSSSelectorParser.cpp
    M Source/WebCore/css/parser/CSSSelectorParserContext.cpp
    M Source/WebCore/css/parser/CSSSelectorParserContext.h
    M Source/WebCore/cssjit/SelectorCompiler.cpp
    M Source/WebCore/dom/Element.h
    M Source/WebCore/dom/ElementInlines.h
    M Source/WebCore/style/RuleSet.cpp

  Log Message:
  -----------
  [Class prefix selector] Parsing & matching
https://bugs.webkit.org/show_bug.cgi?id=324162
rdar://187388146

Reviewed by Anne van Kesteren.

Adds feature flag, parsing & matching for the class prefix selector (.prefix-*).

https://drafts.csswg.org/selectors-5/#class-prefix

Tests: 
imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-has-invalidation.tentative.html
       
imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-has-matching.tentative.html
       
imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-invalidation.tentative.html
       
imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-matching-quirks.tentative.html
       
imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-matching.tentative.html
       
imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-queryselector.tentative.html
       
imported/w3c/web-platform-tests/css/selectors/parsing/parse-class-prefix.tentative.html
       
imported/w3c/web-platform-tests/css/selectors/parsing/parse-has-class-prefix.tentative.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-has-invalidation.tentative-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-has-invalidation.tentative.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-has-matching.tentative-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-has-matching.tentative.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-invalidation.tentative-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-invalidation.tentative.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-matching-quirks.tentative-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-matching-quirks.tentative.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-matching.tentative-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-matching.tentative.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-queryselector.tentative-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/class-prefix-selector-queryselector.tentative.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-class-prefix.tentative-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-class-prefix.tentative.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has-class-prefix.tentative-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-has-class-prefix.tentative.html:
 Added.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/css/CSSSelector.cpp:
(WebCore::simpleSelectorSpecificity):
(WebCore::CSSSelector::selectorText const):
* Source/WebCore/css/CSSSelector.h:
* Source/WebCore/css/SelectorChecker.cpp:
(WebCore::canMatchHoverOrActiveInQuirksMode):
(WebCore::SelectorChecker::checkOne const):
* Source/WebCore/css/parser/CSSParserContext.cpp:
(WebCore::add):
* Source/WebCore/css/parser/CSSParserContext.h:
* Source/WebCore/css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::consumeClass):
* Source/WebCore/css/parser/CSSSelectorParserContext.cpp:
(WebCore::CSSSelectorParserContext::CSSSelectorParserContext):
(WebCore::add):
* Source/WebCore/css/parser/CSSSelectorParserContext.h:
* Source/WebCore/cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::constructFragmentsInternal):
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/ElementInlines.h:
(WebCore::Element::hasClassNamePrefix const):
(WebCore::classNameMatchesPrefix):
* Source/WebCore/style/RuleSet.cpp:
(WebCore::Style::RuleSet::addRuleToBucket):

Canonical link: https://commits.webkit.org/321643@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to