Bug 877654 - Remove thisptr offset tables - Replace HTML element offset table macros with generic QI macros. r=Ms2ger.
authorPeter Van der Beken <peterv@propagandism.org>
Tue, 21 May 2013 15:07:38 +0200
changeset 134222 51fc52f897289d993d377bf86216468a498d479d
parent 134221 e0993170f70cc7280834bfefa8856207482d6b4c
child 134223 9ef3be66d02ff1812051d9fbd37e9be56c6469ff
push id24786
push userryanvm@gmail.com
push dateThu, 06 Jun 2013 19:18:49 +0000
treeherdermozilla-central@dc8e78ed8c44 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs877654
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 877654 - Remove thisptr offset tables - Replace HTML element offset table macros with generic QI macros. r=Ms2ger.
content/html/content/src/HTMLAnchorElement.cpp
content/html/content/src/HTMLAreaElement.cpp
content/html/content/src/HTMLAudioElement.cpp
content/html/content/src/HTMLBRElement.cpp
content/html/content/src/HTMLBodyElement.cpp
content/html/content/src/HTMLButtonElement.cpp
content/html/content/src/HTMLCanvasElement.cpp
content/html/content/src/HTMLDataElement.cpp
content/html/content/src/HTMLDataListElement.cpp
content/html/content/src/HTMLDivElement.cpp
content/html/content/src/HTMLElement.cpp
content/html/content/src/HTMLFieldSetElement.cpp
content/html/content/src/HTMLFontElement.cpp
content/html/content/src/HTMLFrameElement.cpp
content/html/content/src/HTMLFrameSetElement.cpp
content/html/content/src/HTMLHRElement.cpp
content/html/content/src/HTMLHeadingElement.cpp
content/html/content/src/HTMLIFrameElement.cpp
content/html/content/src/HTMLImageElement.cpp
content/html/content/src/HTMLInputElement.cpp
content/html/content/src/HTMLLIElement.cpp
content/html/content/src/HTMLLabelElement.cpp
content/html/content/src/HTMLLegendElement.cpp
content/html/content/src/HTMLLinkElement.cpp
content/html/content/src/HTMLMapElement.cpp
content/html/content/src/HTMLMenuElement.cpp
content/html/content/src/HTMLMenuItemElement.cpp
content/html/content/src/HTMLMetaElement.cpp
content/html/content/src/HTMLMeterElement.cpp
content/html/content/src/HTMLModElement.cpp
content/html/content/src/HTMLObjectElement.cpp
content/html/content/src/HTMLOptGroupElement.cpp
content/html/content/src/HTMLOptionElement.cpp
content/html/content/src/HTMLOutputElement.cpp
content/html/content/src/HTMLParagraphElement.cpp
content/html/content/src/HTMLPreElement.cpp
content/html/content/src/HTMLProgressElement.cpp
content/html/content/src/HTMLScriptElement.cpp
content/html/content/src/HTMLSelectElement.cpp
content/html/content/src/HTMLSharedElement.cpp
content/html/content/src/HTMLSharedListElement.cpp
content/html/content/src/HTMLSharedObjectElement.cpp
content/html/content/src/HTMLSourceElement.cpp
content/html/content/src/HTMLSpanElement.cpp
content/html/content/src/HTMLStyleElement.cpp
content/html/content/src/HTMLTableCaptionElement.cpp
content/html/content/src/HTMLTableCellElement.cpp
content/html/content/src/HTMLTableColElement.cpp
content/html/content/src/HTMLTableElement.cpp
content/html/content/src/HTMLTableRowElement.cpp
content/html/content/src/HTMLTableSectionElement.cpp
content/html/content/src/HTMLTemplateElement.cpp
content/html/content/src/HTMLTextAreaElement.cpp
content/html/content/src/HTMLTimeElement.cpp
content/html/content/src/HTMLTitleElement.cpp
content/html/content/src/HTMLUnknownElement.cpp
content/html/content/src/HTMLVideoElement.cpp
content/html/content/src/nsGenericHTMLElement.h
content/html/content/src/nsHTMLFormElement.cpp
--- a/content/html/content/src/HTMLAnchorElement.cpp
+++ b/content/html/content/src/HTMLAnchorElement.cpp
@@ -41,20 +41,20 @@ HTMLAnchorElement::~HTMLAnchorElement()
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLAnchorElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLAnchorElement, Element)
 
 // QueryInterface implementation for HTMLAnchorElement
 NS_INTERFACE_TABLE_HEAD(HTMLAnchorElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE3(HTMLAnchorElement,
-                                   nsIDOMHTMLAnchorElement,
-                                   nsILink,
-                                   Link)
+  NS_INTERFACE_TABLE_INHERITED3(HTMLAnchorElement,
+                                nsIDOMHTMLAnchorElement,
+                                nsILink,
+                                Link)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLAnchorElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLAnchorElement)
 
 JSObject*
--- a/content/html/content/src/HTMLAreaElement.cpp
+++ b/content/html/content/src/HTMLAreaElement.cpp
@@ -25,20 +25,20 @@ HTMLAreaElement::~HTMLAreaElement()
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLAreaElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLAreaElement, Element)
 
 // QueryInterface implementation for HTMLAreaElement
 NS_INTERFACE_TABLE_HEAD(HTMLAreaElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE3(HTMLAreaElement,
-                                   nsIDOMHTMLAreaElement,
-                                   nsILink,
-                                   Link)
+  NS_INTERFACE_TABLE_INHERITED3(HTMLAreaElement,
+                                nsIDOMHTMLAreaElement,
+                                nsILink,
+                                Link)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLAreaElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLAreaElement)
 
 
--- a/content/html/content/src/HTMLAudioElement.cpp
+++ b/content/html/content/src/HTMLAudioElement.cpp
@@ -30,19 +30,19 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Audio)
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_ADDREF_INHERITED(HTMLAudioElement, HTMLMediaElement)
 NS_IMPL_RELEASE_INHERITED(HTMLAudioElement, HTMLMediaElement)
 
 NS_INTERFACE_TABLE_HEAD(HTMLAudioElement)
   NS_HTML_CONTENT_INTERFACES(HTMLMediaElement)
-NS_HTML_CONTENT_INTERFACE_TABLE4(HTMLAudioElement, nsIDOMHTMLMediaElement,
-                                 nsIDOMHTMLAudioElement, nsITimerCallback,
-                                 nsIAudioChannelAgentCallback)
+  NS_INTERFACE_TABLE_INHERITED4(HTMLAudioElement, nsIDOMHTMLMediaElement,
+                                nsIDOMHTMLAudioElement, nsITimerCallback,
+                                nsIAudioChannelAgentCallback)
 NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLAudioElement,
                                              HTMLMediaElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLAudioElement)
 
 
 HTMLAudioElement::HTMLAudioElement(already_AddRefed<nsINodeInfo> aNodeInfo)
--- a/content/html/content/src/HTMLBRElement.cpp
+++ b/content/html/content/src/HTMLBRElement.cpp
@@ -30,17 +30,17 @@ HTMLBRElement::~HTMLBRElement()
 
 NS_IMPL_ADDREF_INHERITED(HTMLBRElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLBRElement, Element)
 
 
 // QueryInterface implementation for HTMLBRElement
 NS_INTERFACE_TABLE_HEAD(HTMLBRElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLBRElement, nsIDOMHTMLBRElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLBRElement, nsIDOMHTMLBRElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLBRElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLBRElement)
 
 
--- a/content/html/content/src/HTMLBodyElement.cpp
+++ b/content/html/content/src/HTMLBodyElement.cpp
@@ -200,17 +200,17 @@ HTMLBodyElement::WrapNode(JSContext *aCx
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLBodyElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLBodyElement, Element)
 
 // QueryInterface implementation for HTMLBodyElement
 NS_INTERFACE_TABLE_HEAD(HTMLBodyElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLBodyElement, nsIDOMHTMLBodyElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLBodyElement, nsIDOMHTMLBodyElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLBodyElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLBodyElement)
 
 NS_IMETHODIMP 
 HTMLBodyElement::SetBackground(const nsAString& aBackground)
--- a/content/html/content/src/HTMLButtonElement.cpp
+++ b/content/html/content/src/HTMLButtonElement.cpp
@@ -80,19 +80,19 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED_1(HTM
 
 NS_IMPL_ADDREF_INHERITED(HTMLButtonElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLButtonElement, Element)
 
 
 // QueryInterface implementation for HTMLButtonElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLButtonElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE2(HTMLButtonElement,
-                                   nsIDOMHTMLButtonElement,
-                                   nsIConstraintValidation)
+  NS_INTERFACE_TABLE_INHERITED2(HTMLButtonElement,
+                                nsIDOMHTMLButtonElement,
+                                nsIConstraintValidation)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLButtonElement,
                                                nsGenericHTMLFormElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 // nsIConstraintValidation
 NS_IMPL_NSICONSTRAINTVALIDATION(HTMLButtonElement)
 
 // nsIDOMHTMLButtonElement
--- a/content/html/content/src/HTMLCanvasElement.cpp
+++ b/content/html/content/src/HTMLCanvasElement.cpp
@@ -156,19 +156,19 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED_4(HTM
                                      mCurrentContext, mPrintCallback,
                                      mPrintState, mOriginalCanvas)
 
 NS_IMPL_ADDREF_INHERITED(HTMLCanvasElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLCanvasElement, Element)
 
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLCanvasElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE2(HTMLCanvasElement,
-                                   nsIDOMHTMLCanvasElement,
-                                   nsICanvasElementExternal)
+  NS_INTERFACE_TABLE_INHERITED2(HTMLCanvasElement,
+                                nsIDOMHTMLCanvasElement,
+                                nsICanvasElementExternal)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLCanvasElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLCanvasElement)
 
 /* virtual */ JSObject*
 HTMLCanvasElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aScope)
--- a/content/html/content/src/HTMLDataElement.cpp
+++ b/content/html/content/src/HTMLDataElement.cpp
@@ -22,17 +22,17 @@ HTMLDataElement::~HTMLDataElement()
 {
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLDataElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLDataElement, Element)
 
 NS_INTERFACE_TABLE_HEAD(HTMLDataElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE0(HTMLDataElement)
+  NS_INTERFACE_TABLE_INHERITED0(HTMLDataElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLDataElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLDataElement)
 
 JSObject*
 HTMLDataElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aScope)
--- a/content/html/content/src/HTMLDataListElement.cpp
+++ b/content/html/content/src/HTMLDataListElement.cpp
@@ -24,18 +24,18 @@ HTMLDataListElement::WrapNode(JSContext 
 NS_IMPL_CYCLE_COLLECTION_INHERITED_1(HTMLDataListElement, nsGenericHTMLElement,
                                      mOptions)
 
 NS_IMPL_ADDREF_INHERITED(HTMLDataListElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLDataListElement, Element)
 
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLDataListElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLDataListElement,
-                                   nsIDOMHTMLDataListElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLDataListElement,
+                                nsIDOMHTMLDataListElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLDataListElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLDataListElement)
 
 bool
--- a/content/html/content/src/HTMLDivElement.cpp
+++ b/content/html/content/src/HTMLDivElement.cpp
@@ -21,17 +21,17 @@ HTMLDivElement::~HTMLDivElement()
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLDivElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLDivElement, Element)
 
 // QueryInterface implementation for HTMLDivElement
 NS_INTERFACE_TABLE_HEAD(HTMLDivElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLDivElement, nsIDOMHTMLDivElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLDivElement, nsIDOMHTMLDivElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLDivElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLDivElement)
 
 JSObject*
 HTMLDivElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
--- a/content/html/content/src/HTMLElement.cpp
+++ b/content/html/content/src/HTMLElement.cpp
@@ -52,17 +52,17 @@ HTMLElement::~HTMLElement()
 {
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLElement, Element)
 
 NS_INTERFACE_TABLE_HEAD(HTMLElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE0(HTMLElement)
+  NS_INTERFACE_TABLE_INHERITED0(HTMLElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLElement)
 
 void
 HTMLElement::GetInnerHTML(nsAString& aInnerHTML, ErrorResult& aError)
--- a/content/html/content/src/HTMLFieldSetElement.cpp
+++ b/content/html/content/src/HTMLFieldSetElement.cpp
@@ -41,19 +41,19 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED_2(HTM
                                      mValidity, mElements)
 
 NS_IMPL_ADDREF_INHERITED(HTMLFieldSetElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLFieldSetElement, Element)
 
 // QueryInterface implementation for HTMLFieldSetElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLFieldSetElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE2(HTMLFieldSetElement,
-                                   nsIDOMHTMLFieldSetElement,
-                                   nsIConstraintValidation)
+  NS_INTERFACE_TABLE_INHERITED2(HTMLFieldSetElement,
+                                nsIDOMHTMLFieldSetElement,
+                                nsIConstraintValidation)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLFieldSetElement,
                                                nsGenericHTMLFormElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLFieldSetElement)
 
 
 NS_IMPL_BOOL_ATTR(HTMLFieldSetElement, Disabled, disabled)
--- a/content/html/content/src/HTMLFontElement.cpp
+++ b/content/html/content/src/HTMLFontElement.cpp
@@ -28,17 +28,17 @@ HTMLFontElement::WrapNode(JSContext *aCx
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLFontElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLFontElement, Element)
 
 // QueryInterface implementation for HTMLFontElement
 NS_INTERFACE_TABLE_HEAD(HTMLFontElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLFontElement, nsIDOMHTMLFontElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLFontElement, nsIDOMHTMLFontElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLFontElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLFontElement)
 
 NS_IMETHODIMP
--- a/content/html/content/src/HTMLFrameElement.cpp
+++ b/content/html/content/src/HTMLFrameElement.cpp
@@ -28,17 +28,17 @@ HTMLFrameElement::~HTMLFrameElement()
 
 NS_IMPL_ADDREF_INHERITED(HTMLFrameElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLFrameElement, Element)
 
 
 // QueryInterface implementation for HTMLFrameElement
 NS_INTERFACE_TABLE_HEAD(HTMLFrameElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFrameElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLFrameElement, nsIDOMHTMLFrameElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLFrameElement, nsIDOMHTMLFrameElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLFrameElement,
                                                nsGenericHTMLFrameElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLFrameElement)
 
 
--- a/content/html/content/src/HTMLFrameSetElement.cpp
+++ b/content/html/content/src/HTMLFrameSetElement.cpp
@@ -24,18 +24,18 @@ HTMLFrameSetElement::WrapNode(JSContext 
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLFrameSetElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLFrameSetElement, Element)
 
 // QueryInterface implementation for HTMLFrameSetElement
 NS_INTERFACE_TABLE_HEAD(HTMLFrameSetElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLFrameSetElement,
-                                   nsIDOMHTMLFrameSetElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLFrameSetElement,
+                                nsIDOMHTMLFrameSetElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLFrameSetElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLFrameSetElement)
 
 NS_IMETHODIMP 
--- a/content/html/content/src/HTMLHRElement.cpp
+++ b/content/html/content/src/HTMLHRElement.cpp
@@ -22,18 +22,18 @@ HTMLHRElement::~HTMLHRElement()
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLHRElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLHRElement, Element)
 
 // QueryInterface implementation for HTMLHRElement
 NS_INTERFACE_TABLE_HEAD(HTMLHRElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLHRElement,
-                                   nsIDOMHTMLHRElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLHRElement,
+                                nsIDOMHTMLHRElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLHRElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLHRElement)
 
 
--- a/content/html/content/src/HTMLHeadingElement.cpp
+++ b/content/html/content/src/HTMLHeadingElement.cpp
@@ -23,18 +23,18 @@ HTMLHeadingElement::~HTMLHeadingElement(
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLHeadingElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLHeadingElement, Element)
 
 // QueryInterface implementation for HTMLHeadingElement
 NS_INTERFACE_TABLE_HEAD(HTMLHeadingElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLHeadingElement,
-                                   nsIDOMHTMLHeadingElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLHeadingElement,
+                                nsIDOMHTMLHeadingElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLHeadingElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLHeadingElement)
 
 JSObject*
--- a/content/html/content/src/HTMLIFrameElement.cpp
+++ b/content/html/content/src/HTMLIFrameElement.cpp
@@ -32,19 +32,19 @@ HTMLIFrameElement::~HTMLIFrameElement()
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLIFrameElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLIFrameElement, Element)
 
 // QueryInterface implementation for HTMLIFrameElement
 NS_INTERFACE_TABLE_HEAD(HTMLIFrameElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFrameElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE2(HTMLIFrameElement,
-                                   nsIDOMHTMLIFrameElement,
-                                   nsIDOMGetSVGDocument)
+  NS_INTERFACE_TABLE_INHERITED2(HTMLIFrameElement,
+                                nsIDOMHTMLIFrameElement,
+                                nsIDOMGetSVGDocument)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLIFrameElement,
                                                nsGenericHTMLFrameElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLIFrameElement)
 
 NS_IMPL_STRING_ATTR(HTMLIFrameElement, Align, align)
 NS_IMPL_STRING_ATTR(HTMLIFrameElement, FrameBorder, frameborder)
--- a/content/html/content/src/HTMLImageElement.cpp
+++ b/content/html/content/src/HTMLImageElement.cpp
@@ -81,21 +81,21 @@ HTMLImageElement::~HTMLImageElement()
 
 NS_IMPL_ADDREF_INHERITED(HTMLImageElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLImageElement, Element)
 
 
 // QueryInterface implementation for HTMLImageElement
 NS_INTERFACE_TABLE_HEAD(HTMLImageElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE4(HTMLImageElement,
-                                   nsIDOMHTMLImageElement,
-                                   nsIImageLoadingContent,
-                                   imgIOnloadBlocker,
-                                   imgINotificationObserver)
+  NS_INTERFACE_TABLE_INHERITED4(HTMLImageElement,
+                                nsIDOMHTMLImageElement,
+                                nsIImageLoadingContent,
+                                imgIOnloadBlocker,
+                                imgINotificationObserver)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLImageElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLImageElement)
 
 
--- a/content/html/content/src/HTMLInputElement.cpp
+++ b/content/html/content/src/HTMLInputElement.cpp
@@ -726,25 +726,25 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_IN
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLInputElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLInputElement, Element)
 
 // QueryInterface implementation for HTMLInputElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLInputElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE8(HTMLInputElement,
-                                   nsIDOMHTMLInputElement,
-                                   nsITextControlElement,
-                                   nsIPhonetic,
-                                   imgINotificationObserver,
-                                   nsIImageLoadingContent,
-                                   imgIOnloadBlocker,
-                                   nsIDOMNSEditableElement,
-                                   nsIConstraintValidation)
+  NS_INTERFACE_TABLE_INHERITED8(HTMLInputElement,
+                                nsIDOMHTMLInputElement,
+                                nsITextControlElement,
+                                nsIPhonetic,
+                                imgINotificationObserver,
+                                nsIImageLoadingContent,
+                                imgIOnloadBlocker,
+                                nsIDOMNSEditableElement,
+                                nsIConstraintValidation)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLInputElement,
                                                nsGenericHTMLFormElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 // nsIConstraintValidation
 NS_IMPL_NSICONSTRAINTVALIDATION_EXCEPT_SETCUSTOMVALIDITY(HTMLInputElement)
 
 // nsIDOMNode
--- a/content/html/content/src/HTMLLIElement.cpp
+++ b/content/html/content/src/HTMLLIElement.cpp
@@ -23,17 +23,17 @@ HTMLLIElement::~HTMLLIElement()
 
 NS_IMPL_ADDREF_INHERITED(HTMLLIElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLLIElement, Element)
 
 
 // QueryInterface implementation for nsHTMLLIElement
 NS_INTERFACE_TABLE_HEAD(HTMLLIElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLLIElement, nsIDOMHTMLLIElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLLIElement, nsIDOMHTMLLIElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLLIElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLLIElement)
 
 NS_IMPL_STRING_ATTR(HTMLLIElement, Type, type)
 NS_IMPL_INT_ATTR(HTMLLIElement, Value, value)
--- a/content/html/content/src/HTMLLabelElement.cpp
+++ b/content/html/content/src/HTMLLabelElement.cpp
@@ -32,18 +32,18 @@ HTMLLabelElement::WrapNode(JSContext *aC
 
 
 NS_IMPL_ADDREF_INHERITED(HTMLLabelElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLLabelElement, Element)
 
 // QueryInterface implementation for HTMLLabelElement
 NS_INTERFACE_TABLE_HEAD(HTMLLabelElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLLabelElement,
-                                   nsIDOMHTMLLabelElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLLabelElement,
+                                nsIDOMHTMLLabelElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLLabelElement,
                                                nsGenericHTMLFormElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 // nsIDOMHTMLLabelElement
 
 NS_IMPL_ELEMENT_CLONE(HTMLLabelElement)
--- a/content/html/content/src/HTMLLegendElement.cpp
+++ b/content/html/content/src/HTMLLegendElement.cpp
@@ -22,17 +22,17 @@ HTMLLegendElement::~HTMLLegendElement()
 
 NS_IMPL_ADDREF_INHERITED(HTMLLegendElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLLegendElement, Element)
 
 
 // QueryInterface implementation for HTMLLegendElement
 NS_INTERFACE_TABLE_HEAD(HTMLLegendElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLLegendElement, nsIDOMHTMLLegendElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLLegendElement, nsIDOMHTMLLegendElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLLegendElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 // nsIDOMHTMLLegendElement
 
 
--- a/content/html/content/src/HTMLLinkElement.cpp
+++ b/content/html/content/src/HTMLLinkElement.cpp
@@ -51,22 +51,22 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLLinkElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLLinkElement, Element)
 
 
 // QueryInterface implementation for HTMLLinkElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLLinkElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE5(HTMLLinkElement,
-                                   nsIDOMHTMLLinkElement,
-                                   nsIDOMLinkStyle,
-                                   nsILink,
-                                   nsIStyleSheetLinkingElement,
-                                   Link)
+  NS_INTERFACE_TABLE_INHERITED5(HTMLLinkElement,
+                                nsIDOMHTMLLinkElement,
+                                nsIDOMLinkStyle,
+                                nsILink,
+                                nsIStyleSheetLinkingElement,
+                                Link)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLLinkElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLLinkElement)
 
 bool
--- a/content/html/content/src/HTMLMapElement.cpp
+++ b/content/html/content/src/HTMLMapElement.cpp
@@ -28,17 +28,17 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLMapElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLMapElement, Element)
 
 
 // QueryInterface implementation for HTMLMapElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLMapElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLMapElement, nsIDOMHTMLMapElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLMapElement, nsIDOMHTMLMapElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLMapElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLMapElement)
 
 
 nsIHTMLCollection*
--- a/content/html/content/src/HTMLMenuElement.cpp
+++ b/content/html/content/src/HTMLMenuElement.cpp
@@ -54,19 +54,19 @@ HTMLMenuElement::~HTMLMenuElement()
 
 NS_IMPL_ADDREF_INHERITED(HTMLMenuElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLMenuElement, Element)
 
 
 // QueryInterface implementation for HTMLMenuElement
 NS_INTERFACE_TABLE_HEAD(HTMLMenuElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE2(HTMLMenuElement,
-                                   nsIDOMHTMLMenuElement,
-                                   nsIHTMLMenu)
+  NS_INTERFACE_TABLE_INHERITED2(HTMLMenuElement,
+                                nsIDOMHTMLMenuElement,
+                                nsIHTMLMenu)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLMenuElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLMenuElement)
 
 NS_IMPL_BOOL_ATTR(HTMLMenuElement, Compact, compact)
 NS_IMPL_ENUM_ATTR_DEFAULT_VALUE(HTMLMenuElement, Type, type,
--- a/content/html/content/src/HTMLMenuItemElement.cpp
+++ b/content/html/content/src/HTMLMenuItemElement.cpp
@@ -172,19 +172,19 @@ HTMLMenuItemElement::~HTMLMenuItemElemen
 
 NS_IMPL_ADDREF_INHERITED(HTMLMenuItemElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLMenuItemElement, Element)
 
 
 // QueryInterface implementation for HTMLMenuItemElement
 NS_INTERFACE_TABLE_HEAD(HTMLMenuItemElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE2(HTMLMenuItemElement,
-                                   nsIDOMHTMLCommandElement,
-                                   nsIDOMHTMLMenuItemElement)
+  NS_INTERFACE_TABLE_INHERITED2(HTMLMenuItemElement,
+                                nsIDOMHTMLCommandElement,
+                                nsIDOMHTMLMenuItemElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLMenuItemElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 //NS_IMPL_ELEMENT_CLONE(HTMLMenuItemElement)
 nsresult
 HTMLMenuItemElement::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
 {
--- a/content/html/content/src/HTMLMetaElement.cpp
+++ b/content/html/content/src/HTMLMetaElement.cpp
@@ -27,17 +27,17 @@ HTMLMetaElement::~HTMLMetaElement()
 
 NS_IMPL_ADDREF_INHERITED(HTMLMetaElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLMetaElement, Element)
 
 
 // QueryInterface implementation for HTMLMetaElement
 NS_INTERFACE_TABLE_HEAD(HTMLMetaElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLMetaElement, nsIDOMHTMLMetaElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLMetaElement, nsIDOMHTMLMetaElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLMetaElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLMetaElement)
 
 
--- a/content/html/content/src/HTMLMeterElement.cpp
+++ b/content/html/content/src/HTMLMeterElement.cpp
@@ -27,18 +27,18 @@ HTMLMeterElement::~HTMLMeterElement()
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLMeterElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLMeterElement, Element)
 
 
 NS_INTERFACE_TABLE_HEAD(HTMLMeterElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLMeterElement,
-                                   nsIDOMHTMLMeterElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLMeterElement,
+                                nsIDOMHTMLMeterElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLMeterElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLMeterElement)
 
 
 nsEventStates
--- a/content/html/content/src/HTMLModElement.cpp
+++ b/content/html/content/src/HTMLModElement.cpp
@@ -24,18 +24,18 @@ HTMLModElement::~HTMLModElement()
 
 
 NS_IMPL_ADDREF_INHERITED(HTMLModElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLModElement, Element)
 
 // QueryInterface implementation for HTMLModElement
 NS_INTERFACE_TABLE_HEAD(HTMLModElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLModElement,
-                                   nsIDOMHTMLModElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLModElement,
+                                nsIDOMHTMLModElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLModElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLModElement)
 
 
--- a/content/html/content/src/HTMLObjectElement.cpp
+++ b/content/html/content/src/HTMLObjectElement.cpp
@@ -76,30 +76,29 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_IN
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mValidity)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLObjectElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLObjectElement, Element)
 
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLObjectElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(HTMLObjectElement)
-    NS_INTERFACE_TABLE_ENTRY(HTMLObjectElement, nsIDOMHTMLObjectElement)
-    NS_INTERFACE_TABLE_ENTRY(HTMLObjectElement, imgINotificationObserver)
-    NS_INTERFACE_TABLE_ENTRY(HTMLObjectElement, nsIRequestObserver)
-    NS_INTERFACE_TABLE_ENTRY(HTMLObjectElement, nsIStreamListener)
-    NS_INTERFACE_TABLE_ENTRY(HTMLObjectElement, nsIFrameLoaderOwner)
-    NS_INTERFACE_TABLE_ENTRY(HTMLObjectElement, nsIObjectLoadingContent)
-    NS_INTERFACE_TABLE_ENTRY(HTMLObjectElement, nsIImageLoadingContent)
-    NS_INTERFACE_TABLE_ENTRY(HTMLObjectElement, imgIOnloadBlocker)
-    NS_INTERFACE_TABLE_ENTRY(HTMLObjectElement, nsIInterfaceRequestor)
-    NS_INTERFACE_TABLE_ENTRY(HTMLObjectElement, nsIChannelEventSink)
-    NS_INTERFACE_TABLE_ENTRY(HTMLObjectElement, nsIConstraintValidation)
-    NS_INTERFACE_TABLE_ENTRY(HTMLObjectElement, nsIDOMGetSVGDocument)
-  NS_OFFSET_AND_INTERFACE_TABLE_END
+  NS_INTERFACE_TABLE_INHERITED12(HTMLObjectElement,
+                                 nsIDOMHTMLObjectElement,
+                                 imgINotificationObserver,
+                                 nsIRequestObserver,
+                                 nsIStreamListener,
+                                 nsIFrameLoaderOwner,
+                                 nsIObjectLoadingContent,
+                                 nsIImageLoadingContent,
+                                 imgIOnloadBlocker,
+                                 nsIInterfaceRequestor,
+                                 nsIChannelEventSink,
+                                 nsIConstraintValidation,
+                                 nsIDOMGetSVGDocument)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLObjectElement,
                                                nsGenericHTMLFormElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLObjectElement)
 
 // nsIConstraintValidation
 NS_IMPL_NSICONSTRAINTVALIDATION(HTMLObjectElement)
--- a/content/html/content/src/HTMLOptGroupElement.cpp
+++ b/content/html/content/src/HTMLOptGroupElement.cpp
@@ -42,18 +42,18 @@ HTMLOptGroupElement::~HTMLOptGroupElemen
 NS_IMPL_ADDREF_INHERITED(HTMLOptGroupElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLOptGroupElement, Element)
 
 
 
 // QueryInterface implementation for HTMLOptGroupElement
 NS_INTERFACE_TABLE_HEAD(HTMLOptGroupElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLOptGroupElement,
-                                   nsIDOMHTMLOptGroupElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLOptGroupElement,
+                                nsIDOMHTMLOptGroupElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLOptGroupElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLOptGroupElement)
 
 
--- a/content/html/content/src/HTMLOptionElement.cpp
+++ b/content/html/content/src/HTMLOptionElement.cpp
@@ -78,18 +78,18 @@ HTMLOptionElement::~HTMLOptionElement()
 
 NS_IMPL_ADDREF_INHERITED(HTMLOptionElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLOptionElement, Element)
 
 
 // QueryInterface implementation for HTMLOptionElement
 NS_INTERFACE_TABLE_HEAD(HTMLOptionElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLOptionElement,
-                                   nsIDOMHTMLOptionElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLOptionElement,
+                                nsIDOMHTMLOptionElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLOptionElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLOptionElement)
 
 
--- a/content/html/content/src/HTMLOutputElement.cpp
+++ b/content/html/content/src/HTMLOutputElement.cpp
@@ -50,20 +50,20 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTokenList)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLOutputElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLOutputElement, Element)
 
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLOutputElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE3(HTMLOutputElement,
-                                   nsIDOMHTMLOutputElement,
-                                   nsIMutationObserver,
-                                   nsIConstraintValidation)
+  NS_INTERFACE_TABLE_INHERITED3(HTMLOutputElement,
+                                nsIDOMHTMLOutputElement,
+                                nsIMutationObserver,
+                                nsIConstraintValidation)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLOutputElement,
                                                nsGenericHTMLFormElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLOutputElement)
 
 
 NS_IMPL_STRING_ATTR(HTMLOutputElement, Name, name)
--- a/content/html/content/src/HTMLParagraphElement.cpp
+++ b/content/html/content/src/HTMLParagraphElement.cpp
@@ -21,18 +21,18 @@ HTMLParagraphElement::~HTMLParagraphElem
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLParagraphElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLParagraphElement, Element)
 
 // QueryInterface implementation for nsHTMLParagraphElement
 NS_INTERFACE_TABLE_HEAD(HTMLParagraphElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLParagraphElement,
-                                   nsIDOMHTMLParagraphElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLParagraphElement,
+                                nsIDOMHTMLParagraphElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLParagraphElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLParagraphElement)
 
 NS_IMPL_STRING_ATTR(HTMLParagraphElement, Align, align)
 
--- a/content/html/content/src/HTMLPreElement.cpp
+++ b/content/html/content/src/HTMLPreElement.cpp
@@ -22,17 +22,17 @@ HTMLPreElement::~HTMLPreElement()
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLPreElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLPreElement, Element)
 
 // QueryInterface implementation for HTMLPreElement
 NS_INTERFACE_TABLE_HEAD(HTMLPreElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLPreElement, nsIDOMHTMLPreElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLPreElement, nsIDOMHTMLPreElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLPreElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLPreElement)
 
 NS_IMPL_INT_ATTR(HTMLPreElement, Width, width)
 
--- a/content/html/content/src/HTMLProgressElement.cpp
+++ b/content/html/content/src/HTMLProgressElement.cpp
@@ -30,18 +30,18 @@ HTMLProgressElement::~HTMLProgressElemen
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLProgressElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLProgressElement, Element)
 
 
 NS_INTERFACE_TABLE_HEAD(HTMLProgressElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLProgressElement,
-                                   nsIDOMHTMLProgressElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLProgressElement,
+                                nsIDOMHTMLProgressElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLProgressElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLProgressElement)
 
 
 nsEventStates
--- a/content/html/content/src/HTMLScriptElement.cpp
+++ b/content/html/content/src/HTMLScriptElement.cpp
@@ -49,21 +49,21 @@ HTMLScriptElement::~HTMLScriptElement()
 
 
 NS_IMPL_ADDREF_INHERITED(HTMLScriptElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLScriptElement, Element)
 
 // QueryInterface implementation for HTMLScriptElement
 NS_INTERFACE_TABLE_HEAD(HTMLScriptElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE4(HTMLScriptElement,
-                                   nsIDOMHTMLScriptElement,
-                                   nsIScriptLoaderObserver,
-                                   nsIScriptElement,
-                                   nsIMutationObserver)
+  NS_INTERFACE_TABLE_INHERITED4(HTMLScriptElement,
+                                nsIDOMHTMLScriptElement,
+                                nsIScriptLoaderObserver,
+                                nsIScriptElement,
+                                nsIMutationObserver)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLScriptElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 nsresult
 HTMLScriptElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
--- a/content/html/content/src/HTMLSelectElement.cpp
+++ b/content/html/content/src/HTMLSelectElement.cpp
@@ -143,23 +143,22 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLSelectElement,
                                                 nsGenericHTMLFormElement)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mValidity)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLSelectElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLSelectElement, Element)
 
-
 // QueryInterface implementation for HTMLSelectElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLSelectElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE2(HTMLSelectElement,
-                                   nsIDOMHTMLSelectElement,
-                                   nsIConstraintValidation)
+  NS_INTERFACE_TABLE_INHERITED2(HTMLSelectElement,
+                                nsIDOMHTMLSelectElement,
+                                nsIConstraintValidation)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLSelectElement,
                                                nsGenericHTMLFormElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 // nsIDOMHTMLSelectElement
 
 
--- a/content/html/content/src/HTMLSharedElement.cpp
+++ b/content/html/content/src/HTMLSharedElement.cpp
@@ -30,19 +30,16 @@ HTMLSharedElement::~HTMLSharedElement()
 
 NS_IMPL_ADDREF_INHERITED(HTMLSharedElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLSharedElement, Element)
 
 // QueryInterface implementation for HTMLSharedElement
 NS_INTERFACE_TABLE_HEAD(HTMLSharedElement)
   NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(nsGenericHTMLElement,
                                        nsIDOMHTMLParamElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE_AMBIGUOUS_BEGIN(HTMLSharedElement,
-                                                  nsIDOMHTMLParamElement)
-  NS_OFFSET_AND_INTERFACE_TABLE_END
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE_AMBIGUOUS(HTMLSharedElement,
                                                          nsGenericHTMLElement,
                                                          nsIDOMHTMLParamElement)
   NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLParamElement, param)
   NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLBaseElement, base)
   NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLDirectoryElement, dir)
   NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLQuoteElement, q)
   NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLQuoteElement, blockquote)
--- a/content/html/content/src/HTMLSharedListElement.cpp
+++ b/content/html/content/src/HTMLSharedListElement.cpp
@@ -26,19 +26,16 @@ HTMLSharedListElement::~HTMLSharedListEl
 
 NS_IMPL_ADDREF_INHERITED(HTMLSharedListElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLSharedListElement, Element)
 
 // QueryInterface implementation for nsHTMLSharedListElement
 NS_INTERFACE_TABLE_HEAD(HTMLSharedListElement)
   NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(nsGenericHTMLElement,
                                        nsIDOMHTMLOListElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE_AMBIGUOUS_BEGIN(HTMLSharedListElement,
-                                                  nsIDOMHTMLOListElement)
-  NS_OFFSET_AND_INTERFACE_TABLE_END
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE_AMBIGUOUS(HTMLSharedListElement,
                                                          nsGenericHTMLElement,
                                                          nsIDOMHTMLOListElement)
   NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLOListElement, ol)
   NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLDListElement, dl)
   NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLUListElement, ul)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
--- a/content/html/content/src/HTMLSharedObjectElement.cpp
+++ b/content/html/content/src/HTMLSharedObjectElement.cpp
@@ -89,28 +89,26 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLSharedObjectElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLSharedObjectElement, Element)
 
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLSharedObjectElement)
   NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(nsGenericHTMLElement,
                                        nsIDOMHTMLAppletElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE_AMBIGUOUS_BEGIN(HTMLSharedObjectElement,
-                                                  nsIDOMHTMLAppletElement)
-    NS_INTERFACE_TABLE_ENTRY(HTMLSharedObjectElement, nsIRequestObserver)
-    NS_INTERFACE_TABLE_ENTRY(HTMLSharedObjectElement, nsIStreamListener)
-    NS_INTERFACE_TABLE_ENTRY(HTMLSharedObjectElement, nsIFrameLoaderOwner)
-    NS_INTERFACE_TABLE_ENTRY(HTMLSharedObjectElement, nsIObjectLoadingContent)
-    NS_INTERFACE_TABLE_ENTRY(HTMLSharedObjectElement, imgINotificationObserver)
-    NS_INTERFACE_TABLE_ENTRY(HTMLSharedObjectElement, nsIImageLoadingContent)
-    NS_INTERFACE_TABLE_ENTRY(HTMLSharedObjectElement, imgIOnloadBlocker)
-    NS_INTERFACE_TABLE_ENTRY(HTMLSharedObjectElement, nsIInterfaceRequestor)
-    NS_INTERFACE_TABLE_ENTRY(HTMLSharedObjectElement, nsIChannelEventSink)
-  NS_OFFSET_AND_INTERFACE_TABLE_END
+  NS_INTERFACE_TABLE_INHERITED9(HTMLSharedObjectElement,
+                                nsIRequestObserver,
+                                nsIStreamListener,
+                                nsIFrameLoaderOwner,
+                                nsIObjectLoadingContent,
+                                imgINotificationObserver,
+                                nsIImageLoadingContent,
+                                imgIOnloadBlocker,
+                                nsIInterfaceRequestor,
+                                nsIChannelEventSink)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE_AMBIGUOUS(HTMLSharedObjectElement,
                                                          nsGenericHTMLElement,
                                                          nsIDOMHTMLAppletElement)
   NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLAppletElement, applet)
   NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLEmbedElement, embed)
   NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMGetSVGDocument, embed)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
--- a/content/html/content/src/HTMLSourceElement.cpp
+++ b/content/html/content/src/HTMLSourceElement.cpp
@@ -26,17 +26,17 @@ HTMLSourceElement::~HTMLSourceElement()
 NS_IMPL_ADDREF_INHERITED(HTMLSourceElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLSourceElement, Element)
 
 
 
 // QueryInterface implementation for HTMLSourceElement
 NS_INTERFACE_TABLE_HEAD(HTMLSourceElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLSourceElement, nsIDOMHTMLSourceElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLSourceElement, nsIDOMHTMLSourceElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLSourceElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLSourceElement)
 
 
--- a/content/html/content/src/HTMLSpanElement.cpp
+++ b/content/html/content/src/HTMLSpanElement.cpp
@@ -21,17 +21,17 @@ HTMLSpanElement::~HTMLSpanElement()
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLSpanElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLSpanElement, Element)
 
 // QueryInterface implementation for HTMLSpanElement
 NS_INTERFACE_TABLE_HEAD(HTMLSpanElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE0(HTMLSpanElement)
+  NS_INTERFACE_TABLE_INHERITED0(HTMLSpanElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLSpanElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLSpanElement)
 
 JSObject*
--- a/content/html/content/src/HTMLStyleElement.cpp
+++ b/content/html/content/src/HTMLStyleElement.cpp
@@ -43,21 +43,21 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLStyleElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLStyleElement, Element)
 
 
 // QueryInterface implementation for HTMLStyleElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLStyleElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE4(HTMLStyleElement,
-                                   nsIDOMHTMLStyleElement,
-                                   nsIDOMLinkStyle,
-                                   nsIStyleSheetLinkingElement,
-                                   nsIMutationObserver)
+  NS_INTERFACE_TABLE_INHERITED4(HTMLStyleElement,
+                                nsIDOMHTMLStyleElement,
+                                nsIDOMLinkStyle,
+                                nsIStyleSheetLinkingElement,
+                                nsIMutationObserver)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLStyleElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLStyleElement)
 
 
 NS_IMETHODIMP
--- a/content/html/content/src/HTMLTableCaptionElement.cpp
+++ b/content/html/content/src/HTMLTableCaptionElement.cpp
@@ -27,18 +27,18 @@ HTMLTableCaptionElement::WrapNode(JSCont
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLTableCaptionElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLTableCaptionElement, Element)
 
 // QueryInterface implementation for HTMLTableCaptionElement
 NS_INTERFACE_TABLE_HEAD(HTMLTableCaptionElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLTableCaptionElement,
-                                   nsIDOMHTMLTableCaptionElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLTableCaptionElement,
+                                nsIDOMHTMLTableCaptionElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLTableCaptionElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLTableCaptionElement)
 
 NS_IMPL_STRING_ATTR(HTMLTableCaptionElement, Align, align)
 
--- a/content/html/content/src/HTMLTableCellElement.cpp
+++ b/content/html/content/src/HTMLTableCellElement.cpp
@@ -31,18 +31,18 @@ HTMLTableCellElement::WrapNode(JSContext
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLTableCellElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLTableCellElement, Element)
 
 // QueryInterface implementation for HTMLTableCellElement
 NS_INTERFACE_TABLE_HEAD(HTMLTableCellElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLTableCellElement,
-                                   nsIDOMHTMLTableCellElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLTableCellElement,
+                                nsIDOMHTMLTableCellElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLTableCellElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLTableCellElement)
 
 
--- a/content/html/content/src/HTMLTableColElement.cpp
+++ b/content/html/content/src/HTMLTableColElement.cpp
@@ -31,18 +31,18 @@ HTMLTableColElement::WrapNode(JSContext 
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLTableColElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLTableColElement, Element)
 
 // QueryInterface implementation for HTMLTableColElement
 NS_INTERFACE_TABLE_HEAD(HTMLTableColElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLTableColElement,
-                                   nsIDOMHTMLTableColElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLTableColElement,
+                                nsIDOMHTMLTableColElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLTableColElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLTableColElement)
 
 NS_IMETHODIMP
 HTMLTableColElement::SetSpan(int32_t aSpan)
--- a/content/html/content/src/HTMLTableElement.cpp
+++ b/content/html/content/src/HTMLTableElement.cpp
@@ -328,17 +328,17 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLTableElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLTableElement, Element)
 
 // QueryInterface implementation for HTMLTableElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTableElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLTableElement, nsIDOMHTMLTableElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLTableElement, nsIDOMHTMLTableElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLTableElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLTableElement)
 
 
--- a/content/html/content/src/HTMLTableRowElement.cpp
+++ b/content/html/content/src/HTMLTableRowElement.cpp
@@ -32,18 +32,18 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLTableRowElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLTableRowElement, Element)
 
 // QueryInterface implementation for HTMLTableRowElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTableRowElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLTableRowElement,
-                                   nsIDOMHTMLTableRowElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLTableRowElement,
+                                nsIDOMHTMLTableRowElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLTableRowElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLTableRowElement)
 
 
--- a/content/html/content/src/HTMLTableSectionElement.cpp
+++ b/content/html/content/src/HTMLTableSectionElement.cpp
@@ -32,18 +32,18 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_ADDREF_INHERITED(HTMLTableSectionElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLTableSectionElement, Element)
 
 // QueryInterface implementation for HTMLTableSectionElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTableSectionElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLTableSectionElement,
-                                   nsIDOMHTMLTableSectionElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLTableSectionElement,
+                                nsIDOMHTMLTableSectionElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLTableSectionElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLTableSectionElement)
 
 NS_IMETHODIMP
--- a/content/html/content/src/HTMLTemplateElement.cpp
+++ b/content/html/content/src/HTMLTemplateElement.cpp
@@ -68,17 +68,17 @@ NS_IMPL_RELEASE_INHERITED(HTMLTemplateEl
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED_1(HTMLTemplateElement,
                                      nsGenericHTMLElement,
                                      mContent)
 
 // QueryInterface implementation for HTMLTemplateElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTemplateElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE0(HTMLTemplateElement)
+  NS_INTERFACE_TABLE_INHERITED0(HTMLTemplateElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLTemplateElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(HTMLTemplateElement)
 
 JSObject*
 HTMLTemplateElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
--- a/content/html/content/src/HTMLTextAreaElement.cpp
+++ b/content/html/content/src/HTMLTextAreaElement.cpp
@@ -83,22 +83,22 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED_3(HTM
 
 NS_IMPL_ADDREF_INHERITED(HTMLTextAreaElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLTextAreaElement, Element)
 
 
 // QueryInterface implementation for HTMLTextAreaElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTextAreaElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLFormElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE5(HTMLTextAreaElement,
-                                   nsIDOMHTMLTextAreaElement,
-                                   nsITextControlElement,
-                                   nsIDOMNSEditableElement,
-                                   nsIMutationObserver,
-                                   nsIConstraintValidation)
+  NS_INTERFACE_TABLE_INHERITED5(HTMLTextAreaElement,
+                                nsIDOMHTMLTextAreaElement,
+                                nsITextControlElement,
+                                nsIDOMNSEditableElement,
+                                nsIMutationObserver,
+                                nsIConstraintValidation)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLTextAreaElement,
                                                nsGenericHTMLFormElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 // nsIDOMHTMLTextAreaElement
 
 
--- a/content/html/content/src/HTMLTimeElement.cpp
+++ b/content/html/content/src/HTMLTimeElement.cpp
@@ -25,17 +25,17 @@ HTMLTimeElement::~HTMLTimeElement()
 {
 }
 
 NS_IMPL_ADDREF_INHERITED(HTMLTimeElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLTimeElement, Element)
 
 NS_INTERFACE_TABLE_HEAD(HTMLTimeElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE0(HTMLTimeElement)
+  NS_INTERFACE_TABLE_INHERITED0(HTMLTimeElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLTimeElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLTimeElement)
 
 JSObject*
 HTMLTimeElement::WrapNode(JSContext* cx, JS::Handle<JSObject*> scope)
--- a/content/html/content/src/HTMLTitleElement.cpp
+++ b/content/html/content/src/HTMLTitleElement.cpp
@@ -36,19 +36,19 @@ NS_IMPL_RELEASE_INHERITED(HTMLTitleEleme
 } // namespace mozilla
 
 namespace mozilla {
 namespace dom {
 
 // QueryInterface implementation for HTMLTitleElement
 NS_INTERFACE_TABLE_HEAD(HTMLTitleElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE2(HTMLTitleElement,
-                                   nsIDOMHTMLTitleElement,
-                                   nsIMutationObserver)
+  NS_INTERFACE_TABLE_INHERITED2(HTMLTitleElement,
+                                nsIDOMHTMLTitleElement,
+                                nsIMutationObserver)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLTitleElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLTitleElement)
 
 JSObject*
--- a/content/html/content/src/HTMLUnknownElement.cpp
+++ b/content/html/content/src/HTMLUnknownElement.cpp
@@ -32,18 +32,18 @@ HTMLUnknownElement::WrapNode(JSContext *
     }
   }
   return obj;
 }
 
 // QueryInterface implementation for HTMLUnknownElement
 NS_INTERFACE_TABLE_HEAD(HTMLUnknownElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLUnknownElement,
-                                   nsIDOMHTMLUnknownElement)
+  NS_INTERFACE_TABLE_INHERITED1(HTMLUnknownElement,
+                                nsIDOMHTMLUnknownElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLUnknownElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLUnknownElement)
 
 } // namespace dom
 } // namespace mozilla
--- a/content/html/content/src/HTMLVideoElement.cpp
+++ b/content/html/content/src/HTMLVideoElement.cpp
@@ -39,17 +39,17 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Video)
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_ADDREF_INHERITED(HTMLVideoElement, HTMLMediaElement)
 NS_IMPL_RELEASE_INHERITED(HTMLVideoElement, HTMLMediaElement)
 
 NS_INTERFACE_TABLE_HEAD(HTMLVideoElement)
   NS_HTML_CONTENT_INTERFACES(HTMLMediaElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE2(HTMLVideoElement, nsIDOMHTMLMediaElement, nsIDOMHTMLVideoElement)
+  NS_INTERFACE_TABLE_INHERITED2(HTMLVideoElement, nsIDOMHTMLMediaElement, nsIDOMHTMLVideoElement)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLVideoElement,
                                                HTMLMediaElement)
 NS_HTML_CONTENT_INTERFACE_MAP_END
 
 NS_IMPL_ELEMENT_CLONE(HTMLVideoElement)
 
 // nsIDOMHTMLVideoElement
 NS_IMPL_INT_ATTR(HTMLVideoElement, Width, width)
--- a/content/html/content/src/nsGenericHTMLElement.h
+++ b/content/html/content/src/nsGenericHTMLElement.h
@@ -1435,28 +1435,19 @@ protected:
   {                                                                                               \
     return SetAttrHelper(nsGkAtoms::_atom, aValue);                                               \
   }
 
 /**
  * QueryInterface() implementation helper macros
  */
 
-#define NS_HTML_CONTENT_INTERFACE_TABLE_AMBIGUOUS_BEGIN(_class, _base)        \
-  NS_NODE_OFFSET_AND_INTERFACE_TABLE_BEGIN(_class)                            \
-    NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsIDOMNode, _base)             \
-    NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsIDOMElement, _base)          \
-    NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsIDOMHTMLElement, _base)
-
-#define NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class)                         \
-  NS_HTML_CONTENT_INTERFACE_TABLE_AMBIGUOUS_BEGIN(_class, nsIDOMHTMLElement)
-
 #define NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE_AMBIGUOUS(_class, _base, \
                                                                _base_if)      \
-  NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE
+  NS_INTERFACE_TABLE_TO_MAP_SEGUE
 
 #define NS_HTML_CONTENT_INTERFACES_AMBIGUOUS(_base, _base_if)                 \
   {                                                                           \
     nsresult html_rv = _base::QueryInterface(aIID, aInstancePtr);             \
     if (NS_SUCCEEDED(html_rv))                                                \
       return html_rv;                                                         \
                                                                               \
     html_rv = DOMQueryInterface(static_cast<_base_if *>(this), aIID,          \
@@ -1489,120 +1480,16 @@ protected:
       aIID.Equals(NS_GET_IID(nsXPCClassInfo))) {             \
     foundInterface = _getter ();                             \
     if (!foundInterface) {                                   \
       *aInstancePtr = nullptr;                                \
       return NS_ERROR_OUT_OF_MEMORY;                         \
     }                                                        \
   } else
 
-#define NS_HTML_CONTENT_INTERFACE_TABLE0(_class)                              \
-  NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class)                               \
-  NS_OFFSET_AND_INTERFACE_TABLE_END
-
-#define NS_HTML_CONTENT_INTERFACE_TABLE1(_class, _i1)                         \
-  NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class)                               \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i1)                                     \
-  NS_OFFSET_AND_INTERFACE_TABLE_END
-
-#define NS_HTML_CONTENT_INTERFACE_TABLE2(_class, _i1, _i2)                    \
-  NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class)                               \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i1)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i2)                                     \
-  NS_OFFSET_AND_INTERFACE_TABLE_END
-
-#define NS_HTML_CONTENT_INTERFACE_TABLE3(_class, _i1, _i2, _i3)          \
-  NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class)                               \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i1)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i2)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i3)                                     \
-  NS_OFFSET_AND_INTERFACE_TABLE_END
-
-#define NS_HTML_CONTENT_INTERFACE_TABLE4(_class, _i1, _i2, _i3, _i4)          \
-  NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class)                               \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i1)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i2)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i3)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i4)                                     \
-  NS_OFFSET_AND_INTERFACE_TABLE_END
-
-#define NS_HTML_CONTENT_INTERFACE_TABLE5(_class, _i1, _i2, _i3, _i4, _i5)     \
-  NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class)                               \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i1)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i2)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i3)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i4)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i5)                                     \
-  NS_OFFSET_AND_INTERFACE_TABLE_END
-
-#define NS_HTML_CONTENT_INTERFACE_TABLE6(_class, _i1, _i2, _i3, _i4, _i5,     \
-                                         _i6)                                 \
-  NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class)                               \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i1)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i2)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i3)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i4)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i5)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i6)                                     \
-  NS_OFFSET_AND_INTERFACE_TABLE_END
-
-#define NS_HTML_CONTENT_INTERFACE_TABLE7(_class, _i1, _i2, _i3, _i4, _i5,     \
-                                         _i6, _i7)                            \
-  NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class)                               \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i1)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i2)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i3)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i4)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i5)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i6)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i7)                                     \
-  NS_OFFSET_AND_INTERFACE_TABLE_END
-
-#define NS_HTML_CONTENT_INTERFACE_TABLE8(_class, _i1, _i2, _i3, _i4, _i5,     \
-                                         _i6, _i7, _i8)                       \
-  NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class)                               \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i1)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i2)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i3)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i4)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i5)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i6)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i7)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i8)                                     \
-  NS_OFFSET_AND_INTERFACE_TABLE_END
-
-#define NS_HTML_CONTENT_INTERFACE_TABLE9(_class, _i1, _i2, _i3, _i4, _i5,     \
-                                         _i6, _i7, _i8, _i9)                  \
-  NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class)                               \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i1)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i2)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i3)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i4)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i5)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i6)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i7)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i8)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i9)                                     \
-  NS_OFFSET_AND_INTERFACE_TABLE_END
-
-#define NS_HTML_CONTENT_INTERFACE_TABLE10(_class, _i1, _i2, _i3, _i4, _i5,    \
-                                          _i6, _i7, _i8, _i9, _i10)           \
-  NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(_class)                               \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i1)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i2)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i3)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i4)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i5)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i6)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i7)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i8)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i9)                                     \
-    NS_INTERFACE_TABLE_ENTRY(_class, _i10)                                    \
-  NS_OFFSET_AND_INTERFACE_TABLE_END
-
 #define NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC                                \
   NS_IMETHOD GetId(nsAString& aId) MOZ_FINAL {                                 \
     mozilla::dom::Element::GetId(aId);                                         \
     return NS_OK;                                                              \
   }                                                                            \
   NS_IMETHOD SetId(const nsAString& aId) MOZ_FINAL {                           \
     mozilla::dom::Element::SetId(aId);                                         \
     return NS_OK;                                                              \
--- a/content/html/content/src/nsHTMLFormElement.cpp
+++ b/content/html/content/src/nsHTMLFormElement.cpp
@@ -297,21 +297,21 @@ NS_IMPL_ADDREF_INHERITED(nsHTMLFormEleme
 NS_IMPL_RELEASE_INHERITED(nsHTMLFormElement, Element)
 
 
 DOMCI_NODE_DATA(HTMLFormElement, nsHTMLFormElement)
 
 // QueryInterface implementation for nsHTMLFormElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(nsHTMLFormElement)
   NS_HTML_CONTENT_INTERFACES(nsGenericHTMLElement)
-  NS_HTML_CONTENT_INTERFACE_TABLE4(nsHTMLFormElement,
-                                   nsIDOMHTMLFormElement,
-                                   nsIForm,
-                                   nsIWebProgressListener,
-                                   nsIRadioGroupContainer)
+  NS_INTERFACE_TABLE_INHERITED4(nsHTMLFormElement,
+                                nsIDOMHTMLFormElement,
+                                nsIForm,
+                                nsIWebProgressListener,
+                                nsIRadioGroupContainer)
   NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(nsHTMLFormElement,
                                                nsGenericHTMLElement)
 NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLFormElement)
 
 
 // nsIDOMHTMLFormElement
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(nsHTMLFormElement)