style: Use cbindgen to back CSS transforms.

This avoids the expensive conversion, and cleans up a bunch.

Further cleanup is possible, just not done yet to avoid growing the patch even
more.

Differential Revision: https://phabricator.services.mozilla.com/D30748
This commit is contained in:
Emilio Cobos Álvarez 2019-05-16 23:25:10 +00:00
parent 85752fa479
commit 3034d66eef
11 changed files with 59 additions and 356 deletions

View file

@ -42,7 +42,7 @@ impl Transform {
.try(|input| input.expect_ident_matching("none"))
.is_ok()
{
return Ok(generic::Transform(Vec::new()));
return Ok(generic::Transform::none());
}
Ok(generic::Transform(Space::parse(input, |input| {
@ -218,7 +218,7 @@ impl Transform {
.new_custom_error(StyleParseErrorKind::UnexpectedFunction(function.clone()))
})
})
})?))
})?.into()))
}
}