Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Remove nsIDOMNSElement

RESOLVED FIXED in mozilla11

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

({addon-compat, dev-doc-needed})

Trunk
mozilla11
addon-compat, dev-doc-needed
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Got a patch, still need to check if it's ready for review.
(Assignee)

Comment 1

6 years ago
Created attachment 580741 [details] [diff] [review]
Patch v1
Attachment #580741 - Flags: review?(bugs)

Comment 2

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

Comment 3

6 years ago
(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 4

6 years ago
Comment on attachment 580741 [details] [diff] [review]
Patch v1

Ok.

Fix the OOM cases, r+
Attachment #580741 - Flags: review- → review+
(Assignee)

Updated

6 years ago
Keywords: addon-compat, dev-doc-needed
(Assignee)

Comment 5

6 years ago
https://hg.mozilla.org/mozilla-central/rev/f9f6f9ed788a
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11

Updated

5 years ago
Depends on: 734019

Updated

5 years ago
Depends on: 734746

Updated

5 years ago
Depends on: 750002
You need to log in before you can comment on or make changes to this bug.