mshtml: Added IHTMLFormElement::onsubmit implementation.

This commit is contained in:
Jacek Caban 2011-02-28 13:13:49 +01:00 committed by Alexandre Julliard
parent f3d40454a9
commit f4c4a94618
3 changed files with 16 additions and 5 deletions

View File

@ -107,6 +107,9 @@ static const WCHAR onresizeW[] = {'o','n','r','e','s','i','z','e',0};
static const WCHAR selectstartW[] = {'s','e','l','e','c','t','s','t','a','r','t',0}; static const WCHAR selectstartW[] = {'s','e','l','e','c','t','s','t','a','r','t',0};
static const WCHAR onselectstartW[] = {'o','n','s','e','l','e','c','t','s','t','a','r','t',0}; static const WCHAR onselectstartW[] = {'o','n','s','e','l','e','c','t','s','t','a','r','t',0};
static const WCHAR submitW[] = {'s','u','b','m','i','t',0};
static const WCHAR onsubmitW[] = {'o','n','s','u','b','m','i','t',0};
static const WCHAR HTMLEventsW[] = {'H','T','M','L','E','v','e','n','t','s',0}; static const WCHAR HTMLEventsW[] = {'H','T','M','L','E','v','e','n','t','s',0};
static const WCHAR KeyboardEventW[] = {'K','e','y','b','o','a','r','d','E','v','e','n','t',0}; static const WCHAR KeyboardEventW[] = {'K','e','y','b','o','a','r','d','E','v','e','n','t',0};
static const WCHAR MouseEventW[] = {'M','o','u','s','e','E','v','e','n','t',0}; static const WCHAR MouseEventW[] = {'M','o','u','s','e','E','v','e','n','t',0};
@ -180,7 +183,9 @@ static const event_info_t event_info[] = {
{resizeW, onresizeW, EVENTT_NONE, DISPID_EVMETH_ONRESIZE, {resizeW, onresizeW, EVENTT_NONE, DISPID_EVMETH_ONRESIZE,
EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, EVENT_DEFAULTLISTENER|EVENT_BUBBLE},
{selectstartW, onselectstartW, EVENTT_MOUSE, DISPID_EVMETH_ONSELECTSTART, {selectstartW, onselectstartW, EVENTT_MOUSE, DISPID_EVMETH_ONSELECTSTART,
0} 0},
{submitW, onsubmitW, EVENTT_HTML, DISPID_EVMETH_ONSUBMIT,
EVENT_DEFAULTLISTENER|EVENT_BUBBLE}
}; };
static const eventid_t node_handled_list[] = { EVENTID_LOAD }; static const eventid_t node_handled_list[] = { EVENTID_LOAD };

View File

@ -38,6 +38,7 @@ typedef enum {
EVENTID_READYSTATECHANGE, EVENTID_READYSTATECHANGE,
EVENTID_RESIZE, EVENTID_RESIZE,
EVENTID_SELECTSTART, EVENTID_SELECTSTART,
EVENTID_SUBMIT,
EVENTID_LAST EVENTID_LAST
} eventid_t; } eventid_t;

View File

@ -28,6 +28,7 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "mshtml_private.h" #include "mshtml_private.h"
#include "htmlevent.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml); WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
@ -323,15 +324,19 @@ static HRESULT WINAPI HTMLFormElement_get_name(IHTMLFormElement *iface, BSTR *p)
static HRESULT WINAPI HTMLFormElement_put_onsubmit(IHTMLFormElement *iface, VARIANT v) static HRESULT WINAPI HTMLFormElement_put_onsubmit(IHTMLFormElement *iface, VARIANT v)
{ {
HTMLFormElement *This = impl_from_IHTMLFormElement(iface); HTMLFormElement *This = impl_from_IHTMLFormElement(iface);
FIXME("(%p)->(v)\n", This);
return E_NOTIMPL; TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_node_event(&This->element.node, EVENTID_SUBMIT, &v);
} }
static HRESULT WINAPI HTMLFormElement_get_onsubmit(IHTMLFormElement *iface, VARIANT *p) static HRESULT WINAPI HTMLFormElement_get_onsubmit(IHTMLFormElement *iface, VARIANT *p)
{ {
HTMLFormElement *This = impl_from_IHTMLFormElement(iface); HTMLFormElement *This = impl_from_IHTMLFormElement(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL; TRACE("(%p)->(%p)\n", This, p);
return get_node_event(&This->element.node, EVENTID_SUBMIT, p);
} }
static HRESULT WINAPI HTMLFormElement_put_onreset(IHTMLFormElement *iface, VARIANT v) static HRESULT WINAPI HTMLFormElement_put_onreset(IHTMLFormElement *iface, VARIANT v)