Commit b2f3144e authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLStyle2::overflowY implementation.

parent 5b99a4e8
...@@ -136,6 +136,8 @@ static const WCHAR attrOverflow[] = ...@@ -136,6 +136,8 @@ static const WCHAR attrOverflow[] =
{'o','v','e','r','f','l','o','w',0}; {'o','v','e','r','f','l','o','w',0};
static const WCHAR attrOverflowX[] = static const WCHAR attrOverflowX[] =
{'o','v','e','r','f','l','o','w','-','x',0}; {'o','v','e','r','f','l','o','w','-','x',0};
static const WCHAR attrOverflowY[] =
{'o','v','e','r','f','l','o','w','-','y',0};
static const WCHAR attrPadding[] = static const WCHAR attrPadding[] =
{'p','a','d','d','i','n','g',0}; {'p','a','d','d','i','n','g',0};
static const WCHAR attrPaddingBottom[] = static const WCHAR attrPaddingBottom[] =
...@@ -232,6 +234,7 @@ static const style_tbl_entry_t style_tbl[] = { ...@@ -232,6 +234,7 @@ static const style_tbl_entry_t style_tbl[] = {
{attrMinHeight, DISPID_IHTMLSTYLE4_MINHEIGHT}, {attrMinHeight, DISPID_IHTMLSTYLE4_MINHEIGHT},
{attrOverflow, DISPID_IHTMLSTYLE_OVERFLOW}, {attrOverflow, DISPID_IHTMLSTYLE_OVERFLOW},
{attrOverflowX, DISPID_IHTMLSTYLE2_OVERFLOWX}, {attrOverflowX, DISPID_IHTMLSTYLE2_OVERFLOWX},
{attrOverflowY, DISPID_IHTMLSTYLE2_OVERFLOWY},
{attrPadding, DISPID_IHTMLSTYLE_PADDING}, {attrPadding, DISPID_IHTMLSTYLE_PADDING},
{attrPaddingBottom, DISPID_IHTMLSTYLE_PADDINGBOTTOM}, {attrPaddingBottom, DISPID_IHTMLSTYLE_PADDINGBOTTOM},
{attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT}, {attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT},
......
...@@ -84,6 +84,7 @@ typedef enum { ...@@ -84,6 +84,7 @@ typedef enum {
STYLEID_MIN_HEIGHT, STYLEID_MIN_HEIGHT,
STYLEID_OVERFLOW, STYLEID_OVERFLOW,
STYLEID_OVERFLOW_X, STYLEID_OVERFLOW_X,
STYLEID_OVERFLOW_Y,
STYLEID_PADDING, STYLEID_PADDING,
STYLEID_PADDING_BOTTOM, STYLEID_PADDING_BOTTOM,
STYLEID_PADDING_LEFT, STYLEID_PADDING_LEFT,
......
...@@ -525,15 +525,19 @@ static HRESULT WINAPI HTMLStyle2_get_overflowX(IHTMLStyle2 *iface, BSTR *p) ...@@ -525,15 +525,19 @@ static HRESULT WINAPI HTMLStyle2_get_overflowX(IHTMLStyle2 *iface, BSTR *p)
static HRESULT WINAPI HTMLStyle2_put_overflowY(IHTMLStyle2 *iface, BSTR v) static HRESULT WINAPI HTMLStyle2_put_overflowY(IHTMLStyle2 *iface, BSTR v)
{ {
HTMLStyle *This = impl_from_IHTMLStyle2(iface); HTMLStyle *This = impl_from_IHTMLStyle2(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL; TRACE("(%p)->(%s)\n", This, debugstr_w(v));
return set_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW_Y, v, 0);
} }
static HRESULT WINAPI HTMLStyle2_get_overflowY(IHTMLStyle2 *iface, BSTR *p) static HRESULT WINAPI HTMLStyle2_get_overflowY(IHTMLStyle2 *iface, BSTR *p)
{ {
HTMLStyle *This = impl_from_IHTMLStyle2(iface); HTMLStyle *This = impl_from_IHTMLStyle2(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL; TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW_Y, p, 0);
} }
static HRESULT WINAPI HTMLStyle2_put_accelerator(IHTMLStyle2 *iface, BSTR v) static HRESULT WINAPI HTMLStyle2_put_accelerator(IHTMLStyle2 *iface, BSTR v)
......
...@@ -360,6 +360,22 @@ static void test_style2(IHTMLStyle2 *style2) ...@@ -360,6 +360,22 @@ static void test_style2(IHTMLStyle2 *style2)
hres = IHTMLStyle2_get_overflowX(style2, &str); hres = IHTMLStyle2_get_overflowX(style2, &str);
ok(hres == S_OK, "get_overflowX failed: %08x\n", hres); ok(hres == S_OK, "get_overflowX failed: %08x\n", hres);
ok(!strcmp_wa(str, "hidden"), "overflowX = %s\n", wine_dbgstr_w(str)); ok(!strcmp_wa(str, "hidden"), "overflowX = %s\n", wine_dbgstr_w(str));
/* overflowY */
str = (void*)0xdeadbeef;
hres = IHTMLStyle2_get_overflowY(style2, &str);
ok(hres == S_OK, "get_overflowY failed: %08x\n", hres);
ok(!str, "overflowY = %s\n", wine_dbgstr_w(str));
str = a2bstr("hidden");
hres = IHTMLStyle2_put_overflowY(style2, str);
ok(hres == S_OK, "put_overflowY failed: %08x\n", hres);
SysFreeString(str);
str = NULL;
hres = IHTMLStyle2_get_overflowY(style2, &str);
ok(hres == S_OK, "get_overflowY failed: %08x\n", hres);
ok(!strcmp_wa(str, "hidden"), "overflowX = %s\n", wine_dbgstr_w(str));
} }
static void test_style3(IHTMLStyle3 *style3) static void test_style3(IHTMLStyle3 *style3)
......
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