Calling drawImage with zero-size canvas should throw INVALID_STATE_ERR

VERIFIED FIXED in mozilla7

Status

()

Core
Canvas: 2D
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

(Blocks: 1 bug, {dev-doc-complete})

Trunk
mozilla7
dev-doc-complete
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 538322 [details] [diff] [review]
Patch v1

We currently throw INDEX_SIZE_ERR.

http://www.w3c-test.org/html/tests/approved/canvas/2d.drawImage.zerocanvas.html
Attachment #538322 - Flags: review?(jonas)
Comment on attachment 538322 [details] [diff] [review]
Patch v1

Review of attachment 538322 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/html/content/public/nsHTMLCanvasElement.h
@@ +70,5 @@
>  
> +  static nsHTMLCanvasElement* FromContent(nsIContent* aPossibleCanvas)
> +  {
> +    if (!aPossibleCanvas || !aPossibleCanvas->IsHTML(nsGkAtoms::canvas)) {
> +      return NULL;

nsnull
Attachment #538322 - Flags: review?(jonas) → review+
(Assignee)

Comment 2

6 years ago
http://hg.mozilla.org/mozilla-central/rev/8b3315430b6d
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
Keywords: dev-doc-needed → dev-doc-complete
Mozilla/5.0 (Windows NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0

Can anyone please tell me what is expected to be seen in the test case attached in the Description? I am trying to verify this on the QA side and by loading the test example I get a green background, 2 red bordered rectangles and a "Pass" result bellow them.
(Assignee)

Comment 4

6 years ago
Correct.
Flags: in-testsuite+
Mozilla/5.0 (Windows NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0

Verified on Win XP, Win 7, Ubuntu 11.04 and Mac OS X 10.6 - loading the test example from the Description gives me a green background and a "Passed" result.

Setting resolution to VERIFIED FIXED.

Thanks Ms2ger!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.