Skip to content

Commit

Permalink
[cgiowt] (2) Improve quirks mode selection algorithm based on data. (…
Browse files Browse the repository at this point in the history
…credit: sp, pt)

git-svn-id: http://svn.whatwg.org/webapps@1679 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed May 23, 2008
1 parent 5abf3d6 commit 9345b20
Show file tree
Hide file tree
Showing 2 changed files with 221 additions and 239 deletions.
310 changes: 146 additions & 164 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -45036,216 +45036,194 @@ function receiver(e) {
<li> The name is set to anything other than "<code
title="">HTML</code>".

<li> The public identifier is set to: "<code title="">+//Silmaril//dtd
html Pro v0r11 19970101//EN</code>"
<li> The public identifier starts with: "<code title="">+//Silmaril//dtd
html Pro v0r11 19970101//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//AdvaSoft
Ltd//DTD HTML 3.0 asWedit + extensions//EN</code>"
<li> The public identifier starts with: "<code title="">-//AdvaSoft
Ltd//DTD HTML 3.0 asWedit + extensions//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//AS//DTD HTML
3.0 asWedit + extensions//EN</code>"
<li> The public identifier starts with: "<code title="">-//AS//DTD HTML
3.0 asWedit + extensions//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
2.0 Level 1//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML 2.0 Level 1//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
2.0 Level 2//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML 2.0 Level 2//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
2.0 Strict Level 1//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML 2.0 Strict Level 1//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
2.0 Strict Level 2//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML 2.0 Strict Level 2//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
2.0 Strict//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML 2.0 Strict//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
2.0//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML 2.0//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
2.1E//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML 2.1E//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
3.0//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML 3.0//<!--EN--></code>"</li>
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML 3.0//EN//</code>" </li>-->

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
3.0//EN//</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML 3.2 Final//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
3.2 Final//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML 3.2//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
3.2//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML 3//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
3//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML Level 0//<!--EN--></code>"</li>
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML Level 0//EN//2.0</code>" </li>-->

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Level 0//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML Level 1//<!--EN--></code>"</li>
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML Level 1//EN//2.0</code>" </li>-->

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Level 0//EN//2.0</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML Level 2//<!--EN--></code>"</li>
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML Level 2//EN//2.0</code>" </li>-->

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Level 1//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML Level 3//<!--EN--></code>"</li>
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML Level 3//EN//3.0</code>" </li>-->

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Level 1//EN//2.0</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML Strict Level 0//<!--EN--></code>"</li>
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML Strict Level 0//EN//2.0</code>" </li>-->

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Level 2//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML Strict Level 1//<!--EN--></code>"</li>
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML Strict Level 1//EN//2.0</code>" </li>-->

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Level 2//EN//2.0</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML Strict Level 2//<!--EN--></code>"</li>
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML Strict Level 2//EN//2.0</code>" </li>-->

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Level 3//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML Strict Level 3//<!--EN--></code>"</li>
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML Strict Level 3//EN//3.0</code>" </li>-->

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Level 3//EN//3.0</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML Strict//<!--EN--></code>"</li>
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML Strict//EN//2.0</code>" </li>-->
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML Strict//EN//3.0</code>" </li>-->

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Strict Level 0//EN</code>"
<li> The public identifier starts with: "<code title="">-//IETF//DTD
HTML//<!--EN--></code>"</li>
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML//EN//2.0</code>" </li>-->
<!--<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML//EN//3.0</code>" </li>-->

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Strict Level 0//EN//2.0</code>"
<li> The public identifier starts with: "<code title="">-//Metrius//DTD
Metrius Presentational//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Strict Level 1//EN</code>"
<li> The public identifier starts with: "<code
title="">-//Microsoft//DTD Internet Explorer 2.0 HTML
Strict//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Strict Level 1//EN//2.0</code>"
<li> The public identifier starts with: "<code
title="">-//Microsoft//DTD Internet Explorer 2.0
HTML//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Strict Level 2//EN</code>"
<li> The public identifier starts with: "<code
title="">-//Microsoft//DTD Internet Explorer 2.0
Tables//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Strict Level 2//EN//2.0</code>"
<li> The public identifier starts with: "<code
title="">-//Microsoft//DTD Internet Explorer 3.0 HTML
Strict//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Strict Level 3//EN</code>"
<li> The public identifier starts with: "<code
title="">-//Microsoft//DTD Internet Explorer 3.0
HTML//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Strict Level 3//EN//3.0</code>"
<li> The public identifier starts with: "<code
title="">-//Microsoft//DTD Internet Explorer 3.0
Tables//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Strict//EN</code>"
<li> The public identifier starts with: "<code title="">-//Netscape
Comm. Corp.//DTD HTML//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Strict//EN//2.0</code>"
<li> The public identifier starts with: "<code title="">-//Netscape
Comm. Corp.//DTD Strict HTML//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD HTML
Strict//EN//3.0</code>"
<li> The public identifier starts with: "<code title="">-//O'Reilly and
Associates//DTD HTML 2.0//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD
HTML//EN</code>"
<li> The public identifier starts with: "<code title="">-//O'Reilly and
Associates//DTD HTML Extended 1.0//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD
HTML//EN//2.0</code>"
<li> The public identifier starts with: "<code title="">-//O'Reilly and
Associates//DTD HTML Extended Relaxed 1.0//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//IETF//DTD
HTML//EN//3.0</code>"

<li> The public identifier is set to: "<code title="">-//Metrius//DTD
Metrius Presentational//EN</code>"

<li> The public identifier is set to: "<code title="">-//Microsoft//DTD
Internet Explorer 2.0 HTML Strict//EN</code>"

<li> The public identifier is set to: "<code title="">-//Microsoft//DTD
Internet Explorer 2.0 HTML//EN</code>"

<li> The public identifier is set to: "<code title="">-//Microsoft//DTD
Internet Explorer 2.0 Tables//EN</code>"

<li> The public identifier is set to: "<code title="">-//Microsoft//DTD
Internet Explorer 3.0 HTML Strict//EN</code>"

<li> The public identifier is set to: "<code title="">-//Microsoft//DTD
Internet Explorer 3.0 HTML//EN</code>"

<li> The public identifier is set to: "<code title="">-//Microsoft//DTD
Internet Explorer 3.0 Tables//EN</code>"

<li> The public identifier is set to: "<code title="">-//Netscape Comm.
Corp.//DTD HTML//EN</code>"

<li> The public identifier is set to: "<code title="">-//Netscape Comm.
Corp.//DTD Strict HTML//EN</code>"

<li> The public identifier is set to: "<code title="">-//O'Reilly and
Associates//DTD HTML 2.0//EN</code>"

<li> The public identifier is set to: "<code title="">-//O'Reilly and
Associates//DTD HTML Extended 1.0//EN</code>"

<li> The public identifier is set to: "<code title="">-//O'Reilly and
Associates//DTD HTML Extended Relaxed 1.0//EN</code>"

<li> The public identifier is set to: "<code title="">-//SoftQuad
<li> The public identifier starts with: "<code title="">-//SoftQuad
Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML
4.0//EN</code>"
4.0//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//SoftQuad//DTD
HoTMetaL PRO 4.0::19971010::extensions to HTML 4.0//EN</code>"
<li> The public identifier starts with: "<code title="">-//SoftQuad//DTD
HoTMetaL PRO 4.0::19971010::extensions to HTML 4.0//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//Spyglass//DTD
HTML 2.0 Extended//EN</code>"
<li> The public identifier starts with: "<code title="">-//Spyglass//DTD
HTML 2.0 Extended//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//SQ//DTD HTML
2.0 HoTMetaL + extensions//EN</code>"
<li> The public identifier starts with: "<code title="">-//SQ//DTD HTML
2.0 HoTMetaL + extensions//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//Sun
Microsystems Corp.//DTD HotJava HTML//EN</code>"
<li> The public identifier starts with: "<code title="">-//Sun
Microsystems Corp.//DTD HotJava HTML//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//Sun
Microsystems Corp.//DTD HotJava Strict HTML//EN</code>"
<li> The public identifier starts with: "<code title="">-//Sun
Microsystems Corp.//DTD HotJava Strict HTML//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//W3C//DTD HTML 3
1995-03-24//EN</code>"
<li> The public identifier starts with: "<code title="">-//W3C//DTD HTML
3 1995-03-24//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//W3C//DTD HTML
3.2 Draft//EN</code>"
<li> The public identifier starts with: "<code title="">-//W3C//DTD HTML
3.2 Draft//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//W3C//DTD HTML
3.2 Final//EN</code>"
<li> The public identifier starts with: "<code title="">-//W3C//DTD HTML
3.2 Final//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//W3C//DTD HTML
3.2//EN</code>"
<li> The public identifier starts with: "<code title="">-//W3C//DTD HTML
3.2//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//W3C//DTD HTML
3.2S Draft//EN</code>"
<li> The public identifier starts with: "<code title="">-//W3C//DTD HTML
3.2S Draft//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//W3C//DTD HTML
4.0 Frameset//EN</code>"
<li> The public identifier starts with: "<code title="">-//W3C//DTD HTML
4.0 Frameset//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//W3C//DTD HTML
4.0 Transitional//EN</code>"
<li> The public identifier starts with: "<code title="">-//W3C//DTD HTML
4.0 Transitional//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//W3C//DTD HTML
Experimental 19960712//EN</code>"
<li> The public identifier starts with: "<code title="">-//W3C//DTD HTML
Experimental 19960712//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//W3C//DTD HTML
Experimental 970421//EN</code>"
<li> The public identifier starts with: "<code title="">-//W3C//DTD HTML
Experimental 970421//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//W3C//DTD W3
HTML//EN</code>"
<li> The public identifier starts with: "<code title="">-//W3C//DTD W3
HTML//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//W3O//DTD W3
HTML 3.0//EN</code>"

<li> The public identifier is set to: "<code title="">-//W3O//DTD W3
HTML 3.0//EN//</code>"
<li> The public identifier starts with: "<code title="">-//W3O//DTD W3
HTML 3.0//<!--EN--></code>"</li>
<!--<li> The public identifier is set to: "<code title="">-//W3O//DTD W3 HTML 3.0//EN//</code>" </li>-->

<li> The public identifier is set to: "<code title="">-//W3O//DTD W3
HTML Strict 3.0//EN//</code>"

<li> The public identifier is set to: "<code title="">-//WebTechs//DTD
Mozilla HTML 2.0//EN</code>"
<li> The public identifier starts with: "<code title="">-//WebTechs//DTD
Mozilla HTML 2.0//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//WebTechs//DTD
Mozilla HTML//EN</code>"
<li> The public identifier starts with: "<code title="">-//WebTechs//DTD
Mozilla HTML//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-/W3C/DTD HTML 4.0
Transitional/EN</code>"
Expand All @@ -45256,29 +45234,33 @@ function receiver(e) {
title="">http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd</code>"


<li> The system identifier is missing and the public identifier is set
to: "<code title="">-//W3C//DTD HTML 4.01 Frameset//EN</code>"
<li> The system identifier is missing and the public identifier starts
with: "<code title="">-//W3C//DTD HTML 4.01 Frameset//<!--EN--></code>"


<li> The system identifier is missing and the public identifier is set
to: "<code title="">-//W3C//DTD HTML 4.01 Transitional//EN</code>"
<li> The system identifier is missing and the public identifier starts
with: "<code title="">-//W3C//DTD HTML 4.01
Transitional//<!--EN--></code>"
</ul>

<p>Otherwise, if the DOCTYPE token matches one of the conditions in the
following list, then set the document to <a href="#limited">limited
quirks mode</a>:</p>

<ul class=brief>
<li> The public identifier is set to: "<code title="">-//W3C//DTD XHTML
1.0 Frameset//EN</code>"
<li> The public identifier starts with: "<code title="">-//W3C//DTD
XHTML 1.0 Frameset//<!--EN--></code>"

<li> The public identifier is set to: "<code title="">-//W3C//DTD XHTML
1.0 Transitional//EN</code>"
<li> The public identifier starts with: "<code title="">-//W3C//DTD
XHTML 1.0 Transitional//<!--EN--></code>"

<li> The system identifier is not missing and the public identifier is
set to: "<code title="">-//W3C//DTD HTML 4.01 Frameset//EN</code>"
<li> The system identifier is not missing and the public identifier
starts with: "<code title="">-//W3C//DTD HTML 4.01
Frameset//<!--EN--></code>"

<li> The system identifier is not missing and the public identifier is
set to: "<code title="">-//W3C//DTD HTML 4.01 Transitional//EN</code>"
<li> The system identifier is not missing and the public identifier
starts with: "<code title="">-//W3C//DTD HTML 4.01
Transitional//<!--EN--></code>"
</ul>

<p>The name, system identifier, and public identifier strings must be
Expand Down
Loading

0 comments on commit 9345b20

Please sign in to comment.