Calling document.evaluate with "id('foo')" doesn't return an element, even when there's an HTML element with ID "foo" in the page.
To repro, open the attached xpathbug.html in WebKit nightly, Firefox 2.0, and Opera 9.2.
In Firefox and Opera, the test passes as the xpath resolves correctly; in WebKit (and Safari 3 Public Beta) the test fails as document.evaluate returns null.
Created attachment 16552 [details]
And I thought I fixed this in bug 12485 :-/
To work around this problem, append a space to the parameter: "id('nested1 ')" works fine to find an element with id "nested1".
> And I thought I fixed this in bug 12485 :-/
That was a completely different bug with similar symptoms.
Created attachment 16565 [details]
Comment on attachment 16565 [details]
Committed revision 26081 (feature branch).
This isn't yet fixed in the official webkit nightly builds (r26359), but I think that's expected, since the change is currently only in the feature-branch...? How/when would we expect to see this in the nightly build? [I won't even ask about when we'd expect to see this fixed in Safari ... ;-)]
There are nightly builds of the feature branch - the link is hidden at the bottom of <http://nightly.webkit.org/>.
Also, as it was recently announced on the developer list, the feature branch will soon move to trunk.
This is fixed in WebKit trunk r26595.
Is this bug likely to get fixed in Safari 3? Seed 310A15 is from September 26 and has this bug (which I filed on 10/5).
(In reply to comment #9)
> Is this bug likely to get fixed in Safari 3?
Apple doesn't comment on future products, and we outside Apple do not have any information about their plans.