Closed Bug 1756186 Opened 3 years ago Closed 3 years ago

Fix no context WPT tests with OffscreenCanvas

Categories

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

defect

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

Details

Crash Data

Attachments

(1 file)

We just bail when we have no context with an OffscreenCanvas in CanvasRenderingContext2D's CreatePattern and DrawImage. We should be returning an empty surface like from nsLayoutUtils::SurfaceFromOffscreenCanvas instead as per the spec.

This patch ensures we return an empty surface as per the spec when
the OffscreenCanvas passed into CreatePattern and DrawImage has no
context bound to it.

Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/03ae0485a3b6 Fix Canvas2D CreatePattern and DrawImage with no context OffscreenCanvas. r=lsalzman
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Crash Signature: [@ Is<mozilla::ContentPrincipal>]

The testcase in bug 1755578 still reproduces on rev 2eda0885cbad. Should this be reopened or should I file a new bug?

Regressions: 1757759
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: