servo/components/layout/fragment_tree
Martin Robinson a66a257b38
script: Properly root nodes with animating images (#37689)
This change fixes an issue and makes a few more minor improvements to
the `ImageAnimationState`:

1. Image rooting and unrooted now happens in one step from
   `Window::update_animations_post_reflow`.
2. The `node_to_animating_image_map` is now stored as a shared `RwLock`
   so that it doesn't need to be taken and then replaced in the
`ImageAnimationState` during reflow. This should prevent a hypothetical
issue
   where image animations are restarted during empty reflows.
3. General naming and idiomatic Rust usage improvements.

Testing: This doesn't really have any obvious behavioral changes,
because all
reflows currently trigger a restyle. It becomes a serious problem with
#37677
and this change fixes the failing test there.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-06-25 13:52:11 +00:00
..
base_fragment.rs Rename script_layout_interface to layout_api (#37591) 2025-06-20 17:13:05 +00:00
box_fragment.rs layout: Unify scrollable overflow calculation and include position: absolute (#37475) 2025-06-16 11:30:31 +00:00
containing_block.rs layout: Combine layout_2020 and layout_thread_2020 into a crate called layout (#36613) 2025-04-19 10:17:03 +00:00
fragment.rs layout: Unify scrollable overflow calculation and include position: absolute (#37475) 2025-06-16 11:30:31 +00:00
fragment_tree.rs script: Properly root nodes with animating images (#37689) 2025-06-25 13:52:11 +00:00
hoisted_shared_fragment.rs layout: Combine layout_2020 and layout_thread_2020 into a crate called layout (#36613) 2025-04-19 10:17:03 +00:00
mod.rs layout: Combine layout_2020 and layout_thread_2020 into a crate called layout (#36613) 2025-04-19 10:17:03 +00:00
positioning_fragment.rs layout: Split overflow calculation after fragment tree construction (#37203) 2025-05-30 19:41:05 +00:00