mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 18:46:03 +00:00
LibWeb: Move animation event dispatch into update_animations_and_...()
This will be important for the next commit
This commit is contained in:
parent
ca363f0024
commit
4dc8492155
Notes:
sideshowbarker
2024-07-17 06:20:50 +09:00
Author: https://github.com/mattco98
Commit: 4dc8492155
Pull-request: https://github.com/SerenityOS/serenity/pull/23756
1 changed files with 5 additions and 5 deletions
|
@ -3975,6 +3975,11 @@ void Document::update_animations_and_send_events(Optional<double> const& timesta
|
|||
// the previous step.
|
||||
for (auto const& event : events_to_dispatch)
|
||||
event.target->dispatch_event(event.event);
|
||||
|
||||
for (auto& timeline : m_associated_animation_timelines) {
|
||||
for (auto& animation : timeline->associated_animations())
|
||||
dispatch_events_for_animation_if_necessary(animation);
|
||||
}
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#remove-replaced-animations
|
||||
|
@ -4086,11 +4091,6 @@ void Document::ensure_animation_timer()
|
|||
}
|
||||
|
||||
update_animations_and_send_events(window()->performance()->now());
|
||||
|
||||
for (auto& timeline : m_associated_animation_timelines) {
|
||||
for (auto& animation : timeline->associated_animations())
|
||||
dispatch_events_for_animation_if_necessary(animation);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue