mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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:
commit
d7f7d550ab
1 changed files with 2 additions and 4 deletions
|
@ -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)
|
||||
.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")),
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue