mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Support calc for fit-content()
This commit is contained in:
parent
4dcc2d1c9d
commit
2250e79976
1 changed files with 2 additions and 1 deletions
|
@ -810,7 +810,8 @@ impl TrackSize<LengthOrPercentage> {
|
||||||
|
|
||||||
if gecko_min.unit() == nsStyleUnit::eStyleUnit_None {
|
if gecko_min.unit() == nsStyleUnit::eStyleUnit_None {
|
||||||
debug_assert!(gecko_max.unit() == nsStyleUnit::eStyleUnit_Coord ||
|
debug_assert!(gecko_max.unit() == nsStyleUnit::eStyleUnit_Coord ||
|
||||||
gecko_max.unit() == nsStyleUnit::eStyleUnit_Percent);
|
gecko_max.unit() == nsStyleUnit::eStyleUnit_Percent ||
|
||||||
|
gecko_max.unit() == nsStyleUnit::eStyleUnit_Calc);
|
||||||
return TrackSize::FitContent(LengthOrPercentage::from_gecko_style_coord(gecko_max)
|
return TrackSize::FitContent(LengthOrPercentage::from_gecko_style_coord(gecko_max)
|
||||||
.expect("gecko_max could not convert to LengthOrPercentage"));
|
.expect("gecko_max could not convert to LengthOrPercentage"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue