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

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

Issue 220943002: Use invalidation sets for :hover, :active, and :focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased. Created 6 years, 9 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: Source/core/css/RuleFeature.h
diff --git a/Source/core/css/RuleFeature.h b/Source/core/css/RuleFeature.h
index b83f357bf04ef89ba6663677dab3e152f6447bb7..0e399ac1ff34a7375ca8602d0b3cc1f5766d7e3a 100644
--- a/Source/core/css/RuleFeature.h
+++ b/Source/core/css/RuleFeature.h
@@ -87,6 +87,9 @@ public:
void scheduleStyleInvalidationForClassChange(const SpaceSplitString& changedClasses, Element&);
void scheduleStyleInvalidationForClassChange(const SpaceSplitString& oldClasses, const SpaceSplitString& newClasses, Element&);
+ void scheduleStyleInvalidationForHoverChange(Element&);
+ void scheduleStyleInvalidationForActiveChange(Element&);
+ void scheduleStyleInvalidationForFocusChange(Element&);
void scheduleStyleInvalidationForAttributeChange(const QualifiedName& attributeName, Element&);
@@ -132,13 +135,16 @@ private:
static InvalidationSetMode invalidationSetModeForSelector(const CSSSelector&);
- void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&, InvalidationSetMode);
- void collectFeaturesFromSelectorList(const CSSSelectorList*, FeatureMetadata&, InvalidationSetMode);
+ void collectFeaturesFromSelector(const CSSSelector&, FeatureMetadata&, InvalidationSetMode, bool seenCombinator);
+ void collectFeaturesFromSelectorList(const CSSSelectorList*, FeatureMetadata&, InvalidationSetMode, bool seenCombinator);
DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& className);
DescendantInvalidationSet& ensureAttributeInvalidationSet(const AtomicString& attributeName);
DescendantInvalidationSet& ensureIdInvalidationSet(const AtomicString& attributeName);
- DescendantInvalidationSet* invalidationSetForSelector(const CSSSelector&);
+ DescendantInvalidationSet& ensureHoverInvalidationSet();
+ DescendantInvalidationSet& ensureActiveInvalidationSet();
+ DescendantInvalidationSet& ensureFocusInvalidationSet();
+ DescendantInvalidationSet* invalidationSetForSelector(const CSSSelector&, bool seenCombinator);
InvalidationSetMode updateInvalidationSets(const CSSSelector&);
@@ -161,6 +167,9 @@ private:
InvalidationSetMap m_classInvalidationSets;
InvalidationSetMap m_attributeInvalidationSets;
InvalidationSetMap m_idInvalidationSets;
+ RefPtr<DescendantInvalidationSet> m_hoverInvalidationSet;
+ RefPtr<DescendantInvalidationSet> m_activeInvalidationSet;
+ RefPtr<DescendantInvalidationSet> m_focusInvalidationSet;
bool m_targetedStyleRecalcEnabled;
StyleInvalidator m_styleInvalidator;
};

Powered by Google App Engine
This is Rietveld 408576698