diff --git a/dlls/shdocvw/client.c b/dlls/shdocvw/client.c index 9082e1240bd..7e1cb891c22 100644 --- a/dlls/shdocvw/client.c +++ b/dlls/shdocvw/client.c @@ -213,8 +213,8 @@ static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface, TRACE("(%p)->(%p %p %p %p %p)\n", This, ppFrame, ppDoc, lprcPosRect, lprcClipRect, lpFrameInfo); - IOleInPlaceFrame_AddRef(INPLACEFRAME(This->wb)); - *ppFrame = INPLACEFRAME(This->wb); + IOleInPlaceFrame_AddRef(INPLACEFRAME(This)); + *ppFrame = INPLACEFRAME(This); *ppDoc = NULL; GetClientRect(This->hwnd, lprcPosRect); diff --git a/dlls/shdocvw/frame.c b/dlls/shdocvw/frame.c index 585a64deed8..e1439d90b1a 100644 --- a/dlls/shdocvw/frame.c +++ b/dlls/shdocvw/frame.c @@ -21,12 +21,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); -#define INPLACEFRAME_THIS(iface) DEFINE_THIS(WebBrowser, OleInPlaceFrame, iface) +#define INPLACEFRAME_THIS(iface) DEFINE_THIS(DocHost, OleInPlaceFrame, iface) static HRESULT WINAPI InPlaceFrame_QueryInterface(IOleInPlaceFrame *iface, REFIID riid, void **ppv) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); *ppv = NULL; @@ -52,19 +52,19 @@ static HRESULT WINAPI InPlaceFrame_QueryInterface(IOleInPlaceFrame *iface, static ULONG WINAPI InPlaceFrame_AddRef(IOleInPlaceFrame *iface) { - WebBrowser *This = INPLACEFRAME_THIS(iface); - return IWebBrowser2_AddRef(WEBBROWSER(This)); + DocHost *This = INPLACEFRAME_THIS(iface); + return IOleClientSite_AddRef(CLIENTSITE(This)); } static ULONG WINAPI InPlaceFrame_Release(IOleInPlaceFrame *iface) { - WebBrowser *This = INPLACEFRAME_THIS(iface); - return IWebBrowser2_Release(WEBBROWSER(This)); + DocHost *This = INPLACEFRAME_THIS(iface); + return IOleClientSite_Release(CLIENTSITE(This)); } static HRESULT WINAPI InPlaceFrame_GetWindow(IOleInPlaceFrame *iface, HWND *phwnd) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); FIXME("(%p)->(%p)\n", This, phwnd); return E_NOTIMPL; } @@ -72,14 +72,14 @@ static HRESULT WINAPI InPlaceFrame_GetWindow(IOleInPlaceFrame *iface, HWND *phwn static HRESULT WINAPI InPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame *iface, BOOL fEnterMode) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); FIXME("(%p)->(%x)\n", This, fEnterMode); return E_NOTIMPL; } static HRESULT WINAPI InPlaceFrame_GetBorder(IOleInPlaceFrame *iface, LPRECT lprectBorder) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); FIXME("(%p)->(%p)\n", This, lprectBorder); return E_NOTIMPL; } @@ -87,7 +87,7 @@ static HRESULT WINAPI InPlaceFrame_GetBorder(IOleInPlaceFrame *iface, LPRECT lpr static HRESULT WINAPI InPlaceFrame_RequestBorderSpace(IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); FIXME("(%p)->(%p)\n", This, pborderwidths); return E_NOTIMPL; } @@ -95,7 +95,7 @@ static HRESULT WINAPI InPlaceFrame_RequestBorderSpace(IOleInPlaceFrame *iface, static HRESULT WINAPI InPlaceFrame_SetBorderSpace(IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); FIXME("(%p)->(%p)\n", This, pborderwidths); return E_NOTIMPL; } @@ -103,7 +103,7 @@ static HRESULT WINAPI InPlaceFrame_SetBorderSpace(IOleInPlaceFrame *iface, static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface, IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); FIXME("(%p)->(%p %s)\n", This, pActiveObject, debugstr_w(pszObjName)); return E_NOTIMPL; } @@ -111,7 +111,7 @@ static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface, static HRESULT WINAPI InPlaceFrame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); FIXME("(%p)->(%p %p)\n", This, hmenuShared, lpMenuWidths); return E_NOTIMPL; } @@ -119,14 +119,14 @@ static HRESULT WINAPI InPlaceFrame_InsertMenus(IOleInPlaceFrame *iface, HMENU hm static HRESULT WINAPI InPlaceFrame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); FIXME("(%p)->(%p %p %p)\n", This, hmenuShared, holemenu, hwndActiveObject); return E_NOTIMPL; } static HRESULT WINAPI InPlaceFrame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hmenuShared) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); FIXME("(%p)->(%p)\n", This, hmenuShared); return E_NOTIMPL; } @@ -134,14 +134,14 @@ static HRESULT WINAPI InPlaceFrame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hm static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface, LPCOLESTR pszStatusText) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); FIXME("(%p)->(%p)\n", This, debugstr_w(pszStatusText)); return E_NOTIMPL; } static HRESULT WINAPI InPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); FIXME("(%p)->(%x)\n", This, fEnable); return E_NOTIMPL; } @@ -149,7 +149,7 @@ static HRESULT WINAPI InPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL static HRESULT WINAPI InPlaceFrame_TranslateAccelerator(IOleInPlaceFrame *iface, LPMSG lpmsg, WORD wID) { - WebBrowser *This = INPLACEFRAME_THIS(iface); + DocHost *This = INPLACEFRAME_THIS(iface); FIXME("(%p)->(%p %d)\n", This, lpmsg, wID); return E_NOTIMPL; } @@ -176,5 +176,5 @@ static const IOleInPlaceFrameVtbl OleInPlaceFrameVtbl = { void WebBrowser_Frame_Init(WebBrowser *This) { - This->lpOleInPlaceFrameVtbl = &OleInPlaceFrameVtbl; + This->doc_host.lpOleInPlaceFrameVtbl = &OleInPlaceFrameVtbl; } diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h index 658a33a4eaa..d0579e41cda 100644 --- a/dlls/shdocvw/shdocvw.h +++ b/dlls/shdocvw/shdocvw.h @@ -62,6 +62,9 @@ typedef struct { const IDispatchVtbl *lpDispatchVtbl; const IServiceProviderVtbl *lpServiceProviderVtbl; + /* Interfaces of InPlaceFrame object */ + const IOleInPlaceFrameVtbl *lpOleInPlaceFrameVtbl; + IDispatch *disp; IUnknown *document; @@ -90,10 +93,6 @@ typedef struct WebBrowser { const IOleCommandTargetVtbl *lpWBOleCommandTargetVtbl; const IHlinkFrameVtbl *lpHlinkFrameVtbl; - /* Interfaces of InPlaceFrame object */ - - const IOleInPlaceFrameVtbl *lpOleInPlaceFrameVtbl; - LONG ref; IOleClientSite *client;