Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: third_party/WebKit/Source/core/dom/SelectorQuery.cpp

Issue 2306903002: Fix the wrong usages of CSSSelectorList::selectorUsesXXX() functions (Closed)
Patch Set: Fix Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/SelectorQuery.cpp
diff --git a/third_party/WebKit/Source/core/dom/SelectorQuery.cpp b/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
index bfc3d433530a2a75167334d1910c34102ddf14d4..d89ba13bb96443b09d16a31aa64c3cf231fb0466 100644
--- a/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
+++ b/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
@@ -113,13 +113,12 @@ void SelectorDataList::initialize(const CSSSelectorList& selectorList)
m_usesDeepCombinatorOrShadowPseudo = false;
m_needsUpdatedDistribution = false;
m_selectors.reserveInitialCapacity(selectorCount);
- unsigned index = 0;
- for (const CSSSelector* selector = selectorList.first(); selector; selector = CSSSelectorList::next(*selector), ++index) {
+ for (const CSSSelector* selector = selectorList.first(); selector; selector = CSSSelectorList::next(*selector)) {
if (selector->matchesPseudoElement())
continue;
m_selectors.uncheckedAppend(selector);
- m_usesDeepCombinatorOrShadowPseudo |= selectorList.selectorUsesDeepCombinatorOrShadowPseudo(index);
- m_needsUpdatedDistribution |= selectorList.selectorNeedsUpdatedDistribution(index);
+ m_usesDeepCombinatorOrShadowPseudo |= selector->hasDeepCombinatorOrShadowPseudo();
+ m_needsUpdatedDistribution |= selector->needsUpdatedDistribution();
}
}

Powered by Google App Engine
This is Rietveld 408576698