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

Unified Diff: sky/engine/core/dom/Element.cpp

Issue 733283002: Move Element::attach recursion to the end. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Element.cpp
diff --git a/sky/engine/core/dom/Element.cpp b/sky/engine/core/dom/Element.cpp
index 2ff0dcc665f22b84e341c5040914005cf3aa8f54..04f19a0de690d4b165aa7c7e5355682d8f3d8c51 100644
--- a/sky/engine/core/dom/Element.cpp
+++ b/sky/engine/core/dom/Element.cpp
@@ -812,18 +812,18 @@ void Element::attach(const AttachContext& context)
RenderTreeBuilder(this, context.resolvedStyle).createRendererForElementIfNeeded();
- // When a shadow root exists, it does the work of attaching the children.
- if (ElementShadow* shadow = this->shadow())
- shadow->attach(context);
-
- ContainerNode::attach(context);
-
if (hasRareData() && !renderer()) {
if (ActiveAnimations* activeAnimations = elementRareData()->activeAnimations()) {
activeAnimations->cssAnimations().cancel();
activeAnimations->setAnimationStyleChange(false);
}
}
+
+ // When a shadow root exists, it does the work of attaching the children.
+ if (ElementShadow* shadow = this->shadow())
+ shadow->attach(context);
+
+ ContainerNode::attach(context);
}
void Element::detach(const AttachContext& context)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698