servo/components/layout
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
..
display_list layout: Remove two arguments from StackingContextTree::new() (#37396) 2025-06-11 12:42:54 +00:00
flexbox layout: Move text decoration propagation to stacking context tree construction (#37069) 2025-05-21 16:38:29 +00:00
flow Layout: refactor the box tree update logic for better readability (#37390) 2025-06-13 08:42:59 +00:00
fragment_tree layout: Split overflow calculation after fragment tree construction (#37203) 2025-05-30 19:41:05 +00:00
stylesheets Add a user agent style for the <slot> element (#37174) 2025-05-29 08:20:01 +00:00
table layout: Move text decoration propagation to stacking context tree construction (#37069) 2025-05-21 16:38:29 +00:00
taffy CSS Grid: percentage sizing fixes (#34948) 2025-06-08 15:17:10 +00:00
tests layout: Combine layout_2020 and layout_thread_2020 into a crate called layout (#36613) 2025-04-19 10:17:03 +00:00
Cargo.toml Removing unused dependencies in crates. (#37096) 2025-05-23 12:58:00 +00:00
cell.rs layout: Combine layout_2020 and layout_thread_2020 into a crate called layout (#36613) 2025-04-19 10:17:03 +00:00
construct_modern.rs Move to_bidi_level method from Stylo to Servo (#37343) 2025-06-11 14:44:13 +00:00
context.rs Add support for static SVG images using resvg crate (#36721) 2025-05-27 11:02:40 +00:00
dom.rs Add support for static SVG images using resvg crate (#36721) 2025-05-27 11:02:40 +00:00
dom_traversal.rs Revert "Implement Input UA Shadow DOM (#37065)" (#37296) 2025-06-06 15:23:08 +00:00
formatting_contexts.rs layout: Correct damage propagation and style repair for repaint-only layout (#37004) 2025-05-19 10:17:49 +00:00
geom.rs layout: Inform child layout about final block size (#36980) 2025-05-14 20:35:49 +00:00
layout_box_base.rs layout: Add a repaint-only incremental layout mode (#36978) 2025-05-12 17:03:50 +00:00
layout_impl.rs layout: Store scroll offsets in the ScrollTree (#37428) 2025-06-13 12:01:27 +00:00
lib.rs layout: Move text decoration propagation to stacking context tree construction (#37069) 2025-05-21 16:38:29 +00:00
lists.rs layout: Use ServoLayoutNode directly instead of a generic impl (#36876) 2025-05-06 14:27:51 +00:00
positioned.rs layout: Split overflow calculation after fragment tree construction (#37203) 2025-05-30 19:41:05 +00:00
query.rs layout: Split overflow calculation after fragment tree construction (#37203) 2025-05-30 19:41:05 +00:00
quotes.rs layout: Combine layout_2020 and layout_thread_2020 into a crate called layout (#36613) 2025-04-19 10:17:03 +00:00
replaced.rs layout: Avoid useless LazyCell when resolving replaced element's size (#37419) 2025-06-13 08:29:37 +00:00
sizing.rs layout: Combine layout_2020 and layout_thread_2020 into a crate called layout (#36613) 2025-04-19 10:17:03 +00:00
style_ext.rs Move to_bidi_level method from Stylo to Servo (#37343) 2025-06-11 14:44:13 +00:00
traversal.rs Add another incremental layout that starts at stacking tree construction (#37088) 2025-05-23 23:40:02 +00:00