Commit 86116b16 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added support for focusout event and IHTMLElement4::onfocusout property.

parent a86a4e65
...@@ -3875,15 +3875,19 @@ static HRESULT WINAPI HTMLElement4_get_onfocusin(IHTMLElement4 *iface, VARIANT * ...@@ -3875,15 +3875,19 @@ static HRESULT WINAPI HTMLElement4_get_onfocusin(IHTMLElement4 *iface, VARIANT *
static HRESULT WINAPI HTMLElement4_put_onfocusout(IHTMLElement4 *iface, VARIANT v) static HRESULT WINAPI HTMLElement4_put_onfocusout(IHTMLElement4 *iface, VARIANT v)
{ {
HTMLElement *This = impl_from_IHTMLElement4(iface); HTMLElement *This = impl_from_IHTMLElement4(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_FOCUSOUT, &v);
} }
static HRESULT WINAPI HTMLElement4_get_onfocusout(IHTMLElement4 *iface, VARIANT *p) static HRESULT WINAPI HTMLElement4_get_onfocusout(IHTMLElement4 *iface, VARIANT *p)
{ {
HTMLElement *This = impl_from_IHTMLElement4(iface); HTMLElement *This = impl_from_IHTMLElement4(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL; TRACE("(%p)->(%p)\n", This, p);
return get_node_event(&This->node, EVENTID_FOCUSOUT, p);
} }
static const IHTMLElement4Vtbl HTMLElement4Vtbl = { static const IHTMLElement4Vtbl HTMLElement4Vtbl = {
......
...@@ -84,6 +84,9 @@ static const WCHAR onfocusW[] = {'o','n','f','o','c','u','s',0}; ...@@ -84,6 +84,9 @@ static const WCHAR onfocusW[] = {'o','n','f','o','c','u','s',0};
static const WCHAR focusinW[] = {'f','o','c','u','s','i','n',0}; static const WCHAR focusinW[] = {'f','o','c','u','s','i','n',0};
static const WCHAR onfocusinW[] = {'o','n','f','o','c','u','s','i','n',0}; static const WCHAR onfocusinW[] = {'o','n','f','o','c','u','s','i','n',0};
static const WCHAR focusoutW[] = {'f','o','c','u','s','o','u','t',0};
static const WCHAR onfocusoutW[] = {'o','n','f','o','c','u','s','o','u','t',0};
static const WCHAR helpW[] = {'h','e','l','p',0}; static const WCHAR helpW[] = {'h','e','l','p',0};
static const WCHAR onhelpW[] = {'o','n','h','e','l','p',0}; static const WCHAR onhelpW[] = {'o','n','h','e','l','p',0};
...@@ -195,6 +198,8 @@ static const event_info_t event_info[] = { ...@@ -195,6 +198,8 @@ static const event_info_t event_info[] = {
EVENT_DEFAULTLISTENER}, EVENT_DEFAULTLISTENER},
{focusinW, onfocusinW, EVENTT_HTML, DISPID_EVMETH_ONFOCUSIN, {focusinW, onfocusinW, EVENTT_HTML, DISPID_EVMETH_ONFOCUSIN,
EVENT_BUBBLE}, EVENT_BUBBLE},
{focusoutW, onfocusoutW, EVENTT_HTML, DISPID_EVMETH_ONFOCUSOUT,
EVENT_BUBBLE},
{helpW, onhelpW, EVENTT_KEY, DISPID_EVMETH_ONHELP, {helpW, onhelpW, EVENTT_KEY, DISPID_EVMETH_ONHELP,
EVENT_BUBBLE|EVENT_CANCELABLE}, EVENT_BUBBLE|EVENT_CANCELABLE},
{keydownW, onkeydownW, EVENTT_KEY, DISPID_EVMETH_ONKEYDOWN, {keydownW, onkeydownW, EVENTT_KEY, DISPID_EVMETH_ONKEYDOWN,
...@@ -1336,6 +1341,10 @@ HRESULT ensure_doc_nsevent_handler(HTMLDocumentNode *doc, eventid_t eid) ...@@ -1336,6 +1341,10 @@ HRESULT ensure_doc_nsevent_handler(HTMLDocumentNode *doc, eventid_t eid)
doc->event_vector[eid] = TRUE; doc->event_vector[eid] = TRUE;
eid = EVENTID_FOCUS; eid = EVENTID_FOCUS;
break; break;
case EVENTID_FOCUSOUT:
doc->event_vector[eid] = TRUE;
eid = EVENTID_BLUR;
break;
default: default:
break; break;
} }
......
...@@ -30,6 +30,7 @@ typedef enum { ...@@ -30,6 +30,7 @@ typedef enum {
EVENTID_ERROR, EVENTID_ERROR,
EVENTID_FOCUS, EVENTID_FOCUS,
EVENTID_FOCUSIN, EVENTID_FOCUSIN,
EVENTID_FOCUSOUT,
EVENTID_HELP, EVENTID_HELP,
EVENTID_KEYDOWN, EVENTID_KEYDOWN,
EVENTID_KEYPRESS, EVENTID_KEYPRESS,
......
...@@ -343,6 +343,10 @@ static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent * ...@@ -343,6 +343,10 @@ static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent *
if(doc->event_vector[EVENTID_FOCUSIN]) if(doc->event_vector[EVENTID_FOCUSIN])
fire_event(doc, EVENTID_FOCUSIN, TRUE, node, NULL, NULL); fire_event(doc, EVENTID_FOCUSIN, TRUE, node, NULL, NULL);
break; break;
case EVENTID_BLUR:
if(doc->event_vector[EVENTID_FOCUSOUT])
fire_event(doc, EVENTID_FOCUSOUT, TRUE, node, NULL, NULL);
break;
default: default:
break; break;
} }
......
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