Title: [234049] trunk/Source/WebCore
Revision
234049
Author
[email protected]
Date
2018-07-20 10:08:44 -0700 (Fri, 20 Jul 2018)

Log Message

DeclarativeAnimation should suspend, resume, & stop m_eventQueue
https://bugs.webkit.org/show_bug.cgi?id=187216
<rdar://problem/41669739>

Reviewed by Ryosuke Niwa.

Suspend, resume and close the GenericEventQueue for DeclarativeAnimation as instructed through the DOMActiveObject protocol.

* animation/DeclarativeAnimation.cpp:
(WebCore::DeclarativeAnimation::stop):
(WebCore::DeclarativeAnimation::suspend):
(WebCore::DeclarativeAnimation::resume):
* animation/DeclarativeAnimation.h:
* animation/WebAnimation.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (234048 => 234049)


--- trunk/Source/WebCore/ChangeLog	2018-07-20 17:05:16 UTC (rev 234048)
+++ trunk/Source/WebCore/ChangeLog	2018-07-20 17:08:44 UTC (rev 234049)
@@ -1,3 +1,20 @@
+2018-07-20  Antoine Quint  <[email protected]>
+
+        DeclarativeAnimation should suspend, resume, & stop m_eventQueue
+        https://bugs.webkit.org/show_bug.cgi?id=187216
+        <rdar://problem/41669739>
+
+        Reviewed by Ryosuke Niwa.
+
+        Suspend, resume and close the GenericEventQueue for DeclarativeAnimation as instructed through the DOMActiveObject protocol.
+
+        * animation/DeclarativeAnimation.cpp:
+        (WebCore::DeclarativeAnimation::stop):
+        (WebCore::DeclarativeAnimation::suspend):
+        (WebCore::DeclarativeAnimation::resume):
+        * animation/DeclarativeAnimation.h:
+        * animation/WebAnimation.h:
+
 2018-07-20  Zalan Bujtas  <[email protected]>
 
         [LFC][Inline formatting context] Add basic text content handling.

Modified: trunk/Source/WebCore/animation/DeclarativeAnimation.cpp (234048 => 234049)


--- trunk/Source/WebCore/animation/DeclarativeAnimation.cpp	2018-07-20 17:05:16 UTC (rev 234048)
+++ trunk/Source/WebCore/animation/DeclarativeAnimation.cpp	2018-07-20 17:08:44 UTC (rev 234049)
@@ -208,4 +208,22 @@
         m_eventQueue.enqueueEvent(TransitionEvent::create(eventType, downcast<CSSTransition>(this)->transitionProperty(), time, PseudoElement::pseudoElementNameForEvents(m_target.pseudoId())));
 }
 
+void DeclarativeAnimation::stop()
+{
+    m_eventQueue.close();
+    WebAnimation::stop();
+}
+
+void DeclarativeAnimation::suspend(ReasonForSuspension reason)
+{
+    m_eventQueue.suspend();
+    WebAnimation::suspend(reason);
+}
+
+void DeclarativeAnimation::resume()
+{
+    m_eventQueue.resume();
+    WebAnimation::resume();
+}
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/animation/DeclarativeAnimation.h (234048 => 234049)


--- trunk/Source/WebCore/animation/DeclarativeAnimation.h	2018-07-20 17:05:16 UTC (rev 234048)
+++ trunk/Source/WebCore/animation/DeclarativeAnimation.h	2018-07-20 17:08:44 UTC (rev 234049)
@@ -60,6 +60,11 @@
     void enqueueDOMEvent(const AtomicString&, Seconds);
     void remove() final;
 
+    // ActiveDOMObject.
+    void suspend(ReasonForSuspension) final;
+    void resume() final;
+    void stop() final;
+
     Element& m_target;
     Ref<Animation> m_backingAnimation;
     bool m_wasPending { false };

Modified: trunk/Source/WebCore/animation/WebAnimation.h (234048 => 234049)


--- trunk/Source/WebCore/animation/WebAnimation.h	2018-07-20 17:05:16 UTC (rev 234048)
+++ trunk/Source/WebCore/animation/WebAnimation.h	2018-07-20 17:08:44 UTC (rev 234049)
@@ -129,6 +129,7 @@
     explicit WebAnimation(Document&);
 
     bool isEffectInvalidationSuspended() { return m_suspendCount; }
+    void stop() override;
 
 private:
     enum class DidSeek { Yes, No };
@@ -180,7 +181,6 @@
     // ActiveDOMObject.
     const char* activeDOMObjectName() const final;
     bool canSuspendForDocumentSuspension() const final;
-    void stop() final;
 
     // EventTarget
     EventTargetInterface eventTargetInterface() const final { return WebAnimationEventTargetInterfaceType; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to