Version 1.6 and XPath in Safari/WebKit 3

2 views
Skip to first unread message

Mazdak Rezvani

unread,
Nov 27, 2007, 9:30:32 AM11/27/07
to Prototype: Core
Hi All

The SVN commit messages for Prototype 1.6 says that XPath is disabled
in Safari 3 (Webkit 3) because of some problem. I wonder if you can
be more specific about what's broken with the WebKit 3 XPath? Also,
has anyone checked to see if the release version still has this
problem?

Thank you

Andrew Dupont

unread,
Nov 27, 2007, 11:11:00 AM11/27/07
to Prototype: Core
The Selector class translates to XPath in browsers that support it.
Some of the Selector unit tests failed in Safari 3 -- seemingly because
WebKit doesn't correctly implement some XPath functions. If I recall,
the failures are related to the ":first-of-type/:first-child"
pseudoclasses (and their brethren).

Considering the JS engine performance gains that were made in Safari
3, I decided to disable the XPath translation in that browser for 1.6.
(The "slow lane" in Safari 3 is still pretty damned fast.) One of my
tasks for the 1.6.0.1 release is to re-enable the XPath approach for
Safari 3, circumventing it only when necessary.

I've glossed over some implementation details of the Selector class,
so let me know if this doesn't make sense.

Cheers,
Andrew

Mazdak Rezvani

unread,
Nov 30, 2007, 5:02:14 PM11/30/07
to Prototype: Core
That's great Andrew.

Thank you
Reply all
Reply to author
Forward
0 new messages