Commit f653f4a2 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

mshtml: COM cleanup for the IHTMLDOMNode iface.

parent 6d4170bd
......@@ -50,21 +50,21 @@ static HRESULT WINAPI HTMLAnchorElement_QueryInterface(IHTMLAnchorElement *iface
{
HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLAnchorElement_AddRef(IHTMLAnchorElement *iface)
{
HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLAnchorElement_Release(IHTMLAnchorElement *iface)
{
HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLAnchorElement_GetTypeInfoCount(IHTMLAnchorElement *iface, UINT *pctinfo)
......
......@@ -203,21 +203,21 @@ static HRESULT WINAPI HTMLBodyElement_QueryInterface(IHTMLBodyElement *iface,
{
HTMLBodyElement *This = impl_from_IHTMLBodyElement(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->textcont.element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->textcont.element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLBodyElement_AddRef(IHTMLBodyElement *iface)
{
HTMLBodyElement *This = impl_from_IHTMLBodyElement(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->textcont.element.node));
return IHTMLDOMNode_AddRef(&This->textcont.element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLBodyElement_Release(IHTMLBodyElement *iface)
{
HTMLBodyElement *This = impl_from_IHTMLBodyElement(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->textcont.element.node));
return IHTMLDOMNode_Release(&This->textcont.element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLBodyElement_GetTypeInfoCount(IHTMLBodyElement *iface, UINT *pctinfo)
......
......@@ -46,21 +46,21 @@ static HRESULT WINAPI HTMLCommentElement_QueryInterface(IHTMLCommentElement *ifa
{
HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLCommentElement_AddRef(IHTMLCommentElement *iface)
{
HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLCommentElement_Release(IHTMLCommentElement *iface)
{
HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLCommentElement_GetTypeInfoCount(IHTMLCommentElement *iface, UINT *pctinfo)
......
......@@ -172,7 +172,7 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement
if(FAILED(hres))
return hres;
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)p);
return IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p);
}
static HRESULT WINAPI HTMLDocument_get_activeElement(IHTMLDocument2 *iface, IHTMLElement **p)
......@@ -1985,8 +1985,10 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLWindow *wi
doc->basedoc.doc_obj = doc_obj;
doc->basedoc.window = window;
init_dispex(&doc->node.dispex, (IUnknown*)HTMLDOMNODE(&doc->node), &HTMLDocumentNode_dispex);
init_doc(&doc->basedoc, (IUnknown*)HTMLDOMNODE(&doc->node), DISPATCHEX(&doc->node.dispex));
init_dispex(&doc->node.dispex, (IUnknown*)&doc->node.IHTMLDOMNode_iface,
&HTMLDocumentNode_dispex);
init_doc(&doc->basedoc, (IUnknown*)&doc->node.IHTMLDOMNode_iface,
DISPATCHEX(&doc->node.dispex));
HTMLDocumentNode_SecMgr_Init(doc);
init_nsevents(doc);
......
......@@ -133,8 +133,8 @@ static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR t
if(FAILED(hres))
return hres;
*newTextNode = HTMLDOMNODE(node);
IHTMLDOMNode_AddRef(HTMLDOMNODE(node));
*newTextNode = &node->IHTMLDOMNode_iface;
IHTMLDOMNode_AddRef(&node->IHTMLDOMNode_iface);
return S_OK;
}
......@@ -174,7 +174,7 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I
if(FAILED(hres))
return hres;
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)p);
return IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p);
}
static HRESULT WINAPI HTMLDocument3_uniqueID(IHTMLDocument3 *iface, BSTR *p)
......@@ -542,7 +542,8 @@ static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v
nsIDOMNode_Release(nsnode);
if(SUCCEEDED(hres))
hres = IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)pel);
hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement,
(void**)pel);
}else {
*pel = NULL;
hres = S_OK;
......
......@@ -153,8 +153,8 @@ static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bs
if(FAILED(hres))
return hres;
*ppRetNode = HTMLDOMNODE(&elem->node);
IHTMLDOMNode_AddRef(HTMLDOMNODE(&elem->node));
*ppRetNode = &elem->node.IHTMLDOMNode_iface;
IHTMLDOMNode_AddRef(&elem->node.IHTMLDOMNode_iface);
return S_OK;
}
......
......@@ -152,21 +152,21 @@ static HRESULT WINAPI HTMLElement_QueryInterface(IHTMLElement *iface,
{
HTMLElement *This = impl_from_IHTMLElement(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLElement_AddRef(IHTMLElement *iface)
{
HTMLElement *This = impl_from_IHTMLElement(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->node));
return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLElement_Release(IHTMLElement *iface)
{
HTMLElement *This = impl_from_IHTMLElement(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->node));
return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLElement_GetTypeInfoCount(IHTMLElement *iface, UINT *pctinfo)
......@@ -409,7 +409,7 @@ static HRESULT WINAPI HTMLElement_get_parentElement(IHTMLElement *iface, IHTMLEl
TRACE("(%p)->(%p)\n", This, p);
hres = IHTMLDOMNode_get_parentNode(HTMLDOMNODE(&This->node), &node);
hres = IHTMLDOMNode_get_parentNode(&This->node.IHTMLDOMNode_iface, &node);
if(FAILED(hres))
return hres;
......
......@@ -535,7 +535,7 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node, BOOL include_ro
create_all_list(node->doc, node, &buf);
elem_vector_normalize(&buf);
return HTMLElementCollection_Create((IUnknown*)HTMLDOMNODE(node), buf.buf, buf.len);
return HTMLElementCollection_Create((IUnknown*)&node->IHTMLDOMNode_iface, buf.buf, buf.len);
}
IHTMLElementCollection *create_collection_from_nodelist(HTMLDocumentNode *doc, IUnknown *unk, nsIDOMNodeList *nslist)
......
......@@ -47,21 +47,21 @@ static HRESULT WINAPI HTMLEmbedElement_QueryInterface(IHTMLEmbedElement *iface,
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLEmbedElement_AddRef(IHTMLEmbedElement *iface)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLEmbedElement_Release(IHTMLEmbedElement *iface)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLEmbedElement_GetTypeInfoCount(IHTMLEmbedElement *iface, UINT *pctinfo)
......
......@@ -322,7 +322,8 @@ static HRESULT WINAPI HTMLEventObj_get_srcElement(IHTMLEventObj *iface, IHTMLEle
TRACE("(%p)->(%p)\n", This, p);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(This->target), &IID_IHTMLElement, (void**)p);
return IHTMLDOMNode_QueryInterface(&This->target->IHTMLDOMNode_iface, &IID_IHTMLElement,
(void**)p);
}
static HRESULT WINAPI HTMLEventObj_get_altKey(IHTMLEventObj *iface, VARIANT_BOOL *p)
......@@ -772,7 +773,7 @@ static IHTMLEventObj *create_event(HTMLDOMNode *target, eventid_t eid, nsIDOMEve
}
ret->target = target;
IHTMLDOMNode_AddRef(HTMLDOMNODE(target));
IHTMLDOMNode_AddRef(&target->IHTMLDOMNode_iface);
init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLEventObj_iface, &HTMLEventObj_dispex);
......@@ -927,8 +928,8 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, nsIDOMNode
do {
hres = get_node(doc, nsnode, FALSE, &node);
if(SUCCEEDED(hres) && node)
call_event_handlers(doc, event_obj, *get_node_event_target(node), node->cp_container, eid,
(IDispatch*)HTMLDOMNODE(node));
call_event_handlers(doc, event_obj, *get_node_event_target(node),
node->cp_container, eid, (IDispatch*)&node->IHTMLDOMNode_iface);
if(!(event_info[eid].flags & EVENT_BUBBLE))
break;
......@@ -954,8 +955,8 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, nsIDOMNode
if(NS_SUCCEEDED(nsres) && nsbody) {
hres = get_node(doc, (nsIDOMNode*)nsbody, FALSE, &node);
if(SUCCEEDED(hres) && node)
call_event_handlers(doc, event_obj, *get_node_event_target(node), node->cp_container,
eid, (IDispatch*)HTMLDOMNODE(node));
call_event_handlers(doc, event_obj, *get_node_event_target(node),
node->cp_container, eid, (IDispatch*)&node->IHTMLDOMNode_iface);
nsIDOMHTMLElement_Release(nsbody);
}else {
ERR("Could not get body: %08x\n", nsres);
......
......@@ -67,9 +67,9 @@ static HRESULT htmlform_item(HTMLFormElement *This, int i, IDispatch **ret)
if(FAILED(hres))
return hres;
IHTMLDOMNode_AddRef(HTMLDOMNODE(node));
IHTMLDOMNode_AddRef(&node->IHTMLDOMNode_iface);
nsIDOMNode_Release(item);
*ret = (IDispatch*)HTMLDOMNODE(node);
*ret = (IDispatch*)&node->IHTMLDOMNode_iface;
}else {
*ret = NULL;
}
......@@ -84,21 +84,21 @@ static HRESULT WINAPI HTMLFormElement_QueryInterface(IHTMLFormElement *iface,
{
HTMLFormElement *This = HTMLFORM_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLFormElement_AddRef(IHTMLFormElement *iface)
{
HTMLFormElement *This = HTMLFORM_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLFormElement_Release(IHTMLFormElement *iface)
{
HTMLFormElement *This = HTMLFORM_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLFormElement_GetTypeInfoCount(IHTMLFormElement *iface, UINT *pctinfo)
......
......@@ -46,21 +46,21 @@ static HRESULT WINAPI HTMLFrameElement3_QueryInterface(IHTMLFrameElement3 *iface
{
HTMLFrameElement *This = impl_from_IHTMLFrameElement3(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->framebase.element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->framebase.element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLFrameElement3_AddRef(IHTMLFrameElement3 *iface)
{
HTMLFrameElement *This = impl_from_IHTMLFrameElement3(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->framebase.element.node));
return IHTMLDOMNode_AddRef(&This->framebase.element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLFrameElement3_Release(IHTMLFrameElement3 *iface)
{
HTMLFrameElement *This = impl_from_IHTMLFrameElement3(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->framebase.element.node));
return IHTMLDOMNode_Release(&This->framebase.element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLFrameElement3_GetTypeInfoCount(IHTMLFrameElement3 *iface, UINT *pctinfo)
......
......@@ -67,21 +67,21 @@ static HRESULT WINAPI HTMLFrameBase_QueryInterface(IHTMLFrameBase *iface, REFIID
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLFrameBase_AddRef(IHTMLFrameBase *iface)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLFrameBase_Release(IHTMLFrameBase *iface)
{
HTMLFrameBase *This = HTMLFRAMEBASE_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLFrameBase_GetTypeInfoCount(IHTMLFrameBase *iface, UINT *pctinfo)
......@@ -374,21 +374,21 @@ static HRESULT WINAPI HTMLFrameBase2_QueryInterface(IHTMLFrameBase2 *iface, REFI
{
HTMLFrameBase *This = HTMLFRAMEBASE2_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLFrameBase2_AddRef(IHTMLFrameBase2 *iface)
{
HTMLFrameBase *This = HTMLFRAMEBASE2_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLFrameBase2_Release(IHTMLFrameBase2 *iface)
{
HTMLFrameBase *This = HTMLFRAMEBASE2_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLFrameBase2_GetTypeInfoCount(IHTMLFrameBase2 *iface, UINT *pctinfo)
......
......@@ -47,21 +47,21 @@ static HRESULT WINAPI HTMLGenericElement_QueryInterface(IHTMLGenericElement *ifa
{
HTMLGenericElement *This = impl_from_IHTMLGenericElement(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLGenericElement_AddRef(IHTMLGenericElement *iface)
{
HTMLGenericElement *This = impl_from_IHTMLGenericElement(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLGenericElement_Release(IHTMLGenericElement *iface)
{
HTMLGenericElement *This = impl_from_IHTMLGenericElement(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLGenericElement_GetTypeInfoCount(IHTMLGenericElement *iface, UINT *pctinfo)
......
......@@ -46,21 +46,21 @@ static HRESULT WINAPI HTMLIFrameElement_QueryInterface(IHTMLIFrameElement *iface
{
HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->framebase.element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->framebase.element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLIFrameElement_AddRef(IHTMLIFrameElement *iface)
{
HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->framebase.element.node));
return IHTMLDOMNode_AddRef(&This->framebase.element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLIFrameElement_Release(IHTMLIFrameElement *iface)
{
HTMLIFrame *This = impl_from_IHTMLIFrameElement(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->framebase.element.node));
return IHTMLDOMNode_Release(&This->framebase.element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLIFrameElement_GetTypeInfoCount(IHTMLIFrameElement *iface, UINT *pctinfo)
......
......@@ -49,21 +49,21 @@ static HRESULT WINAPI HTMLImgElement_QueryInterface(IHTMLImgElement *iface, REFI
{
HTMLImgElement *This = impl_from_IHTMLImgElement(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLImgElement_AddRef(IHTMLImgElement *iface)
{
HTMLImgElement *This = impl_from_IHTMLImgElement(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLImgElement_Release(IHTMLImgElement *iface)
{
HTMLImgElement *This = impl_from_IHTMLImgElement(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLImgElement_GetTypeInfoCount(IHTMLImgElement *iface, UINT *pctinfo)
......
......@@ -56,21 +56,21 @@ static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
{
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLInputElement_AddRef(IHTMLInputElement *iface)
{
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLInputElement_Release(IHTMLInputElement *iface)
{
HTMLInputElement *This = impl_from_IHTMLInputElement(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLInputElement_GetTypeInfoCount(IHTMLInputElement *iface, UINT *pctinfo)
......@@ -825,21 +825,21 @@ static HRESULT WINAPI HTMLInputTextElement_QueryInterface(IHTMLInputTextElement
{
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLInputTextElement_AddRef(IHTMLInputTextElement *iface)
{
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLInputTextElement_Release(IHTMLInputTextElement *iface)
{
HTMLInputElement *This = impl_from_IHTMLInputTextElement(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement *iface, UINT *pctinfo)
......
......@@ -51,21 +51,22 @@ static HRESULT WINAPI HTMLObjectElement_QueryInterface(IHTMLObjectElement *iface
{
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->plugin_container.element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->plugin_container.element.node.IHTMLDOMNode_iface,
riid, ppv);
}
static ULONG WINAPI HTMLObjectElement_AddRef(IHTMLObjectElement *iface)
{
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->plugin_container.element.node));
return IHTMLDOMNode_AddRef(&This->plugin_container.element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLObjectElement_Release(IHTMLObjectElement *iface)
{
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->plugin_container.element.node));
return IHTMLDOMNode_Release(&This->plugin_container.element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLObjectElement_GetTypeInfoCount(IHTMLObjectElement *iface, UINT *pctinfo)
......
......@@ -48,21 +48,21 @@ static HRESULT WINAPI HTMLOptionElement_QueryInterface(IHTMLOptionElement *iface
{
HTMLOptionElement *This = HTMLOPTION_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLOptionElement_AddRef(IHTMLOptionElement *iface)
{
HTMLOptionElement *This = HTMLOPTION_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLOptionElement_Release(IHTMLOptionElement *iface)
{
HTMLOptionElement *This = HTMLOPTION_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLOptionElement_GetTypeInfoCount(IHTMLOptionElement *iface, UINT *pctinfo)
......@@ -499,7 +499,7 @@ static HRESULT WINAPI HTMLOptionElementFactory_create(IHTMLOptionElementFactory
if(FAILED(hres))
return hres;
hres = IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node),
hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface,
&IID_IHTMLOptionElement, (void**)optelem);
if(V_VT(&text) == VT_BSTR)
......
......@@ -49,21 +49,21 @@ static HRESULT WINAPI HTMLScriptElement_QueryInterface(IHTMLScriptElement *iface
{
HTMLScriptElement *This = impl_from_IHTMLScriptElement(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLScriptElement_AddRef(IHTMLScriptElement *iface)
{
HTMLScriptElement *This = impl_from_IHTMLScriptElement(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLScriptElement_Release(IHTMLScriptElement *iface)
{
HTMLScriptElement *This = impl_from_IHTMLScriptElement(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLScriptElement_GetTypeInfoCount(IHTMLScriptElement *iface, UINT *pctinfo)
......
......@@ -73,8 +73,8 @@ static HRESULT htmlselect_item(HTMLSelectElement *This, int i, IDispatch **ret)
if(FAILED(hres))
return hres;
IHTMLDOMNode_AddRef(HTMLDOMNODE(node));
*ret = (IDispatch*)HTMLDOMNODE(node);
IHTMLDOMNode_AddRef(&node->IHTMLDOMNode_iface);
*ret = (IDispatch*)&node->IHTMLDOMNode_iface;
}else {
*ret = NULL;
}
......@@ -86,21 +86,21 @@ static HRESULT WINAPI HTMLSelectElement_QueryInterface(IHTMLSelectElement *iface
{
HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLSelectElement_AddRef(IHTMLSelectElement *iface)
{
HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLSelectElement_Release(IHTMLSelectElement *iface)
{
HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLSelectElement_GetTypeInfoCount(IHTMLSelectElement *iface, UINT *pctinfo)
......@@ -387,7 +387,7 @@ static HRESULT WINAPI HTMLSelectElement_add(IHTMLSelectElement *iface, IHTMLElem
if(FAILED(hres))
return hres;
hres = IHTMLDOMNode_appendChild(HTMLDOMNODE(&This->element.node), node, &tmp);
hres = IHTMLDOMNode_appendChild(&This->element.node.IHTMLDOMNode_iface, node, &tmp);
IHTMLDOMNode_Release(node);
if(SUCCEEDED(hres) && tmp)
IHTMLDOMNode_Release(tmp);
......
......@@ -49,21 +49,21 @@ static HRESULT WINAPI HTMLStyleElement_QueryInterface(IHTMLStyleElement *iface,
{
HTMLStyleElement *This = HTMLSTYLE_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLStyleElement_AddRef(IHTMLStyleElement *iface)
{
HTMLStyleElement *This = HTMLSTYLE_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLStyleElement_Release(IHTMLStyleElement *iface)
{
HTMLStyleElement *This = HTMLSTYLE_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLStyleElement_GetTypeInfoCount(IHTMLStyleElement *iface, UINT *pctinfo)
......
......@@ -49,21 +49,21 @@ static HRESULT WINAPI HTMLTable_QueryInterface(IHTMLTable *iface,
{
HTMLTable *This = HTMLTABLE_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLTable_AddRef(IHTMLTable *iface)
{
HTMLTable *This = HTMLTABLE_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLTable_Release(IHTMLTable *iface)
{
HTMLTable *This = HTMLTABLE_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLTable_GetTypeInfoCount(IHTMLTable *iface, UINT *pctinfo)
......
......@@ -49,21 +49,21 @@ static HRESULT WINAPI HTMLTableRow_QueryInterface(IHTMLTableRow *iface,
{
HTMLTableRow *This = impl_from_IHTMLTableRow(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLTableRow_AddRef(IHTMLTableRow *iface)
{
HTMLTableRow *This = impl_from_IHTMLTableRow(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLTableRow_Release(IHTMLTableRow *iface)
{
HTMLTableRow *This = impl_from_IHTMLTableRow(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLTableRow_GetTypeInfoCount(IHTMLTableRow *iface, UINT *pctinfo)
......
......@@ -49,21 +49,21 @@ static HRESULT WINAPI HTMLTextAreaElement_QueryInterface(IHTMLTextAreaElement *i
{
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLTextAreaElement_AddRef(IHTMLTextAreaElement *iface)
{
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLTextAreaElement_Release(IHTMLTextAreaElement *iface)
{
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLTextAreaElement_GetTypeInfoCount(IHTMLTextAreaElement *iface, UINT *pctinfo)
......
......@@ -48,21 +48,21 @@ static HRESULT WINAPI HTMLDOMTextNode_QueryInterface(IHTMLDOMTextNode *iface,
{
HTMLDOMTextNode *This = HTMLTEXT_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI HTMLDOMTextNode_AddRef(IHTMLDOMTextNode *iface)
{
HTMLDOMTextNode *This = HTMLTEXT_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->node));
return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface);
}
static ULONG WINAPI HTMLDOMTextNode_Release(IHTMLDOMTextNode *iface)
{
HTMLDOMTextNode *This = HTMLTEXT_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->node));
return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI HTMLDOMTextNode_GetTypeInfoCount(IHTMLDOMTextNode *iface, UINT *pctinfo)
......@@ -197,7 +197,7 @@ static HRESULT HTMLDOMTextNode_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTM
if(FAILED(hres))
return hres;
IHTMLDOMNode_AddRef(HTMLDOMNODE(*ret));
IHTMLDOMNode_AddRef(&(*ret)->IHTMLDOMNode_iface);
return S_OK;
}
......
......@@ -531,7 +531,7 @@ typedef struct {
struct HTMLDOMNode {
DispatchEx dispex;
const IHTMLDOMNodeVtbl *lpHTMLDOMNodeVtbl;
IHTMLDOMNode IHTMLDOMNode_iface;
const IHTMLDOMNode2Vtbl *lpHTMLDOMNode2Vtbl;
const NodeImplVtbl *vtbl;
......@@ -642,7 +642,6 @@ struct HTMLDocumentNode {
#define STATUSCLB(x) ((IBindStatusCallback*) &(x)->lpBindStatusCallbackVtbl)
#define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl);
#define HTMLDOMNODE(x) ((IHTMLDOMNode*) &(x)->lpHTMLDOMNodeVtbl)
#define HTMLDOMNODE2(x) ((IHTMLDOMNode2*) &(x)->lpHTMLDOMNode2Vtbl)
#define HTMLTEXTCONT(x) ((IHTMLTextContainer*) &(x)->lpHTMLTextContainerVtbl)
......
......@@ -1244,7 +1244,7 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList
if(FAILED(hres))
return NS_ERROR_FAILURE;
show_context_menu(This->doc, dwID, &pt, (IDispatch*)HTMLDOMNODE(node));
show_context_menu(This->doc, dwID, &pt, (IDispatch*)&node->IHTMLDOMNode_iface);
return NS_OK;
}
......
......@@ -1201,7 +1201,8 @@ static HRESULT assoc_element(PluginHost *host, HTMLDocumentNode *doc, nsIDOMElem
if(FAILED(hres))
return hres;
hres = IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_HTMLPluginContainer, (void**)&container_elem);
hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_HTMLPluginContainer,
(void**)&container_elem);
if(FAILED(hres)) {
ERR("Not an object element\n");
return hres;
......
......@@ -47,19 +47,19 @@ const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY =
static HRESULT WINAPI InternetHostSecurityManager_QueryInterface(IInternetHostSecurityManager *iface, REFIID riid, void **ppv)
{
HTMLDocumentNode *This = HOSTSECMGR_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->node), riid, ppv);
return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv);
}
static ULONG WINAPI InternetHostSecurityManager_AddRef(IInternetHostSecurityManager *iface)
{
HTMLDocumentNode *This = HOSTSECMGR_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->node));
return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface);
}
static ULONG WINAPI InternetHostSecurityManager_Release(IInternetHostSecurityManager *iface)
{
HTMLDocumentNode *This = HOSTSECMGR_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->node));
return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface);
}
static HRESULT WINAPI InternetHostSecurityManager_GetSecurityId(IInternetHostSecurityManager *iface, BYTE *pbSecurityId,
......
......@@ -1212,7 +1212,7 @@ static HRESULT WINAPI HTMLTxtRange_parentElement(IHTMLTxtRange *iface, IHTMLElem
if(FAILED(hres))
return hres;
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)parent);
return IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)parent);
}
static HRESULT WINAPI HTMLTxtRange_duplicate(IHTMLTxtRange *iface, IHTMLTxtRange **Duplicate)
......
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