[wpt-sync] Sync PR 15279 - [animation-worklet] Basic pause implementation (reland)

RESOLVED FIXED in Firefox 67

Status

enhancement
P4
normal
RESOLVED FIXED
5 months ago
4 months ago

People

(Reporter: wptsync, Unassigned)

Tracking

unspecified
mozilla67
Points:
---

Firefox Tracking Flags

(firefox67 fixed)

Details

(Whiteboard: [wptsync downstream], )

Assignee

Description

5 months ago

Sync web-platform-tests PR 15279 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/15279
Details from upstream follow.

Majid Valipour <majidvp@chromium.org> wrote:

[animation-worklet] Basic pause implementation (reland)

Pausing worklet animation now holds the time. This works as expected for
main thread animations. Implementing this for composited worklet
animations will be done in a follow up patch.

Major changes:

  • Add and expose pause() method pausing the animation.
  • Introduce hold_time that is used when animation is paused.
  • Rework how current time is computed, it is now closer to
    regular animations i.e., we either compute it based on
    "start time and timeline.currentTime" or use "hold time".
  • Instead of setting start time we now set the current time
    which then works backward to compute either the start time
    or the hold time based on the animation state.
  • When transitioning animation play state, we now always set
    the current time. Previously this was adhoc and inconsistent.
  • Introduce has_started_ to differentiate when playing an
    animation for the first time vs playing it from pause.
  • Update playback_rate related calculation to use new logic.

TEST:

  • wpt/animation-worklet/worklet-animation-pause.https.html: js test for basic current time calculations
  • wpt/animation-worklet/worklet-animation-pause-immediately.https.html: reftest for basic pause
  • wpt/animation-worklet/worklet-animation-pause-result.https.html: reftest for pause/resume.
  • WorkletAnimationTest.PausePlay: unit test for basic state transition and time calc

Relanding: Original CL was reverted here https://chromium-review.googlesource.com/c/chromium/src/+/1434815

  • Address flakiness in unit test by using more accurate error value matching other tests.
  • Speculative fix for layout test fail by waiting for an async animation frame. Locally
    running the test for 100 repeats does not show any flakes.

Bug: 821910
Change-Id: I11fd2960443081be81055904d6d56a2abc3282f5

Reviewed-on: https://chromium-review.googlesource.com/1456640
WPT-Export-Revision: 251d535541b775379bb33d422596c8d67b2c7f7f

Assignee

Updated

5 months ago
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Assignee

Updated

4 months ago
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Assignee

Comment 3

4 months ago
Ran 8 tests and 10 subtests
OK     : 3
FAIL   : 9
TIMEOUT: 5
ERROR  : 1

New tests that have failures or other problems:
/animation-worklet/worklet-animation-pause-immediately.https.html: TIMEOUT
/animation-worklet/worklet-animation-pause-resume.https.html: TIMEOUT
/animation-worklet/worklet-animation-pause.https.html: TIMEOUT

Comment 4

4 months ago
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6653907d02d6
[wpt PR 15279] - [animation-worklet] Basic pause implementation (reland), a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/5af6492c193d
[wpt PR 15279] - Update wpt metadata, a=testonly

Comment 5

4 months ago
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d57f0aa7c8a7
[wpt PR 15279] - [animation-worklet] Basic pause implementation (reland), a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e5d55b9cba1
[wpt PR 15279] - Update wpt metadata, a=testonly

Comment 6

4 months ago
bugherder
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.