Changeset 239269 in webkit
- Timestamp:
- Dec 17, 2018 9:49:55 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r239268 r239269 1 2018-12-17 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Ensure we don't update an animation's finished state twice when updating animations 4 https://bugs.webkit.org/show_bug.cgi?id=192757 5 6 Reviewed by Dean Jackson. 7 8 When animations are udpated and DocumentTimeline::updateAnimationsAndSendEvents() is called, we used to update an animation's finished state 9 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 10 whether we've already updated an animation's finished state during animation update in the call to tick() and avoid updating in the immediate 11 next call to resolve(), unless any of the timing properties have changed in the meantime. 12 13 No new test since there is no user-observable change. 14 15 * animation/WebAnimation.cpp: 16 (WebCore::WebAnimation::timingDidChange): 17 (WebCore::WebAnimation::tick): 18 (WebCore::WebAnimation::resolve): 19 * animation/WebAnimation.h: 20 1 21 2018-12-17 Simon Fraser <simon.fraser@apple.com> 2 22 -
trunk/Source/WebCore/animation/WebAnimation.cpp
r238128 r239269 697 697 void WebAnimation::timingDidChange(DidSeek didSeek, SynchronouslyNotify synchronouslyNotify) 698 698 { 699 m_shouldSkipUpdatingFinishedStateWhenResolving = false; 699 700 updateFinishedState(didSeek, synchronouslyNotify); 700 701 if (m_timeline) … … 1108 1109 { 1109 1110 updateFinishedState(DidSeek::No, SynchronouslyNotify::Yes); 1111 m_shouldSkipUpdatingFinishedStateWhenResolving = true; 1110 1112 1111 1113 // Run pending tasks, if any. … … 1120 1122 void WebAnimation::resolve(RenderStyle& targetStyle) 1121 1123 { 1122 updateFinishedState(DidSeek::No, SynchronouslyNotify::Yes); 1124 if (!m_shouldSkipUpdatingFinishedStateWhenResolving) 1125 updateFinishedState(DidSeek::No, SynchronouslyNotify::Yes); 1126 m_shouldSkipUpdatingFinishedStateWhenResolving = false; 1127 1123 1128 if (m_effect) 1124 1129 m_effect->apply(targetStyle); -
trunk/Source/WebCore/animation/WebAnimation.h
r238128 r239269 175 175 bool m_scheduledMicrotask; 176 176 bool m_isRelevant; 177 bool m_shouldSkipUpdatingFinishedStateWhenResolving; 177 178 UniqueRef<ReadyPromise> m_readyPromise; 178 179 UniqueRef<FinishedPromise> m_finishedPromise;
Note: See TracChangeset
for help on using the changeset viewer.