mirror of
https://github.com/servo/servo.git
synced 2025-07-02 21:13:39 +01:00
Replace LengthOrNone by a specific type for the perspective property
This was its only use, and it was bugged: AFAIK this didn't properly clamp animated values below 0.
This commit is contained in:
parent
4a98fa70bf
commit
260e05320c
11 changed files with 88 additions and 32 deletions
|
@ -5,8 +5,9 @@
|
|||
//! Computed types for box properties.
|
||||
|
||||
use values::computed::Number;
|
||||
use values::computed::length::LengthOrPercentage;
|
||||
use values::computed::length::{LengthOrPercentage, NonNegativeLength};
|
||||
use values::generics::box_::AnimationIterationCount as GenericAnimationIterationCount;
|
||||
use values::generics::box_::Perspective as GenericPerspective;
|
||||
use values::generics::box_::VerticalAlign as GenericVerticalAlign;
|
||||
|
||||
pub use values::specified::box_::{AnimationName, Display, OverflowClipBox, Contain};
|
||||
|
@ -25,3 +26,6 @@ impl AnimationIterationCount {
|
|||
GenericAnimationIterationCount::Number(1.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// A computed value for the `perspective` property.
|
||||
pub type Perspective = GenericPerspective<NonNegativeLength>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue