New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 805677 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

[2D canvas] drawImage with zero size canvas as source image should throw

Project Member Reported by junov@chromium.org, Jan 24 2018

Issue description

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

The is no web-platform-test coverage for this use case.  So the fix for this bug should add one.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/71e7c309f63b284610bc3430d88927d904a8ac79

commit 71e7c309f63b284610bc3430d88927d904a8ac79
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Wed Feb 07 20:16:38 2018

drawImage with zero size canvas as the source image should throw

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}
[modify] https://crrev.com/71e7c309f63b284610bc3430d88927d904a8ac79/third_party/WebKit/LayoutTests/external/wpt/2dcontext/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html
[modify] https://crrev.com/71e7c309f63b284610bc3430d88927d904a8ac79/third_party/WebKit/LayoutTests/external/wpt/2dcontext/tools/spec.yaml
[modify] https://crrev.com/71e7c309f63b284610bc3430d88927d904a8ac79/third_party/WebKit/LayoutTests/external/wpt/2dcontext/tools/tests2d.yaml
[modify] https://crrev.com/71e7c309f63b284610bc3430d88927d904a8ac79/third_party/WebKit/LayoutTests/external/wpt/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html
[modify] https://crrev.com/71e7c309f63b284610bc3430d88927d904a8ac79/third_party/WebKit/LayoutTests/external/wpt/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker.js
[modify] https://crrev.com/71e7c309f63b284610bc3430d88927d904a8ac79/third_party/WebKit/LayoutTests/external/wpt/offscreen-canvas/tools/tests2d.yaml
[modify] https://crrev.com/71e7c309f63b284610bc3430d88927d904a8ac79/third_party/WebKit/LayoutTests/fast/canvas-api/painting-on-bad-canvas.html
[modify] https://crrev.com/71e7c309f63b284610bc3430d88927d904a8ac79/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-empty-image-source.html
[modify] https://crrev.com/71e7c309f63b284610bc3430d88927d904a8ac79/third_party/WebKit/Source/modules/canvas/canvas2d/BaseRenderingContext2D.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment