Closed Bug 123232 Opened 23 years ago Closed 21 years ago

Make NamedNodeMap more standards compliant

Categories

(Core :: DOM: Core & HTML, defect, P4)

defect

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: fabian, Assigned: fabian)

References

()

Details

(Whiteboard: [HAVE FIX])

Attachments

(1 file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
BuildID:    20020203

It seems nsXMLNamedNodeMap needs a serious spanking wrt exceptions and
unimplemented namespace methods. I will attach a patch that attemps to do this.

Reproducible: Always
Steps to Reproduce:
1. Look at the DOM spec
2. Look at our implementation
3.

Actual Results:  We don't throw exceptions and namespace methods are not implemented

Expected Results:  We throw exceptions and namspace methods are implemented

The same thing should be done for nsDOMAttributeMap.cpp but I'll attach that
patch in the relevant bug (bug 85776)
Attached patch Tentative fix.Splinter Review
The attached patch does the following:
* minor cleanup in the file
* add a readonly data member, add a readonly argument to the constructor and to
the creator, to separate between readonly and non-readonly NamedNodeMap's
* Implement the namespace-aware methods of NamedNodeMap.

Note that I have tested the readonly vs non-readonly stuff, and I have tested
the non-namespace-aware methods. I will test the namespace-aware methods as
soon as possible.

There are a couple of things left to do: We don't throw IN_USE_ATTRIBUTE_ERR
when we're adding an attribute node that already exists in another map. A
second issue is that if I do
var elt = document.createElement("p");
map.setNamedItem(elt);
I have to call map.getNamedItem("P") (note the capital P) because elt.nodeName
is capitalized for some reason. I don't know if we could avoid this, perhaps by
changing an Equals to an EqualsIgnoreCase somewhere?
Status: NEW → ASSIGNED
Whiteboard: [HAVE FIX]
Target Milestone: --- → mozilla1.0
Hmm, looks like this code is actually not used anywhere in mozilla yet...
Correct... it will be needed if we ever want to implement documentType::entites
and documentType::notations.

Guess the patch is just "normal" severity and would be good to have for 1.0,
that's all :-)
Triaging my bug list. Marking P3 because this code is not used yet. Not
important to fix right now, but since there's a patch I might as well target 1.0.
OS: Linux → All
Priority: -- → P3
Hardware: PC → All
drivers will never accept this one
Priority: P3 → P4
Target Milestone: mozilla1.0 → mozilla1.1
Like anybody uses NamedNodeMap... Future, unless someone updates the patch (that
needs testing too)
Target Milestone: mozilla1.1alpha → Future
The code in question was removed (see bug 207021).
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → WONTFIX
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.

Attachment

General

Creator:
Created:
Updated:
Size: