[wpt-sync] Sync PR 26246 - Fix Canvas drawImage tests not to expect INDEX_SIZE_ERR when source width/height is zero (fixes #2835)
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 26246 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/26246
Details from upstream follow.
b'Tooru Fujisawa <arai_a@mac.com>' wrote:
Fix Canvas drawImage tests not to expect INDEX_SIZE_ERR when source width/height is zero (fixes #2835)
From https://bugzilla.mozilla.org/show_bug.cgi?id=1669090
the spec says the following:
https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-drawimage
When the drawImage() method is invoked, the user agent must run these steps: ... 4. ... If the sx, sy, sw, and sh arguments are omitted, then they must default to 0, 0, the image's intrinsic width in image pixels, and the image's intrinsic height in image pixels, respectively. .... 5. If one of the sw or sh arguments is zero, then return. Nothing is painted.
So, if source image's width/height is zero,
drawImage
should just return without doing anything.
2d.drawImage.zerosource.html
testcase is already following the spec.
applied the same change to2d.drawImage.zerosource.image.html
testcaseBoth Chrome and Safari don't throw.
Firefox currently throws but https://bugzilla.mozilla.org/show_bug.cgi?id=1669090 patch will fix it not to throw.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=265a94dde01407f2cdda68a8eaf590b78cc2e2b6
Assignee | ||
Comment 2•4 years ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 5 tests and 1 subtests
Status Summary
Firefox
OK : 5
FAIL: 5
Chrome
OK : 5
PASS: 5
Safari
OK : 5
PASS: 1
FAIL: 4
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
Firefox-only Failures
/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html
drawImage with zero-sized source rectangle from image draws nothing without exception: FAIL
New Tests That Don't Pass
/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html
drawImage with zero-sized source rectangle draws nothing without exception: FAIL (Chrome: PASS, Safari: FAIL)
/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html
drawImage with zero-sized source rectangle from image draws nothing without exception: FAIL (Chrome: PASS, Safari: PASS)
/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html
drawImage with zero-sized source rectangle from image draws nothing without exception: FAIL (Chrome: PASS, Safari: FAIL)
/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.html
drawImage with zero-sized source rectangle from image draws nothing without exception: FAIL (Chrome: PASS, Safari: FAIL)
/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.html
drawImage with zero-sized source rectangle draws nothing without exception: FAIL (Chrome: PASS, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2ef12989e52b [wpt PR 26246] - Fix Canvas drawImage tests not to expect INDEX_SIZE_ERR when source width/height is zero (fixes #2835), a=testonly https://hg.mozilla.org/integration/autoland/rev/3609ac335150 [wpt PR 26246] - Update wpt metadata, a=testonly
Comment 4•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2ef12989e52b
https://hg.mozilla.org/mozilla-central/rev/3609ac335150
Description
•