Closed Bug 902830 Opened 11 years ago Closed 11 years ago

Emit mozChromeEvent to notify Gaia keyboard manager for input focus change

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rudyl, Assigned: janjongboom)

References

Details

Attachments

(1 file, 3 obsolete files)

The latest version IME WebAPI is here,
https://wiki.mozilla.org/Talk:WebAPI/KeboardIME

We would need Gecko to send mozChromeEvent to notify Gaia keyboard manager (in System app) so that it could launch the keyboard app in the new IME framework.

This is to minimize the "manager" part of the IME WebAPI to only the methods that should be exposed to keyboard (IME) apps.
Assignee: nobody → janjongboom
Attached patch 902830.diff (obsolete) (deleted) — Splinter Review
This implements the chrome events as described in https://wiki.mozilla.org/Talk:WebAPI/KeboardIME. We can't pass the whole inputcontext object through, so based on discussion with :RudyL we only pass in inputType which should be enough for the keyboard manager.
Attachment #787399 - Flags: review?(rlu)
Comment on attachment 787399 [details] [diff] [review]
902830.diff

I would suggest we slightly change the event type as follows,
http://mzl.la/13PBy3L

And I'd like to ask for Yuan's help to review this.
Attachment #787399 - Flags: review?(rlu) → review?(xyuan)
Makes sense, I'll await Yuans review and change the names afterwards.
Comment on attachment 787399 [details] [diff] [review]
902830.diff

Review of attachment 787399 [details] [diff] [review]:
-----------------------------------------------------------------

I give r=-.
The `focus change` event should be simply sent from forms.js to the system app without going through navigator.mozInputMethod and Keyboard.jsm. With this patch, the system app may received two same events, one from the navigator of systema app and the other from the navigator of keyboard app.
Attachment #787399 - Flags: review?(xyuan) → review-
True, sorry, I was caught up in trying to pass inputcontext through, which doesn't make sense in this case :-)
Attached patch 902830_v2.diff (obsolete) (deleted) — Splinter Review
Attachment #787399 - Attachment is obsolete: true
Attached patch 902830_v2.diff (obsolete) (deleted) — Splinter Review
Attachment #787428 - Attachment is obsolete: true
Comment on attachment 787429 [details] [diff] [review]
902830_v2.diff

This patch will emit the chrome event directly when receiving a message from forms.js. All communication between forms.js, Keyboard and Chrome code is in keyboard.jsm so I have put it here as well.
Attachment #787429 - Flags: review?(xyuan)
Comment on attachment 787428 [details] [diff] [review]
902830_v2.diff

Review of attachment 787428 [details] [diff] [review]:
-----------------------------------------------------------------

r=me. The patch is quite clear and straightforward.

::: b2g/components/Keyboard.jsm
@@ +164,5 @@
>    },
>  
> +  handleFocusChange: function keyboardHandleFocusChange(msg) {
> +    dump('~Keyboard.jsm handleFocusChange\n')
> +    dump(JSON.stringify(msg.data) + '\n');

nit: remove logs only for debug.
Attachment #787428 - Attachment is obsolete: false
Attachment #787428 - Flags: review+
Attachment #787428 - Attachment is obsolete: true
Attachment #787429 - Flags: review?(xyuan) → review+
Jan Jongboom <janjongboom@gmail.com>
Bug 902830 - Emit chrome event when input focus change happens. r=yxl
Keywords: checkin-needed
applying 902830
patching file b2g/components/Keyboard.jsm
bad hunk #2 @@ -158,16 +158,35 @@ let Keyboard = {
 (24 16 35 35)
patch failed, rejects left in working dir
errors during apply, please fix and refresh 902830

Also, please generate patches with the metadata needed for checkin. It makes life much easier for people like myself trying to land them on your behalf.
https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
Keywords: checkin-needed
Jan, do you need help with regenerating the patch?
Flags: needinfo?(janjongboom)
Attached patch 902830_v3.diff (deleted) — Splinter Review
Rebased the patch + added commit info
Attachment #787429 - Attachment is obsolete: true
Flags: needinfo?(janjongboom)
Jan, thanks for the patch. It's ready to land and add checkin-needed keyword.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a05dfe36c4de
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: