gecko-dev/widget
Masayuki Nakano ab0ac8c7e6 Bug 1581192 - WidgetEvent::mFlags::mDispatchedAtLeastOnce needs to be reset before dispatching in content process again r=smaug
The crash occurs when dispatching a user input event which is a default action
of a raw user input event like `click` event caused by `mouseup` event if
the raw event's `isTrusted` is set to `false` accidentally during dispatch.

User input events are fired in the main process first.  Then,
`EventStateManager` sends it to remote process from `PostHandleEvent()` if
necessary.  However, at this time, `WidgetEvent::mFlags::mDispatchedAtLeastOnce`
is never rest, but its only referrer, `EventDispatcher::DispatchDOMEvent()`
assumes that when it's `true`, `WidgetEvent::mFlags:mIsBeingDispatched` is
`false`.  Therefore, only in content process, `mouseup` event's `isTrusted` is
set to `false` by `EventTarget.dispatchEvent()` even while it's being dispatch.
And also the trusted state will be used for creating next event which is part
of the default action.
https://searchfox.org/mozilla-central/rev/6566d92dd46417a2f57e75c515135ebe84c9cef5/dom/events/EventDispatcher.cpp#1121,1126,1130-1131,1135,1138,1143

Therefore, this patch makes `WidgetEvent::mFlags` reset `mDispatchedAtLeastOnce`
when it's copied across process boundary and make
`EventDispatcher::DispatchDOMEvent()` won't modify being dispatched events for
avoiding any odd issues.

Unfortunately, this patch adds "expected: FAIL" to the new WPT test only on
Windows.  The failure reason is still unclear.  I cannot reproduce the failure
on my Windows environment, but on Try Server, it fails permanently since
the driver succeeds to send the mouse click, but the button never receives
`mouseup` nor `click` event.

Differential Revision: https://phabricator.services.mozilla.com/D52988

--HG--
extra : moz-landing-system : lando
2019-11-26 09:08:38 +00:00
..
android Backed out changeset 91f3048cc58e (bug 1594145) for browser-chrome failures at toolkit/modules/tests/browser/browser_Troubleshoot.js on a CLOSED TREE 2019-11-26 04:49:17 +02:00
cocoa Backed out changeset 91f3048cc58e (bug 1594145) for browser-chrome failures at toolkit/modules/tests/browser/browser_Troubleshoot.js on a CLOSED TREE 2019-11-26 04:49:17 +02:00
crashtests Bug 1582530 - Fix remaining cases that were relying on blockification. r=dao,dholbert 2019-09-28 00:20:32 +00:00
gtk Bug 1597120 - Support dynamic changes to CSS pointer-events on nsMenuPopupFrame. r=karlt,jmathies,mstange,emilio 2019-11-22 13:14:37 +00:00
gtkxtbin
headless Bug 1595252 - Add look and feel defines for headless gtk. r=smaug 2019-11-11 11:04:31 +00:00
reftests
tests Bug 1596327, rename .xul test files in widget/ to .xhtml r=jmathies 2019-11-20 19:05:30 +00:00
uikit Backed out changeset 91f3048cc58e (bug 1594145) for browser-chrome failures at toolkit/modules/tests/browser/browser_Troubleshoot.js on a CLOSED TREE 2019-11-26 04:49:17 +02:00
windows Backed out changeset 91f3048cc58e (bug 1594145) for browser-chrome failures at toolkit/modules/tests/browser/browser_Troubleshoot.js on a CLOSED TREE 2019-11-26 04:49:17 +02:00
x11
BasicEvents.h Bug 1581192 - WidgetEvent::mFlags::mDispatchedAtLeastOnce needs to be reset before dispatching in content process again r=smaug 2019-11-26 09:08:38 +00:00
CommandList.h Bug 1555227 - Make GetInternalCommand() return new commands when the command is "cmd_align" without params r=m_kato 2019-06-04 10:01:31 +00:00
CompositorWidget.cpp Bug 1573343 - Stop using LayoutDevice units in BasicCompositor. r=mattwoodrow 2019-08-19 22:40:55 +00:00
CompositorWidget.h Bug 1597585 - Make LayerManagerComposite use mGL to pass the GL context to PreRender, just like WebRender. r=mattwoodrow 2019-11-20 23:22:58 +00:00
ContentCache.cpp
ContentCache.h Bug 1289211 - Rename InfallibleTArray to nsTArray in widget/ r=jmathies 2019-07-10 03:33:42 +00:00
ContentEvents.h
EventClassList.h
EventForwards.h
EventMessageList.h Bug 1518442 - Part 1: Implement FormDataEvent interface; r=smaug,edgar 2019-09-09 13:53:25 +00:00
FontRange.h
GfxDriverInfo.cpp Bug 1570736 - Blocklist WR swizzling on HD3000 r=jrmuizel 2019-10-28 21:38:11 +00:00
GfxDriverInfo.h Bug 1570736 - Blocklist WR swizzling on HD3000 r=jrmuizel 2019-10-28 21:38:11 +00:00
GfxInfoBase.cpp Backed out changeset 91f3048cc58e (bug 1594145) for browser-chrome failures at toolkit/modules/tests/browser/browser_Troubleshoot.js on a CLOSED TREE 2019-11-26 04:49:17 +02:00
GfxInfoBase.h Bug 1593725 - cache gfx information so we don't re-read prefs and re-search blocklists for each content process, r=jrmuizel 2019-11-09 02:21:18 +00:00
GfxInfoCollector.cpp
GfxInfoCollector.h
GfxInfoX11.cpp Backed out changeset 91f3048cc58e (bug 1594145) for browser-chrome failures at toolkit/modules/tests/browser/browser_Troubleshoot.js on a CLOSED TREE 2019-11-26 04:49:17 +02:00
GfxInfoX11.h Backed out changeset 91f3048cc58e (bug 1594145) for browser-chrome failures at toolkit/modules/tests/browser/browser_Troubleshoot.js on a CLOSED TREE 2019-11-26 04:49:17 +02:00
IMEData.cpp Bug 1577685 - Move some utility functions from IMEStateManager to widget. r=masayuki 2019-08-30 05:56:58 +00:00
IMEData.h Bug 1577685 - Move some utility functions from IMEStateManager to widget. r=masayuki 2019-08-30 05:56:58 +00:00
InProcessCompositorWidget.cpp Bug 1576390 - Remove now-unused DrawWindowOverlay and WindowOverlayChanged methods. r=mattwoodrow 2019-11-13 02:24:06 +00:00
InProcessCompositorWidget.h Bug 1576390 - Remove now-unused DrawWindowOverlay and WindowOverlayChanged methods. r=mattwoodrow 2019-11-13 02:24:06 +00:00
InputData.cpp Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond 2019-06-20 16:18:45 -04:00
InputData.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-07-06 08:18:28 +00:00
LookAndFeel.h
LSBUtils.cpp
LSBUtils.h
MiscEvents.h
MouseEvents.h
moz.build Bug 1565401 - return valid screen size on multimonitor setup under Wayland; r=stransky,NeilDeakin 2019-10-17 11:27:08 +00:00
NativeKeyToDOMCodeName.h
NativeKeyToDOMKeyName.h
nsAppShellSingleton.h Bug 1545381 - be more defensive in nsAppShellSingleton; r=erahm 2019-07-22 20:52:35 +00:00
nsAutoRollup.cpp
nsAutoRollup.h
nsBaseAppShell.cpp
nsBaseAppShell.h
nsBaseClipboard.cpp Bug 1557847. Stop using [array] in nsIClipboard. r=NeilDeakin 2019-06-09 01:06:39 +00:00
nsBaseClipboard.h
nsBaseDragService.cpp Bug 1552814, make it possible to start dnd from dragable element even if DataTransfer is empty, r=NeilDeakin 2019-10-07 21:01:57 +00:00
nsBaseDragService.h Bug 1561056 - Pass CSP on Link-drop r=ckerschb,Gijs,farre 2019-08-20 12:43:02 +00:00
nsBaseFilePicker.cpp Bug 1585284 - Use nsIGlobalObject in any Blob/File CTOR, r=smaug 2019-10-21 05:33:33 +00:00
nsBaseFilePicker.h Bug 1553603 - Support "capture" attribute in Gecko and expose in GV. r=geckoview-reviewers,smaug,snorp,agi 2019-07-30 18:13:05 +00:00
nsBaseScreen.cpp
nsBaseScreen.h
nsBaseWidget.cpp Bug 1588484 - Disable Advanced Layers for now when using fission for the window. r=kmag 2019-11-24 20:59:07 +00:00
nsBaseWidget.h Bug 1597893 : convert NS_STYLE_WINDOW_SHADOW_* to an enum class in nsStyleConsts.h r=emilio 2019-11-25 16:00:23 +00:00
nsClipboardHelper.cpp
nsClipboardHelper.h
nsClipboardProxy.cpp Bug 1557847. Stop using [array] in nsIClipboard. r=NeilDeakin 2019-06-09 01:06:39 +00:00
nsClipboardProxy.h
nsColorPickerProxy.cpp
nsColorPickerProxy.h
nsContentProcessWidgetFactory.cpp Bug 1312422 - Web Share Base/DOM implementation r=farre 2019-10-09 10:57:11 +00:00
nsDeviceContextSpecProxy.cpp
nsDeviceContextSpecProxy.h
nsDragServiceProxy.cpp Bug 1561056 - Pass CSP on Link-drop r=ckerschb,Gijs,farre 2019-08-20 12:43:02 +00:00
nsDragServiceProxy.h
nsFilePickerProxy.cpp Bug 1585284 - Use nsIGlobalObject in any Blob/File CTOR, r=smaug 2019-10-21 05:33:33 +00:00
nsFilePickerProxy.h Bug 1553603 - Support "capture" attribute in Gecko and expose in GV. r=geckoview-reviewers,smaug,snorp,agi 2019-07-30 18:13:05 +00:00
nsGUIEventIPC.h Bug 1578147 - Align the Rust and C++ representations of WritingMode. r=emilio,jfkthame 2019-09-09 04:49:55 +00:00
nsHTMLFormatConverter.cpp
nsHTMLFormatConverter.h
nsIApplicationChooser.idl
nsIAppShell.idl
nsIBaseWindow.idl
nsIBidiKeyboard.idl
nsIClipboard.idl Bug 1557847. Stop using [array] in nsIClipboard. r=NeilDeakin 2019-06-09 01:06:39 +00:00
nsIClipboardHelper.idl
nsIClipboardOwner.idl
nsIColorPicker.idl
nsIDeviceContextSpec.h
nsIDisplayInfo.idl
nsIdleService.cpp
nsIdleService.h
nsIDragService.idl Bug 1581285, cancel drags in child processes when the drag gesture is stopped in the parent, r=smaug 2019-10-01 14:07:27 +00:00
nsIDragSession.idl Bug 1561056 - Pass CSP on Link-drop r=ckerschb,Gijs,farre 2019-08-20 12:43:02 +00:00
nsIFilePicker.idl Bug 1553603 - Support "capture" attribute in Gecko and expose in GV. r=geckoview-reviewers,smaug,snorp,agi 2019-07-30 18:13:05 +00:00
nsIFormatConverter.idl
nsIGfxInfo.idl Backed out changeset 91f3048cc58e (bug 1594145) for browser-chrome failures at toolkit/modules/tests/browser/browser_Troubleshoot.js on a CLOSED TREE 2019-11-26 04:49:17 +02:00
nsIGfxInfoDebug.idl
nsIGtkTaskbarProgress.idl
nsIIdleService.idl
nsIIdleServiceInternal.idl
nsIJumpListBuilder.idl
nsIJumpListItem.idl
nsIKeyEventInPluginCallback.h
nsIMacDockSupport.idl
nsIMacFinderProgress.idl Bug 909760 - Show download progress in the MacOS Finder r=spohl,mak 2019-06-19 18:48:49 +00:00
nsIMacSharingService.idl
nsIMacWebAppUtils.idl
nsINativeMenuService.h
nsIPluginWidget.h
nsIPrintDialogService.h
nsIPrinterEnumerator.idl
nsIPrintSession.idl
nsIPrintSettings.idl
nsIPrintSettingsService.idl
nsIPrintSettingsWin.idl
nsIRollupListener.h
nsIScreen.idl
nsIScreenManager.idl Bug 1581606 - Consider all screens when deciding to turn on WebRender. r=jrmuizel 2019-10-02 18:48:11 +00:00
nsISharePicker.idl Bug 1588420 - Add init() to SharePicker.idl, which provides a means to get to browser parent r=droeh 2019-10-15 00:52:09 +00:00
nsISound.idl
nsIStandaloneNativeMenu.idl
nsISystemStatusBar.idl
nsITaskbarOverlayIconController.idl
nsITaskbarPreview.idl
nsITaskbarPreviewButton.idl
nsITaskbarPreviewController.idl
nsITaskbarProgress.idl
nsITaskbarTabPreview.idl
nsITaskbarWindowPreview.idl
nsITouchBarHelper.idl Bug 1563350 - Add popover to the Touch Bar that displays when the Urlbar has focus. r=mikedeboer,spohl,fluent-reviewers,Pike,flod 2019-10-10 19:57:32 +00:00
nsITouchBarInput.idl Bug 1563349 - Part 2 - Support TouchBarInput children. r=spohl 2019-10-09 15:25:43 +00:00
nsITouchBarUpdater.idl Bug 1563349 - Part 4 - Support NSPopoverTouchBarItem. r=spohl 2019-10-09 17:55:15 +00:00
nsITransferable.idl
nsIWidget.h Bug 1597893 : convert NS_STYLE_WINDOW_SHADOW_* to an enum class in nsStyleConsts.h r=emilio 2019-11-25 16:00:23 +00:00
nsIWidgetListener.cpp Bug 1586986 - Deliver 'fixed-bottom' offset to the top of the pres context on the foreground tab. r=geckoview-reviewers,tnikkel,snorp 2019-11-21 21:15:46 +00:00
nsIWidgetListener.h Bug 1586986 - Deliver 'fixed-bottom' offset to the top of the pres context on the foreground tab. r=geckoview-reviewers,tnikkel,snorp 2019-11-21 21:15:46 +00:00
nsIWindowsUIUtils.idl
nsIWinTaskbar.idl
nsNativeTheme.cpp Bug 1591546 Part 2 - Add WritingMode::IsPhysicalRTL(). r=jfkthame 2019-10-28 18:22:05 +00:00
nsNativeTheme.h Bug 1578377 - Render dark scrollbars for element with dark background on Windows. r=jmathies 2019-10-23 21:00:28 +00:00
nsPrimitiveHelpers.cpp
nsPrimitiveHelpers.h
nsPrintSession.cpp
nsPrintSession.h
nsPrintSettingsImpl.cpp
nsPrintSettingsImpl.h
nsPrintSettingsService.cpp Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug 2019-09-30 22:06:47 +00:00
nsPrintSettingsService.h
nsShmImage.cpp
nsShmImage.h
nsSoundProxy.cpp Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan 2019-08-07 19:49:40 +00:00
nsSoundProxy.h
nsTransferable.cpp
nsTransferable.h
nsWidgetInitData.h Bug 1588484 - Disable Advanced Layers for now when using fission for the window. r=kmag 2019-11-24 20:59:07 +00:00
nsWidgetsCID.h Bug 1312422 - Web Share Base/DOM implementation r=farre 2019-10-09 10:57:11 +00:00
nsXPLookAndFeel.cpp Bug 1592189 - Remove SpecialColorKeyword enum and merge into SystemColor r=emilio 2019-11-14 00:17:23 +00:00
nsXPLookAndFeel.h Bug 1561546 Part 2 - Update theme when nsXPLookAndFeel prefs change. r=dholbert,jmathies 2019-09-19 19:05:01 +00:00
PCompositorWidget.ipdl
PlatformWidgetTypes.ipdlh
PluginWidgetProxy.cpp Bug 1553769 - Make nsIWidget::SetFocus infallible, and make it take an enum class. r=NeilDeakin 2019-05-31 22:13:56 +00:00
PluginWidgetProxy.h Bug 1553769 - Make nsIWidget::SetFocus infallible, and make it take an enum class. r=NeilDeakin 2019-05-31 22:13:56 +00:00
ProcInfo.h Bug 1577819, part 2 - WebIDLProcType should match ProcType. r=Ehsan 2019-08-30 21:55:42 +00:00
PuppetBidiKeyboard.cpp
PuppetBidiKeyboard.h
PuppetWidget.cpp Bug 1594215 - Make PuppetWidget::GetEditCommands() check mBrowserChild before using it r=smaug 2019-11-08 11:32:51 +00:00
PuppetWidget.h Bug 1594215 - Make PuppetWidget::GetEditCommands() check mBrowserChild before using it r=smaug 2019-11-08 11:32:51 +00:00
Screen.cpp Bug 1573992 - Convert layout.css.devPixelsPerPx to static pref. r=njn 2019-08-26 21:02:43 +00:00
Screen.h
ScreenManager.cpp Bug 1589601 - Return the fallback to primary monitor on Wayland to not break PIP; r=stransky 2019-11-05 08:14:18 +00:00
ScreenManager.h
SharedWidgetUtils.cpp Bug 1559414 - Rename unaudited pre-fission methods with SameProcess for future audit burndown. r=nika 2019-07-26 16:48:31 +00:00
SystemTimeConverter.h Bug 834505 undef GetCurrentTime() from windows-h-wrapper.template.h r=glandium 2019-09-18 02:52:20 +00:00
TextEventDispatcher.cpp Bug 1585553 - s/wchar_t/char16_t/ for a variable always initialized from char16_t. r=masayuki 2019-10-03 10:53:39 +00:00
TextEventDispatcher.h Bug 1573992 - Convert two dom.keyboardevent.* prefs to staticprefs. r=njn 2019-08-26 20:25:42 +00:00
TextEventDispatcherListener.h
TextEvents.h Bug 1594215 - Make PuppetWidget::GetEditCommands() check mBrowserChild before using it r=smaug 2019-11-08 11:32:51 +00:00
TextRange.h
TouchEvents.h
VsyncDispatcher.cpp
VsyncDispatcher.h
WidgetEventImpl.cpp Bug 1594215 - Make PuppetWidget::GetEditCommands() check mBrowserChild before using it r=smaug 2019-11-08 11:32:51 +00:00
WidgetMessageUtils.h
WidgetTraceEvent.h
WidgetUtils.cpp
WidgetUtils.h
WindowSurface.h
WindowSurfaceX11SHM.cpp
WindowSurfaceX11SHM.h