mshtml: Return event target as EventTarget in NodeImplVtbl.get_event_target.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2017-02-13 21:10:51 +01:00 committed by Alexandre Julliard
parent 74a759673d
commit e1d54def73
3 changed files with 10 additions and 9 deletions

View File

@ -825,13 +825,13 @@ static void HTMLBodyElement_unlink(HTMLDOMNode *iface)
}
}
static event_target_t **HTMLBodyElement_get_event_target_ptr(HTMLDOMNode *iface)
static EventTarget *HTMLBodyElement_get_event_target(HTMLDOMNode *iface)
{
HTMLBodyElement *This = impl_from_HTMLDOMNode(iface);
return This->textcont.element.node.doc && This->textcont.element.node.doc->window
? &This->textcont.element.node.doc->window->event_target.ptr
: &This->textcont.element.node.event_target.ptr;
? &This->textcont.element.node.doc->window->event_target
: &This->textcont.element.node.event_target;
}
static BOOL HTMLBodyElement_is_text_edit(HTMLDOMNode *iface)
@ -863,7 +863,7 @@ static const NodeImplVtbl HTMLBodyElementImplVtbl = {
HTMLElement_clone,
HTMLElement_handle_event,
HTMLElement_get_attr_col,
HTMLBodyElement_get_event_target_ptr,
HTMLBodyElement_get_event_target,
NULL,
NULL,
NULL,

View File

@ -5077,8 +5077,8 @@ static HRESULT HTMLElement_populate_props(DispatchEx *dispex)
static event_target_t **HTMLElement_get_event_target_ptr(DispatchEx *dispex)
{
HTMLElement *This = impl_from_DispatchEx(dispex);
return This->node.vtbl->get_event_target_ptr
? This->node.vtbl->get_event_target_ptr(&This->node)
return This->node.vtbl->get_event_target
? &This->node.vtbl->get_event_target(&This->node)->ptr
: &This->node.event_target.ptr;
}

View File

@ -73,6 +73,7 @@ typedef struct HTMLDOMNode HTMLDOMNode;
typedef struct ConnectionPoint ConnectionPoint;
typedef struct BSCallback BSCallback;
typedef struct event_target_t event_target_t;
typedef struct EventTarget EventTarget;
#define TID_LIST \
XIID(NULL) \
@ -363,10 +364,10 @@ typedef struct {
DISPID id;
} global_prop_t;
typedef struct {
struct EventTarget {
DispatchEx dispex;
event_target_t *ptr;
} EventTarget;
};
typedef struct {
DispatchEx dispex;
@ -695,7 +696,7 @@ typedef struct {
HRESULT (*clone)(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**);
HRESULT (*handle_event)(HTMLDOMNode*,DWORD,nsIDOMEvent*,BOOL*);
HRESULT (*get_attr_col)(HTMLDOMNode*,HTMLAttributeCollection**);
event_target_t **(*get_event_target_ptr)(HTMLDOMNode*);
EventTarget *(*get_event_target)(HTMLDOMNode*);
HRESULT (*fire_event)(HTMLDOMNode*,DWORD,BOOL*);
HRESULT (*put_disabled)(HTMLDOMNode*,VARIANT_BOOL);
HRESULT (*get_disabled)(HTMLDOMNode*,VARIANT_BOOL*);