mshtml: Forward node ref calls to IHTMLDOMNode interface.

This commit is contained in:
Jacek Caban 2007-09-19 12:40:41 +02:00 committed by Alexandre Julliard
parent 4b2b441e5b
commit a95bfede8a
7 changed files with 14 additions and 46 deletions

View File

@ -80,18 +80,14 @@ static ULONG WINAPI HTMLAnchorElement_AddRef(IHTMLAnchorElement *iface)
{ {
HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
TRACE("(%p)\n", This); return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDocument2_AddRef(HTMLDOC(This->element.node.doc));
} }
static ULONG WINAPI HTMLAnchorElement_Release(IHTMLAnchorElement *iface) static ULONG WINAPI HTMLAnchorElement_Release(IHTMLAnchorElement *iface)
{ {
HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
TRACE("(%p)\n", This); return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDocument2_Release(HTMLDOC(This->element.node.doc));
} }
static HRESULT WINAPI HTMLAnchorElement_GetTypeInfoCount(IHTMLAnchorElement *iface, UINT *pctinfo) static HRESULT WINAPI HTMLAnchorElement_GetTypeInfoCount(IHTMLAnchorElement *iface, UINT *pctinfo)

View File

@ -94,18 +94,14 @@ static ULONG WINAPI HTMLBodyElement_AddRef(IHTMLBodyElement *iface)
{ {
HTMLBodyElement *This = HTMLBODY_THIS(iface); HTMLBodyElement *This = HTMLBODY_THIS(iface);
TRACE("(%p)\n", This); return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->textcont.element.node));
return IHTMLDocument2_AddRef(HTMLDOC(This->textcont.element.node.doc));
} }
static ULONG WINAPI HTMLBodyElement_Release(IHTMLBodyElement *iface) static ULONG WINAPI HTMLBodyElement_Release(IHTMLBodyElement *iface)
{ {
HTMLBodyElement *This = HTMLBODY_THIS(iface); HTMLBodyElement *This = HTMLBODY_THIS(iface);
TRACE("(%p)\n", This); return IHTMLDOMNode_Release(HTMLDOMNODE(&This->textcont.element.node));
return IHTMLDocument2_Release(HTMLDOC(This->textcont.element.node.doc));
} }
static HRESULT WINAPI HTMLBodyElement_GetTypeInfoCount(IHTMLBodyElement *iface, UINT *pctinfo) static HRESULT WINAPI HTMLBodyElement_GetTypeInfoCount(IHTMLBodyElement *iface, UINT *pctinfo)

View File

@ -80,22 +80,14 @@ static ULONG WINAPI HTMLElement_AddRef(IHTMLElement *iface)
{ {
HTMLElement *This = HTMLELEM_THIS(iface); HTMLElement *This = HTMLELEM_THIS(iface);
if(This->impl) return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->node));
return IUnknown_AddRef(This->impl);
TRACE("(%p)\n", This);
return IHTMLDocument2_AddRef(HTMLDOC(This->node.doc));
} }
static ULONG WINAPI HTMLElement_Release(IHTMLElement *iface) static ULONG WINAPI HTMLElement_Release(IHTMLElement *iface)
{ {
HTMLElement *This = HTMLELEM_THIS(iface); HTMLElement *This = HTMLELEM_THIS(iface);
if(This->impl) return IHTMLDOMNode_Release(HTMLDOMNODE(&This->node));
return IUnknown_Release(This->impl);
TRACE("(%p)\n", This);
return IHTMLDocument2_Release(HTMLDOC(This->node.doc));
} }
static HRESULT WINAPI HTMLElement_GetTypeInfoCount(IHTMLElement *iface, UINT *pctinfo) static HRESULT WINAPI HTMLElement_GetTypeInfoCount(IHTMLElement *iface, UINT *pctinfo)

View File

@ -82,18 +82,14 @@ static ULONG WINAPI HTMLInputElement_AddRef(IHTMLInputElement *iface)
{ {
HTMLInputElement *This = HTMLINPUT_THIS(iface); HTMLInputElement *This = HTMLINPUT_THIS(iface);
TRACE("(%p)\n", This); return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDocument2_AddRef(HTMLDOC(This->element.node.doc));
} }
static ULONG WINAPI HTMLInputElement_Release(IHTMLInputElement *iface) static ULONG WINAPI HTMLInputElement_Release(IHTMLInputElement *iface)
{ {
HTMLInputElement *This = HTMLINPUT_THIS(iface); HTMLInputElement *This = HTMLINPUT_THIS(iface);
TRACE("(%p)\n", This); return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDocument2_Release(HTMLDOC(This->element.node.doc));
} }
static HRESULT WINAPI HTMLInputElement_GetTypeInfoCount(IHTMLInputElement *iface, UINT *pctinfo) static HRESULT WINAPI HTMLInputElement_GetTypeInfoCount(IHTMLInputElement *iface, UINT *pctinfo)

View File

@ -59,10 +59,8 @@ static ULONG WINAPI HTMLDOMNode_AddRef(IHTMLDOMNode *iface)
{ {
HTMLDOMNode *This = HTMLDOMNODE_THIS(iface); HTMLDOMNode *This = HTMLDOMNODE_THIS(iface);
if(This->impl.unk)
return IUnknown_AddRef(This->impl.unk);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
return IHTMLDocument2_AddRef(HTMLDOC(This->doc)); return IHTMLDocument2_AddRef(HTMLDOC(This->doc));
} }
@ -70,10 +68,8 @@ static ULONG WINAPI HTMLDOMNode_Release(IHTMLDOMNode *iface)
{ {
HTMLDOMNode *This = HTMLDOMNODE_THIS(iface); HTMLDOMNode *This = HTMLDOMNODE_THIS(iface);
if(This->impl.unk)
return IUnknown_Release(This->impl.unk);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
return IHTMLDocument2_Release(HTMLDOC(This->doc)); return IHTMLDocument2_Release(HTMLDOC(This->doc));
} }

View File

@ -82,18 +82,14 @@ static ULONG WINAPI HTMLSelectElement_AddRef(IHTMLSelectElement *iface)
{ {
HTMLSelectElement *This = HTMLSELECT_THIS(iface); HTMLSelectElement *This = HTMLSELECT_THIS(iface);
TRACE("(%p)\n", This); return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDocument2_AddRef(HTMLDOC(This->element.node.doc));
} }
static ULONG WINAPI HTMLSelectElement_Release(IHTMLSelectElement *iface) static ULONG WINAPI HTMLSelectElement_Release(IHTMLSelectElement *iface)
{ {
HTMLSelectElement *This = HTMLSELECT_THIS(iface); HTMLSelectElement *This = HTMLSELECT_THIS(iface);
TRACE("(%p)\n", This); return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDocument2_Release(HTMLDOC(This->element.node.doc));
} }
static HRESULT WINAPI HTMLSelectElement_GetTypeInfoCount(IHTMLSelectElement *iface, UINT *pctinfo) static HRESULT WINAPI HTMLSelectElement_GetTypeInfoCount(IHTMLSelectElement *iface, UINT *pctinfo)

View File

@ -82,18 +82,14 @@ static ULONG WINAPI HTMLTextAreaElement_AddRef(IHTMLTextAreaElement *iface)
{ {
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface); HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
TRACE("(%p)\n", This); return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
return IHTMLDocument2_AddRef(HTMLDOC(This->element.node.doc));
} }
static ULONG WINAPI HTMLTextAreaElement_Release(IHTMLTextAreaElement *iface) static ULONG WINAPI HTMLTextAreaElement_Release(IHTMLTextAreaElement *iface)
{ {
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface); HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
TRACE("(%p)\n", This); return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
return IHTMLDocument2_Release(HTMLDOC(This->element.node.doc));
} }
static HRESULT WINAPI HTMLTextAreaElement_GetTypeInfoCount(IHTMLTextAreaElement *iface, UINT *pctinfo) static HRESULT WINAPI HTMLTextAreaElement_GetTypeInfoCount(IHTMLTextAreaElement *iface, UINT *pctinfo)