Clean up IME states and ensure we respond correctly

NEW
Unassigned

Status

()

Firefox for Android
Keyboards and IME
6 years ago
6 years ago

People

(Reporter: snorp, Unassigned)

Tracking

Trunk
ARM
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

The IMEState struct has two fields that together are supposed to represent the IME opened/closed state. In nsWindow::SetInputContext, we really only look at IMEState.mEnabled, but that's not really correct. The value of mOpen should be considered as well, but exactly how that should be done is pretty unclear. For instance, we seem to get mEnabled = DISABLED and mOpen = OPEN sometimes.

For plugins, we get mEnabled = PLUGIN, mOpen = OPEN_STATE_NOT_SUPPORTED whenever a plugin is focused. Flash can then explicitly request the vkb be opened or closed, and in that case we set mOpen to OPEN or CLOSED as appropriate.
OS: Mac OS X → Android
Hardware: x86 → ARM
This comment in nsIContent.h:

https://hg.mozilla.org/mozilla-central/file/2552b0541f87/content/base/public/nsIContent.h#l580

says IMEState should never have set (DISABLED and (OPEN or CLOSED)), which implies (DISABLED and OPEN_STATE_NOT_SUPPORTED) is the only valid DISABLED state.
You need to log in before you can comment on or make changes to this bug.