Jacek Caban : mshtml: Added IDOMMouseEvent::initMouseEvent implementation.
Alexandre Julliard
julliard at winehq.org
Mon Feb 5 16:48:27 CST 2018
Module: wine
Branch: master
Commit: 05b0c8f72b1c1cf373bd370683996617e42229ce
URL: https://source.winehq.org/git/wine.git/?a=commit;h=05b0c8f72b1c1cf373bd370683996617e42229ce
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Feb 5 17:30:28 2018 +0100
mshtml: Added IDOMMouseEvent::initMouseEvent implementation.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/htmlevent.c | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index 2353d95..c037709 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -1418,10 +1418,35 @@ static HRESULT WINAPI DOMMouseEvent_initMouseEvent(IDOMMouseEvent *iface, BSTR t
IEventTarget *related_target)
{
DOMEvent *This = impl_from_IDOMMouseEvent(iface);
- FIXME("(%p)->(%s %x %x %p %d %d %d %d %d %x %x %x %x %u %p)\n", This, debugstr_w(type),
+ nsAString type_str;
+ nsresult nsres;
+ HRESULT hres;
+
+ TRACE("(%p)->(%s %x %x %p %d %d %d %d %d %x %x %x %x %u %p)\n", This, debugstr_w(type),
can_bubble, cancelable, view, detail, screen_x, screen_y, client_x, client_y,
ctrl_key, alt_key, shift_key, meta_key, button, related_target);
- return E_NOTIMPL;
+
+ if(This->target) {
+ TRACE("called on already dispatched event\n");
+ return S_OK;
+ }
+
+ hres = IDOMEvent_initEvent(&This->IDOMEvent_iface, type, can_bubble, cancelable);
+ if(FAILED(hres))
+ return hres;
+
+ nsAString_InitDepend(&type_str, type);
+ nsres = nsIDOMMouseEvent_InitMouseEvent(This->mouse_event, &type_str, can_bubble, cancelable,
+ NULL /* FIXME */, detail, screen_x, screen_y,
+ client_x, client_y, ctrl_key, alt_key, shift_key,
+ meta_key, button, NULL /* FIXME */);
+ nsAString_Finish(&type_str);
+ if(NS_FAILED(nsres)) {
+ FIXME("InitMouseEvent failed: %08x\n", nsres);
+ return E_FAIL;
+ }
+
+ return S_OK;
}
static HRESULT WINAPI DOMMouseEvent_getModifierState(IDOMMouseEvent *iface, BSTR key,
More information about the wine-cvs
mailing list