Auto merge of #18223 - Manishearth:stylo-scrollsnap, r=emilio

Handle calcs in ScrollSnapPoints conversions

fixes bug 1393580

https://bugzilla.mozilla.org/show_bug.cgi?id=1393580

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18223)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-24 18:42:44 -05:00 committed by GitHub
commit d7f7d550ab

View file

@ -414,10 +414,8 @@ impl GeckoStyleCoordConvertible for ScrollSnapPoint<LengthOrPercentage> {
Some(
match coord.unit() {
nsStyleUnit::eStyleUnit_None => ScrollSnapPoint::None,
nsStyleUnit::eStyleUnit_Coord | nsStyleUnit::eStyleUnit_Percent =>
ScrollSnapPoint::Repeat(LengthOrPercentage::from_gecko_style_coord(coord)
_ => ScrollSnapPoint::Repeat(LengthOrPercentage::from_gecko_style_coord(coord)
.expect("coord could not convert to LengthOrPercentage")),
x => panic!("Unexpected unit {:?}", x)
}
)
}