WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
141755
[Canvas] apply NOT_SUPPORTED_ERR to putImageData()
https://bugs.webkit.org/show_bug.cgi?id=141755
Summary
[Canvas] apply NOT_SUPPORTED_ERR to putImageData()
KwangHyuk
Reported
2015-02-18 08:36:59 PST
putImageData() throws NOT_SUPPORTED_ERR if arguments are not finite Actual output: Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: Argument 2 of CanvasRenderingContext2D.putImageData is not a finite floating-point value. * References: 2d.imageData.put.nonfinite
http://flashcanvas.net/examples/philip.html5.org/tests/canvas/suite/tests/2d.imageData.put.nonfinite.html
Attachments
Patch
(3.75 KB, patch)
2015-02-18 08:50 PST
,
KwangHyuk
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews100 for mac-mavericks
(531.76 KB, application/zip)
2015-02-18 09:35 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews106 for mac-mavericks-wk2
(703.76 KB, application/zip)
2015-02-18 09:43 PST
,
Build Bot
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
KwangHyuk
Comment 1
2015-02-18 08:50:01 PST
Created
attachment 246817
[details]
Patch
Build Bot
Comment 2
2015-02-18 09:35:08 PST
Comment on
attachment 246817
[details]
Patch
Attachment 246817
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/6211018736795648
New failing tests: fast/canvas/canvas-putImageData.html canvas/philip/tests/2d.imageData.put.nonfinite.html
Build Bot
Comment 3
2015-02-18 09:35:12 PST
Created
attachment 246822
[details]
Archive of layout-test-results from ews100 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-mavericks Platform: Mac OS X 10.9.5
Build Bot
Comment 4
2015-02-18 09:43:40 PST
Comment on
attachment 246817
[details]
Patch
Attachment 246817
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/5779819052662784
New failing tests: fast/canvas/canvas-putImageData.html canvas/philip/tests/2d.imageData.put.nonfinite.html
Build Bot
Comment 5
2015-02-18 09:43:43 PST
Created
attachment 246824
[details]
Archive of layout-test-results from ews106 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Chris Dumez
Comment 6
2015-02-18 10:05:44 PST
Comment on
attachment 246817
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=246817&action=review
The numeric arguments are not unrestricted as per the spec (both W3C and WhatWG). Therefore, infinite / NaN is already rejected at Web IDL level with a Type Error. The W3C specification really should not specify that a NOT_SUPPORTED_ERROR be thrown in this case because it cannot happen AFAIK. Note that the latest WhatWG spec does not indicate that a NOT_SUPPORTED_ERR should be thrown (
https://html.spec.whatwg.org/multipage/scripting.html#dom-context-2d-putimagedata
), only the W3C one does. Honestly, here, there isn't much benefit in adding more code just to throw a different exception. We already throw because of the Web IDL.
> Source/WebCore/html/canvas/CanvasRenderingContext2D.idl:163 > + [RaisesException] void putImageData(ImageData? imagedata, unrestricted float dx, unrestricted float dy);
These are not unrestricted as per the spec.
> Source/WebCore/html/canvas/CanvasRenderingContext2D.idl:164 > + [RaisesException] void putImageData(ImageData? imagedata, unrestricted float dx, unrestricted float dy, unrestricted float dirtyX, unrestricted float dirtyY, unrestricted float dirtyWidth, unrestricted float dirtyHeight);
ditto.
KwangHyuk
Comment 7
2015-02-23 06:19:43 PST
> Honestly, here, there isn't much benefit in adding more code just to throw a different exception.
agreed to your idea.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug