Re: [whatwg] drawImage with non-existent images

2008-06-12 Thread Ian Hickson
On Sun, 17 Feb 2008, Jeff Walden wrote:

 http://www.whatwg.org/specs/web-apps/current-work/multipage/section-the-canvas.html#drawimage:
 
  If the image argument is an HTMLImageElement object whose complete 
  attribute is false, then the implementation must raise an 
  INVALID_STATE_ERR exception.
 
 This is all well and good in the case where the image being drawn has 
 the same origin as the document where the canvas resides, but if the two 
 have different origins, this makes it possible to determine the 
 existence of an image on a foreign server.  This exception must only be 
 thrown if the image element's origin is the same as that of the document 
 containing the canvas being modified.
 
 (You can already determine image existence by seeing how an image 
 affects page layout, but this still seems like a reasonable behavior 
 anyway.)

There's all kinds of ways to determine if a remote resource is present or 
not -- onload/onerror on img or iframe, importing a script from that 
host, layout effects of an image, layout effects of a style sheet...

I think that ship has sailed.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: [whatwg] drawImage with non-existent images

2008-02-18 Thread Anne van Kesteren
On Mon, 18 Feb 2008 03:24:45 +0100, Jeff Walden [EMAIL PROTECTED]  
wrote:
If the image argument is an HTMLImageElement object whose complete  
attribute is false, then the implementation must raise an  
INVALID_STATE_ERR exception.


This is all well and good in the case where the image being drawn has  
the same origin as the document where the canvas resides, but if the two  
have different origins, this makes it possible to determine the  
existence of an image on a foreign server.


This is already possible using the error and load events and the complete  
attribute on img. There's no new risk here.



--
Anne van Kesteren
http://annevankesteren.nl/
http://www.opera.com/


[whatwg] drawImage with non-existent images

2008-02-17 Thread Jeff Walden

http://www.whatwg.org/specs/web-apps/current-work/multipage/section-the-canvas.html#drawimage:


If the image argument is an HTMLImageElement object whose complete attribute is 
false, then the implementation must raise an INVALID_STATE_ERR exception.


This is all well and good in the case where the image being drawn has the same 
origin as the document where the canvas resides, but if the two have different 
origins, this makes it possible to determine the existence of an image on a 
foreign server.  This exception must only be thrown if the image element's 
origin is the same as that of the document containing the canvas being modified.

(You can already determine image existence by seeing how an image affects page 
layout, but this still seems like a reasonable behavior anyway.)

Jeff