Re: Proposal: parent selectors

On 1/22/10 7:58 AM, Mikko Rantalainen wrote:
>    #2: div.message p span.nick
> (3) After any DOM mutation, check if #2 matches (this should be fast
> because the UA should already have a high performance implementation
> today)

That implementation is not nearly high-performance enough to do such 
matching on _any_ DOM mutation.  Gecko does this sort of thing right now 
for "many" DOM mutations, and it's being a serious performance problem 
and we're working on not doing it anymore.

> and if #2 matches, then (4) follow the link to #1 and test all
> elements matched by #1.

Which means keeping track of said elements somewhere, right?

> I'm aware that part (4) is not easy either because CSS is usually
> targeted to problem "does *this element* match any rules" instead of
> "what elements does *this rules* match"? Perhaps #1 needs to link to
> list of elements that has been previously matched by #1? Is that enough?

Depends on what you mean by "enough"...

-Boris

Received on Friday, 22 January 2010 16:32:09 UTC