parsing modes
David Hyatt
hyatt at apple.com
Fri Apr 18 11:51:57 CEST 2003
On Friday, April 18, 2003, at 07:33 AM, Dirk Mueller wrote:
> Hi,
>
> I'm quite confused about the transition of the meanings of the
> different
> parsing modes. It seems to me that you renamed Transitional to
> "AlmostStrict", and made CSS parsing strict but still enabled compat
> rendering for transitional documents. Is this correct? Why?
>
The doctype switching should exactly match Mozilla. The code is
essentially lifted directly
from Mozilla. If it doesn't, that would be a bug (or I made a mistake
when porting). Note that
transitional documents are not being mapped straight to AlmostStrict.
Check out the gperf table to
see which modes are being picked for various transitional doctypes.
> + bool inQuirksMode() { return pMode == Compat; }
>
> this one makes me crazy :) (besides the missing const).. I absolutely
> hate
> that expression "Quirk mode" and the parsemode is still named Compat,
> so IMHO it should be
>
> bool inCompatMode() const { return pMode == Compat; }
>
> though I don't see the reason for wrapping these simple enum
> comparisons in
> an accessor.. anyway.
>
I can rename it to inCompatMode, That's fine. Actually a lot of
places where I went out of my way to call this method, I could have
just used style()->htmlHacks(), so I'm planning to switch a lot of the
callers over on the rendering side to use that instead.
dave
More information about the Khtml-devel
mailing list