gecko-dev/dom/events
Masayuki Nakano 93977460e2 Bug 1406446 - part 1: InputContextAction should treat focus change during handling a user input as caused by user input even if it's caused by JS r=smaug
Currently, widget doesn't show VKB when input context change is caused by JS.
However, if it's caused by an event handler of a user input, user may expect
to open VKB.  For example, if a touch event in fake editor causes moving
focus to actual editable node, user expect to show VKB.

Therefore, InputContextAction should declare two causes.  One is unknown but
occurred during handling non-keyboard event.  The other is unknown but occurred
during handling keyboard event.

However, EventStateManager doesn't have an API to check if it's being handling
a keyboard event.  Therefore, this patch adds it first.
AutoHandlingUserInputStatePusher sends event type to StartHandlingUserInput()
and StopHandlingUserInput() of EventStateManager and sUserKeyboardEventDepth
manages the number of nested keyboard event handling.  Therefore,
EventStateManager::IsHandlingKeyboardInput() can return if it's handling a
keyboard event.

IMEStateManager uses this new API to adjust the cause of changes of input
context.

Finally, InputContextAction::IsUserInput() is renamed to IsHandlingUserInput()
for consistency with EventStateManager and starts to return true when the
input context change is caused by script while it's handling a user input.

MozReview-Commit-ID: 5JsLqdqeGah

--HG--
extra : rebase_source : 9fcf7687d1bf90eeebbf6eac62d4488ff64b083c
2017-10-24 02:46:15 +09:00
..
crashtests Bug 1397711 - Null-check widget of keyboard event before invoking its PostHandleKeyEvent. r=masayuki 2017-09-07 22:07:34 +10:00
test Backed out changeset dab1c5badddb (bug 1407679) for failing server startup in mochitests on Android. r=backout on a CLOSED TREE 2017-10-24 21:18:26 +02:00
AnimationEvent.cpp
AnimationEvent.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
AsyncEventDispatcher.cpp Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm 2017-07-26 16:13:35 +08:00
AsyncEventDispatcher.h Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
BeforeUnloadEvent.cpp Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
BeforeUnloadEvent.h
ClipboardEvent.cpp
ClipboardEvent.h
CommandEvent.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
CommandEvent.h
CompositionEvent.cpp Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv 2017-08-29 16:02:48 -07:00
CompositionEvent.h
ContentEventHandler.cpp Bug 1411612: Kill nsINode::eCONTENT. r=bz 2017-10-25 17:19:11 +02:00
ContentEventHandler.h Bug 1399626 - Part 5: Update ContentEventHandler to use the new nsIContentIterator::Init overload when possible, r=masayuki 2017-10-02 11:58:00 -04:00
CustomEvent.cpp Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv 2017-08-29 16:02:48 -07:00
CustomEvent.h
DOMEventTargetHelper.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
DOMEventTargetHelper.h Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
DataTransfer.cpp Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj 2017-10-21 23:53:02 +09:00
DataTransfer.h Bug 1398883 - Disable the DataTransfer::Protected state for Firefox 57, r=baku 2017-09-13 11:45:48 -04:00
DataTransferItem.cpp Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot 2017-10-26 15:08:41 -07:00
DataTransferItem.h Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot 2017-10-26 15:08:41 -07:00
DataTransferItemList.cpp Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot 2017-10-26 15:08:41 -07:00
DataTransferItemList.h Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot 2017-10-26 15:08:41 -07:00
DeviceMotionEvent.cpp Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv 2017-08-29 16:02:48 -07:00
DeviceMotionEvent.h
DragEvent.cpp Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
DragEvent.h
Event.cpp Bug 1355497: Ignore preventDefault on pointerdown by WebExtensions. r=smaug. 2017-07-10 16:42:01 +08:00
Event.h Bug 1355497: Ignore preventDefault on pointerdown by WebExtensions. r=smaug. 2017-07-10 16:42:01 +08:00
EventDispatcher.cpp Bug 1409985 - Don't fire DOMEvent during StableState. r=smaug 2017-10-19 18:20:31 +08:00
EventDispatcher.h Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
EventListenerManager.cpp Bug 1405541 (attempt 2) - Split AUTO_PROFILER_LABEL_DYNAMIC into three macros. r=mstange. 2017-10-13 16:12:57 +11:00
EventListenerManager.h Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
EventListenerService.cpp Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj 2017-10-21 23:53:02 +09:00
EventListenerService.h Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
EventNameList.h Bug 1359017 - onmessageerror for WindowEventHandlers in case StructuredClone algorithm fails when deserializing, r=masayuki, r=smaug 2017-09-13 05:59:06 +02:00
EventStateManager.cpp Bug 1406446 - part 1: InputContextAction should treat focus change during handling a user input as caused by user input even if it's caused by JS r=smaug 2017-10-24 02:46:15 +09:00
EventStateManager.h Bug 1406446 - part 1: InputContextAction should treat focus change during handling a user input as caused by user input even if it's caused by JS r=smaug 2017-10-24 02:46:15 +09:00
EventStates.h Bug 1385478 - Part 2: Change Required/IsRequired() to look at NS_EVENT_STATE_REQUIRED instead. r=bz 2017-08-03 01:27:00 -04:00
EventTarget.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
EventTarget.h Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
FocusEvent.cpp
FocusEvent.h
IMEContentObserver.cpp Bug 1411612: Kill nsINode::eCONTENT. r=bz 2017-10-25 17:19:11 +02:00
IMEContentObserver.h Bug 1407943 - IMEContentObserver should use Selection instead of nsISelectionPrivate. r=masayuki 2017-10-12 18:11:09 +09:00
IMEStateManager.cpp Bug 1406446 - part 1: InputContextAction should treat focus change during handling a user input as caused by user input even if it's caused by JS r=smaug 2017-10-24 02:46:15 +09:00
IMEStateManager.h Bug 1396725 - IMEStateManager doesn't need to manage whether menu keyboard listener is installed in different process r=smaug 2017-09-07 11:46:08 +09:00
ImageCaptureError.cpp
ImageCaptureError.h
InputEvent.cpp
InputEvent.h
InternalMutationEvent.h Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
JSEventHandler.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
JSEventHandler.h Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
KeyNameList.h Bug 1386825 - Part 1: Remove MOZ_B2G from dom. r=bkelly 2017-08-08 14:41:05 -07:00
KeyboardEvent.cpp Bug 1387828 - Reinstate support for initKeyboardEvent; r=smaug 2017-08-06 16:52:39 +03:00
KeyboardEvent.h Bug 1387828 - Reinstate support for initKeyboardEvent; r=smaug 2017-08-06 16:52:39 +03:00
MessageEvent.cpp Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv 2017-08-29 16:02:48 -07:00
MessageEvent.h
MouseEvent.cpp
MouseEvent.h
MouseScrollEvent.cpp
MouseScrollEvent.h
MutationEvent.cpp Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
MutationEvent.h
NotifyPaintEvent.cpp
NotifyPaintEvent.h
PaintRequest.cpp
PaintRequest.h Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
PhysicalKeyCodeNameList.h
PointerEvent.cpp
PointerEvent.h
PointerEventHandler.cpp Bug 1404255 - [Pointer Event] Turn off active state or remove current pointer from active pointers when handling pointercancel. r=masayuki 2017-09-29 17:03:48 +08:00
PointerEventHandler.h Bug 1399740 - [Pointer Event] Handle the case that invokes setPointerCapture while the page has a locked element. r=smaug. 2017-09-14 14:29:04 +08:00
ScrollAreaEvent.cpp Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv 2017-08-29 16:02:48 -07:00
ScrollAreaEvent.h
SimpleGestureEvent.cpp Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
SimpleGestureEvent.h
SpeechRecognitionError.cpp
SpeechRecognitionError.h
StorageEvent.cpp Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv 2017-08-29 16:02:48 -07:00
StorageEvent.h
TextClause.cpp Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot 2017-10-26 15:08:41 -07:00
TextClause.h Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot 2017-10-26 15:08:41 -07:00
TextComposition.cpp Bug 1384584 - TextComposition::DispatchCompositionEvent() shouldn't send composition events to focused TabParent after its RequestIMEToCommitComposition() synthesizes eCompositionCommit(AsIs) event synchronously r=m_kato 2017-07-26 23:23:38 +09:00
TextComposition.h Bug 1377672 - part3: IMEStateManager::NotifyIME() should ignore notifications and requests which comes from unexpected process r=m_kato,smaug 2017-07-06 00:47:40 +09:00
Touch.cpp Bug 1382499 - Enhance fingerprinting resistance for Touch API r=arthuredelstein,bz 2017-07-31 17:30:38 +08:00
Touch.h Bug 1382499 - Enhance fingerprinting resistance for Touch API r=arthuredelstein,bz 2017-07-31 17:30:38 +08:00
TouchEvent.cpp Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv 2017-08-29 16:02:48 -07:00
TouchEvent.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
TransitionEvent.cpp
TransitionEvent.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
UIEvent.cpp Bug 1400143 - [Pointer Event] Update pointerevent's mLastRefPoint to get correct movementX/movementY values. r=smaug. 2017-09-15 13:51:10 +08:00
UIEvent.h
VirtualKeyCodeList.h
WheelEvent.cpp Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
WheelEvent.h
WheelHandlingHelper.cpp Bug 143038 Make users can scroll contents horizontally with vertical wheel operation with a modifier r=smaug 2017-10-05 01:12:35 +09:00
WheelHandlingHelper.h Bug 143038 Make users can scroll contents horizontally with vertical wheel operation with a modifier r=smaug 2017-10-05 01:12:35 +09:00
XULCommandEvent.cpp Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv 2017-08-29 16:02:48 -07:00
XULCommandEvent.h Bug 1371219 - Add an inputSource attribute to XULCommandEvent. r=smaug 2017-07-20 17:45:56 +02:00
moz.build Bug 143038 Make users can scroll contents horizontally with vertical wheel operation with a modifier r=smaug 2017-10-05 01:12:35 +09:00
nsIEventListenerService.idl Bug 1402772 - Change nsIEventListenerChange::changedListenerNames to a count of a11y-affecting elements. r=smaug. 2017-09-25 16:38:04 +10:00