mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Change AnimatedValue for NonNegativeNumber to CSSFloat
This commit is contained in:
parent
da5acc81d2
commit
f89ebf7fe9
5 changed files with 22 additions and 42 deletions
|
@ -55,7 +55,6 @@ use values::distance::{ComputeSquaredDistance, SquaredDistance};
|
|||
use values::generics::font::FontSettings as GenericFontSettings;
|
||||
use values::computed::font::FontVariationSettings;
|
||||
use values::generics::font::VariationValue;
|
||||
use values::generics::NonNegative;
|
||||
use values::generics::effects::Filter;
|
||||
use values::generics::position as generic_position;
|
||||
use values::generics::svg::{SVGLength, SvgLengthOrPercentageOrNumber, SVGPaint};
|
||||
|
@ -789,7 +788,7 @@ impl ToAnimatedZero for AnimationValue {
|
|||
impl RepeatableListAnimatable for LengthOrPercentage {}
|
||||
impl RepeatableListAnimatable for Either<f32, LengthOrPercentage> {}
|
||||
impl RepeatableListAnimatable for Either<NonNegativeNumber, NonNegativeLengthOrPercentage> {}
|
||||
impl RepeatableListAnimatable for SvgLengthOrPercentageOrNumber<LengthOrPercentage, NonNegativeNumber> {}
|
||||
impl RepeatableListAnimatable for SvgLengthOrPercentageOrNumber<LengthOrPercentage, Number> {}
|
||||
|
||||
macro_rules! repeated_vec_impl {
|
||||
($($ty:ty),*) => {
|
||||
|
@ -3012,12 +3011,8 @@ impl Animate for AnimatedFilter {
|
|||
},
|
||||
% endfor
|
||||
% for func in ['Brightness', 'Contrast', 'Opacity', 'Saturate']:
|
||||
(&Filter::${func}(ref this), &Filter::${func}(ref other)) => {
|
||||
Ok(Filter::${func}(NonNegative(animate_multiplicative_factor(
|
||||
this.0,
|
||||
other.0,
|
||||
procedure,
|
||||
)?)))
|
||||
(&Filter::${func}(this), &Filter::${func}(other)) => {
|
||||
Ok(Filter::${func}(animate_multiplicative_factor(this, other, procedure)?))
|
||||
},
|
||||
% endfor
|
||||
% if product == "gecko":
|
||||
|
@ -3038,7 +3033,7 @@ impl ToAnimatedZero for AnimatedFilter {
|
|||
Filter::${func}(ref this) => Ok(Filter::${func}(this.to_animated_zero()?)),
|
||||
% endfor
|
||||
% for func in ['Brightness', 'Contrast', 'Opacity', 'Saturate']:
|
||||
Filter::${func}(_) => Ok(Filter::${func}(NonNegative(1.))),
|
||||
Filter::${func}(_) => Ok(Filter::${func}(1.)),
|
||||
% endfor
|
||||
% if product == "gecko":
|
||||
Filter::DropShadow(ref this) => Ok(Filter::DropShadow(this.to_animated_zero()?)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue