[whatwg] <ol reversed> with start value and "underflow"

Hi,

I'm working on implementing <ol reversed> in WebKit and the spec seems
unclear to me in one point unless I missed something.

Given this snippet :

<h3>Top 100</h3>
<ol reversed="reversed" start="100">
  <li>False Dichotomy</li>
  <li>Appeal to Ridicule</li>
  <li>Begging the Question (Circular Logic)</li>
  <!-- Items omitted here -->
  <li value="3">Strawman</li>
  <li>Bare Assertion Fallacy</li>
  <li>Argumentum ad Ignorantiam</li>
</ol>


What should we output?

100. False Dichotomy
99. Appeal to Ridicule
98. Begging the Question (Circular Logic)
3. Strawman
2. Bare Assertion Fallacy
1. Argumentum ad Ignorantiam

Is that correct?

Then come the question, what if I write :

<h3>Top 100</h3>
<ol reversed="reversed" start="100">
  <li>False Dichotomy</li>
  <li>Appeal to Ridicule</li>
  <li>Begging the Question (Circular Logic)</li>
  <!-- Items omitted here -->
  <li value="3">Strawman</li>
  <li>Bare Assertion Fallacy</li>
  <li>Argumentum ad Ignorantiam</li>
  <li>Test</li>
</ol>

What should be the actual number of "Test" when rendered? 0? and what
if there are more items after "Test"? -1, -2,...? The spec seems to
say that it should stop a 1 but then what value I should display for
"Test"?

The latter issue could also be triggered in a simpler use case where
the start value of the <ol reversed> list is 3 but I have actually 4
list items.

Thanks for the answers, please correct me if I'm wrong, or just tell
me I'm stupid because the answer was obvious :D.

-- 
Alexis Menard (darktears)
Software Engineer
INdT Recife Brazil

Received on Monday, 12 December 2011 14:07:15 UTC