gecko-dev/widget/tests
Masayuki Nakano 370905b797 Bug 1293638 NativeKey::WillDispatchKeyboardEvent() should set alternative charCode values properly when other shift state inputs longer text r=m_kato
There are 2 bugs and this patch fixes them once.

First, NativeKey::WillDispatchKeyboardEvent() is used to setting alternative charCode values for every eKeyPress event.  However, for supporting "reserved" shortcut keys, now, it sets alternative charCode values to eKeyDown too.  However, they are really different.  eKeyPress events are fired for every character to be inputted by a key press sequence.  On the other hand, eKeyDown event is fired only once for a key sequence.  Therefore, now, NativeKey::WillDispatchKeyboardEvent() needs to set alternative charCode values for all characters inputted by the key sequence to eKeyDown event.

The other is not a new bug.  NativeKey::WillDispatchKeyboardEvent() sets the last eKeyPress event's special alternative charCode values, such as unshifted Latin character, shifted Latin character and some character which can be computed from virtual keycode.  This is performed when given index is the last index of the longest input string of the key.  However, the value includes different shift key state.  I.e., when different shift key causes longer text input, NativeKey::WillDispatchKeyboardEvent() won't set the special alternative charCode values to any eKeyPress events.  For example, when Ctrl+T is pressed with Arabic keyboard layout, its unshifted input string length is 1 but shifted input string length is 2.  Then, eKeyPress event is fired only once, but NativeKey::WillDispatchKeyboardEvent() waits second eKeyPress event.

Therefore, this patch makes the method append alternative charCodes for all remaining characters and detect the last event correctly with mCommittedCharsAndModifiers (it's used for KeyboardEvent.key value of eKeyDown event and the count of eKeyPress events is same as the value's length).

MozReview-Commit-ID: 6adUnmi5KYy

--HG--
extra : rebase_source : 8c04a3a155f2fcb9a5a8b3e9e0a176c678dc6265
2016-09-01 14:26:02 +09:00
..
unit Bug 1167627 - Part 5: Use mozinfo in widget/. 2015-08-25 14:54:00 +02:00
TestAppShellSteadyState.cpp Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm. 2016-08-08 12:18:10 +10:00
TestChromeMargin.cpp
bug586713_window.xul Bug 1207499 - Part 12: Remove use of expression closure from widget/. r=roc 2015-09-23 18:42:20 +09:00
chrome.ini Bug 1270962 - move tests which access the clipboard to subsuite 'clipboard'. r=bgrins,ryanvm,armenzg a=merge 2016-05-25 15:28:24 -04:00
chrome_context_menus_win.xul
empty_window.xul
mochitest.ini Bug 1270962 - move tests which access the clipboard to subsuite 'clipboard'. r=bgrins,ryanvm,armenzg a=merge 2016-05-25 15:28:24 -04:00
moz.build Bug 1274484 Removing TestWinTSF.cpp r=masayuki 2016-08-31 09:31:51 +09:00
native_menus_window.xul
native_mouse_mac_window.xul
standalone_native_menu_window.xul
taskbar_previews.xul
test_assign_event_data.html Bug 1253479 - [e10s] Make widget/tests/test_assign_event_data.html work under e10s. r=masayuki 2016-03-10 16:56:13 -08:00
test_bug343416.xul
test_bug413277.html
test_bug428405.xul
test_bug429954.xul
test_bug444800.xul
test_bug466599.xul
test_bug478536.xul
test_bug485118.xul
test_bug517396.xul
test_bug522217.xul
test_bug538242.xul
test_bug565392.html
test_bug586713.xul
test_bug593307.xul
test_bug596600.xul
test_bug673301.xul Bug 1251361 - "Assertion failure: cache->PreservingWrapper()" with <marquee>, navigation, adoptNode. r=smaug. 2016-03-04 17:54:10 +01:00
test_bug760802.xul Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE 2015-10-07 14:03:21 +02:00
test_bug1123480.xul
test_bug1151186.html
test_chrome_context_menus_win.xul
test_clipboard.xul Bug 1166840 - Remove unused document argument in uses of nsIClipboardHelper.copyString. r=ehsan 2015-05-21 21:49:30 +01:00
test_composition_text_querycontent.xul Bug 1218032 part.3 IMEContentObserver should notify IME of anything without script runner r=smaug 2015-11-10 11:49:05 +09:00
test_imestate.html Bug 1271115 - Merge ChromeUtils.js into EventUtils.js; r=jmaher 2016-08-25 16:57:09 +03:00
test_input_events_on_deactive_window.xul Bug 1271115 - Merge ChromeUtils.js into EventUtils.js; r=jmaher 2016-08-25 16:57:09 +03:00
test_key_event_counts.xul
test_keycodes.xul Bug 1293638 NativeKey::WillDispatchKeyboardEvent() should set alternative charCode values properly when other shift state inputs longer text r=m_kato 2016-09-01 14:26:02 +09:00
test_mouse_scroll.xul
test_native_key_bindings_mac.html Bug 1287655 - place textarea/input cursor at end of text when initialized; r=smaug 2016-07-21 14:52:49 -04:00
test_native_menus.xul
test_native_mouse_mac.xul
test_panel_mouse_coords.xul Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE 2015-10-07 14:03:21 +02:00
test_picker_no_crash.html
test_platform_colors.xul
test_plugin_input_event.html
test_plugin_scroll_consistency.html
test_position_on_resize.xul
test_secure_input.html Bug 1271115 - Merge ChromeUtils.js into EventUtils.js; r=jmaher 2016-08-25 16:57:09 +03:00
test_sizemode_events.xul
test_standalone_native_menu.xul
test_system_status_bar.xul
test_taskbar_progress.xul Bug 605813 - Re-enable test_taskbar_progress.xul on Windows. r=me 2015-10-15 18:39:28 -03:00
test_wheeltransaction.xul
utils.js
window_bug429954.xul
window_bug478536.xul
window_bug522217.xul
window_bug538242.xul
window_bug593307_centerscreen.xul
window_bug593307_offscreen.xul
window_composition_text_querycontent.xul Bug 1271115 - Merge ChromeUtils.js into EventUtils.js; r=jmaher 2016-08-25 16:57:09 +03:00
window_imestate_iframes.html
window_mouse_scroll_win.html Bug 1271115 - Merge ChromeUtils.js into EventUtils.js; r=jmaher 2016-08-25 16:57:09 +03:00
window_picker_no_crash_child.html
window_state_windows.xul
window_wheeltransaction.xul Bug 1209970 - Fire scroll events early in the refresh tick. r=mats 2015-12-17 17:19:30 -05:00