LibWeb: Queue animation phase events as part of updating animations

Move the dispatch_events_for_animation_if_necessary() calls into step 1
of update_animations_and_send_events(), where the spec note says
updating timelines involves "Queueing animation events for any such
animations." Previously, these calls ran after step 7 (event dispatch),
causing newly queued events to be deferred by an extra rendering update.

This meant that e.g. a CSS transition triggered during an earlier
rendering step would not have its transitionrun event fired until the
next frame, instead of the current one.
This commit is contained in:
Jelle Raaijmakers
2026-02-13 21:02:32 +01:00
committed by Alexander Kalenik
parent 3576f4a53a
commit 83913fef84
Notes: github-actions[bot] 2026-02-13 21:45:31 +00:00
3 changed files with 126 additions and 6 deletions

View File

@@ -0,0 +1,6 @@
Harness status: OK
Found 1 tests
1 Pass
Pass new-scroll-event-dispatched-at-next-updating-rendering-time