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

mshtml: Use the dispex's query_interface for the remaining nodes.

parent 7abe0951
......@@ -802,18 +802,14 @@ static inline HTMLAnchorElement *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLAnchorElement, element.node.event_target.dispex);
}
static void *HTMLAnchorElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLAnchorElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLAnchorElement *This = impl_from_HTMLDOMNode(iface);
HTMLAnchorElement *This = impl_from_DispatchEx(dispex);
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);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLAnchorElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -865,7 +861,6 @@ fallback:
static const NodeImplVtbl HTMLAnchorElementImplVtbl = {
.clsid = &CLSID_HTMLAnchorElement,
.qi = HTMLAnchorElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -876,6 +871,7 @@ static const NodeImplVtbl HTMLAnchorElementImplVtbl = {
static const event_target_vtbl_t HTMLAnchorElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLAnchorElement_query_interface,
.traverse = HTMLAnchorElement_traverse,
.unlink = HTMLAnchorElement_unlink
},
......
......@@ -418,14 +418,14 @@ static inline HTMLAreaElement *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLAreaElement, element.node.event_target.dispex);
}
static void *HTMLAreaElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLAreaElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLAreaElement *This = impl_from_HTMLDOMNode(iface);
HTMLAreaElement *This = impl_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IHTMLAreaElement, riid))
return &This->IHTMLAreaElement_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLAreaElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -477,7 +477,6 @@ fallback:
static const NodeImplVtbl HTMLAreaElementImplVtbl = {
.clsid = &CLSID_HTMLAreaElement,
.qi = HTMLAreaElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -488,6 +487,7 @@ static const NodeImplVtbl HTMLAreaElementImplVtbl = {
static const event_target_vtbl_t HTMLAreaElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLAreaElement_query_interface,
.traverse = HTMLAreaElement_traverse,
.unlink = HTMLAreaElement_unlink
},
......
......@@ -928,20 +928,16 @@ static inline HTMLBodyElement *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLBodyElement, element.node.event_target.dispex);
}
static void *HTMLBodyElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLBodyElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLBodyElement *This = impl_from_HTMLDOMNode(iface);
HTMLBodyElement *This = impl_from_DispatchEx(dispex);
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);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLBodyElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -969,7 +965,6 @@ static const cpc_entry_t HTMLBodyElement_cpc[] = {
static const NodeImplVtbl HTMLBodyElementImplVtbl = {
.clsid = &CLSID_HTMLBody,
.qi = HTMLBodyElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLBodyElement_cpc,
.clone = HTMLElement_clone,
......@@ -983,6 +978,7 @@ static const NodeImplVtbl HTMLBodyElementImplVtbl = {
static const event_target_vtbl_t HTMLBodyElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLBodyElement_query_interface,
.traverse = HTMLBodyElement_traverse,
.unlink = HTMLBodyElement_unlink
},
......
......@@ -160,19 +160,23 @@ static HRESULT HTMLCommentElement_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode,
return S_OK;
}
static void *HTMLCommentElement_QI(HTMLDOMNode *iface, REFIID riid)
static inline HTMLCommentElement *impl_from_DispatchEx(DispatchEx *iface)
{
HTMLCommentElement *This = impl_from_HTMLDOMNode(iface);
return CONTAINING_RECORD(iface, HTMLCommentElement, element.node.event_target.dispex);
}
static void *HTMLCommentElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLCommentElement *This = impl_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IHTMLCommentElement, riid))
return &This->IHTMLCommentElement_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static const NodeImplVtbl HTMLCommentElementImplVtbl = {
.clsid = &CLSID_HTMLCommentElement,
.qi = HTMLCommentElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLCommentElement_clone,
......@@ -183,6 +187,7 @@ static const NodeImplVtbl HTMLCommentElementImplVtbl = {
static const event_target_vtbl_t HTMLCommentElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLCommentElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink
},
......
......@@ -316,7 +316,7 @@ static void *DocumentType_query_interface(DispatchEx *dispex, REFIID riid)
if(IsEqualGUID(&IID_IDOMDocumentType, riid))
return &This->IDOMDocumentType_iface;
return HTMLDOMNode_QI(&This->node, riid);
return HTMLDOMNode_query_interface(&This->node.event_target.dispex, riid);
}
static nsISupports *DocumentType_get_gecko_target(DispatchEx *dispex)
......@@ -5863,7 +5863,7 @@ static void *HTMLDocumentNode_query_interface(DispatchEx *dispex, REFIID riid)
return NULL;
}
return HTMLDOMNode_QI(&This->node, riid);
return HTMLDOMNode_query_interface(&This->node.event_target.dispex, riid);
}
static void HTMLDocumentNode_unlink(DispatchEx *dispex)
......
......@@ -6811,7 +6811,6 @@ const cpc_entry_t HTMLElement_cpc[] = {
static const NodeImplVtbl HTMLElementImplVtbl = {
.clsid = &CLSID_HTMLUnknownElement,
.qi = HTMLElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -6824,14 +6823,10 @@ static inline HTMLElement *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLElement, node.event_target.dispex);
}
void *HTMLElement_QI(HTMLDOMNode *iface, REFIID riid)
void *HTMLElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLElement *This = impl_from_HTMLDOMNode(iface);
HTMLElement *This = impl_from_DispatchEx(dispex);
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))
......@@ -6861,7 +6856,7 @@ void *HTMLElement_QI(HTMLDOMNode *iface, REFIID riid)
if(IsEqualGUID(&IID_IWineHTMLElementPrivate, riid))
return &This->IWineHTMLElementPrivate_iface;
return HTMLDOMNode_QI(&This->node, riid);
return HTMLDOMNode_query_interface(&This->node.event_target.dispex, riid);
}
void HTMLElement_destructor(HTMLDOMNode *iface)
......@@ -7322,6 +7317,7 @@ const tid_t HTMLElement_iface_tids[] = {
static const event_target_vtbl_t HTMLElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface = HTMLElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink,
},
......
......@@ -145,7 +145,6 @@ ConnectionPointContainer *HTMLElement_get_cp_container(DispatchEx*);
IHTMLEventObj *HTMLElement_set_current_event(DispatchEx*,IHTMLEventObj*);
#define HTMLELEMENT_DISPEX_VTBL_ENTRIES \
.query_interface = HTMLDOMNode_query_interface, \
.destructor = HTMLDOMNode_destructor, \
.get_dispid = HTMLElement_get_dispid, \
.get_name = HTMLElement_get_name, \
......
......@@ -778,20 +778,16 @@ static inline HTMLFormElement *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLFormElement, element.node.event_target.dispex);
}
static void *HTMLFormElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLFormElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLFormElement *This = impl_from_HTMLDOMNode(iface);
HTMLFormElement *This = impl_from_DispatchEx(dispex);
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);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLFormElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -967,7 +963,6 @@ static HRESULT HTMLFormElement_handle_event(HTMLDOMNode *iface, DWORD eid, nsIDO
static const NodeImplVtbl HTMLFormElementImplVtbl = {
.clsid = &CLSID_HTMLFormElement,
.qi = HTMLFormElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -981,6 +976,7 @@ static const NodeImplVtbl HTMLFormElementImplVtbl = {
static const event_target_vtbl_t HTMLFormElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLFormElement_query_interface,
.traverse = HTMLFormElement_traverse,
.unlink = HTMLFormElement_unlink
},
......
......@@ -707,7 +707,7 @@ static void *HTMLFrameBase_QI(HTMLFrameBase *This, REFIID riid)
if(IsEqualGUID(&IID_IHTMLFrameBase2, riid))
return &This->IHTMLFrameBase2_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLFrameBase_destructor(HTMLFrameBase *This)
......@@ -931,9 +931,9 @@ static inline HTMLFrameElement *frame_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLFrameElement, framebase.element.node.event_target.dispex);
}
static void *HTMLFrameElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLFrameElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLFrameElement *This = frame_from_HTMLDOMNode(iface);
HTMLFrameElement *This = frame_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IHTMLFrameElement3, riid))
return &This->IHTMLFrameElement3_iface;
......@@ -1003,7 +1003,6 @@ static HRESULT HTMLFrameElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid,
static const NodeImplVtbl HTMLFrameElementImplVtbl = {
.clsid = &CLSID_HTMLFrameElement,
.qi = HTMLFrameElement_QI,
.destructor = HTMLFrameElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -1020,6 +1019,7 @@ static const NodeImplVtbl HTMLFrameElementImplVtbl = {
static const event_target_vtbl_t HTMLFrameElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLFrameElement_query_interface,
.traverse = HTMLFrameElement_traverse,
.unlink = HTMLFrameElement_unlink
},
......@@ -1517,9 +1517,9 @@ static inline HTMLIFrame *iframe_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLIFrame, framebase.element.node.event_target.dispex);
}
static void *HTMLIFrame_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLIFrame_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLIFrame *This = iframe_from_HTMLDOMNode(iface);
HTMLIFrame *This = iframe_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IHTMLIFrameElement, riid))
return &This->IHTMLIFrameElement_iface;
......@@ -1593,7 +1593,6 @@ static HRESULT HTMLIFrame_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid, WORD
static const NodeImplVtbl HTMLIFrameImplVtbl = {
.clsid = &CLSID_HTMLIFrame,
.qi = HTMLIFrame_QI,
.destructor = HTMLIFrame_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -1610,6 +1609,7 @@ static const NodeImplVtbl HTMLIFrameImplVtbl = {
static const event_target_vtbl_t HTMLIFrame_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLIFrame_query_interface,
.traverse = HTMLIFrame_traverse,
.unlink = HTMLIFrame_unlink
},
......
......@@ -123,24 +123,23 @@ static const IHTMLGenericElementVtbl HTMLGenericElementVtbl = {
HTMLGenericElement_namedRecordset
};
static inline HTMLGenericElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
static inline HTMLGenericElement *impl_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, HTMLGenericElement, element.node);
return CONTAINING_RECORD(iface, HTMLGenericElement, element.node.event_target.dispex);
}
static void *HTMLGenericElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLGenericElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLGenericElement *This = impl_from_HTMLDOMNode(iface);
HTMLGenericElement *This = impl_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IHTMLGenericElement, riid))
return &This->IHTMLGenericElement_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static const NodeImplVtbl HTMLGenericElementImplVtbl = {
.clsid = &CLSID_HTMLGenericElement,
.qi = HTMLGenericElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -151,6 +150,7 @@ static const NodeImplVtbl HTMLGenericElementImplVtbl = {
static const event_target_vtbl_t HTMLGenericElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLGenericElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink
},
......
......@@ -141,24 +141,23 @@ static const IHTMLTitleElementVtbl HTMLTitleElementVtbl = {
HTMLTitleElement_get_text
};
static inline HTMLTitleElement *HTMLTitleElement_from_HTMLDOMNode(HTMLDOMNode *iface)
static inline HTMLTitleElement *HTMLTitleElement_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, HTMLTitleElement, element.node);
return CONTAINING_RECORD(iface, HTMLTitleElement, element.node.event_target.dispex);
}
static void *HTMLTitleElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLTitleElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLTitleElement *This = HTMLTitleElement_from_HTMLDOMNode(iface);
HTMLTitleElement *This = HTMLTitleElement_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IHTMLTitleElement, riid))
return &This->IHTMLTitleElement_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static const NodeImplVtbl HTMLTitleElementImplVtbl = {
.clsid = &CLSID_HTMLTitleElement,
.qi = HTMLTitleElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -169,6 +168,7 @@ static const NodeImplVtbl HTMLTitleElementImplVtbl = {
static const event_target_vtbl_t HTMLTitleElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLTitleElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink
},
......@@ -300,9 +300,9 @@ static const IHTMLHtmlElementVtbl HTMLHtmlElementVtbl = {
HTMLHtmlElement_get_version
};
static inline HTMLHtmlElement *HTMLHtmlElement_from_HTMLDOMNode(HTMLDOMNode *iface)
static inline HTMLHtmlElement *HTMLHtmlElement_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, HTMLHtmlElement, element.node);
return CONTAINING_RECORD(iface, HTMLHtmlElement, element.node.event_target.dispex);
}
static BOOL HTMLHtmlElement_is_settable(HTMLDOMNode *iface, DISPID dispid)
......@@ -315,19 +315,18 @@ static BOOL HTMLHtmlElement_is_settable(HTMLDOMNode *iface, DISPID dispid)
}
}
static void *HTMLHtmlElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLHtmlElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLHtmlElement *This = HTMLHtmlElement_from_HTMLDOMNode(iface);
HTMLHtmlElement *This = HTMLHtmlElement_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IHTMLHtmlElement, riid))
return &This->IHTMLHtmlElement_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static const NodeImplVtbl HTMLHtmlElementImplVtbl = {
.clsid = &CLSID_HTMLHtmlElement,
.qi = HTMLHtmlElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -339,6 +338,7 @@ static const NodeImplVtbl HTMLHtmlElementImplVtbl = {
static const event_target_vtbl_t HTMLHtmlElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLHtmlElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink
},
......@@ -538,28 +538,23 @@ static const IHTMLMetaElementVtbl HTMLMetaElementVtbl = {
HTMLMetaElement_get_charset
};
static inline HTMLMetaElement *HTMLMetaElement_from_HTMLDOMNode(HTMLDOMNode *iface)
static inline HTMLMetaElement *HTMLMetaElement_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, HTMLMetaElement, element.node);
return CONTAINING_RECORD(iface, HTMLMetaElement, element.node.event_target.dispex);
}
static void *HTMLMetaElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLMetaElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLMetaElement *This = HTMLMetaElement_from_HTMLDOMNode(iface);
HTMLMetaElement *This = HTMLMetaElement_from_DispatchEx(dispex);
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;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static const NodeImplVtbl HTMLMetaElementImplVtbl = {
.clsid = &CLSID_HTMLMetaElement,
.qi = HTMLMetaElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -570,6 +565,7 @@ static const NodeImplVtbl HTMLMetaElementImplVtbl = {
static const event_target_vtbl_t HTMLMetaElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLMetaElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink
},
......@@ -702,26 +698,25 @@ static const IHTMLHeadElementVtbl HTMLHeadElementVtbl = {
HTMLHeadElement_get_profile
};
static inline HTMLHeadElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
static inline HTMLHeadElement *impl_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, HTMLHeadElement, element.node);
return CONTAINING_RECORD(iface, HTMLHeadElement, element.node.event_target.dispex);
}
static void *HTMLHeadElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLHeadElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLHeadElement *This = impl_from_HTMLDOMNode(iface);
HTMLHeadElement *This = impl_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IHTMLHeadElement, riid))
return &This->IHTMLHeadElement_iface;
if(IsEqualGUID(&DIID_DispHTMLHeadElement, riid))
return &This->IHTMLHeadElement_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static const NodeImplVtbl HTMLHeadElementImplVtbl = {
.clsid = &CLSID_HTMLHeadElement,
.qi = HTMLHeadElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -732,6 +727,7 @@ static const NodeImplVtbl HTMLHeadElementImplVtbl = {
static const event_target_vtbl_t HTMLHeadElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLHeadElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink
},
......
......@@ -670,14 +670,14 @@ static inline HTMLImg *HTMLImg_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLImg, element.node.event_target.dispex);
}
static void *HTMLImgElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLImgElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLImg *This = impl_from_HTMLDOMNode(iface);
HTMLImg *This = HTMLImg_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IHTMLImgElement, riid))
return &This->IHTMLImgElement_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLImgElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -698,7 +698,6 @@ static void HTMLImgElement_unlink(DispatchEx *dispex)
static const NodeImplVtbl HTMLImgElementImplVtbl = {
.clsid = &CLSID_HTMLImg,
.qi = HTMLImgElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -710,6 +709,7 @@ static const NodeImplVtbl HTMLImgElementImplVtbl = {
static const event_target_vtbl_t HTMLImgElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLImgElement_query_interface,
.traverse = HTMLImgElement_traverse,
.unlink = HTMLImgElement_unlink
},
......
......@@ -1380,14 +1380,10 @@ static inline HTMLInputElement *input_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLInputElement, element.node.event_target.dispex);
}
static void *HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLInputElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLInputElement *This = impl_from_HTMLDOMNode(iface);
HTMLInputElement *This = input_from_DispatchEx(dispex);
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))
......@@ -1395,7 +1391,7 @@ static void *HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid)
if(IsEqualGUID(&IID_IHTMLInputTextElement2, riid))
return &This->IHTMLInputTextElement2_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLInputElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -1416,7 +1412,6 @@ static void HTMLInputElement_unlink(DispatchEx *dispex)
static const NodeImplVtbl HTMLInputElementImplVtbl = {
.clsid = &CLSID_HTMLInputElement,
.qi = HTMLInputElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -1430,6 +1425,7 @@ static const NodeImplVtbl HTMLInputElementImplVtbl = {
static const event_target_vtbl_t HTMLInputElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLInputElement_query_interface,
.traverse = HTMLInputElement_traverse,
.unlink = HTMLInputElement_unlink
},
......@@ -1598,26 +1594,23 @@ static const IHTMLLabelElementVtbl HTMLLabelElementVtbl = {
HTMLLabelElement_get_accessKey
};
static inline HTMLLabelElement *label_from_HTMLDOMNode(HTMLDOMNode *iface)
static inline HTMLLabelElement *label_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, HTMLLabelElement, element.node);
return CONTAINING_RECORD(iface, HTMLLabelElement, element.node.event_target.dispex);
}
static void *HTMLLabelElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLLabelElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLLabelElement *This = label_from_HTMLDOMNode(iface);
HTMLLabelElement *This = label_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLLabelElement_iface;
if(IsEqualGUID(&IID_IHTMLLabelElement, riid))
return &This->IHTMLLabelElement_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static const NodeImplVtbl HTMLLabelElementImplVtbl = {
.clsid = &CLSID_HTMLLabelElement,
.qi = HTMLLabelElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -1628,6 +1621,7 @@ static const NodeImplVtbl HTMLLabelElementImplVtbl = {
static const event_target_vtbl_t HTMLLabelElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLLabelElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink
},
......@@ -1925,16 +1919,14 @@ static inline HTMLButtonElement *button_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLButtonElement, element.node.event_target.dispex);
}
static void *HTMLButtonElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLButtonElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLButtonElement *This = button_from_HTMLDOMNode(iface);
HTMLButtonElement *This = button_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLButtonElement_iface;
if(IsEqualGUID(&IID_IHTMLButtonElement, riid))
return &This->IHTMLButtonElement_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLButtonElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -1955,7 +1947,6 @@ static void HTMLButtonElement_unlink(DispatchEx *dispex)
static const NodeImplVtbl HTMLButtonElementImplVtbl = {
.clsid = &CLSID_HTMLButtonElement,
.qi = HTMLButtonElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -1969,6 +1960,7 @@ static const NodeImplVtbl HTMLButtonElementImplVtbl = {
static const event_target_vtbl_t HTMLButtonElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLButtonElement_query_interface,
.traverse = HTMLButtonElement_traverse,
.unlink = HTMLButtonElement_unlink
},
......
......@@ -391,14 +391,14 @@ static inline HTMLLinkElement *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLLinkElement, element.node.event_target.dispex);
}
static void *HTMLLinkElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLLinkElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLLinkElement *This = impl_from_HTMLDOMNode(iface);
HTMLLinkElement *This = impl_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IHTMLLinkElement, riid))
return &This->IHTMLLinkElement_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLLinkElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -418,7 +418,6 @@ static void HTMLLinkElement_unlink(DispatchEx *dispex)
}
static const NodeImplVtbl HTMLLinkElementImplVtbl = {
.clsid = &CLSID_HTMLLinkElement,
.qi = HTMLLinkElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -431,6 +430,7 @@ static const NodeImplVtbl HTMLLinkElementImplVtbl = {
static const event_target_vtbl_t HTMLLinkElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLLinkElement_query_interface,
.traverse = HTMLLinkElement_traverse,
.unlink = HTMLLinkElement_unlink
},
......
......@@ -1407,11 +1407,6 @@ void *HTMLDOMNode_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLDOMNode *This = HTMLDOMNode_from_DispatchEx(dispex);
return This->vtbl->qi(This, riid);
}
void *HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid)
{
if(IsEqualGUID(&IID_IUnknown, riid))
return &This->IHTMLDOMNode_iface;
if(IsEqualGUID(&IID_IDispatch, riid))
......@@ -1475,7 +1470,6 @@ void HTMLDOMNode_init_dispex_info(dispex_data_t *info, compat_mode_t mode)
static const cpc_entry_t HTMLDOMNode_cpc[] = {{NULL}};
static const NodeImplVtbl HTMLDOMNodeImplVtbl = {
.qi = HTMLDOMNode_QI,
.cpc_entries = HTMLDOMNode_cpc,
.clone = HTMLDOMNode_clone
};
......
......@@ -649,15 +649,11 @@ static inline HTMLObjectElement *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLObjectElement, plugin_container.element.node.event_target.dispex);
}
static void *HTMLObjectElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLObjectElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLObjectElement *This = impl_from_HTMLDOMNode(iface);
HTMLObjectElement *This = impl_from_DispatchEx(dispex);
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))
......@@ -667,7 +663,7 @@ static void *HTMLObjectElement_QI(HTMLDOMNode *iface, REFIID riid)
return &This->plugin_container;
}
elem_iface = HTMLElement_QI(&This->plugin_container.element.node, riid);
elem_iface = HTMLElement_query_interface(&This->plugin_container.element.node.event_target.dispex, 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);
......@@ -744,7 +740,6 @@ static HRESULT HTMLObjectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid
static const NodeImplVtbl HTMLObjectElementImplVtbl = {
.clsid = &CLSID_HTMLObjectElement,
.qi = HTMLObjectElement_QI,
.destructor = HTMLObjectElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -759,6 +754,7 @@ static const NodeImplVtbl HTMLObjectElementImplVtbl = {
static const event_target_vtbl_t HTMLObjectElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLObjectElement_query_interface,
.traverse = HTMLObjectElement_traverse,
.unlink = HTMLObjectElement_unlink
},
......@@ -987,28 +983,23 @@ static const IHTMLEmbedElementVtbl HTMLEmbedElementVtbl = {
HTMLEmbedElement_get_height
};
static inline HTMLEmbed *embed_from_HTMLDOMNode(HTMLDOMNode *iface)
static inline HTMLEmbed *embed_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, HTMLEmbed, element.node);
return CONTAINING_RECORD(iface, HTMLEmbed, element.node.event_target.dispex);
}
static void *HTMLEmbedElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLEmbedElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLEmbed *This = embed_from_HTMLDOMNode(iface);
HTMLEmbed *This = embed_from_DispatchEx(dispex);
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;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static const NodeImplVtbl HTMLEmbedElementImplVtbl = {
.clsid = &CLSID_HTMLEmbed,
.qi = HTMLEmbedElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -1019,6 +1010,7 @@ static const NodeImplVtbl HTMLEmbedElementImplVtbl = {
static const event_target_vtbl_t HTMLEmbedElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLEmbedElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink
},
......
......@@ -385,18 +385,14 @@ static inline HTMLScriptElement *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLScriptElement, element.node.event_target.dispex);
}
static void *HTMLScriptElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLScriptElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLScriptElement *This = impl_from_HTMLDOMNode(iface);
HTMLScriptElement *This = impl_from_DispatchEx(dispex);
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);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLScriptElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -424,7 +420,6 @@ static void HTMLScriptElement_destructor(HTMLDOMNode *iface)
static const NodeImplVtbl HTMLScriptElementImplVtbl = {
.clsid = &CLSID_HTMLScriptElement,
.qi = HTMLScriptElement_QI,
.destructor = HTMLScriptElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -437,6 +432,7 @@ static const NodeImplVtbl HTMLScriptElementImplVtbl = {
static const event_target_vtbl_t HTMLScriptElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLScriptElement_query_interface,
.traverse = HTMLScriptElement_traverse,
.unlink = HTMLScriptElement_unlink
},
......
......@@ -351,18 +351,14 @@ static inline HTMLOptionElement *HTMLOptionElement_from_DispatchEx(DispatchEx *i
return CONTAINING_RECORD(iface, HTMLOptionElement, element.node.event_target.dispex);
}
static void *HTMLOptionElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLOptionElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLOptionElement *This = HTMLOptionElement_from_HTMLDOMNode(iface);
HTMLOptionElement *This = HTMLOptionElement_from_DispatchEx(dispex);
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);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLOptionElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -383,7 +379,6 @@ static void HTMLOptionElement_unlink(DispatchEx *dispex)
static const NodeImplVtbl HTMLOptionElementImplVtbl = {
.clsid = &CLSID_HTMLOptionElement,
.qi = HTMLOptionElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -394,6 +389,7 @@ static const NodeImplVtbl HTMLOptionElementImplVtbl = {
static const event_target_vtbl_t HTMLOptionElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLOptionElement_query_interface,
.traverse = HTMLOptionElement_traverse,
.unlink = HTMLOptionElement_unlink
},
......@@ -1330,18 +1326,14 @@ static inline HTMLSelectElement *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLSelectElement, element.node.event_target.dispex);
}
static void *HTMLSelectElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLSelectElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLSelectElement *This = impl_from_HTMLDOMNode(iface);
HTMLSelectElement *This = impl_from_DispatchEx(dispex);
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);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLSelectElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -1429,7 +1421,6 @@ static HRESULT HTMLSelectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid
static const NodeImplVtbl HTMLSelectElementImplVtbl = {
.clsid = &CLSID_HTMLSelectElement,
.qi = HTMLSelectElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -1445,6 +1436,7 @@ static const NodeImplVtbl HTMLSelectElementImplVtbl = {
static const event_target_vtbl_t HTMLSelectElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLSelectElement_query_interface,
.traverse = HTMLSelectElement_traverse,
.unlink = HTMLSelectElement_unlink
},
......
......@@ -370,20 +370,16 @@ static inline HTMLStyleElement *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLStyleElement, element.node.event_target.dispex);
}
static void *HTMLStyleElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLStyleElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLStyleElement *This = impl_from_HTMLDOMNode(iface);
HTMLStyleElement *This = impl_from_DispatchEx(dispex);
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;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLStyleElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -429,7 +425,6 @@ static void HTMLStyleElement_init_dispex_info(dispex_data_t *info, compat_mode_t
static const NodeImplVtbl HTMLStyleElementImplVtbl = {
.clsid = &CLSID_HTMLStyleElement,
.qi = HTMLStyleElement_QI,
.destructor = HTMLStyleElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -440,6 +435,7 @@ static const NodeImplVtbl HTMLStyleElementImplVtbl = {
static const event_target_vtbl_t HTMLStyleElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLStyleElement_query_interface,
.traverse = HTMLStyleElement_traverse,
.unlink = HTMLStyleElement_unlink
},
......
......@@ -451,18 +451,14 @@ static inline HTMLTableCell *HTMLTableCell_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLTableCell, element.node.event_target.dispex);
}
static void *HTMLTableCell_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLTableCell_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLTableCell *This = HTMLTableCell_from_HTMLDOMNode(iface);
HTMLTableCell *This = HTMLTableCell_from_DispatchEx(dispex);
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;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLTableCell_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -483,7 +479,6 @@ static void HTMLTableCell_unlink(DispatchEx *dispex)
static const NodeImplVtbl HTMLTableCellImplVtbl = {
.clsid = &CLSID_HTMLTableCell,
.qi = HTMLTableCell_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -494,6 +489,7 @@ static const NodeImplVtbl HTMLTableCellImplVtbl = {
static const event_target_vtbl_t HTMLTableCell_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLTableCell_query_interface,
.traverse = HTMLTableCell_traverse,
.unlink = HTMLTableCell_unlink
},
......@@ -885,18 +881,14 @@ static inline HTMLTableRow *HTMLTableRow_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLTableRow, element.node.event_target.dispex);
}
static void *HTMLTableRow_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLTableRow_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLTableRow *This = HTMLTableRow_from_HTMLDOMNode(iface);
HTMLTableRow *This = HTMLTableRow_from_DispatchEx(dispex);
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);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLTableRow_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -917,7 +909,6 @@ static void HTMLTableRow_unlink(DispatchEx *dispex)
static const NodeImplVtbl HTMLTableRowImplVtbl = {
.clsid = &CLSID_HTMLTableRow,
.qi = HTMLTableRow_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -928,6 +919,7 @@ static const NodeImplVtbl HTMLTableRowImplVtbl = {
static const event_target_vtbl_t HTMLTableRow_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLTableRow_query_interface,
.traverse = HTMLTableRow_traverse,
.unlink = HTMLTableRow_unlink
},
......@@ -1893,14 +1885,10 @@ static inline HTMLTable *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLTable, element.node.event_target.dispex);
}
static void *HTMLTable_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLTable_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLTable *This = impl_from_HTMLDOMNode(iface);
HTMLTable *This = impl_from_DispatchEx(dispex);
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))
......@@ -1908,7 +1896,7 @@ static void *HTMLTable_QI(HTMLDOMNode *iface, REFIID riid)
if(IsEqualGUID(&IID_IHTMLTable3, riid))
return &This->IHTMLTable3_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLTable_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -1935,7 +1923,6 @@ static const cpc_entry_t HTMLTable_cpc[] = {
static const NodeImplVtbl HTMLTableImplVtbl = {
.clsid = &CLSID_HTMLTable,
.qi = HTMLTable_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLTable_cpc,
.clone = HTMLElement_clone,
......@@ -1946,6 +1933,7 @@ static const NodeImplVtbl HTMLTableImplVtbl = {
static const event_target_vtbl_t HTMLTable_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLTable_query_interface,
.traverse = HTMLTable_traverse,
.unlink = HTMLTable_unlink
},
......
......@@ -412,18 +412,14 @@ static inline HTMLTextAreaElement *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLTextAreaElement, element.node.event_target.dispex);
}
static void *HTMLTextAreaElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *HTMLTextAreaElement_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface);
HTMLTextAreaElement *This = impl_from_DispatchEx(dispex);
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);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static void HTMLTextAreaElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
......@@ -444,7 +440,6 @@ static void HTMLTextAreaElement_unlink(DispatchEx *dispex)
static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
.clsid = &CLSID_HTMLTextAreaElement,
.qi = HTMLTextAreaElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -458,6 +453,7 @@ static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
static const event_target_vtbl_t HTMLTextAreaElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= HTMLTextAreaElement_query_interface,
.traverse = HTMLTextAreaElement_traverse,
.unlink = HTMLTextAreaElement_unlink
},
......
......@@ -345,7 +345,7 @@ static void *HTMLDOMTextNode_query_interface(DispatchEx *dispex, REFIID riid)
if(IsEqualGUID(&IID_IHTMLDOMTextNode2, riid))
return &This->IHTMLDOMTextNode2_iface;
return HTMLDOMNode_QI(&This->node, riid);
return HTMLDOMNode_query_interface(&This->node.event_target.dispex, riid);
}
static const cpc_entry_t HTMLDOMTextNode_cpc[] = {{NULL}};
......
......@@ -813,7 +813,6 @@ struct GeckoBrowser {
typedef struct {
const CLSID *clsid;
void *(*qi)(HTMLDOMNode*,REFIID);
void (*destructor)(HTMLDOMNode*);
const cpc_entry_t *cpc_entries;
HRESULT (*clone)(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**);
......@@ -1204,14 +1203,13 @@ void EventTarget_Init(EventTarget*,dispex_static_data_t*,compat_mode_t);
void *EventTarget_query_interface(EventTarget*,REFIID);
void EventTarget_init_dispex_info(dispex_data_t*,compat_mode_t);
void *HTMLDOMNode_QI(HTMLDOMNode*,REFIID);
void *HTMLDOMNode_query_interface(DispatchEx*,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);
void *HTMLElement_QI(HTMLDOMNode*,REFIID);
void *HTMLElement_query_interface(DispatchEx*,REFIID);
void HTMLElement_destructor(HTMLDOMNode*);
HRESULT HTMLElement_get_dispid(DispatchEx*,BSTR,DWORD,DISPID*);
HRESULT HTMLElement_get_name(DispatchEx*,DISPID,BSTR*);
......
......@@ -173,24 +173,23 @@ static const ISVGElementVtbl SVGElementVtbl = {
SVGElement_get_focusable
};
static inline SVGElement *SVGElement_from_HTMLDOMNode(HTMLDOMNode *iface)
static inline SVGElement *SVGElement_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, SVGElement, element.node);
return CONTAINING_RECORD(iface, SVGElement, element.node.event_target.dispex);
}
static void *SVGElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *SVGElement_query_interface(DispatchEx *dispex, REFIID riid)
{
SVGElement *This = SVGElement_from_HTMLDOMNode(iface);
SVGElement *This = SVGElement_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_ISVGElement, riid))
return &This->ISVGElement_iface;
return HTMLElement_QI(&This->element.node, riid);
return HTMLElement_query_interface(&This->element.node.event_target.dispex, riid);
}
static const NodeImplVtbl SVGElementImplVtbl = {
.clsid = &CLSID_SVGElement,
.qi = SVGElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -200,6 +199,7 @@ static const NodeImplVtbl SVGElementImplVtbl = {
static const event_target_vtbl_t SVGElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= SVGElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink
},
......@@ -723,24 +723,23 @@ static const ISVGSVGElementVtbl SVGSVGElementVtbl = {
SVGSVGElement_getElementById
};
static inline SVGSVGElement *SVGSVGElement_from_HTMLDOMNode(HTMLDOMNode *iface)
static inline SVGSVGElement *SVGSVGElement_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, SVGSVGElement, svg_element.element.node);
return CONTAINING_RECORD(iface, SVGSVGElement, svg_element.element.node.event_target.dispex);
}
static void *SVGSVGElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *SVGSVGElement_query_interface(DispatchEx *dispex, REFIID riid)
{
SVGSVGElement *This = SVGSVGElement_from_HTMLDOMNode(iface);
SVGSVGElement *This = SVGSVGElement_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_ISVGSVGElement, riid))
return &This->ISVGSVGElement_iface;
return SVGElement_QI(&This->svg_element.element.node, riid);
return SVGElement_query_interface(&This->svg_element.element.node.event_target.dispex, riid);
}
static const NodeImplVtbl SVGSVGElementImplVtbl = {
.clsid = &CLSID_SVGSVGElement,
.qi = SVGSVGElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -750,6 +749,7 @@ static const NodeImplVtbl SVGSVGElementImplVtbl = {
static const event_target_vtbl_t SVGSVGElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= SVGSVGElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink
},
......@@ -903,24 +903,23 @@ static const ISVGCircleElementVtbl SVGCircleElementVtbl = {
SVGCircleElement_get_r
};
static inline SVGCircleElement *SVGCircleElement_from_HTMLDOMNode(HTMLDOMNode *iface)
static inline SVGCircleElement *SVGCircleElement_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, SVGCircleElement, svg_element.element.node);
return CONTAINING_RECORD(iface, SVGCircleElement, svg_element.element.node.event_target.dispex);
}
static void *SVGCircleElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *SVGCircleElement_query_interface(DispatchEx *dispex, REFIID riid)
{
SVGCircleElement *This = SVGCircleElement_from_HTMLDOMNode(iface);
SVGCircleElement *This = SVGCircleElement_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_ISVGCircleElement, riid))
return &This->ISVGCircleElement_iface;
return SVGElement_QI(&This->svg_element.element.node, riid);
return SVGElement_query_interface(&This->svg_element.element.node.event_target.dispex, riid);
}
static const NodeImplVtbl SVGCircleElementImplVtbl = {
.clsid = &CLSID_SVGCircleElement,
.qi = SVGCircleElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -930,6 +929,7 @@ static const NodeImplVtbl SVGCircleElementImplVtbl = {
static const event_target_vtbl_t SVGCircleElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= SVGCircleElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink
},
......@@ -1156,26 +1156,25 @@ struct SVGTSpanElement {
SVGTextContentElement text_content;
};
static inline SVGTSpanElement *SVGTSpanElement_from_HTMLDOMNode(HTMLDOMNode *iface)
static inline SVGTSpanElement *SVGTSpanElement_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, SVGTSpanElement, svg_element.element.node);
return CONTAINING_RECORD(iface, SVGTSpanElement, svg_element.element.node.event_target.dispex);
}
static void *SVGTSpanElement_QI(HTMLDOMNode *iface, REFIID riid)
static void *SVGTSpanElement_query_interface(DispatchEx *dispex, REFIID riid)
{
SVGTSpanElement *This = SVGTSpanElement_from_HTMLDOMNode(iface);
SVGTSpanElement *This = SVGTSpanElement_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_ISVGTSpanElement, riid))
return &This->svg_element.ISVGElement_iface; /* no additional methods */
if(IsEqualGUID(&IID_ISVGTextContentElement, riid))
return &This->text_content.ISVGTextContentElement_iface;
return SVGElement_QI(&This->svg_element.element.node, riid);
return SVGElement_query_interface(&This->svg_element.element.node.event_target.dispex, riid);
}
static const NodeImplVtbl SVGTSpanElementImplVtbl = {
.clsid = &CLSID_SVGTSpanElement,
.qi = SVGTSpanElement_QI,
.destructor = HTMLElement_destructor,
.cpc_entries = HTMLElement_cpc,
.clone = HTMLElement_clone,
......@@ -1185,6 +1184,7 @@ static const NodeImplVtbl SVGTSpanElementImplVtbl = {
static const event_target_vtbl_t SVGTSpanElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.query_interface= SVGTSpanElement_query_interface,
.traverse = HTMLDOMNode_traverse,
.unlink = HTMLDOMNode_unlink
},
......
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