diff options
Diffstat (limited to 'components/script_traits')
-rw-r--r-- | components/script_traits/compositor.rs | 1 | ||||
-rw-r--r-- | components/script_traits/lib.rs | 12 | ||||
-rw-r--r-- | components/script_traits/script_msg.rs | 2 | ||||
-rw-r--r-- | components/script_traits/serializable.rs | 2 | ||||
-rw-r--r-- | components/script_traits/transferable.rs | 2 | ||||
-rw-r--r-- | components/script_traits/webdriver_msg.rs | 1 |
6 files changed, 11 insertions, 9 deletions
diff --git a/components/script_traits/compositor.rs b/components/script_traits/compositor.rs index 1707f4a3fe2..648882e1e7e 100644 --- a/components/script_traits/compositor.rs +++ b/components/script_traits/compositor.rs @@ -5,6 +5,7 @@ //! Defines data structures which are consumed by the Compositor. use embedder_traits::Cursor; +use serde::{Deserialize, Serialize}; use webrender_api::{ units::{LayoutSize, LayoutVector2D}, Epoch, ExternalScrollId, PipelineId, ScrollLocation, ScrollSensitivity, SpatialId, diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index c1b02c4335a..c2610461276 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -9,15 +9,6 @@ #![deny(missing_docs)] #![deny(unsafe_code)] -#[macro_use] -extern crate bitflags; -#[macro_use] -extern crate malloc_size_of; -#[macro_use] -extern crate malloc_size_of_derive; -#[macro_use] -extern crate serde; - pub mod compositor; mod script_msg; pub mod serializable; @@ -33,6 +24,7 @@ pub use crate::script_msg::{ use crate::serializable::{BlobData, BlobImpl}; use crate::transferable::MessagePortImpl; use crate::webdriver_msg::{LoadStatus, WebDriverScriptCommand}; +use bitflags::bitflags; use bluetooth_traits::BluetoothRequest; use canvas_traits::webgl::WebGLPipeline; use compositor::ScrollTreeNodeId; @@ -49,6 +41,8 @@ use keyboard_types::webdriver::Event as WebDriverInputEvent; use keyboard_types::{CompositionEvent, KeyboardEvent}; use libc::c_void; use log::warn; +use malloc_size_of::malloc_size_of_is_0; +use malloc_size_of_derive::MallocSizeOf; use media::WindowGLContext; use msg::constellation_msg::BackgroundHangMonitorRegister; use msg::constellation_msg::{ diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs index d49e9c6bba5..2a840325ce9 100644 --- a/components/script_traits/script_msg.rs +++ b/components/script_traits/script_msg.rs @@ -31,6 +31,8 @@ use msg::constellation_msg::{ServiceWorkerId, ServiceWorkerRegistrationId}; use net_traits::request::RequestBuilder; use net_traits::storage_thread::StorageType; use net_traits::CoreResourceMsg; +use serde::Deserialize; +use serde::Serialize; use servo_url::ImmutableOrigin; use servo_url::ServoUrl; use smallvec::SmallVec; diff --git a/components/script_traits/serializable.rs b/components/script_traits/serializable.rs index 73840fb2c50..8919b634a04 100644 --- a/components/script_traits/serializable.rs +++ b/components/script_traits/serializable.rs @@ -8,8 +8,10 @@ //! so that the other modules involved in the serialization don't have //! to depend on script. +use malloc_size_of_derive::MallocSizeOf; use msg::constellation_msg::BlobId; use net_traits::filemanager_thread::RelativePos; +use serde::{Deserialize, Serialize}; use std::cell::RefCell; use std::path::PathBuf; use uuid::Uuid; diff --git a/components/script_traits/transferable.rs b/components/script_traits/transferable.rs index 868654f2c2b..86ec33af996 100644 --- a/components/script_traits/transferable.rs +++ b/components/script_traits/transferable.rs @@ -8,7 +8,9 @@ //! to depend on script. use crate::PortMessageTask; +use malloc_size_of_derive::MallocSizeOf; use msg::constellation_msg::MessagePortId; +use serde::{Deserialize, Serialize}; use std::collections::VecDeque; #[derive(Debug, Deserialize, MallocSizeOf, Serialize)] diff --git a/components/script_traits/webdriver_msg.rs b/components/script_traits/webdriver_msg.rs index 2291cf64356..33588406bec 100644 --- a/components/script_traits/webdriver_msg.rs +++ b/components/script_traits/webdriver_msg.rs @@ -9,6 +9,7 @@ use euclid::default::Rect; use hyper_serde::Serde; use ipc_channel::ipc::IpcSender; use msg::constellation_msg::BrowsingContextId; +use serde::{Deserialize, Serialize}; use servo_url::ServoUrl; use std::collections::HashMap; use webdriver::common::{WebElement, WebFrame, WebWindow}; |