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 |