Changeset 260319 in webkit
- Timestamp:
- Apr 18, 2020 1:24:31 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r260305 r260319 1 2020-04-18 Antti Koivisto <antti@apple.com> 2 3 [CSS selectors] Support :where() pseudo class 4 https://bugs.webkit.org/show_bug.cgi?id=210690 5 6 Reviewed by Sam Weinig. 7 8 * fast/selectors/where-specificity-expected.html: Added. 9 * fast/selectors/where-specificity.html: Added. 10 1 11 2020-04-17 Simon Fraser <simon.fraser@apple.com> 2 12 -
trunk/LayoutTests/imported/w3c/ChangeLog
r260256 r260319 1 2020-04-18 Antti Koivisto <antti@apple.com> 2 3 [CSS selectors] Support :where() pseudo class 4 https://bugs.webkit.org/show_bug.cgi?id=210690 5 6 Reviewed by Sam Weinig. 7 8 * web-platform-tests/css/selectors/invalidation/where-expected.txt: 9 1 10 2020-04-17 Jason Lawrence <lawrence.j@apple.com> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/where-expected.txt
r259194 r260319 6 6 Yellow 7 7 8 FAIL Preconditions. assert_equals: expected "rgb(255, 0, 0)" but got "rgb(0, 0, 0)" 9 FAIL Invalidate :where() for simple selector arguments. assert_equals: expected "rgb(255, 0, 0)" but got "rgb(0, 0, 0)" 10 FAIL Invalidate :where() for compound selector arguments. assert_equals: expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 11 FAIL Invalidate :where() for complex selector arguments. assert_equals: expected "rgb(255, 255, 0)" but got "rgb(0, 0, 0)" 12 FAIL Invalidate nested :where(). assert_equals: expected "rgb(0, 0, 255)" but got "rgb(0, 0, 0)" 8 PASS Preconditions. 9 PASS Invalidate :where() for simple selector arguments. 10 PASS Invalidate :where() for compound selector arguments. 11 PASS Invalidate :where() for complex selector arguments. 12 PASS Invalidate nested :where(). 13 13 -
trunk/Source/WebCore/ChangeLog
r260317 r260319 1 2020-04-18 Antti Koivisto <antti@apple.com> 2 3 [CSS selectors] Support :where() pseudo class 4 https://bugs.webkit.org/show_bug.cgi?id=210690 5 6 Reviewed by Sam Weinig. 7 8 "The Specificity-adjustment pseudo-class, :where(), is a functional pseudo-class with the same 9 syntax and functionality as :is(). Unlike :is(), neither the :where pseudo-class, nor any of 10 its arguments contribute to the specificity of the selector—its specificity is always zero. 11 12 This is useful for introducing filters in a selector while keeping the associated style 13 declarations easy to override." 14 15 https://drafts.csswg.org/selectors-4/#zero-matches 16 17 In terms of implementation this is just another alias for :is() with different (always 0) specificity. 18 19 Test: fast/selectors/where-specificity.html 20 21 * css/CSSSelector.cpp: 22 (WebCore::simpleSelectorSpecificityInternal): 23 24 Here is where it differs from PseudoClassIs. 25 26 (WebCore::CSSSelector::selectorText const): 27 * css/CSSSelector.h: 28 * css/SelectorChecker.cpp: 29 (WebCore::SelectorChecker::checkOne const): 30 * css/SelectorPseudoClassAndCompatibilityElementMap.in: 31 * css/parser/CSSSelectorParser.cpp: 32 (WebCore::isOnlyPseudoClassFunction): 33 (WebCore::CSSSelectorParser::consumePseudo): 34 * cssjit/SelectorCompiler.cpp: 35 (WebCore::SelectorCompiler::addPseudoClassType): 36 1 37 2020-04-18 Rob Buis <rbuis@igalia.com> 2 38 -
trunk/Source/WebCore/css/CSSSelector.cpp
r260069 r260319 125 125 case CSSSelector::PseudoClassNot: 126 126 return maxSpecificity(*simpleSelector.selectorList()); 127 case CSSSelector::PseudoClassWhere: 128 return 0; 127 129 case CSSSelector::PseudoClassNthChild: 128 130 case CSSSelector::PseudoClassNthLastChild: … … 606 608 break; 607 609 } 610 case CSSSelector::PseudoClassWhere: { 611 builder.appendLiteral(":where("); 612 cs->selectorList()->buildSelectorsText(builder); 613 builder.append(')'); 614 break; 615 } 608 616 case CSSSelector::PseudoClassPlaceholderShown: 609 617 builder.appendLiteral(":placeholder-shown"); -
trunk/Source/WebCore/css/CSSSelector.h
r260069 r260319 124 124 PseudoClassIs, 125 125 PseudoClassMatches, // obsolete synonym for PseudoClassIs 126 PseudoClassWhere, 126 127 PseudoClassOptional, 127 128 PseudoClassPlaceholderShown, -
trunk/Source/WebCore/css/SelectorChecker.cpp
r260069 r260319 799 799 case CSSSelector::PseudoClassIs: 800 800 case CSSSelector::PseudoClassMatches: 801 case CSSSelector::PseudoClassWhere: 801 802 { 802 803 bool hasMatchedAnything = false; -
trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in
r259261 r260319 72 72 vertical 73 73 visited 74 where 74 75 window-inactive 75 76 -
trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp
r259261 r260319 498 498 case CSSSelector::PseudoClassIs: 499 499 case CSSSelector::PseudoClassMatches: 500 case CSSSelector::PseudoClassWhere: 500 501 case CSSSelector::PseudoClassNthChild: 501 502 case CSSSelector::PseudoClassNthLastChild: … … 635 636 } 636 637 case CSSSelector::PseudoClassIs: 637 case CSSSelector::PseudoClassMatches: { 638 case CSSSelector::PseudoClassMatches: 639 case CSSSelector::PseudoClassWhere: { 638 640 auto selectorList = makeUnique<CSSSelectorList>(); 639 641 *selectorList = consumeComplexSelectorList(block); -
trunk/Source/WebCore/cssjit/SelectorCompiler.cpp
r260069 r260319 801 801 case CSSSelector::PseudoClassIs: 802 802 case CSSSelector::PseudoClassMatches: 803 case CSSSelector::PseudoClassWhere: 803 804 { 804 805 SelectorList matchesList;
Note: See TracChangeset
for help on using the changeset viewer.