[html5] r7853 - [giow] (3) Try to match reality, and adapt not-yet-implemented features to match [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Apr 25 17:23:35 PDT 2013


Author: ianh
Date: 2013-04-25 17:23:34 -0700 (Thu, 25 Apr 2013)
New Revision: 7853

Modified:
   complete.html
   index
   source
Log:
[giow] (3) Try to match reality, and adapt not-yet-implemented features to match.
Affected topics: Canvas

Modified: complete.html
===================================================================
--- complete.html	2013-04-23 22:55:12 UTC (rev 7852)
+++ complete.html	2013-04-26 00:23:34 UTC (rev 7853)
@@ -248,7 +248,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 23 April 2013</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 26 April 2013</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -33034,7 +33034,7 @@
          <a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a> or
          <a href=#imagebitmap>ImageBitmap</a>) <dfn id=canvasimagesource>CanvasImageSource</dfn>;
 
-enum <dfn id=canvasdrawingstylesfillrules>CanvasDrawingStylesFillRules</dfn> { "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>", "<a href=#dom-context-2d-fillrule-evenodd title=dom-context-2d-fillRule-evenodd>evenodd</a>" };
+enum <dfn id=canvasfillrule>CanvasFillRule</dfn> { "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>", "<a href=#dom-context-2d-fillrule-evenodd title=dom-context-2d-fillRule-evenodd>evenodd</a>" };
 
 [<a href=#dom-context-2d title=dom-context-2d>Constructor</a>(optional unsigned long width, unsigned long height)]
 interface <dfn id=canvasrenderingcontext2d>CanvasRenderingContext2D</dfn> {
@@ -33111,10 +33111,9 @@
   void <a href=#dom-context-2d-strokerect title=dom-context-2d-strokeRect>strokeRect</a>(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
 
   // path API (see also <a href=#canvaspathmethods>CanvasPathMethods</a>)
-           attribute <a href=#canvasdrawingstylesfillrules>CanvasDrawingStylesFillRules</a> <a href=#dom-context-2d-fillrule title=dom-context-2d-fillRule>fillRule</a>; // (default "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>")
   void <a href=#dom-context-2d-beginpath title=dom-context-2d-beginPath>beginPath</a>();
-  void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>();
-  void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>(<a href=#path>Path</a> path);
+  void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>(optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
+  void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>(<a href=#path>Path</a> path, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
   void <a href=#dom-context-2d-stroke title=dom-context-2d-stroke>stroke</a>();
   void <a href=#dom-context-2d-stroke title=dom-context-2d-stroke>stroke</a>(<a href=#path>Path</a> path);
   void <a href=#dom-context-2d-drawsystemfocusring title=dom-context-2d-drawSystemFocusRing>drawSystemFocusRing</a>(<a href=#element>Element</a> element);
@@ -33123,11 +33122,11 @@
   boolean <a href=#dom-context-2d-drawcustomfocusring title=dom-context-2d-drawCustomFocusRing>drawCustomFocusRing</a>(<a href=#path>Path</a> path, <a href=#element>Element</a> element);
   void <a href=#dom-context-2d-scrollpathintoview title=dom-context-2d-scrollPathIntoView>scrollPathIntoView</a>();
   void <a href=#dom-context-2d-scrollpathintoview title=dom-context-2d-scrollPathIntoView>scrollPathIntoView</a>(<a href=#path>Path</a> path);
-  void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>();
-  void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(<a href=#path>Path</a> path);
+  void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
+  void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(<a href=#path>Path</a> path, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
   void <a href=#dom-context-2d-resetclip title=dom-context-2d-resetClip>resetClip</a>();
-  boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(unrestricted double x, unrestricted double y);
-  boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(<a href=#path>Path</a> path, unrestricted double x, unrestricted double y);
+  boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(unrestricted double x, unrestricted double y, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
+  boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(<a href=#path>Path</a> path, unrestricted double x, unrestricted double y, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
 
   // text (see also the <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> interface)
   void <a href=#dom-context-2d-filltext title=dom-context-2d-fillText>fillText</a>(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
@@ -33143,7 +33142,7 @@
 
   // hit regions
   void <a href=#dom-context-2d-addhitregion title=dom-context-2d-addHitRegion>addHitRegion</a>(<a href=#hitregionoptions>HitRegionOptions</a> options);
-  void <a href=#dom-context-2d-removehitregion title=dom-context-2d-removeHitRegion>removeHitRegion</a>(<a href=#hitregionoptions>HitRegionOptions</a> options);
+  void <a href=#dom-context-2d-removehitregion title=dom-context-2d-removeHitRegion>removeHitRegion</a>(DOMString id);
 
   // pixel manipulation
   <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-createimagedata title=dom-context-2d-createImageData>createImageData</a>(double sw, double sh);
@@ -33224,8 +33223,9 @@
 
 dictionary <dfn id=hitregionoptions>HitRegionOptions</dfn> {
   <a href=#path>Path</a>? <span title=dom-HitRegionOptions-path>path</span> = null;
+  <a href=#canvasfillrule>CanvasFillRule</a> <span title=dom-HitRegionOptions-fillRule>fillRule</span> = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>";
 <!--  <span>SVGMatrix</span>? <span title="dom-HitRegionOptions-transform">transform</span> = null;
--->  DOMString <span title=dom-HitRegionOptions-id>id</span> = "";
+-->  DOMString <span title=dom-HitRegionOptions-id>id</span> = ""; <!-- "" is converted to null internally by addHitRegion() -->
   DOMString? <span title=dom-HitRegionOptions-parentID>parentID</span> = null;
   DOMString <span title=dom-HitRegionOptions-cursor>cursor</span> = "inherit";
   // for control-backed regions:
@@ -33628,7 +33628,30 @@
 
   </div>
 
+  <hr><p>The <code><a href=#canvasfillrule>CanvasFillRule</a></code> enumeration is used to select the <dfn id=fill-rule>fill rule</dfn>
+  algorithm by which to determine if a point is inside or outside a path.</p>
 
+  <p>The value "<dfn id=dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero><code>nonzero</code></dfn>" value
+  indicates the non-zero winding rule, wherein
+
+     a point is considered to be outside a shape if the number of times a half-infinite straight
+     line drawn from that point crosses the shape's path going in one direction is equal to the
+     number of times it crosses the path going in the other direction.
+
+  </p>
+
+
+  <p>The "<dfn id=dom-context-2d-fillrule-evenodd title=dom-context-2d-fillRule-evenodd><code>evenodd</code></dfn>" value indicates
+  the even-odd rule, wherein
+
+     a point is considered to be outside a shape if the number of times a half-infinite straight
+     line drawn from that point crosses the shape's path is even.
+
+  </p>
+
+  <p>If a point is not outside a shape, it is inside the shape.</p>
+
+
   <h6 id=implementation-notes><span class=secno>4.8.11.2.1 </span>Implementation notes</h6>
 
   <p><i>This section is non-normative.</i></p>
@@ -33665,7 +33688,7 @@
 
   <ul class=brief><li>The current <a href=#transformations title=dom-context-2d-transformation>transformation matrix</a>.</li>
    <li>The current <a href=#clipping-region>clipping region</a>.</li>
-   <li>The current values of the following attributes: <code title=dom-context-2d-strokeStyle><a href=#dom-context-2d-strokestyle>strokeStyle</a></code>, <code title=dom-context-2d-fillStyle><a href=#dom-context-2d-fillstyle>fillStyle</a></code>, <code title=dom-context-2d-fillRule><a href=#dom-context-2d-fillrule>fillRule</a></code>, <code title=dom-context-2d-globalAlpha><a href=#dom-context-2d-globalalpha>globalAlpha</a></code>, <code title=dom-context-2d-lineWidth><a href=#dom-context-2d-linewidth>lineWidth</a></code>, <code title=dom-context-2d-lineCap><a href=#dom-context-2d-linecap>lineCap</a></code>, <code title=dom-context-2d-lineJoin><a href=#dom-context-2d-linejoin>lineJoin</a></code>, <code title=dom-context-2d-miterLimit><a href=#dom-context-2d-miterlimit>miterLimit</a></code>, <code title=dom-context-2d-lineDashOffset><a href=#dom-context-2d-linedashoffset>lineDashOffset</a></code>, <code title=dom-context-2d-shadowOffsetX><a href=#dom-context-2d-shadowoffsetx>shadowOf
 fsetX</a></code>, <code title=dom-context-2d-shadowOffsetY><a href=#dom-context-2d-shadowoffsety>shadowOffsetY</a></code>, <code title=dom-context-2d-shadowBlur><a href=#dom-context-2d-shadowblur>shadowBlur</a></code>, <code title=dom-context-2d-shadowColor><a href=#dom-context-2d-shadowcolor>shadowColor</a></code>, <code title=dom-context-2d-globalCompositeOperation><a href=#dom-context-2d-globalcompositeoperation>globalCompositeOperation</a></code>, <code title=dom-context-2d-font><a href=#dom-context-2d-font>font</a></code>, <code title=dom-context-2d-textAlign><a href=#dom-context-2d-textalign>textAlign</a></code>, <code title=dom-context-2d-textBaseline><a href=#dom-context-2d-textbaseline>textBaseline</a></code>, <code title=dom-context-2d-direction><a href=#dom-context-2d-direction>direction</a></code>, <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>.</li>
+   <li>The current values of the following attributes: <code title=dom-context-2d-strokeStyle><a href=#dom-context-2d-strokestyle>strokeStyle</a></code>, <code title=dom-context-2d-fillStyle><a href=#dom-context-2d-fillstyle>fillStyle</a></code>, <code title=dom-context-2d-globalAlpha><a href=#dom-context-2d-globalalpha>globalAlpha</a></code>, <code title=dom-context-2d-lineWidth><a href=#dom-context-2d-linewidth>lineWidth</a></code>, <code title=dom-context-2d-lineCap><a href=#dom-context-2d-linecap>lineCap</a></code>, <code title=dom-context-2d-lineJoin><a href=#dom-context-2d-linejoin>lineJoin</a></code>, <code title=dom-context-2d-miterLimit><a href=#dom-context-2d-miterlimit>miterLimit</a></code>, <code title=dom-context-2d-lineDashOffset><a href=#dom-context-2d-linedashoffset>lineDashOffset</a></code>, <code title=dom-context-2d-shadowOffsetX><a href=#dom-context-2d-shadowoffsetx>shadowOffsetX</a></code>, <code title=dom-context-2d-shadowOffsetY><a href=#dom-context-2d-shadowo
 ffsety>shadowOffsetY</a></code>, <code title=dom-context-2d-shadowBlur><a href=#dom-context-2d-shadowblur>shadowBlur</a></code>, <code title=dom-context-2d-shadowColor><a href=#dom-context-2d-shadowcolor>shadowColor</a></code>, <code title=dom-context-2d-globalCompositeOperation><a href=#dom-context-2d-globalcompositeoperation>globalCompositeOperation</a></code>, <code title=dom-context-2d-font><a href=#dom-context-2d-font>font</a></code>, <code title=dom-context-2d-textAlign><a href=#dom-context-2d-textalign>textAlign</a></code>, <code title=dom-context-2d-textBaseline><a href=#dom-context-2d-textbaseline>textBaseline</a></code>, <code title=dom-context-2d-direction><a href=#dom-context-2d-direction>direction</a></code>, <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>.</li>
    <li>The current <a href=#dash-list>dash list</a>.</li>
   </ul><p class=note>The <a href=#current-default-path>current default path</a> and the rendering context's bitmaps are not
   part of the drawing state. The <a href=#current-default-path>current default path</a> is persistent, and can only be
@@ -36483,20 +36506,10 @@
   <a href=#drawing-state>drawing state</a>. The <a href=#current-default-path>current default path</a> is
   a <a href=#concept-path title=concept-path>path</a>, as described above.</p>
 
-  <dl class=domintro><dt><var title="">context</var> . <code title=dom-context-2d-fillRule><a href=#dom-context-2d-fillrule>fillRule</a></code> [ = <var title="">value</var> ]</dt>
+  <dl class=domintro><dt><var title="">context</var> . <code title=dom-context-2d-beginPath><a href=#dom-context-2d-beginpath>beginPath</a></code>()</dt>
 
    <dd>
 
-    <p>Returns the current fill rule, either "<code title=dom-context-2d-fillRule-nonzero><a href=#dom-context-2d-fillrule-nonzero>nonzero</a></code>" or "<code title=dom-context-2d-fillRule-evenodd><a href=#dom-context-2d-fillrule-evenodd>evenodd</a></code>".</p>
-
-    <p>Can be set, to change the fill rule.</p>
-
-   </dd>
-
-   <dt><var title="">context</var> . <code title=dom-context-2d-beginPath><a href=#dom-context-2d-beginpath>beginPath</a></code>()</dt>
-
-   <dd>
-
     <p>Resets the <a href=#current-default-path>current default path</a>.</p>
 
    </dd>
@@ -36595,36 +36608,8 @@
 
   </dl><div class=impl>
 
-  <p>The <dfn id=dom-context-2d-fillrule title=dom-context-2d-fillRule><code>fillRule</code></dfn> attribute specifies the
-  context's <dfn id=current-fill-rule>current fill rule</dfn>. The two valid values are "<code title=dom-context-2d-fillRule-nonzero><a href=#dom-context-2d-fillrule-nonzero>nonzero</a></code>" and "<code title=dom-context-2d-fillRule-evenodd><a href=#dom-context-2d-fillrule-evenodd>evenodd</a></code>". On getting, it must return the current
-  value. On setting, the current value must be changed to the new value. When the context is
-  created, the <code title=dom-context-2d-fillRule><a href=#dom-context-2d-fillrule>fillRule</a></code> attribute must initially have
-  the value "<code title=dom-context-2d-fillRule-nonzero><a href=#dom-context-2d-fillrule-nonzero>nonzero</a></code>".</p>
-
-
-  <p>When the context's <code title=dom-context-2d-fillRule><a href=#dom-context-2d-fillrule>fillRule</a></code> attribute has the
-  value "<dfn id=dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero><code>nonzero</code></dfn>", the context's
-  <a href=#current-fill-rule>current fill rule</a> is the non-zero winding rule, wherein
-
-     a point is considered to be outside a shape if the number of times a half-infinite straight
-     line drawn from that point crosses the shape's path going in one direction is equal to the
-     number of times it crosses the path going in the other direction.
-
-  </p>
-
-
-  <p>When the context's <code title=dom-context-2d-fillRule><a href=#dom-context-2d-fillrule>fillRule</a></code> attribute has the
-  value "<dfn id=dom-context-2d-fillrule-evenodd title=dom-context-2d-fillRule-evenodd><code>evenodd</code></dfn>", the context's
-  <a href=#current-fill-rule>current fill rule</a> is the even-odd rule, wherein
-
-     a point is considered to be outside a shape if the number of times a half-infinite straight
-     line drawn from that point crosses the shape's path is even.
-
-  </p>
-
-  <p>If a point is not outside a shape, it is inside the shape.</p>
-
-  <hr><p>The <dfn id=dom-context-2d-beginpath title=dom-context-2d-beginPath><code>beginPath()</code></dfn>
+<!--CLEANUP-->
+  <p>The <dfn id=dom-context-2d-beginpath title=dom-context-2d-beginPath><code>beginPath()</code></dfn>
   method must empty the list of subpaths in the context's
   <a href=#current-default-path>current default path</a> so that the it once again has zero
   subpaths.</p>
@@ -36646,19 +36631,15 @@
 
   <p>The <dfn id=dom-context-2d-fill title=dom-context-2d-fill><code>fill()</code></dfn>
   method must fill all the subpaths of the intended path, using <code title=dom-context-2d-fillStyle><a href=#dom-context-2d-fillstyle>fillStyle</a></code>, and using the
-  <a href=#current-fill-rule>current fill rule</a>. Open subpaths must be implicitly
+  <a href=#fill-rule>fill rule</a> indicated by the <var title="">fillRule</var> argument. Open subpaths must be implicitly
   closed when being filled (without affecting the actual
   subpaths).</p>
 
-  <p class=note>Thus, if two overlapping but otherwise independent
-  subpaths have opposite windings, they cancel out and result in no
-  fill. If they have the same winding, that area just gets painted
-  once.</p>
-
   <p>The <dfn id=dom-context-2d-stroke title=dom-context-2d-stroke><code>stroke()</code></dfn> method
   must <a href=#trace-a-path title="trace a path">trace</a> the intended path,
   using the <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> object for the line
-  styles, and then fill the combined stroke area using the <code title=dom-context-2d-strokeStyle><a href=#dom-context-2d-strokestyle>strokeStyle</a></code> attribute.</p>
+  styles, and then fill the combined stroke area using the <code title=dom-context-2d-strokeStyle><a href=#dom-context-2d-strokestyle>strokeStyle</a></code> attribute,
+  using the <a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>non-zero winding rule</a>.</p>
 
   <p class=note>As a result of how the algorithm to <a href=#trace-a-path>trace a
   path</a> is defined, overlapping parts of the paths in one stroke
@@ -36807,7 +36788,7 @@
 
   <hr><p>The <dfn id=dom-context-2d-clip title=dom-context-2d-clip><code>clip()</code></dfn> method must create a new
   <dfn id=clipping-region>clipping region</dfn> by calculating the intersection of the current clipping region and the
-  area described by the intended path, using the <a href=#current-fill-rule>current fill rule</a>. Open subpaths must
+  area described by the intended path, using the <a href=#fill-rule>fill rule</a> indicated by the <var title="">fillRule</var> argument. Open subpaths must
   be implicitly closed when computing the clipping region, without affecting the actual subpaths.
   The new clipping region replaces the current clipping region.</p>
 
@@ -36831,7 +36812,7 @@
   method must return true if the point given by the <var title="">x</var> and <var title="">y</var> coordinates passed to the
   method, when treated as coordinates in the canvas coordinate space
   unaffected by the current transformation, is inside the intended
-  path as determined by the <a href=#current-fill-rule>current fill rule</a>; and must
+  path as determined by the <a href=#fill-rule>fill rule</a> indicated by the <var title="">fillRule</var> argument; and must
   return false otherwise. Points on the path itself must be considered
   to be inside the path. If either of the arguments is infinite or
   NaN, then the method must return false.</p>
@@ -37068,7 +37049,7 @@
    created.</li>
 
    <li><p>Optionally, a non-empty string representing an <dfn id="hit-region's-id" title="hit region's ID">ID</dfn> for
-   distinguishing the region from others.</li>
+   distinguishing the region from others.</li> <!-- cannot be the empty string -->
 
    <li><p>Optionally, a reference to another region that acts as the <dfn id="hit-region's-parent" title="hit region's
    parent">parent</dfn> for this one.</li>
@@ -37114,6 +37095,10 @@
      member is not provided or is set to null, the <a href=#current-default-path>current default path</a> is used
      instead.</dd>
 
+     <dt><code title=dom-HitRegionOptions-fillRule>fillRule</code> (default "<code title=dom-context-2d-fillRule-nonzero><a href=#dom-context-2d-fillrule-nonzero>nonzero</a></code>")
+
+     <dd>The <a href=#fill-rule>fill rule</a> to use when determining which pixels are inside the path.</dd>
+
 <!--
      <dt><code title="dom-HitRegionOptions-transform">transform</code> (default null)
 
@@ -37122,7 +37107,7 @@
      title="dom-HitRegionOptions-path">path</code> member.</dd>
 -->
 
-     <dt><code title=dom-HitRegionOptions-id>id</code> (default empty string)
+     <dt><code title=dom-HitRegionOptions-id>id</code> (default empty string) <!-- empty string is treated as null internally -->
 
      <dd>The ID to use for this region. This is used in <code><a href=#mouseevent>MouseEvent</a></code> events on the
      <code><a href=#the-canvas-element>canvas</a></code> (<code title=dom-MouseEvent-region><a href=#dom-mouseevent-region>event.region</a></code>) and as a way to
@@ -37172,7 +37157,7 @@
 
     </ul></dd>
 
-   <dt><var title="">context</var> . <code title=dom-context-2d-removeHitRegion><a href=#dom-context-2d-removehitregion>removeHitRegion</a></code>(<var title="">options</var>)</dt>
+   <dt><var title="">context</var> . <code title=dom-context-2d-removeHitRegion><a href=#dom-context-2d-removehitregion>removeHitRegion</a></code>(<var title="">id</var>)</dt>
 
    <dd>
 
@@ -37196,7 +37181,7 @@
   <p><dfn id=the-region-identified-by-the-id>The region identified by the ID</dfn> <var title="">ID</var> in a bitmap <var title="">bitmap</var> is the value returned by the following algorithm (which can return a
   <a href=#hit-region>hit region</a> or nothing):</p>
 
-  <ol><li><p>If <var title="">ID</var> is null, return nothing and abort these steps.</li>
+  <ol><li><p>If <var title="">ID</var> is null, return nothing and abort these steps.</li> <!-- this step is redundant but makes sure people don't confuse 'null' for 'not having an ID' -->
 
    <li><p>Let <var title="">list</var> be the <a href=#hit-region-list>hit region list</a> associated with <var title="">bitmap</var>.</li>
 
@@ -37315,6 +37300,9 @@
    <li><p>Transform all the coordinates and lines in <var title="">source path</var> by the current
    transform matrix, if the <var title="">arguments</var> object's <code title=dom-HitRegionOptions-path>path</code> member is not null.</li>
 
+   <li><p>Let <var title="">specified pixels</var> be the pixels contained in <var title="">source
+   path</var>, using the <a href=#fill-rule>fill rule</a> indicated by the <code title=dom-HitRegionOptions-fillRule>fillRule</code> member.</li>
+
    <li><p>If the <var title="">arguments</var> object's <code title=dom-HitRegionOptions-id>id</code> member is the empty string, let it be null
    instead.</li>
 
@@ -37350,8 +37338,7 @@
      <li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-role>role</code> member's value is the empty string, and the <code title=dom-HitRegionOptions-label>label</code> member's value is either null or the empty
      string.</li>
 
-     <li>The <a href=#concept-path title=concept-path>path</a> <var title="">source path</var> describes a shape with no
-     pixels.</li>
+     <li>The <var title="">specified pixels</var> has no pixels.</li>
 
      <li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control>control</code> member is not null but is neither an
      <code><a href=#the-a-element>a</a></code> element that <a href=#represents>represents</a> a <a href=#hyperlink>hyperlink</a>, a
@@ -37394,7 +37381,7 @@
 
     <dl><dt><a href="#hit-region's-set-of-pixels">Hit region's set of pixels</a>
 
-     <dd><p>The pixels contained in <var title="">source path</var>.
+     <dd><p>The <var title="">specified pixels</var>
 
 
      <dt><a href="#hit-region's-bounding-circumference">Hit region's bounding circumference</a>
@@ -37493,10 +37480,16 @@
   </ol><p>When the <dfn id=dom-context-2d-removehitregion title=dom-context-2d-removeHitRegion><code>removeHitRegion()</code></dfn>
   method is invoked, the user agent must run the following steps:</p>
 
-  <ol><li><p>Let <var title="">region</var> be <a href=#the-region-identified-by-the-id>the region identified by the ID</a> given by
-   the method's argument in the rendering context's <a href=#scratch-bitmap>scratch bitmap</a>. If no such region
-   currently exists, abort these steps.</li>
+  <ol><li>
 
+    <p>Let <var title="">region</var> be <a href=#the-region-identified-by-the-id>the region identified by the ID</a> given by the
+    method's argument in the rendering context's <a href=#scratch-bitmap>scratch bitmap</a>. If no such region
+    currently exists, abort these steps.</p>
+
+    <p class=note>If the method's argument is the empty string, then no region will match.</p>
+
+   </li>
+
    <li><p>Remove <var title="">region</var>, and all <a href=#hit-region title="hit region">hit regions</a> for
    which it is an <a href=#ancestor-region>ancestor region</a>, from the rendering context's <a href=#scratch-bitmap>scratch
    bitmap</a>'s <a href=#hit-region-list>hit region list</a>; then, if it had a <a href="#hit-region's-parent" title="hit region's
@@ -37531,6 +37524,7 @@
 
   </dl><div class=impl>
 
+<!--CLEANUP-->
   <p>The <dfn id=dom-mouseevent-region title=dom-MouseEvent-region><code>region</code></dfn>
   attribute on <code><a href=#mouseevent>MouseEvent</a></code> objects must return the value
   it was initialized to. When the object is created, this attribute

Modified: index
===================================================================
--- index	2013-04-23 22:55:12 UTC (rev 7852)
+++ index	2013-04-26 00:23:34 UTC (rev 7853)
@@ -248,7 +248,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 23 April 2013</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 26 April 2013</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -33034,7 +33034,7 @@
          <a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a> or
          <a href=#imagebitmap>ImageBitmap</a>) <dfn id=canvasimagesource>CanvasImageSource</dfn>;
 
-enum <dfn id=canvasdrawingstylesfillrules>CanvasDrawingStylesFillRules</dfn> { "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>", "<a href=#dom-context-2d-fillrule-evenodd title=dom-context-2d-fillRule-evenodd>evenodd</a>" };
+enum <dfn id=canvasfillrule>CanvasFillRule</dfn> { "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>", "<a href=#dom-context-2d-fillrule-evenodd title=dom-context-2d-fillRule-evenodd>evenodd</a>" };
 
 [<a href=#dom-context-2d title=dom-context-2d>Constructor</a>(optional unsigned long width, unsigned long height)]
 interface <dfn id=canvasrenderingcontext2d>CanvasRenderingContext2D</dfn> {
@@ -33111,10 +33111,9 @@
   void <a href=#dom-context-2d-strokerect title=dom-context-2d-strokeRect>strokeRect</a>(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
 
   // path API (see also <a href=#canvaspathmethods>CanvasPathMethods</a>)
-           attribute <a href=#canvasdrawingstylesfillrules>CanvasDrawingStylesFillRules</a> <a href=#dom-context-2d-fillrule title=dom-context-2d-fillRule>fillRule</a>; // (default "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>")
   void <a href=#dom-context-2d-beginpath title=dom-context-2d-beginPath>beginPath</a>();
-  void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>();
-  void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>(<a href=#path>Path</a> path);
+  void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>(optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
+  void <a href=#dom-context-2d-fill title=dom-context-2d-fill>fill</a>(<a href=#path>Path</a> path, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
   void <a href=#dom-context-2d-stroke title=dom-context-2d-stroke>stroke</a>();
   void <a href=#dom-context-2d-stroke title=dom-context-2d-stroke>stroke</a>(<a href=#path>Path</a> path);
   void <a href=#dom-context-2d-drawsystemfocusring title=dom-context-2d-drawSystemFocusRing>drawSystemFocusRing</a>(<a href=#element>Element</a> element);
@@ -33123,11 +33122,11 @@
   boolean <a href=#dom-context-2d-drawcustomfocusring title=dom-context-2d-drawCustomFocusRing>drawCustomFocusRing</a>(<a href=#path>Path</a> path, <a href=#element>Element</a> element);
   void <a href=#dom-context-2d-scrollpathintoview title=dom-context-2d-scrollPathIntoView>scrollPathIntoView</a>();
   void <a href=#dom-context-2d-scrollpathintoview title=dom-context-2d-scrollPathIntoView>scrollPathIntoView</a>(<a href=#path>Path</a> path);
-  void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>();
-  void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(<a href=#path>Path</a> path);
+  void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
+  void <a href=#dom-context-2d-clip title=dom-context-2d-clip>clip</a>(<a href=#path>Path</a> path, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
   void <a href=#dom-context-2d-resetclip title=dom-context-2d-resetClip>resetClip</a>();
-  boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(unrestricted double x, unrestricted double y);
-  boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(<a href=#path>Path</a> path, unrestricted double x, unrestricted double y);
+  boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(unrestricted double x, unrestricted double y, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
+  boolean <a href=#dom-context-2d-ispointinpath title=dom-context-2d-isPointInPath>isPointInPath</a>(<a href=#path>Path</a> path, unrestricted double x, unrestricted double y, optional <a href=#canvasfillrule>CanvasFillRule</a> fillRule = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>");
 
   // text (see also the <a href=#canvasdrawingstyles>CanvasDrawingStyles</a> interface)
   void <a href=#dom-context-2d-filltext title=dom-context-2d-fillText>fillText</a>(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
@@ -33143,7 +33142,7 @@
 
   // hit regions
   void <a href=#dom-context-2d-addhitregion title=dom-context-2d-addHitRegion>addHitRegion</a>(<a href=#hitregionoptions>HitRegionOptions</a> options);
-  void <a href=#dom-context-2d-removehitregion title=dom-context-2d-removeHitRegion>removeHitRegion</a>(<a href=#hitregionoptions>HitRegionOptions</a> options);
+  void <a href=#dom-context-2d-removehitregion title=dom-context-2d-removeHitRegion>removeHitRegion</a>(DOMString id);
 
   // pixel manipulation
   <a href=#imagedata>ImageData</a> <a href=#dom-context-2d-createimagedata title=dom-context-2d-createImageData>createImageData</a>(double sw, double sh);
@@ -33224,8 +33223,9 @@
 
 dictionary <dfn id=hitregionoptions>HitRegionOptions</dfn> {
   <a href=#path>Path</a>? <span title=dom-HitRegionOptions-path>path</span> = null;
+  <a href=#canvasfillrule>CanvasFillRule</a> <span title=dom-HitRegionOptions-fillRule>fillRule</span> = "<a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>nonzero</a>";
 <!--  <span>SVGMatrix</span>? <span title="dom-HitRegionOptions-transform">transform</span> = null;
--->  DOMString <span title=dom-HitRegionOptions-id>id</span> = "";
+-->  DOMString <span title=dom-HitRegionOptions-id>id</span> = ""; <!-- "" is converted to null internally by addHitRegion() -->
   DOMString? <span title=dom-HitRegionOptions-parentID>parentID</span> = null;
   DOMString <span title=dom-HitRegionOptions-cursor>cursor</span> = "inherit";
   // for control-backed regions:
@@ -33628,7 +33628,30 @@
 
   </div>
 
+  <hr><p>The <code><a href=#canvasfillrule>CanvasFillRule</a></code> enumeration is used to select the <dfn id=fill-rule>fill rule</dfn>
+  algorithm by which to determine if a point is inside or outside a path.</p>
 
+  <p>The value "<dfn id=dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero><code>nonzero</code></dfn>" value
+  indicates the non-zero winding rule, wherein
+
+     a point is considered to be outside a shape if the number of times a half-infinite straight
+     line drawn from that point crosses the shape's path going in one direction is equal to the
+     number of times it crosses the path going in the other direction.
+
+  </p>
+
+
+  <p>The "<dfn id=dom-context-2d-fillrule-evenodd title=dom-context-2d-fillRule-evenodd><code>evenodd</code></dfn>" value indicates
+  the even-odd rule, wherein
+
+     a point is considered to be outside a shape if the number of times a half-infinite straight
+     line drawn from that point crosses the shape's path is even.
+
+  </p>
+
+  <p>If a point is not outside a shape, it is inside the shape.</p>
+
+
   <h6 id=implementation-notes><span class=secno>4.8.11.2.1 </span>Implementation notes</h6>
 
   <p><i>This section is non-normative.</i></p>
@@ -33665,7 +33688,7 @@
 
   <ul class=brief><li>The current <a href=#transformations title=dom-context-2d-transformation>transformation matrix</a>.</li>
    <li>The current <a href=#clipping-region>clipping region</a>.</li>
-   <li>The current values of the following attributes: <code title=dom-context-2d-strokeStyle><a href=#dom-context-2d-strokestyle>strokeStyle</a></code>, <code title=dom-context-2d-fillStyle><a href=#dom-context-2d-fillstyle>fillStyle</a></code>, <code title=dom-context-2d-fillRule><a href=#dom-context-2d-fillrule>fillRule</a></code>, <code title=dom-context-2d-globalAlpha><a href=#dom-context-2d-globalalpha>globalAlpha</a></code>, <code title=dom-context-2d-lineWidth><a href=#dom-context-2d-linewidth>lineWidth</a></code>, <code title=dom-context-2d-lineCap><a href=#dom-context-2d-linecap>lineCap</a></code>, <code title=dom-context-2d-lineJoin><a href=#dom-context-2d-linejoin>lineJoin</a></code>, <code title=dom-context-2d-miterLimit><a href=#dom-context-2d-miterlimit>miterLimit</a></code>, <code title=dom-context-2d-lineDashOffset><a href=#dom-context-2d-linedashoffset>lineDashOffset</a></code>, <code title=dom-context-2d-shadowOffsetX><a href=#dom-context-2d-shadowoffsetx>shadowOf
 fsetX</a></code>, <code title=dom-context-2d-shadowOffsetY><a href=#dom-context-2d-shadowoffsety>shadowOffsetY</a></code>, <code title=dom-context-2d-shadowBlur><a href=#dom-context-2d-shadowblur>shadowBlur</a></code>, <code title=dom-context-2d-shadowColor><a href=#dom-context-2d-shadowcolor>shadowColor</a></code>, <code title=dom-context-2d-globalCompositeOperation><a href=#dom-context-2d-globalcompositeoperation>globalCompositeOperation</a></code>, <code title=dom-context-2d-font><a href=#dom-context-2d-font>font</a></code>, <code title=dom-context-2d-textAlign><a href=#dom-context-2d-textalign>textAlign</a></code>, <code title=dom-context-2d-textBaseline><a href=#dom-context-2d-textbaseline>textBaseline</a></code>, <code title=dom-context-2d-direction><a href=#dom-context-2d-direction>direction</a></code>, <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>.</li>
+   <li>The current values of the following attributes: <code title=dom-context-2d-strokeStyle><a href=#dom-context-2d-strokestyle>strokeStyle</a></code>, <code title=dom-context-2d-fillStyle><a href=#dom-context-2d-fillstyle>fillStyle</a></code>, <code title=dom-context-2d-globalAlpha><a href=#dom-context-2d-globalalpha>globalAlpha</a></code>, <code title=dom-context-2d-lineWidth><a href=#dom-context-2d-linewidth>lineWidth</a></code>, <code title=dom-context-2d-lineCap><a href=#dom-context-2d-linecap>lineCap</a></code>, <code title=dom-context-2d-lineJoin><a href=#dom-context-2d-linejoin>lineJoin</a></code>, <code title=dom-context-2d-miterLimit><a href=#dom-context-2d-miterlimit>miterLimit</a></code>, <code title=dom-context-2d-lineDashOffset><a href=#dom-context-2d-linedashoffset>lineDashOffset</a></code>, <code title=dom-context-2d-shadowOffsetX><a href=#dom-context-2d-shadowoffsetx>shadowOffsetX</a></code>, <code title=dom-context-2d-shadowOffsetY><a href=#dom-context-2d-shadowo
 ffsety>shadowOffsetY</a></code>, <code title=dom-context-2d-shadowBlur><a href=#dom-context-2d-shadowblur>shadowBlur</a></code>, <code title=dom-context-2d-shadowColor><a href=#dom-context-2d-shadowcolor>shadowColor</a></code>, <code title=dom-context-2d-globalCompositeOperation><a href=#dom-context-2d-globalcompositeoperation>globalCompositeOperation</a></code>, <code title=dom-context-2d-font><a href=#dom-context-2d-font>font</a></code>, <code title=dom-context-2d-textAlign><a href=#dom-context-2d-textalign>textAlign</a></code>, <code title=dom-context-2d-textBaseline><a href=#dom-context-2d-textbaseline>textBaseline</a></code>, <code title=dom-context-2d-direction><a href=#dom-context-2d-direction>direction</a></code>, <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>.</li>
    <li>The current <a href=#dash-list>dash list</a>.</li>
   </ul><p class=note>The <a href=#current-default-path>current default path</a> and the rendering context's bitmaps are not
   part of the drawing state. The <a href=#current-default-path>current default path</a> is persistent, and can only be
@@ -36483,20 +36506,10 @@
   <a href=#drawing-state>drawing state</a>. The <a href=#current-default-path>current default path</a> is
   a <a href=#concept-path title=concept-path>path</a>, as described above.</p>
 
-  <dl class=domintro><dt><var title="">context</var> . <code title=dom-context-2d-fillRule><a href=#dom-context-2d-fillrule>fillRule</a></code> [ = <var title="">value</var> ]</dt>
+  <dl class=domintro><dt><var title="">context</var> . <code title=dom-context-2d-beginPath><a href=#dom-context-2d-beginpath>beginPath</a></code>()</dt>
 
    <dd>
 
-    <p>Returns the current fill rule, either "<code title=dom-context-2d-fillRule-nonzero><a href=#dom-context-2d-fillrule-nonzero>nonzero</a></code>" or "<code title=dom-context-2d-fillRule-evenodd><a href=#dom-context-2d-fillrule-evenodd>evenodd</a></code>".</p>
-
-    <p>Can be set, to change the fill rule.</p>
-
-   </dd>
-
-   <dt><var title="">context</var> . <code title=dom-context-2d-beginPath><a href=#dom-context-2d-beginpath>beginPath</a></code>()</dt>
-
-   <dd>
-
     <p>Resets the <a href=#current-default-path>current default path</a>.</p>
 
    </dd>
@@ -36595,36 +36608,8 @@
 
   </dl><div class=impl>
 
-  <p>The <dfn id=dom-context-2d-fillrule title=dom-context-2d-fillRule><code>fillRule</code></dfn> attribute specifies the
-  context's <dfn id=current-fill-rule>current fill rule</dfn>. The two valid values are "<code title=dom-context-2d-fillRule-nonzero><a href=#dom-context-2d-fillrule-nonzero>nonzero</a></code>" and "<code title=dom-context-2d-fillRule-evenodd><a href=#dom-context-2d-fillrule-evenodd>evenodd</a></code>". On getting, it must return the current
-  value. On setting, the current value must be changed to the new value. When the context is
-  created, the <code title=dom-context-2d-fillRule><a href=#dom-context-2d-fillrule>fillRule</a></code> attribute must initially have
-  the value "<code title=dom-context-2d-fillRule-nonzero><a href=#dom-context-2d-fillrule-nonzero>nonzero</a></code>".</p>
-
-
-  <p>When the context's <code title=dom-context-2d-fillRule><a href=#dom-context-2d-fillrule>fillRule</a></code> attribute has the
-  value "<dfn id=dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero><code>nonzero</code></dfn>", the context's
-  <a href=#current-fill-rule>current fill rule</a> is the non-zero winding rule, wherein
-
-     a point is considered to be outside a shape if the number of times a half-infinite straight
-     line drawn from that point crosses the shape's path going in one direction is equal to the
-     number of times it crosses the path going in the other direction.
-
-  </p>
-
-
-  <p>When the context's <code title=dom-context-2d-fillRule><a href=#dom-context-2d-fillrule>fillRule</a></code> attribute has the
-  value "<dfn id=dom-context-2d-fillrule-evenodd title=dom-context-2d-fillRule-evenodd><code>evenodd</code></dfn>", the context's
-  <a href=#current-fill-rule>current fill rule</a> is the even-odd rule, wherein
-
-     a point is considered to be outside a shape if the number of times a half-infinite straight
-     line drawn from that point crosses the shape's path is even.
-
-  </p>
-
-  <p>If a point is not outside a shape, it is inside the shape.</p>
-
-  <hr><p>The <dfn id=dom-context-2d-beginpath title=dom-context-2d-beginPath><code>beginPath()</code></dfn>
+<!--CLEANUP-->
+  <p>The <dfn id=dom-context-2d-beginpath title=dom-context-2d-beginPath><code>beginPath()</code></dfn>
   method must empty the list of subpaths in the context's
   <a href=#current-default-path>current default path</a> so that the it once again has zero
   subpaths.</p>
@@ -36646,19 +36631,15 @@
 
   <p>The <dfn id=dom-context-2d-fill title=dom-context-2d-fill><code>fill()</code></dfn>
   method must fill all the subpaths of the intended path, using <code title=dom-context-2d-fillStyle><a href=#dom-context-2d-fillstyle>fillStyle</a></code>, and using the
-  <a href=#current-fill-rule>current fill rule</a>. Open subpaths must be implicitly
+  <a href=#fill-rule>fill rule</a> indicated by the <var title="">fillRule</var> argument. Open subpaths must be implicitly
   closed when being filled (without affecting the actual
   subpaths).</p>
 
-  <p class=note>Thus, if two overlapping but otherwise independent
-  subpaths have opposite windings, they cancel out and result in no
-  fill. If they have the same winding, that area just gets painted
-  once.</p>
-
   <p>The <dfn id=dom-context-2d-stroke title=dom-context-2d-stroke><code>stroke()</code></dfn> method
   must <a href=#trace-a-path title="trace a path">trace</a> the intended path,
   using the <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> object for the line
-  styles, and then fill the combined stroke area using the <code title=dom-context-2d-strokeStyle><a href=#dom-context-2d-strokestyle>strokeStyle</a></code> attribute.</p>
+  styles, and then fill the combined stroke area using the <code title=dom-context-2d-strokeStyle><a href=#dom-context-2d-strokestyle>strokeStyle</a></code> attribute,
+  using the <a href=#dom-context-2d-fillrule-nonzero title=dom-context-2d-fillRule-nonzero>non-zero winding rule</a>.</p>
 
   <p class=note>As a result of how the algorithm to <a href=#trace-a-path>trace a
   path</a> is defined, overlapping parts of the paths in one stroke
@@ -36807,7 +36788,7 @@
 
   <hr><p>The <dfn id=dom-context-2d-clip title=dom-context-2d-clip><code>clip()</code></dfn> method must create a new
   <dfn id=clipping-region>clipping region</dfn> by calculating the intersection of the current clipping region and the
-  area described by the intended path, using the <a href=#current-fill-rule>current fill rule</a>. Open subpaths must
+  area described by the intended path, using the <a href=#fill-rule>fill rule</a> indicated by the <var title="">fillRule</var> argument. Open subpaths must
   be implicitly closed when computing the clipping region, without affecting the actual subpaths.
   The new clipping region replaces the current clipping region.</p>
 
@@ -36831,7 +36812,7 @@
   method must return true if the point given by the <var title="">x</var> and <var title="">y</var> coordinates passed to the
   method, when treated as coordinates in the canvas coordinate space
   unaffected by the current transformation, is inside the intended
-  path as determined by the <a href=#current-fill-rule>current fill rule</a>; and must
+  path as determined by the <a href=#fill-rule>fill rule</a> indicated by the <var title="">fillRule</var> argument; and must
   return false otherwise. Points on the path itself must be considered
   to be inside the path. If either of the arguments is infinite or
   NaN, then the method must return false.</p>
@@ -37068,7 +37049,7 @@
    created.</li>
 
    <li><p>Optionally, a non-empty string representing an <dfn id="hit-region's-id" title="hit region's ID">ID</dfn> for
-   distinguishing the region from others.</li>
+   distinguishing the region from others.</li> <!-- cannot be the empty string -->
 
    <li><p>Optionally, a reference to another region that acts as the <dfn id="hit-region's-parent" title="hit region's
    parent">parent</dfn> for this one.</li>
@@ -37114,6 +37095,10 @@
      member is not provided or is set to null, the <a href=#current-default-path>current default path</a> is used
      instead.</dd>
 
+     <dt><code title=dom-HitRegionOptions-fillRule>fillRule</code> (default "<code title=dom-context-2d-fillRule-nonzero><a href=#dom-context-2d-fillrule-nonzero>nonzero</a></code>")
+
+     <dd>The <a href=#fill-rule>fill rule</a> to use when determining which pixels are inside the path.</dd>
+
 <!--
      <dt><code title="dom-HitRegionOptions-transform">transform</code> (default null)
 
@@ -37122,7 +37107,7 @@
      title="dom-HitRegionOptions-path">path</code> member.</dd>
 -->
 
-     <dt><code title=dom-HitRegionOptions-id>id</code> (default empty string)
+     <dt><code title=dom-HitRegionOptions-id>id</code> (default empty string) <!-- empty string is treated as null internally -->
 
      <dd>The ID to use for this region. This is used in <code><a href=#mouseevent>MouseEvent</a></code> events on the
      <code><a href=#the-canvas-element>canvas</a></code> (<code title=dom-MouseEvent-region><a href=#dom-mouseevent-region>event.region</a></code>) and as a way to
@@ -37172,7 +37157,7 @@
 
     </ul></dd>
 
-   <dt><var title="">context</var> . <code title=dom-context-2d-removeHitRegion><a href=#dom-context-2d-removehitregion>removeHitRegion</a></code>(<var title="">options</var>)</dt>
+   <dt><var title="">context</var> . <code title=dom-context-2d-removeHitRegion><a href=#dom-context-2d-removehitregion>removeHitRegion</a></code>(<var title="">id</var>)</dt>
 
    <dd>
 
@@ -37196,7 +37181,7 @@
   <p><dfn id=the-region-identified-by-the-id>The region identified by the ID</dfn> <var title="">ID</var> in a bitmap <var title="">bitmap</var> is the value returned by the following algorithm (which can return a
   <a href=#hit-region>hit region</a> or nothing):</p>
 
-  <ol><li><p>If <var title="">ID</var> is null, return nothing and abort these steps.</li>
+  <ol><li><p>If <var title="">ID</var> is null, return nothing and abort these steps.</li> <!-- this step is redundant but makes sure people don't confuse 'null' for 'not having an ID' -->
 
    <li><p>Let <var title="">list</var> be the <a href=#hit-region-list>hit region list</a> associated with <var title="">bitmap</var>.</li>
 
@@ -37315,6 +37300,9 @@
    <li><p>Transform all the coordinates and lines in <var title="">source path</var> by the current
    transform matrix, if the <var title="">arguments</var> object's <code title=dom-HitRegionOptions-path>path</code> member is not null.</li>
 
+   <li><p>Let <var title="">specified pixels</var> be the pixels contained in <var title="">source
+   path</var>, using the <a href=#fill-rule>fill rule</a> indicated by the <code title=dom-HitRegionOptions-fillRule>fillRule</code> member.</li>
+
    <li><p>If the <var title="">arguments</var> object's <code title=dom-HitRegionOptions-id>id</code> member is the empty string, let it be null
    instead.</li>
 
@@ -37350,8 +37338,7 @@
      <li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-role>role</code> member's value is the empty string, and the <code title=dom-HitRegionOptions-label>label</code> member's value is either null or the empty
      string.</li>
 
-     <li>The <a href=#concept-path title=concept-path>path</a> <var title="">source path</var> describes a shape with no
-     pixels.</li>
+     <li>The <var title="">specified pixels</var> has no pixels.</li>
 
      <li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control>control</code> member is not null but is neither an
      <code><a href=#the-a-element>a</a></code> element that <a href=#represents>represents</a> a <a href=#hyperlink>hyperlink</a>, a
@@ -37394,7 +37381,7 @@
 
     <dl><dt><a href="#hit-region's-set-of-pixels">Hit region's set of pixels</a>
 
-     <dd><p>The pixels contained in <var title="">source path</var>.
+     <dd><p>The <var title="">specified pixels</var>
 
 
      <dt><a href="#hit-region's-bounding-circumference">Hit region's bounding circumference</a>
@@ -37493,10 +37480,16 @@
   </ol><p>When the <dfn id=dom-context-2d-removehitregion title=dom-context-2d-removeHitRegion><code>removeHitRegion()</code></dfn>
   method is invoked, the user agent must run the following steps:</p>
 
-  <ol><li><p>Let <var title="">region</var> be <a href=#the-region-identified-by-the-id>the region identified by the ID</a> given by
-   the method's argument in the rendering context's <a href=#scratch-bitmap>scratch bitmap</a>. If no such region
-   currently exists, abort these steps.</li>
+  <ol><li>
 
+    <p>Let <var title="">region</var> be <a href=#the-region-identified-by-the-id>the region identified by the ID</a> given by the
+    method's argument in the rendering context's <a href=#scratch-bitmap>scratch bitmap</a>. If no such region
+    currently exists, abort these steps.</p>
+
+    <p class=note>If the method's argument is the empty string, then no region will match.</p>
+
+   </li>
+
    <li><p>Remove <var title="">region</var>, and all <a href=#hit-region title="hit region">hit regions</a> for
    which it is an <a href=#ancestor-region>ancestor region</a>, from the rendering context's <a href=#scratch-bitmap>scratch
    bitmap</a>'s <a href=#hit-region-list>hit region list</a>; then, if it had a <a href="#hit-region's-parent" title="hit region's
@@ -37531,6 +37524,7 @@
 
   </dl><div class=impl>
 
+<!--CLEANUP-->
   <p>The <dfn id=dom-mouseevent-region title=dom-MouseEvent-region><code>region</code></dfn>
   attribute on <code><a href=#mouseevent>MouseEvent</a></code> objects must return the value
   it was initialized to. When the object is created, this attribute

Modified: source
===================================================================
--- source	2013-04-23 22:55:12 UTC (rev 7852)
+++ source	2013-04-26 00:23:34 UTC (rev 7853)
@@ -35662,7 +35662,7 @@
          <span>CanvasRenderingContext2D</span> or
          <span>ImageBitmap</span>) <dfn>CanvasImageSource</dfn>;
 
-enum <dfn>CanvasDrawingStylesFillRules</dfn> { "<span title="dom-context-2d-fillRule-nonzero">nonzero</span>", "<span title="dom-context-2d-fillRule-evenodd">evenodd</span>" };
+enum <dfn>CanvasFillRule</dfn> { "<span title="dom-context-2d-fillRule-nonzero">nonzero</span>", "<span title="dom-context-2d-fillRule-evenodd">evenodd</span>" };
 
 [<span title="dom-context-2d">Constructor</span>(optional unsigned long width, unsigned long height)]
 interface <dfn>CanvasRenderingContext2D</dfn> {
@@ -35739,10 +35739,9 @@
   void <span title="dom-context-2d-strokeRect">strokeRect</span>(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
 
   // path API (see also <span>CanvasPathMethods</span>)
-           attribute <span>CanvasDrawingStylesFillRules</span> <span title="dom-context-2d-fillRule">fillRule</span>; // (default "<span title="dom-context-2d-fillRule-nonzero">nonzero</span>")
   void <span title="dom-context-2d-beginPath">beginPath</span>();
-  void <span title="dom-context-2d-fill">fill</span>();
-  void <span title="dom-context-2d-fill">fill</span>(<span>Path</span> path);
+  void <span title="dom-context-2d-fill">fill</span>(optional <span>CanvasFillRule</span> fillRule = "<span title="dom-context-2d-fillRule-nonzero">nonzero</span>");
+  void <span title="dom-context-2d-fill">fill</span>(<span>Path</span> path, optional <span>CanvasFillRule</span> fillRule = "<span title="dom-context-2d-fillRule-nonzero">nonzero</span>");
   void <span title="dom-context-2d-stroke">stroke</span>();
   void <span title="dom-context-2d-stroke">stroke</span>(<span>Path</span> path);
   void <span title="dom-context-2d-drawSystemFocusRing">drawSystemFocusRing</span>(<span>Element</span> element);
@@ -35751,11 +35750,11 @@
   boolean <span title="dom-context-2d-drawCustomFocusRing">drawCustomFocusRing</span>(<span>Path</span> path, <span>Element</span> element);
   void <span title="dom-context-2d-scrollPathIntoView">scrollPathIntoView</span>();
   void <span title="dom-context-2d-scrollPathIntoView">scrollPathIntoView</span>(<span>Path</span> path);
-  void <span title="dom-context-2d-clip">clip</span>();
-  void <span title="dom-context-2d-clip">clip</span>(<span>Path</span> path);
+  void <span title="dom-context-2d-clip">clip</span>(optional <span>CanvasFillRule</span> fillRule = "<span title="dom-context-2d-fillRule-nonzero">nonzero</span>");
+  void <span title="dom-context-2d-clip">clip</span>(<span>Path</span> path, optional <span>CanvasFillRule</span> fillRule = "<span title="dom-context-2d-fillRule-nonzero">nonzero</span>");
   void <span title="dom-context-2d-resetClip">resetClip</span>();
-  boolean <span title="dom-context-2d-isPointInPath">isPointInPath</span>(unrestricted double x, unrestricted double y);
-  boolean <span title="dom-context-2d-isPointInPath">isPointInPath</span>(<span>Path</span> path, unrestricted double x, unrestricted double y);
+  boolean <span title="dom-context-2d-isPointInPath">isPointInPath</span>(unrestricted double x, unrestricted double y, optional <span>CanvasFillRule</span> fillRule = "<span title="dom-context-2d-fillRule-nonzero">nonzero</span>");
+  boolean <span title="dom-context-2d-isPointInPath">isPointInPath</span>(<span>Path</span> path, unrestricted double x, unrestricted double y, optional <span>CanvasFillRule</span> fillRule = "<span title="dom-context-2d-fillRule-nonzero">nonzero</span>");
 
   // text (see also the <span>CanvasDrawingStyles</span> interface)
   void <span title="dom-context-2d-fillText">fillText</span>(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
@@ -35771,7 +35770,7 @@
 
   // hit regions
   void <span title="dom-context-2d-addHitRegion">addHitRegion</span>(<span>HitRegionOptions</span> options);
-  void <span title="dom-context-2d-removeHitRegion">removeHitRegion</span>(<span>HitRegionOptions</span> options);
+  void <span title="dom-context-2d-removeHitRegion">removeHitRegion</span>(DOMString id);
 
   // pixel manipulation
   <span>ImageData</span> <span title="dom-context-2d-createImageData">createImageData</span>(double sw, double sh);
@@ -35852,8 +35851,9 @@
 
 dictionary <dfn>HitRegionOptions</dfn> {
   <span>Path</span>? <span title="dom-HitRegionOptions-path">path</span> = null;
+  <span>CanvasFillRule</span> <span title="dom-HitRegionOptions-fillRule">fillRule</span> = "<span title="dom-context-2d-fillRule-nonzero">nonzero</span>";
 <!--  <span>SVGMatrix</span>? <span title="dom-HitRegionOptions-transform">transform</span> = null;
--->  DOMString <span title="dom-HitRegionOptions-id">id</span> = "";
+-->  DOMString <span title="dom-HitRegionOptions-id">id</span> = ""; <!-- "" is converted to null internally by addHitRegion() -->
   DOMString? <span title="dom-HitRegionOptions-parentID">parentID</span> = null;
   DOMString <span title="dom-HitRegionOptions-cursor">cursor</span> = "inherit";
   // for control-backed regions:
@@ -36334,7 +36334,32 @@
 
   </div>
 
+  <hr>
 
+  <p>The <code>CanvasFillRule</code> enumeration is used to select the <dfn>fill rule</dfn>
+  algorithm by which to determine if a point is inside or outside a path.</p>
+
+  <p>The value "<dfn title="dom-context-2d-fillRule-nonzero"><code>nonzero</code></dfn>" value
+  indicates the non-zero winding rule, wherein
+
+     a point is considered to be outside a shape if the number of times a half-infinite straight
+     line drawn from that point crosses the shape's path going in one direction is equal to the
+     number of times it crosses the path going in the other direction.
+
+  </p>
+
+
+  <p>The "<dfn title="dom-context-2d-fillRule-evenodd"><code>evenodd</code></dfn>" value indicates
+  the even-odd rule, wherein
+
+     a point is considered to be outside a shape if the number of times a half-infinite straight
+     line drawn from that point crosses the shape's path is even.
+
+  </p>
+
+  <p>If a point is not outside a shape, it is inside the shape.</p>
+
+
   <h6>Implementation notes</h6>
 
   <!--END dev-html--><p><i>This section is non-normative.</i></p><!--START dev-html-->
@@ -36376,7 +36401,6 @@
    <li>The current values of the following attributes: <code
    title="dom-context-2d-strokeStyle">strokeStyle</code>, <code
    title="dom-context-2d-fillStyle">fillStyle</code>, <code
-   title="dom-context-2d-fillRule">fillRule</code>, <code
    title="dom-context-2d-globalAlpha">globalAlpha</code>, <code
    title="dom-context-2d-lineWidth">lineWidth</code>, <code
    title="dom-context-2d-lineCap">lineCap</code>, <code
@@ -39749,16 +39773,6 @@
 
   <dl class="domintro">
 
-   <dt><var title="">context</var> . <code title="dom-context-2d-fillRule">fillRule</code> [ = <var title="">value</var> ]</dt>
-
-   <dd>
-
-    <p>Returns the current fill rule, either "<code title="dom-context-2d-fillRule-nonzero">nonzero</code>" or "<code title="dom-context-2d-fillRule-evenodd">evenodd</code>".</p>
-
-    <p>Can be set, to change the fill rule.</p>
-
-   </dd>
-
    <dt><var title="">context</var> . <code title="dom-context-2d-beginPath">beginPath</code>()</dt>
 
    <dd>
@@ -39863,39 +39877,7 @@
 
   <div class="impl">
 
-  <p>The <dfn title="dom-context-2d-fillRule"><code>fillRule</code></dfn> attribute specifies the
-  context's <dfn>current fill rule</dfn>. The two valid values are "<code
-  title="dom-context-2d-fillRule-nonzero">nonzero</code>" and "<code
-  title="dom-context-2d-fillRule-evenodd">evenodd</code>". On getting, it must return the current
-  value. On setting, the current value must be changed to the new value. When the context is
-  created, the <code title="dom-context-2d-fillRule">fillRule</code> attribute must initially have
-  the value "<code title="dom-context-2d-fillRule-nonzero">nonzero</code>".</p>
-
-
-  <p>When the context's <code title="dom-context-2d-fillRule">fillRule</code> attribute has the
-  value "<dfn title="dom-context-2d-fillRule-nonzero"><code>nonzero</code></dfn>", the context's
-  <span>current fill rule</span> is the non-zero winding rule, wherein
-
-     a point is considered to be outside a shape if the number of times a half-infinite straight
-     line drawn from that point crosses the shape's path going in one direction is equal to the
-     number of times it crosses the path going in the other direction.
-
-  </p>
-
-
-  <p>When the context's <code title="dom-context-2d-fillRule">fillRule</code> attribute has the
-  value "<dfn title="dom-context-2d-fillRule-evenodd"><code>evenodd</code></dfn>", the context's
-  <span>current fill rule</span> is the even-odd rule, wherein
-
-     a point is considered to be outside a shape if the number of times a half-infinite straight
-     line drawn from that point crosses the shape's path is even.
-
-  </p>
-
-  <p>If a point is not outside a shape, it is inside the shape.</p>
-
-  <hr>
-
+<!--CLEANUP-->
   <p>The <dfn
   title="dom-context-2d-beginPath"><code>beginPath()</code></dfn>
   method must empty the list of subpaths in the context's
@@ -39921,21 +39903,17 @@
   <p>The <dfn title="dom-context-2d-fill"><code>fill()</code></dfn>
   method must fill all the subpaths of the intended path, using <code
   title="dom-context-2d-fillStyle">fillStyle</code>, and using the
-  <span>current fill rule</span>. Open subpaths must be implicitly
+  <span>fill rule</span> indicated by the <var title="">fillRule</var> argument. Open subpaths must be implicitly
   closed when being filled (without affecting the actual
   subpaths).</p>
 
-  <p class="note">Thus, if two overlapping but otherwise independent
-  subpaths have opposite windings, they cancel out and result in no
-  fill. If they have the same winding, that area just gets painted
-  once.</p>
-
   <p>The <dfn
   title="dom-context-2d-stroke"><code>stroke()</code></dfn> method
   must <span title="trace a path">trace</span> the intended path,
   using the <code>CanvasRenderingContext2D</code> object for the line
   styles, and then fill the combined stroke area using the <code
-  title="dom-context-2d-strokeStyle">strokeStyle</code> attribute.</p>
+  title="dom-context-2d-strokeStyle">strokeStyle</code> attribute,
+  using the <span title="dom-context-2d-fillRule-nonzero">non-zero winding rule</span>.</p>
 
   <p class="note">As a result of how the algorithm to <span>trace a
   path</span> is defined, overlapping parts of the paths in one stroke
@@ -40127,7 +40105,7 @@
 
   <p>The <dfn title="dom-context-2d-clip"><code>clip()</code></dfn> method must create a new
   <dfn>clipping region</dfn> by calculating the intersection of the current clipping region and the
-  area described by the intended path, using the <span>current fill rule</span>. Open subpaths must
+  area described by the intended path, using the <span>fill rule</span> indicated by the <var title="">fillRule</var> argument. Open subpaths must
   be implicitly closed when computing the clipping region, without affecting the actual subpaths.
   The new clipping region replaces the current clipping region.</p>
 
@@ -40156,7 +40134,7 @@
   title="">x</var> and <var title="">y</var> coordinates passed to the
   method, when treated as coordinates in the canvas coordinate space
   unaffected by the current transformation, is inside the intended
-  path as determined by the <span>current fill rule</span>; and must
+  path as determined by the <span>fill rule</span> indicated by the <var title="">fillRule</var> argument; and must
   return false otherwise. Points on the path itself must be considered
   to be inside the path. If either of the arguments is infinite or
   NaN, then the method must return false.</p>
@@ -40420,7 +40398,7 @@
    created.</p></li>
 
    <li><p>Optionally, a non-empty string representing an <dfn title="hit region's ID">ID</dfn> for
-   distinguishing the region from others.</p></li>
+   distinguishing the region from others.</p></li> <!-- cannot be the empty string -->
 
    <li><p>Optionally, a reference to another region that acts as the <dfn title="hit region's
    parent">parent</dfn> for this one.</p></li>
@@ -40477,6 +40455,10 @@
      member is not provided or is set to null, the <span>current default path</span> is used
      instead.</dd>
 
+     <dt><code title="dom-HitRegionOptions-fillRule">fillRule</code> (default "<code title="dom-context-2d-fillRule-nonzero">nonzero</code>")
+
+     <dd>The <span>fill rule</span> to use when determining which pixels are inside the path.</dd>
+
 <!--
      <dt><code title="dom-HitRegionOptions-transform">transform</code> (default null)
 
@@ -40485,7 +40467,7 @@
      title="dom-HitRegionOptions-path">path</code> member.</dd>
 -->
 
-     <dt><code title="dom-HitRegionOptions-id">id</code> (default empty string)
+     <dt><code title="dom-HitRegionOptions-id">id</code> (default empty string) <!-- empty string is treated as null internally -->
 
      <dd>The ID to use for this region. This is used in <code>MouseEvent</code> events on the
      <code>canvas</code> (<code title="dom-MouseEvent-region">event.region</code>) and as a way to
@@ -40543,7 +40525,7 @@
 
    </dd>
 
-   <dt><var title="">context</var> . <code title="dom-context-2d-removeHitRegion">removeHitRegion</code>(<var title="">options</var>)</dt>
+   <dt><var title="">context</var> . <code title="dom-context-2d-removeHitRegion">removeHitRegion</code>(<var title="">id</var>)</dt>
 
    <dd>
 
@@ -40573,7 +40555,7 @@
 
   <ol>
 
-   <li><p>If <var title="">ID</var> is null, return nothing and abort these steps.</p></li>
+   <li><p>If <var title="">ID</var> is null, return nothing and abort these steps.</p></li> <!-- this step is redundant but makes sure people don't confuse 'null' for 'not having an ID' -->
 
    <li><p>Let <var title="">list</var> be the <span>hit region list</span> associated with <var
    title="">bitmap</var>.</p></li>
@@ -40735,6 +40717,10 @@
    transform matrix, if the <var title="">arguments</var> object's <code
    title="dom-HitRegionOptions-path">path</code> member is not null.</p></li>
 
+   <li><p>Let <var title="">specified pixels</var> be the pixels contained in <var title="">source
+   path</var>, using the <span>fill rule</span> indicated by the <code
+   title="dom-HitRegionOptions-fillRule">fillRule</code> member.</p></li>
+
    <li><p>If the <var title="">arguments</var> object's <code
    title="dom-HitRegionOptions-id">id</code> member is the empty string, let it be null
    instead.</p></li>
@@ -40787,8 +40773,7 @@
      title="dom-HitRegionOptions-label">label</code> member's value is either null or the empty
      string.</li>
 
-     <li>The <span title="concept-path">path</span> <var title="">source path</var> describes a shape with no
-     pixels.</li>
+     <li>The <var title="">specified pixels</var> has no pixels.</li>
 
      <li>The <var title="">arguments</var> object's <code
      title="dom-HitRegionOptions-control">control</code> member is not null but is neither an
@@ -40847,7 +40832,7 @@
 
      <dt><span>Hit region's set of pixels</span>
 
-     <dd><p>The pixels contained in <var title="">source path</var>.
+     <dd><p>The <var title="">specified pixels</var>
 
 
      <dt><span>Hit region's bounding circumference</span>
@@ -40969,10 +40954,16 @@
 
   <ol>
 
-   <li><p>Let <var title="">region</var> be <span>the region identified by the ID</span> given by
-   the method's argument in the rendering context's <span>scratch bitmap</span>. If no such region
-   currently exists, abort these steps.</p></li>
+   <li>
 
+    <p>Let <var title="">region</var> be <span>the region identified by the ID</span> given by the
+    method's argument in the rendering context's <span>scratch bitmap</span>. If no such region
+    currently exists, abort these steps.</p>
+
+    <p class="note">If the method's argument is the empty string, then no region will match.</p>
+
+   </li>
+
    <li><p>Remove <var title="">region</var>, and all <span title="hit region">hit regions</span> for
    which it is an <span>ancestor region</span>, from the rendering context's <span>scratch
    bitmap</span>'s <span>hit region list</span>; then, if it had a <span title="hit region's
@@ -41015,6 +41006,7 @@
 
   <div class="impl">
 
+<!--CLEANUP-->
   <p>The <dfn title="dom-MouseEvent-region"><code>region</code></dfn>
   attribute on <code>MouseEvent</code> objects must return the value
   it was initialized to. When the object is created, this attribute




More information about the Commit-Watchers mailing list