Module: wine Branch: master Commit: d3cd6a3691a7f976927578201b09a2e9ba904ee8 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d3cd6a3691a7f976927578201...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Feb 7 16:25:51 2018 +0100
mshtml: Added IHTMLKeyboardEvent::location property implementation.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mshtml/dispex.c | 1 + dlls/mshtml/htmlevent.c | 13 +++++++++++-- dlls/mshtml/tests/events.js | 1 + 3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index a46a0cd..ea20baf 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -209,6 +209,7 @@ HRESULT get_class_typeinfo(const CLSID *clsid, ITypeInfo **typeinfo) CASE_VT(VT_I2, INT16, V_I2); \ CASE_VT(VT_UI2, UINT16, V_UI2); \ CASE_VT(VT_I4, INT32, V_I4); \ + CASE_VT(VT_UI4, UINT32, V_UI4); \ CASE_VT(VT_R4, float, V_R4); \ CASE_VT(VT_BSTR, BSTR, V_BSTR); \ CASE_VT(VT_BOOL, VARIANT_BOOL, V_BOOL) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 9f115a8..2931318 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1675,8 +1675,17 @@ static HRESULT WINAPI DOMKeyboardEvent_get_key(IDOMKeyboardEvent *iface, BSTR *p static HRESULT WINAPI DOMKeyboardEvent_get_location(IDOMKeyboardEvent *iface, ULONG *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_GetLocation(This->keyboard_event, &r); + if(NS_FAILED(nsres)) + return E_FAIL; + + *p = r; + return S_OK; }
static HRESULT WINAPI DOMKeyboardEvent_get_ctrlKey(IDOMKeyboardEvent *iface, VARIANT_BOOL *p) diff --git a/dlls/mshtml/tests/events.js b/dlls/mshtml/tests/events.js index bf37b3f..4560d93 100644 --- a/dlls/mshtml/tests/events.js +++ b/dlls/mshtml/tests/events.js @@ -698,6 +698,7 @@ function test_keyboard_event() { ok(e.altKey === false, "altKey = " + e.altKey); ok(e.shiftKey === false, "shiftKey = " + e.shiftKey); ok(e.metaKey === false, "metaKey = " + e.metaKey); + ok(e.location === 0, "location = " + e.location); ok(e.detail === 0, "detail = " + e.detail);
next_test();