From 8b0d8cbbf070fdbe1194c38649f7f4f25cf40671 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 24 Jan 2017 19:57:11 +0100 Subject: [PATCH] When a css-wide keyword is followed by more stuff, try parsing as "normal" value. --- components/style/properties/properties.mako.rs | 4 +++- .../meta/css/test_font_family_parsing.html.ini | 14 -------------- 2 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 tests/wpt/mozilla/meta/css/test_font_family_parsing.html.ini diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index ca30e123dcc..e87105d3bf4 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -410,7 +410,9 @@ pub enum CSSWideKeyword { impl Parse for CSSWideKeyword { fn parse(_context: &ParserContext, input: &mut Parser) -> Result { - match_ignore_ascii_case! { try!(input.expect_ident()), + let ident = input.expect_ident()?; + input.expect_exhausted()?; + match_ignore_ascii_case! { ident, "initial" => Ok(CSSWideKeyword::InitialKeyword), "inherit" => Ok(CSSWideKeyword::InheritKeyword), "unset" => Ok(CSSWideKeyword::UnsetKeyword), diff --git a/tests/wpt/mozilla/meta/css/test_font_family_parsing.html.ini b/tests/wpt/mozilla/meta/css/test_font_family_parsing.html.ini deleted file mode 100644 index 02c92c1fe38..00000000000 --- a/tests/wpt/mozilla/meta/css/test_font_family_parsing.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[test_font_family_parsing.html] - type: testharness - [font-family: initial, simple (setter)] - expected: FAIL - - [font-family: inherit, simple (setter)] - expected: FAIL - - [font-family: initial simple] - expected: FAIL - - [font-family: inherit simple] - expected: FAIL -