Skip to content

Commit

Permalink
[cgiowt] (0) Try to fix the problem David Flanagan raised a while bac…
Browse files Browse the repository at this point in the history
…k with the <!DOCTYPE html><body><table><math><mi>foo</mi></math></table> test case.

Affected topics: HTML Syntax and Parsing

git-svn-id: http://svn.whatwg.org/webapps@6870 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 13, 2011
1 parent 8c22b79 commit 98c83e5
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 23 deletions.
26 changes: 18 additions & 8 deletions complete.html
Expand Up @@ -240,7 +240,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 9 December 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 13 December 2011</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -86514,7 +86514,7 @@ <h6 id=the-before-head-insertion-mode><span class=secno>12.2.5.4.3 </span>The "<

<p>When the user agent is to apply the rules for the "<a href=#parsing-main-intable title="insertion mode: in table">in table</a>" <a href=#insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p>

<dl class=switch><dt>A character token</dt>
<dl class=switch><dt>A character token, if the <a href=#current-node>current node</a> is <code><a href=#the-table-element>table</a></code>, <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-thead-element>thead</a></code>, or <code><a href=#the-tr-element>tr</a></code> element</dt>
<dd>

<p>Let the <dfn id=pending-table-character-tokens><var>pending table character tokens</var></dfn>
Expand Down Expand Up @@ -86693,11 +86693,11 @@ <h6 id=the-before-head-insertion-mode><span class=secno>12.2.5.4.3 </span>The "<

<p><a href=#parse-error>Parse error</a>. Process the token <a href=#using-the-rules-for>using the
rules for</a> the "<a href=#parsing-main-inbody title="insertion mode: in body">in
body</a>" <a href=#insertion-mode>insertion mode</a>, except that if the
body</a>" <a href=#insertion-mode>insertion mode</a>, except that whenever a
node would be inserted into the <a href=#current-node>current node</a> when the
<a href=#current-node>current node</a> is a <code><a href=#the-table-element>table</a></code>,
<code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-thead-element>thead</a></code>, or
<code><a href=#the-tr-element>tr</a></code> element, then, whenever a node would be inserted
into the <a href=#current-node>current node</a>, it must instead be <a href=#foster-parent title="foster parent">foster parented</a>.</p>
<code><a href=#the-tr-element>tr</a></code> element, then it must instead be <a href=#foster-parent title="foster parent">foster parented</a>.</p>

</dd>

Expand Down Expand Up @@ -86737,16 +86737,26 @@ <h6 id=parsing-main-intabletext><span class=secno>12.2.5.4.10 </span>The "<dfn t
<dt>Anything else</dt>
<dd>

<!-- this can only be called if the current node is one of the
table model elements -->

<p>If any of the tokens in the <var><a href=#pending-table-character-tokens>pending table character
tokens</a></var> list are character tokens that are not <a href=#space-character title="space character">space characters</a>, then reprocess
the character tokens in the <var><a href=#pending-table-character-tokens>pending table character
tokens</a></var> list using the rules given in the "anything
else" entry in the "<a href=#parsing-main-intable title="insertion mode: in table">in
tokens</a></var> list using the rules given in the "anything else"
entry in the "<a href=#parsing-main-intable title="insertion mode: in table">in
table</a>" insertion mode.</p>

<!-- if there's active formatting elements, it'll recreate those
and foster parent the top one and then put the text nodes in the
formatting elements; otherwise, it'll foster parent the character
tokens. -->

<p>Otherwise, <a href=#insert-a-character title="insert a character">insert the
characters</a> given by the <var><a href=#pending-table-character-tokens>pending table character
tokens</a></var> list into the <a href=#current-node>current node</a>.</p>
tokens</a></var> list into the <a href=#current-node>current node</a>.</p> <!--
i.e. inter-element whitespace in the table model isn't foster
parented -->

<!-- no need to empty the list, we're leaving the insertion mode
and the list is always emptied before we reenter the mode -->
Expand Down
26 changes: 18 additions & 8 deletions index
Expand Up @@ -240,7 +240,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 9 December 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 13 December 2011</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -86514,7 +86514,7 @@ document.body.appendChild(text);

<p>When the user agent is to apply the rules for the "<a href=#parsing-main-intable title="insertion mode: in table">in table</a>" <a href=#insertion-mode>insertion mode</a>, the user agent must handle the token as follows:</p>

<dl class=switch><dt>A character token</dt>
<dl class=switch><dt>A character token, if the <a href=#current-node>current node</a> is <code><a href=#the-table-element>table</a></code>, <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-thead-element>thead</a></code>, or <code><a href=#the-tr-element>tr</a></code> element</dt>
<dd>

<p>Let the <dfn id=pending-table-character-tokens><var>pending table character tokens</var></dfn>
Expand Down Expand Up @@ -86693,11 +86693,11 @@ document.body.appendChild(text);

<p><a href=#parse-error>Parse error</a>. Process the token <a href=#using-the-rules-for>using the
rules for</a> the "<a href=#parsing-main-inbody title="insertion mode: in body">in
body</a>" <a href=#insertion-mode>insertion mode</a>, except that if the
body</a>" <a href=#insertion-mode>insertion mode</a>, except that whenever a
node would be inserted into the <a href=#current-node>current node</a> when the
<a href=#current-node>current node</a> is a <code><a href=#the-table-element>table</a></code>,
<code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-thead-element>thead</a></code>, or
<code><a href=#the-tr-element>tr</a></code> element, then, whenever a node would be inserted
into the <a href=#current-node>current node</a>, it must instead be <a href=#foster-parent title="foster parent">foster parented</a>.</p>
<code><a href=#the-tr-element>tr</a></code> element, then it must instead be <a href=#foster-parent title="foster parent">foster parented</a>.</p>

</dd>

Expand Down Expand Up @@ -86737,16 +86737,26 @@ document.body.appendChild(text);
<dt>Anything else</dt>
<dd>

<!-- this can only be called if the current node is one of the
table model elements -->

<p>If any of the tokens in the <var><a href=#pending-table-character-tokens>pending table character
tokens</a></var> list are character tokens that are not <a href=#space-character title="space character">space characters</a>, then reprocess
the character tokens in the <var><a href=#pending-table-character-tokens>pending table character
tokens</a></var> list using the rules given in the "anything
else" entry in the "<a href=#parsing-main-intable title="insertion mode: in table">in
tokens</a></var> list using the rules given in the "anything else"
entry in the "<a href=#parsing-main-intable title="insertion mode: in table">in
table</a>" insertion mode.</p>

<!-- if there's active formatting elements, it'll recreate those
and foster parent the top one and then put the text nodes in the
formatting elements; otherwise, it'll foster parent the character
tokens. -->

<p>Otherwise, <a href=#insert-a-character title="insert a character">insert the
characters</a> given by the <var><a href=#pending-table-character-tokens>pending table character
tokens</a></var> list into the <a href=#current-node>current node</a>.</p>
tokens</a></var> list into the <a href=#current-node>current node</a>.</p> <!--
i.e. inter-element whitespace in the table model isn't foster
parented -->

<!-- no need to empty the list, we're leaving the insertion mode
and the list is always emptied before we reenter the mode -->
Expand Down
24 changes: 17 additions & 7 deletions source
Expand Up @@ -100209,7 +100209,7 @@ document.body.appendChild(text);

<dl class="switch">

<dt>A character token</dt>
<dt>A character token, if the <span>current node</span> is <code>table</code>, <code>tbody</code>, <code>tfoot</code>, <code>thead</code>, or <code>tr</code> element</dt>
<dd>

<p>Let the <dfn><var>pending table character tokens</var></dfn>
Expand Down Expand Up @@ -100395,11 +100395,11 @@ document.body.appendChild(text);

<p><span>Parse error</span>. Process the token <span>using the
rules for</span> the "<span title="insertion mode: in body">in
body</span>" <span>insertion mode</span>, except that if the
body</span>" <span>insertion mode</span>, except that whenever a
node would be inserted into the <span>current node</span> when the
<span>current node</span> is a <code>table</code>,
<code>tbody</code>, <code>tfoot</code>, <code>thead</code>, or
<code>tr</code> element, then, whenever a node would be inserted
into the <span>current node</span>, it must instead be <span
<code>tr</code> element, then it must instead be <span
title="foster parent">foster parented</span>.</p>

</dd>
Expand Down Expand Up @@ -100444,17 +100444,27 @@ document.body.appendChild(text);
<dt>Anything else</dt>
<dd>

<!-- this can only be called if the current node is one of the
table model elements -->

<p>If any of the tokens in the <var>pending table character
tokens</var> list are character tokens that are not <span
title="space character">space characters</span>, then reprocess
the character tokens in the <var>pending table character
tokens</var> list using the rules given in the "anything
else" entry in the "<span title="insertion mode: in table">in
tokens</var> list using the rules given in the "anything else"
entry in the "<span title="insertion mode: in table">in
table</span>" insertion mode.</p>

<!-- if there's active formatting elements, it'll recreate those
and foster parent the top one and then put the text nodes in the
formatting elements; otherwise, it'll foster parent the character
tokens. -->

<p>Otherwise, <span title="insert a character">insert the
characters</span> given by the <var>pending table character
tokens</var> list into the <span>current node</span>.</p>
tokens</var> list into the <span>current node</span>.</p> <!--
i.e. inter-element whitespace in the table model isn't foster
parented -->

<!-- no need to empty the list, we're leaving the insertion mode
and the list is always emptied before we reenter the mode -->
Expand Down

0 comments on commit 98c83e5

Please sign in to comment.