Skip to content

Commit

Permalink
Properly parse background-size in background longhand (fixes #15199)
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Apr 18, 2017
1 parent 56435db commit 589fbff
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 589fbff

Please sign in to comment.