mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +00:00
LibWeb/Animation: Cancel pending play task on pause
This fixes a bug in `pause()` that canceled the pause task instead of the play task. This issue prevented the animation from being paused while a play task is scheduled.
This commit is contained in:
parent
d625e12082
commit
4bec023b7b
Notes:
github-actions[bot]
2024-11-25 17:11:31 +00:00
Author: https://github.com/skyz1 Commit: https://github.com/LadybirdBrowser/ladybird/commit/4bec023b7b6 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2568
1 changed files with 1 additions and 1 deletions
|
@ -739,7 +739,7 @@ WebIDL::ExceptionOr<void> Animation::pause()
|
|||
|
||||
// 8. If animation has a pending play task, cancel that task and let has pending ready promise be true.
|
||||
if (m_pending_play_task == TaskState::Scheduled) {
|
||||
m_pending_pause_task = TaskState::None;
|
||||
m_pending_play_task = TaskState::None;
|
||||
has_pending_ready_promise = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue