Module: wine Branch: master Commit: c24767262b296514c42defe14de2a4a4637b1f03 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c24767262b296514c42defe14d...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Sep 30 14:18:04 2013 +0200
mshtml: Added IHTMLEventObj::x implementation.
---
dlls/mshtml/htmlevent.c | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 9ea1708..ec56029 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -17,6 +17,7 @@ */
#include <stdarg.h> +#include <assert.h>
#define COBJMACROS
@@ -621,10 +622,24 @@ static HRESULT WINAPI HTMLEventObj_get_reason(IHTMLEventObj *iface, LONG *p) static HRESULT WINAPI HTMLEventObj_get_x(IHTMLEventObj *iface, LONG *p) { HTMLEventObj *This = impl_from_IHTMLEventObj(iface); + LONG x = 0;
- FIXME("(%p)->(%p)\n", This, p); + TRACE("(%p)->(%p)\n", This, p);
- *p = -1; + if(This->nsevent) { + nsIDOMUIEvent *ui_event; + nsresult nsres; + + nsres = nsIDOMEvent_QueryInterface(This->nsevent, &IID_nsIDOMUIEvent, (void**)&ui_event); + if(NS_SUCCEEDED(nsres)) { + /* NOTE: pageX is not exactly right here. */ + nsres = nsIDOMUIEvent_GetPageX(ui_event, &x); + assert(nsres == NS_OK); + nsIDOMUIEvent_Release(ui_event); + } + } + + *p = x; return S_OK; }