mirror of
https://github.com/servo/servo.git
synced 2025-08-25 23:28:21 +01:00
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:
parent
6b1a74672d
commit
79775541f2
7 changed files with 58 additions and 35 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue