1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:17:45 +00:00

LibWeb/CSS: Ensure length is absolute before converting to pixels

Previously, creating a DOMMatrix with a transform that contained
non-absolute units would cause a crash.
This commit is contained in:
Tim Ledbetter 2024-02-17 08:09:53 +00:00 committed by Jelle Raaijmakers
parent 5136b495a6
commit c5d1ec4dea
3 changed files with 8 additions and 2 deletions

View file

@ -16,3 +16,4 @@
16. Exception: SyntaxError
17. Exception: SyntaxError
18. Exception: SyntaxError
19. Exception: SyntaxError

View file

@ -64,5 +64,8 @@
// 18. Creating a DOMMatrix with CSS transform string with error
testPart(() => new DOMMatrix('matrix(1.0, 2.0deg, 3.0, 4.0, 5.0, 6.0)'));
// 19. Creating a DOMMatrix with CSS transform string with non-absolute units should fail
testPart(() => new DOMMatrix('translate(1em, 1em)'));
});
</script>