Skip to content

Truly independent web browser

LibCompositing: Remove the scroll node and snap area commands

Aliaksandr Kalenikfb87e4d62a86
diff --git a/Libraries/LibCompositing/Rust/src/display_list/commands.rs b/Libraries/LibCompositing/Rust/src/display_list/commands.rs
index a1bec65bef2..494424f19e5 100644
--- a/Libraries/LibCompositing/Rust/src/display_list/commands.rs
+++ b/Libraries/LibCompositing/Rust/src/display_list/commands.rs
@@ -4,7 +4,6 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-use crate::css_pixels::{FfiCssPixelPoint, FfiCssPixelRect};
use crate::display_list::ffi_bytes::FfiBytes;
use crate::ffi_bytes_fields;
use crate::ffi_enum_bytes;
@@ -12,7 +11,6 @@ use libgfx_rust::*;
// The layout of records and runs on the tape, which only Rust reads.
pub use super::tape::*;
-pub use crate::visual_context::CompositorScrollNodeKind;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[repr(u8)]
@@ -45,15 +43,12 @@ pub enum DisplayListCommandType {
PaintNestedDisplayList,
DrawIsolatedGroup,
DeclareMaskContent,
- CompositorScrollNode,
CompositorWheelHitTestTarget,
CompositorWheelHitTestTargetWithCornerRadii,
CompositorMainThreadWheelEventRegion,
CompositorScrollbar,
CompositorBlockingWheelEventRegion,
PaintScrollBar,
- CompositorSnapContainer,
- CompositorSnapArea,
CompositorNestedContextWheelRegion,
Canvas2DFillPath,
Canvas2DStrokePath,
@@ -87,14 +82,11 @@ impl DisplayListCommandType {
pub const fn is_compositor_metadata(self) -> bool {
matches!(
self,
- Self::CompositorScrollNode
- | Self::CompositorWheelHitTestTarget
+ Self::CompositorWheelHitTestTarget
| Self::CompositorWheelHitTestTargetWithCornerRadii
| Self::CompositorMainThreadWheelEventRegion
| Self::CompositorScrollbar
| Self::CompositorBlockingWheelEventRegion
- | Self::CompositorSnapContainer
- | Self::CompositorSnapArea
| Self::CompositorNestedContextWheelRegion
)
}
@@ -153,15 +145,12 @@ impl DisplayListCommandType {
Self::PaintNestedDisplayList => "PaintNestedDisplayList",
Self::DrawIsolatedGroup => "DrawIsolatedGroup",
Self::DeclareMaskContent => "DeclareMaskContent",
- Self::CompositorScrollNode => "CompositorScrollNode",
Self::CompositorWheelHitTestTarget => "CompositorWheelHitTestTarget",
Self::CompositorWheelHitTestTargetWithCornerRadii => "CompositorWheelHitTestTargetWithCornerRadii",
Self::CompositorMainThreadWheelEventRegion => "CompositorMainThreadWheelEventRegion",
Self::CompositorScrollbar => "CompositorScrollbar",
Self::CompositorBlockingWheelEventRegion => "CompositorBlockingWheelEventRegion",
Self::PaintScrollBar => "PaintScrollBar",
- Self::CompositorSnapContainer => "CompositorSnapContainer",
- Self::CompositorSnapArea => "CompositorSnapArea",
Self::CompositorNestedContextWheelRegion => "CompositorNestedContextWheelRegion",
Self::Canvas2DFillPath => "Canvas2DFillPath",
Self::Canvas2DStrokePath => "Canvas2DStrokePath",
@@ -1482,105 +1471,6 @@ impl DisplayListCommand for DeclareMaskContent {
}
}
-#[derive(Clone, Copy, Debug, PartialEq)]
-#[repr(C)]
-pub struct CompositorScrollNode {
- pub scrollable_node_id: UniqueNodeId,
- pub scroll_node_index: SpatialNodeIndex,
- pub parent_scroll_node_index: SpatialNodeIndex,
- pub scrollport_rect: IntRect,
- pub min_scroll_offset: FloatPoint,
- pub max_scroll_offset: FloatPoint,
- pub scroll_node_kind: CompositorScrollNodeKind,
- pub pseudo_element_type: u8,
- pub is_viewport: bool,
- pub can_be_wheel_scrolled_horizontally: bool,
- pub can_be_wheel_scrolled_vertically: bool,
- /// Whether a scroll the scroller cannot scroll by is passed on to the scrollers around it.
- pub chains_scroll_to_ancestors_horizontally: bool,
- pub chains_scroll_to_ancestors_vertically: bool,
- /// Whether a touchpad may pull the scroller past the edges of its scroll range.
- pub shows_overscroll_effect_horizontally: bool,
- pub shows_overscroll_effect_vertically: bool,
-}
-ffi_bytes_fields!(CompositorScrollNode {
- scrollable_node_id,
- scroll_node_index,
- parent_scroll_node_index,
- scrollport_rect,
- min_scroll_offset,
- max_scroll_offset,
- scroll_node_kind,
- pseudo_element_type,
- is_viewport,
- can_be_wheel_scrolled_horizontally,
- can_be_wheel_scrolled_vertically,
- chains_scroll_to_ancestors_horizontally,
- chains_scroll_to_ancestors_vertically,
- shows_overscroll_effect_horizontally,
- shows_overscroll_effect_vertically
-});
-
-impl DisplayListCommand for CompositorScrollNode {
- const COMMAND_TYPE: DisplayListCommandType = DisplayListCommandType::CompositorScrollNode;
-}
-
-/// The geometry snap position selection runs over for a scroll node that is a snap container. In CSS
-/// pixels so that the compositor selects the same position the main thread would.
-#[derive(Clone, Copy, Debug, PartialEq)]
-#[repr(C)]
-pub struct CompositorSnapContainer {
- pub scroll_node_index: SpatialNodeIndex,
- pub snapport: FfiCssPixelRect,
- pub min_scroll_offset: FfiCssPixelPoint,
- pub max_scroll_offset: FfiCssPixelPoint,
- pub strictness: u8,
- pub snaps_x: bool,
- pub snaps_y: bool,
- pub horizontal_writing_mode: bool,
-}
-ffi_bytes_fields!(CompositorSnapContainer {
- scroll_node_index,
- snapport,
- min_scroll_offset,
- max_scroll_offset,
- strictness,
- snaps_x,
- snaps_y,
- horizontal_writing_mode
-});
-
-impl DisplayListCommand for CompositorSnapContainer {
- const COMMAND_TYPE: DisplayListCommandType = DisplayListCommandType::CompositorSnapContainer;
-}
-
-/// A snap area of the snap container recorded before it: the transformed border box with the scroll
-/// margin added, in the container's coordinate space, and the alignment along each physical axis.
-#[derive(Clone, Copy, Debug, PartialEq)]
-#[repr(C)]
-pub struct CompositorSnapArea {
- pub scroll_node_index: SpatialNodeIndex,
- pub area_node_id: UniqueNodeId,
- pub pseudo_element_type: u8,
- pub rect: FfiCssPixelRect,
- pub align_x: u8,
- pub align_y: u8,
- pub always_stop: bool,
-}
-ffi_bytes_fields!(CompositorSnapArea {
- scroll_node_index,
- area_node_id,
- pseudo_element_type,
- rect,
- align_x,
- align_y,
- always_stop
-});
-
-impl DisplayListCommand for CompositorSnapArea {
- const COMMAND_TYPE: DisplayListCommandType = DisplayListCommandType::CompositorSnapArea;
-}
-
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(C)]
pub struct CompositorBlockingWheelEventRegion {
diff --git a/Libraries/LibCompositing/Rust/src/display_list/summary.rs b/Libraries/LibCompositing/Rust/src/display_list/summary.rs
index 646e459934c..a10cdf6b9fa 100644
--- a/Libraries/LibCompositing/Rust/src/display_list/summary.rs
+++ b/Libraries/LibCompositing/Rust/src/display_list/summary.rs
@@ -138,15 +138,12 @@ fn note_referenced_ids(command_type: DisplayListCommandType, payload: &[u8], ids
| T::BackdropFilterRegion
| T::DrawRect
| T::DeclareMaskContent
- | T::CompositorScrollNode
| T::CompositorWheelHitTestTarget
| T::CompositorWheelHitTestTargetWithCornerRadii
| T::CompositorMainThreadWheelEventRegion
| T::CompositorScrollbar
| T::CompositorBlockingWheelEventRegion
| T::PaintScrollBar
- | T::CompositorSnapContainer
- | T::CompositorSnapArea
| T::CompositorNestedContextWheelRegion
// The display list of a page holds none of the commands of the canvas 2D stream.
| T::Canvas2DFillPath
@@ -291,15 +288,12 @@ fn command_blend(
| T::DrawRect
| T::PaintNestedDisplayList
| T::DeclareMaskContent
- | T::CompositorScrollNode
| T::CompositorWheelHitTestTarget
| T::CompositorWheelHitTestTargetWithCornerRadii
| T::CompositorMainThreadWheelEventRegion
| T::CompositorScrollbar
| T::CompositorBlockingWheelEventRegion
| T::PaintScrollBar
- | T::CompositorSnapContainer
- | T::CompositorSnapArea
| T::CompositorNestedContextWheelRegion
// The display list of a page holds none of the commands of the canvas 2D stream.
| T::Canvas2DFillPath
diff --git a/Libraries/LibCompositing/Rust/src/display_list/validate.rs b/Libraries/LibCompositing/Rust/src/display_list/validate.rs
index 60c694c8bf1..767792d86bc 100644
--- a/Libraries/LibCompositing/Rust/src/display_list/validate.rs
+++ b/Libraries/LibCompositing/Rust/src/display_list/validate.rs
@@ -11,7 +11,6 @@
use super::builder::{COMMAND_ALIGNMENT, HEADER_SIZE, read_header};
use super::commands::*;
-use crate::visual_context::{SNAP_ALIGN_COUNT, SNAP_STRICTNESS_COUNT};
use libgfx_rust::{
CapStyle, Color, CompositingAndBlendingOperator, GradientInterpolationMethod, GradientInterpolationType,
HueInterpolationMethod, IntRect, InterpolationColorSpace, JoinStyle, LineStyle, MaskKind, Orientation,
@@ -48,7 +47,6 @@ macro_rules! tape_enum {
tape_enum!(InlineClipKind as u8 { Rect, RoundedRect, Path });
tape_enum!(ClipMode as u8 { Intersect, Difference });
-tape_enum!(CompositorScrollNodeKind as u8 { Viewport, Element, PseudoElement });
tape_enum!(PathPaintKind as u8 { Color, PaintStyle });
tape_enum!(DisplayListPaintStyleType as u8 { None, LinearGradient, RadialGradient, Pattern });
tape_enum!(DisplayListGradientSpreadMethod as u8 { Pad, Repeat, Reflect });
@@ -140,13 +138,6 @@ impl Payload<'_> {
Ok(())
}
- fn u8_below(self, offset: usize, count: u8) -> Result<(), ValidationError> {
- if self.u8_at(offset) >= count {
- return Err("Display list command has an invalid enum value");
- }
- Ok(())
- }
-
// A span of opaque bytes, which must lie inside the payload.
fn span_at(self, offset: usize) -> Result<(usize, usize), ValidationError> {
let start = self.u32_at(offset + offset_of!(DisplayListDataSpan, offset)) as usize;
@@ -357,15 +348,12 @@ fn command_struct_size(command_type: DisplayListCommandType) -> usize {
T::PaintNestedDisplayList => size_of::<PaintNestedDisplayList>(),
T::DrawIsolatedGroup => size_of::<DrawIsolatedGroup>(),
T::DeclareMaskContent => size_of::<DeclareMaskContent>(),
- T::CompositorScrollNode => size_of::<CompositorScrollNode>(),
T::CompositorWheelHitTestTarget => size_of::<CompositorWheelHitTestTarget>(),
T::CompositorWheelHitTestTargetWithCornerRadii => size_of::<CompositorWheelHitTestTargetWithCornerRadii>(),
T::CompositorMainThreadWheelEventRegion => size_of::<CompositorMainThreadWheelEventRegion>(),
T::CompositorScrollbar => size_of::<CompositorScrollbar>(),
T::CompositorBlockingWheelEventRegion => size_of::<CompositorBlockingWheelEventRegion>(),
T::PaintScrollBar => size_of::<PaintScrollBar>(),
- T::CompositorSnapContainer => size_of::<CompositorSnapContainer>(),
- T::CompositorSnapArea => size_of::<CompositorSnapArea>(),
T::CompositorNestedContextWheelRegion => size_of::<CompositorNestedContextWheelRegion>(),
T::Canvas2DFillPath => size_of::<Canvas2DFillPath>(),
T::Canvas2DStrokePath => size_of::<Canvas2DStrokePath>(),
@@ -537,35 +525,11 @@ fn validate_command_fields(
p.enum_at::<MaskKind>(offset_of!(DrawIsolatedGroup, mask_kind))?;
}
T::DeclareMaskContent => nested.add(offset_of!(DeclareMaskContent, content))?,
- T::CompositorScrollNode => {
- p.enum_at::<CompositorScrollNodeKind>(offset_of!(CompositorScrollNode, scroll_node_kind))?;
- p.bool_at(offset_of!(CompositorScrollNode, is_viewport))?;
- p.bool_at(offset_of!(CompositorScrollNode, can_be_wheel_scrolled_horizontally))?;
- p.bool_at(offset_of!(CompositorScrollNode, can_be_wheel_scrolled_vertically))?;
- p.bool_at(offset_of!(
- CompositorScrollNode,
- chains_scroll_to_ancestors_horizontally
- ))?;
- p.bool_at(offset_of!(CompositorScrollNode, chains_scroll_to_ancestors_vertically))?;
- p.bool_at(offset_of!(CompositorScrollNode, shows_overscroll_effect_horizontally))?;
- p.bool_at(offset_of!(CompositorScrollNode, shows_overscroll_effect_vertically))?;
- }
T::CompositorScrollbar => {
p.bool_at(offset_of!(CompositorScrollbar, vertical))?;
p.bool_at(offset_of!(CompositorScrollbar, is_painted_by_compositor))?;
}
T::PaintScrollBar => p.bool_at(offset_of!(PaintScrollBar, vertical))?,
- T::CompositorSnapContainer => {
- p.u8_below(offset_of!(CompositorSnapContainer, strictness), SNAP_STRICTNESS_COUNT)?;
- p.bool_at(offset_of!(CompositorSnapContainer, snaps_x))?;
- p.bool_at(offset_of!(CompositorSnapContainer, snaps_y))?;
- p.bool_at(offset_of!(CompositorSnapContainer, horizontal_writing_mode))?;
- }
- T::CompositorSnapArea => {
- p.u8_below(offset_of!(CompositorSnapArea, align_x), SNAP_ALIGN_COUNT)?;
- p.u8_below(offset_of!(CompositorSnapArea, align_y), SNAP_ALIGN_COUNT)?;
- p.bool_at(offset_of!(CompositorSnapArea, always_stop))?;
- }
T::Canvas2DFillPath => {
p.span_at(offset_of!(Canvas2DFillPath, path_data))?;
validate_canvas_2d_paint(p, offset_of!(Canvas2DFillPath, paint))?;
diff --git a/Libraries/LibCompositing/Rust/src/scrolling/async_scrolling_state.rs b/Libraries/LibCompositing/Rust/src/scrolling/async_scrolling_state.rs
index ad925c3b60a..faa4f90ab6d 100644
--- a/Libraries/LibCompositing/Rust/src/scrolling/async_scrolling_state.rs
+++ b/Libraries/LibCompositing/Rust/src/scrolling/async_scrolling_state.rs
@@ -20,7 +20,6 @@ use crate::visual_context::{
VisualContextTree,
};
use libgfx_rust::{Color, CornerRadii, FloatPoint, FloatRect, IntRect};
-use std::io::Write;
pub type AsyncScrollOperationID = u64;
@@ -326,23 +325,19 @@ pub fn async_scrolling_state_from(
async_scrolling_state.device_pixels_per_css_pixel = metadata.device_pixels_per_css_pixel;
}
let scroll_table = visual_context_tree.compositor_scroll_table();
- // Fall back to commands until WebContent fills the tree's compositor scroll table.
- let use_scroll_table = !scroll_table.nodes.is_empty();
- if use_scroll_table {
- async_scrolling_state
- .scroll_nodes
- .extend(scroll_table.nodes.iter().map(async_scroll_node_from));
- for container in scroll_table.snap_containers.iter() {
- let Some(mut snap_container) = async_snap_container_from(container) else {
- continue;
- };
- let first_area_index = container.first_area_index as usize;
- let areas = &scroll_table.snap_areas[first_area_index..first_area_index + container.area_count as usize];
- snap_container
- .areas
- .extend(areas.iter().filter_map(snap_area_geometry_from));
- async_scrolling_state.snap_containers.push(snap_container);
- }
+ async_scrolling_state
+ .scroll_nodes
+ .extend(scroll_table.nodes.iter().map(async_scroll_node_from));
+ for container in scroll_table.snap_containers.iter() {
+ let Some(mut snap_container) = async_snap_container_from(container) else {
+ continue;
+ };
+ let first_area_index = container.first_area_index as usize;
+ let areas = &scroll_table.snap_areas[first_area_index..first_area_index + container.area_count as usize];
+ snap_container
+ .areas
+ .extend(areas.iter().filter_map(snap_area_geometry_from));
+ async_scrolling_state.snap_containers.push(snap_container);
}
display_list.for_each_compositor_metadata(|context, command_type, payload| {
let mut append_wheel_hit_test_target = |target_scroll_node_index: SpatialNodeIndex, rect, corner_radii| {
@@ -371,36 +366,6 @@ pub fn async_scrolling_state_from(
rect: command.rect,
});
}
- DisplayListCommandType::CompositorScrollNode => {
- if use_scroll_table {
- return;
- }
- let command = read_command::<CompositorScrollNode>(payload);
- let parent_scroll_node_index = if command.parent_scroll_node_index.0 != 0 {
- Some(command.parent_scroll_node_index)
- } else {
- None
- };
- async_scrolling_state.scroll_nodes.push(AsyncScrollNode {
- scroll_node_index: command.scroll_node_index,
- stable_node_id: stable_scroll_node_id_for(
- command.scrollable_node_id,
- command.scroll_node_kind,
- command.pseudo_element_type,
- ),
- parent_scroll_node_index,
- scrollport_rect: command.scrollport_rect,
- min_scroll_offset: command.min_scroll_offset,
- max_scroll_offset: command.max_scroll_offset,
- is_viewport: command.is_viewport,
- can_be_wheel_scrolled_horizontally: command.can_be_wheel_scrolled_horizontally,
- can_be_wheel_scrolled_vertically: command.can_be_wheel_scrolled_vertically,
- chains_scroll_to_ancestors_horizontally: command.chains_scroll_to_ancestors_horizontally,
- chains_scroll_to_ancestors_vertically: command.chains_scroll_to_ancestors_vertically,
- shows_overscroll_effect_horizontally: command.shows_overscroll_effect_horizontally,
- shows_overscroll_effect_vertically: command.shows_overscroll_effect_vertically,
- });
- }
DisplayListCommandType::CompositorWheelHitTestTarget => {
let command = read_command::<CompositorWheelHitTestTarget>(payload);
append_wheel_hit_test_target(command.target_scroll_node_index, command.rect, CornerRadii::default());
@@ -455,63 +420,6 @@ pub fn async_scrolling_state_from(
});
next_paint_order_index = next_paint_order_index.wrapping_add(1);
}
- DisplayListCommandType::CompositorSnapContainer => {
- if use_scroll_table {
- return;
- }
- let command = read_command::<CompositorSnapContainer>(payload);
- let Some(strictness) = snap_strictness_from(command.strictness) else {
- return;
- };
- async_scrolling_state.snap_containers.push(AsyncSnapContainer {
- scroll_node_index: command.scroll_node_index,
- geometry: SnapContainerGeometry {
- snapport: command.snapport.into(),
- min_scroll_offset: command.min_scroll_offset.into(),
- max_scroll_offset: command.max_scroll_offset.into(),
- strictness,
- axes: SnapAxes {
- x: command.snaps_x,
- y: command.snaps_y,
- },
- horizontal_writing_mode: command.horizontal_writing_mode,
- },
- areas: Vec::new(),
- });
- }
- DisplayListCommandType::CompositorSnapArea => {
- if use_scroll_table {
- return;
- }
- let command = read_command::<CompositorSnapArea>(payload);
- let snap_containers = &mut async_scrolling_state.snap_containers;
- // A snap container's areas are recorded right after it.
- let Some(container) = snap_containers
- .last_mut()
- .filter(|c| c.scroll_node_index == command.scroll_node_index)
- else {
- let _ = writeln!(
- std::io::stderr(),
- "Ignoring a snap area recorded without its snap container"
- );
- return;
- };
- let (Some(align_x), Some(align_y)) =
- (snap_align_from(command.align_x), snap_align_from(command.align_y))
- else {
- return;
- };
- container.areas.push(SnapAreaGeometry {
- identity: SnapAreaIdentity {
- node_id: command.area_node_id,
- pseudo_element_type: command.pseudo_element_type,
- },
- rect: command.rect.into(),
- align_x,
- align_y,
- always_stop: command.always_stop,
- });
- }
_ => {}
}
});
diff --git a/Libraries/LibCompositing/Rust/src/scrolling/mod.rs b/Libraries/LibCompositing/Rust/src/scrolling/mod.rs
index 3cffa61346a..bb6d8b44973 100644
--- a/Libraries/LibCompositing/Rust/src/scrolling/mod.rs
+++ b/Libraries/LibCompositing/Rust/src/scrolling/mod.rs
@@ -16,7 +16,7 @@ pub mod smooth_scroll_animation;
pub mod visual_context_tree;
pub mod wheel_gesture_identity;
-pub use crate::display_list::commands::{CompositorScrollNodeKind, ContextRef, EffectNodeIndex, SpatialNodeIndex};
+pub use crate::display_list::commands::{ContextRef, EffectNodeIndex, SpatialNodeIndex};
pub use crate::ipc_types::Compositing_AppliedScrollRequest as AppliedScrollRequest;
pub use crate::ipc_types::Compositing_AsyncScrollOffset as AsyncScrollOffset;
pub use crate::ipc_types::Compositing_KeyboardScrollState as KeyboardScrollState;
@@ -48,6 +48,7 @@ pub use crate::ipc_types::Web_UIEvents_MouseButton as MouseButton;
pub use crate::ipc_types::Web_UniqueNodeID as UniqueNodeId;
pub use crate::ipc_types::Web_WheelDeltaPrecision as WheelDeltaPrecision;
pub use crate::ipc_types::Web_WheelGestureMark as WheelGestureMark;
+pub use crate::visual_context::CompositorScrollNodeKind;
pub use async_scroll_tree::*;
pub use async_scrolling_state::*;
pub use display_list::{AsyncScrollingMetadata, DisplayList};
diff --git a/Libraries/LibCompositing/Rust/src/visual_context/mod.rs b/Libraries/LibCompositing/Rust/src/visual_context/mod.rs
index 17bc398f7c3..f977ec3923e 100644
--- a/Libraries/LibCompositing/Rust/src/visual_context/mod.rs
+++ b/Libraries/LibCompositing/Rust/src/visual_context/mod.rs
@@ -30,7 +30,6 @@ pub use scroll_table::{
CompositorScrollNodeKind, CompositorScrollNodeRecord, CompositorScrollTable, CompositorSnapAreaRecord,
CompositorSnapContainerRecord,
};
-pub(crate) use scroll_table::{SNAP_ALIGN_COUNT, SNAP_STRICTNESS_COUNT};
pub use world_transforms::WorldTransforms;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
diff --git a/Libraries/LibWeb/Rust/src/painting/display_list/dump.rs b/Libraries/LibWeb/Rust/src/painting/display_list/dump.rs
index d6247a88b52..a6b5ac75965 100644
--- a/Libraries/LibWeb/Rust/src/painting/display_list/dump.rs
+++ b/Libraries/LibWeb/Rust/src/painting/display_list/dump.rs
@@ -628,15 +628,6 @@ fn dump_command(output: &mut String, command_type: DisplayListCommandType, paylo
write_field(output, "rect", command.rect);
write!(output, " effect=e{}", command.effect.0).unwrap();
}
- DisplayListCommandType::CompositorScrollNode => {
- let command = read_command::<CompositorScrollNode>(payload);
- write_field(output, "scroll_node_index", command.scroll_node_index);
- write_field(output, "parent_scroll_node_index", command.parent_scroll_node_index);
- write_field(output, "scrollport_rect", command.scrollport_rect);
- write_field(output, "min_scroll_offset", command.min_scroll_offset);
- write_field(output, "max_scroll_offset", command.max_scroll_offset);
- write!(output, " is_viewport={}", command.is_viewport).unwrap();
- }
DisplayListCommandType::CompositorBlockingWheelEventRegion => {
let command = read_command::<CompositorBlockingWheelEventRegion>(payload);
write_field(output, "rect", command.rect);
@@ -688,31 +679,6 @@ fn dump_command(output: &mut String, command_type: DisplayListCommandType, paylo
.unwrap();
}
DisplayListCommandType::PaintScrollBar => {}
- DisplayListCommandType::CompositorSnapContainer => {
- let command = read_command::<CompositorSnapContainer>(payload);
- write_field(output, "scroll_node_index", command.scroll_node_index);
- write_field(output, "snapport", command.snapport);
- write_field(output, "min_scroll_offset", command.min_scroll_offset);
- write_field(output, "max_scroll_offset", command.max_scroll_offset);
- write!(
- output,
- " strictness={} snaps_x={} snaps_y={} horizontal_writing_mode={}",
- command.strictness, command.snaps_x, command.snaps_y, command.horizontal_writing_mode
- )
- .unwrap();
- }
- DisplayListCommandType::CompositorSnapArea => {
- let command = read_command::<CompositorSnapArea>(payload);
- write_field(output, "scroll_node_index", command.scroll_node_index);
- write!(output, " pseudo_element_type={}", command.pseudo_element_type).unwrap();
- write_field(output, "rect", command.rect);
- write!(
- output,
- " align_x={} align_y={} always_stop={}",
- command.align_x, command.align_y, command.always_stop
- )
- .unwrap();
- }
// The display list of a page holds none of the commands of the canvas 2D stream.
DisplayListCommandType::Canvas2DFillPath
| DisplayListCommandType::Canvas2DStrokePath
diff --git a/Services/Compositor/DisplayListPlayerSkia.cpp b/Services/Compositor/DisplayListPlayerSkia.cpp
index fee008824b4..0e070f105ff 100644
--- a/Services/Compositor/DisplayListPlayerSkia.cpp
+++ b/Services/Compositor/DisplayListPlayerSkia.cpp
@@ -1434,10 +1434,6 @@ void DisplayListPlayerSkia::play_command(PaintNestedDisplayList const& command)
canvas.restore();
}
-void DisplayListPlayerSkia::play_command(CompositorScrollNode const&)
-{
-}
-
void DisplayListPlayerSkia::play_command(CompositorWheelHitTestTarget const&)
{
}
@@ -1458,14 +1454,6 @@ void DisplayListPlayerSkia::play_command(CompositorBlockingWheelEventRegion cons
{
}
-void DisplayListPlayerSkia::play_command(CompositorSnapContainer const&)
-{
-}
-
-void DisplayListPlayerSkia::play_command(CompositorSnapArea const&)
-{
-}
-
void DisplayListPlayerSkia::play_command(CompositorNestedContextWheelRegion const&)
{
}