diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index a4e281b39c2..7f5f869e2f6 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -247,7 +247,7 @@ static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCo
return S_OK;
}
- hres = get_node(This->doc_node, (nsIDOMNode*)nselem, TRUE, &node);
+ hres = get_node((nsIDOMNode*)nselem, TRUE, &node);
nsIDOMElement_Release(nselem);
if(FAILED(hres))
return hres;
@@ -1615,7 +1615,7 @@ static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, LONG
return S_OK;
}
- hres = get_node(This->doc_node, (nsIDOMNode*)nselem, TRUE, &node);
+ hres = get_node((nsIDOMNode*)nselem, TRUE, &node);
nsIDOMElement_Release(nselem);
if(FAILED(hres))
return hres;
@@ -2021,7 +2021,7 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I
return S_OK;
}
- hres = get_node(This->doc_node, (nsIDOMNode *)nselem, TRUE, &node);
+ hres = get_node((nsIDOMNode *)nselem, TRUE, &node);
nsIDOMElement_Release(nselem);
if(FAILED(hres))
return hres;
@@ -5020,7 +5020,7 @@ static HRESULT HTMLDocumentNode_invoke(DispatchEx *dispex, DISPID id, LCID lcid,
if(NS_FAILED(nsres) || !nsnode)
return DISP_E_UNKNOWNNAME;
- hres = get_node(This, nsnode, TRUE, &node);
+ hres = get_node(nsnode, TRUE, &node);
if(FAILED(hres))
return hres;
@@ -5210,7 +5210,7 @@ HRESULT get_document_node(nsIDOMDocument *dom_document, HTMLDocumentNode **ret)
HTMLDOMNode *node;
HRESULT hres;
- hres = get_node(NULL, (nsIDOMNode*)dom_document, FALSE, &node);
+ hres = get_node((nsIDOMNode*)dom_document, FALSE, &node);
if(FAILED(hres))
return hres;
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c
index 06e91bc4da9..964e85c8690 100644
--- a/dlls/mshtml/htmlelem.c
+++ b/dlls/mshtml/htmlelem.c
@@ -1427,7 +1427,7 @@ static HRESULT WINAPI HTMLElement_get_offsetParent(IHTMLElement *iface, IHTMLEle
if(nsparent) {
HTMLDOMNode *node;
- hres = get_node(This->node.doc, (nsIDOMNode*)nsparent, TRUE, &node);
+ hres = get_node((nsIDOMNode*)nsparent, TRUE, &node);
nsIDOMElement_Release(nsparent);
if(FAILED(hres))
return hres;
@@ -1700,7 +1700,7 @@ static HRESULT insert_adjacent_node(HTMLElement *This, const WCHAR *where, nsIDO
return E_FAIL;
if(ret_node)
- hres = get_node(This->node.doc, ret_nsnode, TRUE, ret_node);
+ hres = get_node(ret_nsnode, TRUE, ret_node);
nsIDOMNode_Release(ret_nsnode);
return hres;
}
@@ -5470,7 +5470,7 @@ static EventTarget *HTMLElement_get_parent_event_target(DispatchEx *dispex)
if(!nsnode)
return NULL;
- hres = get_node(This->node.doc, nsnode, TRUE, &node);
+ hres = get_node(nsnode, TRUE, &node);
nsIDOMNode_Release(nsnode);
if(FAILED(hres))
return NULL;
@@ -5628,7 +5628,7 @@ HRESULT get_elem(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **ret
HTMLDOMNode *node;
HRESULT hres;
- hres = get_node(doc, (nsIDOMNode*)nselem, TRUE, &node);
+ hres = get_node((nsIDOMNode*)nselem, TRUE, &node);
if(FAILED(hres))
return hres;
diff --git a/dlls/mshtml/htmlelemcol.c b/dlls/mshtml/htmlelemcol.c
index 226cfe4e92e..d4a37a34dbe 100644
--- a/dlls/mshtml/htmlelemcol.c
+++ b/dlls/mshtml/htmlelemcol.c
@@ -654,7 +654,7 @@ static void create_all_list(HTMLDocumentNode *doc, HTMLDOMNode *elem, elem_vecto
if(is_elem_node(iter)) {
HTMLDOMNode *node;
- hres = get_node(doc, iter, TRUE, &node);
+ hres = get_node(iter, TRUE, &node);
if(FAILED(hres)) {
FIXME("get_node failed: %08x\n", hres);
continue;
@@ -702,7 +702,7 @@ IHTMLElementCollection *create_collection_from_nodelist(HTMLDocumentNode *doc, n
for(i=0; inode.doc, parent_node, TRUE, &node);
+ hres = get_node(parent_node, TRUE, &node);
nsIDOMNode_Release(parent_node);
if(FAILED(hres))
return hres;
-
/* Create all children collection and find the element in it.
* This could be optimized if we ever find the reason. */
buf.buf = heap_alloc(buf.size*sizeof(*buf.buf));
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index 3a83e471dd2..381d0dc2e21 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -2916,7 +2916,7 @@ void check_event_attr(HTMLDocumentNode *doc, nsIDOMElement *nselem)
continue;
if(!node) {
- hres = get_node(doc, (nsIDOMNode*)nselem, TRUE, &node);
+ hres = get_node((nsIDOMNode*)nselem, TRUE, &node);
if(FAILED(hres)) {
IDispatch_Release(disp);
break;
diff --git a/dlls/mshtml/htmlform.c b/dlls/mshtml/htmlform.c
index 975756cad2a..acf2eba3786 100644
--- a/dlls/mshtml/htmlform.c
+++ b/dlls/mshtml/htmlform.c
@@ -64,7 +64,7 @@ static HRESULT htmlform_item(HTMLFormElement *This, int i, IDispatch **ret)
}
if(item) {
- hres = get_node(This->element.node.doc, item, TRUE, &node);
+ hres = get_node(item, TRUE, &node);
if(FAILED(hres))
return hres;
diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c
index ad8663c6ca6..9c4486408ee 100644
--- a/dlls/mshtml/htmlinput.c
+++ b/dlls/mshtml/htmlinput.c
@@ -62,7 +62,7 @@ static HRESULT return_nsform(HTMLElement *elem, nsIDOMHTMLFormElement *nsform, I
nsIDOMHTMLFormElement_Release(nsform);
assert(nsres == NS_OK);
- hres = get_node(elem->node.doc, form_node, TRUE, &node);
+ hres = get_node(form_node, TRUE, &node);
nsIDOMNode_Release(form_node);
if (FAILED(hres))
return hres;
diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c
index 44983bce368..5557729f569 100644
--- a/dlls/mshtml/htmlnode.c
+++ b/dlls/mshtml/htmlnode.c
@@ -136,7 +136,7 @@ static HRESULT WINAPI HTMLDOMChildrenCollectionEnum_Next(IEnumVARIANT *iface, UL
nsres = nsIDOMNodeList_Item(This->col->nslist, This->iter+fetched, &nsnode);
assert(nsres == NS_OK);
- hres = get_node(This->col->doc, nsnode, TRUE, &node);
+ hres = get_node(nsnode, TRUE, &node);
nsIDOMNode_Release(nsnode);
if(FAILED(hres)) {
ERR("get_node failed: %08x\n", hres);
@@ -342,7 +342,7 @@ static HRESULT WINAPI HTMLDOMChildrenCollection_item(IHTMLDOMChildrenCollection
return E_FAIL;
}
- hres = get_node(This->doc, nsnode, TRUE, &node);
+ hres = get_node(nsnode, TRUE, &node);
if(FAILED(hres))
return hres;
@@ -589,7 +589,7 @@ static HRESULT WINAPI HTMLDOMNode_get_parentNode(IHTMLDOMNode *iface, IHTMLDOMNo
return S_OK;
}
- hres = get_node(This->doc, nsnode, TRUE, &node);
+ hres = get_node(nsnode, TRUE, &node);
nsIDOMNode_Release(nsnode);
if(FAILED(hres))
return hres;
@@ -712,7 +712,7 @@ static HRESULT WINAPI HTMLDOMNode_insertBefore(IHTMLDOMNode *iface, IHTMLDOMNode
if(FAILED(hres))
return hres;
- hres = get_node(This->doc, nsnode, TRUE, &node_obj);
+ hres = get_node(nsnode, TRUE, &node_obj);
nsIDOMNode_Release(nsnode);
if(FAILED(hres))
return hres;
@@ -743,7 +743,7 @@ static HRESULT WINAPI HTMLDOMNode_removeChild(IHTMLDOMNode *iface, IHTMLDOMNode
return E_FAIL;
}
- hres = get_node(This->doc, nsnode, TRUE, &node_obj);
+ hres = get_node(nsnode, TRUE, &node_obj);
nsIDOMNode_Release(nsnode);
if(FAILED(hres))
return hres;
@@ -780,7 +780,7 @@ static HRESULT WINAPI HTMLDOMNode_replaceChild(IHTMLDOMNode *iface, IHTMLDOMNode
if(NS_FAILED(nsres))
return E_FAIL;
- hres = get_node(This->doc, nsnode, TRUE, &ret_node);
+ hres = get_node(nsnode, TRUE, &ret_node);
nsIDOMNode_Release(nsnode);
if(FAILED(hres))
return hres;
@@ -860,7 +860,7 @@ static HRESULT WINAPI HTMLDOMNode_appendChild(IHTMLDOMNode *iface, IHTMLDOMNode
return E_FAIL;
}
- hres = get_node(This->doc, nsnode, TRUE, &node_obj);
+ hres = get_node(nsnode, TRUE, &node_obj);
nsIDOMNode_Release(nsnode);
if(FAILED(hres))
return hres;
@@ -946,7 +946,7 @@ static HRESULT WINAPI HTMLDOMNode_get_firstChild(IHTMLDOMNode *iface, IHTMLDOMNo
return S_OK;
}
- hres = get_node(This->doc, nschild, TRUE, &node);
+ hres = get_node(nschild, TRUE, &node);
nsIDOMNode_Release(nschild);
if(FAILED(hres))
return hres;
@@ -970,7 +970,7 @@ static HRESULT WINAPI HTMLDOMNode_get_lastChild(IHTMLDOMNode *iface, IHTMLDOMNod
return S_OK;
}
- hres = get_node(This->doc, nschild, TRUE, &node);
+ hres = get_node(nschild, TRUE, &node);
nsIDOMNode_Release(nschild);
if(FAILED(hres))
return hres;
@@ -994,7 +994,7 @@ static HRESULT WINAPI HTMLDOMNode_get_previousSibling(IHTMLDOMNode *iface, IHTML
return S_OK;
}
- hres = get_node(This->doc, nschild, TRUE, &node);
+ hres = get_node(nschild, TRUE, &node);
nsIDOMNode_Release(nschild);
if(FAILED(hres))
return hres;
@@ -1018,7 +1018,7 @@ static HRESULT WINAPI HTMLDOMNode_get_nextSibling(IHTMLDOMNode *iface, IHTMLDOMN
return S_OK;
}
- hres = get_node(This->doc, nssibling, TRUE, &node);
+ hres = get_node(nssibling, TRUE, &node);
nsIDOMNode_Release(nssibling);
if(FAILED(hres))
return hres;
@@ -1614,7 +1614,7 @@ void init_node_cc(void)
ccp_init(&node_ccp, &node_ccp_callback);
}
-HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
+HRESULT get_node(nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
{
nsIDOMDocument *dom_document;
HTMLDocumentNode *document;
diff --git a/dlls/mshtml/htmloption.c b/dlls/mshtml/htmloption.c
index 82109694e4f..a2bf0738317 100644
--- a/dlls/mshtml/htmloption.c
+++ b/dlls/mshtml/htmloption.c
@@ -334,7 +334,7 @@ static HRESULT WINAPI HTMLOptionElement_get_form(IHTMLOptionElement *iface, IHTM
nsIDOMHTMLFormElement_Release(nsform);
assert(nsres == NS_OK);
- hres = get_node(This->element.node.doc, form_node, TRUE, &node);
+ hres = get_node(form_node, TRUE, &node);
nsIDOMNode_Release(form_node);
if (FAILED(hres))
return hres;
@@ -579,7 +579,7 @@ static HRESULT WINAPI HTMLOptionElementFactory_create(IHTMLOptionElementFactory
if(FAILED(hres))
return hres;
- hres = get_node(This->window->doc, (nsIDOMNode*)nselem, TRUE, &node);
+ hres = get_node((nsIDOMNode*)nselem, TRUE, &node);
nsIDOMElement_Release(nselem);
if(FAILED(hres))
return hres;
diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c
index c449d3f6b77..565ba37e30e 100644
--- a/dlls/mshtml/htmlscript.c
+++ b/dlls/mshtml/htmlscript.c
@@ -457,7 +457,7 @@ HRESULT script_elem_from_nsscript(HTMLDocumentNode *doc, nsIDOMHTMLScriptElement
nsres = nsIDOMHTMLScriptElement_QueryInterface(nsscript, &IID_nsIDOMNode, (void**)&nsnode);
assert(nsres == NS_OK);
- hres = get_node(doc, nsnode, TRUE, &node);
+ hres = get_node(nsnode, TRUE, &node);
nsIDOMNode_Release(nsnode);
if(FAILED(hres))
return hres;
diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c
index 8f3394103f6..320cf5f199a 100644
--- a/dlls/mshtml/htmlselect.c
+++ b/dlls/mshtml/htmlselect.c
@@ -69,7 +69,7 @@ static HRESULT htmlselect_item(HTMLSelectElement *This, int i, IDispatch **ret)
if(nsnode) {
HTMLDOMNode *node;
- hres = get_node(This->element.node.doc, nsnode, TRUE, &node);
+ hres = get_node(nsnode, TRUE, &node);
nsIDOMNode_Release(nsnode);
if(FAILED(hres))
return hres;
@@ -398,7 +398,7 @@ static HRESULT WINAPI HTMLSelectElement_get_form(IHTMLSelectElement *iface, IHTM
nsIDOMHTMLFormElement_Release(nsform);
assert(nsres == NS_OK);
- hres = get_node(This->element.node.doc, form_node, TRUE, &node);
+ hres = get_node(form_node, TRUE, &node);
nsIDOMNode_Release(form_node);
if (FAILED(hres))
return hres;
diff --git a/dlls/mshtml/htmltextarea.c b/dlls/mshtml/htmltextarea.c
index 5506329f5bc..599c0296b2e 100644
--- a/dlls/mshtml/htmltextarea.c
+++ b/dlls/mshtml/htmltextarea.c
@@ -216,7 +216,7 @@ static HRESULT WINAPI HTMLTextAreaElement_get_form(IHTMLTextAreaElement *iface,
nsIDOMHTMLFormElement_Release(nsform);
assert(nsres == NS_OK);
- hres = get_node(This->element.node.doc, nsnode, TRUE, &node);
+ hres = get_node(nsnode, TRUE, &node);
nsIDOMNode_Release(nsnode);
if(FAILED(hres))
return hres;
diff --git a/dlls/mshtml/htmltextnode.c b/dlls/mshtml/htmltextnode.c
index f9d7eeca121..c2e7f375ada 100644
--- a/dlls/mshtml/htmltextnode.c
+++ b/dlls/mshtml/htmltextnode.c
@@ -170,7 +170,7 @@ static HRESULT WINAPI HTMLDOMTextNode_splitText(IHTMLDOMTextNode *iface, LONG of
return S_OK;
}
- hres = get_node(This->node.doc, (nsIDOMNode*)text, TRUE, &node);
+ hres = get_node((nsIDOMNode*)text, TRUE, &node);
nsIDOMText_Release(text);
if(FAILED(hres))
return hres;
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index cd5b9c332e4..85671a3ab2d 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -1072,7 +1072,7 @@ void HTMLElement_init_dispex_info(dispex_data_t*,compat_mode_t) DECLSPEC_HIDDEN;
HRESULT HTMLFrameBase_QI(HTMLFrameBase*,REFIID,void**) DECLSPEC_HIDDEN;
void HTMLFrameBase_destructor(HTMLFrameBase*) DECLSPEC_HIDDEN;
-HRESULT get_node(HTMLDocumentNode*,nsIDOMNode*,BOOL,HTMLDOMNode**) DECLSPEC_HIDDEN;
+HRESULT get_node(nsIDOMNode*,BOOL,HTMLDOMNode**) DECLSPEC_HIDDEN;
HRESULT get_elem(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
HRESULT get_document_node(nsIDOMDocument*,HTMLDocumentNode**) DECLSPEC_HIDDEN;
diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c
index 6983da6f8ea..8a36a75f53a 100644
--- a/dlls/mshtml/mutation.c
+++ b/dlls/mshtml/mutation.c
@@ -230,7 +230,7 @@ static nsresult run_bind_to_tree(HTMLDocumentNode *doc, nsISupports *nsiface, ns
if(NS_FAILED(nsres))
return nsres;
- hres = get_node(doc, nsnode, TRUE, &node);
+ hres = get_node(nsnode, TRUE, &node);
nsIDOMNode_Release(nsnode);
if(FAILED(hres)) {
ERR("Could not get node\n");
diff --git a/dlls/mshtml/npplugin.c b/dlls/mshtml/npplugin.c
index 0d94d0d7912..8d6e05830c1 100644
--- a/dlls/mshtml/npplugin.c
+++ b/dlls/mshtml/npplugin.c
@@ -281,7 +281,7 @@ static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, I
return NPERR_GENERIC_ERROR;
}
- hres = get_node(window->doc, (nsIDOMNode*)nselem, TRUE, &node);
+ hres = get_node((nsIDOMNode*)nselem, TRUE, &node);
nsIDOMElement_Release(nselem);
if(FAILED(hres))
return NPERR_GENERIC_ERROR;
diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c
index 8782ecea7e5..9c2d5e51f91 100644
--- a/dlls/mshtml/nsembed.c
+++ b/dlls/mshtml/nsembed.c
@@ -1494,7 +1494,7 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList
TRACE("(%p)->(%08x %p %p)\n", This, aContextFlags, aEvent, aNode);
- hres = get_node(This->doc->basedoc.doc_node, aNode, TRUE, &node);
+ hres = get_node(aNode, TRUE, &node);
if(FAILED(hres))
return NS_ERROR_FAILURE;
diff --git a/dlls/mshtml/nsevents.c b/dlls/mshtml/nsevents.c
index afe09fba302..d68750fe744 100644
--- a/dlls/mshtml/nsevents.c
+++ b/dlls/mshtml/nsevents.c
@@ -322,7 +322,7 @@ static nsresult NSAPI handle_htmlevent(nsIDOMEventListener *iface, nsIDOMEvent *
return NS_OK;
}
- hres = get_node(doc, nsnode, TRUE, &node);
+ hres = get_node(nsnode, TRUE, &node);
nsIDOMNode_Release(nsnode);
if(FAILED(hres))
return NS_OK;
diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c
index c54cbbb93ae..8b12c018abe 100644
--- a/dlls/mshtml/txtrange.c
+++ b/dlls/mshtml/txtrange.c
@@ -1023,7 +1023,7 @@ static HRESULT WINAPI HTMLTxtRange_parentElement(IHTMLTxtRange *iface, IHTMLElem
return S_OK;
}
- hres = get_node(This->doc, nsnode, TRUE, &node);
+ hres = get_node(nsnode, TRUE, &node);
nsIDOMNode_Release(nsnode);
if(FAILED(hres))
return hres;