Closed Bug 1753173 Opened 2 years ago Closed 2 years ago

[GTK] Failed to handle composition start signal which is sent immediately after setting IME focus

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

(Keywords: inputmethod)

Attachments

(2 files)

On Linux, IME may start composition immediately after getting focus and keep it until blur. In this case, IMContextWrapper fails to handle starting composition because ContentCacheInParent returns error for any query.

While I'm debugging bug 1735227, I found this bug. And for the debugging,
current IMEContentObserver's logging was not enough. Therefore, I wrote
this patch first.

Note that IMEContentObserver:: is not necessary in the log because it's
log module name is IMEContentObserver, therefore, it appears twice in
each line under current log format. Therefore, this patch removes it.

Additionally, I moved "position change" notification handling to "verbose"
because it's really noisy in web apps which update its content automatically
like SNS. So, IMEContentObserver:4,sync is useful in most cases, but can
see the detail with IMEContentObserver:5,sync.

Depends on D137522

Currently, it sets "input-purpose" and "input-hints" and notify IME of focus
at updating InputContext. This occurs before receiving NOTIFY_IME_OF_FOCUS.
Therefore, at the moment, IMContextWrapper cannot access content cache, but
IME may query it. E.g., IME may start composition immediately
(ibus-pinyin 1.5.0-6 does it).

For avoiding the trouble, IMContextWrapper should notify IME of focus when
and only when it receives NOTIFY_IME_OF_FOCUS.

Depends on D137609

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/e6a334638505
part 1: Improve logging code of `IMEContentObserver` r=m_kato
https://hg.mozilla.org/integration/autoland/rev/1ecdb0291382
part 2: Make `IMContextWrapper` set IME focus at receiving `NOTIFY_IME_OF_FOCUS` r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Regressions: 1765091
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: