mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update cssparser to 0.18
https://github.com/servo/rust-cssparser/pull/171
This commit is contained in:
parent
30d6d6024b
commit
eb98ae6e04
64 changed files with 541 additions and 512 deletions
|
@ -100,11 +100,11 @@ impl Parse for GridLine {
|
|||
}
|
||||
|
||||
grid_line.line_num = Some(i);
|
||||
} else if let Ok(name) = input.try(|i| i.expect_ident()) {
|
||||
} else if let Ok(name) = input.try(|i| i.expect_ident_cloned()) {
|
||||
if val_before_span || grid_line.ident.is_some() {
|
||||
return Err(StyleParseError::UnspecifiedError.into());
|
||||
}
|
||||
grid_line.ident = Some(CustomIdent::from_ident(name, &[])?);
|
||||
grid_line.ident = Some(CustomIdent::from_ident(&name, &[])?);
|
||||
} else {
|
||||
break
|
||||
}
|
||||
|
|
|
@ -151,17 +151,20 @@ impl<T: Parse> Parse for FontSettingTag<T> {
|
|||
use byteorder::{ReadBytesExt, BigEndian};
|
||||
use std::io::Cursor;
|
||||
|
||||
let tag = input.expect_string()?;
|
||||
|
||||
// allowed strings of length 4 containing chars: <U+20, U+7E>
|
||||
if tag.len() != 4 ||
|
||||
tag.chars().any(|c| c < ' ' || c > '~')
|
||||
let u_tag;
|
||||
{
|
||||
return Err(StyleParseError::UnspecifiedError.into())
|
||||
}
|
||||
let tag = input.expect_string()?;
|
||||
|
||||
let mut raw = Cursor::new(tag.as_bytes());
|
||||
let u_tag = raw.read_u32::<BigEndian>().unwrap();
|
||||
// allowed strings of length 4 containing chars: <U+20, U+7E>
|
||||
if tag.len() != 4 ||
|
||||
tag.chars().any(|c| c < ' ' || c > '~')
|
||||
{
|
||||
return Err(StyleParseError::UnspecifiedError.into())
|
||||
}
|
||||
|
||||
let mut raw = Cursor::new(tag.as_bytes());
|
||||
u_tag = raw.read_u32::<BigEndian>().unwrap();
|
||||
}
|
||||
|
||||
Ok(FontSettingTag { tag: u_tag, value: T::parse(context, input)? })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue