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

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

Issue 1703893002: Don't add rule feature data for rules which may never match. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uncommon-attr-20160216
Patch Set: Created 4 years, 10 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/RuleFeature.h
diff --git a/third_party/WebKit/Source/core/css/RuleFeature.h b/third_party/WebKit/Source/core/css/RuleFeature.h
index 609466ec094632ff899a09716e960fe33a989d1b..8f39286a5ece8e6136e7755a3f8d5b3f430ba88c 100644
--- a/third_party/WebKit/Source/core/css/RuleFeature.h
+++ b/third_party/WebKit/Source/core/css/RuleFeature.h
@@ -59,7 +59,9 @@ public:
void add(const RuleFeatureSet&);
void clear();
- void collectFeaturesFromRuleData(const RuleData&);
+ enum SelectorPreMatch { SelectorNeverMatches, SelectorMayMatch };
+
+ SelectorPreMatch collectFeaturesFromRuleData(const RuleData&);
bool usesSiblingRules() const { return !siblingRules.isEmpty(); }
bool usesFirstLineRules() const { return m_metadata.usesFirstLineRules; }
@@ -118,7 +120,7 @@ private:
unsigned maxDirectAdjacentSelectors = 0;
};
- void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&);
+ SelectorPreMatch collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&);
InvalidationSet& ensureClassInvalidationSet(const AtomicString& className, InvalidationType);
InvalidationSet& ensureAttributeInvalidationSet(const AtomicString& attributeName, InvalidationType);
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSelector.h ('k') | third_party/WebKit/Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698