Index: third_party/WebKit/Source/core/css/RuleFeature.cpp |
diff --git a/third_party/WebKit/Source/core/css/RuleFeature.cpp b/third_party/WebKit/Source/core/css/RuleFeature.cpp |
index 59e3abdb63f4aac8d391f9187d3e84e023c9df03..d732d585ab686d0a1b43c810e621cc032beb9b41 100644 |
--- a/third_party/WebKit/Source/core/css/RuleFeature.cpp |
+++ b/third_party/WebKit/Source/core/css/RuleFeature.cpp |
@@ -280,21 +280,29 @@ ALWAYS_INLINE InvalidationSet& RuleFeatureSet::ensurePseudoInvalidationSet(CSSSe |
bool RuleFeatureSet::extractInvalidationSetFeature(const CSSSelector& selector, InvalidationSetFeatures& features) |
{ |
- if (selector.match() == CSSSelector::Tag && selector.tagQName().localName() != starAtom) |
+ if (selector.match() == CSSSelector::Tag && selector.tagQName().localName() != starAtom) { |
features.tagName = selector.tagQName().localName(); |
- else if (selector.match() == CSSSelector::Id) |
+ return true; |
+ } |
+ if (selector.match() == CSSSelector::Id) { |
features.id = selector.value(); |
- else if (selector.match() == CSSSelector::Class) |
+ return true; |
+ } |
+ if (selector.match() == CSSSelector::Class) { |
features.classes.append(selector.value()); |
- else if (selector.isAttributeSelector()) |
+ return true; |
+ } |
+ if (selector.isAttributeSelector()) { |
features.attributes.append(selector.attribute().localName()); |
- else if (selector.pseudoType() == CSSSelector::PseudoWebKitCustomElement) |
+ return true; |
+ } |
+ if (selector.pseudoType() == CSSSelector::PseudoWebKitCustomElement) { |
features.customPseudoElement = true; |
- else if (selector.pseudoType() == CSSSelector::PseudoBefore || selector.pseudoType() == CSSSelector::PseudoAfter) |
+ return true; |
+ } |
+ if (selector.pseudoType() == CSSSelector::PseudoBefore || selector.pseudoType() == CSSSelector::PseudoAfter) |
features.hasBeforeOrAfter = true; |
- else |
- return false; |
- return true; |
+ return false; |
} |
InvalidationSet* RuleFeatureSet::invalidationSetForSelector(const CSSSelector& selector, InvalidationType type) |