gecko-dev/dom/events
Masayuki Nakano 90b77204fb Bug 1868283 - part 3: Make PresShell::HandleEvent ignore eMouseExitFromWidget and eMouseEnterIntoWidget events which are synthesized in the parent process accidentally r=smaug
Currently, the method ignores synthesized `eMouseMove` events coming from the
parent process if
* the last mouse location was updated by a synthesized mouse event for tests
* the event comes from parent process
* the event is not marked as synthesized for tests

However, `eMouseExitFromWidget` is also handled as a synthesized `eMouseMove` [1].
Therefore, the method needs to ignore this event too in the same conditions.

Additionally, `eMouseEnterIntoWidget` may cause updating the `:hover` state
under the event position which may be different from the last cursor position
in the content process [2].  Therefore, the method needs to ignore this too.

On the other hand, if the event is caused by a test API synthesizing mouse
events, e.g., when `test.events.async.enabled` is set to `true`, the running
test must expect the events.  Therefore, these events need to be marked as
synthesized for tests correctly.  Therefore, this patch updates the
initializers of the events.

1. https://searchfox.org/mozilla-central/rev/78a2c17cc80680a5a82446e4ce7c45a73b935383/dom/events/EventStateManager.cpp#773,794-796,800-801
2. https://searchfox.org/mozilla-central/rev/78a2c17cc80680a5a82446e4ce7c45a73b935383/dom/events/EventStateManager.cpp#4063,4068

Differential Revision: https://phabricator.services.mozilla.com/D195638
2023-12-13 07:13:04 +00:00
..
crashtests Bug 1857597 - Add test for bug 1856737; r=smaug 2023-10-16 09:13:36 +00:00
test Bug 1868963 - Add exception from a11y_checks for clipboard security popup tests; r=ayeddi 2023-12-11 19:03:56 +00:00
AnimationEvent.cpp
AnimationEvent.h
AsyncEventDispatcher.cpp Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu 2023-10-10 08:51:12 +00:00
AsyncEventDispatcher.h Bug 1817122 - Make AsyncEventDispatcher(Event) take ownership of the event. r=smaug,media-playback-reviewers,padenot 2023-10-04 19:37:39 +00:00
BeforeUnloadEvent.cpp
BeforeUnloadEvent.h
Clipboard.cpp Bug 1866994 - Handle clipboard contextmenu in parent process; r=geckoview-reviewers,extension-reviewers,webidl,win-reviewers,saschanaz,robwu,nika,Gijs,m_kato,emilio 2023-11-28 15:38:01 +00:00
Clipboard.h Bug 1866994 - Handle clipboard contextmenu in parent process; r=geckoview-reviewers,extension-reviewers,webidl,win-reviewers,saschanaz,robwu,nika,Gijs,m_kato,emilio 2023-11-28 15:38:01 +00:00
ClipboardEvent.cpp
ClipboardEvent.h
ClipboardItem.cpp Bug 1852947 - Redesign the async clipboard read API; r=nika 2023-11-14 09:21:24 +00:00
ClipboardItem.h Bug 1852947 - Redesign the async clipboard read API; r=nika 2023-11-14 09:21:24 +00:00
CommandEvent.cpp
CommandEvent.h
CompositionEvent.cpp
CompositionEvent.h
ConstructibleEventTarget.cpp
ConstructibleEventTarget.h
ContentEventHandler.cpp Bug 1850938 - Make ContentEventHandler::OnQueryTextRectArray and ContentEventHandler::OnQueryTextRect work with strong pointers again r=smaug 2023-09-06 13:55:58 +00:00
ContentEventHandler.h Bug 1690111 - Add a copy assignment operator to RawNodePosition. r=farre 2023-09-20 09:41:59 +00:00
CustomEvent.cpp
CustomEvent.h
DataTransfer.cpp Bug 1777448 - Part 2: Suppress the paste context menu when the clipboard data originates from a same-origin page; r=nika 2023-12-08 07:08:42 +00:00
DataTransfer.h Bug 1777448 - Part 2: Suppress the paste context menu when the clipboard data originates from a same-origin page; r=nika 2023-12-08 07:08:42 +00:00
DataTransferItem.cpp Bug 1777448 - Part 2: Suppress the paste context menu when the clipboard data originates from a same-origin page; r=nika 2023-12-08 07:08:42 +00:00
DataTransferItem.h Bug 1777448 - Part 2: Suppress the paste context menu when the clipboard data originates from a same-origin page; r=nika 2023-12-08 07:08:42 +00:00
DataTransferItemList.cpp
DataTransferItemList.h
DeviceMotionEvent.cpp
DeviceMotionEvent.h
DOMEventTargetHelper.cpp Bug 1862244 - Add GlobalTeardownHelper r=smaug 2023-11-23 17:17:39 +00:00
DOMEventTargetHelper.h Bug 1862244 - Add GlobalTeardownHelper r=smaug 2023-11-23 17:17:39 +00:00
DragEvent.cpp
DragEvent.h
Event.cpp Bug 1843477, mark some classes being main thread only, r=mccr8 2023-09-26 12:36:21 +00:00
Event.h Bug 1848409 - Tweak the UpdateDefaultPreventedOnContent call to only special case the HTMLEditorEventListener case r=masayuki,dom-core 2023-08-15 13:46:42 +00:00
EventDispatcher.cpp Bug 1722322 - Implement LargestContentfulPaint r=emilio 2023-11-02 20:53:36 +00:00
EventDispatcher.h Bug 1658996 - Part 1: Introduce new methods around click event activation behavior. r=edgar 2023-09-07 09:33:51 +00:00
EventListenerManager.cpp Bug 1864168 - Part 1: Use 1-origin column number in nsIContentSecurityPolicy. r=smaug,devtools-reviewers,ochameau,ckerschb 2023-11-22 12:31:30 +00:00
EventListenerManager.h Bug 1843473 - Don't dispatch DOMActivate if there are no listeners for it, r=masayuki 2023-08-18 06:01:16 +00:00
EventListenerService.cpp Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu 2023-10-10 08:51:12 +00:00
EventListenerService.h
EventNameList.h Bug 1845381 - For begin/repeat/end SMIL animation events, only support "beginEvent"/"repeatEvent"/"endEvent" in addEventListener. r=webcompat-reviewers,dholbert,smaug,twisniewski 2023-07-31 20:43:47 +00:00
EventStateManager.cpp Bug 1868283 - part 3: Make PresShell::HandleEvent ignore eMouseExitFromWidget and eMouseEnterIntoWidget events which are synthesized in the parent process accidentally r=smaug 2023-12-13 07:13:04 +00:00
EventStateManager.h Bug 1865480. Rename nsIContentViewer to nsIDocumentViewer. r=layout-reviewers,emilio 2023-11-21 12:45:59 +00:00
EventTarget.cpp Bug 1843477, non-virtual AddRef/Release for EventTarget and common subclasses, r=mccr8 2023-09-26 12:36:21 +00:00
EventTarget.h Merge autoland to mozilla-central. a=merge 2023-09-27 06:45:58 +03:00
FocusEvent.cpp
FocusEvent.h
GlobalKeyListener.cpp Bug 1833494 - Make GlobalKeyListener not try to match handler with keyboard event with ignoring Shift state after one handler matches with the key combination r=smaug 2023-08-09 04:47:06 +00:00
GlobalKeyListener.h Bug 1833494 - Make GlobalKeyListener not try to match handler with keyboard event with ignoring Shift state after one handler matches with the key combination r=smaug 2023-08-09 04:47:06 +00:00
ImageCaptureError.cpp
ImageCaptureError.h
IMEContentObserver.cpp Bug 1863759 - Make IMEStateManager recreate IMEContentObserver if the active one is not observing editable content of focused element r=smaug,m_kato 2023-12-05 02:33:18 +00:00
IMEContentObserver.h Bug 1863759 - Make IMEStateManager recreate IMEContentObserver if the active one is not observing editable content of focused element r=smaug,m_kato 2023-12-05 02:33:18 +00:00
IMEStateManager.cpp Bug 1868552 - Refactor nsIContent::IsFocusable for clarity. r=masayuki 2023-12-08 11:34:06 +00:00
IMEStateManager.h Bug 1835578 - Fix warnings of clang-tidy in XP IME handling code r=m_kato 2023-06-14 01:57:34 +00:00
InputEvent.cpp
InputEvent.h
InputEventOptions.h
InputTypeList.h
InternalMutationEvent.h Bug 1851039 - Investigate if it is possible to reuse the text node when setting element.textContent, r=emilio 2023-09-04 09:38:09 +00:00
InvokeEvent.cpp Bug 1857887 - Add invoketarget & invoketarget action attributes r=smaug 2023-11-08 13:41:51 +00:00
InvokeEvent.h Bug 1857887 - Add invoketarget & invoketarget action attributes r=smaug 2023-11-08 13:41:51 +00:00
JSEventHandler.cpp
JSEventHandler.h
KeyboardEvent.cpp Bug 1266437 - Drop "OS" modifier r=smaug,m_kato,karlt,Gijs 2023-08-07 01:03:58 +00:00
KeyboardEvent.h
KeyEventHandler.cpp Bug 1833494 - Make GlobalKeyListener not try to match handler with keyboard event with ignoring Shift state after one handler matches with the key combination r=smaug 2023-08-09 04:47:06 +00:00
KeyEventHandler.h Bug 1821886 - Reserve shortcut keys exiting from the fullscreen mode r=Gijs,edgar,smaug 2023-05-24 00:50:17 +00:00
KeyNameList.h Bug 1232918 - Map Windows Logo keys in Win/Linux to Meta and rename OSLeft/OSRight to MetaLeft/MetaRight r=smaug,webdriver-reviewers,jdescottes,media-playback-reviewers,karlt 2023-08-07 01:03:58 +00:00
MessageEvent.cpp
MessageEvent.h
MouseEvent.cpp Bug 1848409 - Tweak the UpdateDefaultPreventedOnContent call to only special case the HTMLEditorEventListener case r=masayuki,dom-core 2023-08-15 13:46:42 +00:00
MouseEvent.h Bug 1564391 - Rename internal uses of mozInputSource. r=emilio,pip-reviewers,tabbrowser-reviewers,dao,kpatenio 2023-07-26 09:27:45 +00:00
MouseScrollEvent.cpp
MouseScrollEvent.h
moz.build Bug 1857887 - Add invoketarget & invoketarget action attributes r=smaug 2023-11-08 13:41:51 +00:00
MutationEvent.cpp
MutationEvent.h
NotifyPaintEvent.cpp
NotifyPaintEvent.h
nsIEventListenerService.idl
PaintRequest.cpp
PaintRequest.h
PendingFullscreenEvent.h
PhysicalKeyCodeNameList.h Bug 1232918 - Map Windows Logo keys in Win/Linux to Meta and rename OSLeft/OSRight to MetaLeft/MetaRight r=smaug,webdriver-reviewers,jdescottes,media-playback-reviewers,karlt 2023-08-07 01:03:58 +00:00
PointerEvent.cpp Bug 1859236 - Use IsSecureContextOrObjectIsFromSecureContext to decide if we want to expose getCoalescedEvents r=smaug 2023-10-17 11:52:54 +00:00
PointerEvent.h Bug 1858434 - Expose getCoalescedEvents only on SecureContext, r=edgar 2023-10-13 09:55:37 +00:00
PointerEventHandler.cpp Bug 1834737 - Make RFPTarget parameter of Document::ShouldResistFingerprinting non-optional. r=tjr 2023-05-31 09:46:54 +00:00
PointerEventHandler.h
RemoteDragStartData.cpp Bug 1832701 - Part 1: Rename IPCDataTransfer* to IPCTransferable*; r=nika 2023-05-16 21:25:37 +00:00
RemoteDragStartData.h Bug 1832701 - Part 1: Rename IPCDataTransfer* to IPCTransferable*; r=nika 2023-05-16 21:25:37 +00:00
ScrollAreaEvent.cpp
ScrollAreaEvent.h
ShortcutKeyDefinitions.cpp
ShortcutKeys.cpp
ShortcutKeys.h
SimpleGestureEvent.cpp
SimpleGestureEvent.h
SpeechRecognitionError.cpp
SpeechRecognitionError.h
StorageEvent.cpp
StorageEvent.h
TextClause.cpp
TextClause.h
TextComposition.cpp Bug 1863759 - Make IMEStateManager recreate IMEContentObserver if the active one is not observing editable content of focused element r=smaug,m_kato 2023-12-05 02:33:18 +00:00
TextComposition.h Bug 1690827 - part 1: Number each composition for native IME or synthesized in the parent process r=smaug 2023-06-14 01:57:33 +00:00
Touch.cpp Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre 2023-08-02 20:41:48 +00:00
Touch.h
TouchEvent.cpp
TouchEvent.h
TransitionEvent.cpp
TransitionEvent.h
UIEvent.cpp Bug 1853233 - Only assign converted modifiers once. r=smaug 2023-09-16 18:10:53 +00:00
UIEvent.h
VirtualKeyCodeList.h
WheelEvent.cpp Bug 1843954 - Have Coord * Primitive and Coord / Primitive return Coord. r=botond 2023-09-14 00:37:04 +00:00
WheelEvent.h
WheelHandlingHelper.cpp Bug 1830758 - Do not clobber APZ scroll snap on eWheelOperationEnd. r=hiro 2023-06-01 13:51:44 +00:00
WheelHandlingHelper.h Bug 1830758 - Do not clobber APZ scroll snap on eWheelOperationEnd. r=hiro 2023-06-01 13:51:44 +00:00
XULCommandEvent.cpp
XULCommandEvent.h