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

@ -1520,7 +1520,7 @@ impl Fragment {
LengthOrPercentageOrAuto::Calc(calc) => {
// TODO(nox): This is probably wrong, because it accounts neither for
// clamping (not sure if necessary here) nor percentage.
calc.unclamped_length()
Au::from(calc.unclamped_length())
},
};