Jacek Caban : mshtml: Make empty string is a valid overflow style.

Alexandre Julliard julliard at winehq.org
Wed Sep 9 09:55:53 CDT 2009


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Sep  8 22:26:49 2009 +0200

mshtml: Make empty string is a valid overflow style.

---

 dlls/mshtml/htmlstyle.c |    2 +-
 dlls/mshtml/tests/dom.c |   10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index a993702..5a75e2b 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -2016,7 +2016,7 @@ static HRESULT WINAPI HTMLStyle_put_overflow(IHTMLStyle *iface, BSTR v)
     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
 
     /* overflow can only be one of the follow values. */
-    if(!v || strcmpiW(szVisible, v) == 0 || strcmpiW(szScroll, v) == 0 ||
+    if(!v || !*v || strcmpiW(szVisible, v) == 0 || strcmpiW(szScroll, v) == 0 ||
              strcmpiW(szHidden, v) == 0  || strcmpiW(szAuto, v) == 0)
     {
         return set_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, v, 0);
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 6c03b0e..49f5ab1 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -3441,6 +3441,16 @@ static void test_default_style(IHTMLStyle *style)
     ok(!strcmp_wa(str, "auto"), "str=%s\n", wine_dbgstr_w(str));
     SysFreeString(str);
 
+    str = a2bstr("");
+    hres = IHTMLStyle_put_overflow(style, str);
+    ok(hres == S_OK, "put_overflow failed: %08x\n", hres);
+    SysFreeString(str);
+
+    hres = IHTMLStyle_get_overflow(style, &str);
+    ok(hres == S_OK, "get_overflow failed: %08x\n", hres);
+    ok(!str, "str=%s\n", wine_dbgstr_w(str));
+    SysFreeString(str);
+
     /* restore overflow default */
     hres = IHTMLStyle_put_overflow(style, sOverflowDefault);
     ok(hres == S_OK, "put_overflow failed: %08x\n", hres);




More information about the wine-cvs mailing list