From 131949750f44917a7344f21bf37fba41297c21f4 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Thu, 24 Aug 2017 13:56:50 -0700 Subject: [PATCH] Handle calcs in ScrollSnapPoints conversions --- components/style/gecko/values.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/style/gecko/values.rs b/components/style/gecko/values.rs index 69d13c49f4c..04f5d094609 100644 --- a/components/style/gecko/values.rs +++ b/components/style/gecko/values.rs @@ -414,10 +414,8 @@ impl GeckoStyleCoordConvertible for ScrollSnapPoint { Some( match coord.unit() { nsStyleUnit::eStyleUnit_None => ScrollSnapPoint::None, - nsStyleUnit::eStyleUnit_Coord | nsStyleUnit::eStyleUnit_Percent => - ScrollSnapPoint::Repeat(LengthOrPercentage::from_gecko_style_coord(coord) - .expect("coord could not convert to LengthOrPercentage")), - x => panic!("Unexpected unit {:?}", x) + _ => ScrollSnapPoint::Repeat(LengthOrPercentage::from_gecko_style_coord(coord) + .expect("coord could not convert to LengthOrPercentage")), } ) }