mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +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
|
@ -374,7 +374,8 @@ fn parse_normal_or_baseline<'i, 't>(input: &mut Parser<'i, 't>) -> Result<AlignF
|
|||
|
||||
// <baseline-position>
|
||||
fn parse_baseline<'i, 't>(input: &mut Parser<'i, 't>) -> Result<AlignFlags, ParseError<'i>> {
|
||||
try_match_ident_ignore_ascii_case! { input.expect_ident()?,
|
||||
// FIXME: remove clone() when lifetimes are non-lexical
|
||||
try_match_ident_ignore_ascii_case! { input.expect_ident()?.clone(),
|
||||
"baseline" => Ok(ALIGN_BASELINE),
|
||||
"first" => {
|
||||
input.expect_ident_matching("baseline")?;
|
||||
|
@ -471,7 +472,7 @@ fn parse_self_position<'i, 't>(input: &mut Parser<'i, 't>) -> Result<AlignFlags,
|
|||
|
||||
// [ legacy && [ left | right | center ] ]
|
||||
fn parse_legacy<'i, 't>(input: &mut Parser<'i, 't>) -> Result<AlignFlags, ParseError<'i>> {
|
||||
let a = input.expect_ident()?;
|
||||
let a = input.expect_ident()?.clone();
|
||||
let b = input.expect_ident()?;
|
||||
if a.eq_ignore_ascii_case("legacy") {
|
||||
(match_ignore_ascii_case! { &b,
|
||||
|
@ -479,7 +480,7 @@ fn parse_legacy<'i, 't>(input: &mut Parser<'i, 't>) -> Result<AlignFlags, ParseE
|
|||
"right" => Ok(ALIGN_LEGACY | ALIGN_RIGHT),
|
||||
"center" => Ok(ALIGN_LEGACY | ALIGN_CENTER),
|
||||
_ => Err(())
|
||||
}).map_err(|()| SelectorParseError::UnexpectedIdent(b).into())
|
||||
}).map_err(|()| SelectorParseError::UnexpectedIdent(b.clone()).into())
|
||||
} else if b.eq_ignore_ascii_case("legacy") {
|
||||
(match_ignore_ascii_case! { &a,
|
||||
"left" => Ok(ALIGN_LEGACY | ALIGN_LEFT),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue