Last Comment Bug 663194 - Calling drawImage with zero-size canvas should throw INVALID_STATE_ERR
: Calling drawImage with zero-size canvas should throw INVALID_STATE_ERR
Status: VERIFIED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: Canvas: 2D (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla7
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
: Milan Sreckovic [:milan]
Mentors:
Depends on:
Blocks: 622842
  Show dependency treegraph
 
Reported: 2011-06-09 12:45 PDT by :Ms2ger (⌚ UTC+1/+2)
Modified: 2011-08-31 05:04 PDT (History)
2 users (show)
Ms2ger: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (5.55 KB, patch)
2011-06-09 12:45 PDT, :Ms2ger (⌚ UTC+1/+2)
jonas: review+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2011-06-09 12:45:09 PDT
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
Comment 1 Jonas Sicking (:sicking) No longer reading bugmail consistently 2011-06-09 13:30:18 PDT
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
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2011-06-11 09:27:15 PDT
http://hg.mozilla.org/mozilla-central/rev/8b3315430b6d
Comment 3 Simona B [:simonab ] 2011-08-29 07:11:16 PDT
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.
Comment 4 :Ms2ger (⌚ UTC+1/+2) 2011-08-30 13:10:47 PDT
Correct.
Comment 5 Simona B [:simonab ] 2011-08-31 05:04:57 PDT
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!

Note You need to log in before you can comment on or make changes to this bug.