Re: [whatwg] Canvas API: What should happen if non-finite floats are used

2010-09-07 Thread Sam Weinig
In 4.8.11.1 the spec does state:

Except where otherwise specified, for the 2D context interface, any method 
call with a numeric argument whose value is infinite or a NaN value must be 
ignored.

-Sam

On Sep 7, 2010, at 9:41 PM, Boris Zbarsky wrote:

 Consider this testcase:
 
 !doctype html
 html
  body
canvas id=c width=200 height=200/canvas
script
try {
  var c = document.getElementById(c),
  t = c.getContext(2d);
  t.moveTo(100, 100);
  t.lineTo(NaN, NaN);
  t.lineTo(50, 25);
  t.stroke();
} catch (e) {alert(e); }
/script
  /body
 /html
 
 Behavior in the spec seems to be undefined (in particular, no mention is made 
 as to what the canvas API functions are supposed to do if non-finite values 
 are passed in).  Behavior in browsers is:
 
 Presto: Throws NOT_SUPPORTED_ERR on that lineTo(NaN, NaN) call.
 Gecko: Throws DOM_SYNTAX_ERR on that lineTo(NaN, NaN) call.
 Webkit: Silently ignores the lineTo(NaN, NaN) call, and then
draws a line from (100,100) to (50, 25).
 
 Seems like the spec needs to define this.
 
 -Boris
 
 P.S.  This isn't a hypothetical issue; this came up in a page that was trying 
 to graph things using canvas and ending up with divide-by-0 all over the 
 place.  It worked in webkit (though not drawing the right thing, so much).  
 It failed to draw anything in Presto or Gecko.



[whatwg] Replace argument for HTMLDocument.open()

2009-05-29 Thread Sam Weinig
In the 2 argument for of HTMLDocument.open() (the one that returns a  
HTMLDocument), the second argument is currently defined in the IDL as  
[Optional] in DOMString replace .  I believe this is intended to be a  
boolean argument, not a DOMString.


-Sam

Re: [whatwg] C:\fakepath\ in HTML5

2009-03-24 Thread Sam Weinig


On Mar 24, 2009, at 12:31 AM, Alexey Proskuryakov wrote:



On 24.03.2009, at 8:09, Ian Hickson wrote:
(I would expect Firefox, Safari, and Chrome to follow suit; Firefox  
for

compatibility, and Safari and Chrome for privacy.)



FWIW, WebKit returns just the file name now.



It should also be noted that we have not received any compatibility  
bugs since making this change.