mshtml: Use nsIDOMUIEvent stored in DOMEvent in IHTMLEventObj::get_[xy] implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
28e2f7a85e
commit
90bccb498a
|
@ -635,17 +635,12 @@ static HRESULT WINAPI HTMLEventObj_get_x(IHTMLEventObj *iface, LONG *p)
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
if(This->event) {
|
if(This->event && This->event->ui_event) {
|
||||||
nsIDOMUIEvent *ui_event;
|
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
nsres = nsIDOMEvent_QueryInterface(This->event->nsevent, &IID_nsIDOMUIEvent, (void**)&ui_event);
|
|
||||||
if(NS_SUCCEEDED(nsres)) {
|
|
||||||
/* NOTE: pageX is not exactly right here. */
|
/* NOTE: pageX is not exactly right here. */
|
||||||
nsres = nsIDOMUIEvent_GetPageX(ui_event, &x);
|
nsres = nsIDOMUIEvent_GetPageX(This->event->ui_event, &x);
|
||||||
assert(nsres == NS_OK);
|
assert(nsres == NS_OK);
|
||||||
nsIDOMUIEvent_Release(ui_event);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*p = x;
|
*p = x;
|
||||||
|
@ -659,17 +654,12 @@ static HRESULT WINAPI HTMLEventObj_get_y(IHTMLEventObj *iface, LONG *p)
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
if(This->event) {
|
if(This->event && This->event->ui_event) {
|
||||||
nsIDOMUIEvent *ui_event;
|
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
nsres = nsIDOMEvent_QueryInterface(This->event->nsevent, &IID_nsIDOMUIEvent, (void**)&ui_event);
|
|
||||||
if(NS_SUCCEEDED(nsres)) {
|
|
||||||
/* NOTE: pageY is not exactly right here. */
|
/* NOTE: pageY is not exactly right here. */
|
||||||
nsres = nsIDOMUIEvent_GetPageY(ui_event, &y);
|
nsres = nsIDOMUIEvent_GetPageY(This->event->ui_event, &y);
|
||||||
assert(nsres == NS_OK);
|
assert(nsres == NS_OK);
|
||||||
nsIDOMUIEvent_Release(ui_event);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*p = y;
|
*p = y;
|
||||||
|
|
Loading…
Reference in New Issue