Gabriel Ivăncescu : mshtml: Implement HTMLDOMAttribute2's name property.

Alexandre Julliard julliard at winehq.org
Fri May 20 15:26:48 CDT 2022


Module: wine
Branch: master
Commit: 76f5875c9ff6179bff39c382b6075b216bce6326
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=76f5875c9ff6179bff39c382b6075b216bce6326

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Thu May 19 21:06:36 2022 +0300

mshtml: Implement HTMLDOMAttribute2's name property.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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)




More information about the wine-cvs mailing list