move NodeInfo() to nsINode

RESOLVED WONTFIX

Status

()

Core
General
RESOLVED WONTFIX
12 years ago
12 years ago

People

(Reporter: surkov, Assigned: surkov)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

12 years ago
nsIAttribute/nsIContent defines both NodeInfo() method, though mNodeInfo member is defined in nsINode. I guess, it's fine to move NodeInfo() method to nsINode.
(Assignee)

Comment 1

12 years ago
Created attachment 251087 [details] [diff] [review]
patch
Attachment #251087 - Flags: review?(Olli.Pettay)

Comment 2

12 years ago
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+
(Assignee)

Comment 3

12 years ago
Created attachment 251168 [details] [diff] [review]
patch2
Assignee: nobody → surkov.alexander
Attachment #251087 - Attachment is obsolete: true
Status: NEW → ASSIGNED
(Assignee)

Updated

12 years ago
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-
(Assignee)

Comment 5

12 years ago
I think wontfix per Jonas comment.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.