Jacek Caban : mshtml: Move mime to HTMLDocumentObj.

Alexandre Julliard julliard at winehq.org
Thu Sep 17 13:52:38 CDT 2009


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Sep 16 22:12:56 2009 +0200

mshtml: Move mime to HTMLDocumentObj.

---

 dlls/mshtml/htmldoc.c        |    2 +-
 dlls/mshtml/mshtml_private.h |    3 +--
 dlls/mshtml/nsio.c           |    4 ++--
 dlls/mshtml/persist.c        |    4 ++--
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 95b0100..8144092 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -1763,7 +1763,6 @@ static void destroy_htmldoc(HTMLDocument *This)
     if(This->event_target)
         release_event_target(This->event_target);
 
-    heap_free(This->mime);
     release_nodes(This);
     release_dispex(&This->dispex);
 
@@ -1894,6 +1893,7 @@ static ULONG HTMLDocumentObj_Release(HTMLDocument *base)
 
         if(This->hwnd)
             DestroyWindow(This->hwnd);
+        heap_free(This->mime);
 
         destroy_htmldoc(&This->basedoc);
 
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index c8d1c61..d5fcd8d 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -284,8 +284,6 @@ struct HTMLDocument {
     HTMLWindow *window;
     nsIDOMHTMLDocument *nsdoc;
 
-    LPWSTR mime;
-
     DWORD update;
 
     event_target_t *event_target;
@@ -350,6 +348,7 @@ struct HTMLDocumentObj {
 
     USERMODE usermode;
     READYSTATE readystate;
+    LPWSTR mime;
 
     /* FIXME: probably should be in document node object */
     nsChannelBSC *bscallback;
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index ee3df0d..d7fe4a9 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -708,9 +708,9 @@ static nsresult async_open_doc_uri(nsChannel *This, NSContainer *container,
     if(container->bscallback) {
         channelbsc_set_channel(container->bscallback, This, listener, context);
 
-        if(container->doc && container->doc->basedoc.mime) {
+        if(container->doc && container->doc->mime) {
             heap_free(This->content_type);
-            This->content_type = heap_strdupWtoA(container->doc->basedoc.mime);
+            This->content_type = heap_strdupWtoA(container->doc->mime);
         }
 
         return NS_OK;
diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c
index 0ce29c4..f89cde8 100644
--- a/dlls/mshtml/persist.c
+++ b/dlls/mshtml/persist.c
@@ -370,8 +370,8 @@ static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPER
 
     switch(mkp) {
     case MIMETYPEPROP:
-        heap_free(This->mime);
-        This->mime = heap_strdupW(val);
+        heap_free(This->doc_obj->mime);
+        This->doc_obj->mime = heap_strdupW(val);
         break;
 
     case CLASSIDPROP:




More information about the wine-cvs mailing list