Skip to content

Truly independent web browser

LibWeb: Stop recording scroll nodes and snap geometry

Aliaksandr Kalenik8572a75bb61b
diff --git a/Libraries/LibWeb/Rust/src/painting/display_list/dump.rs b/Libraries/LibWeb/Rust/src/painting/display_list/dump.rs
index 2607cbf056c..d6247a88b52 100644
--- a/Libraries/LibWeb/Rust/src/painting/display_list/dump.rs
+++ b/Libraries/LibWeb/Rust/src/painting/display_list/dump.rs
@@ -20,6 +20,7 @@ use crate::painting::visual_context::VisualContextTree;
use crate::painting::visual_context::VisualContextTreeDump;
use crate::painting::visual_context::dump::SlotKind;
use crate::stage::MainThread;
+use libcompositing_rust::visual_context::CompositorScrollTable;
use libgfx_rust::path::Path;
use libgfx_rust::{
Color, CompositingAndBlendingOperator, CornerRadii, FloatPoint, FloatRect, FloatSize, IntPoint, IntRect, IntSize,
@@ -146,6 +147,7 @@ pub unsafe extern "C" fn painting_dump(
let owner = owners.owner(kind, index)?;
Some(callbacks.debug_description(&main_thread, owner))
});
+ dump_compositor_scroll_table(&mut output, visual_context_tree.compositor_scroll_table());
output.push_str("\nDisplayList:\n");
dump_commands(&main_thread, &mut output, &callbacks, display_list, 0);
callbacks.append_text(&main_thread, &output);
@@ -155,6 +157,54 @@ fn push_indent(output: &mut String, indent: usize) {
output.extend(std::iter::repeat_n(' ', indent * 2));
}
+// Lists every row, unlike the tree section above it, which shows only the nodes that command runs reach.
+fn dump_compositor_scroll_table(output: &mut String, table: &CompositorScrollTable) {
+ if table.nodes.is_empty() {
+ return;
+ }
+ output.push_str("\nScrollNodes:\n");
+ for node in table.nodes.iter() {
+ output.push_str("ScrollNode");
+ write_field(output, "scroll_node_index", node.scroll_node_index);
+ write_field(output, "parent_scroll_node_index", node.parent_scroll_node_index);
+ write_field(output, "scrollport_rect", node.scrollport_rect);
+ write_field(output, "min_scroll_offset", node.min_scroll_offset);
+ write_field(output, "max_scroll_offset", node.max_scroll_offset);
+ writeln!(output, " is_viewport={}", node.is_viewport).unwrap();
+ let Ok(container_index) = table
+ .snap_containers
+ .binary_search_by_key(&node.scroll_node_index, |container| container.scroll_node_index)
+ else {
+ continue;
+ };
+ let container = &table.snap_containers[container_index];
+ push_indent(output, 1);
+ output.push_str("SnapContainer");
+ write_field(output, "snapport", container.snapport);
+ write_field(output, "min_scroll_offset", container.min_scroll_offset);
+ write_field(output, "max_scroll_offset", container.max_scroll_offset);
+ writeln!(
+ output,
+ " strictness={} snaps_x={} snaps_y={} horizontal_writing_mode={}",
+ container.strictness, container.snaps_x, container.snaps_y, container.horizontal_writing_mode
+ )
+ .unwrap();
+ let first_area_index = container.first_area_index as usize;
+ for area in &table.snap_areas[first_area_index..first_area_index + container.area_count as usize] {
+ push_indent(output, 2);
+ output.push_str("SnapArea");
+ write!(output, " pseudo_element_type={}", area.pseudo_element_type).unwrap();
+ write_field(output, "rect", area.rect);
+ writeln!(
+ output,
+ " align_x={} align_y={} always_stop={}",
+ area.align_x, area.align_y, area.always_stop
+ )
+ .unwrap();
+ }
+ }
+}
+
fn dump_commands(
main_thread: &MainThread,
output: &mut String,
diff --git a/Libraries/LibWeb/Rust/src/painting/display_list/recorder.rs b/Libraries/LibWeb/Rust/src/painting/display_list/recorder.rs
index 97b8f733063..b50c8f034cb 100644
--- a/Libraries/LibWeb/Rust/src/painting/display_list/recorder.rs
+++ b/Libraries/LibWeb/Rust/src/painting/display_list/recorder.rs
@@ -1336,10 +1336,6 @@ impl DisplayListRecorder {
);
}
- pub fn compositor_scroll_node(&mut self, node: CompositorScrollNode) {
- self.append_command(&node, &[]);
- }
-
pub fn compositor_wheel_hit_test_target(&mut self, target: CompositorWheelHitTestTarget) {
self.append_command(&target, &[]);
}
@@ -1366,12 +1362,4 @@ impl DisplayListRecorder {
pub fn compositor_blocking_wheel_event_region(&mut self, region: CompositorBlockingWheelEventRegion) {
self.append_command(&region, &[]);
}
-
- pub fn compositor_snap_container(&mut self, container: CompositorSnapContainer) {
- self.append_command(&container, &[]);
- }
-
- pub fn compositor_snap_area(&mut self, area: CompositorSnapArea) {
- self.append_command(&area, &[]);
- }
}
diff --git a/Libraries/LibWeb/Rust/src/painting/record/async_scroll_metadata.rs b/Libraries/LibWeb/Rust/src/painting/record/async_scroll_metadata.rs
index 36292106c79..e22c60e2509 100644
--- a/Libraries/LibWeb/Rust/src/painting/record/async_scroll_metadata.rs
+++ b/Libraries/LibWeb/Rust/src/painting/record/async_scroll_metadata.rs
@@ -10,21 +10,14 @@ use crate::painting::record::trace::Observer;
use crate::css::css_pixels::{CssPixelRect, CssPixelSize};
use crate::layout::node_data::{DomPaintFact, NodeKind, NodeSlotId};
use crate::painting::chrome_geometry::{
- ChromeGeometry, PhysicalAxes, ScrollbarColors, maximum_scroll_offset, minimum_scroll_offset,
- scrollbar_colors_for_paint,
+ ChromeGeometry, ScrollbarColors, maximum_scroll_offset, minimum_scroll_offset, scrollbar_colors_for_paint,
};
use crate::painting::display_list::commands::*;
use crate::painting::ffi::ScrollDirection;
use crate::painting::paintable_geometry;
use crate::painting::record::PaintRecorder;
use crate::painting::style_queries;
-use crate::painting::visual_context::compositor_scroll_table::{
- compositor_scroll_node_kind, compositor_scroll_node_record, compositor_snap_container_and_area_records,
- css_point_to_device_point,
-};
-use libcompositing_rust::visual_context::{
- CompositorScrollNodeRecord, CompositorSnapAreaRecord, CompositorSnapContainerRecord,
-};
+use crate::painting::visual_context::compositor_scroll_table::css_point_to_device_point;
use libgfx_rust::{FloatRect, FloatSize};
fn css_size_to_device_size(size: CssPixelSize, device_pixels_per_css_pixel: f64) -> FloatSize {
@@ -46,54 +39,6 @@ fn css_rect_to_device_rect(rect: CssPixelRect, device_pixels_per_css_pixel: f64)
}
}
-fn compositor_scroll_node_command(record: CompositorScrollNodeRecord) -> CompositorScrollNode {
- CompositorScrollNode {
- scrollable_node_id: record.scrollable_node_id,
- scroll_node_index: record.scroll_node_index,
- parent_scroll_node_index: record.parent_scroll_node_index,
- scrollport_rect: record.scrollport_rect,
- min_scroll_offset: record.min_scroll_offset,
- max_scroll_offset: record.max_scroll_offset,
- scroll_node_kind: record.scroll_node_kind,
- pseudo_element_type: record.pseudo_element_type,
- is_viewport: record.is_viewport,
- can_be_wheel_scrolled_horizontally: record.can_be_wheel_scrolled_horizontally,
- can_be_wheel_scrolled_vertically: record.can_be_wheel_scrolled_vertically,
- chains_scroll_to_ancestors_horizontally: record.chains_scroll_to_ancestors_horizontally,
- chains_scroll_to_ancestors_vertically: record.chains_scroll_to_ancestors_vertically,
- shows_overscroll_effect_horizontally: record.shows_overscroll_effect_horizontally,
- shows_overscroll_effect_vertically: record.shows_overscroll_effect_vertically,
- }
-}
-
-fn compositor_snap_container_command(record: CompositorSnapContainerRecord) -> CompositorSnapContainer {
- CompositorSnapContainer {
- scroll_node_index: record.scroll_node_index,
- snapport: record.snapport,
- min_scroll_offset: record.min_scroll_offset,
- max_scroll_offset: record.max_scroll_offset,
- strictness: record.strictness,
- snaps_x: record.snaps_x,
- snaps_y: record.snaps_y,
- horizontal_writing_mode: record.horizontal_writing_mode,
- }
-}
-
-fn compositor_snap_area_command(
- scroll_node_index: SpatialNodeIndex,
- record: CompositorSnapAreaRecord,
-) -> CompositorSnapArea {
- CompositorSnapArea {
- scroll_node_index,
- area_node_id: record.area_node_id,
- pseudo_element_type: record.pseudo_element_type,
- rect: record.rect,
- align_x: record.align_x,
- align_y: record.align_y,
- always_stop: record.always_stop,
- }
-}
-
impl<O: Observer> PaintRecorder<'_, O> {
pub(crate) fn has_compositor_scroll_node(&self, paintable: NodeSlotId) -> bool {
let index = self.data(paintable).own_scroll_node_index;
@@ -105,14 +50,6 @@ impl<O: Observer> PaintRecorder<'_, O> {
})
}
- fn wheel_scrollable_axes(&mut self, paintable: NodeSlotId) -> PhysicalAxes {
- let facts = self.hit_test_facts(paintable);
- PhysicalAxes {
- horizontal: facts.could_be_scrolled_horizontally,
- vertical: facts.could_be_scrolled_vertically,
- }
- }
-
fn wheel_hit_test_target_scroll_node_index_for(&mut self, paintable: NodeSlotId) -> SpatialNodeIndex {
let mut paintables_to_cache: Vec<NodeSlotId> = Vec::new();
let mut target = VISUAL_VIEWPORT_NODE_INDEX;
@@ -348,27 +285,6 @@ impl<O: Observer> PaintRecorder<'_, O> {
if !has_composited_context {
self.record_main_thread_wheel_event_region(paintable);
}
- } else if let Some(scroll_node_kind) =
- compositor_scroll_node_kind(self.source, paintable, |slot| self.wheel_scrollable_axes(slot))
- {
- let node = compositor_scroll_node_record(
- self.source,
- paintable,
- scroll_node_kind,
- self.inputs.device_pixels_per_css_pixel,
- self.inputs.uncaptured.device_viewport_size,
- |slot| self.wheel_scrollable_axes(slot),
- );
- self.recorder
- .compositor_scroll_node(compositor_scroll_node_command(node));
- if let Some((container, areas)) = compositor_snap_container_and_area_records(self.source, paintable) {
- self.recorder
- .compositor_snap_container(compositor_snap_container_command(container));
- for area in areas {
- self.recorder
- .compositor_snap_area(compositor_snap_area_command(container.scroll_node_index, area));
- }
- }
}
self.record_viewport_scrollbar_state(paintable);
}
diff --git a/Libraries/LibWeb/Rust/src/painting/record/producers.rs b/Libraries/LibWeb/Rust/src/painting/record/producers.rs
index cbddc71bd57..4ec8b3dd5f5 100644
--- a/Libraries/LibWeb/Rust/src/painting/record/producers.rs
+++ b/Libraries/LibWeb/Rust/src/painting/record/producers.rs
@@ -22,7 +22,6 @@ use crate::painting::paint_read::{GeometryRead, PaintRead};
use crate::painting::paintable_data::PaintableFlag;
use crate::painting::record::damage::PaintDamage;
use crate::painting::record::svg_resources::MaskLayerSet;
-use crate::painting::scroll_snap;
use libgfx_rust::Color;
use smallvec::SmallVec;
use std::ops::Range;
@@ -307,13 +306,11 @@ impl<O: Observer> AssemblyHost for PaintRecorder<'_, O> {
damage
}
- // SVG content is recorded by its root, and a snap container's scroll metadata lists the
- // snap areas below it.
+ // SVG content is recorded by its root.
fn producer_reads_descendants(&mut self, owner: NodeSlotId, kind: ProducerKind) -> bool {
match kind {
ProducerKind::Svg => true,
ProducerKind::ScopePreamble => self.paints_svg_mask_or_clip_resource_subtree(owner),
- ProducerKind::ScrollMetadata => scroll_snap::snap_container_geometry(self.source, owner).is_some(),
ProducerKind::InlinePiece(_) | ProducerKind::TextFragment(_) => true,
_ => false,
}
diff --git a/Libraries/LibWeb/Rust/src/painting/visual_context/compositor_scroll_table.rs b/Libraries/LibWeb/Rust/src/painting/visual_context/compositor_scroll_table.rs
index 526cd4c9c10..9cd78860cdc 100644
--- a/Libraries/LibWeb/Rust/src/painting/visual_context/compositor_scroll_table.rs
+++ b/Libraries/LibWeb/Rust/src/painting/visual_context/compositor_scroll_table.rs
@@ -123,8 +123,7 @@ pub(crate) fn compositor_scroll_node_record(
}
// The compositor selects snap positions for the scrolls it performs from the same geometry the
-// main thread selects from, recorded with the scroll node so that it is as current as the rest
-// of the display list.
+// main thread selects from, kept in the tree beside the scroll node it belongs to.
pub(crate) fn compositor_snap_container_and_area_records(
source: &impl PaintRead,
paintable: NodeSlotId,
@@ -206,7 +205,6 @@ pub(crate) fn refresh_compositor_scroll_table(
let mut containers = Vec::new();
let mut areas = Vec::new();
let mut damaged_subtrees = Vec::new();
- let mut removed_snap_container_owners = Vec::new();
for (node, owner) in &nodes_with_owners {
let previous_node = previous
.nodes
@@ -240,14 +238,6 @@ pub(crate) fn refresh_compositor_scroll_table(
(container, previous.snap_areas[first..end].to_vec())
})
};
- if snap_records.is_none()
- && previous
- .snap_containers
- .binary_search_by_key(&node.scroll_node_index, |container| container.scroll_node_index)
- .is_ok()
- {
- removed_snap_container_owners.push(*owner);
- }
if let Some((mut container, container_areas)) = snap_records {
container.first_area_index = areas.len().try_into().expect("snap area index fits in u32");
container.area_count = container_areas.len().try_into().expect("snap area count fits in u32");
@@ -282,9 +272,6 @@ pub(crate) fn refresh_compositor_scroll_table(
for owner in damaged_subtrees {
arena.push_paint_damage_to_paint_subtree(owner, PaintDamage::SCROLL_METADATA);
}
- for owner in removed_snap_container_owners {
- arena.push_paint_damage(owner, PaintDamage::SCROLL_METADATA);
- }
state.last_compositor_scroll_inputs = Some(inputs);
state.compositor_snap_damage_revision = Some(arena.paint_damage_push_revision());
FfiCompositorScrollRefreshOutcome {
diff --git a/Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-region-hit-testing.txt b/Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-region-hit-testing.txt
index 291cddd490a..56740026773 100644
--- a/Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-region-hit-testing.txt
+++ b/Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-region-hit-testing.txt
@@ -15,8 +15,10 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[20,160 100x100] min_scroll_offset=[0,0] max_scroll_offset=[100,0] is_viewport=false
+
DisplayList:
CompositorBlockingWheelEventRegion@s2/e0 rect=[20,20 100x100]
-CompositorScrollNode@s1/e0 scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[20,160 100x100] min_scroll_offset=[0,0] max_scroll_offset=[100,0] is_viewport=false
CompositorBlockingWheelEventRegion@s3/c0/e0 rect=[20,160 200x100]
diff --git a/Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-regions.txt b/Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-regions.txt
index 1d03d08cdcc..2a213e35f6e 100644
--- a/Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-regions.txt
+++ b/Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-regions.txt
@@ -33,12 +33,14 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[0,0 200x200] min_scroll_offset=[0,0] max_scroll_offset=[800,900] is_viewport=false
+
DisplayList:
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[0,0 800x213]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[0,0 800x200]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[0,0 200x200]
-CompositorScrollNode@s1/e0 scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[0,0 200x200] min_scroll_offset=[0,0] max_scroll_offset=[800,900] is_viewport=false
CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 100x100]
CompositorBlockingWheelEventRegion@s2/c0/e0 rect=[0,0 100x100]
CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,100 1000x1000]
diff --git a/Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-listener-invalidation.txt b/Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-listener-invalidation.txt
index 02637012430..1c1e0882156 100644
--- a/Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-listener-invalidation.txt
+++ b/Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-listener-invalidation.txt
@@ -6,9 +6,9 @@ display list:
AccumulatedVisualContext Tree:
spatial:
[s0] transform=[1,0,0,1,0,0] origin=(0,0) (Viewport<#document>)
- effects:
- [e0 in s0] effects=[]
+
+ScrollNodes:
+ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1413] is_viewport=true
DisplayList:
-CompositorScrollNode@s0/e0 scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1413] is_viewport=true
diff --git a/Tests/LibWeb/Text/expected/async-scrolling/nested-navigable-wheel-admission.txt b/Tests/LibWeb/Text/expected/async-scrolling/nested-navigable-wheel-admission.txt
index cab8ff8e9ef..51117ba1c61 100644
--- a/Tests/LibWeb/Text/expected/async-scrolling/nested-navigable-wheel-admission.txt
+++ b/Tests/LibWeb/Text/expected/async-scrolling/nested-navigable-wheel-admission.txt
@@ -10,9 +10,11 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1413] is_viewport=true
+
DisplayList:
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s1 rect=[0,0 800x600]
-CompositorScrollNode@s0/e0 scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1413] is_viewport=true
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2013]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2000]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2000]
diff --git a/Tests/LibWeb/Text/expected/async-scrolling/nested-scroller-keeps-sync-wheel.txt b/Tests/LibWeb/Text/expected/async-scrolling/nested-scroller-keeps-sync-wheel.txt
index f2d5d001429..162a4a00661 100644
--- a/Tests/LibWeb/Text/expected/async-scrolling/nested-scroller-keeps-sync-wheel.txt
+++ b/Tests/LibWeb/Text/expected/async-scrolling/nested-scroller-keeps-sync-wheel.txt
@@ -11,13 +11,15 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1513] is_viewport=true
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s1 scrollport_rect=[0,0 100x100] min_scroll_offset=[0,0] max_scroll_offset=[0,400] is_viewport=false
+
DisplayList:
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s1 rect=[0,0 800x600]
-CompositorScrollNode@s0/e0 scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1513] is_viewport=true
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2113]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2100]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[0,0 100x100]
-CompositorScrollNode@s1/e0 scroll_node_index=s2 parent_scroll_node_index=s1 scrollport_rect=[0,0 100x100] min_scroll_offset=[0,0] max_scroll_offset=[0,400] is_viewport=false
CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 100x500]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,100 800x2000]
CompositorScrollbar@s1/e0 scroll_node_index=s2 gutter_rect=[0,0 0x0] thumb_rect=[91,2 7x24] track_rect=[91,0 9x100] expanded_gutter_rect=[85,0 15x100] expanded_thumb_rect=[87,2 11x24] scroll_size=0.18 expanded_scroll_size=0.18 min_scroll_offset=0 max_scroll_offset=400 thumb_color=rgba(0, 0, 0, 0.5) thumb_outline_color=rgba(255, 255, 255, 0.25) track_color=rgba(0, 0, 0, 0.098) vertical=true is_painted_by_compositor=false
diff --git a/Tests/LibWeb/Text/expected/async-scrolling/scroll-node-metadata-cache-replay.txt b/Tests/LibWeb/Text/expected/async-scrolling/scroll-node-metadata-cache-replay.txt
index 83a6046c079..7c865c763df 100644
--- a/Tests/LibWeb/Text/expected/async-scrolling/scroll-node-metadata-cache-replay.txt
+++ b/Tests/LibWeb/Text/expected/async-scrolling/scroll-node-metadata-cache-replay.txt
@@ -3,5 +3,5 @@ scroller scrollTop: 80
wheel target near viewport top: latched scroller=viewport
upward wheel target over scroller: latched scroller=#scroller
scroll metadata:
-CompositorScrollNode@s0/e0 scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,2491] is_viewport=true
-CompositorScrollNode@s0/e0 scroll_node_index=s2 parent_scroll_node_index=s1 scrollport_rect=[0,0 100x100] min_scroll_offset=[0,0] max_scroll_offset=[0,400] is_viewport=false
+ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,2491] is_viewport=true
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s1 scrollport_rect=[0,0 100x100] min_scroll_offset=[0,0] max_scroll_offset=[0,400] is_viewport=false
diff --git a/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-parent-nodes.txt b/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-parent-nodes.txt
index bed4bb0dc41..ad9bc0b3f0b 100644
--- a/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-parent-nodes.txt
+++ b/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-parent-nodes.txt
@@ -14,15 +14,17 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1513] is_viewport=true
+ScrollNode scroll_node_index=s3 parent_scroll_node_index=s1 scrollport_rect=[0,0 100x100] min_scroll_offset=[0,0] max_scroll_offset=[400,400] is_viewport=false
+
DisplayList:
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s1 rect=[0,0 800x600]
-CompositorScrollNode@s0/e0 scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1513] is_viewport=true
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2113]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2100]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,100 800x2000]
CompositorWheelHitTestTarget@s2/e0 target_scroll_node_index=s1 rect=[0,0 800x100]
CompositorWheelHitTestTarget@s2/e0 target_scroll_node_index=s3 rect=[0,0 100x100]
-CompositorScrollNode@s2/e0 scroll_node_index=s3 parent_scroll_node_index=s1 scrollport_rect=[0,0 100x100] min_scroll_offset=[0,0] max_scroll_offset=[400,400] is_viewport=false
CompositorWheelHitTestTarget@s3/c0/e0 target_scroll_node_index=s3 rect=[0,0 500x500]
CompositorScrollbar@s2/e0 scroll_node_index=s3 gutter_rect=[0,0 0x0] thumb_rect=[91,2 7x24] track_rect=[91,0 9x100] expanded_gutter_rect=[85,0 15x100] expanded_thumb_rect=[87,2 11x24] scroll_size=0.18 expanded_scroll_size=0.18 min_scroll_offset=0 max_scroll_offset=400 thumb_color=rgba(0, 0, 0, 0.5) thumb_outline_color=rgba(255, 255, 255, 0.25) track_color=rgba(0, 0, 0, 0.098) vertical=true is_painted_by_compositor=false
PaintScrollBar@s2/e0
diff --git a/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txt b/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txt
index f75f8a0d477..77c726a8a19 100644
--- a/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txt
+++ b/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txt
@@ -15,13 +15,15 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1513] is_viewport=true
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s1 scrollport_rect=[0,0 100x100] min_scroll_offset=[0,0] max_scroll_offset=[400,400] is_viewport=false
+
DisplayList:
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s1 rect=[0,0 800x600]
-CompositorScrollNode@s0/e0 scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1513] is_viewport=true
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2113]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2100]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[0,0 100x100]
-CompositorScrollNode@s1/e0 scroll_node_index=s2 parent_scroll_node_index=s1 scrollport_rect=[0,0 100x100] min_scroll_offset=[0,0] max_scroll_offset=[400,400] is_viewport=false
CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 500x500]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,100 800x2000]
CompositorScrollbar@s1/e0 scroll_node_index=s2 gutter_rect=[0,0 0x0] thumb_rect=[91,2 7x24] track_rect=[91,0 9x100] expanded_gutter_rect=[85,0 15x100] expanded_thumb_rect=[87,2 11x24] scroll_size=0.18 expanded_scroll_size=0.18 min_scroll_offset=0 max_scroll_offset=400 thumb_color=rgba(0, 0, 0, 0.5) thumb_outline_color=rgba(255, 255, 255, 0.25) track_color=rgba(0, 0, 0, 0.098) vertical=true is_painted_by_compositor=false
diff --git a/Tests/LibWeb/Text/expected/async-scrolling/sticky-areas.txt b/Tests/LibWeb/Text/expected/async-scrolling/sticky-areas.txt
index 276f71d09ac..62d30f45358 100644
--- a/Tests/LibWeb/Text/expected/async-scrolling/sticky-areas.txt
+++ b/Tests/LibWeb/Text/expected/async-scrolling/sticky-areas.txt
@@ -15,7 +15,9 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1429] is_viewport=true
+
DisplayList:
-CompositorScrollNode@s0/e0 scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1429] is_viewport=true
DrawGlyphRun@s3/e0 rect=[0,0 45x16] translation=[0,13] color=rgb(0, 0, 0)
diff --git a/Tests/LibWeb/Text/expected/async-scrolling/viewport-wheel-with-nested-scroller.txt b/Tests/LibWeb/Text/expected/async-scrolling/viewport-wheel-with-nested-scroller.txt
index 8c4e0abb4e3..d79fc616a0a 100644
--- a/Tests/LibWeb/Text/expected/async-scrolling/viewport-wheel-with-nested-scroller.txt
+++ b/Tests/LibWeb/Text/expected/async-scrolling/viewport-wheel-with-nested-scroller.txt
@@ -13,13 +13,15 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1513] is_viewport=true
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s1 scrollport_rect=[0,0 100x100] min_scroll_offset=[0,0] max_scroll_offset=[0,400] is_viewport=false
+
DisplayList:
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s1 rect=[0,0 800x600]
-CompositorScrollNode@s0/e0 scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,1513] is_viewport=true
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2113]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2100]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[0,0 100x100]
-CompositorScrollNode@s1/e0 scroll_node_index=s2 parent_scroll_node_index=s1 scrollport_rect=[0,0 100x100] min_scroll_offset=[0,0] max_scroll_offset=[0,400] is_viewport=false
CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 100x500]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,100 800x2000]
CompositorScrollbar@s1/e0 scroll_node_index=s2 gutter_rect=[0,0 0x0] thumb_rect=[91,2 7x24] track_rect=[91,0 9x100] expanded_gutter_rect=[85,0 15x100] expanded_thumb_rect=[87,2 11x24] scroll_size=0.18 expanded_scroll_size=0.18 min_scroll_offset=0 max_scroll_offset=400 thumb_color=rgba(0, 0, 0, 0.5) thumb_outline_color=rgba(255, 255, 255, 0.25) track_color=rgba(0, 0, 0, 0.098) vertical=true is_painted_by_compositor=false
diff --git a/Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txt b/Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txt
index acc771d943d..f724610e255 100644
--- a/Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txt
+++ b/Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txt
@@ -20,12 +20,14 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[0,0 200x200] min_scroll_offset=[0,0] max_scroll_offset=[800,900] is_viewport=false
+
DisplayList:
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[0,0 800x213]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[0,0 800x200]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[0,0 200x200]
-CompositorScrollNode@s1/e0 scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[0,0 200x200] min_scroll_offset=[0,0] max_scroll_offset=[800,900] is_viewport=false
CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 100x100]
CompositorBlockingWheelEventRegion@s2/c0/e0 rect=[0,0 100x100]
CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,100 1000x1000]
diff --git a/Tests/LibWeb/Text/expected/display_list/background-attachment-fixed.txt b/Tests/LibWeb/Text/expected/display_list/background-attachment-fixed.txt
index e34d12d1d3b..e228f9a6386 100644
--- a/Tests/LibWeb/Text/expected/display_list/background-attachment-fixed.txt
+++ b/Tests/LibWeb/Text/expected/display_list/background-attachment-fixed.txt
@@ -4,7 +4,9 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,613] is_viewport=true
+
DisplayList:
-CompositorScrollNode@s0/e0 scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,613] is_viewport=true
PaintLinearGradient@s0/e0 rect=[0,0 800x600] inline_clips=[clip=[0,0 800x1213] in s1]
diff --git a/Tests/LibWeb/Text/expected/display_list/mixed-sibling-contexts.txt b/Tests/LibWeb/Text/expected/display_list/mixed-sibling-contexts.txt
index e1729fc347c..6dce2a0e4fc 100644
--- a/Tests/LibWeb/Text/expected/display_list/mixed-sibling-contexts.txt
+++ b/Tests/LibWeb/Text/expected/display_list/mixed-sibling-contexts.txt
@@ -9,8 +9,10 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[119,9 100x100] min_scroll_offset=[0,0] max_scroll_offset=[50,50] is_viewport=false
+
DisplayList:
-CompositorScrollNode@s1/e0 scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[119,9 100x100] min_scroll_offset=[0,0] max_scroll_offset=[50,50] is_viewport=false
FillRoundedRectRing@s1/e0 rect=[118,8 102x102] widths=[1,1,1,1] color=rgb(0, 0, 255)
FillRect@s3/c0/e0 rect=[119,9 150x150] color=rgb(173, 216, 230)
DrawGlyphRun@s3/c0/e0 rect=[119,9 55x16] translation=[119,22] color=rgb(0, 0, 0)
diff --git a/Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txt b/Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txt
index 0a50806f3b0..c5b7f7595c6 100644
--- a/Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txt
+++ b/Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txt
@@ -10,15 +10,17 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[10,10 200x150] min_scroll_offset=[0,0] max_scroll_offset=[102,0] is_viewport=false
+ScrollNode scroll_node_index=s3 parent_scroll_node_index=s2 scrollport_rect=[11,11 300x100] min_scroll_offset=[0,0] max_scroll_offset=[100,0] is_viewport=false
+
DisplayList:
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[0,0 800x175]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[8,8 784x154]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[8,8 204x154]
-CompositorScrollNode@s1/e0 scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[10,10 200x150] min_scroll_offset=[0,0] max_scroll_offset=[102,0] is_viewport=false
FillRoundedRectRing@s1/e0 rect=[8,8 204x154] widths=[2,2,2,2] color=rgb(0, 0, 255)
CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s3 rect=[10,10 302x102]
-CompositorScrollNode@s2/c0/e0 scroll_node_index=s3 parent_scroll_node_index=s2 scrollport_rect=[11,11 300x100] min_scroll_offset=[0,0] max_scroll_offset=[100,0] is_viewport=false
FillRect@s2/c0/e0 rect=[10,10 302x102] color=rgb(255, 255, 224)
FillRoundedRectRing@s2/c0/e0 rect=[10,10 302x102] widths=[1,1,1,1] color=rgb(255, 0, 0)
CompositorWheelHitTestTarget@s3/c1/e0 target_scroll_node_index=s3 rect=[11,11 400x80]
diff --git a/Tests/LibWeb/Text/expected/display_list/paint-damage-snap-area-move.txt b/Tests/LibWeb/Text/expected/display_list/paint-damage-snap-area-move.txt
index ca47756509f..3bad744df73 100644
--- a/Tests/LibWeb/Text/expected/display_list/paint-damage-snap-area-move.txt
+++ b/Tests/LibWeb/Text/expected/display_list/paint-damage-snap-area-move.txt
@@ -1,3 +1,3 @@
-PASS: quiet before the move (work)
-PASS: move the second snap area (work)
+PASS: quiet before the move (work + checks)
+PASS: move the second snap area (work + checks)
PASS: quiet after the move (work)
diff --git a/Tests/LibWeb/Text/expected/display_list/root-background-absolutely-positioned-overflow.txt b/Tests/LibWeb/Text/expected/display_list/root-background-absolutely-positioned-overflow.txt
index a6a173ddd59..91d4cd890f6 100644
--- a/Tests/LibWeb/Text/expected/display_list/root-background-absolutely-positioned-overflow.txt
+++ b/Tests/LibWeb/Text/expected/display_list/root-background-absolutely-positioned-overflow.txt
@@ -5,8 +5,10 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,2400] is_viewport=true
+
DisplayList:
-CompositorScrollNode@s0/e0 scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,2400] is_viewport=true
DrawRepeatedTile@s1/e0 dst_rect=[0,0 50x50] clip_rect=[0,0 800x3000] tile_size=[50x50] tile_step=[50x50] scaling_mode=Bilinear inline_clips=[clip=[0,0 800x3000]]
PaintLinearGradient@s1/e0 rect=[0,0 50x50]
diff --git a/Tests/LibWeb/Text/expected/display_list/scroll-node-of-box-with-nothing-to-scroll-that-keeps-its-scrolls.txt b/Tests/LibWeb/Text/expected/display_list/scroll-node-of-box-with-nothing-to-scroll-that-keeps-its-scrolls.txt
index a14f4e78634..c42f67830ca 100644
--- a/Tests/LibWeb/Text/expected/display_list/scroll-node-of-box-with-nothing-to-scroll-that-keeps-its-scrolls.txt
+++ b/Tests/LibWeb/Text/expected/display_list/scroll-node-of-box-with-nothing-to-scroll-that-keeps-its-scrolls.txt
@@ -9,12 +9,14 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[0,0 100x100] min_scroll_offset=[0,0] max_scroll_offset=[0,0] is_viewport=false
+
DisplayList:
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[0,0 800x213]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[0,0 800x200]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[0,0 100x100]
-CompositorScrollNode@s1/e0 scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[0,0 100x100] min_scroll_offset=[0,0] max_scroll_offset=[0,0] is_viewport=false
CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 50x50]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[0,100 100x100]
CompositorWheelHitTestTarget@s1/c1/e0 target_scroll_node_index=s0 rect=[0,100 50x50]
diff --git a/Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txt b/Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txt
index 90f465506f9..fca04c7475b 100644
--- a/Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txt
+++ b/Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txt
@@ -8,6 +8,9 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[33,33 180x100] min_scroll_offset=[0,0] max_scroll_offset=[120,100] is_viewport=false
+
DisplayList:
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[0,0 800x21]
@@ -15,7 +18,6 @@ CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[20,20 204x1
FillRect@s0/e0 rect=[20,20 204x154] color=rgb(211, 211, 211)
FillRoundedRectRing@s0/e0 rect=[20,20 204x154] widths=[2,2,2,2] color=rgb(0, 0, 0)
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s2 rect=[32,32 182x102]
-CompositorScrollNode@s0/e0 scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[33,33 180x100] min_scroll_offset=[0,0] max_scroll_offset=[120,100] is_viewport=false
FillRoundedRectRing@s0/e0 rect=[32,32 182x102] widths=[1,1,1,1] color=rgb(0, 0, 255)
CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[33,33 300x200]
FillRect@s2/c0/e0 rect=[33,33 300x200] color=rgb(240, 128, 128)
diff --git a/Tests/LibWeb/Text/expected/display_list/sibling-overflow-containers.txt b/Tests/LibWeb/Text/expected/display_list/sibling-overflow-containers.txt
index 2d5bc27c83e..481d841d7f2 100644
--- a/Tests/LibWeb/Text/expected/display_list/sibling-overflow-containers.txt
+++ b/Tests/LibWeb/Text/expected/display_list/sibling-overflow-containers.txt
@@ -10,12 +10,14 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[9,9 100x80] min_scroll_offset=[0,0] max_scroll_offset=[50,40] is_viewport=false
+ScrollNode scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[131,9 100x80] min_scroll_offset=[0,0] max_scroll_offset=[50,40] is_viewport=false
+
DisplayList:
-CompositorScrollNode@s1/e0 scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[9,9 100x80] min_scroll_offset=[0,0] max_scroll_offset=[50,40] is_viewport=false
FillRoundedRectRing@s1/e0 rect=[8,8 102x82] widths=[1,1,1,1] color=rgb(0, 0, 0)
FillRect@s2/c0/e0 rect=[9,9 150x120] color=rgb(240, 128, 128)
DrawGlyphRun@s2/c0/e0 rect=[9,9 110x16] translation=[9,22] color=rgb(0, 0, 0)
-CompositorScrollNode@s1/e0 scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[131,9 100x80] min_scroll_offset=[0,0] max_scroll_offset=[50,40] is_viewport=false
FillRoundedRectRing@s1/e0 rect=[130,8 102x82] widths=[1,1,1,1] color=rgb(0, 0, 0)
FillRect@s3/c1/e0 rect=[131,9 150x120] color=rgb(144, 238, 144)
DrawGlyphRun@s3/c1/e0 rect=[131,9 119x16] translation=[131,22] color=rgb(0, 0, 0)
diff --git a/Tests/LibWeb/Text/expected/display_list/sibling-scrollables-in-fixed.txt b/Tests/LibWeb/Text/expected/display_list/sibling-scrollables-in-fixed.txt
index 72bc7f66486..6279bdce093 100644
--- a/Tests/LibWeb/Text/expected/display_list/sibling-scrollables-in-fixed.txt
+++ b/Tests/LibWeb/Text/expected/display_list/sibling-scrollables-in-fixed.txt
@@ -12,6 +12,11 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[23,23 91x150] min_scroll_offset=[0,0] max_scroll_offset=[108.671875,150] is_viewport=false
+ScrollNode scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[126,23 92x150] min_scroll_offset=[0,0] max_scroll_offset=[108.65625,150] is_viewport=false
+ScrollNode scroll_node_index=s4 parent_scroll_node_index=s0 scrollport_rect=[230,23 91x150] min_scroll_offset=[0,0] max_scroll_offset=[108.671875,150] is_viewport=false
+
DisplayList:
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[0,0 800x21]
@@ -19,7 +24,6 @@ CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[10,10 324x2
FillRect@s0/e0 rect=[10,10 324x224] color=rgb(211, 211, 211)
FillRoundedRectRing@s0/e0 rect=[10,10 324x224] widths=[2,2,2,2] color=rgb(0, 0, 0)
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s2 rect=[22,22 93.328125x152]
-CompositorScrollNode@s0/e0 scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[23,23 91x150] min_scroll_offset=[0,0] max_scroll_offset=[108.671875,150] is_viewport=false
FillRoundedRectRing@s0/e0 rect=[22,22 93x152] widths=[1,1,1,1] color=rgb(0, 0, 255)
CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[23,23 200x300]
FillRect@s2/c0/e0 rect=[23,23 200x300] color=rgb(240, 128, 128)
@@ -29,7 +33,6 @@ PaintScrollBar@s0/e0
CompositorScrollbar@s0/e0 scroll_node_index=s2 gutter_rect=[0,0 0x0] thumb_rect=[25,164 33x7] track_rect=[23,164 76x9] expanded_gutter_rect=[23,158 76x15] expanded_thumb_rect=[25,160 33x11] scroll_size=0.3617541337167505 expanded_scroll_size=0.3617541337167505 min_scroll_offset=0 max_scroll_offset=108.671875 thumb_color=rgba(0, 0, 0, 0.5) thumb_outline_color=rgba(255, 255, 255, 0.25) track_color=rgba(0, 0, 0, 0.098) vertical=false is_painted_by_compositor=false
PaintScrollBar@s0/e0
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s3 rect=[125.328125,22 93.34375x152]
-CompositorScrollNode@s0/e0 scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[126,23 92x150] min_scroll_offset=[0,0] max_scroll_offset=[108.65625,150] is_viewport=false
FillRoundedRectRing@s0/e0 rect=[125,22 94x152] widths=[1,1,1,1] color=rgb(0, 0, 255)
CompositorWheelHitTestTarget@s3/c1/e0 target_scroll_node_index=s3 rect=[126.328125,23 200x300]
FillRect@s3/c1/e0 rect=[126,23 200x300] color=rgb(144, 238, 144)
@@ -39,7 +42,6 @@ PaintScrollBar@s0/e0
CompositorScrollbar@s0/e0 scroll_node_index=s3 gutter_rect=[0,0 0x0] thumb_rect=[128,164 33x7] track_rect=[126,164 77x9] expanded_gutter_rect=[126,158 77x15] expanded_thumb_rect=[128,160 33x11] scroll_size=0.36180615473109 expanded_scroll_size=0.36180615473109 min_scroll_offset=0 max_scroll_offset=108.65625 thumb_color=rgba(0, 0, 0, 0.5) thumb_outline_color=rgba(255, 255, 255, 0.25) track_color=rgba(0, 0, 0, 0.098) vertical=false is_painted_by_compositor=false
PaintScrollBar@s0/e0
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s4 rect=[228.67188,22 93.328125x152]
-CompositorScrollNode@s0/e0 scroll_node_index=s4 parent_scroll_node_index=s0 scrollport_rect=[230,23 91x150] min_scroll_offset=[0,0] max_scroll_offset=[108.671875,150] is_viewport=false
FillRoundedRectRing@s0/e0 rect=[229,22 93x152] widths=[1,1,1,1] color=rgb(0, 0, 255)
CompositorWheelHitTestTarget@s4/c2/e0 target_scroll_node_index=s4 rect=[229.67188,23 200x300]
FillRect@s4/c2/e0 rect=[230,23 200x300] color=rgb(173, 216, 230)
diff --git a/Tests/LibWeb/Text/expected/display_list/simple-overflow-hidden.txt b/Tests/LibWeb/Text/expected/display_list/simple-overflow-hidden.txt
index 41fe3142dbd..73033aad0c5 100644
--- a/Tests/LibWeb/Text/expected/display_list/simple-overflow-hidden.txt
+++ b/Tests/LibWeb/Text/expected/display_list/simple-overflow-hidden.txt
@@ -8,8 +8,10 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[10,10 200x100] min_scroll_offset=[0,0] max_scroll_offset=[100,50] is_viewport=false
+
DisplayList:
-CompositorScrollNode@s1/e0 scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[10,10 200x100] min_scroll_offset=[0,0] max_scroll_offset=[100,50] is_viewport=false
FillRoundedRectRing@s1/e0 rect=[8,8 204x104] widths=[2,2,2,2] color=rgb(0, 0, 0)
FillRect@s2/c0/e0 rect=[10,10 300x150] color=rgb(240, 128, 128)
DrawGlyphRun@s2/c0/e0 rect=[10,10 38x16] translation=[10,23] color=rgb(0, 0, 0)
diff --git a/Tests/LibWeb/Text/expected/display_list/svg-foreignobject-scroller-after-relayout.txt b/Tests/LibWeb/Text/expected/display_list/svg-foreignobject-scroller-after-relayout.txt
index 573fe052f70..3760c27207c 100644
--- a/Tests/LibWeb/Text/expected/display_list/svg-foreignobject-scroller-after-relayout.txt
+++ b/Tests/LibWeb/Text/expected/display_list/svg-foreignobject-scroller-after-relayout.txt
@@ -11,6 +11,9 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[0,0 80x80] min_scroll_offset=[0,0] max_scroll_offset=[0,220] is_viewport=false
+
DisplayList:
CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600]
CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[0,0 800x121]
@@ -20,7 +23,6 @@ CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[8,8 100x100
StrokePath@s2/c0/e0 path_bounding_rect=[9.5,9.5 81x81] thickness=1 color=rgb(0, 0, 0)
CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s0 rect=[0,0 100x100]
CompositorWheelHitTestTarget@s2/c1/e0 target_scroll_node_index=s3 rect=[0,0 80x80]
-CompositorScrollNode@s2/c1/e0 scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[0,0 80x80] min_scroll_offset=[0,0] max_scroll_offset=[0,220] is_viewport=false
CompositorWheelHitTestTarget@s3/c2/e0 target_scroll_node_index=s3 rect=[0,0 80x300]
FillRect@s3/c2/e0 rect=[0,0 80x300] color=rgb(0, 0, 0)
CompositorScrollbar@s2/c1/e0 scroll_node_index=s3 gutter_rect=[0,0 0x0] thumb_rect=[71,2 7x24] track_rect=[71,0 9x80] expanded_gutter_rect=[65,0 15x80] expanded_thumb_rect=[67,2 11x24] scroll_size=0.23636363636363636 expanded_scroll_size=0.23636363636363636 min_scroll_offset=0 max_scroll_offset=220 thumb_color=rgba(0, 0, 0, 0.5) thumb_outline_color=rgba(255, 255, 255, 0.25) track_color=rgba(0, 0, 0, 0.098) vertical=true is_painted_by_compositor=false
diff --git a/Tests/LibWeb/Text/expected/display_list/transform-with-clip.txt b/Tests/LibWeb/Text/expected/display_list/transform-with-clip.txt
index ef0c90b936e..9ab59bb9e46 100644
--- a/Tests/LibWeb/Text/expected/display_list/transform-with-clip.txt
+++ b/Tests/LibWeb/Text/expected/display_list/transform-with-clip.txt
@@ -9,8 +9,10 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[10,10 150x150] min_scroll_offset=[0,0] max_scroll_offset=[70,70] is_viewport=false
+
DisplayList:
-CompositorScrollNode@s1/e0 scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[10,10 150x150] min_scroll_offset=[0,0] max_scroll_offset=[70,70] is_viewport=false
FillRoundedRectRing@s1/e0 rect=[8,8 154x154] widths=[2,2,2,2] color=rgb(0, 0, 0)
FillRect@s3/c0/e0 rect=[10,10 200x200] color=rgb(144, 238, 144)
DrawGlyphRun@s3/c0/e0 rect=[10,10 185x16] translation=[10,23] color=rgb(0, 0, 0)
diff --git a/Tests/LibWeb/Text/expected/display_list/uniform-solid-border-ring.txt b/Tests/LibWeb/Text/expected/display_list/uniform-solid-border-ring.txt
index 94c3ae62382..8d74bfdf4ca 100644
--- a/Tests/LibWeb/Text/expected/display_list/uniform-solid-border-ring.txt
+++ b/Tests/LibWeb/Text/expected/display_list/uniform-solid-border-ring.txt
@@ -5,8 +5,10 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,20] is_viewport=true
+
DisplayList:
-CompositorScrollNode@s0/e0 scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0 800x600] min_scroll_offset=[0,0] max_scroll_offset=[0,20] is_viewport=true
FillRoundedRectRing@s1/e0 rect=[8,8 106x46] widths=[3,3,3,3] color=rgb(255, 0, 0)
FillRoundedRectRing@s1/e0 rect=[8,64 104x44] corner_radii=[8x8,8x8,8x8,8x8] widths=[2,2,2,2] color=rgb(0, 0, 255)
FillRoundedRectRing@s1/e0 rect=[8,118 100x41] widths=[0,0,1,0] color=rgb(0, 128, 0)
diff --git a/Tests/LibWeb/Text/expected/display_list/zero-area-clip-commands.txt b/Tests/LibWeb/Text/expected/display_list/zero-area-clip-commands.txt
index 4558fd9acea..0d6994c7ca0 100644
--- a/Tests/LibWeb/Text/expected/display_list/zero-area-clip-commands.txt
+++ b/Tests/LibWeb/Text/expected/display_list/zero-area-clip-commands.txt
@@ -11,10 +11,12 @@ AccumulatedVisualContext Tree:
effects:
[e0 in s0] effects=[]
+ScrollNodes:
+ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[8,8 0x100] min_scroll_offset=[0,0] max_scroll_offset=[50,0] is_viewport=false
+ScrollNode scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[8,108 100x0] min_scroll_offset=[0,0] max_scroll_offset=[0,50] is_viewport=false
+
DisplayList:
-CompositorScrollNode@s1/e0 scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[8,8 0x100] min_scroll_offset=[0,0] max_scroll_offset=[50,0] is_viewport=false
FillRect@s2/c0/e0 rect=[8,8 50x50] color=rgb(255, 0, 0)
-CompositorScrollNode@s1/e0 scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[8,108 100x0] min_scroll_offset=[0,0] max_scroll_offset=[0,50] is_viewport=false
FillRect@s3/c1/e0 rect=[8,108 50x50] color=rgb(255, 0, 0)
FillRect@s1/c2/e0 rect=[8,108 50x50] color=rgb(255, 0, 0)
diff --git a/Tests/LibWeb/Text/input/async-scrolling/scroll-node-metadata-cache-replay.html b/Tests/LibWeb/Text/input/async-scrolling/scroll-node-metadata-cache-replay.html
index fd0ab8d5e7e..46930374775 100644
--- a/Tests/LibWeb/Text/input/async-scrolling/scroll-node-metadata-cache-replay.html
+++ b/Tests/LibWeb/Text/input/async-scrolling/scroll-node-metadata-cache-replay.html
@@ -28,7 +28,7 @@
function compositorScrollLines(displayList) {
return displayList
.split("\n")
- .filter(line => line.includes("CompositorScrollNode"))
+ .filter(line => line.startsWith("ScrollNode "))
.join("\n");
}
diff --git a/Tests/LibWeb/Text/input/display_list/paint-damage-body-background-change.html b/Tests/LibWeb/Text/input/display_list/paint-damage-body-background-change.html
index 2a219091c78..968774dfc6d 100644
--- a/Tests/LibWeb/Text/input/display_list/paint-damage-body-background-change.html
+++ b/Tests/LibWeb/Text/input/display_list/paint-damage-body-background-change.html
@@ -22,7 +22,7 @@ displayListTest({
@viewport RECORD
@viewport/preamble RECORD (empty)
@viewport/background/hit-test RECORD
- @viewport/scroll-metadata RECORD
+ @viewport/scroll-metadata RECORD (empty)
@viewport/background SKIP
@viewport/border SKIP
BlockContainer<HTML>#html/descendants(background-and-borders) RECORD
@@ -77,7 +77,7 @@ displayListTest({
@viewport RECORD
@viewport/preamble RECORD (empty)
@viewport/background/hit-test RECORD
- @viewport/scroll-metadata RECORD
+ @viewport/scroll-metadata RECORD (empty)
@viewport/background SKIP
@viewport/border SKIP
BlockContainer<HTML>#html/descendants(background-and-borders) RECORD
diff --git a/Tests/LibWeb/Text/input/display_list/paint-damage-root-overflow-growth.html b/Tests/LibWeb/Text/input/display_list/paint-damage-root-overflow-growth.html
index 18329cce39c..d145e1302fb 100644
--- a/Tests/LibWeb/Text/input/display_list/paint-damage-root-overflow-growth.html
+++ b/Tests/LibWeb/Text/input/display_list/paint-damage-root-overflow-growth.html
@@ -26,7 +26,7 @@ displayListTest({
@viewport ASSEMBLE
@viewport/preamble RECORD (empty)
@viewport/background/hit-test RECORD
- @viewport/scroll-metadata RECORD
+ @viewport/scroll-metadata RECORD (empty)
@viewport/background SKIP
@viewport/border SKIP
BlockContainer<HTML>#html/descendants(background-and-borders) ASSEMBLE
diff --git a/Tests/LibWeb/Text/input/display_list/paint-damage-snap-area-move.html b/Tests/LibWeb/Text/input/display_list/paint-damage-snap-area-move.html
index 50992a564e4..4b5e7d5f9d7 100644
--- a/Tests/LibWeb/Text/input/display_list/paint-damage-snap-area-move.html
+++ b/Tests/LibWeb/Text/input/display_list/paint-damage-snap-area-move.html
@@ -10,13 +10,17 @@
<body id="body">
<div id="snap"><div class="area" id="area0"></div><div class="area" id="area1"></div><div class="area" id="area2"></div></div>
<script>
-// Moving a snap area re-runs the scroll metadata of its snap container, which reads its
-// descendants' positions, while the container's own painting is copied.
+// Moving a snap area changes its snap container's scroll range, which records the container's
+// scroll metadata again while its own painting is copied. The area's new position reaches the
+// compositor through the visual context tree.
+const topOfSecondSnapArea = () => internals.recordedAsyncScrollingState().snapContainers[0].areas[1].rect.y;
+let topOfSecondSnapAreaBeforeTheMove;
displayListTest({
setup: removeBodyWhitespace,
steps: [
{
name: "quiet before the move",
+ check: () => { topOfSecondSnapAreaBeforeTheMove = topOfSecondSnapArea(); },
expect: `
damage: rows=0 moved=0 order=0 eligibility=0 all=false
@canvas RECORD (empty)
@@ -26,6 +30,9 @@ displayListTest({
{
name: "move the second snap area",
mutate: () => { area1.style.marginTop = "10px"; },
+ check: equal => {
+ equal(topOfSecondSnapArea() - topOfSecondSnapAreaBeforeTheMove, 10, "how far the snap area moved");
+ },
expect: `
damage: rows=6 moved=2 order=0 eligibility=0 all=false
@canvas RECORD (empty)
diff --git a/Tests/LibWeb/Text/input/display_list/painted-as-stacking-context-capture-canvas-color-change.html b/Tests/LibWeb/Text/input/display_list/painted-as-stacking-context-capture-canvas-color-change.html
index d0a11e058de..c9555562774 100644
--- a/Tests/LibWeb/Text/input/display_list/painted-as-stacking-context-capture-canvas-color-change.html
+++ b/Tests/LibWeb/Text/input/display_list/painted-as-stacking-context-capture-canvas-color-change.html
@@ -34,7 +34,7 @@ displayListTest({
@viewport RECORD
@viewport/preamble RECORD (empty)
@viewport/background/hit-test RECORD
- @viewport/scroll-metadata RECORD
+ @viewport/scroll-metadata RECORD (empty)
@viewport/background SKIP
@viewport/border SKIP
BlockContainer<HTML>#html/descendants(background-and-borders) RECORD