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.
Pushed by firstname.lastname@example.org: 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
You need to log in before you can comment on or make changes to this bug.