From b6a17426a02f34cff3dd28340503443467b2dd54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 21 May 2018 11:56:09 +0200 Subject: [PATCH] style: Fix font-stretch animation. This is a regression from #20506 which Gecko tests caught while trying to import this. --- components/style/values/computed/font.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/style/values/computed/font.rs b/components/style/values/computed/font.rs index d486440163c..77a9b09d773 100644 --- a/components/style/values/computed/font.rs +++ b/components/style/values/computed/font.rs @@ -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)) } }