From 0eae5efa79a3c0d0488f812726404ff3c8c97311 Mon Sep 17 00:00:00 2001 From: Peter Van der Beken Date: Tue, 21 May 2013 21:59:27 +0200 Subject: [PATCH] Bug 877654 - Remove thisptr offset tables - Remove offset tables from non-HTMLElement objects and remove offset table macros. r=Ms2ger. --HG-- extra : rebase_source : 6d6fbb260c564d295d33c76a1b21ffd7187eeae2 --- content/base/public/FragmentOrElement.h | 4 +- content/base/public/nsINode.h | 122 ------------------ content/base/src/Attr.cpp | 7 +- content/base/src/FragmentOrElement.cpp | 2 - content/base/src/nsDOMLists.cpp | 6 +- content/base/src/nsDocument.cpp | 17 +-- content/base/src/nsDocument.h | 6 - content/html/document/src/ImageDocument.cpp | 10 +- content/html/document/src/nsHTMLDocument.cpp | 9 +- .../mathml/content/src/nsMathMLElement.cpp | 11 +- content/svg/content/src/SVGFEImageElement.cpp | 13 +- content/svg/content/src/SVGMPathElement.cpp | 8 +- content/svg/content/src/SVGStyleElement.cpp | 9 +- content/svg/content/src/SVGSwitchElement.cpp | 4 +- content/svg/content/src/SVGUseElement.cpp | 6 +- content/xml/content/src/nsXMLElement.cpp | 5 +- content/xml/document/src/XMLDocument.cpp | 12 +- content/xul/content/src/nsXULElement.cpp | 7 +- content/xul/document/src/XULDocument.cpp | 12 +- 19 files changed, 50 insertions(+), 220 deletions(-) diff --git a/content/base/public/FragmentOrElement.h b/content/base/public/FragmentOrElement.h index e951999a009..98135e93b85 100644 --- a/content/base/public/FragmentOrElement.h +++ b/content/base/public/FragmentOrElement.h @@ -425,11 +425,11 @@ private: }; #define NS_ELEMENT_INTERFACE_TABLE_TO_MAP_SEGUE \ - rv = FragmentOrElement::QueryInterface(aIID, aInstancePtr); \ if (NS_SUCCEEDED(rv)) \ return rv; \ \ - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE + rv = FragmentOrElement::QueryInterface(aIID, aInstancePtr); \ + NS_INTERFACE_TABLE_TO_MAP_SEGUE #define NS_ELEMENT_INTERFACE_MAP_END \ { \ diff --git a/content/base/public/nsINode.h b/content/base/public/nsINode.h index 7f81bc8960f..623347f5a8f 100644 --- a/content/base/public/nsINode.h +++ b/content/base/public/nsINode.h @@ -1797,128 +1797,6 @@ private: nsCOMPtr mNode; }; -extern const nsIID kThisPtrOffsetsSID; - -// _implClass is the class to use to cast to nsISupports -#define NS_OFFSET_AND_INTERFACE_TABLE_BEGIN_AMBIGUOUS(_class, _implClass) \ - static const QITableEntry offsetAndQITable[] = { \ - NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsISupports, _implClass) - -#define NS_OFFSET_AND_INTERFACE_TABLE_BEGIN(_class) \ - NS_OFFSET_AND_INTERFACE_TABLE_BEGIN_AMBIGUOUS(_class, _class) - -#define NS_OFFSET_AND_INTERFACE_TABLE_END \ - { nullptr, 0 } }; \ - if (aIID.Equals(kThisPtrOffsetsSID)) { \ - *aInstancePtr = \ - const_cast(static_cast(&offsetAndQITable)); \ - return NS_OK; \ - } - -#define NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE \ - rv = NS_TableDrivenQI(this, offsetAndQITable, aIID, aInstancePtr); \ - NS_INTERFACE_TABLE_TO_MAP_SEGUE - -// nsNodeSH::PreCreate() depends on the identity pointer being the same as -// nsINode, so if you change the nsISupports line below, make sure -// nsNodeSH::PreCreate() still does the right thing! -#define NS_NODE_OFFSET_AND_INTERFACE_TABLE_BEGIN(_class) \ - NS_OFFSET_AND_INTERFACE_TABLE_BEGIN_AMBIGUOUS(_class, nsINode) \ - NS_INTERFACE_TABLE_ENTRY(_class, nsINode) - -#define NS_NODE_INTERFACE_TABLE1(_class, _i1) \ - NS_NODE_OFFSET_AND_INTERFACE_TABLE_BEGIN(_class) \ - NS_INTERFACE_TABLE_ENTRY(_class, _i1) \ - NS_OFFSET_AND_INTERFACE_TABLE_END \ - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE - -#define NS_NODE_INTERFACE_TABLE2(_class, _i1, _i2) \ - NS_NODE_OFFSET_AND_INTERFACE_TABLE_BEGIN(_class) \ - NS_INTERFACE_TABLE_ENTRY(_class, _i1) \ - NS_INTERFACE_TABLE_ENTRY(_class, _i2) \ - NS_OFFSET_AND_INTERFACE_TABLE_END \ - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE - -#define NS_NODE_INTERFACE_TABLE3(_class, _i1, _i2, _i3) \ - NS_NODE_OFFSET_AND_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 \ - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE - -#define NS_NODE_INTERFACE_TABLE4(_class, _i1, _i2, _i3, _i4) \ - NS_NODE_OFFSET_AND_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 \ - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE - -#define NS_NODE_INTERFACE_TABLE5(_class, _i1, _i2, _i3, _i4, _i5) \ - NS_NODE_OFFSET_AND_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 \ - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE - -#define NS_NODE_INTERFACE_TABLE6(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ - NS_NODE_OFFSET_AND_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 \ - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE - -#define NS_NODE_INTERFACE_TABLE7(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) \ - NS_NODE_OFFSET_AND_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 \ - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE - -#define NS_NODE_INTERFACE_TABLE8(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ - _i8) \ - NS_NODE_OFFSET_AND_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 \ - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE - -#define NS_NODE_INTERFACE_TABLE9(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ - _i8, _i9) \ - NS_NODE_OFFSET_AND_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 \ - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE - - NS_DEFINE_STATIC_IID_ACCESSOR(nsINode, NS_INODE_IID) #define NS_FORWARD_NSIDOMNODE_TO_NSINODE_HELPER(...) \ diff --git a/content/base/src/Attr.cpp b/content/base/src/Attr.cpp index 7598af882c9..85c4f2574c7 100644 --- a/content/base/src/Attr.cpp +++ b/content/base/src/Attr.cpp @@ -100,10 +100,9 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END // QueryInterface implementation for Attr NS_INTERFACE_TABLE_HEAD(Attr) NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY - NS_NODE_INTERFACE_TABLE5(Attr, nsIDOMAttr, nsIAttribute, nsIDOMNode, - nsIDOMEventTarget, EventTarget) - NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(Attr) - NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAttribute) + NS_INTERFACE_TABLE6(Attr, nsINode, nsIDOMAttr, nsIAttribute, nsIDOMNode, + nsIDOMEventTarget, EventTarget) + NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(Attr) NS_INTERFACE_MAP_ENTRY_TEAROFF(nsISupportsWeakReference, new nsNodeSupportsWeakRefTearoff(this)) NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMXPathNSResolver, diff --git a/content/base/src/FragmentOrElement.cpp b/content/base/src/FragmentOrElement.cpp index 4a9279ee591..226d7e3ce07 100644 --- a/content/base/src/FragmentOrElement.cpp +++ b/content/base/src/FragmentOrElement.cpp @@ -126,8 +126,6 @@ using namespace mozilla; using namespace mozilla::dom; -NS_DEFINE_IID(kThisPtrOffsetsSID, NS_THISPTROFFSETS_SID); - int32_t nsIContent::sTabFocusModel = eTabFocus_any; bool nsIContent::sTabFocusModelAppliesToXUL = false; uint32_t nsMutationGuard::sMutationCount = 0; diff --git a/content/base/src/nsDOMLists.cpp b/content/base/src/nsDOMLists.cpp index 15bca30d528..6c1f942cc28 100644 --- a/content/base/src/nsDOMLists.cpp +++ b/content/base/src/nsDOMLists.cpp @@ -25,10 +25,8 @@ DOMCI_DATA(DOMStringList, nsDOMStringList) NS_IMPL_ADDREF(nsDOMStringList) NS_IMPL_RELEASE(nsDOMStringList) NS_INTERFACE_TABLE_HEAD(nsDOMStringList) - NS_OFFSET_AND_INTERFACE_TABLE_BEGIN(nsDOMStringList) - NS_INTERFACE_TABLE_ENTRY(nsDOMStringList, nsIDOMDOMStringList) - NS_OFFSET_AND_INTERFACE_TABLE_END - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE + NS_INTERFACE_TABLE1(nsDOMStringList, nsIDOMDOMStringList) + NS_INTERFACE_TABLE_TO_MAP_SEGUE NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(DOMStringList) NS_INTERFACE_MAP_END diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 8b59063f0c2..2c6bb9fe9e7 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -1236,10 +1236,8 @@ protected: NS_IMPL_ADDREF(nsDOMStyleSheetSetList) NS_IMPL_RELEASE(nsDOMStyleSheetSetList) NS_INTERFACE_TABLE_HEAD(nsDOMStyleSheetSetList) - NS_OFFSET_AND_INTERFACE_TABLE_BEGIN(nsDOMStyleSheetSetList) - NS_INTERFACE_TABLE_ENTRY(nsDOMStyleSheetSetList, nsIDOMDOMStringList) - NS_OFFSET_AND_INTERFACE_TABLE_END - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE + NS_INTERFACE_TABLE1(nsDOMStyleSheetSetList, nsIDOMDOMStringList) + NS_INTERFACE_TABLE_TO_MAP_SEGUE NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(DOMStringList) NS_INTERFACE_MAP_END @@ -1524,8 +1522,12 @@ nsDocument::~nsDocument() NS_INTERFACE_TABLE_HEAD(nsDocument) NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY - NS_DOCUMENT_INTERFACE_TABLE_BEGIN(nsDocument) + NS_INTERFACE_TABLE_BEGIN + NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(nsDocument, nsISupports, nsINode) + NS_INTERFACE_TABLE_ENTRY(nsDocument, nsINode) NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDocument) + NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMDocument) + NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMNode) NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMDocumentXBL) NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIScriptObjectPrincipal) NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMEventTarget) @@ -1539,9 +1541,8 @@ NS_INTERFACE_TABLE_HEAD(nsDocument) NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIInlineEventHandlers) NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDocumentRegister) NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIObserver) - NS_OFFSET_AND_INTERFACE_TABLE_END - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE - NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(nsDocument) + NS_INTERFACE_TABLE_END + NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsDocument) NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMXPathNSResolver, new nsNode3Tearoff(this)) NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMNodeSelector, diff --git a/content/base/src/nsDocument.h b/content/base/src/nsDocument.h index 83611e8673b..b7e36e35eab 100644 --- a/content/base/src/nsDocument.h +++ b/content/base/src/nsDocument.h @@ -1466,10 +1466,4 @@ private: nsDocument* mDoc; }; -#define NS_DOCUMENT_INTERFACE_TABLE_BEGIN(_class) \ - NS_NODE_OFFSET_AND_INTERFACE_TABLE_BEGIN(_class) \ - NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsIDOMDocument, nsDocument) \ - NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsIDOMEventTarget, nsDocument) \ - NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(_class, nsIDOMNode, nsDocument) - #endif /* nsDocument_h___ */ diff --git a/content/html/document/src/ImageDocument.cpp b/content/html/document/src/ImageDocument.cpp index 67ab710b2bd..045fc92184c 100644 --- a/content/html/document/src/ImageDocument.cpp +++ b/content/html/document/src/ImageDocument.cpp @@ -145,13 +145,9 @@ NS_IMPL_ADDREF_INHERITED(ImageDocument, MediaDocument) NS_IMPL_RELEASE_INHERITED(ImageDocument, MediaDocument) NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(ImageDocument) - NS_HTML_DOCUMENT_INTERFACE_TABLE_BEGIN(ImageDocument) - NS_INTERFACE_TABLE_ENTRY(ImageDocument, nsIImageDocument) - NS_INTERFACE_TABLE_ENTRY(ImageDocument, imgINotificationObserver) - NS_INTERFACE_TABLE_ENTRY(ImageDocument, nsIDOMEventListener) - NS_OFFSET_AND_INTERFACE_TABLE_END - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE -NS_INTERFACE_MAP_END_INHERITING(MediaDocument) + NS_INTERFACE_TABLE_INHERITED3(ImageDocument, nsIImageDocument, + imgINotificationObserver, nsIDOMEventListener) +NS_INTERFACE_TABLE_TAIL_INHERITING(MediaDocument) nsresult diff --git a/content/html/document/src/nsHTMLDocument.cpp b/content/html/document/src/nsHTMLDocument.cpp index 5b7abea02f9..47331f02b0e 100644 --- a/content/html/document/src/nsHTMLDocument.cpp +++ b/content/html/document/src/nsHTMLDocument.cpp @@ -219,12 +219,9 @@ NS_IMPL_RELEASE_INHERITED(nsHTMLDocument, nsDocument) // QueryInterface implementation for nsHTMLDocument NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(nsHTMLDocument) - NS_DOCUMENT_INTERFACE_TABLE_BEGIN(nsHTMLDocument) - NS_INTERFACE_TABLE_ENTRY(nsHTMLDocument, nsIHTMLDocument) - NS_INTERFACE_TABLE_ENTRY(nsHTMLDocument, nsIDOMHTMLDocument) - NS_OFFSET_AND_INTERFACE_TABLE_END - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE -NS_INTERFACE_MAP_END_INHERITING(nsDocument) + NS_INTERFACE_TABLE_INHERITED2(nsHTMLDocument, nsIHTMLDocument, + nsIDOMHTMLDocument) +NS_INTERFACE_TABLE_TAIL_INHERITING(nsDocument) JSObject* nsHTMLDocument::WrapNode(JSContext* aCx, JS::Handle aScope) diff --git a/content/mathml/content/src/nsMathMLElement.cpp b/content/mathml/content/src/nsMathMLElement.cpp index 1454a388323..be981b0f413 100644 --- a/content/mathml/content/src/nsMathMLElement.cpp +++ b/content/mathml/content/src/nsMathMLElement.cpp @@ -30,12 +30,11 @@ using namespace mozilla::dom; // nsISupports methods: NS_INTERFACE_TABLE_HEAD(nsMathMLElement) - NS_NODE_OFFSET_AND_INTERFACE_TABLE_BEGIN(nsMathMLElement) - NS_INTERFACE_TABLE_ENTRY(nsMathMLElement, nsIDOMNode) - NS_INTERFACE_TABLE_ENTRY(nsMathMLElement, nsIDOMElement) - NS_INTERFACE_TABLE_ENTRY(nsMathMLElement, nsILink) - NS_INTERFACE_TABLE_ENTRY(nsMathMLElement, Link) - NS_OFFSET_AND_INTERFACE_TABLE_END + NS_INTERFACE_TABLE_INHERITED4(nsMathMLElement, + nsIDOMNode, + nsIDOMElement, + nsILink, + Link) NS_ELEMENT_INTERFACE_TABLE_TO_MAP_SEGUE NS_ELEMENT_INTERFACE_MAP_END diff --git a/content/svg/content/src/SVGFEImageElement.cpp b/content/svg/content/src/SVGFEImageElement.cpp index 7a9fbf15279..92d575679de 100644 --- a/content/svg/content/src/SVGFEImageElement.cpp +++ b/content/svg/content/src/SVGFEImageElement.cpp @@ -30,15 +30,10 @@ nsSVGElement::StringInfo SVGFEImageElement::sStringInfo[2] = //---------------------------------------------------------------------- // nsISupports methods -NS_IMPL_ADDREF_INHERITED(SVGFEImageElement,SVGFEImageElementBase) -NS_IMPL_RELEASE_INHERITED(SVGFEImageElement,SVGFEImageElementBase) - -NS_INTERFACE_TABLE_HEAD(SVGFEImageElement) - NS_NODE_INTERFACE_TABLE6(SVGFEImageElement, nsIDOMNode, nsIDOMElement, - nsIDOMSVGElement, - imgINotificationObserver, nsIImageLoadingContent, - imgIOnloadBlocker) -NS_INTERFACE_MAP_END_INHERITING(SVGFEImageElementBase) +NS_IMPL_ISUPPORTS_INHERITED6(SVGFEImageElement, SVGFEImageElementBase, + nsIDOMNode, nsIDOMElement, nsIDOMSVGElement, + imgINotificationObserver, nsIImageLoadingContent, + imgIOnloadBlocker) //---------------------------------------------------------------------- // Implementation diff --git a/content/svg/content/src/SVGMPathElement.cpp b/content/svg/content/src/SVGMPathElement.cpp index 6cacfd14a89..f8c0696cb7f 100644 --- a/content/svg/content/src/SVGMPathElement.cpp +++ b/content/svg/content/src/SVGMPathElement.cpp @@ -46,10 +46,10 @@ NS_IMPL_ADDREF_INHERITED(SVGMPathElement,SVGMPathElementBase) NS_IMPL_RELEASE_INHERITED(SVGMPathElement,SVGMPathElementBase) NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(SVGMPathElement) - NS_NODE_INTERFACE_TABLE4(SVGMPathElement, nsIDOMNode, nsIDOMElement, - nsIDOMSVGElement, - nsIMutationObserver) -NS_INTERFACE_MAP_END_INHERITING(SVGMPathElementBase) + NS_INTERFACE_TABLE_INHERITED4(SVGMPathElement, nsIDOMNode, nsIDOMElement, + nsIDOMSVGElement, + nsIMutationObserver) +NS_INTERFACE_TABLE_TAIL_INHERITING(SVGMPathElementBase) // Constructor #ifdef _MSC_VER diff --git a/content/svg/content/src/SVGStyleElement.cpp b/content/svg/content/src/SVGStyleElement.cpp index 6f71f1c254c..7d98ca1caa6 100644 --- a/content/svg/content/src/SVGStyleElement.cpp +++ b/content/svg/content/src/SVGStyleElement.cpp @@ -26,11 +26,10 @@ NS_IMPL_ADDREF_INHERITED(SVGStyleElement, SVGStyleElementBase) NS_IMPL_RELEASE_INHERITED(SVGStyleElement, SVGStyleElementBase) NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(SVGStyleElement) - NS_NODE_INTERFACE_TABLE6(SVGStyleElement, nsIDOMNode, nsIDOMElement, - nsIDOMSVGElement, - nsIDOMLinkStyle, nsIStyleSheetLinkingElement, - nsIMutationObserver) -NS_INTERFACE_MAP_END_INHERITING(SVGStyleElementBase) + NS_INTERFACE_TABLE_INHERITED3(SVGStyleElement, nsIDOMLinkStyle, + nsIStyleSheetLinkingElement, + nsIMutationObserver) +NS_INTERFACE_TABLE_TAIL_INHERITING(SVGStyleElementBase) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(SVGStyleElement, SVGStyleElementBase) diff --git a/content/svg/content/src/SVGSwitchElement.cpp b/content/svg/content/src/SVGSwitchElement.cpp index d59daa755f8..ddff35799ef 100644 --- a/content/svg/content/src/SVGSwitchElement.cpp +++ b/content/svg/content/src/SVGSwitchElement.cpp @@ -32,9 +32,7 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED_1(SVGSwitchElement, SVGSwitchElementBase, NS_IMPL_ADDREF_INHERITED(SVGSwitchElement,SVGSwitchElementBase) NS_IMPL_RELEASE_INHERITED(SVGSwitchElement,SVGSwitchElementBase) -NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(SVGSwitchElement) - NS_NODE_INTERFACE_TABLE3(SVGSwitchElement, nsIDOMNode, nsIDOMElement, - nsIDOMSVGElement) +NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SVGSwitchElement) NS_INTERFACE_MAP_END_INHERITING(SVGSwitchElementBase) //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGUseElement.cpp b/content/svg/content/src/SVGUseElement.cpp index 8ebdc3a7e5c..6e09169ffa9 100644 --- a/content/svg/content/src/SVGUseElement.cpp +++ b/content/svg/content/src/SVGUseElement.cpp @@ -62,10 +62,8 @@ NS_IMPL_ADDREF_INHERITED(SVGUseElement,SVGUseElementBase) NS_IMPL_RELEASE_INHERITED(SVGUseElement,SVGUseElementBase) NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(SVGUseElement) - NS_NODE_INTERFACE_TABLE4(SVGUseElement, nsIDOMNode, nsIDOMElement, - nsIDOMSVGElement, - nsIMutationObserver) -NS_INTERFACE_MAP_END_INHERITING(SVGUseElementBase) + NS_INTERFACE_TABLE_INHERITED1(SVGUseElement, nsIMutationObserver) +NS_INTERFACE_TABLE_TAIL_INHERITING(SVGUseElementBase) //---------------------------------------------------------------------- // Implementation diff --git a/content/xml/content/src/nsXMLElement.cpp b/content/xml/content/src/nsXMLElement.cpp index 0dd2bda107d..9adf01d89cb 100644 --- a/content/xml/content/src/nsXMLElement.cpp +++ b/content/xml/content/src/nsXMLElement.cpp @@ -21,10 +21,7 @@ DOMCI_NODE_DATA(Element, nsXMLElement) // QueryInterface implementation for nsXMLElement NS_INTERFACE_TABLE_HEAD(nsXMLElement) - NS_NODE_OFFSET_AND_INTERFACE_TABLE_BEGIN(nsXMLElement) - NS_INTERFACE_TABLE_ENTRY(nsXMLElement, nsIDOMNode) - NS_INTERFACE_TABLE_ENTRY(nsXMLElement, nsIDOMElement) - NS_OFFSET_AND_INTERFACE_TABLE_END + NS_INTERFACE_TABLE_INHERITED2(nsXMLElement, nsIDOMNode, nsIDOMElement) NS_ELEMENT_INTERFACE_TABLE_TO_MAP_SEGUE NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(Element) NS_ELEMENT_INTERFACE_MAP_END diff --git a/content/xml/document/src/XMLDocument.cpp b/content/xml/document/src/XMLDocument.cpp index 2319fea9503..7ce7fc395d9 100644 --- a/content/xml/document/src/XMLDocument.cpp +++ b/content/xml/document/src/XMLDocument.cpp @@ -234,17 +234,7 @@ XMLDocument::~XMLDocument() } // QueryInterface implementation for XMLDocument -NS_INTERFACE_TABLE_HEAD(XMLDocument) - NS_DOCUMENT_INTERFACE_TABLE_BEGIN(XMLDocument) - NS_INTERFACE_TABLE_ENTRY(XMLDocument, nsIDOMXMLDocument) - NS_OFFSET_AND_INTERFACE_TABLE_END - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE -NS_INTERFACE_MAP_END_INHERITING(nsDocument) - - -NS_IMPL_ADDREF_INHERITED(XMLDocument, nsDocument) -NS_IMPL_RELEASE_INHERITED(XMLDocument, nsDocument) - +NS_IMPL_ISUPPORTS_INHERITED1(XMLDocument, nsDocument, nsIDOMXMLDocument) nsresult XMLDocument::Init() diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index f952a67851c..5e9f52ffb60 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -340,11 +340,8 @@ NS_IMPL_ADDREF_INHERITED(nsXULElement, nsStyledElement) NS_IMPL_RELEASE_INHERITED(nsXULElement, nsStyledElement) NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(nsXULElement) - NS_NODE_OFFSET_AND_INTERFACE_TABLE_BEGIN(nsXULElement) - NS_INTERFACE_TABLE_ENTRY(nsXULElement, nsIDOMNode) - NS_INTERFACE_TABLE_ENTRY(nsXULElement, nsIDOMElement) - NS_INTERFACE_TABLE_ENTRY(nsXULElement, nsIDOMXULElement) - NS_OFFSET_AND_INTERFACE_TABLE_END + NS_INTERFACE_TABLE_INHERITED3(nsXULElement, nsIDOMNode, nsIDOMElement, + nsIDOMXULElement) NS_ELEMENT_INTERFACE_TABLE_TO_MAP_SEGUE NS_INTERFACE_MAP_ENTRY_TEAROFF(nsIDOMElementCSSInlineStyle, new nsXULElementTearoff(this)) diff --git a/content/xul/document/src/XULDocument.cpp b/content/xul/document/src/XULDocument.cpp index faf10bd4c64..0d9bb7bc64f 100644 --- a/content/xul/document/src/XULDocument.cpp +++ b/content/xul/document/src/XULDocument.cpp @@ -351,14 +351,10 @@ NS_IMPL_RELEASE_INHERITED(XULDocument, XMLDocument) // QueryInterface implementation for XULDocument NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(XULDocument) - NS_DOCUMENT_INTERFACE_TABLE_BEGIN(XULDocument) - NS_INTERFACE_TABLE_ENTRY(XULDocument, nsIXULDocument) - NS_INTERFACE_TABLE_ENTRY(XULDocument, nsIDOMXULDocument) - NS_INTERFACE_TABLE_ENTRY(XULDocument, nsIStreamLoaderObserver) - NS_INTERFACE_TABLE_ENTRY(XULDocument, nsICSSLoaderObserver) - NS_OFFSET_AND_INTERFACE_TABLE_END - NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE -NS_INTERFACE_MAP_END_INHERITING(XMLDocument) + NS_INTERFACE_TABLE_INHERITED4(XULDocument, nsIXULDocument, + nsIDOMXULDocument, nsIStreamLoaderObserver, + nsICSSLoaderObserver) +NS_INTERFACE_TABLE_TAIL_INHERITING(XMLDocument) //----------------------------------------------------------------------