mshtml: Add style.borderCollapse property implementation.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Jacek Caban 2019-02-07 18:32:22 +01:00 committed by Alexandre Julliard
parent 83af47e602
commit 957a1f0216
3 changed files with 36 additions and 8 deletions

View File

@ -63,6 +63,8 @@ static const WCHAR border_bottom_styleW[] =
{'b','o','r','d','e','r','-','b','o','t','t','o','m','-','s','t','y','l','e',0};
static const WCHAR border_bottom_widthW[] =
{'b','o','r','d','e','r','-','b','o','t','t','o','m','-','w','i','d','t','h',0};
static const WCHAR border_collapseW[] =
{'b','o','r','d','e','r','-','c','o','l','l','a','p','s','e',0};
static const WCHAR border_colorW[] =
{'b','o','r','d','e','r','-','c','o','l','o','r',0};
static const WCHAR border_leftW[] =
@ -415,6 +417,11 @@ static const style_tbl_entry_t style_tbl[] = {
DISPID_IHTMLSTYLE_BORDERBOTTOMWIDTH,
ATTR_FIX_PX
},
{
border_collapseW,
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERCOLLAPSE,
DISPID_IHTMLSTYLE2_BORDERCOLLAPSE
},
{
border_colorW,
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERCOLOR,
@ -3629,15 +3636,19 @@ static HRESULT WINAPI HTMLStyle2_get_tableLayout(IHTMLStyle2 *iface, BSTR *p)
static HRESULT WINAPI HTMLStyle2_put_borderCollapse(IHTMLStyle2 *iface, BSTR v)
{
HTMLStyle *This = impl_from_IHTMLStyle2(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_COLLAPSE, v);
}
static HRESULT WINAPI HTMLStyle2_get_borderCollapse(IHTMLStyle2 *iface, BSTR *p)
{
HTMLStyle *This = impl_from_IHTMLStyle2(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_style_property(This, STYLEID_BORDER_COLLAPSE, p);
}
static HRESULT WINAPI HTMLStyle2_put_direction(IHTMLStyle2 *iface, BSTR v)
@ -6258,15 +6269,15 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_get_tableLayout(IHTMLCSSStyleDecla
static HRESULT WINAPI HTMLCSSStyleDeclaration_put_borderCollapse(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_COLLAPSE, v);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration_get_borderCollapse(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_COLLAPSE, p);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration_put_direction(IHTMLCSSStyleDeclaration *iface, BSTR v)

View File

@ -49,6 +49,7 @@ typedef enum {
STYLEID_BORDER_BOTTOM_COLOR,
STYLEID_BORDER_BOTTOM_STYLE,
STYLEID_BORDER_BOTTOM_WIDTH,
STYLEID_BORDER_COLLAPSE,
STYLEID_BORDER_COLOR,
STYLEID_BORDER_LEFT,
STYLEID_BORDER_LEFT_COLOR,

View File

@ -516,6 +516,22 @@ static void test_style2(IHTMLStyle2 *style2)
ok(hres == S_OK, "get_tableLayout failed: %08x\n", hres);
ok(!strcmp_wa(str, "fixed"), "tableLayout = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
/* borderCollapse */
str = (void*)0xdeadbeef;
hres = IHTMLStyle2_get_borderCollapse(style2, &str);
ok(hres == S_OK, "get_borderCollapse failed: %08x\n", hres);
ok(!str, "borderCollapse = %s\n", wine_dbgstr_w(str));
str = a2bstr("separate");
hres = IHTMLStyle2_put_borderCollapse(style2, str);
ok(hres == S_OK, "put_borderCollapse failed: %08x\n", hres);
SysFreeString(str);
hres = IHTMLStyle2_get_borderCollapse(style2, &str);
ok(hres == S_OK, "get_borderCollapse failed: %08x\n", hres);
ok(!strcmp_wa(str, "separate"), "borderCollapse = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
}
static void test_style3(IHTMLStyle3 *style3, IHTMLCSSStyleDeclaration *css_style)