Jacek Caban : mshtml: Added IHTMLWindow6:: onmessage property implementation.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Apr 5 11:07:32 CDT 2016
Module: wine
Branch: master
Commit: feed9d47504a11bd4b29286a12da21d0496a566d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=feed9d47504a11bd4b29286a12da21d0496a566d
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Apr 4 18:01:46 2016 +0200
mshtml: Added IHTMLWindow6::onmessage property implementation.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/htmlevent.c | 5 +++++
dlls/mshtml/htmlevent.h | 1 +
dlls/mshtml/htmlwindow.c | 12 ++++++++----
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index afacf71..2226278 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -102,6 +102,9 @@ static const WCHAR onkeyupW[] = {'o','n','k','e','y','u','p',0};
static const WCHAR loadW[] = {'l','o','a','d',0};
static const WCHAR onloadW[] = {'o','n','l','o','a','d',0};
+static const WCHAR messageW[] = {'m','e','s','s','a','g','e',0};
+static const WCHAR onmessageW[] = {'o','n','m','e','s','s','a','g','e',0};
+
static const WCHAR mousedownW[] = {'m','o','u','s','e','d','o','w','n',0};
static const WCHAR onmousedownW[] = {'o','n','m','o','u','s','e','d','o','w','n',0};
@@ -210,6 +213,8 @@ static const event_info_t event_info[] = {
EVENT_DEFAULTLISTENER|EVENT_BUBBLE},
{loadW, onloadW, EVENTT_HTML, DISPID_EVMETH_ONLOAD,
EVENT_BIND_TO_BODY},
+ {messageW, onmessageW, EVENTT_NONE, DISPID_EVMETH_ONMESSAGE,
+ EVENT_FORWARDBODY /* FIXME: remove when we get the target right */ },
{mousedownW, onmousedownW, EVENTT_MOUSE, DISPID_EVMETH_ONMOUSEDOWN,
EVENT_DEFAULTLISTENER|EVENT_BUBBLE|EVENT_CANCELABLE},
{mousemoveW, onmousemoveW, EVENTT_MOUSE, DISPID_EVMETH_ONMOUSEMOVE,
diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h
index 05c2b84..f723ef6 100644
--- a/dlls/mshtml/htmlevent.h
+++ b/dlls/mshtml/htmlevent.h
@@ -36,6 +36,7 @@ typedef enum {
EVENTID_KEYPRESS,
EVENTID_KEYUP,
EVENTID_LOAD,
+ EVENTID_MESSAGE,
EVENTID_MOUSEDOWN,
EVENTID_MOUSEMOVE,
EVENTID_MOUSEOUT,
diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index f203405..ec333bc 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -2148,15 +2148,19 @@ static HRESULT WINAPI HTMLWindow6_toStaticHTML(IHTMLWindow6 *iface, BSTR bstrHTM
static HRESULT WINAPI HTMLWindow6_put_onmessage(IHTMLWindow6 *iface, VARIANT v)
{
HTMLWindow *This = impl_from_IHTMLWindow6(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
+
+ return set_window_event(This, EVENTID_MESSAGE, &v);
}
static HRESULT WINAPI HTMLWindow6_get_onmessage(IHTMLWindow6 *iface, VARIANT *p)
{
HTMLWindow *This = impl_from_IHTMLWindow6(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return get_window_event(This, EVENTID_MESSAGE, p);
}
static HRESULT WINAPI HTMLWindow6_msWriteProfilerMark(IHTMLWindow6 *iface, BSTR bstrProfilerMark)
More information about the wine-cvs
mailing list