mshtml: Pass the right 'this' argument to event handlers.

This commit is contained in:
Jacek Caban 2008-10-10 15:47:15 -05:00 committed by Alexandre Julliard
parent 28d918f581
commit 3d3574eba0
3 changed files with 5 additions and 5 deletions

View File

@ -296,7 +296,7 @@ static dispex_data_t *get_dispex_data(DispatchEx *This)
return This->data->data;
}
void call_disp_func(HTMLDocument *doc, IDispatch *disp)
void call_disp_func(HTMLDocument *doc, IDispatch *disp, IDispatch *this_obj)
{
DISPID named_arg = DISPID_THIS;
VARIANTARG arg;
@ -313,7 +313,7 @@ void call_disp_func(HTMLDocument *doc, IDispatch *disp)
}
V_VT(&arg) = VT_DISPATCH;
V_DISPATCH(&arg) = (IDispatch*)HTMLWINDOW2(doc->window);
V_DISPATCH(&arg) = this_obj;
VariantInit(&res);
memset(&ei, 0, sizeof(ei));

View File

@ -436,7 +436,7 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target)
event_obj = doc->window->event = create_event();
TRACE("%s >>>\n", debugstr_w(event_info[eid].name));
call_disp_func(doc, node->event_target->event_table[eid]);
call_disp_func(doc, node->event_target->event_table[eid], (IDispatch*)HTMLDOMNODE(node));
TRACE("%s <<<\n", debugstr_w(event_info[eid].name));
}
@ -462,7 +462,7 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target)
event_obj = doc->window->event = create_event();
TRACE("doc %s >>>\n", debugstr_w(event_info[eid].name));
call_disp_func(doc, doc->event_target->event_table[eid]);
call_disp_func(doc, doc->event_target->event_table[eid], (IDispatch*)HTMLDOC(doc));
TRACE("doc %s <<<\n", debugstr_w(event_info[eid].name));
}

View File

@ -655,7 +655,7 @@ HRESULT clear_task_timer(HTMLDocument*,BOOL,DWORD);
HRESULT get_typeinfo(tid_t,ITypeInfo**);
void release_typelib(void);
void call_disp_func(HTMLDocument*,IDispatch*);
void call_disp_func(HTMLDocument*,IDispatch*,IDispatch*);
const char *debugstr_variant(const VARIANT*);