Auto merge of #9636 - nox:mv-cursor, r=Ms2ger

Move util::cursor to style_traits

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9636)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-02-16 16:50:20 +05:30
commit f0d4c03bd9
27 changed files with 44 additions and 14 deletions

View file

@ -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)
}
}