mshtml: Make empty string is a valid overflow style.

This commit is contained in:
Jacek Caban 2009-09-08 22:26:49 +02:00 committed by Alexandre Julliard
parent 576ee54daf
commit 537bbe2ce5
2 changed files with 11 additions and 1 deletions

View File

@ -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);

View File

@ -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);