mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Change AnimatedValue for NonNegativeLengthOrPercentage to its inner type
This commit is contained in:
parent
b79dc269f7
commit
da5acc81d2
3 changed files with 16 additions and 17 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue