diff options
27 files changed, 44 insertions, 14 deletions
diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs index a9da70763b1..618bac9674b 100644 --- a/components/compositing/compositor_thread.rs +++ b/components/compositing/compositor_thread.rs @@ -20,9 +20,9 @@ use script_traits::{AnimationState, EventResult, ScriptToCompositorMsg}; use std::fmt::{Debug, Error, Formatter}; use std::rc::Rc; use std::sync::mpsc::{Receiver, Sender, channel}; +use style_traits::cursor::Cursor; use style_traits::viewport::ViewportConstraints; use url::Url; -use util::cursor::Cursor; use windowing::{WindowEvent, WindowMethods}; pub use constellation::SendableFrameTree; pub use windowing; diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs index 75734226f33..a08687bb680 100644 --- a/components/compositing/constellation.rs +++ b/components/compositing/constellation.rs @@ -56,10 +56,10 @@ use std::marker::PhantomData; use std::mem::replace; use std::process; use std::sync::mpsc::{Sender, channel, Receiver}; +use style_traits::cursor::Cursor; use style_traits::viewport::ViewportConstraints; use timer_scheduler::TimerScheduler; use url::Url; -use util::cursor::Cursor; use util::geometry::PagePx; use util::thread::spawn_named; use util::{opts, prefs}; diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index 181d7433f0f..944431799c0 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -16,8 +16,8 @@ use net_traits::net_error_list::NetError; use script_traits::{MouseButton, TouchEventType, TouchId}; use std::fmt::{Debug, Error, Formatter}; use std::rc::Rc; +use style_traits::cursor::Cursor; use url::Url; -use util::cursor::Cursor; use util::geometry::ScreenPx; #[derive(Clone)] diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index 9534e26fa39..b9e577d3e90 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -55,6 +55,9 @@ path = "../profile_traits" [dependencies.style] path = "../style" +[dependencies.style_traits] +path = "../style_traits" + [dependencies.azure] git = "https://github.com/servo/rust-azure" features = ["plugins"] diff --git a/components/gfx/display_list/mod.rs b/components/gfx/display_list/mod.rs index c55831bdad5..f3aad7848c7 100644 --- a/components/gfx/display_list/mod.rs +++ b/components/gfx/display_list/mod.rs @@ -37,9 +37,9 @@ use std::sync::Arc; use style::computed_values::{border_style, cursor, filter, image_rendering, mix_blend_mode}; use style::computed_values::{pointer_events}; use style::properties::ComputedValues; +use style_traits::cursor::Cursor; use text::TextRun; use text::glyph::CharIndex; -use util::cursor::Cursor; use util::geometry::MAX_RECT; use util::linked_list::prepend_from; use util::opts; diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs index 1ce6fb64f1c..4d17ad41cb1 100644 --- a/components/gfx/lib.rs +++ b/components/gfx/lib.rs @@ -69,6 +69,7 @@ extern crate skia; extern crate smallvec; extern crate string_cache; extern crate style; +extern crate style_traits; extern crate time; extern crate unicode_script; extern crate url; diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 8ee2de344b7..d549967e753 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -38,6 +38,9 @@ path = "../script_traits" [dependencies.style] path = "../style" +[dependencies.style_traits] +path = "../style_traits" + [dependencies.plugins] path = "../plugins" diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index 93b74f368ef..00f1d9e4d75 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -53,9 +53,9 @@ use style::values::computed; use style::values::computed::LinearGradient; use style::values::computed::{LengthOrNone, LengthOrPercentage, LengthOrPercentageOrAuto}; use style::values::specified::{AngleOrCorner, HorizontalDirection, VerticalDirection}; +use style_traits::cursor::Cursor; use table_cell::CollapsedBordersForCell; use url::Url; -use util::cursor::Cursor; use util::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode}; use util::opts; use util::range::Range; diff --git a/components/layout/lib.rs b/components/layout/lib.rs index 85f70270148..498e91fb206 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -52,6 +52,7 @@ extern crate serde_json; extern crate smallvec; #[macro_use(atom, ns)] extern crate string_cache; extern crate style; +extern crate style_traits; extern crate time; extern crate unicode_bidi; extern crate unicode_script; diff --git a/components/layout/query.rs b/components/layout/query.rs index 84d3071defb..5258c56ec8f 100644 --- a/components/layout/query.rs +++ b/components/layout/query.rs @@ -28,7 +28,7 @@ use style::properties::longhands::{display, position}; use style::properties::style_structs; use style::selector_impl::PseudoElement; use style::values::AuExtensionMethods; -use util::cursor::Cursor; +use style_traits::cursor::Cursor; use util::logical_geometry::WritingMode; use wrapper::{LayoutNode, ThreadSafeLayoutNode}; diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs index 03a925c166e..73da909cb5f 100644 --- a/components/script_traits/script_msg.rs +++ b/components/script_traits/script_msg.rs @@ -15,9 +15,9 @@ use ipc_channel::ipc::IpcSender; use msg::constellation_msg::{Failure, NavigationDirection, PipelineId}; use msg::constellation_msg::{LoadData, SubpageId}; use offscreen_gl_context::GLContextAttributes; +use style_traits::cursor::Cursor; use style_traits::viewport::ViewportConstraints; use url::Url; -use util::cursor::Cursor; /// Messages from the layout to the constellation. #[derive(Deserialize, Serialize)] diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index b1dfc4d674b..e128053f1cd 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -675,6 +675,7 @@ dependencies = [ "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", + "style_traits 0.0.1", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -754,6 +755,7 @@ dependencies = [ "script_traits 0.0.1", "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "servo-glutin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "style_traits 0.0.1", "url 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1010,6 +1012,7 @@ dependencies = [ "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", + "style_traits 0.0.1", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index 46d121c4fb3..c0cab1b1565 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -2513,7 +2513,6 @@ pub mod longhands { ${new_style_struct("Pointing", is_inherited=True)} <%self:longhand name="cursor"> - use util::cursor as util_cursor; pub use self::computed_value::T as SpecifiedValue; use values::computed::ComputedValueAsSpecified; @@ -2522,7 +2521,7 @@ pub mod longhands { pub mod computed_value { use cssparser::ToCss; use std::fmt; - use util::cursor::Cursor; + use style_traits::cursor::Cursor; #[derive(Clone, PartialEq, Eq, Copy, Debug, HeapSizeOf)] pub enum T { @@ -2546,11 +2545,12 @@ pub mod longhands { } pub fn parse(_context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> { use std::ascii::AsciiExt; + use style_traits::cursor::Cursor; let ident = try!(input.expect_ident()); if ident.eq_ignore_ascii_case("auto") { Ok(SpecifiedValue::AutoCursor) } else { - util_cursor::Cursor::from_css_keyword(&ident) + Cursor::from_css_keyword(&ident) .map(SpecifiedValue::SpecifiedCursor) } } diff --git a/components/util/cursor.rs b/components/style_traits/cursor.rs index 7f139fd498e..7f139fd498e 100644 --- a/components/util/cursor.rs +++ b/components/style_traits/cursor.rs diff --git a/components/style_traits/lib.rs b/components/style_traits/lib.rs index 9e65308207e..5cb01bb8c03 100644 --- a/components/style_traits/lib.rs +++ b/components/style_traits/lib.rs @@ -23,6 +23,7 @@ extern crate rustc_serialize; extern crate serde; extern crate util; +pub mod cursor; #[macro_use] pub mod values; pub mod viewport; diff --git a/components/util/lib.rs b/components/util/lib.rs index 42362b74c73..67230bbd821 100644 --- a/components/util/lib.rs +++ b/components/util/lib.rs @@ -51,7 +51,6 @@ use std::sync::Arc; pub mod bezier; pub mod cache; -pub mod cursor; pub mod debug_utils; pub mod deque; pub mod geometry; diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index b533ddcfce4..f39fe38bb9b 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -27,6 +27,7 @@ dependencies = [ "servo 0.0.1", "stb_image 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", + "style_traits 0.0.1", "url 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -615,6 +616,7 @@ dependencies = [ "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", + "style_traits 0.0.1", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -685,6 +687,7 @@ dependencies = [ "script_traits 0.0.1", "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "servo-glutin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "style_traits 0.0.1", "url 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -941,6 +944,7 @@ dependencies = [ "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", + "style_traits 0.0.1", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/cef/Cargo.toml b/ports/cef/Cargo.toml index 9e6ef6ed1aa..d5ac3820cbc 100644 --- a/ports/cef/Cargo.toml +++ b/ports/cef/Cargo.toml @@ -50,6 +50,9 @@ features = ["non-geckolib"] [dependencies.style] path = "../../components/style" +[dependencies.style_traits] +path = "../../components/style_traits" + [dependencies.devtools] path = "../../components/devtools" diff --git a/ports/cef/lib.rs b/ports/cef/lib.rs index 1b47986327c..3600625a419 100644 --- a/ports/cef/lib.rs +++ b/ports/cef/lib.rs @@ -39,6 +39,7 @@ extern crate net_traits; extern crate msg; extern crate util; extern crate style; +extern crate style_traits; extern crate stb_image; extern crate libc; diff --git a/ports/cef/window.rs b/ports/cef/window.rs index cd9f24ec0fa..bf09da7eb04 100644 --- a/ports/cef/window.rs +++ b/ports/cef/window.rs @@ -35,7 +35,7 @@ use std::ptr; use std::rc::Rc; use std::sync::mpsc::{Sender, channel}; use std_url::Url; -use util::cursor::Cursor; +use style_traits::cursor::Cursor; use util::geometry::ScreenPx; #[cfg(target_os="linux")] extern crate x11; diff --git a/ports/glutin/Cargo.toml b/ports/glutin/Cargo.toml index 4f7276c5a64..0b043383977 100644 --- a/ports/glutin/Cargo.toml +++ b/ports/glutin/Cargo.toml @@ -34,6 +34,9 @@ path = "../../components/msg" [dependencies.net_traits] path = "../../components/net_traits" +[dependencies.style_traits] +path = "../../components/style_traits" + [dependencies.util] path = "../../components/util" diff --git a/ports/glutin/lib.rs b/ports/glutin/lib.rs index 109ac254738..785aefb10ea 100644 --- a/ports/glutin/lib.rs +++ b/ports/glutin/lib.rs @@ -17,6 +17,7 @@ extern crate layers; extern crate msg; extern crate net_traits; #[cfg(feature = "window")] extern crate script_traits; +extern crate style_traits; extern crate url; extern crate util; #[cfg(target_os = "linux")] extern crate x11; diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs index 076ace8383d..ccc31dce4f4 100644 --- a/ports/glutin/window.rs +++ b/ports/glutin/window.rs @@ -29,8 +29,8 @@ use std::os::raw::c_void; use std::ptr; use std::rc::Rc; use std::sync::mpsc::{channel, Sender}; +use style_traits::cursor::Cursor; use url::Url; -use util::cursor::Cursor; use util::geometry::ScreenPx; #[cfg(feature = "window")] use util::opts; diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index c410acbe2fe..4a41df0a35f 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -19,6 +19,7 @@ dependencies = [ "script_traits 0.0.1", "servo 0.0.1", "servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "style_traits 0.0.1", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", @@ -617,6 +618,7 @@ dependencies = [ "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", + "style_traits 0.0.1", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -923,6 +925,7 @@ dependencies = [ "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", + "style_traits 0.0.1", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/gonk/Cargo.toml b/ports/gonk/Cargo.toml index e5a24c21e5e..1794ac52137 100644 --- a/ports/gonk/Cargo.toml +++ b/ports/gonk/Cargo.toml @@ -21,6 +21,9 @@ path = "../../components/script" [dependencies.script_traits] path = "../../components/script_traits" +[dependencies.style_traits] +path = "../../components/style_traits" + [dependencies.net_traits] path = "../../components/net_traits" diff --git a/ports/gonk/src/main.rs b/ports/gonk/src/main.rs index 75b31dfa71a..4336ae493f9 100644 --- a/ports/gonk/src/main.rs +++ b/ports/gonk/src/main.rs @@ -35,6 +35,7 @@ extern crate msg; extern crate net_traits; extern crate script_traits; extern crate servo; +extern crate style_traits; extern crate time; extern crate url; extern crate util; diff --git a/ports/gonk/src/window.rs b/ports/gonk/src/window.rs index 5cdf9547929..423dddcead9 100644 --- a/ports/gonk/src/window.rs +++ b/ports/gonk/src/window.rs @@ -30,8 +30,8 @@ use std::mem::{transmute, size_of, zeroed}; use std::ptr; use std::rc::Rc; use std::sync::mpsc::{channel, Sender, Receiver}; +use style_traits::cursor::Cursor; use url::Url; -use util::cursor::Cursor; use util::geometry::ScreenPx; const GRALLOC_USAGE_HW_TEXTURE: c_int = 0x00000100; |