mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Introduce #[animation]
For now, only #[animation(error)] is supported on variants and it makes both #[derive(Animate)] and #[derive(ComputeSquaredDistance)] ignore this particular variant.
This commit is contained in:
parent
17d97cf87b
commit
ff67fc751d
5 changed files with 31 additions and 45 deletions
|
@ -370,11 +370,12 @@ ${helpers.single_keyword("position", "static absolute relative fixed",
|
|||
/// The keywords are the same, and the `LengthOrPercentage` is computed
|
||||
/// here.
|
||||
#[allow(non_camel_case_types)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, PartialEq)]
|
||||
pub enum T {
|
||||
% for keyword in vertical_align_keywords:
|
||||
${to_rust_ident(keyword)},
|
||||
#[animation(error)] // only animatable as a length
|
||||
${to_rust_ident(keyword)},
|
||||
% endfor
|
||||
LengthOrPercentage(computed::LengthOrPercentage),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue