Module: wine Branch: master Commit: 7bbe0d5ca6a9005d0c781d671c06a74fe9f2b0d4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7bbe0d5ca6a9005d0c781d671c... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jan 10 17:07:36 2012 +0100 mshtml: Open document in a new window in IHlinkTarget::Navigate if the document is not embedded. --- dlls/mshtml/hlink.c | 4 ++++ dlls/mshtml/navigate.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/hlink.c b/dlls/mshtml/hlink.c index fd836de..4e63498 100644 --- a/dlls/mshtml/hlink.c +++ b/dlls/mshtml/hlink.c @@ -28,6 +28,7 @@ #include "wine/debug.h" #include "mshtml_private.h" +#include "binding.h" WINE_DEFAULT_DEBUG_CHANNEL(mshtml); @@ -83,6 +84,9 @@ static HRESULT WINAPI HlinkTarget_Navigate(IHlinkTarget *iface, DWORD grfHLNF, L if(pwzJumpLocation) FIXME("JumpLocation not supported\n"); + if(!This->doc_obj->client) + return navigate_new_window(This->window, This->window->uri, NULL, NULL); + return IOleObject_DoVerb(&This->IOleObject_iface, OLEIVERB_SHOW, NULL, NULL, -1, NULL, NULL); } diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index ea1f532..9b650f4 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -2030,7 +2030,10 @@ HRESULT navigate_new_window(HTMLWindow *window, IUri *uri, const WCHAR *name, IH IWebBrowser2_put_Visible(web_browser, VARIANT_TRUE); IWebBrowser2_Release(web_browser); - *ret = new_window; + if(ret) + *ret = new_window; + else + IHTMLWindow2_Release(new_window); return S_OK; }