style: Fix font-stretch animation.

This is a regression from #20506 which Gecko tests caught while trying to import
this.
This commit is contained in:
Emilio Cobos Álvarez 2018-05-21 11:56:09 +02:00
parent affcf81ce6
commit b6a17426a0
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -21,7 +21,7 @@ use std::slice;
use style_traits::{CssWriter, ParseError, ToCss};
use values::CSSFloat;
use values::animated::{ToAnimatedValue, ToAnimatedZero};
use values::computed::{Angle, Context, Integer, NonNegative, NonNegativeLength, NonNegativePercentage};
use values::computed::{Angle, Context, Integer, NonNegativeLength, NonNegativePercentage};
use values::computed::{Number, Percentage, ToComputedValue};
use values::generics::font::{self as generics, FeatureTagValue, FontSettings, VariationValue};
use values::specified::font::{self as specified, MIN_FONT_WEIGHT, MAX_FONT_WEIGHT};
@ -953,12 +953,12 @@ impl ToAnimatedValue for FontStretch {
#[inline]
fn to_animated_value(self) -> Self::AnimatedValue {
(self.0).0
self.0.to_animated_value()
}
#[inline]
fn from_animated_value(animated: Self::AnimatedValue) -> Self {
FontStretch(NonNegative(animated))
FontStretch(NonNegativePercentage::from_animated_value(animated))
}
}