Closed Bug 1436506 Opened 2 years ago Closed 2 years ago

[wpt-sync] PR 9286 - drawImage with zero size canvas as the source image should throw

Categories

(Core :: Canvas: 2D, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: wptsync, Assigned: bas.schouten)

Details

(Whiteboard: [wptsync upstream error][gfx-noted])

This change list corrects the behavior of 2D context drawImage to throw
an InvalidStateError exception when the source image is a canvas with
size zero.
It also matches the behavior for OffscreenCanvas and adds respective
wpt tests.

Associated spec change: https://github.com/whatwg/html/pull/3398

Bug: 805677
Change-Id: Id938af6683f5fc4e94e97327e4d729838f4bfb00
Reviewed-on: https://chromium-review.googlesource.com/893423
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535123}
Component: web-platform-tests → Canvas: 2D
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Someone will have to implement this, might as well be me.
Assignee: nobody → bas
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Whiteboard: [wptsync downstream error] → [wptsync downstream error][gfx-noted]
Whiteboard: [wptsync downstream error][gfx-noted] → [wptsync downstream][gfx-noted]
Ran 3 tests and 3 subtests
OK     : 3
PASS   : 1
FAIL   : 2
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/40628dced2b8
[wpt PR 9286] - drawImage with zero size canvas as the source image should throw, a=testonly
Whiteboard: [wptsync downstream][gfx-noted] → [wptsync upstream error][gfx-noted]
https://hg.mozilla.org/mozilla-central/rev/40628dced2b8
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
After backing out https://bugzilla.mozilla.org/show_bug.cgi?id=1443558#c4 the wpt tests started mass failing as you can see on this push https://goo.gl/Awm6eR  

I decided to backout all the changesets from the original push https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?changeset=5138dcf1eddd750c06e05a784f170b771ba58f60 because of this mass wpt failures.
Status: RESOLVED → REOPENED
Flags: needinfo?(bas)
Resolution: FIXED → ---
Target Milestone: mozilla60 → ---
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8c470a42e8f1
[wpt PR 9286] - drawImage with zero size canvas as the source image should throw, a=testonly
https://hg.mozilla.org/mozilla-central/rev/8c470a42e8f1
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
It looks like we've been doing this for a long time.. https://hg.mozilla.org/integration/mozilla-inbound/annotate/ed8431be3eeb/dom/canvas/CanvasRenderingContext2D.cpp#l4419 I thought there was still work to be done here. Looks like I was wrong.
Flags: needinfo?(bas)
You need to log in before you can comment on or make changes to this bug.