Auto merge of #16646 - nox:loponu, r=emilio

Reverse Number and LengthOrPercentage in LengthOrPercentageOrNumber

"0" must be parsed as the number 0, not the unitless 0px length.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16646)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-04-29 12:11:51 -05:00 committed by GitHub
commit 5dac4fbd2d
6 changed files with 18 additions and 11 deletions

View file

@ -3784,8 +3784,8 @@ clip-path
for (mut gecko, servo) in self.gecko.mStrokeDasharray.iter_mut().zip(v.0.into_iter()) {
match servo {
Either::First(lop) => gecko.set(lop),
Either::Second(number) => gecko.set_value(CoordDataValue::Factor(number)),
Either::First(number) => gecko.set_value(CoordDataValue::Factor(number)),
Either::Second(lop) => gecko.set(lop),
}
}
}