gecko-dev/widget/tests
Masayuki Nakano ed18f14624 Bug 1036008 - Use alternative ASCII capable keyboard layout information to decide keyCode even if the key produces an ASCII punctuation character r=smaug
Gecko decides keyCode from an ASCII character which is produced by the key
by itself or with Shift on active keyboard layout or alternative ASCII capable
keyboard layout if active keyboard layout isn't ASCII capable.  However, we've
ignored alternative ASCII capable keyboard layout's character if both the
key itself and with Shift don't produce ASCII alphabet nor ASCII numeral,
i.e., ASCII punctuation characters are not used in alternative ASCII capable
keyboard layout because of avoiding mapping a keyCode value to 2 or more keys.

However, setting 0 to keyCode value makes Firefox unusable with some web
applications which are aware of neither KeyboardEvent.key nor
KeyboardEvent.code.  So, even if we map same keyCode value to a key, we should
avoid setting keyCode value to 0 as far as possible.

This patch's approach is, we behave same keyCode value as the alternative ASCII
capable keyCode is selected when computed keyCode value of active keyboard
layout is 0.  This means that we will make some language users whose keyboard
layout for their language is not ASCII capable can use global web services
which support US keyboard layout of Firefox since the new keyCode values
are mostly computed with US layout on Windows or actual alternative ASCII
capable keyboard layout on macOS and Linux.  In other words, we cannot improve
compatibility with web applications which don't support Firefox  by this patch
since our keyCode values are really different from Chrome's.  So, unfortunately,
if we'd use exactly same keyCode computation as Chromium, we'd break
compatibility with existing web applications which are aware of Firefox since
it's necessary to check UA name or something before using keyCode values.

Note that the most important difference between Windows and the others is,
such keyCode value is computed with alternative ASCII capable keyboard
layout on macOS and Linux but only on Windows, it's computed with OEM virtual
keycode.  This means that only on Windows, the keyCode value may be different
from actual alternative ASCII capable keyboard layout's keyCode.

MozReview-Commit-ID: As289r9wp6i

--HG--
extra : rebase_source : 66181403dbe8ca8dab893edc8f4eec1991d544d0
2018-02-16 15:54:07 +09:00
..
unit Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
TestAppShellSteadyState.cpp Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00
TestChromeMargin.cpp
bug586713_window.xul
chrome.ini
chrome_context_menus_win.xul
empty_window.xul
file_bug596600.html
file_input_events_on_deactive_window.html
file_secure_input.html
mochitest.ini
moz.build Bug 1417653 - clean up a few moz.build files that have typos. r=gbrown 2017-11-16 08:56:51 -05:00
native_menus_window.xul
native_mouse_mac_window.xul
standalone_native_menu_window.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
taskbar_previews.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_assign_event_data.html Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
test_bug343416.xul
test_bug413277.html
test_bug428405.xul
test_bug429954.xul
test_bug444800.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_bug466599.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_bug478536.xul
test_bug485118.xul
test_bug517396.xul Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
test_bug522217.xul
test_bug538242.xul Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
test_bug565392.html
test_bug586713.xul
test_bug593307.xul
test_bug596600.xul Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
test_bug673301.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_bug760802.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_bug1123480.xul Bug 1433030 - Stop nsTransferable writing to /tmp in PB windows r=jdm 2018-02-12 10:34:00 +02:00
test_bug1151186.html
test_chrome_context_menus_win.xul
test_clipboard.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_composition_text_querycontent.xul
test_imestate.html
test_input_events_on_deactive_window.xul Bug 1438157 - part 2: Remove unnecessary second argument of EventUtils.synthesizeKey() r=smaug 2018-02-15 04:15:39 +09:00
test_key_event_counts.xul
test_keycodes.xul Bug 1036008 - Use alternative ASCII capable keyboard layout information to decide keyCode even if the key produces an ASCII punctuation character r=smaug 2018-02-16 15:54:07 +09:00
test_mouse_scroll.xul
test_native_key_bindings_mac.html
test_native_menus.xul
test_native_mouse_mac.xul
test_panel_mouse_coords.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_picker_no_crash.html
test_platform_colors.xul Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
test_plugin_input_event.html
test_plugin_scroll_consistency.html
test_position_on_resize.xul
test_secure_input.html
test_sizemode_events.xul Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
test_standalone_native_menu.xul
test_system_status_bar.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_taskbar_progress.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08: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 1438157 - part 2: Remove unnecessary second argument of EventUtils.synthesizeKey() r=smaug 2018-02-15 04:15:39 +09:00
window_imestate_iframes.html
window_mouse_scroll_win.html
window_picker_no_crash_child.html
window_state_windows.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
window_wheeltransaction.xul