Commit graph

4014 commits

Author SHA1 Message Date
trop[bot]
79d6160bdc
docs: fix --experimental-network-inspection spelling (#47574)
doc: fix `--experimental-network-inspection` spelling

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-06-26 16:38:22 +02:00
Shelley Vohr
3e8e87d186
feat: support customizing window accent color on Windows (#47285) 2025-06-24 14:43:02 +02:00
Shelley Vohr
2ad762e075
feat: support HIDDevice.collections (#47391)
* feat: support HIDDevice.collections

* Update docs/api/structures/hid-device.md

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

---------

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-06-16 15:56:08 -04:00
Niklas Wenzel
d7ef8b79ae
docs: mention kwallet6 command line option (#47427) 2025-06-10 16:12:31 -04:00
Erick Zhao
6aa3665b96
docs: no class inheritance (#47403) 2025-06-10 10:00:06 +02:00
Robo
c964296ec3
feat: add support for --no-experimental-global-navigator (#47370)
chore: add support for --no-experimental-global-navigator
2025-06-09 14:57:27 +09:00
Erick Zhao
2a51a997eb
docs: update link to runAsNode fuse (#47350) 2025-06-05 10:03:58 +02:00
Shelley Vohr
fbb3fa7503
feat: allow intercepting mouse events (#47280)
* feat: allow intercepting mouse events

* test: add specs

* Update spec/api-web-contents-spec.ts

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-06-04 14:10:33 +02:00
Shelley Vohr
c22f94037a
docs: document possible print failureReasons (#47337)
docs: document possible print failureReasons
2025-06-04 14:09:24 +02:00
Shelley Vohr
17ba863f69
docs: correct 'select-bluetooth-device' requirement (#47325) 2025-06-03 10:16:16 +02:00
zeeker999
dc5efca0f6
feat: [net] add "priority" option to net.request (#42628)
document the default value of priority option

Update the priority test to not use the httpbin.org as server

Fixed the lint errors

Fixed the build error
2025-05-30 15:28:13 -04:00
Shelley Vohr
c84e8c6c22
feat: expose win.isContentProtected() (#47242)
* feat: expose win.isContentProtected()

* chore: remove stray _isContentProtected
2025-05-30 11:00:13 +02:00
David Sanders
83524adf17
chore: fix lint for ImageView doc (#47304) 2025-05-29 17:10:41 -04:00
David Sanders
0d70389ccb
chore: lint code blocks in docs with ESLint (#42113) 2025-05-29 12:45:26 -07:00
Will Anderson
5b5f900e34
docs: add documentation for ImageView (#46760)
* docs: Add documentation for ImageView

* docs: Add ImageView main process module list in README.md

* test: Add some basic tests for ImageView

* test: Fill out Window embedding tests to better reflect how someone might use an ImageView

* docs: Add notes about using ImageView as a splash screen

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* docs: Update ImageView example to show a more complete splash screen example

* docs: Remove view resizing logic since the ImageView automatically gets resized

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-05-29 10:24:16 -07:00
Gellert Hegyi
b9b96a96f7
feat: add menu item role palette and header (#45538)
* feat: add menu item role `palette` and `header`

* adds comments

* refactors new role items to new item types

* docs: custom type

* docs: note types only available on mac 14+

---------

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
2025-05-23 12:43:49 -04:00
Erick Zhao
dc34e8732c
docs: add note on DIP and DPI (#47080) 2025-05-15 16:51:49 -05:00
Erick Zhao
2493e530d0
docs: unify [!NOTE] structure (#46893)
* docs: unify [!NOTE] structure

* Update docs/api/command-line.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* Update docs/api/browser-window.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* Update docs/api/download-item.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* Update docs/api/global-shortcut.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* revert line break

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-05-09 14:36:42 -07:00
Michaela Laurencin
10e4f9ad37
feat: enable secondary label for macOS menu (#46887)
* feat: enable secondary label for macOS menu

* Update shell/browser/ui/cocoa/electron_menu_controller.mm

Co-authored-by: Robo <hop2deep@gmail.com>

* fix for lint

* update docs for sublabel

---------

Co-authored-by: Robo <hop2deep@gmail.com>
2025-05-09 12:05:26 -04:00
Aman Karmani
376634c75a
feat: add support for --experimental-network-inspection (#46690)
* feat: add support for `--experimental-network-inspection`

* docs: fix minor formatting issues

visible on both GH[1] and the docs site[2]

[1] https://github.com/electron/electron/blob/main/docs/api/command-line-switches.md#nodejs-flags
[2] https://www.electronjs.org/docs/latest/api/command-line-switches#--inspect-brkhostport

* docs: add entry for new nodejs flag
2025-05-09 09:44:14 -04:00
Erick Zhao
be399f2fee
docs: use correct heading level for API function (#46892) 2025-05-05 16:10:37 -05:00
Yuri
7153008bfa
docs: clarified usage of createFromPath() (#46809)
* docs: clarified usage of createFromPath()

* Update docs/api/native-image.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-05-02 11:11:54 +02:00
Shelley Vohr
ede84fc327
feat: support dip <-> screen conversion on Linux X11 (#46211)
feat: support dip <-> screen conversion on Linux
2025-05-02 10:31:45 +02:00
Charles Kerr
3f3c297c7a
fix: enable some tests that were accidentally disabled (#46816)
* test: add platform test on visibleOnAllWorkspaces tests

visibleOnAllWorkspaces is not supported on Windows

* test: do not skip visibleOnAllWorkspaces tests on Windows

That feature is supported on Linux, so move the test from the
"window states (excluding Linux)" section into the
"window states" section.

* fix: nested it() calls in visibleOnAllWorkspaces specs

* chore: make the process.platform test simpler

* fix: tests that were not run in api-app-spec due to nested it()

* fix: tests that were not run in api-browser-window-spec due to nested it()

* chore: annotate disabled test

* fix: enable `autoHideMenuBar` tests on Linux and Windows (#46818)

* fix: enable autoHideMenuBar tests

* docs: mark autoHideMenuBar as supported on Linux, Windows
2025-04-28 12:32:57 -05:00
Charles Kerr
686ae47696
refactor: remove redundant NativeImage::GetBitmap() (#46696)
* refactor: remove redundant NativeImage::GetBitmap()

* docs: mark NativeImage.getBitmap() as deprecated

* have getBitmap() emit a deprecation warning

* docs: update obsolete refefence to getBitmap()

* test: update obsolete refefences to getBitmap()

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-04-23 11:00:43 +02:00
Keeley Hammond
a9b2ec514b
fix: fallback to old MacOS context menu behavior if no frame is present (#46595)
* fix: fallback to old MacOS context menu behavior if no frame is present

Co-authored-by: georgexu99 <georgexu99@electronjs.org>
Co-authored-by: erickzhao <erickzhao@electronjs.org>
Co-authored-by: clavin <calvin@electronjs.org>

* docs: add additional option for focusedFrame

* fix: handle frame found, but no view update from rfh

* fix: fix conditional

Co-authored-by: Calvin <clavin@users.noreply.github.com>

---------

Co-authored-by: georgexu99 <georgexu99@electronjs.org>
Co-authored-by: erickzhao <erickzhao@electronjs.org>
Co-authored-by: clavin <calvin@electronjs.org>
Co-authored-by: Calvin <clavin@users.noreply.github.com>
2025-04-11 10:15:35 -04:00
Shelley Vohr
446d0769ed
feat: expose nativeTheme.shouldUseDarkColorsForSystemIntegratedUI (#46438)
feat: expose shouldUseDarkColorsForSystemIntegratedUI

Closes https://github.com/electron/electron/issues/46429.
Refs https://github.com/electron/electron/pull/19735.

This PR adds a new API `shouldUseDarkColorsForSystemIntegratedUI` to the
`nativeTheme` module. This API returns a boolean indicating whether the
system is using dark colors for system integrated UI elements. This is
useful for applications that want to adapt their UI to match the system
theme, especially for those that use system integrated UI elements like
the shell theme or taskbar appearance.
2025-04-10 12:08:29 +02:00
Yuri
de407e82b7
docs: updated tray doc with tooltip removing (#46515)
added tooltip removing doc
2025-04-09 11:50:08 -04:00
Charles Kerr
a6875c732c
docs: note that titleBarOverlay.symbolColor is supported on Linux (#46492)
docs: note that titleBarOverlay.symbolColor is supported on Linux

this is supported via OpaqueFrameView
2025-04-07 11:10:54 +02:00
electron-roller[bot]
9c019b6147
chore: bump chromium to 136.0.7095.0 (main) (#46118)
* chore: bump chromium in DEPS to 136.0.7076.0

* chore: bump chromium in DEPS to 136.0.7077.0

* 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | 6368856

* 6356528: Clean up LegacyRenderWidgetHostHWND code | 6356528

* chore: export patches

* 6339113: [Viewport Segments] Add CDP commands to override Viewport Segments without overriding other device properties. | 6339113

* 6352169: [DevTools][MultiInstance] Support new tab in another window on Android | 6352169

* 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | 6368856

* 6360858:Clickiness: Wire response from URLLoader to DB, add e2e tests| 6360858

* chore: bump chromium in DEPS to 136.0.7079.0

* chore: export patches

* chore: bump chromium in DEPS to 136.0.7081.0

* chore: export patches

* chore: bump chromium in DEPS to 136.0.7083.0

* 6361987: Remove double-declaration with gfx::NativeView and gfx::NativeWindow | 6361987

* chore: export patches

* chore: bump chromium in DEPS to 136.0.7087.0

* chore: export patches

* fix: include node patch for missing AtomicsWaitEvent
6385540

* build: add depot_tools python to path

* fix: cppgc init and unregistering v8 isolate

6333562

CppGc is now initialized earlier so Node can skip reinitializing it.

Additionally, gin::IsolateHandle was attempting to destruct an already destructed
v8::Isolate upon electron::JavaScriptEnvironment destruction. By removing the call
to NodePlatform::UnregisterIsolate, this fixes the crash on app shutdown.

* fix: unregister isolate after destruction

See code comment.

* chore: bump chromium in DEPS to 136.0.7095.0

* chore: sync patches

* fix: add script_parsing::ContentScriptType parameter
6298395

* fix: migrate content::BrowserAccessibilityState methods
6401437
6383275

* feat: enableHappyEyeballs option for host resolver
6332599

* fix: add new cookie exclusion reason
6343479

* fix: add new url loader method
6337340

* fix: add new cppgc header file for electron_node headers
6348644

* fix: disable CREL on Linux ARM64
https://chromium-review.googlesource.com/q/I3a62f02f564f07be63173b0773b4ecaffbe939b9

* fixup! fix: add new cppgc header file for electron_node headers 6348644

* chore: update corner smoothing patch

* fixup! chore: update corner smoothing patch

* chore: disable NAN weak tests

These two tests are incompatible with a V8 change that disallows running JS code from a weak finalizer callback.

Ref: 4733273

* test: fix task starvation in node test

A V8 change makes these contexts get collected in a task that is posted
and run asynchronously. The tests were synchronously GC'ing in an
infinite loop, preventing the task loop from running the task that would
GC these contexts.

This change should be upstreamed in some way.

Ref: 4733273

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: alice <alice@makenotion.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: clavin <clavin@electronjs.org>
2025-04-03 19:02:49 -05:00
Charles Kerr
5a6f1ede6a
feat!: remove support for ProtocolResponse.session null value (#46264)
BREAKING CHANGE

This was deprecated in f7ba0d3b & is now being removed for Electron 37.
2025-04-01 08:52:12 -05:00
Shelley Vohr
9c4720766d
fix: UtilityProcess.fork crash before app ready (#46380)
fix: UtilityProcess.fork crash before app ready
2025-04-01 13:42:03 +02:00
Shelley Vohr
5da75c4a97
feat: support system-context-menu on Linux (#45848)
feat: support system-context-menu on Linux
2025-04-01 11:00:39 +02:00
Calvin
09135443a0
feat: Corner Smoothing CSS rule (Reland) (#46278)
* feat: Corner Smoothing CSS rule (Reland)

Reland of #45185

* Fix patch conflicts

* fixup! Fix patch conflicts

* Update expected image

The dashed border is subtly different. The new version is correct and the old one was incorrect.
2025-03-31 11:22:23 -05:00
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
Shelley Vohr
d2c2261c58
fix: hard crash on invalid command line switches (#46004)
* fix: hard crash on invalid command line switch

* Update docs/api/command-line.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* chore: feedback from review

* docs: Add breaking change note

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-03-26 08:14:03 -05:00
Charles Kerr
f7ba0d3b4b
docs: deprecate setting ProtocolResponse.session to null (#46131)
* docs: deprecate setting ProtocolResponse.session to null

* docs: mark null ProtocolResponse.session as deprecated in struct docs

* Update docs/breaking-changes.md

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>

---------

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2025-03-25 10:04:21 -05:00
Calvin
abaef13c0b
fix: Revert "feat: Corner Smoothing CSS rule" (#46231)
Revert "feat: Corner Smoothing CSS rule (#45185)"

This reverts commit b75e802280.
2025-03-24 20:36:49 +01:00
Calvin
b75e802280
feat: Corner Smoothing CSS rule (#45185)
* feat: Corner Smoothing

* Patch Blink to add CSS rule and Painting

* Add `system-ui` keyword

* Add `cornerSmoothingCSS` web preference

* Add tests

* Documentation

* fixup! Documentation

* fix: initialize smoothness value

* Use a 1.0 scale factor in tests

* Fix tests for CI

* Fix tests

* fixup! Merge branch 'main' into clavin/corner-smoothing

* Add code docs

* Document `system-ui` keyword values

* Address review comments

* fixup! Address review comments

* Address review comments

* Update patch to address upstream changes

The patch went from 694 lines to 505 lines, which is a 27.2% smaller!

* fixup! Update patch to address upstream changes
2025-03-24 11:46:12 -04:00
Shelley Vohr
9ec14b91e7
feat: add BrowserWindow.isSnapped() (#46079)
* feat: add BrowserWindow.isSnapped() on Windows

* docs: mark _Readonly_
2025-03-24 12:09:14 +01:00
Erik Moura
e9082ea57a
docs: fix capitalization for InputEvent.modifiers (#46130) 2025-03-23 16:38:15 -05:00
Shelley Vohr
603057b198
fix: remove File.path from types (#46005) 2025-03-21 08:40:49 +01:00
Shelley Vohr
86cc9f626f
fix: APNS token ids are lowercase ASCII (#46101) 2025-03-20 07:57:50 +01:00
Niklas Wenzel
bf1d377e08
docs: use optional chaining for app.dock (#46119)
docs: use optional chaining for app.dock
2025-03-19 18:34:03 -05:00
Niklas Wenzel
71f3ff6bf2
docs: fix types of app.dock (#46073) 2025-03-18 13:14:08 +01:00
Sam Maddock
afca4e271e
feat: ServiceWorkerMain.scriptURL (#45863)
feat: serviceWorker.scriptURL
2025-03-14 21:00:13 -04:00
electron-roller[bot]
20414f66ca
chore!: bump chromium to 136.0.7054.0 (main) (#45923)
* chore: bump chromium in DEPS to 136.0.7054.0

* chore: update allow_in-process_windows_to_have_different_web_prefs.patch

Xref: 5906158

patch applied manually due to context shear

* chore: e patches all

* refactor!: Session.clearStorageData(syncable)

Xref: 6309405

Remove syncable type from opts.quota in Session.clearStorageData(opts)
because it that category has been removed upstream.

BREAKING CHANGE: Removed ses.clearDataStorage({ quota: 'syncable' })

* docs: deprecate Session.clearDataStorage({ quota })

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-07 17:49:21 -06:00
Sam Maddock
8c11764800
feat: WebContents.focusedFrame (#45667)
feat: webContents.focusedFrame
2025-03-04 11:38:58 -05:00
reito
b8d0f18ff8
docs: add docs about shared texture mode osr (#45670)
* docs: add docs about shared texture mode osr

* docs: add docs about shared texture mode osr

* docs: fix dot

* 更新 web-contents.md

Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>

---------

Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
2025-02-27 11:10:58 -05:00
Dietrich Ayala
ff05d4a96c
docs: dialog.md - typo fix s/wndow/window/ (#45831)
Update dialog.md - typo fix
2025-02-27 10:32:42 +01:00