diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index cf8d2955f75..0beef5094d5 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -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) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index f12e072779c..ed3cba74e68 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -34,6 +34,7 @@ typedef enum { STYLEID_BACKGROUND, STYLEID_BACKGROUND_COLOR, STYLEID_BACKGROUND_IMAGE, + STYLEID_BORDER, STYLEID_BORDER_LEFT, STYLEID_COLOR, STYLEID_DISPLAY, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 689020c1867..13364c0a5aa 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -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)