mirror of
https://github.com/servo/servo.git
synced 2025-07-08 16:03:40 +01:00
use ::parse_non_negative instead of ::parse for background_size parsing
This commit is contained in:
parent
8ca1383c41
commit
3da559488d
3 changed files with 23 additions and 3 deletions
|
@ -373,7 +373,7 @@ ${helpers.single_keyword("background-origin",
|
|||
})
|
||||
}
|
||||
|
||||
pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue,()> {
|
||||
pub fn parse(_context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue,()> {
|
||||
let width;
|
||||
if let Ok(value) = input.try(|input| {
|
||||
match input.next() {
|
||||
|
@ -389,7 +389,7 @@ ${helpers.single_keyword("background-origin",
|
|||
}) {
|
||||
return Ok(value)
|
||||
} else {
|
||||
width = try!(specified::LengthOrPercentageOrAuto::parse(context, input))
|
||||
width = try!(specified::LengthOrPercentageOrAuto::parse_non_negative(input))
|
||||
}
|
||||
|
||||
let height;
|
||||
|
@ -401,7 +401,7 @@ ${helpers.single_keyword("background-origin",
|
|||
}) {
|
||||
height = value
|
||||
} else {
|
||||
height = try!(specified::LengthOrPercentageOrAuto::parse(context, input));
|
||||
height = try!(specified::LengthOrPercentageOrAuto::parse_non_negative(input));
|
||||
}
|
||||
|
||||
Ok(SpecifiedValue::Explicit(ExplicitSize {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue