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

mshtml: Traverse and unlink StyleElements using the dispex.

parent d66560c9
......@@ -389,17 +389,24 @@ static void HTMLStyleElement_destructor(HTMLDOMNode *iface)
HTMLElement_destructor(iface);
}
static void HTMLStyleElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
static inline HTMLStyleElement *impl_from_DispatchEx(DispatchEx *iface)
{
HTMLStyleElement *This = impl_from_HTMLDOMNode(iface);
return CONTAINING_RECORD(iface, HTMLStyleElement, element.node.event_target.dispex);
}
static void HTMLStyleElement_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback *cb)
{
HTMLStyleElement *This = impl_from_DispatchEx(dispex);
HTMLDOMNode_traverse(dispex, cb);
if(This->nsstyle)
note_cc_edge((nsISupports*)This->nsstyle, "This->nsstyle", cb);
note_cc_edge((nsISupports*)This->nsstyle, "nsstyle", cb);
}
static void HTMLStyleElement_unlink(HTMLDOMNode *iface)
static void HTMLStyleElement_unlink(DispatchEx *dispex)
{
HTMLStyleElement *This = impl_from_HTMLDOMNode(iface);
HTMLStyleElement *This = impl_from_DispatchEx(dispex);
HTMLDOMNode_unlink(dispex);
unlink_ref(&This->nsstyle);
}
......@@ -428,8 +435,15 @@ static const NodeImplVtbl HTMLStyleElementImplVtbl = {
.clone = HTMLElement_clone,
.handle_event = HTMLElement_handle_event,
.get_attr_col = HTMLElement_get_attr_col,
.traverse = HTMLStyleElement_traverse,
.unlink = HTMLStyleElement_unlink
};
static const event_target_vtbl_t HTMLStyleElement_event_target_vtbl = {
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES,
.traverse = HTMLStyleElement_traverse,
.unlink = HTMLStyleElement_unlink
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES,
};
static const tid_t HTMLStyleElement_iface_tids[] = {
......@@ -438,7 +452,7 @@ static const tid_t HTMLStyleElement_iface_tids[] = {
};
static dispex_static_data_t HTMLStyleElement_dispex = {
"HTMLStyleElement",
&HTMLElement_event_target_vtbl.dispex_vtbl,
&HTMLStyleElement_event_target_vtbl.dispex_vtbl,
DispHTMLStyleElement_tid,
HTMLStyleElement_iface_tids,
HTMLStyleElement_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