Make AnimationValue have the same variants as PropertyDeclaration

By making AnimationValue have the same representation as PropertyDeclaration
and Void variants for non-animatable properties, we know by constructions
that all properties have the same discriminant in both.
This commit is contained in:
Anthony Ramine 2018-02-09 22:34:59 +01:00
parent 6b1a74672d
commit 79775541f2
7 changed files with 58 additions and 35 deletions

View file

@ -195,14 +195,6 @@ pub mod shorthands {
%>
}
/// A module with all the code related to animated properties.
///
/// This needs to be "included" by mako at least after all longhand modules,
/// given they populate the global data.
pub mod animated_properties {
<%include file="/helpers/animated_properties.mako.rs" />
}
<%
from itertools import groupby
@ -413,6 +405,14 @@ impl PropertyDeclaration {
}
}
/// A module with all the code related to animated properties.
///
/// This needs to be "included" by mako at least after all longhand modules,
/// given they populate the global data.
pub mod animated_properties {
<%include file="/helpers/animated_properties.mako.rs" />
}
/// A longhand or shorthand porperty
#[derive(Clone, Copy, Debug)]
pub struct NonCustomPropertyId(usize);