style: Use Rust types for perspective and z-index.

Differential Revision: https://phabricator.services.mozilla.com/D20381
This commit is contained in:
Emilio Cobos Álvarez 2019-02-19 23:04:45 +00:00
parent 6428ed726d
commit 74d7d5bc42
8 changed files with 17 additions and 87 deletions

View file

@ -74,6 +74,7 @@ pub enum AnimationIterationCount<Number> {
Copy,
Debug,
MallocSizeOf,
Parse,
PartialEq,
SpecifiedValueInfo,
ToAnimatedValue,
@ -81,13 +82,16 @@ pub enum AnimationIterationCount<Number> {
ToComputedValue,
ToCss,
)]
pub enum Perspective<NonNegativeLength> {
#[repr(C, u8)]
pub enum GenericPerspective<NonNegativeLength> {
/// A non-negative length.
Length(NonNegativeLength),
/// The keyword `none`.
None,
}
pub use self::GenericPerspective as Perspective;
impl<L> Perspective<L> {
/// Returns `none`.
#[inline]

View file

@ -45,18 +45,22 @@ impl<H, V> Position<H, V> {
Debug,
MallocSizeOf,
PartialEq,
Parse,
SpecifiedValueInfo,
ToAnimatedZero,
ToComputedValue,
ToCss,
)]
pub enum ZIndex<Integer> {
#[repr(C, u8)]
pub enum GenericZIndex<I> {
/// An integer value.
Integer(Integer),
Integer(I),
/// The keyword `auto`.
Auto,
}
pub use self::GenericZIndex as ZIndex;
impl<Integer> ZIndex<Integer> {
/// Returns `auto`
#[inline]