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

Unified Diff: Source/core/dom/Element.cpp

Issue 1111643003: Move StyleInvalidator to StyleEngine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Avoid calling ensureUpdatedRuleFeatureSet multiple times Created 5 years, 8 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 | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 38eed3a7dbb0036e1d860ef39ddd1994994fa108..a2e5587f7f2cc56ca0331a30c560dc6e6190af04 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1159,7 +1159,7 @@ void Element::attributeChanged(const QualifiedName& name, const AtomicString& ne
if (newId != oldId) {
elementData()->setIdForStyleResolution(newId);
if (testShouldInvalidateStyle)
- styleResolver->ensureUpdatedRuleFeatureSet().scheduleStyleInvalidationForIdChange(oldId, newId, *this);
+ document().styleEngine().idChangedForElement(oldId, newId, *this);
}
} else if (name == classAttr) {
classAttributeChanged(newValue);
@@ -1233,11 +1233,11 @@ void Element::classAttributeChanged(const AtomicString& newClassString)
elementData()->setClass(newClassString, shouldFoldCase);
const SpaceSplitString& newClasses = elementData()->classNames();
if (testShouldInvalidateStyle)
- styleResolver->ensureUpdatedRuleFeatureSet().scheduleStyleInvalidationForClassChange(oldClasses, newClasses, *this);
+ document().styleEngine().classChangedForElement(oldClasses, newClasses, *this);
} else {
const SpaceSplitString& oldClasses = elementData()->classNames();
if (testShouldInvalidateStyle)
- styleResolver->ensureUpdatedRuleFeatureSet().scheduleStyleInvalidationForClassChange(oldClasses, *this);
+ document().styleEngine().classChangedForElement(oldClasses, *this);
elementData()->clearClass();
}
@@ -1796,7 +1796,7 @@ void Element::pseudoStateChanged(CSSSelector::PseudoType pseudo)
StyleResolver* styleResolver = document().styleResolver();
if (inActiveDocument() && styleResolver && styleChangeType() < SubtreeStyleChange)
- styleResolver->ensureUpdatedRuleFeatureSet().scheduleStyleInvalidationForPseudoChange(pseudo, *this);
+ document().styleEngine().pseudoStateChangedForElement(pseudo, *this);
if (ElementShadow* elementShadow = shadowWhereNodeCanBeDistributed(*this))
elementShadow->distributedNodePseudoStateChanged(pseudo);
@@ -1939,7 +1939,7 @@ void Element::checkForEmptyStyleChange()
return;
if (!style || (styleAffectedByEmpty() && (!style->emptyState() || hasChildren())))
- document().styleResolver()->ensureUpdatedRuleFeatureSet().scheduleStyleInvalidationForPseudoChange(CSSSelector::PseudoEmpty, *this);
+ document().styleEngine().pseudoStateChangedForElement(CSSSelector::PseudoEmpty, *this);
}
void Element::childrenChanged(const ChildrenChange& change)
@@ -3052,7 +3052,7 @@ void Element::willModifyAttribute(const QualifiedName& name, const AtomicString&
if (oldValue != newValue) {
if (inActiveDocument() && document().styleResolver() && styleChangeType() < SubtreeStyleChange)
- document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().scheduleStyleInvalidationForAttributeChange(name, *this);
+ document().styleEngine().attributeChangedForElement(name, *this);
if (isUpgradedCustomElement())
CustomElement::attributeDidChange(this, name.localName(), oldValue, newValue);
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698