Move Animatable::get_zero_value to ToAnimatedZero::to_animated_zero

This commit is contained in:
Anthony Ramine 2017-07-18 15:48:29 +02:00
parent 99592cc3d1
commit 98bf832169
13 changed files with 293 additions and 127 deletions

View file

@ -9,6 +9,7 @@ use cssparser::Parser;
use parser::ParserContext;
use properties::animated_properties::Animatable;
use style_traits::ParseError;
use values::animated::ToAnimatedZero;
/// A generic value for the `initial-letter` property.
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
@ -93,6 +94,14 @@ impl<Value> Animatable for Spacing<Value>
}
}
impl<V> ToAnimatedZero for Spacing<V>
where
V: From<Au>,
{
#[inline]
fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
}
/// A generic value for the `line-height` property.
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq, ToCss)]