Skip to content

Commit

Permalink
[giow] (3) Update the HTML parser to handle <html><head></head><templ…
Browse files Browse the repository at this point in the history
…ate></template><!---->

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23002
Affected topics: HTML Syntax and Parsing

git-svn-id: http://svn.whatwg.org/webapps@8218 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 9, 2013
1 parent 99a1a48 commit 6936346
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 21 deletions.
21 changes: 14 additions & 7 deletions complete.html
Expand Up @@ -86924,8 +86924,7 @@ <h5 id=the-insertion-mode><span class=secno>12.2.3.1 </span>The insertion mode</

<li><i>Loop</i>: If <var title="">node</var> is the first node in
the stack of open elements, then set <var title="">last</var> to
true and set <var title="">node</var> to the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element.
(<a href=#fragment-case>fragment case</a>)</li>
true and set <var title="">node</var> to the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element.</li>

<li>

Expand Down Expand Up @@ -87016,11 +87015,19 @@ <h5 id=the-insertion-mode><span class=secno>12.2.3.1 </span>The insertion mode</
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 abort
these steps. (<a href=#fragment-case>fragment case</a>)</li>

<li>If <var title="">node</var> is an <code><a href=#the-html-element>html</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a>
to "<a href=#the-before-head-insertion-mode title="insertion mode: before head">before
head</a>" and abort these steps. (<a href=#fragment-case>fragment
case</a>)</li>
<li>

<p>If <var title="">node</var> is an <code><a href=#the-html-element>html</a></code> element, run these substeps:</p>

<ol><li><p>If the <a href=#head-element-pointer><code>head</code> element pointer</a> is null, switch the
<a href=#insertion-mode>insertion mode</a> to "<a href=#the-before-head-insertion-mode title="insertion mode: before head">before head</a>"
and abort these steps. (<a href=#fragment-case>fragment case</a>)</li>

<li><p>Otherwise, the <a href=#head-element-pointer><code>head</code> element pointer</a> is not null, switch the
<a href=#insertion-mode>insertion mode</a> to "<a href=#the-after-head-insertion-mode title="insertion mode: after head">after head</a>"
and abort these steps.</li> <!-- consider <html><head></head><template></template> -->

</ol></li>

<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
Expand Down
21 changes: 14 additions & 7 deletions index
Expand Up @@ -86924,8 +86924,7 @@ dictionary <dfn id=storageeventinit>StorageEventInit</dfn> : <a href=#eventinit>

<li><i>Loop</i>: If <var title="">node</var> is the first node in
the stack of open elements, then set <var title="">last</var> to
true and set <var title="">node</var> to the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element.
(<a href=#fragment-case>fragment case</a>)</li>
true and set <var title="">node</var> to the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element.</li>

<li>

Expand Down Expand Up @@ -87016,11 +87015,19 @@ dictionary <dfn id=storageeventinit>StorageEventInit</dfn> : <a href=#eventinit>
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 abort
these steps. (<a href=#fragment-case>fragment case</a>)</li>

<li>If <var title="">node</var> is an <code><a href=#the-html-element>html</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a>
to "<a href=#the-before-head-insertion-mode title="insertion mode: before head">before
head</a>" and abort these steps. (<a href=#fragment-case>fragment
case</a>)</li>
<li>

<p>If <var title="">node</var> is an <code><a href=#the-html-element>html</a></code> element, run these substeps:</p>

<ol><li><p>If the <a href=#head-element-pointer><code>head</code> element pointer</a> is null, switch the
<a href=#insertion-mode>insertion mode</a> to "<a href=#the-before-head-insertion-mode title="insertion mode: before head">before head</a>"
and abort these steps. (<a href=#fragment-case>fragment case</a>)</li>

<li><p>Otherwise, the <a href=#head-element-pointer><code>head</code> element pointer</a> is not null, switch the
<a href=#insertion-mode>insertion mode</a> to "<a href=#the-after-head-insertion-mode title="insertion mode: after head">after head</a>"
and abort these steps.</li> <!-- consider <html><head></head><template></template> -->

</ol></li>

<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
Expand Down
25 changes: 18 additions & 7 deletions source
Expand Up @@ -97008,8 +97008,7 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
<li><i>Loop</i>: If <var title="">node</var> is the first node in
the stack of open elements, then set <var title="">last</var> to
true and set <var title="">node</var> to the <var
title="concept-frag-parse-context">context</var> element.
(<span>fragment case</span>)</li>
title="concept-frag-parse-context">context</var> element.</li>

<li>

Expand Down Expand Up @@ -97109,11 +97108,23 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
title="insertion mode: in frameset">in frameset</span>" and abort
these steps. (<span>fragment case</span>)</li>

<li>If <var title="">node</var> is an <code>html</code> element,
then switch the <span>insertion mode</span>
to "<span title="insertion mode: before head">before
head</span>" and abort these steps. (<span>fragment
case</span>)</li>
<li>

<p>If <var title="">node</var> is an <code>html</code> element, run these substeps:</p>

<ol>

<li><p>If the <span><code>head</code> element pointer</span> is null, switch the
<span>insertion mode</span> to "<span title="insertion mode: before head">before head</span>"
and abort these steps. (<span>fragment case</span>)</li>

<li><p>Otherwise, the <span><code>head</code> element pointer</span> is not null, switch the
<span>insertion mode</span> to "<span title="insertion mode: after head">after head</span>"
and abort these steps.</li> <!-- consider <html><head></head><template></template> -->

</ol>

</li>

<li>If <var title="">last</var> is true, then switch the
<span>insertion mode</span> to "<span title="insertion mode: in
Expand Down

0 comments on commit 6936346

Please sign in to comment.