On Wed, 8 Sep 2010, 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);
The problem with throwing an exception is that it's fairly common for code to
end up accidentally producing a NaN or Infinite value, and throwing an
exception would prevent all subsequent drawing from occurring.
I suggested this behaviour a long time ago after running into yet another piece
of
On Wed, Sep 8, 2010 at 9:45 AM, Oliver Hunt oli...@apple.com wrote:
The problem with throwing an exception is that it's fairly common for code to
end up accidentally producing a NaN or Infinite value, and throwing an
exception would prevent all subsequent drawing from occurring.
I believe
On Sep 8, 2010, at 10:20 AM, Eric Uhrhane wrote:
On Wed, Sep 8, 2010 at 9:45 AM, Oliver Hunt oli...@apple.com wrote:
The problem with throwing an exception is that it's fairly common for code
to end up accidentally producing a NaN or Infinite value, and throwing an
exception would prevent
On 9/8/10 12:45 PM, Oliver Hunt wrote:
I suggested this behaviour a long time ago after running into yet
another piece of code that hit this case in webkit (back when the
spec said to throw an exception) yet firefox and opera did not throw.
In some cases firefox does throw, and in others it
On Wed, Sep 8, 2010 at 10:33 AM, Oliver Hunt oli...@apple.com wrote:
In a lot of cases all you want to do is ignore NaN and Infinite values,
otherwise you basically have to prepend every call to canvas with NaN and
Infinity checks if you're computing values unless you can absolutely
On 9/8/10 1:33 PM, Oliver Hunt wrote:
Additionally there is content that depends on the non-throwing behaviour, in
webkit we had to drop the exceptions that we threw due to content that worked
in firefox because of the absence of exceptions.
I'm really curious about this claim. Looking at
On Sep 8, 2010, at 11:00 AM, Boris Zbarsky wrote:
On 9/8/10 12:45 PM, Oliver Hunt wrote:
I suggested this behaviour a long time ago after running into yet
another piece of code that hit this case in webkit (back when the
spec said to throw an exception) yet firefox and opera did not throw.
On 9/8/10 2:22 PM, Oliver Hunt wrote:
I can see a number of canvas discussions in late 2007/early 2008 on the whatwg
list, so i presume that covers some of it.
OK. All versions of Firefox threw at that point.
It also only leads to incorrect rendering if the behaviour if it's unexpected.
On Wed, Sep 8, 2010 at 9:02 PM, Boris Zbarsky bzbar...@mit.edu wrote:
On 9/8/10 2:22 PM, Oliver Hunt wrote:
One old case that failed in the presence of exceptions was the old canvex
demo at http://canvex.lazyilluminati.com/83/play.xhtml - this was one of the
first cases i saw after trying to
On 9/8/10 7:04 PM, Philip Taylor wrote:
I think the relevant bug is
https://bugs.webkit.org/show_bug.cgi?id=13537 which was actually
caused by passing 0 sizes to drawImage, not by non-finite values.
Ah, yes. The drawImage size check for 0 in Gecko is still nonthrowing,
and has never thrown to
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)
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
This seems like a strange choice of behavior. Given that this is very
likely a bug in the program, wouldn't it make more sense to throw an
exception as to make it easier to debug? Similar to for example
Node.appendChild when called with a null argument.
/ Jonas
On Tue, Sep 7, 2010 at 10:32 PM,
14 matches
Mail list logo