W3C home > Mailing lists > Public > www-svg@w3.org > March 2013

Re: SVGSVGElement.toDataURL()

From: Dirk Schulze <dschulze@adobe.com>
Date: Tue, 12 Mar 2013 09:18:30 -0700
To: Robert Longson <longsonr@gmail.com>
CC: Klaus Förster <klaus.foerster@uibk.ac.at>, "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <BA55B532-AC12-42A0-B9AD-A6820DCB87C1@adobe.com>

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:41 UTC