mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Reject @font-face descriptors with value value followed by more stuff.
This commit is contained in:
parent
b43e2fb0df
commit
131b12dc67
1 changed files with 8 additions and 1 deletions
|
@ -233,7 +233,14 @@ macro_rules! font_face_descriptors_common {
|
|||
fn parse_value(&mut self, name: &str, input: &mut Parser) -> Result<(), ()> {
|
||||
match_ignore_ascii_case! { name,
|
||||
$(
|
||||
$name => self.rule.$ident = Some(Parse::parse(self.context, input)?),
|
||||
$name => {
|
||||
// DeclarationParser also calls parse_entirely
|
||||
// so we’d normally not need to,
|
||||
// but in this case we do because we set the value as a side effect
|
||||
// rather than returning it.
|
||||
let value = input.parse_entirely(|i| Parse::parse(self.context, i))?;
|
||||
self.rule.$ident = Some(value)
|
||||
}
|
||||
)*
|
||||
_ => return Err(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue