[ct] (0) Allow <frameset> to override the 'in body' mode in certain c…
…ases for compatibility with IE and pages that rely on IE's behaviour.
git-svn-id: http://svn.whatwg.org/webapps@2703 340c8d12-0b0e-0410-8428-c7bf67bfef74
<h5 id=other-parsing-state-flags><span class=secno>8.2.3.5 </span>Other parsing state flags</h5>
<p>The <dfn id=scripting-flag>scripting flag</dfn> is set to "enabled" if the <a href=#concept-n-script title=concept-n-script>scripting was enabled</a> for the
<code>Document</code> with which the parser is associated when the
parser was created, and "disabled" otherwise.</p>
<p>The <dfn id=frameset-ok-flag>frameset-ok flag</dfn> is set to "ok" when the parser is
created. It is set to "not ok" after certain tokens are seen.</p>
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#the-initial-insertion-mode title="insertion
mode: initial">initial</a>", tokens must be handled as follows:</p>
<dl class=switch><dt>A character token that is one of one of U+0009 CHARACTER
<dl class=switch><dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
data given in the comment token.</p>
</dd>
<dt>A character token that is one of one of U+0009 CHARACTER
<dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#the-before-head-insertion-mode title="insertion
mode: before head">before head</a>", tokens must be handled as follows:</p>
<dl class=switch><dt>A character token that is one of one of U+0009 CHARACTER
<dl class=switch><dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-inhead title="insertion
mode: in head">in head</a>", tokens must be handled as follows:</p>
<dl class=switch><dt>A character token that is one of one of U+0009 CHARACTER
<dl class=switch><dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
</dd>
<dt>A character token that is one of one of U+0009 CHARACTER
<dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dt>A comment token</dt>
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#the-after-head-insertion-mode title="insertion
mode: after head">after head</a>", tokens must be handled as follows:</p>
<dl class=switch><dt>A character token that is one of one of U+0009 CHARACTER
<dl class=switch><dt>A character token that is one of U+0009 CHARACTER
TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
<!--U+000D CARRIAGE RETURN (CR),--> or U+0020 SPACE</dt>
<dd>
<p><a href=#insert-a-character title="insert a character">Insert the token's
character</a> into the <a href=#current-node>current node</a>.</p>
<p>If the token is not one of U+0009 CHARACTER TABULATION, U+000A
LINE FEED (LF), U+000C FORM FEED (FF), <!--U+000D CARRIAGE RETURN
(CR),--> or U+0020 SPACE, then set the <a href=#frameset-ok-flag>frameset-ok
flag</a> to "not ok".</p>
</dd>
<dt>A comment token</dt>
</dd>
<dt>A start tag whose tag name is "frameset"</dt>
<dd>
<p><a href=#parse-error>Parse error</a>.</p>
<p>If the second element on the <a href=#stack-of-open-elements>stack of open
elements</a> is not a <code><a href=#the-body-element>body</a></code> element, or, if the
<a href=#stack-of-open-elements>stack of open elements</a> has only one node on it,
then ignore the token. (<a href=#fragment-case>fragment case</a>)</p>
<p>If the <a href=#frameset-ok-flag>frameset-ok flag</a> is set to "not ok", ignore
the token.</p>
<p>Otherwise, run the following steps:</p>
<ol><li><p>Remove the second element on the <a href=#stack-of-open-elements>stack of open
elements</a> from its parent node, if it has one.</li>
<li><p>Pop all the nodes from the bottom of the <a href=#stack-of-open-elements>stack of
open elements</a>, from the <a href=#current-node>current node</a> up to
the root <code><a href=#the-html-element>html</a></code> element.</p>
<li><p><a href=#insert-an-html-element>Insert an HTML element</a> for the
token.</li>
<li><p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inframeset title="insertion mode: in frameset">in frameset</a>".</p>
</ol></dd>
<dt>An end-of-file token</dt>
<dd>
one. (Newlines at the start of <code><a href=#the-pre-element>pre</a></code> blocks are
ignored as an authoring convenience.)</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
</dd>
<!-- as normal, but interacts with the form element pointer -->
<p>Run the following algorithm:</p>
<ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
<ol><li><p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</li>
<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 an <code><a href=#the-li-element>li</a></code> element,
<p>Run the following algorithm:</p>
<ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
<ol><li><p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</li>
<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 a <code><a href=#the-dd-element>dd</a></code> or
<p>Insert a marker at the end of the <a href=#list-of-active-formatting-elements>list of active
formatting elements</a>.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
</dd>
<dt>A start tag token whose tag name is one of: "applet",
<p>Insert a marker at the end of the <a href=#list-of-active-formatting-elements>list of active
formatting elements</a>.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
</dd>
<dt>An end tag token whose tag name is one of: "applet", "button",
</ol></dd>
<dt>A start tag whose tag name is "xmp"</dt>
<dd>
<p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
any.</p>
<p>Follow the <a href=#generic-cdata-element-parsing-algorithm>generic CDATA element parsing algorithm</a>.</p>
</dd>
<dt>A start tag whose tag name is "table"</dt>
<dd>
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
<p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-intable title="insertion mode: in table">in table</a>".</p>
</dd>
<p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
token's <i>self-closing flag</i></a>, if it is set.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p> <!--
shouldn't really do it for <area>, <basefont>, <bgsound>, and
<spacer> -->
</dd>
<dt>A start tag whose tag name is one of: "param", "source"</dt>
<p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
token's <i>self-closing flag</i></a>, if it is set.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
</dd>
<dt>A start tag whose tag name is "image"</dt>
<li><p>Let the <a href=#original-insertion-mode>original insertion mode</a> be the
current <a href=#insertion-mode>insertion mode</a>.</p>
<li><p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not
ok".</li>
<li><p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-incdata title="insertion mode: in CDATA/RCDATA">in
CDATA/RCDATA</a>".</li>
</ol></dd>
<dt>A start tag whose tag name is one of: "iframe", "noembed"</dt>
<dt>A start tag whose tag name is "xmp"</dt>
<dd>
<p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
any.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
<p>Follow the <a href=#generic-cdata-element-parsing-algorithm>generic CDATA element parsing algorithm</a>.</p>
</dd>
<dt>A start tag whose tag name is "iframe"</dt>
<dd>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
<p>Follow the <a href=#generic-cdata-element-parsing-algorithm>generic CDATA element parsing algorithm</a>.</p>
</dd>
<dt>A start tag whose tag name is "noembed"</dt>
<dt>A start tag whose tag name is "noscript", if the <a href=#scripting-flag>scripting flag</a> is enabled</dt>
<dd>
<p>Follow the <a href=#generic-cdata-element-parsing-algorithm>generic CDATA element parsing algorithm</a>.</p>
</dd>
<dt>A start tag whose tag name is "select"</dt>
<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
<p>If the <a href=#insertion-mode>insertion mode</a> is one of <a href=#parsing-main-intable title="insertion mode: in table">in table</a>", "<a href=#parsing-main-incaption title="insertion mode: in caption">in caption</a>", "<a href=#parsing-main-incolgroup title="insertion mode: in column group">in column group</a>",
"<a href=#parsing-main-intbody title="insertion mode: in table body">in table
body</a>", "<a href=#parsing-main-intr title="insertion mode: in row">in
-->
<dt>A start <!--or end--> tag whose tag name is one of: "caption",