mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
This commit reverses the order of the `send_pending_events` and `update_animation_timeline` calls in `ScriptThread::update_animations_ send_events` so that animation-related events pended by the latter are processed by the former. The new calling order is more compliant with the "update animations and send events" algorithm steps from [the Web Animations specification][1]. The old implementation was prone to blocking for an indefinite period while holding pending events. Due to complex interaction with other events and timing behavior, I was only able to reproduce the problem under the following conditions: - *The `maybe_observe_paint_time` call in `LayoutThread::compute_abs_ pos_and_build_display_list` is removed from the code*. While performance events may seem irrelevant to the issue, they would bombard the script thread with events. *Any* extra messages received would unblock the event loop and prevent the manifestation of the issue. (But, of course, we aren't supposed to count on that to avoid the issue.) - Servo is running in a headless mode, which somehow makes it less likely for the script thread to receive a `TickAllAnimations` event after sending `AnimationState::NoAnimationsPresent`. With the above conditions met and the stars aligned, you can reproduce the problem by running the WPT test `/css/css-transitions/events-001. html`. [1]: https://drafts.csswg.org/web-animations-1/#update-animations-and-send-events |
||
---|---|---|
.. | ||
allocator | ||
atoms | ||
background_hang_monitor | ||
bluetooth | ||
bluetooth_traits | ||
canvas | ||
canvas_traits | ||
compositing | ||
config | ||
config_plugins | ||
constellation | ||
deny_public_fields | ||
derive_common | ||
devtools | ||
devtools_traits | ||
dom_struct | ||
domobject_derive | ||
embedder_traits | ||
fallible | ||
geometry | ||
gfx | ||
gfx_traits | ||
hashglobe | ||
jstraceable_derive | ||
layout | ||
layout_2020 | ||
layout_thread | ||
layout_thread_2020 | ||
layout_traits | ||
malloc_size_of | ||
media | ||
metrics | ||
msg | ||
net | ||
net_traits | ||
pixels | ||
profile | ||
profile_traits | ||
rand | ||
range | ||
remutex | ||
script | ||
script_layout_interface | ||
script_plugins | ||
script_traits | ||
selectors | ||
servo | ||
servo_arc | ||
size_of_test | ||
std_test_override | ||
style | ||
style_derive | ||
style_traits | ||
to_shmem | ||
to_shmem_derive | ||
url | ||
webdriver_server | ||
webgpu | ||
webrender_surfman | ||
webrender_traits |