Bug 108755

Summary: Security DOM Exception with toDataURL of canvas drawn from SVG
Product: WebKit Reporter: Jonathan Deutsch <jonathan>
Component: CanvasAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: abarth, kbr, krit, pdr, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
repro case none

Description Jonathan Deutsch 2013-02-02 12:38:26 PST
Created attachment 186234 [details]
repro case

1. Open attached svgtest.html from SVGtoDataURLBug.zip
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
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

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