Bug 17954
Summary: | Canvas arc() with radius of 0 throws exception | ||
---|---|---|---|
Product: | WebKit | Reporter: | John Resig <jresig> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | oliver |
Priority: | P2 | Keywords: | HasReduction, InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://ejohn.org/files/bugs/arc/ |
John Resig
See the following reduction:
http://ejohn.org/files/bugs/arc/
Which throws the following error:
Error: INDEX_SIZE_ERR: DOM Exception 1
http://ejohn.org/files/bugs/arc/ (line 5)
According to the canvas spec:
http://www.whatwg.org/specs/web-apps/current-work/multipage/section-the-canvas.html
"Negative values for radius must cause the implementation to raise an INDEX_SIZE_ERR exception."
However, that is not the case for arcs with a radius of 0.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
John Resig
For posterity, here's the reduction:
<canvas width="100" height="100" id="canvas"></canvas>
<script>window.onload = function(){
var c = document.getElementsByTagName("canvas")[0];
var context = c.getContext("2d");
context.arc( 10, 10, 0, 0, 180, false );
};</script>
Mark Rowe (bdash)
<rdar://problem/5808318>
Oliver Hunt
Landed r31162