Make ImageData more spec compliant (#37620)

I updated webidl, and all changes that bring, currently we still not
support float16array (there is no support in FF either). Most notable
change is refactored new_*/Constructors methods, that should now handle
HeapBufferSource more properly (with less unsafe).

Testing: Existing WPT tests
try run: https://github.com/sagudev/servo/actions/runs/15806083404
Fixes: #37618 (although not tested)

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
sagudev 2025-06-25 18:48:58 +02:00 committed by GitHub
parent 59b99de90a
commit 6f53d422b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 206 additions and 156 deletions

View file

@ -0,0 +1,3 @@
[2d.color.type.u8p3.to.f16srgb.to.u8p3.html]
[test srgb float16 canvas storing 8-bit display-p3 data accurately]
expected: FAIL

View file

@ -0,0 +1,3 @@
[2d.color.type.u8p3.to.f16srgb.to.u8p3.worker.html]
[test srgb float16 canvas storing 8-bit display-p3 data accurately]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.imageData.createImageBitmap.srgb.rgba.unorm8.html]
[Verify round-trip of 8-bit sRGB data ImageData through ImageBitmap]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.imageData.createImageBitmap.srgb.rgba.unorm8.worker.html]
[Verify round-trip of 8-bit sRGB data ImageData through ImageBitmap]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.imageData.object.properties.html]
[ImageData objects have the right properties]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.imageData.object.properties.worker.html]
[ImageData objects have the right properties]
expected: FAIL