If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

gonk/nsWindow doesn't implement nsIWidget::NotifyIME()

RESOLVED INVALID

Status

()

Core
Widget: Gonk
RESOLVED INVALID
4 years ago
3 years ago

People

(Reporter: masayuki, Unassigned)

Tracking

({inputmethod})

Trunk
ARM
Gonk (Firefox OS)
inputmethod
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

gonk/nsWindow doesn't implement nsIWidget::NotifyIME().

NotifyIME() notifies IME of something events or requests:

437 // NotificationToIME is shared by nsIMEStateManager and TextComposition.
438 enum NotificationToIME {
439   // XXX We should replace NOTIFY_IME_OF_CURSOR_POS_CHANGED with
440   //     NOTIFY_IME_OF_SELECTION_CHANGE later.
441   NOTIFY_IME_OF_CURSOR_POS_CHANGED,
442   // An editable content is getting focus
443   NOTIFY_IME_OF_FOCUS,
444   // An editable content is losing focus
445   NOTIFY_IME_OF_BLUR,
446   // Selection in the focused editable content is changed
447   NOTIFY_IME_OF_SELECTION_CHANGE,
448   REQUEST_TO_COMMIT_COMPOSITION,
449   REQUEST_TO_CANCEL_COMPOSITION
450 };

At least REQUEST_TO_* should be implemented for consistency behavior between platforms.

Currently, on B2G, composition is synthesized as for testing. Therefore, they are emulated by nsIMEStateManager.
http://mxr.mozilla.org/mozilla-central/source/content/events/src/nsIMEStateManager.cpp?rev=545c76a2bf6f#592

The method would be called after bug 917322 would be fixed and modify the CompositionManager implementation for it.
Looks like that dom/inputmethod/forms.js has two jobs. One is handling some requests from IME. The other is notifying IME of content's change.

The latter looks bad copy of IMEStateManager. Duplicating the implementation causes incompatibility with Firefox OS and Firefox for Desktop and Android.

I think that not only NotifyIME(), IMEStateManager should send notifications which is wanted by forms.js and forms.js should only handle that for the latter job. And it should stop handling a lot of events and using nsIEditorObserver and MutationObserver. If so, forms.js must be much simpler and share every behavior between other platforms.
Now, we don't need to fix this bug since nsITextProcessorCallback allows to implement this in JS. (bug 917322)
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.