Commit 06c66876 authored by Zhenbo Li's avatar Zhenbo Li Committed by Alexandre Julliard

mshtml: Added IHTMLTableCell::align property implementation.

parent 03b377f3
......@@ -128,15 +128,33 @@ static HRESULT WINAPI HTMLTableCell_get_colSpan(IHTMLTableCell *iface, LONG *p)
static HRESULT WINAPI HTMLTableCell_put_align(IHTMLTableCell *iface, BSTR v)
{
HTMLTableCell *This = impl_from_IHTMLTableCell(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
nsAString str;
nsresult nsres;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
nsAString_InitDepend(&str, v);
nsres = nsIDOMHTMLTableCellElement_SetAlign(This->nscell, &str);
nsAString_Finish(&str);
if (NS_FAILED(nsres)) {
ERR("Set Align failed: %08x\n", nsres);
return E_FAIL;
}
return S_OK;
}
static HRESULT WINAPI HTMLTableCell_get_align(IHTMLTableCell *iface, BSTR *p)
{
HTMLTableCell *This = impl_from_IHTMLTableCell(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
nsAString str;
nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
nsAString_Init(&str, NULL);
nsres = nsIDOMHTMLTableCellElement_GetAlign(This->nscell, &str);
return return_nsstr(nsres, &str, p);
}
static HRESULT WINAPI HTMLTableCell_put_vAlign(IHTMLTableCell *iface, BSTR v)
......
......@@ -5940,6 +5940,7 @@ static void test_td_elem(IHTMLElement *elem)
IHTMLTableCell *cell;
HRESULT hres;
LONG lval;
BSTR str;
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLTableCell, (void**)&cell);
ok(hres == S_OK, "Could not get IHTMLTableRow iface: %08x\n", hres);
......@@ -5951,6 +5952,20 @@ static void test_td_elem(IHTMLElement *elem)
ok(hres == S_OK, "get cellIndex failed: %08x\n", hres);
ok(lval == 1, "Expected 1, got %d\n", lval);
str = a2bstr("left");
hres = IHTMLTableCell_put_align(cell, str);
ok(hres == S_OK, "put_align failed: %08x\n", hres);
SysFreeString(str);
str = NULL;
hres = IHTMLTableCell_get_align(cell, &str);
ok(hres == S_OK, "get_align failed: %08x\n", hres);
ok(str != NULL, "str is NULL\n");
if (str != NULL && hres == S_OK) {
ok(!strcmp_wa(str, "left"), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
}
IHTMLTableCell_Release(cell);
}
......
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