- From: Francois Remy <fremycompany_pub@yahoo.fr>
- Date: Wed, 23 Jul 2008 23:24:32 +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>
- Message-ID: <F4717E9E98984A6B8DBDDC915A271834@FremyCompany1>
Sorry, I missed the attachment. Note : it only works with browsers that supports querySelector and querySelectorAll. I know IE8 support it and I think Webkit support it too in new release, but I'm not sure. http://www.w3.org/TR/selectors-api/#documentselector Fremy -------------------------------------------------- From: "Francois Remy" <fremycompany_pub@yahoo.fr> Sent: Wednesday, July 23, 2008 11:11 PM 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> Subject: Re: Parent Combinator / Parent pseudo-class > 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. >
Attachments
- text/html attachment: index.html
Received on Wednesday, 23 July 2008 21:25:11 UTC