Zhenbo Li : mshtml: Added IHTMLFormElement::reset method implementation.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jul 17 14:05:50 CDT 2014
Module: wine
Branch: master
Commit: d734935a2c8e1fba97b4848ba9939bfb7064efd3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d734935a2c8e1fba97b4848ba9939bfb7064efd3
Author: Zhenbo Li <litimetal at gmail.com>
Date: Thu Jul 17 23:48:36 2014 +0800
mshtml: Added IHTMLFormElement::reset method implementation.
---
dlls/mshtml/htmlform.c | 12 ++++++++++--
dlls/mshtml/tests/dom.c | 12 ++++++++++++
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlform.c b/dlls/mshtml/htmlform.c
index 6cbf1f6..86af350 100644
--- a/dlls/mshtml/htmlform.c
+++ b/dlls/mshtml/htmlform.c
@@ -436,8 +436,16 @@ static HRESULT WINAPI HTMLFormElement_submit(IHTMLFormElement *iface)
static HRESULT WINAPI HTMLFormElement_reset(IHTMLFormElement *iface)
{
HTMLFormElement *This = impl_from_IHTMLFormElement(iface);
- FIXME("(%p)->()\n", This);
- return E_NOTIMPL;
+ nsresult nsres;
+
+ TRACE("(%p)->()\n", This);
+ nsres = nsIDOMHTMLFormElement_Reset(This->nsform);
+ if (NS_FAILED(nsres)) {
+ ERR("Reset failed: %08x\n", nsres);
+ return E_FAIL;
+ }
+
+ return S_OK;
}
static HRESULT WINAPI HTMLFormElement_put_length(IHTMLFormElement *iface, LONG v)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 532bbfb..487c25c 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -3764,6 +3764,17 @@ static void _test_form_elements(unsigned line, IUnknown *unk)
IHTMLFormElement_Release(form);
}
+#define test_form_reset(a) _test_form_reset(__LINE__,a)
+static void _test_form_reset(unsigned line, IUnknown *unk)
+{
+ IHTMLFormElement *form = _get_form_iface(line, unk);
+ HRESULT hres;
+
+ hres = IHTMLFormElement_reset(form);
+ ok_(__FILE__,line)(hres == S_OK, "reset failed: %08x\n", hres);
+
+ IHTMLFormElement_Release(form);
+}
#define test_meta_name(a,b) _test_meta_name(__LINE__,a,b)
static void _test_meta_name(unsigned line, IUnknown *unk, const char *exname)
{
@@ -7330,6 +7341,7 @@ static void test_elems2(IHTMLDocument2 *doc)
test_form_put_encoding((IUnknown*)elem, E_INVALIDARG, "image/png");
test_form_encoding((IUnknown*)elem, "multipart/form-data");
test_form_elements((IUnknown*)elem);
+ test_form_reset((IUnknown*)elem);
IHTMLElement_Release(elem);
}
More information about the wine-cvs
mailing list