stylesheet loading

Dirk Mueller mueller at kde.org
Tue Jun 3 12:40:20 CEST 2003


Hi, 

while trying to fix some of the stylesheet loading regressions that occurred 
after the FOUC merge, I wondered about this diff chunk in 
html/html_headimpl.cpp :

-    if(type.contains("text/css") || rel.contains("stylesheet")) {
+    // This was buggy and would incorrectly match <link rel="alternate">, 
     // which has a different specified meaning. -dwh
+    if(m_disabledState != 2 && (type.contains("text/css") || rel == 
     "stylesheet" || (rel.contains("alternate") && rel.contains("stylesheet")))) 


I can't see how the previous code was able to match <link rel="alternate">. 

My Bloatzilla (1.2.1) behaves like Konqueror previously did, i.e.

<link rel="stupid stylesheet">

will get loaded. 

Can you please enlighten me what you were trying to fix?

Also, this m_disabledState handling seems quite broken to me. it stores a 
"modifiedbyJScript" state which is nowhere used.. Anyway, disabling is just 
a boolean and you cannot make a triple state from this information alone. 
I'm going to remove this code again as it breaks dynamic disabling of 
stylesheets. 


-- 
Dirk


More information about the Khtml-devel mailing list