mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-25 18:58:56 +00:00
LibWeb: Use the timeline time when saving animation play/pause time
This commit is contained in:
parent
a1f4d1875e
commit
560b07dda3
Notes:
sideshowbarker
2024-07-16 23:13:25 +09:00
Author: https://github.com/mattco98
Commit: 560b07dda3
Pull-request: https://github.com/SerenityOS/serenity/pull/23750
1 changed files with 2 additions and 2 deletions
|
@ -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
|
// 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.
|
// such that it runs at the next microtask checkpoint, but it must not perform the task synchronously.
|
||||||
m_pending_play_task = TaskState::Scheduled;
|
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 animation’s finished state for animation with the did seek flag set to false,
|
// 13. Run the procedure to update an animation’s finished state for animation with the did seek flag set to false,
|
||||||
// and the synchronously notify 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()
|
// Note: This is run_pending_pause_task()
|
||||||
m_pending_pause_task = TaskState::Scheduled;
|
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 animation’s finished state for animation with the did seek flag set to false,
|
// 11. Run the procedure to update an animation’s finished state for animation with the did seek flag set to false,
|
||||||
// and the synchronously notify flag set to false.
|
// and the synchronously notify flag set to false.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue