W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: Parent Combinator / Parent pseudo-class

From: Brad Kemper <brkemper@comcast.net>
Date: Wed, 23 Jul 2008 10:12:31 -0700
Cc: www-style list <www-style@w3.org>
Message-Id: <AD384E46-F46C-4855-96B6-6F0821EBDEA6@comcast.net>
To: Boris Zbarsky <bzbarsky@MIT.EDU>


On Jul 23, 2008, at 9:57 AM, Boris Zbarsky wrote:

> Brad Kemper wrote:
>> That's the same situation as with adjacent sibling combinators,  
>> isn't it? If you mutate the previous sibling, then you have to do  
>> style reresolution on a separate branch of the DOM tree.
>
> Yep.  In fact, in Gecko if you mutate a node there are adjacent  
> sibling selectors floating about we reresolve style on that node,  
> all its descendants, and all descendants of all following siblings.
>
> And it's slow, if you ever try it...  But faster than reresolving  
> everything in the document.

In fact, I do have an example of that, and it does not seem slow at  
all (except for some late-occurrence image loading in the second  
example):

http://bradclicks.com/cssplay/tabs.html

It works well in FireFox 3, but WebKit seems to not even bother with  
reresolving the style on the nodes.


P.S. The second example could have been done better if "inner shadow"  
was available, but that is a separate discussion.
Received on Wednesday, 23 July 2008 17:13:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:10 GMT