mshtml: Added IDOMKeyboardEvent::which and IDOMMouseEvent::which properties implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
de9ebcff70
commit
abd27e0926
|
@ -1619,8 +1619,17 @@ static HRESULT WINAPI DOMMouseEvent_get_layerY(IDOMMouseEvent *iface, LONG *p)
|
|||
static HRESULT WINAPI DOMMouseEvent_get_which(IDOMMouseEvent *iface, USHORT *p)
|
||||
{
|
||||
DOMEvent *This = impl_from_IDOMMouseEvent(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
UINT32 r;
|
||||
nsresult nsres;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
nsres = nsIDOMMouseEvent_GetWhich(This->mouse_event, &r);
|
||||
if(NS_FAILED(nsres))
|
||||
return E_FAIL;
|
||||
|
||||
*p = r;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const IDOMMouseEventVtbl DOMMouseEventVtbl = {
|
||||
|
@ -1874,8 +1883,17 @@ static HRESULT WINAPI DOMKeyboardEvent_get_charCode(IDOMKeyboardEvent *iface, LO
|
|||
static HRESULT WINAPI DOMKeyboardEvent_get_which(IDOMKeyboardEvent *iface, LONG *p)
|
||||
{
|
||||
DOMEvent *This = impl_from_IDOMKeyboardEvent(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
UINT32 r;
|
||||
nsresult nsres;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
nsres = nsIDOMKeyEvent_GetWhich(This->keyboard_event, &r);
|
||||
if(NS_FAILED(nsres))
|
||||
return E_FAIL;
|
||||
|
||||
*p = r;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DOMKeyboardEvent_get_char(IDOMKeyboardEvent *iface, VARIANT *p)
|
||||
|
|
|
@ -628,6 +628,7 @@ function test_mouse_event() {
|
|||
ok(e.buttons === 0, "buttons = " + e.buttons);
|
||||
ok(e.pageX === 0, "pageX = " + e.pageX);
|
||||
ok(e.pageY === 0, "pageY = " + e.pageY);
|
||||
ok(e.which === 1, "which = " + e.which);
|
||||
|
||||
e.initMouseEvent("test", true, true, window, 1, 2, 3, 4, 5, false, false, false, false, 1, document);
|
||||
ok(e.type === "test", "type = " + e.type);
|
||||
|
@ -646,6 +647,7 @@ function test_mouse_event() {
|
|||
ok(e.metaKey === false, "metaKey = " + e.metaKey);
|
||||
ok(e.button === 1, "button = " + e.button);
|
||||
ok(e.buttons === 0, "buttons = " + e.buttons);
|
||||
ok(e.which === 2, "which = " + e.which);
|
||||
|
||||
e.initMouseEvent("test", false, false, window, 9, 8, 7, 6, 5, true, true, true, true, 127, document);
|
||||
ok(e.type === "test", "type = " + e.type);
|
||||
|
@ -661,6 +663,7 @@ function test_mouse_event() {
|
|||
ok(e.shiftKey === true, "shiftKey = " + e.shiftKey);
|
||||
ok(e.metaKey === true, "metaKey = " + e.metaKey);
|
||||
ok(e.button === 127, "button = " + e.button);
|
||||
ok(e.which === 128, "which = " + e.which);
|
||||
|
||||
e.initEvent("testevent", true, true);
|
||||
ok(e.type === "testevent", "type = " + e.type);
|
||||
|
@ -728,6 +731,7 @@ function test_keyboard_event() {
|
|||
ok(e.metaKey === false, "metaKey = " + e.metaKey);
|
||||
ok(e.location === 0, "location = " + e.location);
|
||||
ok(e.detail === 0, "detail = " + e.detail);
|
||||
ok(e.which === 0, "which = " + e.which);
|
||||
|
||||
next_test();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue