Jacek Caban : mshtml: Load about:blank in exec_editmode.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Nov 2 15:47:16 CST 2006


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Nov  2 17:34:06 2006 +0100

mshtml: Load about:blank in exec_editmode.

---

 dlls/mshtml/olecmd.c |   50 +++++++++-----------------------------------------
 1 files changed, 9 insertions(+), 41 deletions(-)

diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c
index 7e6e0cf..908ed90 100644
--- a/dlls/mshtml/olecmd.c
+++ b/dlls/mshtml/olecmd.c
@@ -448,8 +448,11 @@ static void setup_ns_editing(NSContainer
 
 static HRESULT exec_editmode(HTMLDocument *This)
 {
+    IMoniker *mon;
     HRESULT hres;
 
+    static const WCHAR wszAboutBlank[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
+
     TRACE("(%p)\n", This);
 
     This->usermode = EDITMODE;
@@ -457,20 +460,6 @@ static HRESULT exec_editmode(HTMLDocumen
     if(This->frame)
         IOleInPlaceFrame_SetStatusText(This->frame, NULL);
 
-    if(This->client) {
-        IOleCommandTarget *cmdtrg = NULL;
-
-        hres = IOleClientSite_QueryInterface(This->client, &IID_IOleCommandTarget,
-                (void**)&cmdtrg);
-        if(SUCCEEDED(hres)) {
-            VARIANT var;
-
-            V_VT(&var) = VT_I4;
-            V_I4(&var) = 0;
-            IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 37, 0, &var, NULL);
-        }
-    }
-
     if(This->hostui) {
         DOCHOSTUIINFO hostinfo;
 
@@ -484,37 +473,16 @@ static HRESULT exec_editmode(HTMLDocumen
                     debugstr_w(hostinfo.pchHostCss), debugstr_w(hostinfo.pchHostNS));
     }
 
-    if(This->client) {
-        VARIANT silent, offline;
-
-        hres = get_client_disp_property(This->client, DISPID_AMBIENT_SILENT, &silent);
-        if(SUCCEEDED(hres)) {
-            if(V_VT(&silent) != VT_BOOL)
-                WARN("V_VT(silent) = %d\n", V_VT(&silent));
-            else if(V_BOOL(&silent))
-                FIXME("silent == true\n");
-        }
-
-        hres = get_client_disp_property(This->client,
-                DISPID_AMBIENT_OFFLINEIFNOTCONNECTED, &offline); 
-        if(SUCCEEDED(hres)) {
-            if(V_VT(&silent) != VT_BOOL)
-                WARN("V_VT(offline) = %d\n", V_VT(&silent));
-            else if(V_BOOL(&silent))
-                FIXME("offline == true\n");
-        }
-    }
-
     if(This->nscontainer)
         setup_ns_editing(This->nscontainer);
 
-    /* 
-     * FIXME: We should load about:protocol here.
-     */
-    This->readystate = READYSTATE_LOADING;
-    call_property_onchanged(This->cp_propnotif, DISPID_READYSTATE);
+    hres = CreateURLMoniker(NULL, wszAboutBlank, &mon);
+    if(FAILED(hres)) {
+        FIXME("CreateURLMoniker failed: %08x\n", hres);
+        return hres;
+    }
 
-    return S_OK;
+    return IPersistMoniker_Load(PERSISTMON(This), TRUE, mon, NULL, 0);
 }
 
 static HRESULT exec_baselinefont3(HTMLDocument *This)




More information about the wine-cvs mailing list