LibWeb: Use the timeline time when saving animation play/pause time

This commit is contained in:
Matthew Olsson 2024-03-27 16:48:32 -07:00 committed by Andreas Kling
commit 560b07dda3
Notes: sideshowbarker 2024-07-16 23:13:25 +09:00

View file

@ -663,7 +663,7 @@ WebIDL::ExceptionOr<void> Animation::play_an_animation(AutoRewind auto_rewind)
// If a user agent determines that animation is immediately ready, it may schedule the above task as a microtask
// such that it runs at the next microtask checkpoint, but it must not perform the task synchronously.
m_pending_play_task = TaskState::Scheduled;
m_saved_play_time = global_object().performance()->now();
m_saved_play_time = m_timeline->current_time().value();
// 13. Run the procedure to update an animations finished state for animation with the did seek flag set to false,
// and the synchronously notify flag set to false.
@ -747,7 +747,7 @@ WebIDL::ExceptionOr<void> Animation::pause()
//
// Note: This is run_pending_pause_task()
m_pending_pause_task = TaskState::Scheduled;
m_saved_pause_time = global_object().performance()->now();
m_saved_pause_time = m_timeline->current_time().value();
// 11. Run the procedure to update an animations finished state for animation with the did seek flag set to false,
// and the synchronously notify flag set to false.