Bug 6216 - REGRESSION: getElementsByTagNameNS with empty namespace doesn't work
Summary: REGRESSION: getElementsByTagNameNS with empty namespace doesn't work
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2005-12-23 05:39 PST by Alexey Proskuryakov
Modified: 2019-02-06 09:03 PST (History)
2 users (show)

See Also:


Attachments
test case (1.27 KB, text/html)
2005-12-23 05:40 PST, Alexey Proskuryakov
no flags Details
patch with change log and layout test (7.51 KB, patch)
2007-04-27 22:22 PDT, Darin Adler
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2005-12-23 05:39:55 PST
See attached test case (which also demonstrates bug 5262).
Comment 1 Alexey Proskuryakov 2005-12-23 05:40:19 PST
Created attachment 5248 [details]
test case
Comment 2 Alexey Proskuryakov 2005-12-23 14:13:25 PST
> (which also demonstrates bug 5262).
Hmm, maybe not.
Comment 3 Alexey Proskuryakov 2007-04-21 03:04:14 PDT
Weird: with 10.4.9 WebKit, this test fully passes. With r20675, neither null not empty namespace works. Revision 20997 (bug 5262) fixes the null case.

Not sure what changed since December 2005 in shipping WebKit, but now this looks like a regression.

Reassigning to webkit-unassigned for for more visibility.
Comment 4 Darin Adler 2007-04-25 09:40:41 PDT
<rdar://problem/5159417>
Comment 5 Darin Adler 2007-04-27 22:22:40 PDT
Created attachment 14239 [details]
patch with change log and layout test
Comment 6 Darin Adler 2007-04-28 01:32:44 PDT
Sending        LayoutTests/ChangeLog
Adding         LayoutTests/fast/dom/namespaces-1-expected.txt
Adding         LayoutTests/fast/dom/namespaces-1.html
Sending        WebCore/ChangeLog
Sending        WebCore/dom/Node.cpp
Transmitting file data .....
Committed revision 21167.
Comment 7 David Kilzer (:ddkilzer) 2007-04-28 06:52:37 PDT
Comment on attachment 14239 [details]
patch with change log and layout test

>-    return new TagNodeList(this, AtomicString(namespaceURI), AtomicString(name));
>+    return new TagNodeList(this, namespaceURI.isEmpty() ? nullAtom : AtomicString(namespaceURI), name);

Is there a reason why the "name" parameter isn't "AtomicString(name)" anymore?
Comment 8 Darin Adler 2007-04-28 20:52:15 PDT
(In reply to comment #7)
> (From update of attachment 14239 [details] [edit])
> >-    return new TagNodeList(this, AtomicString(namespaceURI), AtomicString(name));
> >+    return new TagNodeList(this, namespaceURI.isEmpty() ? nullAtom : AtomicString(namespaceURI), name);
> 
> Is there a reason why the "name" parameter isn't "AtomicString(name)" anymore?

C++ will convert a String parameter automatically to an AtomicString; the explicit conversion syntax is not necessary. The reason I still need it in the other case is that the two side of a ?: expression have to have the same type.
Comment 9 Lucas Forschler 2019-02-06 09:03:44 PST
Mass moving XML DOM bugs to the "DOM" Component.