gecko-dev/dom/events
Masayuki Nakano a58a540708 Bug 1251063 PuppetWidget should cache InputContext which is set with SetInputContext() and use it in GetInputContext() only when it is the widget which has active input context in the process r=smaug
PuppetWidget::GetInputContext() needs to communicate with its parent process with synchronous IPC. This is very expensive for focus move.

Currently, IMEStateManager uses nsIWidget::GetInputContext() only for checking the IME enabled state.  Therefore, it's enough to cache input context when nsIWidget::SetInputContext() is called.  Then, we can avoid to communicate with synchronous IPC with PuppetWidget::GetInputContext() in most cases.

This patch makes IMEStateManager stores the last widget which sets input context.  When PuppetWidget uses its input context cache, it should check if it is the last widget to set input context with IMEStateManager since an input context may be shared with other widgets and another one may have update the input context.  I.e., PuppetWidget's input context cache may be already outdated after IMEStateManager sets input context with another widget.

This patch gives up to support retrieving IME open state from child process. However, perhaps, this is not necessary for everybody including add-on developers because the only user of IME open state in child process is nsIDOMWindowUtils. So, add-ons can send IME open state from chrome process instead.  If this decision is wrong, unfortunately, we should support it again in another bug.  It's easy to support with creating another nsIWidget::GetInputContext() or adding additional argument to it.

MozReview-Commit-ID: B2d2CCTsPKj

--HG--
extra : rebase_source : 4117330ba7871753176da960063b612e96f11752
2016-05-28 11:27:56 +09:00
..
crashtests
test Bug 881832 - Fix test_bug602962.xul to not assume that resizes have finished flushing when the resize event fires. r=tnikkel 2016-05-12 12:09:50 +12:00
AnimationEvent.cpp Bug 1259655 - part 1 Rename WidgetEventTime::time to WidgetEventTime::mTime r=masayuki 2016-03-28 13:29:42 +09:00
AnimationEvent.h
AsyncEventDispatcher.cpp Bug 1263311: Part 1 - Change the nsICancelableRunnable interface. r=froydnj 2016-04-11 11:40:06 -07:00
AsyncEventDispatcher.h Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
BeforeAfterKeyboardEvent.cpp Bug 1259655 - part 1 Rename WidgetEventTime::time to WidgetEventTime::mTime r=masayuki 2016-03-28 13:29:42 +09:00
BeforeAfterKeyboardEvent.h
BeforeUnloadEvent.cpp
BeforeUnloadEvent.h
ClipboardEvent.cpp Bug 1259655 - part 1 Rename WidgetEventTime::time to WidgetEventTime::mTime r=masayuki 2016-03-28 13:29:42 +09:00
ClipboardEvent.h
CommandEvent.cpp Bug 1259669 Rename WidgetCommandEvent::command to WidgetCommandEvent::mCommand r=masayuki 2016-05-12 13:28:31 +09:00
CommandEvent.h
CompositionEvent.cpp Bug 1259655 - part 1 Rename WidgetEventTime::time to WidgetEventTime::mTime r=masayuki 2016-03-28 13:29:42 +09:00
CompositionEvent.h Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
ContentEventHandler.cpp Bug 1259656 part.1 Rename WidgetEvent::refPoint to WidgetEvent::mRefPoint r=smaug 2016-04-18 23:09:02 +09:00
ContentEventHandler.h Bug 1261671 - ContentEventHandler::ConvertToRootRelativeOffset() should return the root-relative result in the frame's own appUnits, not the root's appUnits in the case when they're different. r=masayuki 2016-04-12 07:06:38 +01:00
CustomEvent.cpp Bug 1003432: Expose CustomEvent in Worker. r=smaug 2016-03-22 00:09:57 +08:00
CustomEvent.h Bug 1003432: Expose CustomEvent in Worker. r=smaug 2016-03-22 00:09:57 +08:00
DataContainerEvent.cpp Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
DataContainerEvent.h
DataTransfer.cpp Bug 1249522, when a file is present, only specify file type, r=smaug 2016-05-11 10:04:19 -04:00
DataTransfer.h Bug 1249522, when a file is present, only specify file type, r=smaug 2016-05-11 10:04:19 -04:00
DeviceMotionEvent.cpp Bug 1222098 - Devicemotion event timestamp should return values from Android sensor API and not Gecko. r:smaug 2016-04-04 12:22:59 -05:00
DeviceMotionEvent.h Bug 1222098 - Devicemotion event timestamp should return values from Android sensor API and not Gecko. r:smaug 2016-04-04 12:22:59 -05:00
DOMEventTargetHelper.cpp Bug 1026713 - Give DOMEventTargetHelper classes proper names in the CC log. r=smaug 2016-05-12 10:54:34 -07:00
DOMEventTargetHelper.h Bug 1266194 - Implement boolean or EventListenerOptions as 3rd param to addEventListener, r=smaug 2016-04-26 16:23:17 +08:00
DragEvent.cpp Bug 1259656 part.1 Rename WidgetEvent::refPoint to WidgetEvent::mRefPoint r=smaug 2016-04-18 23:09:02 +09:00
DragEvent.h Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Event.cpp Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
Event.h Bug 1259656 part.4 Rename WidgetEvent::typeString to WidgetEvent::mSpecifiedEventTypeString r=smaug 2016-04-19 00:10:17 +09:00
EventDispatcher.cpp Bug 1266701 - some header missing in dom/events, r=jwatt 2016-04-22 15:37:28 +02:00
EventDispatcher.h Bug 1259656 part.5 Rename WidgetEvent::target to WidgetEvent::mTarget r=smaug 2016-04-19 00:46:00 +09:00
EventListenerManager.cpp Bug 1203140 - Don't add touch listener areas to dispatch-to-content regions unless touch events are enabled. r=smaug 2016-05-24 11:24:31 -04:00
EventListenerManager.h Bug 1266066 - Ignore passive event listeners for APZ purposes. r=botond,smaug 2016-05-12 14:50:58 -04:00
EventListenerService.cpp Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
EventListenerService.h
EventNameList.h Bug 1101975, handle access keys in content process before menus, r=masayuki 2016-05-11 08:56:42 -04:00
EventStateManager.cpp Bug 931445 part 3 - Reset synth centering pointer when unlocking pointer. r=smaug 2016-05-27 17:13:05 +10:00
EventStateManager.h Bug 1101975, handle access keys in content process before menus, r=masayuki 2016-05-11 08:56:42 -04:00
EventStates.h Bug 1250767 - Reorder Gecko EventState to match Servo's ElementState, and add an API to let Servo access it. r=heycam,r=bz 2016-02-23 17:51:47 -08:00
EventTarget.cpp Bug 1266194 - Implement boolean or EventListenerOptions as 3rd param to addEventListener, r=smaug 2016-04-26 16:23:17 +08:00
EventTarget.h Bug 1266194 - Implement boolean or EventListenerOptions as 3rd param to addEventListener, r=smaug 2016-04-26 16:23:17 +08:00
FocusEvent.cpp Bug 1259655 - part 1 Rename WidgetEventTime::time to WidgetEventTime::mTime r=masayuki 2016-03-28 13:29:42 +09:00
FocusEvent.h Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
ImageCaptureError.cpp
ImageCaptureError.h
IMEContentObserver.cpp Bug 1252058 IMEContentObserver::IMENotificationSender shouldn't post notifications when IMEContentObserver which is the owner of it stopped observing contents r=smaug 2016-04-19 18:57:13 +09:00
IMEContentObserver.h Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
IMEStateManager.cpp Bug 1251063 PuppetWidget should cache InputContext which is set with SetInputContext() and use it in GetInputContext() only when it is the widget which has active input context in the process r=smaug 2016-05-28 11:27:56 +09:00
IMEStateManager.h Bug 1251063 PuppetWidget should cache InputContext which is set with SetInputContext() and use it in GetInputContext() only when it is the widget which has active input context in the process r=smaug 2016-05-28 11:27:56 +09:00
InputEvent.cpp Bug 1259655 - part 1 Rename WidgetEventTime::time to WidgetEventTime::mTime r=masayuki 2016-03-28 13:29:42 +09:00
InputEvent.h
InternalMutationEvent.h
JSEventHandler.cpp Bug 1257725 part 1. Get rid of ThreadsafeAutoJSContext usage in JSEventHandler::HandleEvent. r=smaug 2016-03-23 11:02:57 -04:00
JSEventHandler.h summary: Bug 1231378 - part 5 - Fix uninitialized members of classes in dom/{workers,events,media,canvas}, r=smaug 2016-01-12 18:16:59 +00:00
KeyboardEvent.cpp Bug 1254755 part.4 Rename WidgetKeyboardEvent::location to WidgetKeyboardEvent::mLocation r=smaug 2016-05-12 18:17:22 +09:00
KeyboardEvent.h Bug 1110030 - part5 - Expose KeyboardEventInit dictionary. r=masayuki, r=smaug 2016-03-15 13:46:29 +08:00
KeyNameList.h Bug 1272599 part.2 Rename KeyboardEvent.key values, "MozHomeScreen" and "MozCameraFocusAdjust" to "GoHome" and "CameraFocus" except on B2G r=smaug 2016-05-20 21:29:10 +09:00
MessageEvent.cpp Bug 1247679, part 3 - Replace NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK with JS_MEMBER. r=smaug 2016-02-22 10:11:02 -08:00
MessageEvent.h Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
MouseEvent.cpp Bug 1259661 part.9 Rename WidgetMouseEvent::clickCount to WidgetMouseEvent::mClickCount r=smaug 2016-05-10 23:29:14 +09:00
MouseEvent.h Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
MouseScrollEvent.cpp Bug 1259656 part.1 Rename WidgetEvent::refPoint to WidgetEvent::mRefPoint r=smaug 2016-04-18 23:09:02 +09:00
MouseScrollEvent.h Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
moz.build Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
MutationEvent.cpp Bug 1260871 - Remove do_GetAtom() and rename NS_NewAtom() as NS_Atomize(). r=erahm. 2016-03-29 10:09:43 +11:00
MutationEvent.h
NotifyPaintEvent.cpp Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
NotifyPaintEvent.h Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
nsIEventListenerService.idl
PaintRequest.cpp
PaintRequest.h
PhysicalKeyCodeNameList.h
PointerEvent.cpp Bug 1259656 part.1 Rename WidgetEvent::refPoint to WidgetEvent::mRefPoint r=smaug 2016-04-18 23:09:02 +09:00
PointerEvent.h
ScrollAreaEvent.cpp Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
ScrollAreaEvent.h Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
SimpleGestureEvent.cpp Bug 1259667 - part5: rename WidgetSimpleGestureEvent.delta to mDelta. r=masayuki 2016-05-10 04:16:55 +09:00
SimpleGestureEvent.h Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
SpeechRecognitionError.cpp
SpeechRecognitionError.h
StorageEvent.cpp
StorageEvent.h
TextComposition.cpp Bug 1259657 Rename WidgetGUIEvent::widget to WidgetGUIEvent::mWidget r=smaug 2016-04-14 17:03:14 +09:00
TextComposition.h Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Touch.cpp
Touch.h
TouchEvent.cpp Bug 1203140 - Add a pref cache for the touch events pref, as it can get called a lot. r=smaug 2016-05-24 11:24:30 -04:00
TouchEvent.h Bug 1188539 - Remove the deprecated TouchList::identifiedTouch method; r=jst 2015-08-12 20:57:58 -05:00
TransitionEvent.cpp Bug 1259655 - part 1 Rename WidgetEventTime::time to WidgetEventTime::mTime r=masayuki 2016-03-28 13:29:42 +09:00
TransitionEvent.h
UIEvent.cpp Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
UIEvent.h Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
VirtualKeyCodeList.h
WheelEvent.cpp Bug 1259656 part.1 Rename WidgetEvent::refPoint to WidgetEvent::mRefPoint r=smaug 2016-04-18 23:09:02 +09:00
WheelEvent.h Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
WheelHandlingHelper.cpp Bug 1259656 part.1 Rename WidgetEvent::refPoint to WidgetEvent::mRefPoint r=smaug 2016-04-18 23:09:02 +09:00
WheelHandlingHelper.h
XULCommandEvent.cpp Bug 1259655 - part 1 Rename WidgetEventTime::time to WidgetEventTime::mTime r=masayuki 2016-03-28 13:29:42 +09:00
XULCommandEvent.h Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00