Introduce CalcLengthOrPercentage::unclamped_length

This is necessary for some operations, notably converting this to something
suitable for gecko.
This commit is contained in:
Anthony Ramine 2017-05-18 19:18:00 +02:00
parent bcf1a6c5e5
commit 307dd74ecf
9 changed files with 32 additions and 20 deletions

View file

@ -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)))
},
}
},