servo/components/shared
Martin Robinson f451dccd0b
layout: Store scroll offsets in the ScrollTree (#37428)
There are currently five places that scroll offsets are stored:

 - DOM: A set of scroll offsets used for script.
 - Layout: An array of scroll offsets that is used for tracking
   layout-side scroll offsets.
 - Layout: The scroll offsets stored in the `ScrollTree`. These are
   currently unset and unused.
 - Compositor: The scroll offsets stored in the `ScrollTree` mirrored
   from layout.
 - WebRender: The scrolled offsets stored in the WebRender spatial tree.

This change is the first step in combining the first three into the
layout `ScrollTree`. It eliminates the extra array of scroll offsets
stored in layout in favor of the storing them in the `ScrollTree`. A
followup change will eliminate the ones stored in the DOM.

- In addition the `ScrollState` data structure is eliminated as these
are
now stored in a `HashMap` everywhere when passing them via IPC.
- The offsests stored in layout can now never scroll past the boundaries
of the scrolled content.

Testing: This should not change behavior and is thus covered by existing
WPT tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: stevennovaryo <steven.novaryo@gmail.com>
2025-06-13 12:01:27 +00:00
..
background_hang_monitor script: add skeleton implementation of FontFace API (#35262) 2025-02-19 05:50:01 +00:00
base imagebitmap: Make ImageBitmap serializable and transferable (#37101) 2025-05-23 20:40:25 +00:00
bluetooth Include WebViewId into EmbedderMsg variants where possible (#35211) 2025-01-30 11:15:35 +00:00
canvas Change canvas/context/snapshot size from u64 -> u32 (#36827) 2025-06-07 14:37:21 +00:00
compositing layout: Store scroll offsets in the ScrollTree (#37428) 2025-06-13 12:01:27 +00:00
constellation layout: Store scroll offsets in the ScrollTree (#37428) 2025-06-13 12:01:27 +00:00
devtools DevTools: Implement support for showing source_content in Debugger > Source panel (#36774) 2025-06-13 09:31:33 +00:00
embedder [webdriver] Add synchronization for wheel action (#37260) 2025-06-11 09:03:08 +00:00
fonts Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
net Report URI with POST fetch request (#37209) 2025-06-08 18:44:55 +00:00
profile Refactor the memory profiler code to return the struct. (#37155) 2025-05-28 00:58:05 +00:00
script layout: Store scroll offsets in the ScrollTree (#37428) 2025-06-13 12:01:27 +00:00
script_layout layout: Store scroll offsets in the ScrollTree (#37428) 2025-06-13 12:01:27 +00:00
snapshot Change canvas/context/snapshot size from u64 -> u32 (#36827) 2025-06-07 14:37:21 +00:00
webgpu Introduce snapshot concept of canvas (#36119) 2025-04-23 07:32:47 +00:00
webxr libservo: Move EventLooperWaker from webxr_traits to embedder_traits (#36420) 2025-04-09 14:19:33 +00:00