Changeset 81742 in webkit
- Timestamp:
- Mar 22, 2011 6:44:38 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r81741 r81742 1 2011-03-17 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Antti Koivisto. 4 5 webkit should implement -moz-any selector (as -webkit-any obviously) 6 https://bugs.webkit.org/show_bug.cgi?id=38095 7 8 * fast/css/css-selector-text-expected.txt: 9 * fast/css/css-selector-text.html: 10 * fast/css/css-set-selector-text-expected.txt: 11 * fast/css/css-set-selector-text.html: 12 * fast/css/pseudo-any-expected.txt: Added. 13 * fast/css/pseudo-any.html: Added. 14 * fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt: 15 * fast/dom/SelectorAPI/not-supported-namespace-in-selector.html: 16 * fast/dom/SelectorAPI/unknown-pseudo-expected.txt: Added. 17 * fast/dom/SelectorAPI/unknown-pseudo.html: Added. 18 1 19 2011-03-22 Mihai Parparita <mihaip@chromium.org> 2 20 -
trunk/LayoutTests/fast/css/css-selector-text-expected.txt
r20477 r81742 47 47 PASS parseThenSerializeRule(':lang(a) { }') is ':lang(a) { }' 48 48 PASS parseThenSerializeRule(':not(a) { }') is ':not(a) { }' 49 PASS parseThenSerializeRule(':-webkit-any(a,b,p) { }') is ':-webkit-any(a,b,p) { }' 49 50 50 51 PASS parseThenSerializeRule('::after { }') is '::after { }' … … 66 67 67 68 PASS parseThenSerializeRule('input:not([type="file"]):focus { }') is 'input:not([type="file"]):focus { }' 69 PASS parseThenSerializeRule(':-webkit-any([type="file"]) { }') is ':-webkit-any([type="file"]) { }' 70 PASS parseThenSerializeRule(':-webkit-any(:hover) { }') is ':-webkit-any(:hover) { }' 71 PASS parseThenSerializeRule('input:-webkit-any([type="file"],:hover,:focus):enabled { }') is 'input:-webkit-any([type="file"],:hover,:focus):enabled { }' 72 PASS parseThenSerializeRule(':-webkit-any(input[type="file"],a:hover,button:focus) { }') is ':-webkit-any(input[type="file"],a:hover,button:focus) { }' 73 PASS parseThenSerializeRule(':-webkit-any(.class1.class2.class3) { }') is ':-webkit-any(.class1.class2.class3) { }' 74 PASS parseThenSerializeRule(':-webkit-any(.class1:hover) { }') is ':-webkit-any(.class1:hover) { }' 75 PASS parseThenSerializeRule(':-webkit-any(a.class1.class2.class3:hover) { }') is ':-webkit-any(a.class1.class2.class3:hover) { }' 68 76 69 77 PASS parseThenSerializeRule('*:active { }') is ':active { }' … … 80 88 PASS parseThenSerializeRule(':first-letter { }') is '::first-letter { }' 81 89 PASS parseThenSerializeRule(':first-line { }') is '::first-line { }' 90 PASS parseThenSerializeRule(':-webkit-any( a.class1 , #id,[attr] ) { }') is ':-webkit-any(a.class1,#id,[attr]) { }' 82 91 83 92 PASS successfullyParsed is true -
trunk/LayoutTests/fast/css/css-selector-text.html
r25111 r81742 83 83 testSelectorRoundTrip(":lang(a)"); 84 84 testSelectorRoundTrip(":not(a)"); 85 testSelectorRoundTrip(":-webkit-any(a,b,p)"); 85 86 86 87 debug(''); … … 110 111 111 112 testSelectorRoundTrip('input:not([type="file"]):focus'); 113 testSelectorRoundTrip(':-webkit-any([type="file"])'); 114 testSelectorRoundTrip(':-webkit-any(:hover)'); 115 testSelectorRoundTrip('input:-webkit-any([type="file"],:hover,:focus):enabled'); 116 testSelectorRoundTrip(':-webkit-any(input[type="file"],a:hover,button:focus)'); 117 testSelectorRoundTrip(':-webkit-any(.class1.class2.class3)'); 118 testSelectorRoundTrip(':-webkit-any(.class1:hover)'); 119 testSelectorRoundTrip(':-webkit-any(a.class1.class2.class3:hover)'); 112 120 113 121 debug(''); … … 132 140 shouldBe("parseThenSerializeRule(':first-letter { }')", "'::first-letter { }'"); 133 141 shouldBe("parseThenSerializeRule(':first-line { }')", "'::first-line { }'"); 142 shouldBe("parseThenSerializeRule(':-webkit-any( a.class1 , #id,[attr] ) { }')","':-webkit-any(a.class1,#id,[attr]) { }'"); 134 143 135 144 debug(''); -
trunk/LayoutTests/fast/css/css-set-selector-text-expected.txt
r68388 r81742 57 57 PASS setThenReadSelectorText(':lang(a)') is ':lang(a)' 58 58 PASS setThenReadSelectorText(':not(a)') is ':not(a)' 59 PASS setThenReadSelectorText(':-webkit-any(a,b,p)') is ':-webkit-any(a,b,p)' 59 60 60 61 PASS setThenReadSelectorText('::after') is '::after' … … 76 77 77 78 PASS setThenReadSelectorText('input:not([type="file"]):focus') is 'input:not([type="file"]):focus' 79 PASS setThenReadSelectorText(':-webkit-any([type="file"])') is ':-webkit-any([type="file"])' 80 PASS setThenReadSelectorText(':-webkit-any(:hover)') is ':-webkit-any(:hover)' 81 PASS setThenReadSelectorText('input:-webkit-any([type="file"],:hover,:focus):enabled') is 'input:-webkit-any([type="file"],:hover,:focus):enabled' 82 PASS setThenReadSelectorText(':-webkit-any(input[type="file"],a:hover,button:focus)') is ':-webkit-any(input[type="file"],a:hover,button:focus)' 83 PASS setThenReadSelectorText(':-webkit-any(.class1.class2.class3)') is ':-webkit-any(.class1.class2.class3)' 84 PASS setThenReadSelectorText(':-webkit-any(.class1:hover)') is ':-webkit-any(.class1:hover)' 85 PASS setThenReadSelectorText(':-webkit-any(a.class1.class2.class3:hover)') is ':-webkit-any(a.class1.class2.class3:hover)' 78 86 79 87 PASS setThenReadSelectorText('*:active') is ':active' … … 90 98 PASS setThenReadSelectorText(':first-letter') is '::first-letter' 91 99 PASS setThenReadSelectorText(':first-line') is '::first-line' 100 PASS setThenReadSelectorText(':-webkit-any( a.class1 , #id,[attr] )') is ':-webkit-any(a.class1,#id,[attr])' 92 101 93 102 PASS successfullyParsed is true -
trunk/LayoutTests/fast/css/css-set-selector-text.html
r68388 r81742 100 100 testSelectorRoundTrip(":lang(a)"); 101 101 testSelectorRoundTrip(":not(a)"); 102 testSelectorRoundTrip(":-webkit-any(a,b,p)"); 102 103 103 104 debug(''); … … 127 128 128 129 testSelectorRoundTrip('input:not([type="file"]):focus'); 130 testSelectorRoundTrip(':-webkit-any([type="file"])'); 131 testSelectorRoundTrip(':-webkit-any(:hover)'); 132 testSelectorRoundTrip('input:-webkit-any([type="file"],:hover,:focus):enabled'); 133 testSelectorRoundTrip(':-webkit-any(input[type="file"],a:hover,button:focus)'); 134 testSelectorRoundTrip(':-webkit-any(.class1.class2.class3)'); 135 testSelectorRoundTrip(':-webkit-any(.class1:hover)'); 136 testSelectorRoundTrip(':-webkit-any(a.class1.class2.class3:hover)'); 129 137 130 138 debug(''); … … 149 157 shouldBe("setThenReadSelectorText(':first-letter')", "'::first-letter'"); 150 158 shouldBe("setThenReadSelectorText(':first-line')", "'::first-line'"); 159 shouldBe("setThenReadSelectorText(':-webkit-any( a.class1 , #id,[attr] )')","':-webkit-any(a.class1,#id,[attr])'"); 151 160 152 161 debug(''); -
trunk/LayoutTests/fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt
r48723 r81742 28 28 PASS: document.querySelectorAll('[|name=value]') did not throw 29 29 PASS: document.body.webkitMatchesSelector('[|name=value]') did not throw 30 PASS: document.querySelector(':-webkit-any(bbb|pre)') throws: Error: NAMESPACE_ERR: DOM Exception 14 30 31 PASS: document.querySelector('div [bbb|name=value]') throws: Error: NAMESPACE_ERR: DOM Exception 14 31 32 PASS: document.querySelectorAll('div [bbb|name=value]') throws: Error: NAMESPACE_ERR: DOM Exception 14 -
trunk/LayoutTests/fast/dom/SelectorAPI/not-supported-namespace-in-selector.html
r48723 r81742 62 62 shouldNotThrow("document.body.webkitMatchesSelector('[|name=value]')"); 63 63 64 shouldThrow("document.querySelector(':-webkit-any(bbb|pre)')"); 65 64 66 shouldThrow("document.querySelector('div [bbb|name=value]')"); 65 67 shouldThrow("document.querySelectorAll('div [bbb|name=value]')"); -
trunk/Source/WebCore/ChangeLog
r81740 r81742 1 2011-03-17 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Antti Koivisto. 4 5 webkit should implement -moz-any selector (as -webkit-any obviously) 6 https://bugs.webkit.org/show_bug.cgi?id=38095 7 8 For now, match the Mozilla implementation with respect to specificity 9 and only allowing simple selectors. Both of these are likely to change 10 pending discussion on www-style@. 11 12 Tests: fast/css/pseudo-any.html 13 fast/dom/SelectorAPI/unknown-pseudo.html 14 15 * css/CSSGrammar.y: 16 Create simple_selector_list. This is exactly like selector_list 17 except it only allows simple selectors and creates a new vector 18 instead of a reusable one since there can be multiple in one rule. 19 * css/CSSParser.cpp: 20 (WebCore::CSSParser::~CSSParser): 21 (WebCore::CSSParser::lex): 22 (WebCore::CSSParser::createFloatingSelectorVector): 23 (WebCore::CSSParser::sinkFloatingSelectorVector): 24 * css/CSSParser.h: 25 * css/CSSParserValues.cpp: 26 (WebCore::CSSParserSelector::adoptSelectorVector): 27 * css/CSSParserValues.h: 28 * css/CSSSelector.cpp: 29 (WebCore::CSSSelector::specificityForOneSelector): 30 (WebCore::CSSSelector::pseudoId): 31 (WebCore::nameToPseudoTypeMap): 32 (WebCore::CSSSelector::extractPseudoType): 33 (WebCore::CSSSelector::selectorText): 34 (WebCore::CSSSelector::setSelectorList): 35 (WebCore::CSSSelector::RareData::RareData): 36 (WebCore::CSSSelector::RareData::~RareData): 37 These need to be moved into the cpp file so that we can 38 have an OwnPtr<CSSSelectorList> in CSSSelector::RareData. 39 * css/CSSSelector.h: 40 (WebCore::CSSSelector::selectorList): 41 * css/CSSSelectorList.cpp: 42 (WebCore::forEachTagSelector): 43 * css/CSSStyleSelector.cpp: 44 (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): 45 (WebCore::collectFeaturesFromSelector): 46 * css/tokenizer.flex: 47 1 48 2011-03-22 John Bauman <jbauman@chromium.org> 2 49 -
trunk/Source/WebCore/css/CSSGrammar.y
r80150 r81742 190 190 %token <string> URI 191 191 %token <string> FUNCTION 192 %token <string> ANYFUNCTION 192 193 %token <string> NOTFUNCTION 193 194 … … 248 249 %type <selector> selector 249 250 %type <selectorList> selector_list 251 %type <selectorList> simple_selector_list 250 252 %type <selector> selector_with_trailing_whitespace 251 253 %type <selector> class … … 919 921 if ($$) 920 922 static_cast<CSSParser*>(parser)->updateSpecifiersWithElementName($1, starAtom, $$); 923 } 924 ; 925 926 simple_selector_list: 927 simple_selector %prec UNIMPORTANT_TOK { 928 if ($1) { 929 CSSParser* p = static_cast<CSSParser*>(parser); 930 $$ = p->createFloatingSelectorVector(); 931 $$->shrink(0); 932 $$->append(p->sinkFloatingSelector($1)); 933 p->updateLastSelectorLineAndPosition(); 934 } else 935 $$ = 0 936 } 937 | simple_selector_list maybe_space ',' maybe_space simple_selector %prec UNIMPORTANT_TOK { 938 if ($1 && $5) { 939 CSSParser* p = static_cast<CSSParser*>(parser); 940 $$ = $1; 941 $$->append(p->sinkFloatingSelector($5)); 942 p->updateLastSelectorLineAndPosition(); 943 } else 944 $$ = 0; 945 } 946 | simple_selector_list error { 947 $$ = 0; 921 948 } 922 949 ; … … 1102 1129 // FIXME: This call is needed to force selector to compute the pseudoType early enough. 1103 1130 $$->pseudoType(); 1131 } 1132 // use by :-webkit-any. 1133 // FIXME: should we support generic selectors here or just simple_selectors? 1134 // Use simple_selector_list for now to match -moz-any. 1135 // See http://lists.w3.org/Archives/Public/www-style/2010Sep/0566.html for some 1136 // related discussion with respect to :not. 1137 | ':' ANYFUNCTION maybe_space simple_selector_list maybe_space ')' { 1138 if ($4) { 1139 CSSParser *p = static_cast<CSSParser*>(parser); 1140 $$ = p->createFloatingSelector(); 1141 $$->setMatch(CSSSelector::PseudoClass); 1142 $$->adoptSelectorVector(*p->sinkFloatingSelectorVector($4)); 1143 $2.lower(); 1144 $$->setValue($2); 1145 CSSSelector::PseudoType type = $$->pseudoType(); 1146 if (type != CSSSelector::PseudoAny) 1147 $$ = 0; 1148 } else 1149 $$ = 0; 1104 1150 } 1105 1151 // used by :nth-*(ax+b) -
trunk/Source/WebCore/css/CSSParser.cpp
r81684 r81742 175 175 176 176 fastDeleteAllValues(m_floatingSelectors); 177 deleteAllValues(m_floatingSelectorVectors); 177 178 deleteAllValues(m_floatingValueLists); 178 179 deleteAllValues(m_floatingFunctions); … … 5692 5693 case UNICODERANGE: 5693 5694 case FUNCTION: 5695 case ANYFUNCTION: 5694 5696 case NOTFUNCTION: 5695 5697 yylval->string.characters = t; … … 5903 5905 } 5904 5906 return adoptPtr(selector); 5907 } 5908 5909 Vector<OwnPtr<CSSParserSelector> >* CSSParser::createFloatingSelectorVector() 5910 { 5911 Vector<OwnPtr<CSSParserSelector> >* selectorVector = new Vector<OwnPtr<CSSParserSelector> >; 5912 m_floatingSelectorVectors.add(selectorVector); 5913 return selectorVector; 5914 } 5915 5916 Vector<OwnPtr<CSSParserSelector> >* CSSParser::sinkFloatingSelectorVector(Vector<OwnPtr<CSSParserSelector> >* selectorVector) 5917 { 5918 if (selectorVector) { 5919 ASSERT(m_floatingSelectorVectors.contains(selectorVector)); 5920 m_floatingSelectorVectors.remove(selectorVector); 5921 } 5922 return selectorVector; 5905 5923 } 5906 5924 -
trunk/Source/WebCore/css/CSSParser.h
r81684 r81742 186 186 PassOwnPtr<CSSParserSelector> sinkFloatingSelector(CSSParserSelector*); 187 187 188 Vector<OwnPtr<CSSParserSelector> >* createFloatingSelectorVector(); 189 Vector<OwnPtr<CSSParserSelector> >* sinkFloatingSelectorVector(Vector<OwnPtr<CSSParserSelector> >*); 190 188 191 CSSParserValueList* createFloatingValueList(); 189 192 CSSParserValueList* sinkFloatingValueList(CSSParserValueList*); … … 319 322 Vector<RefPtr<CSSRuleList> > m_parsedRuleLists; 320 323 HashSet<CSSParserSelector*> m_floatingSelectors; 324 HashSet<Vector<OwnPtr<CSSParserSelector> >*> m_floatingSelectorVectors; 321 325 HashSet<CSSParserValueList*> m_floatingValueLists; 322 326 HashSet<CSSParserFunction*> m_floatingFunctions; -
trunk/Source/WebCore/css/CSSParserValues.cpp
r76648 r81742 26 26 #include "CSSQuirkPrimitiveValue.h" 27 27 #include "CSSSelector.h" 28 #include "CSSSelectorList.h" 28 29 29 30 namespace WebCore { … … 97 98 } 98 99 100 void CSSParserSelector::adoptSelectorVector(Vector<OwnPtr<CSSParserSelector> >& selectorVector) 101 { 102 CSSSelectorList* selectorList = fastNew<CSSSelectorList>(); 103 selectorList->adoptSelectorVector(selectorVector); 104 m_selector->setSelectorList(adoptPtr(selectorList)); 105 } 99 106 } 100 107 -
trunk/Source/WebCore/css/CSSParserValues.h
r76648 r81742 110 110 void setRelation(CSSSelector::Relation value) { m_selector->m_relation = value; } 111 111 void setForPage() { m_selector->setForPage(); } 112 112 113 void adoptSelectorVector(Vector<OwnPtr<CSSParserSelector> >& selectorVector); 114 113 115 CSSSelector::PseudoType pseudoType() const { return m_selector->pseudoType(); } 114 116 bool isUnknownPseudoElement() const { return m_selector->isUnknownPseudoElement(); } -
trunk/Source/WebCore/css/CSSSelector.cpp
r77954 r81742 28 28 29 29 #include "CSSOMUtils.h" 30 #include "CSSSelectorList.h" 30 31 #include "HTMLNames.h" 31 32 #include <wtf/Assertions.h> … … 79 80 case Begin: 80 81 case End: 82 // FIXME: PsuedoAny should base the specificity on the sub-selectors. 83 // See http://lists.w3.org/Archives/Public/www-style/2010Sep/0530.html 81 84 if (pseudoType() == PseudoNot && simpleSelector()) 82 85 s += simpleSelector()->specificityForOneSelector(); … … 212 215 case PseudoLink: 213 216 case PseudoVisited: 217 case PseudoAny: 214 218 case PseudoAnyLink: 215 219 case PseudoAutofill: … … 266 270 DEFINE_STATIC_LOCAL(AtomicString, active, ("active")); 267 271 DEFINE_STATIC_LOCAL(AtomicString, after, ("after")); 272 DEFINE_STATIC_LOCAL(AtomicString, any, ("-webkit-any(")); 268 273 DEFINE_STATIC_LOCAL(AtomicString, anyLink, ("-webkit-any-link")); 269 274 DEFINE_STATIC_LOCAL(AtomicString, autofill, ("-webkit-autofill")); … … 365 370 nameToPseudoType->set(after.impl(), CSSSelector::PseudoAfter); 366 371 nameToPseudoType->set(anyLink.impl(), CSSSelector::PseudoAnyLink); 372 nameToPseudoType->set(any.impl(), CSSSelector::PseudoAny); 367 373 nameToPseudoType->set(autofill.impl(), CSSSelector::PseudoAutofill); 368 374 nameToPseudoType->set(before.impl(), CSSSelector::PseudoBefore); … … 528 534 case PseudoLink: 529 535 case PseudoVisited: 536 case PseudoAny: 530 537 case PseudoAnyLink: 531 538 case PseudoAutofill: … … 639 646 str += ":"; 640 647 str += cs->value(); 641 if (cs->pseudoType() == PseudoNot) { 648 649 switch (cs->pseudoType()) { 650 case PseudoNot: 642 651 if (CSSSelector* subSel = cs->simpleSelector()) 643 652 str += subSel->selectorText(); 644 653 str += ")"; 645 } else if (cs->pseudoType() == PseudoLang 646 || cs->pseudoType() == PseudoNthChild 647 || cs->pseudoType() == PseudoNthLastChild 648 || cs->pseudoType() == PseudoNthOfType 649 || cs->pseudoType() == PseudoNthLastOfType) { 654 break; 655 case PseudoLang: 656 case PseudoNthChild: 657 case PseudoNthLastChild: 658 case PseudoNthOfType: 659 case PseudoNthLastOfType: 650 660 str += cs->argument(); 651 661 str += ")"; 662 break; 663 case PseudoAny: { 664 CSSSelector* firstSubSelector = cs->selectorList()->first(); 665 for (CSSSelector* subSelector = firstSubSelector; subSelector; subSelector = CSSSelectorList::next(subSelector)) { 666 if (subSelector != firstSubSelector) 667 str += ","; 668 str += subSelector->selectorText(); 669 } 670 str += ")"; 671 break; 672 } 673 default: 674 break; 652 675 } 653 676 } else if (cs->m_match == CSSSelector::PseudoElement) { … … 743 766 m_data.m_rareData->m_simpleSelector = value; 744 767 } 768 769 void CSSSelector::setSelectorList(PassOwnPtr<CSSSelectorList> selectorList) 770 { 771 createRareData(); 772 m_data.m_rareData->m_selectorList = selectorList; 773 } 745 774 746 775 bool CSSSelector::parseNth() … … 785 814 } 786 815 816 CSSSelector::RareData::RareData(PassRefPtr<AtomicStringImpl> value) 817 : m_value(value.leakRef()) 818 , m_a(0) 819 , m_b(0) 820 , m_attribute(anyQName()) 821 , m_argument(nullAtom) 822 { 823 } 824 825 CSSSelector::RareData::~RareData() 826 { 827 if (m_value) 828 m_value->deref(); 829 } 830 787 831 // a helper function for parsing nth-arguments 788 832 bool CSSSelector::RareData::parseNth() -
trunk/Source/WebCore/css/CSSSelector.h
r80750 r81742 30 30 31 31 namespace WebCore { 32 class CSSSelectorList; 32 33 33 34 // this class represents a selector for a StyleRule … … 130 131 PseudoLink, 131 132 PseudoVisited, 133 PseudoAny, 132 134 PseudoAnyLink, 133 135 PseudoAutofill, … … 249 251 const AtomicString& argument() const { return m_hasRareData ? m_data.m_rareData->m_argument : nullAtom; } 250 252 CSSSelector* simpleSelector() const { return m_hasRareData ? m_data.m_rareData->m_simpleSelector.get() : 0; } 253 CSSSelectorList* selectorList() const { return m_hasRareData ? m_data.m_rareData->m_selectorList.get() : 0; } 251 254 252 255 void setTag(const QualifiedName& value) { m_tag = value; } … … 255 258 void setArgument(const AtomicString&); 256 259 void setSimpleSelector(PassOwnPtr<CSSSelector>); 260 void setSelectorList(PassOwnPtr<CSSSelectorList>); 257 261 258 262 bool parseNth(); … … 295 299 WTF_MAKE_NONCOPYABLE(RareData); WTF_MAKE_FAST_ALLOCATED; 296 300 public: 297 RareData(PassRefPtr<AtomicStringImpl> value) 298 : m_value(value.leakRef()) 299 , m_a(0) 300 , m_b(0) 301 , m_attribute(anyQName()) 302 , m_argument(nullAtom) 303 { 304 } 305 ~RareData() 306 { 307 if (m_value) 308 m_value->deref(); 309 } 301 RareData(PassRefPtr<AtomicStringImpl> value); 302 ~RareData(); 310 303 311 304 bool parseNth(); … … 315 308 int m_a; // Used for :nth-* 316 309 int m_b; // Used for :nth-* 317 OwnPtr<CSSSelector> m_simpleSelector; // Used for :not. 310 // Used for :not. 311 // FIXME: m_selectorList instead to save memory. 312 OwnPtr<CSSSelector> m_simpleSelector; 318 313 QualifiedName m_attribute; // used for attribute selector 319 314 AtomicString m_argument; // Used for :contains, :lang and :nth-* 315 OwnPtr<CSSSelectorList> m_selectorList; // Used for :-webkit-any 320 316 }; 321 317 void createRareData(); -
trunk/Source/WebCore/css/CSSSelectorList.cpp
r80750 r81742 127 127 return true; 128 128 } 129 if (CSSSelectorList* selectorList = selector->selectorList()) { 130 for (CSSSelector* subSelector = selectorList->first(); subSelector; subSelector = CSSSelectorList::next(subSelector)) { 131 if (forEachTagSelector(functor, subSelector)) 132 return true; 133 } 134 } 129 135 } while ((selector = selector->tagHistory())); 130 136 -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r81684 r81742 2844 2844 return true; 2845 2845 break; 2846 case CSSSelector::PseudoAny: 2847 for (CSSSelector* selector = sel->selectorList()->first(); selector; selector = CSSSelectorList::next(selector)) { 2848 if (checkSelector(selector, e, selectorAttrs, dynamicPseudo, true, elementStyle, elementParentStyle) == SelectorMatches) 2849 return true; 2850 } 2851 break; 2846 2852 case CSSSelector::PseudoAnyLink: 2847 2853 if (e && e->isLink()) … … 3304 3310 features.usesLinkRules = true; 3305 3311 break; 3312 case CSSSelector::PseudoAny: 3313 for (CSSSelector* subSelector = selector->selectorList()->first(); subSelector; subSelector = CSSSelectorList::next(subSelector)) 3314 collectFeaturesFromSelector(features, subSelector); 3315 return; 3306 3316 default: 3307 3317 break; -
trunk/Source/WebCore/css/tokenizer.flex
r75039 r81742 107 107 {num} {yyTok = FLOATTOKEN; return yyTok;} 108 108 109 "-webkit-any(" {yyTok = ANYFUNCTION; return yyTok;} 109 110 "not(" {yyTok = NOTFUNCTION; return yyTok;} 110 111 "url("{w}{string}{w}")" {yyTok = URI; return yyTok;}
Note: See TracChangeset
for help on using the changeset viewer.