Use CSSPixelLength in LengthOrPercentage{*}.

Replace Au with CSSPixelLength in LengthOrPercentage,
LengthOrPercentageOrAuto, and LengthOrPercentageOrNone.
This commit is contained in:
Boris Chiou 2017-09-13 14:27:52 +08:00
parent 535c1e3c6f
commit b89286e8e7
25 changed files with 109 additions and 118 deletions

View file

@ -203,7 +203,7 @@ impl<S: Side> ToComputedValue for PositionComponent<S> {
match length.to_computed_value(context) {
ComputedLengthOrPercentage::Length(length) => {
ComputedLengthOrPercentage::Calc(
CalcLengthOrPercentage::new((-length).into(), Some(Percentage::hundred())))
CalcLengthOrPercentage::new(-length, Some(Percentage::hundred())))
},
ComputedLengthOrPercentage::Percentage(p) => {
ComputedLengthOrPercentage::Percentage(Percentage(1.0 - p.0))