stylesheet loading

Dirk Mueller mueller at kde.org
Thu Jun 5 01:46:06 CEST 2003


On Die, 03 Jun 2003, David Hyatt wrote:

> The state is very much used in order to properly increment and 
> decrement the pending sheet count when stylesheets get enabled/disabled 
> dynamically prior to the page having finished loading (or even the 
> stylesheets having finished loading).  See parseAttribute (the 
> ATTR_DISABLED code).

Sure, but a boolean is enough for that. The part I didn't get is the 3rd 
state "isEnabledViaScript". You can't really check if its enabled by 
JavaScript this way, and it shouldn't matter in any case. 

I think you were trying to work around the problem that changes in the link 
sheets have to recalculate the chain which determines which titled 
stylesheet to render by default. I don't see any other use for this code, 
but maybe I'm wrong. 

> Can you give me an example of a site that's broken? 

Any site that provides alternative stylesheets and the user has actually 
selected them. Furthermore dynamic updates were broken, see testcase at

http://khtml.homeip.net/DOMlink.html

See the bit lengthy patch I just committed. It is itself not yet optimal as 
it causes more style selector recalculations than necessary, but thats not 
unintrusive to fix. 


-- 
Dirk


More information about the Khtml-devel mailing list