mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
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>
This commit is contained in:
parent
ec20d9a3d7
commit
1f232eb17c
10 changed files with 60 additions and 33 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue