Commit 911adfbb authored by Zhenbo Li's avatar Zhenbo Li Committed by Alexandre Julliard

mshtml: Added IHTMLTable::align property implementation.

parent 8c601611
......@@ -302,15 +302,34 @@ static HRESULT WINAPI HTMLTable_get_borderColorDark(IHTMLTable *iface, VARIANT *
static HRESULT WINAPI HTMLTable_put_align(IHTMLTable *iface, BSTR v)
{
HTMLTable *This = impl_from_IHTMLTable(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
nsAString val;
nsresult nsres;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
nsAString_InitDepend(&val, v);
nsres = nsIDOMHTMLTableElement_SetAlign(This->nstable, &val);
nsAString_Finish(&val);
if (NS_FAILED(nsres)){
ERR("Set Align(%s) failed!\n", debugstr_w(v));
return E_FAIL;
}
return S_OK;
}
static HRESULT WINAPI HTMLTable_get_align(IHTMLTable *iface, BSTR *p)
{
HTMLTable *This = impl_from_IHTMLTable(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
nsAString val;
nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
nsAString_Init(&val, NULL);
nsres = nsIDOMHTMLTableElement_GetAlign(This->nstable, &val);
return return_nsstr(nsres, &val, p);
}
static HRESULT WINAPI HTMLTable_refresh(IHTMLTable *iface)
......
......@@ -5693,6 +5693,7 @@ static void test_table_elem(IHTMLElement *elem)
IHTMLDOMNode *node;
VARIANT v;
HRESULT hres;
BSTR bstr;
static const elem_type_t row_types[] = {ET_TR,ET_TR};
static const elem_type_t all_types[] = {ET_TBODY,ET_TR,ET_TR,ET_TD,ET_TD};
......@@ -5746,6 +5747,18 @@ static void test_table_elem(IHTMLElement *elem)
test_table_cell_spacing(table, "11");
VariantClear(&v);
bstr = a2bstr("left");
hres = IHTMLTable_put_align(table, bstr);
ok(hres == S_OK, "set_align failed: %08x\n", hres);
SysFreeString(bstr);
bstr = NULL;
hres = IHTMLTable_get_align(table, &bstr);
ok(hres == S_OK, "get_align failed: %08x\n", hres);
ok(bstr != NULL, "get_align returned NULL\n");
ok(!strcmp_wa(bstr, "left"), "get_align returned %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr);
IHTMLTable_Release(table);
}
......
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