Commit e5321be5 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

shdocvw.5: Move on_before_navigate2 call to navigate_mon.

parent cc8ed9a3
...@@ -558,13 +558,24 @@ static HRESULT navigate_mon(DocHost *This, IMoniker *mon, PBYTE post_data, ULONG ...@@ -558,13 +558,24 @@ static HRESULT navigate_mon(DocHost *This, IMoniker *mon, PBYTE post_data, ULONG
{ {
IBindStatusCallback *callback; IBindStatusCallback *callback;
IBindCtx *bindctx; IBindCtx *bindctx;
VARIANT_BOOL cancel = VARIANT_FALSE;
LPWSTR url;
HRESULT hres; HRESULT hres;
IMoniker_GetDisplayName(mon, NULL, NULL, &This->url); IMoniker_GetDisplayName(mon, NULL, NULL, &url);
TRACE("navigating to %s\n", debugstr_w(This->url)); TRACE("navigating to %s\n", debugstr_w(url));
on_before_navigate2(This, url, post_data, post_data_len, headers, &cancel);
if(cancel) {
FIXME("Navigation canceled\n");
CoTaskMemFree(url);
return S_OK;
}
if(This->document) if(This->document)
deactivate_document(This); deactivate_document(This);
CoTaskMemFree(This->url);
This->url = url;
callback = create_callback(This, post_data, post_data_len, (LPWSTR)headers); callback = create_callback(This, post_data, post_data_len, (LPWSTR)headers);
CreateAsyncBindCtx(0, callback, 0, &bindctx); CreateAsyncBindCtx(0, callback, 0, &bindctx);
...@@ -637,7 +648,6 @@ static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx, ...@@ -637,7 +648,6 @@ static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx,
PBYTE post_data = NULL; PBYTE post_data = NULL;
ULONG post_data_len = 0; ULONG post_data_len = 0;
LPWSTR headers = NULL; LPWSTR headers = NULL;
VARIANT_BOOL cancel = VARIANT_FALSE;
BINDINFO bindinfo; BINDINFO bindinfo;
DWORD bindf = 0; DWORD bindf = 0;
HRESULT hres; HRESULT hres;
...@@ -666,20 +676,15 @@ static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx, ...@@ -666,20 +676,15 @@ static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx,
post_data = bindinfo.stgmedData.u.hGlobal; post_data = bindinfo.stgmedData.u.hGlobal;
} }
on_before_navigate2(This, url, post_data, post_data_len, headers, &cancel); /* FIXME: We should do it after BindToObject call */
CoTaskMemFree(url); if(try_application_url(url)) {
CoTaskMemFree(url);
if(cancel) { return S_OK;
FIXME("navigation canceled\n");
hres = S_OK;
}else {
/* FIXME: We should do it after BindToObject call */
if(try_application_url(url))
return S_OK;
hres = navigate_mon(This, mon, post_data, post_data_len, headers);
} }
hres = navigate_mon(This, mon, post_data, post_data_len, headers);
CoTaskMemFree(url);
CoTaskMemFree(headers); CoTaskMemFree(headers);
ReleaseBindInfo(&bindinfo); ReleaseBindInfo(&bindinfo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment