Skip to content

Commit

Permalink
[e] (0) Make some algorithms things more consistent with other algori…
Browse files Browse the repository at this point in the history
…thms.

git-svn-id: http://svn.whatwg.org/webapps@4804 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 25, 2010
1 parent 5e290c5 commit eb5e67e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 60 deletions.
41 changes: 21 additions & 20 deletions complete.html
Expand Up @@ -30710,7 +30710,7 @@ <h5 id=header-and-data-cell-semantics><span class=secno>4.9.12.2 </span>Forming
<p>If there is no cell covering slot (<var title="">x</var>,
<var title="">y</var>), or if there is more than one cell
covering slot (<var title="">x</var>, <var title="">y</var>),
return to the substep marked <i>loop</i>.</p>
return to the substep labeled <i>loop</i>.</p>

</li>

Expand Down Expand Up @@ -30784,7 +30784,7 @@ <h5 id=header-and-data-cell-semantics><span class=secno>4.9.12.2 </span>Forming

<li>

<p>Return to the step marked <i>loop</i>.</p>
<p>Return to the step labeled <i>loop</i>.</p>

</li>

Expand Down Expand Up @@ -48055,7 +48055,7 @@ <h4 id=associating-names-with-items><span class=secno>5.2.5 </span>Associating n
the child elements of <var title="">current</var> to <var title="">pending</var>.</li>

<li><p><i>End of loop</i>: If <var title="">pending</var> is not
empty, return to the step marked <i>loop</i>.</li>
empty, return to the step labeled <i>loop</i>.</li>

<li><p>Return <var title="">results</var>.</li>

Expand Down Expand Up @@ -70591,7 +70591,7 @@ <h4 id=the-doctype><span class=secno>12.1.1 </span>The DOCTYPE</h4>
<li>One or more <a href=#space-character title="space character">space characters</a>.</li>
<li>A U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (the <i>quote mark</i>).</li>
<li>The literal string "<code><a href=#about:legacy-compat>about:legacy-compat</a></code>".</li>
<li>A matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (i.e. the same character as in the earlier step marked <i>quote mark</i>).</li>
<li>A matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (i.e. the same character as in the earlier step labeled <i>quote mark</i>).</li>
</ol><p class=note>In other words, <code>&lt;!DOCTYPE HTML SYSTEM
"about:legacy-compat"&gt;</code> or <code>&lt;!DOCTYPE HTML SYSTEM
'about:legacy-compat'&gt;</code>, case-insensitively except for the bit
Expand Down Expand Up @@ -72250,38 +72250,38 @@ <h5 id=the-insertion-mode><span class=secno>12.2.3.1 </span>The insertion mode</

<li>If <var title="">node</var> is a <code><a href=#the-select-element>select</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inselect title="insertion mode: in select">in select</a>" and jump to the
step marked <i title="">end</i>. (<a href=#fragment-case>fragment case</a>)</li>
step labeled <i title="">end</i>. (<a href=#fragment-case>fragment case</a>)</li>

<li>If <var title="">node</var> is a <code><a href=#the-td-element>td</a></code> or
<code><a href=#the-th-element>th</a></code> element and <var title="">last</var> is false, then
switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intd title="insertion
mode: in cell">in cell</a>" and jump to the step marked <i title="">end</i>.</li>
mode: in cell">in cell</a>" and jump to the step labeled <i title="">end</i>.</li>

<li>If <var title="">node</var> is a <code><a href=#the-tr-element>tr</a></code> element, then
switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intr title="insertion
mode: in row">in row</a>" and jump to the step marked <i title="">end</i>.</li>
mode: in row">in row</a>" and jump to the step labeled <i title="">end</i>.</li>

<li>If <var title="">node</var> is a <code><a href=#the-tbody-element>tbody</a></code>,
<code><a href=#the-thead-element>thead</a></code>, or <code><a href=#the-tfoot-element>tfoot</a></code> element, then switch the
<a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intbody title="insertion mode: in
table body">in table body</a>" and jump to the step marked <i title="">end</i>.</li>
table body">in table body</a>" and jump to the step labeled <i title="">end</i>.</li>

<li>If <var title="">node</var> is a <code><a href=#the-caption-element>caption</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-incaption title="insertion mode: in caption">in caption</a>" and jump to
the step marked <i title="">end</i>.</li>
the step labeled <i title="">end</i>.</li>

<li>If <var title="">node</var> is a <code><a href=#the-colgroup-element>colgroup</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-incolgroup title="insertion mode: in column group">in column group</a>" and
jump to the step marked <i title="">end</i>. (<a href=#fragment-case>fragment
jump to the step labeled <i title="">end</i>. (<a href=#fragment-case>fragment
case</a>)</li>

<li>If <var title="">node</var> is a <code><a href=#the-table-element>table</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intable title="insertion mode: in table">in table</a>" and jump to the
step marked <i title="">end</i>.</li>
step labeled <i title="">end</i>.</li>

<li>If <var title="">node</var> is a <code><a href=#the-head-element-0>head</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inbody title="insertion mode: in body">in body</a>" ("<a href=#parsing-main-inbody title="insertion mode: in body">in body</a>"! <em> not "<a href=#parsing-main-inhead title="insertion mode: in head">in head</a>"</em>!) and jump to
the step marked <i title="">end</i>. (<a href=#fragment-case>fragment
the step labeled <i title="">end</i>. (<a href=#fragment-case>fragment
case</a>)</li> <!-- This is only here for now in case people
think that the spec accidentally omitted it and try to "fix"
it. Note that noscript-in-head is also handled this way. This is
Expand All @@ -72296,11 +72296,11 @@ <h5 id=the-insertion-mode><span class=secno>12.2.3.1 </span>The insertion mode</

<li>If <var title="">node</var> is a <code><a href=#the-body-element-0>body</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inbody title="insertion mode: in body">in body</a>" and jump to the
step marked <i title="">end</i>.</li>
step labeled <i title="">end</i>.</li>

<li>If <var title="">node</var> is a <code><a href=#frameset>frameset</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inframeset title="insertion mode: in frameset">in frameset</a>" and jump to
the step marked <i title="">end</i>. (<a href=#fragment-case>fragment
the step labeled <i title="">end</i>. (<a href=#fragment-case>fragment
case</a>)</li>

<li>If <var title="">node</var> is an <code><a href=#the-html-element-0>html</a></code> element,
Expand All @@ -72309,7 +72309,7 @@ <h5 id=the-insertion-mode><span class=secno>12.2.3.1 </span>The insertion mode</
to "<a href=#the-before-head-insertion-mode title="insertion mode: before head">before
head</a>"<!--, otherwise, switch the <span>insertion mode</span>
to "<span title="insertion mode: after head">after head</span>".-->
Then, <!-- in either case, --> jump to the step marked <i title="">end</i>. (<a href=#fragment-case>fragment case</a>)</li> <!-- if the
Then, <!-- in either case, --> jump to the step labeled <i title="">end</i>. (<a href=#fragment-case>fragment case</a>)</li> <!-- if the
head element pointer can ever be non-null when we're going through
these steps, we'll need to uncomment out the commented-out bits -->

Expand All @@ -72319,12 +72319,12 @@ <h5 id=the-insertion-mode><span class=secno>12.2.3.1 </span>The insertion mode</

<li>If <var title="">last</var> is true, then switch the
<a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inbody title="insertion mode: in
body">in body</a>" and jump to the step marked <i title="">end</i>. (<a href=#fragment-case>fragment case</a>)</li>
body">in body</a>" and jump to the step labeled <i title="">end</i>. (<a href=#fragment-case>fragment case</a>)</li>

<li>Let <var title="">node</var> now be the node before <var title="">node</var> in the <a href=#stack-of-open-elements>stack of open
elements</a>.</li>

<li>Return to the step marked <i>loop</i>.</li>
<li>Return to the step labeled <i>loop</i>.</li>

<li><i>End</i>: If <var title="">foreign</var> is true, switch the
<a href=#secondary-insertion-mode>secondary insertion mode</a> to whatever the
Expand Down Expand Up @@ -76844,7 +76844,7 @@ <h5 id=the-before-head-insertion-mode><span class=secno>12.2.5.6 </span>The "<df
node</a> (the bottommost node of the stack).</li>

<li><p>If <var title="">node</var> has the same tag name as
the end tag token, then:</p>
the token, then:</p>

<ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>

Expand Down Expand Up @@ -77594,8 +77594,9 @@ <h5 id=parsing-main-intd><span class=secno>12.2.5.18 </span>The "<dfn title="ins
with the same tag name as the token, then this is a
<a href=#parse-error>parse error</a>.</p>

<p>Pop elements from this stack until an element with the same
tag name as the token has been popped from the stack.</p>
<p>Pop elements from the <a href=#stack-of-open-elements>stack of open elements</a> stack
until an element with the same tag name as the token has been
popped from the stack.</p>

<p><a href=#clear-the-list-of-active-formatting-elements-up-to-the-last-marker>Clear the list of active formatting elements up to
the last marker</a>.</p>
Expand Down
41 changes: 21 additions & 20 deletions index
Expand Up @@ -30617,7 +30617,7 @@ the cell that corresponds to the values of the two dice.
<p>If there is no cell covering slot (<var title="">x</var>,
<var title="">y</var>), or if there is more than one cell
covering slot (<var title="">x</var>, <var title="">y</var>),
return to the substep marked <i>loop</i>.</p>
return to the substep labeled <i>loop</i>.</p>

</li>

Expand Down Expand Up @@ -30691,7 +30691,7 @@ the cell that corresponds to the values of the two dice.

<li>

<p>Return to the step marked <i>loop</i>.</p>
<p>Return to the step labeled <i>loop</i>.</p>

</li>

Expand Down Expand Up @@ -47962,7 +47962,7 @@ document.body.appendChild(outer);</pre>
the child elements of <var title="">current</var> to <var title="">pending</var>.</li>

<li><p><i>End of loop</i>: If <var title="">pending</var> is not
empty, return to the step marked <i>loop</i>.</li>
empty, return to the step labeled <i>loop</i>.</li>

<li><p>Return <var title="">results</var>.</li>

Expand Down Expand Up @@ -64895,7 +64895,7 @@ interface <dfn id=messageport>MessagePort</dfn> {
<li>One or more <a href=#space-character title="space character">space characters</a>.</li>
<li>A U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (the <i>quote mark</i>).</li>
<li>The literal string "<code><a href=#about:legacy-compat>about:legacy-compat</a></code>".</li>
<li>A matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (i.e. the same character as in the earlier step marked <i>quote mark</i>).</li>
<li>A matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (i.e. the same character as in the earlier step labeled <i>quote mark</i>).</li>
</ol><p class=note>In other words, <code>&lt;!DOCTYPE HTML SYSTEM
"about:legacy-compat"&gt;</code> or <code>&lt;!DOCTYPE HTML SYSTEM
'about:legacy-compat'&gt;</code>, case-insensitively except for the bit
Expand Down Expand Up @@ -66554,38 +66554,38 @@ interface <dfn id=messageport>MessagePort</dfn> {

<li>If <var title="">node</var> is a <code><a href=#the-select-element>select</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inselect title="insertion mode: in select">in select</a>" and jump to the
step marked <i title="">end</i>. (<a href=#fragment-case>fragment case</a>)</li>
step labeled <i title="">end</i>. (<a href=#fragment-case>fragment case</a>)</li>

<li>If <var title="">node</var> is a <code><a href=#the-td-element>td</a></code> or
<code><a href=#the-th-element>th</a></code> element and <var title="">last</var> is false, then
switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intd title="insertion
mode: in cell">in cell</a>" and jump to the step marked <i title="">end</i>.</li>
mode: in cell">in cell</a>" and jump to the step labeled <i title="">end</i>.</li>

<li>If <var title="">node</var> is a <code><a href=#the-tr-element>tr</a></code> element, then
switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intr title="insertion
mode: in row">in row</a>" and jump to the step marked <i title="">end</i>.</li>
mode: in row">in row</a>" and jump to the step labeled <i title="">end</i>.</li>

<li>If <var title="">node</var> is a <code><a href=#the-tbody-element>tbody</a></code>,
<code><a href=#the-thead-element>thead</a></code>, or <code><a href=#the-tfoot-element>tfoot</a></code> element, then switch the
<a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intbody title="insertion mode: in
table body">in table body</a>" and jump to the step marked <i title="">end</i>.</li>
table body">in table body</a>" and jump to the step labeled <i title="">end</i>.</li>

<li>If <var title="">node</var> is a <code><a href=#the-caption-element>caption</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-incaption title="insertion mode: in caption">in caption</a>" and jump to
the step marked <i title="">end</i>.</li>
the step labeled <i title="">end</i>.</li>

<li>If <var title="">node</var> is a <code><a href=#the-colgroup-element>colgroup</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-incolgroup title="insertion mode: in column group">in column group</a>" and
jump to the step marked <i title="">end</i>. (<a href=#fragment-case>fragment
jump to the step labeled <i title="">end</i>. (<a href=#fragment-case>fragment
case</a>)</li>

<li>If <var title="">node</var> is a <code><a href=#the-table-element>table</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intable title="insertion mode: in table">in table</a>" and jump to the
step marked <i title="">end</i>.</li>
step labeled <i title="">end</i>.</li>

<li>If <var title="">node</var> is a <code><a href=#the-head-element-0>head</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inbody title="insertion mode: in body">in body</a>" ("<a href=#parsing-main-inbody title="insertion mode: in body">in body</a>"! <em> not "<a href=#parsing-main-inhead title="insertion mode: in head">in head</a>"</em>!) and jump to
the step marked <i title="">end</i>. (<a href=#fragment-case>fragment
the step labeled <i title="">end</i>. (<a href=#fragment-case>fragment
case</a>)</li> <!-- This is only here for now in case people
think that the spec accidentally omitted it and try to "fix"
it. Note that noscript-in-head is also handled this way. This is
Expand All @@ -66600,11 +66600,11 @@ interface <dfn id=messageport>MessagePort</dfn> {

<li>If <var title="">node</var> is a <code><a href=#the-body-element-0>body</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inbody title="insertion mode: in body">in body</a>" and jump to the
step marked <i title="">end</i>.</li>
step labeled <i title="">end</i>.</li>

<li>If <var title="">node</var> is a <code><a href=#frameset>frameset</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inframeset title="insertion mode: in frameset">in frameset</a>" and jump to
the step marked <i title="">end</i>. (<a href=#fragment-case>fragment
the step labeled <i title="">end</i>. (<a href=#fragment-case>fragment
case</a>)</li>

<li>If <var title="">node</var> is an <code><a href=#the-html-element-0>html</a></code> element,
Expand All @@ -66613,7 +66613,7 @@ interface <dfn id=messageport>MessagePort</dfn> {
to "<a href=#the-before-head-insertion-mode title="insertion mode: before head">before
head</a>"<!--, otherwise, switch the <span>insertion mode</span>
to "<span title="insertion mode: after head">after head</span>".-->
Then, <!-- in either case, --> jump to the step marked <i title="">end</i>. (<a href=#fragment-case>fragment case</a>)</li> <!-- if the
Then, <!-- in either case, --> jump to the step labeled <i title="">end</i>. (<a href=#fragment-case>fragment case</a>)</li> <!-- if the
head element pointer can ever be non-null when we're going through
these steps, we'll need to uncomment out the commented-out bits -->

Expand All @@ -66623,12 +66623,12 @@ interface <dfn id=messageport>MessagePort</dfn> {

<li>If <var title="">last</var> is true, then switch the
<a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inbody title="insertion mode: in
body">in body</a>" and jump to the step marked <i title="">end</i>. (<a href=#fragment-case>fragment case</a>)</li>
body">in body</a>" and jump to the step labeled <i title="">end</i>. (<a href=#fragment-case>fragment case</a>)</li>

<li>Let <var title="">node</var> now be the node before <var title="">node</var> in the <a href=#stack-of-open-elements>stack of open
elements</a>.</li>

<li>Return to the step marked <i>loop</i>.</li>
<li>Return to the step labeled <i>loop</i>.</li>

<li><i>End</i>: If <var title="">foreign</var> is true, switch the
<a href=#secondary-insertion-mode>secondary insertion mode</a> to whatever the
Expand Down Expand Up @@ -71148,7 +71148,7 @@ document.body.appendChild(text);
node</a> (the bottommost node of the stack).</li>

<li><p>If <var title="">node</var> has the same tag name as
the end tag token, then:</p>
the token, then:</p>

<ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>

Expand Down Expand Up @@ -71898,8 +71898,9 @@ document.body.appendChild(text);
with the same tag name as the token, then this is a
<a href=#parse-error>parse error</a>.</p>

<p>Pop elements from this stack until an element with the same
tag name as the token has been popped from the stack.</p>
<p>Pop elements from the <a href=#stack-of-open-elements>stack of open elements</a> stack
until an element with the same tag name as the token has been
popped from the stack.</p>

<p><a href=#clear-the-list-of-active-formatting-elements-up-to-the-last-marker>Clear the list of active formatting elements up to
the last marker</a>.</p>
Expand Down

0 comments on commit eb5e67e

Please sign in to comment.