From 347842a6a1f3ad332789b00771d220c9ba475ab6 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 16 Dec 2014 13:10:29 +0100 Subject: [PATCH] mshtml: Added IHTMLElement4::focusin semi-stub implementation. --- dlls/mshtml/htmlelem.c | 12 ++++++++---- dlls/mshtml/htmlevent.c | 5 +++++ dlls/mshtml/htmlevent.h | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index f81ccee660..d6cb18fd51 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -3690,15 +3690,19 @@ static HRESULT WINAPI HTMLElement4_get_onbeforeactivate(IHTMLElement4 *iface, VA static HRESULT WINAPI HTMLElement4_put_onfocusin(IHTMLElement4 *iface, VARIANT v) { HTMLElement *This = impl_from_IHTMLElement4(iface); - FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); - return E_NOTIMPL; + + FIXME("(%p)->(%s) semi-stub\n", This, debugstr_variant(&v)); + + return set_node_event(&This->node, EVENTID_FOCUSIN, &v); } static HRESULT WINAPI HTMLElement4_get_onfocusin(IHTMLElement4 *iface, VARIANT *p) { 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_FOCUSIN, p); } static HRESULT WINAPI HTMLElement4_put_onfocusout(IHTMLElement4 *iface, VARIANT v) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 91e48d9729..e1ece61364 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -81,6 +81,9 @@ static const WCHAR onerrorW[] = {'o','n','e','r','r','o','r',0}; static const WCHAR focusW[] = {'f','o','c','u','s',0}; 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 onfocusinW[] = {'o','n','f','o','c','u','s','i','n',0}; + static const WCHAR helpW[] = {'h','e','l','p',0}; static const WCHAR onhelpW[] = {'o','n','h','e','l','p',0}; @@ -190,6 +193,8 @@ static const event_info_t event_info[] = { EVENT_BIND_TO_BODY}, {focusW, onfocusW, EVENTT_HTML, DISPID_EVMETH_ONFOCUS, EVENT_DEFAULTLISTENER}, + {focusinW, onfocusinW, EVENTT_HTML, DISPID_EVMETH_ONFOCUSIN, + EVENT_BUBBLE}, {helpW, onhelpW, EVENTT_KEY, DISPID_EVMETH_ONHELP, EVENT_BUBBLE|EVENT_CANCELABLE}, {keydownW, onkeydownW, EVENTT_KEY, DISPID_EVMETH_ONKEYDOWN, diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index bc8117180e..e312a9c8c1 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -29,6 +29,7 @@ typedef enum { EVENTID_DRAGSTART, EVENTID_ERROR, EVENTID_FOCUS, + EVENTID_FOCUSIN, EVENTID_HELP, EVENTID_KEYDOWN, EVENTID_KEYPRESS,