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

Unified Diff: third_party/WebKit/Source/core/css/RuleSet.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/css/RuleSet.cpp
diff --git a/third_party/WebKit/Source/core/css/RuleSet.cpp b/third_party/WebKit/Source/core/css/RuleSet.cpp
index 2c6c9080f4436898f4e1e4a67b5ad8de5ffd959d..0e6eef99d8899f32d30875e03c38a8ead324a4bf 100644
--- a/third_party/WebKit/Source/core/css/RuleSet.cpp
+++ b/third_party/WebKit/Source/core/css/RuleSet.cpp
@@ -258,11 +258,11 @@ void RuleSet::addChildRules(const HeapVector<Member<StyleRuleBase>>& rules, cons
const CSSSelectorList& selectorList = styleRule->selectorList();
for (size_t selectorIndex = 0; selectorIndex != kNotFound; selectorIndex = selectorList.indexOfNextSelectorAfter(selectorIndex)) {
rune 2016/09/02 09:14:31 SelectorList::next() would be a better choice, I t
hayato 2016/09/05 02:36:11 Yeah, but we still need a selectorIndex here becau
rune 2016/09/05 07:46:39 Ah. I didn't notice. Just leave it like this then.
- if (selectorList.selectorUsesDeepCombinatorOrShadowPseudo(selectorIndex)) {
+ if (selectorList.selectorAt(selectorIndex).hasDeepCombinatorOrShadowPseudo()) {
m_deepCombinatorOrShadowPseudoRules.append(MinimalRuleData(styleRule, selectorIndex, addRuleFlags));
- } else if (selectorList.selectorHasContentPseudo(selectorIndex)) {
+ } else if (selectorList.selectorAt(selectorIndex).hasContentPseudo()) {
m_contentPseudoElementRules.append(MinimalRuleData(styleRule, selectorIndex, addRuleFlags));
- } else if (selectorList.selectorHasSlottedPseudo(selectorIndex)) {
+ } else if (selectorList.selectorAt(selectorIndex).hasSlottedPseudo()) {
m_slottedPseudoElementRules.append(MinimalRuleData(styleRule, selectorIndex, addRuleFlags));
} else {
addRule(styleRule, selectorIndex, addRuleFlags);

Powered by Google App Engine
This is Rietveld 408576698