diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-01-24 19:57:11 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-01-24 20:04:28 +0100 |
commit | 8b0d8cbbf070fdbe1194c38649f7f4f25cf40671 (patch) | |
tree | 75483e831555bb93300fa14de15731256ba39be2 | |
parent | d0ea53ade9db1116a8ff41dd9c1497b194db6dda (diff) | |
download | servo-8b0d8cbbf070fdbe1194c38649f7f4f25cf40671.tar.gz servo-8b0d8cbbf070fdbe1194c38649f7f4f25cf40671.zip |
When a css-wide keyword is followed by more stuff, try parsing as "normal" value.
-rw-r--r-- | components/style/properties/properties.mako.rs | 4 | ||||
-rw-r--r-- | tests/wpt/mozilla/meta/css/test_font_family_parsing.html.ini | 14 |
2 files changed, 3 insertions, 15 deletions
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<Self, ()> { - 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 - |