Jacek Caban : mshtml: Added IDOMEvent:: pageX and pageY properties implementation.
Alexandre Julliard
julliard at winehq.org
Thu Feb 15 14:42:29 CST 2018
Module: wine
Branch: master
Commit: 881ba0627b4a13d56925301ab3777511e3bc7ed5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=881ba0627b4a13d56925301ab3777511e3bc7ed5
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Feb 15 17:05:13 2018 +0100
mshtml: Added IDOMEvent::pageX and pageY properties implementation.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/htmlevent.c | 26 ++++++++++++++++++++++----
dlls/mshtml/tests/events.js | 3 +++
2 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index 094ae05..413ca2d 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -1573,15 +1573,33 @@ static HRESULT WINAPI DOMMouseEvent_get_offsetY(IDOMMouseEvent *iface, LONG *p)
static HRESULT WINAPI DOMMouseEvent_get_pageX(IDOMMouseEvent *iface, LONG *p)
{
DOMEvent *This = impl_from_IDOMMouseEvent(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ INT32 r;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMMouseEvent_GetPageX(This->mouse_event, &r);
+ if(NS_FAILED(nsres))
+ return E_FAIL;
+
+ *p = r;
+ return S_OK;
}
static HRESULT WINAPI DOMMouseEvent_get_pageY(IDOMMouseEvent *iface, LONG *p)
{
DOMEvent *This = impl_from_IDOMMouseEvent(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ INT32 r;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsres = nsIDOMMouseEvent_GetPageY(This->mouse_event, &r);
+ if(NS_FAILED(nsres))
+ return E_FAIL;
+
+ *p = r;
+ return S_OK;
}
static HRESULT WINAPI DOMMouseEvent_get_layerX(IDOMMouseEvent *iface, LONG *p)
diff --git a/dlls/mshtml/tests/events.js b/dlls/mshtml/tests/events.js
index 9fe4895..c5030d0 100644
--- a/dlls/mshtml/tests/events.js
+++ b/dlls/mshtml/tests/events.js
@@ -625,6 +625,9 @@ function test_mouse_event() {
ok(e.shiftKey === false, "shiftKey = " + e.shiftKey);
ok(e.metaKey === false, "metaKey = " + e.metaKey);
ok(e.button === 0, "button = " + e.button);
+ ok(e.buttons === 0, "buttons = " + e.buttons);
+ ok(e.pageX === 0, "pageX = " + e.pageX);
+ ok(e.pageY === 0, "pageY = " + e.pageY);
e.initMouseEvent("test", true, true, window, 1, 2, 3, 4, 5, false, false, false, false, 1, document);
ok(e.type === "test", "type = " + e.type);
More information about the wine-cvs
mailing list