mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -147,7 +147,7 @@ impl Parse for TimingFunction {
|
|||
if let Ok(keyword) = input.try(TimingKeyword::parse) {
|
||||
return Ok(GenericTimingFunction::Keyword(keyword));
|
||||
}
|
||||
if let Ok(ident) = input.try(|i| i.expect_ident()) {
|
||||
if let Ok(ident) = input.try(|i| i.expect_ident_cloned()) {
|
||||
let position = match_ignore_ascii_case! { &ident,
|
||||
"step-start" => StepPosition::Start,
|
||||
"step-end" => StepPosition::End,
|
||||
|
@ -155,7 +155,7 @@ impl Parse for TimingFunction {
|
|||
};
|
||||
return Ok(GenericTimingFunction::Steps(Integer::new(1), position));
|
||||
}
|
||||
let function = input.expect_function()?;
|
||||
let function = input.expect_function()?.clone();
|
||||
input.parse_nested_block(move |i| {
|
||||
(match_ignore_ascii_case! { &function,
|
||||
"cubic-bezier" => {
|
||||
|
@ -190,7 +190,7 @@ impl Parse for TimingFunction {
|
|||
}
|
||||
},
|
||||
_ => Err(()),
|
||||
}).map_err(|()| StyleParseError::UnexpectedFunction(function).into())
|
||||
}).map_err(|()| StyleParseError::UnexpectedFunction(function.clone()).into())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue