Closed
Bug 817332
Opened 13 years ago
Closed 13 years ago
Remove XPIDL for HTMLPropertiesCollection/PropertyNodeList
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: dzbarsky, Assigned: dzbarsky)
Details
Attachments
(1 file)
28.49 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #687446 -
Flags: review?(bzbarsky)
![]() |
||
Comment 1•13 years ago
|
||
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+
Updated•13 years ago
|
Assignee: nobody → dzbarsky
Comment 2•13 years ago
|
||
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.
Assignee | ||
Comment 3•13 years ago
|
||
(In reply to :Ms2ger from comment #2)
> Comment on attachment 687446 [details] [diff] [review]
> Patch
>
> Anything in particular you needed this for?
JS::Value
![]() |
||
Comment 4•13 years ago
|
||
JS::Value is in jsapi.h.
Assignee | ||
Comment 5•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Target Milestone: --- → mozilla20
Comment 6•13 years ago
|
||
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.
Description
•