mirror of
https://github.com/servo/servo.git
synced 2025-06-28 11:03:39 +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
|
@ -101,7 +101,7 @@ impl Parse for GeometryBox {
|
|||
|
||||
impl Parse for BasicShape {
|
||||
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
let function = input.expect_function()?;
|
||||
let function = input.expect_function()?.clone();
|
||||
input.parse_nested_block(move |i| {
|
||||
(match_ignore_ascii_case! { &function,
|
||||
"inset" => return InsetRect::parse_function_arguments(context, i).map(GenericBasicShape::Inset),
|
||||
|
@ -109,7 +109,7 @@ impl Parse for BasicShape {
|
|||
"ellipse" => return Ellipse::parse_function_arguments(context, i).map(GenericBasicShape::Ellipse),
|
||||
"polygon" => return Polygon::parse_function_arguments(context, i).map(GenericBasicShape::Polygon),
|
||||
_ => 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