Summary: | XPathEvaluator behavior does not match Firefox - name() and attribute nodes | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jesse Costello-Good <jesse> | ||||||
Component: | XML | Assignee: | Alexey Proskuryakov <ap> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | ||||||||
Priority: | P2 | ||||||||
Version: | 420+ | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.4 | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 10489 | ||||||||
Attachments: |
|
Description
Jesse Costello-Good
2007-01-19 22:31:19 PST
Created attachment 12715 [details]
proposed fix
Created attachment 12723 [details]
proposed fix
Changed the wording of comments in the test a bit - the way name() works with a document that didn't have namespace normalization applied to it may be actually correct (at least, I couldn't find any indication that XPathEvaluator is supposed to normalize the document itself).
Comment on attachment 12723 [details]
proposed fix
r=me
Should that be prefix.isEmpty() instead of prefix.isNull()? Is it possible to construct a test that would behave differently depending on which you used?
In general, I recommend taking advantage of the null value as distinct from empty only when it's necessary, so if either would work the same I'd prefer isEmpty.
Committed revision 19226. (In reply to comment #3) > Should that be prefix.isEmpty() instead of prefix.isNull()? Is it possible to > construct a test that would behave differently depending on which you used? I don't know how to make such a test; changed to isEmpty(). |