diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs index 52b2e181f6a..504a72cf498 100644 --- a/components/style/properties/helpers/animated_properties.mako.rs +++ b/components/style/properties/helpers/animated_properties.mako.rs @@ -324,8 +324,8 @@ impl Interpolate for CalcLengthOrPercentage { #[inline] fn interpolate(&self, other: &Self, time: f64) -> Result { Ok(CalcLengthOrPercentage { - length: try!(self.length.interpolate(&other.length, time)), - percentage: try!(self.percentage.interpolate(&other.percentage, time)), + length: self.length.interpolate(&other.length, time).ok().and_then(|x|x), + percentage: self.percentage.interpolate(&other.percentage, time).ok().and_then(|x|x), }) } } diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 2fcfe5ff25b..32d55768235 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -5320,6 +5320,18 @@ "url": "/_mozilla/css/transition_calc.html" } ], + "css/transition_calc_implicit.html": [ + { + "path": "css/transition_calc_implicit.html", + "references": [ + [ + "/_mozilla/css/transition_calc_implicit_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/transition_calc_implicit.html" + } + ], "css/translate_clip.html": [ { "path": "css/translate_clip.html", @@ -12440,6 +12452,18 @@ "url": "/_mozilla/css/transition_calc.html" } ], + "css/transition_calc_implicit.html": [ + { + "path": "css/transition_calc_implicit.html", + "references": [ + [ + "/_mozilla/css/transition_calc_implicit_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/transition_calc_implicit.html" + } + ], "css/translate_clip.html": [ { "path": "css/translate_clip.html", diff --git a/tests/wpt/mozilla/tests/css/transition_calc_implicit.html b/tests/wpt/mozilla/tests/css/transition_calc_implicit.html new file mode 100644 index 00000000000..a4cca7548ae --- /dev/null +++ b/tests/wpt/mozilla/tests/css/transition_calc_implicit.html @@ -0,0 +1,21 @@ + + + +
+ diff --git a/tests/wpt/mozilla/tests/css/transition_calc_implicit_ref.html b/tests/wpt/mozilla/tests/css/transition_calc_implicit_ref.html new file mode 100644 index 00000000000..0e76edd65b7 --- /dev/null +++ b/tests/wpt/mozilla/tests/css/transition_calc_implicit_ref.html @@ -0,0 +1 @@ +