Skip to content
Permalink
Browse files

[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
  • Loading branch information
Hixie committed Jan 24, 2009
1 parent 359f4dd commit 24f01d70aedb32601c9e0abf045d4120b30afe4f
Showing with 208 additions and 57 deletions.
  1. +103 −30 index
  2. +105 −27 source
133 index
@@ -930,7 +930,7 @@
<li><a href=#the-stack-of-open-elements><span class=secno>8.2.3.2 </span>The stack of open elements</a></li>
<li><a href=#the-list-of-active-formatting-elements><span class=secno>8.2.3.3 </span>The list of active formatting elements</a></li>
<li><a href=#the-element-pointers><span class=secno>8.2.3.4 </span>The element pointers</a></li>
<li><a href=#the-scripting-state><span class=secno>8.2.3.5 </span>The scripting state</a></ol></li>
<li><a href=#other-parsing-state-flags><span class=secno>8.2.3.5 </span>Other parsing state flags</a></ol></li>
<li><a href=#tokenization><span class=secno>8.2.4 </span>Tokenization</a>
<ol>
<li><a href=#data-state><span class=secno>8.2.4.1 </span>Data state</a></li>
markup, for historical reasons.</p>


<h5 id=the-scripting-state><span class=secno>8.2.3.5 </span>The scripting state</h5>
<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>


<h4 id=tokenization><span class=secno>8.2.4 </span><dfn>Tokenization</dfn></h4>

<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",
"col", "colgroup", "frame", "frameset", "head", "tbody", "td",
"tfoot", "th", "thead", "tr"</dt>
"col", "colgroup", "frame", "head", "tbody", "td", "tfoot", "th",
"thead", "tr"</dt>
<!--<dt>An end tag whose tag name is one of: "area", "base",
"basefont", "bgsound", "command", "embed", "eventsource", "hr",
"iframe", "image", "img", "input", "isindex", "link", "meta",
<p>When the <a href=#insertion-mode>insertion mode</a> is "<a href=#parsing-main-intable title="insertion
mode: in table">in table</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-incolgroup title="insertion
mode: in column group">in column group</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-afterbody title="insertion
mode: after body">after body</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-inframeset title="insertion
mode: in frameset">in frameset</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>
mode: after frameset">after frameset</a>", tokens must be handled as follows:</p>

<!-- due to rules in the "in frameset" mode, this can't be entered in the fragment case -->
<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 DOCTYPE token</dt>
<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 start tag whose tag name is "html"</dt>
</dd>

<dt>A DOCTYPE token</dt>
<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 start tag whose tag name is "html"</dt>

0 comments on commit 24f01d7

Please sign in to comment.