[html5] r1248 - /
whatwg at whatwg.org
whatwg at whatwg.org
Mon Feb 25 20:32:09 PST 2008
Author: ianh
Date: 2008-02-25 20:32:06 -0800 (Mon, 25 Feb 2008)
New Revision: 1248
Modified:
index
source
Log:
[] (0) Add <ol reversed> by popular request.
Modified: index
===================================================================
--- index 2008-02-26 03:41:17 UTC (rev 1247)
+++ index 2008-02-26 04:32:06 UTC (rev 1248)
@@ -9632,6 +9632,8 @@
<dt>Element-specific attributes:
+ <dd><code title=attr-ol-reversed><a href="#reversed">reversed</a></code>
+
<dd><code title=attr-ol-start><a href="#start0">start</a></code>
<dt>DOM interface:
@@ -9639,6 +9641,7 @@
<dd>
<pre
class=idl>interface <dfn id=htmlolistelement>HTMLOListElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
+ attribute long <a href="#reversed0" title=dom-ol-reversed>reversed</a>;
attribute long <a href="#start1" title=dom-ol-start>start</a>;
};</pre>
</dl>
@@ -9651,6 +9654,11 @@
child nodes of the <code><a href="#ol">ol</a></code> element, in <a
href="#tree-order">tree order</a>.
+ <p>The <dfn id=reversed title=attr-ol-reversed><code>reversed</code></dfn>
+ attribute is a <a href="#boolean0">boolean attribute</a>. If present, it
+ indicates that the list is a descending list. If the attribute is present,
+ the list is an ascending list.
+
<p>The <dfn id=start0 title=attr-ol-start><code>start</code></dfn>
attribute, if present, must be a <a href="#valid0">valid integer</a>
giving the ordinal value of the first list item.
@@ -9660,7 +9668,9 @@
parsing integers">parse it as an integer</a>, in order to determine the
attribute's value. The default value, used if the attribute is missing or
if the value cannot be converted to a number according to the referenced
- algorithm, is 1.
+ algorithm, is 1 if the element has no <code title=attr-ol-reversed><a
+ href="#reversed">reversed</a></code> attribute, and is the number of child
+ <code><a href="#li">li</a></code> elements otherwise.
<p>The first item in the list has the ordinal value given by the <code><a
href="#ol">ol</a></code> element's <code title=attr-ol-start><a
@@ -9673,8 +9683,15 @@
<p>Each subsequent item in the list has the ordinal value given by its
<code title=attr-li-value><a href="#value">value</a></code> attribute, if
it has one, or, if it doesn't, the ordinal value of the previous item,
- plus one.
+ plus one if the <code title=attr-ol-reversed><a
+ href="#reversed">reversed</a></code> is absent, or minus one if it is
+ present.
+ <p>The <dfn id=reversed0 title=dom-ol-reversed><code>reversed</code></dfn>
+ DOM attribute must <a href="#reflect">reflect</a> the value of the <code
+ title=attr-ol-reversed><a href="#reversed">reversed</a></code> content
+ attribute.
+
<p>The <dfn id=start1 title=dom-ol-start><code>start</code></dfn> DOM
attribute must <a href="#reflect">reflect</a> the value of the <code
title=attr-ol-start><a href="#start0">start</a></code> content attribute.</p>
@@ -9871,6 +9888,26 @@
<li value="1"><cite>Ratatouille</cite>, 2007</li>
</ol>
</figure></pre>
+
+ <p>The markup could also be written as follows, using the <code
+ title=attr-ol-reversed><a href="#reversed">reversed</a></code> attribute
+ on the <code><a href="#ol">ol</a></code> element:</p>
+
+ <pre><figure>
+ <legend>The top 10 movies of all time</legend>
+ <ol reversed>
+ <li><cite>Josie and the Pussycats</cite>, 2001</li>
+ <li><cite lang="sh">Црна мачка, бели мачор</cite>, 1998</li>
+ <li><cite>A Bugs Life</cite>, 1998</li>
+ <li><cite>Toy Story</cite>, 1995</li>
+ <li><cite>Monsters, Inc</cite>, 2001</li>
+ <li><cite>Cars</cite>, 2006</li>
+ <li><cite>Toy Story 2</cite>, 1999</li>
+ <li><cite>Finding Nemo</cite>, 2003</li>
+ <li><cite>The Incredibles</cite>, 2004</li>
+ <li><cite>Ratatouille</cite>, 2007</li>
+ </ol>
+</figure></pre>
</div>
<h4 id=the-dl><span class=secno>3.11.4 </span>The <dfn
@@ -22034,7 +22071,7 @@
<td>The cell is a progress bar.
<tr>
- <td><!--reversed--><dfn id=reversed
+ <td><!--reversed--><dfn id=reversed1
title=datagrid-column-class-reversed><code>reversed</code></dfn>
<td>Columns
@@ -22080,7 +22117,7 @@
<td>The data is sorted by this column. Unless the <code
title=datagrid-column-class-reversed><a
- href="#reversed">reversed</a></code> class is also present, the sort
+ href="#reversed1">reversed</a></code> class is also present, the sort
direction is ascending.
<tr>
@@ -22207,7 +22244,7 @@
<li>Remove the <code title=datagrid-column-class-sorted><a
href="#sorted">sorted</a></code> and <code
title=datagrid-column-class-reversed><a
- href="#reversed">reversed</a></code> classes.
+ href="#reversed1">reversed</a></code> classes.
<li>If the <code><a href="#table">table</a></code> element has a <code
title=attr-class><a href="#class">class</a></code> attribute that
@@ -22222,7 +22259,7 @@
<li>If the column is the one currently being used to sort the data, and
it is sorted in descending order, add the <code
title=datagrid-column-class-reversed><a
- href="#reversed">reversed</a></code> class as well.
+ href="#reversed1">reversed</a></code> class as well.
</ol>
<p>The various row- and cell- related methods operate relative to a
@@ -22853,7 +22890,7 @@
<dt>To establish the sort direction of a sorted column
<dd>Check whether the <code title=datagrid-column-class-reversed><a
- href="#reversed">reversed</a></code> class applies to the column. If it
+ href="#reversed1">reversed</a></code> class applies to the column. If it
does, then the sort direction is descending (down; first rows have the
highest values), otherwise it is ascending (up; first rows have the
lowest values).
Modified: source
===================================================================
--- source 2008-02-26 03:41:17 UTC (rev 1247)
+++ source 2008-02-26 04:32:06 UTC (rev 1248)
@@ -7820,6 +7820,7 @@
</div>
+
<h3>Lists</h3>
<h4>The <dfn><code>ol</code></dfn> element</h4>
@@ -7835,10 +7836,12 @@
<dt>Content model:</dt>
<dd>Zero or more <code>li</code> elements.</dd>
<dt>Element-specific attributes:</dt>
+ <dd><code title="attr-ol-reversed">reversed</code></dd>
<dd><code title="attr-ol-start">start</code></dd>
<dt>DOM interface:</dt>
<dd>
<pre class="idl">interface <dfn>HTMLOListElement</dfn> : <span>HTMLElement</span> {
+ attribute long <span title="dom-ol-reversed">reversed</span>;
attribute long <span title="dom-ol-start">start</span>;
};</pre>
</dd>
@@ -7851,6 +7854,11 @@
<p>The items of the list are the <code>li</code> element child nodes
of the <code>ol</code> element, in <span>tree order</span>.</p>
+ <p>The <dfn title="attr-ol-reversed"><code>reversed</code></dfn>
+ attribute is a <span>boolean attribute</span>. If present, it
+ indicates that the list is a descending list. If the attribute is
+ present, the list is an ascending list.</p>
+
<p>The <dfn title="attr-ol-start"><code>start</code></dfn>
attribute, if present, must be a <span>valid integer</span> giving
the ordinal value of the first list item.</p>
@@ -7860,7 +7868,9 @@
integers">parse it as an integer</span>, in order to determine the
attribute's value. The default value, used if the attribute is
missing or if the value cannot be converted to a number according to
- the referenced algorithm, is 1.</p>
+ the referenced algorithm, is 1 if the element has no <code
+ title="attr-ol-reversed">reversed</code> attribute, and is the
+ number of child <code>li</code> elements otherwise.</p>
<p>The first item in the list has the ordinal value given by the
<code>ol</code> element's <code title="attr-ol-start">start</code>
@@ -7872,8 +7882,13 @@
<p>Each subsequent item in the list has the ordinal value given by
its <code title="attr-li-value">value</code> attribute, if it has
one, or, if it doesn't, the ordinal value of the previous item, plus
- one.</p>
+ one if the <code title="attr-ol-reversed">reversed</code> is absent,
+ or minus one if it is present.</p>
+ <p>The <dfn title="dom-ol-reversed"><code>reversed</code></dfn> DOM
+ attribute must <span>reflect</span> the value of the <code
+ title="attr-ol-reversed">reversed</code> content attribute.</p>
+
<p>The <dfn title="dom-ol-start"><code>start</code></dfn> DOM
attribute must <span>reflect</span> the value of the <code
title="attr-ol-start">start</code> content attribute.</p>
@@ -8047,6 +8062,26 @@
<li value="1"><cite>Ratatouille</cite>, 2007</li>
</ol>
</figure></pre>
+
+ <p>The markup could also be written as follows, using the <code
+ title="attr-ol-reversed">reversed</code> attribute on the
+ <code>ol</code> element:</p>
+
+ <pre><figure>
+ <legend>The top 10 movies of all time</legend>
+ <ol reversed>
+ <li><cite>Josie and the Pussycats</cite>, 2001</li>
+ <li><cite lang="sh">Црна мачка, бели мачор</cite>, 1998</li>
+ <li><cite>A Bugs Life</cite>, 1998</li>
+ <li><cite>Toy Story</cite>, 1995</li>
+ <li><cite>Monsters, Inc</cite>, 2001</li>
+ <li><cite>Cars</cite>, 2006</li>
+ <li><cite>Toy Story 2</cite>, 1999</li>
+ <li><cite>Finding Nemo</cite>, 2003</li>
+ <li><cite>The Incredibles</cite>, 2004</li>
+ <li><cite>Ratatouille</cite>, 2007</li>
+ </ol>
+</figure></pre>
</div>
More information about the Commit-Watchers
mailing list