Jacek Caban : mshtml: Store BSCallback in NSContainer and use it instead of load_call.
Module: wine Branch: refs/heads/master Commit: e0157ba201703cec1a098dd40c02462f32a2185e URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e0157ba201703cec1a098dd4... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jun 3 00:39:39 2006 +0200 mshtml: Store BSCallback in NSContainer and use it instead of load_call. --- dlls/mshtml/mshtml_private.h | 2 +- dlls/mshtml/nsembed.c | 2 +- dlls/mshtml/nsio.c | 2 +- dlls/mshtml/persist.c | 13 ++++++++++--- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 83bae7f..7223a7e 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -112,7 +112,7 @@ struct NSContainer { HWND hwnd; - BOOL load_call; /* hack */ + BSCallback *bscallback; /* hack */ }; struct BSCallback { diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 907b0f5..d12326b 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -1153,7 +1153,7 @@ NSContainer *NSContainer_Create(HTMLDocu ret->doc = doc; ret->ref = 1; - ret->load_call = FALSE; + ret->bscallback = NULL; if(parent) nsIWebBrowserChrome_AddRef(NSWBCHROME(parent)); diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index f0344e8..561a750 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -589,7 +589,7 @@ static nsresult NSAPI nsChannel_AsyncOpe return NS_ERROR_UNEXPECTED; } - if(container->load_call) { + if(container->bscallback) { nsIWebBrowserChrome_Release(NSWBCHROME(container)); }else { BOOL cont = before_async_open(This, container); diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index a663fe9..55462ad 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -154,6 +154,7 @@ static HRESULT WINAPI PersistMoniker_Loa IMoniker *pimkName, LPBC pibc, DWORD grfMode) { HTMLDocument *This = PERSISTMON_THIS(iface); + BSCallback *bscallback; LPOLESTR url; HRESULT hres; nsresult nsres; @@ -214,24 +215,27 @@ static HRESULT WINAPI PersistMoniker_Loa } } + bscallback = create_bscallback(This, url); + if(This->nscontainer) { nsIInputStream *post_data_stream = get_post_data_stream(pibc); - This->nscontainer->load_call = TRUE; + This->nscontainer->bscallback = bscallback; nsres = nsIWebNavigation_LoadURI(This->nscontainer->navigation, url, LOAD_FLAGS_NONE, NULL, post_data_stream, NULL); - This->nscontainer->load_call = FALSE; + This->nscontainer->bscallback = NULL; if(post_data_stream) nsIInputStream_Release(post_data_stream); if(NS_SUCCEEDED(nsres)) { + IBindStatusCallback_Release(STATUSCLB(bscallback)); CoTaskMemFree(url); return S_OK; }else { WARN("LoadURI failed: %08lx\n", nsres); } - } + } /* FIXME: Use grfMode */ @@ -240,6 +244,9 @@ static HRESULT WINAPI PersistMoniker_Loa if(pibc) FIXME("not supported pibc\n"); + IBindStatusCallback_Release(STATUSCLB(bscallback)); + CoTaskMemFree(url); + return S_OK; }
participants (1)
-
Alexandre Julliard