Bug 42160 - Canvas: drawImage() with wrong 'image' argument type should always throw TypeError
Summary: Canvas: drawImage() with wrong 'image' argument type should always throw Type...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: HTML5
Depends on:
Blocks:
 
Reported: 2010-07-13 05:58 PDT by Andreas Kling
Modified: 2010-07-13 15:50 PDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (8.02 KB, patch)
2010-07-13 06:04 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2010-07-13 05:58:17 PDT
The in-tree test canvas/philip/tests/2d.drawImage.wrongtype.html was incorrect.
It has been fixed by Philip Taylor per http://dvcs.w3.org/hg/html/rev/adc54342f976

In the new version, we only fail the last test, passing a non-image/canvas/video element to drawImage() will raise TYPE_MISMATCH_ERR instead of TypeError.

Spec links:
http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-drawimage
http://www.w3.org/TR/WebIDL/#es-interface
Comment 1 Andreas Kling 2010-07-13 06:04:18 PDT
Created attachment 61363 [details]
Proposed patch
Comment 2 WebKit Commit Bot 2010-07-13 11:20:55 PDT
Comment on attachment 61363 [details]
Proposed patch

Rejecting patch 61363 from commit-queue.

Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--ignore-tests', 'compositing', '--quiet']" exit_code: 1
Running build-dumprendertree
Compiling Java tests
make: Nothing to be done for `default'.
Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
Testing 20658 test cases.
svg/dom/SVGScriptElement/script-set-href.svg -> failed

Exiting early after 1 failures. 18274 tests run.
364.19s total testing time

18273 test cases (99%) succeeded
1 test case (<1%) had incorrect layout
12 test cases (<1%) had stderr output

Full output: http://webkit-commit-queue.appspot.com/results/3513234
Comment 3 WebKit Commit Bot 2010-07-13 15:50:00 PDT
Comment on attachment 61363 [details]
Proposed patch

Clearing flags on attachment: 61363

Committed r63252: <http://trac.webkit.org/changeset/63252>
Comment 4 WebKit Commit Bot 2010-07-13 15:50:05 PDT
All reviewed patches have been landed.  Closing bug.