Closed Bug 817332 Opened 13 years ago Closed 13 years ago

Remove XPIDL for HTMLPropertiesCollection/PropertyNodeList

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: dzbarsky, Assigned: dzbarsky)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
No description provided.
Attachment #687446 - Flags: review?(bzbarsky)
Comment on attachment 687446 [details] [diff] [review] Patch The whitespace cleanup is all good, but please try to do that in a separate patch from the substantive changes next time? >+++ b/content/html/content/src/HTMLPropertiesCollection.h > class HTMLPropertiesCollection : public nsIHTMLCollection, >+ NS_IMETHOD GetLength(uint32_t* aLength); >+ NS_IMETHOD Item(uint32_t aIndex, nsIDOMNode** aResult); How about you remove these, and the manual "NS_IMETHOD NamedItem(const nsAString& aName, nsIDOMNode** aResult);" and just NS_DECL_NSIDOMHTMLCOLLECTION? > class PropertyNodeList : public nsINodeList, >+ NS_IMETHOD GetLength(uint32_t* aLength); >+ NS_IMETHOD Item(uint32_t aIndex, nsIDOMNode** aReturn); NS_DECL_NSIDOMNODELIST >+++ b/content/html/content/src/nsGenericHTMLElement.h >+ NS_IMETHOD GetProperties(nsISupports** aReturn) \ > MOZ_FINAL { \ >- nsGenericHTMLElement::GetProperties(aReturn); \ >+ mozilla::dom::HTMLPropertiesCollection* collection; \ >+ nsGenericHTMLElement::GetProperties(&collection); \ >+ *aReturn = static_cast<nsIHTMLCollection*>(collection); \ Please fix the indentation here, and the alignment of the backslashes. Yay less classinfo!
Attachment #687446 - Flags: review?(bzbarsky) → review+
Assignee: nobody → dzbarsky
Comment on attachment 687446 [details] [diff] [review] Patch Review of attachment 687446 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/html/content/src/HTMLPropertiesCollection.cpp @@ -493,5 @@ > - EnsureFresh(); > - nsCOMPtr<nsIWritableVariant> out = new nsVariant(); > - > - // We have to use an nsTArray<nsIVariant*> here and do manual refcounting because > - // nsWritableVariant::SetAsArray takes an nsIVariant**. Bye, nsIVariant, you won't be missed \o/ ::: content/html/content/src/HTMLPropertiesCollection.h @@ +17,5 @@ > #include "nsINodeList.h" > #include "nsIHTMLCollection.h" > #include "nsHashKeys.h" > #include "nsRefPtrHashtable.h" > +#include "jsfriendapi.h" Anything in particular you needed this for? ::: content/html/content/src/nsGenericHTMLElement.cpp @@ +4101,5 @@ > return properties; > } > > void > +nsGenericHTMLElement::GetProperties(HTMLPropertiesCollection** aProperties) Just make this return nsISupports; it's only used for the GetProperties in the macro below.
(In reply to :Ms2ger from comment #2) > Comment on attachment 687446 [details] [diff] [review] > Patch > > Anything in particular you needed this for? JS::Value
JS::Value is in jsapi.h.
Target Milestone: --- → mozilla20
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: