W3C home > Mailing lists > Public > public-html@w3.org > February 2010

Re: Updated DOCTYPE versioning change proposal (ISSUE-4)

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Wed, 17 Feb 2010 16:57:30 +0100
To: Philip Taylor <pjt47@cam.ac.uk>
Cc: Henri Sivonen <hsivonen@iki.fi>, "public-html@w3.org" <public-html@w3.org>
Message-ID: <20100217165730186094.e3bc025e@xn--mlform-iua.no>
Philip Taylor, Wed, 17 Feb 2010 14:56:58 +0000:
> Leif Halvard Silli wrote:

>> 
http://hsivonen.iki.fi/doctype/test-quirks.php?doctype=<!DOCTYPE+HTML+PUBLIC+"-%2F%2FW3C%2F%2FDTD+HTML+3.2+Final%2F%2FFR">
>> 
>> My belief is shared: 
>> http://www.w3.org/mid/685C7306-C689-4A04-8987-05670EF3B053@apple.com

> 
> Maciej said "If a doctype is present, then it the document is in 
> strict mode unless it is one of the doctypes that specifically 
> triggers quirks mode". This one is in the list ("The public 
> identifier starts with: "-//W3C//DTD HTML 3.2 Final//""), so it 
> specifically triggers quirks mode.

I of course see that it is in line with what Maciej said that that 
specific doctype triggers quirksmode, since it is on that list.

But my implied question was: Why has it been placed on that list? Henri 
gave me the impression that the above doctype variant has not triggered 
quirks mode until it was specified to do so, in HTML5.
 
> The exception Maciej didn't mention is that if the doctype is 
> syntactically invalid in certain ways, then it will trigger quirks 
> mode without looking in the list. Unexpected characters (like "[") 
> *before* the system identifier trigger it; unexpected characters 
> *after* the system identifier don't, which means pages like 
> http://www.marlowe.co.uk/epages/Store2_Shop1549.sf will still be 
> non-quirks. I see the latter case on around a dozen pages (out of 
> half a million), and see the former case only on 
> http://symptomresearch.nih.gov/preface/index.htm which actually looks 
> *better* in quirks mode.

OK, I can confirm that in Opera 10.5beta, then - if I add the 
URL/system identifier, then the page is in QuirksMode:

http://www.målform.no/html4-or-html5/take2


Btw, until now, I had not tested Minefield myself, I only trusted 
Lachlan. But now that I have tested it, I must say that he was wrong: 
That page does not trigger quirksmode.

So, this is an attempt to create order out of chaos. Is that why the 
HTML3.2 doctype causes quirksmode too? Because there is no system 
identifier? Order instead of reality?

>> What is the purpose of starting to treat that DOCTYPE as a quirks 
>> mode trigger?
> 
> Browsers treat many doctypes differently, so HTML5 will inevitably 
> start treating some of them differently to some existing browsers.

In my test case, HTML5 seems to treat things differently from every 
browser.
 
> IE uses rules similar to http://philip.html5.org/docs/quirks.txt, so 
> anything containing the string " HTML 3" (and not containing some 
> other magic strings) will be quirks mode. HTML5 is much closer to 
> what other browsers do, but modified based on data (large-scale 
> surveys, bug reports, etc) to attempt to maximise the number of 
> legacy pages that render as the author expected. The way to change 
> the list is to provide data showing that compatibility would be 
> improved by the change.

So what do you think about the documenation I have provided:

[1] http://www.målform.no/html4-or-html5/

[2] http://www.målform.no/html4-or-html5/take2

[3] http://www.målform.no/html4-or-html5/take2_workaround

[4] http://www.målform.no/html4-or-html5/workaround


None of these pages triggers quirks mode in IE - although, that is 
perhaps not 100% true: If you go to page [3] or [4] and click on the 
link to page [1] or [2], then IE seems to land in a "inbetween mode". 
If you thereafter reload the page ([1] or [2]), then it lands in 
perfect strict mode - and displays all margins. This is an issue 
related to parsing of the "]>" - and IE reacts positively to the steps 
I took to hide the "]>" in test [3] and [4]. Pasting the URL and 
loading the page that way does not have this effect. But at any rate: 
This has nothing to do with the system identifier.

Only Safari 4 of released browsers lands in QuirksMode on all those 
pages. Then Opera 10.5beta also does the same. But Minefiled (for Mac 
at least) does not land in Quirksmode on any of those pages.

So I think there must be some update to what triggers Quirks.
-- 
leif halvard silli
Received on Wednesday, 17 February 2010 15:58:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:14 UTC