Jacek Caban : shdocvw: Move frame variable to DocHost.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Mar 9 15:47:42 CST 2007
Module: wine
Branch: master
Commit: dc15020cf527b4f2e865e40d80e4a4ce8207aa03
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dc15020cf527b4f2e865e40d80e4a4ce8207aa03
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Mar 9 16:56:02 2007 +0100
shdocvw: Move frame variable to DocHost.
---
dlls/shdocvw/dochost.c | 3 +++
dlls/shdocvw/oleobject.c | 17 +++++++----------
dlls/shdocvw/shdocvw.h | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/shdocvw/dochost.c b/dlls/shdocvw/dochost.c
index c170a4a..f26447d 100644
--- a/dlls/shdocvw/dochost.c
+++ b/dlls/shdocvw/dochost.c
@@ -490,6 +490,7 @@ void DocHost_Init(DocHost *This, IDispatch *disp)
This->document = NULL;
This->hostui = NULL;
+ This->frame = NULL;
This->hwnd = NULL;
This->frame_hwnd = NULL;
@@ -508,6 +509,8 @@ void DocHost_Release(DocHost *This)
{
if(This->client_disp)
IDispatch_Release(This->client_disp);
+ if(This->frame)
+ IOleInPlaceFrame_Release(This->frame);
DocHost_ClientSite_Release(This);
diff --git a/dlls/shdocvw/oleobject.c b/dlls/shdocvw/oleobject.c
index 17f740a..aa1edfe 100644
--- a/dlls/shdocvw/oleobject.c
+++ b/dlls/shdocvw/oleobject.c
@@ -138,7 +138,7 @@ static HRESULT activate_inplace(WebBrowser *This, IOleClientSite *active_site)
IOleInPlaceSite_OnInPlaceActivate(This->inplace);
- IOleInPlaceSite_GetWindowContext(This->inplace, &This->frame, &This->uiwindow,
+ IOleInPlaceSite_GetWindowContext(This->inplace, &This->doc_host.frame, &This->uiwindow,
&This->pos_rect, &This->clip_rect,
&This->frameinfo);
@@ -153,8 +153,8 @@ static HRESULT activate_inplace(WebBrowser *This, IOleClientSite *active_site)
IOleClientSite_GetContainer(This->client, &This->container);
}
- if(This->frame)
- IOleInPlaceFrame_GetWindow(This->frame, &This->frame_hwnd);
+ if(This->doc_host.frame)
+ IOleInPlaceFrame_GetWindow(This->doc_host.frame, &This->frame_hwnd);
return S_OK;
}
@@ -174,13 +174,13 @@ static HRESULT activate_ui(WebBrowser *This, IOleClientSite *active_site)
IOleInPlaceSite_OnUIActivate(This->inplace);
- if(This->frame)
- IOleInPlaceFrame_SetActiveObject(This->frame, ACTIVEOBJ(This), wszitem);
+ if(This->doc_host.frame)
+ IOleInPlaceFrame_SetActiveObject(This->doc_host.frame, ACTIVEOBJ(This), wszitem);
if(This->uiwindow)
IOleInPlaceUIWindow_SetActiveObject(This->uiwindow, ACTIVEOBJ(This), wszitem);
- if(This->frame)
- IOleInPlaceFrame_SetMenu(This->frame, NULL, NULL, This->shell_embedding_hwnd);
+ if(This->doc_host.frame)
+ IOleInPlaceFrame_SetMenu(This->doc_host.frame, NULL, NULL, This->shell_embedding_hwnd);
SetFocus(This->shell_embedding_hwnd);
@@ -886,7 +886,6 @@ void WebBrowser_OleObject_Init(WebBrowser *This)
This->inplace = NULL;
This->container = NULL;
This->frame_hwnd = NULL;
- This->frame = NULL;
This->uiwindow = NULL;
This->shell_embedding_hwnd = NULL;
@@ -904,8 +903,6 @@ void WebBrowser_OleObject_Destroy(WebBrowser *This)
IOleObject_SetClientSite(OLEOBJ(This), NULL);
if(This->container)
IOleContainer_Release(This->container);
- if(This->frame)
- IOleInPlaceFrame_Release(This->frame);
if(This->uiwindow)
IOleInPlaceUIWindow_Release(This->uiwindow);
}
diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h
index 0f897e7..5704156 100644
--- a/dlls/shdocvw/shdocvw.h
+++ b/dlls/shdocvw/shdocvw.h
@@ -76,6 +76,7 @@ typedef struct {
IDispatch *client_disp;
IDocHostUIHandler *hostui;
+ IOleInPlaceFrame *frame;
IUnknown *document;
IOleDocumentView *view;
@@ -117,7 +118,6 @@ struct WebBrowser {
/* window context */
HWND frame_hwnd;
- IOleInPlaceFrame *frame;
IOleInPlaceUIWindow *uiwindow;
RECT pos_rect;
RECT clip_rect;
More information about the wine-cvs
mailing list