Add [EnforceRange] on OffscreenCanvas width/height idl attribute (#34165)

* Add [EnforceRange] on OffscreenCanvas width/height idl attribute

Fixes https://github.com/servo/servo/issues/34161

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2024-11-06 15:37:26 +01:00 committed by GitHub
parent a61522a1e8
commit c0a4eee1fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 2 additions and 45 deletions

View file

@ -16,8 +16,8 @@ dictionary ImageEncodeOptions {
[Exposed=(Window,Worker)/*, Transferable*/, Pref="dom.offscreen_canvas.enabled"]
interface OffscreenCanvas : EventTarget {
[Throws] constructor([EnforceRange] unsigned long long width, [EnforceRange] unsigned long long height);
attribute /*[EnforceRange]*/ unsigned long long width;
attribute /*[EnforceRange]*/ unsigned long long height;
attribute [EnforceRange] unsigned long long width;
attribute [EnforceRange] unsigned long long height;
OffscreenRenderingContext? getContext(DOMString contextId, optional any options = null);
//ImageBitmap transferToImageBitmap();

View file

@ -1,3 +0,0 @@
[2d.canvas.host.size.attributes.parse.em.html]
[Parsing of non-negative integers]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.canvas.host.size.attributes.parse.em.worker.html]
[Parsing of non-negative integers]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.canvas.host.size.attributes.parse.junk.html]
[Parsing of non-negative integers]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.canvas.host.size.attributes.parse.junk.worker.html]
[Parsing of non-negative integers]
expected: FAIL

View file

@ -1,4 +0,0 @@
[2d.canvas.host.size.attributes.parse.minus.html]
expected: CRASH
[Parsing of non-negative integers]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.canvas.host.size.attributes.parse.minus.worker.html]
[Parsing of non-negative integers]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.canvas.host.size.attributes.parse.percent.html]
[Parsing of non-negative integers]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.canvas.host.size.attributes.parse.percent.worker.html]
[Parsing of non-negative integers]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.canvas.host.size.attributes.parse.trailingjunk.html]
[Parsing of non-negative integers]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.canvas.host.size.attributes.parse.trailingjunk.worker.html]
[Parsing of non-negative integers]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.canvas.host.size.invalid.attributes.idl.html]
[Getting/setting width/height IDL attributes]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.canvas.host.size.invalid.attributes.idl.worker.html]
[Getting/setting width/height IDL attributes]
expected: FAIL

View file

@ -1,3 +0,0 @@
[offscreencanvas.constructor.html]
[Test that OffscreenCanvas constructor handles invalid arguments correctly]
expected: FAIL

View file

@ -1,3 +0,0 @@
[offscreencanvas.constructor.worker.html]
[Test that OffscreenCanvas constructor handles invalid arguments correctly in a worker]
expected: FAIL