mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Replace old transform code with new generic code
This commit is contained in:
parent
5ce2966bda
commit
6631594e28
10 changed files with 210 additions and 1268 deletions
|
@ -46,6 +46,7 @@ impl Transform {
|
|||
Ok(GenericTransform(Space::parse(input, |input| {
|
||||
let function = input.expect_function()?.clone();
|
||||
input.parse_nested_block(|input| {
|
||||
let location = input.current_source_location();
|
||||
let result = match_ignore_ascii_case! { &function,
|
||||
"matrix" => {
|
||||
let a = specified::parse_number(context, input)?;
|
||||
|
@ -236,7 +237,7 @@ impl Transform {
|
|||
_ => Err(()),
|
||||
};
|
||||
result
|
||||
.map_err(|()| StyleParseError::UnexpectedFunction(function.clone()).into())
|
||||
.map_err(|()| location.new_custom_error(StyleParseErrorKind::UnexpectedFunction(function.clone())))
|
||||
})
|
||||
})?))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue