Upgrade cssparser to 0.15

This commit is contained in:
Simon Sapin 2017-06-15 21:58:40 +02:00
parent 66c130d55a
commit b83afdedc8
42 changed files with 234 additions and 217 deletions

View file

@ -19,8 +19,8 @@ use values::specified::LengthOrPercentage;
/// Parse a single flexible length.
pub fn parse_flex<'i, 't>(input: &mut Parser<'i, 't>) -> Result<CSSFloat, ParseError<'i>> {
match input.next()? {
Token::Dimension(ref value, ref unit) if unit.eq_ignore_ascii_case("fr") && value.value.is_sign_positive()
=> Ok(value.value),
Token::Dimension { value, ref unit, .. } if unit.eq_ignore_ascii_case("fr") && value.is_sign_positive()
=> Ok(value),
t => Err(BasicParseError::UnexpectedToken(t).into()),
}
}