Introduce #[animation(constant)] for the Animate trait

This allows us to handle fields that should be the same during animations.
This commit is contained in:
Anthony Ramine 2017-08-25 23:51:12 +02:00
parent e49dbc4dfa
commit eaf2f1ec33
5 changed files with 59 additions and 52 deletions

View file

@ -11,13 +11,14 @@ use values::specified::url::SpecifiedUrl;
/// A generic value for a single `box-shadow`.
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, Debug, HasViewportPercentage, PartialEq, ToAnimatedValue)]
#[derive(Animate, Clone, Debug, HasViewportPercentage, PartialEq, ToAnimatedValue)]
pub struct BoxShadow<Color, SizeLength, BlurShapeLength, ShapeLength> {
/// The base shadow.
pub base: SimpleShadow<Color, SizeLength, BlurShapeLength>,
/// The spread radius.
pub spread: ShapeLength,
/// Whether this is an inset box shadow.
#[animation(constant)]
pub inset: bool,
}