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

mshtml: Always use navigate_fragment for fragment-only navigation in navigate_uri.

parent 176f5409
......@@ -164,6 +164,7 @@ HRESULT read_stream(BSCallback*,IStream*,void*,DWORD,DWORD*) DECLSPEC_HIDDEN;
HRESULT create_relative_uri(HTMLOuterWindow*,const WCHAR*,IUri**) DECLSPEC_HIDDEN;
HRESULT create_uri(const WCHAR*,DWORD,IUri**) DECLSPEC_HIDDEN;
IUri *get_uri_nofrag(IUri*) DECLSPEC_HIDDEN;
BOOL compare_uri_ignoring_frag(IUri *uri1, IUri *uri2) DECLSPEC_HIDDEN;
void set_current_mon(HTMLOuterWindow*,IMoniker*,DWORD) DECLSPEC_HIDDEN;
void set_current_uri(HTMLOuterWindow*,IUri*) DECLSPEC_HIDDEN;
......@@ -2449,6 +2449,7 @@ HRESULT hlink_frame_navigate(HTMLDocumentObj *doc, LPCWSTR url, nsChannel *nscha
static HRESULT navigate_uri(HTMLOuterWindow *window, IUri *uri, const WCHAR *display_uri, const request_data_t *request_data,
DWORD flags)
{
DWORD post_data_len = request_data ? request_data->post_data_len : 0;
nsWineURI *nsuri;
HRESULT hres;
......@@ -2458,7 +2459,6 @@ static HRESULT navigate_uri(HTMLOuterWindow *window, IUri *uri, const WCHAR *dis
return E_UNEXPECTED;
if(window->browser->doc->webbrowser) {
DWORD post_data_len = request_data ? request_data->post_data_len : 0;
void *post_data = post_data_len ? request_data->post_data : NULL;
const WCHAR *headers = request_data ? request_data->headers : NULL;
......@@ -2485,6 +2485,10 @@ static HRESULT navigate_uri(HTMLOuterWindow *window, IUri *uri, const WCHAR *dis
return super_navigate(window, uri, flags, headers, post_data, post_data_len);
}
if(!(flags & BINDING_NOFRAG) && window->uri_nofrag && !post_data_len &&
compare_uri_ignoring_frag(window->uri_nofrag, uri))
return navigate_fragment(window, uri);
if(is_main_content_window(window)) {
BOOL cancel;
......
......@@ -115,7 +115,7 @@ IUri *get_uri_nofrag(IUri *uri)
return ret;
}
static BOOL compare_ignoring_frag(IUri *uri1, IUri *uri2)
BOOL compare_uri_ignoring_frag(IUri *uri1, IUri *uri2)
{
IUri *uri_nofrag1, *uri_nofrag2;
BOOL ret = FALSE;
......@@ -3029,7 +3029,7 @@ static nsresult NSAPI nsURI_EqualsExceptRef(nsIFileURL *iface, nsIURI *other, cp
}
if(ensure_uri(This) && ensure_uri(other_obj)) {
*_retval = compare_ignoring_frag(This->uri, other_obj->uri);
*_retval = compare_uri_ignoring_frag(This->uri, other_obj->uri);
nsres = NS_OK;
}else {
nsres = NS_ERROR_UNEXPECTED;
......
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