mshtml: Use get_elem helper in IHTMLDocument2::get_body implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0666c6c2fd
commit
06d54a6eb3
|
@ -261,7 +261,7 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IHTMLDocument2(iface);
|
HTMLDocument *This = impl_from_IHTMLDocument2(iface);
|
||||||
nsIDOMHTMLElement *nsbody = NULL;
|
nsIDOMHTMLElement *nsbody = NULL;
|
||||||
HTMLDOMNode *node;
|
HTMLElement *element;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
@ -281,14 +281,13 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
hres = get_node(This->doc_node, (nsIDOMNode*)nsbody, TRUE, &node);
|
hres = get_elem(This->doc_node, (nsIDOMElement*)nsbody, &element);
|
||||||
nsIDOMHTMLElement_Release(nsbody);
|
nsIDOMHTMLElement_Release(nsbody);
|
||||||
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 S_OK;
|
||||||
return hres;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLDocument_get_activeElement(IHTMLDocument2 *iface, IHTMLElement **p)
|
static HRESULT WINAPI HTMLDocument_get_activeElement(IHTMLDocument2 *iface, IHTMLElement **p)
|
||||||
|
|
Loading…
Reference in New Issue