Re: Parent Combinator / Parent pseudo-class

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 UTC