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

This commit is contained in:
Jacek Caban 2008-10-06 09:50:03 -05:00 committed by Alexandre Julliard
parent b381951e7c
commit cc528d2698
3 changed files with 23 additions and 4 deletions

View File

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

View File

@ -34,6 +34,7 @@ typedef enum {
STYLEID_BACKGROUND,
STYLEID_BACKGROUND_COLOR,
STYLEID_BACKGROUND_IMAGE,
STYLEID_BORDER,
STYLEID_BORDER_LEFT,
STYLEID_COLOR,
STYLEID_DISPLAY,

View File

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