aboutsummaryrefslogtreecommitdiffstats
path: root/components/shared/script
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2025-03-21 13:09:01 +0100
committerGitHub <noreply@github.com>2025-03-21 12:09:01 +0000
commit1f232eb17c031fe18035a17249de99b2af6fa53e (patch)
tree0f243d640ca8e9ac2c571457c6b14a0958fb8987 /components/shared/script
parentec20d9a3d7633ef1a4b25c991ff00bb0bb1cd295 (diff)
downloadservo-1f232eb17c031fe18035a17249de99b2af6fa53e.tar.gz
servo-1f232eb17c031fe18035a17249de99b2af6fa53e.zip
constellation: Proxy `ScrollState` through the `Constellation` (#36062)
This will allow removing the dependency of the compositor on `script_traits`, which should make our internal dependency chain a lot easier to deal with. Part of #35984. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/shared/script')
-rw-r--r--components/shared/script/lib.rs17
1 files changed, 4 insertions, 13 deletions
diff --git a/components/shared/script/lib.rs b/components/shared/script/lib.rs
index 9df9624ebee..dc6df22665c 100644
--- a/components/shared/script/lib.rs
+++ b/components/shared/script/lib.rs
@@ -33,7 +33,7 @@ use crossbeam_channel::{RecvTimeoutError, Sender};
use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId};
use embedder_traits::input_events::InputEvent;
use embedder_traits::{MediaSessionActionType, Theme, WebDriverScriptCommand};
-use euclid::{Rect, Scale, Size2D, UnknownUnit, Vector2D};
+use euclid::{Rect, Scale, Size2D, UnknownUnit};
use http::{HeaderMap, Method};
use ipc_channel::Error as IpcError;
use ipc_channel::ipc::{IpcReceiver, IpcSender};
@@ -56,10 +56,10 @@ use style_traits::{CSSPixel, SpeculativePainter};
use stylo_atoms::Atom;
#[cfg(feature = "webgpu")]
use webgpu::WebGPUMsg;
-use webrender_api::units::{DevicePixel, LayoutPixel};
-use webrender_api::{DocumentId, ExternalScrollId, ImageKey};
+use webrender_api::units::DevicePixel;
+use webrender_api::{DocumentId, ImageKey};
use webrender_traits::{
- CompositorHitTestResult, CrossProcessCompositorApi,
+ CompositorHitTestResult, CrossProcessCompositorApi, ScrollState,
UntrustedNodeAddress as WebRenderUntrustedNodeAddress,
};
@@ -593,15 +593,6 @@ bitflags! {
}
}
-/// The scroll state of a stacking context.
-#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
-pub struct ScrollState {
- /// The ID of the scroll root.
- pub scroll_id: ExternalScrollId,
- /// The scrolling offset of this stacking context.
- pub scroll_offset: Vector2D<f32, LayoutPixel>,
-}
-
/// Data about the window size.
#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, PartialEq, Serialize)]
pub struct WindowSizeData {