Commit c7f18c31 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Return interface directly from node vtbl's QI instead of HRESULT, without AddRef.

This will simplify it when the QI moves to the dispex's vtbl. The node's QI does have a temporary workaround right now that will get removed. Signed-off-by: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com>
parent 32ce98e9
......@@ -797,29 +797,18 @@ static inline HTMLAnchorElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLAnchorElement, element.node);
}
static HRESULT HTMLAnchorElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLAnchorElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLAnchorElement *This = impl_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLAnchorElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLAnchorElement_iface;
}else if(IsEqualGUID(&IID_IHTMLAnchorElement, riid)) {
TRACE("(%p)->(IID_IHTMLAnchorElement %p)\n", This, ppv);
*ppv = &This->IHTMLAnchorElement_iface;
}
if(*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLAnchorElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLAnchorElement_iface;
if(IsEqualGUID(&IID_IHTMLAnchorElement, riid))
return &This->IHTMLAnchorElement_iface;
return HTMLElement_QI(&This->element.node, riid, ppv);
return HTMLElement_QI(&This->element.node, riid);
}
static HRESULT HTMLAnchorElement_handle_event(HTMLDOMNode *iface, DWORD eid, nsIDOMEvent *event, BOOL *prevent_default)
......
......@@ -413,21 +413,14 @@ static inline HTMLAreaElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLAreaElement, element.node);
}
static HRESULT HTMLAreaElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLAreaElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLAreaElement *This = impl_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IHTMLAreaElement, riid))
return &This->IHTMLAreaElement_iface;
if(IsEqualGUID(&IID_IHTMLAreaElement, riid)) {
TRACE("(%p)->(IID_IHTMLAreaElement %p)\n", This, ppv);
*ppv = &This->IHTMLAreaElement_iface;
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static HRESULT HTMLAreaElement_handle_event(HTMLDOMNode *iface, DWORD eid, nsIDOMEvent *event, BOOL *prevent_default)
......
......@@ -890,32 +890,20 @@ static inline HTMLBodyElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLBodyElement, element.node);
}
static HRESULT HTMLBodyElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLBodyElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLBodyElement *This = impl_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLBodyElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLBodyElement_iface;
}else if(IsEqualGUID(&IID_IHTMLBodyElement, riid)) {
TRACE("(%p)->(IID_IHTMLBodyElement %p)\n", This, ppv);
*ppv = &This->IHTMLBodyElement_iface;
}else if(IsEqualGUID(&IID_IHTMLTextContainer, riid)) {
TRACE("(%p)->(IID_IHTMLTextContainer %p)\n", This, ppv);
*ppv = &This->IHTMLTextContainer_iface;
}
if(*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLBodyElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLBodyElement_iface;
if(IsEqualGUID(&IID_IHTMLBodyElement, riid))
return &This->IHTMLBodyElement_iface;
if(IsEqualGUID(&IID_IHTMLTextContainer, riid))
return &This->IHTMLTextContainer_iface;
return HTMLElement_QI(&This->element.node, riid, ppv);
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLBodyElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
......
......@@ -146,21 +146,14 @@ static inline HTMLCommentElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLCommentElement, element.node);
}
static HRESULT HTMLCommentElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLCommentElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLCommentElement *This = impl_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IHTMLCommentElement, riid))
return &This->IHTMLCommentElement_iface;
if(IsEqualGUID(&IID_IHTMLCommentElement, riid)) {
TRACE("(%p)->(IID_IHTMLCommentElement %p)\n", This, ppv);
*ppv = &This->IHTMLCommentElement_iface;
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLCommentElement_destructor(HTMLDOMNode *iface)
......
......@@ -295,17 +295,14 @@ static inline DocumentType *DocumentType_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, DocumentType, node.event_target.dispex);
}
static HRESULT DocumentType_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *DocumentType_QI(HTMLDOMNode *iface, REFIID riid)
{
DocumentType *This = DocumentType_from_HTMLDOMNode(iface);
if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IDispatch, riid) || IsEqualGUID(&IID_IDOMDocumentType, riid))
*ppv = &This->IDOMDocumentType_iface;
else
return HTMLDOMNode_QI(&This->node, riid, ppv);
return &This->IDOMDocumentType_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLDOMNode_QI(&This->node, riid);
}
static HRESULT DocumentType_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTMLDOMNode **ret)
......@@ -5699,118 +5696,104 @@ static inline HTMLDocumentNode *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLDocumentNode, node);
}
static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLDocumentNode *This = impl_from_HTMLDOMNode(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
if(IsEqualGUID(&IID_IUnknown, riid))
*ppv = &This->IHTMLDocument2_iface;
else if(IsEqualGUID(&IID_IDispatch, riid) || IsEqualGUID(&IID_IDispatchEx, riid))
*ppv = &This->IDispatchEx_iface;
else if(IsEqualGUID(&IID_IHTMLDocument, riid) || IsEqualGUID(&IID_IHTMLDocument2, riid))
*ppv = &This->IHTMLDocument2_iface;
else if(IsEqualGUID(&IID_IHTMLDocument3, riid))
*ppv = &This->IHTMLDocument3_iface;
else if(IsEqualGUID(&IID_IHTMLDocument4, riid))
*ppv = &This->IHTMLDocument4_iface;
else if(IsEqualGUID(&IID_IHTMLDocument5, riid))
*ppv = &This->IHTMLDocument5_iface;
else if(IsEqualGUID(&IID_IHTMLDocument6, riid))
*ppv = &This->IHTMLDocument6_iface;
else if(IsEqualGUID(&IID_IHTMLDocument7, riid))
*ppv = &This->IHTMLDocument7_iface;
else if(IsEqualGUID(&IID_IDocumentSelector, riid))
*ppv = &This->IDocumentSelector_iface;
else if(IsEqualGUID(&IID_IDocumentEvent, riid))
*ppv = &This->IDocumentEvent_iface;
else if(IsEqualGUID(&DIID_DispHTMLDocument, riid))
*ppv = &This->IHTMLDocument2_iface;
else if(IsEqualGUID(&IID_ISupportErrorInfo, riid))
*ppv = &This->ISupportErrorInfo_iface;
else if(IsEqualGUID(&IID_IProvideClassInfo, riid))
*ppv = &This->IProvideMultipleClassInfo_iface;
else if(IsEqualGUID(&IID_IProvideClassInfo2, riid))
*ppv = &This->IProvideMultipleClassInfo_iface;
else if(IsEqualGUID(&IID_IProvideMultipleClassInfo, riid))
*ppv = &This->IProvideMultipleClassInfo_iface;
else if(IsEqualGUID(&IID_IMarkupServices, riid))
*ppv = &This->IMarkupServices_iface;
else if(IsEqualGUID(&IID_IMarkupContainer, riid))
*ppv = &This->IMarkupContainer_iface;
else if(IsEqualGUID(&IID_IDisplayServices, riid))
*ppv = &This->IDisplayServices_iface;
else if(IsEqualGUID(&IID_IDocumentRange, riid))
*ppv = &This->IDocumentRange_iface;
else if(IsEqualGUID(&IID_IPersist, riid))
*ppv = &This->IPersistFile_iface;
else if(IsEqualGUID(&IID_IPersistMoniker, riid))
*ppv = &This->IPersistMoniker_iface;
else if(IsEqualGUID(&IID_IPersistFile, riid))
*ppv = &This->IPersistFile_iface;
else if(IsEqualGUID(&IID_IMonikerProp, riid))
*ppv = &This->IMonikerProp_iface;
else if(IsEqualGUID(&IID_IPersistStreamInit, riid))
*ppv = &This->IPersistStreamInit_iface;
else if(IsEqualGUID(&IID_IPersistHistory, riid))
*ppv = &This->IPersistHistory_iface;
else if(IsEqualGUID(&IID_IHlinkTarget, riid))
*ppv = &This->IHlinkTarget_iface;
else if(IsEqualGUID(&IID_IOleCommandTarget, riid))
*ppv = &This->IOleCommandTarget_iface;
else if(IsEqualGUID(&IID_IOleObject, riid))
*ppv = &This->IOleObject_iface;
else if(IsEqualGUID(&IID_IOleDocument, riid))
*ppv = &This->IOleDocument_iface;
else if(IsEqualGUID(&IID_IOleInPlaceActiveObject, riid))
*ppv = &This->IOleInPlaceActiveObject_iface;
else if(IsEqualGUID(&IID_IOleWindow, riid))
*ppv = &This->IOleInPlaceActiveObject_iface;
else if(IsEqualGUID(&IID_IOleInPlaceObject, riid))
*ppv = &This->IOleInPlaceObjectWindowless_iface;
else if(IsEqualGUID(&IID_IOleInPlaceObjectWindowless, riid))
*ppv = &This->IOleInPlaceObjectWindowless_iface;
else if(IsEqualGUID(&IID_IOleControl, riid))
*ppv = &This->IOleControl_iface;
else if(IsEqualGUID(&IID_IObjectWithSite, riid))
*ppv = &This->IObjectWithSite_iface;
else if(IsEqualGUID(&IID_IOleContainer, riid))
*ppv = &This->IOleContainer_iface;
else if(IsEqualGUID(&IID_IObjectSafety, riid))
*ppv = &This->IObjectSafety_iface;
else if(IsEqualGUID(&IID_IServiceProvider, riid))
*ppv = &This->IServiceProvider_iface;
else if(IsEqualGUID(&IID_IInternetHostSecurityManager, riid))
*ppv = &This->IInternetHostSecurityManager_iface;
else if(IsEqualGUID(&IID_IConnectionPointContainer, riid))
*ppv = &This->cp_container.IConnectionPointContainer_iface;
else if(IsEqualGUID(&CLSID_CMarkup, riid)) {
FIXME("(%p)->(CLSID_CMarkup %p)\n", This, ppv);
*ppv = NULL;
return E_NOINTERFACE;
return &This->IHTMLDocument2_iface;
if(IsEqualGUID(&IID_IDispatch, riid) || IsEqualGUID(&IID_IDispatchEx, riid))
return &This->IDispatchEx_iface;
if(IsEqualGUID(&IID_IHTMLDocument, riid) || IsEqualGUID(&IID_IHTMLDocument2, riid))
return &This->IHTMLDocument2_iface;
if(IsEqualGUID(&IID_IHTMLDocument3, riid))
return &This->IHTMLDocument3_iface;
if(IsEqualGUID(&IID_IHTMLDocument4, riid))
return &This->IHTMLDocument4_iface;
if(IsEqualGUID(&IID_IHTMLDocument5, riid))
return &This->IHTMLDocument5_iface;
if(IsEqualGUID(&IID_IHTMLDocument6, riid))
return &This->IHTMLDocument6_iface;
if(IsEqualGUID(&IID_IHTMLDocument7, riid))
return &This->IHTMLDocument7_iface;
if(IsEqualGUID(&IID_IDocumentSelector, riid))
return &This->IDocumentSelector_iface;
if(IsEqualGUID(&IID_IDocumentEvent, riid))
return &This->IDocumentEvent_iface;
if(IsEqualGUID(&DIID_DispHTMLDocument, riid))
return &This->IHTMLDocument2_iface;
if(IsEqualGUID(&IID_ISupportErrorInfo, riid))
return &This->ISupportErrorInfo_iface;
if(IsEqualGUID(&IID_IProvideClassInfo, riid))
return &This->IProvideMultipleClassInfo_iface;
if(IsEqualGUID(&IID_IProvideClassInfo2, riid))
return &This->IProvideMultipleClassInfo_iface;
if(IsEqualGUID(&IID_IProvideMultipleClassInfo, riid))
return &This->IProvideMultipleClassInfo_iface;
if(IsEqualGUID(&IID_IMarkupServices, riid))
return &This->IMarkupServices_iface;
if(IsEqualGUID(&IID_IMarkupContainer, riid))
return &This->IMarkupContainer_iface;
if(IsEqualGUID(&IID_IDisplayServices, riid))
return &This->IDisplayServices_iface;
if(IsEqualGUID(&IID_IDocumentRange, riid))
return &This->IDocumentRange_iface;
if(IsEqualGUID(&IID_IPersist, riid))
return &This->IPersistFile_iface;
if(IsEqualGUID(&IID_IPersistMoniker, riid))
return &This->IPersistMoniker_iface;
if(IsEqualGUID(&IID_IPersistFile, riid))
return &This->IPersistFile_iface;
if(IsEqualGUID(&IID_IMonikerProp, riid))
return &This->IMonikerProp_iface;
if(IsEqualGUID(&IID_IPersistStreamInit, riid))
return &This->IPersistStreamInit_iface;
if(IsEqualGUID(&IID_IPersistHistory, riid))
return &This->IPersistHistory_iface;
if(IsEqualGUID(&IID_IHlinkTarget, riid))
return &This->IHlinkTarget_iface;
if(IsEqualGUID(&IID_IOleCommandTarget, riid))
return &This->IOleCommandTarget_iface;
if(IsEqualGUID(&IID_IOleObject, riid))
return &This->IOleObject_iface;
if(IsEqualGUID(&IID_IOleDocument, riid))
return &This->IOleDocument_iface;
if(IsEqualGUID(&IID_IOleInPlaceActiveObject, riid))
return &This->IOleInPlaceActiveObject_iface;
if(IsEqualGUID(&IID_IOleWindow, riid))
return &This->IOleInPlaceActiveObject_iface;
if(IsEqualGUID(&IID_IOleInPlaceObject, riid))
return &This->IOleInPlaceObjectWindowless_iface;
if(IsEqualGUID(&IID_IOleInPlaceObjectWindowless, riid))
return &This->IOleInPlaceObjectWindowless_iface;
if(IsEqualGUID(&IID_IOleControl, riid))
return &This->IOleControl_iface;
if(IsEqualGUID(&IID_IObjectWithSite, riid))
return &This->IObjectWithSite_iface;
if(IsEqualGUID(&IID_IOleContainer, riid))
return &This->IOleContainer_iface;
if(IsEqualGUID(&IID_IObjectSafety, riid))
return &This->IObjectSafety_iface;
if(IsEqualGUID(&IID_IServiceProvider, riid))
return &This->IServiceProvider_iface;
if(IsEqualGUID(&IID_IInternetHostSecurityManager, riid))
return &This->IInternetHostSecurityManager_iface;
if(IsEqualGUID(&IID_IConnectionPointContainer, riid))
return &This->cp_container.IConnectionPointContainer_iface;
if(IsEqualGUID(&CLSID_CMarkup, riid)) {
FIXME("(%p)->(CLSID_CMarkup)\n", This);
return NULL;
}else if(IsEqualGUID(&IID_IRunnableObject, riid)) {
TRACE("(%p)->(IID_IRunnableObject %p) returning NULL\n", This, ppv);
*ppv = NULL;
return E_NOINTERFACE;
return NULL;
}else if(IsEqualGUID(&IID_IPersistPropertyBag, riid)) {
TRACE("(%p)->(IID_IPersistPropertyBag %p) returning NULL\n", This, ppv);
*ppv = NULL;
return E_NOINTERFACE;
return NULL;
}else if(IsEqualGUID(&IID_IExternalConnection, riid)) {
TRACE("(%p)->(IID_IExternalConnection %p) returning NULL\n", This, ppv);
*ppv = NULL;
return E_NOINTERFACE;
return NULL;
}else if(IsEqualGUID(&IID_IStdMarshalInfo, riid)) {
TRACE("(%p)->(IID_IStdMarshalInfo %p) returning NULL\n", This, ppv);
*ppv = NULL;
return E_NOINTERFACE;
}else {
return HTMLDOMNode_QI(&This->node, riid, ppv);
return NULL;
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLDOMNode_QI(&This->node, riid);
}
void detach_document_node(HTMLDocumentNode *doc)
......
......@@ -6807,48 +6807,44 @@ static inline HTMLElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLElement, node);
}
HRESULT HTMLElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
void *HTMLElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLElement *This = impl_from_HTMLDOMNode(iface);
if(IsEqualGUID(&IID_IUnknown, riid)) {
*ppv = &This->IHTMLElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
*ppv = &This->IHTMLElement_iface;
}else if(IsEqualGUID(&IID_IHTMLElement, riid)) {
*ppv = &This->IHTMLElement_iface;
}else if(IsEqualGUID(&IID_IHTMLElement2, riid)) {
*ppv = &This->IHTMLElement2_iface;
}else if(IsEqualGUID(&IID_IHTMLElement3, riid)) {
*ppv = &This->IHTMLElement3_iface;
}else if(IsEqualGUID(&IID_IHTMLElement4, riid)) {
*ppv = &This->IHTMLElement4_iface;
}else if(IsEqualGUID(&IID_IHTMLElement6, riid)) {
*ppv = &This->IHTMLElement6_iface;
}else if(IsEqualGUID(&IID_IHTMLElement7, riid)) {
*ppv = &This->IHTMLElement7_iface;
}else if(IsEqualGUID(&IID_IHTMLUniqueName, riid)) {
*ppv = &This->IHTMLUniqueName_iface;
}else if(IsEqualGUID(&IID_IElementSelector, riid)) {
*ppv = &This->IElementSelector_iface;
}else if(IsEqualGUID(&IID_IElementTraversal, riid)) {
*ppv = &This->IElementTraversal_iface;
}else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
*ppv = &This->cp_container.IConnectionPointContainer_iface;
}else if(IsEqualGUID(&IID_IProvideClassInfo, riid)) {
*ppv = &This->IProvideMultipleClassInfo_iface;
}else if(IsEqualGUID(&IID_IProvideClassInfo2, riid)) {
*ppv = &This->IProvideMultipleClassInfo_iface;
}else if(IsEqualGUID(&IID_IProvideMultipleClassInfo, riid)) {
*ppv = &This->IProvideMultipleClassInfo_iface;
}else if(IsEqualGUID(&IID_IWineHTMLElementPrivate, riid)) {
*ppv = &This->IWineHTMLElementPrivate_iface;
}else {
return HTMLDOMNode_QI(&This->node, riid, ppv);
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLElement_iface;
if(IsEqualGUID(&IID_IHTMLElement, riid))
return &This->IHTMLElement_iface;
if(IsEqualGUID(&IID_IHTMLElement2, riid))
return &This->IHTMLElement2_iface;
if(IsEqualGUID(&IID_IHTMLElement3, riid))
return &This->IHTMLElement3_iface;
if(IsEqualGUID(&IID_IHTMLElement4, riid))
return &This->IHTMLElement4_iface;
if(IsEqualGUID(&IID_IHTMLElement6, riid))
return &This->IHTMLElement6_iface;
if(IsEqualGUID(&IID_IHTMLElement7, riid))
return &This->IHTMLElement7_iface;
if(IsEqualGUID(&IID_IHTMLUniqueName, riid))
return &This->IHTMLUniqueName_iface;
if(IsEqualGUID(&IID_IElementSelector, riid))
return &This->IElementSelector_iface;
if(IsEqualGUID(&IID_IElementTraversal, riid))
return &This->IElementTraversal_iface;
if(IsEqualGUID(&IID_IConnectionPointContainer, riid))
return &This->cp_container.IConnectionPointContainer_iface;
if(IsEqualGUID(&IID_IProvideClassInfo, riid))
return &This->IProvideMultipleClassInfo_iface;
if(IsEqualGUID(&IID_IProvideClassInfo2, riid))
return &This->IProvideMultipleClassInfo_iface;
if(IsEqualGUID(&IID_IProvideMultipleClassInfo, riid))
return &This->IProvideMultipleClassInfo_iface;
if(IsEqualGUID(&IID_IWineHTMLElementPrivate, riid))
return &This->IWineHTMLElementPrivate_iface;
return HTMLDOMNode_QI(&This->node, riid);
}
void HTMLElement_destructor(HTMLDOMNode *iface)
......
......@@ -773,32 +773,20 @@ static inline HTMLFormElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLFormElement, element.node);
}
static HRESULT HTMLFormElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLFormElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLFormElement *This = impl_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLFormElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLFormElement_iface;
}else if(IsEqualGUID(&IID_IHTMLFormElement, riid)) {
TRACE("(%p)->(IID_IHTMLFormElement %p)\n", This, ppv);
*ppv = &This->IHTMLFormElement_iface;
}else if(IsEqualGUID(&DIID_DispHTMLFormElement, riid)) {
TRACE("(%p)->(DIID_DispHTMLFormElement %p)\n", This, ppv);
*ppv = &This->IHTMLFormElement_iface;
}
if(*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLFormElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLFormElement_iface;
if(IsEqualGUID(&IID_IHTMLFormElement, riid))
return &This->IHTMLFormElement_iface;
if(IsEqualGUID(&DIID_DispHTMLFormElement, riid))
return &This->IHTMLFormElement_iface;
return HTMLElement_QI(&This->element.node, riid, ppv);
return HTMLElement_QI(&This->element.node, riid);
}
static HRESULT HTMLFormElement_get_dispid(HTMLDOMNode *iface,
......
......@@ -700,20 +700,14 @@ static const IHTMLFrameBase2Vtbl HTMLFrameBase2Vtbl = {
HTMLFrameBase2_get_allowTransparency
};
static HRESULT HTMLFrameBase_QI(HTMLFrameBase *This, REFIID riid, void **ppv)
{
if(IsEqualGUID(&IID_IHTMLFrameBase, riid)) {
TRACE("(%p)->(IID_IHTMLFrameBase %p)\n", This, ppv);
*ppv = &This->IHTMLFrameBase_iface;
}else if(IsEqualGUID(&IID_IHTMLFrameBase2, riid)) {
TRACE("(%p)->(IID_IHTMLFrameBase2 %p)\n", This, ppv);
*ppv = &This->IHTMLFrameBase2_iface;
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
static void *HTMLFrameBase_QI(HTMLFrameBase *This, REFIID riid)
{
if(IsEqualGUID(&IID_IHTMLFrameBase, riid))
return &This->IHTMLFrameBase_iface;
if(IsEqualGUID(&IID_IHTMLFrameBase2, riid))
return &This->IHTMLFrameBase2_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLFrameBase_destructor(HTMLFrameBase *This)
......@@ -893,19 +887,14 @@ static inline HTMLFrameElement *frame_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLFrameElement, framebase.element.node);
}
static HRESULT HTMLFrameElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLFrameElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLFrameElement *This = frame_from_HTMLDOMNode(iface);
if(IsEqualGUID(&IID_IHTMLFrameElement3, riid)) {
TRACE("(%p)->(IID_IHTMLFrameElement3 %p)\n", This, ppv);
*ppv = &This->IHTMLFrameElement3_iface;
}else {
return HTMLFrameBase_QI(&This->framebase, riid, ppv);
}
if(IsEqualGUID(&IID_IHTMLFrameElement3, riid))
return &This->IHTMLFrameElement3_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLFrameBase_QI(&This->framebase, riid);
}
static void HTMLFrameElement_destructor(HTMLDOMNode *iface)
......@@ -1471,25 +1460,18 @@ static inline HTMLIFrame *iframe_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLIFrame, framebase.element.node);
}
static HRESULT HTMLIFrame_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLIFrame_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLIFrame *This = iframe_from_HTMLDOMNode(iface);
if(IsEqualGUID(&IID_IHTMLIFrameElement, riid)) {
TRACE("(%p)->(IID_IHTMLIFrameElement %p)\n", This, ppv);
*ppv = &This->IHTMLIFrameElement_iface;
}else if(IsEqualGUID(&IID_IHTMLIFrameElement2, riid)) {
TRACE("(%p)->(IID_IHTMLIFrameElement2 %p)\n", This, ppv);
*ppv = &This->IHTMLIFrameElement2_iface;
}else if(IsEqualGUID(&IID_IHTMLIFrameElement3, riid)) {
TRACE("(%p)->(IID_IHTMLIFrameElement3 %p)\n", This, ppv);
*ppv = &This->IHTMLIFrameElement3_iface;
}else {
return HTMLFrameBase_QI(&This->framebase, riid, ppv);
}
if(IsEqualGUID(&IID_IHTMLIFrameElement, riid))
return &This->IHTMLIFrameElement_iface;
if(IsEqualGUID(&IID_IHTMLIFrameElement2, riid))
return &This->IHTMLIFrameElement2_iface;
if(IsEqualGUID(&IID_IHTMLIFrameElement3, riid))
return &This->IHTMLIFrameElement3_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLFrameBase_QI(&This->framebase, riid);
}
static void HTMLIFrame_destructor(HTMLDOMNode *iface)
......
......@@ -128,21 +128,14 @@ static inline HTMLGenericElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLGenericElement, element.node);
}
static HRESULT HTMLGenericElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLGenericElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLGenericElement *This = impl_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IHTMLGenericElement, riid))
return &This->IHTMLGenericElement_iface;
if(IsEqualGUID(&IID_IHTMLGenericElement, riid)) {
TRACE("(%p)->(IID_IHTMLGenericElement %p)\n", This, ppv);
*ppv = &This->IHTMLGenericElement_iface;
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLGenericElement_destructor(HTMLDOMNode *iface)
......
......@@ -146,19 +146,14 @@ static inline HTMLTitleElement *HTMLTitleElement_from_HTMLDOMNode(HTMLDOMNode *i
return CONTAINING_RECORD(iface, HTMLTitleElement, element.node);
}
static HRESULT HTMLTitleElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLTitleElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLTitleElement *This = HTMLTitleElement_from_HTMLDOMNode(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
if(IsEqualGUID(&IID_IHTMLTitleElement, riid))
*ppv = &This->IHTMLTitleElement_iface;
else
return HTMLElement_QI(&This->element.node, riid, ppv);
return &This->IHTMLTitleElement_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLTitleElement_destructor(HTMLDOMNode *iface)
......@@ -308,19 +303,14 @@ static inline HTMLHtmlElement *HTMLHtmlElement_from_HTMLDOMNode(HTMLDOMNode *ifa
return CONTAINING_RECORD(iface, HTMLHtmlElement, element.node);
}
static HRESULT HTMLHtmlElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLHtmlElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLHtmlElement *This = HTMLHtmlElement_from_HTMLDOMNode(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
if(IsEqualGUID(&IID_IHTMLHtmlElement, riid))
*ppv = &This->IHTMLHtmlElement_iface;
else
return HTMLElement_QI(&This->element.node, riid, ppv);
return &This->IHTMLHtmlElement_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLHtmlElement_destructor(HTMLDOMNode *iface)
......@@ -549,25 +539,18 @@ static inline HTMLMetaElement *HTMLMetaElement_from_HTMLDOMNode(HTMLDOMNode *ifa
return CONTAINING_RECORD(iface, HTMLMetaElement, element.node);
}
static HRESULT HTMLMetaElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLMetaElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLMetaElement *This = HTMLMetaElement_from_HTMLDOMNode(iface);
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLMetaElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLMetaElement_iface;
}else if(IsEqualGUID(&IID_IHTMLMetaElement, riid)) {
TRACE("(%p)->(IID_IHTMLMetaElement %p)\n", This, ppv);
*ppv = &This->IHTMLMetaElement_iface;
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLMetaElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLMetaElement_iface;
if(IsEqualGUID(&IID_IHTMLMetaElement, riid))
return &This->IHTMLMetaElement_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLMetaElement_destructor(HTMLDOMNode *iface)
......@@ -718,21 +701,16 @@ static inline HTMLHeadElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLHeadElement, element.node);
}
static HRESULT HTMLHeadElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLHeadElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLHeadElement *This = impl_from_HTMLDOMNode(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
if(IsEqualGUID(&IID_IHTMLHeadElement, riid))
*ppv = &This->IHTMLHeadElement_iface;
else if(IsEqualGUID(&DIID_DispHTMLHeadElement, riid))
*ppv = &This->IHTMLHeadElement_iface;
else
return HTMLElement_QI(&This->element.node, riid, ppv);
return &This->IHTMLHeadElement_iface;
if(IsEqualGUID(&DIID_DispHTMLHeadElement, riid))
return &This->IHTMLHeadElement_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLHeadElement_destructor(HTMLDOMNode *iface)
......
......@@ -658,21 +658,14 @@ static inline HTMLImg *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLImg, element.node);
}
static HRESULT HTMLImgElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLImgElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLImg *This = impl_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IHTMLImgElement, riid)) {
TRACE("(%p)->(IID_IHTMLImgElement %p)\n", This, ppv);
*ppv = &This->IHTMLImgElement_iface;
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
if(IsEqualGUID(&IID_IHTMLImgElement, riid))
return &This->IHTMLImgElement_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static HRESULT HTMLImgElement_get_readystate(HTMLDOMNode *iface, BSTR *p)
......
......@@ -1344,35 +1344,22 @@ static inline HTMLInputElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLInputElement, element.node);
}
static HRESULT HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLInputElement *This = impl_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLInputElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLInputElement_iface;
}else if(IsEqualGUID(&IID_IHTMLInputElement, riid)) {
TRACE("(%p)->(IID_IHTMLInputElement %p)\n", This, ppv);
*ppv = &This->IHTMLInputElement_iface;
}else if(IsEqualGUID(&IID_IHTMLInputTextElement, riid)) {
TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This, ppv);
*ppv = &This->IHTMLInputTextElement_iface;
}else if(IsEqualGUID(&IID_IHTMLInputTextElement2, riid)) {
TRACE("(%p)->(IID_IHTMLInputTextElement2 %p)\n", This, ppv);
*ppv = &This->IHTMLInputTextElement2_iface;
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLInputElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLInputElement_iface;
if(IsEqualGUID(&IID_IHTMLInputElement, riid))
return &This->IHTMLInputElement_iface;
if(IsEqualGUID(&IID_IHTMLInputTextElement, riid))
return &This->IHTMLInputTextElement_iface;
if(IsEqualGUID(&IID_IHTMLInputTextElement2, riid))
return &This->IHTMLInputTextElement2_iface;
if(*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
return HTMLElement_QI(&This->element.node, riid, ppv);
return HTMLElement_QI(&This->element.node, riid);
}
static HRESULT HTMLInputElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
......@@ -1602,24 +1589,16 @@ static inline HTMLLabelElement *label_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLLabelElement, element.node);
}
static HRESULT HTMLLabelElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLLabelElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLLabelElement *This = label_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLLabelElement_iface;
}else if(IsEqualGUID(&IID_IHTMLLabelElement, riid)) {
TRACE("(%p)->(IID_IHTMLLabelElement %p)\n", This, ppv);
*ppv = &This->IHTMLLabelElement_iface;
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLLabelElement_iface;
if(IsEqualGUID(&IID_IHTMLLabelElement, riid))
return &This->IHTMLLabelElement_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static const NodeImplVtbl HTMLLabelElementImplVtbl = {
......@@ -1901,24 +1880,16 @@ static inline HTMLButtonElement *button_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLButtonElement, element.node);
}
static HRESULT HTMLButtonElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLButtonElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLButtonElement *This = button_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLButtonElement_iface;
if(IsEqualGUID(&IID_IHTMLButtonElement, riid))
return &This->IHTMLButtonElement_iface;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLButtonElement_iface;
}else if(IsEqualGUID(&IID_IHTMLButtonElement, riid)) {
TRACE("(%p)->(IID_IHTMLButtonElement %p)\n", This, ppv);
*ppv = &This->IHTMLButtonElement_iface;
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static HRESULT HTMLButtonElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
......
......@@ -374,19 +374,14 @@ static inline HTMLLinkElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLLinkElement, element.node);
}
static HRESULT HTMLLinkElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLLinkElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLLinkElement *This = impl_from_HTMLDOMNode(iface);
if(IsEqualGUID(&IID_IHTMLLinkElement, riid)) {
TRACE("(%p)->(IID_IHTMLLinkElement %p)\n", This, ppv);
*ppv = &This->IHTMLLinkElement_iface;
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
if(IsEqualGUID(&IID_IHTMLLinkElement, riid))
return &This->IHTMLLinkElement_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static HRESULT HTMLLinkElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
......
......@@ -493,7 +493,18 @@ static HRESULT WINAPI HTMLDOMNode_QueryInterface(IHTMLDOMNode *iface,
{
HTMLDOMNode *This = impl_from_IHTMLDOMNode(iface);
return This->vtbl->qi(This, riid, ppv);
/* FIXME: Get rid of this when dispex handles QI */
if(IsEqualGUID(&IID_nsXPCOMCycleCollectionParticipant, riid) || IsEqualGUID(&IID_nsCycleCollectionISupports, riid)) {
dispex_query_interface(&This->event_target.dispex, riid, ppv);
return S_OK;
}
if((*ppv = This->vtbl->qi(This, riid))) {
IHTMLDOMNode_AddRef(&This->IHTMLDOMNode_iface);
return S_OK;
}
return E_NOINTERFACE;
}
static ULONG WINAPI HTMLDOMNode_AddRef(IHTMLDOMNode *iface)
......@@ -1464,26 +1475,28 @@ void HTMLDOMNode_destructor(DispatchEx *dispex)
free(This);
}
HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv)
void *HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid)
{
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
IUnknown *unk;
HRESULT hres;
if(IsEqualGUID(&IID_IUnknown, riid)) {
*ppv = &This->IHTMLDOMNode_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
*ppv = &This->IHTMLDOMNode_iface;
}else if(IsEqualGUID(&IID_IHTMLDOMNode, riid)) {
*ppv = &This->IHTMLDOMNode_iface;
}else if(IsEqualGUID(&IID_IHTMLDOMNode2, riid)) {
*ppv = &This->IHTMLDOMNode2_iface;
}else if(IsEqualGUID(&IID_IHTMLDOMNode3, riid)) {
*ppv = &This->IHTMLDOMNode3_iface;
}else {
return EventTarget_QI(&This->event_target, riid, ppv);
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLDOMNode_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLDOMNode_iface;
if(IsEqualGUID(&IID_IHTMLDOMNode, riid))
return &This->IHTMLDOMNode_iface;
if(IsEqualGUID(&IID_IHTMLDOMNode2, riid))
return &This->IHTMLDOMNode2_iface;
if(IsEqualGUID(&IID_IHTMLDOMNode3, riid))
return &This->IHTMLDOMNode3_iface;
hres = EventTarget_QI(&This->event_target, riid, (void**)&unk);
if(hres != S_OK)
return NULL;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
IUnknown_Release(unk);
return unk;
}
static HRESULT HTMLDOMNode_clone(HTMLDOMNode *This, nsIDOMNode *nsnode, HTMLDOMNode **ret)
......
......@@ -637,50 +637,43 @@ static inline HTMLObjectElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLObjectElement, plugin_container.element.node);
}
static HRESULT HTMLObjectElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLObjectElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLObjectElement *This = impl_from_HTMLDOMNode(iface);
void *elem_iface;
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLObjectElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLObjectElement_iface;
if(IsEqualGUID(&IID_IHTMLObjectElement, riid))
return &This->IHTMLObjectElement_iface;
if(IsEqualGUID(&IID_IHTMLObjectElement2, riid))
return &This->IHTMLObjectElement2_iface;
if(IsEqualGUID(&IID_HTMLPluginContainer, riid)) {
/* Special pseudo-interface returning HTMLPluginContainer struct. */
return &This->plugin_container;
}
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
if(IsEqualGUID(&IID_IUnknown, riid)) {
*ppv = &This->IHTMLObjectElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
*ppv = &This->IHTMLObjectElement_iface;
}else if(IsEqualGUID(&IID_IHTMLObjectElement, riid)) {
*ppv = &This->IHTMLObjectElement_iface;
}else if(IsEqualGUID(&IID_IHTMLObjectElement2, riid)) {
*ppv = &This->IHTMLObjectElement2_iface;
}else if(IsEqualGUID(&IID_HTMLPluginContainer, riid)) {
/* Special pseudo-interface returning HTMLPluginContainse struct. */
*ppv = &This->plugin_container;
node_addref(&This->plugin_container.element.node);
return S_OK;
}else {
HRESULT hres;
hres = HTMLElement_QI(&This->plugin_container.element.node, riid, ppv);
if(hres == E_NOINTERFACE && This->plugin_container.plugin_host && This->plugin_container.plugin_host->plugin_unk) {
elem_iface = HTMLElement_QI(&This->plugin_container.element.node, riid);
if(!elem_iface && This->plugin_container.plugin_host && This->plugin_container.plugin_host->plugin_unk) {
IUnknown *plugin_iface, *ret;
HRESULT hres = IUnknown_QueryInterface(This->plugin_container.plugin_host->plugin_unk, riid, (void**)&plugin_iface);
hres = IUnknown_QueryInterface(This->plugin_container.plugin_host->plugin_unk, riid, (void**)&plugin_iface);
if(hres == S_OK) {
hres = wrap_iface(plugin_iface, (IUnknown*)&This->IHTMLObjectElement_iface, &ret);
IUnknown_Release(plugin_iface);
if(FAILED(hres))
return hres;
if(FAILED(hres)) {
ERR("wrap_iface failed: %08lx\n", hres);
return NULL;
}
TRACE("returning plugin iface %p wrapped to %p\n", plugin_iface, ret);
*ppv = ret;
return S_OK;
return ret;
}
}
return hres;
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return elem_iface;
}
static void HTMLObjectElement_destructor(HTMLDOMNode *iface)
......@@ -986,24 +979,18 @@ static inline HTMLEmbed *embed_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLEmbed, element.node);
}
static HRESULT HTMLEmbedElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLEmbedElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLEmbed *This = embed_from_HTMLDOMNode(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLEmbedElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLEmbedElement_iface;
if(IsEqualGUID(&IID_IHTMLEmbedElement, riid))
return &This->IHTMLEmbedElement_iface;
if(IsEqualGUID(&IID_IUnknown, riid)) {
*ppv = &This->IHTMLEmbedElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
*ppv = &This->IHTMLEmbedElement_iface;
}else if(IsEqualGUID(&IID_IHTMLEmbedElement, riid)) {
*ppv = &This->IHTMLEmbedElement_iface;
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLEmbedElement_destructor(HTMLDOMNode *iface)
......
......@@ -354,29 +354,18 @@ static inline HTMLScriptElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLScriptElement, element.node);
}
static HRESULT HTMLScriptElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLScriptElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLScriptElement *This = impl_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLScriptElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLScriptElement_iface;
}else if(IsEqualGUID(&IID_IHTMLScriptElement, riid)) {
TRACE("(%p)->(IID_IHTMLScriptElement %p)\n", This, ppv);
*ppv = &This->IHTMLScriptElement_iface;
}
if(*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLScriptElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLScriptElement_iface;
if(IsEqualGUID(&IID_IHTMLScriptElement, riid))
return &This->IHTMLScriptElement_iface;
return HTMLElement_QI(&This->element.node, riid, ppv);
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLScriptElement_destructor(HTMLDOMNode *iface)
......
......@@ -346,29 +346,18 @@ static inline HTMLOptionElement *HTMLOptionElement_from_HTMLDOMNode(HTMLDOMNode
return CONTAINING_RECORD(iface, HTMLOptionElement, element.node);
}
static HRESULT HTMLOptionElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLOptionElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLOptionElement *This = HTMLOptionElement_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLOptionElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLOptionElement_iface;
}else if(IsEqualGUID(&IID_IHTMLOptionElement, riid)) {
TRACE("(%p)->(IID_IHTMLOptionElement %p)\n", This, ppv);
*ppv = &This->IHTMLOptionElement_iface;
}
if(*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLOptionElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLOptionElement_iface;
if(IsEqualGUID(&IID_IHTMLOptionElement, riid))
return &This->IHTMLOptionElement_iface;
return HTMLElement_QI(&This->element.node, riid, ppv);
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLOptionElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
......@@ -1326,29 +1315,18 @@ static inline HTMLSelectElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLSelectElement, element.node);
}
static HRESULT HTMLSelectElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLSelectElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLSelectElement *This = impl_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLSelectElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLSelectElement_iface;
}else if(IsEqualGUID(&IID_IHTMLSelectElement, riid)) {
TRACE("(%p)->(IID_IHTMLSelectElement %p)\n", This, ppv);
*ppv = &This->IHTMLSelectElement_iface;
}
if(*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLSelectElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLSelectElement_iface;
if(IsEqualGUID(&IID_IHTMLSelectElement, riid))
return &This->IHTMLSelectElement_iface;
return HTMLElement_QI(&This->element.node, riid, ppv);
return HTMLElement_QI(&This->element.node, riid);
}
static HRESULT HTMLSelectElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
......
......@@ -365,28 +365,20 @@ static inline HTMLStyleElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLStyleElement, element.node);
}
static HRESULT HTMLStyleElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLStyleElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLStyleElement *This = impl_from_HTMLDOMNode(iface);
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLStyleElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLStyleElement_iface;
}else if(IsEqualGUID(&IID_IHTMLStyleElement, riid)) {
TRACE("(%p)->(IID_IHTMLStyleElement %p)\n", This, ppv);
*ppv = &This->IHTMLStyleElement_iface;
}else if(IsEqualGUID(&IID_IHTMLStyleElement2, riid)) {
TRACE("(%p)->(IID_IHTMLStyleElement2 %p)\n", This, ppv);
*ppv = &This->IHTMLStyleElement2_iface;
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLStyleElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLStyleElement_iface;
if(IsEqualGUID(&IID_IHTMLStyleElement, riid))
return &This->IHTMLStyleElement_iface;
if(IsEqualGUID(&IID_IHTMLStyleElement2, riid))
return &This->IHTMLStyleElement2_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLStyleElement_destructor(HTMLDOMNode *iface)
......
......@@ -446,25 +446,18 @@ static inline HTMLTableCell *HTMLTableCell_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLTableCell, element.node);
}
static HRESULT HTMLTableCell_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLTableCell_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLTableCell *This = HTMLTableCell_from_HTMLDOMNode(iface);
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLTableCell_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLTableCell_iface;
}else if(IsEqualGUID(&IID_IHTMLTableCell, riid)) {
TRACE("(%p)->(IID_IHTMLTableCell %p)\n", This, ppv);
*ppv = &This->IHTMLTableCell_iface;
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLTableCell_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLTableCell_iface;
if(IsEqualGUID(&IID_IHTMLTableCell, riid))
return &This->IHTMLTableCell_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLTableCell_destructor(HTMLDOMNode *iface)
......@@ -880,29 +873,18 @@ static inline HTMLTableRow *HTMLTableRow_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLTableRow, element.node);
}
static HRESULT HTMLTableRow_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLTableRow_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLTableRow *This = HTMLTableRow_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLTableRow_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLTableRow_iface;
}else if(IsEqualGUID(&IID_IHTMLTableRow, riid)) {
TRACE("(%p)->(IID_IHTMLTableRow %p)\n", This, ppv);
*ppv = &This->IHTMLTableRow_iface;
}
if(*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLTableRow_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLTableRow_iface;
if(IsEqualGUID(&IID_IHTMLTableRow, riid))
return &This->IHTMLTableRow_iface;
return HTMLElement_QI(&This->element.node, riid, ppv);
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLTableRow_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
......@@ -1885,35 +1867,22 @@ static inline HTMLTable *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLTable, element.node);
}
static HRESULT HTMLTable_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLTable_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLTable *This = impl_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLTable_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLTable_iface;
}else if(IsEqualGUID(&IID_IHTMLTable, riid)) {
TRACE("(%p)->(IID_IHTMLTable %p)\n", This, ppv);
*ppv = &This->IHTMLTable_iface;
}else if(IsEqualGUID(&IID_IHTMLTable2, riid)) {
TRACE("(%p)->(IID_IHTMLTable2 %p)\n", This, ppv);
*ppv = &This->IHTMLTable2_iface;
}else if(IsEqualGUID(&IID_IHTMLTable3, riid)) {
TRACE("(%p)->(IID_IHTMLTable3 %p)\n", This, ppv);
*ppv = &This->IHTMLTable3_iface;
}
if(*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
return HTMLElement_QI(&This->element.node, riid, ppv);
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLTable_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLTable_iface;
if(IsEqualGUID(&IID_IHTMLTable, riid))
return &This->IHTMLTable_iface;
if(IsEqualGUID(&IID_IHTMLTable2, riid))
return &This->IHTMLTable2_iface;
if(IsEqualGUID(&IID_IHTMLTable3, riid))
return &This->IHTMLTable3_iface;
return HTMLElement_QI(&This->element.node, riid);
}
static void HTMLTable_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
......
......@@ -390,29 +390,18 @@ static inline HTMLTextAreaElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLTextAreaElement, element.node);
}
static HRESULT HTMLTextAreaElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLTextAreaElement_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IHTMLTextAreaElement_iface;
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = &This->IHTMLTextAreaElement_iface;
}else if(IsEqualGUID(&IID_IHTMLTextAreaElement, riid)) {
TRACE("(%p)->(IID_IHTMLTextAreaElement %p)\n", This, ppv);
*ppv = &This->IHTMLTextAreaElement_iface;
}
if(*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLTextAreaElement_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
return &This->IHTMLTextAreaElement_iface;
if(IsEqualGUID(&IID_IHTMLTextAreaElement, riid))
return &This->IHTMLTextAreaElement_iface;
return HTMLElement_QI(&This->element.node, riid, ppv);
return HTMLElement_QI(&This->element.node, riid);
}
static HRESULT HTMLTextAreaElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
......
......@@ -324,21 +324,16 @@ static inline HTMLDOMTextNode *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, HTMLDOMTextNode, node);
}
static HRESULT HTMLDOMTextNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *HTMLDOMTextNode_QI(HTMLDOMNode *iface, REFIID riid)
{
HTMLDOMTextNode *This = impl_from_HTMLDOMNode(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
if(IsEqualGUID(&IID_IHTMLDOMTextNode, riid))
*ppv = &This->IHTMLDOMTextNode_iface;
else if(IsEqualGUID(&IID_IHTMLDOMTextNode2, riid))
*ppv = &This->IHTMLDOMTextNode2_iface;
else
return HTMLDOMNode_QI(&This->node, riid, ppv);
return &This->IHTMLDOMTextNode_iface;
if(IsEqualGUID(&IID_IHTMLDOMTextNode2, riid))
return &This->IHTMLDOMTextNode2_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLDOMNode_QI(&This->node, riid);
}
static HRESULT HTMLDOMTextNode_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTMLDOMNode **ret)
......
......@@ -337,7 +337,7 @@ HRESULT wrap_iface(IUnknown *iface, IUnknown *ref_unk, IUnknown **ret)
IUnknown_AddRef(iface);
wrapper->iface = iface;
IUnknown_AddRef(ref_unk);
/* Caller AddRefs */
wrapper->ref_unk = ref_unk;
*ret = &wrapper->IUnknown_iface;
......
......@@ -818,7 +818,7 @@ struct GeckoBrowser {
typedef struct {
const CLSID *clsid;
HRESULT (*qi)(HTMLDOMNode*,REFIID,void**);
void *(*qi)(HTMLDOMNode*,REFIID);
void (*destructor)(HTMLDOMNode*);
const cpc_entry_t *cpc_entries;
HRESULT (*clone)(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**);
......@@ -1210,13 +1210,13 @@ void EventTarget_Init(EventTarget*,IUnknown*,dispex_static_data_t*,compat_mode_t
HRESULT EventTarget_QI(EventTarget*,REFIID,void**);
void EventTarget_init_dispex_info(dispex_data_t*,compat_mode_t);
HRESULT HTMLDOMNode_QI(HTMLDOMNode*,REFIID,void**);
void *HTMLDOMNode_QI(HTMLDOMNode*,REFIID);
void HTMLDOMNode_destructor(DispatchEx*);
void HTMLDOMNode_traverse(DispatchEx*,nsCycleCollectionTraversalCallback*);
void HTMLDOMNode_unlink(DispatchEx*);
void HTMLDOMNode_init_dispex_info(dispex_data_t*,compat_mode_t);
HRESULT HTMLElement_QI(HTMLDOMNode*,REFIID,void**);
void *HTMLElement_QI(HTMLDOMNode*,REFIID);
void HTMLElement_destructor(HTMLDOMNode*);
HRESULT HTMLElement_clone(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**);
HRESULT HTMLElement_get_attr_col(HTMLDOMNode*,HTMLAttributeCollection**);
......
......@@ -177,19 +177,14 @@ static inline SVGElement *SVGElement_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, SVGElement, element.node);
}
static HRESULT SVGElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *SVGElement_QI(HTMLDOMNode *iface, REFIID riid)
{
SVGElement *This = SVGElement_from_HTMLDOMNode(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
if(IsEqualGUID(&IID_ISVGElement, riid))
*ppv = &This->ISVGElement_iface;
else
return HTMLElement_QI(&This->element.node, riid, ppv);
return &This->ISVGElement_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return HTMLElement_QI(&This->element.node, riid);
}
static const NodeImplVtbl SVGElementImplVtbl = {
......@@ -717,19 +712,14 @@ static inline SVGSVGElement *SVGSVGElement_from_HTMLDOMNode(HTMLDOMNode *iface)
return CONTAINING_RECORD(iface, SVGSVGElement, svg_element.element.node);
}
static HRESULT SVGSVGElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *SVGSVGElement_QI(HTMLDOMNode *iface, REFIID riid)
{
SVGSVGElement *This = SVGSVGElement_from_HTMLDOMNode(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
if(IsEqualGUID(&IID_ISVGSVGElement, riid))
*ppv = &This->ISVGSVGElement_iface;
else
return SVGElement_QI(&This->svg_element.element.node, riid, ppv);
return &This->ISVGSVGElement_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return SVGElement_QI(&This->svg_element.element.node, riid);
}
static const NodeImplVtbl SVGSVGElementImplVtbl = {
......@@ -885,19 +875,14 @@ static inline SVGCircleElement *SVGCircleElement_from_HTMLDOMNode(HTMLDOMNode *i
return CONTAINING_RECORD(iface, SVGCircleElement, svg_element.element.node);
}
static HRESULT SVGCircleElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *SVGCircleElement_QI(HTMLDOMNode *iface, REFIID riid)
{
SVGCircleElement *This = SVGCircleElement_from_HTMLDOMNode(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
if(IsEqualGUID(&IID_ISVGCircleElement, riid))
*ppv = &This->ISVGCircleElement_iface;
else
return SVGElement_QI(&This->svg_element.element.node, riid, ppv);
return &This->ISVGCircleElement_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return SVGElement_QI(&This->svg_element.element.node, riid);
}
static const NodeImplVtbl SVGCircleElementImplVtbl = {
......@@ -1126,21 +1111,16 @@ static inline SVGTSpanElement *SVGTSpanElement_from_HTMLDOMNode(HTMLDOMNode *ifa
return CONTAINING_RECORD(iface, SVGTSpanElement, svg_element.element.node);
}
static HRESULT SVGTSpanElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
static void *SVGTSpanElement_QI(HTMLDOMNode *iface, REFIID riid)
{
SVGTSpanElement *This = SVGTSpanElement_from_HTMLDOMNode(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
if(IsEqualGUID(&IID_ISVGTSpanElement, riid))
*ppv = &This->svg_element.ISVGElement_iface; /* no additional methods */
else if(IsEqualGUID(&IID_ISVGTextContentElement, riid))
*ppv = &This->text_content.ISVGTextContentElement_iface;
else
return SVGElement_QI(&This->svg_element.element.node, riid, ppv);
return &This->svg_element.ISVGElement_iface; /* no additional methods */
if(IsEqualGUID(&IID_ISVGTextContentElement, riid))
return &This->text_content.ISVGTextContentElement_iface;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
return SVGElement_QI(&This->svg_element.element.node, riid);
}
static const NodeImplVtbl SVGTSpanElementImplVtbl = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment