From 0f8ae7bc4545a16cd878447f95cf45e170566259 Mon Sep 17 00:00:00 2001 From: Zhenbo Li Date: Sat, 15 Mar 2014 11:23:10 +0800 Subject: [PATCH] mshtml: Added IHTMLTableRow::rowIndex property implementation. --- dlls/mshtml/htmltablerow.c | 11 +++++++++-- dlls/mshtml/tests/dom.c | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmltablerow.c b/dlls/mshtml/htmltablerow.c index 832cb6ce421..b475e7db1c8 100644 --- a/dlls/mshtml/htmltablerow.c +++ b/dlls/mshtml/htmltablerow.c @@ -226,8 +226,15 @@ static HRESULT WINAPI HTMLTableRow_get_borderColorDark(IHTMLTableRow *iface, VAR static HRESULT WINAPI HTMLTableRow_get_rowIndex(IHTMLTableRow *iface, LONG *p) { HTMLTableRow *This = impl_from_IHTMLTableRow(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + nsres = nsIDOMHTMLTableRowElement_GetRowIndex(This->nsrow, p); + if(NS_FAILED(nsres)) { + ERR("Get rowIndex failed: %08x\n", nsres); + return E_FAIL; + } + return S_OK; } static HRESULT WINAPI HTMLTableRow_get_selectionRowIndex(IHTMLTableRow *iface, LONG *p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 013a2a9a066..670f5c72a19 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -5577,6 +5577,7 @@ static void test_tr_elem(IHTMLElement *elem) IHTMLTableRow *row; HRESULT hres; BSTR bstr; + LONG lval; static const elem_type_t cell_types[] = {ET_TD,ET_TD}; @@ -5617,6 +5618,11 @@ static void test_tr_elem(IHTMLElement *elem) ok(!strcmp_wa(bstr, "top"), "get_valign returned %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); + lval = 0xdeadbeef; + hres = IHTMLTableRow_get_rowIndex(row, &lval); + ok(hres == S_OK, "get_rowIndex failed: %08x\n", hres); + ok(lval == 1, "get_rowIndex returned %d\n", lval); + IHTMLTableRow_Release(row); } -- 2.11.4.GIT