mshtml: Get rid of no loner needed document node reference in HTMLDOMChildrenCollection.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
69af9a4c9d
commit
a19caad9d0
@ -4306,7 +4306,7 @@ static HRESULT WINAPI DocumentSelector_querySelectorAll(IDocumentSelector *iface
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
*pel = create_child_collection(This->doc_node, node_list);
|
*pel = create_child_collection(node_list);
|
||||||
nsIDOMNodeList_Release(node_list);
|
nsIDOMNodeList_Release(node_list);
|
||||||
return *pel ? S_OK : E_OUTOFMEMORY;
|
return *pel ? S_OK : E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
@ -4964,7 +4964,7 @@ static HRESULT WINAPI ElementSelector_querySelectorAll(IElementSelector *iface,
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
*pel = create_child_collection(This->node.doc, node_list);
|
*pel = create_child_collection(node_list);
|
||||||
nsIDOMNodeList_Release(node_list);
|
nsIDOMNodeList_Release(node_list);
|
||||||
return *pel ? S_OK : E_OUTOFMEMORY;
|
return *pel ? S_OK : E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
@ -44,9 +44,6 @@ typedef struct {
|
|||||||
|
|
||||||
LONG ref;
|
LONG ref;
|
||||||
|
|
||||||
/* FIXME: implement weak reference */
|
|
||||||
HTMLDocumentNode *doc;
|
|
||||||
|
|
||||||
nsIDOMNodeList *nslist;
|
nsIDOMNodeList *nslist;
|
||||||
} HTMLDOMChildrenCollection;
|
} HTMLDOMChildrenCollection;
|
||||||
|
|
||||||
@ -244,7 +241,6 @@ static ULONG WINAPI HTMLDOMChildrenCollection_Release(IHTMLDOMChildrenCollection
|
|||||||
TRACE("(%p) ref=%d\n", This, ref);
|
TRACE("(%p) ref=%d\n", This, ref);
|
||||||
|
|
||||||
if(!ref) {
|
if(!ref) {
|
||||||
htmldoc_release(&This->doc->basedoc);
|
|
||||||
nsIDOMNodeList_Release(This->nslist);
|
nsIDOMNodeList_Release(This->nslist);
|
||||||
heap_free(This);
|
heap_free(This);
|
||||||
}
|
}
|
||||||
@ -440,7 +436,7 @@ static dispex_static_data_t HTMLDOMChildrenCollection_dispex = {
|
|||||||
HTMLDOMNode_init_dispex_info
|
HTMLDOMNode_init_dispex_info
|
||||||
};
|
};
|
||||||
|
|
||||||
IHTMLDOMChildrenCollection *create_child_collection(HTMLDocumentNode *doc, nsIDOMNodeList *nslist)
|
IHTMLDOMChildrenCollection *create_child_collection(nsIDOMNodeList *nslist)
|
||||||
{
|
{
|
||||||
HTMLDOMChildrenCollection *ret;
|
HTMLDOMChildrenCollection *ret;
|
||||||
|
|
||||||
@ -454,9 +450,6 @@ IHTMLDOMChildrenCollection *create_child_collection(HTMLDocumentNode *doc, nsIDO
|
|||||||
nsIDOMNodeList_AddRef(nslist);
|
nsIDOMNodeList_AddRef(nslist);
|
||||||
ret->nslist = nslist;
|
ret->nslist = nslist;
|
||||||
|
|
||||||
htmldoc_addref(&doc->basedoc);
|
|
||||||
ret->doc = doc;
|
|
||||||
|
|
||||||
init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLDOMChildrenCollection_iface,
|
init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLDOMChildrenCollection_iface,
|
||||||
&HTMLDOMChildrenCollection_dispex);
|
&HTMLDOMChildrenCollection_dispex);
|
||||||
|
|
||||||
@ -628,7 +621,7 @@ static HRESULT WINAPI HTMLDOMNode_get_childNodes(IHTMLDOMNode *iface, IDispatch
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
*p = (IDispatch*)create_child_collection(This->doc, nslist);
|
*p = (IDispatch*)create_child_collection(nslist);
|
||||||
nsIDOMNodeList_Release(nslist);
|
nsIDOMNodeList_Release(nslist);
|
||||||
|
|
||||||
return *p ? S_OK : E_OUTOFMEMORY;
|
return *p ? S_OK : E_OUTOFMEMORY;
|
||||||
|
@ -1089,7 +1089,7 @@ HRESULT wrap_iface(IUnknown*,IUnknown*,IUnknown**) DECLSPEC_HIDDEN;
|
|||||||
IHTMLElementCollection *create_all_collection(HTMLDOMNode*,BOOL) DECLSPEC_HIDDEN;
|
IHTMLElementCollection *create_all_collection(HTMLDOMNode*,BOOL) DECLSPEC_HIDDEN;
|
||||||
IHTMLElementCollection *create_collection_from_nodelist(HTMLDocumentNode*,nsIDOMNodeList*) DECLSPEC_HIDDEN;
|
IHTMLElementCollection *create_collection_from_nodelist(HTMLDocumentNode*,nsIDOMNodeList*) DECLSPEC_HIDDEN;
|
||||||
IHTMLElementCollection *create_collection_from_htmlcol(HTMLDocumentNode*,nsIDOMHTMLCollection*) DECLSPEC_HIDDEN;
|
IHTMLElementCollection *create_collection_from_htmlcol(HTMLDocumentNode*,nsIDOMHTMLCollection*) DECLSPEC_HIDDEN;
|
||||||
IHTMLDOMChildrenCollection *create_child_collection(HTMLDocumentNode*,nsIDOMNodeList*) DECLSPEC_HIDDEN;
|
IHTMLDOMChildrenCollection *create_child_collection(nsIDOMNodeList*) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
HRESULT attr_value_to_string(VARIANT*) DECLSPEC_HIDDEN;
|
HRESULT attr_value_to_string(VARIANT*) DECLSPEC_HIDDEN;
|
||||||
HRESULT get_elem_attr_value_by_dispid(HTMLElement*,DISPID,VARIANT*) DECLSPEC_HIDDEN;
|
HRESULT get_elem_attr_value_by_dispid(HTMLElement*,DISPID,VARIANT*) DECLSPEC_HIDDEN;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user