Closed
Bug 181791
Opened 23 years ago
Closed 23 years ago
[FIX]getElementsByTagNameNS(null, <whatever>) does not work
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla1.3alpha
People
(Reporter: cesarb, Assigned: bzbarsky)
Details
Attachments
(2 files, 1 obsolete file)
|
547 bytes,
text/xml
|
Details | |
|
2.05 KB,
patch
|
sicking
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021123
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021123
When you have a element with a null namespace, getElementsByTagNameNS(null,
tagname) should find it. This is not working. The workaround of
getElementsByTagName(tagname) works.
Reproducible: Always
Steps to Reproduce:
1.Open testcase
2.Click the button
It will show how many elements were found.
Actual Results:
0 elements were found
Expected Results:
Found the <data xmlns="">...</data> element (the alert should show 1)
| Reporter | ||
Comment 1•23 years ago
|
||
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Reporter | ||
Comment 2•23 years ago
|
||
Assigning to bzbarsky as requested by him on IRC
Assignee: jst → bzbarsky
| Assignee | ||
Comment 3•23 years ago
|
||
| Assignee | ||
Updated•23 years ago
|
Attachment #107306 -
Flags: superreview?(jst)
Attachment #107306 -
Flags: review?(bugmail)
| Assignee | ||
Updated•23 years ago
|
Priority: -- → P2
Summary: getElementsByTagNameNS(null, <whatever>) does not work → [FIX]getElementsByTagNameNS(null, <whatever>) does not work
Target Milestone: --- → mozilla1.3alpha
Attachment #107306 -
Flags: review?(bugmail) → review+
Comment 4•23 years ago
|
||
See bug 112062.
Comment 5•23 years ago
|
||
I think that what we really want to do is fix FindNamespaceID to work with the
empty string also, rather than do a special hack here.
| Assignee | ||
Comment 6•23 years ago
|
||
I considered that, but there may be other callers relying on the current
behavior... if there are not, I'm all for changing it.
Comment 7•23 years ago
|
||
I think you should be fine. There are two versions of FindNameSpaceID in the
file. One is internal and is used only in the two places you changed. The
other is on the interface and does different things.
Comment 8•23 years ago
|
||
lxr is your friend :)
http://lxr.mozilla.org/mozilla/search?string=findnamespaceid
| Assignee | ||
Comment 9•23 years ago
|
||
Attachment #107306 -
Attachment is obsolete: true
| Assignee | ||
Updated•23 years ago
|
Attachment #107306 -
Flags: superreview?(jst)
| Assignee | ||
Updated•23 years ago
|
Attachment #107316 -
Flags: superreview?(jst)
Attachment #107316 -
Flags: review?(bugmail)
Comment on attachment 107316 [details] [diff] [review]
Fine, you win
>@@ -455,26 +460,23 @@
> PRInt32& aNameSpaceID)
> {
> NS_ASSERTION(!gNameSpaceManagerWasShutDown,
> "Namespace manager used past content module shutdown!!!");
>
> PRInt32 id = FindNameSpaceID(aURI);
>-
>+
feel free to not do this change. I don't really care either way though.
>+ if (!uri)
>+ return NS_ERROR_OUT_OF_MEMORY;
Nit (since you didn't add this):
I prefer NS_ENSURE_TRUE(uri, NS_ERROR_OUT_OF_MEMORY), not a biggie though
Attachment #107316 -
Flags: review?(bugmail) → review+
Comment 11•23 years ago
|
||
Comment on attachment 107316 [details] [diff] [review]
Fine, you win
sr=jst, but please don't add spaces for indentation on empty lines :-)
Attachment #107316 -
Flags: superreview?(jst) → superreview+
| Assignee | ||
Comment 12•23 years ago
|
||
fixed. I took the whitespace change out.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•