mshtml: Use get_element helper in IHTMLDocument3::get_documentElement implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
62335569c4
commit
cff4612646
|
@ -1993,7 +1993,7 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
|
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
|
||||||
nsIDOMElement *nselem = NULL;
|
nsIDOMElement *nselem = NULL;
|
||||||
HTMLDOMNode *node;
|
HTMLElement *element;
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
|
@ -2020,13 +2020,12 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
hres = get_node((nsIDOMNode *)nselem, TRUE, &node);
|
hres = get_element(nselem, &element);
|
||||||
nsIDOMElement_Release(nselem);
|
nsIDOMElement_Release(nselem);
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
return hres;
|
return hres;
|
||||||
|
|
||||||
hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p);
|
*p = &element->IHTMLElement_iface;
|
||||||
node_release(node);
|
|
||||||
return hres;
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue