From 19b390049ce5b3679e652989c3190b117e5ea0fd Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 6 Feb 2015 11:30:24 +1100 Subject: [PATCH] Require at least one value when parsing 'content' --- components/style/properties.mako.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index 5783a234ec9..279c7364a6f 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -698,8 +698,10 @@ pub mod longhands { Ok(Token::QuotedString(value)) => { content.push(ContentItem::StringContent(value.into_owned())) } - Ok(_) => return Err(()), - Err(()) => return Ok(SpecifiedValue::Content(content)) + Err(()) if !content.is_empty() => { + return Ok(SpecifiedValue::Content(content)) + } + _ => return Err(()) } } }