Commit a57d87d2 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Don't share nslink reference with nsnode.

parent 316417cc
...@@ -1255,7 +1255,6 @@ static HRESULT HTMLInputElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOO ...@@ -1255,7 +1255,6 @@ static HRESULT HTMLInputElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOO
return IHTMLInputElement_get_disabled(&This->IHTMLInputElement_iface, p); return IHTMLInputElement_get_disabled(&This->IHTMLInputElement_iface, p);
} }
static void HTMLInputElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb) static void HTMLInputElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
{ {
HTMLInputElement *This = impl_from_HTMLDOMNode(iface); HTMLInputElement *This = impl_from_HTMLDOMNode(iface);
......
...@@ -397,6 +397,25 @@ static HRESULT HTMLLinkElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL ...@@ -397,6 +397,25 @@ static HRESULT HTMLLinkElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL
return IHTMLLinkElement_get_disabled(&This->IHTMLLinkElement_iface, p); return IHTMLLinkElement_get_disabled(&This->IHTMLLinkElement_iface, p);
} }
static void HTMLLinkElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
{
HTMLLinkElement *This = impl_from_HTMLDOMNode(iface);
if(This->nslink)
note_cc_edge((nsISupports*)This->nslink, "This->nslink", cb);
}
static void HTMLLinkElement_unlink(HTMLDOMNode *iface)
{
HTMLLinkElement *This = impl_from_HTMLDOMNode(iface);
if(This->nslink) {
nsIDOMHTMLLinkElement *nslink = This->nslink;
This->nslink = NULL;
nsIDOMHTMLLinkElement_Release(nslink);
}
}
static const NodeImplVtbl HTMLLinkElementImplVtbl = { static const NodeImplVtbl HTMLLinkElementImplVtbl = {
HTMLLinkElement_QI, HTMLLinkElement_QI,
HTMLElement_destructor, HTMLElement_destructor,
...@@ -408,6 +427,13 @@ static const NodeImplVtbl HTMLLinkElementImplVtbl = { ...@@ -408,6 +427,13 @@ static const NodeImplVtbl HTMLLinkElementImplVtbl = {
NULL, NULL,
HTMLLinkElementImpl_put_disabled, HTMLLinkElementImpl_put_disabled,
HTMLLinkElementImpl_get_disabled, HTMLLinkElementImpl_get_disabled,
NULL,
NULL,
NULL,
NULL,
NULL,
HTMLLinkElement_traverse,
HTMLLinkElement_unlink
}; };
static const tid_t HTMLLinkElement_iface_tids[] = { static const tid_t HTMLLinkElement_iface_tids[] = {
...@@ -437,10 +463,7 @@ HRESULT HTMLLinkElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, ...@@ -437,10 +463,7 @@ HRESULT HTMLLinkElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem,
HTMLElement_Init(&ret->element, doc, nselem, &HTMLLinkElement_dispex); HTMLElement_Init(&ret->element, doc, nselem, &HTMLLinkElement_dispex);
nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLLinkElement, (void**)&ret->nslink); nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLLinkElement, (void**)&ret->nslink);
assert(nsres == NS_OK);
/* Share nslink reference with nsnode */
assert(nsres == NS_OK && (nsIDOMNode*)ret->nslink == ret->element.node.nsnode);
nsIDOMNode_Release(ret->element.node.nsnode);
*elem = &ret->element; *elem = &ret->element;
return S_OK; return S_OK;
......
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