canvas2d: Implement .reset() (#31258)

* Implement Canvas2D reset

* Update WPT tests

* Apply suggestions from code review

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Smitty 2024-02-05 03:53:00 -05:00 committed by GitHub
parent 29c206a702
commit b2ae3928ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
106 changed files with 28 additions and 289 deletions

View file

@ -1,2 +0,0 @@
[canvas-reset.https.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[paint2d-reset.https.html]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.layer.valid-calls.save_reset_restore.html]
[No exception raised on save() + reset() + restore().]
expected: FAIL

View file

@ -1,4 +0,0 @@
[2d.reset.basic.html]
[reset clears to transparent black]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.drop_shadow.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.global_composite_operation.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.misc.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.miter_limit.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.text.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.state.clip.html]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.direction.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.fill_style.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.font.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.global_alpha.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.global_composite_operation.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.image_smoothing_enabled.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.line_cap.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.line_join.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.line_width.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.miter_limit.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_blur.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_color.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_offset_x.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_offset_y.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.stroke_style.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.text_align.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.text_baseline.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.transformation_matrix.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.layer.valid-calls.save_reset_restore.html]
[No exception raised on save() + reset() + restore().]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.layer.valid-calls.save_reset_restore.worker.html]
[No exception raised on save() + reset() + restore().]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.basic.html]
[reset clears to transparent black]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.basic.worker.html]
[reset clears to transparent black]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.drop_shadow.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.global_composite_operation.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.misc.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.miter_limit.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.text.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.state.clip.html]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.direction.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.direction.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.fill_style.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.fill_style.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.global_alpha.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.global_alpha.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.global_composite_operation.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.global_composite_operation.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.image_smoothing_enabled.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.image_smoothing_enabled.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.line_cap.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.line_cap.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.line_join.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.line_join.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.line_width.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.line_width.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.miter_limit.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.miter_limit.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_blur.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_blur.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_color.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_color.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_offset_x.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_offset_x.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_offset_y.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_offset_y.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.stroke_style.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.stroke_style.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.text_align.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.text_align.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.text_baseline.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.text_baseline.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.transformation_matrix.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.transformation_matrix.worker.html]
[check that the state is reset]
expected: FAIL

View file

@ -1379,9 +1379,6 @@
[Worklet interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[CanvasRenderingContext2D interface: operation reset()]
expected: FAIL
[CanvasRenderingContext2D interface: operation createConicGradient(double, double, double)]
expected: FAIL
@ -1403,9 +1400,6 @@
[CanvasRenderingContext2D interface: attribute textRendering]
expected: FAIL
[CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "reset()" with the proper type]
expected: FAIL
[CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "createConicGradient(double, double, double)" with the proper type]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.layer.valid-calls.save_reset_restore.html]
[No exception raised on save() + reset() + restore().]
expected: FAIL

View file

@ -1,4 +0,0 @@
[2d.reset.basic.html]
[reset clears to transparent black]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.drop_shadow.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.global_composite_operation.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.misc.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.miter_limit.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.render.text.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[2d.reset.state.clip.html]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.direction.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.fill_style.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.global_alpha.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.global_composite_operation.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.image_smoothing_enabled.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.line_cap.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.line_join.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.line_width.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.miter_limit.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_blur.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_color.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_offset_x.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.shadow_offset_y.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.stroke_style.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.text_align.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.text_baseline.html]
[check that the state is reset]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.reset.state.transformation_matrix.html]
[check that the state is reset]
expected: FAIL

View file

@ -1241,9 +1241,6 @@
[Worklet interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[CanvasRenderingContext2D interface: operation reset()]
expected: FAIL
[CanvasRenderingContext2D interface: operation createConicGradient(double, double, double)]
expected: FAIL
@ -1265,9 +1262,6 @@
[CanvasRenderingContext2D interface: attribute textRendering]
expected: FAIL
[CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "reset()" with the proper type]
expected: FAIL
[CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "createConicGradient(double, double, double)" with the proper type]
expected: FAIL