Auto merge of #15613 - Varentsov:master, r=upsuper

fix {transform,perspective}-origin accepts (and ignores) anything for…

… their second part of value

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15487.

<!-- Either: -->
- [X] There are tests for these changes OR

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/15613)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-02-26 17:40:23 -08:00 committed by GitHub
commit b2539090fa
2 changed files with 31 additions and 1 deletions

View file

@ -487,7 +487,7 @@ pub fn parse_origin(context: &ParserContext, input: &mut Parser) -> Result<Origi
}
Ok(())
}) {
match LengthOrPercentage::parse(context, input) {
match input.try(|input| LengthOrPercentage::parse(context, input)) {
Ok(value) => {
if horizontal.is_none() {
horizontal = Some(value);