Navigation Menu

Skip to content

Commit

Permalink
[giowt] (2) Parsing-mode quirks. (bug 6562)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@3132 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed May 26, 2009
1 parent 2f1fef1 commit 0dc6d2f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 56 deletions.
42 changes: 16 additions & 26 deletions index
Expand Up @@ -7498,20 +7498,6 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {
<a href=#quirks-mode>quirks mode</a> by the <a href=#html-parser>HTML parser</a>, in which
case it must instead return the literal string "<code title="">BackCompat</code>".</p>

<div class=XXX>

<p>As far as parsing goes, the quirks I know of are:</p>

<ul><li>Comment parsing is different.</li>

<li><code><a href=#the-p-element>p</a></code> can contain <code><a href=#the-table-element>table</a></code></li>

<li>Safari and IE have special parsing rules for &lt;% ... %&gt;
(even in standards mode, though clearly this should be
quirks-only).</li>

</ul></div>

<hr></div>

<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-charset><a href=#dom-document-charset>charset</a></code> [ = <var title="">value</var> ]</dt>
Expand Down Expand Up @@ -61665,9 +61651,9 @@ document.body.appendChild(text);
value of the <code title="">doctype</code> attribute of the
<code>Document</code> object.</p>

<p id=quirks-mode-doctypes>Then, if the DOCTYPE
token matches one of the conditions in the following list, then
set the document to <a href=#quirks-mode>quirks mode</a>:</p>
<p id=quirks-mode-doctypes>Then, if the DOCTYPE token matches
one of the conditions in the following list, then set the
<code>Document</code> to <a href=#quirks-mode>quirks mode</a>:</p>

<ul class=brief><li> The <i>force-quirks flag</i> is set to <i>on</i>. </li>
<li> The name is set to anything other than "<code title="">HTML</code>". </li>
Expand Down Expand Up @@ -61746,9 +61732,9 @@ document.body.appendChild(text);
<li> The system identifier is set to: "<code title="">http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd</code>" </li>
<li> The system identifier is missing and the public identifier starts with: "<code title="">-//W3C//DTD HTML 4.01 Frameset//<!--EN--></code>" </li>
<li> The system identifier is missing and the public identifier starts with: "<code title="">-//W3C//DTD HTML 4.01 Transitional//<!--EN--></code>" </li>
</ul><p>Otherwise, if the DOCTYPE
token matches one of the conditions in the following list, then
set the document to <a href=#limited-quirks-mode>limited quirks mode</a>:</p>
</ul><p>Otherwise, if the DOCTYPE token matches one of the conditions
in the following list, then set the <code>Document</code> to
<a href=#limited-quirks-mode>limited quirks mode</a>:</p>

<ul class=brief><li> The public identifier starts with: "<code title="">-//W3C//DTD XHTML 1.0 Frameset//<!--EN--></code>" </li>
<li> The public identifier starts with: "<code title="">-//W3C//DTD XHTML 1.0 Transitional//<!--EN--></code>" </li>
Expand All @@ -61769,7 +61755,7 @@ document.body.appendChild(text);

<p><a href=#parse-error>Parse error</a>.</p>

<p>Set the document to <a href=#quirks-mode>quirks mode</a>.</p>
<p>Set the <code>Document</code> to <a href=#quirks-mode>quirks mode</a>.</p>

<p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#the-before-html-insertion-mode title="insertion mode: before html">before html</a>", then
reprocess the current token.</p>
Expand Down Expand Up @@ -63018,10 +63004,14 @@ document.body.appendChild(text);
<dt>A start tag whose tag name is "table"</dt>
<dd>

<p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-scope title="has
an element in scope">has a <code>p</code> element in
scope</a>, then act as if an end tag with the tag name
"p" had been seen.</p> <!-- XXX quirks: don't do this -->
<p>If the <code>Document</code> is <em>not</em> set to
<a href=#quirks-mode>quirks mode</a>, and the <a href=#stack-of-open-elements>stack of open
elements</a> <a href=#has-an-element-in-scope title="has an element in scope">has a
<code>p</code> element in scope</a>, then act as if an end tag
with the tag name "p" had been seen.</p> <!-- i hate myself (this
quirk was basically caused by acid2; if i'd realised we could
change the specs when i wrote acid2, we could have avoided having
any parsing-mode quirks) -Hixie -->

<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>

Expand Down Expand Up @@ -63070,7 +63060,7 @@ document.body.appendChild(text);
<p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-scope title="has
an element in scope">has a <code>p</code> element in
scope</a>, then act as if an end tag with the tag name
"p" had been seen.</p> <!-- XXX quirks: don't do this -->
"p" had been seen.</p>

<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately
pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
Expand Down
46 changes: 16 additions & 30 deletions source
Expand Up @@ -7613,24 +7613,6 @@ interface <dfn>HTMLDocument</dfn> {
case it must instead return the literal string "<code
title="">BackCompat</code>".</p>

<div class="XXX">

<p>As far as parsing goes, the quirks I know of are:</p>

<ul>

<li>Comment parsing is different.</li>

<li><code>p</code> can contain <code>table</code></li>

<li>Safari and IE have special parsing rules for &lt;% ... %&gt;
(even in standards mode, though clearly this should be
quirks-only).</li>

</ul>

</div>

<hr>

</div>
Expand Down Expand Up @@ -75499,9 +75481,9 @@ document.body.appendChild(text);
value of the <code title="">doctype</code> attribute of the
<code>Document</code> object.</p>

<p id="quirks-mode-doctypes">Then, if the DOCTYPE
token matches one of the conditions in the following list, then
set the document to <span>quirks mode</span>:</p>
<p id="quirks-mode-doctypes">Then, if the DOCTYPE token matches
one of the conditions in the following list, then set the
<code>Document</code> to <span>quirks mode</span>:</p>

<ul class="brief">
<li> The <i>force-quirks flag</i> is set to <i>on</i>. </li>
Expand Down Expand Up @@ -75583,9 +75565,9 @@ document.body.appendChild(text);
<li> The system identifier is missing and the public identifier starts with: "<code title="">-//W3C//DTD HTML 4.01 Transitional//<!--EN--></code>" </li>
</ul>

<p>Otherwise, if the DOCTYPE
token matches one of the conditions in the following list, then
set the document to <span>limited quirks mode</span>:</p>
<p>Otherwise, if the DOCTYPE token matches one of the conditions
in the following list, then set the <code>Document</code> to
<span>limited quirks mode</span>:</p>

<ul class="brief">
<li> The public identifier starts with: "<code title="">-//W3C//DTD XHTML 1.0 Frameset//<!--EN--></code>" </li>
Expand All @@ -75610,7 +75592,7 @@ document.body.appendChild(text);

<p><span>Parse error</span>.</p>

<p>Set the document to <span>quirks mode</span>.</p>
<p>Set the <code>Document</code> to <span>quirks mode</span>.</p>

<p>Switch the <span>insertion mode</span> to "<span
title="insertion mode: before html">before html</span>", then
Expand Down Expand Up @@ -76986,10 +76968,14 @@ document.body.appendChild(text);
<dt>A start tag whose tag name is "table"</dt>
<dd>

<p>If the <span>stack of open elements</span> <span title="has
an element in scope">has a <code>p</code> element in
scope</span>, then act as if an end tag with the tag name
"p" had been seen.</p> <!-- XXX quirks: don't do this -->
<p>If the <code>Document</code> is <em>not</em> set to
<span>quirks mode</span>, and the <span>stack of open
elements</span> <span title="has an element in scope">has a
<code>p</code> element in scope</span>, then act as if an end tag
with the tag name "p" had been seen.</p> <!-- i hate myself (this
quirk was basically caused by acid2; if i'd realised we could
change the specs when i wrote acid2, we could have avoided having
any parsing-mode quirks) -Hixie -->

<p><span>Insert an HTML element</span> for the token.</p>

Expand Down Expand Up @@ -77039,7 +77025,7 @@ document.body.appendChild(text);
<p>If the <span>stack of open elements</span> <span title="has
an element in scope">has a <code>p</code> element in
scope</span>, then act as if an end tag with the tag name
"p" had been seen.</p> <!-- XXX quirks: don't do this -->
"p" had been seen.</p>

<p><span>Insert an HTML element</span> for the token. Immediately
pop the <span>current node</span> off the <span>stack of open
Expand Down

0 comments on commit 0dc6d2f

Please sign in to comment.