Skip to content

Commit

Permalink
Remove never-reached list item ordinal value condition
Browse files Browse the repository at this point in the history
It is in fact impossible for a list item to not have a list owner, as
there is always at least one ancestor that produces a CSS box. This was
discovered in web-platform-tests/wpt#4754. The
original algorithm was introduced in
5fe3dbb.
  • Loading branch information
domenic authored Feb 8, 2017
1 parent c4fef44 commit feb1db4
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -17550,9 +17550,12 @@ interface <dfn>HTMLLIElement</dfn> : <span>HTMLElement</span> {
<li><p>If the element has an <code>ol</code>, <code>ul</code>, or <code>menu</code> ancestor, set
<var>ancestor</var> to the closest such ancestor element.</p></li>

<li><p>Return the closest inclusive ancestor of <var>ancestor</var> that produces a CSS box, if
any. If no such inclusive ancestor exists, then return null; the element has no <span>list
owner</span>.</p></li>
<li>
<p>Return the closest inclusive ancestor of <var>ancestor</var> that produces a CSS box.</p>

<p class="note">Such an element must always exist, as at the very least the <span>document
element</span> must always produce a CSS box.</p>
</li>
</ol>

<p>To determine the <dfn>ordinal value</dfn> of each element owned by a given <span>list
Expand Down Expand Up @@ -17597,12 +17600,6 @@ interface <dfn>HTMLLIElement</dfn> : <span>HTMLElement</span> {
<li><p>Go to the step labeled <i>loop</i>.</p>
</ol>

<p>The <span>ordinal value</span> of any element with a <span>list owner</span> of null is 0.</p>

<p class="note">This can only impact the rendered counter when all of the element's ancestors do
not produce CSS boxes, such as if they are all styled with <code data-x="">display:
contents</code>.</p>

<hr>

<p>The <dfn><code data-x="dom-li-value">value</code></dfn> IDL attribute must <span>reflect</span>
Expand Down Expand Up @@ -119481,7 +119478,7 @@ INSERT INTERFACES HERE
Elizabeth Castro,
Elliott Sprehn,
Elliotte Harold,
Emilio Cobos,
Emilio Cobos Álvarez,
Emily Stark,
Eric Carlson,
Eric Casler,
Expand Down

0 comments on commit feb1db4

Please sign in to comment.