mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb/DOM: Conserve references to pending animations
This fixes a crash in: - css/css-animations/CSSAnimation-effect.tentative.html
This commit is contained in:
parent
db24440403
commit
906b7bf4e3
Notes:
github-actions[bot]
2024-12-30 10:06:02 +00:00
Author: https://github.com/LucasChollet
Commit: 906b7bf4e3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3066
1 changed files with 4 additions and 1 deletions
|
@ -4736,8 +4736,11 @@ void Document::update_animations_and_send_events(Optional<double> const& timesta
|
||||||
HTML::perform_a_microtask_checkpoint();
|
HTML::perform_a_microtask_checkpoint();
|
||||||
|
|
||||||
// 4. Let events to dispatch be a copy of doc’s pending animation event queue.
|
// 4. Let events to dispatch be a copy of doc’s pending animation event queue.
|
||||||
|
auto events_to_dispatch = GC::ConservativeVector<Document::PendingAnimationEvent> { vm().heap() };
|
||||||
|
events_to_dispatch.extend(m_pending_animation_event_queue);
|
||||||
|
|
||||||
// 5. Clear doc’s pending animation event queue.
|
// 5. Clear doc’s pending animation event queue.
|
||||||
auto events_to_dispatch = move(m_pending_animation_event_queue);
|
m_pending_animation_event_queue.clear();
|
||||||
|
|
||||||
// 6. Perform a stable sort of the animation events in events to dispatch as follows:
|
// 6. Perform a stable sort of the animation events in events to dispatch as follows:
|
||||||
auto sort_events_by_composite_order = [](auto const& a, auto const& b) {
|
auto sort_events_by_composite_order = [](auto const& a, auto const& b) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue