Commit 90014d15 authored by Zhenbo Li's avatar Zhenbo Li Committed by Alexandre Julliard

mshtml: Added IHTMLStyle2::tableLayout property implementation.

parent 2b9cade4
...@@ -168,6 +168,8 @@ static const WCHAR attrPosition[] = ...@@ -168,6 +168,8 @@ static const WCHAR attrPosition[] =
{'p','o','s','i','t','i','o','n',0}; {'p','o','s','i','t','i','o','n',0};
static const WCHAR attrRight[] = static const WCHAR attrRight[] =
{'r','i','g','h','t',0}; {'r','i','g','h','t',0};
static const WCHAR attrTableLayout[] =
{'t','a','b','l','e','-','l','a','y','o','u','t',0};
static const WCHAR attrTextAlign[] = static const WCHAR attrTextAlign[] =
{'t','e','x','t','-','a','l','i','g','n',0}; {'t','e','x','t','-','a','l','i','g','n',0};
static const WCHAR attrTextDecoration[] = static const WCHAR attrTextDecoration[] =
...@@ -268,6 +270,7 @@ static const style_tbl_entry_t style_tbl[] = { ...@@ -268,6 +270,7 @@ static const style_tbl_entry_t style_tbl[] = {
{attrPageBreakBefore, DISPID_IHTMLSTYLE_PAGEBREAKBEFORE}, {attrPageBreakBefore, DISPID_IHTMLSTYLE_PAGEBREAKBEFORE},
{attrPosition, DISPID_IHTMLSTYLE2_POSITION}, {attrPosition, DISPID_IHTMLSTYLE2_POSITION},
{attrRight, DISPID_IHTMLSTYLE2_RIGHT}, {attrRight, DISPID_IHTMLSTYLE2_RIGHT},
{attrTableLayout, DISPID_IHTMLSTYLE2_TABLELAYOUT},
{attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN}, {attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN},
{attrTextDecoration, DISPID_IHTMLSTYLE_TEXTDECORATION}, {attrTextDecoration, DISPID_IHTMLSTYLE_TEXTDECORATION},
{attrTextIndent, DISPID_IHTMLSTYLE_TEXTINDENT}, {attrTextIndent, DISPID_IHTMLSTYLE_TEXTINDENT},
......
...@@ -99,6 +99,7 @@ typedef enum { ...@@ -99,6 +99,7 @@ typedef enum {
STYLEID_PAGE_BREAK_BEFORE, STYLEID_PAGE_BREAK_BEFORE,
STYLEID_POSITION, STYLEID_POSITION,
STYLEID_RIGHT, STYLEID_RIGHT,
STYLEID_TABLE_LAYOUT,
STYLEID_TEXT_ALIGN, STYLEID_TEXT_ALIGN,
STYLEID_TEXT_DECORATION, STYLEID_TEXT_DECORATION,
STYLEID_TEXT_INDENT, STYLEID_TEXT_INDENT,
......
...@@ -92,15 +92,19 @@ static HRESULT WINAPI HTMLStyle2_Invoke(IHTMLStyle2 *iface, DISPID dispIdMember, ...@@ -92,15 +92,19 @@ static HRESULT WINAPI HTMLStyle2_Invoke(IHTMLStyle2 *iface, DISPID dispIdMember,
static HRESULT WINAPI HTMLStyle2_put_tableLayout(IHTMLStyle2 *iface, BSTR v) static HRESULT WINAPI HTMLStyle2_put_tableLayout(IHTMLStyle2 *iface, BSTR v)
{ {
HTMLStyle *This = impl_from_IHTMLStyle2(iface); 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_nsstyle_attr(This->nsstyle, STYLEID_TABLE_LAYOUT, v, 0);
} }
static HRESULT WINAPI HTMLStyle2_get_tableLayout(IHTMLStyle2 *iface, BSTR *p) static HRESULT WINAPI HTMLStyle2_get_tableLayout(IHTMLStyle2 *iface, BSTR *p)
{ {
HTMLStyle *This = impl_from_IHTMLStyle2(iface); HTMLStyle *This = impl_from_IHTMLStyle2(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL; TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_TABLE_LAYOUT, p, 0);
} }
static HRESULT WINAPI HTMLStyle2_put_borderCollapse(IHTMLStyle2 *iface, BSTR v) static HRESULT WINAPI HTMLStyle2_put_borderCollapse(IHTMLStyle2 *iface, BSTR v)
......
...@@ -421,6 +421,18 @@ static void test_style2(IHTMLStyle2 *style2) ...@@ -421,6 +421,18 @@ static void test_style2(IHTMLStyle2 *style2)
hres = IHTMLStyle2_get_overflowY(style2, &str); hres = IHTMLStyle2_get_overflowY(style2, &str);
ok(hres == S_OK, "get_overflowY failed: %08x\n", hres); ok(hres == S_OK, "get_overflowY failed: %08x\n", hres);
ok(!strcmp_wa(str, "hidden"), "overflowX = %s\n", wine_dbgstr_w(str)); ok(!strcmp_wa(str, "hidden"), "overflowX = %s\n", wine_dbgstr_w(str));
/* tableLayout */
str = a2bstr("fixed");
hres = IHTMLStyle2_put_tableLayout(style2, str);
ok(hres == S_OK, "put_tableLayout failed: %08x\n", hres);
SysFreeString(str);
str = (void*)0xdeadbeef;
hres = IHTMLStyle2_get_tableLayout(style2, &str);
ok(hres == S_OK, "get_tableLayout failed: %08x\n", hres);
ok(!strcmp_wa(str, "fixed"), "tableLayout = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
} }
static void test_style3(IHTMLStyle3 *style3) static void test_style3(IHTMLStyle3 *style3)
......
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