Change AnimatedValue for NonNegativeLengthOrPercentage to its inner type

This commit is contained in:
Anthony Ramine 2018-02-12 23:35:18 +01:00
parent b79dc269f7
commit da5acc81d2
3 changed files with 16 additions and 17 deletions

View file

@ -19,7 +19,6 @@ use values::computed::GreaterThanOrEqualToOneNumber as ComputedGreaterThanOrEqua
use values::computed::MaxLength as ComputedMaxLength;
use values::computed::MozLength as ComputedMozLength;
use values::computed::NonNegativeLength as ComputedNonNegativeLength;
use values::computed::NonNegativeLengthOrPercentage as ComputedNonNegativeLengthOrPercentage;
use values::computed::NonNegativeNumber as ComputedNonNegativeNumber;
use values::specified::url::SpecifiedUrl;
@ -306,20 +305,6 @@ impl ToAnimatedValue for ComputedNonNegativeLength {
}
}
impl ToAnimatedValue for ComputedNonNegativeLengthOrPercentage {
type AnimatedValue = Self;
#[inline]
fn to_animated_value(self) -> Self {
self
}
#[inline]
fn from_animated_value(animated: Self::AnimatedValue) -> Self {
animated.0.clamp_to_non_negative().into()
}
}
impl ToAnimatedValue for ComputedBorderCornerRadius {
type AnimatedValue = Self;