aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/lib.rs
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2016-10-18 15:50:32 +0200
committerMs2ger <Ms2ger@gmail.com>2016-10-22 13:33:38 +0200
commit1a9673341780435dcd4495b893d1bdaee12f1c8f (patch)
tree90561bfaf2505afc7b4fa5ff0a519589c3dc3807 /components/script_traits/lib.rs
parent9cbac40f618a5d87bd883e81a70e233e0ea3a87f (diff)
downloadservo-1a9673341780435dcd4495b893d1bdaee12f1c8f.tar.gz
servo-1a9673341780435dcd4495b893d1bdaee12f1c8f.zip
Move WindowSizeType to script_traits.
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r--components/script_traits/lib.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 85281b80f7c..e700c47ae47 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -52,8 +52,7 @@ use hyper::method::Method;
use ipc_channel::ipc::{IpcReceiver, IpcSender};
use libc::c_void;
use msg::constellation_msg::{FrameId, FrameType, Key, KeyModifiers, KeyState};
-use msg::constellation_msg::{PipelineId, PipelineNamespaceId, ReferrerPolicy};
-use msg::constellation_msg::{TraversalDirection, WindowSizeType};
+use msg::constellation_msg::{PipelineId, PipelineNamespaceId, ReferrerPolicy, TraversalDirection};
use net_traits::{LoadOrigin, ResourceThreads};
use net_traits::bluetooth_thread::BluetoothMethodMsg;
use net_traits::image::base::Image;
@@ -621,6 +620,15 @@ pub struct WindowSizeData {
pub device_pixel_ratio: ScaleFactor<f32, ViewportPx, DevicePixel>,
}
+/// The type of window size change.
+#[derive(Deserialize, Eq, PartialEq, Serialize, Copy, Clone, HeapSizeOf)]
+pub enum WindowSizeType {
+ /// Initial load.
+ Initial,
+ /// Window resize.
+ Resize,
+}
+
/// Messages to the constellation originating from the WebDriver server.
#[derive(Deserialize, Serialize)]
pub enum WebDriverCommandMsg {