mshtml: IHTMLDocument2 iface handling clean up.

This commit is contained in:
Jacek Caban 2010-12-16 14:59:51 +01:00 committed by Alexandre Julliard
parent aec376dcef
commit c63a5fa8fd
18 changed files with 224 additions and 225 deletions

View File

@ -41,19 +41,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
static HRESULT WINAPI HlinkTarget_QueryInterface(IHlinkTarget *iface, REFIID riid, void **ppv) static HRESULT WINAPI HlinkTarget_QueryInterface(IHlinkTarget *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = HLINKTRG_THIS(iface); HTMLDocument *This = HLINKTRG_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI HlinkTarget_AddRef(IHlinkTarget *iface) static ULONG WINAPI HlinkTarget_AddRef(IHlinkTarget *iface)
{ {
HTMLDocument *This = HLINKTRG_THIS(iface); HTMLDocument *This = HLINKTRG_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI HlinkTarget_Release(IHlinkTarget *iface) static ULONG WINAPI HlinkTarget_Release(IHlinkTarget *iface)
{ {
HTMLDocument *This = HLINKTRG_THIS(iface); HTMLDocument *This = HLINKTRG_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI HlinkTarget_SetBrowseContext(IHlinkTarget *iface, IHlinkBrowseContext *pihlbc) static HRESULT WINAPI HlinkTarget_SetBrowseContext(IHlinkTarget *iface, IHlinkBrowseContext *pihlbc)

File diff suppressed because it is too large Load Diff

View File

@ -41,19 +41,19 @@ static HRESULT WINAPI HTMLDocument3_QueryInterface(IHTMLDocument3 *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
HTMLDocument *This = HTMLDOC3_THIS(iface); HTMLDocument *This = HTMLDOC3_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI HTMLDocument3_AddRef(IHTMLDocument3 *iface) static ULONG WINAPI HTMLDocument3_AddRef(IHTMLDocument3 *iface)
{ {
HTMLDocument *This = HTMLDOC3_THIS(iface); HTMLDocument *This = HTMLDOC3_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI HTMLDocument3_Release(IHTMLDocument3 *iface) static ULONG WINAPI HTMLDocument3_Release(IHTMLDocument3 *iface)
{ {
HTMLDocument *This = HTMLDOC3_THIS(iface); HTMLDocument *This = HTMLDOC3_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI HTMLDocument3_GetTypeInfoCount(IHTMLDocument3 *iface, UINT *pctinfo) static HRESULT WINAPI HTMLDocument3_GetTypeInfoCount(IHTMLDocument3 *iface, UINT *pctinfo)
@ -372,7 +372,7 @@ static HRESULT WINAPI HTMLDocument3_createDocumentFragment(IHTMLDocument3 *iface
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
*ppNewDoc = HTMLDOC(&docnode->basedoc); *ppNewDoc = &docnode->basedoc.IHTMLDocument2_iface;
return S_OK; return S_OK;
} }
@ -640,19 +640,19 @@ static HRESULT WINAPI HTMLDocument4_QueryInterface(IHTMLDocument4 *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
HTMLDocument *This = HTMLDOC4_THIS(iface); HTMLDocument *This = HTMLDOC4_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI HTMLDocument4_AddRef(IHTMLDocument4 *iface) static ULONG WINAPI HTMLDocument4_AddRef(IHTMLDocument4 *iface)
{ {
HTMLDocument *This = HTMLDOC4_THIS(iface); HTMLDocument *This = HTMLDOC4_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI HTMLDocument4_Release(IHTMLDocument4 *iface) static ULONG WINAPI HTMLDocument4_Release(IHTMLDocument4 *iface)
{ {
HTMLDocument *This = HTMLDOC4_THIS(iface); HTMLDocument *This = HTMLDOC4_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI HTMLDocument4_GetTypeInfoCount(IHTMLDocument4 *iface, UINT *pctinfo) static HRESULT WINAPI HTMLDocument4_GetTypeInfoCount(IHTMLDocument4 *iface, UINT *pctinfo)

View File

@ -40,19 +40,19 @@ static HRESULT WINAPI HTMLDocument5_QueryInterface(IHTMLDocument5 *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
HTMLDocument *This = HTMLDOC5_THIS(iface); HTMLDocument *This = HTMLDOC5_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI HTMLDocument5_AddRef(IHTMLDocument5 *iface) static ULONG WINAPI HTMLDocument5_AddRef(IHTMLDocument5 *iface)
{ {
HTMLDocument *This = HTMLDOC5_THIS(iface); HTMLDocument *This = HTMLDOC5_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI HTMLDocument5_Release(IHTMLDocument5 *iface) static ULONG WINAPI HTMLDocument5_Release(IHTMLDocument5 *iface)
{ {
HTMLDocument *This = HTMLDOC5_THIS(iface); HTMLDocument *This = HTMLDOC5_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI HTMLDocument5_GetTypeInfoCount(IHTMLDocument5 *iface, UINT *pctinfo) static HRESULT WINAPI HTMLDocument5_GetTypeInfoCount(IHTMLDocument5 *iface, UINT *pctinfo)
@ -308,19 +308,19 @@ static HRESULT WINAPI HTMLDocument6_QueryInterface(IHTMLDocument6 *iface,
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
HTMLDocument *This = HTMLDOC6_THIS(iface); HTMLDocument *This = HTMLDOC6_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI HTMLDocument6_AddRef(IHTMLDocument6 *iface) static ULONG WINAPI HTMLDocument6_AddRef(IHTMLDocument6 *iface)
{ {
HTMLDocument *This = HTMLDOC6_THIS(iface); HTMLDocument *This = HTMLDOC6_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI HTMLDocument6_Release(IHTMLDocument6 *iface) static ULONG WINAPI HTMLDocument6_Release(IHTMLDocument6 *iface)
{ {
HTMLDocument *This = HTMLDOC6_THIS(iface); HTMLDocument *This = HTMLDOC6_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI HTMLDocument6_GetTypeInfoCount(IHTMLDocument6 *iface, UINT *pctinfo) static HRESULT WINAPI HTMLDocument6_GetTypeInfoCount(IHTMLDocument6 *iface, UINT *pctinfo)

View File

@ -651,7 +651,7 @@ static HRESULT WINAPI HTMLElement_get_document(IHTMLElement *iface, IDispatch **
if(This->node.vtbl->get_document) if(This->node.vtbl->get_document)
return This->node.vtbl->get_document(&This->node, p); return This->node.vtbl->get_document(&This->node, p);
*p = (IDispatch*)HTMLDOC(&This->node.doc->basedoc); *p = (IDispatch*)&This->node.doc->basedoc.IHTMLDocument2_iface;
IDispatch_AddRef(*p); IDispatch_AddRef(*p);
return S_OK; return S_OK;
} }

View File

@ -963,7 +963,7 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, nsIDOMNode
} }
call_event_handlers(doc, event_obj, doc->node.event_target, &doc->basedoc.cp_container, eid, call_event_handlers(doc, event_obj, doc->node.event_target, &doc->basedoc.cp_container, eid,
(IDispatch*)HTMLDOC(&doc->basedoc)); (IDispatch*)&doc->basedoc.IHTMLDocument2_iface);
break; break;
default: default:

View File

@ -205,7 +205,7 @@ static HRESULT HTMLFrameElement_get_document(HTMLDOMNode *iface, IDispatch **p)
return S_OK; return S_OK;
} }
*p = (IDispatch*)HTMLDOC(&This->framebase.content_window->doc->basedoc); *p = (IDispatch*)&This->framebase.content_window->doc->basedoc.IHTMLDocument2_iface;
IDispatch_AddRef(*p); IDispatch_AddRef(*p);
return S_OK; return S_OK;
} }

View File

@ -478,7 +478,7 @@ static HRESULT WINAPI HTMLFrameBase2_get_readyState(IHTMLFrameBase2 *iface, BSTR
return E_FAIL; return E_FAIL;
} }
return IHTMLDocument2_get_readyState(HTMLDOC(&This->content_window->doc->basedoc), p); return IHTMLDocument2_get_readyState(&This->content_window->doc->basedoc.IHTMLDocument2_iface, p);
} }
static HRESULT WINAPI HTMLFrameBase2_put_allowTransparency(IHTMLFrameBase2 *iface, VARIANT_BOOL v) static HRESULT WINAPI HTMLFrameBase2_put_allowTransparency(IHTMLFrameBase2 *iface, VARIANT_BOOL v)

View File

@ -183,7 +183,7 @@ static HRESULT HTMLIFrame_get_document(HTMLDOMNode *iface, IDispatch **p)
return S_OK; return S_OK;
} }
*p = (IDispatch*)HTMLDOC(&This->framebase.content_window->doc->basedoc); *p = (IDispatch*)&This->framebase.content_window->doc->basedoc.IHTMLDocument2_iface;
IDispatch_AddRef(*p); IDispatch_AddRef(*p);
return S_OK; return S_OK;
} }

View File

@ -896,7 +896,7 @@ static HRESULT WINAPI HTMLDOMNode2_get_ownerDocument(IHTMLDOMNode2 *iface, IDisp
if(This == &This->doc->node) { if(This == &This->doc->node) {
*p = NULL; *p = NULL;
}else { }else {
*p = (IDispatch*)HTMLDOC(&This->doc->basedoc); *p = (IDispatch*)&This->doc->basedoc.IHTMLDocument2_iface;
IDispatch_AddRef(*p); IDispatch_AddRef(*p);
} }
return S_OK; return S_OK;

View File

@ -990,7 +990,7 @@ static HRESULT WINAPI HTMLWindow2_get_document(IHTMLWindow2 *iface, IHTMLDocumen
if(This->doc) { if(This->doc) {
/* FIXME: We should return a wrapper object here */ /* FIXME: We should return a wrapper object here */
*p = HTMLDOC(&This->doc->basedoc); *p = &This->doc->basedoc.IHTMLDocument2_iface;
IHTMLDocument2_AddRef(*p); IHTMLDocument2_AddRef(*p);
}else { }else {
*p = NULL; *p = NULL;

View File

@ -342,7 +342,7 @@ struct ConnectionPoint {
}; };
struct HTMLDocument { struct HTMLDocument {
const IHTMLDocument2Vtbl *lpHTMLDocument2Vtbl; IHTMLDocument2 IHTMLDocument2_iface;
const IHTMLDocument3Vtbl *lpHTMLDocument3Vtbl; const IHTMLDocument3Vtbl *lpHTMLDocument3Vtbl;
const IHTMLDocument4Vtbl *lpHTMLDocument4Vtbl; const IHTMLDocument4Vtbl *lpHTMLDocument4Vtbl;
const IHTMLDocument5Vtbl *lpHTMLDocument5Vtbl; const IHTMLDocument5Vtbl *lpHTMLDocument5Vtbl;
@ -626,7 +626,6 @@ struct HTMLDocumentNode {
#define HTMLWINDOW3(x) ((IHTMLWindow3*) &(x)->lpHTMLWindow3Vtbl) #define HTMLWINDOW3(x) ((IHTMLWindow3*) &(x)->lpHTMLWindow3Vtbl)
#define HTMLWINDOW4(x) ((IHTMLWindow4*) &(x)->lpHTMLWindow4Vtbl) #define HTMLWINDOW4(x) ((IHTMLWindow4*) &(x)->lpHTMLWindow4Vtbl)
#define HTMLDOC(x) ((IHTMLDocument2*) &(x)->lpHTMLDocument2Vtbl)
#define HTMLDOC3(x) ((IHTMLDocument3*) &(x)->lpHTMLDocument3Vtbl) #define HTMLDOC3(x) ((IHTMLDocument3*) &(x)->lpHTMLDocument3Vtbl)
#define HTMLDOC4(x) ((IHTMLDocument4*) &(x)->lpHTMLDocument4Vtbl) #define HTMLDOC4(x) ((IHTMLDocument4*) &(x)->lpHTMLDocument4Vtbl)
#define HTMLDOC5(x) ((IHTMLDocument5*) &(x)->lpHTMLDocument5Vtbl) #define HTMLDOC5(x) ((IHTMLDocument5*) &(x)->lpHTMLDocument5Vtbl)

View File

@ -737,19 +737,19 @@ static const cmdtable_t base_cmds[] = {
static HRESULT WINAPI OleCommandTarget_QueryInterface(IOleCommandTarget *iface, REFIID riid, void **ppv) static HRESULT WINAPI OleCommandTarget_QueryInterface(IOleCommandTarget *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = CMDTARGET_THIS(iface); HTMLDocument *This = CMDTARGET_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI OleCommandTarget_AddRef(IOleCommandTarget *iface) static ULONG WINAPI OleCommandTarget_AddRef(IOleCommandTarget *iface)
{ {
HTMLDocument *This = CMDTARGET_THIS(iface); HTMLDocument *This = CMDTARGET_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI OleCommandTarget_Release(IOleCommandTarget *iface) static ULONG WINAPI OleCommandTarget_Release(IOleCommandTarget *iface)
{ {
HTMLDocument *This = CMDTARGET_THIS(iface); HTMLDocument *This = CMDTARGET_THIS(iface);
return IHTMLDocument_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT query_from_table(HTMLDocument *This, const cmdtable_t *cmdtable, OLECMD *cmd) static HRESULT query_from_table(HTMLDocument *This, const cmdtable_t *cmdtable, OLECMD *cmd)

View File

@ -47,22 +47,22 @@ DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0);
#define OLEOBJ_THIS(iface) DEFINE_THIS(HTMLDocument, OleObject, iface) #define OLEOBJ_THIS(iface) DEFINE_THIS(HTMLDocument, OleObject, iface)
static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppvObject) static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = OLEOBJ_THIS(iface); HTMLDocument *This = OLEOBJ_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI OleObject_AddRef(IOleObject *iface) static ULONG WINAPI OleObject_AddRef(IOleObject *iface)
{ {
HTMLDocument *This = OLEOBJ_THIS(iface); HTMLDocument *This = OLEOBJ_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI OleObject_Release(IOleObject *iface) static ULONG WINAPI OleObject_Release(IOleObject *iface)
{ {
HTMLDocument *This = OLEOBJ_THIS(iface); HTMLDocument *This = OLEOBJ_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static void update_hostinfo(HTMLDocumentObj *This, DOCHOSTUIINFO *hostinfo) static void update_hostinfo(HTMLDocumentObj *This, DOCHOSTUIINFO *hostinfo)
@ -491,22 +491,22 @@ static const IOleObjectVtbl OleObjectVtbl = {
#define OLEDOC_THIS(iface) DEFINE_THIS(HTMLDocument, OleDocument, iface) #define OLEDOC_THIS(iface) DEFINE_THIS(HTMLDocument, OleDocument, iface)
static HRESULT WINAPI OleDocument_QueryInterface(IOleDocument *iface, REFIID riid, void **ppvObject) static HRESULT WINAPI OleDocument_QueryInterface(IOleDocument *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = OLEDOC_THIS(iface); HTMLDocument *This = OLEDOC_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI OleDocument_AddRef(IOleDocument *iface) static ULONG WINAPI OleDocument_AddRef(IOleDocument *iface)
{ {
HTMLDocument *This = OLEDOC_THIS(iface); HTMLDocument *This = OLEDOC_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI OleDocument_Release(IOleDocument *iface) static ULONG WINAPI OleDocument_Release(IOleDocument *iface)
{ {
HTMLDocument *This = OLEDOC_THIS(iface); HTMLDocument *This = OLEDOC_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI OleDocument_CreateView(IOleDocument *iface, IOleInPlaceSite *pIPSite, IStream *pstm, static HRESULT WINAPI OleDocument_CreateView(IOleDocument *iface, IOleInPlaceSite *pIPSite, IStream *pstm,
@ -576,19 +576,19 @@ static const IOleDocumentVtbl OleDocumentVtbl = {
static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID riid, void **ppv) static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = CONTROL_THIS(iface); HTMLDocument *This = CONTROL_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI OleControl_AddRef(IOleControl *iface) static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
{ {
HTMLDocument *This = CONTROL_THIS(iface); HTMLDocument *This = CONTROL_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI OleControl_Release(IOleControl *iface) static ULONG WINAPI OleControl_Release(IOleControl *iface)
{ {
HTMLDocument *This = CONTROL_THIS(iface); HTMLDocument *This = CONTROL_THIS(iface);
return IHTMLDocument_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI) static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI)
@ -755,22 +755,22 @@ static const IOleControlVtbl OleControlVtbl = {
#define OBJSITE_THIS(iface) DEFINE_THIS(HTMLDocument, ObjectWithSite, iface) #define OBJSITE_THIS(iface) DEFINE_THIS(HTMLDocument, ObjectWithSite, iface)
static HRESULT WINAPI ObjectWithSite_QueryInterface(IObjectWithSite *iface, REFIID riid, void **ppvObject) static HRESULT WINAPI ObjectWithSite_QueryInterface(IObjectWithSite *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = OBJSITE_THIS(iface); HTMLDocument *This = OBJSITE_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI ObjectWithSite_AddRef(IObjectWithSite *iface) static ULONG WINAPI ObjectWithSite_AddRef(IObjectWithSite *iface)
{ {
HTMLDocument *This = OBJSITE_THIS(iface); HTMLDocument *This = OBJSITE_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI ObjectWithSite_Release(IObjectWithSite *iface) static ULONG WINAPI ObjectWithSite_Release(IObjectWithSite *iface)
{ {
HTMLDocument *This = OBJSITE_THIS(iface); HTMLDocument *This = OBJSITE_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *pUnkSite) static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *pUnkSite)
@ -805,19 +805,19 @@ static inline HTMLDocument *impl_from_IOleContainer(IOleContainer *iface)
static HRESULT WINAPI OleContainer_QueryInterface(IOleContainer *iface, REFIID riid, void **ppv) static HRESULT WINAPI OleContainer_QueryInterface(IOleContainer *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = impl_from_IOleContainer(iface); HTMLDocument *This = impl_from_IOleContainer(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI OleContainer_AddRef(IOleContainer *iface) static ULONG WINAPI OleContainer_AddRef(IOleContainer *iface)
{ {
HTMLDocument *This = impl_from_IOleContainer(iface); HTMLDocument *This = impl_from_IOleContainer(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI OleContainer_Release(IOleContainer *iface) static ULONG WINAPI OleContainer_Release(IOleContainer *iface)
{ {
HTMLDocument *This = impl_from_IOleContainer(iface); HTMLDocument *This = impl_from_IOleContainer(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI OleContainer_ParseDisplayName(IOleContainer *iface, IBindCtx *pbc, LPOLESTR pszDisplayName, static HRESULT WINAPI OleContainer_ParseDisplayName(IOleContainer *iface, IBindCtx *pbc, LPOLESTR pszDisplayName,

View File

@ -41,22 +41,22 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define ACTOBJ_THIS(iface) DEFINE_THIS(HTMLDocument, OleInPlaceActiveObject, iface) #define ACTOBJ_THIS(iface) DEFINE_THIS(HTMLDocument, OleInPlaceActiveObject, iface)
static HRESULT WINAPI OleInPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface, REFIID riid, void **ppvObject) static HRESULT WINAPI OleInPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = ACTOBJ_THIS(iface); HTMLDocument *This = ACTOBJ_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI OleInPlaceActiveObject_AddRef(IOleInPlaceActiveObject *iface) static ULONG WINAPI OleInPlaceActiveObject_AddRef(IOleInPlaceActiveObject *iface)
{ {
HTMLDocument *This = ACTOBJ_THIS(iface); HTMLDocument *This = ACTOBJ_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI OleInPlaceActiveObject_Release(IOleInPlaceActiveObject *iface) static ULONG WINAPI OleInPlaceActiveObject_Release(IOleInPlaceActiveObject *iface)
{ {
HTMLDocument *This = ACTOBJ_THIS(iface); HTMLDocument *This = ACTOBJ_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI OleInPlaceActiveObject_GetWindow(IOleInPlaceActiveObject *iface, HWND *phwnd) static HRESULT WINAPI OleInPlaceActiveObject_GetWindow(IOleInPlaceActiveObject *iface, HWND *phwnd)
@ -148,22 +148,22 @@ static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl = {
#define OLEINPLACEWND_THIS(iface) DEFINE_THIS(HTMLDocument, OleInPlaceObjectWindowless, iface) #define OLEINPLACEWND_THIS(iface) DEFINE_THIS(HTMLDocument, OleInPlaceObjectWindowless, iface)
static HRESULT WINAPI OleInPlaceObjectWindowless_QueryInterface(IOleInPlaceObjectWindowless *iface, static HRESULT WINAPI OleInPlaceObjectWindowless_QueryInterface(IOleInPlaceObjectWindowless *iface,
REFIID riid, void **ppvObject) REFIID riid, void **ppv)
{ {
HTMLDocument *This = OLEINPLACEWND_THIS(iface); HTMLDocument *This = OLEINPLACEWND_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI OleInPlaceObjectWindowless_AddRef(IOleInPlaceObjectWindowless *iface) static ULONG WINAPI OleInPlaceObjectWindowless_AddRef(IOleInPlaceObjectWindowless *iface)
{ {
HTMLDocument *This = OLEINPLACEWND_THIS(iface); HTMLDocument *This = OLEINPLACEWND_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI OleInPlaceObjectWindowless_Release(IOleInPlaceObjectWindowless *iface) static ULONG WINAPI OleInPlaceObjectWindowless_Release(IOleInPlaceObjectWindowless *iface)
{ {
HTMLDocument *This = OLEINPLACEWND_THIS(iface); HTMLDocument *This = OLEINPLACEWND_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI OleInPlaceObjectWindowless_GetWindow(IOleInPlaceObjectWindowless *iface, static HRESULT WINAPI OleInPlaceObjectWindowless_GetWindow(IOleInPlaceObjectWindowless *iface,

View File

@ -341,23 +341,22 @@ static HRESULT get_doc_string(HTMLDocumentNode *This, char **str)
#define PERSISTMON_THIS(iface) DEFINE_THIS(HTMLDocument, PersistMoniker, iface) #define PERSISTMON_THIS(iface) DEFINE_THIS(HTMLDocument, PersistMoniker, iface)
static HRESULT WINAPI PersistMoniker_QueryInterface(IPersistMoniker *iface, REFIID riid, static HRESULT WINAPI PersistMoniker_QueryInterface(IPersistMoniker *iface, REFIID riid, void **ppv)
void **ppvObject)
{ {
HTMLDocument *This = PERSISTMON_THIS(iface); HTMLDocument *This = PERSISTMON_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI PersistMoniker_AddRef(IPersistMoniker *iface) static ULONG WINAPI PersistMoniker_AddRef(IPersistMoniker *iface)
{ {
HTMLDocument *This = PERSISTMON_THIS(iface); HTMLDocument *This = PERSISTMON_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI PersistMoniker_Release(IPersistMoniker *iface) static ULONG WINAPI PersistMoniker_Release(IPersistMoniker *iface)
{ {
HTMLDocument *This = PERSISTMON_THIS(iface); HTMLDocument *This = PERSISTMON_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI PersistMoniker_GetClassID(IPersistMoniker *iface, CLSID *pClassID) static HRESULT WINAPI PersistMoniker_GetClassID(IPersistMoniker *iface, CLSID *pClassID)
@ -466,22 +465,22 @@ static const IPersistMonikerVtbl PersistMonikerVtbl = {
#define MONPROP_THIS(iface) DEFINE_THIS(HTMLDocument, MonikerProp, iface) #define MONPROP_THIS(iface) DEFINE_THIS(HTMLDocument, MonikerProp, iface)
static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppvObject) static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = MONPROP_THIS(iface); HTMLDocument *This = MONPROP_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI MonikerProp_AddRef(IMonikerProp *iface) static ULONG WINAPI MonikerProp_AddRef(IMonikerProp *iface)
{ {
HTMLDocument *This = MONPROP_THIS(iface); HTMLDocument *This = MONPROP_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI MonikerProp_Release(IMonikerProp *iface) static ULONG WINAPI MonikerProp_Release(IMonikerProp *iface)
{ {
HTMLDocument *This = MONPROP_THIS(iface); HTMLDocument *This = MONPROP_THIS(iface);
return IHTMLDocument_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val) static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val)
@ -520,22 +519,22 @@ static const IMonikerPropVtbl MonikerPropVtbl = {
#define PERSISTFILE_THIS(iface) DEFINE_THIS(HTMLDocument, PersistFile, iface) #define PERSISTFILE_THIS(iface) DEFINE_THIS(HTMLDocument, PersistFile, iface)
static HRESULT WINAPI PersistFile_QueryInterface(IPersistFile *iface, REFIID riid, void **ppvObject) static HRESULT WINAPI PersistFile_QueryInterface(IPersistFile *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = PERSISTFILE_THIS(iface); HTMLDocument *This = PERSISTFILE_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI PersistFile_AddRef(IPersistFile *iface) static ULONG WINAPI PersistFile_AddRef(IPersistFile *iface)
{ {
HTMLDocument *This = PERSISTFILE_THIS(iface); HTMLDocument *This = PERSISTFILE_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI PersistFile_Release(IPersistFile *iface) static ULONG WINAPI PersistFile_Release(IPersistFile *iface)
{ {
HTMLDocument *This = PERSISTFILE_THIS(iface); HTMLDocument *This = PERSISTFILE_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI PersistFile_GetClassID(IPersistFile *iface, CLSID *pClassID) static HRESULT WINAPI PersistFile_GetClassID(IPersistFile *iface, CLSID *pClassID)
@ -624,19 +623,19 @@ static HRESULT WINAPI PersistStreamInit_QueryInterface(IPersistStreamInit *iface
REFIID riid, void **ppv) REFIID riid, void **ppv)
{ {
HTMLDocument *This = PERSTRINIT_THIS(iface); HTMLDocument *This = PERSTRINIT_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI PersistStreamInit_AddRef(IPersistStreamInit *iface) static ULONG WINAPI PersistStreamInit_AddRef(IPersistStreamInit *iface)
{ {
HTMLDocument *This = PERSTRINIT_THIS(iface); HTMLDocument *This = PERSTRINIT_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI PersistStreamInit_Release(IPersistStreamInit *iface) static ULONG WINAPI PersistStreamInit_Release(IPersistStreamInit *iface)
{ {
HTMLDocument *This = PERSTRINIT_THIS(iface); HTMLDocument *This = PERSTRINIT_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI PersistStreamInit_GetClassID(IPersistStreamInit *iface, CLSID *pClassID) static HRESULT WINAPI PersistStreamInit_GetClassID(IPersistStreamInit *iface, CLSID *pClassID)
@ -759,22 +758,22 @@ static const IPersistStreamInitVtbl PersistStreamInitVtbl = {
#define PERSISTHIST_THIS(iface) DEFINE_THIS(HTMLDocument, PersistHistory, iface) #define PERSISTHIST_THIS(iface) DEFINE_THIS(HTMLDocument, PersistHistory, iface)
static HRESULT WINAPI PersistHistory_QueryInterface(IPersistHistory *iface, REFIID riid, void **ppvObject) static HRESULT WINAPI PersistHistory_QueryInterface(IPersistHistory *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = PERSISTHIST_THIS(iface); HTMLDocument *This = PERSISTHIST_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI PersistHistory_AddRef(IPersistHistory *iface) static ULONG WINAPI PersistHistory_AddRef(IPersistHistory *iface)
{ {
HTMLDocument *This = PERSISTHIST_THIS(iface); HTMLDocument *This = PERSISTHIST_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI PersistHistory_Release(IPersistHistory *iface) static ULONG WINAPI PersistHistory_Release(IPersistHistory *iface)
{ {
HTMLDocument *This = PERSISTHIST_THIS(iface); HTMLDocument *This = PERSISTHIST_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI PersistHistory_GetClassID(IPersistHistory *iface, CLSID *pClassID) static HRESULT WINAPI PersistHistory_GetClassID(IPersistHistory *iface, CLSID *pClassID)

View File

@ -211,19 +211,19 @@ static IOleUndoManager *create_undomgr(void)
static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = SERVPROV_THIS(iface); HTMLDocument *This = SERVPROV_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface) static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface)
{ {
HTMLDocument *This = SERVPROV_THIS(iface); HTMLDocument *This = SERVPROV_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface) static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface)
{ {
HTMLDocument *This = SERVPROV_THIS(iface); HTMLDocument *This = SERVPROV_THIS(iface);
return IHTMLDocument_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService,

View File

@ -450,19 +450,19 @@ HRESULT call_set_active_object(IOleInPlaceUIWindow *window, IOleInPlaceActiveObj
static HRESULT WINAPI OleDocumentView_QueryInterface(IOleDocumentView *iface, REFIID riid, void **ppvObject) static HRESULT WINAPI OleDocumentView_QueryInterface(IOleDocumentView *iface, REFIID riid, void **ppvObject)
{ {
HTMLDocument *This = DOCVIEW_THIS(iface); HTMLDocument *This = DOCVIEW_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject); return htmldoc_query_interface(This, riid, ppvObject);
} }
static ULONG WINAPI OleDocumentView_AddRef(IOleDocumentView *iface) static ULONG WINAPI OleDocumentView_AddRef(IOleDocumentView *iface)
{ {
HTMLDocument *This = DOCVIEW_THIS(iface); HTMLDocument *This = DOCVIEW_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI OleDocumentView_Release(IOleDocumentView *iface) static ULONG WINAPI OleDocumentView_Release(IOleDocumentView *iface)
{ {
HTMLDocument *This = DOCVIEW_THIS(iface); HTMLDocument *This = DOCVIEW_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI OleDocumentView_SetInPlaceSite(IOleDocumentView *iface, IOleInPlaceSite *pIPSite) static HRESULT WINAPI OleDocumentView_SetInPlaceSite(IOleDocumentView *iface, IOleInPlaceSite *pIPSite)
@ -504,8 +504,8 @@ static HRESULT WINAPI OleDocumentView_GetDocument(IOleDocumentView *iface, IUnkn
if(!ppunk) if(!ppunk)
return E_INVALIDARG; return E_INVALIDARG;
IHTMLDocument2_AddRef(HTMLDOC(This)); htmldoc_addref(This);
*ppunk = (IUnknown*)HTMLDOC(This); *ppunk = (IUnknown*)&This->IHTMLDocument2_iface;
return S_OK; return S_OK;
} }
@ -758,22 +758,22 @@ static const IOleDocumentViewVtbl OleDocumentViewVtbl = {
#define VIEWOBJ_THIS(iface) DEFINE_THIS(HTMLDocument, ViewObjectEx, iface) #define VIEWOBJ_THIS(iface) DEFINE_THIS(HTMLDocument, ViewObjectEx, iface)
static HRESULT WINAPI ViewObject_QueryInterface(IViewObjectEx *iface, REFIID riid, void **ppvObject) static HRESULT WINAPI ViewObject_QueryInterface(IViewObjectEx *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = VIEWOBJ_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI ViewObject_AddRef(IViewObjectEx *iface) static ULONG WINAPI ViewObject_AddRef(IViewObjectEx *iface)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = VIEWOBJ_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This)); return htmldoc_addref(This);
} }
static ULONG WINAPI ViewObject_Release(IViewObjectEx *iface) static ULONG WINAPI ViewObject_Release(IViewObjectEx *iface)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = VIEWOBJ_THIS(iface);
return IHTMLDocument2_Release(HTMLDOC(This)); return htmldoc_release(This);
} }
static HRESULT WINAPI ViewObject_Draw(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, static HRESULT WINAPI ViewObject_Draw(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect,