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

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

Issue 2235723002: Use invalidation sets for nth invalidations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment ::before/::after Created 4 years, 4 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 45926f9f4a4d101448ae719b3f8dcfe993e2027d..0c80b4d8b33860f59b36dee0d54581d572b6c1d1 100644
--- a/third_party/WebKit/Source/core/css/RuleFeature.h
+++ b/third_party/WebKit/Source/core/css/RuleFeature.h
@@ -102,6 +102,7 @@ public:
void collectSiblingInvalidationSetForId(InvalidationLists&, Element&, const AtomicString& id, unsigned minDirectAdjacent) const;
void collectSiblingInvalidationSetForAttribute(InvalidationLists&, Element&, const QualifiedName& attributeName, unsigned minDirectAdjacent) const;
void collectUniversalSiblingInvalidationSet(InvalidationLists&, unsigned minDirectAdjacent) const;
+ void collectNthInvalidationSet(InvalidationLists&) const;
bool hasIdsInSelectors() const
{
@@ -141,6 +142,7 @@ private:
InvalidationSet& ensureIdInvalidationSet(const AtomicString& id, InvalidationType);
InvalidationSet& ensurePseudoInvalidationSet(CSSSelector::PseudoType, InvalidationType);
SiblingInvalidationSet& ensureUniversalSiblingInvalidationSet();
+ DescendantInvalidationSet& ensureNthInvalidationSet();
void updateInvalidationSets(const RuleData&);
void updateInvalidationSetsForContentAttribute(const RuleData&);
@@ -161,6 +163,7 @@ private:
bool forceSubtree = false;
bool contentPseudoCrossing = false;
bool invalidatesSlotted = false;
+ bool hasNthPseudo = false;
};
static bool extractInvalidationSetFeature(const CSSSelector&, InvalidationSetFeatures&);
@@ -182,6 +185,7 @@ private:
InvalidationSetMap m_idInvalidationSets;
PseudoTypeInvalidationSetMap m_pseudoInvalidationSets;
RefPtr<SiblingInvalidationSet> m_universalSiblingInvalidationSet;
+ RefPtr<DescendantInvalidationSet> m_nthInvalidationSet;
friend class RuleFeatureSetTest;
};

Powered by Google App Engine
This is Rietveld 408576698