mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 07:07:49 +00:00
LibWeb: Implement CanvasRenderingContext2D.createImageData(ImageData)
Fixes at least one WPT test. https://wpt.live/html/canvas/element/pixel-manipulation/2d.imageData.create1.basic.html
This commit is contained in:
parent
6ffe83c9da
commit
0522e514a9
Notes:
github-actions[bot]
2024-10-14 08:34:45 +00:00
Author: https://github.com/tmapes
Commit: 0522e514a9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1779
Reviewed-by: https://github.com/AtkinsSJ ✅
6 changed files with 30 additions and 1 deletions
|
@ -0,0 +1,14 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const canvas = document.createElement("canvas");
|
||||
const context = canvas.getContext("2d");
|
||||
const existing_image_data = context.createImageData(75, 75);
|
||||
const image_data = context.createImageData(existing_image_data);
|
||||
if (image_data.width === 75 && image_data.height === 75) {
|
||||
println('PASS')
|
||||
} else {
|
||||
println('FAIL')
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue