Changeset 281692 in webkit
- Timestamp:
- Aug 27, 2021 6:21:29 AM (11 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-specificity-002-expected.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-specificity-002.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/w3c-import.log (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSSelector.cpp (modified) (1 diff)
-
Source/WebCore/style/ElementRuleCollector.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r281689 r281692 1 2021-08-27 Emilio Cobos Álvarez <emilio@crisal.io> 2 3 Don't forget about the outer selector when matching ::slotted(). 4 https://bugs.webkit.org/show_bug.cgi?id=229438 5 6 Reviewed by Antti Koivisto. 7 8 * web-platform-tests/css/css-scoping/slotted-specificity-002-expected.html: Added. 9 * web-platform-tests/css/css-scoping/slotted-specificity-002.html: Added. 10 * web-platform-tests/css/css-scoping/w3c-import.log: 11 1 12 2021-08-27 Martin Robinson <mrobinson@webkit.org> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/w3c-import.log
r264522 r281692 135 135 /LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-placeholder.html 136 136 /LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-slot.html 137 /LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-specificity-002-expected.html 138 /LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-specificity-002.html 137 139 /LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-specificity-expected.html 138 140 /LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-specificity.html -
trunk/Source/WebCore/ChangeLog
r281691 r281692 1 2021-08-27 Emilio Cobos Álvarez <emilio@crisal.io> 2 3 Don't forget about the outer selector when matching ::slotted(). 4 https://bugs.webkit.org/show_bug.cgi?id=229438 5 6 Reviewed by Antti Koivisto. 7 8 Test: imported/w3c/web-platform-tests/css/css-scoping/slotted-specificity-002.html 9 10 * css/CSSSelector.cpp: 11 (WebCore::simpleSelectorSpecificityInternal): 12 * style/ElementRuleCollector.cpp: 13 (WebCore::Style::ElementRuleCollector::ruleMatches): 14 1 15 2021-08-27 Andres Gonzalez <andresg_22@apple.com> 2 16 -
trunk/Source/WebCore/css/CSSSelector.cpp
r281503 r281692 147 147 return (simpleSelector.tagQName().localName() != starAtom()) ? static_cast<unsigned>(SelectorSpecificityIncrement::ClassC) : 0; 148 148 case CSSSelector::PseudoElement: 149 // Slotted only competes with other slotted selectors for specificity, 150 // so whether we add the ClassC specificity shouldn't be observable. 151 if (simpleSelector.pseudoElementType() == CSSSelector::PseudoElementSlotted) 152 return maxSpecificity(*simpleSelector.selectorList()); 149 153 return static_cast<unsigned>(SelectorSpecificityIncrement::ClassC); 150 154 case CSSSelector::Unknown: -
trunk/Source/WebCore/style/ElementRuleCollector.cpp
r278277 r281692 485 485 { 486 486 auto* selector = ruleData.selector(); 487 auto* selectorForMatching = selector; 487 488 if (m_isMatchingSlottedPseudoElements) { 488 selector = findSlottedPseudoElementSelector(ruleData.selector());489 if (!selector )489 selectorForMatching = findSlottedPseudoElementSelector(ruleData.selector()); 490 if (!selectorForMatching) 490 491 return false; 491 492 } 492 493 // Slow path. 493 494 SelectorChecker selectorChecker(element().document()); 494 selectorMatches = selectorChecker.match(*selector , element(), context);495 selectorMatches = selectorChecker.match(*selectorForMatching, element(), context); 495 496 if (selectorMatches) 496 497 specificity = selector->computeSpecificity();
Note: See TracChangeset
for help on using the changeset viewer.