From 76f5875c9ff6179bff39c382b6075b216bce6326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= Date: Thu, 19 May 2022 21:06:36 +0300 Subject: [PATCH] mshtml: Implement HTMLDOMAttribute2's name property. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gabriel Ivăncescu Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/mshtml/htmlattr.c | 6 ++++-- dlls/mshtml/tests/dom.c | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c index 7365b9ea63f..82ded4d8a8e 100644 --- a/dlls/mshtml/htmlattr.c +++ b/dlls/mshtml/htmlattr.c @@ -285,8 +285,10 @@ static HRESULT WINAPI HTMLDOMAttribute2_Invoke(IHTMLDOMAttribute2 *iface, DISPID static HRESULT WINAPI HTMLDOMAttribute2_get_name(IHTMLDOMAttribute2 *iface, BSTR *p) { HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return IHTMLDOMAttribute_get_nodeName(&This->IHTMLDOMAttribute_iface, p); } static HRESULT WINAPI HTMLDOMAttribute2_put_value(IHTMLDOMAttribute2 *iface, BSTR v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 1b1e6771ec9..8f78c8da17f 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -3614,6 +3614,7 @@ static void test_dynamic_properties(IHTMLElement *elem) #define test_attr_node_name(a,b) _test_attr_node_name(__LINE__,a,b) static void _test_attr_node_name(unsigned line, IHTMLDOMAttribute *attr, const WCHAR *exname) { + IHTMLDOMAttribute2 *attr2 = _get_attr2_iface(line, (IUnknown*)attr); BSTR str; HRESULT hres; @@ -3621,6 +3622,13 @@ static void _test_attr_node_name(unsigned line, IHTMLDOMAttribute *attr, const W ok_(__FILE__,line)(hres == S_OK, "get_nodeName failed: %08lx\n", hres); ok_(__FILE__,line)(!lstrcmpW(str, exname), "node name is %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(exname)); SysFreeString(str); + + hres = IHTMLDOMAttribute2_get_name(attr2, &str); + ok_(__FILE__,line)(hres == S_OK, "get_name failed: %08lx\n", hres); + ok_(__FILE__,line)(!lstrcmpW(str, exname), "name is %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(exname)); + SysFreeString(str); + + IHTMLDOMAttribute2_Release(attr2); } #define test_attr_parent(a) _test_attr_parent(__LINE__,a)