mshtml: Store BSCallback in NSContainer and use it instead of load_call.
This commit is contained in:
parent
813e82f253
commit
e0157ba201
|
@ -112,7 +112,7 @@ struct NSContainer {
|
|||
|
||||
HWND hwnd;
|
||||
|
||||
BOOL load_call; /* hack */
|
||||
BSCallback *bscallback; /* hack */
|
||||
};
|
||||
|
||||
struct BSCallback {
|
||||
|
|
|
@ -1153,7 +1153,7 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent)
|
|||
|
||||
ret->doc = doc;
|
||||
ret->ref = 1;
|
||||
ret->load_call = FALSE;
|
||||
ret->bscallback = NULL;
|
||||
|
||||
if(parent)
|
||||
nsIWebBrowserChrome_AddRef(NSWBCHROME(parent));
|
||||
|
|
|
@ -589,7 +589,7 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
|
|||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
if(container->load_call) {
|
||||
if(container->bscallback) {
|
||||
nsIWebBrowserChrome_Release(NSWBCHROME(container));
|
||||
}else {
|
||||
BOOL cont = before_async_open(This, container);
|
||||
|
|
|
@ -154,6 +154,7 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
|
|||
IMoniker *pimkName, LPBC pibc, DWORD grfMode)
|
||||
{
|
||||
HTMLDocument *This = PERSISTMON_THIS(iface);
|
||||
BSCallback *bscallback;
|
||||
LPOLESTR url;
|
||||
HRESULT hres;
|
||||
nsresult nsres;
|
||||
|
@ -214,18 +215,21 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
|
|||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
|
@ -240,6 +244,9 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
|
|||
if(pibc)
|
||||
FIXME("not supported pibc\n");
|
||||
|
||||
IBindStatusCallback_Release(STATUSCLB(bscallback));
|
||||
CoTaskMemFree(url);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue