Module: wine Branch: master Commit: f5a0252670e3d1687f2fafa5a3a6fd450b4e14c9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=f5a0252670e3d1687f2fafa5a...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Feb 6 00:09:09 2018 +0100
mshtml: Added IDOMUIEvent::initUIEvent implementation.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mshtml/htmlevent.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 88b9e85..b788b2e 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1219,8 +1219,31 @@ static HRESULT WINAPI DOMUIEvent_initUIEvent(IDOMUIEvent *iface, BSTR type, VARI VARIANT_BOOL cancelable, IHTMLWindow2 *view, LONG detail) { DOMEvent *This = impl_from_IDOMUIEvent(iface); - FIXME("(%p)->(%s %x %x %p %x)\n", This, debugstr_w(type), can_bubble, cancelable, view, detail); - return E_NOTIMPL; + nsAString type_str; + nsresult nsres; + HRESULT hres; + + TRACE("(%p)->(%s %x %x %p %x)\n", This, debugstr_w(type), can_bubble, cancelable, view, detail); + + 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 = nsIDOMUIEvent_InitUIEvent(This->ui_event, &type_str, can_bubble, cancelable, + NULL /* FIXME */, detail); + nsAString_Finish(&type_str); + if(NS_FAILED(nsres)) { + FIXME("InitUIEvent failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; }
static const IDOMUIEventVtbl DOMUIEventVtbl = {