mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Do not use CVAS for the cursor property
This commit is contained in:
parent
83cddadedc
commit
6ac5e94f46
2 changed files with 5 additions and 6 deletions
|
@ -9,12 +9,9 @@
|
||||||
<%helpers:longhand name="cursor" boxed="${product == 'gecko'}" animation_value_type="discrete"
|
<%helpers:longhand name="cursor" boxed="${product == 'gecko'}" animation_value_type="discrete"
|
||||||
spec="https://drafts.csswg.org/css-ui/#cursor">
|
spec="https://drafts.csswg.org/css-ui/#cursor">
|
||||||
pub use self::computed_value::T as SpecifiedValue;
|
pub use self::computed_value::T as SpecifiedValue;
|
||||||
use values::computed::ComputedValueAsSpecified;
|
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
use values::specified::url::SpecifiedUrl;
|
use values::specified::url::SpecifiedUrl;
|
||||||
|
|
||||||
impl ComputedValueAsSpecified for SpecifiedValue {}
|
|
||||||
|
|
||||||
pub mod computed_value {
|
pub mod computed_value {
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
@ -25,7 +22,7 @@
|
||||||
use values::specified::url::SpecifiedUrl;
|
use values::specified::url::SpecifiedUrl;
|
||||||
|
|
||||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, ToCss)]
|
#[derive(Clone, Copy, Debug, PartialEq, ToComputedValue, ToCss)]
|
||||||
pub enum Keyword {
|
pub enum Keyword {
|
||||||
Auto,
|
Auto,
|
||||||
Cursor(Cursor),
|
Cursor(Cursor),
|
||||||
|
@ -35,14 +32,14 @@
|
||||||
pub type T = Keyword;
|
pub type T = Keyword;
|
||||||
|
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq, ToComputedValue)]
|
||||||
pub struct Image {
|
pub struct Image {
|
||||||
pub url: SpecifiedUrl,
|
pub url: SpecifiedUrl,
|
||||||
pub hotspot: Option<(f32, f32)>,
|
pub hotspot: Option<(f32, f32)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq, ToComputedValue)]
|
||||||
pub struct T {
|
pub struct T {
|
||||||
pub images: Vec<Image>,
|
pub images: Vec<Image>,
|
||||||
pub keyword: Keyword,
|
pub keyword: Keyword,
|
||||||
|
|
|
@ -19,6 +19,7 @@ use std::fmt;
|
||||||
#[cfg(feature = "servo")]
|
#[cfg(feature = "servo")]
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style_traits::ToCss;
|
use style_traits::ToCss;
|
||||||
|
use style_traits::cursor::Cursor;
|
||||||
use super::{CSSFloat, CSSInteger};
|
use super::{CSSFloat, CSSInteger};
|
||||||
use super::generics::{GreaterThanOrEqualToOne, NonNegative};
|
use super::generics::{GreaterThanOrEqualToOne, NonNegative};
|
||||||
use super::generics::grid::{GridLine as GenericGridLine, TrackBreadth as GenericTrackBreadth};
|
use super::generics::grid::{GridLine as GenericGridLine, TrackBreadth as GenericTrackBreadth};
|
||||||
|
@ -340,6 +341,7 @@ trivial_to_computed_value!(u8);
|
||||||
trivial_to_computed_value!(u16);
|
trivial_to_computed_value!(u16);
|
||||||
trivial_to_computed_value!(Atom);
|
trivial_to_computed_value!(Atom);
|
||||||
trivial_to_computed_value!(BorderStyle);
|
trivial_to_computed_value!(BorderStyle);
|
||||||
|
trivial_to_computed_value!(Cursor);
|
||||||
trivial_to_computed_value!(Namespace);
|
trivial_to_computed_value!(Namespace);
|
||||||
trivial_to_computed_value!(String);
|
trivial_to_computed_value!(String);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue