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

mshtml: Use get_element helper in IHTMLDocument3::get_documentElement implementation.

parent 62335569
......@@ -1993,7 +1993,7 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
nsIDOMElement *nselem = NULL;
HTMLDOMNode *node;
HTMLElement *element;
nsresult nsres;
HRESULT hres;
......@@ -2020,13 +2020,12 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I
return S_OK;
}
hres = get_node((nsIDOMNode *)nselem, TRUE, &node);
hres = get_element(nselem, &element);
nsIDOMElement_Release(nselem);
if(FAILED(hres))
return hres;
hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p);
node_release(node);
*p = &element->IHTMLElement_iface;
return hres;
}
......
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