parsing modes

Dirk Mueller mueller at kde.org
Fri Apr 18 17:33:38 CEST 2003


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?

I'm pretty sure that Transitional documents expect the usual CSS quirks 
(those which are accepted by IE as well). I remember I tested this case in 
Mozilla as well. Has Mozilla shifted its behaviour?

Furthermore, small nitpick: 

     enum ParseMode {
-        Unknown,
         Compat,
-        Transitional,
+        AlmostStrict,
         Strict
     };
     virtual void determineParseMode( const QString &str );
     void setParseMode( ParseMode m ) { pMode = m; }
     ParseMode parseMode() const { return pMode; }
 
+    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. 


-- 
Dirk


More information about the Khtml-devel mailing list