Compare commits

...

128 Commits

Author SHA1 Message Date
trop[bot]
4c96ced00a fix: WebUSB should not crash when using in-memory partitions (#42364)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-06-05 11:26:58 -07:00
Hans Halverson
e645ea88e0 fix: vibrant view is inserted into Views API hierarchy (#42263) 2024-06-05 11:14:22 -07:00
trop[bot]
484cf26787 fix: don't destroy BrowserView webContents when owning BrowserWindow hasn't been closed (#42371)
fix: don't destroy BrowserView webContents when owning BrowserWindow hasn't been closed (#42353)

* fix: moves bv webContents close to closed event

* chore: adds unit tests

* chore: test that bv webContents are destroyed when parent bw closed

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Anny Yang <anny@electronjs.org>
2024-06-05 12:00:30 +02:00
electron-roller[bot]
fb6b8e91db chore: bump chromium to 124.0.6367.243 (30-x-y) (#42328)
chore: bump chromium in DEPS to 124.0.6367.243

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2024-06-03 12:07:12 -04:00
electron-roller[bot]
3be338100a chore: bump node to v20.14.0 (30-x-y) (#42294)
* chore: bump node in DEPS to v20.13.1

* chore: bump node in DEPS to v20.14.0

* chore: update build_add_gn_build_files.patch

* chore: update patches

* chore: update patches

* build: encode non-ASCII Latin1 characters as one byte in JS2C

https://github.com/nodejs/node/pull/51605

* crypto: use EVP_MD_fetch and cache EVP_MD for hashes

https://github.com/nodejs/node/pull/51034

* chore: update filenames.json

* chore: update patches

* src: support configurable snapshot

https://github.com/nodejs/node/pull/50453

* test: remove test-domain-error-types flaky designation

https://github.com/nodejs/node/pull/51717

* src: avoid draining platform tasks at FreeEnvironment

https://github.com/nodejs/node/pull/51290

* chore: fix accidentally deleted v8 dep

* lib: define FormData and fetch etc. in the built-in snapshot

https://github.com/nodejs/node/pull/51598

* chore: remove stray log

* crypto: enable NODE_EXTRA_CA_CERTS with BoringSSL

https://github.com/nodejs/node/pull/52217

* test: skip test for dynamically linked OpenSSL

https://github.com/nodejs/node/pull/52542

* lib, url: add a `windows` option to path parsing

https://github.com/nodejs/node/pull/52509

* src: use dedicated routine to compile function for builtin CJS loader

https://github.com/nodejs/node/pull/52016

* test: mark test as flaky

https://github.com/nodejs/node/pull/52671

* build,tools: add test-ubsan ci

https://github.com/nodejs/node/pull/46297

* src: preload function for Environment

https://github.com/nodejs/node/pull/51539

* deps: update c-ares to 1.28.1

https://github.com/nodejs/node/pull/52285

* chore: fixup

* events: extract addAbortListener for safe internal use

https://github.com/nodejs/node/pull/52081

* module: print location of unsettled top-level await in entry points

https://github.com/nodejs/node/pull/51999

* fs: add stacktrace to fs/promises

https://github.com/nodejs/node/pull/49849

* chore: fixup indices

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Cheng <zcbenz@gmail.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2024-06-01 10:16:58 +02:00
trop[bot]
5523d91bc8 fix: dialogs should work with BaseWindows internally (#42327)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-05-31 20:56:19 +02:00
trop[bot]
6cb747e9c9 fix: restore original BrowserWindow.show() behavior (#42306)
The new activate API on macOS is pretty bad, we should just keep using
the old API. Similar to #42180. Restores non-panel behavior to pre-panel
support.

Notes: BrowserWindow.show() now correctly restores focus to inactive apps on macOS

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2024-05-29 13:54:57 -07:00
Max Schmitt
ebe3d4a19a build: update typescript-definitions to 8.15.6 (#42286)
build: update typescript-definitions to 8.15.6 (#41900)
2024-05-29 19:29:50 +02:00
trop[bot]
27cdf17562 docs: ensure all links are on a single line (#42299)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2024-05-29 11:41:07 +02:00
trop[bot]
b228923399 fix: calculate a hash for the Tag property of ToastNotification. (#42274)
* fix: calculate a hash for the Tag property of ToastNotification.

Co-authored-by: bill.shen <shenyb32768@gmail.com>

* fix: calculate a hash for the Tag property of ToastNotification.

Co-authored-by: bill.shen <shenyb32768@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: bill.shen <shenyb32768@gmail.com>
2024-05-27 10:00:51 +02:00
trop[bot]
e2e0116668 fix: fixed the type of WebviewTag.webpreferences (#42280)
fix: fixed the type of WebviewTag.webpreferences

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: EvolutionX <85353424+EvolutionX-10@users.noreply.github.com>
2024-05-26 21:48:28 +02:00
electron-roller[bot]
d2984eb773 chore: bump chromium to 124.0.6367.233 (30-x-y) (#42269)
* chore: bump chromium in DEPS to 124.0.6367.233

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2024-05-24 21:21:14 +02:00
Keeley Hammond
812cd564f2 chore: cherry-pick 3e037e195e50 from v8 (#42255)
* chore: cherry-pick 3e037e195e50 from v8

* chore: update patches

---------

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2024-05-23 18:28:31 +02:00
electron-roller[bot]
2c0adc29e9 chore: bump chromium to 124.0.6367.230 (30-x-y) (#42246)
chore: bump chromium in DEPS to 124.0.6367.230

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2024-05-22 15:26:41 -07:00
Keeley Hammond
0416b11529 fix: fix TSF hang when using non-English IMEs (#42249)
fix: cherry-pick TSF hang revert for DPI changes

This reverts Chrome commit 9577a678355605656c7664e6367b0144948dad84.
2024-05-22 13:03:35 -07:00
electron-roller[bot]
7d1fb75712 chore: bump chromium to 124.0.6367.221 (30-x-y) (#42208)
* chore: bump chromium in DEPS to 124.0.6367.221

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2024-05-17 15:03:04 -04:00
trop[bot]
5f6807d90d docs: fix broken anchors (#42215)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2024-05-17 12:04:23 +02:00
trop[bot]
0f13974e90 fix: win.center() on Windows (#42196)
fix: win.center() on Windows

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-05-16 10:15:34 -07:00
Keeley Hammond
574879fa40 chore: remove focus ring patch (#42189) 2024-05-15 10:18:48 +02:00
trop[bot]
05ae671d83 fix: webContents.navigationHistory should be enumerable (#42181)
fix: webContents.navigationHistory should be enumerable

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-05-14 17:46:59 -07:00
trop[bot]
220166419f fix: restore non-panel focus behavior (#42187)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2024-05-14 17:44:27 -07:00
trop[bot]
60f48e1753 fix: fix cast in ElectronDesktopWindowTreeHostLinux (#42185)
Fix cast in ElectronDesktopWindowTreeHostLinux

The frame view of the widget is an `ClientFrameViewLinux` instance only
when both `frame` and `client_frame` booleans are set to `true`.
Otherwise it is an instance of a different class and thus casting to
`ClientFrameViewLinux` is incorrect and leads to crashes.

Fix: #41839

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Fedor Indutny <indutny@signal.org>
2024-05-14 16:14:45 -07:00
Keeley Hammond
c0e5ef40cc chore: cherry-pick b3c01ac1e60a from v8 (#42174)
* chore: cherry-pick b3c01ac1e60a from v8

* chore: update patches

---------

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2024-05-14 15:55:59 -07:00
Shelley Vohr
842aa02179 fix: setTitleBarOverlay should be implemented on BaseWindow (#42151) 2024-05-14 16:31:41 -04:00
Samuel Attard
40450d0a0e build: ignore node version mismatch for electron 30 tests (#42177) 2024-05-14 16:02:55 -04:00
electron-roller[bot]
526e2f8916 chore: bump chromium to 124.0.6367.207 (30-x-y) (#42166)
* chore: bump chromium in DEPS to 124.0.6367.207

* chore: update patches

* chore: update docker container version to fix broken testing

https://github.com/electron/electron/runs/24917447946

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-05-14 16:02:39 -04:00
Samuel Attard
1872411ae8 test: add tests for electron fuses (#42148)
test: add tests for electron fuses (#42129)

* spec: add tests for electron fuses

* spec: fix tests for windows

* spec: handle weird crash codes on win32

* spec: disable fuse tests on arm64 windows
2024-05-13 13:35:52 -07:00
trop[bot]
de2279599e fix: partially revert invalidate focus ring (#42145)
* fix: partially revert invalidate focus ring

Co-authored-by: VerteDinde <keeleymhammond@gmail.com>

* chore: resolve patch after backport

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2024-05-13 11:28:15 -07:00
trop[bot]
ea064a015a docs: improve protocol.handle file examples (#42141)
* docs: improve protocol.handle file examples

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

* chore: fix lint

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2024-05-13 16:59:39 +02:00
trop[bot]
fb54883e26 fix: BrowserView autoresizing conversion error (#42137)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-05-13 13:02:57 +02:00
Keeley Hammond
c26ef77e6c chore: cherry-pick f320600cd1f4 from v8 (#42122)
* chore: cherry-pick f320600cd1f4 from v8

* chore: update patches

---------

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2024-05-13 13:01:19 +02:00
trop[bot]
08abef64f4 fix: View reordering on re-addition to same parent (#42115)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-05-13 13:01:05 +02:00
trop[bot]
4d988dd217 refactor: use //ui/shell_dialogs on Linux (#42110) 2024-05-12 10:05:32 +02:00
electron-roller[bot]
0864b87b56 chore: bump chromium to 124.0.6367.201 (30-x-y) (#42117)
* chore: bump chromium in DEPS to 124.0.6367.201

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2024-05-10 11:43:00 -04:00
trop[bot]
0650ffc715 fix: CHECK when adding view as its own child (#42107)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-05-09 12:33:21 -04:00
electron-roller[bot]
73046231c0 chore: bump chromium to 124.0.6367.157 (30-x-y) (#42089)
* chore: bump chromium in DEPS to 124.0.6367.155

* chore: bump chromium in DEPS to 124.0.6367.157

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2024-05-09 11:27:35 -04:00
trop[bot]
431dcfc0fe fix: BrowserWindow.center() should center relative to screen (#42100)
* fix: BrowserWindow.center() should center relative to screen

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: feedback from review & remove test

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-05-09 10:00:24 +02:00
Erick Zhao
9d7b2003e3 docs: update formatting for mdx3 compatibility (#42099)
* docs: update formatting for mdx3 compatibility (#42052)

docs: update formatting for mdx3 compat

* escape curly braces
2024-05-08 19:12:29 -07:00
Samuel Attard
8969189a72 chore: cherry-pick b2cc7b7ac538 from chromium (#42096)
* chore: cherry-pick b2cc7b7ac538 from chromium

* chore: update patches

---------

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2024-05-08 14:29:07 -07:00
trop[bot]
376cdfaa05 docs: make corrections for BrowserViews since it is deprecated (#42083)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Peter Xu <sysu.peter.hsu@gmail.com>
2024-05-08 13:09:36 +02:00
Keeley Hammond
65e87cb8a4 chore: cherry-pick 013961609785 from chromium (#42068)
* chore: cherry-pick 013961609785 from chromium

* chore: update patches

---------

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2024-05-08 11:23:33 +02:00
trop[bot]
cf1cbab1d2 fix: avoid crash after upgrade on Linux (#42064)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: cptpcrd <31829097+cptpcrd@users.noreply.github.com>
2024-05-07 20:31:09 -04:00
Shelley Vohr
c7187d52b1 fix: do not defer construction by one microtick in stream (#42046) 2024-05-07 23:21:51 +02:00
trop[bot]
e76787ead1 fix: requestFullscreen from WebContentsView (#41996)
fix: requestFullscreen from WebContentsView

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-05-03 11:28:00 -04:00
trop[bot]
da26750352 fix: recentDocuments on macOS not working (#41992)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-05-03 10:11:21 -04:00
John Kleinschmidt
9b25f82930 chore: fixup gn check when enable_pdf_viewer is false (#41997) 2024-05-03 09:10:36 -05:00
electron-roller[bot]
f1e9fd3daa chore: bump chromium to 124.0.6367.119 (30-x-y) (#42020)
chore: bump chromium in DEPS to 124.0.6367.119

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2024-05-03 09:44:04 -04:00
electron-roller[bot]
ddcb2b7183 chore: bump chromium to 124.0.6367.118 (30-x-y) (#42015)
* chore: bump chromium in DEPS to 124.0.6367.118

* chore: update patches

* chore: disable tests that require nut.js (#42006)

* chore: disable tests that require nut.js

* fixup! chore: disable tests that require nut.js

(cherry picked from commit 4dff815f47)

* test: revert inadvertent winreg change

winreg 1.2.5 breaks the following tests:
app module setAsDefaultProtocolClient(protocol, path, args) creates a registry entry for the protocol class
app module setAsDefaultProtocolClient(protocol, path, args) only unsets a class registry key if it contains other data

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-05-02 17:40:21 -05:00
electron-roller[bot]
aa25b3a76e chore: bump chromium to 124.0.6367.91 (30-x-y) (#41976)
* chore: bump chromium in DEPS to 124.0.6367.91

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2024-04-29 19:06:40 -04:00
trop[bot]
33e28236b7 build: work around ScreenCaptureKit bad feature flag parsing in Chromium (#41961)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-04-25 22:07:11 -04:00
electron-roller[bot]
90f03d728e chore: bump chromium to 124.0.6367.78 (30-x-y) (#41959)
* chore: bump chromium in DEPS to 124.0.6367.78

* chore: update patches

* Revert "[Clipboard] Don't add meta charset tag for async write() method on Mac."

https://chromium-review.googlesource.com/c/chromium/src/+/5455853

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-04-25 09:11:00 -04:00
trop[bot]
f3f27f0796 docs: Windows typo in Tutorial document (#41949)
Update tutorial-6-publishing-updating.md

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: South Drifted <shiy2008@gmail.com>
2024-04-23 21:13:38 -05:00
electron-roller[bot]
28a21403bc chore: bump chromium to 124.0.6367.62 (30-x-y) (#41943)
chore: bump chromium in DEPS to 124.0.6367.62

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2024-04-23 12:49:56 -04:00
trop[bot]
9e5987fde2 docs: correct the return value for canceled showSaveDialog (#41945)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>
2024-04-23 12:49:05 -04:00
trop[bot]
aab21a9652 build: fixup codespaces on-create (#41935)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-04-23 11:24:26 -04:00
trop[bot]
8d69c95ee0 fix: data corruption in protocol.handle (#41933)
* fix: data corruption in protocol.handle

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* slice instead of subarray

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2024-04-23 11:23:19 -04:00
trop[bot]
8fd8757248 fix: offscreen rendering does not paint after gpu process crashed (#41925)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: zhangqi.67 <zhangqi.67@bytedance.com>
2024-04-22 17:04:39 -05:00
trop[bot]
d800684d74 build: use latest devcontainer buildimage with codespaces (#41921)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-04-22 12:21:47 -04:00
trop[bot]
eb8ed882b9 fix: EINVAL when spawning cmd files on Windows (#41905)
fix: EINVAL when spawning on Windows

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-04-19 16:41:59 -04:00
trop[bot]
91f257044d fix: nativeImage.createThumbnailFromPath and shell.openExternal in renderer (#41909)
* fix: nativeImage.createThumbnailFromPath in renderer

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* also fix shell.openExternal

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2024-04-19 10:56:43 -05:00
trop[bot]
98c9e20913 chore: remove unused hash function (#41887)
Unused since e1e73fa #24115

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-04-18 17:32:09 -04:00
trop[bot]
162a8e7199 docs: update build docs,support Powershell on Windows (#41883)
* docs: update build docs,support Powershell on Windows

Co-authored-by: nashaofu <diaocheng@outlook.com>

* chore: fix capitalization

Co-authored-by: nashaofu <diaocheng@outlook.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: nashaofu <diaocheng@outlook.com>
2024-04-18 11:35:12 -04:00
electron-roller[bot]
6256d43f06 chore: bump chromium to 124.0.6367.60 (30-x-y) (#41867)
chore: bump chromium in DEPS to 124.0.6367.60

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2024-04-16 10:29:17 -04:00
trop[bot]
b66fa29095 chore: delete unused PrintPreviewMessageHandler (#41861)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-04-15 17:35:59 -05:00
trop[bot]
c37c7fd3c4 feat: support NODE_EXTRA_CA_CERTS (#41822)
* feat: support NODE_EXTRA_CA_CERTS

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: allow disabling NODE_EXTRA_CA_CERTS

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: call base::Environment::UnSetVar

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* docs: link to fuses from env vars

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: update patch to match upstream

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* docs: note enabled by default

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* Update environment-variables.md

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-04-15 12:22:39 -07:00
trop[bot]
cf1087badd feat: implement File System API support (#41827)
* feat: implement File System API support

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* test: add a test for writable permission checking

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: gn check include issues

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: feedback from review

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: cleanup feedback from review

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* refactor: namespace to electron

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fixup! chore: cleanup feedback from review

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: address more feedback from review

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 5301485: Add content analysis to File System Access Javascript API.

https://chromium-review.googlesource.com/c/chromium/src/+/5301485

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* docs: improve typing of details object

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: address outstanding todo

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* refactor: use Chrome's file system access blocklist

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* lint

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: Windows build

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* test: clarify test verbiage

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-04-15 12:22:17 -07:00
trop[bot]
20c6c37c1b docs: clarify before ready usage (#41860)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2024-04-15 13:03:58 -04:00
trop[bot]
8351f535ac docs: use "id" instead of "label" for positions (#41859)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Cedrik Ewers <C.Ewers@beckhoff.com>
2024-04-15 13:02:05 -04:00
trop[bot]
d592db55c6 fix: package <__assertion_handler> as part of libcxx headers (#41846)
Refs https://chromium-review.googlesource.com/c/chromium/src/+/5208502

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2024-04-15 16:49:42 +09:00
trop[bot]
a79268e3ad docs: update ASAR integrity tutorial (#41834)
* docs: document windows asar integrity

Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>

* docs: update ASAR integrity tutorial

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* fix lint

Co-authored-by: Erick Zhao <erick@hotmail.ca>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2024-04-14 17:07:35 -07:00
electron-roller[bot]
6390119664 chore: bump chromium to 124.0.6367.49 (30-x-y) (#41852)
* chore: bump chromium in DEPS to 124.0.6367.49

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2024-04-14 17:04:30 -07:00
trop[bot]
1b6e7768fe fix: do not activate app when showing a panel on Mac (#41844)
* fix: do not activate app when showing or focusing a panel on Mac

Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>

* restored panel activation test

Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>
2024-04-13 16:55:42 +02:00
trop[bot]
d6d6dd973f docs: update release timeline (#41835)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2024-04-12 10:30:37 -07:00
trop[bot]
8b0bc691c4 fix: silent printing default dpi on Windows (#41838)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-04-12 18:17:28 +02:00
trop[bot]
3ea26fb9d0 fix: move BrowserWindow's WebContentsView to be a child of rootview (#41802)
fix: move BrowserWindow's WebContentsView to be a child of rootview (#41256)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2024-04-10 13:20:44 +02:00
trop[bot]
73fd29195f build: add missing header for content::SyntheticGestureTarget (#41799)
IWYU: add missing header for `content::SyntheticGestureTarget`

GNU libstdc++ does not allow using std::unique_ptr on incomplete types,
leading to a compile error.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Bruno Pitrus <brunopitrus@hotmail.com>
2024-04-10 10:23:47 +02:00
trop[bot]
793901d0f0 fix: WCO maximize button visibility when non-maximizable (#41805)
fix: WCO button visibility when non-maximizable

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-04-10 10:18:15 +02:00
Alice Zhao
9056dd728a feat: add navigationHistory.getEntryAtIndex(int index) method (#41662)
* feat: add `navigationHistory.getEntryAtIndex(int index)` method (#41577)

* test: fix flaky tests by replacing real urls with data urls

* test: remove hardcoded url
2024-04-05 13:59:46 -04:00
David Sanders
e6417c7084 build: add Markdown lint check for unescaped angle brackets (#41779) 2024-04-05 13:53:42 -04:00
electron-roller[bot]
c9b2de9a36 chore: bump chromium to 124.0.6367.29 (30-x-y) (#41768)
* chore: bump chromium in DEPS to 124.0.6367.29

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-04-04 13:43:29 -04:00
electron-roller[bot]
46f9867083 chore: bump chromium to 124.0.6367.18 (30-x-y) (#41714)
* chore: bump chromium in DEPS to 124.0.6367.18

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-04-01 15:35:32 -04:00
trop[bot]
8a47acebe7 docs: add missing headers option to ClientRequest options (#41732)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2024-04-01 12:05:56 -04:00
trop[bot]
e3a1cb7cc0 build: combine ImportModuleDynamically patches (#41745)
build: combine ImportModuleDynamically patches

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-04-01 11:40:45 -04:00
trop[bot]
dbb23b047e feat(serial): allow Bluetooth ports to be requested by service class ID (#41734)
* feat(serial): allow Bluetooth ports to be requested by service class ID

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: bluetooth dependency

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-04-01 10:55:15 -04:00
trop[bot]
7031c930fd fix: Storage.{get|set|clear}Cookies via CDP not working (#41740)
* fix: Storage.{get|set|clear}Cookies via CDP not working

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: simplify BrowserContext plumbing

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-28 20:52:08 -05:00
trop[bot]
b5c9945692 test: disable flaky <webview>.capturePage() specs (#41737)
test: disable flaky <webview>.capturePage() specs

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-28 20:51:57 -05:00
trop[bot]
9ebeeb40ac fix: don't do self-destroy in LibnotifyNotification::Dismiss() (#41708)
Callers of Notification::Dismiss() assume that the notification
instance is not deleted after the call, but this was not the case
for LibnotifyNotification:
- Destroy() would get `this` deleted.
- notify_notification_close() in portal environment triggers
LibnotifyNotification::OnNotificationClosed(), and finally calls
Destroy()

This patch removes all Destroy() in Dismiss(), and adds a boolean
to tell whether notify_notification_close() is running, to avoid crash
under portal environment.

Fixes #40461.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: taoky <me@taoky.moe>
2024-03-28 12:09:59 +01:00
trop[bot]
5655b68c37 test: add tests for Storage Access API (#41719)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-27 15:47:44 -05:00
trop[bot]
ba1e7fcaa7 test: add test and api_feature definition for chrome.scripting.globalParams (#41700)
chore: add test and api_feature for chrome.scripting.globalParams

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-27 10:21:04 +01:00
trop[bot]
313476a724 fix: crash on extension unload when script validation finishes (#41702)
https://chromium-review.googlesource.com/c/chromium/src/+/5225796

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-26 23:50:13 +01:00
Erick Zhao
1b80911417 docs: backslash escape parametrized TypeScript types (#41693) 2024-03-26 12:28:47 +01:00
trop[bot]
83777ac83f refactor: update gin_helper/function_template (#41683)
* refactor: update gin_helper/function_template

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: crash in Node.js Worker threads

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-25 14:39:25 +01:00
electron-roller[bot]
f585a4ef37 chore: bump chromium to 124.0.6367.9 (30-x-y) (#41684)
chore: bump chromium in DEPS to 124.0.6367.9

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2024-03-25 12:29:43 +01:00
electron-roller[bot]
a8e2ec14ba chore: bump chromium to 124.0.6367.8 (30-x-y) (#41599)
* chore: bump chromium in DEPS to 124.0.6356.6

* chore: bump chromium in DEPS to 124.0.6361.0

* chore: bump chromium in DEPS to 124.0.6363.0

* chore: bump chromium in DEPS to 124.0.6365.0

* chore: update patches

Manually apply printing.patch w/no code changes due to upstream shear.
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/5349263

(cherry picked from commit 205434867f6806681e3cacae73a363b25c2f87c2)

* chore: update windows toolchain

5350823: New toolchain for Windows 11 10.0.22621.2428 SDK | https://chromium-review.googlesource.com/c/chromium/src/+/5350823
(cherry picked from commit 9a022e8f9cf17657eb6c3f2c0a308f538afffd9c)

* chore: bump chromium in DEPS to 124.0.6367.8

* chore: update patches

* 5371735: Rename SystemGeolocationSourceMac to SystemGeolocationSourceApple

https://chromium-review.googlesource.com/c/chromium/src/+/5371735
(cherry picked from commit f3016b18e7d73bf462131eb51ead4a2574310219)

* build: use updated windows toolchain

* 5348565: Fix VoiceOver doesn't read dropdown menu items

https://chromium-review.googlesource.com/c/chromium/src/+/5348565

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2024-03-25 10:24:53 +01:00
trop[bot]
a46685fd59 fix: WTF-8 decoding issue in node:fs (#41681)
fix: WTF-8 decoding issue in node:fs

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-25 10:02:13 +01:00
trop[bot]
9ef3902841 fix: normalize path before calling showItemInFolder and openPath (#41671)
* fix: normalize path before calling ShowItemInFolder

Co-authored-by: piotrpdev <piotrpdev@gmail.com>

* fix: normalize path before calling OpenPath

Co-authored-by: piotrpdev <piotrpdev@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: piotrpdev <piotrpdev@gmail.com>
2024-03-24 20:39:28 +01:00
trop[bot]
0f1e52fafe fix: app.setLoginItemSettings error getting swallowed by gin conversion (#41667)
* fix: errors getting swallowed by gin conversion

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: Windows build

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* test: re-enable disabled test

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-22 16:59:51 +01:00
trop[bot]
21341a56a7 ci: use CircleCI hosted macOS arm64 runners for testing (#41654)
* ci: use CircleCI hosted macOS arm64 runners for testing

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* test: disable transparency tests on macOS arm64 (#41580)

(cherry picked from commit 6cb84ddbfb)

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-22 10:57:35 +01:00
trop[bot]
516f6d0a40 docs: nodejs trademark policy link broken (#41652)
* Fix broken Trademark Policy link

Co-authored-by: kghamilton89 <kghamilton@protonmail.com>

* add durable link

Per codebyter: https://github.com/electron/electron/pull/41558#discussion_r1522938560

Co-authored-by: Kenneth Gerald Hamilton <29099829+kghamilton89@users.noreply.github.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: kghamilton89 <kghamilton@protonmail.com>
Co-authored-by: Kenneth Gerald Hamilton <29099829+kghamilton89@users.noreply.github.com>
2024-03-21 20:40:48 +01:00
trop[bot]
78ce4c473b fix: serial-port-added should respect filters (#41635)
fix: serial-port-added should respect filters

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-21 12:57:45 +01:00
trop[bot]
417e16cedd fix: missing badge text on Windows (#41629)
https://chromium-review.googlesource.com/c/chromium/src/+/5053607

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-19 23:16:12 +01:00
trop[bot]
a47b724c99 chore: bump chromium to 124.0.6359.0 (30-x-y) (#41606)
* chore: bump chromium in DEPS to 124.0.6355.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* 5341411: view-transition: Ensure resources are cleaned up in all cases.

https://chromium-review.googlesource.com/c/chromium/src/+/5341411

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fixup patch indices

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 5354013: Return nullopt on error from ProcessMetrics CPU measurements

https://chromium-review.googlesource.com/c/chromium/src/+/5354013

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: bump chromium in DEPS to 124.0.6357.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>

* 5368769: Reland "[mojo] Use large worker for mojom_parser action"

https://chromium-review.googlesource.com/c/chromium/src/+/5368769

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 5336171: [Extensions] Introduce a CoreExtensionsRendererAPIProvider

https://chromium-review.googlesource.com/c/chromium/src/+/5336171

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 5367334: [FS Shortcut] Refactor ExclusiveAccessManager

https://chromium-review.googlesource.com/c/chromium/src/+/5367334

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 5354161: Rename GeolocationManager to GeolocationSystemPermissionManager

https://chromium-review.googlesource.com/c/chromium/src/+/5354161

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* fixup: [Extensions] Introduce a CoreExtensionsRendererAPIProvider

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: bump chromium in DEPS to 124.0.6359.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>

* 5371370: [Extensions] Move core NativeHandler registration

https://chromium-review.googlesource.com/c/chromium/src/+/5371370

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 5370702: [Extensions] Introduce ShellExtensionsRendererAPIProvider

https://chromium-review.googlesource.com/c/chromium/src/+/5370702

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-03-15 18:13:55 -04:00
trop[bot]
ee4bbb5851 fix: account for potentially swapped FrameTreeNodeId in WebFrameMain (#41594)
fix: account for potentially swapped FrameTreeNodeId in WebFrameMain

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-14 13:02:09 -04:00
electron-roller[bot]
b713e34947 chore: bump chromium to 124.0.6355.1 (30-x-y) (#41490)
* chore: bump chromium to 124.0.6351.0

* chore: bump chromium in DEPS to 124.0.6339.0

* chore: update patches

* chore: bump chromium in DEPS to 124.0.6341.0

* chore: update patches

* chore: bump chromium in DEPS to 124.0.6343.0

* chore: bump chromium in DEPS to 124.0.6345.0

* chore: update patches

* build: temporarily patch out usage of reclient inputs cfg

* chore: implement missing OnPortConnectedStateChanged

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5039155

* fix: move NativeHandlers in extensions to new RendererAPIProvider

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5332839
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5334058

* chore: add missing websocket method

* refactor: use std::erase instead of base::Erase

Ref: https://issues.chromium.org/issues/40256229

* build: fix reclient inputs processor bug (workaround)

* fix: delay extensions::Dispatcher construction

* chore: bump chromium in DEPS to 124.0.6347.0

* chore: bump chromium in DEPS to 124.0.6349.0

* 5326217: [ViewsAX] Remove WebAXPlatformTreeManagerDelegate

https://chromium-review.googlesource.com/c/chromium/src/+/5326217

* 5347916: Get origin from parent for process-isolated srcdoc.

https://chromium-review.googlesource.com/c/chromium/src/+/5347916

* chore: patches fixup

* 4866222: [api] Deprecate vector<v8::Local>, part 1

https://chromium-review.googlesource.com/c/v8/v8/+/4866222

* 5337304: Remove DXDiag telemetry code.

https://chromium-review.googlesource.com/c/chromium/src/+/5337304

* 5328275: Implement watermark routing to the BrowserView

https://chromium-review.googlesource.com/c/chromium/src/+/5328275

* [libc++] Rename __fwd/hash.h to __fwd/functional.h and add reference_wrapper

* chore: bump chromium in DEPS to 124.0.6351.0

* chore: update patches

* 5342763: [object] Fast path for adding props with existing transition

https://chromium-review.googlesource.com/c/v8/v8/+/5342763

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: bump chromium to 124.0.6353.0

* chore: bump chromium in DEPS to 124.0.6353.0

* chore: update patches

* 5365462: Add missing perfetto::Flow and TRACE_EVENT includes

https://chromium-review.googlesource.com/c/chromium/src/+/5365462

* 5356336: Ensure destruction of mojo channel when destructing KeySystemsImpl

https://chromium-review.googlesource.com/c/chromium/src/+/5356336

* 5332839: [Extensions] Register NativeHandlers with the RendererAPIProvider

https://chromium-review.googlesource.com/c/chromium/src/+/5332839

* 5148827: Add permission types for keyboard lock and pointer lock [1/N]

https://chromium-review.googlesource.com/c/chromium/src/+/5148827

* 5358818: Revert "[object] Fast path for adding props with existing transition"

https://chromium-review.googlesource.com/c/v8/v8/+/5358818

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-14 10:42:18 -04:00
trop[bot]
b39f36496d fix: improve caption button appearance on Windows 11 (#41586)
https://chromium-review.googlesource.com/c/chromium/src/+/4428171

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-14 09:54:31 +01:00
trop[bot]
d16f1d52e8 docs: nativeImage api cleanup (#41570)
* docs: `nativeImage` api cleanup

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* Update docs/api/native-image.md

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* Update native-image.md

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* Update docs/api/native-image.md

Co-authored-by: Felix Rieseberg <fr@makenotion.com>

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* Update link to app icon

Co-authored-by: Alice Zhao <66543449+alicelovescake@users.noreply.github.com>

Co-authored-by: Erick Zhao <erick@hotmail.ca>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2024-03-13 10:46:19 -04:00
trop[bot]
d3b182f8b9 fix: chrome://process-internals failing to load (#41540)
fix: chrome://process-internals failing to load

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-03-12 20:35:58 +01:00
trop[bot]
35099d9289 docs: Update code signing documentation (#41553)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
2024-03-12 12:51:35 -04:00
trop[bot]
b45f579eda test: disable CapturableScreen tests on Windows x64 (#41547)
* test: disable CapturableScreen tests on Windows x64

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* test: disable js-execute-iframe" case should not crash on win 32-bit

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-03-08 09:32:34 -05:00
trop[bot]
64c031f264 docs: correct release timeline inaccuracy (#41517)
docs: correct timeline inaccuracy

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-07 11:38:13 +01:00
trop[bot]
058c6b4af7 chore: bump chromium to 124.0.6331.0 (30-x-y) (#41515)
* chore: bump chromium in DEPS to 124.0.6329.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 5319449: Activate popups after async opener fullscreen exit transitions | https://chromium-review.googlesource.com/c/chromium/src/+/5319449

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 5321532: [//ui] Remove ContextFactory::SharedMainThreadContextProvider() | https://chromium-review.googlesource.com/c/chromium/src/+/5321532

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* fixup! 5319449: Activate popups after async opener fullscreen exit transitions | https://chromium-review.googlesource.com/c/chromium/src/+/5319449

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 5319141: [OOPIF PDF] Create PdfNavigationThrottle for main frame navigations | https://chromium-review.googlesource.com/c/chromium/src/+/5319141

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* test: disable webview.capturePage test for mac arm64

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* chore: bump chromium in DEPS to 124.0.6337.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>

* build: roll back DEPS to 124.0.6331.0

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
2024-03-06 13:07:52 -05:00
trop[bot]
333ee6d51a fix: user-did-{resign|become}-active events on macOS (#41528)
fix: user-did-{resign|become}-active events on macOS

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-06 17:09:56 +01:00
trop[bot]
e7300ad4c8 chore: add missing gin::Wrappable GetTypeName overrides (#41531)
chore: add missing gin::Wrappable GetTypeName overrides

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-06 15:58:45 +01:00
trop[bot]
58ee15905b chore: fix fs overrides for asar (#41525)
fix: fs overrides for asar

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-06 12:45:16 +01:00
trop[bot]
036e8502e0 chore: update src_preload_function_for_environment.patch (#41505)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2024-03-04 10:16:56 -05:00
trop[bot]
17856cf91a fix: webContents.print options should be optional (#41480)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-02 11:24:36 -05:00
trop[bot]
56dfcc5468 chore: bump chromium to 124.0.6323.0 (30-x-y) (#41475)
* chore: bump chromium in DEPS to 124.0.6315.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 5279678: Stream AIDA responses

https://chromium-review.googlesource.com/c/chromium/src/+/5279678

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 5276439: Remove non_network_url_loader_factory_remotes_

https://chromium-review.googlesource.com/c/chromium/src/+/5276439

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 5310165: Add DevTools API to show search results

https://chromium-review.googlesource.com/c/chromium/src/+/5310165

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: bump chromium in DEPS to 124.0.6317.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Remove Setup.Install.CumulativeDiskUsage2 and supporting code

https://chromium-review.googlesource.com/c/chromium/src/+/5314269

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* browser: Make cmd line non-const in process singleton callback

https://chromium-review.googlesource.com/c/chromium/src/+/5311256

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: bump chromium in DEPS to 124.0.6319.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 124.0.6321.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 124.0.6323.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* 5318335: Roll src/third_party/boringssl/src 23824fa0f..4fe29ebc7

https://chromium-review.googlesource.com/c/chromium/src/+/5318335

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 5318051: [CBE Watermarking] Hoist `watermark_view` to a member variable.

https://chromium-review.googlesource.com/c/chromium/src/+/5318051

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fixup patch indices

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 4946553: Delegate HID permission to Chrome App in webview

https://chromium-review.googlesource.com/c/chromium/src/+/4946553

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 5310001: DevTools UI binding for reporting client events to AIDA

https://chromium-review.googlesource.com/c/chromium/src/+/5310001

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* Refactor the predicate taking variant of `__cxx_atomic_wait`

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fix browser_view patch harder

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 5293937: Reland "[gUM] Use preferred device if more than one is eligible"

https://chromium-review.googlesource.com/c/chromium/src/+/5293937

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: filter {video|audio} devices by eligible device id

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 5267921: enable speak content under the pointer on PWA and WV2

https://chromium-review.googlesource.com/c/chromium/src/+/5267921

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 5310195: heap: Remove Blink's GCTaskRunner

https://chromium-review.googlesource.com/c/chromium/src/+/5310195

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-02-29 09:50:27 -05:00
trop[bot]
105acec227 test: disable flaky macOS panel test & refactor screen capture testing (#41461)
* Disable flaky test

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

* Add helper for storing test artifacts

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

* Refactor screen capture tests

We have a pattern for inspecting a screen capture, so this refactor codifies that pattern into a helper. This gives us shorter test code, consistency (previously, the display in test code and the display captured could theoretically be different), and better debugging/observability on failure.

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2024-02-28 14:55:15 +09:00
trop[bot]
174aedf54c chore: remove deprecated inputFieldType (#41440)
chore: remove deprecated inputFieldType

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2024-02-28 14:52:01 +09:00
trop[bot]
47deb401b0 ci: add logging to uploading to GitHub releases (#41455)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-02-28 11:39:52 +09:00
trop[bot]
7331e5dfb1 refactor: prefer using base::NoDestructor to base::{Singleton,LazyInstance} (#41424)
refactor: prefer using base::NoDestructor to base::{Singleton,LazyInstance}

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-02-28 11:38:49 +09:00
trop[bot]
a55f23979e chore: add engflow-reclient-configs to gitignore (#41454)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-02-28 11:37:16 +09:00
trop[bot]
4a727c6a72 chore: fix import from patches.py in script/lib/git.py (#41436)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2024-02-26 10:05:33 +01:00
trop[bot]
fd8eec3585 build: update appveyor image to latest version-e-123.0.6312.5 (#41415)
build: update appveyor image to latest version

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: jkleinsc <jkleinsc@users.noreply.github.com>
2024-02-23 16:39:20 -08:00
trop[bot]
ef40e551cf feat: add support for configuring system network context proxies (#41417)
* feat: add support for configuring system network context proxies

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

* chore: add specs

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

* chore: fix lint

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

* fix: address review feedback

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2024-02-23 14:56:06 -06:00
trop[bot]
532039ea2c chore: bump chromium to 123.0.6312.5 (30-x-y) (#41402)
* chore: bump chromium in DEPS to 123.0.6300.2

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 123.0.6301.2

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

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

* chore: bump chromium in DEPS to 123.0.6302.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 123.0.6304.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 123.0.6306.2

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 123.0.6308.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>

* Refactor //components/pdf/common constants

https://chromium-review.googlesource.com/c/chromium/src/+/5292816

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

* Rename URLLoaderFactoryParams::is_corb_enabled to is_orb_enabled.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/5277040

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

* Add placeholder of speaker-selection permission.

Refs https://chromium-review.googlesource.com/c/chromium/src/+/5278243

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

* Move kPdfMimeType to //components/pdf/common/constants.h

Refs https://chromium-review.googlesource.com/c/chromium/src/+/5293155

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

* chore: gen-libc++-filenames.js

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

* Make GetClassName non virtual

Refs https://chromium-review.googlesource.com/c/chromium/src/+/5293075
Refs https://issues.chromium.org/issues/324596267

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

* chore: bump chromium in DEPS to 123.0.6310.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update filenames.libcxx.gni

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 5282732: Compute input region using correct pixel size.

https://chromium-review.googlesource.com/c/chromium/src/+/5282732

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* fixup: Make GetClassName non virtual

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: bump chromium in DEPS to 123.0.6312.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 123.0.6312.5

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* fixup: Make GetClassName non virtual

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* docs: document speaker-selection

https://chromium-review.googlesource.com/c/chromium/src/+/5278243

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-02-22 10:29:09 -05:00
trop[bot]
25b0212fe6 fix: use ScreenCaptureKit exclusively on macOS 14.4 and higher (#41404)
This fixes a nasty warning / permission dialog that pops up to end-users
when consuming legacy APIs.  Chrome has flipped these flags via field trials
as have other Electron apps. It should just be the default.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2024-02-22 14:32:32 +01:00
trop[bot]
310598c43d docs: update breaking changes language (#41399)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2024-02-21 12:09:39 -08:00
433 changed files with 8288 additions and 5030 deletions

View File

@@ -56,7 +56,7 @@ executors:
# 2xlarge should not be used directly, use the pipeline param instead # 2xlarge should not be used directly, use the pipeline param instead
enum: ["medium", "electronjs/aks-linux-medium", "xlarge", "electronjs/aks-linux-large", "2xlarge"] enum: ["medium", "electronjs/aks-linux-medium", "xlarge", "electronjs/aks-linux-large", "2xlarge"]
docker: docker:
- image: ghcr.io/electron/build:e6bebd08a51a0d78ec23e5b3fd7e7c0846412328 - image: ghcr.io/electron/build:9a43c14f5c19be0359843299f79e736521373adc
resource_class: << parameters.size >> resource_class: << parameters.size >>
macos: macos:
@@ -75,10 +75,6 @@ executors:
resource_class: << parameters.size >> resource_class: << parameters.size >>
# Electron Runners # Electron Runners
apple-silicon:
resource_class: electronjs/macos-arm64
machine: true
linux-arm: linux-arm:
resource_class: electronjs/aks-linux-arm-test resource_class: electronjs/aks-linux-arm-test
docker: docker:
@@ -1642,6 +1638,8 @@ commands:
fi fi
- store_test_results: - store_test_results:
path: src/junit path: src/junit
- store_artifacts:
path: src/electron/spec/artifacts
- *step-verify-mksnapshot - *step-verify-mksnapshot
- *step-verify-chromedriver - *step-verify-chromedriver
@@ -2296,8 +2294,10 @@ jobs:
- electron-tests: - electron-tests:
artifact-key: darwin-x64 artifact-key: darwin-x64
darwin-testing-arm64-tests: darwin-testing-arm64-tests:
executor: apple-silicon executor:
name: macos
size: macos.m1.medium.gen1
environment: environment:
<<: *env-mac-large <<: *env-mac-large
<<: *env-stack-dumping <<: *env-stack-dumping
@@ -2321,7 +2321,9 @@ jobs:
artifact-key: mas-x64 artifact-key: mas-x64
mas-testing-arm64-tests: mas-testing-arm64-tests:
executor: apple-silicon executor:
name: macos
size: macos.m1.medium.gen1
environment: environment:
<<: *env-mac-large <<: *env-mac-large
<<: *env-stack-dumping <<: *env-stack-dumping

View File

@@ -31,7 +31,8 @@
] ]
}, },
"vscode": { "vscode": {
"extensions": ["joeleinbinder.mojom-language", "extensions": [
"joeleinbinder.mojom-language",
"rafaelmaiolla.diff", "rafaelmaiolla.diff",
"surajbarkale.ninja", "surajbarkale.ninja",
"ms-vscode.cpptools", "ms-vscode.cpptools",

View File

@@ -2,7 +2,7 @@ version: '3'
services: services:
buildtools: buildtools:
image: ghcr.io/electron/devcontainer:3d8d44d0f15b05bef6149e448f9cc522111847e9 image: ghcr.io/electron/devcontainer:9a43c14f5c19be0359843299f79e736521373adc
volumes: volumes:
- ..:/workspaces/gclient/src/electron:cached - ..:/workspaces/gclient/src/electron:cached

View File

@@ -39,7 +39,6 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
write_config() { write_config() {
echo " echo "
{ {
\"goma\": \"$1\",
\"root\": \"/workspaces/gclient\", \"root\": \"/workspaces/gclient\",
\"remotes\": { \"remotes\": {
\"electron\": { \"electron\": {
@@ -49,7 +48,7 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
\"gen\": { \"gen\": {
\"args\": [ \"args\": [
\"import(\\\"//electron/build/args/testing.gn\\\")\", \"import(\\\"//electron/build/args/testing.gn\\\")\",
\"import(\\\"/home/builduser/.electron_build_tools/third_party/goma.gn\\\")\" \"use_remoteexec = true\"
], ],
\"out\": \"Testing\" \"out\": \"Testing\"
}, },
@@ -57,26 +56,18 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
\"CHROMIUM_BUILDTOOLS_PATH\": \"/workspaces/gclient/src/buildtools\", \"CHROMIUM_BUILDTOOLS_PATH\": \"/workspaces/gclient/src/buildtools\",
\"GIT_CACHE_PATH\": \"/workspaces/gclient/.git-cache\" \"GIT_CACHE_PATH\": \"/workspaces/gclient/.git-cache\"
}, },
\"\$schema\": \"file:///home/builduser/.electron_build_tools/evm-config.schema.json\" \"\$schema\": \"file:///home/builduser/.electron_build_tools/evm-config.schema.json\",
\"configValidationLevel\": \"strict\",
\"reclient\": \"$1\",
\"goma\": \"none\",
\"preserveXcode\": 5
} }
" >$buildtools/configs/evm.testing.json " >$buildtools/configs/evm.testing.json
} }
# Start out as cache only write_config remote_exec
write_config cache-only
e use testing e use testing
# Attempt to auth to the goma service via codespaces tokens
# if it works we can use the goma cluster
export NOTGOMA_CODESPACES_TOKEN=$GITHUB_TOKEN
if e d goma_auth login; then
echo "$GITHUB_USER has GOMA access - switching to cluster mode"
write_config cluster
fi
else else
echo "build-tools testing config already exists" echo "build-tools testing config already exists"
# Re-auth with the goma cluster regardless.
NOTGOMA_CODESPACES_TOKEN=$GITHUB_TOKEN e d goma_auth login || true
fi fi

View File

@@ -1,3 +1,17 @@
{ {
"extends": "@electron/lint-roller/configs/markdownlint.json" "extends": "@electron/lint-roller/configs/markdownlint.json",
"no-angle-brackets": true,
"no-inline-html": {
"allowed_elements": [
"br",
"details",
"img",
"li",
"summary",
"ul",
"unknown",
"Tabs",
"TabItem",
]
}
} }

View File

@@ -81,18 +81,11 @@ if (is_linux) {
] ]
} }
# Generates electron_gtk_stubs.h header which contains # Generates headers which contain stubs for extracting function ptrs
# stubs for extracting function ptrs from the gtk library. # from the gtk library. Function signatures for which stubs are
# Function signatures for which stubs are required should be # required should be declared in the sig files.
# declared in electron_gtk.sigs, currently this file contains
# signatures for the functions used with native file chooser
# implementation. In future, this file can be extended to contain
# gtk4 stubs to switch gtk version in runtime.
generate_stubs("electron_gtk_stubs") { generate_stubs("electron_gtk_stubs") {
sigs = [ sigs = [ "shell/browser/ui/electron_gdk_pixbuf.sigs" ]
"shell/browser/ui/electron_gdk_pixbuf.sigs",
"shell/browser/ui/electron_gtk.sigs",
]
extra_header = "shell/browser/ui/electron_gtk.fragment" extra_header = "shell/browser/ui/electron_gtk.fragment"
output_name = "electron_gtk_stubs" output_name = "electron_gtk_stubs"
public_deps = [ "//ui/gtk:gtk_config" ] public_deps = [ "//ui/gtk:gtk_config" ]
@@ -475,6 +468,7 @@ source_set("electron_lib") {
"//net:extras", "//net:extras",
"//net:net_resources", "//net:net_resources",
"//printing/buildflags", "//printing/buildflags",
"//services/device/public/cpp/bluetooth:bluetooth",
"//services/device/public/cpp/geolocation", "//services/device/public/cpp/geolocation",
"//services/device/public/cpp/hid", "//services/device/public/cpp/hid",
"//services/device/public/mojom", "//services/device/public/mojom",
@@ -700,6 +694,8 @@ source_set("electron_lib") {
sources += [ sources += [
"shell/browser/printing/print_view_manager_electron.cc", "shell/browser/printing/print_view_manager_electron.cc",
"shell/browser/printing/print_view_manager_electron.h", "shell/browser/printing/print_view_manager_electron.h",
"shell/browser/printing/printing_utils.cc",
"shell/browser/printing/printing_utils.h",
"shell/renderer/printing/print_render_frame_helper_delegate.cc", "shell/renderer/printing/print_render_frame_helper_delegate.cc",
"shell/renderer/printing/print_render_frame_helper_delegate.h", "shell/renderer/printing/print_render_frame_helper_delegate.h",
] ]
@@ -744,7 +740,7 @@ source_set("electron_lib") {
"//chrome/browser/resources/pdf:resources", "//chrome/browser/resources/pdf:resources",
"//components/pdf/browser", "//components/pdf/browser",
"//components/pdf/browser:interceptors", "//components/pdf/browser:interceptors",
"//components/pdf/common", "//components/pdf/common:constants",
"//components/pdf/renderer", "//components/pdf/renderer",
"//pdf", "//pdf",
] ]
@@ -1464,8 +1460,10 @@ dist_zip("hunspell_dictionaries_zip") {
} }
copy("libcxx_headers") { copy("libcxx_headers") {
sources = libcxx_headers + libcxx_licenses + sources = libcxx_headers + libcxx_licenses + [
[ "//buildtools/third_party/libc++/__config_site" ] "//buildtools/third_party/libc++/__assertion_handler",
"//buildtools/third_party/libc++/__config_site",
]
outputs = [ "$target_gen_dir/electron_libcxx_include/{{source_root_relative_dir}}/{{source_file_part}}" ] outputs = [ "$target_gen_dir/electron_libcxx_include/{{source_root_relative_dir}}/{{source_file_part}}" ]
} }

View File

@@ -125,8 +125,8 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct Community Impact Guidelines were inspired by
enforcement ladder](https://github.com/mozilla/diversity). [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/inclusion).
[homepage]: https://www.contributor-covenant.org [homepage]: https://www.contributor-covenant.org

4
DEPS
View File

@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
vars = { vars = {
'chromium_version': 'chromium_version':
'123.0.6296.0', '124.0.6367.243',
'node_version': 'node_version':
'v20.11.1', 'v20.14.0',
'nan_version': 'nan_version':
'e14bdcd1f72d62bca1d541b66da43130384ec213', 'e14bdcd1f72d62bca1d541b66da43130384ec213',
'squirrel.mac_version': 'squirrel.mac_version':

View File

@@ -9,8 +9,8 @@ View these docs in other languages on our [Crowdin](https://crowdin.com/project/
The Electron framework lets you write cross-platform desktop applications The Electron framework lets you write cross-platform desktop applications
using JavaScript, HTML and CSS. It is based on [Node.js](https://nodejs.org/) and using JavaScript, HTML and CSS. It is based on [Node.js](https://nodejs.org/) and
[Chromium](https://www.chromium.org) and is used by the [Visual Studio [Chromium](https://www.chromium.org) and is used by the
Code](https://github.com/Microsoft/vscode/) and many other [apps](https://electronjs.org/apps). [Visual Studio Code](https://github.com/Microsoft/vscode/) and many other [apps](https://electronjs.org/apps).
Follow [@electronjs](https://twitter.com/electronjs) on Twitter for important Follow [@electronjs](https://twitter.com/electronjs) on Twitter for important
announcements. announcements.
@@ -112,4 +112,4 @@ and more can be found on the [Community page](https://www.electronjs.org/communi
[MIT](https://github.com/electron/electron/blob/main/LICENSE) [MIT](https://github.com/electron/electron/blob/main/LICENSE)
When using Electron logos, make sure to follow [OpenJS Foundation Trademark Policy](https://openjsf.org/wp-content/uploads/sites/84/2021/01/OpenJS-Foundation-Trademark-Policy-2021-01-12.docx.pdf). When using Electron logos, make sure to follow [OpenJS Foundation Trademark Policy](https://trademark-policy.openjsf.org/).

View File

@@ -29,7 +29,7 @@
version: 1.0.{build} version: 1.0.{build}
build_cloud: electronhq-16-core build_cloud: electronhq-16-core
image: e-123.0.6296.0 image: e-123.0.6312.5
environment: environment:
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
ELECTRON_OUT_DIR: Default ELECTRON_OUT_DIR: Default
@@ -39,7 +39,7 @@ environment:
MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, tap" MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, tap"
DEPOT_TOOLS_WIN_TOOLCHAIN: 1 DEPOT_TOOLS_WIN_TOOLCHAIN: 1
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_" DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_"
GYP_MSVS_HASH_27370823e7: 28622d16b1 GYP_MSVS_HASH_7393122652: 3ba76c5c20
PYTHONIOENCODING: UTF-8 PYTHONIOENCODING: UTF-8
matrix: matrix:

View File

@@ -29,7 +29,7 @@
version: 1.0.{build} version: 1.0.{build}
build_cloud: electronhq-16-core build_cloud: electronhq-16-core
image: e-123.0.6296.0 image: e-123.0.6312.5
environment: environment:
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
ELECTRON_OUT_DIR: Default ELECTRON_OUT_DIR: Default
@@ -39,7 +39,7 @@ environment:
MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, tap" MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, tap"
DEPOT_TOOLS_WIN_TOOLCHAIN: 1 DEPOT_TOOLS_WIN_TOOLCHAIN: 1
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_" DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_"
GYP_MSVS_HASH_27370823e7: 28622d16b1 GYP_MSVS_HASH_7393122652: 3ba76c5c20
PYTHONIOENCODING: UTF-8 PYTHONIOENCODING: UTF-8
matrix: matrix:

View File

@@ -33,6 +33,8 @@ static_library("chrome") {
"//chrome/browser/devtools/visual_logging.h", "//chrome/browser/devtools/visual_logging.h",
"//chrome/browser/extensions/global_shortcut_listener.cc", "//chrome/browser/extensions/global_shortcut_listener.cc",
"//chrome/browser/extensions/global_shortcut_listener.h", "//chrome/browser/extensions/global_shortcut_listener.h",
"//chrome/browser/file_system_access/file_system_access_features.cc",
"//chrome/browser/file_system_access/file_system_access_features.h",
"//chrome/browser/icon_loader.cc", "//chrome/browser/icon_loader.cc",
"//chrome/browser/icon_loader.h", "//chrome/browser/icon_loader.h",
"//chrome/browser/icon_manager.cc", "//chrome/browser/icon_manager.cc",

View File

@@ -32,7 +32,7 @@ In most cases, you should do everything in the `ready` event handler.
Returns: Returns:
* `event` Event * `event` Event
* `launchInfo` Record<string, any> | [NotificationResponse](structures/notification-response.md) _macOS_ * `launchInfo` Record\<string, any\> | [NotificationResponse](structures/notification-response.md) _macOS_
Emitted once, when Electron has finished initializing. On macOS, `launchInfo` Emitted once, when Electron has finished initializing. On macOS, `launchInfo`
holds the `userInfo` of the [`NSUserNotification`](https://developer.apple.com/documentation/foundation/nsusernotification) holds the `userInfo` of the [`NSUserNotification`](https://developer.apple.com/documentation/foundation/nsusernotification)
@@ -41,6 +41,10 @@ that was used to open the application, if it was launched from Notification Cent
You can also call `app.isReady()` to check if this event has already fired and `app.whenReady()` You can also call `app.isReady()` to check if this event has already fired and `app.whenReady()`
to get a Promise that is fulfilled when Electron is initialized. to get a Promise that is fulfilled when Electron is initialized.
**Note**: The `ready` event is only fired after the main process has finished running the first
tick of the event loop. If an Electron API needs to be called before the `ready` event, ensure
that it is called synchronously in the top-level context of the main process.
### Event: 'window-all-closed' ### Event: 'window-all-closed'
Emitted when all windows have been closed. Emitted when all windows have been closed.
@@ -970,7 +974,7 @@ app.setJumpList([
### `app.requestSingleInstanceLock([additionalData])` ### `app.requestSingleInstanceLock([additionalData])`
* `additionalData` Record<any, any> (optional) - A JSON object containing additional data to send to the first instance. * `additionalData` Record\<any, any\> (optional) - A JSON object containing additional data to send to the first instance.
Returns `boolean` Returns `boolean`
@@ -1278,8 +1282,7 @@ Returns `Object`:
* `settings` Object * `settings` Object
* `openAtLogin` boolean (optional) - `true` to open the app at login, `false` to remove * `openAtLogin` boolean (optional) - `true` to open the app at login, `false` to remove
the app as a login item. Defaults to `false`. the app as a login item. Defaults to `false`.
* `openAsHidden` boolean (optional) _macOS_ _Deprecated_ - `true` to open the app as hidden. Defaults to `false`. The user can edit this setting from the System Preferences so `app.getLoginItemSettings().wasOpenedAsHidden` should be checked when the app is opened to know the current value. This setting is not available on [MAS build * `openAsHidden` boolean (optional) _macOS_ _Deprecated_ - `true` to open the app as hidden. Defaults to `false`. The user can edit this setting from the System Preferences so `app.getLoginItemSettings().wasOpenedAsHidden` should be checked when the app is opened to know the current value. This setting is not available on [MAS builds][mas-builds] or on macOS 13 and up.
s][mas-builds] or on macOS 13 and up.
* `type` string (optional) _macOS_ - The type of service to add as a login item. Defaults to `mainAppService`. Only available on macOS 13 and up. * `type` string (optional) _macOS_ - The type of service to add as a login item. Defaults to `mainAppService`. Only available on macOS 13 and up.
* `mainAppService` - The primary application. * `mainAppService` - The primary application.
* `agentService` - The property list name for a launch agent. The property list name must correspond to a property list in the apps `Contents/Library/LaunchAgents` directory. * `agentService` - The property list name for a launch agent. The property list name must correspond to a property list in the apps `Contents/Library/LaunchAgents` directory.
@@ -1468,6 +1471,24 @@ details.
**Note:** Enable `Secure Keyboard Entry` only when it is needed and disable it when it is no longer needed. **Note:** Enable `Secure Keyboard Entry` only when it is needed and disable it when it is no longer needed.
### `app.setProxy(config)`
* `config` [ProxyConfig](structures/proxy-config.md)
Returns `Promise<void>` - Resolves when the proxy setting process is complete.
Sets the proxy settings for networks requests made without an associated [Session](session.md).
Currently this will affect requests made with [Net](net.md) in the [utility process](../glossary.md#utility-process)
and internal requests made by the runtime (ex: geolocation queries).
This method can only be called after app is ready.
#### `app.resolveProxy(url)`
* `url` URL
Returns `Promise<string>` - Resolves with the proxy information for `url` that will be used when attempting to make requests using [Net](net.md) in the [utility process](../glossary.md#utility-process).
## Properties ## Properties
### `app.accessibilitySupportEnabled` _macOS_ _Windows_ ### `app.accessibilitySupportEnabled` _macOS_ _Windows_

View File

@@ -20,8 +20,9 @@ In addition, there are some subtle differences on each platform:
On macOS, the `autoUpdater` module is built upon [Squirrel.Mac][squirrel-mac], On macOS, the `autoUpdater` module is built upon [Squirrel.Mac][squirrel-mac],
meaning you don't need any special setup to make it work. For server-side meaning you don't need any special setup to make it work. For server-side
requirements, you can read [Server Support][server-support]. Note that [App requirements, you can read [Server Support][server-support]. Note that
Transport Security](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW35) (ATS) applies to all requests made as part of the [App Transport Security](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW35)
(ATS) applies to all requests made as part of the
update process. Apps that need to disable ATS can add the update process. Apps that need to disable ATS can add the
`NSAllowsArbitraryLoads` key to their app's plist. `NSAllowsArbitraryLoads` key to their app's plist.
@@ -103,7 +104,7 @@ The `autoUpdater` object has the following methods:
* `options` Object * `options` Object
* `url` string * `url` string
* `headers` Record<string, string> (optional) _macOS_ - HTTP request headers. * `headers` Record\<string, string\> (optional) _macOS_ - HTTP request headers.
* `serverType` string (optional) _macOS_ - Can be `json` or `default`, see the [Squirrel.Mac][squirrel-mac] * `serverType` string (optional) _macOS_ - Can be `json` or `default`, see the [Squirrel.Mac][squirrel-mac]
README for more information. README for more information.

View File

@@ -600,7 +600,7 @@ Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls
on the right edge and 50 pixels of controls below the player. In order to on the right edge and 50 pixels of controls below the player. In order to
maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within
the player itself we would call this function with arguments of 16/9 and the player itself we would call this function with arguments of 16/9 and
{ width: 40, height: 50 }. The second argument doesn't care where the extra width and height \{ width: 40, height: 50 \}. The second argument doesn't care where the extra width and height
are within the content view--only that they exist. Sum any extra width and are within the content view--only that they exist. Sum any extra width and
height areas you have within the overall content view. height areas you have within the overall content view.
@@ -656,7 +656,7 @@ Closes the currently open [Quick Look][quick-look] panel.
#### `win.setBounds(bounds[, animate])` #### `win.setBounds(bounds[, animate])`
* `bounds` Partial<[Rectangle](structures/rectangle.md)> * `bounds` Partial\<[Rectangle](structures/rectangle.md)\>
* `animate` boolean (optional) _macOS_ * `animate` boolean (optional) _macOS_
Resizes and moves the window to the supplied bounds. Any properties that are not supplied will default to their current values. Resizes and moves the window to the supplied bounds. Any properties that are not supplied will default to their current values.

View File

@@ -723,7 +723,7 @@ Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls
on the right edge and 50 pixels of controls below the player. In order to on the right edge and 50 pixels of controls below the player. In order to
maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within
the player itself we would call this function with arguments of 16/9 and the player itself we would call this function with arguments of 16/9 and
{ width: 40, height: 50 }. The second argument doesn't care where the extra width and height \{ width: 40, height: 50 \}. The second argument doesn't care where the extra width and height
are within the content view--only that they exist. Sum any extra width and are within the content view--only that they exist. Sum any extra width and
height areas you have within the overall content view. height areas you have within the overall content view.
@@ -779,7 +779,7 @@ Closes the currently open [Quick Look][quick-look] panel.
#### `win.setBounds(bounds[, animate])` #### `win.setBounds(bounds[, animate])`
* `bounds` Partial<[Rectangle](structures/rectangle.md)> * `bounds` Partial\<[Rectangle](structures/rectangle.md)\>
* `animate` boolean (optional) _macOS_ * `animate` boolean (optional) _macOS_
Resizes and moves the window to the supplied bounds. Any properties that are not supplied will default to their current values. Resizes and moves the window to the supplied bounds. Any properties that are not supplied will default to their current values.
@@ -1215,7 +1215,7 @@ win.loadURL('http://localhost:8000/post', {
* `filePath` string * `filePath` string
* `options` Object (optional) * `options` Object (optional)
* `query` Record<string, string> (optional) - Passed to `url.format()`. * `query` Record\<string, string\> (optional) - Passed to `url.format()`.
* `search` string (optional) - Passed to `url.format()`. * `search` string (optional) - Passed to `url.format()`.
* `hash` string (optional) - Passed to `url.format()`. * `hash` string (optional) - Passed to `url.format()`.

View File

@@ -17,6 +17,8 @@ following properties:
method. method.
* `url` string (optional) - The request URL. Must be provided in the absolute * `url` string (optional) - The request URL. Must be provided in the absolute
form with the protocol scheme specified as http or https. form with the protocol scheme specified as http or https.
* `headers` Record\<string, string | string[]\> (optional) - Headers to be sent
with the request.
* `session` Session (optional) - The [`Session`](session.md) instance with * `session` Session (optional) - The [`Session`](session.md) instance with
which the request is associated. which the request is associated.
* `partition` string (optional) - The name of the [`partition`](session.md) * `partition` string (optional) - The name of the [`partition`](session.md)
@@ -158,7 +160,7 @@ Returns:
* `statusCode` Integer * `statusCode` Integer
* `method` string * `method` string
* `redirectUrl` string * `redirectUrl` string
* `responseHeaders` Record<string, string[]> * `responseHeaders` Record\<string, string[]\>
Emitted when the server returns a redirect response (e.g. 301 Moved Emitted when the server returns a redirect response (e.g. 301 Moved
Permanently). Calling [`request.followRedirect`](#requestfollowredirect) will Permanently). Calling [`request.followRedirect`](#requestfollowredirect) will

View File

@@ -35,8 +35,8 @@ The `contentTracing` module has the following methods:
Returns `Promise<string[]>` - resolves with an array of category groups once all child processes have acknowledged the `getCategories` request Returns `Promise<string[]>` - resolves with an array of category groups once all child processes have acknowledged the `getCategories` request
Get a set of category groups. The category groups can change as new code paths Get a set of category groups. The category groups can change as new code paths
are reached. See also the [list of built-in tracing are reached. See also the
categories](https://chromium.googlesource.com/chromium/src/+/main/base/trace_event/builtin_categories.h). [list of built-in tracing categories](https://chromium.googlesource.com/chromium/src/+/main/base/trace_event/builtin_categories.h).
> **NOTE:** Electron adds a non-default tracing category called `"electron"`. > **NOTE:** Electron adds a non-default tracing category called `"electron"`.
> This category can be used to capture Electron-specific tracing events. > This category can be used to capture Electron-specific tracing events.

View File

@@ -59,14 +59,14 @@ The `crashReporter` module has the following methods:
number of crashes uploaded to 1/hour. Default is `false`. number of crashes uploaded to 1/hour. Default is `false`.
* `compress` boolean (optional) - If true, crash reports will be compressed * `compress` boolean (optional) - If true, crash reports will be compressed
and uploaded with `Content-Encoding: gzip`. Default is `true`. and uploaded with `Content-Encoding: gzip`. Default is `true`.
* `extra` Record<string, string> (optional) - Extra string key/value * `extra` Record\<string, string\> (optional) - Extra string key/value
annotations that will be sent along with crash reports that are generated annotations that will be sent along with crash reports that are generated
in the main process. Only string values are supported. Crashes generated in in the main process. Only string values are supported. Crashes generated in
child processes will not contain these extra child processes will not contain these extra
parameters to crash reports generated from child processes, call parameters to crash reports generated from child processes, call
[`addExtraParameter`](#crashreporteraddextraparameterkey-value) from the [`addExtraParameter`](#crashreporteraddextraparameterkey-value) from the
child process. child process.
* `globalExtra` Record<string, string> (optional) - Extra string key/value * `globalExtra` Record\<string, string\> (optional) - Extra string key/value
annotations that will be sent along with any crash reports generated in any annotations that will be sent along with any crash reports generated in any
process. These annotations cannot be changed once the crash reporter has process. These annotations cannot be changed once the crash reporter has
been started. If a key is present in both the global extra parameters and been started. If a key is present in both the global extra parameters and

View File

@@ -174,7 +174,7 @@ dialog.showOpenDialog(mainWindow, {
* `dontAddToRecent` _Windows_ - Do not add the item being saved to the recent documents list. * `dontAddToRecent` _Windows_ - Do not add the item being saved to the recent documents list.
* `securityScopedBookmarks` boolean (optional) _macOS_ _mas_ - Create a [security scoped bookmark](https://developer.apple.com/library/content/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW16) when packaged for the Mac App Store. If this option is enabled and the file doesn't already exist a blank file will be created at the chosen path. * `securityScopedBookmarks` boolean (optional) _macOS_ _mas_ - Create a [security scoped bookmark](https://developer.apple.com/library/content/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW16) when packaged for the Mac App Store. If this option is enabled and the file doesn't already exist a blank file will be created at the chosen path.
Returns `string | undefined`, the path of the file chosen by the user; if the dialog is cancelled it returns `undefined`. Returns `string`, the path of the file chosen by the user; if the dialog is cancelled it returns an empty string.
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal. The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
@@ -207,7 +207,7 @@ The `filters` specifies an array of file types that can be displayed, see
Returns `Promise<Object>` - Resolve with an object containing the following: Returns `Promise<Object>` - Resolve with an object containing the following:
* `canceled` boolean - whether or not the dialog was canceled. * `canceled` boolean - whether or not the dialog was canceled.
* `filePath` string (optional) - If the dialog is canceled, this will be `undefined`. * `filePath` string - If the dialog is canceled, this will be an empty string.
* `bookmark` string (optional) _macOS_ _mas_ - Base64 encoded string which contains the security scoped bookmark data for the saved file. `securityScopedBookmarks` must be enabled for this to be present. (For return values, see [table here](#bookmarks-array).) * `bookmark` string (optional) _macOS_ _mas_ - Base64 encoded string which contains the security scoped bookmark data for the saved file. `securityScopedBookmarks` must be enabled for this to be present. (For return values, see [table here](#bookmarks-array).)
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal. The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.

View File

@@ -51,6 +51,18 @@ Unsupported options are:
--http-parser --http-parser
``` ```
If the [`nodeOptions` fuse](../tutorial/fuses.md#nodeoptions) is disabled, `NODE_OPTIONS` will be ignored.
### `NODE_EXTRA_CA_CERTS`
See [Node.js cli documentation](https://github.com/nodejs/node/blob/main/doc/api/cli.md#node_extra_ca_certsfile) for details.
```sh
export NODE_EXTRA_CA_CERTS=/path/to/cert.pem
```
If the [`nodeOptions` fuse](../tutorial/fuses.md#nodeoptions) is disabled, `NODE_EXTRA_CA_CERTS` will be ignored.
### `GOOGLE_API_KEY` ### `GOOGLE_API_KEY`
Geolocation support in Electron requires the use of Google Cloud Platform's Geolocation support in Electron requires the use of Google Cloud Platform's
@@ -92,6 +104,8 @@ you would when running the normal Node.js executable, with the exception of the
These flags are disabled owing to the fact that Electron uses BoringSSL instead of OpenSSL when building Node.js' These flags are disabled owing to the fact that Electron uses BoringSSL instead of OpenSSL when building Node.js'
`crypto` module, and so will not work as designed. `crypto` module, and so will not work as designed.
If the [`runAsNode` fuse](../tutorial/fuses.md#L13) is disabled, `ELECTRON_RUN_AS_NODE` will be ignored.
### `ELECTRON_NO_ATTACH_CONSOLE` _Windows_ ### `ELECTRON_NO_ATTACH_CONSOLE` _Windows_
Don't attach to the current console session. Don't attach to the current console session.
@@ -131,16 +145,16 @@ debugging purposes.
Prints Chromium's internal logging to the console. Prints Chromium's internal logging to the console.
Setting this variable is the same as passing `--enable-logging` Setting this variable is the same as passing `--enable-logging`
on the command line. For more info, see `--enable-logging` in [command-line on the command line. For more info, see `--enable-logging` in
switches](./command-line-switches.md#--enable-loggingfile). [command-line switches](./command-line-switches.md#--enable-loggingfile).
### `ELECTRON_LOG_FILE` ### `ELECTRON_LOG_FILE`
Sets the file destination for Chromium's internal logging. Sets the file destination for Chromium's internal logging.
Setting this variable is the same as passing `--log-file` Setting this variable is the same as passing `--log-file`
on the command line. For more info, see `--log-file` in [command-line on the command line. For more info, see `--log-file` in
switches](./command-line-switches.md#--log-filepath). [command-line switches](./command-line-switches.md#--log-filepath).
### `ELECTRON_DEBUG_NOTIFICATIONS` ### `ELECTRON_DEBUG_NOTIFICATIONS`

View File

@@ -1,9 +1,8 @@
# Chrome Extension Support # Chrome Extension Support
Electron supports a subset of the [Chrome Extensions Electron supports a subset of the [Chrome Extensions API][chrome-extensions-api-index],
API][chrome-extensions-api-index], primarily to support DevTools extensions and primarily to support DevTools extensions and Chromium-internal extensions,
Chromium-internal extensions, but it also happens to support some other but it also happens to support some other extension capabilities.
extension capabilities.
[chrome-extensions-api-index]: https://developer.chrome.com/extensions/api_index [chrome-extensions-api-index]: https://developer.chrome.com/extensions/api_index

View File

@@ -72,7 +72,7 @@ Removes listeners of the specified `channel`.
### `ipcMain.handle(channel, listener)` ### `ipcMain.handle(channel, listener)`
* `channel` string * `channel` string
* `listener` Function<Promise\<any&#62; | any&#62; * `listener` Function\<Promise\<any\> | any\>
* `event` [IpcMainInvokeEvent][ipc-main-invoke-event] * `event` [IpcMainInvokeEvent][ipc-main-invoke-event]
* `...args` any[] * `...args` any[]
@@ -109,7 +109,7 @@ provided to the renderer process. Please refer to
### `ipcMain.handleOnce(channel, listener)` ### `ipcMain.handleOnce(channel, listener)`
* `channel` string * `channel` string
* `listener` Function<Promise\<any&#62; | any&#62; * `listener` Function\<Promise\<any\> | any\>
* `event` [IpcMainInvokeEvent][ipc-main-invoke-event] * `event` [IpcMainInvokeEvent][ipc-main-invoke-event]
* `...args` any[] * `...args` any[]

View File

@@ -82,8 +82,8 @@ Removes all listeners, or those of the specified `channel`.
* `...args` any[] * `...args` any[]
Send an asynchronous message to the main process via `channel`, along with Send an asynchronous message to the main process via `channel`, along with
arguments. Arguments will be serialized with the [Structured Clone arguments. Arguments will be serialized with the [Structured Clone Algorithm][SCA],
Algorithm][SCA], just like [`window.postMessage`][], so prototype chains will not be just like [`window.postMessage`][], so prototype chains will not be
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
throw an exception. throw an exception.
@@ -110,8 +110,8 @@ If you want to receive a single response from the main process, like the result
Returns `Promise<any>` - Resolves with the response from the main process. Returns `Promise<any>` - Resolves with the response from the main process.
Send a message to the main process via `channel` and expect a result Send a message to the main process via `channel` and expect a result
asynchronously. Arguments will be serialized with the [Structured Clone asynchronously. Arguments will be serialized with the [Structured Clone Algorithm][SCA],
Algorithm][SCA], just like [`window.postMessage`][], so prototype chains will not be just like [`window.postMessage`][], so prototype chains will not be
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
throw an exception. throw an exception.
@@ -160,8 +160,8 @@ If you do not need a response to the message, consider using [`ipcRenderer.send`
Returns `any` - The value sent back by the [`ipcMain`](./ipc-main.md) handler. Returns `any` - The value sent back by the [`ipcMain`](./ipc-main.md) handler.
Send a message to the main process via `channel` and expect a result Send a message to the main process via `channel` and expect a result
synchronously. Arguments will be serialized with the [Structured Clone synchronously. Arguments will be serialized with the [Structured Clone Algorithm][SCA],
Algorithm][SCA], just like [`window.postMessage`][], so prototype chains will not be just like [`window.postMessage`][], so prototype chains will not be
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
throw an exception. throw an exception.
@@ -208,8 +208,8 @@ ipcMain.on('port', (e, msg) => {
}) })
``` ```
For more information on using `MessagePort` and `MessageChannel`, see the [MDN For more information on using `MessagePort` and `MessageChannel`, see the
documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel). [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel).
### `ipcRenderer.sendToHost(channel, ...args)` ### `ipcRenderer.sendToHost(channel, ...args)`

View File

@@ -38,18 +38,18 @@ See [`Menu`](menu.md) for examples.
`Menu.buildFromTemplate`. `Menu.buildFromTemplate`.
* `id` string (optional) - Unique within a single menu. If defined then it can be used * `id` string (optional) - Unique within a single menu. If defined then it can be used
as a reference to this item by the position attribute. as a reference to this item by the position attribute.
* `before` string[] (optional) - Inserts this item before the item with the specified label. If * `before` string[] (optional) - Inserts this item before the item with the specified id. If
the referenced item doesn't exist the item will be inserted at the end of the menu. Also implies the referenced item doesn't exist the item will be inserted at the end of the menu. Also implies
that the menu item in question should be placed in the same “group” as the item. that the menu item in question should be placed in the same “group” as the item.
* `after` string[] (optional) - Inserts this item after the item with the specified label. If the * `after` string[] (optional) - Inserts this item after the item with the specified id. If the
referenced item doesn't exist the item will be inserted at the end of referenced item doesn't exist the item will be inserted at the end of
the menu. the menu.
* `beforeGroupContaining` string[] (optional) - Provides a means for a single context menu to declare * `beforeGroupContaining` string[] (optional) - Provides a means for a single context menu to declare
the placement of their containing group before the containing group of the item the placement of their containing group before the containing group of the item
with the specified label. with the specified id.
* `afterGroupContaining` string[] (optional) - Provides a means for a single context menu to declare * `afterGroupContaining` string[] (optional) - Provides a means for a single context menu to declare
the placement of their containing group after the containing group of the item the placement of their containing group after the containing group of the item
with the specified label. with the specified id.
**Note:** `acceleratorWorksWhenHidden` is specified as being macOS-only because accelerators always work when items are hidden on Windows and Linux. The option is exposed to users to give them the option to turn it off, as this is possible in native macOS development. **Note:** `acceleratorWorksWhenHidden` is specified as being macOS-only because accelerators always work when items are hidden on Windows and Linux. The option is exposed to users to give them the option to turn it off, as this is possible in native macOS development.

View File

@@ -336,16 +336,16 @@ browser windows.
You can make use of `before`, `after`, `beforeGroupContaining`, `afterGroupContaining` and `id` to control how the item will be placed when building a menu with `Menu.buildFromTemplate`. You can make use of `before`, `after`, `beforeGroupContaining`, `afterGroupContaining` and `id` to control how the item will be placed when building a menu with `Menu.buildFromTemplate`.
* `before` - Inserts this item before the item with the specified label. If the * `before` - Inserts this item before the item with the specified id. If the
referenced item doesn't exist the item will be inserted at the end of referenced item doesn't exist the item will be inserted at the end of
the menu. Also implies that the menu item in question should be placed in the same “group” as the item. the menu. Also implies that the menu item in question should be placed in the same “group” as the item.
* `after` - Inserts this item after the item with the specified label. If the * `after` - Inserts this item after the item with the specified id. If the
referenced item doesn't exist the item will be inserted at the end of referenced item doesn't exist the item will be inserted at the end of
the menu. Also implies that the menu item in question should be placed in the same “group” as the item. the menu. Also implies that the menu item in question should be placed in the same “group” as the item.
* `beforeGroupContaining` - Provides a means for a single context menu to declare * `beforeGroupContaining` - Provides a means for a single context menu to declare
the placement of their containing group before the containing group of the item with the specified label. the placement of their containing group before the containing group of the item with the specified id.
* `afterGroupContaining` - Provides a means for a single context menu to declare * `afterGroupContaining` - Provides a means for a single context menu to declare
the placement of their containing group after the containing group of the item with the specified label. the placement of their containing group after the containing group of the item with the specified id.
By default, items will be inserted in the order they exist in the template unless one of the specified positioning keywords is used. By default, items will be inserted in the order they exist in the template unless one of the specified positioning keywords is used.

View File

@@ -4,36 +4,41 @@
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process) Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process)
In Electron, for the APIs that take images, you can pass either file paths or The `nativeImage` module provides a unified interface for manipulating
`NativeImage` instances. An empty image will be used when `null` is passed. system images. These can be handy if you want to provide multiple scaled
versions of the same icon or take advantage of macOS [template images][template-image].
For example, when creating a tray or setting a window's icon, you can pass an Electron APIs that take image files accept either file paths or
image file path as a `string`: `NativeImage` instances. An empty and transparent image will be used when `null` is passed.
```js For example, when creating a [Tray](../api/tray.md) or setting a [BrowserWindow](../api/browser-window.md)'s
icon, you can either pass an image file path as a string:
```js title='Main Process'
const { BrowserWindow, Tray } = require('electron') const { BrowserWindow, Tray } = require('electron')
const appIcon = new Tray('/Users/somebody/images/icon.png') const tray = new Tray('/Users/somebody/images/icon.png')
const win = new BrowserWindow({ icon: '/Users/somebody/images/window.png' }) const win = new BrowserWindow({ icon: '/Users/somebody/images/window.png' })
console.log(appIcon, win)
``` ```
Or read the image from the clipboard, which returns a `NativeImage`: or generate a `NativeImage` instance from the same file:
```js ```js title='Main Process'
const { clipboard, Tray } = require('electron') const { BrowserWindow, nativeImage, Tray } = require('electron')
const image = clipboard.readImage()
const appIcon = new Tray(image) const trayIcon = nativeImage.createFromPath('/Users/somebody/images/icon.png')
console.log(appIcon) const appIcon = nativeImage.createFromPath('/Users/somebody/images/window.png')
const tray = new Tray(trayIcon)
const win = new BrowserWindow({ icon: appIcon })
``` ```
## Supported Formats ## Supported Formats
Currently `PNG` and `JPEG` image formats are supported. `PNG` is recommended Currently, `PNG` and `JPEG` image formats are supported across all platforms.
because of its support for transparency and lossless compression. `PNG` is recommended because of its support for transparency and lossless compression.
On Windows, you can also load `ICO` icons from file paths. For best visual On Windows, you can also load `ICO` icons from file paths. For best visual
quality, it is recommended to include at least the following sizes in the: quality, we recommend including at least the following sizes:
* Small icon * Small icon
* 16x16 (100% DPI scale) * 16x16 (100% DPI scale)
@@ -47,9 +52,9 @@ quality, it is recommended to include at least the following sizes in the:
* 64x64 (200% DPI scale) * 64x64 (200% DPI scale)
* 256x256 * 256x256
Check the _Size requirements_ section in [this article][icons]. Check the _Icon Scaling_ section in the Windows [App Icon Construction][icons] reference.
[icons]: https://learn.microsoft.com/en-us/windows/win32/uxguide/vis-icons [icons]: https://learn.microsoft.com/en-us/windows/apps/design/style/iconography/app-icon-construction#icon-scaling
:::note :::note
@@ -60,16 +65,17 @@ image encoding and decoding.
## High Resolution Image ## High Resolution Image
On platforms that have high-DPI support such as Apple Retina displays, you can On platforms that support high pixel density displays (such as Apple Retina),
append `@2x` after image's base filename to mark it as a high resolution image. you can append `@2x` after image's base filename to mark it as a 2x scale
high resolution image.
For example, if `icon.png` is a normal image that has standard resolution, then For example, if `icon.png` is a normal image that has standard resolution, then
`icon@2x.png` will be treated as a high resolution image that has double DPI `icon@2x.png` will be treated as a high resolution image that has double
density. Dots per Inch (DPI) density.
If you want to support displays with different DPI densities at the same time, If you want to support displays with different DPI densities at the same time,
you can put images with different sizes in the same folder and use the filename you can put images with different sizes in the same folder and use the filename
without DPI suffixes. For example: without DPI suffixes within Electron. For example:
```plaintext ```plaintext
images/ images/
@@ -78,10 +84,9 @@ images/
└── icon@3x.png └── icon@3x.png
``` ```
```js ```js title='Main Process'
const { Tray } = require('electron') const { Tray } = require('electron')
const appIcon = new Tray('/Users/somebody/images/icon.png') const appTray = new Tray('/Users/somebody/images/icon.png')
console.log(appIcon)
``` ```
The following suffixes for DPI are also supported: The following suffixes for DPI are also supported:
@@ -98,27 +103,23 @@ The following suffixes for DPI are also supported:
* `@4x` * `@4x`
* `@5x` * `@5x`
## Template Image ## Template Image _macOS_
Template images consist of black and an alpha channel. On macOS, [template images][template-image] consist of black and an alpha channel.
Template images are not intended to be used as standalone images and are usually Template images are not intended to be used as standalone images and are usually
mixed with other content to create the desired final appearance. mixed with other content to create the desired final appearance.
The most common case is to use template images for a menu bar icon, so it can The most common case is to use template images for a menu bar (Tray) icon, so it can
adapt to both light and dark menu bars. adapt to both light and dark menu bars.
**Note:** Template image is only supported on macOS. To mark an image as a template image, its base filename should end with the word
`Template` (e.g. `xxxTemplate.png`). You can also specify template images at
To mark an image as a template image, its filename should end with the word different DPI densities (e.g. `xxxTemplate@2x.png`).
`Template`. For example:
* `xxxTemplate.png`
* `xxxTemplate@2x.png`
## Methods ## Methods
The `nativeImage` module has the following methods, all of which return The `nativeImage` module has the following methods, all of which return
an instance of the `NativeImage` class: an instance of the [`NativeImage`](#class-nativeimage) class:
### `nativeImage.createEmpty()` ### `nativeImage.createEmpty()`
@@ -137,7 +138,7 @@ Note: The Windows implementation will ignore `size.height` and scale the height
### `nativeImage.createFromPath(path)` ### `nativeImage.createFromPath(path)`
* `path` string * `path` string - path to a file that we intend to construct an image out of.
Returns `NativeImage` Returns `NativeImage`
@@ -146,7 +147,7 @@ returns an empty image if the `path` does not exist, cannot be read, or is not
a valid image. a valid image.
```js ```js
const nativeImage = require('electron').nativeImage const { nativeImage } = require('electron')
const image = nativeImage.createFromPath('/Users/somebody/images/icon.png') const image = nativeImage.createFromPath('/Users/somebody/images/icon.png')
console.log(image) console.log(image)
@@ -183,7 +184,7 @@ Creates a new `NativeImage` instance from `buffer`. Tries to decode as PNG or JP
Returns `NativeImage` Returns `NativeImage`
Creates a new `NativeImage` instance from `dataURL`. Creates a new `NativeImage` instance from `dataUrl`, a base 64 encoded [Data URL][data-url] string.
### `nativeImage.createFromNamedImage(imageName[, hslShift])` _macOS_ ### `nativeImage.createFromNamedImage(imageName[, hslShift])` _macOS_
@@ -192,14 +193,14 @@ Creates a new `NativeImage` instance from `dataURL`.
Returns `NativeImage` Returns `NativeImage`
Creates a new `NativeImage` instance from the NSImage that maps to the Creates a new `NativeImage` instance from the `NSImage` that maps to the
given image name. See [`System Icons`](https://developer.apple.com/design/human-interface-guidelines/macos/icons-and-images/system-icons/) given image name. See Apple's [`NSImageName`](https://developer.apple.com/documentation/appkit/nsimagename#2901388)
for a list of possible values. documentation for a list of possible values.
The `hslShift` is applied to the image with the following rules: The `hslShift` is applied to the image with the following rules:
* `hsl_shift[0]` (hue): The absolute hue value for the image - 0 and 1 map * `hsl_shift[0]` (hue): The absolute hue value for the image - 0 and 1 map
to 0 and 360 on the hue color wheel (red). to 0 and 360 on the hue color wheel (red).
* `hsl_shift[1]` (saturation): A saturation shift for the image, with the * `hsl_shift[1]` (saturation): A saturation shift for the image, with the
following key values: following key values:
0 = remove all color. 0 = remove all color.
@@ -216,7 +217,9 @@ This means that `[-1, 0, 1]` will make the image completely white and
In some cases, the `NSImageName` doesn't match its string representation; one example of this is `NSFolderImageName`, whose string representation would actually be `NSFolder`. Therefore, you'll need to determine the correct string representation for your image before passing it in. This can be done with the following: In some cases, the `NSImageName` doesn't match its string representation; one example of this is `NSFolderImageName`, whose string representation would actually be `NSFolder`. Therefore, you'll need to determine the correct string representation for your image before passing it in. This can be done with the following:
`echo -e '#import <Cocoa/Cocoa.h>\nint main() { NSLog(@"%@", SYSTEM_IMAGE_NAME); }' | clang -otest -x objective-c -framework Cocoa - && ./test` ```sh
echo -e '#import <Cocoa/Cocoa.h>\nint main() { NSLog(@"%@", SYSTEM_IMAGE_NAME); }' | clang -otest -x objective-c -framework Cocoa - && ./test
```
where `SYSTEM_IMAGE_NAME` should be replaced with any value from [this list](https://developer.apple.com/documentation/appkit/nsimagename?language=objc). where `SYSTEM_IMAGE_NAME` should be replaced with any value from [this list](https://developer.apple.com/documentation/appkit/nsimagename?language=objc).
@@ -257,7 +260,7 @@ data.
* `options` Object (optional) * `options` Object (optional)
* `scaleFactor` Number (optional) - Defaults to 1.0. * `scaleFactor` Number (optional) - Defaults to 1.0.
Returns `string` - The data URL of the image. Returns `string` - The [Data URL][data-url] of the image.
#### `image.getBitmap([options])` #### `image.getBitmap([options])`
@@ -273,7 +276,7 @@ current event loop tick; otherwise the data might be changed or destroyed.
#### `image.getNativeHandle()` _macOS_ #### `image.getNativeHandle()` _macOS_
Returns `Buffer` - A [Buffer][buffer] that stores C pointer to underlying native handle of Returns `Buffer` - A [Buffer][buffer] that stores C pointer to underlying native handle of
the image. On macOS, a pointer to `NSImage` instance would be returned. the image. On macOS, a pointer to `NSImage` instance is returned.
Notice that the returned pointer is a weak pointer to the underlying native Notice that the returned pointer is a weak pointer to the underlying native
image instead of a copy, so you _must_ ensure that the associated image instead of a copy, so you _must_ ensure that the associated
@@ -295,11 +298,11 @@ If `scaleFactor` is passed, this will return the size corresponding to the image
* `option` boolean * `option` boolean
Marks the image as a template image. Marks the image as a macOS [template image][template-image].
#### `image.isTemplateImage()` #### `image.isTemplateImage()`
Returns `boolean` - Whether the image is a template image. Returns `boolean` - Whether the image is a macOS [template image][template-image].
#### `image.crop(rect)` #### `image.crop(rect)`
@@ -328,13 +331,13 @@ will be preserved in the resized image.
* `scaleFactor` Number (optional) - Defaults to 1.0. * `scaleFactor` Number (optional) - Defaults to 1.0.
Returns `Number` - The image's aspect ratio. Returns `Number` - The image's aspect ratio (width divided by height).
If `scaleFactor` is passed, this will return the aspect ratio corresponding to the image representation most closely matching the passed value. If `scaleFactor` is passed, this will return the aspect ratio corresponding to the image representation most closely matching the passed value.
#### `image.getScaleFactors()` #### `image.getScaleFactors()`
Returns `Number[]` - An array of all scale factors corresponding to representations for a given nativeImage. Returns `Number[]` - An array of all scale factors corresponding to representations for a given `NativeImage`.
#### `image.addRepresentation(options)` #### `image.addRepresentation(options)`
@@ -349,15 +352,17 @@ Returns `Number[]` - An array of all scale factors corresponding to representati
encoded PNG or JPEG image. encoded PNG or JPEG image.
Add an image representation for a specific scale factor. This can be used Add an image representation for a specific scale factor. This can be used
to explicitly add different scale factor representations to an image. This to programmatically add different scale factor representations to an image. This
can be called on empty images. can be called on empty images.
[buffer]: https://nodejs.org/api/buffer.html#buffer_class_buffer
### Instance Properties ### Instance Properties
#### `nativeImage.isMacTemplateImage` _macOS_ #### `nativeImage.isMacTemplateImage` _macOS_
A `boolean` property that determines whether the image is considered a [template image](https://developer.apple.com/documentation/appkit/nsimage/1520017-template). A `boolean` property that determines whether the image is considered a [template image][template-image].
Please note that this property only has an effect on macOS. Please note that this property only has an effect on macOS.
[buffer]: https://nodejs.org/api/buffer.html#buffer_class_buffer
[data-url]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs
[template-image]: https://developer.apple.com/documentation/appkit/nsimage/1520017-template

View File

@@ -0,0 +1,29 @@
## Class: NavigationHistory
> Manage a list of navigation entries, representing the user's browsing history within the application.
Process: [Main](../glossary.md#main-process)<br />
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._
Each navigation entry corresponds to a specific page. The indexing system follows a sequential order, where the first available navigation entry is at index 0, representing the earliest visited page, and the latest navigation entry is at index N, representing the most recent page. Maintaining this ordered list of navigation entries enables seamless navigation both backward and forward through the user's browsing history.
### Instance Methods
#### `navigationHistory.getActiveIndex()`
Returns `Integer` - The index of the current page, from which we would go back/forward or reload.
#### `navigationHistory.getEntryAtIndex(index)`
* `index` Integer
Returns `Object`:
* `url` string - The URL of the navigation entry at the given index.
* `title` string - The page title of the navigation entry at the given index.
If index is out of bounds (greater than history length or less than 0), null will be returned.
#### `navigationHistory.length()`
Returns `Integer` - History length.

View File

@@ -66,7 +66,7 @@ requests according to the specified protocol scheme in the `options` object.
### `net.fetch(input[, init])` ### `net.fetch(input[, init])`
* `input` string | [GlobalRequest](https://nodejs.org/api/globals.html#request) * `input` string | [GlobalRequest](https://nodejs.org/api/globals.html#request)
* `init` [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) & { bypassCustomProtocolHandlers?: boolean } (optional) * `init` [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) & \{ bypassCustomProtocolHandlers?: boolean \} (optional)
Returns `Promise<GlobalResponse>` - see [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response). Returns `Promise<GlobalResponse>` - see [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response).
@@ -86,9 +86,8 @@ async function example () {
} }
``` ```
This method will issue requests from the [default This method will issue requests from the [default session](session.md#sessiondefaultsession).
session](session.md#sessiondefaultsession). To send a `fetch` request from To send a `fetch` request from another session, use [ses.fetch()](session.md#sesfetchinput-init).
another session, use [ses.fetch()](session.md#sesfetchinput-init).
See the MDN documentation for See the MDN documentation for
[`fetch()`](https://developer.mozilla.org/en-US/docs/Web/API/fetch) for more [`fetch()`](https://developer.mozilla.org/en-US/docs/Web/API/fetch) for more
@@ -101,11 +100,10 @@ Limitations:
* The `.type` and `.url` values of the returned `Response` object are * The `.type` and `.url` values of the returned `Response` object are
incorrect. incorrect.
By default, requests made with `net.fetch` can be made to [custom By default, requests made with `net.fetch` can be made to [custom protocols](protocol.md)
protocols](protocol.md) as well as `file:`, and will trigger as well as `file:`, and will trigger [webRequest](web-request.md) handlers if present.
[webRequest](web-request.md) handlers if present. When the non-standard When the non-standard `bypassCustomProtocolHandlers` option is set in RequestInit,
`bypassCustomProtocolHandlers` option is set in RequestInit, custom protocol custom protocol handlers will not be called for this request. This allows forwarding an
handlers will not be called for this request. This allows forwarding an
intercepted request to the built-in handler. [webRequest](web-request.md) intercepted request to the built-in handler. [webRequest](web-request.md)
handlers will still be triggered when bypassing custom protocols. handlers will still be triggered when bypassing custom protocols.
@@ -167,9 +165,8 @@ will be successful.
Returns [`Promise<ResolvedHost>`](structures/resolved-host.md) - Resolves with the resolved IP addresses for the `host`. Returns [`Promise<ResolvedHost>`](structures/resolved-host.md) - Resolves with the resolved IP addresses for the `host`.
This method will resolve hosts from the [default This method will resolve hosts from the [default session](session.md#sessiondefaultsession).
session](session.md#sessiondefaultsession). To resolve a host from To resolve a host from another session, use [ses.resolveHost()](session.md#sesresolvehosthost-options).
another session, use [ses.resolveHost()](session.md#sesresolvehosthost-options).
## Properties ## Properties

View File

@@ -21,7 +21,6 @@ In sandboxed renderers the `process` object contains only a subset of the APIs:
* `getSystemMemoryInfo()` * `getSystemMemoryInfo()`
* `getSystemVersion()` * `getSystemVersion()`
* `getCPUUsage()` * `getCPUUsage()`
* `getIOCounters()`
* `uptime()` * `uptime()`
* `argv` * `argv`
* `execPath` * `execPath`
@@ -162,10 +161,6 @@ The time is represented as number of milliseconds since epoch. It returns null i
Returns [`CPUUsage`](structures/cpu-usage.md) Returns [`CPUUsage`](structures/cpu-usage.md)
### `process.getIOCounters()` _Windows_ _Linux_
Returns [`IOCounters`](structures/io-counters.md)
### `process.getHeapStatistics()` ### `process.getHeapStatistics()`
Returns `Object`: Returns `Object`:

View File

@@ -9,10 +9,14 @@ An example of implementing a protocol that has the same effect as the
```js ```js
const { app, protocol, net } = require('electron') const { app, protocol, net } = require('electron')
const path = require('node:path')
const url = require('node:url')
app.whenReady().then(() => { app.whenReady().then(() => {
protocol.handle('atom', (request) => protocol.handle('atom', (request) => {
net.fetch('file://' + request.url.slice('atom://'.length))) const filePath = request.url.slice('atom://'.length)
return net.fetch(url.pathToFileURL(path.join(__dirname, filePath)).toString())
})
}) })
``` ```
@@ -42,7 +46,7 @@ app.whenReady().then(() => {
ses.protocol.handle('atom', (request) => { ses.protocol.handle('atom', (request) => {
const filePath = request.url.slice('atom://'.length) const filePath = request.url.slice('atom://'.length)
return net.fetch(url.pathToFileURL(path.join(__dirname, filePath)).toString()) return net.fetch(url.pathToFileURL(path.resolve(__dirname, filePath)).toString())
}) })
const mainWindow = new BrowserWindow({ webPreferences: { partition } }) const mainWindow = new BrowserWindow({ webPreferences: { partition } })
@@ -75,9 +79,8 @@ protocol.registerSchemesAsPrivileged([
]) ])
``` ```
A standard scheme adheres to what RFC 3986 calls [generic URI A standard scheme adheres to what RFC 3986 calls [generic URI syntax](https://tools.ietf.org/html/rfc3986#section-3).
syntax](https://tools.ietf.org/html/rfc3986#section-3). For example `http` and For example `http` and `https` are standard schemes, while `file` is not.
`https` are standard schemes, while `file` is not.
Registering a scheme as standard allows relative and absolute resources to Registering a scheme as standard allows relative and absolute resources to
be resolved correctly when served. Otherwise the scheme will behave like the be resolved correctly when served. Otherwise the scheme will behave like the
@@ -111,7 +114,7 @@ expect streaming responses.
* `scheme` string - scheme to handle, for example `https` or `my-app`. This is * `scheme` string - scheme to handle, for example `https` or `my-app`. This is
the bit before the `:` in a URL. the bit before the `:` in a URL.
* `handler` Function<[GlobalResponse](https://nodejs.org/api/globals.html#response) | Promise<GlobalResponse>> * `handler` Function\<[GlobalResponse](https://nodejs.org/api/globals.html#response) | Promise\<GlobalResponse\>\>
* `request` [GlobalRequest](https://nodejs.org/api/globals.html#request) * `request` [GlobalRequest](https://nodejs.org/api/globals.html#request)
Register a protocol handler for `scheme`. Requests made to URLs with this Register a protocol handler for `scheme`. Requests made to URLs with this

View File

@@ -27,7 +27,7 @@ The `pushNotification` module emits the following events:
Returns: Returns:
* `event` Event * `event` Event
* `userInfo` Record<String, any> * `userInfo` Record\<String, any\>
Emitted when the app receives a remote notification while running. Emitted when the app receives a remote notification while running.
See: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc See: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc

View File

@@ -589,105 +589,15 @@ Writes any unwritten DOMStorage data to disk.
#### `ses.setProxy(config)` #### `ses.setProxy(config)`
* `config` Object * `config` [ProxyConfig](structures/proxy-config.md)
* `mode` string (optional) - The proxy mode. Should be one of `direct`,
`auto_detect`, `pac_script`, `fixed_servers` or `system`. If it's
unspecified, it will be automatically determined based on other specified
options.
* `direct`
In direct mode all connections are created directly, without any proxy involved.
* `auto_detect`
In auto_detect mode the proxy configuration is determined by a PAC script that can
be downloaded at http://wpad/wpad.dat.
* `pac_script`
In pac_script mode the proxy configuration is determined by a PAC script that is
retrieved from the URL specified in the `pacScript`. This is the default mode
if `pacScript` is specified.
* `fixed_servers`
In fixed_servers mode the proxy configuration is specified in `proxyRules`.
This is the default mode if `proxyRules` is specified.
* `system`
In system mode the proxy configuration is taken from the operating system.
Note that the system mode is different from setting no proxy configuration.
In the latter case, Electron falls back to the system settings
only if no command-line options influence the proxy configuration.
* `pacScript` string (optional) - The URL associated with the PAC file.
* `proxyRules` string (optional) - Rules indicating which proxies to use.
* `proxyBypassRules` string (optional) - Rules indicating which URLs should
bypass the proxy settings.
Returns `Promise<void>` - Resolves when the proxy setting process is complete. Returns `Promise<void>` - Resolves when the proxy setting process is complete.
Sets the proxy settings. Sets the proxy settings.
When `mode` is unspecified, `pacScript` and `proxyRules` are provided together, the `proxyRules`
option is ignored and `pacScript` configuration is applied.
You may need `ses.closeAllConnections` to close currently in flight connections to prevent You may need `ses.closeAllConnections` to close currently in flight connections to prevent
pooled sockets using previous proxy from being reused by future requests. pooled sockets using previous proxy from being reused by future requests.
The `proxyRules` has to follow the rules below:
```sh
proxyRules = schemeProxies[";"<schemeProxies>]
schemeProxies = [<urlScheme>"="]<proxyURIList>
urlScheme = "http" | "https" | "ftp" | "socks"
proxyURIList = <proxyURL>[","<proxyURIList>]
proxyURL = [<proxyScheme>"://"]<proxyHost>[":"<proxyPort>]
```
For example:
* `http=foopy:80;ftp=foopy2` - Use HTTP proxy `foopy:80` for `http://` URLs, and
HTTP proxy `foopy2:80` for `ftp://` URLs.
* `foopy:80` - Use HTTP proxy `foopy:80` for all URLs.
* `foopy:80,bar,direct://` - Use HTTP proxy `foopy:80` for all URLs, failing
over to `bar` if `foopy:80` is unavailable, and after that using no proxy.
* `socks4://foopy` - Use SOCKS v4 proxy `foopy:1080` for all URLs.
* `http=foopy,socks5://bar.com` - Use HTTP proxy `foopy` for http URLs, and fail
over to the SOCKS5 proxy `bar.com` if `foopy` is unavailable.
* `http=foopy,direct://` - Use HTTP proxy `foopy` for http URLs, and use no
proxy if `foopy` is unavailable.
* `http=foopy;socks=foopy2` - Use HTTP proxy `foopy` for http URLs, and use
`socks4://foopy2` for all other URLs.
The `proxyBypassRules` is a comma separated list of rules described below:
* `[ URL_SCHEME "://" ] HOSTNAME_PATTERN [ ":" <port> ]`
Match all hostnames that match the pattern HOSTNAME_PATTERN.
Examples:
"foobar.com", "\*foobar.com", "\*.foobar.com", "\*foobar.com:99",
"https://x.\*.y.com:99"
* `"." HOSTNAME_SUFFIX_PATTERN [ ":" PORT ]`
Match a particular domain suffix.
Examples:
".google.com", ".com", "http://.google.com"
* `[ SCHEME "://" ] IP_LITERAL [ ":" PORT ]`
Match URLs which are IP address literals.
Examples:
"127.0.1", "\[0:0::1]", "\[::1]", "http://\[::1]:99"
* `IP_LITERAL "/" PREFIX_LENGTH_IN_BITS`
Match any URL that is to an IP literal that falls between the
given range. IP range is specified using CIDR notation.
Examples:
"192.168.1.1/16", "fefe:13::abc/33".
* `<local>`
Match local addresses. The meaning of `<local>` is whether the
host matches one of: "127.0.0.1", "::1", "localhost".
#### `ses.resolveHost(host, [options])` #### `ses.resolveHost(host, [options])`
* `host` string - Hostname to resolve. * `host` string - Hostname to resolve.
@@ -785,7 +695,7 @@ Returns `Promise<void>` - Resolves when all connections are closed.
#### `ses.fetch(input[, init])` #### `ses.fetch(input[, init])`
* `input` string | [GlobalRequest](https://nodejs.org/api/globals.html#request) * `input` string | [GlobalRequest](https://nodejs.org/api/globals.html#request)
* `init` [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) & { bypassCustomProtocolHandlers?: boolean } (optional) * `init` [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) & \{ bypassCustomProtocolHandlers?: boolean \} (optional)
Returns `Promise<GlobalResponse>` - see [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response). Returns `Promise<GlobalResponse>` - see [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response).
@@ -819,11 +729,10 @@ Limitations:
* The `.type` and `.url` values of the returned `Response` object are * The `.type` and `.url` values of the returned `Response` object are
incorrect. incorrect.
By default, requests made with `net.fetch` can be made to [custom By default, requests made with `net.fetch` can be made to [custom protocols](protocol.md)
protocols](protocol.md) as well as `file:`, and will trigger as well as `file:`, and will trigger [webRequest](web-request.md) handlers if present.
[webRequest](web-request.md) handlers if present. When the non-standard When the non-standard `bypassCustomProtocolHandlers` option is set in RequestInit,
`bypassCustomProtocolHandlers` option is set in RequestInit, custom protocol custom protocol handlers will not be called for this request. This allows forwarding an
handlers will not be called for this request. This allows forwarding an
intercepted request to the built-in handler. [webRequest](web-request.md) intercepted request to the built-in handler. [webRequest](web-request.md)
handlers will still be triggered when bypassing custom protocols. handlers will still be triggered when bypassing custom protocols.
@@ -903,17 +812,15 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
* `pointerLock` - Request to directly interpret mouse movements as an input method via the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). These requests always appear to originate from the main frame. * `pointerLock` - Request to directly interpret mouse movements as an input method via the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). These requests always appear to originate from the main frame.
* `keyboardLock` - Request capture of keypresses for any or all of the keys on the physical keyboard via the [Keyboard Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Keyboard/lock). These requests always appear to originate from the main frame. * `keyboardLock` - Request capture of keypresses for any or all of the keys on the physical keyboard via the [Keyboard Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Keyboard/lock). These requests always appear to originate from the main frame.
* `openExternal` - Request to open links in external applications. * `openExternal` - Request to open links in external applications.
* `speaker-selection` - Request to enumerate and select audio output devices via the [speaker-selection permissions policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy/speaker-selection).
* `storage-access` - Allows content loaded in a third-party context to request access to third-party cookies using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
* `top-level-storage-access` - Allow top-level sites to request third-party cookie access on behalf of embedded content originating from another site in the same related website set using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
* `window-management` - Request access to enumerate screens using the [`getScreenDetails`](https://developer.chrome.com/en/articles/multi-screen-window-placement/) API. * `window-management` - Request access to enumerate screens using the [`getScreenDetails`](https://developer.chrome.com/en/articles/multi-screen-window-placement/) API.
* `unknown` - An unrecognized permission request. * `unknown` - An unrecognized permission request.
* `fileSystem` - Request access to read, write, and file management capabilities using the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API).
* `callback` Function * `callback` Function
* `permissionGranted` boolean - Allow or deny the permission. * `permissionGranted` boolean - Allow or deny the permission.
* `details` Object - Some properties are only available on certain permission types. * `details` [PermissionRequest](structures/permission-request.md) | [FilesystemPermissionRequest](structures/filesystem-permission-request.md) | [MediaAccessPermissionRequest](structures/media-access-permission-request.md) | [OpenExternalPermissionRequest](structures/open-external-permission-request.md) - Additional information about the permission being requested.
* `externalURL` string (optional) - The url of the `openExternal` request.
* `securityOrigin` string (optional) - The security origin of the `media` request.
* `mediaTypes` string[] (optional) - The types of media access being requested, elements can be `video`
or `audio`
* `requestingUrl` string - The last URL the requesting frame loaded
* `isMainFrame` boolean - Whether the frame making the request is the main frame
Sets the handler which can be used to respond to permission requests for the `session`. Sets the handler which can be used to respond to permission requests for the `session`.
Calling `callback(true)` will allow the permission and `callback(false)` will reject it. Calling `callback(true)` will allow the permission and `callback(false)` will reject it.
@@ -951,6 +858,8 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
* `openExternal` - Open links in external applications. * `openExternal` - Open links in external applications.
* `pointerLock` - Directly interpret mouse movements as an input method via the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). These requests always appear to originate from the main frame. * `pointerLock` - Directly interpret mouse movements as an input method via the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). These requests always appear to originate from the main frame.
* `serial` - Read from and write to serial devices with the [Web Serial API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API). * `serial` - Read from and write to serial devices with the [Web Serial API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API).
* `storage-access` - Allows content loaded in a third-party context to request access to third-party cookies using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
* `top-level-storage-access` - Allow top-level sites to request third-party cookie access on behalf of embedded content originating from another site in the same related website set using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
* `usb` - Expose non-standard Universal Serial Bus (USB) compatible devices services to the web with the [WebUSB API](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API). * `usb` - Expose non-standard Universal Serial Bus (USB) compatible devices services to the web with the [WebUSB API](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API).
* `requestingOrigin` string - The origin URL of the permission check * `requestingOrigin` string - The origin URL of the permission check
* `details` Object - Some properties are only available on certain permission types. * `details` Object - Some properties are only available on certain permission types.
@@ -1305,7 +1214,7 @@ Returns `Promise<Buffer>` - resolves with blob data.
* `url` string * `url` string
* `options` Object (optional) * `options` Object (optional)
* `headers` Record<string, string> (optional) - HTTP request headers. * `headers` Record\<string, string\> (optional) - HTTP request headers.
Initiates a download of the resource at `url`. Initiates a download of the resource at `url`.
The API will generate a [DownloadItem](download-item.md) that can be accessed The API will generate a [DownloadItem](download-item.md) that can be accessed

View File

@@ -1,4 +1,4 @@
# FilePathWithHeaders Object # FilePathWithHeaders Object
* `path` string - The path to the file to send. * `path` string - The path to the file to send.
* `headers` Record<string, string> (optional) - Additional headers to be sent. * `headers` Record\<string, string\> (optional) - Additional headers to be sent.

View File

@@ -0,0 +1,5 @@
# FilesystemPermissionRequest Object extends `PermissionRequest`
* `filePath` string (optional) - The path of the `fileSystem` request.
* `isDirectory` boolean (optional) - Whether the `fileSystem` request is a directory.
* `fileAccessType` string (optional) - The access type of the `fileSystem` request. Can be `writable` or `readable`.

View File

@@ -1,8 +0,0 @@
# IOCounters Object
* `readOperationCount` number - The number of I/O read operations.
* `writeOperationCount` number - The number of I/O write operations.
* `otherOperationCount` number - Then number of I/O other operations.
* `readTransferCount` number - The number of I/O read transfers.
* `writeTransferCount` number - The number of I/O write transfers.
* `otherTransferCount` number - Then number of I/O other transfers.

View File

@@ -0,0 +1,5 @@
# MediaAccessPermissionRequest Object extends `PermissionRequest`
* `securityOrigin` string (optional) - The security origin of the request.
* `mediaTypes` string[] (optional) - The types of media access being requested - elements can be `video`
or `audio`.

View File

@@ -3,5 +3,5 @@
* `actionIdentifier` string - The identifier string of the action that the user selected. * `actionIdentifier` string - The identifier string of the action that the user selected.
* `date` number - The delivery date of the notification. * `date` number - The delivery date of the notification.
* `identifier` string - The unique identifier for this notification request. * `identifier` string - The unique identifier for this notification request.
* `userInfo` Record<string, any> - A dictionary of custom information associated with the notification. * `userInfo` Record\<string, any\> - A dictionary of custom information associated with the notification.
* `userText` string (optional) - The text entered or chosen by the user. * `userText` string (optional) - The text entered or chosen by the user.

View File

@@ -0,0 +1,3 @@
# OpenExternalPermissionRequest Object extends `PermissionRequest`
* `externalURL` string (optional) - The url of the `openExternal` request.

View File

@@ -0,0 +1,4 @@
# PermissionRequest Object
* `requestingUrl` string - The last URL the requesting frame loaded.
* `isMainFrame` boolean - Whether the frame making the request is the main frame.

View File

@@ -4,4 +4,4 @@
* `referrer` string * `referrer` string
* `method` string * `method` string
* `uploadData` [UploadData[]](upload-data.md) (optional) * `uploadData` [UploadData[]](upload-data.md) (optional)
* `headers` Record<string, string> * `headers` Record\<string, string\>

View File

@@ -10,7 +10,7 @@
`"text/html"`. Setting `mimeType` would implicitly set the `content-type` `"text/html"`. Setting `mimeType` would implicitly set the `content-type`
header in response, but if `content-type` is already set in `headers`, the header in response, but if `content-type` is already set in `headers`, the
`mimeType` would be ignored. `mimeType` would be ignored.
* `headers` Record<string, string | string[]> (optional) - An object containing the response headers. The * `headers` Record\<string, string | string[]\> (optional) - An object containing the response headers. The
keys must be string, and values must be either string or Array of string. keys must be string, and values must be either string or Array of string.
* `data` (Buffer | string | ReadableStream) (optional) - The response body. When * `data` (Buffer | string | ReadableStream) (optional) - The response body. When
returning stream as response, this is a Node.js readable stream representing returning stream as response, this is a Node.js readable stream representing

View File

@@ -0,0 +1,86 @@
# ProxyConfig Object
* `mode` string (optional) - The proxy mode. Should be one of `direct`,
`auto_detect`, `pac_script`, `fixed_servers` or `system`.
Defaults to `pac_script` proxy mode if `pacScript` option is specified
otherwise defaults to `fixed_servers`.
* `direct` - In direct mode all connections are created directly, without any proxy involved.
* `auto_detect` - In auto_detect mode the proxy configuration is determined by a PAC script that can
be downloaded at http://wpad/wpad.dat.
* `pac_script` - In pac_script mode the proxy configuration is determined by a PAC script that is
retrieved from the URL specified in the `pacScript`. This is the default mode if `pacScript` is specified.
* `fixed_servers` - In fixed_servers mode the proxy configuration is specified in `proxyRules`.
This is the default mode if `proxyRules` is specified.
* `system` - In system mode the proxy configuration is taken from the operating system.
Note that the system mode is different from setting no proxy configuration.
In the latter case, Electron falls back to the system settings only if no
command-line options influence the proxy configuration.
* `pacScript` string (optional) - The URL associated with the PAC file.
* `proxyRules` string (optional) - Rules indicating which proxies to use.
* `proxyBypassRules` string (optional) - Rules indicating which URLs should
bypass the proxy settings.
When `mode` is unspecified, `pacScript` and `proxyRules` are provided together, the `proxyRules`
option is ignored and `pacScript` configuration is applied.
The `proxyRules` has to follow the rules below:
```sh
proxyRules = schemeProxies[";"<schemeProxies>]
schemeProxies = [<urlScheme>"="]<proxyURIList>
urlScheme = "http" | "https" | "ftp" | "socks"
proxyURIList = <proxyURL>[","<proxyURIList>]
proxyURL = [<proxyScheme>"://"]<proxyHost>[":"<proxyPort>]
```
For example:
* `http=foopy:80;ftp=foopy2` - Use HTTP proxy `foopy:80` for `http://` URLs, and
HTTP proxy `foopy2:80` for `ftp://` URLs.
* `foopy:80` - Use HTTP proxy `foopy:80` for all URLs.
* `foopy:80,bar,direct://` - Use HTTP proxy `foopy:80` for all URLs, failing
over to `bar` if `foopy:80` is unavailable, and after that using no proxy.
* `socks4://foopy` - Use SOCKS v4 proxy `foopy:1080` for all URLs.
* `http=foopy,socks5://bar.com` - Use HTTP proxy `foopy` for http URLs, and fail
over to the SOCKS5 proxy `bar.com` if `foopy` is unavailable.
* `http=foopy,direct://` - Use HTTP proxy `foopy` for http URLs, and use no
proxy if `foopy` is unavailable.
* `http=foopy;socks=foopy2` - Use HTTP proxy `foopy` for http URLs, and use
`socks4://foopy2` for all other URLs.
The `proxyBypassRules` is a comma separated list of rules described below:
* `[ URL_SCHEME "://" ] HOSTNAME_PATTERN [ ":" <port> ]`
Match all hostnames that match the pattern HOSTNAME_PATTERN.
Examples:
"foobar.com", "\*foobar.com", "\*.foobar.com", "\*foobar.com:99",
"https://x.\*.y.com:99"
* `"." HOSTNAME_SUFFIX_PATTERN [ ":" PORT ]`
Match a particular domain suffix.
Examples:
".google.com", ".com", "http://.google.com"
* `[ SCHEME "://" ] IP_LITERAL [ ":" PORT ]`
Match URLs which are IP address literals.
Examples:
"127.0.1", "\[0:0::1]", "\[::1]", "http://\[::1]:99"
* `IP_LITERAL "/" PREFIX_LENGTH_IN_BITS`
Match any URL that is to an IP literal that falls between the
given range. IP range is specified using CIDR notation.
Examples:
"192.168.1.1/16", "fefe:13::abc/33".
* `<local>`
Match local addresses. The meaning of `<local>` is whether the
host matches one of: "127.0.0.1", "::1", "localhost".

View File

@@ -19,7 +19,7 @@
include in the trace. If not specified, trace all processes. include in the trace. If not specified, trace all processes.
* `histogram_names` string[] (optional) - a list of [histogram][] names to report * `histogram_names` string[] (optional) - a list of [histogram][] names to report
with the trace. with the trace.
* `memory_dump_config` Record<string, any> (optional) - if the * `memory_dump_config` Record\<string, any\> (optional) - if the
`disabled-by-default-memory-infra` category is enabled, this contains `disabled-by-default-memory-infra` category is enabled, this contains
optional additional configuration for data collection. See the [Chromium optional additional configuration for data collection. See the [Chromium
memory-infra docs][memory-infra docs] for more information. memory-infra docs][memory-infra docs] for more information.

View File

@@ -143,6 +143,7 @@
contain the layout of the document—without requiring scrolling. Enabling contain the layout of the document—without requiring scrolling. Enabling
this will cause the `preferred-size-changed` event to be emitted on the this will cause the `preferred-size-changed` event to be emitted on the
`WebContents` when the preferred size changes. Default is `false`. `WebContents` when the preferred size changes. Default is `false`.
* `transparent` boolean (optional) - Whether to enable background transparency for the guest page. Default is `true`. **Note:** The guest page's text and background colors are derived from the [color scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme) of its root element. When transparency is enabled, the text color will still change accordingly but the background will remain transparent.
[chrome-content-scripts]: https://developer.chrome.com/extensions/content_scripts#execution-environment [chrome-content-scripts]: https://developer.chrome.com/extensions/content_scripts#execution-environment
[runtime-enabled-features]: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5 [runtime-enabled-features]: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5

View File

@@ -36,7 +36,7 @@ Returns `boolean` - Whether the Swipe between pages setting is on.
### `systemPreferences.postNotification(event, userInfo[, deliverImmediately])` _macOS_ ### `systemPreferences.postNotification(event, userInfo[, deliverImmediately])` _macOS_
* `event` string * `event` string
* `userInfo` Record<string, any> * `userInfo` Record\<string, any\>
* `deliverImmediately` boolean (optional) - `true` to post notifications immediately even when the subscribing app is inactive. * `deliverImmediately` boolean (optional) - `true` to post notifications immediately even when the subscribing app is inactive.
Posts `event` as native notifications of macOS. The `userInfo` is an Object Posts `event` as native notifications of macOS. The `userInfo` is an Object
@@ -45,7 +45,7 @@ that contains the user information dictionary sent along with the notification.
### `systemPreferences.postLocalNotification(event, userInfo)` _macOS_ ### `systemPreferences.postLocalNotification(event, userInfo)` _macOS_
* `event` string * `event` string
* `userInfo` Record<string, any> * `userInfo` Record\<string, any\>
Posts `event` as native notifications of macOS. The `userInfo` is an Object Posts `event` as native notifications of macOS. The `userInfo` is an Object
that contains the user information dictionary sent along with the notification. that contains the user information dictionary sent along with the notification.
@@ -53,7 +53,7 @@ that contains the user information dictionary sent along with the notification.
### `systemPreferences.postWorkspaceNotification(event, userInfo)` _macOS_ ### `systemPreferences.postWorkspaceNotification(event, userInfo)` _macOS_
* `event` string * `event` string
* `userInfo` Record<string, any> * `userInfo` Record\<string, any\>
Posts `event` as native notifications of macOS. The `userInfo` is an Object Posts `event` as native notifications of macOS. The `userInfo` is an Object
that contains the user information dictionary sent along with the notification. that contains the user information dictionary sent along with the notification.
@@ -63,7 +63,7 @@ that contains the user information dictionary sent along with the notification.
* `event` string | null * `event` string | null
* `callback` Function * `callback` Function
* `event` string * `event` string
* `userInfo` Record<string, unknown> * `userInfo` Record\<string, unknown\>
* `object` string * `object` string
Returns `number` - The ID of this subscription Returns `number` - The ID of this subscription
@@ -92,7 +92,7 @@ If `event` is null, the `NSDistributedNotificationCenter` doesnt use it as cr
* `event` string | null * `event` string | null
* `callback` Function * `callback` Function
* `event` string * `event` string
* `userInfo` Record<string, unknown> * `userInfo` Record\<string, unknown\>
* `object` string * `object` string
Returns `number` - The ID of this subscription Returns `number` - The ID of this subscription
@@ -107,7 +107,7 @@ If `event` is null, the `NSNotificationCenter` doesnt use it as criteria for
* `event` string | null * `event` string | null
* `callback` Function * `callback` Function
* `event` string * `event` string
* `userInfo` Record<string, unknown> * `userInfo` Record\<string, unknown\>
* `object` string * `object` string
Returns `number` - The ID of this subscription Returns `number` - The ID of this subscription
@@ -137,7 +137,7 @@ Same as `unsubscribeNotification`, but removes the subscriber from `NSWorkspace.
### `systemPreferences.registerDefaults(defaults)` _macOS_ ### `systemPreferences.registerDefaults(defaults)` _macOS_
* `defaults` Record<string, string | boolean | number> - a dictionary of (`key: value`) user defaults * `defaults` Record\<string, string | boolean | number\> - a dictionary of (`key: value`) user defaults
Add the specified defaults to your application's `NSUserDefaults`. Add the specified defaults to your application's `NSUserDefaults`.

View File

@@ -60,7 +60,7 @@ app.whenReady().then(() => {
**MacOS** **MacOS**
* Icons passed to the Tray constructor should be [Template Images](native-image.md#template-image). * Icons passed to the Tray constructor should be [Template Images](native-image.md#template-image-macos).
* To make sure your icon isn't grainy on retina monitors, be sure your `@2x` image is 144dpi. * To make sure your icon isn't grainy on retina monitors, be sure your `@2x` image is 144dpi.
* If you are bundling your application (e.g., with webpack for development), be sure that the file names are not being mangled or hashed. The filename needs to end in Template, and the `@2x` image needs to have the same filename as the standard image, or MacOS will not magically invert your image's colors or use the high density image. * If you are bundling your application (e.g., with webpack for development), be sure that the file names are not being mangled or hashed. The filename needs to end in Template, and the `@2x` image needs to have the same filename as the standard image, or MacOS will not magically invert your image's colors or use the high density image.
* 16x16 (72dpi) and 32x32@2x (144dpi) work well for most icons. * 16x16 (72dpi) and 32x32@2x (144dpi) work well for most icons.

View File

@@ -48,6 +48,9 @@ Objects created with `new View` have the following instance methods:
* `index` Integer (optional) - Index at which to insert the child view. * `index` Integer (optional) - Index at which to insert the child view.
Defaults to adding the child at the end of the child list. Defaults to adding the child at the end of the child list.
If the same View is added to a parent which already contains it, it will be reordered such that
it becomes the topmost view.
#### `view.removeChildView(view)` #### `view.removeChildView(view)`
* `view` View - Child view to remove. * `view` View - Child view to remove.

View File

@@ -237,7 +237,7 @@ See [`window.open()`](window-open.md) for more details and how to use this in co
Returns: Returns:
* `details` Event<> * `details` Event\<\>
* `url` string - The URL the frame is navigating to. * `url` string - The URL the frame is navigating to.
* `isSameDocument` boolean - This event does not fire for same document navigations using window.history api and reference fragment navigations. * `isSameDocument` boolean - This event does not fire for same document navigations using window.history api and reference fragment navigations.
This property is always set to `false` for this event. This property is always set to `false` for this event.
@@ -270,7 +270,7 @@ Calling `event.preventDefault()` will prevent the navigation.
Returns: Returns:
* `details` Event<> * `details` Event\<\>
* `url` string - The URL the frame is navigating to. * `url` string - The URL the frame is navigating to.
* `isSameDocument` boolean - This event does not fire for same document navigations using window.history api and reference fragment navigations. * `isSameDocument` boolean - This event does not fire for same document navigations using window.history api and reference fragment navigations.
This property is always set to `false` for this event. This property is always set to `false` for this event.
@@ -300,7 +300,7 @@ Calling `event.preventDefault()` will prevent the navigation.
Returns: Returns:
* `details` Event<> * `details` Event\<\>
* `url` string - The URL the frame is navigating to. * `url` string - The URL the frame is navigating to.
* `isSameDocument` boolean - Whether the navigation happened without changing * `isSameDocument` boolean - Whether the navigation happened without changing
document. Examples of same document navigations are reference fragment document. Examples of same document navigations are reference fragment
@@ -324,7 +324,7 @@ Emitted when any frame (including main) starts navigating.
Returns: Returns:
* `details` Event<> * `details` Event\<\>
* `url` string - The URL the frame is navigating to. * `url` string - The URL the frame is navigating to.
* `isSameDocument` boolean - Whether the navigation happened without changing * `isSameDocument` boolean - Whether the navigation happened without changing
document. Examples of same document navigations are reference fragment document. Examples of same document navigations are reference fragment
@@ -355,7 +355,7 @@ redirect).
Returns: Returns:
* `details` Event<> * `details` Event\<\>
* `url` string - The URL the frame is navigating to. * `url` string - The URL the frame is navigating to.
* `isSameDocument` boolean - Whether the navigation happened without changing * `isSameDocument` boolean - Whether the navigation happened without changing
document. Examples of same document navigations are reference fragment document. Examples of same document navigations are reference fragment
@@ -582,6 +582,15 @@ Returns:
Emitted when a link is clicked in DevTools or 'Open in new tab' is selected for a link in its context menu. Emitted when a link is clicked in DevTools or 'Open in new tab' is selected for a link in its context menu.
#### Event: 'devtools-search-query'
Returns:
* `event` Event
* `query` string - text to query for.
Emitted when 'Search' is selected for text in its context menu.
#### Event: 'devtools-opened' #### Event: 'devtools-opened'
Emitted when DevTools is opened. Emitted when DevTools is opened.
@@ -608,8 +617,7 @@ Returns:
Emitted when failed to verify the `certificate` for `url`. Emitted when failed to verify the `certificate` for `url`.
The usage is the same with [the `certificate-error` event of The usage is the same with [the `certificate-error` event of `app`](app.md#event-certificate-error).
`app`](app.md#event-certificate-error).
#### Event: 'select-client-certificate' #### Event: 'select-client-certificate'
@@ -623,8 +631,7 @@ Returns:
Emitted when a client certificate is requested. Emitted when a client certificate is requested.
The usage is the same with [the `select-client-certificate` event of The usage is the same with [the `select-client-certificate` event of `app`](app.md#event-select-client-certificate).
`app`](app.md#event-select-client-certificate).
#### Event: 'login' #### Event: 'login'
@@ -674,7 +681,7 @@ Emitted when media is paused or done playing.
Returns: Returns:
* `event` Event<> * `event` Event\<\>
* `audible` boolean - True if one or more frames or child `webContents` are emitting audio. * `audible` boolean - True if one or more frames or child `webContents` are emitting audio.
Emitted when media becomes audible or inaudible. Emitted when media becomes audible or inaudible.
@@ -778,9 +785,6 @@ Returns:
`input-text`, `input-time`, `input-url`, `input-week`, `output`, `reset-button`, `input-text`, `input-time`, `input-url`, `input-week`, `output`, `reset-button`,
`select-list`, `select-list`, `select-multiple`, `select-one`, `submit-button`, `select-list`, `select-list`, `select-multiple`, `select-one`, `submit-button`,
and `text-area`, and `text-area`,
* `inputFieldType` string _Deprecated_ - If the context menu was invoked on an
input field, the type of that field. Possible values include `none`,
`plainText`, `password`, `other`.
* `spellcheckEnabled` boolean - If the context is editable, whether or not spellchecking is enabled. * `spellcheckEnabled` boolean - If the context is editable, whether or not spellchecking is enabled.
* `menuSourceType` string - Input source that invoked the context menu. * `menuSourceType` string - Input source that invoked the context menu.
Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`, `longPress`, `longTap`, `touchHandle`, `stylus`, `adjustSelection`, or `adjustSelectionReset`. Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`, `longPress`, `longTap`, `touchHandle`, `stylus`, `adjustSelection`, or `adjustSelectionReset`.
@@ -894,7 +898,7 @@ Returns:
* `webPreferences` [WebPreferences](structures/web-preferences.md) - The web preferences that will be used by the guest * `webPreferences` [WebPreferences](structures/web-preferences.md) - The web preferences that will be used by the guest
page. This object can be modified to adjust the preferences for the guest page. This object can be modified to adjust the preferences for the guest
page. page.
* `params` Record<string, string> - The other `<webview>` parameters such as the `src` URL. * `params` Record\<string, string\> - The other `<webview>` parameters such as the `src` URL.
This object can be modified to adjust the parameters of the guest page. This object can be modified to adjust the parameters of the guest page.
Emitted when a `<webview>`'s web contents is being attached to this web Emitted when a `<webview>`'s web contents is being attached to this web
@@ -1014,7 +1018,7 @@ win.webContents.loadURL('https://github.com', options)
* `filePath` string * `filePath` string
* `options` Object (optional) * `options` Object (optional)
* `query` Record<string, string> (optional) - Passed to `url.format()`. * `query` Record\<string, string\> (optional) - Passed to `url.format()`.
* `search` string (optional) - Passed to `url.format()`. * `search` string (optional) - Passed to `url.format()`.
* `hash` string (optional) - Passed to `url.format()`. * `hash` string (optional) - Passed to `url.format()`.
@@ -1045,7 +1049,7 @@ win.loadFile('src/index.html')
* `url` string * `url` string
* `options` Object (optional) * `options` Object (optional)
* `headers` Record<string, string> (optional) - HTTP request headers. * `headers` Record\<string, string\> (optional) - HTTP request headers.
Initiates a download of the resource at `url` without navigating. The Initiates a download of the resource at `url` without navigating. The
`will-download` event of `session` will be triggered. `will-download` event of `session` will be triggered.
@@ -1282,7 +1286,7 @@ Ignore application menu shortcuts while this web contents is focused.
#### `contents.setWindowOpenHandler(handler)` #### `contents.setWindowOpenHandler(handler)`
* `handler` Function<{action: 'deny'} | {action: 'allow', outlivesOpener?: boolean, overrideBrowserWindowOptions?: BrowserWindowConstructorOptions}> * `handler` Function\<\{action: 'deny'\} | \{action: 'allow', outlivesOpener?: boolean, overrideBrowserWindowOptions?: BrowserWindowConstructorOptions\}\>
* `details` Object * `details` Object
* `url` string - The _resolved_ version of the URL passed to `window.open()`. e.g. opening a window with `window.open('foo')` will yield something like `https://the-origin/the/current/path/foo`. * `url` string - The _resolved_ version of the URL passed to `window.open()`. e.g. opening a window with `window.open('foo')` will yield something like `https://the-origin/the/current/path/foo`.
* `frameName` string - Name of the window provided in `window.open()` * `frameName` string - Name of the window provided in `window.open()`
@@ -1560,7 +1564,7 @@ Returns `Promise<PrinterInfo[]>` - Resolves with a [`PrinterInfo[]`](structures/
* `from` number - Index of the first page to print (0-based). * `from` number - Index of the first page to print (0-based).
* `to` number - Index of the last page to print (inclusive) (0-based). * `to` number - Index of the last page to print (inclusive) (0-based).
* `duplexMode` string (optional) - Set the duplex mode of the printed web page. Can be `simplex`, `shortEdge`, or `longEdge`. * `duplexMode` string (optional) - Set the duplex mode of the printed web page. Can be `simplex`, `shortEdge`, or `longEdge`.
* `dpi` Record<string, number> (optional) * `dpi` Record\<string, number\> (optional)
* `horizontal` number (optional) - The horizontal dpi. * `horizontal` number (optional) - The horizontal dpi.
* `vertical` number (optional) - The vertical dpi. * `vertical` number (optional) - The vertical dpi.
* `header` string (optional) - string to be printed as page header. * `header` string (optional) - string to be printed as page header.
@@ -1827,8 +1831,8 @@ Opens the developer tools for the service worker context.
* `...args` any[] * `...args` any[]
Send an asynchronous message to the renderer process via `channel`, along with Send an asynchronous message to the renderer process via `channel`, along with
arguments. Arguments will be serialized with the [Structured Clone arguments. Arguments will be serialized with the [Structured Clone Algorithm][SCA],
Algorithm][SCA], just like [`postMessage`][], so prototype chains will not be just like [`postMessage`][], so prototype chains will not be
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
throw an exception. throw an exception.
@@ -2200,6 +2204,10 @@ A `Integer` representing the unique ID of this WebContents. Each ID is unique am
A [`Session`](session.md) used by this webContents. A [`Session`](session.md) used by this webContents.
#### `contents.navigationHistory` _Readonly_
A [`NavigationHistory`](navigation-history.md) used by this webContents.
#### `contents.hostWebContents` _Readonly_ #### `contents.hostWebContents` _Readonly_
A [`WebContents`](web-contents.md) instance that might own this `WebContents`. A [`WebContents`](web-contents.md) instance that might own this `WebContents`.

View File

@@ -103,10 +103,9 @@ Returns `boolean` - Whether the reload was initiated successfully. Only results
* `...args` any[] * `...args` any[]
Send an asynchronous message to the renderer process via `channel`, along with Send an asynchronous message to the renderer process via `channel`, along with
arguments. Arguments will be serialized with the [Structured Clone arguments. Arguments will be serialized with the [Structured Clone Algorithm][SCA],
Algorithm][SCA], just like [`postMessage`][], so prototype chains will not be just like [`postMessage`][], so prototype chains will not be included.
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw an exception.
throw an exception.
The renderer process can handle the message by listening to `channel` with the The renderer process can handle the message by listening to `channel` with the
[`ipcRenderer`](ipc-renderer.md) module. [`ipcRenderer`](ipc-renderer.md) module.

View File

@@ -99,11 +99,11 @@ Some examples of valid `urls`:
* `referrer` string * `referrer` string
* `timestamp` Double * `timestamp` Double
* `uploadData` [UploadData[]](structures/upload-data.md) (optional) * `uploadData` [UploadData[]](structures/upload-data.md) (optional)
* `requestHeaders` Record<string, string> * `requestHeaders` Record\<string, string\>
* `callback` Function * `callback` Function
* `beforeSendResponse` Object * `beforeSendResponse` Object
* `cancel` boolean (optional) * `cancel` boolean (optional)
* `requestHeaders` Record<string, string | string[]> (optional) - When provided, request will be made * `requestHeaders` Record\<string, string | string[]\> (optional) - When provided, request will be made
with these headers. with these headers.
The `listener` will be called with `listener(details, callback)` before sending The `listener` will be called with `listener(details, callback)` before sending
@@ -126,7 +126,7 @@ The `callback` has to be called with a `response` object.
* `resourceType` string - Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`, `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`. * `resourceType` string - Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`, `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`.
* `referrer` string * `referrer` string
* `timestamp` Double * `timestamp` Double
* `requestHeaders` Record<string, string> * `requestHeaders` Record\<string, string\>
The `listener` will be called with `listener(details)` just before a request is The `listener` will be called with `listener(details)` just before a request is
going to be sent to the server, modifications of previous `onBeforeSendHeaders` going to be sent to the server, modifications of previous `onBeforeSendHeaders`
@@ -148,11 +148,11 @@ response are visible by the time this listener is fired.
* `timestamp` Double * `timestamp` Double
* `statusLine` string * `statusLine` string
* `statusCode` Integer * `statusCode` Integer
* `responseHeaders` Record<string, string[]> (optional) * `responseHeaders` Record\<string, string[]\> (optional)
* `callback` Function * `callback` Function
* `headersReceivedResponse` Object * `headersReceivedResponse` Object
* `cancel` boolean (optional) * `cancel` boolean (optional)
* `responseHeaders` Record<string, string | string[]> (optional) - When provided, the server is assumed * `responseHeaders` Record\<string, string | string[]\> (optional) - When provided, the server is assumed
to have responded with these headers. to have responded with these headers.
* `statusLine` string (optional) - Should be provided when overriding * `statusLine` string (optional) - Should be provided when overriding
`responseHeaders` to change header status otherwise original response `responseHeaders` to change header status otherwise original response
@@ -177,7 +177,7 @@ The `callback` has to be called with a `response` object.
* `resourceType` string - Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`, `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`. * `resourceType` string - Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`, `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`.
* `referrer` string * `referrer` string
* `timestamp` Double * `timestamp` Double
* `responseHeaders` Record<string, string[]> (optional) * `responseHeaders` Record\<string, string[]\> (optional)
* `fromCache` boolean - Indicates whether the response was fetched from disk * `fromCache` boolean - Indicates whether the response was fetched from disk
cache. cache.
* `statusCode` Integer * `statusCode` Integer
@@ -207,7 +207,7 @@ and response headers are available.
* `ip` string (optional) - The server IP address that the request was * `ip` string (optional) - The server IP address that the request was
actually sent to. actually sent to.
* `fromCache` boolean * `fromCache` boolean
* `responseHeaders` Record<string, string[]> (optional) * `responseHeaders` Record\<string, string[]\> (optional)
The `listener` will be called with `listener(details)` when a server initiated The `listener` will be called with `listener(details)` when a server initiated
redirect is about to occur. redirect is about to occur.
@@ -226,7 +226,7 @@ redirect is about to occur.
* `resourceType` string - Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`, `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`. * `resourceType` string - Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`, `object`, `xhr`, `ping`, `cspReport`, `media`, `webSocket` or `other`.
* `referrer` string * `referrer` string
* `timestamp` Double * `timestamp` Double
* `responseHeaders` Record<string, string[]> (optional) * `responseHeaders` Record\<string, string[]\> (optional)
* `fromCache` boolean * `fromCache` boolean
* `statusCode` Integer * `statusCode` Integer
* `statusLine` string * `statusLine` string

View File

@@ -221,9 +221,7 @@ windows. Popups are disabled by default.
``` ```
A `string` which is a comma separated list of strings which specifies the web preferences to be set on the webview. A `string` which is a comma separated list of strings which specifies the web preferences to be set on the webview.
The full list of supported preference strings can be found in [BrowserWindow](browser-window.md#new-browserwindowoptions). In addition, webview supports the following preferences: The full list of supported preference strings can be found in [BrowserWindow](browser-window.md#new-browserwindowoptions).
* `transparent` boolean (optional) - Whether to enable background transparency for the guest page. Default is `true`. **Note:** The guest page's text and background colors are derived from the [color scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme) of its root element. When transparency is enabled, the text color will still change accordingly but the background will remain transparent.
The string follows the same format as the features string in `window.open`. The string follows the same format as the features string in `window.open`.
A name by itself is given a `true` boolean value. A name by itself is given a `true` boolean value.
@@ -287,7 +285,7 @@ e.g. the `http://` or `file://`.
* `url` string * `url` string
* `options` Object (optional) * `options` Object (optional)
* `headers` Record<string, string> (optional) - HTTP request headers. * `headers` Record\<string, string\> (optional) - HTTP request headers.
Initiates a download of the resource at `url` without navigating. Initiates a download of the resource at `url` without navigating.
@@ -580,7 +578,7 @@ Stops any `findInPage` request for the `webview` with the provided `action`.
* `from` number - Index of the first page to print (0-based). * `from` number - Index of the first page to print (0-based).
* `to` number - Index of the last page to print (inclusive) (0-based). * `to` number - Index of the last page to print (inclusive) (0-based).
* `duplexMode` string (optional) - Set the duplex mode of the printed web page. Can be `simplex`, `shortEdge`, or `longEdge`. * `duplexMode` string (optional) - Set the duplex mode of the printed web page. Can be `simplex`, `shortEdge`, or `longEdge`.
* `dpi` Record<string, number> (optional) * `dpi` Record\<string, number\> (optional)
* `horizontal` number (optional) - The horizontal dpi. * `horizontal` number (optional) - The horizontal dpi.
* `vertical` number (optional) - The vertical dpi. * `vertical` number (optional) - The vertical dpi.
* `header` string (optional) - string to be printed as page header. * `header` string (optional) - string to be printed as page header.
@@ -1048,6 +1046,15 @@ Returns:
Emitted when a link is clicked in DevTools or 'Open in new tab' is selected for a link in its context menu. Emitted when a link is clicked in DevTools or 'Open in new tab' is selected for a link in its context menu.
#### Event: 'devtools-search-query'
Returns:
* `event` Event
* `query` string - text to query for.
Emitted when 'Search' is selected for text in its context menu.
### Event: 'devtools-opened' ### Event: 'devtools-opened'
Emitted when DevTools is opened. Emitted when DevTools is opened.
@@ -1111,9 +1118,6 @@ Returns:
`input-text`, `input-time`, `input-url`, `input-week`, `output`, `reset-button`, `input-text`, `input-time`, `input-url`, `input-week`, `output`, `reset-button`,
`select-list`, `select-list`, `select-multiple`, `select-one`, `submit-button`, `select-list`, `select-list`, `select-multiple`, `select-one`, `submit-button`,
and `text-area`, and `text-area`,
* `inputFieldType` string _Deprecated_ - If the context menu was invoked on an
input field, the type of that field. Possible values include `none`,
`plainText`, `password`, `other`.
* `spellcheckEnabled` boolean - If the context is editable, whether or not spellchecking is enabled. * `spellcheckEnabled` boolean - If the context is editable, whether or not spellchecking is enabled.
* `menuSourceType` string - Input source that invoked the context menu. * `menuSourceType` string - Input source that invoked the context menu.
Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`, `longPress`, `longTap`, `touchHandle`, `stylus`, `adjustSelection`, or `adjustSelectionReset`. Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`, `longPress`, `longTap`, `touchHandle`, `stylus`, `adjustSelection`, or `adjustSelectionReset`.

View File

@@ -38,14 +38,24 @@ The autoresizing behavior is now standardized across all platforms.
If your app uses `BrowserView.setAutoResize` to do anything more complex than making a BrowserView fill the entire window, it's likely you already had custom logic in place to handle this difference in behavior on macOS. If your app uses `BrowserView.setAutoResize` to do anything more complex than making a BrowserView fill the entire window, it's likely you already had custom logic in place to handle this difference in behavior on macOS.
If so, that logic will no longer be needed in Electron 30 as autoresizing behavior is consistent. If so, that logic will no longer be needed in Electron 30 as autoresizing behavior is consistent.
### Removed: `params.inputFormType` property on `context-menu` on `WebContents`
The `inputFormType` property of the params object in the `context-menu`
event from `WebContents` has been removed. Use the new `formControlType`
property instead.
### Removed: `process.getIOCounters()`
Chromium has removed access to this information.
## Planned Breaking API Changes (29.0) ## Planned Breaking API Changes (29.0)
### Behavior Changed: `ipcRenderer` can no longer be sent over the `contextBridge` ### Behavior Changed: `ipcRenderer` can no longer be sent over the `contextBridge`
Attempting to send `ipcRenderer` as an object over the `contextBridge` will now result in Attempting to send the entire `ipcRenderer` module as an object over the `contextBridge` will now result in
an empty object on the receiving side of the bridge. This change was made to remove / mitigate an empty object on the receiving side of the bridge. This change was made to remove / mitigate
a security footgun, you should not directly expose ipcRenderer or it's methods over the bridge. a security footgun. You should not directly expose ipcRenderer or its methods over the bridge.
Instead provide a safe wrapper like below: Instead, provide a safe wrapper like below:
```js ```js
contextBridge.exposeInMainWorld('app', { contextBridge.exposeInMainWorld('app', {
@@ -655,8 +665,8 @@ document.getElementById('webview').addEventListener('new-window', () => {
### Deprecated: BrowserWindow `scroll-touch-*` events ### Deprecated: BrowserWindow `scroll-touch-*` events
The `scroll-touch-begin`, `scroll-touch-end` and `scroll-touch-edge` events on The `scroll-touch-begin`, `scroll-touch-end` and `scroll-touch-edge` events on
BrowserWindow are deprecated. Instead, use the newly available [`input-event` BrowserWindow are deprecated. Instead, use the newly available
event](api/web-contents.md#event-input-event) on WebContents. [`input-event` event](api/web-contents.md#event-input-event) on WebContents.
```js ```js
// Deprecated // Deprecated
@@ -681,8 +691,8 @@ win.webContents.on('input-event', (_, event) => {
### Behavior Changed: V8 Memory Cage enabled ### Behavior Changed: V8 Memory Cage enabled
The V8 memory cage has been enabled, which has implications for native modules The V8 memory cage has been enabled, which has implications for native modules
which wrap non-V8 memory with `ArrayBuffer` or `Buffer`. See the [blog post which wrap non-V8 memory with `ArrayBuffer` or `Buffer`. See the
about the V8 memory cage](https://www.electronjs.org/blog/v8-memory-cage) for [blog post about the V8 memory cage](https://www.electronjs.org/blog/v8-memory-cage) for
more details. more details.
### API Changed: `webContents.printToPDF()` ### API Changed: `webContents.printToPDF()`
@@ -1284,8 +1294,7 @@ const w = new BrowserWindow({
}) })
``` ```
We [recommend moving away from the remote We [recommend moving away from the remote module](https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31).
module](https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31).
### `protocol.unregisterProtocol` ### `protocol.unregisterProtocol`
@@ -1445,12 +1454,11 @@ You can see the original API proposal and reasoning [here](https://github.com/el
### Behavior Changed: Values sent over IPC are now serialized with Structured Clone Algorithm ### Behavior Changed: Values sent over IPC are now serialized with Structured Clone Algorithm
The algorithm used to serialize objects sent over IPC (through The algorithm used to serialize objects sent over IPC (through `ipcRenderer.send`,
`ipcRenderer.send`, `ipcRenderer.sendSync`, `WebContents.send` and related `ipcRenderer.sendSync`, `WebContents.send` and related methods) has been switched from a custom
methods) has been switched from a custom algorithm to V8's built-in [Structured algorithm to V8's built-in [Structured Clone Algorithm][SCA], the same algorithm used to serialize
Clone Algorithm][SCA], the same algorithm used to serialize messages for messages for `postMessage`. This brings about a 2x performance improvement for large messages,
`postMessage`. This brings about a 2x performance improvement for large but also brings some breaking changes in behavior.
messages, but also brings some breaking changes in behavior.
* Sending Functions, Promises, WeakMaps, WeakSets, or objects containing any * Sending Functions, Promises, WeakMaps, WeakSets, or objects containing any
such values, over IPC will now throw an exception, instead of silently such values, over IPC will now throw an exception, instead of silently
@@ -1676,7 +1684,7 @@ folder
└── file3 └── file3
``` ```
In Electron <=6, this would return a `FileList` with a `File` object for: In Electron &lt;=6, this would return a `FileList` with a `File` object for:
```console ```console
path/to/folder path/to/folder
@@ -1957,8 +1965,8 @@ app.getGPUInfo('basic')
When building native modules for windows, the `win_delay_load_hook` variable in When building native modules for windows, the `win_delay_load_hook` variable in
the module's `binding.gyp` must be true (which is the default). If this hook is the module's `binding.gyp` must be true (which is the default). If this hook is
not present, then the native module will fail to load on Windows, with an error not present, then the native module will fail to load on Windows, with an error
message like `Cannot find module`. See the [native module message like `Cannot find module`.
guide](./tutorial/using-native-node-modules.md) for more. See the [native module guide](./tutorial/using-native-node-modules.md) for more.
### Removed: IA32 Linux support ### Removed: IA32 Linux support

View File

@@ -110,22 +110,51 @@ $ export CHROMIUM_BUILDTOOLS_PATH=`pwd`/buildtools
On Windows: On Windows:
```sh ```sh
# cmd
$ cd src $ cd src
$ set CHROMIUM_BUILDTOOLS_PATH=%cd%\buildtools $ set CHROMIUM_BUILDTOOLS_PATH=%cd%\buildtools
# PowerShell
$ cd src
$ $env:CHROMIUM_BUILDTOOLS_PATH = "$(Get-Location)\buildtools"
``` ```
**To generate Testing build config of Electron:** **To generate Testing build config of Electron:**
On Linux & MacOS
```sh ```sh
$ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")" $ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")"
``` ```
On Windows:
```sh
# cmd
$ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")"
# PowerShell
gn gen out/Testing --args="import(\`"//electron/build/args/testing.gn\`")"
```
**To generate Release build config of Electron:** **To generate Release build config of Electron:**
On Linux & MacOS
```sh ```sh
$ gn gen out/Release --args="import(\"//electron/build/args/release.gn\")" $ gn gen out/Release --args="import(\"//electron/build/args/release.gn\")"
``` ```
On Windows:
```sh
# cmd
$ gn gen out/Release --args="import(\"//electron/build/args/release.gn\")"
# PowerShell
$ gn gen out/Release --args="import(\`"//electron/build/args/release.gn\`")"
```
**Note:** This will generate a `out/Testing` or `out/Release` build directory under `src/` with the testing or release build depending upon the configuration passed above. You can replace `Testing|Release` with another names, but it should be a subdirectory of `out`. **Note:** This will generate a `out/Testing` or `out/Release` build directory under `src/` with the testing or release build depending upon the configuration passed above. You can replace `Testing|Release` with another names, but it should be a subdirectory of `out`.
Also you shouldn't have to run `gn gen` again—if you want to change the build arguments, you can run `gn args out/Testing` to bring up an editor. To see the list of available build configuration options, run `gn args out/Testing --list`. Also you shouldn't have to run `gn gen` again—if you want to change the build arguments, you can run `gn args out/Testing` to bring up an editor. To see the list of available build configuration options, run `gn args out/Testing --list`.

View File

@@ -24,8 +24,8 @@ You can run `npm run lint` to show any style issues detected by `cpplint` and
## C++ and Python ## C++ and Python
For C++ and Python, we follow Chromium's [Coding For C++ and Python, we follow Chromium's
Style](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/styleguide/styleguide.md). [Coding Style](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/styleguide/styleguide.md).
There is also a script `script/cpplint.py` to check whether all files conform. There is also a script `script/cpplint.py` to check whether all files conform.
The Python version we are using now is Python 3.9. The Python version we are using now is Python 3.9.

View File

@@ -15,7 +15,7 @@ calls, and other compiler optimizations. The only workaround is to build an
unoptimized local build. unoptimized local build.
The official symbol server URL for Electron is The official symbol server URL for Electron is
<https://symbols.electronjs.org>. [https://symbols.electronjs.org](https://symbols.electronjs.org).
You cannot visit this URL directly, you must add it to the symbol path of your You cannot visit this URL directly, you must add it to the symbol path of your
debugging tool. In the examples below, a local cache directory is used to avoid debugging tool. In the examples below, a local cache directory is used to avoid
repeatedly fetching the PDB from the server. Replace `c:\code\symbols` with an repeatedly fetching the PDB from the server. Replace `c:\code\symbols` with an

View File

@@ -3,8 +3,8 @@
The source code of Electron is separated into a few parts, mostly The source code of Electron is separated into a few parts, mostly
following Chromium on the separation conventions. following Chromium on the separation conventions.
You may need to become familiar with [Chromium's multi-process You may need to become familiar with
architecture](https://dev.chromium.org/developers/design-documents/multi-process-architecture) [Chromium's multi-process architecture](https://dev.chromium.org/developers/design-documents/multi-process-architecture)
to understand the source code better. to understand the source code better.
## Structure of Source Code ## Structure of Source Code

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 4.2 MiB

View File

@@ -26,8 +26,8 @@ of the most powerful utilities in any Electron Developer's tool belt.
## Main Process ## Main Process
Debugging the main process is a bit trickier, since you cannot open Debugging the main process is a bit trickier, since you cannot open
developer tools for them. The Chromium Developer Tools can [be used developer tools for them. The Chromium Developer Tools can
to debug Electron's main process][node-inspect] thanks to a closer collaboration [be used to debug Electron's main process][node-inspect] thanks to a closer collaboration
between Google / Chrome and Node.js, but you might encounter oddities like between Google / Chrome and Node.js, but you might encounter oddities like
`require` not being present in the console. `require` not being present in the console.

View File

@@ -24,8 +24,8 @@ If you prefer the manual approach, there are 2 ways to distribute your applicati
### With prebuilt binaries ### With prebuilt binaries
To distribute your app manually, you need to download Electron's [prebuilt To distribute your app manually, you need to download Electron's
binaries](https://github.com/electron/electron/releases). Next, the folder [prebuilt binaries](https://github.com/electron/electron/releases). Next, the folder
containing your app should be named `app` and placed in Electron's resources containing your app should be named `app` and placed in Electron's resources
directory as shown in the following examples. directory as shown in the following examples.

View File

@@ -6,10 +6,9 @@ hide_title: false
--- ---
After creating an [application distribution](application-distribution.md), the After creating an [application distribution](application-distribution.md), the
app's source code are usually bundled into an [ASAR app's source code are usually bundled into an [ASAR archive](https://github.com/electron/asar),
archive](https://github.com/electron/asar), which is a simple extensive archive which is a simple extensive archive format designed for Electron apps. By bundling the app
format designed for Electron apps. By bundling the app we can mitigate issues we can mitigate issues around long path names on Windows, speed up `require` and conceal your source
around long path names on Windows, speed up `require` and conceal your source
code from cursory inspection. code from cursory inspection.
The bundled app runs in a virtual file system and most APIs would just work The bundled app runs in a virtual file system and most APIs would just work

View File

@@ -5,40 +5,50 @@ slug: asar-integrity
hide_title: false hide_title: false
--- ---
## Platform Support ASAR integrity is an experimental feature that validates the contents of your app's
[ASAR archives](./asar-archives.md) at runtime.
Currently ASAR integrity checking is only supported on macOS. ## Version support
## Requirements Currently, ASAR integrity checking is supported on:
### Electron Forge / Electron Packager * macOS as of `electron>=16.0.0`
* Windows as of `electron>=30.0.0`
If you are using `>= @electron/packager`, `>= electron-packager@15.4.0` or `>= @electron-forge/core@6.0.0-beta.61` then all these requirements are met for you automatically and you can skip to [Toggling the Fuse](#toggling-the-fuse). In order to enable ASAR integrity checking, you also need to ensure that your `app.asar` file
was generated by a version of the `@electron/asar` npm package that supports ASAR integrity.
### Other build systems Support was introduced in `asar@3.1.0`. Note that this package has since migrated over to `@electron/asar`.
All versions of `@electron/asar` support ASAR integrity.
In order to enable ASAR integrity checking you need to ensure that your `app.asar` file was generated by a version of the `asar` npm package that supports asar integrity. Support was introduced in version `3.1.0`. ## How it works
Your must then populate a valid `ElectronAsarIntegrity` dictionary block in your packaged apps `Info.plist`. An example is included below. Each ASAR archive contains a JSON string header. The header format includes an `integrity` object
that contain a hex encoded hash of the entire archive as well as an array of hex encoded hashes for each
block of `blockSize` bytes.
```plist ```json
<key>ElectronAsarIntegrity</key> {
<dict> "algorithm": "SHA256",
<key>Resources/app.asar</key> "hash": "...",
<dict> "blockSize": 1024,
<key>algorithm</key> "blocks": ["...", "..."]
<string>SHA256</string> }
<key>hash</key>
<string>9d1f61ea03c4bb62b4416387a521101b81151da0cfbe18c9f8c8b818c5cebfac</string>
</dict>
</dict>
``` ```
Valid `algorithm` values are currently `SHA256` only. The `hash` is a hash of the ASAR header using the given algorithm. The `asar` package exposes a `getRawHeader` method whose result can then be hashed to generate this value. Separately, you need to define a hex encoded hash of the entire ASAR header when packaging your Electron app.
## Toggling the Fuse When ASAR integrity is enabled, your Electron app will verify the header hash of the ASAR archive on runtime.
If no hash is present or if there is a mismatch in the hashes, the app will forcefully terminate.
ASAR integrity checking is currently disabled by default and can be enabled by toggling a fuse. See [Electron Fuses](fuses.md) for more information on what Electron Fuses are and how they work. When enabling this fuse you typically also want to enable the `onlyLoadAppFromAsar` fuse otherwise the validity checking can be bypassed via the Electron app code search path. ## Enabling ASAR integrity in the binary
ASAR integrity checking is currently disabled by default in Electron and can
be enabled on build time by toggling the `EnableEmbeddedAsarIntegrityValidation`
[Electron fuse](fuses.md).
When enabling this fuse, you typically also want to enable the `onlyLoadAppFromAsar` fuse.
Otherwise, the validity checking can be bypassed via the Electron app code search path.
```js @ts-nocheck ```js @ts-nocheck
const { flipFuses, FuseVersion, FuseV1Options } = require('@electron/fuses') const { flipFuses, FuseVersion, FuseV1Options } = require('@electron/fuses')
@@ -53,3 +63,71 @@ flipFuses(
} }
) )
``` ```
:::tip Fuses in Electron Forge
With Electron Forge, you can configure your app's fuses with
[@electron-forge/plugin-fuses](https://www.electronforge.io/config/plugins/fuses)
in your Forge configuration file.
:::
## Providing the header hash
ASAR integrity validates the contents of the ASAR archive against the header hash that you provide
on package time. The process of providing this packaged hash is different for macOS and Windows.
### Using Electron tooling
Electron Forge and Electron Packager do this setup automatically for you with no additional
configuration. The minimum required versions for ASAR integrity are:
* `@electron/packager@18.3.1`
* `@electron/forge@7.4.0`
### Using other build systems
#### macOS
When packaging for macOS, you must populate a valid `ElectronAsarIntegrity` dictionary block
in your packaged app's `Info.plist`. An example is included below.
```xml title='Info.plist'
<key>ElectronAsarIntegrity</key>
<dict>
<key>Resources/app.asar</key>
<dict>
<key>algorithm</key>
<string>SHA256</string>
<key>hash</key>
<string>9d1f61ea03c4bb62b4416387a521101b81151da0cfbe18c9f8c8b818c5cebfac</string>
</dict>
</dict>
```
Valid `algorithm` values are currently `SHA256` only. The `hash` is a hash of the ASAR header using the given algorithm.
The `@electron/asar` package exposes a `getRawHeader` method whose result can then be hashed to generate this value
(e.g. using the [`node:crypto`](https://nodejs.org/api/crypto.html) module).
### Windows
When packaging for Windows, you must populate a valid [resource](https://learn.microsoft.com/en-us/windows/win32/menurc/resources)
entry of type `Integrity` and name `ElectronAsar`. The value of this resource should be a JSON encoded dictionary
in the form included below:
```json
[
{
"file": "resources\\app.asar",
"alg": "sha256",
"value": "9d1f61ea03c4bb62b4416387a521101b81151da0cfbe18c9f8c8b818c5cebfac"
}
]
```
::: info
For an implementation example, see [`src/resedit.ts`](https://github.com/electron/packager/blob/main/src/resedit.ts)
in the Electron Packager code.
:::

View File

@@ -5,34 +5,25 @@ slug: code-signing
hide_title: false hide_title: false
--- ---
Code signing is a security technology that you use to certify that an app was Code signing is a security technology to certify that an app was created by you.
created by you. You should sign your application so it does not trigger any You should sign your application so it does not trigger any operating system
operating system security checks. security warnings.
On macOS, the system can detect any change to the app, whether the change is ![macOS Sonoma Gatekeeper warning: The app is damaged](../images/gatekeeper.png)
introduced accidentally or by malicious code.
On Windows, the system assigns a trust level to your code signing certificate Both Windows and macOS prevent users from running unsigned applications. It is
which if you don't have, or if your trust level is low, will cause security possible to distribute applications without codesigning them - but in order to
dialogs to appear when users start using your application. Trust level builds run them, users need to go through multiple advanced and manual steps to run
over time so it's better to start code signing as early as possible. them.
While it is possible to distribute unsigned apps, it is not recommended. Both
Windows and macOS will, by default, prevent either the download or the execution
of unsigned applications. Starting with macOS Catalina (version 10.15), users
have to go through multiple manual steps to open unsigned applications.
![macOS Catalina Gatekeeper warning: The app cannot be opened because the developer cannot be verified](../images/gatekeeper.png)
As you can see, users get two options: Move the app straight to the trash or
cancel running it. You don't want your users to see that dialog.
If you are building an Electron app that you intend to package and distribute, If you are building an Electron app that you intend to package and distribute,
it should be code signed. it should be code signed. The Electron ecosystem tooling makes codesigning your
apps straightforward - this documentation explains how sign your apps on both
Windows and macOS.
## Signing & notarizing macOS builds ## Signing & notarizing macOS builds
Properly preparing macOS applications for release requires two steps. First, the Preparing macOS applications for release requires two steps: First, the
app needs to be code signed. Then, the app needs to be uploaded to Apple for a app needs to be code signed. Then, the app needs to be uploaded to Apple for a
process called **notarization**, where automated systems will further verify that process called **notarization**, where automated systems will further verify that
your app isn't doing anything to endanger its users. your app isn't doing anything to endanger its users.
@@ -64,8 +55,10 @@ If you're not using an integrated build pipeline like Forge, you
are likely using [`@electron/packager`][], which includes [`@electron/osx-sign`][] and are likely using [`@electron/packager`][], which includes [`@electron/osx-sign`][] and
[`@electron/notarize`][]. [`@electron/notarize`][].
If you're using Packager's API, you can pass [in configuration that both signs If you're using Packager's API, you can pass
and notarizes your application](https://electron.github.io/packager/main/interfaces/electronpackager.options.html). [in configuration that both signs and notarizes your application](https://electron.github.io/packager/main/modules.html).
If the example below does not meet your needs, please see [`@electron/osx-sign`][] and
[`@electron/notarize`][] for the many possible configuration options.
```js @ts-nocheck ```js @ts-nocheck
const packager = require('@electron/packager') const packager = require('@electron/packager')
@@ -86,35 +79,81 @@ See the [Mac App Store Guide][].
## Signing Windows builds ## Signing Windows builds
Before signing Windows builds, you must do the following: Before you can code sign your application, you need to acquire a code signing
certificate. Unlike Apple, Microsoft allows developers to purchase those
certificates on the open market. They are usually sold by the same companies
also offering HTTPS certificates. Prices vary, so it may be worth your time to
shop around. Popular resellers include:
1. Get a Windows Authenticode code signing certificate (requires an annual fee) - [Certum EV code signing certificate](https://shop.certum.eu/data-safety/code-signing-certificates/certum-ev-code-sigining.html)
2. Install Visual Studio to get the signing utility (the free [Community - [DigiCert EV code signing certificate](https://www.digicert.com/signing/code-signing-certificates)
Edition](https://visualstudio.microsoft.com/vs/community/) is enough) - [Entrust EV code signing certificate](https://www.entrustdatacard.com/products/digital-signing-certificates/code-signing-certificates)
- [GlobalSign EV code signing certificate](https://www.globalsign.com/en/code-signing-certificate/ev-code-signing-certificates)
- [IdenTrust EV code signing certificate](https://www.identrust.com/digital-certificates/trustid-ev-code-signing)
- [Sectigo (formerly Comodo) EV code signing certificate](https://sectigo.com/ssl-certificates-tls/code-signing)
- [SSL.com EV code signing certificate](https://www.ssl.com/certificates/ev-code-signing/)
You can get a code signing certificate from a lot of resellers. Prices vary, so It is important to call out that since June 2023, Microsoft requires software to
it may be worth your time to shop around. Popular resellers include: be signed with an "extended validation" certificate, also called an "EV code signing
certificate". In the past, developers could sign software with a simpler and cheaper
certificate called "authenticode code signing certificate" or "software-based OV certificate".
These simpler certificates no longer provide benefits: Windows will treat your app as
completely unsigned and display the equivalent warning dialogs.
- [digicert](https://www.digicert.com/dc/code-signing/microsoft-authenticode.htm) The new EV certificates are required to be stored on a hardware storage module
- [Sectigo](https://sectigo.com/ssl-certificates-tls/code-signing) compliant with FIPS 140 Level 2, Common Criteria EAL 4+ or equivalent. In other words,
- Amongst others, please shop around to find one that suits your needs! 😄 the certificate cannot be simply downloaded onto a CI infrastructure. In practice,
those storage modules look like fancy USB thumb drives.
:::caution Keep your certificate password private Many certificate providers now offer "cloud-based signing" - the entire signing hardware
Your certificate password should be a **secret**. Do not share it publicly or is in their data center and you can use it to remotely sign code. This approach is
commit it to your source code. popular with Electron maintainers since it makes signing your applications in CI (like
::: GitHub Actions, CircleCI, etc) relatively easy.
At the time of writing, Electron's own apps use [DigiCert KeyLocker](https://docs.digicert.com/en/digicert-keylocker.html), but any provider that provides a command line tool for
signing files will be compatible with Electron's tooling.
All tools in the Electron ecosystem use [`@electron/windows-sign`][] and typically
expose configuration options through a `windowsSign` property. You can either use it
to sign files directly - or use the same `windowsSign` configuration across Electron
Forge, [`@electron/packager`][], [`electron-winstaller`][], and [`electron-wix-msi`][].
### Using Electron Forge ### Using Electron Forge
Electron Forge is the recommended way to sign your `Squirrel.Windows` and `WiX MSI` installers. Detailed instructions on how to configure your application can be found in the [Electron Forge Code Signing Tutorial](https://www.electronforge.io/guides/code-signing/code-signing-macos). Electron Forge is the recommended way to sign your app as well as your `Squirrel.Windows`
and `WiX MSI` installers. Detailed instructions on how to configure your application can
be found in the [Electron Forge Code Signing Tutorial](https://www.electronforge.io/guides/code-signing/code-signing-windows).
### Using Electron Packager
If you're not using an integrated build pipeline like Forge, you
are likely using [`@electron/packager`][], which includes [`@electron/windows-sign`][].
If you're using Packager's API, you can pass
[in configuration that signs your application](https://electron.github.io/packager/main/modules.html).
If the example below does not meet your needs, please see [`@electron/windows-sign`][]
for the many possible configuration options.
```js @ts-nocheck
const packager = require('@electron/packager')
packager({
dir: '/path/to/my/app',
windowsSign: {
signWithParams: '--my=custom --parameters',
// If signtool.exe does not work for you, customize!
signToolPath: 'C:\\Path\\To\\my-custom-tool.exe'
}
})
```
### Using electron-winstaller (Squirrel.Windows) ### Using electron-winstaller (Squirrel.Windows)
[`electron-winstaller`][] is a package that can generate Squirrel.Windows installers for your [`electron-winstaller`][] is a package that can generate Squirrel.Windows installers for your
Electron app. This is the tool used under the hood by Electron Forge's Electron app. This is the tool used under the hood by Electron Forge's
[Squirrel.Windows Maker][maker-squirrel]. If you're not using Electron Forge and want to use [Squirrel.Windows Maker][maker-squirrel]. Just like `@electron/packager`, it uses
`electron-winstaller` directly, use the `certificateFile` and `certificatePassword` configuration [`@electron/windows-sign`][] under the hood and supports the same `windowsSign`
options when creating your installer. options.
```js {10-11} @ts-nocheck ```js {10-11} @ts-nocheck
const electronInstaller = require('electron-winstaller') const electronInstaller = require('electron-winstaller')
@@ -126,8 +165,11 @@ try {
outputDirectory: '/tmp/build/installer64', outputDirectory: '/tmp/build/installer64',
authors: 'My App Inc.', authors: 'My App Inc.',
exe: 'myapp.exe', exe: 'myapp.exe',
certificateFile: './cert.pfx', windowsSign: {
certificatePassword: 'this-is-a-secret' signWithParams: '--my=custom --parameters',
// If signtool.exe does not work for you, customize!
signToolPath: 'C:\\Path\\To\\my-custom-tool.exe'
}
}) })
console.log('It worked!') console.log('It worked!')
} catch (e) { } catch (e) {
@@ -141,10 +183,8 @@ For full configuration options, check out the [`electron-winstaller`][] reposito
[`electron-wix-msi`][] is a package that can generate MSI installers for your [`electron-wix-msi`][] is a package that can generate MSI installers for your
Electron app. This is the tool used under the hood by Electron Forge's [MSI Maker][maker-msi]. Electron app. This is the tool used under the hood by Electron Forge's [MSI Maker][maker-msi].
Just like `@electron/packager`, it uses [`@electron/windows-sign`][] under the hood
If you're not using Electron Forge and want to use `electron-wix-msi` directly, use the and supports the same `windowsSign` options.
`certificateFile` and `certificatePassword` configuration options
or pass in parameters directly to [SignTool.exe][] with the `signWithParams` option.
```js {12-13} @ts-nocheck ```js {12-13} @ts-nocheck
import { MSICreator } from 'electron-wix-msi' import { MSICreator } from 'electron-wix-msi'
@@ -158,8 +198,11 @@ const msiCreator = new MSICreator({
manufacturer: 'Kitten Technologies', manufacturer: 'Kitten Technologies',
version: '1.1.2', version: '1.1.2',
outputDirectory: '/path/to/output/folder', outputDirectory: '/path/to/output/folder',
certificateFile: './cert.pfx', windowsSign: {
certificatePassword: 'this-is-a-secret' signWithParams: '--my=custom --parameters',
// If signtool.exe does not work for you, customize!
signToolPath: 'C:\\Path\\To\\my-custom-tool.exe'
}
}) })
// Step 2: Create a .wxs template file // Step 2: Create a .wxs template file
@@ -192,6 +235,7 @@ See the [Windows Store Guide][].
[`@electron/osx-sign`]: https://github.com/electron/osx-sign [`@electron/osx-sign`]: https://github.com/electron/osx-sign
[`@electron/packager`]: https://github.com/electron/packager [`@electron/packager`]: https://github.com/electron/packager
[`@electron/notarize`]: https://github.com/electron/notarize [`@electron/notarize`]: https://github.com/electron/notarize
[`@electron/windows-sign`]: https://github.com/electron/windows-sign
[`electron-winstaller`]: https://github.com/electron/windows-installer [`electron-winstaller`]: https://github.com/electron/windows-installer
[`electron-wix-msi`]: https://github.com/electron-userland/electron-wix-msi [`electron-wix-msi`]: https://github.com/electron-userland/electron-wix-msi
[xcode]: https://developer.apple.com/xcode [xcode]: https://developer.apple.com/xcode
@@ -200,4 +244,3 @@ See the [Windows Store Guide][].
[windows store guide]: ./windows-store-guide.md [windows store guide]: ./windows-store-guide.md
[maker-squirrel]: https://www.electronforge.io/config/makers/squirrel.windows [maker-squirrel]: https://www.electronforge.io/config/makers/squirrel.windows
[maker-msi]: https://www.electronforge.io/config/makers/wix-msi [maker-msi]: https://www.electronforge.io/config/makers/wix-msi
[signtool.exe]: https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe

View File

@@ -9,11 +9,12 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported | | Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- | | ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
| 30.0.0 | 2024-Feb-22 | 2024-Mar-20 | 2024-Apr-16 | 2024-Oct-15 | M124 | v20.9+ | ✅ | | 31.0.0 | 2024-Apr-18 | 2024-May-15 | 2024-Jun-11 | 2025-Jan-07 | M126 | TBD | ✅ |
| 30.0.0 | 2024-Feb-22 | 2024-Mar-20 | 2024-Apr-16 | 2024-Oct-15 | M124 | v20.11 | ✅ |
| 29.0.0 | 2023-Dec-07 | 2024-Jan-24 | 2024-Feb-20 | 2024-Aug-20 | M122 | v20.9 | ✅ | | 29.0.0 | 2023-Dec-07 | 2024-Jan-24 | 2024-Feb-20 | 2024-Aug-20 | M122 | v20.9 | ✅ |
| 28.0.0 | 2023-Oct-11 | 2023-Nov-06 | 2023-Dec-05 | 2024-Jun-11 | M120 | v18.18 | ✅ | | 28.0.0 | 2023-Oct-11 | 2023-Nov-06 | 2023-Dec-05 | 2024-Jun-11 | M120 | v18.18 | ✅ |
| 27.0.0 | 2023-Aug-17 | 2023-Sep-13 | 2023-Oct-10 | 2024-Apr-16 | M118 | v18.17 | | | 27.0.0 | 2023-Aug-17 | 2023-Sep-13 | 2023-Oct-10 | 2024-Apr-16 | M118 | v18.17 | 🚫 |
| 26.0.0 | 2023-Jun-01 | 2023-Jun-27 | 2023-Aug-15 | 2024-Feb-20 | M116 | v18.16 | | | 26.0.0 | 2023-Jun-01 | 2023-Jun-27 | 2023-Aug-15 | 2024-Feb-20 | M116 | v18.16 | 🚫 |
| 25.0.0 | 2023-Apr-10 | 2023-May-02 | 2023-May-30 | 2023-Dec-05 | M114 | v18.15 | 🚫 | | 25.0.0 | 2023-Apr-10 | 2023-May-02 | 2023-May-30 | 2023-Dec-05 | M114 | v18.15 | 🚫 |
| 24.0.0 | 2023-Feb-09 | 2023-Mar-07 | 2023-Apr-04 | 2023-Oct-10 | M112 | v18.14 | 🚫 | | 24.0.0 | 2023-Feb-09 | 2023-Mar-07 | 2023-Apr-04 | 2023-Oct-10 | M112 | v18.14 | 🚫 |
| 23.0.0 | 2022-Dec-01 | 2023-Jan-10 | 2023-Feb-07 | 2023-Aug-15 | M110 | v18.12 | 🚫 | | 23.0.0 | 2022-Dec-01 | 2023-Jan-10 | 2023-Feb-07 | 2023-Aug-15 | M110 | v18.12 | 🚫 |

View File

@@ -78,7 +78,8 @@ JavaScript transpilers (e.g. Babel, TypeScript) have historically supported ES M
syntax before Node.js supported ESM imports by turning these calls to CommonJS syntax before Node.js supported ESM imports by turning these calls to CommonJS
`require` calls. `require` calls.
<details><summary>Example: @babel/plugin-transform-modules-commonjs</summary> <details>
<summary>Example: @babel/plugin-transform-modules-commonjs</summary>
The `@babel/plugin-transform-modules-commonjs` plugin will transform The `@babel/plugin-transform-modules-commonjs` plugin will transform
ESM imports down to `require` calls. The exact syntax will depend on the ESM imports down to `require` calls. The exact syntax will depend on the

View File

@@ -29,7 +29,7 @@ The cookieEncryption fuse toggles whether the cookie store on disk is encrypted
**Default:** Enabled **Default:** Enabled
**@electron/fuses:** `FuseV1Options.EnableNodeOptionsEnvironmentVariable` **@electron/fuses:** `FuseV1Options.EnableNodeOptionsEnvironmentVariable`
The nodeOptions fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions) environment variable is respected or not. This environment variable can be used to pass all kinds of custom options to the Node.js runtime and isn't typically used by apps in production. Most apps can safely disable this fuse. The nodeOptions fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions) and [`NODE_EXTRA_CA_CERTS`](https://github.com/nodejs/node/blob/main/doc/api/cli.md#node_extra_ca_certsfile) environment variables are respected. The `NODE_OPTIONS` environment variable can be used to pass all kinds of custom options to the Node.js runtime and isn't typically used by apps in production. Most apps can safely disable this fuse.
### `nodeCliInspect` ### `nodeCliInspect`

View File

@@ -130,9 +130,8 @@ this for you.
#### [Electron Forge](https://electronforge.io) #### [Electron Forge](https://electronforge.io)
If you're using Electron Forge, adjust `packagerConfig` for macOS support, and the configuration for If you're using Electron Forge, adjust `packagerConfig` for macOS support, and the configuration for
the appropriate Linux makers for Linux support, in your [Forge the appropriate Linux makers for Linux support, in your [Forge configuration](https://www.electronforge.io/configuration)
configuration](https://www.electronforge.io/configuration) _(please note the following example only _(please note the following example only shows the bare minimum needed to add the configuration changes)_:
shows the bare minimum needed to add the configuration changes)_:
```json ```json
{ {

View File

@@ -158,9 +158,8 @@ This module allows you to detect ahead of time whether or not the notification w
### Linux ### Linux
Notifications are sent using `libnotify`, which can show notifications on any Notifications are sent using `libnotify`, which can show notifications on any
desktop environment that follows [Desktop Notifications desktop environment that follows [Desktop Notifications Specification][notification-spec],
Specification][notification-spec], including Cinnamon, Enlightenment, Unity, including Cinnamon, Enlightenment, Unity, GNOME, and KDE.
GNOME, and KDE.
[notification-spec]: https://developer-old.gnome.org/notification-spec/ [notification-spec]: https://developer-old.gnome.org/notification-spec/
[app-user-model-id]: https://learn.microsoft.com/en-us/windows/win32/shell/appids [app-user-model-id]: https://learn.microsoft.com/en-us/windows/win32/shell/appids

View File

@@ -121,7 +121,7 @@ need to install Node.js themselves as a prerequisite to running your app.
To check which version of Node.js is running in your app, you can access the global To check which version of Node.js is running in your app, you can access the global
[`process.versions`][] variable in the main process or preload script. You can also reference [`process.versions`][] variable in the main process or preload script. You can also reference
<https://releases.electronjs.org/releases.json>. [https://releases.electronjs.org/releases.json](https://releases.electronjs.org/releases.json).
::: :::

View File

@@ -222,7 +222,8 @@ with CommonJS module syntax:
- [app][app], which controls your application's event lifecycle. - [app][app], which controls your application's event lifecycle.
- [BrowserWindow][browser-window], which creates and manages app windows. - [BrowserWindow][browser-window], which creates and manages app windows.
<details><summary>Module capitalization conventions</summary> <details>
<summary>Module capitalization conventions</summary>
You might have noticed the capitalization difference between the **a**pp You might have noticed the capitalization difference between the **a**pp
and **B**rowser**W**indow modules. Electron follows typical JavaScript conventions here, and **B**rowser**W**indow modules. Electron follows typical JavaScript conventions here,
@@ -231,10 +232,11 @@ Notification) whereas camelCase modules are not instantiable (e.g. app, ipcRende
</details> </details>
<details><summary>Typed import aliases</summary> <details>
<summary>Typed import aliases</summary>
For better type checking when writing TypeScript code, you can choose to import For better type checking when writing TypeScript code, you can choose to import
main process modules from <code>electron/main</code>. main process modules from `electron/main`.
```js ```js
const { app, BrowserWindow } = require('electron/main') const { app, BrowserWindow } = require('electron/main')

View File

@@ -152,7 +152,7 @@ command that can handle the version bumping and tagging for you.
#### Bonus: Publishing in GitHub Actions #### Bonus: Publishing in GitHub Actions
Publishing locally can be painful, especially because you can only create distributables Publishing locally can be painful, especially because you can only create distributables
for your host operating system (i.e. you can't publish a Window `.exe` file from macOS). for your host operating system (i.e. you can't publish a Windows `.exe` file from macOS).
A solution for this would be to publish your app via automation workflows A solution for this would be to publish your app via automation workflows
such as [GitHub Actions][], which can run tasks in the such as [GitHub Actions][], which can run tasks in the

View File

@@ -4,7 +4,7 @@
If you want to embed (third-party) web content in an Electron `BrowserWindow`, If you want to embed (third-party) web content in an Electron `BrowserWindow`,
there are three options available to you: `<iframe>` tags, `<webview>` tags, there are three options available to you: `<iframe>` tags, `<webview>` tags,
and `BrowserViews`. Each one offers slightly different functionality and is and `WebContentsView`. Each one offers slightly different functionality and is
useful in different situations. To help you choose between these, this guide useful in different situations. To help you choose between these, this guide
explains the differences and capabilities of each option. explains the differences and capabilities of each option.

View File

@@ -77,6 +77,7 @@ template("electron_extra_paks") {
"//content:content_resources", "//content:content_resources",
"//content/browser/resources/gpu:resources", "//content/browser/resources/gpu:resources",
"//content/browser/resources/media:resources", "//content/browser/resources/media:resources",
"//content/browser/resources/process:resources",
"//content/browser/tracing:resources", "//content/browser/tracing:resources",
"//content/browser/webrtc/resources", "//content/browser/webrtc/resources",
"//electron:resources", "//electron:resources",
@@ -96,6 +97,7 @@ template("electron_extra_paks") {
# New paks should be added here by default. # New paks should be added here by default.
sources += [ sources += [
"$root_gen_dir/content/browser/devtools/devtools_resources.pak", "$root_gen_dir/content/browser/devtools/devtools_resources.pak",
"$root_gen_dir/content/process_resources.pak",
"$root_gen_dir/ui/resources/webui_resources.pak", "$root_gen_dir/ui/resources/webui_resources.pak",
] ]
deps += [ "//content/browser/devtools:devtools_resources" ] deps += [ "//content/browser/devtools:devtools_resources" ]

View File

@@ -34,6 +34,7 @@ auto_filenames = {
"docs/api/message-port-main.md", "docs/api/message-port-main.md",
"docs/api/native-image.md", "docs/api/native-image.md",
"docs/api/native-theme.md", "docs/api/native-theme.md",
"docs/api/navigation-history.md",
"docs/api/net-log.md", "docs/api/net-log.md",
"docs/api/net.md", "docs/api/net.md",
"docs/api/notification.md", "docs/api/notification.md",
@@ -88,10 +89,10 @@ auto_filenames = {
"docs/api/structures/extension.md", "docs/api/structures/extension.md",
"docs/api/structures/file-filter.md", "docs/api/structures/file-filter.md",
"docs/api/structures/file-path-with-headers.md", "docs/api/structures/file-path-with-headers.md",
"docs/api/structures/filesystem-permission-request.md",
"docs/api/structures/gpu-feature-status.md", "docs/api/structures/gpu-feature-status.md",
"docs/api/structures/hid-device.md", "docs/api/structures/hid-device.md",
"docs/api/structures/input-event.md", "docs/api/structures/input-event.md",
"docs/api/structures/io-counters.md",
"docs/api/structures/ipc-main-event.md", "docs/api/structures/ipc-main-event.md",
"docs/api/structures/ipc-main-invoke-event.md", "docs/api/structures/ipc-main-invoke-event.md",
"docs/api/structures/ipc-renderer-event.md", "docs/api/structures/ipc-renderer-event.md",
@@ -99,6 +100,7 @@ auto_filenames = {
"docs/api/structures/jump-list-item.md", "docs/api/structures/jump-list-item.md",
"docs/api/structures/keyboard-event.md", "docs/api/structures/keyboard-event.md",
"docs/api/structures/keyboard-input-event.md", "docs/api/structures/keyboard-input-event.md",
"docs/api/structures/media-access-permission-request.md",
"docs/api/structures/memory-info.md", "docs/api/structures/memory-info.md",
"docs/api/structures/memory-usage-details.md", "docs/api/structures/memory-usage-details.md",
"docs/api/structures/mime-typed-buffer.md", "docs/api/structures/mime-typed-buffer.md",
@@ -106,7 +108,9 @@ auto_filenames = {
"docs/api/structures/mouse-wheel-input-event.md", "docs/api/structures/mouse-wheel-input-event.md",
"docs/api/structures/notification-action.md", "docs/api/structures/notification-action.md",
"docs/api/structures/notification-response.md", "docs/api/structures/notification-response.md",
"docs/api/structures/open-external-permission-request.md",
"docs/api/structures/payment-discount.md", "docs/api/structures/payment-discount.md",
"docs/api/structures/permission-request.md",
"docs/api/structures/point.md", "docs/api/structures/point.md",
"docs/api/structures/post-body.md", "docs/api/structures/post-body.md",
"docs/api/structures/printer-info.md", "docs/api/structures/printer-info.md",
@@ -118,6 +122,7 @@ auto_filenames = {
"docs/api/structures/protocol-request.md", "docs/api/structures/protocol-request.md",
"docs/api/structures/protocol-response-upload-data.md", "docs/api/structures/protocol-response-upload-data.md",
"docs/api/structures/protocol-response.md", "docs/api/structures/protocol-response.md",
"docs/api/structures/proxy-config.md",
"docs/api/structures/rectangle.md", "docs/api/structures/rectangle.md",
"docs/api/structures/referrer.md", "docs/api/structures/referrer.md",
"docs/api/structures/render-process-gone-details.md", "docs/api/structures/render-process-gone-details.md",

View File

@@ -34,7 +34,7 @@ filenames = {
"shell/browser/notifications/linux/notification_presenter_linux.h", "shell/browser/notifications/linux/notification_presenter_linux.h",
"shell/browser/relauncher_linux.cc", "shell/browser/relauncher_linux.cc",
"shell/browser/ui/electron_desktop_window_tree_host_linux.cc", "shell/browser/ui/electron_desktop_window_tree_host_linux.cc",
"shell/browser/ui/file_dialog_gtk.cc", "shell/browser/ui/file_dialog_linux.cc",
"shell/browser/ui/gtk/menu_gtk.cc", "shell/browser/ui/gtk/menu_gtk.cc",
"shell/browser/ui/gtk/menu_gtk.h", "shell/browser/ui/gtk/menu_gtk.h",
"shell/browser/ui/gtk/menu_util.cc", "shell/browser/ui/gtk/menu_util.cc",
@@ -383,9 +383,14 @@ filenames = {
"shell/browser/extended_web_contents_observer.h", "shell/browser/extended_web_contents_observer.h",
"shell/browser/feature_list.cc", "shell/browser/feature_list.cc",
"shell/browser/feature_list.h", "shell/browser/feature_list.h",
"shell/browser/feature_list_mac.mm",
"shell/browser/file_select_helper.cc", "shell/browser/file_select_helper.cc",
"shell/browser/file_select_helper.h", "shell/browser/file_select_helper.h",
"shell/browser/file_select_helper_mac.mm", "shell/browser/file_select_helper_mac.mm",
"shell/browser/file_system_access/file_system_access_permission_context.cc",
"shell/browser/file_system_access/file_system_access_permission_context.h",
"shell/browser/file_system_access/file_system_access_permission_context_factory.cc",
"shell/browser/file_system_access/file_system_access_permission_context_factory.h",
"shell/browser/font_defaults.cc", "shell/browser/font_defaults.cc",
"shell/browser/font_defaults.h", "shell/browser/font_defaults.h",
"shell/browser/hid/electron_hid_delegate.cc", "shell/browser/hid/electron_hid_delegate.cc",
@@ -589,6 +594,8 @@ filenames = {
"shell/common/gin_converters/hid_device_info_converter.h", "shell/common/gin_converters/hid_device_info_converter.h",
"shell/common/gin_converters/image_converter.cc", "shell/common/gin_converters/image_converter.cc",
"shell/common/gin_converters/image_converter.h", "shell/common/gin_converters/image_converter.h",
"shell/common/gin_converters/login_item_settings_converter.cc",
"shell/common/gin_converters/login_item_settings_converter.h",
"shell/common/gin_converters/media_converter.cc", "shell/common/gin_converters/media_converter.cc",
"shell/common/gin_converters/media_converter.h", "shell/common/gin_converters/media_converter.h",
"shell/common/gin_converters/message_box_converter.cc", "shell/common/gin_converters/message_box_converter.cc",
@@ -759,6 +766,8 @@ filenames = {
"shell/common/gin_converters/extension_converter.h", "shell/common/gin_converters/extension_converter.h",
"shell/renderer/extensions/electron_extensions_dispatcher_delegate.cc", "shell/renderer/extensions/electron_extensions_dispatcher_delegate.cc",
"shell/renderer/extensions/electron_extensions_dispatcher_delegate.h", "shell/renderer/extensions/electron_extensions_dispatcher_delegate.h",
"shell/renderer/extensions/electron_extensions_renderer_api_provider.cc",
"shell/renderer/extensions/electron_extensions_renderer_api_provider.h",
"shell/renderer/extensions/electron_extensions_renderer_client.cc", "shell/renderer/extensions/electron_extensions_renderer_client.cc",
"shell/renderer/extensions/electron_extensions_renderer_client.h", "shell/renderer/extensions/electron_extensions_renderer_client.h",
] ]

View File

@@ -111,6 +111,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__algorithm/ranges_binary_search.h", "//third_party/libc++/src/include/__algorithm/ranges_binary_search.h",
"//third_party/libc++/src/include/__algorithm/ranges_clamp.h", "//third_party/libc++/src/include/__algorithm/ranges_clamp.h",
"//third_party/libc++/src/include/__algorithm/ranges_contains.h", "//third_party/libc++/src/include/__algorithm/ranges_contains.h",
"//third_party/libc++/src/include/__algorithm/ranges_contains_subrange.h",
"//third_party/libc++/src/include/__algorithm/ranges_copy.h", "//third_party/libc++/src/include/__algorithm/ranges_copy.h",
"//third_party/libc++/src/include/__algorithm/ranges_copy_backward.h", "//third_party/libc++/src/include/__algorithm/ranges_copy_backward.h",
"//third_party/libc++/src/include/__algorithm/ranges_copy_if.h", "//third_party/libc++/src/include/__algorithm/ranges_copy_if.h",
@@ -291,6 +292,8 @@ libcxx_headers = [
"//third_party/libc++/src/include/__chrono/steady_clock.h", "//third_party/libc++/src/include/__chrono/steady_clock.h",
"//third_party/libc++/src/include/__chrono/system_clock.h", "//third_party/libc++/src/include/__chrono/system_clock.h",
"//third_party/libc++/src/include/__chrono/time_point.h", "//third_party/libc++/src/include/__chrono/time_point.h",
"//third_party/libc++/src/include/__chrono/time_zone.h",
"//third_party/libc++/src/include/__chrono/time_zone_link.h",
"//third_party/libc++/src/include/__chrono/tzdb.h", "//third_party/libc++/src/include/__chrono/tzdb.h",
"//third_party/libc++/src/include/__chrono/tzdb_list.h", "//third_party/libc++/src/include/__chrono/tzdb_list.h",
"//third_party/libc++/src/include/__chrono/weekday.h", "//third_party/libc++/src/include/__chrono/weekday.h",
@@ -428,9 +431,9 @@ libcxx_headers = [
"//third_party/libc++/src/include/__functional/weak_result_type.h", "//third_party/libc++/src/include/__functional/weak_result_type.h",
"//third_party/libc++/src/include/__fwd/array.h", "//third_party/libc++/src/include/__fwd/array.h",
"//third_party/libc++/src/include/__fwd/bit_reference.h", "//third_party/libc++/src/include/__fwd/bit_reference.h",
"//third_party/libc++/src/include/__fwd/complex.h",
"//third_party/libc++/src/include/__fwd/fstream.h", "//third_party/libc++/src/include/__fwd/fstream.h",
"//third_party/libc++/src/include/__fwd/get.h", "//third_party/libc++/src/include/__fwd/functional.h",
"//third_party/libc++/src/include/__fwd/hash.h",
"//third_party/libc++/src/include/__fwd/ios.h", "//third_party/libc++/src/include/__fwd/ios.h",
"//third_party/libc++/src/include/__fwd/istream.h", "//third_party/libc++/src/include/__fwd/istream.h",
"//third_party/libc++/src/include/__fwd/mdspan.h", "//third_party/libc++/src/include/__fwd/mdspan.h",

View File

@@ -34,13 +34,17 @@ export default class BrowserView {
} }
setAutoResize (options: AutoResizeOptions) { setAutoResize (options: AutoResizeOptions) {
if (options == null || typeof options !== 'object') { throw new Error('Invalid auto resize options'); } if (options == null || typeof options !== 'object') {
throw new Error('Invalid auto resize options');
}
this.#autoResizeFlags = { this.#autoResizeFlags = {
width: !!options.width, width: !!options.width,
height: !!options.height, height: !!options.height,
horizontal: !!options.horizontal, horizontal: !!options.horizontal,
vertical: !!options.vertical vertical: !!options.vertical
}; };
this.#autoHorizontalProportion = null; this.#autoHorizontalProportion = null;
this.#autoVerticalProportion = null; this.#autoVerticalProportion = null;
} }
@@ -71,7 +75,10 @@ export default class BrowserView {
#autoHorizontalProportion: {width: number, left: number} | null = null; #autoHorizontalProportion: {width: number, left: number} | null = null;
#autoVerticalProportion: {height: number, top: number} | null = null; #autoVerticalProportion: {height: number, top: number} | null = null;
#autoResize () { #autoResize () {
if (!this.ownerWindow) throw new Error('Electron bug: #autoResize called without owner window'); if (!this.ownerWindow) {
throw new Error('Electron bug: #autoResize called without owner window');
};
if (this.#autoResizeFlags.horizontal && this.#autoHorizontalProportion == null) { if (this.#autoResizeFlags.horizontal && this.#autoHorizontalProportion == null) {
const viewBounds = this.#webContentsView.getBounds(); const viewBounds = this.#webContentsView.getBounds();
this.#autoHorizontalProportion = { this.#autoHorizontalProportion = {
@@ -79,6 +86,7 @@ export default class BrowserView {
left: this.#lastWindowSize.width / viewBounds.x left: this.#lastWindowSize.width / viewBounds.x
}; };
} }
if (this.#autoResizeFlags.vertical && this.#autoVerticalProportion == null) { if (this.#autoResizeFlags.vertical && this.#autoVerticalProportion == null) {
const viewBounds = this.#webContentsView.getBounds(); const viewBounds = this.#webContentsView.getBounds();
this.#autoVerticalProportion = { this.#autoVerticalProportion = {
@@ -86,6 +94,7 @@ export default class BrowserView {
top: this.#lastWindowSize.height / viewBounds.y top: this.#lastWindowSize.height / viewBounds.y
}; };
} }
const newBounds = this.ownerWindow.getBounds(); const newBounds = this.ownerWindow.getBounds();
let widthDelta = newBounds.width - this.#lastWindowSize.width; let widthDelta = newBounds.width - this.#lastWindowSize.width;
let heightDelta = newBounds.height - this.#lastWindowSize.height; let heightDelta = newBounds.height - this.#lastWindowSize.height;
@@ -105,10 +114,12 @@ export default class BrowserView {
newViewBounds.width = newBounds.width / this.#autoHorizontalProportion.width; newViewBounds.width = newBounds.width / this.#autoHorizontalProportion.width;
newViewBounds.x = newBounds.width / this.#autoHorizontalProportion.left; newViewBounds.x = newBounds.width / this.#autoHorizontalProportion.left;
} }
if (this.#autoVerticalProportion) { if (this.#autoVerticalProportion) {
newViewBounds.height = newBounds.height / this.#autoVerticalProportion.height; newViewBounds.height = newBounds.height / this.#autoVerticalProportion.height;
newViewBounds.y = newBounds.y / this.#autoVerticalProportion.top; newViewBounds.y = newBounds.y / this.#autoVerticalProportion.top;
} }
if (this.#autoHorizontalProportion || this.#autoVerticalProportion) { if (this.#autoHorizontalProportion || this.#autoVerticalProportion) {
this.#webContentsView.setBounds(newViewBounds); this.#webContentsView.setBounds(newViewBounds);
} }

View File

@@ -54,7 +54,7 @@ BrowserWindow.prototype._init = function (this: BWT) {
this._browserViews = []; this._browserViews = [];
this.on('close', () => { this.on('closed', () => {
this._browserViews.forEach(b => b.webContents?.close({ waitForBeforeUnload: true })); this._browserViews.forEach(b => b.webContents?.close({ waitForBeforeUnload: true }));
}); });

View File

@@ -1,4 +1,4 @@
import { app, BrowserWindow } from 'electron/main'; import { app, BaseWindow } from 'electron/main';
import type { OpenDialogOptions, OpenDialogReturnValue, MessageBoxOptions, SaveDialogOptions, SaveDialogReturnValue, MessageBoxReturnValue, CertificateTrustDialogOptions } from 'electron/main'; import type { OpenDialogOptions, OpenDialogReturnValue, MessageBoxOptions, SaveDialogOptions, SaveDialogReturnValue, MessageBoxReturnValue, CertificateTrustDialogOptions } from 'electron/main';
const dialogBinding = process._linkedBinding('electron_browser_dialog'); const dialogBinding = process._linkedBinding('electron_browser_dialog');
@@ -72,7 +72,7 @@ const setupSaveDialogProperties = (properties: (keyof typeof SaveFileDialogPrope
return dialogProperties; return dialogProperties;
}; };
const saveDialog = (sync: boolean, window: BrowserWindow | null, options?: SaveDialogOptions) => { const saveDialog = (sync: boolean, window: BaseWindow | null, options?: SaveDialogOptions) => {
checkAppInitialized(); checkAppInitialized();
if (options == null) options = { title: 'Save' }; if (options == null) options = { title: 'Save' };
@@ -111,7 +111,7 @@ const saveDialog = (sync: boolean, window: BrowserWindow | null, options?: SaveD
return sync ? dialogBinding.showSaveDialogSync(settings) : dialogBinding.showSaveDialog(settings); return sync ? dialogBinding.showSaveDialogSync(settings) : dialogBinding.showSaveDialog(settings);
}; };
const openDialog = (sync: boolean, window: BrowserWindow | null, options?: OpenDialogOptions) => { const openDialog = (sync: boolean, window: BaseWindow | null, options?: OpenDialogOptions) => {
checkAppInitialized(); checkAppInitialized();
if (options == null) { if (options == null) {
@@ -152,7 +152,7 @@ const openDialog = (sync: boolean, window: BrowserWindow | null, options?: OpenD
return (sync) ? dialogBinding.showOpenDialogSync(settings) : dialogBinding.showOpenDialog(settings); return (sync) ? dialogBinding.showOpenDialogSync(settings) : dialogBinding.showOpenDialog(settings);
}; };
const messageBox = (sync: boolean, window: BrowserWindow | null, options?: MessageBoxOptions) => { const messageBox = (sync: boolean, window: BaseWindow | null, options?: MessageBoxOptions) => {
checkAppInitialized(); checkAppInitialized();
if (options == null) options = { type: 'none', message: '' }; if (options == null) options = { type: 'none', message: '' };
@@ -237,51 +237,51 @@ const messageBox = (sync: boolean, window: BrowserWindow | null, options?: Messa
} }
}; };
export function showOpenDialog(window: BrowserWindow, options: OpenDialogOptions): OpenDialogReturnValue; export function showOpenDialog(window: BaseWindow, options: OpenDialogOptions): OpenDialogReturnValue;
export function showOpenDialog(options: OpenDialogOptions): OpenDialogReturnValue; export function showOpenDialog(options: OpenDialogOptions): OpenDialogReturnValue;
export function showOpenDialog (windowOrOptions: BrowserWindow | OpenDialogOptions, maybeOptions?: OpenDialogOptions): OpenDialogReturnValue { export function showOpenDialog (windowOrOptions: BaseWindow | OpenDialogOptions, maybeOptions?: OpenDialogOptions): OpenDialogReturnValue {
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions); const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions); const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
return openDialog(false, window, options); return openDialog(false, window, options);
} }
export function showOpenDialogSync(window: BrowserWindow, options: OpenDialogOptions): OpenDialogReturnValue; export function showOpenDialogSync(window: BaseWindow, options: OpenDialogOptions): OpenDialogReturnValue;
export function showOpenDialogSync(options: OpenDialogOptions): OpenDialogReturnValue; export function showOpenDialogSync(options: OpenDialogOptions): OpenDialogReturnValue;
export function showOpenDialogSync (windowOrOptions: BrowserWindow | OpenDialogOptions, maybeOptions?: OpenDialogOptions): OpenDialogReturnValue { export function showOpenDialogSync (windowOrOptions: BaseWindow | OpenDialogOptions, maybeOptions?: OpenDialogOptions): OpenDialogReturnValue {
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions); const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions); const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
return openDialog(true, window, options); return openDialog(true, window, options);
} }
export function showSaveDialog(window: BrowserWindow, options: SaveDialogOptions): SaveDialogReturnValue; export function showSaveDialog(window: BaseWindow, options: SaveDialogOptions): SaveDialogReturnValue;
export function showSaveDialog(options: SaveDialogOptions): SaveDialogReturnValue; export function showSaveDialog(options: SaveDialogOptions): SaveDialogReturnValue;
export function showSaveDialog (windowOrOptions: BrowserWindow | SaveDialogOptions, maybeOptions?: SaveDialogOptions): SaveDialogReturnValue { export function showSaveDialog (windowOrOptions: BaseWindow | SaveDialogOptions, maybeOptions?: SaveDialogOptions): SaveDialogReturnValue {
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions); const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions); const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
return saveDialog(false, window, options); return saveDialog(false, window, options);
} }
export function showSaveDialogSync(window: BrowserWindow, options: SaveDialogOptions): SaveDialogReturnValue; export function showSaveDialogSync(window: BaseWindow, options: SaveDialogOptions): SaveDialogReturnValue;
export function showSaveDialogSync(options: SaveDialogOptions): SaveDialogReturnValue; export function showSaveDialogSync(options: SaveDialogOptions): SaveDialogReturnValue;
export function showSaveDialogSync (windowOrOptions: BrowserWindow | SaveDialogOptions, maybeOptions?: SaveDialogOptions): SaveDialogReturnValue { export function showSaveDialogSync (windowOrOptions: BaseWindow | SaveDialogOptions, maybeOptions?: SaveDialogOptions): SaveDialogReturnValue {
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions); const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions); const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
return saveDialog(true, window, options); return saveDialog(true, window, options);
} }
export function showMessageBox(window: BrowserWindow, options: MessageBoxOptions): MessageBoxReturnValue; export function showMessageBox(window: BaseWindow, options: MessageBoxOptions): MessageBoxReturnValue;
export function showMessageBox(options: MessageBoxOptions): MessageBoxReturnValue; export function showMessageBox(options: MessageBoxOptions): MessageBoxReturnValue;
export function showMessageBox (windowOrOptions: BrowserWindow | MessageBoxOptions, maybeOptions?: MessageBoxOptions): MessageBoxReturnValue { export function showMessageBox (windowOrOptions: BaseWindow | MessageBoxOptions, maybeOptions?: MessageBoxOptions): MessageBoxReturnValue {
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions); const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions); const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
return messageBox(false, window, options); return messageBox(false, window, options);
} }
export function showMessageBoxSync(window: BrowserWindow, options: MessageBoxOptions): MessageBoxReturnValue; export function showMessageBoxSync(window: BaseWindow, options: MessageBoxOptions): MessageBoxReturnValue;
export function showMessageBoxSync(options: MessageBoxOptions): MessageBoxReturnValue; export function showMessageBoxSync(options: MessageBoxOptions): MessageBoxReturnValue;
export function showMessageBoxSync (windowOrOptions: BrowserWindow | MessageBoxOptions, maybeOptions?: MessageBoxOptions): MessageBoxReturnValue { export function showMessageBoxSync (windowOrOptions: BaseWindow | MessageBoxOptions, maybeOptions?: MessageBoxOptions): MessageBoxReturnValue {
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions); const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions); const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
return messageBox(true, window, options); return messageBox(true, window, options);
} }
@@ -289,9 +289,9 @@ export function showErrorBox (...args: any[]) {
return dialogBinding.showErrorBox(...args); return dialogBinding.showErrorBox(...args);
} }
export function showCertificateTrustDialog (windowOrOptions: BrowserWindow | CertificateTrustDialogOptions, maybeOptions?: CertificateTrustDialogOptions) { export function showCertificateTrustDialog (windowOrOptions: BaseWindow | CertificateTrustDialogOptions, maybeOptions?: CertificateTrustDialogOptions) {
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions); const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions); const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
if (options == null || typeof options !== 'object') { if (options == null || typeof options !== 'object') {
throw new TypeError('options must be an object'); throw new TypeError('options must be an object');

View File

@@ -18,7 +18,7 @@ function makeStreamFromPipe (pipe: any): ReadableStream {
try { try {
const rv = await pipe.read(buf); const rv = await pipe.read(buf);
if (rv > 0) { if (rv > 0) {
controller.enqueue(buf.subarray(0, rv)); controller.enqueue(buf.slice(0, rv));
} else { } else {
controller.close(); controller.close();
} }

View File

@@ -263,13 +263,11 @@ WebContents.prototype.printToPDF = async function (options) {
// TODO(codebytere): deduplicate argument sanitization by moving rest of // TODO(codebytere): deduplicate argument sanitization by moving rest of
// print param logic into new file shared between printToPDF and print // print param logic into new file shared between printToPDF and print
WebContents.prototype.print = function (options: ElectronInternal.WebContentsPrintOptions, callback) { WebContents.prototype.print = function (options: ElectronInternal.WebContentsPrintOptions = {}, callback) {
if (typeof options !== 'object') { if (typeof options !== 'object' || options == null) {
throw new TypeError('webContents.print(): Invalid print settings specified.'); throw new TypeError('webContents.print(): Invalid print settings specified.');
} }
const printSettings: Record<string, any> = { ...options };
const pageSize = options.pageSize ?? 'A4'; const pageSize = options.pageSize ?? 'A4';
if (typeof pageSize === 'object') { if (typeof pageSize === 'object') {
if (!pageSize.height || !pageSize.width) { if (!pageSize.height || !pageSize.width) {
@@ -283,7 +281,7 @@ WebContents.prototype.print = function (options: ElectronInternal.WebContentsPri
throw new RangeError('height and width properties must be minimum 352 microns.'); throw new RangeError('height and width properties must be minimum 352 microns.');
} }
printSettings.mediaSize = { options.mediaSize = {
name: 'CUSTOM', name: 'CUSTOM',
custom_display_name: 'Custom', custom_display_name: 'Custom',
height_microns: height, height_microns: height,
@@ -295,7 +293,7 @@ WebContents.prototype.print = function (options: ElectronInternal.WebContentsPri
}; };
} else if (typeof pageSize === 'string' && PDFPageSizes[pageSize]) { } else if (typeof pageSize === 'string' && PDFPageSizes[pageSize]) {
const mediaSize = PDFPageSizes[pageSize]; const mediaSize = PDFPageSizes[pageSize];
printSettings.mediaSize = { options.mediaSize = {
...mediaSize, ...mediaSize,
imageable_area_left_microns: 0, imageable_area_left_microns: 0,
imageable_area_bottom_microns: 0, imageable_area_bottom_microns: 0,
@@ -308,9 +306,9 @@ WebContents.prototype.print = function (options: ElectronInternal.WebContentsPri
if (this._print) { if (this._print) {
if (callback) { if (callback) {
this._print(printSettings, callback); this._print(options, callback);
} else { } else {
this._print(printSettings); this._print(options);
} }
} else { } else {
console.error('Error: Printing feature is disabled.'); console.error('Error: Printing feature is disabled.');
@@ -533,6 +531,18 @@ WebContents.prototype._init = function () {
enumerable: true enumerable: true
}); });
// Add navigationHistory property which handles session history,
// maintaining a list of navigation entries for backward and forward navigation.
Object.defineProperty(this, 'navigationHistory', {
value: {
getActiveIndex: this._getActiveIndex.bind(this),
length: this._historyLength.bind(this),
getEntryAtIndex: this._getNavigationEntryAtIndex.bind(this)
},
writable: false,
enumerable: true
});
// Dispatch IPC messages to the ipc module. // Dispatch IPC messages to the ipc module.
this.on('-ipc-message' as any, function (this: Electron.WebContents, event: Electron.IpcMainEvent, internal: boolean, channel: string, args: any[]) { this.on('-ipc-message' as any, function (this: Electron.WebContents, event: Electron.IpcMainEvent, internal: boolean, channel: string, args: any[]) {
addSenderToEvent(event, this); addSenderToEvent(event, this);

View File

@@ -200,11 +200,11 @@ delete process.appCodeLoaded;
if (packagePath) { if (packagePath) {
// Finally load app's main.js and transfer control to C++. // Finally load app's main.js and transfer control to C++.
if ((packageJson.type === 'module' && !mainStartupScript.endsWith('.cjs')) || mainStartupScript.endsWith('.mjs')) { if ((packageJson.type === 'module' && !mainStartupScript.endsWith('.cjs')) || mainStartupScript.endsWith('.mjs')) {
const { loadESM } = __non_webpack_require__('internal/process/esm_loader'); const { runEntryPointWithESMLoader } = __non_webpack_require__('internal/modules/run_main');
const main = (require('url') as typeof url).pathToFileURL(path.join(packagePath, mainStartupScript)); const main = (require('url') as typeof url).pathToFileURL(path.join(packagePath, mainStartupScript));
loadESM(async (esmLoader: any) => { runEntryPointWithESMLoader(async (cascadedLoader: any) => {
try { try {
await esmLoader.import(main.toString(), undefined, Object.create(null)); await cascadedLoader.import(main.toString(), undefined, Object.create(null));
appCodeLoaded!(); appCodeLoaded!();
} catch (err) { } catch (err) {
appCodeLoaded!(); appCodeLoaded!();

View File

@@ -467,7 +467,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
}; };
const { access } = fs; const { access } = fs;
fs.access = function (pathArgument: string, mode: any, callback: any) { fs.access = function (pathArgument: string, mode: number, callback: any) {
const pathInfo = splitPath(pathArgument); const pathInfo = splitPath(pathArgument);
if (!pathInfo.isAsar) return access.apply(this, arguments); if (!pathInfo.isAsar) return access.apply(this, arguments);
const { asarPath, filePath } = pathInfo; const { asarPath, filePath } = pathInfo;
@@ -512,7 +512,16 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
nextTick(callback); nextTick(callback);
}; };
fs.promises.access = util.promisify(fs.access); const { access: accessPromise } = fs.promises;
fs.promises.access = function (pathArgument: string, mode: number) {
const pathInfo = splitPath(pathArgument);
if (!pathInfo.isAsar) {
return accessPromise.apply(this, arguments);
}
const p = util.promisify(fs.access);
return p(pathArgument, mode);
};
const { accessSync } = fs; const { accessSync } = fs;
fs.accessSync = function (pathArgument: string, mode: any) { fs.accessSync = function (pathArgument: string, mode: any) {

View File

@@ -2,6 +2,11 @@
import { wrapFsWithAsar } from './asar-fs-wrapper'; import { wrapFsWithAsar } from './asar-fs-wrapper';
wrapFsWithAsar(require('fs')); wrapFsWithAsar(require('fs'));
// See ElectronRendererClient::DidCreateScriptContext.
if ((globalThis as any).blinkFetch) {
globalThis.fetch = (globalThis as any).blinkFetch;
}
// Hook child_process.fork. // Hook child_process.fork.
import cp = require('child_process'); // eslint-disable-line import/first import cp = require('child_process'); // eslint-disable-line import/first
const originalFork = cp.fork; const originalFork = cp.fork;

View File

@@ -150,12 +150,12 @@ if (cjsPreloads.length) {
} }
} }
if (esmPreloads.length) { if (esmPreloads.length) {
const { loadESM } = __non_webpack_require__('internal/process/esm_loader'); const { runEntryPointWithESMLoader } = __non_webpack_require__('internal/modules/run_main');
loadESM(async (esmLoader: any) => { runEntryPointWithESMLoader(async (cascadedLoader: any) => {
// Load the preload scripts. // Load the preload scripts.
for (const preloadScript of esmPreloads) { for (const preloadScript of esmPreloads) {
await esmLoader.import(pathToFileURL(preloadScript).toString(), undefined, Object.create(null)).catch((err: Error) => { await cascadedLoader.import(pathToFileURL(preloadScript).toString(), undefined, Object.create(null)).catch((err: Error) => {
console.error(`Unable to load preload script: ${preloadScript}`); console.error(`Unable to load preload script: ${preloadScript}`);
console.error(err); console.error(err);

View File

@@ -36,11 +36,12 @@ parentPort.on('removeListener', (name: string) => {
}); });
// Finally load entry script. // Finally load entry script.
const { loadESM } = __non_webpack_require__('internal/process/esm_loader'); const { runEntryPointWithESMLoader } = __non_webpack_require__('internal/modules/run_main');
const mainEntry = pathToFileURL(entryScript); const mainEntry = pathToFileURL(entryScript);
loadESM(async (esmLoader: any) => {
runEntryPointWithESMLoader(async (cascadedLoader: any) => {
try { try {
await esmLoader.import(mainEntry.toString(), undefined, Object.create(null)); await cascadedLoader.import(mainEntry.toString(), undefined, Object.create(null));
} catch (err) { } catch (err) {
// @ts-ignore internalBinding is a secret internal global that we shouldn't // @ts-ignore internalBinding is a secret internal global that we shouldn't
// really be using, so we ignore the type error instead of declaring it in types // really be using, so we ignore the type error instead of declaring it in types

View File

@@ -9,7 +9,7 @@
"@electron/docs-parser": "^1.2.0", "@electron/docs-parser": "^1.2.0",
"@electron/fiddle-core": "^1.0.4", "@electron/fiddle-core": "^1.0.4",
"@electron/github-app-auth": "^2.0.0", "@electron/github-app-auth": "^2.0.0",
"@electron/lint-roller": "^1.9.0", "@electron/lint-roller": "^1.12.1",
"@electron/typescript-definitions": "^8.15.2", "@electron/typescript-definitions": "^8.15.2",
"@octokit/rest": "^19.0.7", "@octokit/rest": "^19.0.7",
"@primer/octicons": "^10.0.0", "@primer/octicons": "^10.0.0",

View File

@@ -20,7 +20,7 @@ index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57
case ssl_open_record_error: case ssl_open_record_error:
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
index 58b68e6759650b9a2a3915aa343451bdd1ec1e89..a709ab4067a001ce1087f89c3b5d66e99ba0d4f7 100644 index 98f97ebb28a06dfde00082922a1aff24f8aa154c..8ec11f0e839760ace90bd88e096ffbd17508e224 100644
--- a/ssl/ssl_lib.cc --- a/ssl/ssl_lib.cc
+++ b/ssl/ssl_lib.cc +++ b/ssl/ssl_lib.cc
@@ -1334,7 +1334,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) { @@ -1334,7 +1334,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
@@ -32,7 +32,7 @@ index 58b68e6759650b9a2a3915aa343451bdd1ec1e89..a709ab4067a001ce1087f89c3b5d66e9
return SSL_ERROR_ZERO_RETURN; return SSL_ERROR_ZERO_RETURN;
} }
// An EOF was observed which violates the protocol, and the underlying // An EOF was observed which violates the protocol, and the underlying
@@ -2705,13 +2705,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) { @@ -2701,13 +2701,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
return CRYPTO_get_ex_data(&ctx->ex_data, idx); return CRYPTO_get_ex_data(&ctx->ex_data, idx);
} }

View File

@@ -129,3 +129,7 @@ build_run_reclient_cfg_generator_after_chrome.patch
fix_suppress_clang_-wimplicit-const-int-float-conversion_in.patch fix_suppress_clang_-wimplicit-const-int-float-conversion_in.patch
fix_getcursorscreenpoint_wrongly_returns_0_0.patch fix_getcursorscreenpoint_wrongly_returns_0_0.patch
fix_add_support_for_skipping_first_2_no-op_refreshes_in_thumb_cap.patch fix_add_support_for_skipping_first_2_no-op_refreshes_in_thumb_cap.patch
refactor_expose_file_system_access_blocklist.patch
cherry-pick-013961609785.patch
feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch
revert_fix_ime_prevent_tsf_hang_chromium_window_when_dpi_changed.patch

View File

@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
context, which can cause some preload scripts to trip. context, which can cause some preload scripts to trip.
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index 2f05e37b8513bc28d199f81130e55063643a7c49..a03a0f4294843962c7c670c96c1df0027eab641f 100644 index 289a8c25f14cad42b9178ce94b11f67870be7434..5b91eadb698eeb5a87c9d0b2edf7e5ccf952555c 100644
--- a/content/public/renderer/render_frame_observer.h --- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h
@@ -146,6 +146,8 @@ class CONTENT_EXPORT RenderFrameObserver @@ -146,6 +146,8 @@ class CONTENT_EXPORT RenderFrameObserver
@@ -23,10 +23,10 @@ index 2f05e37b8513bc28d199f81130e55063643a7c49..a03a0f4294843962c7c670c96c1df002
int32_t world_id) {} int32_t world_id) {}
virtual void DidClearWindowObject() {} virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f7f28e58ab9378a9dfcd8706b0cc8373e818186f..ac6a92dc0b0957c3cd3d51fc64827ccca87c2723 100644 index 0ac529a0b19d0d88b57bbab89f60b888c480051e..07e7daef4c2c2cdeb09ac1522046bcf5a59b5130 100644
--- a/content/renderer/render_frame_impl.cc --- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc
@@ -4638,6 +4638,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context, @@ -4687,6 +4687,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id); observer.DidCreateScriptContext(context, world_id);
} }
@@ -40,10 +40,10 @@ index f7f28e58ab9378a9dfcd8706b0cc8373e818186f..ac6a92dc0b0957c3cd3d51fc64827ccc
int world_id) { int world_id) {
for (auto& observer : observers_) for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 6b29d5add6a2bb48366f69222134a127022de533..493ee49c1ebda6fd199f9dcf4e4a6295b2576d7b 100644 index b32fbb5887cb2719594a85a3177b5872208c1034..6f742235d7d67cc14624debb7378d873ce5ae798 100644
--- a/content/renderer/render_frame_impl.h --- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h
@@ -638,6 +638,8 @@ class CONTENT_EXPORT RenderFrameImpl @@ -642,6 +642,8 @@ class CONTENT_EXPORT RenderFrameImpl
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override; void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
void DidCreateScriptContext(v8::Local<v8::Context> context, void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override; int world_id) override;
@@ -53,10 +53,10 @@ index 6b29d5add6a2bb48366f69222134a127022de533..493ee49c1ebda6fd199f9dcf4e4a6295
int world_id) override; int world_id) override;
void DidChangeScrollOffset() override; void DidChangeScrollOffset() override;
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index 807dce7b76e8556d28a1e2acf69aef32ffd4688f..90fb183b4b93714207eced129d25355d2a82e28d 100644 index ace1251d03266e3c5ae75c2059ba8c575725222d..37e0a30d87529e5de27fef40d8e7de0f7c27f0cd 100644
--- a/third_party/blink/public/web/web_local_frame_client.h --- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -634,6 +634,9 @@ class BLINK_EXPORT WebLocalFrameClient { @@ -638,6 +638,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>, virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {} int32_t world_id) {}
@@ -67,10 +67,10 @@ index 807dce7b76e8556d28a1e2acf69aef32ffd4688f..90fb183b4b93714207eced129d25355d
virtual void WillReleaseScriptContext(v8::Local<v8::Context>, virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
int32_t world_id) {} int32_t world_id) {}
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index 534de2a581b34e15ec20832fffb603c4ea82296d..770fd0a15c4a3521315b70e46a3646e361432508 100644 index 2cb0a08954850d229e99bae66fecd4787f20a178..79894ca0d51ed61a178818b38da5c43b63a2dee6 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -212,6 +212,7 @@ void LocalWindowProxy::Initialize() { @@ -213,6 +213,7 @@ void LocalWindowProxy::Initialize() {
} }
InstallConditionalFeatures(); InstallConditionalFeatures();
@@ -79,10 +79,10 @@ index 534de2a581b34e15ec20832fffb603c4ea82296d..770fd0a15c4a3521315b70e46a3646e3
if (World().IsMainWorld()) { if (World().IsMainWorld()) {
probe::DidCreateMainWorldContext(GetFrame()); probe::DidCreateMainWorldContext(GetFrame());
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index ffbfb9c929244e2a525891d4bc0337f1f26e8e9f..d1f5f2dd484c7871f5b08ffeae6b22e19a510d70 100644 index 7a5d4721f7bd3012351f17053e188505f26f1979..4c415c2464fee49581efa307070ffad976b69c76 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h --- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -302,6 +302,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { @@ -305,6 +305,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>, virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) = 0; int32_t world_id) = 0;
@@ -92,10 +92,10 @@ index ffbfb9c929244e2a525891d4bc0337f1f26e8e9f..d1f5f2dd484c7871f5b08ffeae6b22e1
int32_t world_id) = 0; int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0; virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index 70f6643312774e9df1b02ce7140cd7c46e99e0ef..33170e40321f7cb76d8ec498cfa1b81a6839c484 100644 index 015daaa60e46a106bf2f36a2bd967c892bc299da..c07e4bc3b7dd937ef14a72506cd6f2299bc511f4 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -291,6 +291,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( @@ -292,6 +292,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
web_frame_->Client()->DidCreateScriptContext(context, world_id); web_frame_->Client()->DidCreateScriptContext(context, world_id);
} }
@@ -110,7 +110,7 @@ index 70f6643312774e9df1b02ce7140cd7c46e99e0ef..33170e40321f7cb76d8ec498cfa1b81a
v8::Local<v8::Context> context, v8::Local<v8::Context> context,
int32_t world_id) { int32_t world_id) {
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index 7fa8cc99f455708a2f9bca30128be58ebe3b2026..62d0c82340116864ee0b5de5cadd17b342d93679 100644 index c522b37b1918902e424f0df6a3eb379b0fd05fa4..0b3054bcb55bd6e731dd42b59c2bc0c24ec29165 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -123,10 +123,10 @@ index 7fa8cc99f455708a2f9bca30128be58ebe3b2026..62d0c82340116864ee0b5de5cadd17b3
int32_t world_id) override; int32_t world_id) override;
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index 6b2880d6b1d20ffa00bbca27a250792f3d846c33..285dbe014e78691c803d770c7ab0b73c8eaf736f 100644 index 4ea7eae36fcf1d42cbe639e895d9aca52d20082b..ce529d0edd69ad6542baa83725e18be33d3c2a4a 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h --- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -410,6 +410,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { @@ -411,6 +411,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
void DidCreateScriptContext(v8::Local<v8::Context>, void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) override {} int32_t world_id) override {}

View File

@@ -7,7 +7,7 @@ Ensure that licenses for the dependencies introduced by Electron
are included in `LICENSES.chromium.html` are included in `LICENSES.chromium.html`
diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
index cc7b17e13c4c8b9e483df9a097b23935ab2e56bc..b89810659dab27dd8150c0b7185ea2b679ab98a4 100755 index f3a8ba3756a19beb286a3f7bba52399705bf59bf..7cf72db56d3bc71cf6fb2b3f88a80e7866db1598 100755
--- a/tools/licenses/licenses.py --- a/tools/licenses/licenses.py
+++ b/tools/licenses/licenses.py +++ b/tools/licenses/licenses.py
@@ -336,6 +336,31 @@ SPECIAL_CASES = { @@ -336,6 +336,31 @@ SPECIAL_CASES = {

View File

@@ -6,7 +6,7 @@ Subject: add gin::Converter support for ArrayBufferView
This should be upstreamed. This should be upstreamed.
diff --git a/gin/converter.cc b/gin/converter.cc diff --git a/gin/converter.cc b/gin/converter.cc
index 4eb8c3d8c8392512eeb235bc18012589549b872b..d0432f6fff09cdcebed55ccf03a6524a445ef346 100644 index f6a93a1f74668e69b425a87c42e05c1adbc5cf54..4934f23d077d4b2a4c376196e37c720471fc88f6 100644
--- a/gin/converter.cc --- a/gin/converter.cc
+++ b/gin/converter.cc +++ b/gin/converter.cc
@@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
@@ -39,10 +39,10 @@ index 4eb8c3d8c8392512eeb235bc18012589549b872b..d0432f6fff09cdcebed55ccf03a6524a
Local<External> val) { Local<External> val) {
return val.As<Value>(); return val.As<Value>();
diff --git a/gin/converter.h b/gin/converter.h diff --git a/gin/converter.h b/gin/converter.h
index 2afca004074a039e740908e85813ec8c07b480c7..66cfa806cb8bb1614cc4584fc4797227ee33a754 100644 index 88ed39f337d5e9a1004d4e270f2bd020251ee518..175817151bfb8c83213767dc42f6ed14777f3cd1 100644
--- a/gin/converter.h --- a/gin/converter.h
+++ b/gin/converter.h +++ b/gin/converter.h
@@ -188,6 +188,15 @@ struct GIN_EXPORT Converter<v8::Local<v8::ArrayBuffer> > { @@ -190,6 +190,15 @@ struct GIN_EXPORT Converter<v8::Local<v8::ArrayBuffer> > {
v8::Local<v8::ArrayBuffer>* out); v8::Local<v8::ArrayBuffer>* out);
}; };

View File

@@ -151,7 +151,7 @@ index 794efdb773422ddc12ccbe013a13aadeb980b487..a60bbd76141f06202343c68e78688a95
// In GTK4, there's no way to obtain the frame thickness from CSS values // In GTK4, there's no way to obtain the frame thickness from CSS values
// directly, so we must determine it experimentally based on the drawn // directly, so we must determine it experimentally based on the drawn
diff --git a/ui/gtk/window_frame_provider_gtk.h b/ui/gtk/window_frame_provider_gtk.h diff --git a/ui/gtk/window_frame_provider_gtk.h b/ui/gtk/window_frame_provider_gtk.h
index 91236ec07c01ca14248b997577ae887c0c396cd2..d70639d2ba40e325bbbbf6117741c13354984ed5 100644 index bed28192daffe032fde3a74ca70f1298fb12b1b7..268acade8bd1075f3ce756cdf29bf50905ccb433 100644
--- a/ui/gtk/window_frame_provider_gtk.h --- a/ui/gtk/window_frame_provider_gtk.h
+++ b/ui/gtk/window_frame_provider_gtk.h +++ b/ui/gtk/window_frame_provider_gtk.h
@@ -18,7 +18,7 @@ namespace gtk { @@ -18,7 +18,7 @@ namespace gtk {

View File

@@ -8,10 +8,10 @@ was removed as part of the Raw Clipboard API scrubbing.
https://bugs.chromium.org/p/chromium/issues/detail?id=1217643 https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
index 6095ece239ae3b3ef6795d54e5c8bc4d1bb730ff..43c39f61e7d040c9923dac60ddc50fce2e3ee038 100644 index 6022a0af4241fe65bd03d7cbf95785e8879dc78e..ec9e4c6ece9014b66e7d65e99cda2b956a9a5d80 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.cc --- a/ui/base/clipboard/scoped_clipboard_writer.cc
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc +++ b/ui/base/clipboard/scoped_clipboard_writer.cc
@@ -227,6 +227,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting( @@ -229,6 +229,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting(
} }
#endif // BUILDFLAG(IS_CHROMEOS_ASH) #endif // BUILDFLAG(IS_CHROMEOS_ASH)
@@ -29,7 +29,7 @@ index 6095ece239ae3b3ef6795d54e5c8bc4d1bb730ff..43c39f61e7d040c9923dac60ddc50fce
objects_.clear(); objects_.clear();
platform_representations_.clear(); platform_representations_.clear();
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
index 6328d90cd1aca85c481b96bf859f0e9acb9de055..9aad0ae0134387fb2821d098a7d015ddd445de78 100644 index 08fce03a51ded80c8dfe59f17a438ace21f8daa7..ffbd0cbff14ae7af2d00d5949f6b608e998e0429 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.h --- a/ui/base/clipboard/scoped_clipboard_writer.h
+++ b/ui/base/clipboard/scoped_clipboard_writer.h +++ b/ui/base/clipboard/scoped_clipboard_writer.h
@@ -89,6 +89,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter { @@ -89,6 +89,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {

View File

@@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows. This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
index c32059af794851fdea8aae15157f05acdcc60e0a..92340d0aa8d893fc781ed59cc4aa51b5543de6d9 100644 index 32b77897ef3669727fe05a1f3603a5f8335ec3cf..f1948d352bd71da5ec17d734e343bfd656d7ed69 100644
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc --- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc +++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
@@ -163,6 +163,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast { @@ -163,6 +163,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
@@ -23,10 +23,10 @@ index c32059af794851fdea8aae15157f05acdcc60e0a..92340d0aa8d893fc781ed59cc4aa51b5
return receiver_.BindNewEndpointAndPassDedicatedRemote(); return receiver_.BindNewEndpointAndPassDedicatedRemote();
} }
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 78beefbdd4df3e147e1176668211861cfef0f1b2..7de3ed5e3dfce543671de877cc14d6beac798b94 100644 index 57926e0d557fdb3e8f46a096e335ecb5d1d2e13f..b0438d6077a3323785175424a3701ba4ae5e523d 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc --- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -712,6 +712,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { @@ -714,6 +714,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
} }
@@ -51,7 +51,7 @@ index a94977d7a76ae9952bbba0efe59a7cb5021a1c84..11c4f890eaeae1329ca5a6634a698aef
void SendRendererPreferencesToRenderer( void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences); const blink::RendererPreferences& preferences);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index b6dfbd7f7c973ed839df9265b4927ee0a29833d4..0a5dd079fec3a6ab05dc394a2facc9e44446d5e2 100644 index cb9b21a3d3e99558e6892e00e73e550f68571daf..f18a3d6b4287d986c31db3385541cd20db68ecd5 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -553,8 +553,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) { @@ -553,8 +553,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
@@ -104,10 +104,10 @@ index ed73a6fe6d146eac904f0aa0d88facf055df503e..4bbc792068db75739a7ceb8ad01c85f9
+ SetSchedulerThrottling(bool allowed); + SetSchedulerThrottling(bool allowed);
}; };
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
index d98282b35beea63c2b8206a86533409da06a6e6b..db62c091239e8cf963ce44081516503fc04efa17 100644 index c4348be90db209a757f21cbc518e1244fe0954d5..1ee953ad860291cdc1095880f6646d1d05732843 100644
--- a/third_party/blink/public/web/web_view.h --- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h
@@ -379,6 +379,7 @@ class BLINK_EXPORT WebView { @@ -376,6 +376,7 @@ class BLINK_EXPORT WebView {
// Scheduling ----------------------------------------------------------- // Scheduling -----------------------------------------------------------
virtual PageScheduler* Scheduler() const = 0; virtual PageScheduler* Scheduler() const = 0;
@@ -116,10 +116,10 @@ index d98282b35beea63c2b8206a86533409da06a6e6b..db62c091239e8cf963ce44081516503f
// Visibility ----------------------------------------------------------- // Visibility -----------------------------------------------------------
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 4791cc7e62875b053a2e4ed1a969ec1962913457..d276871bddca3300ed607c0446193e3632a56a41 100644 index fb042e637c831e3de72d7ed6fd33db9df5976c18..689010902c8508b85208618cc11b922adf10c08e 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2427,6 +2427,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( @@ -2431,6 +2431,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal", TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
"old_state", old_state, "new_state", new_state); "old_state", old_state, "new_state", new_state);
@@ -130,7 +130,7 @@ index 4791cc7e62875b053a2e4ed1a969ec1962913457..d276871bddca3300ed607c0446193e36
bool storing_in_bfcache = new_state->is_in_back_forward_cache && bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
!old_state->is_in_back_forward_cache; !old_state->is_in_back_forward_cache;
bool restoring_from_bfcache = !new_state->is_in_back_forward_cache && bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
@@ -3918,10 +3922,23 @@ PageScheduler* WebViewImpl::Scheduler() const { @@ -3937,10 +3941,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler(); return GetPage()->GetPageScheduler();
} }
@@ -155,10 +155,10 @@ index 4791cc7e62875b053a2e4ed1a969ec1962913457..d276871bddca3300ed607c0446193e36
// Do not throttle if the page should be painting. // Do not throttle if the page should be painting.
bool is_visible = bool is_visible =
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
index 0435e8bf952f1a7a6dd4efad7e7cfa453a9eaa7e..382cd1b854bdb95a7ec9586fbe79d6597972892d 100644 index db7f1cb1b0f682a20a618b342a9a42add0db9e74..bc2c06fd0e7d02624ad97ab1ebe21ff7b2217c05 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h --- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -453,6 +453,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -451,6 +451,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const; LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override; PageScheduler* Scheduler() const override;
@@ -166,7 +166,7 @@ index 0435e8bf952f1a7a6dd4efad7e7cfa453a9eaa7e..382cd1b854bdb95a7ec9586fbe79d659
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override; bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override; mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -927,6 +928,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -925,6 +926,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// If true, we send IPC messages when |preferred_size_| changes. // If true, we send IPC messages when |preferred_size_| changes.
bool send_preferred_size_changes_ = false; bool send_preferred_size_changes_ = false;

View File

@@ -8,7 +8,7 @@ WebPreferences of in-process child windows, rather than relying on
process-level command line switches, as before. process-level command line switches, as before.
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
index 346e10933be9d44db1ea664e45a8c5be5ae2085e..dbd3d7251e311b45c91f17da3c9758a20387288f 100644 index 0f386b68028a8398bdf6b851b16e244e5ba918bd..7a9519c2c172178ace67251151363ac0611e8503 100644
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc --- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc +++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
@@ -149,6 +149,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView, @@ -149,6 +149,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -32,7 +32,7 @@ index 346e10933be9d44db1ea664e45a8c5be5ae2085e..dbd3d7251e311b45c91f17da3c9758a2
out->accelerated_video_decode_enabled = out->accelerated_video_decode_enabled =
data.accelerated_video_decode_enabled(); data.accelerated_video_decode_enabled();
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
index aabb4bd94bc5d9e003adcb43291765f2a45e479d..9b333916464ff6a2c3ad3b555064e6558e5cd765 100644 index 90a6a0bf5c0e2d21f23badb284292a4f0c90178f..4f1b6acaa503cd085ff607d292ad0d4ee6731a56 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences.h --- a/third_party/blink/public/common/web_preferences/web_preferences.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
@@ -43,7 +43,7 @@ index aabb4bd94bc5d9e003adcb43291765f2a45e479d..9b333916464ff6a2c3ad3b555064e655
#include "net/nqe/effective_connection_type.h" #include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h" #include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h" #include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h"
@@ -415,6 +416,20 @@ struct BLINK_COMMON_EXPORT WebPreferences { @@ -425,6 +426,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
// blocking user's access to the background web content. // blocking user's access to the background web content.
bool modal_context_menu = true; bool modal_context_menu = true;
@@ -65,7 +65,7 @@ index aabb4bd94bc5d9e003adcb43291765f2a45e479d..9b333916464ff6a2c3ad3b555064e655
// chrome, except for the cases where it would require lots of extra work for // chrome, except for the cases where it would require lots of extra work for
// the embedder to use the same default value. // the embedder to use the same default value.
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
index 72dc42a7ac0ee0e7f8c3f2e6dfdeed1c766c6ad5..b219d6bf0a9a67c74abd54ad788427debf8459d5 100644 index 9960a1180a8e64d6e369936ab93aeb3417af5e8a..3f38e6e1289e1387e5fa54268c8efacda8fc3186 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h --- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h +++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
@@ -130,7 +130,7 @@ index 72dc42a7ac0ee0e7f8c3f2e6dfdeed1c766c6ad5..b219d6bf0a9a67c74abd54ad788427de
return r.cookie_enabled; return r.cookie_enabled;
} }
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
index 418ad9eac5110174a736d1c89167f8637fd7dcb5..2a9423ec99a45929bc24ea42f30c28af8d940535 100644 index c3ff064deb240a16f2d9adcb233426fbc4795324..7fd096a61e3dd33de09a25ce2926b010486b2dc2 100644
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom --- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom +++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
@@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom"; @@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom";

View File

@@ -15,7 +15,7 @@ Refs changes in:
This patch reverts the changes to fix associated crashes in Electron. This patch reverts the changes to fix associated crashes in Electron.
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
index 2432d2dba67540f8cdd8e5466a813693ff2d6683..ed9863e6a9870f45b2f688b1a9228c176d498307 100644 index 0a742bbbd5e8e1eb3610cc32f785f779e8907e75..26967019244d409dadf4533405d4d5d27c75b73c 100644
--- a/third_party/blink/renderer/core/frame/frame.cc --- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc +++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -125,14 +125,6 @@ bool Frame::Detach(FrameDetachType type) { @@ -125,14 +125,6 @@ bool Frame::Detach(FrameDetachType type) {
@@ -49,10 +49,10 @@ index 2432d2dba67540f8cdd8e5466a813693ff2d6683..ed9863e6a9870f45b2f688b1a9228c17
// its owning reference back to our owning LocalFrame. // its owning reference back to our owning LocalFrame.
client_->Detached(type); client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 4b8f63ccfce891af5c44e09e1e6b3f3ec015508a..4502a7a4f90711502af860766efcaa2438d5e9d2 100644 index b89cc3f1dc53bc04793ebd2b4075df6e60193a73..0ba08a946155ee4d04a693cf26840a95f315b9a3 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc --- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -674,10 +674,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { @@ -684,10 +684,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
} }
DCHECK(!view_ || !view_->IsAttached()); DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index 4b8f63ccfce891af5c44e09e1e6b3f3ec015508a..4502a7a4f90711502af860766efcaa24
if (!Client()) if (!Client())
return false; return false;
@@ -725,6 +721,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { @@ -738,6 +734,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached()); DCHECK(!view_->IsAttached());
Client()->WillBeDetached(); Client()->WillBeDetached();

View File

@@ -6,12 +6,12 @@ Subject: boringssl BUILD.gn
Build BoringSSL with some extra functions that nodejs needs. Build BoringSSL with some extra functions that nodejs needs.
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index 5691d26cfc2ad56ce05a5bfdbf93a9c52409763a..59223fea644e9bcc8b313ce2bcad680bb7fd1617 100644 index feaef4bfd7f8c04c32f555ab2c61ec838844e355..ed49c4a14a0cd8c3ff0f7ed9c5dd78b385c623ea 100644
--- a/third_party/boringssl/BUILD.gn --- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn
@@ -56,6 +56,21 @@ config("no_asm_config") { @@ -56,6 +56,21 @@ config("no_asm_config") {
all_sources = crypto_sources + ssl_sources + pki_sources + pki_internal_headers all_sources = crypto_sources + ssl_sources + pki_sources + pki_internal_headers
all_headers = crypto_headers + ssl_headers + pki_internal_headers all_headers = crypto_headers + ssl_headers + pki_headers + pki_internal_headers
+if (is_electron_build) { +if (is_electron_build) {
+ # Needed to build a nodejs-compatible boringssl. + # Needed to build a nodejs-compatible boringssl.
@@ -28,6 +28,6 @@ index 5691d26cfc2ad56ce05a5bfdbf93a9c52409763a..59223fea644e9bcc8b313ce2bcad680b
+ ] + ]
+} +}
+ +
if (enable_rust_boringssl) { if (enable_rust) {
rust_bindgen("raw_bssl_sys_bindings") { rust_bindgen("raw_bssl_sys_bindings") {
header = "src/rust/bssl-sys/wrapper.h" header = "src/rust/bssl-sys/wrapper.h"

View File

@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing. to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index f82e41ee24e1dad66fc983492b3bc6461d6a254c..5abab1e18398118ac928d60df302f9f545d27b9f 100644 index 5f6efb0e93bced90de5f6735e303feaa48c71df2..f3a31fdee0e9e75d05aa229a7066a520161c7f61 100644
--- a/base/trace_event/builtin_categories.h --- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h
@@ -82,6 +82,7 @@ @@ -82,6 +82,7 @@

View File

@@ -11,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this
patch. patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 78c84e4ccefb90715d68de15d32d5245027ebb4d..99c80a0d2c23533f2858f61aca11d3b704e0735a 100644 index 4af5b8d5da1c0ae4c5603f49e3a1dbfec422f55e..d21e450d1ee387a72bbe60141285626042a27a35 100644
--- a/chrome/BUILD.gn --- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn +++ b/chrome/BUILD.gn
@@ -188,11 +188,16 @@ if (!is_android && !is_mac) { @@ -189,11 +189,16 @@ if (!is_android && !is_mac) {
"common/crash_keys.h", "common/crash_keys.h",
] ]
@@ -33,10 +33,10 @@ index 78c84e4ccefb90715d68de15d32d5245027ebb4d..99c80a0d2c23533f2858f61aca11d3b7
"//base", "//base",
"//build:branding_buildflags", "//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index c36e93d92b2dfe8cc529a2c6e7c97225f6df3612..489fb82cb0048703b8534d1737565f15d646243b 100644 index 0386b3db3ce09295e4a0b9490c19e85d1e03eb2d..f6d60cc17135dcb7a0125f7c3cc0286307671dff 100644
--- a/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -4788,7 +4788,7 @@ static_library("browser") { @@ -4800,7 +4800,7 @@ static_library("browser") {
# On Windows, the hashes are embedded in //chrome:chrome_initial rather # On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll. # than here in :chrome_dll.
@@ -46,10 +46,10 @@ index c36e93d92b2dfe8cc529a2c6e7c97225f6df3612..489fb82cb0048703b8534d1737565f15
sources += [ "certificate_viewer_stub.cc" ] sources += [ "certificate_viewer_stub.cc" ]
} }
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 21fe4fbfc50d6cae57dc4a07d8cc67b9f9dbc9e3..7ab565f5ec15d9b2ba81ceea30c6162852d31e7c 100644 index d058dee3b853d66ccc5727667382b4821d75577b..3dbbbed08ca3221cf4d949a0c536ea104f6b98d2 100644
--- a/chrome/test/BUILD.gn --- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -7099,9 +7099,12 @@ test("unit_tests") { @@ -7203,9 +7203,12 @@ test("unit_tests") {
"//chrome/browser/safe_browsing/incident_reporting/verifier_test:verifier_test_dll_2", "//chrome/browser/safe_browsing/incident_reporting/verifier_test:verifier_test_dll_2",
] ]
@@ -63,7 +63,7 @@ index 21fe4fbfc50d6cae57dc4a07d8cc67b9f9dbc9e3..7ab565f5ec15d9b2ba81ceea30c61628
"//chrome//services/util_win:unit_tests", "//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources", "//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests", "//chrome/app:win_unit_tests",
@@ -8061,6 +8064,10 @@ test("unit_tests") { @@ -8186,6 +8189,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc", "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
] ]
@@ -74,7 +74,7 @@ index 21fe4fbfc50d6cae57dc4a07d8cc67b9f9dbc9e3..7ab565f5ec15d9b2ba81ceea30c61628
sources += [ sources += [
# The importer code is not used on Android. # The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc", "../common/importer/firefox_importer_utils_unittest.cc",
@@ -8130,7 +8137,6 @@ test("unit_tests") { @@ -8255,7 +8262,6 @@ test("unit_tests") {
} }
deps += [ deps += [

Some files were not shown because too many files have changed in this diff Show More