Truly independent web browser
LibCompositing+Compositor: Give each scroll bar a layer
Aliaksandr Kalenik6eafaae44761
diff --git a/Libraries/LibCompositing/Rust/src/display_list/commands.rs b/Libraries/LibCompositing/Rust/src/display_list/commands.rsindex ccc9a5b26d8..a40f1bc6781 100644--- a/Libraries/LibCompositing/Rust/src/display_list/commands.rs+++ b/Libraries/LibCompositing/Rust/src/display_list/commands.rs@@ -94,9 +94,8 @@ impl DisplayListCommandType {)}- /// A top-level record of this command is the only record of its run: a canvas, video, nested context or caret,- /// which the compositor can give a layer of its own between the records around it, and a scroll bar, which draws- /// what the frame shows of its scroller rather than what the list holds.+ /// A top-level record of this command is the only record of its run: a canvas, video, nested context, caret or+ /// scroll bar, which the compositor can give a layer of its own between the records around it.pub const fn is_alone_in_its_run(self) -> bool {matches!(self,diff --git a/Libraries/LibCompositing/Rust/src/display_list/layers.rs b/Libraries/LibCompositing/Rust/src/display_list/layers.rsindex 22c32f19391..b6104dfe6f4 100644--- a/Libraries/LibCompositing/Rust/src/display_list/layers.rs+++ b/Libraries/LibCompositing/Rust/src/display_list/layers.rs@@ -10,12 +10,12 @@//! Content is rastered in the space of the scroll node, sticky box or node whose transform the compositor animates//! that it moves with, and its raster is composited within the clips it leaves to apply then (its composite clips), and//! inside the effects the compositor applies to it: content of one space, one set of composite clips and at most one-//! composited effect makes a placement node. The records of a node are cut into bands. Within a band, a canvas, video,-//! nested context or caret that is a layer of its own, and each band of a node nested in it, sits between the band's-//! records as a barrier. A barrier cuts the band's tiles that it can show in, or for an effect that reads what is-//! composited below it, that it reads, at its paint position: there, the band's records painted before the barrier go-//! into the layer below the cut and those painted after it into the layer above the cut. Elsewhere it cuts nothing. A-//! canvas, video, nested context or caret cuts no tile where no record of its band painted after it can show where it+//! composited effect makes a placement node. The records of a node are cut into bands. Within a band, live content that+//! is a layer of its own (a canvas, video, nested context, caret or scroll bar), and each band of a node nested in it,+//! sits between the band's records as a barrier. A barrier cuts the band's tiles that it can show in, or for an effect+//! that reads what is composited below it, that it reads, at its paint position: there, the band's records painted+//! before the barrier go into the layer below the cut and those painted after it into the layer above the cut.+//! Elsewhere it cuts nothing. Live content cuts no tile where no record of its band painted after it can show where it//! can.use crate::display_list::commands::ClipNodeIndex;@@ -53,8 +53,22 @@ pub use wire::{LayerPlan, UnvalidatedLayerPlan, compositor_takes_plans_within};// a rect offset by such an offset still fits in an `IntRect`.const COORDINATE_LIMIT_IN_DEVICE_PIXELS: i32 = 2 * EXTENT_LIMIT_IN_DEVICE_PIXELS as i32;+/// The most canvases, videos and nested contexts that get layers.pub const MAXIMUM_MEDIA_LAYER_COUNT: usize = 8;+/// The most carets and scroll bars that get layers, each of which the compositor paints into a small surface of its+/// own. Each cuts its band once, and a plan cuts a band at most `MAXIMUM_CUT_COUNT_OF_RECEIVED_BAND` times.+pub const MAXIMUM_LAYER_COUNT_OF_LIVE_CONTENT_DRAWN_BY_ITS_RECORD: usize = 64;++/// The most layers a plan gives live content of the kind of `content`.+pub(crate) fn maximum_layer_count_of_live_content_like(content: LiveContent) -> usize {+ if content.is_drawn_by_its_record() {+ MAXIMUM_LAYER_COUNT_OF_LIVE_CONTENT_DRAWN_BY_ITS_RECORD+ } else {+ MAXIMUM_MEDIA_LAYER_COUNT+ }+}+/// The most composited effects that nest around a layer of a plan: the effects a frame composites the layer inside,/// each inside the next. Pages nest far fewer, as the compositor composites only an effect that it animates, or one/// around a layer of its own, such as of a scroller, a sticky box or a canvas.@@ -72,6 +86,8 @@ pub(crate) fn media_name(content: LiveContent) -> &'static str {LiveContent::ImageFrame(_) => "image",LiveContent::CompositedContext(_) => "composited context",LiveContent::Caret => "caret",+ LiveContent::ScrollBar { vertical: true, .. } => "vertical scroll bar",+ LiveContent::ScrollBar { vertical: false, .. } => "horizontal scroll bar",}}@@ -172,7 +188,7 @@ pub struct PlacementNodeIdentity(pub u64);#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]pub enum BarrierIdentity {- /// The `ordinal`th drawing of a canvas, video, nested context or caret in paint order.+ /// The `ordinal`th drawing of live content in paint order.Media { content: LiveContent, ordinal: u32 },/// The `band_ordinal_in_node`th band of content of a node, counted over the whole list.NestedNodeBand {@@ -368,9 +384,9 @@ pub enum LayerContent {/// A canvas, video or nested context, replayed or shown by the window server, whose content the identity of the/// layer names.Media { record_span: ListSpan },- /// A caret, alone in the run of `record_span`, which a frame replays and a window server that shows tiles shows- /// from a surface of its own.- Caret { record_span: ListSpan },+ /// A caret or a scroll bar, alone in the run of `record_span`, which a frame replays and a window server that shows+ /// tiles shows from a surface of its own.+ OwnSurface { record_span: ListSpan },}#[derive(Clone, Debug, PartialEq)]@@ -687,9 +703,9 @@ struct CutOfPlan {#[derive(Clone, Copy, Debug)]enum BarrierOfPlan {- /// A canvas, video, nested context or caret that is a layer of its own, the `ordinal`th drawing of its content in- /// paint order. Where `cuts_band` is set, it cuts the tiles its reach touches, and otherwise no tile, as no record- /// of the band painted after it can show where it can.+ /// Live content that is a layer of its own, the `ordinal`th drawing of its content in paint order. Where `cuts_band`+ /// is set, it cuts the tiles its reach touches, and otherwise no tile, as no record of the band painted after it can+ /// show where it can.Media {content: LiveContent,ordinal: u32,@@ -792,7 +808,7 @@ impl LayerStack {/// The stack of a plan of more than one layer, as the planner and the compositor both work it out. The layers come/// in the order of the walk of the bands: a band's layer below all cuts, then per cut the layers of its barrier,- /// which are a canvas, video, nested context or caret or those of the nested band, and the layer above the cut.+ /// which are of live content or those of the nested band, and the layer above the cut./// The ordinal of a band in its node counts the bands of the node before it in the walk. The base layer is the first/// layer that can hold content where that is the layer below all cuts of a band of a node that covers the viewport,/// and the first layer otherwise.@@ -870,8 +886,8 @@ impl LayerStack {identity: LayerIdentity::Media { content, ordinal },placement_node_index: bands[band_index.0].placement_node_index,band_index,- content: if content == LiveContent::Caret {- LayerContent::Caret { record_span }+ content: if content.is_drawn_by_its_record() {+ LayerContent::OwnSurface { record_span }} else {LayerContent::Media { record_span }},@@ -1245,8 +1261,8 @@ impl LayerStack {let window_server_cannot_show_content = match self.layers[layer_index.0].content {LayerContent::Painted => false,LayerContent::Media { .. } => !(window_server.can_show_media_of_layer)(layer_index),- // The window server shows a caret from a surface of its own as it shows a tile.- LayerContent::Caret { .. } => !shows_tiles_of_painted_layers,+ // The window server shows a caret or a scroll bar from a surface of its own as it shows a tile.+ LayerContent::OwnSurface { .. } => !shows_tiles_of_painted_layers,};if !window_server_composites_effects_around_layer {Some(WhyFrameHoldsLayer::InsideAnEffectTheCompositorComposites)@@ -1485,8 +1501,9 @@ impl LayerStack {world_of_frame: impl FnOnce() -> &'world WorldTransforms,viewport_rect: IntRect,) -> WindowServerPlacementsOfMedia {- let window_server_may_show_content =- |content: &LiveContent| !matches!(content, LiveContent::CompositedContext(_) | LiveContent::Caret);+ let window_server_may_show_content = |content: &LiveContent| {+ !matches!(content, LiveContent::CompositedContext(_)) && !content.is_drawn_by_its_record()+ };let has_media_the_window_server_may_show = self.layers.iter().any(|layer| {matches!(&layer.identity, LayerIdentity::Media { content, .. } if window_server_may_show_content(content))});@@ -1554,8 +1571,8 @@ impl LayerStack {name}- // The layer right below a layer above a cut is the layer of the cut's canvas, video, nested context or caret, or the- // topmost layer of the cut's nested band.+ // The layer right below a layer above a cut is the layer of the cut's live content, or the topmost layer of the cut's+ // nested band.fn name_of_barrier_below(&self, layer_index: LayerIndex, node_namer: &dyn VisualContextNodeNamer) -> String {let layer_below = &self.layers[layer_index.0 - 1];match layer_below.identity {diff --git a/Libraries/LibCompositing/Rust/src/display_list/layers/planning.rs b/Libraries/LibCompositing/Rust/src/display_list/layers/planning.rsindex 109f0885136..e0e506a6ecf 100644--- a/Libraries/LibCompositing/Rust/src/display_list/layers/planning.rs+++ b/Libraries/LibCompositing/Rust/src/display_list/layers/planning.rs@@ -18,8 +18,8 @@use super::wire::plan_holds_more_than_compositor_decodes;use super::{BandOfPlan, BarrierCut, BarrierOfPlan, CutOfPlan, LayerIndex, LayerStack, LayeredPlan, LayeringObstacles,- MAXIMUM_MEDIA_LAYER_COUNT, MAXIMUM_NESTING_OF_COMPOSITED_EFFECTS, NodeOfPlan, PlacementNodeIndex,- WhyCompositorCannotCompositeEffect, WhyListIsOneLayer, media_name,+ MAXIMUM_NESTING_OF_COMPOSITED_EFFECTS, NodeOfPlan, PlacementNodeIndex, WhyCompositorCannotCompositeEffect,+ WhyListIsOneLayer, maximum_layer_count_of_live_content_like, media_name,};use crate::display_list::animated_transform_spaces::{effect_reads_below_it, spatial_nodes_under_transform_animations};use crate::display_list::builder::{bounding_rect_computed_from_payload, record_can_paint_within};@@ -282,7 +282,7 @@ pub struct PlacedEffect {pub why_composited_regardless_of_layer_content: Option<WhyEffectIsComposited>,}-/// A canvas, video, nested context or caret that is a layer of its own, alone in its run.+/// Live content that is a layer of its own, alone in its run.#[derive(Clone, Copy, Debug, PartialEq)]pub struct PlacedMedia {pub content: LiveContent,@@ -923,7 +923,7 @@ impl<'a> ListBeingPlaced<'a> {let record_span = list.span_of_run(run_index as usize);debug_assert_eq!(record_position, record_span.begin,- "a canvas, video, nested context or caret is alone in its run"+ "live content with a layer is alone in its run");let reach = runs.reach_of_run_by_run_index[run_index as usize];placed_media.push(PlacedMedia {@@ -938,18 +938,26 @@ impl<'a> ListBeingPlaced<'a> {Some(why_no_layer) => media_without_layers.push((content, why_no_layer)),}}- if placed_media.len() > MAXIMUM_MEDIA_LAYER_COUNT {- let canvases_and_videos_then_nested_contexts_then_carets = |media: &PlacedMedia| match media.content {- LiveContent::CompositedContext(_) => 1,- LiveContent::Caret => 2,- _ => 0,- };- placed_media.sort_by_key(canvases_and_videos_then_nested_contexts_then_carets);- for media_past_limit in placed_media.drain(MAXIMUM_MEDIA_LAYER_COUNT..) {- media_without_layers.push((media_past_limit.content, WhyMediaHasNoLayer::MoreMediaThanLayersFor));+ // Past the most layers that live content of its kind gets, canvases and videos keep theirs before nested+ // contexts, and carets before scroll bars.+ let gives_way_to_others_of_its_kind = |media: &PlacedMedia| {+ matches!(+ media.content,+ LiveContent::CompositedContext(_) | LiveContent::ScrollBar { .. }+ )+ };+ placed_media.sort_by_key(gives_way_to_others_of_its_kind);+ let mut layer_count_by_kind = [0usize; 2];+ placed_media.retain(|media| {+ let layer_count = &mut layer_count_by_kind[usize::from(media.content.is_drawn_by_its_record())];+ *layer_count += 1;+ let gets_layer = *layer_count <= maximum_layer_count_of_live_content_like(media.content);+ if !gets_layer {+ media_without_layers.push((media.content, WhyMediaHasNoLayer::MoreMediaThanLayersFor));}- placed_media.sort_by_key(|media| media.record_span.begin);- }+ gets_layer+ });+ placed_media.sort_by_key(|media| media.record_span.begin);for index in 0..placed_media.len() {placed_media[index].ordinal = placed_media[..index].iter()@@ -960,8 +968,8 @@ impl<'a> ListBeingPlaced<'a> {}// Under a transform animation that leaves the plane, a sample can draw the media through a matrix that is not 2D- // affine, whatever the tree holds. A caret does not get the effects around it composited, as the other media do:- // it has no layer inside an effect that a replay draws into a layer of its own.+ // affine, whatever the tree holds. A caret or a scroll bar does not get the effects around it composited, as other+ // live content does: it has no layer inside an effect that a replay draws into a layer of its own.fn why_media_has_no_layer(&self,runs: &RunGroupsPlaced,@@ -977,6 +985,7 @@ impl<'a> ListBeingPlaced<'a> {| DisplayListCommandType::DrawVideoFrame| DisplayListCommandType::DrawCompositedContext| DisplayListCommandType::PaintCaret+ | DisplayListCommandType::PaintScrollBar) {return Some(WhyMediaHasNoLayer::DrawnInsideAnotherCommand);}@@ -986,7 +995,7 @@ impl<'a> ListBeingPlaced<'a> {{return Some(WhyMediaHasNoLayer::UnderTransformThatIsNot2DAffine);}- if content == LiveContent::Caret {+ if content.is_drawn_by_its_record() {if !self.tree.content_under_effect_composites_into_root_group(run.context.effect)@@ -2359,10 +2368,13 @@ mod tests {BarrierCut, BarrierIdentity, CutsOfCell, LayerIdentity, NodeNamesFromIndices, WindowServerPresentationOfMedia,media_name,};+ use crate::display_list::layers::{+ MAXIMUM_LAYER_COUNT_OF_LIVE_CONTENT_DRAWN_BY_ITS_RECORD, MAXIMUM_MEDIA_LAYER_COUNT,+ };use crate::display_list::test_fixtures::{GREEN, ListOfOneChunk, VIEWPORT, animation_of, canvas, caret, effects, fill, frosted_glass,- opacity_animation_of, scroll_node, scroll_record, spinning, transform, transform_animation_of,- tree_with_document_scroll, tree_with_root_isolation_effect,+ opacity_animation_of, scroll_bar, scroll_node, scroll_record, spinning, transform, transform_animation_of,+ tree_with_document_scroll, tree_with_document_scroller, tree_with_root_isolation_effect,};use crate::display_list::tiles::TILE_SIZE_IN_DEVICE_PIXELS;use crate::node_slot_id::NodeSlotId;@@ -2968,6 +2980,77 @@ mod tests {assert!(planned.stack.composited_effects.is_empty());}+ #[test]+ fn a_scroll_bar_gets_a_layer_of_its_own() {+ let (tree, _, contexts) = tree_with_document_scroller(&[IntRect::new(100, 100, 300, 200)]);+ let (document, scroller) = (contexts[0], contexts[1]);+ let planned = ListOfOneChunk::default()+ .with(fill(IntRect::new(0, 0, 800, 2600), GREEN), document)+ .with(fill(IntRect::new(100, 100, 300, 700), GREEN), scroller)+ .with(scroll_bar(scroller.spatial, IntRect::new(390, 100, 10, 200)), document)+ .planned(&tree, &[]);+ assert!(planned.placement.media_without_layers.is_empty());+ assert_eq!(+ kinds_of_layers_from_base_up_that_may_hold_content(&planned.stack),+ [+ "base document band 0",+ "painted scroller@s2 in document band 0",+ "vertical scroll bar #0 document"+ ]+ );+ }++ // Carets and scroll bars get layers past the most canvases, videos and nested contexts that do, and past the most+ // carets and scroll bars that get layers, carets keep theirs.+ #[test]+ fn carets_and_scroll_bars_count_against_a_limit_of_their_own() {+ let (tree, _, contexts) = tree_with_document_scroller(&[IntRect::new(100, 100, 300, 200)]);+ let (document, scroller) = (contexts[0], contexts[1]);+ let mut list = ListOfOneChunk::default().with(fill(IntRect::new(0, 0, 800, 2600), GREEN), document);+ for index in 0..MAXIMUM_MEDIA_LAYER_COUNT {+ list = list.with(+ canvas(IntRect::new(10 + index as i32 * 60, 1000, 50, 50), index as u64 + 1),+ document,+ );+ }+ for index in 0..MAXIMUM_LAYER_COUNT_OF_LIVE_CONTENT_DRAWN_BY_ITS_RECORD as i32 {+ list = list.with(+ scroll_bar(scroller.spatial, IntRect::new(10 + index * 12, 100, 10, 200)),+ document,+ );+ }+ let planned = list+ .with(caret(IntRect::new(20, 400, 2, 16)), document)+ .planned(&tree, &[]);+ let placed_count = |is_of_kind: fn(&LiveContent) -> bool| {+ planned+ .placement+ .placed_media+ .iter()+ .filter(|media| is_of_kind(&media.content))+ .count()+ };+ assert_eq!(+ placed_count(|content| matches!(content, LiveContent::Canvas(_))),+ MAXIMUM_MEDIA_LAYER_COUNT+ );+ assert_eq!(placed_count(|content| *content == LiveContent::Caret), 1);+ assert_eq!(+ placed_count(|content| matches!(content, LiveContent::ScrollBar { .. })),+ MAXIMUM_LAYER_COUNT_OF_LIVE_CONTENT_DRAWN_BY_ITS_RECORD - 1+ );+ assert_eq!(+ planned.placement.media_without_layers,+ [(+ LiveContent::ScrollBar {+ scroll_node: scroller.spatial,+ vertical: true+ },+ WhyMediaHasNoLayer::MoreMediaThanLayersFor+ )]+ );+ }+#[test]fn a_canvas_that_no_record_painted_after_it_overlaps_cuts_no_tile() {let (tree, _, document) = tree_with_document_scroll();diff --git a/Libraries/LibCompositing/Rust/src/display_list/layers/planning/lines_of_plan.rs b/Libraries/LibCompositing/Rust/src/display_list/layers/planning/lines_of_plan.rsindex 61852152034..287e28b169e 100644--- a/Libraries/LibCompositing/Rust/src/display_list/layers/planning/lines_of_plan.rs+++ b/Libraries/LibCompositing/Rust/src/display_list/layers/planning/lines_of_plan.rs@@ -96,7 +96,7 @@ impl PlannedLayers {})}- /// What the dump says of each canvas, video, nested context or caret that was not given a layer, and why.+ /// What the dump says of each drawing of live content that was not given a layer, and why.pub fn lines_of_media_without_layers(&self) -> impl Iterator<Item = String> + '_ {self.placement.media_without_layers@@ -105,9 +105,8 @@ impl PlannedLayers {}/// The lines the overlay of layers shows of the stack past its layers, which WebContent sends with the plan: those- /// of the effects the compositor composites, of the canvases, videos, nested contexts and carets without layers,- /// and of the effects that read only their own layer, with nodes named by their indices, as many and as long as a- /// plan holds.+ /// of the effects the compositor composites, of the live content without layers, and of the effects that read only+ /// their own layer, with nodes named by their indices, as many and as long as a plan holds./// A stack of one layer that replays the whole list has none.pub fn note_lines_for_layers_overlay(&self) -> Vec<String> {if self.stack.replays_whole_list() {@@ -142,8 +141,8 @@ impl PlannedLayers {/// line per layer, bottom to top: its index, what it holds, the space it is rastered in, what it sits above, the/// records `describe_records` names for it, what it is clipped to as it is composited, and whether the window/// server that `presentation` is of can show it. A layer below the base layer, or one that can hold nothing, is- /// left out. Then a line for each effect the compositor composites, each canvas, video, nested context or caret- /// without a layer, each animation without a layer, and each effect that reads only its own layer.+ /// left out. Then a line for each effect the compositor composites, each drawing of live content without a layer,+ /// each animation without a layer, and each effect that reads only its own layer.pub fn layer_lines(&self,presentation: &WindowServerPresentationOfMedia,@@ -225,7 +224,8 @@ impl PlannedLayers {return vec![LayerIndex(0)];}for (index, layer) in stack.layers.iter().enumerate() {- let (LayerContent::Media { record_span } | LayerContent::Caret { record_span }) = &layer.content else {+ let (LayerContent::Media { record_span } | LayerContent::OwnSurface { record_span }) = &layer.content+ else {continue;};if record_span.contains(position) {diff --git a/Libraries/LibCompositing/Rust/src/display_list/layers/wire.rs b/Libraries/LibCompositing/Rust/src/display_list/layers/wire.rsindex 089fb46e00f..2375633f85a 100644--- a/Libraries/LibCompositing/Rust/src/display_list/layers/wire.rs+++ b/Libraries/LibCompositing/Rust/src/display_list/layers/wire.rs@@ -10,11 +10,12 @@use super::{BandOfPlan, BarrierOfPlan, COORDINATE_LIMIT_IN_DEVICE_PIXELS, CutOfPlan, LayerContent, LayerIdentity, LayerStack,- LayeredPlan, LayeringObstacles, MAXIMUM_MEDIA_LAYER_COUNT, MAXIMUM_NESTING_OF_COMPOSITED_EFFECTS, NodeOfPlan,- PlacementNodeIndex, StackLayer, WhyCompositorCannotCompositeEffect, WhyListIsOneLayer, anchors_of_layer_plans,+ LayeredPlan, LayeringObstacles, MAXIMUM_NESTING_OF_COMPOSITED_EFFECTS, NodeOfPlan, PlacementNodeIndex, StackLayer,+ WhyCompositorCannotCompositeEffect, WhyListIsOneLayer, anchors_of_layer_plans,+ maximum_layer_count_of_live_content_like,};use crate::display_list::commands::{- CanvasId, CompositorContextId, EffectNodeIndex, ImageFrameResourceId, VideoSinkHandle,+ CanvasId, CompositorContextId, EffectNodeIndex, ImageFrameResourceId, SpatialNodeIndex, VideoSinkHandle,};use crate::display_list::placement::{CompositeClip, MAXIMUM_RASTER_SPACE_COUNT, RasterSpace, RasterSpaceAnchorKind, RasterSpaceIndex, RasterSpaces,@@ -187,6 +188,7 @@ const LIVE_CONTENT_KIND_VIDEO_FRAME: u8 = 1;const LIVE_CONTENT_KIND_IMAGE_FRAME: u8 = 2;const LIVE_CONTENT_KIND_COMPOSITED_CONTEXT: u8 = 3;const LIVE_CONTENT_KIND_CARET: u8 = 4;+const LIVE_CONTENT_KIND_SCROLL_BAR: u8 = 5;impl Encode for LiveContent {fn encode(&self, encoder: &mut Encoder) -> Result<(), EncodeError> {@@ -196,6 +198,10 @@ impl Encode for LiveContent {LiveContent::ImageFrame(id) => (LIVE_CONTENT_KIND_IMAGE_FRAME, id.0),LiveContent::CompositedContext(id) => (LIVE_CONTENT_KIND_COMPOSITED_CONTEXT, id.0),LiveContent::Caret => (LIVE_CONTENT_KIND_CARET, 0),+ LiveContent::ScrollBar { scroll_node, vertical } => (+ LIVE_CONTENT_KIND_SCROLL_BAR,+ (u64::from(scroll_node.0) << 1) | u64::from(*vertical),+ ),};encoder.encode(&kind)?;encoder.encode(&id)@@ -214,6 +220,10 @@ impl Decode for LiveContent {LIVE_CONTENT_KIND_IMAGE_FRAME => LiveContent::ImageFrame(ImageFrameResourceId(id)),LIVE_CONTENT_KIND_COMPOSITED_CONTEXT => LiveContent::CompositedContext(CompositorContextId(id)),LIVE_CONTENT_KIND_CARET if id == 0 => LiveContent::Caret,+ LIVE_CONTENT_KIND_SCROLL_BAR if id >> 33 == 0 => LiveContent::ScrollBar {+ scroll_node: SpatialNodeIndex((id >> 1) as u32),+ vertical: id & 1 != 0,+ },_ => return Err(DecodeError::InvalidValue("LiveContent")),})}@@ -390,9 +400,8 @@ impl Decode for StackOnWire {// A stack of one layer that replays the whole list goes as why it is one layer. A stack of more layers goes as its// plan: its nodes without their identities, and its bands in the order of the walk that its layers are in, each with-// what only it knows of its layers. In that order, the layer of a canvas, video, nested context or caret comes right-// below the layer above its cut, and the last layer of a nested band comes right below the layer above the cut that-// enters it.+// what only it knows of its layers. In that order, the layer of live content comes right below the layer above its cut,+// and the last layer of a nested band comes right below the layer above the cut that enters it.impl Encode for LayerStack {fn encode(&self, encoder: &mut Encoder) -> Result<(), EncodeError> {if let Some(why_list_is_one_layer) = self.why_list_is_one_layer {@@ -418,7 +427,7 @@ impl Encode for LayerStack {match &self.layers[cut.layer_above_cut.0 - 1] {StackLayer {identity: LayerIdentity::Media { content, ordinal },- content: LayerContent::Media { record_span } | LayerContent::Caret { record_span },+ content: LayerContent::Media { record_span } | LayerContent::OwnSurface { record_span },reach,..} => {@@ -514,8 +523,7 @@ fn span_is_of_whole_runs(list: &DisplayListStorage, span: ListSpan) -> bool {span.begin <= span.end && position_starts_run(list, span.begin) && position_ends_run(list, span.end)}-// The span of a canvas, video, nested context or caret with a layer is one run of the list, which starts with a record-// that draws that content.+// The span of live content with a layer is one run of the list, which starts with a record that draws that content.fn span_is_run_drawing_content(list: &DisplayListStorage, span: ListSpan, content: LiveContent) -> bool {if matches!(content, LiveContent::ImageFrame(_)) {return false;@@ -738,12 +746,14 @@ fn check_bands(plan: &LayeredPlan, list: &DisplayListStorage) -> Result<(), &'st..} => {if !span_is_run_drawing_content(list, record_span, content) {- return Err("a canvas, video, nested context or caret is not a run of the list that draws it");+ return Err("live content is not a run of the list that draws it");}- if media_of_layers.len() == MAXIMUM_MEDIA_LAYER_COUNT {- return Err(- "the stack holds more canvas, video, nested context and caret layers than a plan makes",- );+ let layer_count_of_its_kind = media_of_layers+ .iter()+ .filter(|(_, earlier, _)| earlier.is_drawn_by_its_record() == content.is_drawn_by_its_record())+ .count();+ if layer_count_of_its_kind == maximum_layer_count_of_live_content_like(content) {+ return Err("the stack holds more layers of a kind of live content than a plan makes");}media_of_layers.push((record_span.begin, content, ordinal));}@@ -757,8 +767,8 @@ fn check_bands(plan: &LayeredPlan, list: &DisplayListStorage) -> Result<(), &'stcheck_ordinals_of_media(media_of_layers)}-// A plan numbers the drawings of a canvas, video, nested context or caret that have layers in paint order: each has as-// its ordinal how many of them with the same content are painted before it. The window server tells the media apart by+// A plan numbers the drawings of live content that have layers in paint order: each has as its ordinal how many of them+// with the same content are painted before it. The window server tells the media apart by// their ordinals.fn check_ordinals_of_media(mut media_of_layers: Vec<(ListPosition, LiveContent, u32)>) -> Result<(), &'static str> {media_of_layers.sort_unstable_by_key(|(position, _, _)| *position);@@ -768,16 +778,14 @@ fn check_ordinals_of_media(mut media_of_layers: Vec<(ListPosition, LiveContent,.filter(|(_, earlier_content, _)| earlier_content == content).count();if *ordinal as usize != count_of_same_content_painted_before {- return Err(- "a canvas, video, nested context or caret is not numbered by the drawings of it painted before it",- );+ return Err("live content is not numbered by the drawings of it painted before it");}}Ok(())}-// A plan puts each stretch of records into one band, or for a canvas, video, nested context or caret with a layer, into-// that layer, and a stretch holds at least one run. So no record is in two spans, and a stack holds no more spans than+// A plan puts each stretch of records into one band, or for live content with a layer, into that layer, and a stretch+// holds at least one run. So no record is in two spans, and a stack holds no more spans than// the list holds runs.fn check_no_record_is_held_twice(plan: &LayeredPlan) -> Result<(), &'static str> {let spans_of_media_layers = plan@@ -846,8 +854,8 @@ fn check_stack_of_plan(stack: &LayerStack) -> Result<(), &'static str> {/// without a bound. Each index names an item of the stack, the list or the tree, and each rect lies within twice the/// extent limit of a plan. The nodes, bands, cuts and spans nest and follow each other as a plan makes them, the spans/// are of whole runs, and no record is in two spans. So the stack holds no more spans than the list holds runs, no-/// more canvas, video, nested context and caret layers than a plan makes, and its nodes nest no deeper than its spaces-/// plus `MAXIMUM_NESTING_OF_COMPOSITED_EFFECTS`. The layers of a band are next to each other, so a frame that composites+/// more layers of each kind of live content than a plan makes, and its nodes nest no deeper than its spaces plus+/// `MAXIMUM_NESTING_OF_COMPOSITED_EFFECTS`. The layers of a band are next to each other, so a frame that composites/// the layers in order enters each composited band once. The base layer is never of a space whose anchor the/// compositor animates, and no two layers share an identity.///@@ -927,14 +935,14 @@ mod tests {use crate::display_list::layers::planning::{LayerStackInputs, PlannedLayers, plan_layer_stack};use crate::display_list::layers::{BandIndex, CutsOfCell, LARGEST_SUMMED_READ_REACH_OF_COMPOSITED_FILTERS_IN_DEVICE_PIXELS, LayerIndex,- MAXIMUM_NESTING_OF_COMPOSITED_EFFECTS, NodeNamesFromIndices, PlacementNodeBand, WhatWindowServerShowsOfFrame,- WhyFrameHoldsLayer, WindowServerCompositing, WindowServerPresentationOfMedia,+ MAXIMUM_MEDIA_LAYER_COUNT, MAXIMUM_NESTING_OF_COMPOSITED_EFFECTS, NodeNamesFromIndices, PlacementNodeBand,+ WhatWindowServerShowsOfFrame, WhyFrameHoldsLayer, WindowServerCompositing, WindowServerPresentationOfMedia,};use crate::display_list::placement::{RasterSpace, RasterSpaceGeometry, WhatEverySpaceOfTreeShares};use crate::display_list::test_fixtures::{GREEN, ListOfOneChunk, NO_FRAME_STATE, VIEWPORT, canvas, caret, chunk_of, effects, fill, frosted_glass,- opacity_animation_of, raster_settings_hash_by_layer, scroll_node, scroll_record, spinning, transform,- tree_with_document_scroller, tree_with_root_isolation_effect,+ opacity_animation_of, raster_settings_hash_by_layer, scroll_bar, scroll_node, scroll_record, spinning,+ transform, tree_with_document_scroller, tree_with_root_isolation_effect,};use crate::display_list::tile_keys::{TileKeyingOfList, TileKeyingOfRasterSpace};use crate::node_slot_id::NodeSlotId;@@ -1261,6 +1269,20 @@ mod tests {}}+ // A nested scroller with its vertical scroll bar.+ fn page_with_scroll_bar() -> Page {+ let (tree, _, contexts) = tree_with_document_scroller(&[IntRect::new(100, 100, 300, 200)]);+ let (document, nested) = (contexts[0], contexts[1]);+ let list = ListOfOneChunk::default()+ .with(fill(IntRect::new(0, 0, 800, 2600), GREEN), document)+ .with(fill(IntRect::new(100, 100, 300, 700), GREEN), nested)+ .with(scroll_bar(nested.spatial, IntRect::new(390, 100, 10, 200)), document);+ Page {+ tree,+ list: list.storage(),+ }+ }+// A spinner in a group scaled up eighty times, whose space a plan rasters at that scale.fn page_with_spinner_in_large_scale() -> Page {let (mut tree, viewport) = tree_with_root_isolation_effect(1.0);@@ -1326,6 +1348,7 @@ mod tests {("records that draw nothing", page_whose_records_draw_nothing()),("frosted glass", page_with_frosted_glass()),("carets", page_with_carets()),+ ("scroll bar", page_with_scroll_bar()),]}@@ -1445,6 +1468,19 @@ mod tests {ordinal,};assert_eq!(caret_layers, [(caret(0), true), (caret(1), false)]);+ let scroll_bar_layers: Vec<LayerIdentity> = stack_of(page_with_scroll_bar())+ .layers+ .iter()+ .filter(|layer| matches!(layer.content, LayerContent::OwnSurface { .. }))+ .map(|layer| layer.identity)+ .collect();+ assert!(matches!(+ scroll_bar_layers[..],+ [LayerIdentity::Media {+ content: LiveContent::ScrollBar { vertical: true, .. },+ ordinal: 0+ }]+ ));let crowded = stack_of(page_with_many_nested_scrollers());assert_eq!(kinds_of_anchors(&crowded)[2..], ["scroller"; 6]);let nested_scrollers_without_spaces = NESTED_SCROLLER_COUNT_OF_CROWDED_PAGE as usize - 6;@@ -2247,7 +2283,7 @@ mod tests {};let caret_layers: Vec<LayerIndex> = (0..stack.layers.len()).map(LayerIndex)- .filter(|layer| matches!(stack.layers[layer.0].content, LayerContent::Caret { .. }))+ .filter(|layer| matches!(stack.layers[layer.0].content, LayerContent::OwnSurface { .. })).collect();assert_eq!(caret_layers.len(), 2);let shown_by_window_server_that_shows_tiles =diff --git a/Libraries/LibCompositing/Rust/src/display_list/summary.rs b/Libraries/LibCompositing/Rust/src/display_list/summary.rsindex 186d5d8623a..fde115a6e06 100644--- a/Libraries/LibCompositing/Rust/src/display_list/summary.rs+++ b/Libraries/LibCompositing/Rust/src/display_list/summary.rs@@ -33,7 +33,7 @@ impl IndexedRecord {}}-/// Content that changes under the list's immutable commands.+/// Content that changes under the list's immutable commands. A record that draws it can be a layer of its own.#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]pub enum LiveContent {Canvas(CanvasId),@@ -42,6 +42,20 @@ pub enum LiveContent {CompositedContext(CompositorContextId),/// A caret, which blinks.Caret,+ /// The vertical or horizontal scroll bar of the scroller of `scroll_node`, which draws what the frame shows of the+ /// scroller.+ ScrollBar {+ scroll_node: SpatialNodeIndex,+ vertical: bool,+ },+}++impl LiveContent {+ /// Whether its record draws all of it, as that of a caret or a scroll bar does, rather than pixels from outside the+ /// list.+ pub fn is_drawn_by_its_record(self) -> bool {+ matches!(self, LiveContent::Caret | LiveContent::ScrollBar { .. })+ }}/// A top-level record that draws live content, itself or in a record nested in it.@@ -102,6 +116,13 @@ pub(crate) fn live_content_of(command_type: DisplayListCommandType, payload: &[uread_command::<DrawCompositedContext>(payload).child_context_id,)),T::PaintCaret => Some(LiveContent::Caret),+ T::PaintScrollBar => {+ let scroll_bar = read_command::<PaintScrollBar>(payload);+ Some(LiveContent::ScrollBar {+ scroll_node: scroll_bar.scroll_node_index,+ vertical: scroll_bar.vertical,+ })+ }_ => None,}}diff --git a/Libraries/LibCompositing/Rust/src/display_list/test_fixtures.rs b/Libraries/LibCompositing/Rust/src/display_list/test_fixtures.rsindex a9efdb422cf..b118955267c 100644--- a/Libraries/LibCompositing/Rust/src/display_list/test_fixtures.rs+++ b/Libraries/LibCompositing/Rust/src/display_list/test_fixtures.rs@@ -9,7 +9,8 @@use crate::display_list::builder::DisplayListBuilder;use crate::display_list::commands::{CanvasId, ClipNodeIndex, CompositorContextId, ContextRef, DisplayListCommand, DrawCanvas, EffectNodeIndex,- FillRect, ImageFrameResourceId, PaintCaret, SpatialNodeIndex, VISUAL_VIEWPORT_NODE_INDEX, VideoSinkHandle,+ FillRect, ImageFrameResourceId, PaintCaret, PaintScrollBar, SpatialNodeIndex, VISUAL_VIEWPORT_NODE_INDEX,+ VideoSinkHandle,};use crate::display_list::layers::LayerStack;use crate::display_list::layers::planning::{LayerStackInputs, PlannedLayers, plan_layer_stack};@@ -206,6 +207,22 @@ pub fn caret(rect: IntRect) -> PaintCaret {}}+/// The vertical scroll bar of the scroller of `scroll_node`, along the right edge of `track_rect`.+pub fn scroll_bar(scroll_node: SpatialNodeIndex, track_rect: IntRect) -> PaintScrollBar {+ PaintScrollBar {+ scroll_node_index: scroll_node,+ gutter_rect: track_rect,+ thumb_rect: IntRect::new(track_rect.x, track_rect.y, track_rect.width, track_rect.height / 4),+ track_rect,+ expanded_gutter_rect: track_rect,+ scroll_size: 1.0,+ thumb_color: Color::from_rgb(128, 128, 128),+ thumb_outline_color: Color::TRANSPARENT,+ track_color: Color::TRANSPARENT,+ vertical: true,+ }+}+pub fn frosted_glass(tree: &mut VisualContextTree, parent: ContextRef, region: IntRect) -> ContextRef {tree.append_effect_node_under(parent,diff --git a/Libraries/LibCompositing/Rust/src/display_list/tile_keys.rs b/Libraries/LibCompositing/Rust/src/display_list/tile_keys.rsindex 0d830022d2b..06ee4585f54 100644--- a/Libraries/LibCompositing/Rust/src/display_list/tile_keys.rs+++ b/Libraries/LibCompositing/Rust/src/display_list/tile_keys.rs@@ -278,8 +278,8 @@ fn version_of_live_content(live_content: &dyn LiveContentVersions, content: LiveLiveContent::CompositedContext(nested_context) => live_content.nested_context_frame_generation(nested_context).unwrap_or(u64::MAX),- // The blink phase of a caret is hashed from its record.- LiveContent::Caret => 0,+ // What a caret or a scroll bar shows in the frame is hashed from its record.+ LiveContent::Caret | LiveContent::ScrollBar { .. } => 0,}}@@ -1565,6 +1565,7 @@ impl<'a> TileKeyingOfRasterSpace<'a> {LiveContent::ImageFrame(_) => 3,LiveContent::CompositedContext(_) => 4,LiveContent::Caret => 5,+ LiveContent::ScrollBar { .. } => 6,});hasher.write_u64(version_of_live_content(frame_state.live_content, content));if matches!(content, LiveContent::CompositedContext(_)) {diff --git a/Services/Compositor/Rust/src/presenting/layers.rs b/Services/Compositor/Rust/src/presenting/layers.rsindex c9983d4bfa7..6d16b827878 100644--- a/Services/Compositor/Rust/src/presenting/layers.rs+++ b/Services/Compositor/Rust/src/presenting/layers.rs@@ -12,7 +12,7 @@ use super::layer_overlay::{PaintedLayerPresentation, RasterCountsByCause, layers_whose_names_are_shown,};use super::tiles::{- CaretPainting, LayerTiles, LayerToRaster, TileDraw, TileShownInFrame, joined_rects_of_grid_given_row_by_row,+ LayerTiles, LayerToRaster, OwnSurfacePainting, TileDraw, TileShownInFrame, joined_rects_of_grid_given_row_by_row,};use super::window_server::{WhyMediaIsReplayed, WindowServerLayers};use super::{@@ -1281,7 +1281,7 @@ impl ContextPresenting {for compositing in &compositing_of_layers {let layer_index = compositing.layer_index;let layer = &stack.layers[layer_index.0];- if let LayerContent::Media { record_span } | LayerContent::Caret { record_span } = &layer.content {+ if let LayerContent::Media { record_span } | LayerContent::OwnSurface { record_span } = &layer.content {let raster_space_index = stack.space_of_layer(layer_index);let media_replayed = MediaRecordsReplayedInFrame {content_hash: tile_keying_by_raster_space[raster_space_index.0]@@ -1415,7 +1415,7 @@ impl ContextPresenting {MediaPresentation::Replayed { why: why.to_string() }},},- LayerContent::Caret { .. } => ModelLayerContent::Media {+ LayerContent::OwnSurface { .. } => ModelLayerContent::Media {reach: layer.reach,presentation: if window_server_shows_layers && compositing.shown_by_window_server {MediaPresentation::ShownByWindowServer@@ -1710,9 +1710,9 @@ impl ContextPresenting {apply_raster_transform(raster, target, raster_scale, raster_translation);replay_with_scroll_offsets(env, target, frame, selection, &geometry.raster_scroll_offsets);};- if let LayerContent::Caret { record_span } = layer.content {+ if let LayerContent::OwnSurface { record_span } = layer.content {if layer_update.layers.window_server_shows_tiles_of(compositing) {- let painting = CaretPainting {+ let painting = OwnSurfacePainting {content_hash: layer_update.layers.media_replayed_by_identity[&compositing.identity].content_hash,rect: layer.reach,@@ -1722,7 +1722,7 @@ impl ContextPresenting {let painted =self.layers.tiles- .paint_caret_surface(env, like, compositing.identity, painting, |target| {+ .paint_own_surface(env, like, compositing.identity, painting, |target| {replay(target, Some(std::slice::from_ref(&record_span)));});layer_update.work_counts.tiles_rastered += u64::from(painted);@@ -1936,7 +1936,7 @@ impl ContextPresenting {compositing_session.enter_effect(effect);entered_composited_bands.push(band_index);}- if let LayerContent::Media { record_span } | LayerContent::Caret { record_span } = &layer.content {+ if let LayerContent::Media { record_span } | LayerContent::OwnSurface { record_span } = &layer.content {if !compositing.rect_in_frame(layer.reach, damage_grown_by_filter_reads).is_empty()diff --git a/Services/Compositor/Rust/src/presenting/tiles.rs b/Services/Compositor/Rust/src/presenting/tiles.rsindex 0d2630ba1f6..44f47b6bea4 100644--- a/Services/Compositor/Rust/src/presenting/tiles.rs+++ b/Services/Compositor/Rust/src/presenting/tiles.rs@@ -6,8 +6,8 @@//! The tiles the layers of a context hold, the pool of their pixels, and the surface tiles are rastered through. The//! pixels of a tile are pooled under the tile's content hash, which hashes all they depend on, so a layer finds the-//! tiles another layer or an earlier stack rastered. A window server that shows tiles shows each caret from a surface-//! of its own, painted anew each time the caret blinks or moves.+//! tiles another layer or an earlier stack rastered. A window server that shows tiles shows each caret and scroll bar+//! from a surface of its own, painted anew each time what it draws changes, as a caret blinks or a thumb moves.use super::layer_overlay::{ModelTile, RasterCause};use super::layers::LayerCompositingInFrame;@@ -179,19 +179,19 @@ pub(super) struct RasteredLayer {pub(super) tile_count: u64,}-/// What the surface of a caret holds: what the caret's records draw, rastered into `rect` of the layer's space under-/// the raster transform of the frame.+/// What the surface of a caret or a scroll bar holds: what its records draw, rastered into `rect` of the layer's space+/// under the raster transform of the frame.#[derive(Clone, Copy, PartialEq)]-pub(super) struct CaretPainting {+pub(super) struct OwnSurfacePainting {pub(super) content_hash: ContentHash,pub(super) rect: IntRect,pub(super) raster_scale: FloatSize,pub(super) raster_translation: FloatPoint,}-struct CaretSurface {+struct HeldOwnSurface {surface: Rc<PresentableSurface>,- painting: CaretPainting,+ painting: OwnSurfacePainting,}/// The tiles the layers of a context hold under the identities of the layers, and the pool of their pixels.@@ -199,8 +199,8 @@ struct CaretSurface {pub(super) struct LayerTiles {held_by_layer: HashMap<LayerIdentity, HeldTiles>,pool: TilePool,- /// The surface a window server that shows tiles shows each caret from.- caret_surface_by_layer: HashMap<LayerIdentity, CaretSurface>,+ /// The surface a window server that shows tiles shows each caret and scroll bar from.+ own_surface_by_layer: HashMap<LayerIdentity, HeldOwnSurface>,/// Whether a layer took or let go of tiles, or the pixels of pooled tiles changed, since spare tiles were last/// evicted.changed_since_eviction: bool,@@ -211,7 +211,7 @@ pub(super) struct LayerTiles {impl LayerTiles {pub(super) fn invalidate_every_tile(&mut self) {self.changed_since_eviction = true;- self.caret_surface_by_layer.clear();+ self.own_surface_by_layer.clear();for tile in self.pool.values_mut() {tile.holds_current_pixels = false;}@@ -419,30 +419,31 @@ impl LayerTiles {let layer_count_before = self.held_by_layer.len();self.held_by_layer.retain(|identity, _| identities.contains(identity));self.changed_since_eviction |= self.held_by_layer.len() != layer_count_before;- self.caret_surface_by_layer+ self.own_surface_by_layer.retain(|identity, _| identities.contains(identity));}- /// Keeps the surface that the window server shows the caret of the layer of `identity` from, and paints `painting`- /// into it with `paint` where it holds something else, as each time the caret blinks or moves. Nothing is painted- /// into a surface the window server shows or still reads, so the caret takes a spare surface and spares the one it- /// held. Answers whether it painted. Where no surface can be had, the window server shows no caret.- pub(super) fn paint_caret_surface(+ /// Keeps the surface that the window server shows the caret or scroll bar of the layer of `identity` from, and+ /// paints `painting` into it with `paint` where it holds something else, as each time a caret blinks or a thumb+ /// moves. Nothing is painted into a surface the window server shows or still reads, so the layer takes a spare+ /// surface and spares the one it held. Answers whether it painted. Where no surface can be had, the window server+ /// shows nothing of the layer.+ pub(super) fn paint_own_surface(&mut self,env: &PresentingEnvironment<'_>,like: &Rc<PaintingSurface>,identity: LayerIdentity,- painting: CaretPainting,+ painting: OwnSurfacePainting,paint: impl FnOnce(&Rc<PaintingSurface>),) -> bool {if self- .caret_surface_by_layer+ .own_surface_by_layer.get(&identity).is_some_and(|held| held.painting == painting){return false;}- if let Some(left) = self.caret_surface_by_layer.remove(&identity) {+ if let Some(left) = self.own_surface_by_layer.remove(&identity) {self.spare_surfaces.keep(left.surface, size_of(left.painting.rect), env.now);self.changed_since_eviction = true;@@ -465,15 +466,15 @@ impl LayerTiles {raster.clear(target, Color::TRANSPARENT);paint(target);raster.restore_to_count(target, save_count);- self.caret_surface_by_layer- .insert(identity, CaretSurface { surface, painting });+ self.own_surface_by_layer+ .insert(identity, HeldOwnSurface { surface, painting });true}- /// The surface the window server shows the caret of the layer of `identity` from, and where it lies in the layer's- /// space.- pub(super) fn caret_surface_of(&self, identity: &LayerIdentity) -> Option<(&Rc<PresentableSurface>, IntRect)> {- let held = self.caret_surface_by_layer.get(identity)?;+ /// The surface the window server shows the caret or scroll bar of the layer of `identity` from, and where it lies in+ /// the layer's space.+ pub(super) fn own_surface_of(&self, identity: &LayerIdentity) -> Option<(&Rc<PresentableSurface>, IntRect)> {+ let held = self.own_surface_by_layer.get(identity)?;Some((&held.surface, held.painting.rect))}diff --git a/Services/Compositor/Rust/src/presenting/window_server.rs b/Services/Compositor/Rust/src/presenting/window_server.rsindex c84cc1dcf0b..5308fc33a66 100644--- a/Services/Compositor/Rust/src/presenting/window_server.rs+++ b/Services/Compositor/Rust/src/presenting/window_server.rs@@ -131,7 +131,6 @@ impl std::fmt::Display for WhyMediaIsReplayed {WhyMediaIsReplayed::NoPlacement(LiveMedia::CompositedContext(_)) => {"the window server does not show nested contexts"}- WhyMediaIsReplayed::NoPlacement(LiveMedia::Caret) => "the window server does not show carets",WhyMediaIsReplayed::NoPlacement(_) => "where the window server would show it is not worked out",WhyMediaIsReplayed::CanvasHasNoPresentableSurface => "the canvas has no surface the window server can show",WhyMediaIsReplayed::VideoHasNoFrame => "the video has no frame",@@ -299,7 +298,10 @@ impl ContextPresenting {}(MediaKind::Video, id.0)}- LiveMedia::ImageFrame(_) | LiveMedia::CompositedContext(_) | LiveMedia::Caret => {+ LiveMedia::ImageFrame(_)+ | LiveMedia::CompositedContext(_)+ | LiveMedia::Caret+ | LiveMedia::ScrollBar { .. } => {return Some(WhyMediaIsReplayed::NoPlacement(*content));}};@@ -714,7 +716,10 @@ impl ContextPresenting {.get(&id.0).is_some_and(|sink| sink.has_frame && sink.frame_has_surface),),- LiveMedia::ImageFrame(_) | LiveMedia::CompositedContext(_) | LiveMedia::Caret => continue,+ LiveMedia::ImageFrame(_)+ | LiveMedia::CompositedContext(_)+ | LiveMedia::Caret+ | LiveMedia::ScrollBar { .. } => continue,};if !has_content {continue;@@ -731,9 +736,8 @@ impl ContextPresenting {});continue;}- if let LayerContent::Caret { .. } = layer.content {- if let Some((surface, rect_in_layer_space)) = self.layers.tiles.caret_surface_of(&compositing.identity)- {+ if let LayerContent::OwnSurface { .. } = layer.content {+ if let Some((surface, rect_in_layer_space)) = self.layers.tiles.own_surface_of(&compositing.identity) {let draw = TileDraw::TileSurface {coord: TileCoord::new(0, 0),surface,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.txtindex 39f70404d41..33e3c2ccece 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@@ -38,6 +38,8 @@ ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[0,0Layers (for a window server that shows tiles and filters what is below layers):[L0] base space=viewport+ [L1] vertical scroll bar #0 space=viewport region=[182,0 21x203]+ [L3] horizontal scroll bar #0 space=viewport region=[0,182 188x21]DisplayList:L0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata@@ -48,7 +50,7 @@ L0 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 1L0 CompositorBlockingWheelEventRegion@s2/c0/e0 rect=[0,0 100x100] owner=BlockContainer<DIV>#target phase=scroll-metadataL0 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,100 1000x1000] owner=BlockContainer<DIV>#spacer phase=scroll-metadataL0 CompositorScrollbar@s1/e0 scroll_node_index=s2 thumb_rect=[191,2 7x36] track_rect=[191,0 9x200] expanded_gutter_rect=[185,0 15x200] expanded_thumb_rect=[187,2 11x36] scroll_size=0.17819444444444443 expanded_scroll_size=0.17819444444444443 max_scroll_offset=900 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 owner=BlockContainer<DIV>#scroller phase=overlay-L0 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[191,2 7x36] track_rect=[191,0 9x200] expanded_gutter_rect=[185,0 15x200] scroll_size=0.17819444444444443 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 owner=BlockContainer<DIV>#scroller phase=overlay+L1 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[191,2 7x36] track_rect=[191,0 9x200] expanded_gutter_rect=[185,0 15x200] scroll_size=0.17819444444444443 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 owner=BlockContainer<DIV>#scroller phase=overlayL0 CompositorScrollbar@s1/e0 scroll_node_index=s2 thumb_rect=[2,191 36x7] track_rect=[0,191 185x9] expanded_gutter_rect=[0,185 185x15] expanded_thumb_rect=[2,187 36x11] scroll_size=0.181015625 expanded_scroll_size=0.181015625 max_scroll_offset=800 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) owner=BlockContainer<DIV>#scroller phase=overlay-L0 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[2,191 36x7] track_rect=[0,191 185x9] expanded_gutter_rect=[0,185 185x15] scroll_size=0.181015625 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) owner=BlockContainer<DIV>#scroller phase=overlay+L3 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[2,191 36x7] track_rect=[0,191 185x9] expanded_gutter_rect=[0,185 185x15] scroll_size=0.181015625 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) owner=BlockContainer<DIV>#scroller phase=overlaydiff --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.txtindex ef4f53f8521..c7d5969049d 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@@ -16,15 +16,16 @@ ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0ScrollNode 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=falseLayers (for a window server that shows tiles and filters what is below layers):- [L1] base space=document+ [L0] base space=viewport+ [L2] vertical scroll bar #0 space=document region=[82,0 21x103]DisplayList:-L1 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s1 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2113] owner=BlockContainer<HTML> phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2100] owner=BlockContainer<BODY> phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[0,0 100x100] owner=BlockContainer<DIV>#scroller phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 100x500] owner=BlockContainer<DIV>#spacer phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,100 800x2000] owner=BlockContainer<DIV>#page-spacer phase=scroll-metadata-L1 CompositorScrollbar@s1/e0 scroll_node_index=s2 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 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 owner=BlockContainer<DIV>#scroller phase=overlay-L1 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[91,2 7x24] track_rect=[91,0 9x100] expanded_gutter_rect=[85,0 15x100] scroll_size=0.18 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 owner=BlockContainer<DIV>#scroller phase=overlay+L0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s1 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2113] owner=BlockContainer<HTML> phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2100] owner=BlockContainer<BODY> phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[0,0 100x100] owner=BlockContainer<DIV>#scroller phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 100x500] owner=BlockContainer<DIV>#spacer phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,100 800x2000] owner=BlockContainer<DIV>#page-spacer phase=scroll-metadata+L0 CompositorScrollbar@s1/e0 scroll_node_index=s2 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 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 owner=BlockContainer<DIV>#scroller phase=overlay+L2 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[91,2 7x24] track_rect=[91,0 9x100] expanded_gutter_rect=[85,0 15x100] scroll_size=0.18 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 owner=BlockContainer<DIV>#scroller phase=overlaydiff --git a/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-parent-nodes.txt b/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-parent-nodes.txtindex 3331036b8fe..6c7229ce718 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@@ -20,7 +20,8 @@ ScrollNode scroll_node_index=s3 parent_scroll_node_index=s1 scrollport_rect=[0,0Layers (for a window server that shows tiles and filters what is below layers):[L0] base space=viewport- [L2] painted space=sticky@s2 in document+ [L3] vertical scroll bar #0 space=sticky@s2 in document region=[82,-3 21x106]+ [L5] horizontal scroll bar #0 space=sticky@s2 in document region=[-1,82 89x21]DisplayList:L0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s1 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata@@ -31,7 +32,7 @@ L0 CompositorWheelHitTestTarget@s2/e0 target_scroll_node_index=s1 rect=[0,0 800xL0 CompositorWheelHitTestTarget@s2/e0 target_scroll_node_index=s3 rect=[0,0 100x100] owner=BlockContainer<DIV>#scroller phase=scroll-metadataL0 CompositorWheelHitTestTarget@s3/c0/e0 target_scroll_node_index=s3 rect=[0,0 500x500] owner=BlockContainer<DIV>#spacer phase=scroll-metadataL0 CompositorScrollbar@s2/e0 scroll_node_index=s3 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 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 owner=BlockContainer<DIV>#scroller phase=overlay-L2 PaintScrollBar@s2/e0 scroll_node_index=s3 thumb_rect=[91,2 7x24] track_rect=[91,0 9x100] expanded_gutter_rect=[85,0 15x100] scroll_size=0.18 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 owner=BlockContainer<DIV>#scroller phase=overlay+L3 PaintScrollBar@s2/e0 scroll_node_index=s3 thumb_rect=[91,2 7x24] track_rect=[91,0 9x100] expanded_gutter_rect=[85,0 15x100] scroll_size=0.18 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 owner=BlockContainer<DIV>#scroller phase=overlayL0 CompositorScrollbar@s2/e0 scroll_node_index=s3 thumb_rect=[2,91 24x7] track_rect=[0,91 85x9] expanded_gutter_rect=[0,85 85x15] expanded_thumb_rect=[2,87 24x11] scroll_size=0.1425 expanded_scroll_size=0.1425 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) owner=BlockContainer<DIV>#scroller phase=overlay-L2 PaintScrollBar@s2/e0 scroll_node_index=s3 thumb_rect=[2,91 24x7] track_rect=[0,91 85x9] expanded_gutter_rect=[0,85 85x15] scroll_size=0.1425 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) owner=BlockContainer<DIV>#scroller phase=overlay+L5 PaintScrollBar@s2/e0 scroll_node_index=s3 thumb_rect=[2,91 24x7] track_rect=[0,91 85x9] expanded_gutter_rect=[0,85 85x15] scroll_size=0.1425 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) owner=BlockContainer<DIV>#scroller phase=overlaydiff --git a/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txt b/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txtindex 664ede8a461..21416a57679 100644--- a/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txt+++ b/Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txt@@ -20,17 +20,19 @@ ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0ScrollNode 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=falseLayers (for a window server that shows tiles and filters what is below layers):- [L1] base space=document+ [L0] base space=viewport+ [L2] vertical scroll bar #0 space=document region=[82,0 21x103]+ [L4] horizontal scroll bar #0 space=document region=[0,82 88x21]DisplayList:-L1 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s1 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2113] owner=BlockContainer<HTML> phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2100] owner=BlockContainer<BODY> phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[0,0 100x100] owner=BlockContainer<DIV>#scroller phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 500x500] owner=BlockContainer<DIV>#spacer phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,100 800x2000] owner=BlockContainer<DIV> phase=scroll-metadata-L1 CompositorScrollbar@s1/e0 scroll_node_index=s2 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 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 owner=BlockContainer<DIV>#scroller phase=overlay-L1 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[91,2 7x24] track_rect=[91,0 9x100] expanded_gutter_rect=[85,0 15x100] scroll_size=0.18 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 owner=BlockContainer<DIV>#scroller phase=overlay-L1 CompositorScrollbar@s1/e0 scroll_node_index=s2 thumb_rect=[2,91 24x7] track_rect=[0,91 85x9] expanded_gutter_rect=[0,85 85x15] expanded_thumb_rect=[2,87 24x11] scroll_size=0.1425 expanded_scroll_size=0.1425 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) owner=BlockContainer<DIV>#scroller phase=overlay-L1 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[2,91 24x7] track_rect=[0,91 85x9] expanded_gutter_rect=[0,85 85x15] scroll_size=0.1425 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) owner=BlockContainer<DIV>#scroller phase=overlay+L0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s1 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2113] owner=BlockContainer<HTML> phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2100] owner=BlockContainer<BODY> phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[0,0 100x100] owner=BlockContainer<DIV>#scroller phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 500x500] owner=BlockContainer<DIV>#spacer phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,100 800x2000] owner=BlockContainer<DIV> phase=scroll-metadata+L0 CompositorScrollbar@s1/e0 scroll_node_index=s2 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 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 owner=BlockContainer<DIV>#scroller phase=overlay+L2 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[91,2 7x24] track_rect=[91,0 9x100] expanded_gutter_rect=[85,0 15x100] scroll_size=0.18 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 owner=BlockContainer<DIV>#scroller phase=overlay+L0 CompositorScrollbar@s1/e0 scroll_node_index=s2 thumb_rect=[2,91 24x7] track_rect=[0,91 85x9] expanded_gutter_rect=[0,85 85x15] expanded_thumb_rect=[2,87 24x11] scroll_size=0.1425 expanded_scroll_size=0.1425 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) owner=BlockContainer<DIV>#scroller phase=overlay+L4 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[2,91 24x7] track_rect=[0,91 85x9] expanded_gutter_rect=[0,85 85x15] scroll_size=0.1425 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) owner=BlockContainer<DIV>#scroller phase=overlaydiff --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.txtindex a6156d1022c..5f8d01a24da 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@@ -18,15 +18,16 @@ ScrollNode scroll_node_index=s1 parent_scroll_node_index=s0 scrollport_rect=[0,0ScrollNode 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=falseLayers (for a window server that shows tiles and filters what is below layers):- [L1] base space=document+ [L0] base space=viewport+ [L2] vertical scroll bar #0 space=document region=[82,0 21x103]DisplayList:-L1 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s1 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2113] owner=BlockContainer<HTML> phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2100] owner=BlockContainer<BODY> phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[0,0 100x100] owner=BlockContainer<DIV>#scroller phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 100x500] owner=BlockContainer<DIV>#scroller-spacer phase=scroll-metadata-L1 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,100 800x2000] owner=BlockContainer<DIV>#page-spacer phase=scroll-metadata-L1 CompositorScrollbar@s1/e0 scroll_node_index=s2 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 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 owner=BlockContainer<DIV>#scroller phase=overlay-L1 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[91,2 7x24] track_rect=[91,0 9x100] expanded_gutter_rect=[85,0 15x100] scroll_size=0.18 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 owner=BlockContainer<DIV>#scroller phase=overlay+L0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s1 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2113] owner=BlockContainer<HTML> phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,0 800x2100] owner=BlockContainer<BODY> phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s2 rect=[0,0 100x100] owner=BlockContainer<DIV>#scroller phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 100x500] owner=BlockContainer<DIV>#scroller-spacer phase=scroll-metadata+L0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s1 rect=[0,100 800x2000] owner=BlockContainer<DIV>#page-spacer phase=scroll-metadata+L0 CompositorScrollbar@s1/e0 scroll_node_index=s2 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 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 owner=BlockContainer<DIV>#scroller phase=overlay+L2 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[91,2 7x24] track_rect=[91,0 9x100] expanded_gutter_rect=[85,0 15x100] scroll_size=0.18 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 owner=BlockContainer<DIV>#scroller phase=overlaydiff --git a/Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txt b/Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txtindex 0d53e7d3fda..94038bfc3a6 100644--- a/Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txt+++ b/Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txt@@ -25,6 +25,8 @@ ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[0,0Layers (for a window server that shows tiles and filters what is below layers):[L0] base space=viewport+ [L1] vertical scroll bar #0 space=viewport region=[182,0 21x203]+ [L3] horizontal scroll bar #0 space=viewport region=[0,182 188x21]DisplayList:L0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata@@ -35,8 +37,8 @@ L0 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,0 1L0 CompositorBlockingWheelEventRegion@s2/c0/e0 rect=[0,0 100x100] owner=BlockContainer<DIV>#target phase=scroll-metadataL0 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[0,100 1000x1000] owner=BlockContainer<DIV>#spacer phase=scroll-metadataL0 CompositorScrollbar@s1/e0 scroll_node_index=s2 thumb_rect=[191,2 7x36] track_rect=[191,0 9x200] expanded_gutter_rect=[185,0 15x200] expanded_thumb_rect=[187,2 11x36] scroll_size=0.17819444444444443 expanded_scroll_size=0.17819444444444443 max_scroll_offset=900 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 owner=BlockContainer<DIV>#scroller phase=overlay-L0 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[191,2 7x36] track_rect=[191,0 9x200] expanded_gutter_rect=[185,0 15x200] scroll_size=0.17819444444444443 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 owner=BlockContainer<DIV>#scroller phase=overlay+L1 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[191,2 7x36] track_rect=[191,0 9x200] expanded_gutter_rect=[185,0 15x200] scroll_size=0.17819444444444443 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 owner=BlockContainer<DIV>#scroller phase=overlayL0 CompositorScrollbar@s1/e0 scroll_node_index=s2 thumb_rect=[2,191 36x7] track_rect=[0,191 185x9] expanded_gutter_rect=[0,185 185x15] expanded_thumb_rect=[2,187 36x11] scroll_size=0.181015625 expanded_scroll_size=0.181015625 max_scroll_offset=800 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) owner=BlockContainer<DIV>#scroller phase=overlay-L0 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[2,191 36x7] track_rect=[0,191 185x9] expanded_gutter_rect=[0,185 185x15] scroll_size=0.181015625 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) owner=BlockContainer<DIV>#scroller phase=overlay+L3 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[2,191 36x7] track_rect=[0,191 185x9] expanded_gutter_rect=[0,185 185x15] scroll_size=0.181015625 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) owner=BlockContainer<DIV>#scroller phase=overlayL0 CompositorWheelHitTestTarget@s1/e0 target_scroll_node_index=s0 rect=[250,0 100x100] owner=BlockContainer<DIV>#not-scrollable phase=scroll-metadatadiff --git a/Tests/LibWeb/Text/expected/display_list/compositing-layers-backdrop-filter-without-window-server-equivalent.txt b/Tests/LibWeb/Text/expected/display_list/compositing-layers-backdrop-filter-without-window-server-equivalent.txtindex 51a09d52b0f..939c160a518 100644--- a/Tests/LibWeb/Text/expected/display_list/compositing-layers-backdrop-filter-without-window-server-equivalent.txt+++ b/Tests/LibWeb/Text/expected/display_list/compositing-layers-backdrop-filter-without-window-server-equivalent.txt@@ -16,7 +16,7 @@ ScrollNode scroll_node_index=s2 parent_scroll_node_index=s1 scrollport_rect=[20,Layers (for a window server that shows tiles and filters what is below layers):[L1] base space=document held by the frame: it is under a layer the frame holds[L2] painted space=scroller@s2 in document composited within [20,20 200x100] of document held by the frame: it is under a layer the frame holds- [L3] painted space=document above band 0 of scroller@s2 in document held by the frame: it is under a layer the frame holds- [L5] painted space=viewport inside e1 held by the frame: it is inside an effect the compositor composites+ [L4] vertical scroll bar #0 space=document region=[202,17 21x106] held by the frame: it is under a layer the frame holds+ [L7] painted space=viewport inside e1 held by the frame: it is inside an effect the compositor compositescomposited e1 space=viewport reads=[65,5 270x110]: its backdrop filter reads past the edge of the frame, composited by the compositor: its backdrop filter has a function the window server has no equivalent ofdiff --git a/Tests/LibWeb/Text/expected/display_list/compositing-layers-effect-out-of-view-holds-no-layer-in-frame.txt b/Tests/LibWeb/Text/expected/display_list/compositing-layers-effect-out-of-view-holds-no-layer-in-frame.txtindex 94ae0e1a6f9..839a6e7f598 100644--- a/Tests/LibWeb/Text/expected/display_list/compositing-layers-effect-out-of-view-holds-no-layer-in-frame.txt+++ b/Tests/LibWeb/Text/expected/display_list/compositing-layers-effect-out-of-view-holds-no-layer-in-frame.txt@@ -3,8 +3,9 @@ Layers (for a window server that shows tiles and filters what is below layers):[L1] base space=document[L2] painted space=scroller@s2 in document composited within [20,20 200x100] of document[L3] painted space=document above band 0 of scroller@s2 in document- [L4] canvas #0 space=document region=[17,1497 206x126] can be shown by the window server: clip=[0,0 800x600]- [L6] painted space=document inside e1+ [L4] vertical scroll bar #0 space=document region=[202,17 21x106]+ [L6] canvas #0 space=document region=[17,1497 206x126] can be shown by the window server: clip=[0,0 800x600]+ [L8] painted space=document inside e1composited e1 space=document reads=[57,1537 106x46]: it reads what its own layer does not hold, composited by the compositor: it blends with what is below itWith the blending box in the viewport:@@ -12,7 +13,8 @@ Layers (for a window server that shows tiles and filters what is below layers):[L1] base space=document held by the frame: it is under a layer the frame holds[L2] painted space=scroller@s2 in document composited within [20,20 200x100] of document held by the frame: it is under a layer the frame holds[L3] painted space=document above band 0 of scroller@s2 in document held by the frame: it is under a layer the frame holds- [L4] canvas #0 space=document region=[17,1497 206x126] replayed: under a layer the frame holds- [L6] painted space=document inside e1 held by the frame: it is inside an effect the compositor composites+ [L4] vertical scroll bar #0 space=document region=[202,17 21x106] held by the frame: it is under a layer the frame holds+ [L6] canvas #0 space=document region=[17,1497 206x126] replayed: under a layer the frame holds+ [L8] painted space=document inside e1 held by the frame: it is inside an effect the compositor compositescomposited e1 space=document reads=[57,1537 106x46]: it reads what its own layer does not hold, composited by the compositor: it blends with what is below itdiff --git a/Tests/LibWeb/Text/expected/display_list/compositing-layers-frosted-sticky-header.txt b/Tests/LibWeb/Text/expected/display_list/compositing-layers-frosted-sticky-header.txtindex ac8f51290ff..88b4b7411a7 100644--- a/Tests/LibWeb/Text/expected/display_list/compositing-layers-frosted-sticky-header.txt+++ b/Tests/LibWeb/Text/expected/display_list/compositing-layers-frosted-sticky-header.txt@@ -17,7 +17,7 @@ ScrollNode scroll_node_index=s2 parent_scroll_node_index=s1 scrollport_rect=[20,Layers (for a window server that shows tiles and filters what is below layers):[L1] base space=document[L2] painted space=scroller@s2 in document composited within [20,60 200x100] radii=(12,12,12,12) of document- [L3] painted space=document above band 0 of scroller@s2 in document- [L5] painted space=sticky@s3 in document inside e1+ [L4] vertical scroll bar #0 space=document region=[202,57 21x106]+ [L7] painted space=sticky@s3 in document inside e1composited e1 space=sticky@s3 in document reads=[-51,-51 902x142]: it reads what its own layer does not hold, can be composited by the window serverdiff --git a/Tests/LibWeb/Text/expected/display_list/compositing-layers-rounded-canvas-in-rounded-scroller.txt b/Tests/LibWeb/Text/expected/display_list/compositing-layers-rounded-canvas-in-rounded-scroller.txtindex 61b2ecc1aec..06d9736e319 100644--- a/Tests/LibWeb/Text/expected/display_list/compositing-layers-rounded-canvas-in-rounded-scroller.txt+++ b/Tests/LibWeb/Text/expected/display_list/compositing-layers-rounded-canvas-in-rounded-scroller.txt@@ -14,7 +14,8 @@ ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[20,Layers (for a window server that shows tiles and filters what is below layers):[L0] base space=viewport held by the frame: it is under a layer the frame holds[L2] canvas #0 space=scroller@s2 in viewport region=[20,20 200x123] composited within [20,20 180x100] radii=(20,20,20,20) of viewport replayed: more than one rounded clip- [L4] painted space=viewport above band 0 of scroller@s2 in viewport+ [L5] vertical scroll bar #0 space=viewport region=[182,17 21x106]+ [L7] horizontal scroll bar #0 space=viewport region=[17,102 171x21]DisplayList:L0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata@@ -24,7 +25,7 @@ L0 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[20,14L0 CompositorWheelHitTestTargetWithCornerRadii@s2/c0/e0 target_scroll_node_index=s2 rect=[20,20 200x120] corner_radii=[8x8,8x8,8x8,8x8] owner=CanvasBox<CANVAS>#canvas phase=scroll-metadataL2 DrawCanvas@s2/c0/e0 dst_rect=[20,20 200x120] canvas_id=canvas1 scaling_mode=Bilinear inline_clips=[clip=[20,20 200x120] radii=(8,8,8,8)] owner=CanvasBox<CANVAS>#canvas phase=foregroundL0 CompositorScrollbar@s1/e0 scroll_node_index=s2 thumb_rect=[191,22 7x24] track_rect=[191,20 9x100] expanded_gutter_rect=[185,20 15x100] expanded_thumb_rect=[187,22 11x24] scroll_size=0.225 expanded_scroll_size=0.225 max_scroll_offset=320 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 owner=BlockContainer<DIV>#scroller phase=overlay-L4 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[191,22 7x24] track_rect=[191,20 9x100] expanded_gutter_rect=[185,20 15x100] scroll_size=0.225 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 owner=BlockContainer<DIV>#scroller phase=overlay+L5 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[191,22 7x24] track_rect=[191,20 9x100] expanded_gutter_rect=[185,20 15x100] scroll_size=0.225 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 owner=BlockContainer<DIV>#scroller phase=overlayL0 CompositorScrollbar@s1/e0 scroll_node_index=s2 thumb_rect=[22,111 145x7] track_rect=[20,111 165x9] expanded_gutter_rect=[20,105 165x15] expanded_thumb_rect=[22,107 145x11] scroll_size=0.80546875 expanded_scroll_size=0.80546875 max_scroll_offset=20 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) owner=BlockContainer<DIV>#scroller phase=overlay-L4 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[22,111 145x7] track_rect=[20,111 165x9] expanded_gutter_rect=[20,105 165x15] scroll_size=0.80546875 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) owner=BlockContainer<DIV>#scroller phase=overlay+L7 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[22,111 145x7] track_rect=[20,111 165x9] expanded_gutter_rect=[20,105 165x15] scroll_size=0.80546875 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) owner=BlockContainer<DIV>#scroller phase=overlaydiff --git a/Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txt b/Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txtindex f51eb257b8b..10211730b1a 100644--- a/Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txt+++ b/Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txt@@ -18,8 +18,8 @@ Layers (for a window server that shows tiles and filters what is below layers):[L0] base space=viewport[L1] painted space=scroller@s2 in viewport composited within [10,10 200x150] of viewport[L2] painted space=scroller@s3 in scroller@s2 in viewport composited within [10,10 200x150] of viewport composited within [11,11 300x100] of scroller@s2 in viewport- [L3] painted space=scroller@s2 in viewport above band 0 of scroller@s3 in scroller@s2 in viewport composited within [10,10 200x150] of viewport- [L4] painted space=viewport above band 0 of scroller@s2 in viewport+ [L4] horizontal scroll bar #0 space=scroller@s2 in viewport region=[10,93 302x21] composited within [10,10 200x150] of viewport+ [L7] horizontal scroll bar #0 space=viewport region=[7,142 206x21]DisplayList:L0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata@@ -34,7 +34,7 @@ L0 CompositorWheelHitTestTarget@s3/c1/e0 target_scroll_node_index=s3 rect=[11,11L2 FillRect@s3/c1/e0 rect=[11,11 400x80] color=rgb(240, 128, 128) owner=BlockContainer<DIV>.content phase=backgroundL2 DrawGlyphRun@s3/c1/e0 font_id=font1 glyphs=21 rect=[11,11 178x16] glyph_bounding_rect=[11,12 184x15] translation=[11,24] color=rgb(0, 0, 0) text="Deeply nested content" owner=BlockContainer<DIV>.content phase=foregroundL0 CompositorScrollbar@s2/c0/e0 scroll_node_index=s3 thumb_rect=[13,102 222x7] track_rect=[11,102 300x9] expanded_gutter_rect=[11,96 300x15] expanded_thumb_rect=[13,98 222x11] scroll_size=0.74 expanded_scroll_size=0.74 max_scroll_offset=100 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) owner=BlockContainer<DIV>.inner-scroll phase=overlay-L3 PaintScrollBar@s2/c0/e0 scroll_node_index=s3 thumb_rect=[13,102 222x7] track_rect=[11,102 300x9] expanded_gutter_rect=[11,96 300x15] scroll_size=0.74 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) owner=BlockContainer<DIV>.inner-scroll phase=overlay+L4 PaintScrollBar@s2/c0/e0 scroll_node_index=s3 thumb_rect=[13,102 222x7] track_rect=[11,102 300x9] expanded_gutter_rect=[11,96 300x15] scroll_size=0.74 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) owner=BlockContainer<DIV>.inner-scroll phase=overlayL0 CompositorScrollbar@s1/e0 scroll_node_index=s2 thumb_rect=[12,151 130x7] track_rect=[10,151 200x9] expanded_gutter_rect=[10,145 200x15] expanded_thumb_rect=[12,147 130x11] scroll_size=0.6490502450980392 expanded_scroll_size=0.6490502450980392 max_scroll_offset=102 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) owner=BlockContainer<DIV>.outer-scroll phase=overlay-L4 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[12,151 130x7] track_rect=[10,151 200x9] expanded_gutter_rect=[10,145 200x15] scroll_size=0.6490502450980392 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) owner=BlockContainer<DIV>.outer-scroll phase=overlay+L7 PaintScrollBar@s1/e0 scroll_node_index=s2 thumb_rect=[12,151 130x7] track_rect=[10,151 200x9] expanded_gutter_rect=[10,145 200x15] scroll_size=0.6490502450980392 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) owner=BlockContainer<DIV>.outer-scroll phase=overlaydiff --git a/Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txt b/Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txtindex 6f296860efb..88cd5ebaf4c 100644--- a/Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txt+++ b/Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txt@@ -14,7 +14,8 @@ ScrollNode scroll_node_index=s2 parent_scroll_node_index=s0 scrollport_rect=[33,Layers (for a window server that shows tiles and filters what is below layers):[L0] base space=viewport[L1] painted space=scroller@s2 in viewport composited within [33,33 180x100] of viewport- [L2] painted space=viewport above band 0 of scroller@s2 in viewport+ [L3] vertical scroll bar #0 space=viewport region=[195,30 21x106]+ [L5] horizontal scroll bar #0 space=viewport region=[30,115 171x21]DisplayList:L0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata@@ -28,7 +29,7 @@ L0 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[33,33L1 FillRect@s2/c0/e0 rect=[33,33 300x200] color=rgb(240, 128, 128) owner=BlockContainer<DIV>.scroll-content phase=backgroundL1 DrawGlyphRun@s2/c0/e0 font_id=font1 glyphs=23 rect=[33,33 179x16] glyph_bounding_rect=[33,34 184x15] translation=[33,46] color=rgb(0, 0, 0) text="Scrollable inside fixed" owner=BlockContainer<DIV>.scroll-content phase=foregroundL0 CompositorScrollbar@s0/e0 scroll_node_index=s2 thumb_rect=[204,35 7x48] track_rect=[204,33 9x100] expanded_gutter_rect=[198,33 15x100] expanded_thumb_rect=[200,35 11x48] scroll_size=0.48 expanded_scroll_size=0.48 max_scroll_offset=100 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 owner=BlockContainer<DIV>.scroll-container phase=overlay-L2 PaintScrollBar@s0/e0 scroll_node_index=s2 thumb_rect=[204,35 7x48] track_rect=[204,33 9x100] expanded_gutter_rect=[198,33 15x100] scroll_size=0.48 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 owner=BlockContainer<DIV>.scroll-container phase=overlay+L3 PaintScrollBar@s0/e0 scroll_node_index=s2 thumb_rect=[204,35 7x48] track_rect=[204,33 9x100] expanded_gutter_rect=[198,33 15x100] scroll_size=0.48 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 owner=BlockContainer<DIV>.scroll-container phase=overlayL0 CompositorScrollbar@s0/e0 scroll_node_index=s2 thumb_rect=[35,124 97x7] track_rect=[33,124 165x9] expanded_gutter_rect=[33,118 165x15] expanded_thumb_rect=[35,120 97x11] scroll_size=0.53671875 expanded_scroll_size=0.53671875 max_scroll_offset=120 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) owner=BlockContainer<DIV>.scroll-container phase=overlay-L2 PaintScrollBar@s0/e0 scroll_node_index=s2 thumb_rect=[35,124 97x7] track_rect=[33,124 165x9] expanded_gutter_rect=[33,118 165x15] scroll_size=0.53671875 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) owner=BlockContainer<DIV>.scroll-container phase=overlay+L5 PaintScrollBar@s0/e0 scroll_node_index=s2 thumb_rect=[35,124 97x7] track_rect=[33,124 165x9] expanded_gutter_rect=[33,118 165x15] scroll_size=0.53671875 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) owner=BlockContainer<DIV>.scroll-container phase=overlaydiff --git a/Tests/LibWeb/Text/expected/display_list/sibling-scrollables-in-fixed.txt b/Tests/LibWeb/Text/expected/display_list/sibling-scrollables-in-fixed.txtindex e60a09e5a71..3796583c23b 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@@ -20,11 +20,16 @@ ScrollNode scroll_node_index=s4 parent_scroll_node_index=s0 scrollport_rect=[430Layers (for a window server that shows tiles and filters what is below layers):[L0] base space=viewport[L1] painted space=scroller@s2 in viewport composited within [223,23 91x150] of viewport- [L2] painted space=viewport above band 0 of scroller@s2 in viewport- [L3] painted space=scroller@s3 in viewport composited within [326,23 92x150] of viewport- [L4] painted space=viewport above band 0 of scroller@s3 in viewport- [L5] painted space=scroller@s4 in viewport composited within [430,23 91x150] of viewport- [L6] painted space=viewport above band 0 of scroller@s4 in viewport+ [L3] vertical scroll bar #0 space=viewport region=[296,20 21x156]+ [L4] painted space=viewport above L3+ [L5] horizontal scroll bar #0 space=viewport region=[220,155 82x21]+ [L7] painted space=scroller@s3 in viewport composited within [326,23 92x150] of viewport+ [L9] vertical scroll bar #0 space=viewport region=[400,20 21x156]+ [L10] painted space=viewport above L9+ [L11] horizontal scroll bar #0 space=viewport region=[323,155 83x21]+ [L13] painted space=scroller@s4 in viewport composited within [430,23 91x150] of viewport+ [L15] vertical scroll bar #0 space=viewport region=[503,20 21x156]+ [L17] horizontal scroll bar #0 space=viewport region=[427,155 82x21]DisplayList:L0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata@@ -38,25 +43,25 @@ L0 CompositorWheelHitTestTarget@s2/c0/e0 target_scroll_node_index=s2 rect=[223,2L1 FillRect@s2/c0/e0 rect=[223,23 200x300] color=rgb(240, 128, 128) owner=BlockContainer<DIV>.scroll-content.red phase=backgroundL1 DrawGlyphRun@s2/c0/e0 font_id=font1 glyphs=8 rect=[223,23 71x16] glyph_bounding_rect=[223,24 70x15] translation=[223,36] color=rgb(0, 0, 0) text="Scroll A" owner=BlockContainer<DIV>.scroll-content.red phase=foregroundL0 CompositorScrollbar@s0/e0 scroll_node_index=s2 thumb_rect=[305,25 7x73] track_rect=[305,23 9x150] expanded_gutter_rect=[299,23 15x150] expanded_thumb_rect=[301,25 11x73] scroll_size=0.4866666666666667 expanded_scroll_size=0.4866666666666667 max_scroll_offset=150 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 owner=BlockContainer<DIV>.scroll-container phase=overlay-L2 PaintScrollBar@s0/e0 scroll_node_index=s2 thumb_rect=[305,25 7x73] track_rect=[305,23 9x150] expanded_gutter_rect=[299,23 15x150] scroll_size=0.4866666666666667 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 owner=BlockContainer<DIV>.scroll-container phase=overlay+L3 PaintScrollBar@s0/e0 scroll_node_index=s2 thumb_rect=[305,25 7x73] track_rect=[305,23 9x150] expanded_gutter_rect=[299,23 15x150] scroll_size=0.4866666666666667 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 owner=BlockContainer<DIV>.scroll-container phase=overlayL0 CompositorScrollbar@s0/e0 scroll_node_index=s2 thumb_rect=[225,164 33x7] track_rect=[223,164 76x9] expanded_gutter_rect=[223,158 76x15] expanded_thumb_rect=[225,160 33x11] scroll_size=0.3617541337167505 expanded_scroll_size=0.3617541337167505 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) owner=BlockContainer<DIV>.scroll-container phase=overlay-L2 PaintScrollBar@s0/e0 scroll_node_index=s2 thumb_rect=[225,164 33x7] track_rect=[223,164 76x9] expanded_gutter_rect=[223,158 76x15] scroll_size=0.3617541337167505 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) owner=BlockContainer<DIV>.scroll-container phase=overlay+L5 PaintScrollBar@s0/e0 scroll_node_index=s2 thumb_rect=[225,164 33x7] track_rect=[223,164 76x9] expanded_gutter_rect=[223,158 76x15] scroll_size=0.3617541337167505 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) owner=BlockContainer<DIV>.scroll-container phase=overlayL0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s3 rect=[325.32812,22 93.34375x152] owner=BlockContainer<DIV>.scroll-container phase=scroll-metadata-L2 FillRoundedRectRing@s0/e0 rect=[325,22 94x152] top_width=1 right_width=1 bottom_width=1 left_width=1 color=rgb(0, 0, 255) owner=BlockContainer<DIV>.scroll-container phase=border+L4 FillRoundedRectRing@s0/e0 rect=[325,22 94x152] top_width=1 right_width=1 bottom_width=1 left_width=1 color=rgb(0, 0, 255) owner=BlockContainer<DIV>.scroll-container phase=borderL0 CompositorWheelHitTestTarget@s3/c1/e0 target_scroll_node_index=s3 rect=[326.32812,23 200x300] owner=BlockContainer<DIV>.scroll-content.green phase=scroll-metadata-L3 FillRect@s3/c1/e0 rect=[326,23 200x300] color=rgb(144, 238, 144) owner=BlockContainer<DIV>.scroll-content.green phase=background-L3 DrawGlyphRun@s3/c1/e0 font_id=font1 glyphs=8 rect=[326,23 67x16] glyph_bounding_rect=[326,24 70x15] translation=[326.32812,36] color=rgb(0, 0, 0) text="Scroll B" owner=BlockContainer<DIV>.scroll-content.green phase=foreground+L7 FillRect@s3/c1/e0 rect=[326,23 200x300] color=rgb(144, 238, 144) owner=BlockContainer<DIV>.scroll-content.green phase=background+L7 DrawGlyphRun@s3/c1/e0 font_id=font1 glyphs=8 rect=[326,23 67x16] glyph_bounding_rect=[326,24 70x15] translation=[326.32812,36] color=rgb(0, 0, 0) text="Scroll B" owner=BlockContainer<DIV>.scroll-content.green phase=foregroundL0 CompositorScrollbar@s0/e0 scroll_node_index=s3 thumb_rect=[409,25 7x73] track_rect=[409,23 9x150] expanded_gutter_rect=[403,23 15x150] expanded_thumb_rect=[405,25 11x73] scroll_size=0.4866666666666667 expanded_scroll_size=0.4866666666666667 max_scroll_offset=150 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 owner=BlockContainer<DIV>.scroll-container phase=overlay-L4 PaintScrollBar@s0/e0 scroll_node_index=s3 thumb_rect=[409,25 7x73] track_rect=[409,23 9x150] expanded_gutter_rect=[403,23 15x150] scroll_size=0.4866666666666667 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 owner=BlockContainer<DIV>.scroll-container phase=overlay+L9 PaintScrollBar@s0/e0 scroll_node_index=s3 thumb_rect=[409,25 7x73] track_rect=[409,23 9x150] expanded_gutter_rect=[403,23 15x150] scroll_size=0.4866666666666667 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 owner=BlockContainer<DIV>.scroll-container phase=overlayL0 CompositorScrollbar@s0/e0 scroll_node_index=s3 thumb_rect=[328,164 33x7] track_rect=[326,164 77x9] expanded_gutter_rect=[326,158 77x15] expanded_thumb_rect=[328,160 33x11] scroll_size=0.36180615473109 expanded_scroll_size=0.36180615473109 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) owner=BlockContainer<DIV>.scroll-container phase=overlay-L4 PaintScrollBar@s0/e0 scroll_node_index=s3 thumb_rect=[328,164 33x7] track_rect=[326,164 77x9] expanded_gutter_rect=[326,158 77x15] scroll_size=0.36180615473109 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) owner=BlockContainer<DIV>.scroll-container phase=overlay+L11 PaintScrollBar@s0/e0 scroll_node_index=s3 thumb_rect=[328,164 33x7] track_rect=[326,164 77x9] expanded_gutter_rect=[326,158 77x15] scroll_size=0.36180615473109 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) owner=BlockContainer<DIV>.scroll-container phase=overlayL0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s4 rect=[428.67188,22 93.328125x152] owner=BlockContainer<DIV>.scroll-container phase=scroll-metadata-L0,L4 FillRoundedRectRing@s0/e0 rect=[429,22 93x152] top_width=1 right_width=1 bottom_width=1 left_width=1 color=rgb(0, 0, 255) owner=BlockContainer<DIV>.scroll-container phase=border+L0,L10 FillRoundedRectRing@s0/e0 rect=[429,22 93x152] top_width=1 right_width=1 bottom_width=1 left_width=1 color=rgb(0, 0, 255) owner=BlockContainer<DIV>.scroll-container phase=borderL0 CompositorWheelHitTestTarget@s4/c2/e0 target_scroll_node_index=s4 rect=[429.67188,23 200x300] owner=BlockContainer<DIV>.scroll-content.blue phase=scroll-metadata-L5 FillRect@s4/c2/e0 rect=[430,23 200x300] color=rgb(173, 216, 230) owner=BlockContainer<DIV>.scroll-content.blue phase=background-L5 DrawGlyphRun@s4/c2/e0 font_id=font1 glyphs=8 rect=[429,23 68x16] glyph_bounding_rect=[430,24 70x15] translation=[429.67188,36] color=rgb(0, 0, 0) text="Scroll C" owner=BlockContainer<DIV>.scroll-content.blue phase=foreground+L13 FillRect@s4/c2/e0 rect=[430,23 200x300] color=rgb(173, 216, 230) owner=BlockContainer<DIV>.scroll-content.blue phase=background+L13 DrawGlyphRun@s4/c2/e0 font_id=font1 glyphs=8 rect=[429,23 68x16] glyph_bounding_rect=[430,24 70x15] translation=[429.67188,36] color=rgb(0, 0, 0) text="Scroll C" owner=BlockContainer<DIV>.scroll-content.blue phase=foregroundL0 CompositorScrollbar@s0/e0 scroll_node_index=s4 thumb_rect=[512,25 7x73] track_rect=[512,23 9x150] expanded_gutter_rect=[506,23 15x150] expanded_thumb_rect=[508,25 11x73] scroll_size=0.4866666666666667 expanded_scroll_size=0.4866666666666667 max_scroll_offset=150 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 owner=BlockContainer<DIV>.scroll-container phase=overlay-L6 PaintScrollBar@s0/e0 scroll_node_index=s4 thumb_rect=[512,25 7x73] track_rect=[512,23 9x150] expanded_gutter_rect=[506,23 15x150] scroll_size=0.4866666666666667 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 owner=BlockContainer<DIV>.scroll-container phase=overlay+L15 PaintScrollBar@s0/e0 scroll_node_index=s4 thumb_rect=[512,25 7x73] track_rect=[512,23 9x150] expanded_gutter_rect=[506,23 15x150] scroll_size=0.4866666666666667 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 owner=BlockContainer<DIV>.scroll-container phase=overlayL0 CompositorScrollbar@s0/e0 scroll_node_index=s4 thumb_rect=[432,164 33x7] track_rect=[430,164 76x9] expanded_gutter_rect=[430,158 76x15] expanded_thumb_rect=[432,160 33x11] scroll_size=0.3617541337167505 expanded_scroll_size=0.3617541337167505 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) owner=BlockContainer<DIV>.scroll-container phase=overlay-L6 PaintScrollBar@s0/e0 scroll_node_index=s4 thumb_rect=[432,164 33x7] track_rect=[430,164 76x9] expanded_gutter_rect=[430,158 76x15] scroll_size=0.3617541337167505 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) owner=BlockContainer<DIV>.scroll-container phase=overlay+L17 PaintScrollBar@s0/e0 scroll_node_index=s4 thumb_rect=[432,164 33x7] track_rect=[430,164 76x9] expanded_gutter_rect=[430,158 76x15] scroll_size=0.3617541337167505 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) owner=BlockContainer<DIV>.scroll-container phase=overlaydiff --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.txtindex 36939949fbd..b6f0fd4de7d 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@@ -16,6 +16,7 @@ ScrollNode scroll_node_index=s3 parent_scroll_node_index=s0 scrollport_rect=[0,0Layers (for a window server that shows tiles and filters what is below layers):[L0] base space=viewport+ [L1] vertical scroll bar #0 space=viewport region=[70,5 21x86]DisplayList:L0 CompositorWheelHitTestTarget@s0/e0 target_scroll_node_index=s0 rect=[0,0 800x600] owner=Viewport<#document> phase=scroll-metadata@@ -29,5 +30,5 @@ L0 CompositorWheelHitTestTarget@s2/c1/e0 target_scroll_node_index=s3 rect=[0,0 8L0 CompositorWheelHitTestTarget@s3/c2/e0 target_scroll_node_index=s3 rect=[0,0 80x300] owner=BlockContainer<DIV> phase=scroll-metadataL0 FillRect@s3/c2/e0 rect=[0,0 80x300] color=rgb(0, 0, 0) owner=BlockContainer<DIV> phase=backgroundL0 CompositorScrollbar@s2/c1/e0 scroll_node_index=s3 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 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 owner=BlockContainer<DIV>#scroller phase=overlay-L0 PaintScrollBar@s2/c1/e0 scroll_node_index=s3 thumb_rect=[71,2 7x24] track_rect=[71,0 9x80] expanded_gutter_rect=[65,0 15x80] scroll_size=0.23636363636363636 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 owner=BlockContainer<DIV>#scroller phase=overlay+L1 PaintScrollBar@s2/c1/e0 scroll_node_index=s3 thumb_rect=[71,2 7x24] track_rect=[71,0 9x80] expanded_gutter_rect=[65,0 15x80] scroll_size=0.23636363636363636 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 owner=BlockContainer<DIV>#scroller phase=overlay