gecko-dev/widget/gtk
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
..
compat
compat-gtk3
crashtests Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz 2017-05-21 17:15:00 +08:00
mozgtk Bug 1435965 - Stub gtk_widget_set_valign in mozgtk2; r=karlt 2018-02-06 10:07:07 +01:00
mozwayland Bug 1409707 - [Wayland] - provide library shell, r=jhorak 2017-10-18 14:34:27 +02:00
CompositorWidgetChild.cpp Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander 2017-07-06 17:45:34 -07:00
CompositorWidgetChild.h Bug 1425842 - Rename X11CompositorWidget to GtkCompositorWidget and implement WindowSurfaceWayland support, r=jhorak 2017-12-18 20:20:02 +01:00
CompositorWidgetParent.cpp Bug 1425842 - Rename X11CompositorWidget to GtkCompositorWidget and implement WindowSurfaceWayland support, r=jhorak 2017-12-18 20:20:02 +01:00
CompositorWidgetParent.h Bug 1425842 - Rename X11CompositorWidget to GtkCompositorWidget and implement WindowSurfaceWayland support, r=jhorak 2017-12-18 20:20:02 +01:00
GtkCompositorWidget.cpp Bug 1425842 - Rename X11CompositorWidget to GtkCompositorWidget and implement WindowSurfaceWayland support, r=jhorak 2017-12-18 20:20:02 +01:00
GtkCompositorWidget.h Bug 1425842 - Rename X11CompositorWidget to GtkCompositorWidget and implement WindowSurfaceWayland support, r=jhorak 2017-12-18 20:20:02 +01:00
IMContextWrapper.cpp Bug 1278282 - Remove the 'MOZ_WIDGET_GTK == 2' defines r=karlt,lsalzman 2018-01-10 08:52:04 +01:00
IMContextWrapper.h Bug 1387357 - IMContextWrapper::DispatchCompositionStart() should stop dispatching eCompositionStart if dispatching preceding eKeyDown event causes changing active IM context r=m_kato 2017-09-04 20:18:43 +09:00
InProcessGtkCompositorWidget.cpp Bug 1425842 - Rename X11CompositorWidget to GtkCompositorWidget and implement WindowSurfaceWayland support, r=jhorak 2017-12-18 20:20:02 +01:00
InProcessGtkCompositorWidget.h Bug 1425842 - Rename X11CompositorWidget to GtkCompositorWidget and implement WindowSurfaceWayland support, r=jhorak 2017-12-18 20:20:02 +01:00
NativeKeyBindings.cpp Bug 1278282 - Remove the 'MOZ_WIDGET_GTK == 2' defines r=karlt,lsalzman 2018-01-10 08:52:04 +01:00
NativeKeyBindings.h
PCompositorWidget.ipdl
PlatformWidgetTypes.ipdlh Bug 1425842 - Rename X11CompositorWidget to GtkCompositorWidget and implement WindowSurfaceWayland support, r=jhorak 2017-12-18 20:20:02 +01:00
ScreenHelperGTK.cpp Bug 1350643 - Part 5.2: Use per-monitor gdkScaleFactor to set contentsScaleFactor & nsWindow::GetDesktopToDeviceScale if running in gtk/wayland. r=karlt 2017-06-16 11:13:59 +08:00
ScreenHelperGTK.h Bug 1430725 - Undefine X11 None at ScreenHelperGTK.h as it conflicts our JS code, r=jhorak 2018-01-16 10:09:36 +01:00
WakeLockListener.cpp Bug 1398539: Inhibit screensaver with XScreenSaverSuspend r=karlt 2017-09-13 18:28:51 -06:00
WakeLockListener.h Bug 1412258 - Get rid of ipc/dbus, r=smaug 2017-10-27 18:41:40 +02:00
WidgetStyleCache.cpp Bug 1408335 - Render titlebar icons as themed ones, r=jhorak 2018-01-25 11:13:12 +01:00
WidgetStyleCache.h Bug 1408335 - Render titlebar icons as themed ones, r=jhorak 2018-01-25 11:13:12 +01:00
WidgetTraceEvent.cpp
WidgetUtilsGtk.cpp
WidgetUtilsGtk.h
WindowSurfaceProvider.cpp Bug 1430018 - Don't use nsWindow::IsX11Display() as it's not implemented, r=jhorak 2018-01-12 10:30:38 +01:00
WindowSurfaceProvider.h Bug 1425842 - Rename X11CompositorWidget to GtkCompositorWidget and implement WindowSurfaceWayland support, r=jhorak 2017-12-18 20:20:02 +01:00
WindowSurfaceWayland.cpp Bug 1435244 - don't call wl_display_roundtrip_queue() with null wl_queue but rather use wl_display_roundtrip(), r=jhorak 2018-02-02 14:42:32 +01:00
WindowSurfaceWayland.h Bug 1436263 - Part 1: Replace `final override` virtual function specifiers with just `final`. r=froydnj 2018-02-05 22:46:57 -08:00
WindowSurfaceX11.cpp
WindowSurfaceX11.h
WindowSurfaceX11Image.cpp Bug 1404323 - limit WindowSurfaceX11Image::Commit to clip bounds. r=gankro 2017-09-29 23:59:40 -04:00
WindowSurfaceX11Image.h
WindowSurfaceXRender.cpp
WindowSurfaceXRender.h
gtk2drawing.c Bug 1417751 - Implement a new value inner-spin-button to -moz-appearance on all platforms except Android. r=mats 2017-11-29 10:43:13 +08:00
gtk3drawing.cpp Bug 1408335 - Render titlebar icons as themed ones, r=jhorak 2018-01-25 11:13:12 +01:00
gtkdrawing.h Bug 1408335 - Render titlebar icons as themed ones, r=jhorak 2018-01-25 11:13:12 +01:00
maiRedundantObjectFactory.c
maiRedundantObjectFactory.h
moz.build Bug 1430725 - Include nsClipboardWayland.cpp to wayland build, r=jhorak 2018-01-16 10:08:25 +01:00
mozcontainer.cpp Bug 1430728 - [Wayland] - position wl_subsurface when attached GtkWidget allocation changes, r=jhorak 2018-01-16 10:26:58 +01:00
mozcontainer.h Bug 1278282 - Ride along Remove some trailing whitespaces r=lsalzman 2017-12-19 11:38:59 +01:00
nsAppShell.cpp Bug 1278282 - Replace #if (MOZ_WIDGET_GTK == 3) by #ifdef MOZ_WIDGET_GTK r=lsalzman 2018-01-09 11:51:07 +01:00
nsAppShell.h Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00
nsApplicationChooser.cpp
nsApplicationChooser.h
nsBidiKeyboard.cpp
nsBidiKeyboard.h
nsCUPSShim.cpp
nsCUPSShim.h
nsClipboard.cpp Bug 1278282 - Ride along Remove some trailing whitespaces r=lsalzman 2017-12-19 11:38:59 +01:00
nsClipboard.h Bug 1278282 - Ride along Remove some trailing whitespaces r=lsalzman 2017-12-19 11:38:59 +01:00
nsClipboardWayland.cpp Bug 1434572 - [Wayland] Implement Gtk+ clipboard shortcut for copy->paste between Firefox windows, r=jhorak 2018-02-01 11:23:01 +01:00
nsClipboardWayland.h Bug 1434572 - [Wayland] Implement Gtk+ clipboard shortcut for copy->paste between Firefox windows, r=jhorak 2018-02-01 11:23:01 +01:00
nsClipboardX11.cpp Bug 1278282 - Replace #if (MOZ_WIDGET_GTK == 3) by #ifdef MOZ_WIDGET_GTK r=lsalzman 2018-01-09 11:51:07 +01:00
nsClipboardX11.h Bug 1417890 - Use nsRetrievalContextWayland for Wayland displays, r=jhorak 2017-12-18 13:37:46 +01:00
nsColorPicker.cpp Bug 1278282 - Ride along Remove some trailing whitespaces r=lsalzman 2017-12-19 11:38:59 +01:00
nsColorPicker.h Bug 1278282 - Ride along Remove some trailing whitespaces r=lsalzman 2017-12-19 11:38:59 +01:00
nsDeviceContextSpecG.cpp Bug 1278282 - Replace #if (MOZ_WIDGET_GTK == 3) by #ifdef MOZ_WIDGET_GTK r=lsalzman 2018-01-09 11:51:07 +01:00
nsDeviceContextSpecG.h Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj 2018-02-08 21:22:43 -08:00
nsDragService.cpp Bug 1424107 - Pass the triggering principal URI across processes in drag-and-drop. r=smaug 2018-02-09 10:43:53 +09:00
nsDragService.h Bug 1424107 - Pass the triggering principal URI across processes in drag-and-drop. r=smaug 2018-02-09 10:43:53 +09:00
nsFilePicker.cpp Bug 1433357 - Part 2: Suppress upload-file-dialog proxy bypass in Linux r=karlt 2018-02-02 14:44:00 +02:00
nsFilePicker.h Bug 1278282 - Replace #if (MOZ_WIDGET_GTK == 3) by #ifdef MOZ_WIDGET_GTK r=lsalzman 2018-01-09 11:51:07 +01:00
nsGTKToolkit.h Bug 1278282 - Ride along Remove some trailing whitespaces r=lsalzman 2017-12-19 11:38:59 +01:00
nsGtkCursors.h
nsGtkKeyUtils.cpp 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
nsGtkKeyUtils.h 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
nsGtkUtils.h
nsIImageToPixbuf.h
nsIdleServiceGTK.cpp Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8 2018-02-12 15:44:40 -05:00
nsIdleServiceGTK.h Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8 2018-02-12 15:44:40 -05:00
nsImageToPixbuf.cpp
nsImageToPixbuf.h
nsLookAndFeel.cpp Backed out 2 changesets (bug 1431337) for M15 failures in parser/htmlparser/tests/mochitest/test_img_picture_preload.html on a CLOSED TREE 2018-01-24 18:09:50 +02:00
nsLookAndFeel.h Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj 2018-02-08 21:22:43 -08:00
nsNativeThemeGTK.cpp Bug 1408335 - Render titlebar icons as themed ones, r=jhorak 2018-01-25 11:13:12 +01:00
nsNativeThemeGTK.h Bug 1431337 - Scale content for the actual monitor, not the first one; r=stransky 2018-01-18 11:52:59 +01:00
nsPSPrinters.cpp Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj. 2017-07-31 14:28:48 +10:00
nsPSPrinters.h
nsPrintDialogGTK.cpp Bug 1278282 - Remove the 'MOZ_WIDGET_GTK == 2' defines r=karlt,lsalzman 2018-01-10 08:52:04 +01:00
nsPrintDialogGTK.h
nsPrintSettingsGTK.cpp Bug 1278282 - Ride along Remove some trailing whitespaces r=lsalzman 2017-12-19 11:38:59 +01:00
nsPrintSettingsGTK.h Bug 1278282 - Ride along Remove some trailing whitespaces r=lsalzman 2017-12-19 11:38:59 +01:00
nsPrintSettingsServiceGTK.cpp Bug 144114 part 2 - Rename nsPrintOptions and its subclasses to nsPrintSettingsService*. r=bobowen 2017-12-19 10:42:15 +00:00
nsPrintSettingsServiceGTK.h Bug 144114 part 3 - Clean up the headers of the nsPrintSettingsService subclasses. r=bobowen 2017-12-19 11:05:37 +00:00
nsSound.cpp Bug 1416712 - Remove nsPaperPS as it seems to be dead code r=karlt 2017-11-13 11:24:47 +01:00
nsSound.h Bug 1278282 - Ride along Remove some trailing whitespaces r=lsalzman 2017-12-19 11:38:59 +01:00
nsToolkit.cpp Bug 1278282 - Ride along Remove some trailing whitespaces r=lsalzman 2017-12-19 11:38:59 +01:00
nsWidgetFactory.cpp Bug 144114 part 2 - Rename nsPrintOptions and its subclasses to nsPrintSettingsService*. r=bobowen 2017-12-19 10:42:15 +00:00
nsWindow.cpp Bug 1417847 - [CSD] Doubleclick event on draggable area restores/maximizes window; r=stransky 2018-02-15 09:50:56 +01:00
nsWindow.h Bug 1417847 - [CSD] Doubleclick event on draggable area restores/maximizes window; r=stransky 2018-02-15 09:50:56 +01:00