mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
When a css-wide keyword is followed by more stuff, try parsing as "normal" value.
This commit is contained in:
parent
d0ea53ade9
commit
8b0d8cbbf0
2 changed files with 3 additions and 15 deletions
|
@ -410,7 +410,9 @@ pub enum CSSWideKeyword {
|
||||||
|
|
||||||
impl Parse for CSSWideKeyword {
|
impl Parse for CSSWideKeyword {
|
||||||
fn parse(_context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
|
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),
|
"initial" => Ok(CSSWideKeyword::InitialKeyword),
|
||||||
"inherit" => Ok(CSSWideKeyword::InheritKeyword),
|
"inherit" => Ok(CSSWideKeyword::InheritKeyword),
|
||||||
"unset" => Ok(CSSWideKeyword::UnsetKeyword),
|
"unset" => Ok(CSSWideKeyword::UnsetKeyword),
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue