mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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
|
@ -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