aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2016-07-01 21:02:28 -0700
committerMichael Howell <michael@notriddle.com>2016-07-01 21:11:49 -0700
commitf9a8fe0afef5b4a6bac6071b812a4faac0f963b7 (patch)
treee4ad00ebf4f4715a95e8fab2028f3d59487c8bf1
parent1ed06777ee1e69c8b56715c897a5bd66ad9e235e (diff)
downloadservo-f9a8fe0afef5b4a6bac6071b812a4faac0f963b7.tar.gz
servo-f9a8fe0afef5b4a6bac6071b812a4faac0f963b7.zip
Do not crash on partial calc interpolation
Fixes #12151 Fixes regression introduced by #11924
-rw-r--r--components/style/properties/helpers/animated_properties.mako.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs
index 552f5b303c3..ad34f59dc89 100644
--- a/components/style/properties/helpers/animated_properties.mako.rs
+++ b/components/style/properties/helpers/animated_properties.mako.rs
@@ -329,8 +329,8 @@ impl Interpolate for CalcLengthOrPercentage {
#[inline]
fn interpolate(&self, other: &Self, time: f64) -> Result<Self, ()> {
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),
})
}
}