mshtml: Use fregment-less URI in super_navigate.
This commit is contained in:
parent
01949aead4
commit
99c34aa9d9
|
@ -780,7 +780,6 @@ BOOL is_gecko_path(const char*) DECLSPEC_HIDDEN;
|
|||
void init_node_cc(void);
|
||||
|
||||
HRESULT nsuri_to_url(LPCWSTR,BOOL,BSTR*) DECLSPEC_HIDDEN;
|
||||
BOOL compare_ignoring_frag(IUri*,IUri*) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT navigate_url(HTMLOuterWindow*,const WCHAR*,IUri*) DECLSPEC_HIDDEN;
|
||||
HRESULT set_frame_doc(HTMLFrameBase*,nsIDOMDocument*) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -2047,10 +2047,15 @@ static HRESULT navigate_fragment(HTMLOuterWindow *window, IUri *uri)
|
|||
HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, const WCHAR *headers, BYTE *post_data, DWORD post_data_size)
|
||||
{
|
||||
nsChannelBSC *bsc;
|
||||
IUri *uri_nofrag;
|
||||
IMoniker *mon;
|
||||
DWORD scheme;
|
||||
HRESULT hres;
|
||||
|
||||
uri_nofrag = get_uri_nofrag(uri);
|
||||
if(!uri_nofrag)
|
||||
return E_FAIL;
|
||||
|
||||
if(window->doc_obj->client) {
|
||||
IOleCommandTarget *cmdtrg;
|
||||
|
||||
|
@ -2059,7 +2064,7 @@ HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, const WCHAR *headers,
|
|||
VARIANT in, out;
|
||||
BSTR url_str;
|
||||
|
||||
hres = IUri_GetDisplayUri(uri, &url_str);
|
||||
hres = IUri_GetDisplayUri(uri_nofrag, &url_str);
|
||||
if(SUCCEEDED(hres)) {
|
||||
V_VT(&in) = VT_BSTR;
|
||||
V_BSTR(&in) = url_str;
|
||||
|
@ -2074,12 +2079,19 @@ HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, const WCHAR *headers,
|
|||
}
|
||||
}
|
||||
|
||||
if(window->uri && !post_data_size && compare_ignoring_frag(window->uri, uri)) {
|
||||
TRACE("fragment navigate\n");
|
||||
return navigate_fragment(window, uri);
|
||||
if(window->uri_nofrag && !post_data_size) {
|
||||
BOOL eq;
|
||||
|
||||
hres = IUri_IsEqual(uri_nofrag, window->uri_nofrag, &eq);
|
||||
if(SUCCEEDED(hres) && eq) {
|
||||
IUri_Release(uri_nofrag);
|
||||
TRACE("fragment navigate\n");
|
||||
return navigate_fragment(window, uri);
|
||||
}
|
||||
}
|
||||
|
||||
hres = CreateURLMonikerEx2(NULL, uri, &mon, URL_MK_UNIFORM);
|
||||
hres = CreateURLMonikerEx2(NULL, uri_nofrag, &mon, URL_MK_UNIFORM);
|
||||
IUri_Release(uri_nofrag);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ IUri *get_uri_nofrag(IUri *uri)
|
|||
return ret;
|
||||
}
|
||||
|
||||
BOOL compare_ignoring_frag(IUri *uri1, IUri *uri2)
|
||||
static BOOL compare_ignoring_frag(IUri *uri1, IUri *uri2)
|
||||
{
|
||||
IUri *uri_nofrag1, *uri_nofrag2;
|
||||
BOOL ret = FALSE;
|
||||
|
|
|
@ -2835,10 +2835,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
|
|||
CHECK_EXPECT(Exec_ShellDocView_67);
|
||||
ok(pvaIn != NULL, "pvaIn == NULL\n");
|
||||
ok(V_VT(pvaIn) == VT_BSTR, "V_VT(pvaIn) = %d\n", V_VT(pvaIn));
|
||||
if(!loading_hash)
|
||||
ok(!strcmp_wa(V_BSTR(pvaIn), nav_serv_url), "V_BSTR(pvaIn) = %s, expected %s\n", wine_dbgstr_w(V_BSTR(pvaIn)), nav_serv_url);
|
||||
else
|
||||
todo_wine ok(!strcmp_wa(V_BSTR(pvaIn), nav_serv_url), "V_BSTR(pvaIn) = %s, expected %s\n", wine_dbgstr_w(V_BSTR(pvaIn)), nav_serv_url);
|
||||
ok(!strcmp_wa(V_BSTR(pvaIn), nav_serv_url), "V_BSTR(pvaIn) = %s, expected %s\n",
|
||||
wine_dbgstr_w(V_BSTR(pvaIn)), nav_serv_url);
|
||||
ok(pvaOut != NULL, "pvaOut == NULL\n");
|
||||
ok(V_VT(pvaOut) == VT_BOOL, "V_VT(pvaOut) = %d\n", V_VT(pvaOut));
|
||||
ok(V_BOOL(pvaOut) == VARIANT_TRUE, "V_BOOL(pvaOut) = %x\n", V_BOOL(pvaOut));
|
||||
|
|
Loading…
Reference in New Issue