mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Properly parse background-size in background longhand (fixes #15199)
This commit is contained in:
parent
7f825d2119
commit
efdc67d5a1
2 changed files with 3 additions and 11 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue