Closed Bug 663194 Opened 13 years ago Closed 13 years ago

Calling drawImage with zero-size canvas should throw INVALID_STATE_ERR

Categories

(Core :: Graphics: Canvas2D, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla7

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

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+
http://hg.mozilla.org/mozilla-central/rev/8b3315430b6d
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
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.
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.

Attachment

General

Created:
Updated:
Size: