Closed Bug 707576 Opened 13 years ago Closed 13 years ago

Remove nsIDOMNSElement

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

Details

(Keywords: addon-compat, dev-doc-needed)

Attachments

(1 file)

Got a patch, still need to check if it's ready for review.
Attached patch Patch v1Splinter Review
Attachment #580741 - Flags: review?(bugs)
Comment on attachment 580741 [details] [diff] [review] Patch v1 >-nsNSElementTearoff::GetFirstElementChild(nsIDOMElement** aResult) >+nsGenericElement::GetChildElementCount(PRUint32* aResult) >+{ >+ nsContentList* list = GetChildrenList(); >+ if (!list) { >+ *aResult = 0; >+ return NS_ERROR_OUT_OF_MEMORY; >+ } >+ >+ *aResult = list->Length(true); >+ return NS_OK; >+} Why OOM check? Maybe *aResult = GetChildrenList()->Length(true); return NS_OK; >+NS_IMETHODIMP >+nsGenericElement::GetChildElements(nsIDOMNodeList** aResult) >+{ >+ nsContentList* list = GetChildrenList(); >+ if (!list) { >+ *aResult = nsnull; >+ return NS_ERROR_OUT_OF_MEMORY; >+ } >+ >+ NS_ADDREF(*aResult = list); >+ return NS_OK; >+} Maybe NS_ADDREF(*aResult = GetChildrenList()); return NS_OK; > >+NS_IMETHODIMP >+nsGenericElement::GetOnmouseenter(JSContext* cx, JS::Value* vp) >+{ >+ return nsINode::GetOnmouseenter(cx, vp); >+} >+ >+NS_IMETHODIMP >+nsGenericElement::SetOnmouseenter(JSContext* cx, const JS::Value& v) >+{ >+ return nsINode::SetOnmouseenter(cx, v); >+} >+ >+NS_IMETHODIMP >+nsGenericElement::GetOnmouseleave(JSContext* cx, JS::Value* vp) >+{ >+ return nsINode::GetOnmouseleave(cx, vp); >+} >+ >+NS_IMETHODIMP >+nsGenericElement::SetOnmouseleave(JSContext* cx, const JS::Value& v) >+{ >+ return nsINode::SetOnmouseleave(cx, v); >+} Waiting to get answer why this change is needed.
Attachment #580741 - Flags: review?(bugs) → review-
(In reply to Olli Pettay [:smaug] from comment #2) > Comment on attachment 580741 [details] [diff] [review] > Patch v1 > > GetChildrenList OK, didn't realize this was infallible. > > > >+NS_IMETHODIMP > >+nsGenericElement::GetOnmouseenter(JSContext* cx, JS::Value* vp) > >+{ > >+ return nsINode::GetOnmouseenter(cx, vp); > >+} > >+ > >+NS_IMETHODIMP > >+nsGenericElement::SetOnmouseenter(JSContext* cx, const JS::Value& v) > >+{ > >+ return nsINode::SetOnmouseenter(cx, v); > >+} > >+ > >+NS_IMETHODIMP > >+nsGenericElement::GetOnmouseleave(JSContext* cx, JS::Value* vp) > >+{ > >+ return nsINode::GetOnmouseleave(cx, vp); > >+} > >+ > >+NS_IMETHODIMP > >+nsGenericElement::SetOnmouseleave(JSContext* cx, const JS::Value& v) > >+{ > >+ return nsINode::SetOnmouseleave(cx, v); > >+} > Waiting to get answer why this change is needed. Because I used NS_DECL_NSIDOMELEMENT in nsGenericElement.h, I get linking errors if these aren't defined.
Comment on attachment 580741 [details] [diff] [review] Patch v1 Ok. Fix the OOM cases, r+
Attachment #580741 - Flags: review- → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Depends on: 734019
Depends on: 734746
Depends on: 750002
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: