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

mshtml: COM cleanup for the IObjectWithSite iface.

parent 2efc64fb
......@@ -1821,7 +1821,7 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
*ppv = NULL;
}else if(IsEqualGUID(&IID_IObjectWithSite, riid)) {
TRACE("(%p)->(IID_IObjectWithSite %p)\n", This, ppv);
*ppv = OBJSITE(This);
*ppv = &This->IObjectWithSite_iface;
}else if(IsEqualGUID(&IID_IOleContainer, riid)) {
TRACE("(%p)->(IID_IOleContainer %p)\n", This, ppv);
*ppv = &This->IOleContainer_iface;
......
......@@ -364,8 +364,8 @@ struct HTMLDocument {
IPersistStreamInit IPersistStreamInit_iface;
const IDispatchExVtbl *lpIDispatchExVtbl;
ISupportErrorInfo ISupportErrorInfo_iface;
const IObjectWithSiteVtbl *lpObjectWithSiteVtbl;
IOleContainer IOleContainer_iface;
IObjectWithSite IObjectWithSite_iface;
IOleContainer IOleContainer_iface;
IUnknown *unk_impl;
IDispatchEx *dispex;
......@@ -627,7 +627,6 @@ struct HTMLDocumentNode {
#define HTMLWINDOW4(x) ((IHTMLWindow4*) &(x)->lpHTMLWindow4Vtbl)
#define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
#define CUSTOMDOC(x) ((ICustomDoc*) &(x)->lpCustomDocVtbl)
#define OBJSITE(x) ((IObjectWithSite*) &(x)->lpObjectWithSiteVtbl)
#define NSWBCHROME(x) ((nsIWebBrowserChrome*) &(x)->lpWebBrowserChromeVtbl)
#define NSCML(x) ((nsIContextMenuListener*) &(x)->lpContextMenuListenerVtbl)
......
......@@ -757,42 +757,43 @@ static const IOleControlVtbl OleControlVtbl = {
* IObjectWithSite implementation
*/
#define OBJSITE_THIS(iface) DEFINE_THIS(HTMLDocument, ObjectWithSite, iface)
static inline HTMLDocument *impl_from_IObjectWithSite(IObjectWithSite *iface)
{
return CONTAINING_RECORD(iface, HTMLDocument, IObjectWithSite_iface);
}
static HRESULT WINAPI ObjectWithSite_QueryInterface(IObjectWithSite *iface, REFIID riid, void **ppv)
{
HTMLDocument *This = OBJSITE_THIS(iface);
HTMLDocument *This = impl_from_IObjectWithSite(iface);
return htmldoc_query_interface(This, riid, ppv);
}
static ULONG WINAPI ObjectWithSite_AddRef(IObjectWithSite *iface)
{
HTMLDocument *This = OBJSITE_THIS(iface);
HTMLDocument *This = impl_from_IObjectWithSite(iface);
return htmldoc_addref(This);
}
static ULONG WINAPI ObjectWithSite_Release(IObjectWithSite *iface)
{
HTMLDocument *This = OBJSITE_THIS(iface);
HTMLDocument *This = impl_from_IObjectWithSite(iface);
return htmldoc_release(This);
}
static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *pUnkSite)
{
HTMLDocument *This = OBJSITE_THIS(iface);
HTMLDocument *This = impl_from_IObjectWithSite(iface);
FIXME("(%p)->(%p)\n", This, pUnkSite);
return E_NOTIMPL;
}
static HRESULT WINAPI ObjectWithSite_GetSite(IObjectWithSite* iface, REFIID riid, PVOID *ppvSite)
{
HTMLDocument *This = OBJSITE_THIS(iface);
HTMLDocument *This = impl_from_IObjectWithSite(iface);
FIXME("(%p)->(%p)\n", This, ppvSite);
return E_NOTIMPL;
}
#undef OBJSITE_THIS
static const IObjectWithSiteVtbl ObjectWithSiteVtbl = {
ObjectWithSite_QueryInterface,
ObjectWithSite_AddRef,
......@@ -876,6 +877,6 @@ void HTMLDocument_OleObj_Init(HTMLDocument *This)
This->IOleObject_iface.lpVtbl = &OleObjectVtbl;
This->IOleDocument_iface.lpVtbl = &OleDocumentVtbl;
This->IOleControl_iface.lpVtbl = &OleControlVtbl;
This->lpObjectWithSiteVtbl = &ObjectWithSiteVtbl;
This->IObjectWithSite_iface.lpVtbl = &ObjectWithSiteVtbl;
This->IOleContainer_iface.lpVtbl = &OleContainerVtbl;
}
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