mshtml: Added IDOMEvent::initEvent implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2b37b97d0c
commit
30e2762b82
|
@ -218,7 +218,6 @@ static eventid_t str_to_eid(const WCHAR *str)
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR("unknown type %s\n", debugstr_w(str));
|
|
||||||
return EVENTID_LAST;
|
return EVENTID_LAST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1062,11 +1061,39 @@ static HRESULT WINAPI DOMEvent_get_type(IDOMEvent *iface, BSTR *p)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __i386__
|
||||||
|
#define nsIDOMEvent_InitEvent(_this,type,bubbles,cancelable) \
|
||||||
|
((void (WINAPI*)(void*,nsIDOMEvent*,const nsAString*,cpp_bool,cpp_bool)) \
|
||||||
|
&call_thiscall_func)((_this)->lpVtbl->InitEvent,_this,type,bubbles,cancelable)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static HRESULT WINAPI DOMEvent_initEvent(IDOMEvent *iface, BSTR type, VARIANT_BOOL can_bubble, VARIANT_BOOL cancelable)
|
static HRESULT WINAPI DOMEvent_initEvent(IDOMEvent *iface, BSTR type, VARIANT_BOOL can_bubble, VARIANT_BOOL cancelable)
|
||||||
{
|
{
|
||||||
DOMEvent *This = impl_from_IDOMEvent(iface);
|
DOMEvent *This = impl_from_IDOMEvent(iface);
|
||||||
FIXME("(%p)->()\n", This);
|
nsAString nsstr;
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("(%p)->(%s %x %x)\n", This, debugstr_w(type), can_bubble, cancelable);
|
||||||
|
|
||||||
|
if(This->target) {
|
||||||
|
TRACE("called on already dispatched event\n");
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
heap_free(This->type);
|
||||||
|
This->type = heap_strdupW(type);
|
||||||
|
if(!This->type)
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
|
This->event_id = str_to_eid(type);
|
||||||
|
|
||||||
|
This->bubbles = !!can_bubble;
|
||||||
|
This->cancelable = !!cancelable;
|
||||||
|
|
||||||
|
nsAString_InitDepend(&nsstr, type);
|
||||||
|
nsIDOMEvent_InitEvent(This->nsevent, &nsstr, This->bubbles, This->cancelable);
|
||||||
|
nsAString_Finish(&nsstr);
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI DOMEvent_preventDefault(IDOMEvent *iface)
|
static HRESULT WINAPI DOMEvent_preventDefault(IDOMEvent *iface)
|
||||||
|
|
|
@ -1341,6 +1341,10 @@ static inline VARIANT_BOOL variant_bool(BOOL b)
|
||||||
return b ? VARIANT_TRUE : VARIANT_FALSE;
|
return b ? VARIANT_TRUE : VARIANT_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __i386__
|
||||||
|
extern void *call_thiscall_func;
|
||||||
|
#endif
|
||||||
|
|
||||||
UINT cp_from_charset_string(BSTR) DECLSPEC_HIDDEN;
|
UINT cp_from_charset_string(BSTR) DECLSPEC_HIDDEN;
|
||||||
BSTR charset_string_from_cp(UINT) DECLSPEC_HIDDEN;
|
BSTR charset_string_from_cp(UINT) DECLSPEC_HIDDEN;
|
||||||
HDC get_display_dc(void) DECLSPEC_HIDDEN;
|
HDC get_display_dc(void) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -2200,7 +2200,6 @@ void NSContainer_Release(NSContainer *This)
|
||||||
* This will be removed after the next Gecko update, that will change calling convention on Gecko side.
|
* This will be removed after the next Gecko update, that will change calling convention on Gecko side.
|
||||||
*/
|
*/
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
extern void *call_thiscall_func;
|
|
||||||
__ASM_GLOBAL_FUNC(call_thiscall_func,
|
__ASM_GLOBAL_FUNC(call_thiscall_func,
|
||||||
"popl %eax\n\t"
|
"popl %eax\n\t"
|
||||||
"popl %edx\n\t"
|
"popl %edx\n\t"
|
||||||
|
|
Loading…
Reference in New Issue