[Web Animations] Refactor cancelDeclarativeAnimationsForElement and willDestroyRender...
[WebKit-https.git] / Source / WebCore / rendering / updating / RenderTreeUpdater.cpp
index 195491a..a5b7fbc 100644 (file)
@@ -573,9 +573,9 @@ void RenderTreeUpdater::tearDownRenderers(Element& root, TeardownType teardownTy
             case TeardownType::RendererUpdateCancelingAnimations:
                 if (timeline) {
                     if (document.renderTreeBeingDestroyed())
-                        timeline->willDestroyRendererForElement(element);
+                        timeline->cancelDeclarativeAnimationsForElement(element, WebAnimation::Silently::Yes);
                     else if (teardownType == TeardownType::RendererUpdateCancelingAnimations)
-                        timeline->cancelDeclarativeAnimationsForElement(element);
+                        timeline->cancelDeclarativeAnimationsForElement(element, WebAnimation::Silently::No);
                 }
                 animationController.cancelAnimations(element);
                 break;