From bf524197163505b5d91884771568df2271588538 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Thu, 2 Feb 2017 17:09:10 +1100 Subject: [PATCH] Reject negative value for border-image-width --- components/style/properties/longhand/border.mako.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/style/properties/longhand/border.mako.rs b/components/style/properties/longhand/border.mako.rs index d0d02bc8a37..860f8e165de 100644 --- a/components/style/properties/longhand/border.mako.rs +++ b/components/style/properties/longhand/border.mako.rs @@ -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 { + fn parse(_context: &ParserContext, input: &mut Parser) -> Result { 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)); }