Re: SVGSVGElement.toDataURL()

On Mar 12, 2013, at 2:02 AM, Robert Longson <longsonr@gmail.com> wrote:

> Klaus,
> 
> Once you did such a transfer you can access all the bits of the image
> and do things like read off the visited state of links. We restrict
> image elements not to show things like link visited state to prevent
> such privacy leaks amongst other things. I'd be very wary of
> implementing SVGSVGElement.toDataURL even if it was added to a
> specification because of that.

I don't think that this is true. In our tests, neither Gecko nor WebKit exposed information like visited links to the Canvas, and yet we still mark the Canvas as dirty. I think we can get rid of this restriction now. But it may need to be discussed non a different mailing list. The same would be the case for SVGSVGElement.toDataURL if we would decide that it is worth doing it (actually, putting it on SVGElement would be more interesting if we can solve the dimension problem).

Greetings,
Dirk


> 
> Robert.
> 
> On 12 March 2013 07:54, Klaus Förster <klaus.foerster@uibk.ac.at> wrote:
>> On 03/11/2013 03:22 PM, Robert Longson wrote:
>>> 
>>> Looks pretty much cross browser to me according to the final row here:
>>> http://samples.msdn.microsoft.com/ietestcenter/#html5Canvas
>> 
>> The test you are referring to uses an SVG image as src attribute for the
>> HTMLImageElement that gets passed to Canvas drawImage. This is of course
>> valid according to the canvas specification but not what I was referring to.
>> I would like to use SVGSVGElement directly as source for drawImage or even
>> better SVGSVGElement.toDataURL to skip all the intermediate steps needed to
>> convert from SVG to raster. The browser has done this conversion already
>> when it displays my SVG content, so why not allow to export it as raster as
>> well?
>> 
>> Klaus
>> 
>> [1]
>> http://samples.msdn.microsoft.com/ietestcenter/html5/canvas_harness.htm?url=canvas-images-drawImage-001
>> 
>> 
> 

Received on Tuesday, 12 March 2013 16:20:04 UTC