mshtml: Moved EvaluateNewWindow call to navigate_new_window.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4a70d33552
commit
63205bf01d
|
@ -971,8 +971,6 @@ 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;
|
|
||||||
BSTR uri_str;
|
|
||||||
IUri *uri;
|
IUri *uri;
|
||||||
HRESULT hres;
|
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),
|
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(features)
|
||||||
|
FIXME("unsupported features argument %s\n", debugstr_w(features));
|
||||||
|
if(replace)
|
||||||
|
FIXME("unsupported relace argument\n");
|
||||||
|
|
||||||
if(!window->doc_obj || !window->uri_nofrag)
|
if(!window->doc_obj || !window->uri_nofrag)
|
||||||
return E_UNEXPECTED;
|
return E_UNEXPECTED;
|
||||||
|
@ -1006,26 +1008,6 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
|
||||||
return E_NOTIMPL;
|
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);
|
hres = create_relative_uri(window, url, &uri);
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
return 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)
|
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;
|
IWebBrowser2 *web_browser;
|
||||||
IHTMLWindow2 *new_window;
|
IHTMLWindow2 *new_window;
|
||||||
IBindCtx *bind_ctx;
|
IBindCtx *bind_ctx;
|
||||||
nsChannelBSC *bsc;
|
nsChannelBSC *bsc;
|
||||||
HRESULT hres;
|
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)
|
if(request_data)
|
||||||
hres = create_channelbsc(NULL, request_data->headers,
|
hres = create_channelbsc(NULL, request_data->headers,
|
||||||
request_data->post_data, request_data->post_data_len, FALSE,
|
request_data->post_data, request_data->post_data_len, FALSE,
|
||||||
|
|
Loading…
Reference in New Issue