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

mshtml: Get rid of no longer needed document argument from get_element.

parent ae4809c7
...@@ -112,7 +112,7 @@ HRESULT get_doc_elem_by_id(HTMLDocumentNode *doc, const WCHAR *id, HTMLElement * ...@@ -112,7 +112,7 @@ HRESULT get_doc_elem_by_id(HTMLDocumentNode *doc, const WCHAR *id, HTMLElement *
return S_OK; return S_OK;
} }
hres = get_elem(doc, nselem, ret); hres = get_element(nselem, ret);
nsIDOMElement_Release(nselem); nsIDOMElement_Release(nselem);
return hres; return hres;
} }
...@@ -281,7 +281,7 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement ...@@ -281,7 +281,7 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement
return S_OK; return S_OK;
} }
hres = get_elem(This->doc_node, (nsIDOMElement*)nsbody, &element); hres = get_element((nsIDOMElement*)nsbody, &element);
nsIDOMHTMLElement_Release(nsbody); nsIDOMHTMLElement_Release(nsbody);
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
...@@ -320,7 +320,7 @@ static HRESULT WINAPI HTMLDocument_get_activeElement(IHTMLDocument2 *iface, IHTM ...@@ -320,7 +320,7 @@ static HRESULT WINAPI HTMLDocument_get_activeElement(IHTMLDocument2 *iface, IHTM
return S_OK; return S_OK;
} }
hres = get_elem(This->doc_node, nselem, &elem); hres = get_element(nselem, &elem);
nsIDOMElement_Release(nselem); nsIDOMElement_Release(nselem);
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
...@@ -3161,7 +3161,7 @@ static HRESULT WINAPI HTMLDocument6_getElementById(IHTMLDocument6 *iface, ...@@ -3161,7 +3161,7 @@ static HRESULT WINAPI HTMLDocument6_getElementById(IHTMLDocument6 *iface,
return S_OK; return S_OK;
} }
hres = get_elem(This->doc_node, nselem, &elem); hres = get_element(nselem, &elem);
nsIDOMElement_Release(nselem); nsIDOMElement_Release(nselem);
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
...@@ -4083,7 +4083,7 @@ static HRESULT WINAPI HTMLDocument7_get_head(IHTMLDocument7 *iface, IHTMLElement ...@@ -4083,7 +4083,7 @@ static HRESULT WINAPI HTMLDocument7_get_head(IHTMLDocument7 *iface, IHTMLElement
nsIDOMHTMLHeadElement_Release(nshead); nsIDOMHTMLHeadElement_Release(nshead);
assert(nsres == NS_OK); assert(nsres == NS_OK);
hres = get_elem(This->doc_node, nselem, &elem); hres = get_element(nselem, &elem);
nsIDOMElement_Release(nselem); nsIDOMElement_Release(nselem);
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
...@@ -4282,10 +4282,12 @@ static HRESULT WINAPI DocumentSelector_querySelector(IDocumentSelector *iface, B ...@@ -4282,10 +4282,12 @@ static HRESULT WINAPI DocumentSelector_querySelector(IDocumentSelector *iface, B
return S_OK; return S_OK;
} }
hres = get_elem(This->doc_node, nselem, &elem); hres = get_element(nselem, &elem);
nsIDOMElement_Release(nselem); nsIDOMElement_Release(nselem);
if(SUCCEEDED(hres)) if(FAILED(hres))
*pel = &elem->IHTMLElement_iface; return hres;
*pel = &elem->IHTMLElement_iface;
return S_OK; return S_OK;
} }
......
...@@ -5119,7 +5119,7 @@ static HRESULT WINAPI ElementTraversal_get_firstElementChild(IElementTraversal * ...@@ -5119,7 +5119,7 @@ static HRESULT WINAPI ElementTraversal_get_firstElementChild(IElementTraversal *
return S_OK; return S_OK;
} }
hres = get_elem(This->node.doc, nselem, &elem); hres = get_element(nselem, &elem);
nsIDOMElement_Release(nselem); nsIDOMElement_Release(nselem);
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
...@@ -5623,7 +5623,7 @@ HRESULT HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL use_g ...@@ -5623,7 +5623,7 @@ HRESULT HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL use_g
return S_OK; return S_OK;
} }
HRESULT get_elem(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **ret) HRESULT get_element(nsIDOMElement *nselem, HTMLElement **ret)
{ {
HTMLDOMNode *node; HTMLDOMNode *node;
HRESULT hres; HRESULT hres;
......
...@@ -1073,7 +1073,7 @@ HRESULT HTMLFrameBase_QI(HTMLFrameBase*,REFIID,void**) DECLSPEC_HIDDEN; ...@@ -1073,7 +1073,7 @@ HRESULT HTMLFrameBase_QI(HTMLFrameBase*,REFIID,void**) DECLSPEC_HIDDEN;
void HTMLFrameBase_destructor(HTMLFrameBase*) DECLSPEC_HIDDEN; void HTMLFrameBase_destructor(HTMLFrameBase*) DECLSPEC_HIDDEN;
HRESULT get_node(nsIDOMNode*,BOOL,HTMLDOMNode**) DECLSPEC_HIDDEN; HRESULT get_node(nsIDOMNode*,BOOL,HTMLDOMNode**) DECLSPEC_HIDDEN;
HRESULT get_elem(HTMLDocumentNode*,nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN; HRESULT get_element(nsIDOMElement*,HTMLElement**) DECLSPEC_HIDDEN;
HRESULT get_document_node(nsIDOMDocument*,HTMLDocumentNode**) DECLSPEC_HIDDEN; HRESULT get_document_node(nsIDOMDocument*,HTMLDocumentNode**) DECLSPEC_HIDDEN;
HTMLElement *unsafe_impl_from_IHTMLElement(IHTMLElement*) DECLSPEC_HIDDEN; HTMLElement *unsafe_impl_from_IHTMLElement(IHTMLElement*) 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