Commit 7442abde authored by Zhenbo Li's avatar Zhenbo Li Committed by Alexandre Julliard

mshtml: Added IHTMLTableRow::align property implementation.

parent 04e8b00a
...@@ -102,15 +102,34 @@ static HRESULT WINAPI HTMLTableRow_Invoke(IHTMLTableRow *iface, DISPID dispIdMem ...@@ -102,15 +102,34 @@ static HRESULT WINAPI HTMLTableRow_Invoke(IHTMLTableRow *iface, DISPID dispIdMem
static HRESULT WINAPI HTMLTableRow_put_align(IHTMLTableRow *iface, BSTR v) static HRESULT WINAPI HTMLTableRow_put_align(IHTMLTableRow *iface, BSTR v)
{ {
HTMLTableRow *This = impl_from_IHTMLTableRow(iface); HTMLTableRow *This = impl_from_IHTMLTableRow(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v)); nsAString val;
return E_NOTIMPL; nsresult nsres;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
nsAString_InitDepend(&val, v);
nsres = nsIDOMHTMLTableRowElement_SetAlign(This->nsrow, &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 HTMLTableRow_get_align(IHTMLTableRow *iface, BSTR *p) static HRESULT WINAPI HTMLTableRow_get_align(IHTMLTableRow *iface, BSTR *p)
{ {
HTMLTableRow *This = impl_from_IHTMLTableRow(iface); HTMLTableRow *This = impl_from_IHTMLTableRow(iface);
FIXME("(%p)->(%p)\n", This, p); nsAString val;
return E_NOTIMPL; nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
nsAString_Init(&val, NULL);
nsres = nsIDOMHTMLTableRowElement_GetAlign(This->nsrow, &val);
return return_nsstr(nsres, &val, p);
} }
static HRESULT WINAPI HTMLTableRow_put_vAlign(IHTMLTableRow *iface, BSTR v) static HRESULT WINAPI HTMLTableRow_put_vAlign(IHTMLTableRow *iface, BSTR v)
......
...@@ -5576,6 +5576,7 @@ static void test_tr_elem(IHTMLElement *elem) ...@@ -5576,6 +5576,7 @@ static void test_tr_elem(IHTMLElement *elem)
IHTMLElementCollection *col; IHTMLElementCollection *col;
IHTMLTableRow *row; IHTMLTableRow *row;
HRESULT hres; HRESULT hres;
BSTR bstr;
static const elem_type_t cell_types[] = {ET_TD,ET_TD}; static const elem_type_t cell_types[] = {ET_TD,ET_TD};
...@@ -5592,6 +5593,18 @@ static void test_tr_elem(IHTMLElement *elem) ...@@ -5592,6 +5593,18 @@ static void test_tr_elem(IHTMLElement *elem)
test_elem_collection((IUnknown*)col, cell_types, sizeof(cell_types)/sizeof(*cell_types)); test_elem_collection((IUnknown*)col, cell_types, sizeof(cell_types)/sizeof(*cell_types));
IHTMLElementCollection_Release(col); IHTMLElementCollection_Release(col);
bstr = a2bstr("left");
hres = IHTMLTableRow_put_align(row, bstr);
ok(hres == S_OK, "set_align failed: %08x\n", hres);
SysFreeString(bstr);
bstr = NULL;
hres = IHTMLTableRow_get_align(row, &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);
IHTMLTableRow_Release(row); IHTMLTableRow_Release(row);
} }
......
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