mshtml: Fixed getElementsByTagName for comment elements.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2017-09-14 14:15:13 +02:00 committed by Alexandre Julliard
parent 7020f47e0d
commit d3ed68aff9
2 changed files with 7 additions and 0 deletions

View file

@ -3101,6 +3101,11 @@ static HRESULT WINAPI HTMLElement2_getElementsByTagName(IHTMLElement2 *iface, BS
TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
if(!This->nselem) {
*pelColl = create_collection_from_htmlcol(This->node.doc, NULL);
return S_OK;
}
nsAString_InitDepend(&tag_str, v);
nsres = nsIDOMHTMLElement_GetElementsByTagName(This->nselem, &tag_str, &nscol);
nsAString_Finish(&tag_str);

View file

@ -9468,6 +9468,8 @@ static void test_create_elems(IHTMLDocument2 *doc)
test_comment_text((IUnknown*)node2, "<!--testing-->");
IHTMLDOMNode_Release(node2);
test_elem_getelembytag((IUnknown*)comment, ET_COMMENT, 0, NULL);
IHTMLDOMNode_Release(comment);
}