Jacek Caban : mshtml: Added IDOMMouseEvent position getters implementation.

Alexandre Julliard julliard at winehq.org
Mon Feb 5 16:48:27 CST 2018


Module: wine
Branch: master
Commit: feb957b2768e8864afc9946f1044cf251e311a61
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=feb957b2768e8864afc9946f1044cf251e311a61

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Feb  5 17:29:59 2018 +0100

mshtml: Added IDOMMouseEvent position getters implementation.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/htmlevent.c | 52 +++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 44 insertions(+), 8 deletions(-)

diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index 0cf69fb..e4ba0ed 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -1263,29 +1263,65 @@ static HRESULT WINAPI DOMMouseEvent_Invoke(IDOMMouseEvent *iface, DISPID dispIdM
 static HRESULT WINAPI DOMMouseEvent_get_screenX(IDOMMouseEvent *iface, LONG *p)
 {
     DOMEvent *This = impl_from_IDOMMouseEvent(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    INT32 screen_x;
+    nsresult nsres;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    nsres = nsIDOMMouseEvent_GetScreenX(This->mouse_event, &screen_x);
+    if(NS_FAILED(nsres))
+        return E_FAIL;
+
+    *p = screen_x;
+    return S_OK;
 }
 
 static HRESULT WINAPI DOMMouseEvent_get_screenY(IDOMMouseEvent *iface, LONG *p)
 {
     DOMEvent *This = impl_from_IDOMMouseEvent(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    INT32 screen_y;
+    nsresult nsres;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    nsres = nsIDOMMouseEvent_GetScreenY(This->mouse_event, &screen_y);
+    if(NS_FAILED(nsres))
+        return E_FAIL;
+
+    *p = screen_y;
+    return S_OK;
 }
 
 static HRESULT WINAPI DOMMouseEvent_get_clientX(IDOMMouseEvent *iface, LONG *p)
 {
     DOMEvent *This = impl_from_IDOMMouseEvent(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    INT32 client_x;
+    nsresult nsres;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    nsres = nsIDOMMouseEvent_GetClientX(This->mouse_event, &client_x);
+    if(NS_FAILED(nsres))
+        return E_FAIL;
+
+    *p = client_x;
+    return S_OK;
 }
 
 static HRESULT WINAPI DOMMouseEvent_get_clientY(IDOMMouseEvent *iface, LONG *p)
 {
     DOMEvent *This = impl_from_IDOMMouseEvent(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    INT32 client_y;
+    nsresult nsres;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    nsres = nsIDOMMouseEvent_GetClientY(This->mouse_event, &client_y);
+    if(NS_FAILED(nsres))
+        return E_FAIL;
+
+    *p = client_y;
+    return S_OK;
 }
 
 static HRESULT WINAPI DOMMouseEvent_get_ctrlKey(IDOMMouseEvent *iface, VARIANT_BOOL *p)




More information about the wine-cvs mailing list