Commit Graph
90 Commits
Author SHA1 Message Date
Jim Chen fce3626113 Bug 1216666 - Only send key events for single-character strings; r=esawin
GeckoEditable currently synthesizes key events when committing strings,
to improve web compatibility. However, synthesizing keys is causing
performance problems when the string is long. This patch limits key
synthesis to single-character strings. For longer strings, we commit the
string as a whole. We have other ways of ensuring web compatibility now
(sending dummy key events), so this restriction should not cause
regressions.
2015-11-03 11:53:58 -05:00
Jim Chen ece29bfe87 Bug 1216666 - Update composition as part of replacing text or changing span; r=esawin
Currently, GeckoEditable periodically fires update composition events to
update the Gecko composition styling. To make the code more efficient
and more robust in dealing with content JS code, this patch merges these
events into events like replacing text, setting span, and removing span.
As a result, a setComposingText call now results in one replacing text
event instead of a replacing text event plus an update composition event.
2015-11-03 11:53:58 -05:00
Jim Chen 80b3e03ddf Bug 1216666 - Separate out Gecko selection from Java selection; r=esawin
Currently, the Gecko-side selection tries to mirror the Java-side
selection, but this is difficult because the Gecko selection has some
subtle but important behavior differences from the Java selection.
This patch separates out Gecko selection from Java selection so that
they're only loosely coupled. The two selections will periodically
synchronize through events and notifications, but at certain times they
may fall out-of-sync, for example when a composition is active. This
shouldn't affect functionality in a major way, and it's an acceptable
trade-off.
2015-11-03 11:53:57 -05:00
Jim Chen 1dbb85a583 Bug 1199658 - Don't commit Java composition when Gecko side commits its composition; r=esawin
Right now, when the Gecko side commits its composition, we notify the
Java side and the Java side commits its composition as well. However,
some keyboards have trouble dealing with us manually committing the
composition. To better support these keyboards, this patch makes it so
that even if the Gecko composition is committed, the Java composition
is still kept. Because the Gecko composition on Android is used only for
display purposes, it doesn't matter too much when the Gecko composition
is out-of-sync with the Java composition.
2015-10-27 14:22:05 -04:00
Jim Chen c44aaa45da Bug 1211704 - Let GeckoEditable call disposeNative; r=esawin
Right now we call disposeNative on GeckoEditable in the
nsWindow::Natives destructor. However, we may still have pending native
calls in the event queue at that point, and these events will cause
exceptions when handled. This patch makes GeckoEditable call
disposeNative, after ensuring there's no pending calls.
2015-10-22 17:45:47 -04:00
Jim Chen 28e11d66c2 Bug 1211704 - Convert IME events to native calls; r=esawin
Remove IME events from GeckoEvent and use the newly added native calls
in GeckoEditable.
2015-10-22 17:45:46 -04:00
Jim Chen 136f9dce77 Bug 1211704 - Add GeckoEditable native methods; r=esawin
These native methods will replace the IME events used by GeckoEditable.
2015-10-22 17:45:46 -04:00
Jim Chen b1217e02f6 Bug 1210585 - Add native calls for key events; r=esawin
This patch adds a native call to GeckoEditable that will handle key
events instead of using GeckoEvent.KEY_EVENT.
2015-10-22 17:45:46 -04:00
Jim Chen 59a51b10ff Bug 1209574 - Switch GeckoInputConnection for each new GeckoView; r=esawin
The GeckoEditable instance doesn't change for each nsWindow instance.
However, because a GeckoInputConnection is associated with a GeckoView,
when we create a new GeckoView, we need to attach a new
GeckoInputConnection to the existing nsWindow's GeckoEditable. This
patch makes us do that inside nsWindow::Natives::Open by calling
GeckoEditable.OnViewChange.
2015-10-08 15:25:49 -04:00
Jim Chen 615d73741d Bug 1209574 - Move GeckoEditable management to nsWindow; r=esawin
This patch removes the GeckoEditable code in GeckoAppShell, and make
nsWindow create a GeckoEditable for itself when opening a window.
Instead of calling GeckoAppShell, nsWindow can now call GeckoEditable
methods directly.
2015-10-08 15:25:49 -04:00
Jim Chen 89c212b5ad Bug 1209574 - Move InputConnectionHandler out of gfx package; r=esawin
InputConnectionHandler really doesn't belong in the gfx package, and
the code to call key event handlers really doesn't belong in LayerView.
This patch refactors things, so that InputConnectionHandler is renamed
to org.mozilla.gecko.InputConnectionListener, and the interface is now
used by GeckoView instead of by LayerView.
2015-10-08 15:25:49 -04:00
Carsten "Tomcat" Book f3ff86678f Backed out changeset 3c7265546800 (bug 1209574) for Android Perma Failures 2015-10-08 10:06:35 +02:00
Carsten "Tomcat" Book bc9700227e Backed out changeset 161f9ab0c5e7 (bug 1209574) for Android Perma Failures 2015-10-08 10:06:19 +02:00
Carsten "Tomcat" Book aef88befe4 Backed out changeset 6763177287ca (bug 1209574) for Android perma failures 2015-10-08 10:05:44 +02:00
Jim Chen 5f1d1a41fe Bug 1209574 - Switch GeckoInputConnection for each new GeckoView; r=esawin
The GeckoEditable instance doesn't change for each nsWindow instance.
However, because a GeckoInputConnection is associated with a GeckoView,
when we create a new GeckoView, we need to attach a new
GeckoInputConnection to the existing nsWindow's GeckoEditable. This
patch makes us do that inside nsWindow::Natives::Open by calling
GeckoEditable.OnViewChange.
2015-10-08 01:13:00 -04:00
Jim Chen ee4a7e3b4a Bug 1209574 - Move GeckoEditable management to nsWindow; r=esawin
This patch removes the GeckoEditable code in GeckoAppShell, and make
nsWindow create a GeckoEditable for itself when opening a window.
Instead of calling GeckoAppShell, nsWindow can now call GeckoEditable
methods directly.
2015-10-08 01:12:59 -04:00
Jim Chen 1abaacc48b Bug 1209574 - Move InputConnectionHandler out of gfx package; r=esawin
InputConnectionHandler really doesn't belong in the gfx package, and
the code to call key event handlers really doesn't belong in LayerView.
This patch refactors things, so that InputConnectionHandler is renamed
to org.mozilla.gecko.InputConnectionListener, and the interface is now
used by GeckoView instead of by LayerView.
2015-10-08 01:12:58 -04:00
Wes Kocher e26872cd09 Backed out 5 changesets (bug 1209574) for android tpn bustage
Backed out changeset fb1f06793a67 (bug 1209574)
Backed out changeset 5f0b32b1acc4 (bug 1209574)
Backed out changeset 657332ea4f59 (bug 1209574)
Backed out changeset 9d2c7ed9cd87 (bug 1209574)
Backed out changeset 8376124b6a0c (bug 1209574)
2015-10-07 09:04:39 -07:00
Jim Chen 201d56a05b Bug 1209574 - Switch GeckoInputConnection for each new GeckoView; r=esawin
The GeckoEditable instance doesn't change for each nsWindow instance.
However, because a GeckoInputConnection is associated with a GeckoView,
when we create a new GeckoView, we need to attach a new
GeckoInputConnection to the existing nsWindow's GeckoEditable. This
patch makes us do that inside nsWindow::Natives::Open by calling
GeckoEditable.OnViewChange.
2015-10-07 08:57:31 -04:00
Jim Chen 2629a2462f Bug 1209574 - Move GeckoEditable management to nsWindow; r=esawin
This patch removes the GeckoEditable code in GeckoAppShell, and make
nsWindow create a GeckoEditable for itself when opening a window.
Instead of calling GeckoAppShell, nsWindow can now call GeckoEditable
methods directly.
2015-10-07 08:57:31 -04:00
Jim Chen 9b364c9f49 Bug 1209574 - Move InputConnectionHandler out of gfx package; r=esawin
InputConnectionHandler really doesn't belong in the gfx package, and
the code to call key event handlers really doesn't belong in LayerView.
This patch refactors things, so that InputConnectionHandler is renamed
to org.mozilla.gecko.InputConnectionListener, and the interface is now
used by GeckoView instead of by LayerView.
2015-10-07 08:57:30 -04:00
Jim Chen 48bc5a2d9e Bug 1152124 - Clear spans when initializing for newly-focused editor; r=esawin 2015-04-15 15:21:32 -04:00
Jim Chen 03941b6645 Bug 1152123 - Handle commit/cancel composition events in GeckoEditable; r=esawin 2015-04-15 15:21:32 -04:00
Jim Chen 02cf02eb94 Bug 1151875 - Never mask text updates in nsWindow; r=esawin 2015-04-08 12:25:20 -04:00
Jim Chen 892f4b4a84 Bug 1151875 - Refactor GeckoEditable.ActionQueue methods; r=esawin 2015-04-08 12:25:20 -04:00
Jim Chen 549a78e653 Bug 1149189 - Backout e75d824c730d "Force Gecko update on endBatchEdit for range updates"; r=esawin 2015-03-31 18:20:27 -04:00
Jim Chen 2c784d5c31 Bug 1149172 - Fix small bugs in IME focus handshake; r=esawin 2015-03-31 18:20:27 -04:00
Eugen Sawin 37745a9590 Bug 1051556 - Simplify GeckoEditable exception messages. r=snorp
---
 mobile/android/base/GeckoEditable.java | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)
2015-03-04 23:15:14 +01:00
Eugen Sawin cb6e71d41c Bug 1133802 - Force Gecko update on endBatchEdit for range updates. r=cpeterson 2015-02-24 00:22:07 +01:00
Chris Kitching 791227aa4f Bug 1081582: Fix spelling. r=rnewman 2014-10-12 00:28:29 +01:00
Chris Kitching b09832ac10 Bug 1062112: Part 1.5: Move GeckoEditable interfaces to satisfy JDK 8. r=nalexander 2014-09-08 12:48:08 -07:00
Jim Chen 0861762343 Bug 1058136 - Properly send text change notifications for composition text; r=cpeterson 2014-09-04 14:38:18 -04:00
Jim Chen a0c4b5fdd3 Bug 1058136 - Send separate compose event for composing text; r=cpeterson 2014-09-04 14:38:17 -04:00
Jim Chen f12f4ca421 Bug 1058136 - Fix debug logging crash; r=cpeterson 2014-09-04 14:38:17 -04:00
Jim Chen 4a7625bd8a Bug 1058136 - Refactor GeckoEditable; r=cpeterson 2014-09-04 14:38:16 -04:00
Masayuki Nakano bb727ad98d Bug 826657 part.2 Implement NOTIFY_IME_OF_MOUSE_BUTTON_EVENT in XP part r=smaug+ehsan 2014-08-29 19:08:43 +09:00
Jim Chen a73be2c9be Bug 1058127 - Properly implement removeSpan synchronization; r=cpeterson 2014-08-26 11:50:19 -04:00
Richard Newman 5042e5ec9c Bug 1042383 - Part 2: use optimizable build-time flags for SDK-dependent code. r=mfinkle 2014-07-30 08:19:35 -07:00
Jim Chen e4d1c9a6fc Bug 1004073 - Refactor EventDispatcher usages; r=fennec-team 2014-05-02 14:34:40 -04:00
Mark Capella f52c6d4fc7 Bug 895463 - (p3) Rename SelectionHandler dragging messages, r=jchen, margaret 2014-04-11 18:06:30 -04:00
Jim Chen 2cc1d54f09 Bug 989046 - f. Only unregister event in GeckoEditable if already registered; r=capella 2014-04-04 12:33:51 -04:00
Mark Capella 5e7750dcd8 Bug 982608 - Geckoeditable data loss using Swift keyboard during Text Selection, r=jchen, margaret 2014-03-26 21:34:46 -04:00
Jim Chen dc9d2f2d23 Bug 984463 - Update GeckoEditableListener constants to match IMEMessage constants. r=masayuki 2014-03-21 13:44:59 -04:00
Richard Newman 074ed80355 Bug 975838 - Part 1: add methods to log or throw if called on the wrong thread, pepper GeckoMenu with thread affinities. r=wesj 2014-03-17 19:39:40 -07:00
Richard Newman 70e7e5c2ea Backed out changeset 1e8fa32e8abd (bug 975838) 2014-03-17 22:42:34 -07:00
Richard Newman bc894466fd Bug 975838 - Part 1: add methods to log or throw if called on the wrong thread, pepper GeckoMenu with thread affinities. r=wesj 2014-03-17 19:39:40 -07:00
Jim Chen d7d9f32722 Bug 899233 - Don't restart IME when changing selection; r=cpeterson 2013-08-14 11:32:44 -04:00
Jim Chen 38f900c293 Bug 864040 - Send key events from the UI thread the right way; r=cpeterson 2013-06-26 17:28:21 -04:00
Jim Chen 9a65db8ee3 Bug 837379 - Log better exception messages in GeckoEditable; r=cpeterson 2013-06-10 10:15:41 -04:00
Brad Lassey 4a30f2fe9c bug 867517 - Gecko-based WebView for Android, refactor patch r=mfinkle 2013-05-24 12:21:01 -04:00