style: Add computed value ZeroToOneNumber.

Correctly handle clamping to 1 behavior of grayscale(),
invert(), opacity() and sepia().

Differential Revision: https://phabricator.services.mozilla.com/D35509
This commit is contained in:
violet 2019-06-23 23:01:47 +00:00 committed by Emilio Cobos Álvarez
parent 9939c1ee07
commit 2fba62aba9
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
6 changed files with 132 additions and 73 deletions

View file

@ -19,8 +19,8 @@ pub type AnimatedSimpleShadow = GenericSimpleShadow<Color, Length, Length>;
/// An animated value for a single `filter`.
#[cfg(feature = "gecko")]
pub type AnimatedFilter = GenericFilter<Angle, Number, Length, AnimatedSimpleShadow, ComputedUrl>;
pub type AnimatedFilter = GenericFilter<Angle, Number, Number, Length, AnimatedSimpleShadow, ComputedUrl>;
/// An animated value for a single `filter`.
#[cfg(not(feature = "gecko"))]
pub type AnimatedFilter = GenericFilter<Angle, Number, Length, Impossible, Impossible>;
pub type AnimatedFilter = GenericFilter<Angle, Number, Number, Length, Impossible, Impossible>;