mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Don't consume invalid idents when parsing text-decoration.
This commit is contained in:
parent
61fd5e79f7
commit
53a9defa9f
2 changed files with 20 additions and 15 deletions
|
@ -75,7 +75,9 @@ ${helpers.single_keyword("unicode-bidi", "normal embed isolate bidi-override iso
|
||||||
}
|
}
|
||||||
let mut blink = false;
|
let mut blink = false;
|
||||||
let mut empty = true;
|
let mut empty = true;
|
||||||
while let Ok(ident) = input.expect_ident() {
|
|
||||||
|
while input.try(|input| {
|
||||||
|
if let Ok(ident) = input.expect_ident() {
|
||||||
match_ignore_ascii_case! { ident,
|
match_ignore_ascii_case! { ident,
|
||||||
"underline" => if result.underline { return Err(()) }
|
"underline" => if result.underline { return Err(()) }
|
||||||
else { empty = false; result.underline = true },
|
else { empty = false; result.underline = true },
|
||||||
|
@ -85,9 +87,15 @@ ${helpers.single_keyword("unicode-bidi", "normal embed isolate bidi-override iso
|
||||||
else { empty = false; result.line_through = true },
|
else { empty = false; result.line_through = true },
|
||||||
"blink" => if blink { return Err(()) }
|
"blink" => if blink { return Err(()) }
|
||||||
else { empty = false; blink = true },
|
else { empty = false; blink = true },
|
||||||
_ => break
|
_ => return Err(())
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return Err(());
|
||||||
}
|
}
|
||||||
|
Ok(())
|
||||||
|
}).is_ok() {
|
||||||
|
}
|
||||||
|
|
||||||
if !empty { Ok(result) } else { Err(()) }
|
if !empty { Ok(result) } else { Err(()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[c71-fwd-parsing-003.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
Loading…
Add table
Add a link
Reference in a new issue