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

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

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index d961ae9c1ad0f3e818207d27f316fc5c22c32092..3a042a7597337d77cf9c806be09d71dc57d3ceee 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1434,9 +1434,15 @@ void Element::detach(const AttachContext& context)
if (!context.resolvedStyle)
data->resetStyleState();
- if (RuntimeEnabledFeatures::webAnimationsCSSEnabled() && !context.performingReattach) {
- if (ActiveAnimations* activeAnimations = data->activeAnimations())
- activeAnimations->cssAnimations().cancel();
+ if (RuntimeEnabledFeatures::webAnimationsCSSEnabled()) {
+ if (ActiveAnimations* activeAnimations = data->activeAnimations()) {
+ if (context.performingReattach) {
+ // FIXME: restart compositor animations rather than pull back to the main thread
+ activeAnimations->cancelCompositorAnimations();
+ } else {
+ activeAnimations->cssAnimations().cancel();
+ }
+ }
}
}
if (ElementShadow* shadow = this->shadow())

Powered by Google App Engine
This is Rietveld 408576698