[Web Animations] Update the API to implement Animation.updatePlaybackRate()
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Nov 2018 11:15:35 +0000 (11:15 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Nov 2018 11:15:35 +0000 (11:15 +0000)
commitf29c0e8e52a80bce73e396be3ab31d802d552ade
tree7711496641987d9bb819fdf8ee17a6447890b3dd
parentff1d908dd235071fb0f4d16b6e500178ad068969
[Web Animations] Update the API to implement Animation.updatePlaybackRate()
https://bugs.webkit.org/show_bug.cgi?id=186510
<rdar://problem/41000641>

Reviewed by Dean Jackson.

The Web Animations API has been changed to allow for changes to an animation's playback rate both synchronously,
with the existing "playbackRate" property, and asynchronously, with the new updatePlaybackRate() method. In this
patch we update the various procedures to account for pending playback rate changes and the notion of an "effective
playback rate".

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::setEffect):
(WebCore::WebAnimation::setTimeline):
(WebCore::WebAnimation::setStartTime):
(WebCore::WebAnimation::setCurrentTime):
(WebCore::WebAnimation::effectivePlaybackRate const):
(WebCore::WebAnimation::setPlaybackRate):
(WebCore::WebAnimation::updatePlaybackRate):
(WebCore::WebAnimation::applyPendingPlaybackRate):
(WebCore::WebAnimation::playState const):
(WebCore::WebAnimation::resetPendingTasks):
(WebCore::WebAnimation::finish):
(WebCore::WebAnimation::play):
(WebCore::WebAnimation::runPendingPlayTask):
(WebCore::WebAnimation::reverse):
(WebCore::WebAnimation::runPendingPauseTask):
* animation/WebAnimation.h:
(WebCore::WebAnimation::playbackRate const):
* animation/WebAnimation.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/animation/WebAnimation.cpp
Source/WebCore/animation/WebAnimation.h
Source/WebCore/animation/WebAnimation.idl