Index: Source/core/css/analyzer/DescendantInvalidationSet.h |
diff --git a/Source/core/css/analyzer/DescendantInvalidationSet.h b/Source/core/css/analyzer/DescendantInvalidationSet.h |
index d2ba761d601cf0808863f8e2748750eabd86318a..40751446deed846ec1b4f2b0e2e89d4d6638da27 100644 |
--- a/Source/core/css/analyzer/DescendantInvalidationSet.h |
+++ b/Source/core/css/analyzer/DescendantInvalidationSet.h |
@@ -58,10 +58,10 @@ public: |
void addTagName(const AtomicString& tagName); |
// Appends the classes in this DescendantInvalidationSet to the vector. |
- void getClasses(Vector<AtomicString>& classes); |
+ void getClasses(Vector<AtomicString>& classes) const; |
- void setWholeSubtreeInvalid() { m_allDescendantsMightBeInvalid = true; }; |
- bool wholeSubtreeInvalid() { return m_allDescendantsMightBeInvalid; } |
+ void setWholeSubtreeInvalid(); |
+ bool wholeSubtreeInvalid() const { return m_allDescendantsMightBeInvalid; } |
private: |
DescendantInvalidationSet(); |
@@ -69,7 +69,6 @@ private: |
HashSet<AtomicString>& ensureIdSet(); |
HashSet<AtomicString>& ensureTagNameSet(); |
- bool invalidateElementSubtreeInternal(Element*); |
// If true, all descendants might be invalidated, so a full subtree recalc is required. |
bool m_allDescendantsMightBeInvalid; |
@@ -79,6 +78,17 @@ private: |
OwnPtr<HashSet<AtomicString> > m_tagNames; |
}; |
+inline void DescendantInvalidationSet::setWholeSubtreeInvalid() |
ojan
2014/02/25 00:30:53
Did you actually see performance difference in mak
rune
2014/02/25 08:36:17
https://codereview.chromium.org/179483002/
|
+{ |
+ if (m_allDescendantsMightBeInvalid) |
+ return; |
+ |
+ m_allDescendantsMightBeInvalid = true; |
+ m_classes = nullptr; |
+ m_ids = nullptr; |
+ m_tagNames = nullptr; |
+} |
+ |
} // namespace WebCore |
#endif // DescendantInvalidationSet_h |