Bug 28454 - <canvas> createImageData doesn't handle negative values properly
Summary: <canvas> createImageData doesn't handle negative values properly
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: George Wright
URL: http://philip.html5.org/tests/canvas/...
Depends on:
Reported: 2009-08-19 08:11 PDT by George Wright
Modified: 2010-07-11 06:29 PDT (History)
2 users (show)

See Also:

Handle negatives properly (2.25 KB, patch)
2009-08-19 08:42 PDT, George Wright
no flags Details | Formatted Diff | Diff
Include layout tests (4.71 KB, patch)
2009-08-19 09:42 PDT, George Wright
eric: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description George Wright 2009-08-19 08:11:52 PDT
According to http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-createimagedata, createImageData should create an ImageData object with width and height equal to the absolute magnitude of the values passed to createImageData. WebKit currently does not do this.
Comment 1 George Wright 2009-08-19 08:42:10 PDT
Created attachment 35122 [details]
Handle negatives properly

Proposed fix for this bug.
Comment 2 George Wright 2009-08-19 09:42:42 PDT
Created attachment 35125 [details]
Include layout tests

Woops, old patch didn't include the layout tests for some reason.
Comment 3 Darin Adler 2009-08-19 10:15:22 PDT
Comment on attachment 35125 [details]
Include layout tests

Seems that this test should be a dumpAsText cross-platform test, the way many of the tests in fast/canvas are, such as canvas-alphaImageData-behavior.html for example. That would be more valuable than one with platform-specific results.

r=me as is, but please consider making that change
Comment 4 Eric Seidel (no email) 2009-08-21 15:00:45 PDT
Comment on attachment 35125 [details]
Include layout tests

Since George isn't a committer and won't be able to commit this when landing, marking this r- per Darin's above comments.  I agree, this would be nicer as a dumpAsText test.
Comment 5 Andreas Kling 2010-07-11 06:29:56 PDT
I fixed this with http://trac.webkit.org/changeset/59613 (bug 39189)