- From: Francois Remy <fremycompany_pub@yahoo.fr>
- Date: Wed, 23 Jul 2008 23:11:55 +0200
- To: "Brad Kemper" <brkemper@comcast.net>, "Boris Zbarsky" <bzbarsky@MIT.EDU>
- Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style list" <www-style@w3.org>
JScript / ECMAScript is very slow in comparaison of C++ or some other native 
language.
But I've done the test-case, any way. But it's only to give an idea of that.
------------------------
Here's a first try to make pseudo-code about it.
    before-selector el-selector.with-child(child-selector) after-selector {
        color: green;
    }
------------------------
The way an element may be found as matching the rule is explained in a 
previous mail.
As you've got the possiblity to see, it's not much longer than a normal 
request
-------------------------
But, when must we reevaluate the property ?
- When any element that's a step of the before-selector change
- When the element matched by "el-selector" changes
- When any element that's a step of the first match returned by 
"child-selector" change
- When any element that's a step of the after-selector change
So, what's different with a nomal request such as "before-selector 
el-selector after-selector" ?
>>> The only thing that's different in rule revalidation is that any element 
>>> that's a css parent of the first element matched by "child-selector" 
>>> must also be hooked.
So, we only get a few more "rule revalidation sources"...
------------------------
In fact, I don't think it's much complex to implement for a respectable 
UA....
------------------------
Fremy
--------------------------------------------------
From: "Brad Kemper" <brkemper@comcast.net>
Sent: Wednesday, July 23, 2008 6:43 PM
To: "Boris Zbarsky" <bzbarsky@MIT.EDU>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>; "www-style list" 
<www-style@w3.org>
Subject: Re: Parent Combinator / Parent pseudo-class
>
>
> On Jul 23, 2008, at 9:21 AM, Boris Zbarsky wrote:
>
>>> The use-cases have already been noted, and are relatively significant
>>
>> I don't think anyone is debating it.  What UA implementors are  saying is 
>> that they haven't thought of a good way to implement it  yet without 
>> crippling performance of DOM mutation, and they aren't  willing to 
>> cripple that.
>>
>> -Boris
>
> Can you post a test case, using JavaScript to simulate this, to show  how 
> slow? Where one element with a child is thus selected? Computers  are 
> pretty fast these days, and I have doubts about how crippling slow  it 
> would be if used sparingly at the author's discretion. 
Received on Wednesday, 23 July 2008 21:12:38 UTC