Changeset 175453 in webkit
- Timestamp:
- Nov 1, 2014 11:11:11 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 14 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r175452 r175453 1 2014-11-01 Benjamin Poulain <bpoulain@apple.com> 2 3 Fix the specificity of the extended :not() selector 4 https://bugs.webkit.org/show_bug.cgi?id=138275 5 6 Reviewed by Andreas Kling. 7 8 * fast/css/not-self-specificity-expected.html: Added. 9 * fast/css/not-self-specificity.html: Added. 10 Test that :not() itself does not influence the specificity, 11 only the nested selectors contribute to the global specificity. 12 13 * fast/css/not-specificity-1-expected.html: Added. 14 * fast/css/not-specificity-1.html: Added. 15 * fast/css/not-specificity-2-expected.html: Added. 16 * fast/css/not-specificity-2.html: Added. 17 * fast/css/not-specificity-3-expected.html: Added. 18 * fast/css/not-specificity-3.html: Added. 19 Tests for compound selectors. 20 All tests are variations of the same base testing specificity 21 and position. 22 23 * fast/css/not-specificity-4-expected.html: Added. 24 * fast/css/not-specificity-4.html: Added. 25 * fast/css/not-specificity-5-expected.html: Added. 26 * fast/css/not-specificity-5.html: Added. 27 * fast/css/not-specificity-6-expected.html: Added. 28 * fast/css/not-specificity-6.html: Added. 29 Same thing for complex selectors. 30 31 * fast/selectors/class-style-update-with-not-expected.txt: 32 Yeah, one more test fixed :) 33 1 34 2014-11-01 Hunseop Jeong <hs85.jeong@samsung.com> 2 35 -
trunk/LayoutTests/fast/selectors/class-style-update-with-not-expected.txt
r175018 r175453 28 28 PASS getComputedStyle(document.querySelectorAll("target")[0]).color is "rgb(0, 1, 2)" 29 29 PASS getComputedStyle(document.querySelectorAll("target")[1]).color is "rgb(0, 1, 2)" 30 FAIL getComputedStyle(document.querySelectorAll("target")[0]).color should be rgb(3, 4, 5). Was rgb(0, 1, 2). 31 FAIL getComputedStyle(document.querySelectorAll("target")[1]).color should be rgb(3, 4, 5). Was rgb(0, 1, 2). 32 FAIL getComputedStyle(document.querySelectorAll("target")[0]).color should be rgb(6, 7, 8). Was rgb(0, 1, 2). 33 FAIL getComputedStyle(document.querySelectorAll("target")[1]).color should be rgb(6, 7, 8). Was rgb(0, 1, 2). 34 FAIL getComputedStyle(document.querySelectorAll("target")[0]).color should be rgb(9, 10, 11). Was rgb(0, 1, 2). 35 FAIL getComputedStyle(document.querySelectorAll("target")[1]).color should be rgb(9, 10, 11). Was rgb(0, 1, 2). 36 FAIL getComputedStyle(document.querySelectorAll("target")[0]).color should be rgb(12, 13, 14). Was rgb(0, 1, 2). 37 FAIL getComputedStyle(document.querySelectorAll("target")[1]).color should be rgb(12, 13, 14). Was rgb(0, 1, 2). 30 PASS getComputedStyle(document.querySelectorAll("target")[0]).color is "rgb(3, 4, 5)" 31 PASS getComputedStyle(document.querySelectorAll("target")[1]).color is "rgb(3, 4, 5)" 32 PASS getComputedStyle(document.querySelectorAll("target")[0]).color is "rgb(6, 7, 8)" 33 PASS getComputedStyle(document.querySelectorAll("target")[1]).color is "rgb(6, 7, 8)" 34 PASS getComputedStyle(document.querySelectorAll("target")[0]).color is "rgb(9, 10, 11)" 35 PASS getComputedStyle(document.querySelectorAll("target")[1]).color is "rgb(9, 10, 11)" 36 PASS getComputedStyle(document.querySelectorAll("target")[0]).color is "rgb(12, 13, 14)" 37 PASS getComputedStyle(document.querySelectorAll("target")[1]).color is "rgb(12, 13, 14)" 38 38 PASS successfullyParsed is true 39 39 -
trunk/Source/WebCore/ChangeLog
r175447 r175453 1 2014-11-01 Benjamin Poulain <bpoulain@apple.com> 2 3 Fix the specificity of the extended :not() selector 4 https://bugs.webkit.org/show_bug.cgi?id=138275 5 6 Reviewed by Andreas Kling. 7 8 The current draft says "The specificity of a :not() pseudo-class 9 is the specificity of the most specifc complex selector in its selector list." 10 11 It is still unclear how :not() plays with other new selectors. Until that is clarified, 12 this only handle the simple cases. 13 14 Tests: fast/css/not-self-specificity.html 15 fast/css/not-specificity-1.html 16 fast/css/not-specificity-2.html 17 fast/css/not-specificity-3.html 18 fast/css/not-specificity-4.html 19 fast/css/not-specificity-5.html 20 fast/css/not-specificity-6.html 21 22 * css/CSSSelector.cpp: 23 (WebCore::CSSSelector::specificityForOneSelector): 24 1 25 2014-10-31 Benjamin Poulain <bpoulain@apple.com> 2 26 -
trunk/Source/WebCore/css/CSSSelector.cpp
r175447 r175453 102 102 // FIXME: PseudoAny should base the specificity on the sub-selectors. 103 103 // See http://lists.w3.org/Archives/Public/www-style/2010Sep/0530.html 104 105 #if ENABLE(CSS_SELECTORS_LEVEL4) 106 if (pseudoClassType() == PseudoClassNot) { 107 ASSERT_WITH_MESSAGE(selectorList() && selectorList()->first(), "The parser should never generate a valid selector for an empty :not()."); 108 109 unsigned maxSpecificity = 0; 110 for (const CSSSelector* subSelector = selectorList()->first(); subSelector; subSelector = CSSSelectorList::next(subSelector)) 111 maxSpecificity = std::max(maxSpecificity, subSelector->specificity()); 112 return maxSpecificity; 113 } 114 FALLTHROUGH; 115 #else 104 116 if (pseudoClassType() == PseudoClassNot && selectorList()) 105 117 return selectorList()->first()->specificityForOneSelector(); 106 118 FALLTHROUGH; 119 #endif 107 120 case Exact: 108 121 case Class:
Note: See TracChangeset
for help on using the changeset viewer.