Skip to content

Commit

Permalink
Auto merge of #16513 - nox:background-slash-size, r=upsuper
Browse files Browse the repository at this point in the history
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 -->
  • Loading branch information
bors-servo committed Apr 18, 2017
2 parents 2b353e0 + 589fbff commit 97ce3ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
8 changes: 3 additions & 5 deletions components/style/properties/longhand/background.mako.rs
Expand Up @@ -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,
Expand Down
Expand Up @@ -3,18 +3,12 @@
[background_specified_image]
expected: FAIL

[background_specified_position]
expected: FAIL

[background_specified_size]
expected: FAIL

[background_specified_repeat]
expected: FAIL

[background_specified_attachment]
expected: FAIL

[background_specified_origin]
expected: FAIL

Expand Down

0 comments on commit 97ce3ae

Please sign in to comment.