From 172f82e1a5841fcff93f7299c791625c3ffa2190 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Sat, 13 Mar 2010 16:44:43 +0100 Subject: [PATCH] shdocvw: Use IHTMLPrivateWindow for navigation in navigate_url if available. --- dlls/shdocvw/navigate.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/dlls/shdocvw/navigate.c b/dlls/shdocvw/navigate.c index 1826a4fd098..8ba5f692740 100644 --- a/dlls/shdocvw/navigate.c +++ b/dlls/shdocvw/navigate.c @@ -726,10 +726,10 @@ static void navigate_bsc_proc(DocHost *This, task_header_t *t) HRESULT navigate_url(DocHost *This, LPCWSTR url, const VARIANT *Flags, const VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers) { - task_navigate_bsc_t *task; PBYTE post_data = NULL; ULONG post_data_len = 0; LPWSTR headers = NULL; + HRESULT hres = S_OK; TRACE("navigating to %s\n", debugstr_w(url)); @@ -756,15 +756,23 @@ HRESULT navigate_url(DocHost *This, LPCWSTR url, const VARIANT *Flags, TRACE("Headers: %s\n", debugstr_w(headers)); } - task = heap_alloc(sizeof(*task)); - task->bsc = create_callback(This, url, post_data, post_data_len, headers); + set_doc_state(This, READYSTATE_LOADING); + This->ready_state = READYSTATE_LOADING; + + if(This->doc_navigate) { + hres = async_doc_navigate(This, url, headers, post_data, post_data_len, TRUE); + }else { + task_navigate_bsc_t *task; + + task = heap_alloc(sizeof(*task)); + task->bsc = create_callback(This, url, post_data, post_data_len, headers); + push_dochost_task(This, &task->header, navigate_bsc_proc, This->url == NULL); + } if(post_data) SafeArrayUnaccessData(V_ARRAY(PostData)); - push_dochost_task(This, &task->header, navigate_bsc_proc, This->url == NULL); - - return S_OK; + return hres; } static HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx,