Closed Bug 280746 Opened 19 years ago Closed 19 years ago

remove nsIContentList

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bryner, Assigned: bryner)

Details

Attachments

(1 file)

The nsIContentList interface is not used outside of gklayout; with a small
amount of work we can make it completely unnecessary.
Attached patch patchSplinter Review
jst, the only question I had about this has to do with the DOMClassInfo code. 
As you can see I do a QI to nsIDOMNodeList because nsISupports is an ambiguous
base of nsContentList.	Is this actually necessary or can I assume that the
nsISupports* points to the primary base class of nsContentList?
Attachment #173146 - Flags: superreview?(jst)
Attachment #173146 - Flags: review?(jst)
Comment on attachment 173146 [details] [diff] [review]
patch

- In base/src/nsContentList.h:

 nsresult
 NS_GetContentList(nsIDocument* aDocument, nsIAtom* aMatchAtom,
		   PRInt32 aMatchNameSpaceId, nsIContent* aRootContent,
-		   nsIContentList** aInstancePtrResult);
+		   nsContentList** aInstancePtrResult);

I don't see a single caller that cares about the nsresult return value. Wanna
change this to just return the nsContentList pointer directly instead?

r+sr=jst
Attachment #173146 - Flags: superreview?(jst)
Attachment #173146 - Flags: superreview+
Attachment #173146 - Flags: review?(jst)
Attachment #173146 - Flags: review+
>  nsresult
>  NS_GetContentList(nsIDocument* aDocument, nsIAtom* aMatchAtom,
> 		   PRInt32 aMatchNameSpaceId, nsIContent* aRootContent,
> -		   nsIContentList** aInstancePtrResult);
> +		   nsContentList** aInstancePtrResult);
> 
> I don't see a single caller that cares about the nsresult return value. Wanna
> change this to just return the nsContentList pointer directly instead?

Ok, maybe:

already_AddRefed<nsContentList>
NS_GetContentList(nsIDocument* aDocument, nsIAtom* aMatchAtom,
		  PRInt32 aMatchNameSpaceId, nsIContent* aRootContent);
checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
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: