Closed Bug 844134 Opened 13 years ago Closed 13 years ago

attributes should be defined on Element and not Node

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: erik, Assigned: Ms2ger)

References

Details

(Keywords: addon-compat, dev-doc-complete, site-compat)

Attachments

(1 file)

It makes no sense to expose attributes and hasAttributes on non Elements and DOM core updated the spec accordingly.
OS: Linux → All
Hardware: x86_64 → All
Version: unspecified → Trunk
I've got a patch for attributes.
Assignee: nobody → Ms2ger
Summary: attributes and hasAttributes should be defined on Element and not Node → attributes should be defined on Element and not Node
Attached patch Patch v1Splinter Review
I filed bug 849661 for hasAttributes.
Attachment #723255 - Flags: review?(jonas)
Comment on attachment 723255 [details] [diff] [review] Patch v1 Review of attachment 723255 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the below fixed. ::: layout/inspector/src/inDOMView.cpp @@ +1178,5 @@ > { > NS_ENSURE_ARG(aNode); > // attribute nodes > if (mWhatToShow & nsIDOMNodeFilter::SHOW_ATTRIBUTE) { > + if (nsCOMPtr<nsIDOMElement> element = do_QueryInterface(aNode)) { Are you sure this will work? The assignment operator for do_QI works weirdly in that do_QI doesn't actually return the result of the QI, it always returns a non-null object. I'd move this outside out the if-statement and just do |if (element)| to be on the safe side. It's not causing any runtime or compile time cost.
Attachment #723255 - Flags: review?(jonas) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
I've added this bug to the compatibility doc. Please correct the info if wrong. https://developer.mozilla.org/en-US/docs/Site_Compatibility_for_Firefox_22 Also, please update the following doc: https://developer.mozilla.org/en-US/docs/DOM/Node.attributes
Keywords: site-compat
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: