Граф коммитов

26 Коммитов

Автор SHA1 Сообщение Дата
Ryan Hunt d6509bb237 Bug 1534395 - Rename TabChild to BrowserChild. r=nika
This commit renames TabChild to BrowserChild.

Differential Revision: https://phabricator.services.mozilla.com/D28135

--HG--
rename : dom/base/InProcessTabChildMessageManager.cpp => dom/base/InProcessBrowserChildMessageManager.cpp
rename : dom/base/InProcessTabChildMessageManager.h => dom/base/InProcessBrowserChildMessageManager.h
rename : dom/ipc/TabChild.cpp => dom/ipc/BrowserChild.cpp
rename : dom/ipc/TabChild.h => dom/ipc/BrowserChild.h
extra : rebase_source : e7fcfb845a971a2760e73d517e24da18ce2551b5
extra : histedit_source : d1991334ccb107fe56e478865f22fd97b041a317
2019-04-09 17:39:01 -05:00
Makoto Kato 8a1050b327 Bug 1510527 - Active composition count may be mismatched when updating composition. r=esawin
To avoid FlushIMEChanges per updating IME composition, we calculate composition count in DoReplaceText. But when using GV+e10s, this calculation is sometimes invalid since NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED event isn't received per PendingComposition.  Because, IMEStateManager will merge this completed events due to optimization of IME event.

Also, DoUpdateComposition calls SetPendingComposition, but it doesn't touch mIMEActiveCompositionCount,

So when using some IME, this value is minus or forever non-zero on some IMEs.

So we shouldn't use atomic count. When receiving NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED, we should reset it and allow IMEFlushChanges since Gecko has already handled all IME composition events in event queues.

Differential Revision: https://phabricator.services.mozilla.com/D14668

--HG--
extra : moz-landing-system : lando
2019-01-18 03:18:24 +00:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jim Chen e78fbd8ab8 Bug 1507328 - 2. Make new text input tests pass; r=esawin
Make some fixes in GeckoEditable and GeckoEditableSupport to make the
new tests pass under e10s.

Differential Revision: https://phabricator.services.mozilla.com/D11989

--HG--
extra : moz-landing-system : lando
2018-11-16 10:29:30 +00:00
Jim Chen 841b637299 Bug 1490391 - 2. Queue synchronize replies if we already queued some replies; r=esawin
If we already queued some synchronize replies, we should queue any
additional replies so that we don't prematurely reply to an event that
has not finished processing yet.

Also add delay for synchronize replies when a `OnImeUpdateComposition`
call is being processed.

Differential Revision: https://phabricator.services.mozilla.com/D9850
2018-11-06 00:12:07 -05:00
Jim Chen 12453d9645 Bug 1499429 - 5. Make setting editable parent async; r=esawin
Currently we make a sync call from the child process to the parent
process to retrieve the IGeckoEditableParent instance. However, that can
lead to deadlocks when a11y code makes parent-to-child async calls at
the same time. This patch makes the call async to avoid the deadlock.

Differential Revision: https://phabricator.services.mozilla.com/D10663
2018-11-06 00:12:07 -05:00
Jim Chen 8a599aa552 Bug 1499429 - 3. Transfer to new GeckoEditableParent during session transfer; r=esawin
During a session transfer, update existing GeckoEditableChild instances
in the parent and child processes to use the new GeckoEditableParent
instance that corresponds to the new session. If the GeckoEditableChild
has focus, take additional steps to make sure the GeckoEditableParent
receives current input context and focus information.

Differential Revision: https://phabricator.services.mozilla.com/D8996
2018-11-06 00:12:06 -05:00
Jim Chen 713d1d9d23 Bug 1492308 - 5. Make various objects use the new disposal mechanism; r=snorp
Make LayerViewSupport, NPZCSupport, GeckoEditableSupport, and
SessionAccessibility use the new disposal mechanism to ensure the
disposal is performed safely.

Differential Revision: https://phabricator.services.mozilla.com/D7110

--HG--
extra : moz-landing-system : lando
2018-10-02 19:59:40 +00:00
Jim Chen 4f6c4496c9 Bug 1470786 - 1. Support async text changes from replacing text; r=esawin
Currently, we expect editing operations in
GeckoEditableSupport::OnImeReplaceText to cause synchronous text change
notifications. However, under e10s, text change notifications can be
asynchornous. The new code keeps track of active OnImeReplaceText calls,
and look for async text changes before replying to the calls.

MozReview-Commit-ID: INM3JLmQebK

--HG--
extra : rebase_source : ff5b728ef437fcd78e4e7eced9c9a537d4698dce
2018-07-17 11:22:34 -04:00
Doug Thayer 10ff9c706f Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : dd000a05bfc2da40c586644d33ca4508fa5330f6
2018-04-29 18:21:20 -07:00
Jim Chen e9e6bfafd3 Bug 1466910 - 7. Don't coalesce notifyIMEContext calls; r=esawin
Right now we coalesce notifyIMEContext calls but only for legacy
reasons. With the current code we don't want to coalesce calls, in order
to be properly notified of blurring and focusing.

MozReview-Commit-ID: 6N2jhyyBKui

--HG--
extra : rebase_source : 0a488a726b834da4f6124092426638f4be368d43
2018-06-19 16:31:35 -04:00
Jim Chen 8afd1f13c8 Bug 1466910 - 4. Don't notify of blur unnecessarily; r=esawin
Right now we always notify Java of input blur. However, when input is
rapidly blurred and then focused again, we don't want to generate the
unnecessary blur notification, in order to avoid unwanted effects such
as the keyboard flashing.

MozReview-Commit-ID: AL6aLAHqNpD

--HG--
extra : rebase_source : c0a6a731f95f997a7a8e19eacdb635f99d21ebf5
2018-06-19 16:31:34 -04:00
Cosmin Sabou 0f45148664 Backed out changeset 531593bacc4e (bug 1448040) for Android build bustages on HangAnnotations.h. CLOSED TREE
--HG--
extra : rebase_source : ea3618023c548a8ca6ca14749633c194606af52f
2018-06-07 19:22:31 +03:00
Doug Thayer 87bf13e093 Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : 59e4a6ced7d14d2a01c0b79e944078ea84cae523
2018-04-29 18:21:20 -07:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Jim Chen dca37fe66f Bug 1446729 - 2. Rename TextInputController to SessionTextInput; r=esawin
Following the naming scheme "SessionFoo" for GeckoSession sub-objects,
and "getFoo()" for getters of GeckoSession sub-objects, rename
TextInputController to SessionTextInput and getTextInputController() to
getTextInput().

MozReview-Commit-ID: 6GtgCjCLKhg

--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/geckoview/TextInputController.java => mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionTextInput.java
extra : rebase_source : 6f20fd9a1853befc6e8aa98714f7e4733b1ee46f
2018-03-18 05:38:55 -04:00
Nathan Froyd 6a1d9cac49 Bug 1448016 - make some Android widget constructors explicit; r=snorp
Attempting to stand up the static analysis for Android builds revealed
that we weren't being explicit enough.
2018-03-27 10:51:32 -04:00
Masayuki Nakano fcb248a698 Bug 1343451 - part 5: Make GeckoEditableSupport dispatch dummy eKeyDown and eKeyUp event during composition always r=jchen
On Android, GeckoEditableSupport has already dispatched eKeyDown event and
eKeyUp event even during composition.  I.e., the pref which will be enabled
by bug 354358 has already been set to true only on Android.

On the other hand, GeckoEditableSupport does not dispatch them if content
listens to "input", "compositionstart", "compositionupdate" or
"compositionend".  So, different from the other platforms, we need additional
pref to make the new behavior behind pref.

Therefore, this patch adds a new pref,
"intl.ime.hack.on_any_apps.fire_key_events_for_composition", to override
existing "intl.ime.hack.on_ime_unaware_apps.fire_key_events_for_composition"
pref.  And sets mKeyCode and mKeyNameIndex of the dummy KeyboardEvents to
NS_VK_PROCESSKEY and KEY_NAME_INDEX_Process.

MozReview-Commit-ID: Fuy0Ir2xiO5

--HG--
extra : rebase_source : c76b613ea186458ebdf0d67f4bc984e8ac5f1041
2018-02-27 17:24:35 +09:00
Jim Chen af3a18ee62 Bug 1416918 - 4b. Move GeckoEditable{Client,Listener} to TextInputController; r=esawin
Move GeckoEditableClient and GeckoEditableListener to inside
TextInputController, next to TextInputController.Delegate. This
consolidates the three internal interfaces used for IME in one place.

The patch also changes the last notifyIMEContext parameter to an int
flag to indicate private browsing or user action. This allows for future
expansion without adding more parameters to notifyIMEContext.

MozReview-Commit-ID: BjscdNr9TkO

--HG--
extra : rebase_source : 87166a55e5978eda4a7c3065db9b68658e33af35
2017-12-13 22:57:21 -05:00
Nathan Froyd 64db05d9c1 Bug 1396867 - silence -Wunused-typedef warnings in GeckoEditableSupport; r=darchons
clang seems to think that `Base` is unused despite its obvious uses
inside this class.  We can deal with the `Base::` qualifications for
name lookup by using `this->` instead, and the other uses of `Base::`
can simply use the explicit name of the superclass.
2017-09-06 08:57:08 -04:00
Jim Chen c3aa7c74d4 Bug 1353799 - 2. Update current composition when setting/removing spans; r=esawin
Update the composition when setting/removing spans, so that we update
the selection/cursor during a composition. However, we must limit any
updating to the current composition only (as indicated by the
keep-current-composition flag), because the Facebook comment box behaves
incorrectly if we repeatedly start and end new compositions.
2017-04-27 20:59:42 -04:00
Masayuki Nakano 61ce5526c6 Bug 1296220 Rename nsIMEUpdatePreference to mozilla::widget::IMEUpdatePreference r=m_kato
MozReview-Commit-ID: 2rIXTlwA6my

--HG--
extra : rebase_source : a51be3edd717092738c2b5e8ccc4f60540712bfd
2017-04-11 21:24:55 +09:00
Jim Chen 53a1107cd1 Bug 1343075 - Use GeckoEditableSupport from PuppetWidget; r=masayuki r=rbarker r=snorp r=esawin
Bug 1343075 - 1a. Add TextEventDispatcherListener::GetIMEUpdatePreference; r=masayuki

Add a GetIMEUpdatePreference method to TextEventDispatcherListener to
optionally control which IME notifications are received by NotifyIME.
This patch also makes nsBaseWidget forward its GetIMEUpdatePreference
call to the widget's native TextEventDispatcherListener.

Bug 1343075 - 1b. Implement GetIMEUpdatePreference for all TextEventDispatcherListener; r=masayuki

This patch implements GetIMEUpdatePreference for all
TextEventDispatcherListener implementations, by moving previous
implementations of nsIWidget::GetIMEUpdatePreference.

Bug 1343075 - 2. Allow setting a PuppetWidget's native TextEventDispatcherListener; r=masayuki

In PuppetWidget, add getter and setter for the widget's native
TextEventDispatcherListener. This allows overriding of PuppetWidget's
default IME handling. For example, on Android, the PuppetWidget's native
TextEventDispatcherListener will communicate directly with Java IME code
in the main process.

Bug 1343075 - 3. Add AIDL interface for main process; r=rbarker

Add AIDL definition and implementation for an interface for the main
process that child processes can access.

Bug 1343075 - 4. Set Gecko thread JNIEnv for child process; r=snorp

Add a JNIEnv* parameter to XRE_SetAndroidChildFds, which is used to set
the Gecko thread JNIEnv for child processes. XRE_SetAndroidChildFds is
the only Android-specific entry point for child processes, so I think
it's the most logical place to initialize JNI.

Bug 1343075 - 5. Support multiple remote GeckoEditableChild; r=esawin

Support remote GeckoEditableChild instances that are created in the
content processes and connect to the parent process GeckoEditableParent
through binders.

Support having multiple GeckoEditableChild instances in GeckoEditable by
keeping track of which child is currently focused, and only allow
calls to/from the focused child by using access tokens.

Bug 1343075 - 6. Add method to get GeckoEditableParent instance; r=esawin

Add IProcessManager.getEditableParent, which a content process can call
to get the GeckoEditableParent instance that corresponds to a given
content process tab, from the main process.

Bug 1343075 - 7. Support GeckoEditableSupport in content processes; r=esawin

Support creating and running GeckoEditableSupport attached to a
PuppetWidget in content processes.

Because we don't know PuppetWidget's lifetime as well as nsWindow's,
when attached to PuppetWidget, we need to attach/detach our native
object on focus/blur, respectively.

Bug 1343075 - 8. Connect GeckoEditableSupport on PuppetWidget creation; r=esawin

Listen to the "tab-child-created" notification and attach our content
process GeckoEditableSupport to the new PuppetWidget.

Bug 1343075 - 9. Update auto-generated bindings; r=me
2017-03-07 22:34:39 -05:00
Jim Chen c7d526d4ee Bug 1339685 - Split GeckoEditable into parent and child classes; r=nalexander r=esawin r=snorp
Bug 1339685 - 1. Support compiling GeckoView aidl from multiple packages; r=nalexander

Specify a list of AIDL files for GeckoView so we can include AIDLs from
multiple packages, and not just those from the org.mozilla.gecko.process
package.

Bug 1339685 - 2. Add AIDLs for GeckoEditable; r=esawin

Add IGeckoEditableParent.aidl and IGeckoEditableChild.aidl for two-way
communication between the parent, which lives in the main process, and
the child, which lives in the main process or a child content process.

Bug 1339685 - 3. Refactor some GeckoEditable code; r=esawin

Auto-generate native constants for the constants in GeckoEditableClient,
instead of keeping a separate set of constants in native code.

Bug 1339685 - 4. Add GeckoEditableChild; r=esawin

Add the GeckoEditableChild class, which is currently only used in the
main process as the interface between the native nsWindow and
GeckoEditable. Eventually, it will be expanded to child content
processes as the interface between the native PuppetWidget and
main process GeckoEditable.

Bug 1339685 - 5. Use GeckoEditableChild from GeckoEditable; r=esawin

Make calls to GeckoEditableChild from GeckoEditable, and remove code
that exists in GeckoEditableChild from GeckoEditable.

Bug 1339685 - 6. Add GetNativeObject member to proxied native calls; r=snorp

Add a convenience function for getting the C++ object that is the target
of the native call.

Bug 1339685 - 7. Use GeckoEditableChild from native code; r=esawin

Make nsWindow and GeckoEditableSupport use GeckoEditableChild for
communication. nsWindow still keeps a reference to GeckoEditable for
switching views.

Bug 1339685 - 8. Updated generated bindings; r=me
2017-03-02 13:47:14 -05:00
Jim Chen e559b260ee Bug 1137567 - Make nsWindow for Android use TextEventDispatcher; r=esawin r=rbarker r=masayuki r=snorp
Bug 1137567 - 1. Allow dispatching key events during composition; r=esawin

We potentially dispatch key events during composition to provide
compatibility for pages that only listen to key events.

Bug 1137567 - 2. Allow keyboard events in DispatchInputEvent when not on APZ thread; r=rbarker

We use nsIWidget::DispatchInputEvent to dispatch our keyboard events on
the Gecko thread, which on Android is not the APZ controller thread. We
should allow these events to pass instead of crashing.

Bug 1137567 - 3. Add GeckoEditableSupport class to support TextEventDispatcher; r=masayuki

Add a separate GeckoEditableSupport class, which implements
TextEventDispatcherListener and uses TextEventDispatcher for IME
operations. The new class is entirely separate from nsWindow to allow it
to be independently used in content processes as well.

Most of the code is copied from nsWindow::GeckoViewSupport, and adapted
to use TextEventDispatcher.

Bug 1137567 - 4. Make nsWindow::WindowPtr available for outside classes; r=snorp

Make nsWindow::WindowPtr available not just for classes inside nsWindow
but for outside classes as well. Also, add support for RefPtr native
objects to nsWindow::NativePtr.

Bug 1137567 - 5. Use GeckoEditableSupport in nsWindow; r=esawin

Use the new GeckoEditableSupport class in nsWindow to replace the
previous code in nsWindow::GeckoViewSupport. GeckoEditable native
methods now go to GeckoEditableSupport instead of GeckoViewSupport.

Several native methods in GeckoEditable are changed from
dispatchTo="proxy" to dispatchTo="gecko", because we no longer need the
special nsWindow::WindowEvent wrapper for our native calls.

Bug 1137567 - 6. Use pushPrefEnv in test_assign_event_data.html; r=masayuki

setAndObserveCompositionPref in test_assign_event_data.html does not
invoke the callback if the pref is already set. This patch changes it to
use SpecialPowers.pushPrefEnv so the callback is always invoked.
2017-03-01 15:29:30 -05:00