Make transform perspective reject negative lengths.

Contains one test.
Fixes:
https://github.com/servo/servo/pull/16242#issuecomment-291639340
This commit is contained in:
Pyfisch 2017-04-07 11:41:25 +02:00
parent 535d0e421a
commit b62cdb92ec
2 changed files with 4 additions and 1 deletions

View file

@ -33,4 +33,5 @@ fn test_transform_translate() {
assert_roundtrip_with_context!(transform::parse, "translate(2px)");
assert_roundtrip_with_context!(transform::parse, "translate(2px, 5px)");
assert!(parse(transform::parse, "translate(2px foo)").is_err());
assert!(parse(transform::parse, "perspective(-10px)").is_err());
}