diff --git a/components/style/properties/longhand/font.mako.rs b/components/style/properties/longhand/font.mako.rs index 51c2e38181c..7dc51dca3d4 100644 --- a/components/style/properties/longhand/font.mako.rs +++ b/components/style/properties/longhand/font.mako.rs @@ -1116,12 +1116,12 @@ ${helpers.single_keyword_system("font-variant-caps", pub mod computed_value { use values::CSSFloat; - use values::animated::{Animate, Procedure, ToAnimatedValue, ToAnimatedZero}; - use values::distance::{ComputeSquaredDistance, SquaredDistance}; + use values::animated::{ToAnimatedValue, ToAnimatedZero}; #[cfg_attr(feature = "servo", derive(HeapSizeOf))] - #[derive(Clone, Copy, Debug, PartialEq, ToCss)] + #[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, PartialEq, ToCss)] pub enum T { + #[animation(error)] None, Number(CSSFloat), } @@ -1136,27 +1136,6 @@ ${helpers.single_keyword_system("font-variant-caps", } } - impl Animate for T { - fn animate(&self, other: &Self, procedure: Procedure) -> Result { - match (self, other) { - (&T::Number(ref number), &T::Number(ref other)) => { - Ok(T::Number(number.animate(other, procedure)?)) - }, - _ => Err(()), - } - } - } - - impl ComputeSquaredDistance for T { - #[inline] - fn compute_squared_distance(&self, other: &Self) -> Result { - match (self, other) { - (&T::Number(ref this), &T::Number(ref other)) => this.compute_squared_distance(other), - _ => Err(()), - } - } - } - impl ToAnimatedZero for T { #[inline] fn to_animated_zero(&self) -> Result { Err(()) }