Module: wine Branch: master Commit: 567f911fcf95993d0fb1d6e8cf1f3d4d163ae3fe URL: https://source.winehq.org/git/wine.git/?a=commit;h=567f911fcf95993d0fb1d6e8c...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Feb 20 13:24:51 2018 +0100
mshtml: Use get_element helper in IHTMLDocument2::elementFromPoint implementation.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mshtml/htmldoc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 0fc96a5..ec4771d 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -1594,11 +1594,11 @@ static HRESULT WINAPI HTMLDocument_get_onselectstart(IHTMLDocument2 *iface, VARI }
static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, LONG x, LONG y, - IHTMLElement **elementHit) + IHTMLElement **elementHit) { HTMLDocument *This = impl_from_IHTMLDocument2(iface); nsIDOMElement *nselem; - HTMLDOMNode *node; + HTMLElement *element; nsresult nsres; HRESULT hres;
@@ -1615,14 +1615,13 @@ static HRESULT WINAPI HTMLDocument_elementFromPoint(IHTMLDocument2 *iface, LONG 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**)elementHit); - node_release(node); - return hres; + *elementHit = &element->IHTMLElement_iface; + return S_OK; }
static HRESULT WINAPI HTMLDocument_get_parentWindow(IHTMLDocument2 *iface, IHTMLWindow2 **p)