Bug 132412

Summary: Calling ctx.createImageData with non-finite data should generate a type error
Product: WebKit Reporter: Rik Cabanier <cabanier>
Component: CanvasAssignee: Rik Cabanier <cabanier>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, buildbot, commit-queue, esprehn+autocc, gyuyoung.kim, krit, mike, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2
none
Patch
none
Patch none

Description Rik Cabanier 2014-04-30 17:17:31 PDT
Currently this generate a NOT_SUPPORTED_ERROR which is wrong per the WebIDL spec
Comment 1 Rik Cabanier 2014-04-30 17:20:48 PDT
Created attachment 230543 [details]
Patch
Comment 2 Build Bot 2014-04-30 17:47:52 PDT
Comment on attachment 230543 [details]
Patch

Attachment 230543 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/4809378834153472

New failing tests:
fast/canvas/canvas-2d-imageData-create-nonfinite.html
Comment 3 Build Bot 2014-04-30 17:47:55 PDT
Created attachment 230548 [details]
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-15  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 4 Rik Cabanier 2014-04-30 21:39:20 PDT
Created attachment 230560 [details]
Patch
Comment 5 Dirk Schulze 2014-04-30 23:58:32 PDT
Do you have link to the spec?
Comment 6 Rik Cabanier 2014-05-01 00:07:42 PDT
(In reply to comment #5)
> Do you have link to the spec?

http://www.w3.org/TR/WebIDL/#es-double
Comment 7 Dirk Schulze 2014-05-01 00:27:46 PDT
Oh, it is about double.... then the real fix would be to change our WebIDL interpreter. It seems fine to change it in Context2D in the meantime.
Comment 8 Rik Cabanier 2014-05-01 00:55:06 PDT
Created attachment 230570 [details]
Patch
Comment 9 Rik Cabanier 2014-05-01 00:56:26 PDT
Comment on attachment 230570 [details]
Patch

submitted by accident
Comment 10 WebKit Commit Bot 2014-05-01 01:34:16 PDT
Comment on attachment 230560 [details]
Patch

Clearing flags on attachment: 230560

Committed r168092: <http://trac.webkit.org/changeset/168092>
Comment 11 WebKit Commit Bot 2014-05-01 01:34:21 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Alexey Proskuryakov 2014-05-01 10:04:33 PDT
> then the real fix would be to change our WebIDL interpreter. 

Is there a bug tracking the right fix? It would be helpful to have a FIXME in code referencing the bug, so that we can more easily remove this workaround when it's no longer needed.
Comment 13 Alexey Proskuryakov 2014-05-01 10:06:30 PDT
(rs=me to add a line with the FIXME)
Comment 14 Rik Cabanier 2014-05-01 13:23:46 PDT
(In reply to comment #12)
> > then the real fix would be to change our WebIDL interpreter. 
> 
> Is there a bug tracking the right fix? It would be helpful to have a FIXME in code referencing the bug, so that we can more easily remove this workaround when it's no longer needed.

yes, see https://bugs.webkit.org/show_bug.cgi?id=101783
The 'isFinite' testing is all over the codebase.

Do you want me to add a todo to just the lines that I touched?
Comment 15 Alexey Proskuryakov 2014-05-01 14:05:15 PDT
If it's already all over the place, then there is no point indeed.