mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Use cbindgen for filters.
Had to implement some OwnedSlice bits that the canvas code used. Differential Revision: https://phabricator.services.mozilla.com/D31799
This commit is contained in:
parent
ccff9b294f
commit
57868f571f
8 changed files with 26 additions and 150 deletions
|
@ -18,7 +18,7 @@ use crate::values::specified::length::{Length, NonNegativeLength};
|
|||
#[cfg(feature = "gecko")]
|
||||
use crate::values::specified::url::SpecifiedUrl;
|
||||
use crate::values::specified::{Angle, Number, NumberOrPercentage};
|
||||
#[cfg(not(feature = "gecko"))]
|
||||
#[cfg(feature = "servo")]
|
||||
use crate::values::Impossible;
|
||||
use crate::Zero;
|
||||
use cssparser::{self, BasicParseErrorKind, Parser, Token};
|
||||
|
@ -30,11 +30,13 @@ pub type BoxShadow =
|
|||
|
||||
/// A specified value for a single `filter`.
|
||||
#[cfg(feature = "gecko")]
|
||||
pub type Filter = GenericFilter<Angle, Factor, NonNegativeLength, SimpleShadow, SpecifiedUrl>;
|
||||
pub type SpecifiedFilter = GenericFilter<Angle, Factor, NonNegativeLength, SimpleShadow, SpecifiedUrl>;
|
||||
|
||||
/// A specified value for a single `filter`.
|
||||
#[cfg(not(feature = "gecko"))]
|
||||
pub type Filter = GenericFilter<Angle, Factor, NonNegativeLength, Impossible, Impossible>;
|
||||
#[cfg(feature = "servo")]
|
||||
pub type SpecifiedFilter = GenericFilter<Angle, Factor, NonNegativeLength, Impossible, Impossible>;
|
||||
|
||||
pub use self::SpecifiedFilter as Filter;
|
||||
|
||||
/// A value for the `<factor>` parts in `Filter`.
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue