mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +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(
|
||||
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