Closed
Bug 844290
Opened 12 years ago
Closed 12 years ago
Refactor key event handling code
Categories
(Firefox for Android Graveyard :: Keyboards and IME, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 22
People
(Reporter: jchen, Assigned: jchen)
References
Details
Attachments
(1 file, 1 obsolete file)
7.20 KB,
patch
|
jchen
:
review+
|
Details | Diff | Splinter Review |
As part of the key binding work, I did a refactoring of our key event handling code. I don't see a reason why we need two separate methods to handle key down and key up, so I combined them into one.
Assignee | ||
Comment 1•12 years ago
|
||
This patch combines processKeyDown() and processKeyUp() into one processKey(), because the two methods shared much of the same code. I also isolated various key event workarounds into separate methods.
Attachment #718052 -
Flags: review?(cpeterson)
Comment 2•12 years ago
|
||
Comment on attachment 718052 [details] [diff] [review]
Refactor GeckoInputConnection key handling code (v1)
Review of attachment 718052 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM
::: mobile/android/base/GeckoInputConnection.java
@@ +663,5 @@
> + }
> + return true;
> + }
> +
> + private boolean skipKeyListener(int keyCode, KeyEvent event) {
Let's call this method something like `shouldSkipKeyListener()`.
@@ +723,3 @@
> mEditableClient.sendEvent(GeckoEvent.createKeyEvent(event));
> + if (skip) {
> + TextKeyListener.adjustMetaAfterKeypress(uiEditable);
Can you add a brief comment explaining why or when we need to skip and adjust the meta state?
Attachment #718052 -
Flags: review?(cpeterson) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Addressed review comments and fixed a bug where meta states are adjusted on key up, which is incorrect (Android only adjusts meta states on key down)
Attachment #718052 -
Attachment is obsolete: true
Attachment #719513 -
Flags: review+
Assignee | ||
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•