Bug 108755 - Security DOM Exception with toDataURL of canvas drawn from SVG
Summary: Security DOM Exception with toDataURL of canvas drawn from SVG
Status: RESOLVED DUPLICATE of bug 119492
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-02 12:38 PST by Jonathan Deutsch
Modified: 2013-08-16 19:53 PDT (History)
5 users (show)

See Also:


Attachments
repro case (2.84 KB, application/zip)
2013-02-02 12:38 PST, Jonathan Deutsch
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Deutsch 2013-02-02 12:38:26 PST
Created attachment 186234 [details]
repro case

1. Open attached svgtest.html from SVGtoDataURLBug.zip
-or-
1. In JavaScript, Create a canvas element
2. use drawImage to draw a new Image() from an SVG source
3. call toDataURL() on the canvas

I would expect to get a data URL with png contents of the image.

Safari instead reports:
SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent.

This affects Tumult Hype: http://tumult.com/hype/
Comment 1 Jonathan Deutsch 2013-02-02 12:38:58 PST
http://code.google.com/p/chromium/issues/detail?id=173868
Comment 2 Adam Barth 2013-02-04 10:18:30 PST
SVG images are complicated and we're not smart enough to determine whether it's safe to return the result to JavaScript.  We're conservative and always throw the exception.
Comment 3 Philip Rogers 2013-08-16 19:53:16 PDT
Fixed

*** This bug has been marked as a duplicate of bug 119492 ***