Jacek Caban : mshtml: Use wine scheme mechanism in do_load_from_moniker_hack.

Alexandre Julliard julliard at winehq.org
Mon Oct 15 11:27:52 CDT 2007


Module: wine
Branch: master
Commit: 41c35a1ce2e28ec5f53a66d87a0c8ab1110771dd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=41c35a1ce2e28ec5f53a66d87a0c8ab1110771dd

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sat Oct 13 03:59:19 2007 +0200

mshtml: Use wine scheme mechanism in do_load_from_moniker_hack.

---

 dlls/mshtml/nsio.c |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index 7bccce1..7768b2b 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -568,7 +568,9 @@ static nsresult NSAPI nsChannel_Open(nsIHttpChannel *iface, nsIInputStream **_re
 
 static BOOL do_load_from_moniker_hack(nsChannel *This)
 {
-    PRBool b = FALSE;
+    nsACString scheme_str;
+    nsresult nsres;
+    BOOL ret = TRUE;
 
     /* 
      * We should always load the page from IMoniker, but Wine is not yet
@@ -581,12 +583,18 @@ static BOOL do_load_from_moniker_hack(nsChannel *This)
     if(!This->channel)
         return TRUE;
 
-    /* Load about protocol from moniker */
-    nsIWineURI_SchemeIs(This->uri, "about", &b);
-    if(b)
-        return TRUE;
+    nsACString_Init(&scheme_str, NULL);
+    nsres = nsIWineURI_GetScheme(This->uri, &scheme_str);
+
+    if(NS_SUCCEEDED(nsres)) {
+        const char *scheme;
+
+        nsACString_GetData(&scheme_str, &scheme, NULL);
+        ret = !strcmp(scheme, "wine");
+    }
 
-    return FALSE;
+    nsACString_Finish(&scheme_str);
+    return ret;
 }
 
 static HRESULT create_mon_for_nschannel(nsChannel *channel, IMoniker **mon)




More information about the wine-cvs mailing list