Jacek Caban : mstml: Add style.borderSpacing property implementation.
Alexandre Julliard
julliard at winehq.org
Fri Feb 8 16:16:28 CST 2019
Module: wine
Branch: master
Commit: 71750bd80dfef19e70cf1a7123f455b9c4b87af7
URL: https://source.winehq.org/git/wine.git/?a=commit;h=71750bd80dfef19e70cf1a7123f455b9c4b87af7
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Feb 8 16:38:28 2019 +0100
mstml: Add style.borderSpacing property implementation.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/htmlstyle.c | 35 +++++++++++++++++++++++------------
dlls/mshtml/htmlstyle.h | 1 +
dlls/mshtml/tests/style.c | 15 +++++++++++++++
3 files changed, 39 insertions(+), 12 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index d260db1..ea435d1 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -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};
static const WCHAR border_right_widthW[] =
{'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[] =
{'b','o','r','d','e','r','-','t','o','p',0};
static const WCHAR border_top_colorW[] =
@@ -476,6 +478,11 @@ static const style_tbl_entry_t style_tbl[] = {
ATTR_FIX_PX
},
{
+ border_spacingW,
+ DISPID_IHTMLCSSSTYLEDECLARATION_BORDERSPACING,
+ DISPID_IHTMLSTYLE6_BORDERSPACING
+ },
+ {
border_styleW,
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERSTYLE,
DISPID_IHTMLSTYLE_BORDERSTYLE
@@ -4938,18 +4945,22 @@ static HRESULT WINAPI HTMLStyle6_get_boxSizing(IHTMLStyle6 *iface, BSTR *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);
- 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);
- 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)
@@ -5062,8 +5073,8 @@ static const IHTMLStyle6Vtbl HTMLStyle6Vtbl = {
HTMLStyle6_get_outlineColor,
HTMLStyle6_put_boxSizing,
HTMLStyle6_get_boxSizing,
- HTMLStyle6_put_boxSpacing,
- HTMLStyle6_get_boxSpacing,
+ HTMLStyle6_put_borderSpacing,
+ HTMLStyle6_get_borderSpacing,
HTMLStyle6_put_orphans,
HTMLStyle6_get_orphans,
HTMLStyle6_put_windows,
@@ -7039,15 +7050,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_get_boxSizing(IHTMLCSSStyleDeclara
static HRESULT WINAPI HTMLCSSStyleDeclaration_put_borderSpacing(IHTMLCSSStyleDeclaration *iface, BSTR v)
{
HTMLStyle *This = impl_from_IHTMLCSSStyleDeclaration(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 HTMLCSSStyleDeclaration_get_borderSpacing(IHTMLCSSStyleDeclaration *iface, BSTR *p)
{
HTMLStyle *This = impl_from_IHTMLCSSStyleDeclaration(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 HTMLCSSStyleDeclaration_put_orphans(IHTMLCSSStyleDeclaration *iface, VARIANT v)
diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h
index 971a3dc..9908fc9 100644
--- a/dlls/mshtml/htmlstyle.h
+++ b/dlls/mshtml/htmlstyle.h
@@ -59,6 +59,7 @@ typedef enum {
STYLEID_BORDER_RIGHT_COLOR,
STYLEID_BORDER_RIGHT_STYLE,
STYLEID_BORDER_RIGHT_WIDTH,
+ STYLEID_BORDER_SPACING,
STYLEID_BORDER_STYLE,
STYLEID_BORDER_TOP,
STYLEID_BORDER_TOP_COLOR,
diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c
index 44e4c83..788b784 100644
--- a/dlls/mshtml/tests/style.c
+++ b/dlls/mshtml/tests/style.c
@@ -801,6 +801,21 @@ static void test_style6(IHTMLStyle6 *style)
ok(hres == S_OK, "get_boxSizing failed: %08x\n", hres);
ok(!strcmp_wa(str, "border-box"), "boxSizing = %s\n", wine_dbgstr_w(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)
More information about the wine-cvs
mailing list