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

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

Issue 1156213003: Cancel animations before calling ContainerNode::attach in Element::attach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a test. Created 5 years, 7 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 | « LayoutTests/animations/display-none-cancel-computedstyle-expected.txt ('k') | no next file » | 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 9104a6af298d744b7fcce473dc367fd1560eab87..465c4dbfe9149fa31c6146aeabed89ae699bf708 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1450,6 +1450,13 @@ void Element::attach(const AttachContext& context)
addCallbackSelectors();
+ if (hasRareData() && !layoutObject()) {
+ if (ElementAnimations* elementAnimations = elementRareData()->elementAnimations()) {
+ elementAnimations->cssAnimations().cancel();
+ elementAnimations->setAnimationStyleChange(false);
+ }
+ }
+
StyleResolverParentScope parentScope(*this);
createPseudoElementIfNeeded(BEFORE);
@@ -1467,13 +1474,6 @@ void Element::attach(const AttachContext& context)
// children are attached because the first letter text could come
// from any of them.
createPseudoElementIfNeeded(FIRST_LETTER);
-
- if (hasRareData() && !layoutObject()) {
- if (ElementAnimations* elementAnimations = elementRareData()->elementAnimations()) {
- elementAnimations->cssAnimations().cancel();
- elementAnimations->setAnimationStyleChange(false);
- }
- }
}
void Element::detach(const AttachContext& context)
« no previous file with comments | « LayoutTests/animations/display-none-cancel-computedstyle-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698