[webkit-reviews] review granted: [Bug 178931] [Web Animations] Expose the playbackRate property on Animation : [Attachment 325350] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 30 07:51:29 PDT 2017


Sam Weinig <sam at webkit.org> has granted Antoine Quint <graouts at apple.com>'s
request for review:
Bug 178931: [Web Animations] Expose the playbackRate property on Animation
https://bugs.webkit.org/show_bug.cgi?id=178931

Attachment 325350: Patch

https://bugs.webkit.org/attachment.cgi?id=325350&action=review




--- Comment #2 from Sam Weinig <sam at webkit.org> ---
Comment on attachment 325350
  --> https://bugs.webkit.org/attachment.cgi?id=325350
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.htm
l: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.


More information about the webkit-reviews mailing list