WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
49369
Philip Canvas test 2d.drawImage.wrongtype fails
https://bugs.webkit.org/show_bug.cgi?id=49369
Summary
Philip Canvas test 2d.drawImage.wrongtype fails
Helder Correia
Reported
2010-11-11 01:16:17 PST
According to the spec (
http://philip.html5.org/tests/canvas/suite/tests/spec.html#testrefs.2d.drawImage.type
), if the image is of the wrong type, the implementation must raise a TYPE_MISMATCH_ERR exception. For this reason, I think this test is inconsistent with the spec, since it checks if the exception raised is an instance of TypeError instead. It is also inconsistent with the 2d.drawImage.null.html test (see
Bug 49368
which fixes it).
Attachments
Patch
(3.36 KB, patch)
2010-11-11 01:23 PST
,
Helder Correia
kling
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Helder Correia
Comment 1
2010-11-11 01:23:55 PST
Created
attachment 73589
[details]
Patch
Andreas Kling
Comment 2
2010-11-11 03:07:32 PST
Comment on
attachment 73589
[details]
Patch This is incorrect, if the first argument to drawImage() isn't either null, a HTMLImageElement, a HTMLVideoElement or a HTMLCanvasElement, it doesn't match any of the overloads and Web IDL specifies that a TypeError exception should be raised.
Philip Taylor
Comment 3
2010-11-11 03:11:37 PST
That's an old copy of the spec -
http://whatwg.org/html5#dom-context-2d-drawimage
is the latest version. (Also that's from an old copy of the tests -
http://test.w3.org/html/tests/submission/PhilipTaylor/canvas/
is the latest now). It no longer has a comment about "wrong type", because it's impossible for it to be wrong type at that point: WebIDL will throw a TypeError before reaching this stage.
Helder Correia
Comment 4
2010-11-11 12:53:57 PST
Thanks, guys. Closing this.
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