mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
0789f7b595
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 |
||
---|---|---|
.. | ||
tests | ||
CoalescedWheelData.cpp | ||
CoalescedWheelData.h | ||
ColorPickerParent.cpp | ||
ColorPickerParent.h | ||
ContentBridgeChild.cpp | ||
ContentBridgeChild.h | ||
ContentBridgeParent.cpp | ||
ContentBridgeParent.h | ||
ContentChild.cpp | ||
ContentChild.h | ||
ContentParent.cpp | ||
ContentParent.h | ||
ContentPrefs.cpp | ||
ContentPrefs.h | ||
ContentProcess.cpp | ||
ContentProcess.h | ||
ContentProcessManager.cpp | ||
ContentProcessManager.h | ||
CPOWManagerGetter.h | ||
DOMTypes.ipdlh | ||
FilePickerParent.cpp | ||
FilePickerParent.h | ||
IdType.h | ||
jar.mn | ||
manifestMessages.js | ||
MemoryReportRequest.cpp | ||
MemoryReportRequest.h | ||
MemoryReportTypes.ipdlh | ||
moz.build | ||
nsIContentChild.cpp | ||
nsIContentChild.h | ||
nsIContentParent.cpp | ||
nsIContentParent.h | ||
nsIHangReport.idl | ||
PBrowser.ipdl | ||
PBrowserOrId.ipdlh | ||
PColorPicker.ipdl | ||
PContent.ipdl | ||
PContentBridge.ipdl | ||
PContentPermission.ipdlh | ||
PContentPermissionRequest.ipdl | ||
PCycleCollectWithLogs.ipdl | ||
PDocumentRenderer.ipdl | ||
PermissionMessageUtils.cpp | ||
PermissionMessageUtils.h | ||
PFilePicker.ipdl | ||
PPluginWidget.ipdl | ||
PProcessHangMonitor.ipdl | ||
PreallocatedProcessManager.cpp | ||
PreallocatedProcessManager.h | ||
ProcessHangMonitor.cpp | ||
ProcessHangMonitor.h | ||
ProcessHangMonitorIPC.h | ||
ProcessPriorityManager.cpp | ||
ProcessPriorityManager.h | ||
PTabContext.ipdlh | ||
PURLClassifier.ipdl | ||
PURLClassifierInfo.ipdlh | ||
PURLClassifierLocal.ipdl | ||
remote-test.js | ||
ServiceWorkerConfiguration.ipdlh | ||
StructuredCloneData.cpp | ||
StructuredCloneData.h | ||
TabChild.cpp | ||
TabChild.h | ||
TabContext.cpp | ||
TabContext.h | ||
TabMessageUtils.cpp | ||
TabMessageUtils.h | ||
TabParent.cpp | ||
TabParent.h | ||
TelemetryScrollProbe.cpp | ||
TelemetryScrollProbe.h | ||
test.xul | ||
URLClassifierChild.h | ||
URLClassifierParent.cpp | ||
URLClassifierParent.h |