In XPath 1.0, the context position of a node in a node-set for a reverse axis is defined by reverse document order . But WebKit uses document order for ancestor, ancestor-or-self, and preceding axes and arbitrary order for preceding axis. Think the following code:
document.getElementById('li3'), null, 8, null)
WebKit alerts "li1" while Gecko and Opera alerts "li2". This is revealed by amachang's XPath test (see the URL field).
Created attachment 16597 [details]
test case (for fast/xpath)
Created attachment 16598 [details]
Comment on attachment 16598 [details]
Committed revision 26174 (feature branch).
It would be nice to include the whole test in our regression suite. I tried to find the author and sent an e-mail asking for permission, but I could have got it wrong...