gecko-dev/dom/ipc
Masayuki Nakano 0789f7b595 Bug 1217700 part.1 nsIWidget should return reference to IMENotificationRequests r=m_kato
IMEContentObserver may need to change notifications to send when TextInputProcessor begins input transaction.  In current design, IMEContentObserver needs to retrieve IMENotificationRequests at every change.  However, if nsIWidget returns a reference to its IMENotificationRequests, IMEContentObserver can call it only once.

For that purpose, this patch changes nsIWidget::GetIMENotificationRequests() to nsIWidget::IMENotificationRequestsRef() and make it return |const IMENotificationRequests&|.  However, if the lifetime of the instance of IMENotificationRequest is shorter than the widget instance's, it's dangerous.  Therefore, it always returns TextEventDispatcher::mIMENotificationRequests.  TextEventDispatcher's lifetime is longer than the widget.  Therefore, this guarantees the lifetime.

On the other hand, widget needs to update TextEventDispatcher::mIMENotificationRequests before calls of nsIWidget::IMENotificationRequestsRef().  Therefore, this patch makes TextEventDispatcher update proper IMENotificationRequests when it gets focus or starts new input transaction and clear mIMENotificationRequests when it loses focus.

Note that TextEventDispatcher gets proper requests both from native text event dispatcher listener (typically, implemented by native IME handler class) and TextInputProcessor when TextInputProcessor has input transaction because even if TextInputProcessor overrides native IME, native IME still needs to know the content changes since they may get new input transaction after that.

However, there may not be native IME handler in content process.  If it runs in Android, PuppetWidget may have native IME handler because widget directly handles IME in e10s mode for Android.  Otherwise, native IME handler is in its parent process.  So, if TextInputHandler has input transaction in content process, PuppetWidget needs to behave as native event handler.  Therefore, this patch makes PuppetWidget inherit TextEventDispatcherListener and implements PuppetWidget::IMENotificationRequestsRef().

MozReview-Commit-ID: 2SW3moONTOX

--HG--
extra : rebase_source : d2634ada6c33dbf7a966fadb68608411ee24bfab
2017-04-15 01:35:58 +09:00
..
tests Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
CoalescedWheelData.cpp Bug 1337963 - Coalesce wheel events in the content process so that long wheel event handlers don't hang the content process. r=smaug 2017-02-21 17:56:46 +08:00
CoalescedWheelData.h Bug 1337963 - Coalesce wheel events in the content process so that long wheel event handlers don't hang the content process. r=smaug 2017-02-21 17:56:46 +08:00
ColorPickerParent.cpp Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm 2016-11-15 04:26:00 +01:00
ColorPickerParent.h Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm 2016-11-15 04:26:00 +01:00
ContentBridgeChild.cpp Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
ContentBridgeChild.h Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
ContentBridgeParent.cpp Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
ContentBridgeParent.h Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
ContentChild.cpp Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
ContentChild.h Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
ContentParent.cpp Merge inbound to m-c a=merge 2017-04-20 15:30:43 -07:00
ContentParent.h Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
ContentPrefs.cpp Bug 1356414 - Add comment explaining the purpose of ContentPrefs.cpp (NPOTB, DONTBUILD) 2017-04-13 15:20:44 -07:00
ContentPrefs.h Bug 1356414 - Add comment explaining the purpose of ContentPrefs.cpp (NPOTB, DONTBUILD) 2017-04-13 15:20:44 -07:00
ContentProcess.cpp Backed out changeset 4f7947062b4f (bug 1337062) for assertion failures in gfxVars.cpp 2017-04-06 20:11:19 -07:00
ContentProcess.h bug 1303096 - Stop sending sync messages soon after content process start-up r=billm 2017-02-05 00:52:38 -05:00
ContentProcessManager.cpp Bug 1333799: MinTabSelector for process selection. r=mrbkap 2017-03-07 20:00:28 +01:00
ContentProcessManager.h Bug 1333799: MinTabSelector for process selection. r=mrbkap 2017-03-07 20:00:28 +01:00
CPOWManagerGetter.h
DOMTypes.ipdlh Backed out changeset 1024114af681 (bug 1353629) 2017-04-20 18:37:14 +02:00
FilePickerParent.cpp Bug 1344415 - Introduce a security check about which files can be opened by a content process, r=ehsan 2017-03-16 08:53:49 +01:00
FilePickerParent.h Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm 2016-11-15 04:26:00 +01:00
IdType.h
jar.mn Bug 1311149 - Remove the b2g preallocated app support; r=baku 2016-11-16 09:17:35 -05:00
manifestMessages.js Bug 1351008 - Lazily load Manifest jsms in manifestMessages.js. r=baku 2017-03-27 11:48:18 -07:00
MemoryReportRequest.cpp Add GPU process support to nsMemoryReportingManager. (bug 1321492 part 7, r=erahm) 2017-01-26 16:35:55 -08:00
MemoryReportRequest.h Remove PMemoryReportRequest. (bug 1321492 part 3, r=erahm) 2017-01-26 16:35:54 -08:00
MemoryReportTypes.ipdlh Move MaybeFileDesc out of PContent and into an IPDL header. (bug 1321492 part 5, r=erahm) 2017-01-26 16:35:54 -08:00
moz.build Bug 1357323 - Remove support for gonk in the build system. r=gps 2017-04-18 16:56:09 +09:00
nsIContentChild.cpp Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
nsIContentChild.h Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
nsIContentParent.cpp Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
nsIContentParent.h Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
nsIHangReport.idl
PBrowser.ipdl Backed out changeset 1024114af681 (bug 1353629) 2017-04-20 18:37:14 +02:00
PBrowserOrId.ipdlh
PColorPicker.ipdl
PContent.ipdl Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
PContentBridge.ipdl Backed out changeset 2b53bdd61d64 (bug 1353629) 2017-04-20 18:37:09 +02:00
PContentPermission.ipdlh
PContentPermissionRequest.ipdl
PCycleCollectWithLogs.ipdl
PDocumentRenderer.ipdl
PermissionMessageUtils.cpp Bug 1296189 - Replace NS_RUNTIMEABORT("some string literal message") with MOZ_CRASH(). r=froydnj 2016-12-02 13:46:53 -08:00
PermissionMessageUtils.h
PFilePicker.ipdl
PPluginWidget.ipdl Backed out 5 changesets (bug 1338172) for linux crashtest failures a=backout 2017-02-14 14:31:54 -08:00
PProcessHangMonitor.ipdl Bug 1342927 - Fire a MozTabChildNotReady event on a frameloader if force-painting a tab without a TabChild. r=billm 2017-02-28 17:22:02 -05:00
PreallocatedProcessManager.cpp Backed out changeset 8a1c36e9ba80 (bug 1341008) 2017-03-16 17:29:18 +01:00
PreallocatedProcessManager.h Bug 1324428 - Simplified preallocated process manager. r=billm 2017-02-01 13:34:24 +01:00
ProcessHangMonitor.cpp Bug 1343639 - Use the HangMonitorParent TaskFactory instead of runnables for dispatching the hang notification to the main thread. r=billm 2017-03-06 15:55:36 -05:00
ProcessHangMonitor.h Bug 1321052 - Convert ProcessHangMonitor to use endpoints. r=billm 2017-01-05 12:54:52 -08:00
ProcessHangMonitorIPC.h Bug 1321052 - Convert ProcessHangMonitor to use endpoints. r=billm 2017-01-05 12:54:52 -08:00
ProcessPriorityManager.cpp Bug 1356913 - Remove support for the mozapptype attribute; r=billm 2017-04-20 01:09:28 -04:00
ProcessPriorityManager.h
PTabContext.ipdlh Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
PURLClassifier.ipdl Bug 1343425 - Supports nsIURIClassifier.asyncClassifyLocalWithTables. r=baku 2017-04-07 14:15:16 +08:00
PURLClassifierInfo.ipdlh Bug 1343425 - Supports nsIURIClassifier.asyncClassifyLocalWithTables. r=baku 2017-04-07 14:15:16 +08:00
PURLClassifierLocal.ipdl Bug 1343425 - Supports nsIURIClassifier.asyncClassifyLocalWithTables. r=baku 2017-04-07 14:15:16 +08:00
remote-test.js
ServiceWorkerConfiguration.ipdlh
StructuredCloneData.cpp Backed out changeset 1024114af681 (bug 1353629) 2017-04-20 18:37:14 +02:00
StructuredCloneData.h Backed out changeset 1024114af681 (bug 1353629) 2017-04-20 18:37:14 +02:00
TabChild.cpp Bug 1354249 - Use same TabGroup as original tab for print preview (r=mystor) 2017-04-12 20:17:50 -07:00
TabChild.h Bug 1354249 - Use same TabGroup as original tab for print preview (r=mystor) 2017-04-12 20:17:50 -07:00
TabContext.cpp Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
TabContext.h Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
TabMessageUtils.cpp
TabMessageUtils.h
TabParent.cpp Bug 1217700 part.1 nsIWidget should return reference to IMENotificationRequests r=m_kato 2017-04-15 01:35:58 +09:00
TabParent.h Bug 1296220 Rename nsIMEUpdatePreference to mozilla::widget::IMEUpdatePreference r=m_kato 2017-04-11 21:24:55 +09:00
TelemetryScrollProbe.cpp Bug 1340904 - Implement telemetry scroll tracking in C++ r=smaug 2017-03-02 00:51:40 -05:00
TelemetryScrollProbe.h Bug 1340904 - Implement telemetry scroll tracking in C++ r=smaug 2017-03-02 00:51:40 -05:00
test.xul
URLClassifierChild.h Bug 1343425 - Supports nsIURIClassifier.asyncClassifyLocalWithTables. r=baku 2017-04-07 14:15:16 +08:00
URLClassifierParent.cpp Bug 1343425 - Supports nsIURIClassifier.asyncClassifyLocalWithTables. r=baku 2017-04-07 14:15:16 +08:00
URLClassifierParent.h Bug 1343425 - Supports nsIURIClassifier.asyncClassifyLocalWithTables. r=baku 2017-04-07 14:15:16 +08:00