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

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: Rebased. 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 0fb87fd82ba96ed9c6922149e4532f81f10bc1bc..115939b78f73d1e037bf045357b423779809774f 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1438,9 +1438,15 @@ void Element::detach(const AttachContext& context)
data->resetDynamicRestyleObservations();
}
- 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