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 7a76978 + af1c026 commit 28473e1
Showing 1 changed file with 3 additions and 5 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

0 comments on commit 28473e1

Please sign in to comment.