Commit d3ed68af authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Fixed getElementsByTagName for comment elements.

parent 7020f47e
......@@ -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);
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment