Closed
Bug 847195
Opened 12 years ago
Closed 12 years ago
Make NamedNodeMap only deal with Attrs
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: Ms2ger, Assigned: Ms2ger)
References
(Depends on 1 open bug)
Details
(Keywords: dev-doc-complete, site-compat)
Attachments
(1 file)
63.57 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
Once Attr no longer inherits from Node, we won't we able to QI back and forth like the callers here do.
Attachment #720439 -
Flags: review?(mounir)
Comment 1•12 years ago
|
||
Comment on attachment 720439 [details] [diff] [review]
Patch v1
Don't have time nor motivation for that.
Attachment #720439 -
Flags: review?(mounir) → review?(khuey)
Comment on attachment 720439 [details] [diff] [review]
Patch v1
Review of attachment 720439 [details] [diff] [review]:
-----------------------------------------------------------------
Please mark nsIDOMAttr as builtinclass.
::: content/base/src/nsDOMAttributeMap.cpp
@@ +200,3 @@
> {
> ErrorResult rv;
> + *aReturn = SetNamedItemInternal(aAttr, false, rv).get();
Wow this code is ugly
::: dom/interfaces/core/Makefile.in
@@ +23,5 @@
> nsIDOMDocument.idl \
> nsIDOMDocumentFragment.idl \
> nsIDOMDocumentType.idl \
> nsIDOMElement.idl \
> + nsIDOMMozNamedAttrMap.idl \
Line up the \ please.
::: editor/libeditor/base/nsEditor.cpp
@@ +2241,3 @@
> // always remove item number 0 (first item in list)
> + if (NS_SUCCEEDED(destAttributes->Item(0, getter_AddRefs(attr))) && attr) {
> + nsAutoString str;
Don't use nsAutoString here. The stack buffer is wasted. nsString is just fine. (Yes I realize this was here before).
@@ +2258,3 @@
> {
> + if (NS_SUCCEEDED(sourceAttributes->Item(i, getter_AddRefs(attr))) && attr) {
> + nsAutoString sourceAttrName;
Same here.
@@ +2258,5 @@
> {
> + if (NS_SUCCEEDED(sourceAttributes->Item(i, getter_AddRefs(attr))) && attr) {
> + nsAutoString sourceAttrName;
> + if (NS_SUCCEEDED(attr->GetName(sourceAttrName))) {
> + nsAutoString sourceAttrValue;
And here.
@@ +2278,1 @@
> #endif
You can remove #ifdef DEBUG_personiveneverheardof code.
Attachment #720439 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap
https://developer.mozilla.org/en-US/docs/Site_Compatibility_for_Firefox_22
Keywords: dev-doc-complete,
site-compat
Comment 5•12 years ago
|
||
(In reply to Kohei Yoshino [:kohei] from comment #4)
> https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap
> https://developer.mozilla.org/en-US/docs/Site_Compatibility_for_Firefox_22
The interface has been renamed to MozNamedAttrMap, not MozNamedNodeMap. (Because this interface is only used for attributes.)
(In reply to Masatoshi Kimura [:emk] from comment #5)
> The interface has been renamed to MozNamedAttrMap, not MozNamedNodeMap.
> (Because this interface is only used for attributes.)
Thank you for pointing it out. I just fixed the documents.
You need to log in
before you can comment on or make changes to this bug.
Description
•