[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/khtml/css
From:       Maks Orlovich <maksim () kde ! org>
Date:       2010-06-10 21:46:34
Message-ID: 20100610214634.B0C81AC8CF () svn ! kde ! org
[Download RAW message or body]

SVN commit 1136838 by orlovich:

Check things we're combined with as well (and not just the target) for invalid \
pseudos  when checking parse result for querySelector[All]. Occurs in slashdot's \
automore code (needs an another commit to fix that fully, though)


 M  +4 -1      cssparser.cpp  


--- trunk/KDE/kdelibs/khtml/css/cssparser.cpp #1136837:1136838
@@ -326,7 +326,9 @@
     // Make sure to detect problems with pseudos, too
     bool ok = true;
     for (int i = 0; i < selectors.size(); ++i) {
-        DOM::CSSSelector* sel = selectors[i];
+        // we need to check not only us, but also other things we're connected to \
via +        // combinators
+        for (DOM::CSSSelector* sel = selectors[i]; sel; sel = sel->tagHistory) {
         if(sel->match == CSSSelector::PseudoClass || sel->match == \
CSSSelector::PseudoElement) {  if (sel->pseudoType() == CSSSelector::PseudoOther) {
                 ok = false;
@@ -334,6 +336,7 @@
             }
         }
     }
+    }
 
     if (!ok) {
         qDeleteAll(selectors);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic