mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Move util::cursor to style_traits
This commit is contained in:
parent
c929dbe253
commit
290694b27e
27 changed files with 44 additions and 14 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue