[Bug 11360] Document.compatMode semantics not specified

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11360

--- Comment #2 from Glenn Adams <glenn@skynav.com> 2010-11-20 18:07:37 UTC ---
(In reply to comment #1)
> (In reply to comment #0)
> > In Section 3.1.3, Document.compatMode is specified to evaluate to "CSS1Compat"
> > or "BackCompat", which are said to correspond to "no-quirks mode" and "quirks
> > mode", respectively. However, the semantics (meaning) of these two values/modes
> > is nowhere defined in the specification. Therefore, there is no utility to this
> > attribute and it should be removed; alternatively, the semantics of these two
> > modes needs to be fully spelled out.
> > 
> > Further, the prose refers to a "limited-quirks mode", but does not define
> > either a corresponding string value or a meaning of this mode.
> 
> Document.compatMode returns CSS1Compat in this mode, as the specification says.
> 
> The meaning of the modes is defined by references to them throughout HTML5 and
> other specifications (i.e., when behavior should differ depending on the mode).
>  (New differences based on mode are no longer being introduced; they're
> recognized as a mistake.  However, there are a number of existing ones that are
> interoperable enough to be required to render Web content.)
> 
> > Finally, it is stated that "The mode is only ever changed from the default by
> > the HTML parser, based on the presence, absence, or value of the DOCTYPE
> > string." However, there is no indication of how the presence, absence, or value
> > of the DOCTYPE string corresponds to these three modes, nor when the HTML
> > parser would mutate the value of compatMode. [It is also curious how DOCTYPE
> > could be related to CSS1 compatibility.]
> 
> http://www.w3.org/TR/html5/tokenization.html#the-initial-insertion-mode defines
> this.

Hi David,

Ah, ok, I had missed that last part (8.2.5.4); however, there still seems some
ambiguity in the definition of compatMode, since three modes are referenced by
3.1.3 and 8.2.5.4, but only two values of compatMode are specified:

Mode                                   Document.compatMode

non-quirks mode             CSS1Compat
quirks mode                      BackCompat
limited-quirks mode       CSS1Compat

The reason I write CSS1Compat for non-quirks mode, is because the prose of
3.1.3 says:

"The compatMode IDL attribute must return the literal string "CSS1Compat"
unless the document has been set to quirks mode by the HTML parser, in which
case it must instead return the literal string "BackCompat"."

That doesn't seem correct, as one cannot distinguish between non-quirks and
limited-quirks modes.

Regards,
Glenn

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Saturday, 20 November 2010 18:07:39 UTC