[html5] r816 - /

whatwg at whatwg.org whatwg at whatwg.org
Tue May 15 18:17:35 PDT 2007


Author: ianh
Date: 2007-05-15 18:17:34 -0700 (Tue, 15 May 2007)
New Revision: 816

Modified:
   index
   source
Log:
[agow] (2) Define currentColor resolution; define strokeRect() better in the face of zero dimensions

Modified: index
===================================================================
--- index	2007-05-16 00:55:22 UTC (rev 815)
+++ index	2007-05-16 01:17:34 UTC (rev 816)
@@ -2010,6 +2010,20 @@
   <p class=big-issue>See <a
    href="http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?rev=1.35&content-type=text/html;%20charset=utf-8">http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?rev=1.35&content-type=text/html;%20charset=utf-8</a>
 
+  <p>Certain features are defined in terms of CSS <color> values. When
+   the CSS value <code title="">currentColor</code> is specified in this
+   context, the "computed value of the 'color' property" for the purposes of
+   determining the computed value of the <code title="">currentColor</code>
+   keyword is the computed value of the 'color' property on the element in
+   question. <a href="#refsCSS3COLOR">[CSS3COLOR]</a>
+
+  <p class=example>If a canvas gradient's <code
+   title=dom-canvasgradient-addColorStop><a
+   href="#addcolorstop">addColorStop()</a></code> method is called with the
+   <code title="">currentColor</code> keyword as the color, then the computed
+   value of the 'color' property on the <code><a
+   href="#canvas">canvas</a></code> element is the one that is used.
+
   <h4 id=relationship><span class=secno>1.3.3. </span>Relationship to HTML
    4.01, XHTML 1.1, DOM2 HTML</h4>
 
@@ -16328,15 +16342,19 @@
 
   <p>The <dfn id=strokerect
    title=dom-context-2d-strokeRect><code>strokeRect()</code></dfn> method
-   must draw a rectangular outline of the specified size using the <code
+   must draw stroke the path that would be created for the outline of a
+   rectangle of the specified size using the <code
    title=dom-context-2d-strokeStyle><a
    href="#strokestyle">strokeStyle</a></code>, <code
    title=dom-context-2d-lineWidth><a href="#linewidth">lineWidth</a></code>,
    <code title=dom-context-2d-lineJoin><a
    href="#linejoin">lineJoin</a></code>, and (if appropriate) <code
    title=dom-context-2d-miterLimit><a
-   href="#miterlimit">miterLimit</a></code> attributes. <span
-   title=issue>What should happen with zero heights or widths?</span>
+   href="#miterlimit">miterLimit</a></code> attributes. If both height and
+   width are zero, this method has no effect, since there is no path to
+   stroke (it's a point). If only one of the two is zero, then the method
+   will draw a line instead (the path for the outline is just a straight line
+   along the non-zero dimension).
 
   <h6 id=complex><span class=secno>3.14.11.1.8. </span>Complex shapes (paths)</h6>
 

Modified: source
===================================================================
--- source	2007-05-16 00:55:22 UTC (rev 815)
+++ source	2007-05-16 01:17:34 UTC (rev 816)
@@ -506,7 +506,21 @@
   <p class="big-issue">See <a
   href="http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?rev=1.35&content-type=text/html;%20charset=utf-8">http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?rev=1.35&content-type=text/html;%20charset=utf-8</a></p>
 
+  <p>Certain features are defined in terms of CSS <color>
+  values. When the CSS value <code title="">currentColor</code> is
+  specified in this context, the "computed value of the 'color'
+  property" for the purposes of determining the computed value of the
+  <code title="">currentColor</code> keyword is the computed value of
+  the 'color' property on the element in question. <a
+  href="#refsCSS3COLOR">[CSS3COLOR]</a></p>
 
+  <p class="example">If a canvas gradient's <code
+  title="dom-canvasgradient-addColorStop">addColorStop()</code> method
+  is called with the <code title="">currentColor</code> keyword as the
+  color, then the computed value of the 'color' property on the
+  <code>canvas</code> element is the one that is used.</p>
+
+
   <h4>Relationship to HTML 4.01, XHTML 1.1, DOM2 HTML</h4>
 
   <p><em>This section is non-normative.</em></p>
@@ -13920,14 +13934,17 @@
 
   <p>The <dfn
   title="dom-context-2d-strokeRect"><code>strokeRect()</code></dfn>
-  method must draw a rectangular outline of the specified size using
-  the <code title="dom-context-2d-strokeStyle">strokeStyle</code>,
-  <code title="dom-context-2d-lineWidth">lineWidth</code>, <code
+  method must draw stroke the path that would be created for the
+  outline of a rectangle of the specified size using the <code
+  title="dom-context-2d-strokeStyle">strokeStyle</code>, <code
+  title="dom-context-2d-lineWidth">lineWidth</code>, <code
   title="dom-context-2d-lineJoin">lineJoin</code>, and (if
   appropriate) <code
-  title="dom-context-2d-miterLimit">miterLimit</code>
-  attributes. <span title="issue">What should happen with zero heights
-  or widths?</span></p>
+  title="dom-context-2d-miterLimit">miterLimit</code> attributes. If
+  both height and width are zero, this method has no effect, since
+  there is no path to stroke (it's a point). If only one of the two is
+  zero, then the method will draw a line instead (the path for the
+  outline is just a straight line along the non-zero dimension).</p>
 
 
   <h6>Complex shapes (paths)</h6>




More information about the Commit-Watchers mailing list