Bug 158322

Summary: CanvasRenderingContext2D.createPattern() / putImageData() throw wrong exception type
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, commit-queue, darin, esprehn+autocc, gruan, gyuyoung.kim, kondapallykalyan, rniwa, youennf
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://heycam.github.io/webidl/#es-interface
See Also: https://bugs.webkit.org/show_bug.cgi?id=158321
https://bugs.webkit.org/show_bug.cgi?id=149984
Attachments:
Description Flags
WIP patch
none
WIP Patch
none
Archive of layout-test-results from ews103 for mac-yosemite
none
Archive of layout-test-results from ews106 for mac-yosemite-wk2
none
Archive of layout-test-results from ews124 for ios-simulator-wk2
none
Archive of layout-test-results from ews115 for mac-yosemite
none
Patch none

Description Chris Dumez 2016-06-02 15:42:28 PDT
CanvasRenderingContext2D.createPattern() / putImageData() throws wrong exception type when the first parameter is null. It should throw a TypeError but it currently throws a legacy TYPE_MISMATCH_ERR:
http://www.w3.org/TR/2dcontext/#canvasrenderingcontext2d
http://www.w3.org/TR/2dcontext/#canvasimagesource
Comment 1 Chris Dumez 2016-06-02 16:03:27 PDT
Created attachment 280379 [details]
WIP patch
Comment 2 Chris Dumez 2016-06-02 16:52:11 PDT
Created attachment 280384 [details]
WIP Patch
Comment 3 Build Bot 2016-06-02 17:26:21 PDT
Comment on attachment 280384 [details]
WIP Patch

Attachment 280384 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1425561

New failing tests:
canvas/philip/tests/2d.pattern.image.null.html
canvas/philip/tests/2d.pattern.image.undefined.html
canvas/philip/tests/2d.imageData.put.null.html
imported/w3c/canvas/2d.pattern.image.undefined.html
Comment 4 Build Bot 2016-06-02 17:26:25 PDT
Created attachment 280390 [details]
Archive of layout-test-results from ews103 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 5 Build Bot 2016-06-02 17:33:50 PDT
Comment on attachment 280384 [details]
WIP Patch

Attachment 280384 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1425582

New failing tests:
canvas/philip/tests/2d.pattern.image.null.html
canvas/philip/tests/2d.pattern.image.undefined.html
canvas/philip/tests/2d.imageData.put.null.html
imported/w3c/canvas/2d.pattern.image.undefined.html
Comment 6 Build Bot 2016-06-02 17:33:54 PDT
Created attachment 280391 [details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 7 Build Bot 2016-06-02 17:48:29 PDT
Comment on attachment 280384 [details]
WIP Patch

Attachment 280384 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1425624

New failing tests:
imported/w3c/canvas/2d.pattern.image.undefined.html
canvas/philip/tests/2d.pattern.image.undefined.html
canvas/philip/tests/2d.imageData.put.null.html
canvas/philip/tests/2d.pattern.image.null.html
Comment 8 Build Bot 2016-06-02 17:48:33 PDT
Created attachment 280393 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 9 Build Bot 2016-06-02 17:51:21 PDT
Comment on attachment 280384 [details]
WIP Patch

Attachment 280384 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1425637

New failing tests:
imported/w3c/canvas/2d.pattern.image.undefined.html
canvas/philip/tests/2d.pattern.image.undefined.html
canvas/philip/tests/2d.imageData.put.null.html
canvas/philip/tests/2d.pattern.image.null.html
Comment 10 Build Bot 2016-06-02 17:51:25 PDT
Created attachment 280394 [details]
Archive of layout-test-results from ews115 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 11 Chris Dumez 2016-06-02 18:45:57 PDT
Created attachment 280398 [details]
Patch
Comment 12 Chris Dumez 2016-06-02 22:28:24 PDT
Relevant Web IDL section:
https://heycam.github.io/webidl/#es-interface
Comment 13 Chris Dumez 2016-06-03 15:25:29 PDT
Comment on attachment 280398 [details]
Patch

Clearing flags on attachment: 280398

Committed r201664: <http://trac.webkit.org/changeset/201664>
Comment 14 Chris Dumez 2016-06-03 15:25:35 PDT
All reviewed patches have been landed.  Closing bug.