Closed Bug 901060 Opened 6 years ago Closed 6 years ago

Make nsGenericHTMLElement implement nsIDOMHTMLElement

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: dzbarsky, Assigned: dzbarsky)

References

Details

(Keywords: addon-compat)

Attachments

(2 files, 4 obsolete files)

No description provided.
Attaching WIP so I can use splinter.
Comment on attachment 785194 [details] [diff] [review]
Make nsGenericHTMLElement implement nsIDOMHTMLElement r=bz

Review of attachment 785194 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/html/content/src/HTMLAudioElement.cpp
@@ +31,5 @@
>  namespace dom {
>  
> +NS_IMPL_ISUPPORTS_INHERITED4(HTMLAudioElement, HTMLMediaElement,
> +                             nsIDOMHTMLMediaElement, nsIDOMHTMLAudioElement,
> +                             nsITimerCallback, nsIAudioChannelAgentCallback)

Do we need this QI to nsIDOMHTMLMediaElement?  HTMLMediaElement should handle it.

::: content/html/content/src/HTMLBRElement.cpp
@@ +26,5 @@
>  HTMLBRElement::~HTMLBRElement()
>  {
>  }
>  
> +NS_IMPL_ISUPPORTS_INHERITED0(HTMLBRElement, nsGenericHTMLElement)

Don't need.

::: content/html/content/src/HTMLButtonElement.cpp
@@ +77,5 @@
>                                       nsGenericHTMLFormElementWithState,
>                                       mValidity)
>  
> +NS_IMPL_ISUPPORTS_INHERITED2(HTMLButtonElement, nsGenericHTMLElement,
> +                             nsIDOMHTMLButtonElement, nsIConstraintValidation)

nsGenericHTMLFormElementWithState

::: content/html/content/src/HTMLCanvasElement.cpp
@@ +162,5 @@
>  
>  NS_IMPL_ADDREF_INHERITED(HTMLCanvasElement, Element)
>  NS_IMPL_RELEASE_INHERITED(HTMLCanvasElement, Element)
>  
>  NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLCanvasElement)

INHERITED macro

::: content/html/content/src/HTMLDataElement.cpp
@@ +20,5 @@
>  HTMLDataElement::~HTMLDataElement()
>  {
>  }
>  
> +NS_IMPL_ISUPPORTS_INHERITED0(HTMLDataElement, nsGenericHTMLElement)

No need.

::: content/html/content/src/HTMLDataListElement.cpp
@@ +23,5 @@
>  
>  NS_IMPL_CYCLE_COLLECTION_INHERITED_1(HTMLDataListElement, nsGenericHTMLElement,
>                                       mOptions)
>  
> +NS_IMPL_ISUPPORTS_INHERITED0(HTMLDataListElement, nsGenericHTMLElement)

No need

::: content/html/content/src/HTMLFieldSetElement.cpp
@@ +41,5 @@
>  NS_IMPL_ADDREF_INHERITED(HTMLFieldSetElement, Element)
>  NS_IMPL_RELEASE_INHERITED(HTMLFieldSetElement, Element)
>  
>  // QueryInterface implementation for HTMLFieldSetElement
>  NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLFieldSetElement)

INHERITED

::: content/html/content/src/HTMLFormElement.cpp
@@ +330,2 @@
>    NS_INTERFACE_TABLE_INHERITED4(HTMLFormElement,
>                                  nsIDOMHTMLFormElement,

INHERITED

::: content/html/content/src/HTMLFrameElement.cpp
@@ +25,5 @@
>  }
>  
>  
> +NS_IMPL_ISUPPORTS_INHERITED1(HTMLFrameElement, nsGenericHTMLElement,
> +                             nsIDOMHTMLFrameElement)

nsGenericHTMLFrameElement

::: content/html/content/src/HTMLIFrameElement.cpp
@@ +29,5 @@
>  {
>  }
>  
> +NS_IMPL_ISUPPORTS_INHERITED1(HTMLIFrameElement, nsGenericHTMLElement,
> +                             nsIDOMHTMLIFrameElement)

nsGenericHTMLFrameElement

::: content/html/content/src/HTMLInputElement.cpp
@@ +889,1 @@
>  

INHERITED

::: content/html/content/src/HTMLLinkElement.cpp
@@ +63,5 @@
>                                  nsIDOMLinkStyle,
>                                  nsILink,
>                                  nsIStyleSheetLinkingElement,
>                                  Link)
>    NS_INTERFACE_TABLE_TO_MAP_SEGUE

INHERITED

::: content/html/content/src/HTMLObjectElement.cpp
@@ +78,5 @@
>  
>  NS_IMPL_ADDREF_INHERITED(HTMLObjectElement, Element)
>  NS_IMPL_RELEASE_INHERITED(HTMLObjectElement, Element)
>  
>  NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLObjectElement)

INHERITED

::: content/html/content/src/HTMLOptionElement.cpp
@@ +50,5 @@
>  HTMLOptionElement::~HTMLOptionElement()
>  {
>  }
>  
> +NS_IMPL_ISUPPORTS_INHERITED0(HTMLOptionElement, nsGenericHTMLElement)

No need

::: content/html/content/src/HTMLOutputElement.cpp
@@ +58,5 @@
>                                  nsIMutationObserver,
>                                  nsIConstraintValidation)
>    NS_INTERFACE_TABLE_TO_MAP_SEGUE
>  NS_ELEMENT_INTERFACE_MAP_END
>  

INHERITED from nsGenericHTMLFormElement

::: content/html/content/src/HTMLSharedElement.cpp
@@ +38,5 @@
>    NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLQuoteElement, q)
>    NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLQuoteElement, blockquote)
>    NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLHeadElement, head)
>    NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLHtmlElement, html)
>  NS_ELEMENT_INTERFACE_MAP_END

END_INHERITING

::: content/html/content/src/HTMLSharedListElement.cpp
@@ +32,3 @@
>    NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLOListElement, ol)
>    NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLUListElement, ul)
>  NS_ELEMENT_INTERFACE_MAP_END

END_INHERITING

::: content/html/content/src/HTMLSharedObjectElement.cpp
@@ +89,5 @@
>  
>  NS_IMPL_ADDREF_INHERITED(HTMLSharedObjectElement, Element)
>  NS_IMPL_RELEASE_INHERITED(HTMLSharedObjectElement, Element)
>  
>  NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLSharedObjectElement)

INHERITED

::: content/html/content/src/HTMLStyleElement.cpp
@@ +52,1 @@
>    NS_INTERFACE_TABLE_INHERITED4(HTMLStyleElement,

INHERITED

::: content/html/content/src/HTMLTextAreaElement.cpp
@@ +91,5 @@
>                                  nsIDOMNSEditableElement,
>                                  nsIMutationObserver,
>                                  nsIConstraintValidation)
>    NS_INTERFACE_TABLE_TO_MAP_SEGUE
>  NS_ELEMENT_INTERFACE_MAP_END

INHERITED from nsGenericHTMLFormElementWithState

::: content/html/content/src/HTMLVideoElement.cpp
@@ +42,5 @@
>  
>  static bool sVideoStatsEnabled;
>  
> +NS_IMPL_ISUPPORTS_INHERITED2(HTMLVideoElement, nsGenericHTMLElement,
> +                             nsIDOMHTMLMediaElement, nsIDOMHTMLVideoElement)

inherited from HTMLMediaElement - do we need nsIDOMHTMLMediaElement

::: content/html/content/src/nsGenericHTMLElement.cpp
@@ +254,5 @@
>    NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsGenericHTMLElementTearoff)
>  NS_INTERFACE_MAP_END_AGGREGATED(mElement)
>  
> +NS_IMPL_ISUPPORTS_INHERITED3(nsGenericHTMLElement, nsGenericHTMLElementBase,
> +                             nsIDOMHTMLElement, nsIDOMElement, nsIDOMNode)

This is wrong.  Need the tearoff for nsIDOMElemnentCSSInlineStyle

::: content/html/content/src/nsGenericHTMLElement.h
@@ -77,1 @@
>  

Get rid of NS_HTML_CONTENT_INTERFACES

::: embedding/browser/webBrowser/nsContextMenuInfo.cpp
@@ -226,1 @@
>    nsCOMPtr<nsIDOMHTMLHtmlElement> htmlElement = do_QueryInterface(domNode);

Oops
Attachment #785194 - Attachment is obsolete: true
Attachment #785788 - Attachment is obsolete: true
Attachment #785843 - Attachment is obsolete: true
Attachment #785862 - Flags: review?(bzbarsky)
1. I put the PostQueryInterface call in FragmentOrElement, but perhaps it should go in Element instead?
2. The nsGenericHTMLElementBase stuff is pretty ugly, but we need that so that we can devirtualize the WebIDL API.
Hmm.  Why can't we have the "public" class be nsGenericHTMLElement and the implementation detail have some ugly name?

But also, I'm not quite sure why we need it.  What are we trying to devirtualize exactly?

Oh, and the PostQueryInterface stuff should definitely be on Element.  The QI bits of FragmentOrElement are pretty bogus.  :(
Flags: needinfo?(dzbarsky)
(In reply to Boris Zbarsky (:bz) from comment #8)
> Hmm.  Why can't we have the "public" class be nsGenericHTMLElement and the
> implementation detail have some ugly name?
> 

Sure, we can do that.  But then we'd need to change all the element classes to inherit from the ugly name class, no?

> But also, I'm not quite sure why we need it.  What are we trying to
> devirtualize exactly?
> 

The WebIDL methods on HTMLElement that have the same signature (modulo the void return) as nsIDOMHTMLElement methods.

> Oh, and the PostQueryInterface stuff should definitely be on Element.  The
> QI bits of FragmentOrElement are pretty bogus.  :(

Ok, I'll change that.
Flags: needinfo?(dzbarsky)
> The WebIDL methods on HTMLElement that have the same signature (modulo the void return)
> as nsIDOMHTMLElement methods.

Which ones are those, exactly?
Flags: needinfo?(dzbarsky)
(In reply to Boris Zbarsky (:bz) from comment #10)
> > The WebIDL methods on HTMLElement that have the same signature (modulo the void return)
> > as nsIDOMHTMLElement methods.
> 
> Which ones are those, exactly?

G/SetId
G/SetTitle
G/SetLang
GetDir
G/SClassName
GetItemId
GetAccessKey(Label)
GetContentEditable
InsertAdjacentHTML

I guess we could set [binaryname] on these if we care.
Flags: needinfo?(dzbarsky)
All the Get methods there should be taking nsString in the WebIDL version, which will be a different signature from the xpidl version.

The WebIDL SetId is on Element, not on HTMLElement, no?

I have no problem with SetTitle being virtual.  Same for SetLang.

[binaryname] is fine by me for SetClassName.  Or we could fix bug 810677 and move it to Element.

InsertAdjacentHTML is [Throws] (so a different signature for WebIDL and xpidl) and is on Element, not HTMLElement anyway.
Comment on attachment 786691 [details] [diff] [review]
Make nsGenericHTMLElement implement nsIDOMHTMLElement r=bz

>+++ b/content/base/public/Element.h
>+  nsresult QueryInterface(REFNSIID aIID, void** aInstancePtr);

s/nsresult/NS_IMETHOD/, right?

>+++ b/content/base/public/FragmentOrElement.h
>-  NS_DECL_CYCLE_COLLECTING_ISUPPORTS

Why move this line?

The NS_ELEMENT_INTERFACE_MAP_END macro should go away, right?

>+++ b/content/base/src/Element.cpp
>+  return OwnerDoc()->BindingManager()->GetBindingImplementation(this, aIID,

Maybe a followup on making GetBindingImplementation take an Element, and maybe another one after that on making GetXBLBinding() live on Element?

>+++ b/content/base/src/nsContentAreaDragDrop.cpp

Why were the changes to this file needed?  They seem ok, but I'd like to understand why they were necessary.

>+++ b/content/base/src/nsDocument.cpp
>@@ -7585,49 +7586,49 @@ nsDocument::Sanitize()
>+    nsCOMPtr<nsIDOMHTMLElement> element = do_QueryInterface(form);
>+    element->GetAttribute(NS_LITERAL_STRING("autocomplete"), value);

How about:

  nodes->Item(i)->AsElement()->GetAttribute(NS_LITERAL_STRING("autocomplete"),
                                            value);

or something similar but with GetAttr and an atom?

>+++ b/content/html/content/src/HTMLButtonElement.cpp
>   NS_INTERFACE_TABLE_TO_MAP_SEGUE
>+NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLFormElementWithState)

I think you can replace those two lines with:

NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLFormElementWithState)

Same thing for HTMLCanvasElement, HTMLFieldSetElement, HTMLFormElement, HTMLImageElement, HTMLInputElement, HTMLLinkElement, HTMLMapElement, HTMLObjectElement, HTMLOutputElement, HTMLSelectElement, HTMLStyleElement, HTMLTableElement, HTMLTextAreaElement.

>+++ b/content/html/content/src/HTMLFormElement.cpp
>@@ -1855,35 +1854,34 @@ HTMLFormElement::CheckFormValidity(nsIMutableArray* aInvalidElements) const
>-        aInvalidElements->AppendElement((nsGenericHTMLElement*)sortedControls[i],
>+        aInvalidElements->AppendElement((nsGenericHTMLElementBase*)sortedControls[i],

I don't think that change is needed.

>+++ b/content/html/content/src/HTMLOptionsCollection.cpp
>+    nsRefPtr<HTMLOptionElement> refChild =
>+      HTMLOptionElement::FromContentOrNull(ItemAsOption(index));

How about:

  nsRefPtr<HTMLOptionElement>> refChild = ItemAsOption(index);

?

>+++ b/content/html/content/src/nsGenericHTMLElement.cpp

>-nsGenericHTMLElement::GetDataset(nsISupports** aDataset)

I don't think this can go away.  In fact, it should become NS_IMETHODIMP and the bogus inline impl in the header (which just calls itself recursively!) should disappear.

>-nsGenericHTMLElement::InsertAdjacentHTML(const nsAString& aPosition,

Likewise: keep the impl, drop the bogus impl in the header.

>-nsGenericHTMLElement::GetProperties(nsISupports** aProperties)

Likewise: keep the impl, drop the thing in the header.

>+++ b/content/html/content/src/nsGenericHTMLElement.h
>+  NS_IMETHOD GetTitle(nsAString& aTitle) MOZ_FINAL {
>+    GetTitle(aTitle);

That will just call itself.  You want something like:

  nsString title;
  GetTitle(title);
  aTitle = title;

or something.  Or just keep one virtual GetTitle that writes to an nsAString instead of two separate GetTitles.

>+  NS_IMETHOD GetLang(nsAString& aLang) MOZ_FINAL {
>+    GetLang(aLang);

Likewise.

>+  NS_IMETHOD GetDir(nsAString& aDir) MOZ_FINAL {
>+    GetDir(aDir);

And here.

>+  NS_IMETHOD GetDOMClassName(nsAString& aClassName) MOZ_FINAL {
>+    GetAttr(kNameSpaceID_None, nsGkAtoms::_class, aClassName);

GetHTMLAttr?

>+  NS_IMETHOD GetItemId(nsAString& aId) MOZ_FINAL {
>+    GetItemId(aId);

Same issue here as for GetTitle and company.

>+  NS_IMETHOD GetAccessKey(nsAString& aAccessKey) MOZ_FINAL {
>+    GetAccessKey(aAccessKey);

And here.

>+  NS_IMETHOD GetAccessKeyLabel(nsAString& aAccessKeyLabel) MOZ_FINAL {
>+    GetAccessKeyLabel(aAccessKeyLabel);

And here.

>+  NS_IMETHOD GetContentEditable(nsAString& aContentEditable) MOZ_FINAL {
>+    GetContentEditable(aContentEditable);

And here.

>+  NS_IMETHOD GetSpellcheck(bool* aSpellcheck) MOZ_FINAL {
>+    *aSpellcheck = nsGenericHTMLElement::Spellcheck();

s/nsGenericHTMLElement:://

>+  NS_IMETHOD GetOffsetParent(nsIDOMElement** aOffsetParent) MOZ_FINAL {
>+    mozilla::dom::Element* offsetParent = nsGenericHTMLElement::GetOffsetParent();

No need for nsGenericHTMLElement:: here.

>+    *aOffsetTop = nsGenericHTMLElement::OffsetTop();
>+    *aOffsetLeft = nsGenericHTMLElement::OffsetLeft();
>+    *aOffsetWidth = nsGenericHTMLElement::OffsetWidth();
>+    *aOffsetHeight = nsGenericHTMLElement::OffsetHeight();

And for all of those.

>+    nsGenericHTMLElement::SetTabIndex(aTabIndex, rv);

And here.

>+++ b/content/html/content/src/nsGenericHTMLFrameElement.cpp
>-  NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsGenericHTMLFrameElement)

No, that's bad.  You just lost CC support for members of this class.

You probably want NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED here, right?

>-  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
>+  NS_DECL_ISUPPORTS_INHERITED

So the one benefit of explicitly only overriding QI is that it doesn't require lots of semi-pointless AddRef/Release calls up the ancestor chain...

Maybe a followup to consider doing that more widely in DOM code?  Or maybe to change the macros to only declare/impl addref/release in debug builds or when refcount logging?

>+++ b/dom/base/nsDOMClassInfoID.h
>-DOMCI_CASTABLE_INTERFACE(nsGenericHTMLElement, nsGenericHTMLElement, 6,       \
>+DOMCI_CASTABLE_INTERFACE(nsGenericHTMLElement, nsGenericHTMLElementBase, 6,   \

Why is this change needed?

>+++ b/embedding/components/webbrowserpersist/src/Makefile.in
>+	-I$(srcdir)/../../../../content/html/content/src \
>+	-I$(srcdir)/../../../../content/base/src \

If you use $(topsrcdir) you don't need all those "../" bits.

r- because I want to see the fixes for the above issues (in interdiff form!), but this is looking pretty awesome.!
Attachment #786691 - Flags: review?(bzbarsky) → review-
(In reply to Boris Zbarsky (:bz) (vacation Aug 10-19) from comment #14)
> Comment on attachment 786691 [details] [diff] [review]
> Make nsGenericHTMLElement implement nsIDOMHTMLElement r=bz

> 
> >+++ b/content/base/src/nsContentAreaDragDrop.cpp
> 
> Why were the changes to this file needed?  They seem ok, but I'd like to
> understand why they were necessary.
> 

nsIDOMTHMLAreaElement does not inherit from nsIDOMElement.


> 
> >+++ b/content/html/content/src/HTMLFormElement.cpp
> >@@ -1855,35 +1854,34 @@ HTMLFormElement::CheckFormValidity(nsIMutableArray* aInvalidElements) const
> >-        aInvalidElements->AppendElement((nsGenericHTMLElement*)sortedControls[i],
> >+        aInvalidElements->AppendElement((nsGenericHTMLElementBase*)sortedControls[i],
> 
> I don't think that change is needed.
> 

nsIMutableArray holds nsISupports* so even with the nsGenericHTMLElement* cast the pointer is ambiguous.

> 
> >-  NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) MOZ_OVERRIDE;
> >+  NS_DECL_ISUPPORTS_INHERITED
> 
> So the one benefit of explicitly only overriding QI is that it doesn't
> require lots of semi-pointless AddRef/Release calls up the ancestor chain...
> 

We need this because otherwise form elements that don't declare QI (I think only HTMLLabelElement at this point) have multiple addref/release implementations and don't know which one to call.

> Maybe a followup to consider doing that more widely in DOM code?  Or maybe
> to change the macros to only declare/impl addref/release in debug builds or
> when refcount logging?
> 

How would that help?  AFAICT, if you have multiple nsISupports pointers, you have to declare all of nsISupports.

> >+++ b/dom/base/nsDOMClassInfoID.h
> >-DOMCI_CASTABLE_INTERFACE(nsGenericHTMLElement, nsGenericHTMLElement, 6,       \
> >+DOMCI_CASTABLE_INTERFACE(nsGenericHTMLElement, nsGenericHTMLElementBase, 6,   \
> 
> Why is this change needed?


0:30.26 In file included from /Users/dzbarsky/mozilla/moz-html-idl/obj-x86_64-apple-darwin12.4.0/js/xpconnect/src/dom_quickstubs.cpp:38:
 0:30.26 /Users/dzbarsky/mozilla/moz-html-idl/js/xpconnect/src/nsDOMQS.h:153:1: error: ambiguous cast from base 'nsISupports' to derived 'nsGenericHTMLElement':
 0:30.26     class nsISupports -> class nsIDOMEventTarget -> mozilla::dom::EventTarget -> class nsINode -> class nsIContent -> class mozilla::dom::FragmentOrElement -> nsStyledElementBase -> class nsStyledElementNotElementCSSInlineStyle -> nsMappedAttributeElementBase -> nsGenericHTMLElementBase -> class nsGenericHTMLElement
 0:30.26     class nsISupports -> class nsIDOMNode -> class nsIDOMElement -> class nsIDOMHTMLElement -> class nsGenericHTMLElement
 0:30.26 DOMCI_CASTABLE_INTERFACES(unused)
 0:30.26 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:30.26 /Users/dzbarsky/mozilla/moz-html-idl/dom/base/nsDOMClassInfoID.h:59:79: note: expanded from macro 'DOMCI_CASTABLE_INTERFACES'
 0:30.26 DOMCI_CASTABLE_INTERFACE(nsDocument, nsIDocument, 5, _extra)                  \
 0:30.26                                                                               ^
 0:30.26 /Users/dzbarsky/mozilla/moz-html-idl/js/xpconnect/src/nsDOMQS.h:151:3: note: expanded from macro '\
 0:30.26 DOMCI_CASTABLE_INTERFACE'
 0:30.26   DEFINE_UNWRAP_CAST(_interface, _base, _bit)
> nsIMutableArray holds nsISupports* so even with the nsGenericHTMLElement* cast the
> pointer is ambiguous.

OK, then cast to Element or nsIContent?  nsGenericHTMLElementBase is an implementation detail that should not be leaking here.

Or just use ToSupports()?

> AFAICT, if you have multiple nsISupports pointers, you
> have to declare all of nsISupports

Hrm.  I guess that's true, yeah.  :(

> 0:30.26 /Users/dzbarsky/mozilla/moz-html-idl/js/xpconnect/src/nsDOMQS.h:153:1: error:
> ambiguous cast from base 'nsISupports' to derived 'nsGenericHTMLElement':

Ah, I see.  I'd prefer nsIContent instead of nsGenericHTMLElement here, I think, like we do for nsSVGElement.  Seem reasonable?
Comment on attachment 787024 [details] [diff] [review]
fixup test failures and address review comments

r=me modulo comment 17.
Attachment #787024 - Flags: review?(bzbarsky) → review+
(In reply to Boris Zbarsky (:bz) (vacation Aug 10-19) from comment #17)
> > nsIMutableArray holds nsISupports* so even with the nsGenericHTMLElement* cast the
> > pointer is ambiguous.
> 
> OK, then cast to Element or nsIContent?  nsGenericHTMLElementBase is an
> implementation detail that should not be leaking here.
> 
> Or just use ToSupports()?

That works.


> > 0:30.26 /Users/dzbarsky/mozilla/moz-html-idl/js/xpconnect/src/nsDOMQS.h:153:1: error:
> > ambiguous cast from base 'nsISupports' to derived 'nsGenericHTMLElement':
> 
> Ah, I see.  I'd prefer nsIContent instead of nsGenericHTMLElement here, I
> think, like we do for nsSVGElement.  Seem reasonable?

Yeah, nsIContent should work here.

https://hg.mozilla.org/integration/mozilla-inbound/rev/faf5cbc1c6ee
https://hg.mozilla.org/mozilla-central/rev/faf5cbc1c6ee
https://hg.mozilla.org/mozilla-central/rev/75036b3460bf
Assignee: nobody → dzbarsky
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Other than the changes in IDL files, is there any other expected add-on impact here? Would |node instanceof Ci.nsIDOMHTMLElement| continue to work as before?
Flags: needinfo?(dzbarsky)
Yes, it should.  So for non-binary addons there should be no compat fallout here.  For binary ones it's just the IDL inheritance changes.
Flags: needinfo?(dzbarsky)
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.