mshtml: Added IHTMLTableCell::colSpan property implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b1c7b89125
commit
e2a9d203cd
|
@ -135,15 +135,36 @@ static HRESULT WINAPI HTMLTableCell_get_rowSpan(IHTMLTableCell *iface, LONG *p)
|
||||||
static HRESULT WINAPI HTMLTableCell_put_colSpan(IHTMLTableCell *iface, LONG v)
|
static HRESULT WINAPI HTMLTableCell_put_colSpan(IHTMLTableCell *iface, LONG v)
|
||||||
{
|
{
|
||||||
HTMLTableCell *This = impl_from_IHTMLTableCell(iface);
|
HTMLTableCell *This = impl_from_IHTMLTableCell(iface);
|
||||||
FIXME("(%p)->(%d)\n", This, v);
|
nsresult nsres;
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("(%p)->(%d)\n", This, v);
|
||||||
|
|
||||||
|
if(v <= 0)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
nsres = nsIDOMHTMLTableCellElement_SetColSpan(This->nscell, v);
|
||||||
|
if(NS_FAILED(nsres)) {
|
||||||
|
ERR("SetColSpan failed: %08x\n", nsres);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLTableCell_get_colSpan(IHTMLTableCell *iface, LONG *p)
|
static HRESULT WINAPI HTMLTableCell_get_colSpan(IHTMLTableCell *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLTableCell *This = impl_from_IHTMLTableCell(iface);
|
HTMLTableCell *This = impl_from_IHTMLTableCell(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
nsresult nsres;
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
nsres = nsIDOMHTMLTableCellElement_GetColSpan(This->nscell, p);
|
||||||
|
if(NS_FAILED(nsres)) {
|
||||||
|
ERR("GetColSpan failed: %08x\n", nsres);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLTableCell_put_align(IHTMLTableCell *iface, BSTR v)
|
static HRESULT WINAPI HTMLTableCell_put_align(IHTMLTableCell *iface, BSTR v)
|
||||||
|
|
|
@ -7325,6 +7325,23 @@ static void test_td_elem(IHTMLDocument2 *doc, IHTMLElement *div)
|
||||||
ok(hres == S_OK, "get_rowSpan failed: %08x\n", hres);
|
ok(hres == S_OK, "get_rowSpan failed: %08x\n", hres);
|
||||||
ok(lval == 2, "rowSpan = %d\n", lval);
|
ok(lval == 2, "rowSpan = %d\n", lval);
|
||||||
|
|
||||||
|
hres = IHTMLTableCell_get_colSpan(cell, &lval);
|
||||||
|
ok(hres == S_OK, "get_rowSpan failed: %08x\n", hres);
|
||||||
|
ok(lval == 1, "rowSpan = %d\n", lval);
|
||||||
|
|
||||||
|
hres = IHTMLTableCell_put_colSpan(cell, -1);
|
||||||
|
ok(hres == E_INVALIDARG, "put_rowSpan failed: %08x\n", hres);
|
||||||
|
|
||||||
|
hres = IHTMLTableCell_put_colSpan(cell, 0);
|
||||||
|
ok(hres == E_INVALIDARG, "put_rowSpan failed: %08x\n", hres);
|
||||||
|
|
||||||
|
hres = IHTMLTableCell_put_colSpan(cell, 2);
|
||||||
|
ok(hres == S_OK, "put_rowSpan failed: %08x\n", hres);
|
||||||
|
|
||||||
|
hres = IHTMLTableCell_get_colSpan(cell, &lval);
|
||||||
|
ok(hres == S_OK, "get_rowSpan failed: %08x\n", hres);
|
||||||
|
ok(lval == 2, "rowSpan = %d\n", lval);
|
||||||
|
|
||||||
IHTMLTableCell_Release(cell);
|
IHTMLTableCell_Release(cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue