Changeset 252007 in webkit
- Timestamp:
- Nov 4, 2019 12:36:17 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r252003 r252007 1 2019-11-04 Chris Dumez <cdumez@apple.com> 2 3 Port WebAnimation to the HTML5 event loop 4 https://bugs.webkit.org/show_bug.cgi?id=203797 5 6 Reviewed by Ryosuke Niwa. 7 8 * animation/WebAnimation.cpp: 9 (WebCore::WebAnimation::WebAnimation): 10 (WebCore::WebAnimation::enqueueAnimationPlaybackEvent): 11 (WebCore::WebAnimation::stop): 12 (WebCore::WebAnimation::hasPendingActivity const): 13 * animation/WebAnimation.h: 14 1 15 2019-11-04 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebCore/animation/WebAnimation.cpp
r251959 r252007 27 27 #include "WebAnimation.h" 28 28 29 #include "AbstractEventLoop.h" 29 30 #include "AnimationEffect.h" 30 31 #include "AnimationPlaybackEvent.h" … … 69 70 , m_readyPromise(makeUniqueRef<ReadyPromise>(*this, &WebAnimation::readyPromiseResolve)) 70 71 , m_finishedPromise(makeUniqueRef<FinishedPromise>(*this, &WebAnimation::finishedPromiseResolve)) 71 , m_taskQueue(SuspendableTaskQueue::create(document))72 72 { 73 73 m_readyPromise->resolve(*this); … … 627 627 } else { 628 628 // Otherwise, queue a task to dispatch event at animation. The task source for this task is the DOM manipulation task source. 629 m_taskQueue->enqueueTask([this, event = WTFMove(event)] { 630 dispatchEvent(event); 631 }); 629 queueTaskToDispatchEvent(*this, TaskSource::DOMManipulation, WTFMove(event)); 632 630 } 633 631 } … … 1182 1180 void WebAnimation::stop() 1183 1181 { 1184 m_taskQueue->cancelAllTasks();1185 1182 ActiveDOMObject::stop(); 1186 1183 removeAllEventListeners(); … … 1190 1187 { 1191 1188 // Keep the JS wrapper alive if the animation is considered relevant or could become relevant again by virtue of having a timeline. 1192 return m_timeline || m_isRelevant || m_taskQueue->hasPendingTasks() ||ActiveDOMObject::hasPendingActivity();1189 return m_timeline || m_isRelevant || ActiveDOMObject::hasPendingActivity(); 1193 1190 } 1194 1191 -
trunk/Source/WebCore/animation/WebAnimation.h
r251959 r252007 30 30 #include "ExceptionOr.h" 31 31 #include "IDLTypes.h" 32 #include "SuspendableTaskQueue.h"33 32 #include "WebAnimationUtilities.h" 34 33 #include <wtf/Markable.h> … … 180 179 UniqueRef<ReadyPromise> m_readyPromise; 181 180 UniqueRef<FinishedPromise> m_finishedPromise; 182 UniqueRef<SuspendableTaskQueue> m_taskQueue;183 181 Markable<Seconds, Seconds::MarkableTraits> m_previousCurrentTime; 184 182 Markable<Seconds, Seconds::MarkableTraits> m_startTime;
Note: See TracChangeset
for help on using the changeset viewer.