mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Change AnimatedValue for PositiveInteger to CSSInteger
This commit is contained in:
parent
e0b38f9c49
commit
b79dc269f7
2 changed files with 16 additions and 16 deletions
|
@ -11,7 +11,6 @@
|
|||
use app_units::Au;
|
||||
use euclid::{Point2D, Size2D};
|
||||
use smallvec::SmallVec;
|
||||
use std::cmp::max;
|
||||
use values::computed::Angle as ComputedAngle;
|
||||
use values::computed::BorderCornerRadius as ComputedBorderCornerRadius;
|
||||
#[cfg(feature = "servo")]
|
||||
|
@ -22,7 +21,6 @@ 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::computed::PositiveInteger as ComputedPositiveInteger;
|
||||
use values::specified::url::SpecifiedUrl;
|
||||
|
||||
pub mod color;
|
||||
|
@ -308,20 +306,6 @@ impl ToAnimatedValue for ComputedNonNegativeLength {
|
|||
}
|
||||
}
|
||||
|
||||
impl ToAnimatedValue for ComputedPositiveInteger {
|
||||
type AnimatedValue = Self;
|
||||
|
||||
#[inline]
|
||||
fn to_animated_value(self) -> Self {
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn from_animated_value(animated: Self::AnimatedValue) -> Self {
|
||||
max(animated.0, 1).into()
|
||||
}
|
||||
}
|
||||
|
||||
impl ToAnimatedValue for ComputedNonNegativeLengthOrPercentage {
|
||||
type AnimatedValue = Self;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue