From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlevent.c | 11 ++++++++++- dlls/mshtml/tests/documentmode.js | 9 +++++++++ 2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 222a3cca9b5..4525ec52b07 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -3638,10 +3638,18 @@ static const dispex_static_data_vtbl_t DOMKeyboardEvent_dispex_vtbl = { .unlink = DOMKeyboardEvent_unlink };
+static void KeyboardEvent_init_dispex_info(dispex_data_t *info, compat_mode_t mode) +{ + static const dispex_hook_t hooks[] = { + {DISPID_IDOMKEYBOARDEVENT_IE9_CHAR, NULL, L"char"}, + {DISPID_UNKNOWN} + }; + dispex_info_add_interface(info, IDOMKeyboardEvent_tid, hooks); +} + static const tid_t KeyboardEvent_iface_tids[] = { IDOMEvent_tid, IDOMUIEvent_tid, - IDOMKeyboardEvent_tid, 0 };
@@ -3651,6 +3659,7 @@ dispex_static_data_t KeyboardEvent_dispex = { .vtbl = &DOMKeyboardEvent_dispex_vtbl, .disp_tid = DispDOMKeyboardEvent_tid, .iface_tids = KeyboardEvent_iface_tids, + .init_info = KeyboardEvent_init_dispex_info, };
static void DOMPageTransitionEvent_init_dispex_info(dispex_data_t *info, compat_mode_t mode) diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index d74866437b0..912f6ec4582 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -3695,6 +3695,15 @@ sync_test("prototype props", function() { "stopImmediatePropagation", "stopPropagation", "target", "timeStamp", "type" ], [ "AT_TARGET", "BUBBLING_PHASE", "CAPTURING_PHASE" ]); check(HTMLUnknownElement, [ "namedRecordset", "recordset" ]); + check(KeyboardEvent, [ + "DOM_KEY_LOCATION_JOYSTICK", "DOM_KEY_LOCATION_LEFT", "DOM_KEY_LOCATION_MOBILE", + "DOM_KEY_LOCATION_NUMPAD", "DOM_KEY_LOCATION_RIGHT", "DOM_KEY_LOCATION_STANDARD", + "altKey", "char", "charCode", "ctrlKey", "getModifierState", "initKeyboardEvent", + "key", "keyCode", "locale", "location", "metaKey", "repeat", "shiftKey", "which" + ], [ + "DOM_KEY_LOCATION_JOYSTICK", "DOM_KEY_LOCATION_LEFT", "DOM_KEY_LOCATION_MOBILE", + "DOM_KEY_LOCATION_NUMPAD", "DOM_KEY_LOCATION_RIGHT", "DOM_KEY_LOCATION_STANDARD" + ]); check(MessageEvent, [ "data", "initMessageEvent", "origin", ["ports",10], "source" ], [ ["ports",10] ]); check(MouseEvent, [ "altKey", "button", "buttons", "clientX", "clientY", "ctrlKey", "fromElement", "getModifierState",