servo/components/shared/base
Jo Steven Novaryo 900dd8d191
layout: Consider transform for bounding box queries (#37871)
The recent changes that cached the Scroll Tree present an opportunity to
calculate the queries that consider transform and scroll (dubbed as post
composite queries) accurately.

This PR propose a solution for this calculation by noting the lowest
scroll tree nodes that would affect a fragment. To do this, each
fragment would store a new attribute `spatial_tree_node` -- scroll tree
node id that we could use for the query. This referencing is considered
because the scroll tree node construction is managed by the fragment
itself. Therefore it would ease the managing the possibly stale
reference and future query cache invalidation considering the
development of incremental layout.

The bounding box query then could transform the bounding content rect of
a fragment using the computed current transformation matrix.

Fixes: https://github.com/servo/servo/issues/35768
Testing: Existing and new WPT

---------

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
Signed-off-by: Jo Steven Novaryo <jo.steven.novaryo@huawei.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-07-30 08:13:54 +00:00
..
Cargo.toml Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
cross_process_instant.rs deps: Upgrade to webrender@0.66 (#35325) 2025-02-07 11:57:26 +00:00
generate-unicode-block.py base: Remove ucd dependency (#32424) 2024-06-03 17:10:01 +00:00
generic_channel.rs Move webgl_channel into base crate (#32339) 2024-05-24 06:13:20 +00:00
id.rs layout: Consider transform for bounding box queries (#37871) 2025-07-30 08:13:54 +00:00
lib.rs script: Create a CrossProcessInstant to enable serializable monotonic time (#33282) 2024-09-05 18:50:09 +00:00
print_tree.rs Move non-gfx things out of gfx_traits and create a base crate (#32296) 2024-05-17 12:28:58 +00:00
text.rs clippy: Fix collapsible_match warning in components/shared (#33664) 2024-10-07 07:52:38 +00:00
unicode_block.rs base: Remove ucd dependency (#32424) 2024-06-03 17:10:01 +00:00