Bugzilla – Bug 141
Fix some bugs where an end-of-file token in the fragment case would either never terminate the parser or would terminate with parse errors that shouldn't be
Last modified: 2008-03-11 18:58:27 CET
Index: source =================================================================== --- source (revision 1361) +++ source (revision 1362) @@ -39116,6 +39116,8 @@ <dt>Anything else</dt> <dd> + <!-- can't get here with an EOF and a fragment case --> + <p>Act as if an end tag token with the tag name "head" had been seen, and reprocess the current token.</p> @@ -39187,9 +39189,13 @@ <dt>Anything else</dt> <dd> + + <!-- can't get here with an EOF and a fragment case --> + <p><span>Parse error</span>. Act as if an end tag with the tag name "noscript" had been seen and reprocess the current token.</p> + </dd> </dl> @@ -40719,6 +40725,18 @@ <p><span>Parse error</span>. Ignore the token.</p> </dd> + <dt>An end-of-file token</dt> + <dd> + + <p>If the <span>current node</span> is the root <code>html</code> + element, then <span>stop parsing</span>. (<span>fragment + case</span>)</p> + + <p>Otherwise, act as described in the "anything else" entry + below.</p> + + </dd> + <dt>Anything else</dt> <dd> @@ -41155,7 +41173,16 @@ <dt>An end-of-file token</dt> <dd> - <p><span>Parse error</span>. <span>Stop parsing</span>.</p> + + <p>If the <span>current node</span> is not the root + <code>html</code> element, then this is a <span>parse + error.</span>.</p> + + <p class="note">It can only be the <span>current node</span> in + the <span>fragment case</span>.</p> + + <p><span>Stop parsing.</span></p> + </dd> <dt>Anything else</dt> @@ -41349,7 +41376,16 @@ <dt>An end-of-file token</dt> <dd> - <p><span>Parse error</span>. <span>Stop parsing.</span></p> + + <p>If the <span>current node</span> is not the root + <code>html</code> element, then this is a <span>parse + error.</span>.</p> + + <p class="note">It can only be the <span>current node</span> in + the <span>fragment case</span>.</p> + + <p><span>Stop parsing.</span></p> + </dd> <dt>Anything else</dt>
already taken care of