Closed Bug 366586 Opened 18 years ago Closed 18 years ago

move NodeInfo() to nsINode

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: surkov, Assigned: surkov)

Details

Attachments

(1 file, 1 obsolete file)

nsIAttribute/nsIContent defines both NodeInfo() method, though mNodeInfo member is defined in nsINode. I guess, it's fine to move NodeInfo() method to nsINode.
Attached patch patch (obsolete) — Splinter Review
Attachment #251087 - Flags: review?(Olli.Pettay)
Comment on attachment 251087 [details] [diff] [review]
patch


>   /**
>+   * Get the NodeInfo for this element
>+   * @return the nodes node info
>+   */
>+  nsINodeInfo *NodeInfo() const
>+  {
>+    return mNodeInfo;
>+  }

nsINode isn't necessarily an element, so change the comment.
And update the IIDs of the interfaces too.
With those, r=me
Attachment #251087 - Flags: review?(Olli.Pettay) → review+
Attached patch patch2Splinter Review
Assignee: nobody → surkov.alexander
Attachment #251087 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #251168 - Flags: superreview?(bugmail)
Comment on attachment 251168 [details] [diff] [review]
patch2

No, I don't think we should do this. The risk is too high that someone will just check that the name of an nsINode is 'input' and assume that it's an input element, whereas in reality it could be an 'input' attribute. This could lead to security issues and crashes.
Attachment #251168 - Flags: superreview?(bugmail) → superreview-
I think wontfix per Jonas comment.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: