Replace Au with CSSPixelLength in CalcLengthOrPercentage.

We replace Au with CSSPixelLength for the length part of
computed::CalcLengthOrPercentage. Therefore, it would be easier to use
CSSPixelLength for all other LengthOrPercentage{*} types.
This commit is contained in:
Boris Chiou 2017-09-08 17:43:41 +08:00
parent a949e2a057
commit 535c1e3c6f
13 changed files with 99 additions and 117 deletions

View file

@ -74,7 +74,7 @@ impl TransformList {
match *lop {
LengthOrPercentage::Length(au) => au.to_f32_px(),
LengthOrPercentage::Percentage(_) => 0.,
LengthOrPercentage::Calc(calc) => calc.length().to_f32_px(),
LengthOrPercentage::Calc(calc) => calc.length().px(),
}
};