Jacek Caban : mshtml: Fixed getElementsByTagName for comment elements.
Module: wine Branch: master Commit: d3ed68aff928bfad16280cb8adbc4ae8a21a4ff2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d3ed68aff928bfad16280cb8ad... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 14 14:15:13 2017 +0200 mshtml: Fixed getElementsByTagName for comment elements. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlelem.c | 5 +++++ dlls/mshtml/tests/dom.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 782a632..a87bdf0 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -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); diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index aca64c1..d7cfedd 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -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); }
participants (1)
-
Alexandre Julliard