mshtml: Implement IHTMLTable_get_tBodies.
This commit is contained in:
parent
8f985884ea
commit
f91c0356e7
|
@ -379,8 +379,21 @@ static HRESULT WINAPI HTMLTable_get_tFoot(IHTMLTable *iface, IHTMLTableSection *
|
|||
static HRESULT WINAPI HTMLTable_get_tBodies(IHTMLTable *iface, IHTMLElementCollection **p)
|
||||
{
|
||||
HTMLTable *This = impl_from_IHTMLTable(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
nsIDOMHTMLCollection *nscol = NULL;
|
||||
nsresult nsres;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
nsres = nsIDOMHTMLTableElement_GetTBodies(This->nstable, &nscol);
|
||||
if(NS_FAILED(nsres)) {
|
||||
ERR("GetTBodies failed: %08x\n", nsres);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
*p = create_collection_from_htmlcol(This->element.node.doc, nscol);
|
||||
|
||||
nsIDOMHTMLCollection_Release(nscol);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLTable_get_caption(IHTMLTable *iface, IHTMLTableCaption **p)
|
||||
|
|
|
@ -5466,6 +5466,7 @@ static void test_table_elem(IHTMLElement *elem)
|
|||
|
||||
static const elem_type_t row_types[] = {ET_TR,ET_TR};
|
||||
static const elem_type_t all_types[] = {ET_TBODY,ET_TR,ET_TR,ET_TD,ET_TD};
|
||||
static const elem_type_t tbodies_types[] = {ET_TBODY};
|
||||
|
||||
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLTable, (void**)&table);
|
||||
ok(hres == S_OK, "Could not get IHTMLTable iface: %08x\n", hres);
|
||||
|
@ -5475,7 +5476,7 @@ static void test_table_elem(IHTMLElement *elem)
|
|||
col = NULL;
|
||||
hres = IHTMLTable_get_rows(table, &col);
|
||||
ok(hres == S_OK, "get_rows failed: %08x\n", hres);
|
||||
ok(col != NULL, "get_ros returned NULL\n");
|
||||
ok(col != NULL, "get_rows returned NULL\n");
|
||||
|
||||
test_elem_collection((IUnknown*)col, row_types, sizeof(row_types)/sizeof(*row_types));
|
||||
IHTMLElementCollection_Release(col);
|
||||
|
@ -5492,6 +5493,14 @@ static void test_table_elem(IHTMLElement *elem)
|
|||
test_elem_all((IUnknown*)node, NULL, 0);
|
||||
IHTMLDOMNode_Release(node);
|
||||
|
||||
col = NULL;
|
||||
hres = IHTMLTable_get_tBodies(table, &col);
|
||||
ok(hres == S_OK, "get_tBodies failed: %08x\n", hres);
|
||||
ok(col != NULL, "get_tBodies returned NULL\n");
|
||||
|
||||
test_elem_collection((IUnknown*)col, tbodies_types, sizeof(tbodies_types)/sizeof(*tbodies_types));
|
||||
IHTMLElementCollection_Release(col);
|
||||
|
||||
IHTMLTable_Release(table);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue