| Index: Source/core/css/analyzer/DescendantInvalidationSet.cpp
|
| diff --git a/Source/core/css/analyzer/DescendantInvalidationSet.cpp b/Source/core/css/analyzer/DescendantInvalidationSet.cpp
|
| index 5cb3785b594df8aca99d704623511a94fe705e93..8a4aa57278870684f6b4efb9aa1152d748ea8673 100644
|
| --- a/Source/core/css/analyzer/DescendantInvalidationSet.cpp
|
| +++ b/Source/core/css/analyzer/DescendantInvalidationSet.cpp
|
| @@ -43,11 +43,15 @@ DescendantInvalidationSet::DescendantInvalidationSet()
|
|
|
| void DescendantInvalidationSet::combine(const DescendantInvalidationSet& other)
|
| {
|
| - m_allDescendantsMightBeInvalid = m_allDescendantsMightBeInvalid || other.m_allDescendantsMightBeInvalid;
|
| // No longer bother combining data structures, since the whole subtree is deemed invalid.
|
| - if (m_allDescendantsMightBeInvalid)
|
| + if (wholeSubtreeInvalid())
|
| return;
|
|
|
| + if (other.wholeSubtreeInvalid()) {
|
| + setWholeSubtreeInvalid();
|
| + return;
|
| + }
|
| +
|
| if (other.m_classes) {
|
| HashSet<AtomicString>::const_iterator end = other.m_classes->end();
|
| for (HashSet<AtomicString>::const_iterator it = other.m_classes->begin(); it != end; ++it)
|
| @@ -90,20 +94,26 @@ HashSet<AtomicString>& DescendantInvalidationSet::ensureTagNameSet()
|
|
|
| void DescendantInvalidationSet::addClass(const AtomicString& className)
|
| {
|
| + if (wholeSubtreeInvalid())
|
| + return;
|
| ensureClassSet().add(className);
|
| }
|
|
|
| void DescendantInvalidationSet::addId(const AtomicString& id)
|
| {
|
| + if (wholeSubtreeInvalid())
|
| + return;
|
| ensureIdSet().add(id);
|
| }
|
|
|
| void DescendantInvalidationSet::addTagName(const AtomicString& tagName)
|
| {
|
| + if (wholeSubtreeInvalid())
|
| + return;
|
| ensureTagNameSet().add(tagName);
|
| }
|
|
|
| -void DescendantInvalidationSet::getClasses(Vector<AtomicString>& classes)
|
| +void DescendantInvalidationSet::getClasses(Vector<AtomicString>& classes) const
|
| {
|
| if (!m_classes)
|
| return;
|
|
|