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 09:51:07 -0700
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Message-Id: <6F7DC6B4-C656-4DAE-98C9-C3EA1BEC384E@comcast.net>
To: Boris Zbarsky <bzbarsky@MIT.EDU>


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

> Tab Atkins Jr. wrote:
>> Stephen's original suggestion may require that, yes (though I doubt  
>> it in an intelligent implementation).  But the :matches pseudoclass  
>> does *not* require this at all.  You would hold a reference to the  
>> main element and then walk down in the ordinary matching pattern.
>
> This is talking about the easy problem: matching the selector to  
> nodes.  That part is indeed.... easy.
>
> The hard problem is deciding which parts of the DOM tree need to  
> have style reresolution done when a DOM mutation happens.

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. I would think it  
would be easier with a "has-child" pseudo-class, as it s dealing with  
elements in the same branch.
Received on Wednesday, 23 July 2008 16:51:55 GMT

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