diff options
Diffstat (limited to 'components/script_layout_interface')
-rw-r--r-- | components/script_layout_interface/Cargo.toml | 2 | ||||
-rw-r--r-- | components/script_layout_interface/lib.rs | 2 | ||||
-rw-r--r-- | components/script_layout_interface/message.rs | 6 | ||||
-rw-r--r-- | components/script_layout_interface/wrapper_traits.rs | 6 |
4 files changed, 7 insertions, 9 deletions
diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml index 5d81df1261d..44b0a3c320d 100644 --- a/components/script_layout_interface/Cargo.toml +++ b/components/script_layout_interface/Cargo.toml @@ -30,5 +30,5 @@ range = {path = "../range"} script_traits = {path = "../script_traits"} selectors = "0.14" servo_atoms = {path = "../atoms"} +servo_url = {path = "../url"} style = {path = "../style"} -url = {version = "1.2", features = ["heap_size"]} diff --git a/components/script_layout_interface/lib.rs b/components/script_layout_interface/lib.rs index ff86579631c..0ad5948f87f 100644 --- a/components/script_layout_interface/lib.rs +++ b/components/script_layout_interface/lib.rs @@ -36,8 +36,8 @@ extern crate range; extern crate script_traits; extern crate selectors; #[macro_use] extern crate servo_atoms; +extern crate servo_url; extern crate style; -extern crate url; pub mod message; pub mod reporter; diff --git a/components/script_layout_interface/message.rs b/components/script_layout_interface/message.rs index cd82dc79cd7..0f34a6bea75 100644 --- a/components/script_layout_interface/message.rs +++ b/components/script_layout_interface/message.rs @@ -15,12 +15,12 @@ use rpc::LayoutRPC; use script_traits::{ConstellationControlMsg, LayoutControlMsg}; use script_traits::{LayoutMsg as ConstellationMsg, StackingContextScrollState, WindowSizeData}; use servo_atoms::Atom; +use servo_url::ServoUrl; use std::sync::Arc; use std::sync::mpsc::{Receiver, Sender}; use style::context::ReflowGoal; use style::selector_impl::PseudoElement; use style::stylesheets::Stylesheet; -use url::Url; /// Asynchronous messages that script can send to layout. pub enum Msg { @@ -79,7 +79,7 @@ pub enum Msg { CreateLayoutThread(NewLayoutThreadInfo), /// Set the final Url. - SetFinalUrl(Url), + SetFinalUrl(ServoUrl), /// Tells layout about the new scrolling offsets of each scrollable stacking context. SetStackingContextScrollStates(Vec<StackingContextScrollState>), @@ -135,7 +135,7 @@ impl Drop for ScriptReflow { pub struct NewLayoutThreadInfo { pub id: PipelineId, - pub url: Url, + pub url: ServoUrl, pub is_parent: bool, pub layout_pair: (Sender<Msg>, Receiver<Msg>), pub pipeline_port: IpcReceiver<LayoutControlMsg>, diff --git a/components/script_layout_interface/wrapper_traits.rs b/components/script_layout_interface/wrapper_traits.rs index 283e8def80a..66b325ff9a1 100644 --- a/components/script_layout_interface/wrapper_traits.rs +++ b/components/script_layout_interface/wrapper_traits.rs @@ -12,6 +12,7 @@ use gfx_traits::ByteIndex; use html5ever_atoms::{Namespace, LocalName}; use msg::constellation_msg::PipelineId; use range::Range; +use servo_url::ServoUrl; use std::fmt::Debug; use std::sync::Arc; use style::atomic_refcell::AtomicRefCell; @@ -22,7 +23,6 @@ use style::dom::{LayoutIterator, NodeInfo, PresentationalHintsSynthetizer, TNode use style::dom::OpaqueNode; use style::properties::ServoComputedValues; use style::selector_impl::{PseudoElement, PseudoElementCascadeType, RestyleDamage, ServoSelectorImpl}; -use url::Url; #[derive(Copy, PartialEq, Clone, Debug)] pub enum PseudoElementType<T> { @@ -249,9 +249,7 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + GetLayoutData + NodeInfo + Partia fn selection(&self) -> Option<Range<ByteIndex>>; /// If this is an image element, returns its URL. If this is not an image element, fails. - /// - /// FIXME(pcwalton): Don't copy URLs. - fn image_url(&self) -> Option<Url>; + fn image_url(&self) -> Option<ServoUrl>; fn canvas_data(&self) -> Option<HTMLCanvasData>; |