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

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

Issue 17038004: Remove needsShadowTreeWalker flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 7 years, 6 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/Element.h ('k') | Source/core/dom/ElementRareData.h » ('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 ec5ea6b358124dc7e986ab2aa8dfddf4b099dd21..65ae13bd3610fff548314311abcde5ad1d9eaef5 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -2285,7 +2285,7 @@ void Element::updatePseudoElement(PseudoId pseudoId, StyleChange change)
// when RenderObject::isChildAllowed on our parent returns false for the
// PseudoElement's renderer for each style recalc.
if (!renderer() || !pseudoElementRendererIsNeeded(renderer()->getCachedPseudoStyle(pseudoId)))
- setPseudoElement(pseudoId, 0);
+ elementRareData()->setPseudoElement(pseudoId, 0);
} else if (change >= Inherit || needsStyleRecalc())
createPseudoElementIfNeeded(pseudoId);
}
@@ -2304,12 +2304,7 @@ void Element::createPseudoElementIfNeeded(PseudoId pseudoId)
ASSERT(!isPseudoElement());
RefPtr<PseudoElement> element = PseudoElement::create(this, pseudoId);
element->attach();
- setPseudoElement(pseudoId, element.release());
-}
-
-bool Element::hasPseudoElements() const
-{
- return hasRareData() && elementRareData()->hasPseudoElements();
+ ensureElementRareData()->setPseudoElement(pseudoId, element.release());
}
PseudoElement* Element::pseudoElement(PseudoId pseudoId) const
@@ -2317,12 +2312,6 @@ PseudoElement* Element::pseudoElement(PseudoId pseudoId) const
return hasRareData() ? elementRareData()->pseudoElement(pseudoId) : 0;
}
-void Element::setPseudoElement(PseudoId pseudoId, PassRefPtr<PseudoElement> element)
-{
- ensureElementRareData()->setPseudoElement(pseudoId, element);
- resetNeedsShadowTreeWalker();
-}
-
RenderObject* Element::pseudoElementRenderer(PseudoId pseudoId) const
{
if (PseudoElement* element = pseudoElement(pseudoId))
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/ElementRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698