Skip to content

Commit

Permalink
Updated AnimationPlaybackEvent to return CSSNumberish for members
Browse files Browse the repository at this point in the history
AnimationPlaybackEvent changed to use AnimationTimeDelta internally
and CSSNumberish externally.

Added support for scroll timelines.

Bug: 1251372
Change-Id: I2ff526dfc5d74a4b5917da2c64af29852aa9ecca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3222012
Reviewed-by: Kevin Ellis <[email protected]>
Reviewed-by: Robert Flack <[email protected]>
Commit-Queue: Jordan Taylor <[email protected]>
Cr-Commit-Position: refs/heads/main@{#933567}
  • Loading branch information
Jordan Taylor authored and chromium-wpt-export-bot committed Oct 20, 2021
1 parent 997a977 commit 5f0a02b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions scroll-animations/scroll-timelines/finish-animation.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@
'The current time is the end of the active duration in finished state.');
assert_percents_equal(animation.startTime, -75,
'The start time is calculated to match the current time.');
assert_times_equal(finishEvent.currentTime / 1000, 100,
assert_percents_equal(finishEvent.currentTime, 100,
'event.currentTime is the animation current time.');
assert_times_equal(finishEvent.timelineTime / 1000, 25,
assert_percents_equal(finishEvent.timelineTime, 25,
'event.timelineTime is timeline.currentTime');
}, 'Finishing idle animation produces correct state and fires finish event.');

Expand Down Expand Up @@ -300,9 +300,9 @@
'The current time is the end of active duration in finished state.');
assert_percents_equal(animation.startTime, -75,
'The start time is calculated to match animation current time.');
assert_times_equal(finishEvent.currentTime / 1000, 100,
assert_percents_equal(finishEvent.currentTime, 100,
'event.currentTime is the animation current time.');
assert_times_equal(finishEvent.timelineTime / 1000, 25,
assert_percents_equal(finishEvent.timelineTime, 25,
'event.timelineTime is timeline.currentTime');
}, 'Finishing running animation produces correct state and fires finish event.');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,8 @@

const event = await eventWatcher.wait_for('remove');

assert_equals(event.timelineTime, document.timeline.currentTime);
assert_equals(event.currentTime, 1);
assert_times_equal(event.timelineTime, document.timeline.currentTime);
assert_times_equal(event.currentTime, 1);
}, 'Dispatches an event when removing');

promise_test(async t => {
Expand Down

0 comments on commit 5f0a02b

Please sign in to comment.