Index: Source/core/css/invalidation/InvalidationSet.h |
diff --git a/Source/core/css/invalidation/InvalidationSet.h b/Source/core/css/invalidation/InvalidationSet.h |
index fcc8fbc592924058354873997ec069a6a8f84dc8..f76fd6081612b3a95c2fc0f81110825a01ef8d30 100644 |
--- a/Source/core/css/invalidation/InvalidationSet.h |
+++ b/Source/core/css/invalidation/InvalidationSet.h |
@@ -66,6 +66,13 @@ public: |
void addTagName(const AtomicString& tagName); |
void addAttribute(const AtomicString& attributeLocalName); |
+ const InvalidationSet* descendants() const { return m_descendantInvalidationSet.get(); } |
+ |
+ InvalidationSet& ensureDescendantInvalidationSet(); |
+ |
+ void setAppliesDirectly() { m_appliesDirectly = true; } |
+ bool appliesDirectly() const { return m_appliesDirectly; } |
+ |
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 updateMaxDirectAdjacentSelectors(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<InvalidationSet> m_descendantInvalidationSet; |
+ |
+ // Indicates the sibling/descendant itself is invalid. |
+ unsigned m_appliesDirectly : 1; |
rune
2015/09/14 23:06:51
I'd still like to see this split out as a separate
Eric Willigers
2015/09/15 05:39:18
Removed for now. Yes, may of the expected test res
|
+ |
// 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<InvalidationSet>, 8>; |
+ |
} // namespace blink |
#endif // InvalidationSet_h |