Android keyboard doesn't show up in OOP apps

NEW
Unassigned

Status

B2GDroid Graveyard
General
P2
normal
3 years ago
3 years ago

People

(Reporter: fabrice, Unassigned)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
With gaia keyboard disabled, we only get the Android one in the parent process.

It looks like no one is calling http://mxr.mozilla.org/mozilla-central/source/dom/ipc/TabParent.cpp#2536
(Reporter)

Comment 1

3 years ago
Created attachment 8658890 [details] [diff] [review]
android-keyboard-oop.patch

With this patch we get the keyboard to show up, but entering text doesn't work as expected: for instance typing the sequence 'e', 'r', 't' we end up with 'eerert' in the input field, ie. we buffer all the previous characters and empty the buffer at each new key input.

Masayuki, any idea what is going on here?
Flags: needinfo?(masayuki)
(In reply to [:fabrice] Fabrice Desré from comment #0)
> With gaia keyboard disabled, we only get the Android one in the parent
> process.
> 
> It looks like no one is calling
> http://mxr.mozilla.org/mozilla-central/source/dom/ipc/TabParent.cpp#2536

Odd, you might be able to log the behavior of IMEStateManager with NSPR_LOG_MODULES=IMEStateManager:5, but I'm not sure if it's available on Firefox for Android.

(In reply to [:fabrice] Fabrice Desré from comment #1)
> Created attachment 8658890 [details] [diff] [review]
> android-keyboard-oop.patch
> 
> With this patch we get the keyboard to show up, but entering text doesn't
> work as expected: for instance typing the sequence 'e', 'r', 't' we end up
> with 'eerert' in the input field, ie. we buffer all the previous characters
> and empty the buffer at each new key input.

Although, I don't know what is B2GDROID, if you make MOZ_CROSS_PROCESS_IME true, PuppetWidget won't send any notifications to its parent process. Therefore, widget/android/nsWindow.cpp which handles native IME events won't work. Looks like you try to make it false, right? If so, it's a bug of the nsWindow.cpp. Without my review, widget/android/nsWindow.cpp became to use XP object directly such as TextComposition class. In e10s mode, such code won't work. So, nsWindow for Android isn't e10s-aware.
Flags: needinfo?(masayuki)
(Reporter)

Comment 3

3 years ago
Thanks Masayuki,

Yes I made MOZ_CROSS_PROCESS_IME false. Do you know how much work it would be to make Android's nsWindow IME code e10s-aware? Or if there's another solution?
Flags: needinfo?(masayuki)
> Do you know how much work it would be to make Android's nsWindow IME code e10s-aware?

I'm not sure because I'm not so familiar with IME on Android. Although, I'm struggling with e10s for a couple of this months on desktop OSes.

Even if nsWindow will stop using the XP objects, we may need to hack ContntCache.cpp which caches content information *before* IME tries to query that. So, we need to check that what does IME for Android want to query. If it's not cached in ContentCacheInParent, we need to add them to the class.
Flags: needinfo?(masayuki)

Updated

3 years ago
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.