mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
servo: Merge #9636 - Move util::cursor to style_traits (from nox:mv-cursor); r=Ms2ger
Source-Repo: https://github.com/servo/servo Source-Revision: f0d4c03bd9c9e181aa1225aec978c2f539e9aeb0 --HG-- rename : servo/components/util/cursor.rs => servo/components/style_traits/cursor.rs
This commit is contained in:
parent
bf40b74180
commit
31c444dd4c
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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)]
|
||||
|
@ -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"]
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -38,6 +38,9 @@ path = "../script_traits"
|
||||
[dependencies.style]
|
||||
path = "../style"
|
||||
|
||||
[dependencies.style_traits]
|
||||
path = "../style_traits"
|
||||
|
||||
[dependencies.plugins]
|
||||
path = "../plugins"
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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)]
|
||||
|
3
servo/components/servo/Cargo.lock
generated
3
servo/components/servo/Cargo.lock
generated
@ -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)",
|
||||
|
@ -2517,7 +2517,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;
|
||||
|
||||
@ -2526,7 +2525,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 {
|
||||
@ -2550,11 +2549,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)
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -50,7 +50,6 @@ extern crate uuid;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub mod cache;
|
||||
pub mod cursor;
|
||||
pub mod debug_utils;
|
||||
pub mod deque;
|
||||
pub mod geometry;
|
||||
|
4
servo/ports/cef/Cargo.lock
generated
4
servo/ports/cef/Cargo.lock
generated
@ -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)",
|
||||
|
@ -50,6 +50,9 @@ features = ["non-geckolib"]
|
||||
[dependencies.style]
|
||||
path = "../../components/style"
|
||||
|
||||
[dependencies.style_traits]
|
||||
path = "../../components/style_traits"
|
||||
|
||||
[dependencies.devtools]
|
||||
path = "../../components/devtools"
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
3
servo/ports/gonk/Cargo.lock
generated
3
servo/ports/gonk/Cargo.lock
generated
@ -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)",
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user