diff options
author | Josh Matthews <josh@joshmatthews.net> | 2019-11-06 16:13:43 -0500 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2019-11-06 16:13:55 -0500 |
commit | 91dfa354b16535f1c55c722b10cf4538f2385e0e (patch) | |
tree | 9a5478316b86291294812809e62504ecfb14972e /components/script_traits/lib.rs | |
parent | 2aa5ddf9221b77a6144391eb37855737a9ede083 (diff) | |
download | servo-91dfa354b16535f1c55c722b10cf4538f2385e0e.tar.gz servo-91dfa354b16535f1c55c722b10cf4538f2385e0e.zip |
Ensure layout/script always have a correct viewport size when a new pipeline is created.
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r-- | components/script_traits/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index 9dd0ba04134..468cfb19fb3 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -739,6 +739,8 @@ pub struct IFrameLoadInfoWithData { pub old_pipeline_id: Option<PipelineId>, /// Sandbox type of this iframe pub sandbox: IFrameSandboxState, + /// The initial viewport size for this iframe. + pub window_size: WindowSizeData, } /// Specifies whether the script or layout thread needs to be ticked for animation. @@ -760,7 +762,7 @@ pub struct ScrollState { } /// Data about the window size. -#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, Serialize)] +#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, PartialEq, Serialize)] pub struct WindowSizeData { /// The size of the initial layout viewport, before parsing an /// <http://www.w3.org/TR/css-device-adapt/#initial-viewport> |