mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Handle calcs in ScrollSnapPoints conversions
This commit is contained in:
parent
d4ddec8d33
commit
131949750f
1 changed files with 2 additions and 4 deletions
|
@ -414,10 +414,8 @@ impl GeckoStyleCoordConvertible for ScrollSnapPoint<LengthOrPercentage> {
|
||||||
Some(
|
Some(
|
||||||
match coord.unit() {
|
match coord.unit() {
|
||||||
nsStyleUnit::eStyleUnit_None => ScrollSnapPoint::None,
|
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")),
|
||||||
.expect("coord could not convert to LengthOrPercentage")),
|
|
||||||
x => panic!("Unexpected unit {:?}", x)
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue