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

Unified Diff: Source/core/css/invalidation/DescendantInvalidationSet.h

Issue 1317533002: Sibling invalidation sets (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: sibling-inserted Created 5 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
« no previous file with comments | « Source/core/css/StyleRule.h ('k') | Source/core/css/invalidation/DescendantInvalidationSet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/invalidation/DescendantInvalidationSet.h
diff --git a/Source/core/css/invalidation/DescendantInvalidationSet.h b/Source/core/css/invalidation/DescendantInvalidationSet.h
index 507d58fec0ccda9d635f4a0367c3707304469caf..e85bc1a536bcca1c785d9be4beab52145d708100 100644
--- a/Source/core/css/invalidation/DescendantInvalidationSet.h
+++ b/Source/core/css/invalidation/DescendantInvalidationSet.h
@@ -66,6 +66,13 @@ public:
void addTagName(const AtomicString& tagName);
void addAttribute(const AtomicString& attributeLocalName);
+ const DescendantInvalidationSet* descendants() const { return m_descendantInvalidationSet.get(); }
+
+ DescendantInvalidationSet& ensureDescendantInvalidationSet();
+
+ void setSiblingInvalid() { m_siblingInvalid = true; }
+ bool siblingInvalid() const { return m_siblingInvalid; }
+
void setWholeSubtreeInvalid();
bool wholeSubtreeInvalid() const { return m_allDescendantsMightBeInvalid; }
@@ -78,6 +85,9 @@ public:
void setCustomPseudoInvalid() { m_customPseudoInvalid = true; }
bool customPseudoInvalid() const { return m_customPseudoInvalid; }
+ unsigned maxDirectAdjacentSelectors() const { return m_maxDirectAdjacentSelectors; }
+ void setMaxDirectAdjacentSelectors(unsigned value) { m_maxDirectAdjacentSelectors = std::max(value, m_maxDirectAdjacentSelectors); }
+
bool isEmpty() const { return !m_classes && !m_ids && !m_tagNames && !m_attributes && !m_customPseudoInvalid; }
DECLARE_TRACE();
@@ -102,6 +112,15 @@ private:
OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString>> m_tagNames;
OwnPtrWillBeMember<WillBeHeapHashSet<AtomicString>> m_attributes;
+ // Only for sibling invalidation sets, indicates the maximum possible number of siblings affected.
+ unsigned m_maxDirectAdjacentSelectors;
+
+ // Only for sibling invalidation sets, indicates the descendants of siblings.
+ RefPtrWillBeMember<DescendantInvalidationSet> m_descendantInvalidationSet;
rune 2015/09/01 15:56:46 Does this mean that if this is the sibling invalid
+
+ // Only for sibling invalidation sets, indicates the sibling itself is invalid.
+ unsigned m_siblingInvalid : 1;
+
// If true, all descendants might be invalidated, so a full subtree recalc is required.
unsigned m_allDescendantsMightBeInvalid : 1;
@@ -113,8 +132,12 @@ private:
// If true, insertion point descendants must be invalidated.
unsigned m_insertionPointCrossing : 1;
+
+ friend class RuleFeatureSetTest;
};
+using InvalidationSetVector = WillBeHeapVector<RefPtrWillBeMember<DescendantInvalidationSet>, 8>;
+
} // namespace blink
#endif // DescendantInvalidationSet_h
« no previous file with comments | « Source/core/css/StyleRule.h ('k') | Source/core/css/invalidation/DescendantInvalidationSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698