Closed Bug 2046973 Opened 3 months ago Closed 1 month ago

Update animation.reverse() and the setter of playbackRate to match the spec

Categories

(Core :: DOM: Animation, enhancement)

enhancement
Points:
5

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: boris, Assigned: boris)

References

(Blocks 2 open bugs, )

Details

(Keywords: dev-doc-complete, Whiteboard: [scrollanimation:m2])

Attachments

(2 files)

This bug is for these tests:

  1. scroll-timelines/setting-playback-rate.html
  2. scroll-timelines/finish-animation.html
  3. scroll-timelines/reverse-animation.html

The above tests manipulate the playback rate and check the current time (and start time). If the active duration is incorrect, we may have incorrect end time so the timing normalization or any calculation may be wrong. We may have other issues to make these tests pass but at least we can start to check the calculation of active duration with the playback rate.

Whiteboard: [scrollanimation:triage]
Summary: Update the calculation of active duration to use playback rate → Update the calculation of active duration and start time to use playback rate properly
Blocks: 2047285
See Also: → 2047285
Whiteboard: [scrollanimation:triage] → [scrollanimation:m2]
Points: --- → 5

Note that reverse-animation.html will be passed once we follow the spec change: https://github.com/w3c/csswg-drafts/issues/14173

Assignee: nobody → boris.chiou
Status: NEW → ASSIGNED

We missed the implementation for finite timelines. The spec udpate was added
into web-animations-1 [1] directly, instead of web-animations-2.

[1] https://drafts.csswg.org/web-animations-1/#set-the-playback-rate

Otherwise, calling reverse() is no-op and our behavior may mismatch
other browers because the start time and current time is not correct
after calling reverse() with zero playback rate. This also matches the spec.

Also, we intentionally preserve zero playback rate (instead of setting to
-0); otherwise, we may get new failures in
web-animations/timing-model/animations/reversing-an-animation.html and
scroll-animations/scroll-timelines/reverse-animation.html.

In addition, need to update the test of animation mutation observers
because we update the animaiton after we call reverse() for zero
playback rate.

Summary: Update the calculation of active duration and start time to use playback rate properly → Update animation.reverse() and the setter of playbackRate to match the spec
Pushed by bchiou@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/bad01910529d https://hg.mozilla.org/integration/autoland/rev/04b05b83e804 Update SetPlaybackRate() to match the spec. r=layout-scroll-driven-animation-reviewers,dshin https://github.com/mozilla-firefox/firefox/commit/6ba4be10618f https://hg.mozilla.org/integration/autoland/rev/4fbf969ba677 Fix Reverse() to make sure we call Play() to update the animation for zero playback rate. r=layout-scroll-driven-animation-reviewers,dshin
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
Keywords: dev-doc-needed
QA Whiteboard: [qa-triage-done-c158/b157]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: