Commit 87a06268 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Traverse and unlink BodyElements using the dispex.

parent 20d8e72c
...@@ -906,20 +906,6 @@ static void *HTMLBodyElement_QI(HTMLDOMNode *iface, REFIID riid) ...@@ -906,20 +906,6 @@ static void *HTMLBodyElement_QI(HTMLDOMNode *iface, REFIID riid)
return HTMLElement_QI(&This->element.node, riid); return HTMLElement_QI(&This->element.node, riid);
} }
static void HTMLBodyElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
{
HTMLBodyElement *This = impl_from_HTMLDOMNode(iface);
if(This->nsbody)
note_cc_edge((nsISupports*)This->nsbody, "This->nsbody", cb);
}
static void HTMLBodyElement_unlink(HTMLDOMNode *iface)
{
HTMLBodyElement *This = impl_from_HTMLDOMNode(iface);
unlink_ref(&This->nsbody);
}
static EventTarget *HTMLBodyElement_get_event_prop_target(HTMLDOMNode *iface, int event_id) static EventTarget *HTMLBodyElement_get_event_prop_target(HTMLDOMNode *iface, int event_id)
{ {
HTMLBodyElement *This = impl_from_HTMLDOMNode(iface); HTMLBodyElement *This = impl_from_HTMLDOMNode(iface);
...@@ -953,6 +939,27 @@ static BOOL HTMLBodyElement_is_settable(HTMLDOMNode *iface, DISPID dispid) ...@@ -953,6 +939,27 @@ static BOOL HTMLBodyElement_is_settable(HTMLDOMNode *iface, DISPID dispid)
} }
} }
static inline HTMLBodyElement *impl_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, HTMLBodyElement, element.node.event_target.dispex);
}
static void HTMLBodyElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
{
HTMLBodyElement *This = impl_from_DispatchEx(dispex);
HTMLDOMNode_traverse(dispex, cb);
if(This->nsbody)
note_cc_edge((nsISupports*)This->nsbody, "nsbody", cb);
}
static void HTMLBodyElement_unlink(DispatchEx *dispex)
{
HTMLBodyElement *This = impl_from_DispatchEx(dispex);
HTMLDOMNode_unlink(dispex);
unlink_ref(&This->nsbody);
}
static const cpc_entry_t HTMLBodyElement_cpc[] = { static const cpc_entry_t HTMLBodyElement_cpc[] = {
{&DIID_HTMLTextContainerEvents}, {&DIID_HTMLTextContainerEvents},
{&IID_IPropertyNotifySink}, {&IID_IPropertyNotifySink},
...@@ -969,12 +976,19 @@ static const NodeImplVtbl HTMLBodyElementImplVtbl = { ...@@ -969,12 +976,19 @@ static const NodeImplVtbl HTMLBodyElementImplVtbl = {
.handle_event = HTMLElement_handle_event, .handle_event = HTMLElement_handle_event,
.get_attr_col = HTMLElement_get_attr_col, .get_attr_col = HTMLElement_get_attr_col,
.get_event_prop_target = HTMLBodyElement_get_event_prop_target, .get_event_prop_target = HTMLBodyElement_get_event_prop_target,
.traverse = HTMLBodyElement_traverse,
.unlink = HTMLBodyElement_unlink,
.is_text_edit = HTMLBodyElement_is_text_edit, .is_text_edit = HTMLBodyElement_is_text_edit,
.is_settable = HTMLBodyElement_is_settable .is_settable = HTMLBodyElement_is_settable
}; };
static const event_target_vtbl_t HTMLBodyElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.traverse = HTMLBodyElement_traverse,
.unlink = HTMLBodyElement_unlink
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES,
};
static const tid_t HTMLBodyElement_iface_tids[] = { static const tid_t HTMLBodyElement_iface_tids[] = {
IHTMLBodyElement_tid, IHTMLBodyElement_tid,
IHTMLBodyElement2_tid, IHTMLBodyElement2_tid,
...@@ -985,7 +999,7 @@ static const tid_t HTMLBodyElement_iface_tids[] = { ...@@ -985,7 +999,7 @@ static const tid_t HTMLBodyElement_iface_tids[] = {
static dispex_static_data_t HTMLBodyElement_dispex = { static dispex_static_data_t HTMLBodyElement_dispex = {
"HTMLBodyElement", "HTMLBodyElement",
&HTMLElement_event_target_vtbl.dispex_vtbl, &HTMLBodyElement_event_target_vtbl.dispex_vtbl,
DispHTMLBody_tid, DispHTMLBody_tid,
HTMLBodyElement_iface_tids, HTMLBodyElement_iface_tids,
HTMLElement_init_dispex_info HTMLElement_init_dispex_info
......
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