From: Zhenbo Li Subject: [1/3] mshtml: Added IHTMLTable::insertRow method implementation. Message-Id: <53D76343.5050205@gmail.com> Date: Tue, 29 Jul 2014 17:02:59 +0800 --- dlls/mshtml/htmltable.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmltable.c b/dlls/mshtml/htmltable.c index e7991da..f3e947b 100644 --- a/dlls/mshtml/htmltable.c +++ b/dlls/mshtml/htmltable.c @@ -622,8 +622,27 @@ static HRESULT WINAPI HTMLTable_deleteCaption(IHTMLTable *iface) static HRESULT WINAPI HTMLTable_insertRow(IHTMLTable *iface, LONG index, IDispatch **row) { HTMLTable *This = impl_from_IHTMLTable(iface); - FIXME("(%p)->(%d %p)\n", This, index, row); - return E_NOTIMPL; + nsIDOMHTMLElement *nselem; + HTMLElement *elem; + nsresult nsres; + HRESULT hres; + + TRACE("(%p)->(%d %p)\n", This, index, row); + nsres = nsIDOMHTMLTableElement_InsertRow(This->nstable, index, &nselem); + if(NS_FAILED(nsres)) { + ERR("Insert Row at %d failed: %08x\n", index, nsres); + return E_FAIL; + } + + hres = HTMLTableRow_Create(This->element.node.doc, nselem, &elem); + nsIDOMHTMLElement_Release(nselem); + if (FAILED(hres)) { + ERR("Create TableRow failed: %08x\n", hres); + return hres; + } + + *row = (IDispatch *)&elem->IHTMLElement_iface; + return S_OK; } static HRESULT WINAPI HTMLTable_deleteRow(IHTMLTable *iface, LONG index)