Auto merge of #16513 - nox:background-slash-size, r=upsuper

Properly parse background-size in background longhand (fixes #15199)

<!-- 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/16513)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-04-20 05:19:37 -05:00 committed by GitHub
commit 26fd65995d
2 changed files with 3 additions and 11 deletions

View file

@ -494,11 +494,9 @@ ${helpers.single_keyword("background-origin",
let width =
try!(specified::LengthOrPercentageOrAuto::parse_non_negative(context, input));
let height = if input.is_exhausted() {
specified::LengthOrPercentageOrAuto::Auto
} else {
try!(specified::LengthOrPercentageOrAuto::parse_non_negative(context, input))
};
let height = input.try(|input| {
specified::LengthOrPercentageOrAuto::parse_non_negative(context, input)
}).unwrap_or(specified::LengthOrPercentageOrAuto::Auto);
Ok(SpecifiedValue::Explicit(ExplicitSize {
width: width,

View file

@ -12,12 +12,6 @@
[background_specified_repeat]
expected: FAIL
[background_specified_attachment]
expected: FAIL
[background_specified_origin]
expected: FAIL
[background_specified_color]
expected: FAIL