[Web Animations] Missing call to DocumentTimeline::resumeAnimations() in Frame::resum...
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Feb 2020 21:19:53 +0000 (21:19 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Feb 2020 21:19:53 +0000 (21:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=207784
<rdar://problem/59251858>

Patch by Antoine Quint <graouts@webkit.org> on 2020-02-14
Reviewed by Dean Jackson.

After auditing the code, there was one call to CSSAnimationController::resumeAnimationsForDocument() that missed a matching DocumentTimeline::resumeAnimations()
call should the Web Animations flag be on.

* page/Frame.cpp:
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@256636 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/Frame.cpp

index c20f4af..4575761 100644 (file)
@@ -1,3 +1,17 @@
+2020-02-14  Antoine Quint  <graouts@webkit.org>
+
+        [Web Animations] Missing call to DocumentTimeline::resumeAnimations() in Frame::resumeActiveDOMObjectsAndAnimations()
+        https://bugs.webkit.org/show_bug.cgi?id=207784
+        <rdar://problem/59251858>
+
+        Reviewed by Dean Jackson.
+
+        After auditing the code, there was one call to CSSAnimationController::resumeAnimationsForDocument() that missed a matching DocumentTimeline::resumeAnimations()
+        call should the Web Animations flag be on.
+
+        * page/Frame.cpp:
+        (WebCore::Frame::resumeActiveDOMObjectsAndAnimations):
+
 2020-02-14  Yusuke Suzuki  <ysuzuki@apple.com>
 
         NetworkLoadMetrics should be shared by multiple ResourceResponse instances
index 9e6b7fe..8cfa612 100644 (file)
@@ -960,7 +960,12 @@ void Frame::resumeActiveDOMObjectsAndAnimations()
     m_doc->resumeScheduledTasks(ReasonForSuspension::PageWillBeSuspended);
 
     // Frame::clearTimers() suspended animations and pending relayouts.
-    animation().resumeAnimationsForDocument(m_doc.get());
+
+    if (RuntimeEnabledFeatures::sharedFeatures().webAnimationsCSSIntegrationEnabled()) {
+        if (auto* timeline = m_doc->existingTimeline())
+            timeline->resumeAnimations();
+    } else
+        animation().resumeAnimationsForDocument(m_doc.get());
     if (m_view)
         m_view->layoutContext().scheduleLayout();
 }