mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Fix CRC2D.getImageData() when width != height
We were mistakenly using the width as both width and height when getting ImageData from a 2D canvas.
This commit is contained in:
parent
e487f70bbf
commit
134c4b6335
Notes:
sideshowbarker
2024-07-17 07:16:27 +09:00
Author: https://github.com/awesomekling
Commit: 134c4b6335
Pull-request: https://github.com/SerenityOS/serenity/pull/23969
Reviewed-by: https://github.com/kennethmyhra ✅
3 changed files with 14 additions and 1 deletions
11
Tests/LibWeb/Text/input/HTML/canvas-getImageData-oblong.html
Normal file
11
Tests/LibWeb/Text/input/HTML/canvas-getImageData-oblong.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<script src="../include.js"></script>
|
||||
<body><canvas id=c width=1 height=2></div>
|
||||
<script>
|
||||
test(() => {
|
||||
let x = c.getContext("2d");
|
||||
x.clearRect(0, 0, 1, 1);
|
||||
let d = x.getImageData(0, 0, 1, 2);
|
||||
println(d);
|
||||
println("PASS: Didn't crash");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue