Closed Bug 1747476 Opened 2 years ago Closed 2 years ago

Properly handle resizing on HTMLCanvasElement/OffscreenCanvas

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

Details

Attachments

(1 file)

When we use HTMLCanvasElement.transferControlToOffscreen, how the width and height is handled is different. We should be throwing clear invalid state errors for the placeholders for the callers. This impacts WPTs:

https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html

When we attempt to resize an OffscreenCanvas, or an HTMLCanvasElement
with transferControlToOffscreen caled on it, we need to ensure we throw
the right error, and a message that is clear to the user. We also need
to propogate size changes to the placeholder
HTMLCanvasElement/OffscreenCanvas, when the OffscreenCanvas object on
the worker thread has its size changed.

Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/189db961e8ed
Fix resizing errors with OffscreenCanvas. r=gfx-reviewers,kvark,mstange
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Regressions: 1747839
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: