Skip to content

Commit

Permalink
[gow] (2) Make computed values in the Canvas API take effect on setti…
Browse files Browse the repository at this point in the history
…ng, not on use. (Re: [whatwg] are relative values of CanvasRenderingContext2D.font live to style changes?)

git-svn-id: http://svn.whatwg.org/webapps@1772 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 13, 2008
1 parent 3f8735f commit 043cf83
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 51 deletions.
46 changes: 21 additions & 25 deletions index
Expand Up @@ -2450,24 +2450,6 @@
<p class=big-issue>See <a
href="http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?content-type=text/html;%20charset=utf-8">http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?content-type=text/html;%20charset=utf-8</a>

<p>Certain features are defined in terms of CSS &lt;color&gt; 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. If the computed value of the 'color' property is undefined for a
particular case (e.g. because the element is not in a document), then the
"computed value of the 'color' property" for the purposes of determining
the computed value of the <code title="">currentColor</code> keyword is
fully opaque black. <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.

<h3 id=terminology><span class=secno>1.4 </span>Terminology</h3>

<p>This specification refers to both HTML and XML attributes and DOM
Expand Down Expand Up @@ -18481,6 +18463,19 @@ interface <dfn id=canvaspixelarray>CanvasPixelArray</dfn> {
> exceptions when passing in non-finite arguments.
-->

<p>Whenever the CSS value <code title="">currentColor</code> is used as a
color in this API, 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 at the time that the color is
specified (e.g. when the appropriate attribute is set, or when the method
is called; not when the color is rendered or otherwise used). If the
computed value of the 'color' property is undefined for a particular case
(e.g. because the element is not in a document), then the "computed value
of the 'color' property" for the purposes of determining the computed
value of the <code title="">currentColor</code> keyword is fully opaque
black. <a href="#refsCSS3COLOR">[CSS3COLOR]</a>

<h6 id=the-canvas0><span class=secno>3.11.11.1.1. </span>The canvas state</h6>

<p>Each context maintains a stack of drawing states. <dfn id=drawing0
Expand Down Expand Up @@ -19648,13 +19643,14 @@ notes on what would need to be defined for dashed lines:
percentages, 'em' or 'ex' units, or the 'larger' or 'smaller' keywords,
these must be interpreted relative to the computed value of the
'font-size' property of the corresponding <code><a
href="#canvas">canvas</a></code> element. When the 'font-weight' component
is set to the relative values 'bolder' and 'lighter', these must be
interpreted relative to the computed value of the 'font-weight' property
of the corresponding <code><a href="#canvas">canvas</a></code> element. If
the computed values are undefined for a particular case (e.g. because the
<code><a href="#canvas">canvas</a></code> element is not in a document),
then the relative keywords must be interpreted relative to the
href="#canvas">canvas</a></code> element at the time that the attribute is
set. When the 'font-weight' component is set to the relative values
'bolder' and 'lighter', these must be interpreted relative to the computed
value of the 'font-weight' property of the corresponding <code><a
href="#canvas">canvas</a></code> element at the time that the attribute is
set. If the computed values are undefined for a particular case (e.g.
because the <code><a href="#canvas">canvas</a></code> element is not in a
document), then the relative keywords must be interpreted relative to the
normal-weight 10px sans-serif default.

<p>The <dfn id=textalign
Expand Down
51 changes: 25 additions & 26 deletions source
Expand Up @@ -703,24 +703,6 @@
<p class="big-issue">See <a
href="http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?content-type=text/html;%20charset=utf-8">http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?content-type=text/html;%20charset=utf-8</a></p>

<p>Certain features are defined in terms of CSS &lt;color&gt;
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. If the computed
value of the 'color' property is undefined for a particular case
(e.g. because the element is not in a document), then the "computed
value of the 'color' property" for the purposes of determining the
computed value of the <code title="">currentColor</code> keyword is
fully opaque black. <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>


<h3>Terminology</h3>

Expand Down Expand Up @@ -16080,6 +16062,21 @@ interface <dfn>CanvasPixelArray</dfn> {
-->


<p>Whenever the CSS value <code title="">currentColor</code> is used
as a color in this API, 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 at the time that the
color is specified (e.g. when the appropriate attribute is set, or
when the method is called; not when the color is rendered or
otherwise used). If the computed value of the 'color' property is
undefined for a particular case (e.g. because the element is not in
a document), then the "computed value of the 'color' property" for
the purposes of determining the computed value of the <code
title="">currentColor</code> keyword is fully opaque black. <a
href="#refsCSS3COLOR">[CSS3COLOR]</a></p>




<h6>The canvas state</h6>
Expand Down Expand Up @@ -16657,6 +16654,7 @@ idea from Mihai:
-->



<h6>Line styles</h6>

<p>The <dfn
Expand Down Expand Up @@ -17280,14 +17278,15 @@ notes on what would need to be defined for dashed lines:
using percentages, 'em' or 'ex' units, or the 'larger' or 'smaller'
keywords, these must be interpreted relative to the computed value
of the 'font-size' property of the corresponding <code>canvas</code>
element. When the 'font-weight' component is set to the relative
values 'bolder' and 'lighter', these must be interpreted relative to
the computed value of the 'font-weight' property of the
corresponding <code>canvas</code> element. If the computed values
are undefined for a particular case (e.g. because the
<code>canvas</code> element is not in a document), then the relative
keywords must be interpreted relative to the normal-weight 10px
sans-serif default.</p>
element at the time that the attribute is set. When the
'font-weight' component is set to the relative values 'bolder' and
'lighter', these must be interpreted relative to the computed value
of the 'font-weight' property of the corresponding
<code>canvas</code> element at the time that the attribute is
set. If the computed values are undefined for a particular case
(e.g. because the <code>canvas</code> element is not in a document),
then the relative keywords must be interpreted relative to the
normal-weight 10px sans-serif default.</p>

<p>The <dfn
title="dom-context-2d-textAlign"><code>textAlign</code></dfn> DOM
Expand Down

0 comments on commit 043cf83

Please sign in to comment.