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

Unified Diff: third_party/WebKit/Source/core/css/RuleFeature.cpp

Issue 1639133003: ::before/::after are not features for invalidation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/invalidation/universal-sibling-before-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/invalidation/universal-sibling-before-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698