<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>17954</bug_id>
          
          <creation_ts>2008-03-19 12:08:40 -0700</creation_ts>
          <short_desc>Canvas arc() with radius of 0 throws exception</short_desc>
          <delta_ts>2008-03-19 15:29:11 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://ejohn.org/files/bugs/arc/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="John Resig">jresig</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>74462</commentid>
    <comment_count>0</comment_count>
    <who name="John Resig">jresig</who>
    <bug_when>2008-03-19 12:08:40 -0700</bug_when>
    <thetext>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

&quot;Negative values for radius must cause the implementation to raise an INDEX_SIZE_ERR exception.&quot;

However, that is not the case for arcs with a radius of 0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74463</commentid>
    <comment_count>1</comment_count>
    <who name="John Resig">jresig</who>
    <bug_when>2008-03-19 12:12:47 -0700</bug_when>
    <thetext>For posterity, here&apos;s the reduction:

&lt;canvas width=&quot;100&quot; height=&quot;100&quot; id=&quot;canvas&quot;&gt;&lt;/canvas&gt;
&lt;script&gt;window.onload = function(){
var c = document.getElementsByTagName(&quot;canvas&quot;)[0];
var context = c.getContext(&quot;2d&quot;);
context.arc( 10, 10, 0, 0, 180, false );
};&lt;/script&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74464</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-03-19 13:11:34 -0700</bug_when>
    <thetext>&lt;rdar://problem/5808318&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74475</commentid>
    <comment_count>3</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2008-03-19 15:29:11 -0700</bug_when>
    <thetext>Landed r31162</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>