Summary: | document.evaluate and createNSResolver miss on namespaced elements | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Paul Everitt <paul> | ||||||
Component: | DOM | Assignee: | Anders Carlsson <andersca> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Minor | CC: | cdumez | ||||||
Priority: | P2 | Keywords: | HasReduction | ||||||
Version: | 420+ | ||||||||
Hardware: | Mac (PowerPC) | ||||||||
OS: | OS X 10.4 | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 10489, 7788 | ||||||||
Attachments: |
|
Description
Paul Everitt
2006-05-22 02:23:28 PDT
Created attachment 8457 [details]
createNSResolver test case
A test case with HTML and JS that works in Firefox but fails in the WebKit nightly from May 20 2006.
Created attachment 8680 [details]
Patch
Comment on attachment 8680 [details]
Patch
-Step::Step(AxisType axis, const String& nodeTest, const Vector<Predicate*>& predicates)
+Step::Step(AxisType axis, const String& nodeTest, const Vector<Predicate*> &predicates)
The above is not a good change.
+ Parser *parser = Parser::current();
We put the * next to the type.
+ if (!parser->m_currentNamespaceURI.isNull()) {
+ m_namespaceURI = parser->m_currentNamespaceURI;
+ parser->m_currentNamespaceURI = String();
+ }
Why the if here? Seems that check should be omitted.
+ $$ = new String($1->deprecatedString().mid(colon + 1));
This could use String::substring and then you would not need to bother with the conversion to/from DeprecatedString.
r=me
I got an idea: - if (m_nodeSetPosition + 1 >= m_nodeSet.size()) + if (m_nodeSetPosition + 1 > m_nodeSet.size()) This could also be fixed by removing the +1 and keeping the =. I just tried the test case in the most recent nightly and it now passes. Thanks Anders! Mass moving XML DOM bugs to the "DOM" Component. |