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

mshtml: Get rid of no longer needed document argument from…

mshtml: Get rid of no longer needed document argument from create_collection_from_nodelist and create_collection_from_htmlcol. Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 567f911f
......@@ -354,7 +354,7 @@ static HRESULT WINAPI HTMLDocument_get_images(IHTMLDocument2 *iface, IHTMLElemen
}
if(nscoll) {
*p = create_collection_from_htmlcol(This->doc_node, nscoll);
*p = create_collection_from_htmlcol(nscoll, This->doc_node->document_mode);
nsIDOMHTMLCollection_Release(nscoll);
}
......@@ -386,7 +386,7 @@ static HRESULT WINAPI HTMLDocument_get_applets(IHTMLDocument2 *iface, IHTMLEleme
}
if(nscoll) {
*p = create_collection_from_htmlcol(This->doc_node, nscoll);
*p = create_collection_from_htmlcol(nscoll, This->doc_node->document_mode);
nsIDOMHTMLCollection_Release(nscoll);
}
......@@ -418,7 +418,7 @@ static HRESULT WINAPI HTMLDocument_get_links(IHTMLDocument2 *iface, IHTMLElement
}
if(nscoll) {
*p = create_collection_from_htmlcol(This->doc_node, nscoll);
*p = create_collection_from_htmlcol(nscoll, This->doc_node->document_mode);
nsIDOMHTMLCollection_Release(nscoll);
}
......@@ -450,7 +450,7 @@ static HRESULT WINAPI HTMLDocument_get_forms(IHTMLDocument2 *iface, IHTMLElement
}
if(nscoll) {
*p = create_collection_from_htmlcol(This->doc_node, nscoll);
*p = create_collection_from_htmlcol(nscoll, This->doc_node->document_mode);
nsIDOMHTMLCollection_Release(nscoll);
}
......@@ -482,7 +482,7 @@ static HRESULT WINAPI HTMLDocument_get_anchors(IHTMLDocument2 *iface, IHTMLEleme
}
if(nscoll) {
*p = create_collection_from_htmlcol(This->doc_node, nscoll);
*p = create_collection_from_htmlcol(nscoll, This->doc_node->document_mode);
nsIDOMHTMLCollection_Release(nscoll);
}
......@@ -567,7 +567,7 @@ static HRESULT WINAPI HTMLDocument_get_scripts(IHTMLDocument2 *iface, IHTMLEleme
}
if(nscoll) {
*p = create_collection_from_htmlcol(This->doc_node, nscoll);
*p = create_collection_from_htmlcol(nscoll, This->doc_node->document_mode);
nsIDOMHTMLCollection_Release(nscoll);
}
......@@ -2377,7 +2377,7 @@ static HRESULT WINAPI HTMLDocument3_getElementsByName(IHTMLDocument3 *iface, BST
return E_FAIL;
}
*ppelColl = create_collection_from_nodelist(This->doc_node, node_list);
*ppelColl = create_collection_from_nodelist(node_list, This->doc_node->document_mode);
nsIDOMNodeList_Release(node_list);
return S_OK;
}
......@@ -2452,7 +2452,7 @@ static HRESULT WINAPI HTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface,
}
*pelColl = create_collection_from_nodelist(This->doc_node, nslist);
*pelColl = create_collection_from_nodelist(nslist, This->doc_node->document_mode);
nsIDOMNodeList_Release(nslist);
return S_OK;
......@@ -3368,7 +3368,7 @@ static HRESULT WINAPI HTMLDocument7_getElementsByClassName(IHTMLDocument7 *iface
}
*pel = create_collection_from_nodelist(This->doc_node, nslist);
*pel = create_collection_from_nodelist(nslist, This->doc_node->document_mode);
nsIDOMNodeList_Release(nslist);
return S_OK;
}
......
......@@ -1998,7 +1998,7 @@ static HRESULT WINAPI HTMLElement_get_children(IHTMLElement *iface, IDispatch **
return E_FAIL;
}
*p = (IDispatch*)create_collection_from_nodelist(This->node.doc, nsnode_list);
*p = (IDispatch*)create_collection_from_nodelist(nsnode_list, This->node.doc->document_mode);
nsIDOMNodeList_Release(nsnode_list);
return S_OK;
......@@ -3185,7 +3185,7 @@ static HRESULT WINAPI HTMLElement2_getElementsByTagName(IHTMLElement2 *iface, BS
TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
if(!This->dom_element) {
*pelColl = create_collection_from_htmlcol(This->node.doc, NULL);
*pelColl = create_collection_from_htmlcol(NULL, This->node.doc->document_mode);
return S_OK;
}
......@@ -3197,7 +3197,7 @@ static HRESULT WINAPI HTMLElement2_getElementsByTagName(IHTMLElement2 *iface, BS
return E_FAIL;
}
*pelColl = create_collection_from_htmlcol(This->node.doc, nscol);
*pelColl = create_collection_from_htmlcol(nscol, dispex_compat_mode(&This->node.event_target.dispex));
nsIDOMHTMLCollection_Release(nscol);
return S_OK;
}
......@@ -4263,7 +4263,7 @@ static HRESULT WINAPI HTMLElement6_getElementsByClassName(IHTMLElement6 *iface,
}
}
*pel = create_collection_from_htmlcol(This->node.doc, nscol);
*pel = create_collection_from_htmlcol(nscol, dispex_compat_mode(&This->node.event_target.dispex));
nsIDOMHTMLCollection_Release(nscol);
return S_OK;
}
......
......@@ -683,7 +683,7 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node, BOOL include_ro
dispex_compat_mode(&node->event_target.dispex));
}
IHTMLElementCollection *create_collection_from_nodelist(HTMLDocumentNode *doc, nsIDOMNodeList *nslist)
IHTMLElementCollection *create_collection_from_nodelist(nsIDOMNodeList *nslist, compat_mode_t compat_mode)
{
UINT32 length = 0, i;
HTMLDOMNode *node;
......@@ -715,10 +715,10 @@ IHTMLElementCollection *create_collection_from_nodelist(HTMLDocumentNode *doc, n
buf.buf = NULL;
}
return HTMLElementCollection_Create(buf.buf, buf.len, doc->document_mode);
return HTMLElementCollection_Create(buf.buf, buf.len, compat_mode);
}
IHTMLElementCollection *create_collection_from_htmlcol(HTMLDocumentNode *doc, nsIDOMHTMLCollection *nscol)
IHTMLElementCollection *create_collection_from_htmlcol(nsIDOMHTMLCollection *nscol, compat_mode_t compat_mode)
{
UINT32 length = 0, i;
elem_vector_t buf;
......@@ -751,7 +751,7 @@ IHTMLElementCollection *create_collection_from_htmlcol(HTMLDocumentNode *doc, ns
return NULL;
}
return HTMLElementCollection_Create(buf.buf, buf.len, doc->document_mode);
return HTMLElementCollection_Create(buf.buf, buf.len, compat_mode);
}
HRESULT get_elem_source_index(HTMLElement *elem, LONG *ret)
......
......@@ -291,7 +291,7 @@ static HRESULT WINAPI HTMLFormElement_get_elements(IHTMLFormElement *iface, IDis
return E_FAIL;
}
*p = (IDispatch*)create_collection_from_htmlcol(This->element.node.doc, elements);
*p = (IDispatch*)create_collection_from_htmlcol(elements, dispex_compat_mode(&This->element.node.event_target.dispex));
nsIDOMHTMLCollection_Release(elements);
return S_OK;
}
......
......@@ -478,7 +478,7 @@ static HRESULT WINAPI HTMLTable_get_rows(IHTMLTable *iface, IHTMLElementCollecti
return E_FAIL;
}
*p = create_collection_from_htmlcol(This->element.node.doc, nscol);
*p = create_collection_from_htmlcol(nscol, dispex_compat_mode(&This->element.node.event_target.dispex));
nsIDOMHTMLCollection_Release(nscol);
return S_OK;
......@@ -605,7 +605,7 @@ static HRESULT WINAPI HTMLTable_get_tBodies(IHTMLTable *iface, IHTMLElementColle
return E_FAIL;
}
*p = create_collection_from_htmlcol(This->element.node.doc, nscol);
*p = create_collection_from_htmlcol(nscol, dispex_compat_mode(&This->element.node.event_target.dispex));
nsIDOMHTMLCollection_Release(nscol);
return S_OK;
......
......@@ -299,7 +299,7 @@ static HRESULT WINAPI HTMLTableRow_get_cells(IHTMLTableRow *iface, IHTMLElementC
return E_FAIL;
}
*p = create_collection_from_htmlcol(This->element.node.doc, nscol);
*p = create_collection_from_htmlcol(nscol, dispex_compat_mode(&This->element.node.event_target.dispex));
nsIDOMHTMLCollection_Release(nscol);
return S_OK;
......
......@@ -1087,8 +1087,8 @@ HRESULT handle_link_click_event(HTMLElement*,nsAString*,nsAString*,nsIDOMEvent*,
HRESULT wrap_iface(IUnknown*,IUnknown*,IUnknown**) DECLSPEC_HIDDEN;
IHTMLElementCollection *create_all_collection(HTMLDOMNode*,BOOL) DECLSPEC_HIDDEN;
IHTMLElementCollection *create_collection_from_nodelist(HTMLDocumentNode*,nsIDOMNodeList*) DECLSPEC_HIDDEN;
IHTMLElementCollection *create_collection_from_htmlcol(HTMLDocumentNode*,nsIDOMHTMLCollection*) DECLSPEC_HIDDEN;
IHTMLElementCollection *create_collection_from_nodelist(nsIDOMNodeList*,compat_mode_t) DECLSPEC_HIDDEN;
IHTMLElementCollection *create_collection_from_htmlcol(nsIDOMHTMLCollection*,compat_mode_t) DECLSPEC_HIDDEN;
IHTMLDOMChildrenCollection *create_child_collection(nsIDOMNodeList*) DECLSPEC_HIDDEN;
HRESULT attr_value_to_string(VARIANT*) DECLSPEC_HIDDEN;
......
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