mshtml: Don't pass hash part of URI to EvaluateNewWindow.
This commit is contained in:
parent
986f4cb9b1
commit
e0a33d0480
|
@ -116,4 +116,6 @@ void channelbsc_set_channel(nsChannelBSC*,nsChannel*,nsIStreamListener*,nsISuppo
|
||||||
IUri *nsuri_get_uri(nsWineURI*) DECLSPEC_HIDDEN;
|
IUri *nsuri_get_uri(nsWineURI*) DECLSPEC_HIDDEN;
|
||||||
HRESULT create_relative_uri(HTMLOuterWindow*,const WCHAR*,IUri**) DECLSPEC_HIDDEN;
|
HRESULT create_relative_uri(HTMLOuterWindow*,const WCHAR*,IUri**) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
IUri *get_uri_nofrag(IUri*) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
HRESULT bind_mon_to_wstr(HTMLInnerWindow*,IMoniker*,WCHAR**) DECLSPEC_HIDDEN;
|
HRESULT bind_mon_to_wstr(HTMLInnerWindow*,IMoniker*,WCHAR**) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -857,13 +857,14 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
|
||||||
HTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
HTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||||
HTMLOuterWindow *window = This->outer_window;
|
HTMLOuterWindow *window = This->outer_window;
|
||||||
INewWindowManager *new_window_mgr;
|
INewWindowManager *new_window_mgr;
|
||||||
|
BSTR uri_str;
|
||||||
IUri *uri;
|
IUri *uri;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
TRACE("(%p)->(%s %s %s %x %p)\n", This, debugstr_w(url), debugstr_w(name),
|
TRACE("(%p)->(%s %s %s %x %p)\n", This, debugstr_w(url), debugstr_w(name),
|
||||||
debugstr_w(features), replace, pomWindowResult);
|
debugstr_w(features), replace, pomWindowResult);
|
||||||
|
|
||||||
if(!window->doc_obj)
|
if(!window->doc_obj || !window->uri_nofrag)
|
||||||
return E_UNEXPECTED;
|
return E_UNEXPECTED;
|
||||||
|
|
||||||
if(name && *name == '_') {
|
if(name && *name == '_') {
|
||||||
|
@ -878,10 +879,14 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
hres = INewWindowManager_EvaluateNewWindow(new_window_mgr, url, name, window->url,
|
hres = IUri_GetDisplayUri(window->uri_nofrag, &uri_str);
|
||||||
|
if(SUCCEEDED(hres)) {
|
||||||
|
hres = INewWindowManager_EvaluateNewWindow(new_window_mgr, url, name, uri_str,
|
||||||
features, !!replace, window->doc_obj->has_popup ? 0 : NWMF_FIRST, 0);
|
features, !!replace, window->doc_obj->has_popup ? 0 : NWMF_FIRST, 0);
|
||||||
INewWindowManager_Release(new_window_mgr);
|
|
||||||
window->doc_obj->has_popup = TRUE;
|
window->doc_obj->has_popup = TRUE;
|
||||||
|
SysFreeString(uri_str);
|
||||||
|
}
|
||||||
|
INewWindowManager_Release(new_window_mgr);
|
||||||
if(FAILED(hres)) {
|
if(FAILED(hres)) {
|
||||||
*pomWindowResult = NULL;
|
*pomWindowResult = NULL;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
|
@ -372,6 +372,7 @@ struct HTMLOuterWindow {
|
||||||
HTMLInnerWindow *pending_window;
|
HTMLInnerWindow *pending_window;
|
||||||
IMoniker *mon;
|
IMoniker *mon;
|
||||||
IUri *uri;
|
IUri *uri;
|
||||||
|
IUri *uri_nofrag;
|
||||||
BSTR url;
|
BSTR url;
|
||||||
|
|
||||||
SCRIPTMODE scriptmode;
|
SCRIPTMODE scriptmode;
|
||||||
|
|
|
@ -94,7 +94,7 @@ IUri *nsuri_get_uri(nsWineURI *nsuri)
|
||||||
return nsuri->uri;
|
return nsuri->uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
static IUri *get_uri_nofrag(IUri *uri)
|
IUri *get_uri_nofrag(IUri *uri)
|
||||||
{
|
{
|
||||||
IUriBuilder *uri_builder;
|
IUriBuilder *uri_builder;
|
||||||
IUri *ret;
|
IUri *ret;
|
||||||
|
|
|
@ -106,6 +106,11 @@ void set_current_uri(HTMLOuterWindow *window, IUri *uri)
|
||||||
window->uri = NULL;
|
window->uri = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(window->uri_nofrag) {
|
||||||
|
IUri_Release(window->uri_nofrag);
|
||||||
|
window->uri_nofrag = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
SysFreeString(window->url);
|
SysFreeString(window->url);
|
||||||
window->url = NULL;
|
window->url = NULL;
|
||||||
|
|
||||||
|
@ -115,6 +120,13 @@ void set_current_uri(HTMLOuterWindow *window, IUri *uri)
|
||||||
IUri_AddRef(uri);
|
IUri_AddRef(uri);
|
||||||
window->uri = uri;
|
window->uri = uri;
|
||||||
|
|
||||||
|
window->uri_nofrag = get_uri_nofrag(uri);
|
||||||
|
if(!window->uri_nofrag) {
|
||||||
|
FIXME("get_uri_nofrag failed\n");
|
||||||
|
IUri_AddRef(uri);
|
||||||
|
window->uri_nofrag = uri;
|
||||||
|
}
|
||||||
|
|
||||||
IUri_GetDisplayUri(uri, &window->url);
|
IUri_GetDisplayUri(uri, &window->url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue