style: Unify the trivial ToComputedValue implementations, and add impls for i32.

This commit is contained in:
Emilio Cobos Álvarez 2017-09-09 13:44:56 +02:00
parent b94dd4885d
commit a4da2220c1
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 6 additions and 7 deletions

View file

@ -20,8 +20,6 @@ macro_rules! trivial_to_computed_value {
} }
} }
trivial_to_computed_value!(i32);
/// A macro to parse an identifier, or return an `UnexpectedIndent` error /// A macro to parse an identifier, or return an `UnexpectedIndent` error
/// otherwise. /// otherwise.
/// ///

View file

@ -333,11 +333,12 @@ impl<T> ToComputedValue for T
} }
} }
impl ComputedValueAsSpecified for Atom {} trivial_to_computed_value!(Atom);
impl ComputedValueAsSpecified for bool {} trivial_to_computed_value!(u8);
impl ComputedValueAsSpecified for f32 {} trivial_to_computed_value!(bool);
trivial_to_computed_value!(i32);
impl ComputedValueAsSpecified for specified::BorderStyle {} trivial_to_computed_value!(f32);
trivial_to_computed_value!(BorderStyle);
/// A `<number>` value. /// A `<number>` value.
pub type Number = CSSFloat; pub type Number = CSSFloat;