Commit 63205bf0 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Moved EvaluateNewWindow call to navigate_new_window.

parent 4a70d335
......@@ -971,8 +971,6 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
{
HTMLWindow *This = impl_from_IHTMLWindow2(iface);
HTMLOuterWindow *window = This->outer_window;
INewWindowManager *new_window_mgr;
BSTR uri_str;
IUri *uri;
HRESULT hres;
......@@ -980,6 +978,10 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
TRACE("(%p)->(%s %s %s %x %p)\n", This, debugstr_w(url), debugstr_w(name),
debugstr_w(features), replace, pomWindowResult);
if(features)
FIXME("unsupported features argument %s\n", debugstr_w(features));
if(replace)
FIXME("unsupported relace argument\n");
if(!window->doc_obj || !window->uri_nofrag)
return E_UNEXPECTED;
......@@ -1006,26 +1008,6 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
return E_NOTIMPL;
}
hres = do_query_service((IUnknown*)window->doc_obj->client, &SID_SNewWindowManager, &IID_INewWindowManager,
(void**)&new_window_mgr);
if(FAILED(hres)) {
FIXME("No INewWindowManager\n");
return E_NOTIMPL;
}
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);
window->doc_obj->has_popup = TRUE;
SysFreeString(uri_str);
}
INewWindowManager_Release(new_window_mgr);
if(FAILED(hres)) {
*pomWindowResult = NULL;
return S_OK;
}
hres = create_relative_uri(window, url, &uri);
if(FAILED(hres))
return hres;
......
......@@ -2238,12 +2238,44 @@ HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, DWORD flags, const WC
HRESULT navigate_new_window(HTMLOuterWindow *window, IUri *uri, const WCHAR *name, request_data_t *request_data, IHTMLWindow2 **ret)
{
INewWindowManager *new_window_mgr;
BSTR display_uri, context_url;
IWebBrowser2 *web_browser;
IHTMLWindow2 *new_window;
IBindCtx *bind_ctx;
nsChannelBSC *bsc;
HRESULT hres;
hres = do_query_service((IUnknown*)window->doc_obj->client, &SID_SNewWindowManager, &IID_INewWindowManager,
(void**)&new_window_mgr);
if(SUCCEEDED(hres)) {
hres = IUri_GetDisplayUri(window->uri_nofrag, &context_url);
if(FAILED(hres))
return hres;
hres = IUri_GetDisplayUri(uri, &display_uri);
if(FAILED(hres)) {
SysFreeString(context_url);
return hres;
}
hres = INewWindowManager_EvaluateNewWindow(new_window_mgr, display_uri, name, context_url,
NULL, FALSE, window->doc_obj->has_popup ? 0 : NWMF_FIRST, 0);
window->doc_obj->has_popup = TRUE;
SysFreeString(display_uri);
SysFreeString(context_url);
INewWindowManager_Release(new_window_mgr);
if(FAILED(hres)) {
if(ret)
*ret = NULL;
return S_OK;
}
}else {
FIXME("No INewWindowManager\n");
return E_NOTIMPL;
}
if(request_data)
hres = create_channelbsc(NULL, request_data->headers,
request_data->post_data, request_data->post_data_len, FALSE,
......
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