Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (1) Handle missing foreign content end tags and SVG </font> an…
…d </a> end tags in foreign content.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8767

git-svn-id: http://svn.whatwg.org/webapps@4803 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 25, 2010
1 parent e08f25a commit 5e290c5
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 3 deletions.
40 changes: 39 additions & 1 deletion complete.html
Expand Up @@ -77908,6 +77908,44 @@ <h5 id=parsing-main-inselect><span class=secno>12.2.5.19 </span>The "<dfn title=

</dd>

<dt>An end tag, if the <a href=#current-node>current node</a> is not an element in the <a href=#html-namespace-0>HTML namespace</a>.</dt>

<dd>

<p>Run these steps:</p>

<ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
node</a> (the bottommost node of the stack).</li>

<li><p>If <var title="">node</var> is not an element with the
same tag name as the token, then this is a <a href=#parse-error>parse
error</a>.</li>

<li><p><i>Loop</i>: If <var title="">node</var> has the same tag
name as the token, pop elements from the <a href=#stack-of-open-elements>stack of
open elements</a> until <var title="">node</var> has been
popped from the stack, and then abort these steps.</li>

<li><p>Set <var title="">node</var> to the previous entry in the
<a href=#stack-of-open-elements>stack of open elements</a>.</li>

<li>

<p>If <var title="">node</var> is an element in the <a href=#html-namespace-0>HTML
namespace</a>, process the token <a href=#using-the-rules-for>using the rules
for</a> the <a href=#secondary-insertion-mode>secondary insertion mode</a>. If, after
doing so, the <a href=#insertion-mode>insertion mode</a> is still "<a href=#parsing-main-inforeign title="insertion mode: in foreign content">in foreign
content</a>", but there is no element <a href=#has-an-element-in-scope title="has an
element in scope">in scope</a> that has a namespace other
than the <a href=#html-namespace-0>HTML namespace</a>, switch the <a href=#insertion-mode>insertion
mode</a> to the <a href=#secondary-insertion-mode>secondary insertion mode</a>.</p>

</li>

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

</ol></dd>

<dt>A start tag whose tag name is neither "mglyph" nor "malignmark", if the <a href=#current-node>current node</a> is an <code title="">mi</code> element in the <a href=#mathml-namespace>MathML namespace</a>.</dt>
<dt>A start tag whose tag name is neither "mglyph" nor "malignmark", if the <a href=#current-node>current node</a> is an <code title="">mo</code> element in the <a href=#mathml-namespace>MathML namespace</a>.</dt>
<dt>A start tag whose tag name is neither "mglyph" nor "malignmark", if the <a href=#current-node>current node</a> is an <code title="">mn</code> element in the <a href=#mathml-namespace>MathML namespace</a>.</dt>
Expand All @@ -77918,7 +77956,7 @@ <h5 id=parsing-main-inselect><span class=secno>12.2.5.19 </span>The "<dfn title=
<dt>A start tag, if the <a href=#current-node>current node</a> is a <code title="">desc</code> element in the <a href=#svg-namespace>SVG namespace</a>.</dt>
<dt>A start tag, if the <a href=#current-node>current node</a> is a <code title="">title</code> element in the <a href=#svg-namespace>SVG namespace</a>.</dt>
<dt>A start tag, if the <a href=#current-node>current node</a> is an element in the <a href=#html-namespace-0>HTML namespace</a>.</dt>
<dt>An end tag</dt>
<dt>Any other end tag</dt>
<dd>

<p>Process the token <a href=#using-the-rules-for>using the rules for</a> the
Expand Down
40 changes: 39 additions & 1 deletion index
Expand Up @@ -72212,6 +72212,44 @@ document.body.appendChild(text);

</dd>

<dt>An end tag, if the <a href=#current-node>current node</a> is not an element in the <a href=#html-namespace-0>HTML namespace</a>.</dt>

<dd>

<p>Run these steps:</p>

<ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
node</a> (the bottommost node of the stack).</li>

<li><p>If <var title="">node</var> is not an element with the
same tag name as the token, then this is a <a href=#parse-error>parse
error</a>.</li>

<li><p><i>Loop</i>: If <var title="">node</var> has the same tag
name as the token, pop elements from the <a href=#stack-of-open-elements>stack of
open elements</a> until <var title="">node</var> has been
popped from the stack, and then abort these steps.</li>

<li><p>Set <var title="">node</var> to the previous entry in the
<a href=#stack-of-open-elements>stack of open elements</a>.</li>

<li>

<p>If <var title="">node</var> is an element in the <a href=#html-namespace-0>HTML
namespace</a>, process the token <a href=#using-the-rules-for>using the rules
for</a> the <a href=#secondary-insertion-mode>secondary insertion mode</a>. If, after
doing so, the <a href=#insertion-mode>insertion mode</a> is still "<a href=#parsing-main-inforeign title="insertion mode: in foreign content">in foreign
content</a>", but there is no element <a href=#has-an-element-in-scope title="has an
element in scope">in scope</a> that has a namespace other
than the <a href=#html-namespace-0>HTML namespace</a>, switch the <a href=#insertion-mode>insertion
mode</a> to the <a href=#secondary-insertion-mode>secondary insertion mode</a>.</p>

</li>

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

</ol></dd>

<dt>A start tag whose tag name is neither "mglyph" nor "malignmark", if the <a href=#current-node>current node</a> is an <code title="">mi</code> element in the <a href=#mathml-namespace>MathML namespace</a>.</dt>
<dt>A start tag whose tag name is neither "mglyph" nor "malignmark", if the <a href=#current-node>current node</a> is an <code title="">mo</code> element in the <a href=#mathml-namespace>MathML namespace</a>.</dt>
<dt>A start tag whose tag name is neither "mglyph" nor "malignmark", if the <a href=#current-node>current node</a> is an <code title="">mn</code> element in the <a href=#mathml-namespace>MathML namespace</a>.</dt>
Expand All @@ -72222,7 +72260,7 @@ document.body.appendChild(text);
<dt>A start tag, if the <a href=#current-node>current node</a> is a <code title="">desc</code> element in the <a href=#svg-namespace>SVG namespace</a>.</dt>
<dt>A start tag, if the <a href=#current-node>current node</a> is a <code title="">title</code> element in the <a href=#svg-namespace>SVG namespace</a>.</dt>
<dt>A start tag, if the <a href=#current-node>current node</a> is an element in the <a href=#html-namespace-0>HTML namespace</a>.</dt>
<dt>An end tag</dt>
<dt>Any other end tag</dt>
<dd>

<p>Process the token <a href=#using-the-rules-for>using the rules for</a> the
Expand Down
45 changes: 44 additions & 1 deletion source
Expand Up @@ -88844,6 +88844,49 @@ document.body.appendChild(text);

</dd>

<dt>An end tag, if the <span>current node</span> is not an element in the <span>HTML namespace</span>.</dt>

<dd>

<p>Run these steps:</p>

<ol>

<li><p>Initialize <var title="">node</var> to be the <span>current
node</span> (the bottommost node of the stack).</p></li>

<li><p>If <var title="">node</var> is not an element with the
same tag name as the token, then this is a <span>parse
error</span>.</p></li>

<li><p><i>Loop</i>: If <var title="">node</var> has the same tag
name as the token, pop elements from the <span>stack of
open elements</span> until <var title="">node</var> has been
popped from the stack, and then abort these steps.</p></li>

<li><p>Set <var title="">node</var> to the previous entry in the
<span>stack of open elements</span>.</p></li>

<li>

<p>If <var title="">node</var> is an element in the <span>HTML
namespace</span>, process the token <span>using the rules
for</span> the <span>secondary insertion mode</span>. If, after
doing so, the <span>insertion mode</span> is still "<span
title="insertion mode: in foreign content">in foreign
content</span>", but there is no element <span title="has an
element in scope">in scope</span> that has a namespace other
than the <span>HTML namespace</span>, switch the <span>insertion
mode</span> to the <span>secondary insertion mode</span>.</p>

</li>

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

</ol>

</dd>

<dt>A start tag whose tag name is neither "mglyph" nor "malignmark", if the <span>current node</span> is an <code title="">mi</code> element in the <span>MathML namespace</span>.</dt>
<dt>A start tag whose tag name is neither "mglyph" nor "malignmark", if the <span>current node</span> is an <code title="">mo</code> element in the <span>MathML namespace</span>.</dt>
<dt>A start tag whose tag name is neither "mglyph" nor "malignmark", if the <span>current node</span> is an <code title="">mn</code> element in the <span>MathML namespace</span>.</dt>
Expand All @@ -88854,7 +88897,7 @@ document.body.appendChild(text);
<dt>A start tag, if the <span>current node</span> is a <code title="">desc</code> element in the <span>SVG namespace</span>.</dt>
<dt>A start tag, if the <span>current node</span> is a <code title="">title</code> element in the <span>SVG namespace</span>.</dt>
<dt>A start tag, if the <span>current node</span> is an element in the <span>HTML namespace</span>.</dt>
<dt>An end tag</dt>
<dt>Any other end tag</dt>
<dd>

<p>Process the token <span>using the rules for</span> the
Expand Down

0 comments on commit 5e290c5

Please sign in to comment.