Properly serialize % values in calc expressions

This commit is contained in:
David Zbarsky 2015-08-13 14:33:21 -04:00
parent cfa1e467f1
commit 6573e8088c
4 changed files with 50 additions and 41 deletions

View file

@ -451,7 +451,7 @@ impl ViewportConstraints {
LengthOrPercentageOrAuto::Length(value) =>
Some(value.to_computed_value(&context)),
LengthOrPercentageOrAuto::Percentage(value) =>
Some(initial_viewport.$dimension.scale_by(value)),
Some(initial_viewport.$dimension.scale_by(value.0)),
LengthOrPercentageOrAuto::Auto => None,
LengthOrPercentageOrAuto::Calc(calc) => {
let calc = calc.to_computed_value(&context);