Jacek Caban : mshtml: Call update_doc in editor commands.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jun 11 08:46:39 CDT 2007


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sun Jun 10 11:47:52 2007 +0200

mshtml: Call update_doc in editor commands.

---

 dlls/mshtml/editor.c        |   24 +++++++++++++++++++++++-
 dlls/mshtml/tests/htmldoc.c |    4 ++++
 2 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c
index 9ac1cd5..8b1c0f9 100644
--- a/dlls/mshtml/editor.c
+++ b/dlls/mshtml/editor.c
@@ -585,8 +585,10 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
 {
     TRACE("(%p)->(%p %p)\n", This, in, out);
 
-    if(!This->nscontainer)
+    if(!This->nscontainer) {
+        update_doc(This, UPDATE_UI);
         return E_FAIL;
+    }
 
     if(in) {
         char *stra;
@@ -658,6 +660,8 @@ static HRESULT exec_forecolor(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
         }else {
             FIXME("unsupported in vt=%d\n", V_VT(in));
         }
+
+        update_doc(This, UPDATE_UI);
     }
 
     if(out) {
@@ -704,6 +708,8 @@ static HRESULT exec_fontsize(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
         default:
             FIXME("unsupported vt %d\n", V_VT(in));
         }
+
+        update_doc(This, UPDATE_UI);
     }
 
     return S_OK;
@@ -719,6 +725,7 @@ static HRESULT exec_bold(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARI
     if(This->nscontainer)
         do_ns_command(This->nscontainer, NSCMD_BOLD, NULL);
 
+    update_doc(This, UPDATE_UI);
     return S_OK;
 }
 
@@ -732,6 +739,7 @@ static HRESULT exec_italic(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VA
     if(This->nscontainer)
         do_ns_command(This->nscontainer, NSCMD_ITALIC, NULL);
 
+    update_doc(This, UPDATE_UI);
     return S_OK;
 }
 
@@ -767,6 +775,7 @@ static HRESULT exec_justifycenter(HTMLDocument *This, DWORD cmdexecopt, VARIANT
         FIXME("unsupported args\n");
 
     set_ns_align(This, NSALIGN_CENTER);
+    update_doc(This, UPDATE_UI);
     return S_OK;
 }
 
@@ -778,13 +787,19 @@ static HRESULT exec_justifyleft(HTMLDocument *This, DWORD cmdexecopt, VARIANT *i
         FIXME("unsupported args\n");
 
     set_ns_align(This, NSALIGN_LEFT);
+    update_doc(This, UPDATE_UI);
     return S_OK;
 }
 
 static HRESULT exec_justifyright(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VARIANT *out)
 {
     TRACE("(%p)\n", This);
+
+    if(in || out)
+        FIXME("unsupported args\n");
+
     set_ns_align(This, NSALIGN_RIGHT);
+    update_doc(This, UPDATE_UI);
     return S_OK;
 }
 
@@ -798,6 +813,7 @@ static HRESULT exec_underline(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
     if(This->nscontainer)
         do_ns_command(This->nscontainer, NSCMD_UNDERLINE, NULL);
 
+    update_doc(This, UPDATE_UI);
     return S_OK;
 }
 
@@ -811,6 +827,7 @@ static HRESULT exec_horizontalline(HTMLDocument *This, DWORD cmdexecopt, VARIANT
     if(This->nscontainer)
         do_ns_command(This->nscontainer, NSCMD_INSERTHR, NULL);
 
+    update_doc(This, UPDATE_UI);
     return S_OK;
 }
 
@@ -824,6 +841,7 @@ static HRESULT exec_orderlist(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
     if(This->nscontainer)
         do_ns_command(This->nscontainer, NSCMD_OL, NULL);
 
+    update_doc(This, UPDATE_UI);
     return S_OK;
 }
 
@@ -837,6 +855,7 @@ static HRESULT exec_unorderlist(HTMLDocument *This, DWORD cmdexecopt, VARIANT *i
     if(This->nscontainer)
         do_ns_command(This->nscontainer, NSCMD_UL, NULL);
 
+    update_doc(This, UPDATE_UI);
     return S_OK;
 }
 
@@ -850,6 +869,7 @@ static HRESULT exec_indent(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, VA
     if(This->nscontainer)
         do_ns_command(This->nscontainer, NSCMD_INDENT, NULL);
 
+    update_doc(This, UPDATE_UI);
     return S_OK;
 }
 
@@ -863,6 +883,7 @@ static HRESULT exec_outdent(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, V
     if(This->nscontainer)
         do_ns_command(This->nscontainer, NSCMD_OUTDENT, NULL);
 
+    update_doc(This, UPDATE_UI);
     return S_OK;
 }
 
@@ -875,6 +896,7 @@ static HRESULT exec_composesettings(HTMLDocument *This, DWORD cmdexecopt, VARIAN
 
     FIXME("%s\n", debugstr_w(V_BSTR(in)));
 
+    update_doc(This, UPDATE_UI);
     return S_OK;
 }
 
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c
index bbb64d8..fbffcbe 100644
--- a/dlls/mshtml/tests/htmldoc.c
+++ b/dlls/mshtml/tests/htmldoc.c
@@ -3335,14 +3335,17 @@ static void test_editing_mode(void)
 
     test_exec_fontname(unk, NULL, wszTimesNewRoman);
     test_exec_fontname(unk, wszArial, wszTimesNewRoman);
+    test_timer(EXPECT_UPDATEUI);
     test_exec_fontname(unk, NULL, wszArial);
 
     test_exec_noargs(unk, IDM_JUSTIFYRIGHT);
+    test_timer(EXPECT_UPDATEUI);
     if(!nogecko)
         test_QueryStatus(unk, &CGID_MSHTML, IDM_JUSTIFYRIGHT,
                          OLECMDF_SUPPORTED|OLECMDF_ENABLED|OLECMDF_LATCHED);
 
     test_exec_noargs(unk, IDM_JUSTIFYCENTER);
+    test_timer(EXPECT_UPDATEUI);
     test_QueryStatus(unk, &CGID_MSHTML, IDM_JUSTIFYRIGHT,
                      OLECMDF_SUPPORTED|OLECMDF_ENABLED);
     if(!nogecko)
@@ -3350,6 +3353,7 @@ static void test_editing_mode(void)
                          OLECMDF_SUPPORTED|OLECMDF_ENABLED|OLECMDF_LATCHED);
 
     test_exec_noargs(unk, IDM_HORIZONTALLINE);
+    test_timer(EXPECT_UPDATEUI);
     test_QueryStatus(unk, &CGID_MSHTML, IDM_HORIZONTALLINE,
                      OLECMDF_SUPPORTED|OLECMDF_ENABLED);
 




More information about the wine-cvs mailing list