mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Introduce CalcLengthOrPercentage::unclamped_length
This is necessary for some operations, notably converting this to something suitable for gecko.
This commit is contained in:
parent
bcf1a6c5e5
commit
307dd74ecf
9 changed files with 32 additions and 20 deletions
|
@ -241,7 +241,7 @@ impl<S: Side> ToComputedValue for PositionComponent<S> {
|
|||
},
|
||||
ComputedLengthOrPercentage::Calc(calc) => {
|
||||
let p = 1. - calc.percentage.unwrap_or(0.);
|
||||
ComputedLengthOrPercentage::Calc(CalcLengthOrPercentage::new(-calc.length(), Some(p)))
|
||||
ComputedLengthOrPercentage::Calc(CalcLengthOrPercentage::new(-calc.unclamped_length(), Some(p)))
|
||||
},
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue