| 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())
|
|
|