Commit 71750bd8 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mstml: Add style.borderSpacing property implementation.

parent 25b10ea4
...@@ -83,6 +83,8 @@ static const WCHAR border_right_styleW[] = ...@@ -83,6 +83,8 @@ static const WCHAR border_right_styleW[] =
{'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0}; {'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0};
static const WCHAR border_right_widthW[] = static const WCHAR border_right_widthW[] =
{'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h',0}; {'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h',0};
static const WCHAR border_spacingW[] =
{'b','o','r','d','e','r','-','s','p','a','c','i','n','g',0};
static const WCHAR border_topW[] = static const WCHAR border_topW[] =
{'b','o','r','d','e','r','-','t','o','p',0}; {'b','o','r','d','e','r','-','t','o','p',0};
static const WCHAR border_top_colorW[] = static const WCHAR border_top_colorW[] =
...@@ -476,6 +478,11 @@ static const style_tbl_entry_t style_tbl[] = { ...@@ -476,6 +478,11 @@ static const style_tbl_entry_t style_tbl[] = {
ATTR_FIX_PX ATTR_FIX_PX
}, },
{ {
border_spacingW,
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERSPACING,
DISPID_IHTMLSTYLE6_BORDERSPACING
},
{
border_styleW, border_styleW,
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERSTYLE, DISPID_IHTMLCSSSTYLEDECLARATION_BORDERSTYLE,
DISPID_IHTMLSTYLE_BORDERSTYLE DISPID_IHTMLSTYLE_BORDERSTYLE
...@@ -4938,18 +4945,22 @@ static HRESULT WINAPI HTMLStyle6_get_boxSizing(IHTMLStyle6 *iface, BSTR *p) ...@@ -4938,18 +4945,22 @@ static HRESULT WINAPI HTMLStyle6_get_boxSizing(IHTMLStyle6 *iface, BSTR *p)
return get_style_property(This, STYLEID_BOX_SIZING, p); return get_style_property(This, STYLEID_BOX_SIZING, p);
} }
static HRESULT WINAPI HTMLStyle6_put_boxSpacing(IHTMLStyle6 *iface, BSTR v) static HRESULT WINAPI HTMLStyle6_put_borderSpacing(IHTMLStyle6 *iface, BSTR v)
{ {
HTMLStyle *This = impl_from_IHTMLStyle6(iface); HTMLStyle *This = impl_from_IHTMLStyle6(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL; TRACE("(%p)->(%s)\n", This, debugstr_w(v));
return set_style_property(This, STYLEID_BORDER_SPACING, v);
} }
static HRESULT WINAPI HTMLStyle6_get_boxSpacing(IHTMLStyle6 *iface, BSTR *p) static HRESULT WINAPI HTMLStyle6_get_borderSpacing(IHTMLStyle6 *iface, BSTR *p)
{ {
HTMLStyle *This = impl_from_IHTMLStyle6(iface); HTMLStyle *This = impl_from_IHTMLStyle6(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL; TRACE("(%p)->(%p)\n", This, p);
return get_style_property(This, STYLEID_BORDER_SPACING, p);
} }
static HRESULT WINAPI HTMLStyle6_put_orphans(IHTMLStyle6 *iface, VARIANT v) static HRESULT WINAPI HTMLStyle6_put_orphans(IHTMLStyle6 *iface, VARIANT v)
...@@ -5062,8 +5073,8 @@ static const IHTMLStyle6Vtbl HTMLStyle6Vtbl = { ...@@ -5062,8 +5073,8 @@ static const IHTMLStyle6Vtbl HTMLStyle6Vtbl = {
HTMLStyle6_get_outlineColor, HTMLStyle6_get_outlineColor,
HTMLStyle6_put_boxSizing, HTMLStyle6_put_boxSizing,
HTMLStyle6_get_boxSizing, HTMLStyle6_get_boxSizing,
HTMLStyle6_put_boxSpacing, HTMLStyle6_put_borderSpacing,
HTMLStyle6_get_boxSpacing, HTMLStyle6_get_borderSpacing,
HTMLStyle6_put_orphans, HTMLStyle6_put_orphans,
HTMLStyle6_get_orphans, HTMLStyle6_get_orphans,
HTMLStyle6_put_windows, HTMLStyle6_put_windows,
...@@ -7039,15 +7050,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_get_boxSizing(IHTMLCSSStyleDeclara ...@@ -7039,15 +7050,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_get_boxSizing(IHTMLCSSStyleDeclara
static HRESULT WINAPI HTMLCSSStyleDeclaration_put_borderSpacing(IHTMLCSSStyleDeclaration *iface, BSTR v) static HRESULT WINAPI HTMLCSSStyleDeclaration_put_borderSpacing(IHTMLCSSStyleDeclaration *iface, BSTR v)
{ {
HTMLStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface); HTMLStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v)); TRACE("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL; return set_style_property(This, STYLEID_BORDER_SPACING, v);
} }
static HRESULT WINAPI HTMLCSSStyleDeclaration_get_borderSpacing(IHTMLCSSStyleDeclaration *iface, BSTR *p) static HRESULT WINAPI HTMLCSSStyleDeclaration_get_borderSpacing(IHTMLCSSStyleDeclaration *iface, BSTR *p)
{ {
HTMLStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface); HTMLStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface);
FIXME("(%p)->(%p)\n", This, p); TRACE("(%p)->(%p)\n", This, p);
return E_NOTIMPL; return get_style_property(This, STYLEID_BORDER_SPACING, p);
} }
static HRESULT WINAPI HTMLCSSStyleDeclaration_put_orphans(IHTMLCSSStyleDeclaration *iface, VARIANT v) static HRESULT WINAPI HTMLCSSStyleDeclaration_put_orphans(IHTMLCSSStyleDeclaration *iface, VARIANT v)
......
...@@ -59,6 +59,7 @@ typedef enum { ...@@ -59,6 +59,7 @@ typedef enum {
STYLEID_BORDER_RIGHT_COLOR, STYLEID_BORDER_RIGHT_COLOR,
STYLEID_BORDER_RIGHT_STYLE, STYLEID_BORDER_RIGHT_STYLE,
STYLEID_BORDER_RIGHT_WIDTH, STYLEID_BORDER_RIGHT_WIDTH,
STYLEID_BORDER_SPACING,
STYLEID_BORDER_STYLE, STYLEID_BORDER_STYLE,
STYLEID_BORDER_TOP, STYLEID_BORDER_TOP,
STYLEID_BORDER_TOP_COLOR, STYLEID_BORDER_TOP_COLOR,
......
...@@ -801,6 +801,21 @@ static void test_style6(IHTMLStyle6 *style) ...@@ -801,6 +801,21 @@ static void test_style6(IHTMLStyle6 *style)
ok(hres == S_OK, "get_boxSizing failed: %08x\n", hres); ok(hres == S_OK, "get_boxSizing failed: %08x\n", hres);
ok(!strcmp_wa(str, "border-box"), "boxSizing = %s\n", wine_dbgstr_w(str)); ok(!strcmp_wa(str, "border-box"), "boxSizing = %s\n", wine_dbgstr_w(str));
SysFreeString(str); SysFreeString(str);
hres = IHTMLStyle6_get_borderSpacing(style, &str);
ok(hres == S_OK, "get_borderSpacing failed: %08x\n", hres);
ok(!str, "borderSpacing = %s\n", wine_dbgstr_w(str));
str = a2bstr("10px");
hres = IHTMLStyle6_put_borderSpacing(style, str);
ok(hres == S_OK, "put_borderSpacing failed: %08x\n", hres);
SysFreeString(str);
str = NULL;
hres = IHTMLStyle6_get_borderSpacing(style, &str);
ok(hres == S_OK, "get_borderSpacing failed: %08x\n", hres);
ok(!strcmp_wa(str, "10px"), "borderSpacing = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
} }
static void test_css_style_declaration(IHTMLCSSStyleDeclaration *css_style) static void test_css_style_declaration(IHTMLCSSStyleDeclaration *css_style)
......
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