aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEuclid Ye <yezhizhenjiakang@gmail.com>2025-02-14 18:18:25 +0800
committerGitHub <noreply@github.com>2025-02-14 10:18:25 +0000
commit3e1d15da9b1777173d2fad9c2cc63232e1d4d55e (patch)
tree37bb5e23ffa176973fe2593a4036a212d13ac837
parent03fc54e682bceebeece0ee556c25b8c9b897726f (diff)
downloadservo-3e1d15da9b1777173d2fad9c2cc63232e1d4d55e.tar.gz
servo-3e1d15da9b1777173d2fad9c2cc63232e1d4d55e.zip
Fix scroll_sensitivity related naming issue (#35462)
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
-rw-r--r--components/layout_2020/flow/root.rs6
-rw-r--r--components/layout_2020/fragment_tree/fragment_tree.rs4
-rw-r--r--components/layout_thread_2020/lib.rs2
-rw-r--r--components/shared/webrender/display_list.rs4
4 files changed, 8 insertions, 8 deletions
diff --git a/components/layout_2020/flow/root.rs b/components/layout_2020/flow/root.rs
index b95f9f0dadf..430ec10b0d0 100644
--- a/components/layout_2020/flow/root.rs
+++ b/components/layout_2020/flow/root.rs
@@ -41,7 +41,7 @@ pub struct BoxTree {
canvas_background: CanvasBackground,
/// Whether or not the viewport should be sensitive to scrolling input events in two axes
- scroll_sensitivity: AxesScrollSensitivity,
+ viewport_scroll_sensitivity: AxesScrollSensitivity,
}
impl BoxTree {
@@ -94,7 +94,7 @@ impl BoxTree {
contains_floats,
},
canvas_background: CanvasBackground::for_root_element(context, root_element),
- scroll_sensitivity: AxesScrollSensitivity {
+ viewport_scroll_sensitivity: AxesScrollSensitivity {
x: viewport_overflow.x.to_scrollable().into(),
y: viewport_overflow.y.to_scrollable().into(),
},
@@ -401,7 +401,7 @@ impl BoxTree {
scrollable_overflow,
initial_containing_block: physical_containing_block,
canvas_background: self.canvas_background.clone(),
- root_scroll_sensitivity: self.scroll_sensitivity,
+ viewport_scroll_sensitivity: self.viewport_scroll_sensitivity,
}
}
}
diff --git a/components/layout_2020/fragment_tree/fragment_tree.rs b/components/layout_2020/fragment_tree/fragment_tree.rs
index 5d682227648..a620d0b1f9f 100644
--- a/components/layout_2020/fragment_tree/fragment_tree.rs
+++ b/components/layout_2020/fragment_tree/fragment_tree.rs
@@ -37,8 +37,8 @@ pub struct FragmentTree {
/// <https://drafts.csswg.org/css-backgrounds/#special-backgrounds>
pub(crate) canvas_background: CanvasBackground,
- /// Whether or not the root element is sensitive to scroll input events.
- pub root_scroll_sensitivity: AxesScrollSensitivity,
+ /// Whether or not the viewport is sensitive to scroll input events.
+ pub viewport_scroll_sensitivity: AxesScrollSensitivity,
}
impl FragmentTree {
diff --git a/components/layout_thread_2020/lib.rs b/components/layout_thread_2020/lib.rs
index 089492a4751..03f47d5904c 100644
--- a/components/layout_thread_2020/lib.rs
+++ b/components/layout_thread_2020/lib.rs
@@ -854,7 +854,7 @@ impl LayoutThread {
fragment_tree.scrollable_overflow(),
self.id.into(),
epoch.into(),
- fragment_tree.root_scroll_sensitivity,
+ fragment_tree.viewport_scroll_sensitivity,
);
display_list.wr.begin();
diff --git a/components/shared/webrender/display_list.rs b/components/shared/webrender/display_list.rs
index 4733e6c4024..5d93fda81ff 100644
--- a/components/shared/webrender/display_list.rs
+++ b/components/shared/webrender/display_list.rs
@@ -315,7 +315,7 @@ impl CompositorDisplayListInfo {
content_size: LayoutSize,
pipeline_id: PipelineId,
epoch: Epoch,
- root_scroll_sensitivity: AxesScrollSensitivity,
+ viewport_scroll_sensitivity: AxesScrollSensitivity,
) -> Self {
let mut scroll_tree = ScrollTree::default();
let root_reference_frame_id = scroll_tree.add_scroll_tree_node(
@@ -329,7 +329,7 @@ impl CompositorDisplayListInfo {
Some(ScrollableNodeInfo {
external_id: ExternalScrollId(0, pipeline_id),
scrollable_size: content_size - viewport_size,
- scroll_sensitivity: root_scroll_sensitivity,
+ scroll_sensitivity: viewport_scroll_sensitivity,
offset: LayoutVector2D::zero(),
}),
);