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

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

Issue 21012002: Web Animations: Trigger and update CSS Animations backed by the Web Animations model (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
« Source/core/css/resolver/StyleResolver.cpp ('K') | « Source/core/dom/Document.h ('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 7f381978a9a9c09bdf91da623a831f7d4f3fc282..32bd9d530b0b694edbadca19d12e01bcd13f2114 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -210,6 +210,11 @@ Element::~Element()
data->setPseudoElement(AFTER, 0);
data->setPseudoElement(BACKDROP, 0);
data->clearShadow();
+
+ if (RuntimeEnabledFeatures::webAnimationsCSSEnabled()) {
+ if (ActiveAnimations* activeAnimations = data->activeAnimations())
+ activeAnimations->cssAnimations()->cancel();
+ }
}
if (isCustomElement())
@@ -1367,6 +1372,11 @@ void Element::detach(const AttachContext& context)
data->resetComputedStyle();
data->resetDynamicRestyleObservations();
data->setIsInsideRegion(false);
+
+ if (RuntimeEnabledFeatures::webAnimationsCSSEnabled() && !context.performingReattach) {
+ if (ActiveAnimations* activeAnimations = data->activeAnimations())
+ activeAnimations->cssAnimations()->cancel();
+ }
}
if (ElementShadow* shadow = this->shadow())
shadow->detach(context);
« Source/core/css/resolver/StyleResolver.cpp ('K') | « Source/core/dom/Document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698