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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2235723002: Use invalidation sets for nth invalidations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment ::before/::after Created 4 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 | « third_party/WebKit/Source/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index cb6e0a484dca8cb6ede5d7fc00fe094a186f6884..8807b83327365b49a8f8f261f8ab0abe90e38db0 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -606,7 +606,7 @@ void StyleEngine::classChangedForElement(const SpaceSplitString& changedClasses,
RuleFeatureSet& ruleFeatureSet = ensureResolver().ensureUpdatedRuleFeatureSet();
for (unsigned i = 0; i < changedSize; ++i)
ruleFeatureSet.collectInvalidationSetsForClass(invalidationLists, element, changedClasses[i]);
- m_styleInvalidator.scheduleInvalidationSetsForElement(invalidationLists, element);
+ m_styleInvalidator.scheduleInvalidationSetsForNode(invalidationLists, element);
}
void StyleEngine::classChangedForElement(const SpaceSplitString& oldClasses, const SpaceSplitString& newClasses, Element& element)
@@ -649,7 +649,7 @@ void StyleEngine::classChangedForElement(const SpaceSplitString& oldClasses, con
ruleFeatureSet.collectInvalidationSetsForClass(invalidationLists, element, oldClasses[i]);
}
- m_styleInvalidator.scheduleInvalidationSetsForElement(invalidationLists, element);
+ m_styleInvalidator.scheduleInvalidationSetsForNode(invalidationLists, element);
}
void StyleEngine::attributeChangedForElement(const QualifiedName& attributeName, Element& element)
@@ -659,7 +659,7 @@ void StyleEngine::attributeChangedForElement(const QualifiedName& attributeName,
InvalidationLists invalidationLists;
ensureResolver().ensureUpdatedRuleFeatureSet().collectInvalidationSetsForAttribute(invalidationLists, element, attributeName);
- m_styleInvalidator.scheduleInvalidationSetsForElement(invalidationLists, element);
+ m_styleInvalidator.scheduleInvalidationSetsForNode(invalidationLists, element);
}
void StyleEngine::idChangedForElement(const AtomicString& oldId, const AtomicString& newId, Element& element)
@@ -673,7 +673,7 @@ void StyleEngine::idChangedForElement(const AtomicString& oldId, const AtomicStr
ruleFeatureSet.collectInvalidationSetsForId(invalidationLists, element, oldId);
if (!newId.isEmpty())
ruleFeatureSet.collectInvalidationSetsForId(invalidationLists, element, newId);
- m_styleInvalidator.scheduleInvalidationSetsForElement(invalidationLists, element);
+ m_styleInvalidator.scheduleInvalidationSetsForNode(invalidationLists, element);
}
void StyleEngine::pseudoStateChangedForElement(CSSSelector::PseudoType pseudoType, Element& element)
@@ -683,7 +683,7 @@ void StyleEngine::pseudoStateChangedForElement(CSSSelector::PseudoType pseudoTyp
InvalidationLists invalidationLists;
ensureResolver().ensureUpdatedRuleFeatureSet().collectInvalidationSetsForPseudoClass(invalidationLists, element, pseudoType);
- m_styleInvalidator.scheduleInvalidationSetsForElement(invalidationLists, element);
+ m_styleInvalidator.scheduleInvalidationSetsForNode(invalidationLists, element);
}
void StyleEngine::scheduleSiblingInvalidationsForElement(Element& element, ContainerNode& schedulingParent, unsigned minDirectAdjacent)
@@ -739,6 +739,13 @@ void StyleEngine::scheduleInvalidationsForRemovedSibling(Element* beforeElement,
scheduleSiblingInvalidationsForElement(*beforeElement, *schedulingParent, i);
}
+void StyleEngine::scheduleNthPseudoInvalidations(ContainerNode& nthParent)
+{
+ InvalidationLists invalidationLists;
+ ensureResolver().ensureUpdatedRuleFeatureSet().collectNthInvalidationSet(invalidationLists);
+ m_styleInvalidator.scheduleInvalidationSetsForNode(invalidationLists, nthParent);
+}
+
void StyleEngine::setStatsEnabled(bool enabled)
{
if (!enabled) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698