mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-19 01:22:54 +00:00
LibWeb: Add DOMMatrix toFloat32Array and toFloat64Array
This commit is contained in:
parent
7b4b5b735b
commit
2e122b16e4
Notes:
sideshowbarker
2024-07-17 02:14:39 +09:00
Author: https://github.com/bplaat
Commit: 2e122b16e4
Pull-request: https://github.com/SerenityOS/serenity/pull/21233
Reviewed-by: https://github.com/ADKaster
6 changed files with 59 additions and 2 deletions
21
Tests/LibWeb/Text/input/geometry/dommatrix-to-array.html
Normal file
21
Tests/LibWeb/Text/input/geometry/dommatrix-to-array.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let testCounter = 1;
|
||||
function testPart(part) {
|
||||
println(`${testCounter++}. ${JSON.stringify(part())}`);
|
||||
}
|
||||
|
||||
// 1. DOMMatrix to Float32Array
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).toFloat32Array());
|
||||
|
||||
// 2. DOMMatrix to Float32Array
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]).toFloat32Array());
|
||||
|
||||
// 3. DOMMatrix to Float64Array
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).toFloat64Array());
|
||||
|
||||
// 4. DOMMatrix to Float64Array
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]).toFloat64Array());
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue