Move key event handlers of nsWindow to nsGtkKeyUtils to make them loggable

RESOLVED FIXED in Firefox 66

Status

()

enhancement
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla66
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox66 fixed)

Details

Attachments

(2 attachments)

Currently, widget/gtk/nsWindow.cpp dispatches keyboard events with some complicated code.  However, there is no logging code for them.  Therefore, we cannot get a log to debug of bugs which can reproduce only in some environments like bug 1498823. So, we should move them into nsGtkKeyUtils.cpp and make them output their log.
Move all implementation of nsWindow::OnKeyPress() and nsWindow::OnKeyRelease()
into KeymapWrapper because the implementation is a little bit complicated
but not loggable.  When we get bug reports which depend on environment around
IME/key handling like bug 1498823, it's useful to log those methods behavior
too.
We haven't logged KeymapWrapper::HandleKeyPressEvent() nor
KeymapWrapper::HandleKeyReleaseEvent().  Therefore, this patch makes them
put their behavior into the log.

Additionally, KeymapWrapper::InitKeyEvent() does not log enough the result
of initialized WidgetkeyboardEvent.  This patch makes it log more.

With those changes, we can get the log of:
- detail of dispatched keyboard events
- which key event didn't cause keyboard events
- which keyboard event was consumed

Note that the utility methods are copied from widget/windows.  Perhaps,
we should create XP logging helper for keyboard/IME later.

Comment 3

6 months ago
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/7f3d73861dfe
part 1: Move implementation of nsWindow::OnKeyPress() and nsWindow::OnKeyRelease() into KeymapWrapper r=karlt
https://hg.mozilla.org/integration/autoland/rev/e80f4801231c
part 2: Log more in KeymapWrapper r=m_kato

Comment 4

6 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.