From d2607433e08cbee63329bcac7c633bfa8a9403fc Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 13 Sep 2017 13:17:30 +0200 Subject: [PATCH] mshtml: Forward IHTMLElement6::get_nodeName to IHTMLDOMNode implementation. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/mshtml/htmlelem.c | 6 ++++-- dlls/mshtml/tests/dom.c | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 247948caf39..59484e7756a 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -4099,8 +4099,10 @@ static HRESULT WINAPI HTMLElement6_get_tagName(IHTMLElement6 *iface, BSTR *p) static HRESULT WINAPI HTMLElement6_get_nodeName(IHTMLElement6 *iface, BSTR *p) { HTMLElement *This = impl_from_IHTMLElement6(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return IHTMLDOMNode_get_nodeName(&This->node.IHTMLDOMNode_iface, p); } static HRESULT WINAPI HTMLElement6_getElementsByClassName(IHTMLElement6 *iface, BSTR v, IHTMLElementCollection **pel) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index a3a3bfe189e..cd006e2796c 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -1091,15 +1091,26 @@ static IHTMLDOMAttribute2 *_get_attr2_iface(unsigned line, IUnknown *unk) static void _test_node_name(unsigned line, IUnknown *unk, const char *exname) { IHTMLDOMNode *node = _get_node_iface(line, unk); + IHTMLElement6 *elem; BSTR name; HRESULT hres; hres = IHTMLDOMNode_get_nodeName(node, &name); - IHTMLDOMNode_Release(node); ok_(__FILE__, line) (hres == S_OK, "get_nodeName failed: %08x\n", hres); ok_(__FILE__, line) (!strcmp_wa(name, exname), "got name: %s, expected %s\n", wine_dbgstr_w(name), exname); - SysFreeString(name); + + hres = IHTMLDOMNode_QueryInterface(node, &IID_IHTMLElement6, (void**)&elem); + if(SUCCEEDED(hres)) { + hres = IHTMLElement6_get_nodeName(elem, &name); + ok_(__FILE__, line) (hres == S_OK, "(elem) get_nodeName failed: %08x\n", hres); + ok_(__FILE__, line) (!strcmp_wa(name, exname), "(elem) got name: %s, expected %s\n", + wine_dbgstr_w(name), exname); + SysFreeString(name); + IHTMLElement6_Release(elem); + } + + IHTMLDOMNode_Release(node); } #define get_owner_doc(u) _get_owner_doc(__LINE__,u)