WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 178931
[Web Animations] Expose the playbackRate property on Animation
https://bugs.webkit.org/show_bug.cgi?id=178931
Summary
[Web Animations] Expose the playbackRate property on Animation
Antoine Quint
Reported
2017-10-27 03:15:44 PDT
The Animation interface exposes a playbackRate property to control the animation's speed.
Attachments
Patch
(8.45 KB, patch)
2017-10-30 07:45 PDT
,
Antoine Quint
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antoine Quint
Comment 1
2017-10-30 07:45:12 PDT
Created
attachment 325350
[details]
Patch
Sam Weinig
Comment 2
2017-10-30 07:51:29 PDT
Comment on
attachment 325350
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=325350&action=review
> Source/WebCore/animation/WebAnimation.cpp:47 > + , m_playbackRate(1)
This could be in the header.
> LayoutTests/http/wpt/wk-web-animations/timing-model/animation-playback-rate.html:27 > +test(t => { > + const animation = new Animation(document.timeline); > + animation.startTime = 1; > + animation.playbackRate = 2; > + internals.setTimelineCurrentTime(document.timeline, 3); > + > + assert_equals(animation.startTime, 1); > + assert_equals(animation.currentTime, 4); > + assert_equals(animation.playbackRate, 2); > +}, 'Correctly compute the current time based on the playback rate');
I'd add a test for what happens when the playbackRate is 0.
Antoine Quint
Comment 3
2017-10-30 07:58:09 PDT
(In reply to Sam Weinig from
comment #2
)
> > Source/WebCore/animation/WebAnimation.cpp:47 > > + , m_playbackRate(1) > > This could be in the header.
Will move to header in commit.
> I'd add a test for what happens when the playbackRate is 0.
Currently, bad things happen when setting the playback rate to 0. We will deal with that correctly when we implement pausing and the introduce the concept of the hold time. I'm just about to start on that, see
webkit.org/b/178932
. But we can add a test for getting the current time with playback rate = 0, this already works, and should always report currentTime = 0. Will add another test in the commit.
Antoine Quint
Comment 4
2017-10-30 08:09:12 PDT
Committed
r224181
: <
https://trac.webkit.org/changeset/224181
>
Radar WebKit Bug Importer
Comment 5
2017-10-31 06:41:06 PDT
<
rdar://problem/35271079
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug