As of last week Webkit passes the CSS Selector Test joining Konqueror and Opera as the third browser to provide a stable and complete CSS selector implementation. You can download a nightly build for yourself to try it out. Congratulations to the Webkit team at Apple!
You can skip to the end and leave a response.
Isn’t it just “congratulations to the WebKit team” rather than “at Apple”? As I understand it, a lot of this work comes from the KHTML team moving back into the project. Apologies if this is not the case.
The main question is if WebKit and KHTML pass all the selectors bug cases here. Konqueror was the first browser to pass the Selectors test here, but when Opera passed it we still had many open selectors bugs in our bug tracking system, and one unsupported selector – ::selection. Opera has fixed these bugs and supports selection, and passes all the tests on Quirksmode. I believe Opera is the first browser to implement all selectors correctly, including updating the selection on the fly when elements are added via the DOM. It may be that Konq also handles everything correctly as I can’t test, and Quirksmode only shows the results from officially released browser versions.
It is cool that WebKit has added the nth-* selectors as I use them quite a lot in demos as they are very useful.
I agree that passing the CSS selector test isn’t a guarantee that the implementation is bug free. The test does not include all selectors and does not test for all possible bugs. For example ::selection isn’t part of this test because of difficulties with automated testing. The same applies to :hover.
With these limitation Konqueror was the first to pass the test. Opera the second. Perhaps Opera has more complete support and has less bugs than Konqueror… but that is not within the scope of this test.
That being said, the test is a great indication of how much attention is spend on implementing this feature and that there is at least a common baseline between browsers.
Btw, the selector test does include some tests for updating the selection when the DOM is dynamicly updated.
David, after digging into the page you mentioned I can confirm Webkit still fails the test: http://www.quirksmode.org/css/firstline.html (http://bugs.webkit.org/show_bug.cgi?id=15602). However other tests marked on that page as problematic in Safari are already fixed (checked in Webkit r30153).