electron/lib
Samuel Attard 49aba471dc
feat: add support for associating a Menu with a WebFrameMain (#45138)
* feat: add support for associating a Menu with a WebFrameMain

This allows certain OS level features to activate such as Writing Tools, Autofill.. and Services.

There appears to be a bug in macOS where the responder chain isn't traversed if the menu is not popped up using an event, as such we spoof a fake mouse event at the write coordinates in the right window and use that to open the menu.

* build: fix build on non-mac

* build: oops missed a header

* fix: safely handle optional T* by checking nullptr too

* build: fix gn check and build errors

* docs: suggested changes

* feat: default `frame` to `window.webContents.mainFrame` when possible

* fix: avoid deref nullptr view

* Revert "feat: default `frame` to `window.webContents.mainFrame` when possible"

This reverts commit 2e888368199317d67f6ad931a7e9eff0295c4b1b.

* fix: lint

* Remove redundant scoped objects

This code, including the comments, matches almost exactly the behavior of this argument to the function.

* Add ScopedPumpMessagesInPrivateModes patch

* More null pointer safety

---------

Co-authored-by: clavin <clavin@electronjs.org>
2025-03-28 11:50:07 -07:00
..
browser feat: add support for associating a Menu with a WebFrameMain (#45138) 2025-03-28 11:50:07 -07:00
common build: add import/order eslint rule (#44085) 2024-10-02 19:10:44 -07:00
isolated_renderer refactor: cleanup global variable declarations (#38410) 2023-05-24 20:01:07 +02:00
node chore: bump node to v22.13.1 (main) (#45307) 2025-01-29 15:41:00 -05:00
preload_realm feat: service worker preload scripts for improved extensions support (#44411) 2025-01-31 09:32:45 -05:00
renderer feat: service worker preload scripts for improved extensions support (#44411) 2025-01-31 09:32:45 -05:00
sandboxed_renderer feat: service worker preload scripts for improved extensions support (#44411) 2025-01-31 09:32:45 -05:00
utility build: add import/order eslint rule (#44085) 2024-10-02 19:10:44 -07:00
worker fix: EventSource undefined in Renderer/Worker (#44475) 2024-10-31 15:24:44 -04:00