gecko-dev/toolkit
Emilio Cobos Álvarez a14c746228 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-15 03:11:55 +00:00
..
actors Backed out changeset ad94b64c18cb (bug 1751763) for causing mochitests failures on browser_startup_images.js. CLOSED TREE 2022-12-13 10:29:08 +02:00
components Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers 2022-12-15 03:11:55 +00:00
content Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers 2022-12-15 03:11:55 +00:00
crashreporter Bug 1802064 - Handle failure to send crash annotations from child to parent on Windows. r=gsvelto 2022-12-13 22:57:48 +00:00
docs
library Backed out changeset e6becf16d643 (bug 1788306) for causing bustage on UniFFICallbacks.cpp. CLOSED TREE 2022-12-15 01:16:12 +02:00
locales Backed out changeset 514642d76faa (bug 1792138) for causing mochitests failures in test_ext_protocolHandlers.html. CLOSED TREE 2022-12-13 14:53:38 +02:00
modules Bug 718280 - Part 2: Move registration of migrators into MigrationUtils instead of components.conf. r=NeilDeakin 2022-12-13 17:01:24 +00:00
mozapps Backed out 11 changesets (bug 1804903, bug 1804902, bug 1804900, bug 1804899, bug 1712329, bug 1804898, bug 1804894, bug 1804904, bug 1804896, bug 1804905) for breaking gecko decision task. CLOSED TREE 2022-12-15 03:16:41 +02:00
profile Bug 1804701 - Improve layout of profileDowngrade dialog. r=mconley 2022-12-09 15:44:46 +00:00
system Bug 1797163: handle IAsyncOperations with callbacks and events instead of spinlocking r=nrishel 2022-11-21 21:48:21 +00:00
themes Bug 1805154 - fix pip controls focus outline and tooltip after pressing enter r=kpatenio 2022-12-14 19:18:31 +00:00
xre Bug 1799470 - Merge old embedding logic into ContentChild r=nika 2022-12-15 03:06:22 +00:00
.eslintrc.js
l10n-registry.manifest
moz.build Bug 1275849 - Part 2. Merge ProxyUtils for Windows and macOS. r=necko-reviewers,valentin 2022-11-08 09:19:09 +00:00
moz.configure Bug 1805504 - Disable wasm sandboxing when building rusttests. r=firefox-build-system-reviewers,nalexander 2022-12-14 00:52:16 +00:00
toolkit.mozbuild Bug 1790912 - Migrate js/ductwork/debugger to devtools/platform. r=ochameau 2022-09-25 09:03:34 +00:00