CLOSED FIXED Bug 11251
fill methods in <canvas> throw JS exceptions for 0 size elements
https://bugs.webkit.org/show_bug.cgi?id=11251
Summary fill methods in <canvas> throw JS exceptions for 0 size elements
Oliver Hunt
Reported 2006-10-10 20:45:16 PDT
Canvas currently throws JS exceptions when JS attempts to draw 0 size elements (eg. when width, height, or radius, etc are 0). These should just be ignored per the spec.
Attachments
Simple test case (735 bytes, text/html)
2006-10-10 20:50 PDT, Oliver Hunt
no flags
patch (1.80 KB, patch)
2006-10-10 21:28 PDT, Oliver Hunt
darin: review-
Oliver Hunt
Comment 1 2006-10-10 20:50:02 PDT
Created attachment 11028 [details] Simple test case Simple test case, if it fails, it presents a red square, if it succeeds it presents a green square.
Oliver Hunt
Comment 2 2006-10-10 21:28:13 PDT
Created attachment 11029 [details] patch Patch that fixes problem
Adam Roben (:aroben)
Comment 3 2006-10-10 21:34:06 PDT
Comment on attachment 11029 [details] patch r=me. Please turn the testcase into a layout test and include it when you check in.
Darin Adler
Comment 4 2006-10-11 11:56:20 PDT
Comment on attachment 11029 [details] patch This patch breaks handling of NaN. We need to add test cases that pass non-numeric values (which turn into NaN) and then fix the code to say things like: if (!(r >= 0)) rather than if (r < 0) because expressions with NaN always yield false.
Darin Adler
Comment 5 2007-05-05 08:17:29 PDT
Looks like Oliver landed this patch long ago and didn't notice my review-. http://trac.webkit.org/projects/webkit/changeset/16993
Oliver Hunt
Comment 6 2007-05-06 00:16:02 PDT
Eek, i even discussed that one with you post landing ... will bang out a correction to the logic :(
Oliver Hunt
Comment 7 2007-07-03 14:39:17 PDT
Fxed this a while back (with correct inf handling)
Note You need to log in before you can comment on or make changes to this bug.