Commit 6f3f291c authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Support input event.

parent 5a90acf5
......@@ -3710,15 +3710,19 @@ static HRESULT WINAPI HTMLDocument7_get_onfocus(IHTMLDocument7 *iface, VARIANT *
static HRESULT WINAPI HTMLDocument7_put_oninput(IHTMLDocument7 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument7(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_doc_event(This, EVENTID_INPUT, &v);
}
static HRESULT WINAPI HTMLDocument7_get_oninput(IHTMLDocument7 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument7(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_INPUT, p);
}
static HRESULT WINAPI HTMLDocument7_put_onload(IHTMLDocument7 *iface, VARIANT v)
......
......@@ -4402,15 +4402,19 @@ static HRESULT WINAPI HTMLElement6_get_onerror(IHTMLElement6 *iface, VARIANT *p)
static HRESULT WINAPI HTMLElement6_put_oninput(IHTMLElement6 *iface, VARIANT v)
{
HTMLElement *This = impl_from_IHTMLElement6(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_node_event(&This->node, EVENTID_INPUT, &v);
}
static HRESULT WINAPI HTMLElement6_get_oninput(IHTMLElement6 *iface, VARIANT *p)
{
HTMLElement *This = impl_from_IHTMLElement6(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_node_event(&This->node, EVENTID_INPUT, p);
}
static HRESULT WINAPI HTMLElement6_put_onload(IHTMLElement6 *iface, VARIANT v)
......
......@@ -76,6 +76,7 @@ static const WCHAR focusW[] = {'f','o','c','u','s',0};
static const WCHAR focusinW[] = {'f','o','c','u','s','i','n',0};
static const WCHAR focusoutW[] = {'f','o','c','u','s','o','u','t',0};
static const WCHAR helpW[] = {'h','e','l','p',0};
static const WCHAR inputW[] = {'i','n','p','u','t',0};
static const WCHAR keydownW[] = {'k','e','y','d','o','w','n',0};
static const WCHAR keypressW[] = {'k','e','y','p','r','e','s','s',0};
static const WCHAR keyupW[] = {'k','e','y','u','p',0};
......@@ -183,6 +184,8 @@ static const event_info_t event_info[] = {
EVENT_BUBBLES},
{helpW, EVENT_TYPE_EVENT, DISPID_EVMETH_ONHELP,
EVENT_BUBBLES | EVENT_CANCELABLE},
{inputW, EVENT_TYPE_EVENT, DISPID_UNKNOWN,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES},
{keydownW, EVENT_TYPE_KEYBOARD, DISPID_EVMETH_ONKEYDOWN,
EVENT_DEFAULTLISTENER | EVENT_HASDEFAULTHANDLERS | EVENT_BUBBLES | EVENT_CANCELABLE },
{keypressW, EVENT_TYPE_KEYBOARD, DISPID_EVMETH_ONKEYPRESS,
......@@ -2270,7 +2273,7 @@ static BOOL is_cp_event(cp_static_data_t *data, DISPID dispid)
int min, max, i;
HRESULT hres;
if(!data)
if(!data || dispid == DISPID_UNKNOWN)
return FALSE;
if(!data->ids) {
......
......@@ -34,6 +34,7 @@ typedef enum {
EVENTID_FOCUSIN,
EVENTID_FOCUSOUT,
EVENTID_HELP,
EVENTID_INPUT,
EVENTID_KEYDOWN,
EVENTID_KEYPRESS,
EVENTID_KEYUP,
......
......@@ -2450,7 +2450,7 @@ HTMLWINDOW7_ONEVENT_PROPERTY_STUB(drop)
HTMLWINDOW7_ONEVENT_PROPERTY_STUB(durationchange)
HTMLWINDOW7_ONEVENT_PROPERTY_IMPL(focusin, EVENTID_FOCUSIN)
HTMLWINDOW7_ONEVENT_PROPERTY_IMPL(focusout, EVENTID_FOCUSOUT)
HTMLWINDOW7_ONEVENT_PROPERTY_STUB(input)
HTMLWINDOW7_ONEVENT_PROPERTY_IMPL(input, EVENTID_INPUT)
HTMLWINDOW7_ONEVENT_PROPERTY_STUB(emptied)
HTMLWINDOW7_ONEVENT_PROPERTY_STUB(ended)
HTMLWINDOW7_ONEVENT_PROPERTY_IMPL(keydown, EVENTID_KEYDOWN)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment