layers and zindex in Safari

Lars Knoll lars at trolltech.com
Sun Aug 31 00:37:30 CEST 2003


On Friday 29 August 2003 23:16, David Hyatt wrote:
> On Saturday, August 30, 2003, at 2:12 PM, Lars Knoll wrote:
> > On Friday 29 August 2003 21:46, David Hyatt wrote:
> >> I looked at these changes.  I really like them.  The idea of having
> >> the
> >> layers hold onto their own sorted lists is a great simplification.
> >
> > Thanks. Actually it's more correct now than your old code, since the
> > old code
> > didn't sonour document order when flattening and reordering the
> > elements.
>
> The old code should have honored document order.  Do you have a test
> case that shows where it would not?

At least in the latest released webcore it doesn't. Have a look at the 
sortByZOrder function in your render_layer.cpp. It sort the tree by z-index 
ussing bubble and merge sort. These do not preserve order in case the z-index 
is the same. That's why I added the idx member to the PositionedLayer struct.

You can find some examples that are rendered wrongly on 
http://dbaron.org/css/test/sec0909. The test case is not completely valid 
(test case number 8 is invalid). But using your code test cases 4
and 5 (which I verified to be correct) fail.

Cheers,
Lars


More information about the Khtml-devel mailing list