| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 2f7b60de3ef220553dbf9eda79a7e02f3d0d16d3..4bd6ee29f3e11a42e903274e6df12e30265d4f69 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -1439,9 +1439,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->cancelAnimationOnCompositor();
|
| + } else {
|
| + activeAnimations->cssAnimations().cancel();
|
| + }
|
| + }
|
| }
|
| }
|
| if (ElementShadow* shadow = this->shadow())
|
|
|