Ensure layout/script always have a correct viewport size when a new pipeline is created.

This commit is contained in:
Josh Matthews 2019-11-06 16:13:43 -05:00
parent 2aa5ddf922
commit 91dfa354b1
10 changed files with 41 additions and 56 deletions

View file

@ -10,7 +10,6 @@
// that these modules won't have to depend on layout.
use crossbeam_channel::{Receiver, Sender};
use euclid::Size2D;
use gfx::font_cache_thread::FontCacheThread;
use ipc_channel::ipc::{IpcReceiver, IpcSender};
use metrics::PaintTimeMetrics;
@ -19,8 +18,7 @@ use msg::constellation_msg::{BackgroundHangMonitorRegister, PipelineId};
use net_traits::image_cache::ImageCache;
use profile_traits::{mem, time};
use script_traits::LayoutMsg as ConstellationMsg;
use script_traits::{ConstellationControlMsg, LayoutControlMsg};
use servo_geometry::DeviceIndependentPixel;
use script_traits::{ConstellationControlMsg, LayoutControlMsg, WindowSizeData};
use servo_url::ServoUrl;
use std::sync::atomic::AtomicBool;
use std::sync::Arc;
@ -48,8 +46,7 @@ pub trait LayoutThreadFactory {
paint_time_metrics: PaintTimeMetrics,
busy: Arc<AtomicBool>,
load_webfonts_synchronously: bool,
initial_window_size: Size2D<u32, DeviceIndependentPixel>,
device_pixels_per_px: Option<f32>,
window_size: WindowSizeData,
dump_display_list: bool,
dump_display_list_json: bool,
dump_style_tree: bool,