Last Comment Bug 564332 - putImageData throws exception when drawing to a smaller canvas
: putImageData throws exception when drawing to a smaller canvas
: html5, testcase
Product: Core
Classification: Components
Component: Canvas: 2D (show other bugs)
: unspecified
: All All
: -- normal with 4 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Milan Sreckovic [:milan]
Depends on:
  Show dependency treegraph
Reported: 2010-05-06 16:38 PDT by Jason Oster (:Parasyte)
Modified: 2011-11-09 23:57 PST (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Test (2.78 KB, text/html)
2010-05-06 16:40 PDT, Jason Oster (:Parasyte)
no flags Details
Test case v2 (2.78 KB, text/html)
2010-05-06 16:48 PDT, Jason Oster (:Parasyte)
no flags Details
Test case v3 (2.50 KB, text/html)
2010-05-06 16:56 PDT, Jason Oster (:Parasyte)
no flags Details

Description Jason Oster (:Parasyte) 2010-05-06 16:38:23 PDT
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv: Gecko/20100401 Firefox/3.6.3
Build Identifier: 

When drawing an ImageData object to a canvas using putImageData, NS_ERROR_DOM_SYNTAX_ERR is thrown if the canvas width or height is smaller than the ImageData.

Reproducible: Always
Comment 1 Jason Oster (:Parasyte) 2010-05-06 16:40:22 PDT
Created attachment 443994 [details]

This is the test case.  It works correctly in the latest Safari and Opera releases (all canvases are green).
Comment 2 Jason Oster (:Parasyte) 2010-05-06 16:48:43 PDT
Created attachment 443995 [details]
Test case v2

Fixed some silly problems with HTML structure, and not properly filling the fourth canvas with the initial red color.
Comment 3 Jason Oster (:Parasyte) 2010-05-06 16:56:17 PDT
Created attachment 443997 [details]
Test case v3

Bork bork bork!  I should really check what I'm uploading.
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2010-05-06 20:58:02 PDT
Yeah, this was apparently a spec change...
Comment 5 Saint Wesonga 2010-06-17 10:46:27 PDT
FWIW, the WIP patch in bug 498826 fixes this issue.
Comment 6 Atul Aggarwal 2011-11-09 02:09:53 PST
Test case v3 is passing at my end (with both Firefox 7.0.1 and with nightly build on Linux). I guess this issue is fixed now.
Comment 7 Masatoshi Kimura [:emk] 2011-11-09 23:57:45 PST
I also confirmed Test case v3 is all green.
Resolving per comment #5 and #6.

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