Masayuki Nakano afaf41dcef Bug 1879765 - part 2: Make BrowserChild store the last code value of consumed eKeyDown event r=smaug
The builtin legacy IME of Windows to type a Unicode with typing a code point
causes consumed `eKeyDown` events while typing the code point, i.e., without
`eKeyPress` (FYI: The consumed state is not exposed to the web, it's used only
in chrome UI for the compatibility with Chrome).  Then, `BrowserChild` store
whether the last `eKeyDown` was consumed or not to prevent the following
`eKeyPress`.  Finally, a `eKeyPress` event is fired to input the Unicode
character after `eKeyUp` for `Alt`.  The stored value is set to new value only
when another `eKeyDown` event is sent from the parent process.  Therefore,
the last digit inputting `eKeyDown` causes `BrowserChild` thinking the last
`eKeyDown` is consumed so that the last `eKeyPress` is not dispatched.

This patch makes `BrowserChild` to store the `code` value of the last consumed
`eKeyDown` and check the `code` value to consider whether coming `eKeyPress`
should be or not be dispatched to `PresShell` and the DOM.

Differential Revision: https://phabricator.services.mozilla.com/D207957
2024-05-16 02:36:03 +00:00
..