Commit 537bbe2c authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Make empty string is a valid overflow style.

parent 576ee54d
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment