Jacek Caban : shdocvw: Use Dochost, not WebBrowser, in deactivate_document.
Module: wine Branch: refs/heads/master Commit: 22b6d5485c524ae7fa313fd2b9b491c131f4ad99 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=22b6d5485c524ae7fa313fd2... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 18 00:39:15 2006 +0200 shdocvw: Use Dochost, not WebBrowser, in deactivate_document. --- dlls/shdocvw/dochost.c | 30 +++++++++++++++--------------- dlls/shdocvw/navigate.c | 2 +- dlls/shdocvw/oleobject.c | 2 +- dlls/shdocvw/shdocvw.h | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dlls/shdocvw/dochost.c b/dlls/shdocvw/dochost.c index fd3ca2c..5432fc3 100644 --- a/dlls/shdocvw/dochost.c +++ b/dlls/shdocvw/dochost.c @@ -154,36 +154,36 @@ void create_doc_view_hwnd(WebBrowser *Th NULL, shdocvw_hinstance, This); } -void deactivate_document(WebBrowser *This) +void deactivate_document(DocHost *This) { IOleInPlaceObjectWindowless *winobj; IOleObject *oleobj = NULL; IHlinkTarget *hlink = NULL; HRESULT hres; - if(This->doc_host.view) - IOleDocumentView_UIActivate(This->doc_host.view, FALSE); + if(This->view) + IOleDocumentView_UIActivate(This->view, FALSE); - hres = IUnknown_QueryInterface(This->doc_host.document, &IID_IOleInPlaceObjectWindowless, + hres = IUnknown_QueryInterface(This->document, &IID_IOleInPlaceObjectWindowless, (void**)&winobj); if(SUCCEEDED(hres)) { IOleInPlaceObjectWindowless_InPlaceDeactivate(winobj); IOleInPlaceObjectWindowless_Release(winobj); } - if(This->doc_host.view) { - IOleDocumentView_Show(This->doc_host.view, FALSE); - IOleDocumentView_CloseView(This->doc_host.view, 0); - IOleDocumentView_SetInPlaceSite(This->doc_host.view, NULL); - IOleDocumentView_Release(This->doc_host.view); - This->doc_host.view = NULL; + if(This->view) { + IOleDocumentView_Show(This->view, FALSE); + IOleDocumentView_CloseView(This->view, 0); + IOleDocumentView_SetInPlaceSite(This->view, NULL); + IOleDocumentView_Release(This->view); + This->view = NULL; } - hres = IUnknown_QueryInterface(This->doc_host.document, &IID_IOleObject, (void**)&oleobj); + hres = IUnknown_QueryInterface(This->document, &IID_IOleObject, (void**)&oleobj); if(SUCCEEDED(hres)) IOleObject_Close(oleobj, OLECLOSE_NOSAVE); - hres = IUnknown_QueryInterface(This->doc_host.document, &IID_IHlinkTarget, (void**)&hlink); + hres = IUnknown_QueryInterface(This->document, &IID_IHlinkTarget, (void**)&hlink); if(SUCCEEDED(hres)) { IHlinkTarget_SetBrowseContext(hlink, NULL); IHlinkTarget_Release(hlink); @@ -194,7 +194,7 @@ void deactivate_document(WebBrowser *Thi IOleObject_GetClientSite(oleobj, &client_site); if(client_site) { - if(client_site == CLIENTSITE(&This->doc_host)) + if(client_site == CLIENTSITE(This)) IOleObject_SetClientSite(oleobj, NULL); IOleClientSite_Release(client_site); } @@ -202,8 +202,8 @@ void deactivate_document(WebBrowser *Thi IOleObject_Release(oleobj); } - IUnknown_Release(This->doc_host.document); - This->doc_host.document = NULL; + IUnknown_Release(This->document); + This->document = NULL; } #define OLECMD_THIS(iface) DEFINE_THIS(DocHost, OleCommandTarget, iface) diff --git a/dlls/shdocvw/navigate.c b/dlls/shdocvw/navigate.c index e41a5db..294efcc 100644 --- a/dlls/shdocvw/navigate.c +++ b/dlls/shdocvw/navigate.c @@ -401,7 +401,7 @@ static HRESULT navigate(WebBrowser *This */ if(This->doc_host.document) - deactivate_document(This); + deactivate_document(&This->doc_host); hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c index 4092172..e3cfa4a 100644 --- a/dlls/shdocvw/oleobject.c +++ b/dlls/shdocvw/oleobject.c @@ -154,7 +154,7 @@ static HRESULT WINAPI OleObject_SetClien if(!pClientSite) { if(This->doc_host.document) - deactivate_document(This); + deactivate_document(&This->doc_host); This->client = NULL; return S_OK; } diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h index 09724aa..f719271 100644 --- a/dlls/shdocvw/shdocvw.h +++ b/dlls/shdocvw/shdocvw.h @@ -165,7 +165,7 @@ void WebBrowser_ClientSite_Destroy(WebBr HRESULT WebBrowser_Create(IUnknown*,REFIID,void**); void create_doc_view_hwnd(WebBrowser *This); -void deactivate_document(WebBrowser*); +void deactivate_document(DocHost*); void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*); HRESULT navigate_url(WebBrowser*,LPCWSTR,PBYTE,ULONG,LPWSTR);
participants (1)
-
Alexandre Julliard