RenderLayer code

Lars Knoll lars@trolltech.com
Wed, 29 Jan 2003 19:36:07 +0100


Hi,

I've now finally managed to integrate Safaris layering code into our khtml. I 
did however notice some problems:

Around line 358 of render_layer.cpp:
    // If a layer isn't visible, then none of its child layers are visible 
either.
    // Don't build this branch of the z-tree, since these layers should not be 
painted.
     if (renderer()->style()->visibility() != VISIBLE)
         return 0;

I think this is wrong. It would be a nice optimisation, but unfortunately, 
visibilty can be set to visible again for child elements of the layer 
(according to the CSS specs).

Painting of layers with the same z-index doesn't always honour document order. 
See for example the fourth test of http://dbaron.org/css/test/sec0909.

z-index != auto doesn't seem to correctly create it's own layering context, 
see a bit further down in the above test case.

www.sport1.de is now broken and doesn't show anything in the scrollable news 
area anymore. Not sure if this is related to z-index problems.

Does this work with safari and did anyone already look into this?

Thanks,
Lars