WebKit Bugzilla
Attachment 357442 Details for
Bug 192758
: [Web Animations] Remove the redundant m_scheduledMicrotask from WebAnimation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192758-20181217175148.patch (text/plain), 4.17 KB, created by
Antoine Quint
on 2018-12-17 08:51:50 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2018-12-17 08:51:50 PST
Size:
4.17 KB
patch
obsolete
>Subversion Revision: 239098 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 74894db0f9c523424b12a709793683ce67610b4c..bcaef613627769a45407cc495107101e89723bd6 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2018-12-17 Antoine Quint <graouts@apple.com> >+ >+ [Web Animations] Remove the redundant m_scheduledMicrotask from WebAnimation >+ https://bugs.webkit.org/show_bug.cgi?id=192758 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ We tracked whether we had a pending microtask twice so we remove the m_scheduledMicrotask flag as m_finishNotificationStepsMicrotaskPending >+ gives us enough information as it is. Additionally, we remove the scheduleMicrotaskIfNeeded() and performMicrotask() functions since there is >+ less bookkeeping to perform. >+ >+ No new test since there is no user-observable change. >+ >+ * animation/WebAnimation.cpp: >+ (WebCore::WebAnimation::updateFinishedState): >+ (WebCore::WebAnimation::scheduleMicrotaskIfNeeded): Deleted. >+ (WebCore::WebAnimation::performMicrotask): Deleted. >+ * animation/WebAnimation.h: >+ > 2018-12-11 Justin Michaud <justin_michaud@apple.com> > > Implement feature flag for CSS Typed OM >diff --git a/Source/WebCore/animation/WebAnimation.cpp b/Source/WebCore/animation/WebAnimation.cpp >index 850d8387e3518aa5b68ae5d6f5c9136f736cdcb6..d9095cdab8357494d6b45b7e951ddb4a7b1cbf2f 100644 >--- a/Source/WebCore/animation/WebAnimation.cpp >+++ b/Source/WebCore/animation/WebAnimation.cpp >@@ -772,7 +772,12 @@ void WebAnimation::updateFinishedState(DidSeek didSeek, SynchronouslyNotify sync > // Otherwise, if synchronously notify is false, queue a microtask to run finish notification steps for animation unless there > // is already a microtask queued to run those steps for animation. > m_finishNotificationStepsMicrotaskPending = true; >- scheduleMicrotaskIfNeeded(); >+ MicrotaskQueue::mainThreadQueue().append(std::make_unique<VoidMicrotask>([this, protectedThis = makeRef(*this)] () { >+ if (m_finishNotificationStepsMicrotaskPending) { >+ m_finishNotificationStepsMicrotaskPending = false; >+ finishNotificationSteps(); >+ } >+ })); > } > } > >@@ -784,27 +789,6 @@ void WebAnimation::updateFinishedState(DidSeek didSeek, SynchronouslyNotify sync > updateRelevance(); > } > >-void WebAnimation::scheduleMicrotaskIfNeeded() >-{ >- if (m_scheduledMicrotask) >- return; >- >- m_scheduledMicrotask = true; >- MicrotaskQueue::mainThreadQueue().append(std::make_unique<VoidMicrotask>([this, protectedThis = makeRef(*this)] () { >- this->performMicrotask(); >- })); >-} >- >-void WebAnimation::performMicrotask() >-{ >- m_scheduledMicrotask = false; >- if (!m_finishNotificationStepsMicrotaskPending) >- return; >- >- m_finishNotificationStepsMicrotaskPending = false; >- finishNotificationSteps(); >-} >- > void WebAnimation::finishNotificationSteps() > { > // 3.4.14. Updating the finished state >diff --git a/Source/WebCore/animation/WebAnimation.h b/Source/WebCore/animation/WebAnimation.h >index c99dafa1ba652d1899af0ba3660a338937830ac0..af17f4ec9a4d7b18be84a70278cb60f4d6b3a293 100644 >--- a/Source/WebCore/animation/WebAnimation.h >+++ b/Source/WebCore/animation/WebAnimation.h >@@ -143,8 +143,6 @@ private: > std::optional<Seconds> currentTime(RespectHoldTime) const; > ExceptionOr<void> silentlySetCurrentTime(std::optional<Seconds>); > void finishNotificationSteps(); >- void scheduleMicrotaskIfNeeded(); >- void performMicrotask(); > bool hasPendingPauseTask() const { return m_timeToRunPendingPauseTask != TimeToRunPendingTask::NotScheduled; } > bool hasPendingPlayTask() const { return m_timeToRunPendingPlayTask != TimeToRunPendingTask::NotScheduled; } > ExceptionOr<void> play(AutoRewind); >@@ -172,7 +170,6 @@ private: > bool m_isStopped { false }; > bool m_isSuspended { false }; > bool m_finishNotificationStepsMicrotaskPending; >- bool m_scheduledMicrotask; > bool m_isRelevant; > UniqueRef<ReadyPromise> m_readyPromise; > UniqueRef<FinishedPromise> m_finishedPromise;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dino
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192758
: 357442