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