mshtml: Added IDOMMouseEvent::buttons property implementation.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2018-02-15 17:05:07 +01:00 committed by Alexandre Julliard
parent 2e91bf3212
commit 5896677d9e
2 changed files with 12 additions and 2 deletions

View File

@ -1515,8 +1515,17 @@ static HRESULT WINAPI DOMMouseEvent_getModifierState(IDOMMouseEvent *iface, BSTR
static HRESULT WINAPI DOMMouseEvent_get_buttons(IDOMMouseEvent *iface, USHORT *p) static HRESULT WINAPI DOMMouseEvent_get_buttons(IDOMMouseEvent *iface, USHORT *p)
{ {
DOMEvent *This = impl_from_IDOMMouseEvent(iface); DOMEvent *This = impl_from_IDOMMouseEvent(iface);
FIXME("(%p)->(%p)\n", This, p); UINT16 r;
return E_NOTIMPL; nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
nsres = nsIDOMMouseEvent_GetButtons(This->mouse_event, &r);
if(NS_FAILED(nsres))
return E_FAIL;
*p = r;
return S_OK;
} }
static HRESULT WINAPI DOMMouseEvent_get_fromElement(IDOMMouseEvent *iface, IHTMLElement **p) static HRESULT WINAPI DOMMouseEvent_get_fromElement(IDOMMouseEvent *iface, IHTMLElement **p)

View File

@ -642,6 +642,7 @@ function test_mouse_event() {
ok(e.shiftKey === false, "shiftKey = " + e.shiftKey); ok(e.shiftKey === false, "shiftKey = " + e.shiftKey);
ok(e.metaKey === false, "metaKey = " + e.metaKey); ok(e.metaKey === false, "metaKey = " + e.metaKey);
ok(e.button === 1, "button = " + e.button); ok(e.button === 1, "button = " + e.button);
ok(e.buttons === 0, "buttons = " + e.buttons);
e.initMouseEvent("test", false, false, window, 9, 8, 7, 6, 5, true, true, true, true, 127, document); e.initMouseEvent("test", false, false, window, 9, 8, 7, 6, 5, true, true, true, true, 127, document);
ok(e.type === "test", "type = " + e.type); ok(e.type === "test", "type = " + e.type);