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

mshtml: Added IHTMLStyle::[get|put]_border implementation.

parent b381951e
......@@ -39,6 +39,8 @@ static const WCHAR attrBackgroundColor[] =
{'b','a','c','k','g','r','o','u','n','d','-','c','o','l','o','r',0};
static const WCHAR attrBackgroundImage[] =
{'b','a','c','k','g','r','o','u','n','d','-','i','m','a','g','e',0};
static const WCHAR attrBorder[] =
{'b','o','r','d','e','r',0};
static const WCHAR attrBorderLeft[] =
{'b','o','r','d','e','r','-','l','e','f','t',0};
static const WCHAR attrColor[] =
......@@ -72,6 +74,7 @@ static const LPCWSTR style_strings[] = {
attrBackground,
attrBackgroundColor,
attrBackgroundImage,
attrBorder,
attrBorderLeft,
attrColor,
attrDisplay,
......@@ -981,15 +984,19 @@ static HRESULT WINAPI HTMLStyle_get_padding(IHTMLStyle *iface, BSTR *p)
static HRESULT WINAPI HTMLStyle_put_border(IHTMLStyle *iface, BSTR v)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
return set_style_attr(This, STYLEID_BORDER, v, 0);
}
static HRESULT WINAPI HTMLStyle_get_border(IHTMLStyle *iface, BSTR *p)
{
HTMLStyle *This = HTMLSTYLE_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_style_attr(This, STYLEID_BORDER, p);
}
static HRESULT WINAPI HTMLStyle_put_borderTop(IHTMLStyle *iface, BSTR v)
......
......@@ -34,6 +34,7 @@ typedef enum {
STYLEID_BACKGROUND,
STYLEID_BACKGROUND_COLOR,
STYLEID_BACKGROUND_IMAGE,
STYLEID_BORDER,
STYLEID_BORDER_LEFT,
STYLEID_COLOR,
STYLEID_DISPLAY,
......
......@@ -2086,6 +2086,17 @@ static void test_default_style(IHTMLStyle *style)
hres = IHTMLStyle_put_margin(style, NULL);
ok(hres == S_OK, "get_margin failed: %08x\n", hres);
str = NULL;
hres = IHTMLStyle_get_border(style, &str);
ok(hres == S_OK, "get_border failed: %08x\n", hres);
ok(!str || !*str, "str is not empty\n");
SysFreeString(str);
str = a2bstr("1px");
hres = IHTMLStyle_put_border(style, str);
ok(hres == S_OK, "get_border failed: %08x\n", hres);
SysFreeString(str);
}
static void test_default_selection(IHTMLDocument2 *doc)
......
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