mshtml: Opening an empty URL should open about:blank.

Paulius Dilkas paulius.dilkas at gmail.com
Fri Apr 17 10:52:27 CDT 2015


Fixes https://bugs.winehq.org/show_bug.cgi?id=37294
---
 dlls/mshtml/htmlwindow.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index 3a31301..6458273 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -934,6 +934,7 @@ static HRESULT WINAPI
HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
     HRESULT hres;

     static const WCHAR _selfW[] = {'_','s','e','l','f',0};
+    static const WCHAR about_blank[] =
{'a','b','o','u','t',':','b','l','a','n','k',0};

     TRACE("(%p)->(%s %s %s %x %p)\n", This, debugstr_w(url), debugstr_w(name),
           debugstr_w(features), replace, pomWindowResult);
@@ -983,9 +984,15 @@ static HRESULT WINAPI
HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
         return S_OK;
     }

-    hres = create_relative_uri(window, url, &uri);
-    if(FAILED(hres))
-        return hres;
+    if(SysStringLen(url) == 0) {
+        hres = create_uri(about_blank, 0, &uri);
+        if(FAILED(hres))
+            return hres;
+    } else {
+        hres = create_relative_uri(window, url, &uri);
+        if(FAILED(hres))
+            return hres;
+    }

     hres = navigate_new_window(window, uri, name, NULL, pomWindowResult);
     IUri_Release(uri);
-- 
2.3.5



More information about the wine-patches mailing list