--- a/editcommands.html Wed Jul 13 10:57:30 2011 -0600
+++ b/editcommands.html Wed Jul 13 11:10:27 2011 -0600
@@ -1298,22 +1298,21 @@
</ul>
<p class=note>Conceptually, a simple modifiable element is a modifiable element
-which <a href=#specified-value title="specified value">specifies</a> a value for at most one
-command.
+which specifies a value for at most one command.
<h3 id=assorted-inline-formatting-command-algorithms><span class=secno>7.2 </span>Assorted inline formatting command algorithms</h3>
-<p>The <dfn id=effective-value>effective value</dfn> of a <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node title=concept-node>node</a> <var title="">node</var> for a given
-<var title="">command</var> is returned by the following algorithm, which will return
-either a string or null:
+<p>The <dfn id=effective-command-value>effective command value</dfn> of a <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node title=concept-node>node</a> <var title="">node</var> for a
+given <var title="">command</var> is returned by the following algorithm, which will
+return either a string or null:
<ol>
<li>If neither <var title="">node</var> nor its <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a> is an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>, return
null.
- <li>If <var title="">node</var> is not an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>, return the <a href=#effective-value>effective
- value</a> of its <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a> for <var title="">command</var>.
+ <li>If <var title="">node</var> is not an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>, return the <a href=#effective-command-value>effective
+ command value</a> of its <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a> for <var title="">command</var>.
<li>If <var title="">command</var> is "createLink" or "unlink":
@@ -1390,12 +1389,9 @@
property</a> for <var title="">command</var>.
</ol>
-<p>The <dfn id=specified-value>specified value</dfn> of an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> <var title="">element</var> for a
-given <var title="">command</var> is returned by the following algorithm, which will
-return either a string or null:
-
-<p class=XXX>"Specified value" already means something in CSS, I need to find a
-different name.
+<p>The <dfn id=specified-command-value>specified command value</dfn> of an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> <var title="">element</var>
+for a given <var title="">command</var> is returned by the following algorithm, which
+will return either a string or null:
<ol>
<li>If <var title="">command</var> is "backColor" or "hiliteColor" and the
@@ -1494,13 +1490,13 @@
<var title="">candidate</var> has exactly one <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>child</a>, and that <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>child</a> is also a
<a href=#modifiable-element>modifiable element</a>, and <var title="">candidate</var> is not a
<a href=#simple-modifiable-element>simple modifiable element</a> or <var title="">candidate</var>'s
- <a href=#specified-value>specified value</a> for <var title="">command</var> is not <var title="">new
+ <a href=#specified-command-value>specified command value</a> for <var title="">command</var> is not <var title="">new
value</var>, set <var title="">candidate</var> to its <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>child</a>.
<li>If <var title="">candidate</var> is <var title="">node</var>, or is not a <a href=#simple-modifiable-element>simple
- modifiable element</a>, or its <a href=#specified-value>specified value</a> and
- <a href=#effective-value>effective value</a> for <var title="">command</var> are not both <var title="">new
- value</var>, abort these steps.
+ modifiable element</a>, or its <a href=#specified-command-value>specified command value</a> and
+ <a href=#effective-command-value>effective command value</a> for <var title="">command</var> are not both
+ <var title="">new value</var>, abort these steps.
<li>While <var title="">candidate</var> has <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>children</a>, insert the first <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>child</a>
of <var title="">candidate</var> into <var title="">candidate</var>'s <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a> immediately
@@ -1539,7 +1535,7 @@
<ol>
<li>Let <var title="">values</var> be a list of (<a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node title=concept-node>node</a>, <a href=#command>command</a>,
- <a href=#specified-value>specified value</a>) triples, initially empty.
+ <a href=#specified-command-value>specified command value</a>) triples, initially empty.
<li>For each <var title="">node</var> in <var title="">node list</var>, for each
<var title="">command</var> in the list "subscript", "bold", "fontName", "fontSize",
@@ -1554,14 +1550,14 @@
<li>If <var title="">ancestor</var> is not an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>, set it to its <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>.
- <li>While <var title="">ancestor</var> is an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> and its <a href=#specified-value>specified
- value</a> for <var title="">command</var> is null, set it to its <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>.
+ <li>While <var title="">ancestor</var> is an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> and its <a href=#specified-command-value>specified
+ command value</a> for <var title="">command</var> is null, set it to its
+ <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>.
<li>If <var title="">ancestor</var> is an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>, add (<var title="">node</var>,
- <var title="">command</var>, <var title="">ancestor</var>'s <a href=#specified-value>specified value</a> for
- <var title="">command</var>) to <var title="">values</var>. Otherwise add (<var title="">node</var>,
- <var title="">command</var>, null) to <var title="">values</var>.
- </ol>
+ <var title="">command</var>, <var title="">ancestor</var>'s <a href=#specified-command-value>specified command
+ value</a> for <var title="">command</var>) to <var title="">values</var>. Otherwise add
+ (<var title="">node</var>, <var title="">command</var>, null) to <var title="">values</var>. </ol>
<li>Return <var title="">values</var>.
</ol>
@@ -1578,16 +1574,17 @@
<li>If <var title="">ancestor</var> is not an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>, set it to its <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>.
- <li>While <var title="">ancestor</var> is an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> and its <a href=#specified-value>specified
- value</a> for <var title="">command</var> is null, set it to its <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>.
+ <li>While <var title="">ancestor</var> is an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> and its <a href=#specified-command-value>specified
+ command value</a> for <var title="">command</var> is null, set it to its
+ <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>.
<li>If <var title="">value</var> is null and <var title="">ancestor</var> is an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>,
<a href=#push-down-values>push down values</a> on <var title="">node</var> for <var title="">command</var>,
with <var title="">new value</var> null.
<li>Otherwise, if <var title="">ancestor</var> is an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> and its
- <a href=#specified-value>specified value</a> for <var title="">command</var> is different from
- <var title="">value</var>, or if <var title="">ancestor</var> is not an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> and
+ <a href=#specified-command-value>specified command value</a> for <var title="">command</var> is different
+ from <var title="">value</var>, or if <var title="">ancestor</var> is not an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> and
<var title="">value</var> is not null, <a href=#force-the-value>force the value</a> of
<var title="">command</var> to <var title="">value</var> on <var title="">node</var>.
</ol>
@@ -1615,7 +1612,7 @@
<li>If <var title="">element</var> is not <a href=#editable>editable</a>, return the empty
list.
- <li>If <var title="">element</var>'s <a href=#specified-value>specified value</a> for
+ <li>If <var title="">element</var>'s <a href=#specified-command-value>specified command value</a> for
<var title="">command</var> is null, return the empty list. <!-- We want to abort
early so that we don't try unsetting background-color on a non-inline
element. -->
@@ -1661,7 +1658,7 @@
<li>If <var title="">element</var> is an <code class=external data-anolis-spec=html title="the a element"><a href=http://www.whatwg.org/html/#the-a-element>a</a></code> element and <var title="">command</var> is
"createLink" or "unlink", unset the <code class=external data-anolis-spec=html title=attr-hyperlink-href><a href=http://www.whatwg.org/html/#attr-hyperlink-href>href</a></code> property of <var title="">element</var>.
- <li>If <var title="">element</var>'s <a href=#specified-value>specified value</a> for
+ <li>If <var title="">element</var>'s <a href=#specified-command-value>specified command value</a> for
<var title="">command</var> is null, return the empty list.
<!-- If we get past this step, we're something like <b class=foo> where we
want to keep the extra attributes, so we stick them on a span. -->
@@ -1714,22 +1711,24 @@
<li>If <var title="">node</var>'s <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a> is not an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>, abort this
algorithm. <!-- E.g., a text node child of a document fragment. -->
- <li>If the <a href=#effective-value>effective value</a> of <var title="">command</var> is <var title="">new
- value</var> on <var title="">node</var>, abort this algorithm.
+ <li>If the <a href=#effective-command-value>effective command value</a> of <var title="">command</var> is
+ <var title="">new value</var> on <var title="">node</var>, abort this algorithm.
<li>Let <var title="">current ancestor</var> be <var title="">node</var>'s <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>.
<li>Let <var title="">ancestor list</var> be a list of <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node title=concept-node>nodes</a>, initially empty.
<li>While <var title="">current ancestor</var> is an <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>
- and the <a href=#effective-value>effective value</a> of <var title="">command</var> is not <var title="">new
- value</var> on it, append <var title="">current ancestor</var> to <var title="">ancestor
- list</var>, then set <var title="">current ancestor</var> to its <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>.
+ and the <a href=#effective-command-value>effective command value</a> of <var title="">command</var> is not
+ <var title="">new value</var> on it, append <var title="">current ancestor</var> to
+ <var title="">ancestor list</var>, then set <var title="">current ancestor</var> to its
+ <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>.
<li>If <var title="">ancestor list</var> is empty, abort this algorithm.
- <li>Let <var title="">propagated value</var> be the <a href=#specified-value>specified value</a> of
- <var title="">command</var> on the last member of <var title="">ancestor list</var>.
+ <li>Let <var title="">propagated value</var> be the <a href=#specified-command-value>specified command
+ value</a> of <var title="">command</var> on the last member of <var title="">ancestor
+ list</var>.
<!-- We can only remove specified values, so if the value isn't specified,
give up. Unless we're actually trying to push down a null specified value,
@@ -1766,7 +1765,7 @@
sense to break up the parent as long as it won't create an extra node (i.e.,
we're styling something that includes the first or last child).
-->
- <li>If the <a href=#effective-value>effective value</a> of <var title="">command</var> is not
+ <li>If the <a href=#effective-command-value>effective command value</a> of <var title="">command</var> is not
<var title="">new value</var> on the <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a> of the last member of <var title="">ancestor
list</var>, and <var title="">new value</var> is not null, abort this algorithm.
@@ -1778,16 +1777,16 @@
<li>Remove the last member from <var title="">ancestor list</var>.
- <li>If the <a href=#specified-value>specified value</a> of <var title="">current ancestor</var> for
- <var title="">command</var> is not null, set <var title="">propagated value</var> to that
- value.
+ <li>If the <a href=#specified-command-value>specified command value</a> of <var title="">current
+ ancestor</var> for <var title="">command</var> is not null, set <var title="">propagated
+ value</var> to that value.
<li>Let <var title="">children</var> be the <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>children</a> of <var title="">current
ancestor</var>.
- <li>If the <a href=#specified-value>specified value</a> of <var title="">current ancestor</var> for
- <var title="">command</var> is not null, <a href=#clear-the-value>clear the value</a> of
- <var title="">current ancestor</var>.
+ <li>If the <a href=#specified-command-value>specified command value</a> of <var title="">current
+ ancestor</var> for <var title="">command</var> is not null, <a href=#clear-the-value>clear the
+ value</a> of <var title="">current ancestor</var>.
<li>For every <var title="">child</var> in <var title="">children</var>:
@@ -1795,7 +1794,7 @@
<li>If <var title="">child</var> is <var title="">node</var>, continue with the next
<var title="">child</var>.
- <li>If <var title="">child</var> is an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> whose <a href=#specified-value>specified
+ <li>If <var title="">child</var> is an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> whose <a href=#specified-command-value>specified command
value</a> for <var title="">command</var> is neither null nor equal to
<var title="">propagated value</var>, continue with the next <var title="">child</var>.
<!--
@@ -1856,22 +1855,24 @@
<li><a href=#wrap>Wrap</a> the one-<a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node title=concept-node>node</a> list consisting of <var title="">node</var>,
with <a href=#sibling-criteria>sibling criteria</a> matching a <a href=#simple-modifiable-element>simple modifiable
- element</a> whose <a href=#specified-value>specified value</a> and <a href=#effective-value>effective
- value</a> for <var title="">command</var> are both <var title="">new value</var>, and with
- <a href=#new-parent-instructions>new parent instructions</a> returning null.
+ element</a> whose <a href=#specified-command-value>specified command value</a> and
+ <a href=#effective-command-value>effective command value</a> for <var title="">command</var> are both
+ <var title="">new value</var>, and with <a href=#new-parent-instructions>new parent instructions</a>
+ returning null.
<!-- The new parent instructions are too complicated to reasonably feed
into the wrap algorithm. -->
</ol>
- <li>If the <a href=#effective-value>effective value</a> of <var title="">command</var> is <var title="">new
- value</var> on <var title="">node</var>, abort this algorithm.
+ <li>If the <a href=#effective-command-value>effective command value</a> of <var title="">command</var> is
+ <var title="">new value</var> on <var title="">node</var>, abort this algorithm.
<li>If <var title="">node</var> is not an <a href=#allowed-child>allowed child</a> of "span":
<ol>
<li>Let <var title="">children</var> be all <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>children</a> of <var title="">node</var>,
- omitting any that are <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>s whose <a href=#specified-value>specified value</a> for
- <var title="">command</var> is neither null nor equal to <var title="">new value</var>.
+ omitting any that are <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>s whose <a href=#specified-command-value>specified command
+ value</a> for <var title="">command</var> is neither null nor equal to <var title="">new
+ value</var>.
<li><a href=#force-the-value>Force the value</a> of each <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node title=concept-node>node</a> in <var title="">children</var>,
with <var title="">command</var> and <var title="">new value</var> as in this invocation of
@@ -1885,8 +1886,8 @@
<li>Abort this algorithm.
</ol>
- <li>If the <a href=#effective-value>effective value</a> of <var title="">command</var> is <var title="">new
- value</var> on <var title="">node</var>, abort this algorithm.
+ <li>If the <a href=#effective-command-value>effective command value</a> of <var title="">command</var> is
+ <var title="">new value</var> on <var title="">node</var>, abort this algorithm.
<li>Let <var title="">new parent</var> be null.
@@ -2012,27 +2013,28 @@
<var title="">node</var>. <!-- This preserves boundary points correctly, as usual.
-->
- <li>If the <a href=#effective-value>effective value</a> of <var title="">command</var> for <var title="">new
- parent</var> is not <var title="">new value</var>, and the <a href=#relevant-css-property>relevant CSS
+ <li>If the <a href=#effective-command-value>effective command value</a> of <var title="">command</var> for
+ <var title="">new parent</var> is not <var title="">new value</var>, and the <a href=#relevant-css-property>relevant CSS
property</a> for <var title="">command</var> is not null, set that CSS property of
<var title="">new parent</var> to <var title="">new value</var> (if the new value would be
valid).
<li>If <var title="">command</var> is "strikethrough", and <var title="">new value</var> is
- "line-through", and the <a href=#effective-value>effective value</a> of "strikethrough" for
- <var title="">new parent</var> is not "line-through", set the "text-decoration"
- property of <var title="">new parent</var> to "line-through".
+ "line-through", and the <a href=#effective-command-value>effective command value</a> of
+ "strikethrough" for <var title="">new parent</var> is not "line-through", set the
+ "text-decoration" property of <var title="">new parent</var> to "line-through".
<li>If <var title="">command</var> is "underline", and <var title="">new value</var> is
- "underline", and the <a href=#effective-value>effective value</a> of "underline" for <var title="">new
- parent</var> is not "underline", set the "text-decoration" property of
- <var title="">new parent</var> to "underline".
+ "underline", and the <a href=#effective-command-value>effective command value</a> of "underline" for
+ <var title="">new parent</var> is not "underline", set the "text-decoration" property
+ of <var title="">new parent</var> to "underline".
<li>Append <var title="">node</var> to <var title="">new parent</var> as its last <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>child</a>,
<a href=#preserving-ranges>preserving ranges</a>.
- <li>If <var title="">node</var> is an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> and the <a href=#effective-value>effective value</a>
- of <var title="">command</var> for <var title="">node</var> is not <var title="">new value</var>:
+ <li>If <var title="">node</var> is an <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code> and the <a href=#effective-command-value>effective command
+ value</a> of <var title="">command</var> for <var title="">node</var> is not <var title="">new
+ value</var>:
<ol>
<li>Insert <var title="">node</var> into the <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a> of <var title="">new parent</var>
@@ -2065,8 +2067,9 @@
<ol>
<li>Let <var title="">children</var> be all <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>children</a> of <var title="">node</var>,
- omitting any that are <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>s whose <a href=#specified-value>specified value</a> for
- <var title="">command</var> is neither null nor equal to <var title="">new value</var>.
+ omitting any that are <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a></code>s whose <a href=#specified-command-value>specified command
+ value</a> for <var title="">command</var> is neither null nor equal to <var title="">new
+ value</var>.
<li><a href=#force-the-value>Force the value</a> of each <a class=external data-anolis-spec=domcore href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node title=concept-node>node</a> in <var title="">children</var>,
with <var title="">command</var> and <var title="">new value</var> as in this invocation
@@ -2274,11 +2277,11 @@
<p><a href=#indeterminate>Indeterminate</a>: True if among <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code>
nodes that are <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active
-range</a>, there are two that have distinct <a href=#effective-value title="effective
-value">effective values</a>. Otherwise false.
-
-<p><a href=#value>Value</a>: The <a href=#effective-value>effective value</a> of the <a href=#active-range>active
-range</a>'s <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-range-start title=concept-range-start>start</a> <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-boundary-point-node title=concept-boundary-point-node>node</a>.
+range</a>, there are two that have distinct <a href=#effective-command-value title="effective command
+value">effective command values</a>. Otherwise false.
+
+<p><a href=#value>Value</a>: The <a href=#effective-command-value>effective command value</a> of the
+<a href=#active-range>active range</a>'s <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-range-start title=concept-range-start>start</a> <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-boundary-point-node title=concept-boundary-point-node>node</a>.
<p class=note>This cannot be null, since the boundary point node of a selection
must always be either an element or a text node that's the child of an element.
@@ -2300,9 +2303,9 @@
<p><a href=#indeterminate>Indeterminate</a>: True if among <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code>
nodes that are <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active
-range</a>, there is at least one with <a href=#effective-value>effective value</a> less than
-600 and at least one with <a href=#effective-value>effective value</a> greater than or equal to
-600. Otherwise false.
+range</a>, there is at least one with <a href=#effective-command-value>effective command value</a>
+less than 600 and at least one with <a href=#effective-command-value>effective command value</a>
+greater than or equal to 600. Otherwise false.
<!--
The cutoff of 600 (both here and for state) matches Chrome 14 dev. The cutoff
used by IE9 and Firefox 6.0a2 seems to be 500, and the distinction isn't
@@ -2322,8 +2325,8 @@
<p><a href=#state>State</a>: True if every <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node that
is <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active range</a> has
-<a href=#effective-value>effective value</a> at least 600, and there is at least one such
-<code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node. Otherwise false.
+<a href=#effective-command-value>effective command value</a> at least 600, and there is at least one
+such <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node. Otherwise false.
<!--
For bold and similar commands, IE 9 RC seems to consider the state true or
false depending on the first element. All other browsers follow the same
@@ -2431,12 +2434,12 @@
<p><a href=#indeterminate>Indeterminate</a>: True if among <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code>
nodes that are <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active
-range</a>, there are two that have distinct <a href=#effective-value title="effective
-value">effective values</a>. Otherwise false.
+range</a>, there are two that have distinct <a href=#effective-command-value title="effective command
+value">effective command values</a>. Otherwise false.
<!-- This follows Firefox 6.0a2. Chrome 14 dev always returns false. -->
-<p><a href=#value>Value</a>: The <a href=#effective-value>effective value</a> of the <a href=#active-range>active
-range</a>'s <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-range-start title=concept-range-start>start</a> <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-boundary-point-node title=concept-boundary-point-node>node</a>.
+<p><a href=#value>Value</a>: The <a href=#effective-command-value>effective command value</a> of the
+<a href=#active-range>active range</a>'s <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-range-start title=concept-range-start>start</a> <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-boundary-point-node title=concept-boundary-point-node>node</a>.
<p class=note>This cannot be null, since the boundary point node of a selection
must always be either an element or a text node that's the child of an element.
@@ -2569,8 +2572,8 @@
<p><a href=#indeterminate>Indeterminate</a>: True if among <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code>
nodes that are <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active
-range</a>, there are two that have distinct <a href=#effective-value title="effective
-value">effective values</a>. Otherwise false.
+range</a>, there are two that have distinct <a href=#effective-command-value title="effective command
+value">effective command values</a>. Otherwise false.
<!-- This follows Firefox 6.0a2. Chrome 14 dev always returns false. -->
<p><a href=#value>Value</a>:
@@ -2597,8 +2600,8 @@
browsers behave differently. I see no reason to behave differently.
-->
<ol>
- <li>Let <var title="">pixel size</var> be the <a href=#effective-value>effective value</a> of the
- <a href=#active-range>active range</a>'s <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-range-start title=concept-range-start>start</a> <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-boundary-point-node title=concept-boundary-point-node>node</a>, as a number of pixels.
+ <li>Let <var title="">pixel size</var> be the <a href=#effective-command-value>effective command value</a> of
+ the <a href=#active-range>active range</a>'s <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-range-start title=concept-range-start>start</a> <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-boundary-point-node title=concept-boundary-point-node>node</a>, as a number of pixels.
<p class=note>The active range's start node cannot be null, since the
boundary point node of a selection must always be either an element or a text
@@ -2709,12 +2712,12 @@
<p><a href=#indeterminate>Indeterminate</a>: True if among <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code>
nodes that are <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active
-range</a>, there are two that have distinct <a href=#effective-value title="effective
-value">effective values</a>. Otherwise false.
+range</a>, there are two that have distinct <a href=#effective-command-value title="effective command
+value">effective command values</a>. Otherwise false.
<!-- This follows Firefox 6.0a2. Chrome 14 dev always returns false. -->
-<p><a href=#value>Value</a>: The <a href=#effective-value>effective value</a> of the <a href=#active-range>active
-range</a>'s <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-range-start title=concept-range-start>start</a> <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-boundary-point-node title=concept-boundary-point-node>node</a>.
+<p><a href=#value>Value</a>: The <a href=#effective-command-value>effective command value</a> of the
+<a href=#active-range>active range</a>'s <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-range-start title=concept-range-start>start</a> <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-boundary-point-node title=concept-boundary-point-node>node</a>.
<p class=note>This cannot be null, since the boundary point node of a selection
must always be either an element or a text node that's the child of an element.
@@ -2766,13 +2769,13 @@
<p><a href=#indeterminate>Indeterminate</a>: True if among <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code>
nodes that are <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active
-range</a>, there are two that have distinct <a href=#effective-value title="effective
-value">effective values</a>. Otherwise false.
+range</a>, there are two that have distinct <a href=#effective-command-value title="effective command
+value">effective command values</a>. Otherwise false.
<!-- This follows no one. Firefox 6.0a2 and Chrome 14 dev both always return
false. However, it makes sense. -->
-<p><a href=#value>Value</a>: The <a href=#effective-value>effective value</a> of the <a href=#active-range>active
-range</a>'s <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-range-start title=concept-range-start>start</a> <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-boundary-point-node title=concept-boundary-point-node>node</a>.
+<p><a href=#value>Value</a>: The <a href=#effective-command-value>effective command value</a> of the
+<a href=#active-range>active range</a>'s <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-range-start title=concept-range-start>start</a> <a class=external data-anolis-spec=domrange href=http://html5.org/specs/dom-range.html#concept-boundary-point-node title=concept-boundary-point-node>node</a>.
<p class=note>This cannot be null, since the boundary point node of a selection
must always be either an element or a text node that's the child of an element.
@@ -2797,14 +2800,14 @@
<p><a href=#indeterminate>Indeterminate</a>: True if among <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code>
nodes that are <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active
-range</a>, there is at least one with <a href=#effective-value>effective value</a> either
-"italic" or "oblique" and at least one with <a href=#effective-value>effective value</a>
-"normal". Otherwise false.
+range</a>, there is at least one with <a href=#effective-command-value>effective command value</a>
+either "italic" or "oblique" and at least one with <a href=#effective-command-value>effective command
+value</a> "normal". Otherwise false.
<p><a href=#state>State</a>: True if every <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node that
is <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active range</a> has
-<a href=#effective-value>effective value</a> either "italic" or "oblique", and there is at
-least one such <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node. Otherwise false.
+<a href=#effective-command-value>effective command value</a> either "italic" or "oblique", and there is
+at least one such <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node. Otherwise false.
<p><a href=#relevant-css-property>Relevant CSS property</a>: "font-style"
@@ -2946,14 +2949,14 @@
<p><a href=#indeterminate>Indeterminate</a>: True if among <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code>
nodes that are <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active
-range</a>, there is at least one with <a href=#effective-value>effective value</a>
-"line-through" and at least one with <a href=#effective-value>effective value</a> null.
+range</a>, there is at least one with <a href=#effective-command-value>effective command value</a>
+"line-through" and at least one with <a href=#effective-command-value>effective command value</a> null.
Otherwise false.
<p><a href=#state>State</a>: True if every <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node that
is <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active range</a> has
-<a href=#effective-value>effective value</a> "line-through", and there is at least one such
-<code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node. Otherwise false.
+<a href=#effective-command-value>effective command value</a> "line-through", and there is at least one
+such <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node. Otherwise false.
<h3 id=the-subscript-command><span class=secno>7.17 </span><dfn>The <code title="">subscript</code> command</dfn></h3>
@@ -2971,16 +2974,16 @@
<p><a href=#indeterminate>Indeterminate</a>: True if either among <a href=#editable>editable</a>
<code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> nodes that are <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active
-range</a>, there is at least one with <a href=#effective-value>effective value</a> "sub" and
-at least one with some other <a href=#effective-value>effective value</a>; or if there is some
-<a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node <a href=#effectively-contained>effectively contained</a> in the
-<a href=#active-range>active range</a> with <a href=#effective-value>effective value</a> "mixed". Otherwise
-false.
+range</a>, there is at least one with <a href=#effective-command-value>effective command value</a>
+"sub" and at least one with some other <a href=#effective-command-value>effective command value</a>; or
+if there is some <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node <a href=#effectively-contained>effectively
+contained</a> in the <a href=#active-range>active range</a> with <a href=#effective-command-value>effective command
+value</a> "mixed". Otherwise false.
<p><a href=#state>State</a>: True if every <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node that
is <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active range</a> has
-<a href=#effective-value>effective value</a> "sub", and there is at least one such <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code>
-node. Otherwise false.
+<a href=#effective-command-value>effective command value</a> "sub", and there is at least one such
+<code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node. Otherwise false.
<!--
For <sup><sub>foo</sub></sup>, Firefox 6.0a2 and Opera 11.11 say the state is
true for both superscript and subscript, and indeterminate is false; Chrome 14
@@ -3011,16 +3014,16 @@
<p><a href=#indeterminate>Indeterminate</a>: True if either among <a href=#editable>editable</a>
<code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> nodes that are <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active
-range</a>, there is at least one with <a href=#effective-value>effective value</a> "super"
-and at least one with some other <a href=#effective-value>effective value</a>; or if there is
-some <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node <a href=#effectively-contained>effectively contained</a> in
-the <a href=#active-range>active range</a> with <a href=#effective-value>effective value</a> "mixed".
-Otherwise false.
+range</a>, there is at least one with <a href=#effective-command-value>effective command value</a>
+"super" and at least one with some other <a href=#effective-command-value>effective command value</a>;
+or if there is some <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node <a href=#effectively-contained>effectively
+contained</a> in the <a href=#active-range>active range</a> with <a href=#effective-command-value>effective command
+value</a> "mixed". Otherwise false.
<p><a href=#state>State</a>: True if every <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node that
is <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active range</a> has
-<a href=#effective-value>effective value</a> "super", and there is at least one such <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code>
-node. Otherwise false.
+<a href=#effective-command-value>effective command value</a> "super", and there is at least one such
+<code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node. Otherwise false.
<p><a href=#relevant-css-property>Relevant CSS property</a>: "vertical-align"
@@ -3085,14 +3088,14 @@
<p><a href=#indeterminate>Indeterminate</a>: True if among <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code>
nodes that are <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active
-range</a>, there is at least one with <a href=#effective-value>effective value</a>
-"underline" and at least one with <a href=#effective-value>effective value</a> null. Otherwise
-false.
+range</a>, there is at least one with <a href=#effective-command-value>effective command value</a>
+"underline" and at least one with <a href=#effective-command-value>effective command value</a> null.
+Otherwise false.
<p><a href=#state>State</a>: True if every <a href=#editable>editable</a> <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node that
is <a href=#effectively-contained>effectively contained</a> in the <a href=#active-range>active range</a> has
-<a href=#effective-value>effective value</a> "underline", and there is at least one such
-<code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node. Otherwise false.
+<a href=#effective-command-value>effective command value</a> "underline", and there is at least one
+such <code class=external data-anolis-spec=domcore><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#text>Text</a></code> node. Otherwise false.
<h3 id=the-unlink-command><span class=secno>7.20 </span><dfn>The <code title="">unlink</code> command</dfn></h3>
--- a/implementation.js Wed Jul 13 10:57:30 2011 -0600
+++ b/implementation.js Wed Jul 13 11:10:27 2011 -0600
@@ -1728,17 +1728,17 @@
///// Assorted inline formatting command algorithms /////
//@{
-function getEffectiveValue(node, command) {
+function getEffectiveCommandValue(node, command) {
// "If neither node nor its parent is an Element, return null."
if (node.nodeType != Node.ELEMENT_NODE
&& (!node.parentNode || node.parentNode.nodeType != Node.ELEMENT_NODE)) {
return null;
}
- // "If node is not an Element, return the effective value of its parent for
- // command."
+ // "If node is not an Element, return the effective command value of its
+ // parent for command."
if (node.nodeType != Node.ELEMENT_NODE) {
- return getEffectiveValue(node.parentNode, command);
+ return getEffectiveCommandValue(node.parentNode, command);
}
// "If command is "createLink" or "unlink":"
@@ -1870,7 +1870,7 @@
return getComputedStyle(node)[commands[command].relevantCssProperty];
}
-function getSpecifiedValue(element, command) {
+function getSpecifiedCommandValue(element, command) {
// "If command is "backColor" or "hiliteColor" and element's display
// property does not compute to "inline", return null."
if ((command == "backcolor" || command == "hilitecolor")
@@ -2032,22 +2032,22 @@
// "While candidate is a modifiable element, and candidate has exactly one
// child, and that child is also a modifiable element, and candidate is not
- // a simple modifiable element or candidate's specified value for command
- // is not new value, set candidate to its child."
+ // a simple modifiable element or candidate's specified command value for
+ // command is not new value, set candidate to its child."
while (isModifiableElement(candidate)
&& candidate.childNodes.length == 1
&& (!isSimpleModifiableElement(candidate)
- || !valuesEqual(command, getSpecifiedValue(candidate, command), newValue))) {
+ || !valuesEqual(command, getSpecifiedCommandValue(candidate, command), newValue))) {
candidate = candidate.firstChild;
}
// "If candidate is node, or is not a simple modifiable element, or its
- // specified value and effective value for command are not both new value,
- // abort these steps."
+ // specified command value and effective command value for command are not
+ // both new value, abort these steps."
if (candidate == node
|| !isSimpleModifiableElement(candidate)
- || !valuesEqual(command, getSpecifiedValue(candidate, command), newValue)
- || !valuesEqual(command, getEffectiveValue(candidate, command), newValue)) {
+ || !valuesEqual(command, getSpecifiedCommandValue(candidate, command), newValue)
+ || !valuesEqual(command, getEffectiveCommandValue(candidate, command), newValue)) {
return;
}
@@ -2065,8 +2065,8 @@
}
function recordValues(nodeList) {
- // "Let values be a list of (node, command, specified value) triples,
- // initially empty."
+ // "Let values be a list of (node, command, specified command value)
+ // triples, initially empty."
var values = [];
// "For each node in node list, for each command in the list "subscript",
@@ -2083,19 +2083,19 @@
ancestor = ancestor.parentNode;
}
- // "While ancestor is an Element and its specified value for
- // command is null, set it to its parent."
+ // "While ancestor is an Element and its specified command value
+ // for command is null, set it to its parent."
while (ancestor
&& ancestor.nodeType == Node.ELEMENT_NODE
- && getSpecifiedValue(ancestor, command) === null) {
+ && getSpecifiedCommandValue(ancestor, command) === null) {
ancestor = ancestor.parentNode;
}
// "If ancestor is an Element, add (node, command, ancestor's
- // specified value for command) to values. Otherwise add (node,
- // command, null) to values."
+ // specified command value for command) to values. Otherwise add
+ // (node, command, null) to values."
if (ancestor && ancestor.nodeType == Node.ELEMENT_NODE) {
- values.push([node, command, getSpecifiedValue(ancestor, command)]);
+ values.push([node, command, getSpecifiedCommandValue(ancestor, command)]);
} else {
values.push([node, command, null]);
}
@@ -2121,11 +2121,11 @@
ancestor = ancestor.parentNode;
}
- // "While ancestor is an Element and its specified value for command is
- // null, set it to its parent."
+ // "While ancestor is an Element and its specified command value for
+ // command is null, set it to its parent."
while (ancestor
&& ancestor.nodeType == Node.ELEMENT_NODE
- && getSpecifiedValue(ancestor, command) === null) {
+ && getSpecifiedCommandValue(ancestor, command) === null) {
ancestor = ancestor.parentNode;
}
@@ -2136,12 +2136,13 @@
&& ancestor.nodeType == Node.ELEMENT_NODE) {
pushDownValues(node, command, null);
- // "Otherwise, if ancestor is an Element and its specified value for
- // command is different from value, or if ancestor is not an Element
- // and value is not null, force the value of command to value on node."
+ // "Otherwise, if ancestor is an Element and its specified command
+ // value for command is different from value, or if ancestor is not an
+ // Element and value is not null, force the value of command to value
+ // on node."
} else if ((ancestor
&& ancestor.nodeType == Node.ELEMENT_NODE
- && !valuesEqual(command, getSpecifiedValue(ancestor, command), value))
+ && !valuesEqual(command, getSpecifiedCommandValue(ancestor, command), value))
|| ((!ancestor || ancestor.nodeType != Node.ELEMENT_NODE)
&& value !== null)) {
forceValue(node, command, value);
@@ -2160,9 +2161,9 @@
return [];
}
- // "If element's specified value for command is null, return the empty
- // list."
- if (getSpecifiedValue(element, command) === null) {
+ // "If element's specified command value for command is null, return the
+ // empty list."
+ if (getSpecifiedCommandValue(element, command) === null) {
return [];
}
@@ -2248,9 +2249,9 @@
element.removeAttribute("href");
}
- // "If element's specified value for command is null, return the empty
- // list."
- if (getSpecifiedValue(element, command) === null) {
+ // "If element's specified command value for command is null, return the
+ // empty list."
+ if (getSpecifiedCommandValue(element, command) === null) {
return [];
}
@@ -2271,9 +2272,9 @@
return;
}
- // "If the effective value of command is new value on node, abort this
- // algorithm."
- if (valuesEqual(command, getEffectiveValue(node, command), newValue)) {
+ // "If the effective command value of command is new value on node, abort
+ // this algorithm."
+ if (valuesEqual(command, getEffectiveCommandValue(node, command), newValue)) {
return;
}
@@ -2283,12 +2284,12 @@
// "Let ancestor list be a list of Nodes, initially empty."
var ancestorList = [];
- // "While current ancestor is an editable Element and the effective value
- // of command is not new value on it, append current ancestor to ancestor
- // list, then set current ancestor to its parent."
+ // "While current ancestor is an editable Element and the effective command
+ // value of command is not new value on it, append current ancestor to
+ // ancestor list, then set current ancestor to its parent."
while (isEditable(currentAncestor)
&& currentAncestor.nodeType == Node.ELEMENT_NODE
- && !valuesEqual(command, getEffectiveValue(currentAncestor, command), newValue)) {
+ && !valuesEqual(command, getEffectiveCommandValue(currentAncestor, command), newValue)) {
ancestorList.push(currentAncestor);
currentAncestor = currentAncestor.parentNode;
}
@@ -2298,9 +2299,9 @@
return;
}
- // "Let propagated value be the specified value of command on the last
- // member of ancestor list."
- var propagatedValue = getSpecifiedValue(ancestorList[ancestorList.length - 1], command);
+ // "Let propagated value be the specified command value of command on the
+ // last member of ancestor list."
+ var propagatedValue = getSpecifiedCommandValue(ancestorList[ancestorList.length - 1], command);
// "If propagated value is null and is not equal to new value, abort this
// algorithm."
@@ -2308,11 +2309,11 @@
return;
}
- // "If the effective value of command is not new value on the parent of
- // the last member of ancestor list, and new value is not null, abort this
- // algorithm."
+ // "If the effective command value of command is not new value on the
+ // parent of the last member of ancestor list, and new value is not null,
+ // abort this algorithm."
if (newValue !== null
- && !valuesEqual(command, getEffectiveValue(ancestorList[ancestorList.length - 1].parentNode, command), newValue)) {
+ && !valuesEqual(command, getEffectiveCommandValue(ancestorList[ancestorList.length - 1].parentNode, command), newValue)) {
return;
}
@@ -2322,18 +2323,18 @@
// "Remove the last member from ancestor list."
var currentAncestor = ancestorList.pop();
- // "If the specified value of current ancestor for command is not null,
- // set propagated value to that value."
- if (getSpecifiedValue(currentAncestor, command) !== null) {
- propagatedValue = getSpecifiedValue(currentAncestor, command);
+ // "If the specified command value of current ancestor for command is
+ // not null, set propagated value to that value."
+ if (getSpecifiedCommandValue(currentAncestor, command) !== null) {
+ propagatedValue = getSpecifiedCommandValue(currentAncestor, command);
}
// "Let children be the children of current ancestor."
var children = Array.prototype.slice.call(currentAncestor.childNodes);
- // "If the specified value of current ancestor for command is not null,
- // clear the value of current ancestor."
- if (getSpecifiedValue(currentAncestor, command) !== null) {
+ // "If the specified command value of current ancestor for command is
+ // not null, clear the value of current ancestor."
+ if (getSpecifiedCommandValue(currentAncestor, command) !== null) {
clearValue(currentAncestor, command);
}
@@ -2346,12 +2347,12 @@
continue;
}
- // "If child is an Element whose specified value for command
- // is neither null nor equal to propagated value, continue with the
- // next child."
+ // "If child is an Element whose specified command value for
+ // command is neither null nor equal to propagated value, continue
+ // with the next child."
if (child.nodeType == Node.ELEMENT_NODE
- && getSpecifiedValue(child, command) !== null
- && !valuesEqual(command, propagatedValue, getSpecifiedValue(child, command))) {
+ && getSpecifiedCommandValue(child, command) !== null
+ && !valuesEqual(command, propagatedValue, getSpecifiedCommandValue(child, command))) {
continue;
}
@@ -2393,34 +2394,34 @@
reorderModifiableDescendants(node.nextSibling, command, newValue);
// "Wrap the one-node list consisting of node, with sibling criteria
- // matching a simple modifiable element whose specified value and
- // effective value for command are both new value, and with new parent
- // instructions returning null."
+ // matching a simple modifiable element whose specified command value
+ // and effective command value for command are both new value, and with
+ // new parent instructions returning null."
wrap([node],
function(node) {
return isSimpleModifiableElement(node)
- && valuesEqual(command, getSpecifiedValue(node, command), newValue)
- && valuesEqual(command, getEffectiveValue(node, command), newValue);
+ && valuesEqual(command, getSpecifiedCommandValue(node, command), newValue)
+ && valuesEqual(command, getEffectiveCommandValue(node, command), newValue);
},
function() { return null }
);
}
- // "If the effective value of command is new value on node, abort this
- // algorithm."
- if (valuesEqual(command, getEffectiveValue(node, command), newValue)) {
+ // "If the effective command value of command is new value on node, abort
+ // this algorithm."
+ if (valuesEqual(command, getEffectiveCommandValue(node, command), newValue)) {
return;
}
// "If node is not an allowed child of "span":"
if (!isAllowedChild(node, "span")) {
// "Let children be all children of node, omitting any that are
- // Elements whose specified value for command is neither null nor
- // equal to new value."
+ // Elements whose specified command value for command is neither null
+ // nor equal to new value."
var children = [];
for (var i = 0; i < node.childNodes.length; i++) {
if (node.childNodes[i].nodeType == Node.ELEMENT_NODE) {
- var specifiedValue = getSpecifiedValue(node.childNodes[i], command);
+ var specifiedValue = getSpecifiedCommandValue(node.childNodes[i], command);
if (specifiedValue !== null
&& !valuesEqual(command, newValue, specifiedValue)) {
@@ -2440,9 +2441,9 @@
return;
}
- // "If the effective value of command is new value on node, abort this
- // algorithm."
- if (valuesEqual(command, getEffectiveValue(node, command), newValue)) {
+ // "If the effective command value of command is new value on node, abort
+ // this algorithm."
+ if (valuesEqual(command, getEffectiveCommandValue(node, command), newValue)) {
return;
}
@@ -2577,40 +2578,43 @@
// "Insert new parent in node's parent before node."
node.parentNode.insertBefore(newParent, node);
- // "If the effective value of command for new parent is not new value, and
- // the relevant CSS property for command is not null, set that CSS property
- // of new parent to new value (if the new value would be valid)."
+ // "If the effective command value of command for new parent is not new
+ // value, and the relevant CSS property for command is not null, set that
+ // CSS property of new parent to new value (if the new value would be
+ // valid)."
var property = commands[command].relevantCssProperty;
if (property !== null
- && !valuesEqual(command, getEffectiveValue(newParent, command), newValue)) {
+ && !valuesEqual(command, getEffectiveCommandValue(newParent, command), newValue)) {
newParent.style[property] = newValue;
}
// "If command is "strikethrough", and new value is "line-through", and the
- // effective value of "strikethrough" for new parent is not "line-through",
- // set the "text-decoration" property of new parent to "line-through"."
+ // effective command value of "strikethrough" for new parent is not
+ // "line-through", set the "text-decoration" property of new parent to
+ // "line-through"."
if (command == "strikethrough"
&& newValue == "line-through"
- && getEffectiveValue(newParent, "strikethrough") != "line-through") {
+ && getEffectiveCommandValue(newParent, "strikethrough") != "line-through") {
newParent.style.textDecoration = "line-through";
}
// "If command is "underline", and new value is "underline", and the
- // effective value of "underline" for new parent is not "underline", set
- // the "text-decoration" property of new parent to "underline"."
+ // effective command value of "underline" for new parent is not
+ // "underline", set the "text-decoration" property of new parent to
+ // "underline"."
if (command == "underline"
&& newValue == "underline"
- && getEffectiveValue(newParent, "underline") != "underline") {
+ && getEffectiveCommandValue(newParent, "underline") != "underline") {
newParent.style.textDecoration = "underline";
}
// "Append node to new parent as its last child, preserving ranges."
movePreservingRanges(node, newParent, newParent.childNodes.length);
- // "If node is an Element and the effective value of command for node is
- // not new value:"
+ // "If node is an Element and the effective command value of command for
+ // node is not new value:"
if (node.nodeType == Node.ELEMENT_NODE
- && !valuesEqual(command, getEffectiveValue(node, command), newValue)) {
+ && !valuesEqual(command, getEffectiveCommandValue(node, command), newValue)) {
// "Insert node into the parent of new parent before new parent,
// preserving ranges."
movePreservingRanges(node, newParent.parentNode, getNodeIndex(newParent));
@@ -2662,12 +2666,12 @@
// "Otherwise:"
} else {
// "Let children be all children of node, omitting any that are
- // Elements whose specified value for command is neither null nor
- // equal to new value."
+ // Elements whose specified command value for command is neither
+ // null nor equal to new value."
var children = [];
for (var i = 0; i < node.childNodes.length; i++) {
if (node.childNodes[i].nodeType == Node.ELEMENT_NODE) {
- var specifiedValue = getSpecifiedValue(node.childNodes[i], command);
+ var specifiedValue = getSpecifiedCommandValue(node.childNodes[i], command);
if (specifiedValue !== null
&& !valuesEqual(command, newValue, specifiedValue)) {
@@ -2781,22 +2785,22 @@
setSelectionValue("backcolor", value);
}, indeterm: function() {
// "True if among editable Text nodes that are effectively contained in
- // the active range, there are two that have distinct effective values.
- // Otherwise false."
+ // the active range, there are two that have distinct effective command
+ // values. Otherwise false."
return getAllEffectivelyContainedNodes(getActiveRange(), function(node) {
return isEditable(node) && node.nodeType == Node.TEXT_NODE;
}).map(function(node) {
- return getEffectiveValue(node, "backcolor");
+ return getEffectiveCommandValue(node, "backcolor");
}).filter(function(value, i, arr) {
return arr.slice(0, i).indexOf(value) == -1;
}).length >= 2;
}, value: function() {
- // "The effective value of the active range's start node."
+ // "The effective command value of the active range's start node."
//
// Opera uses a different format, so let's be nice and support that for
// the time being (since all this computed value stuff is underdefined
// anyway).
- var value = getEffectiveValue(getActiveRange().startContainer, "backcolor");
+ var value = getEffectiveCommandValue(getActiveRange().startContainer, "backcolor");
if (/^#[0-9a-f]{6}$/.test(value)) {
value = "rgb(" + parseInt(value.slice(1, 3), 16)
+ "," + parseInt(value.slice(3, 5), 16)
@@ -2820,10 +2824,10 @@
}
}, indeterm: function() { return indetermHelper(function(node) {
// "True if among editable Text nodes that are effectively contained in
- // the active range, there is at least one with effective value less
- // than 600 and at least one with effective value greater than or equal
- // to 600."
- var fontWeight = getEffectiveValue(node, "bold");
+ // the active range, there is at least one with effective command value
+ // less than 600 and at least one with effective command value greater
+ // than or equal to 600."
+ var fontWeight = getEffectiveCommandValue(node, "bold");
return fontWeight === "bold"
|| fontWeight === "600"
|| fontWeight === "700"
@@ -2831,9 +2835,9 @@
|| fontWeight === "900";
})}, state: function() { return stateHelper(function(node) {
// "True if every editable Text node that is effectively contained in
- // the active range has effective value at least 600, and there is at
- // least one such text node. Otherwise false."
- var fontWeight = getEffectiveValue(node, "bold");
+ // the active range has effective command value at least 600, and there
+ // is at least one such text node. Otherwise false."
+ var fontWeight = getEffectiveCommandValue(node, "bold");
return fontWeight === "bold"
|| fontWeight === "600"
|| fontWeight === "700"
@@ -2882,18 +2886,18 @@
setSelectionValue("fontname", value);
}, indeterm: function() {
// "True if among editable Text nodes that are effectively contained in
- // the active range, there are two that have distinct effective values.
- // Otherwise false."
+ // the active range, there are two that have distinct effective command
+ // values. Otherwise false."
return getAllEffectivelyContainedNodes(getActiveRange(), function(node) {
return isEditable(node) && node.nodeType == Node.TEXT_NODE;
}).map(function(node) {
- return getEffectiveValue(node, "fontname");
+ return getEffectiveCommandValue(node, "fontname");
}).filter(function(value, i, arr) {
return arr.slice(0, i).indexOf(value) == -1;
}).length >= 2;
}, value: function() {
- // "The effective value of the active range's start node."
- return getEffectiveValue(getActiveRange().startContainer, "fontname");
+ // "The effective command value of the active range's start node."
+ return getEffectiveCommandValue(getActiveRange().startContainer, "fontname");
}, relevantCssProperty: "fontFamily"
};
//@}
@@ -2987,19 +2991,19 @@
setSelectionValue("fontsize", value);
}, indeterm: function() {
// "True if among editable Text nodes that are effectively contained in
- // the active range, there are two that have distinct effective values.
- // Otherwise false."
+ // the active range, there are two that have distinct effective command
+ // values. Otherwise false."
return getAllEffectivelyContainedNodes(getActiveRange(), function(node) {
return isEditable(node) && node.nodeType == Node.TEXT_NODE;
}).map(function(node) {
- return getEffectiveValue(node, "fontsize");
+ return getEffectiveCommandValue(node, "fontsize");
}).filter(function(value, i, arr) {
return arr.slice(0, i).indexOf(value) == -1;
}).length >= 2;
}, value: function() {
- // "Let pixel size be the effective value of the active range's start
- // node, as a number of pixels."
- var pixelSize = parseInt(getEffectiveValue(getActiveRange().startContainer, "fontsize"));
+ // "Let pixel size be the effective command value of the active range's
+ // start node, as a number of pixels."
+ var pixelSize = parseInt(getEffectiveCommandValue(getActiveRange().startContainer, "fontsize"));
// "Let returned size be 1."
var returnedSize = 1;
@@ -3067,22 +3071,22 @@
setSelectionValue("forecolor", value);
}, indeterm: function() {
// "True if among editable Text nodes that are effectively contained in
- // the active range, there are two that have distinct effective values.
- // Otherwise false."
+ // the active range, there are two that have distinct effective command
+ // values. Otherwise false."
return getAllEffectivelyContainedNodes(getActiveRange(), function(node) {
return isEditable(node) && node.nodeType == Node.TEXT_NODE;
}).map(function(node) {
- return getEffectiveValue(node, "forecolor");
+ return getEffectiveCommandValue(node, "forecolor");
}).filter(function(value, i, arr) {
return arr.slice(0, i).indexOf(value) == -1;
}).length >= 2;
}, value: function() {
- // "The effective value of the active range's start node."
+ // "The effective command value of the active range's start node."
//
// Opera uses a different format, so let's be nice and support that for
// the time being (since all this computed value stuff is underdefined
// anyway).
- var value = getEffectiveValue(getActiveRange().startContainer, "forecolor");
+ var value = getEffectiveCommandValue(getActiveRange().startContainer, "forecolor");
if (/^#[0-9a-f]{6}$/.test(value)) {
value = "rgb(" + parseInt(value.slice(1, 3), 16)
+ "," + parseInt(value.slice(3, 5), 16)
@@ -3121,22 +3125,22 @@
setSelectionValue("hilitecolor", value);
}, indeterm: function() {
// "True if among editable Text nodes that are effectively contained in
- // the active range, there are two that have distinct effective values.
- // Otherwise false."
+ // the active range, there are two that have distinct effective command
+ // values. Otherwise false."
return getAllEffectivelyContainedNodes(getActiveRange(), function(node) {
return isEditable(node) && node.nodeType == Node.TEXT_NODE;
}).map(function(node) {
- return getEffectiveValue(node, "hilitecolor");
+ return getEffectiveCommandValue(node, "hilitecolor");
}).filter(function(value, i, arr) {
return arr.slice(0, i).indexOf(value) == -1;
}).length >= 2;
}, value: function() {
- // "The effective value of the active range's start node."
+ // "The effective command value of the active range's start node."
//
// Opera uses a different format, so let's be nice and support that for
// the time being (since all this computed value stuff is underdefined
// anyway).
- var value = getEffectiveValue(getActiveRange().startContainer, "hilitecolor");
+ var value = getEffectiveCommandValue(getActiveRange().startContainer, "hilitecolor");
if (/^#[0-9a-f]{6}$/.test(value)) {
value = "rgb(" + parseInt(value.slice(1, 3), 16)
+ "," + parseInt(value.slice(3, 5), 16)
@@ -3160,16 +3164,17 @@
}
}, indeterm: function() { return indetermHelper(function(node) {
// "True if among editable Text nodes that are effectively contained in
- // the active range, there is at least one with effective value either
- // "italic" or "oblique" and at least one with effective value
- // "normal". Otherwise false."
- var value = getEffectiveValue(node, "italic");
+ // the active range, there is at least one with effective command value
+ // either "italic" or "oblique" and at least one with effective command
+ // value "normal". Otherwise false."
+ var value = getEffectiveCommandValue(node, "italic");
return value == "italic" || value == "oblique";
})}, state: function() { return stateHelper(function(node) {
// "True if every editable Text node that is effectively contained in
- // the active range has effective value either "italic" or "oblique",
- // and there is at least one such Text node. Otherwise false."
- var value = getEffectiveValue(node, "italic");
+ // the active range has effective command value either "italic" or
+ // "oblique", and there is at least one such Text node. Otherwise
+ // false."
+ var value = getEffectiveCommandValue(node, "italic");
return value == "italic" || value == "oblique";
})}, relevantCssProperty: "fontStyle"
};
@@ -3289,15 +3294,15 @@
}
}, indeterm: function() { return indetermHelper(function(node) {
// "True if among editable Text nodes that are effectively contained in
- // the active range, there is at least one with effective value
- // "line-through" and at least one with effective value null. Otherwise
- // false."
- return getEffectiveValue(node, "strikethrough") == "line-through";
+ // the active range, there is at least one with effective command value
+ // "line-through" and at least one with effective command value null.
+ // Otherwise false."
+ return getEffectiveCommandValue(node, "strikethrough") == "line-through";
})}, state: function() { return stateHelper(function(node) {
// "True if every editable Text node that is effectively contained in
- // the active range has effective value "line-through", and there is at
- // least one such Text node. Otherwise false."
- return getEffectiveValue(node, "strikethrough") == "line-through";
+ // the active range has effective command value "line-through", and
+ // there is at least one such Text node. Otherwise false."
+ return getEffectiveCommandValue(node, "strikethrough") == "line-through";
})}
};
//@}
@@ -3319,20 +3324,21 @@
}, indeterm: function() {
// "True if either among editable Text nodes that are effectively
// contained in the active range, there is at least one with effective
- // value "sub" and at least one with some other effective value; or if
- // there is some editable Text node effectively contained in the active
- // range with effective value "mixed". Otherwise false."
+ // command value "sub" and at least one with some other effective
+ // command value; or if there is some editable Text node effectively
+ // contained in the active range with effective command value "mixed".
+ // Otherwise false."
var nodes = getAllEffectivelyContainedNodes(getActiveRange(), function(node) {
return isEditable(node) && node.nodeType == Node.TEXT_NODE;
});
- return (nodes.some(function(node) { return getEffectiveValue(node, "subscript") == "sub" })
- && nodes.some(function(node) { return getEffectiveValue(node, "subscript") != "sub" }))
- || nodes.some(function(node) { return getEffectiveValue(node, "subscript") == "mixed" });
+ return (nodes.some(function(node) { return getEffectiveCommandValue(node, "subscript") == "sub" })
+ && nodes.some(function(node) { return getEffectiveCommandValue(node, "subscript") != "sub" }))
+ || nodes.some(function(node) { return getEffectiveCommandValue(node, "subscript") == "mixed" });
}, state: function() { return stateHelper(function(node) {
// "True if every editable Text node that is effectively contained in
- // the active range has effective value "sub", and there is at least
- // one such Text node. Otherwise false."
- return getEffectiveValue(node, "subscript") == "sub";
+ // the active range has effective command value "sub", and there is at
+ // least one such Text node. Otherwise false."
+ return getEffectiveCommandValue(node, "subscript") == "sub";
})}, relevantCssProperty: "verticalAlign"
};
//@}
@@ -3354,20 +3360,22 @@
}, indeterm: function() {
// "True if either among editable Text nodes that are effectively
// contained in the active range, there is at least one with effective
- // value "super" and at least one with some other effective value; or
- // if there is some editable Text node effectively contained in the
- // active range with effective value "mixed". Otherwise false."
- var nodes = getAllEffectivelyContainedNodes(getActiveRange(), function(node) {
+ // command value "super" and at least one with some other effective
+ // command value; or if there is some editable Text node effectively
+ // contained in the active range with effective command value "mixed".
+ // Otherwise false."
+ var nodes = getAllEffectivelyContainedNodes(getActiveRange(),
+ function(node) {
return isEditable(node) && node.nodeType == Node.TEXT_NODE;
});
- return (nodes.some(function(node) { return getEffectiveValue(node, "superscript") == "super" })
- && nodes.some(function(node) { return getEffectiveValue(node, "superscript") != "super" }))
- || nodes.some(function(node) { return getEffectiveValue(node, "superscript") == "mixed" });
+ return (nodes.some(function(node) { return getEffectiveCommandValue(node, "superscript") == "super" })
+ && nodes.some(function(node) { return getEffectiveCommandValue(node, "superscript") != "super" }))
+ || nodes.some(function(node) { return getEffectiveCommandValue(node, "superscript") == "mixed" });
}, state: function() { return stateHelper(function(node) {
// "True if every editable Text node that is effectively contained in
- // the active range has effective value "super", and there is at least
- // one such Text node. Otherwise false."
- return getEffectiveValue(node, "superscript") == "super";
+ // the active range has effective command value "super", and there is
+ // at least one such Text node. Otherwise false."
+ return getEffectiveCommandValue(node, "superscript") == "super";
})}, relevantCssProperty: "verticalAlign"
};
//@}
@@ -3385,15 +3393,15 @@
}
}, indeterm: function() { return indetermHelper(function(node) {
// "True if among editable Text nodes that are effectively contained in
- // the active range, there is at least one with effective value
- // "underline" and at least one with effective value null. Otherwise
- // false."
- return getEffectiveValue(node, "underline") === "underline";
+ // the active range, there is at least one with effective command value
+ // "underline" and at least one with effective command value null.
+ // Otherwise false."
+ return getEffectiveCommandValue(node, "underline") === "underline";
})}, state: function() { return stateHelper(function(node) {
// "True if every editable Text node that is effectively contained in
- // the active range has effective value "underline", and there is at
- // least one such Text node. Otherwise false."
- return getEffectiveValue(node, "underline") === "underline";
+ // the active range has effective command value "underline", and there
+ // is at least one such Text node. Otherwise false."
+ return getEffectiveCommandValue(node, "underline") === "underline";
})}
};
//@}
--- a/source.html Wed Jul 13 10:57:30 2011 -0600
+++ b/source.html Wed Jul 13 11:10:27 2011 -0600
@@ -1254,22 +1254,21 @@
</ul>
<p class=note>Conceptually, a simple modifiable element is a modifiable element
-which <span title="specified value">specifies</span> a value for at most one
-command.
+which specifies a value for at most one command.
<!-- @} -->
<h3>Assorted inline formatting command algorithms</h3>
<!-- @{ -->
-<p>The <dfn>effective value</dfn> of a [[node]] <var>node</var> for a given
-<var>command</var> is returned by the following algorithm, which will return
-either a string or null:
+<p>The <dfn>effective command value</dfn> of a [[node]] <var>node</var> for a
+given <var>command</var> is returned by the following algorithm, which will
+return either a string or null:
<ol>
<li>If neither <var>node</var> nor its [[parent]] is an [[element]], return
null.
<li>If <var>node</var> is not an [[element]], return the <span>effective
- value</span> of its [[parent]] for <var>command</var>.
+ command value</span> of its [[parent]] for <var>command</var>.
<li>If <var>command</var> is "createLink" or "unlink":
@@ -1346,12 +1345,9 @@
property</span> for <var>command</var>.
</ol>
-<p>The <dfn>specified value</dfn> of an [[element]] <var>element</var> for a
-given <var>command</var> is returned by the following algorithm, which will
-return either a string or null:
-
-<p class=XXX>"Specified value" already means something in CSS, I need to find a
-different name.
+<p>The <dfn>specified command value</dfn> of an [[element]] <var>element</var>
+for a given <var>command</var> is returned by the following algorithm, which
+will return either a string or null:
<ol>
<li>If <var>command</var> is "backColor" or "hiliteColor" and the
@@ -1450,13 +1446,13 @@
<var>candidate</var> has exactly one [[child]], and that [[child]] is also a
<span>modifiable element</span>, and <var>candidate</var> is not a
<span>simple modifiable element</span> or <var>candidate</var>'s
- <span>specified value</span> for <var>command</var> is not <var>new
+ <span>specified command value</span> for <var>command</var> is not <var>new
value</var>, set <var>candidate</var> to its [[child]].
<li>If <var>candidate</var> is <var>node</var>, or is not a <span>simple
- modifiable element</span>, or its <span>specified value</span> and
- <span>effective value</span> for <var>command</var> are not both <var>new
- value</var>, abort these steps.
+ modifiable element</span>, or its <span>specified command value</span> and
+ <span>effective command value</span> for <var>command</var> are not both
+ <var>new value</var>, abort these steps.
<li>While <var>candidate</var> has [[children]], insert the first [[child]]
of <var>candidate</var> into <var>candidate</var>'s [[parent]] immediately
@@ -1495,7 +1491,7 @@
<ol>
<li>Let <var>values</var> be a list of ([[node]], <span>command</span>,
- <span>specified value</span>) triples, initially empty.
+ <span>specified command value</span>) triples, initially empty.
<li>For each <var>node</var> in <var>node list</var>, for each
<var>command</var> in the list "subscript", "bold", "fontName", "fontSize",
@@ -1511,13 +1507,13 @@
<li>If <var>ancestor</var> is not an [[element]], set it to its [[parent]].
<li>While <var>ancestor</var> is an [[element]] and its <span>specified
- value</span> for <var>command</var> is null, set it to its [[parent]].
+ command value</span> for <var>command</var> is null, set it to its
+ [[parent]].
<li>If <var>ancestor</var> is an [[element]], add (<var>node</var>,
- <var>command</var>, <var>ancestor</var>'s <span>specified value</span> for
- <var>command</var>) to <var>values</var>. Otherwise add (<var>node</var>,
- <var>command</var>, null) to <var>values</var>.
- </ol>
+ <var>command</var>, <var>ancestor</var>'s <span>specified command
+ value</span> for <var>command</var>) to <var>values</var>. Otherwise add
+ (<var>node</var>, <var>command</var>, null) to <var>values</var>. </ol>
<li>Return <var>values</var>.
</ol>
@@ -1535,15 +1531,16 @@
<li>If <var>ancestor</var> is not an [[element]], set it to its [[parent]].
<li>While <var>ancestor</var> is an [[element]] and its <span>specified
- value</span> for <var>command</var> is null, set it to its [[parent]].
+ command value</span> for <var>command</var> is null, set it to its
+ [[parent]].
<li>If <var>value</var> is null and <var>ancestor</var> is an [[element]],
<span>push down values</span> on <var>node</var> for <var>command</var>,
with <var>new value</var> null.
<li>Otherwise, if <var>ancestor</var> is an [[element]] and its
- <span>specified value</span> for <var>command</var> is different from
- <var>value</var>, or if <var>ancestor</var> is not an [[element]] and
+ <span>specified command value</span> for <var>command</var> is different
+ from <var>value</var>, or if <var>ancestor</var> is not an [[element]] and
<var>value</var> is not null, <span>force the value</span> of
<var>command</var> to <var>value</var> on <var>node</var>.
</ol>
@@ -1571,7 +1568,7 @@
<li>If <var>element</var> is not <span>editable</span>, return the empty
list.
- <li>If <var>element</var>'s <span>specified value</span> for
+ <li>If <var>element</var>'s <span>specified command value</span> for
<var>command</var> is null, return the empty list. <!-- We want to abort
early so that we don't try unsetting background-color on a non-inline
element. -->
@@ -1617,7 +1614,7 @@
<li>If <var>element</var> is an [[a]] element and <var>command</var> is
"createLink" or "unlink", unset the [[href]] property of <var>element</var>.
- <li>If <var>element</var>'s <span>specified value</span> for
+ <li>If <var>element</var>'s <span>specified command value</span> for
<var>command</var> is null, return the empty list.
<!-- If we get past this step, we're something like <b class=foo> where we
want to keep the extra attributes, so we stick them on a span. -->
@@ -1670,22 +1667,24 @@
<li>If <var>node</var>'s [[parent]] is not an [[element]], abort this
algorithm. <!-- E.g., a text node child of a document fragment. -->
- <li>If the <span>effective value</span> of <var>command</var> is <var>new
- value</var> on <var>node</var>, abort this algorithm.
+ <li>If the <span>effective command value</span> of <var>command</var> is
+ <var>new value</var> on <var>node</var>, abort this algorithm.
<li>Let <var>current ancestor</var> be <var>node</var>'s [[parent]].
<li>Let <var>ancestor list</var> be a list of [[nodes]], initially empty.
<li>While <var>current ancestor</var> is an <span>editable</span> [[element]]
- and the <span>effective value</span> of <var>command</var> is not <var>new
- value</var> on it, append <var>current ancestor</var> to <var>ancestor
- list</var>, then set <var>current ancestor</var> to its [[parent]].
+ and the <span>effective command value</span> of <var>command</var> is not
+ <var>new value</var> on it, append <var>current ancestor</var> to
+ <var>ancestor list</var>, then set <var>current ancestor</var> to its
+ [[parent]].
<li>If <var>ancestor list</var> is empty, abort this algorithm.
- <li>Let <var>propagated value</var> be the <span>specified value</span> of
- <var>command</var> on the last member of <var>ancestor list</var>.
+ <li>Let <var>propagated value</var> be the <span>specified command
+ value</span> of <var>command</var> on the last member of <var>ancestor
+ list</var>.
<!-- We can only remove specified values, so if the value isn't specified,
give up. Unless we're actually trying to push down a null specified value,
@@ -1722,7 +1721,7 @@
sense to break up the parent as long as it won't create an extra node (i.e.,
we're styling something that includes the first or last child).
-->
- <li>If the <span>effective value</span> of <var>command</var> is not
+ <li>If the <span>effective command value</span> of <var>command</var> is not
<var>new value</var> on the [[parent]] of the last member of <var>ancestor
list</var>, and <var>new value</var> is not null, abort this algorithm.
@@ -1734,16 +1733,16 @@
<li>Remove the last member from <var>ancestor list</var>.
- <li>If the <span>specified value</span> of <var>current ancestor</var> for
- <var>command</var> is not null, set <var>propagated value</var> to that
- value.
+ <li>If the <span>specified command value</span> of <var>current
+ ancestor</var> for <var>command</var> is not null, set <var>propagated
+ value</var> to that value.
<li>Let <var>children</var> be the [[children]] of <var>current
ancestor</var>.
- <li>If the <span>specified value</span> of <var>current ancestor</var> for
- <var>command</var> is not null, <span>clear the value</span> of
- <var>current ancestor</var>.
+ <li>If the <span>specified command value</span> of <var>current
+ ancestor</var> for <var>command</var> is not null, <span>clear the
+ value</span> of <var>current ancestor</var>.
<li>For every <var>child</var> in <var>children</var>:
@@ -1751,7 +1750,7 @@
<li>If <var>child</var> is <var>node</var>, continue with the next
<var>child</var>.
- <li>If <var>child</var> is an [[element]] whose <span>specified
+ <li>If <var>child</var> is an [[element]] whose <span>specified command
value</span> for <var>command</var> is neither null nor equal to
<var>propagated value</var>, continue with the next <var>child</var>.
<!--
@@ -1813,22 +1812,24 @@
<li><span>Wrap</span> the one-[[node]] list consisting of <var>node</var>,
with <span>sibling criteria</span> matching a <span>simple modifiable
- element</span> whose <span>specified value</span> and <span>effective
- value</span> for <var>command</var> are both <var>new value</var>, and with
- <span>new parent instructions</span> returning null.
+ element</span> whose <span>specified command value</span> and
+ <span>effective command value</span> for <var>command</var> are both
+ <var>new value</var>, and with <span>new parent instructions</span>
+ returning null.
<!-- The new parent instructions are too complicated to reasonably feed
into the wrap algorithm. -->
</ol>
- <li>If the <span>effective value</span> of <var>command</var> is <var>new
- value</var> on <var>node</var>, abort this algorithm.
+ <li>If the <span>effective command value</span> of <var>command</var> is
+ <var>new value</var> on <var>node</var>, abort this algorithm.
<li>If <var>node</var> is not an <span>allowed child</span> of "span":
<ol>
<li>Let <var>children</var> be all [[children]] of <var>node</var>,
- omitting any that are [[element]]s whose <span>specified value</span> for
- <var>command</var> is neither null nor equal to <var>new value</var>.
+ omitting any that are [[element]]s whose <span>specified command
+ value</span> for <var>command</var> is neither null nor equal to <var>new
+ value</var>.
<li><span>Force the value</span> of each [[node]] in <var>children</var>,
with <var>command</var> and <var>new value</var> as in this invocation of
@@ -1842,8 +1843,8 @@
<li>Abort this algorithm.
</ol>
- <li>If the <span>effective value</span> of <var>command</var> is <var>new
- value</var> on <var>node</var>, abort this algorithm.
+ <li>If the <span>effective command value</span> of <var>command</var> is
+ <var>new value</var> on <var>node</var>, abort this algorithm.
<li>Let <var>new parent</var> be null.
@@ -1986,27 +1987,28 @@
<var>node</var>. <!-- This preserves boundary points correctly, as usual.
-->
- <li>If the <span>effective value</span> of <var>command</var> for <var>new
- parent</var> is not <var>new value</var>, and the <span>relevant CSS
+ <li>If the <span>effective command value</span> of <var>command</var> for
+ <var>new parent</var> is not <var>new value</var>, and the <span>relevant CSS
property</span> for <var>command</var> is not null, set that CSS property of
<var>new parent</var> to <var>new value</var> (if the new value would be
valid).
<li>If <var>command</var> is "strikethrough", and <var>new value</var> is
- "line-through", and the <span>effective value</span> of "strikethrough" for
- <var>new parent</var> is not "line-through", set the "text-decoration"
- property of <var>new parent</var> to "line-through".
+ "line-through", and the <span>effective command value</span> of
+ "strikethrough" for <var>new parent</var> is not "line-through", set the
+ "text-decoration" property of <var>new parent</var> to "line-through".
<li>If <var>command</var> is "underline", and <var>new value</var> is
- "underline", and the <span>effective value</span> of "underline" for <var>new
- parent</var> is not "underline", set the "text-decoration" property of
- <var>new parent</var> to "underline".
+ "underline", and the <span>effective command value</span> of "underline" for
+ <var>new parent</var> is not "underline", set the "text-decoration" property
+ of <var>new parent</var> to "underline".
<li>Append <var>node</var> to <var>new parent</var> as its last [[child]],
<span>preserving ranges</span>.
- <li>If <var>node</var> is an [[element]] and the <span>effective value</span>
- of <var>command</var> for <var>node</var> is not <var>new value</var>:
+ <li>If <var>node</var> is an [[element]] and the <span>effective command
+ value</span> of <var>command</var> for <var>node</var> is not <var>new
+ value</var>:
<ol>
<li>Insert <var>node</var> into the [[parent]] of <var>new parent</var>
@@ -2039,8 +2041,9 @@
<ol>
<li>Let <var>children</var> be all [[children]] of <var>node</var>,
- omitting any that are [[element]]s whose <span>specified value</span> for
- <var>command</var> is neither null nor equal to <var>new value</var>.
+ omitting any that are [[element]]s whose <span>specified command
+ value</span> for <var>command</var> is neither null nor equal to <var>new
+ value</var>.
<li><span>Force the value</span> of each [[node]] in <var>children</var>,
with <var>command</var> and <var>new value</var> as in this invocation
@@ -2249,11 +2252,11 @@
<p><span>Indeterminate</span>: True if among <span>editable</span> [[text]]
nodes that are <span>effectively contained</span> in the <span>active
-range</span>, there are two that have distinct <span title="effective
-value">effective values</span>. Otherwise false.
-
-<p><span>Value</span>: The <span>effective value</span> of the <span>active
-range</span>'s [[startnode]].
+range</span>, there are two that have distinct <span title="effective command
+value">effective command values</span>. Otherwise false.
+
+<p><span>Value</span>: The <span>effective command value</span> of the
+<span>active range</span>'s [[startnode]].
<p class=note>This cannot be null, since the boundary point node of a selection
must always be either an element or a text node that's the child of an element.
@@ -2275,9 +2278,9 @@
<p><span>Indeterminate</span>: True if among <span>editable</span> [[text]]
nodes that are <span>effectively contained</span> in the <span>active
-range</span>, there is at least one with <span>effective value</span> less than
-600 and at least one with <span>effective value</span> greater than or equal to
-600. Otherwise false.
+range</span>, there is at least one with <span>effective command value</span>
+less than 600 and at least one with <span>effective command value</span>
+greater than or equal to 600. Otherwise false.
<!--
The cutoff of 600 (both here and for state) matches Chrome 14 dev. The cutoff
used by IE9 and Firefox 6.0a2 seems to be 500, and the distinction isn't
@@ -2297,8 +2300,8 @@
<p><span>State</span>: True if every <span>editable</span> [[text]] node that
is <span>effectively contained</span> in the <span>active range</span> has
-<span>effective value</span> at least 600, and there is at least one such
-[[text]] node. Otherwise false.
+<span>effective command value</span> at least 600, and there is at least one
+such [[text]] node. Otherwise false.
<!--
For bold and similar commands, IE 9 RC seems to consider the state true or
false depending on the first element. All other browsers follow the same
@@ -2406,12 +2409,12 @@
<p><span>Indeterminate</span>: True if among <span>editable</span> [[text]]
nodes that are <span>effectively contained</span> in the <span>active
-range</span>, there are two that have distinct <span title="effective
-value">effective values</span>. Otherwise false.
+range</span>, there are two that have distinct <span title="effective command
+value">effective command values</span>. Otherwise false.
<!-- This follows Firefox 6.0a2. Chrome 14 dev always returns false. -->
-<p><span>Value</span>: The <span>effective value</span> of the <span>active
-range</span>'s [[startnode]].
+<p><span>Value</span>: The <span>effective command value</span> of the
+<span>active range</span>'s [[startnode]].
<p class=note>This cannot be null, since the boundary point node of a selection
must always be either an element or a text node that's the child of an element.
@@ -2544,8 +2547,8 @@
<p><span>Indeterminate</span>: True if among <span>editable</span> [[text]]
nodes that are <span>effectively contained</span> in the <span>active
-range</span>, there are two that have distinct <span title="effective
-value">effective values</span>. Otherwise false.
+range</span>, there are two that have distinct <span title="effective command
+value">effective command values</span>. Otherwise false.
<!-- This follows Firefox 6.0a2. Chrome 14 dev always returns false. -->
<p><span>Value</span>:
@@ -2572,8 +2575,8 @@
browsers behave differently. I see no reason to behave differently.
-->
<ol>
- <li>Let <var>pixel size</var> be the <span>effective value</span> of the
- <span>active range</span>'s [[startnode]], as a number of pixels.
+ <li>Let <var>pixel size</var> be the <span>effective command value</span> of
+ the <span>active range</span>'s [[startnode]], as a number of pixels.
<p class=note>The active range's start node cannot be null, since the
boundary point node of a selection must always be either an element or a text
@@ -2684,12 +2687,12 @@
<p><span>Indeterminate</span>: True if among <span>editable</span> [[text]]
nodes that are <span>effectively contained</span> in the <span>active
-range</span>, there are two that have distinct <span title="effective
-value">effective values</span>. Otherwise false.
+range</span>, there are two that have distinct <span title="effective command
+value">effective command values</span>. Otherwise false.
<!-- This follows Firefox 6.0a2. Chrome 14 dev always returns false. -->
-<p><span>Value</span>: The <span>effective value</span> of the <span>active
-range</span>'s [[startnode]].
+<p><span>Value</span>: The <span>effective command value</span> of the
+<span>active range</span>'s [[startnode]].
<p class=note>This cannot be null, since the boundary point node of a selection
must always be either an element or a text node that's the child of an element.
@@ -2741,13 +2744,13 @@
<p><span>Indeterminate</span>: True if among <span>editable</span> [[text]]
nodes that are <span>effectively contained</span> in the <span>active
-range</span>, there are two that have distinct <span title="effective
-value">effective values</span>. Otherwise false.
+range</span>, there are two that have distinct <span title="effective command
+value">effective command values</span>. Otherwise false.
<!-- This follows no one. Firefox 6.0a2 and Chrome 14 dev both always return
false. However, it makes sense. -->
-<p><span>Value</span>: The <span>effective value</span> of the <span>active
-range</span>'s [[startnode]].
+<p><span>Value</span>: The <span>effective command value</span> of the
+<span>active range</span>'s [[startnode]].
<p class=note>This cannot be null, since the boundary point node of a selection
must always be either an element or a text node that's the child of an element.
@@ -2772,14 +2775,14 @@
<p><span>Indeterminate</span>: True if among <span>editable</span> [[text]]
nodes that are <span>effectively contained</span> in the <span>active
-range</span>, there is at least one with <span>effective value</span> either
-"italic" or "oblique" and at least one with <span>effective value</span>
-"normal". Otherwise false.
+range</span>, there is at least one with <span>effective command value</span>
+either "italic" or "oblique" and at least one with <span>effective command
+value</span> "normal". Otherwise false.
<p><span>State</span>: True if every <span>editable</span> [[text]] node that
is <span>effectively contained</span> in the <span>active range</span> has
-<span>effective value</span> either "italic" or "oblique", and there is at
-least one such [[text]] node. Otherwise false.
+<span>effective command value</span> either "italic" or "oblique", and there is
+at least one such [[text]] node. Otherwise false.
<p><span>Relevant CSS property</span>: "font-style"
<!-- @} -->
@@ -2921,14 +2924,14 @@
<p><span>Indeterminate</span>: True if among <span>editable</span> [[text]]
nodes that are <span>effectively contained</span> in the <span>active
-range</span>, there is at least one with <span>effective value</span>
-"line-through" and at least one with <span>effective value</span> null.
+range</span>, there is at least one with <span>effective command value</span>
+"line-through" and at least one with <span>effective command value</span> null.
Otherwise false.
<p><span>State</span>: True if every <span>editable</span> [[text]] node that
is <span>effectively contained</span> in the <span>active range</span> has
-<span>effective value</span> "line-through", and there is at least one such
-[[text]] node. Otherwise false.
+<span>effective command value</span> "line-through", and there is at least one
+such [[text]] node. Otherwise false.
<!-- @} -->
<h3><dfn>The <code title>subscript</code> command</dfn></h3>
@@ -2946,16 +2949,16 @@
<p><span>Indeterminate</span>: True if either among <span>editable</span>
[[text]] nodes that are <span>effectively contained</span> in the <span>active
-range</span>, there is at least one with <span>effective value</span> "sub" and
-at least one with some other <span>effective value</span>; or if there is some
-<span>editable</span> [[text]] node <span>effectively contained</span> in the
-<span>active range</span> with <span>effective value</span> "mixed". Otherwise
-false.
+range</span>, there is at least one with <span>effective command value</span>
+"sub" and at least one with some other <span>effective command value</span>; or
+if there is some <span>editable</span> [[text]] node <span>effectively
+contained</span> in the <span>active range</span> with <span>effective command
+value</span> "mixed". Otherwise false.
<p><span>State</span>: True if every <span>editable</span> [[text]] node that
is <span>effectively contained</span> in the <span>active range</span> has
-<span>effective value</span> "sub", and there is at least one such [[text]]
-node. Otherwise false.
+<span>effective command value</span> "sub", and there is at least one such
+[[text]] node. Otherwise false.
<!--
For <sup><sub>foo</sub></sup>, Firefox 6.0a2 and Opera 11.11 say the state is
true for both superscript and subscript, and indeterminate is false; Chrome 14
@@ -2986,16 +2989,16 @@
<p><span>Indeterminate</span>: True if either among <span>editable</span>
[[text]] nodes that are <span>effectively contained</span> in the <span>active
-range</span>, there is at least one with <span>effective value</span> "super"
-and at least one with some other <span>effective value</span>; or if there is
-some <span>editable</span> [[text]] node <span>effectively contained</span> in
-the <span>active range</span> with <span>effective value</span> "mixed".
-Otherwise false.
+range</span>, there is at least one with <span>effective command value</span>
+"super" and at least one with some other <span>effective command value</span>;
+or if there is some <span>editable</span> [[text]] node <span>effectively
+contained</span> in the <span>active range</span> with <span>effective command
+value</span> "mixed". Otherwise false.
<p><span>State</span>: True if every <span>editable</span> [[text]] node that
is <span>effectively contained</span> in the <span>active range</span> has
-<span>effective value</span> "super", and there is at least one such [[text]]
-node. Otherwise false.
+<span>effective command value</span> "super", and there is at least one such
+[[text]] node. Otherwise false.
<p><span>Relevant CSS property</span>: "vertical-align"
<!-- @} -->
@@ -3062,14 +3065,14 @@
<p><span>Indeterminate</span>: True if among <span>editable</span> [[text]]
nodes that are <span>effectively contained</span> in the <span>active
-range</span>, there is at least one with <span>effective value</span>
-"underline" and at least one with <span>effective value</span> null. Otherwise
-false.
+range</span>, there is at least one with <span>effective command value</span>
+"underline" and at least one with <span>effective command value</span> null.
+Otherwise false.
<p><span>State</span>: True if every <span>editable</span> [[text]] node that
is <span>effectively contained</span> in the <span>active range</span> has
-<span>effective value</span> "underline", and there is at least one such
-[[text]] node. Otherwise false.
+<span>effective command value</span> "underline", and there is at least one
+such [[text]] node. Otherwise false.
<!-- @} -->
<h3><dfn>The <code title>unlink</code> command</dfn></h3>