WebKit Bugzilla
Attachment 357441 Details for
Bug 192757
: [Web Animations] Ensure we don't update an animation's finished state twice when updating animations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192757-20181217174201.patch (text/plain), 3.40 KB, created by
Antoine Quint
on 2018-12-17 08:42:02 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2018-12-17 08:42:02 PST
Size:
3.40 KB
patch
obsolete
>Subversion Revision: 239098 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 74894db0f9c523424b12a709793683ce67610b4c..aaf022c5f62663653d873daa2750903df95986c2 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2018-12-17 Antoine Quint <graouts@apple.com> >+ >+ [Web Animations] Ensure we don't update an animation's finished state twice when updating animations >+ https://bugs.webkit.org/show_bug.cgi?id=192757 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When animations are udpated and DocumentTimeline::updateAnimationsAndSendEvents() is called, we used to update an animation's finished state >+ twice since we'd do it once when calling tick() and once again when calling resolve() in the ensuing style invalidation. We now keep track of >+ whether we've already updated an animation's finished state during animation update in the call to tick() and avoid updating in the immediate >+ next call to resolve(), unless any of the timing properties have changed in the meantime. >+ >+ No new test since there is no user-observable change. >+ >+ * animation/WebAnimation.cpp: >+ (WebCore::WebAnimation::timingDidChange): >+ (WebCore::WebAnimation::tick): >+ (WebCore::WebAnimation::resolve): >+ * 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..4f2e64f63979b363d943d2ee747ebd99edde8f7d 100644 >--- a/Source/WebCore/animation/WebAnimation.cpp >+++ b/Source/WebCore/animation/WebAnimation.cpp >@@ -696,6 +696,7 @@ ExceptionOr<void> WebAnimation::finish() > > void WebAnimation::timingDidChange(DidSeek didSeek, SynchronouslyNotify synchronouslyNotify) > { >+ m_shouldSkipUpdatingFinishedStateWhenResolving = false; > updateFinishedState(didSeek, synchronouslyNotify); > if (m_timeline) > m_timeline->animationTimingDidChange(*this); >@@ -1107,6 +1108,7 @@ bool WebAnimation::needsTick() const > void WebAnimation::tick() > { > updateFinishedState(DidSeek::No, SynchronouslyNotify::Yes); >+ m_shouldSkipUpdatingFinishedStateWhenResolving = true; > > // Run pending tasks, if any. > if (hasPendingPauseTask()) >@@ -1119,7 +1121,10 @@ void WebAnimation::tick() > > void WebAnimation::resolve(RenderStyle& targetStyle) > { >- updateFinishedState(DidSeek::No, SynchronouslyNotify::Yes); >+ if (!m_shouldSkipUpdatingFinishedStateWhenResolving) >+ updateFinishedState(DidSeek::No, SynchronouslyNotify::Yes); >+ m_shouldSkipUpdatingFinishedStateWhenResolving = false; >+ > if (m_effect) > m_effect->apply(targetStyle); > } >diff --git a/Source/WebCore/animation/WebAnimation.h b/Source/WebCore/animation/WebAnimation.h >index c99dafa1ba652d1899af0ba3660a338937830ac0..9c88b30be2466502d2e6c1f2711aec6d2596f894 100644 >--- a/Source/WebCore/animation/WebAnimation.h >+++ b/Source/WebCore/animation/WebAnimation.h >@@ -174,6 +174,7 @@ private: > bool m_finishNotificationStepsMicrotaskPending; > bool m_scheduledMicrotask; > bool m_isRelevant; >+ bool m_shouldSkipUpdatingFinishedStateWhenResolving; > UniqueRef<ReadyPromise> m_readyPromise; > UniqueRef<FinishedPromise> m_finishedPromise; > TimeToRunPendingTask m_timeToRunPendingPlayTask { TimeToRunPendingTask::NotScheduled };
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 192757
: 357441