Automatic update from web-platform-tests
[animation-trigger] Change pause/setCurrentTime order of ResetPlayback
The change in the order of `pause()` and `setCurrentTime()` prevents an
issue exposed in animation-trigger-repeat.tentative.html where (with
the previous `setCurrentTime(); pause();` order) the animation would be
pending_pause_ with start_time_ matching timeline_time after
ResetPlayback is called (during LayerTreeHost::ApplyMutatorEvents), but
then (during LayerTreeHost::BeginMainFrame) PendingAnimations::Update
would call Animation::NotifyReady with a slightly increased timeline
time, leading to a tiny drift that caused the test's expectation to
(correctly) fail.
By calling `pause()` first and then `setCurrentTime`, we resolve the
pending_pause_ while having start_time_ match the timeline time,
avoiding the drift.
Bug: 451238244
Change-Id: I1baee26942b707fe6a8a96bc24871861087e7d21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7850492
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Commit-Queue: David A <awogbemila@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1633646}
--
wpt-commits: dd494d161cc20f0daf39e648d0e64ccb68f83dcc
wpt-pr: 60017