Skip to content

Commit

Permalink
Reject negative value for border-image-width
Browse files Browse the repository at this point in the history
  • Loading branch information
upsuper committed Feb 2, 2017
1 parent 8b9dc93 commit bf52419
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/style/properties/longhand/border.mako.rs
Expand Up @@ -521,12 +521,12 @@ ${helpers.single_keyword("-moz-float-edge", "content-box margin-box",
}

impl Parse for SingleSpecifiedValue {
fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
fn parse(_context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
if input.try(|input| input.expect_ident_matching("auto")).is_ok() {
return Ok(SingleSpecifiedValue::Auto);
}

if let Ok(len) = input.try(|input| LengthOrPercentage::parse(context, input)) {
if let Ok(len) = input.try(|input| LengthOrPercentage::parse_non_negative(input)) {
return Ok(SingleSpecifiedValue::LengthOrPercentage(len));
}

Expand Down

0 comments on commit bf52419

Please sign in to comment.