diff --git a/components/style/values/generics/basic_shape.rs b/components/style/values/generics/basic_shape.rs index 99de026d706..3de30a30a69 100644 --- a/components/style/values/generics/basic_shape.rs +++ b/components/style/values/generics/basic_shape.rs @@ -94,10 +94,13 @@ pub struct Ellipse { /// https://drafts.csswg.org/css-shapes/#typedef-shape-radius #[allow(missing_docs)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] -#[derive(Clone, ComputeSquaredDistance, Copy, Debug, PartialEq, ToComputedValue, ToCss)] +#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, PartialEq)] +#[derive(ToComputedValue, ToCss)] pub enum ShapeRadius { Length(LengthOrPercentage), + #[animation(error)] ClosestSide, + #[animation(error)] FarthestSide, } @@ -191,20 +194,6 @@ impl ToCss for InsetRect } } -impl Animate for ShapeRadius -where - L: Animate, -{ - fn animate(&self, other: &Self, procedure: Procedure) -> Result { - match (self, other) { - (&ShapeRadius::Length(ref this), &ShapeRadius::Length(ref other)) => { - Ok(ShapeRadius::Length(this.animate(other, procedure)?)) - }, - _ => Err(()), - } - } -} - impl Default for ShapeRadius { #[inline] fn default() -> Self { ShapeRadius::ClosestSide }