diff options
Diffstat (limited to 'components/script_layout_interface')
-rw-r--r-- | components/script_layout_interface/Cargo.toml | 3 | ||||
-rw-r--r-- | components/script_layout_interface/lib.rs | 4 | ||||
-rw-r--r-- | components/script_layout_interface/message.rs | 2 | ||||
-rw-r--r-- | components/script_layout_interface/wrapper_traits.rs | 10 |
4 files changed, 10 insertions, 9 deletions
diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml index ba5a7bd7449..5d81df1261d 100644 --- a/components/script_layout_interface/Cargo.toml +++ b/components/script_layout_interface/Cargo.toml @@ -18,6 +18,7 @@ euclid = "0.10.1" gfx_traits = {path = "../gfx_traits"} heapsize = "0.3.0" heapsize_derive = "0.1" +html5ever-atoms = "0.1" ipc-channel = "0.5" libc = "0.2" log = "0.3.5" @@ -28,6 +29,6 @@ profile_traits = {path = "../profile_traits"} range = {path = "../range"} script_traits = {path = "../script_traits"} selectors = "0.14" -string_cache = {version = "0.2.26", features = ["heap_size"]} +servo_atoms = {path = "../atoms"} 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 2cad69cdcc8..b442e502b2b 100644 --- a/components/script_layout_interface/lib.rs +++ b/components/script_layout_interface/lib.rs @@ -24,6 +24,7 @@ extern crate euclid; extern crate gfx_traits; extern crate heapsize; #[macro_use] extern crate heapsize_derive; +#[macro_use] extern crate html5ever_atoms; extern crate ipc_channel; extern crate libc; #[macro_use] @@ -34,8 +35,7 @@ extern crate profile_traits; extern crate range; extern crate script_traits; extern crate selectors; -#[macro_use(atom, ns)] -extern crate string_cache; +#[macro_use] extern crate servo_atoms; extern crate style; extern crate url; diff --git a/components/script_layout_interface/message.rs b/components/script_layout_interface/message.rs index 1d08f8e758f..cd82dc79cd7 100644 --- a/components/script_layout_interface/message.rs +++ b/components/script_layout_interface/message.rs @@ -14,9 +14,9 @@ use profile_traits::mem::ReportsChan; use rpc::LayoutRPC; use script_traits::{ConstellationControlMsg, LayoutControlMsg}; use script_traits::{LayoutMsg as ConstellationMsg, StackingContextScrollState, WindowSizeData}; +use servo_atoms::Atom; use std::sync::Arc; use std::sync::mpsc::{Receiver, Sender}; -use string_cache::Atom; use style::context::ReflowGoal; use style::selector_impl::PseudoElement; use style::stylesheets::Stylesheet; diff --git a/components/script_layout_interface/wrapper_traits.rs b/components/script_layout_interface/wrapper_traits.rs index 04372274cfc..a241ae12099 100644 --- a/components/script_layout_interface/wrapper_traits.rs +++ b/components/script_layout_interface/wrapper_traits.rs @@ -9,12 +9,12 @@ use LayoutNodeType; use OpaqueStyleAndLayoutData; use SVGSVGData; use gfx_traits::ByteIndex; +use html5ever_atoms::{Namespace, LocalName}; use msg::constellation_msg::PipelineId; use range::Range; use restyle_damage::RestyleDamage; use std::fmt::Debug; use std::sync::Arc; -use string_cache::{Atom, Namespace}; use style::atomic_refcell::AtomicRefCell; use style::computed_values::display; use style::context::SharedStyleContext; @@ -295,7 +295,7 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug + fn type_id(&self) -> Option<LayoutNodeType>; #[inline] - fn get_attr(&self, namespace: &Namespace, name: &Atom) -> Option<&str>; + fn get_attr(&self, namespace: &Namespace, name: &LocalName) -> Option<&str>; fn get_style_data(&self) -> Option<&AtomicRefCell<ElementData>>; @@ -330,7 +330,7 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug + #[inline] fn get_details_summary_pseudo(&self) -> Option<Self> { - if self.get_local_name() == &atom!("details") && + if self.get_local_name() == &local_name!("details") && self.get_namespace() == &ns!(html) { Some(self.with_pseudo(PseudoElementType::DetailsSummary(None))) } else { @@ -340,9 +340,9 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug + #[inline] fn get_details_content_pseudo(&self) -> Option<Self> { - if self.get_local_name() == &atom!("details") && + if self.get_local_name() == &local_name!("details") && self.get_namespace() == &ns!(html) { - let display = if self.get_attr(&ns!(), &atom!("open")).is_some() { + let display = if self.get_attr(&ns!(), &local_name!("open")).is_some() { None // Specified by the stylesheet } else { Some(display::T::none) |