Jacek Caban : mshtml: Move nsChannel' s content type initialization to async_open_doc_uri.

Alexandre Julliard julliard at winehq.org
Fri Jan 11 07:20:29 CST 2008


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Jan 10 22:13:07 2008 +0100

mshtml: Move nsChannel's content type initialization to async_open_doc_uri.

---

 dlls/mshtml/navigate.c |   10 ----------
 dlls/mshtml/nsio.c     |   10 ++++++++++
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index 3dd8e53..cc48b93 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -887,16 +887,6 @@ void set_document_bscallback(HTMLDocument *doc, BSCallback *callback)
     if(callback) {
         IBindStatusCallback_AddRef(STATUSCLB(callback));
         callback->doc = doc;
-
-        if(doc->mime) {
-            DWORD len;
-
-            heap_free(callback->nschannel->content);
-
-            len = WideCharToMultiByte(CP_ACP, 0, doc->mime, -1, NULL, 0, NULL, NULL);
-            callback->nschannel->content = heap_alloc(len);
-            WideCharToMultiByte(CP_ACP, 0, doc->mime, -1, callback->nschannel->content, -1, NULL, NULL);
-        }
     }
 }
 
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index cc4ea2f..0385f4a 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -652,6 +652,16 @@ static nsresult async_open_doc_uri(nsChannel *This, NSContainer *container,
             container->bscallback->nscontext = context;
         }
 
+        if(container->doc && container->doc->mime) {
+            DWORD len;
+
+            heap_free(This->content);
+
+            len = WideCharToMultiByte(CP_ACP, 0, container->doc->mime, -1, NULL, 0, NULL, NULL);
+            This->content = heap_alloc(len);
+            WideCharToMultiByte(CP_ACP, 0, container->doc->mime, -1, This->content, -1, NULL, NULL);
+        }
+
         if(do_load_from_moniker_hack(This))
             return WINE_NS_LOAD_FROM_MONIKER;
     }else  {




More information about the wine-cvs mailing list