Commit 74a75967 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use inner window's event target for body element.

parent 8fba2bc6
......@@ -829,8 +829,8 @@ static event_target_t **HTMLBodyElement_get_event_target_ptr(HTMLDOMNode *iface)
{
HTMLBodyElement *This = impl_from_HTMLDOMNode(iface);
return This->textcont.element.node.doc
? &This->textcont.element.node.doc->body_event_target
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;
}
......
......@@ -4644,8 +4644,6 @@ static void HTMLDocumentNode_destructor(HTMLDOMNode *iface)
heap_free(This->elem_vars);
detach_events(This);
if(This->body_event_target)
release_event_target(This->body_event_target);
if(This->catmgr)
ICatInformation_Release(This->catmgr);
......
......@@ -253,6 +253,8 @@ static void release_inner_window(HTMLInnerWindow *This)
htmldoc_release(&This->doc->basedoc);
}
if(This->event_target.ptr)
release_event_target(This->event_target.ptr);
release_dispex(&This->event_target.dispex);
for(i=0; i < This->global_prop_cnt; i++)
......@@ -2943,7 +2945,7 @@ static HRESULT HTMLWindow_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD
static event_target_t **HTMLWindow_get_event_target_ptr(DispatchEx *dispex)
{
HTMLInnerWindow *This = impl_from_DispatchEx(dispex);
return &This->doc->body_event_target;
return &This->event_target.ptr;
}
static void HTMLWindow_bind_event(DispatchEx *dispex, int eid)
......
......@@ -801,7 +801,6 @@ struct HTMLDocumentNode {
nsIDOMHTMLDocument *nsdoc;
BOOL content_ready;
event_target_t *body_event_target;
IHTMLDOMImplementation *dom_implementation;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment