Compare commits

...

807 Commits

Author SHA1 Message Date
Pedro Pontes
c5346bde08 chore: cherry-pick 933cc81c6bad from chromium (#36222)
* chore: cherry-pick 933cc81c6bad from chromium

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-11-02 09:18:45 -04:00
trop[bot]
c678f7b872 docs: Fixed outdated documentation (uploading to App Store) (#36212)
* Updated docs on uploading

- replaced mention of Application Loader with Apple Transporter, its replacement
- replaced mention of iTunes Connect with App Store Connect
- updated link for creating a record

Co-authored-by: Georgescu Gabriel <29951139+gabi200@users.noreply.github.com>

* Update mac-app-store-submission-guide.md

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Georgescu Gabriel <29951139+gabi200@users.noreply.github.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2022-11-01 16:39:27 -07:00
electron-roller[bot]
3aac61e60c chore: bump chromium to 106.0.5249.168 (21-x-y) (#36185)
chore: bump chromium in DEPS to 106.0.5249.168

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2022-11-01 11:10:23 -04:00
Milan Burda
e91dba1730 build: fix building with enable_plugins = false (#36202)
build: fix building with enable_plugins = false (#36193)

Co-authored-by: Milan Burda <miburda@microsoft.com>

Co-authored-by: Milan Burda <miburda@microsoft.com>
2022-11-01 11:09:55 -04:00
Keeley Hammond
019c05b924 build: determine electron version from tags not files (#36135)
* build: determine electron version from tags not files (#36106)

* build: determine electron version from tags not files

* build: make electron_version dependent on packed-refs and git HEAD

* build: do not delete electron/.git

* build: do not revert a commit we didn't make

* build: gen version file instead of just writing it

* build: update cache and ninja targets

* build: copy resource.h to generated electron.rc

* build: electron_win32_resources should be public deps

* build: also copy the icon

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

* chore: fixup patches

* chore: update patches

* build: ensure get-version runs in the electron git checkout (#36128)

* build: strip v in the getElectronVersion helper

* build: use npm@7 for npm view command

Co-authored-by: MarshallOfSound <marshallofsound@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sam@electronjs.org>
Co-authored-by: Samuel Attard <sattard@salesforce.com>
2022-10-28 13:13:03 -07:00
trop[bot]
0fe2a73f83 build: prefix version in uploader script (#36173)
build: prefix v in uploader script

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

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2022-10-27 17:47:26 -07:00
trop[bot]
69cb9c1581 test: fixup HID test for ARM CI (#36172)
(cherry picked from commit caf28066d6)

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>
2022-10-27 16:47:54 -04:00
trop[bot]
b176c95226 fix: resolve loadURL properly for in-page navigations (#36150)
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>
2022-10-27 16:19:44 -04:00
trop[bot]
fa9ffa77b8 refactor: handle uncaught promise error (#36158)
Co-authored-by: daief <1437931235@qq.com>

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: daief <1437931235@qq.com>
2022-10-27 14:25:43 -04:00
electron-roller[bot]
9870a31225 chore: bump chromium to 106.0.5249.165 (21-x-y) (#36162)
* chore: bump chromium in DEPS to 106.0.5249.165

* 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>
2022-10-27 14:20:54 -04:00
trop[bot]
0ee70e9431 docs: correcting main example in WebRequest documentation (#36160)
docs: correcting main example in WebRequest documentation (#36113)

Correcting main example

The entry `*://electron.github.io` is invalid and produces an exception. i.e.

> UnhandledPromiseRejectionWarning: TypeError: Invalid url pattern *://electron.github.io: Empty path.

Setting a valid path to resolve this issue

Co-authored-by: Shane Gannon <sgannon200@gmail.com>

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shane Gannon <sgannon200@gmail.com>
2022-10-27 14:17:15 -04:00
trop[bot]
47bc841d6c test: fix flake in will-navigate test (#36166)
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>
2022-10-27 14:07:07 -04:00
trop[bot]
a75e369e9c docs: document that when invoke rejects, it gives a different Error (#36147)
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>
2022-10-26 17:28:19 -07:00
electron-roller[bot]
bec207c931 chore: bump chromium to 106.0.5249.120 (21-x-y) (#36145)
chore: bump chromium in DEPS to 106.0.5249.120

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2022-10-26 15:24:02 -04:00
trop[bot]
28b9856094 build: use python3 for appveyor commands (#36132)
Co-authored-by: Samuel Attard <sattard@salesforce.com>

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@salesforce.com>
2022-10-25 20:28:32 -07:00
trop[bot]
ed999f5456 docs: fixed MenuItem documentation to use the same formatting for all role options (#36119)
docs: fixed MenuItem documentation to use the same formatting for all role options (#36112)

Fixed MenuItem documentation

Some of the items in the list of possible roles were formatted differently, which made it harder to read.
Sorry if this was intended, but I found it easier to read with them all formatted the same.

Co-authored-by: flynow10 <37031514+flynow10@users.noreply.github.com>

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: flynow10 <37031514+flynow10@users.noreply.github.com>
2022-10-25 20:45:26 +09:00
trop[bot]
67363441a5 test: exit properly when node-spec-runner validates specs (#36103)
test: exit properly when node spec runner validates specs

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>
2022-10-24 16:29:01 +02:00
George Xu
47dd47d8c4 refactor: migrate from asar to @electron/asar (#36070) (#36087)
* refactor: migrate from asar to @electron/asar (#36070)

* refactor: migrate from asar to @electron/asar

* fix: update asar require calls

* kick ci

Co-authored-by: Samuel Attard <sam@electronjs.org>
2022-10-21 11:14:36 +02:00
trop[bot]
0a34be3e55 test: disable flaky linux arm/arm64 crash test case (#36098)
test: disable failing linux arm/arm64 crash test case

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>
2022-10-21 11:13:32 +02:00
trop[bot]
72eea879e7 fix: printToPDF default margins (#36072)
fix: printToPDF default margins (#36060)

printToPDF default margins

The document printToPDF has a 1cm margin and this default value has been added in the code.

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

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Yusoo <Yusoo@users.noreply.github.com>
2022-10-20 16:34:16 -04:00
trop[bot]
bcfafc4386 fix: headless job tracking in printToPDF (#36064)
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>
2022-10-20 14:28:21 -04:00
Sudowoodo Release Bot
c8c335874a Bump v21.2.0 2022-10-19 08:31:10 -07:00
trop[bot]
de9889e78a docs: update VS Code debugger types to remove "pwa-" prefix (#36053)
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>
2022-10-17 14:17:48 -04:00
trop[bot]
27944d805b fix: override app's desktop name and v8 flags in default-app (#36050)
Co-authored-by: Piroro-hs <Piroro-hs@users.noreply.github.com>

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Piroro-hs <Piroro-hs@users.noreply.github.com>
2022-10-17 13:35:26 +02:00
trop[bot]
8dcdf5c26d fix: remove extra dot in extension (#36027)
* fix: remove extra period of extension

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

* update comment

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

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: mlaurencin <mlaurencin@electronjs.org>
Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>
2022-10-17 09:51:15 +02:00
trop[bot]
cef7f6f99b test: re-enable power monitor tests on arm64 (#36022)
test: re-enable powermonitor on arm64

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>
2022-10-17 15:25:54 +09:00
Keeley Hammond
17d8889e41 ci: use AppVeyor workflows (#36028)
* ci: use AppVeyor workflows (#35377)

* ci: use AppVeyor workflows

* fixup for skipping test on pr jobs

* ci: clean up appveyor.yml to match main

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-10-16 16:20:41 -07:00
trop[bot]
a86510b30c fix: disable nodeIntegrationInWorker for certain Worker types (#36009)
fix: disable nodeIntegrationInWorker for certain Worker types

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>
2022-10-13 17:06:06 -04:00
trop[bot]
0874e61e4f build: fix building with enable_ppapi = false (#36006)
Co-authored-by: Milan Burda <milan.burda@gmail.com>

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2022-10-12 14:00:29 -04:00
electron-roller[bot]
1cb0a98f6c chore: bump chromium to 106.0.5249.119 (21-x-y) (#36001)
chore: bump chromium in DEPS to 106.0.5249.119

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2022-10-12 13:10:16 -04:00
Sudowoodo Release Bot
16a3a456a6 Bump v21.1.1 2022-10-12 08:31:33 -07:00
trop[bot]
7727b7ecba fix: drag and drop should copy on macOS (#35977)
fix: drag and drop should copy on macOS (#35963)

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>
2022-10-12 11:15:33 -04:00
trop[bot]
595ed3e128 fix: webContents.printToPDF option plumbing (#35992)
fix: contents.printToPDF option 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>
2022-10-12 10:05:10 -04:00
trop[bot]
fd52089635 docs: remove references to Widevine (#35990)
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>
2022-10-12 10:02:39 -04:00
trop[bot]
77bc03e051 fix: on-screen-keyboard hides on input blurred in webview (#35982)
* fix: on-screen-keyboard hides on input blurred in webview

Co-authored-by: Kyrylo Hrechykhin <khrechykhin@microsoft.com>

* chore: update patches

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Kyrylo Hrechykhin <khrechykhin@microsoft.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-10-11 23:20:11 +02:00
Raymond Zhao
9f99f4ed0e chore: cherry-pick 30a32e6 from chromium (#35370) (#35970)
chore: apply chromium commit 30a32e6 (#35370)

chore: Apply Chromium commit 30a32e6
2022-10-11 14:55:31 -04:00
trop[bot]
bc27dc4597 fix: expose the built-in electron module via the ESM loader (#35958)
* fix: expose the built-in electron module via the ESM loader

Co-authored-by: Samuel Attard <sattard@salesforce.com>

* Update .patches

* chore: update patches

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@salesforce.com>
Co-authored-by: Samuel Attard <sam@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-10-11 12:32:49 -04:00
trop[bot]
9048de7cab fix: override content::ContentMainDelegate::CreateContentClient() (#35965)
* fix: override content::ContentMainDelegate::CreateContentClient()

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

* chore: remove extra call

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>
2022-10-11 02:37:18 -07:00
electron-roller[bot]
cef4f6a8e7 chore: bump chromium to 106.0.5249.103 (21-x-y) (#35933)
chore: bump chromium in DEPS to 106.0.5249.103

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2022-10-06 14:56:20 -04:00
Samuel Attard
80a4ea2601 chore: cherry-pick c83640db21b5 from chromium (#35925)
* chore: cherry-pick c83640db21b5 from chromium

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-10-06 04:28:52 -07:00
Samuel Attard
0b733793c3 build: fix filesystem permissions from bad trop commits
Ref: 572a9b16a1
Ref: 38955998f5
Ref: 63beca3002
2022-10-05 12:11:06 -07:00
Sudowoodo Release Bot
2b69b32c1d Bump v21.1.0 2022-10-05 08:31:26 -07:00
trop[bot]
63beca3002 docs: update supported Mac versions (#35914)
Co-authored-by: VerteDinde <vertedinde@electronjs.org>

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
2022-10-05 11:05:59 +02:00
electron-roller[bot]
4cd78dfccc chore: bump chromium to 106.0.5249.91 (21-x-y) (#35871)
chore: bump chromium in DEPS to 106.0.5249.91

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2022-10-04 20:31:39 -07:00
trop[bot]
38955998f5 docs: update bluetooth fiddle example event name to trigger correct event (#35907)
Fix event type spelling for bluetooth fiddle example

Co-authored-by: sam <sam.leider@hotmail.com>

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: sam <sam.leider@hotmail.com>
2022-10-04 20:31:25 -07:00
trop[bot]
572a9b16a1 fix: TryCatch scope in node_bindings (#35895)
fix: TryCatch scope in node_bindings

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>
2022-10-04 15:43:19 +02:00
trop[bot]
12d9fe3ab7 fix: set display_id in desktop capturer on Linux (#35836)
fix: set display_id in desktop capturer on Linux (#33861)

Previously, display_id was an empty string, pending Chrome support for
sharing individual screens. Now that this has been added, it is
desirable to have this property set correctly.

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

Co-authored-by: James Cash <james.nvc@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-09-28 22:22:43 +02:00
trop[bot]
32b64170b9 feat: add WebContents.opener and webContents.fromFrame() (#35819)
* feat: add WebContents.opener

* feat: add webContents.fromFrame(frame)

* fix: unknown type name

* test: fix and add more fromFrame cases

* docs: clarified terminology

Co-authored-by: Samuel Maddock <smaddock@salesforce.com>
2022-09-28 12:55:18 -04:00
Sudowoodo Release Bot
cb22573c3e Bump v21.0.1 2022-09-28 08:31:01 -07:00
trop[bot]
78ffd4f604 build: fix deps workflow tag comparison (#35844)
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>
2022-09-27 14:31:39 -07:00
electron-roller[bot]
a183995b09 chore: bump chromium to 106.0.5249.61 (21-x-y) (#35833)
* chore: bump chromium in DEPS to 106.0.5249.61

* 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>
2022-09-27 13:50:51 -04:00
trop[bot]
c21da54311 fix: Handle an electron.d.ts file in a custom build (#35822)
fix: Handle an electron.d.ts file in a custom build (#33979)

* Handle an electron.d.ts file in a custom build

* Fix linter issues

Co-authored-by: Felix Rieseberg <felixr@stripe.com>

Co-authored-by: Felix Rieseberg <felix@felixrieseberg.com>
Co-authored-by: Felix Rieseberg <felixr@stripe.com>
2022-09-26 17:39:09 -04:00
Sudowoodo Release Bot
d3b678a03e Bump v21.0.0 2022-09-26 11:02:36 -07:00
trop[bot]
7bf3913bf3 feat: add support for Web Bluetooth pin pairing (#35818)
* feat: add bluetooth pairing handler

* Update docs/api/session.md

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* Update docs/api/session.md

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* docs: update based on review

* Apply suggestions from code review

Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: update docs per review

* chore: cleanup callback per review

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2022-09-26 13:29:38 -04:00
trop[bot]
c97955017d feat: add app.getSystemLocale() method (#35794)
* feat: add app.getSystemLocale() method

* Update shell/browser/electron_browser_main_parts.cc

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* Change methods to be const

* Apply PR feedback

* Fix mac compile

* Add missing scope

* Apply style changes

* Change note

* Add braces to get the comment indentation right

* Change to static

* Apply PR feedback

* Fix the documentation

* Remove extraneous file

Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-09-26 10:07:06 -07:00
trop[bot]
587abcc0a3 build: fix major dependencies update workflow file (#35817)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-09-26 12:51:23 -04:00
trop[bot]
6e2d2d8d73 fix: potential exception when calling webFrameMainBinding.fromIdOrNull() (#35803)
* fix: potential exception when calling webFrameMainBinding.fromIdOrNull()

* replace try/catch in getWebFrameForEvent

Co-authored-by: Milan Burda <miburda@microsoft.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2022-09-26 08:50:42 -07:00
trop[bot]
f1e4cfaca3 build: remove unused GitHub app config file (#35814)
chore: remove unused GitHub action config file

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2022-09-26 11:29:01 -04:00
Sudowoodo Release Bot
9c3d32a0d3 Revert "Bump v21.0.0-beta.9"
This reverts commit 015be48573.
2022-09-26 06:34:17 -07:00
Sudowoodo Release Bot
015be48573 Bump v21.0.0-beta.9 2022-09-26 06:30:56 -07:00
trop[bot]
9631cee679 feat: allow custom v8 snapshots to be used in the main process and the default snapshot in the renderer process (#35695)
* feat: allow custom v8 snapshots to be used in the main process and the default snapshot in the renderer process (#35266)

* Updates to allow for using a custom v8 snapshot file name

* Allow using a custom v8 snapshot file name

* Fix up patch due to merge

* Use fuse to set up custom v8 snapshot file in browser process

* Refactor to use delegate instead of command line parameter

* Refactoring

* Update due to merge

* PR comments

* Rename patch

* Rename patch

* chore: update patches

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-09-24 12:31:53 -07:00
trop[bot]
0a4b160328 fix: allow docking DevTools with WCO (#35765)
fix: allow for docking devtools with WCO

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-09-23 12:40:47 -07:00
trop[bot]
f3667073e8 docs: update the link for Introduction to Node.js (#35771)
Updated the link for Introduction to NodeJs

Co-authored-by: Aman Gupta <techbugaman@gmail.com>
2022-09-23 11:44:27 -07:00
trop[bot]
3f10c4d1f8 docs: changed event.data to data under the message.port in docs (#35782)
* docs: changed event.data to data under the message.port in docs

* docs: corrected BrowserWindow wrong usage and change window.messagePort to window.electronMessagePort

Co-authored-by: cyrilchukwuebuka <muofunanya3@gmail.com>
2022-09-23 11:35:13 -07:00
electron-roller[bot]
46c473930e chore: bump chromium to 106.0.5249.51 (21-x-y) (#35768)
* chore: bump chromium in DEPS to 106.0.5249.51

* 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>
2022-09-22 22:18:19 +02:00
trop[bot]
38bb3e81d3 fix: compensate for title bar height when setting bounds on BrowserView (#35502)
fix: compensate for title bar height when setting bounds

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-09-22 10:01:11 -07:00
Sudowoodo Release Bot
3dd6c6886b Bump v21.0.0-beta.8 2022-09-22 06:30:57 -07:00
trop[bot]
248ae5dc43 docs: add forge-overview.md (#35759) 2022-09-22 11:56:27 +02:00
trop[bot]
199ccfd840 docs: fix wording mistake in security.md section 4 (#35743)
docs: fix wording mistake in security.md section 4 (#35682)

Update security.md

Under "4. Process Sandboxing", it said "For mor information on what `contextIsolation` is..." which was the previous section (copied from there). This updates it to say "For more information on what Process Sandboxing is..."

Co-authored-by: Sebastian Vittersø <37065184+sebastianvitterso@users.noreply.github.com>
2022-09-21 16:12:40 -04:00
trop[bot]
0ced2338ea fix: crash loading non-standard schemes in iframes (#35517)
* fix: crash loading non-standard schemes in iframes

* test: move fixture to correct location

* chore: update patches

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-09-21 15:25:43 +02:00
trop[bot]
fc1d8a80e6 chore: add missing .eslintrc.json files to limit imports properly (#35747)
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2022-09-20 22:04:31 -05:00
trop[bot]
f18485f8bf chore: fix ambiguous reference gcc compile error (#35734)
Co-authored-by: Bruno Pitrus <brunopitrus@hotmail.com>
2022-09-20 12:22:42 -05:00
trop[bot]
3437ffca8b fix: edge case in app.isInApplicationsFolder() (#35730)
fix: edge case in app.isInApplicationsFolder() (#35636)

* fix: edge case in IsInApplicationsFolder

* use realpath instead

* lint

* revert lowercasing

* optimize

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

* lint

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

Co-authored-by: Kishan Bagaria <hi@kishan.info>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-09-19 16:50:46 -04:00
trop[bot]
a1789897d3 fix: uv_os_gethostname failing on Windows 7 (libuv patch regression) (#35704)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2022-09-19 08:31:58 -07:00
trop[bot]
64b5d7be2e build: update .nvmrc Node.js version from 14 to 16 (#35700)
Update `.nvmrc` Node.js version from 14 to 16

The `DEPS` file states that Electron is on Node.js ^16.x. I am guessing that the PR bumping to Node.js 16 overlooked the `.nvmrc` file, which is updated in this PR. If leaving the `.nvmrc` file on 14 was intentional, please disregard this PR.

Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
2022-09-19 10:27:52 -04:00
Sudowoodo Release Bot
8b6b882487 Bump v21.0.0-beta.7 2022-09-19 06:30:51 -07:00
trop[bot]
99d9537ef7 build: fix building with enable_basic_printing false (#35693)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2022-09-15 15:20:47 -07:00
trop[bot]
b5cf0ad971 feat: webFrameMain.origin (#35534)
* feat: webFrameMain.origin

* add tests

* update docs

* fix spec

Co-authored-by: Jeremy Rose <japthorp@slack-corp.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2022-09-15 15:20:20 -07:00
trop[bot]
c5e920e361 build: make check-symlinks.js aware of BRANDING.json changes (#35669)
Right now the `check-symlinks.js` assumes that the branding product name
is "Electron". If users change `BRANDING.json` on custom builds, the
script will fail.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Co-authored-by: Juan Cruz Viotti <jv@jviotti.com>
2022-09-15 14:05:12 -07:00
Sudowoodo Release Bot
cb08a466ac Bump v21.0.0-beta.6 2022-09-15 13:31:46 -07:00
trop[bot]
afd392b921 docs: add back docs about asar archives (#35667)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2022-09-15 13:17:39 -07:00
Keeley Hammond
908751b4f1 chore: update filenames.libcxx.gni (#35689)
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2022-09-15 13:17:05 -07:00
electron-roller[bot]
5e7ff852f3 chore: bump chromium to 106.0.5249.40 (21-x-y) (#35686)
* chore: bump chromium in DEPS to 106.0.5249.40

* 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>
2022-09-15 13:13:25 -07:00
trop[bot]
cbf5843c9a fix: WCO occlusion of DevTools (#35688)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-09-15 19:06:18 +02:00
Sudowoodo Release Bot
a2c687fcc3 Revert "Bump v21.0.0-beta.6"
This reverts commit b0b8fc2688.
2022-09-15 09:38:03 -07:00
Sudowoodo Release Bot
b0b8fc2688 Bump v21.0.0-beta.6 2022-09-15 06:30:59 -07:00
trop[bot]
12992b253c chore: make macOS spellchecker fns formal no-ops (#35679)
* chore: make macOS spellchecker fns formal no-ops

* docs: correct no-op note

* test: add no-op specs

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-09-14 16:53:53 -07:00
trop[bot]
8becf52f11 fix: allow maximizing when window enters tablet mode with WCO (#35664)
* fix: Backport CL 3753528 for WCO

* Update comment

* Update shell/browser/ui/views/win_caption_button_container.cc

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

Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: Robo <hop2deep@gmail.com>
2022-09-14 02:29:38 -07:00
trop[bot]
fad97e0b06 docs: improve registerFileProtocol example (#35599)
docs: improve registerFileProtocol example (#35580)

* improve registerFileProtocol example

* link ProtocolResponse

* kick lint

Co-authored-by: Kishan Bagaria <hi@kishan.info>
2022-09-13 13:51:45 -07:00
trop[bot]
672464d900 docs: fix typescript error in code samples (#35656)
Fixed typescript error

Co-authored-by: Leon Schwanitz <leon@28minds.com>
2022-09-13 13:36:23 -07:00
electron-roller[bot]
aaf560817b chore: bump chromium to 106.0.5249.30 (21-x-y) (#35423) 2022-09-13 09:36:58 -07:00
trop[bot]
f9b2608f2c docs: update sandbox renderer defaults for Electron 20 (#35615)
docs: update sandbox renderer defaults for Electron 20 (#35379)

* docs: update E20 sandbox rendering defaults

* docs: update tutorial

* simplify paragraph

* dont mention context isolation

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2022-09-13 09:33:40 -07:00
trop[bot]
135c8c34ec fix: ensure history navigations are sandboxed-iframe-aware (#35623)
Co-authored-by: Jeremy Spiegel <jeremy.spiegel@frontapp.com>
2022-09-13 08:14:46 -07:00
trop[bot]
fb4990a537 docs: fix misspelling in fuses (#35620)
Co-authored-by: CanadaHonk <19228318+CanadaHonk@users.noreply.github.com>
2022-09-13 08:12:05 -07:00
trop[bot]
8ce7209b9b fix: potential "Object has been destroyed" error in BrowserWindow.getFocusedWindow (#35646)
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2022-09-13 08:06:19 -07:00
trop[bot]
a1e792f48a docs: Use inline image link in faq.md (#35648)
* Use absolute URL in faq.md image link

The relative link is rendered relative to the host domain, which works fine when viewing it on Github, but since you also use the same generated HTML in your doc site, the link is broken. See here: https://www.electronjs.org/docs/latest/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do

Using an absolute URL here should fix the issue on the main site.

* Use inline image reference for subpixel rendering example

As suggested by @dsanders11

Co-authored-by: Adrian Petrescu <adrian@apetre.sc>
2022-09-13 08:04:49 -07:00
Sudowoodo Release Bot
91969330dd Bump v21.0.0-beta.5 2022-09-12 06:31:02 -07:00
trop[bot]
686a554c6a fix: Set background for WCO container (#35612)
* fix: Set background for WCO container

* Add background when invalidating as well

Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
2022-09-08 09:59:16 -07:00
Sudowoodo Release Bot
62b64e6e60 Bump v21.0.0-beta.4 2022-09-08 06:31:18 -07:00
trop[bot]
a5db8a3d53 fix: session.getBlobData never resolves with blob sizes > 65536 (#35602)
fix: session.getBlobData never resolves with blob sizes > 65536 (#35277)

* fix: session.getBlobData never resolves with blob sizes > 65536 (#34398)

* Add unit test case for session.getBlobData

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

Co-authored-by: Frank Pian <bianyongfang@vip.qq.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-09-08 06:46:39 -04:00
trop[bot]
85f93bc5bf docs: add fuses and asar integrity docs (#35596)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2022-09-07 14:07:58 -04:00
Sudowoodo Release Bot
605ee9e28a Bump v21.0.0-beta.3 2022-09-06 15:03:08 -07:00
Samuel Attard
e48878ea63 chore: cherry-pick 9b5207569882 from chromium (#35543)
* chore: cherry-pick 9b5207569882 from chromium

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-09-06 10:27:46 -07:00
trop[bot]
e78aa6af16 fix: screen.getCursorScreenPoint() crash on Wayland (#35575)
fix: screen.getCursorScreenPoint() crash on Wayland

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-09-06 12:18:03 -04:00
Sudowoodo Release Bot
fb0bbf0100 Bump v21.0.0-beta.2 2022-09-01 06:31:01 -07:00
trop[bot]
5e8b4bd86f fix: crash when switching origins with emulation settings set (#35488)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-08-31 11:20:10 +09:00
Sudowoodo Release Bot
da47103ad7 Bump v21.0.0-beta.1 2022-08-30 10:11:56 -07:00
trop[bot]
7b62386296 fix: crash on WebWorker destruction (#35492)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-08-30 13:58:28 +02:00
trop[bot]
018bc0993e chore: use nghttp2's config.h on all platforms (#35487)
https://github.com/nodejs/node/pull/27283

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-08-30 10:57:32 +02:00
Sudowoodo Release Bot
f9b02358c6 Bump v21.0.0-alpha.6 2022-08-29 15:51:14 -07:00
trop[bot]
23aa6e5084 build: update libcxx filenames (#35497)
* build: update libcxx filenames

* build: change upload_to_storage variable

Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2022-08-29 15:50:06 -07:00
Sudowoodo Release Bot
65a2c18560 Revert "Bump v21.0.0-alpha.6"
This reverts commit c8b3e23f31.
2022-08-29 10:36:52 -07:00
Sudowoodo Release Bot
c8b3e23f31 Bump v21.0.0-alpha.6 2022-08-29 09:19:34 -07:00
trop[bot]
4ab9295e62 chore: delete implicit fallthrough patch (#35469)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-08-29 15:25:38 +02:00
trop[bot]
0e79733404 docs: update docs description to match sidebar (#35482)
Update introduction.md

Co-authored-by: Nik K <nk@nikk.ca>
2022-08-29 12:28:21 +02:00
trop[bot]
38d408a26b fix: pass rfh instances through to the permission helper (#35467)
* fix: pass rfh instances through to the permission helper

* refactor: use WeakDocumentPtr instead of frame node id

* fix: handle missing initiator document

* fix: dispatch openExternal event for top level webview navs still

Co-authored-by: Samuel Attard <sattard@salesforce.com>
2022-08-29 09:52:53 +02:00
trop[bot]
0ad176fd13 fix: fullscreen crashing with roundedCorners: false (#35454)
fix: fullscreen crashing with roundedCorners

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-08-25 15:52:24 +02:00
trop[bot]
a3cfd1a206 fix: Node.js atob input validation (#35443)
fix: Node.js atob input validation

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-08-25 15:08:20 +02:00
trop[bot]
63fe34c703 build: fix export patches to work when source directory does not exist (#35437)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-08-25 10:18:11 +09:00
trop[bot]
c99a52eab4 chore: bump chromium to 106.0.5216.0 (21-x-y) (#35363)
* chore: bump chromium to 106.0.5216.0 (main) (#34993)

* Trigger Build

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-08-23 15:22:47 -04:00
trop[bot]
95eb6ea772 fix: undefined details.requestingUrl from session.setPermissionCheckHandler (#35409)
fix: undefined details.requestingUrl from setPermissionCheckHandler

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2022-08-23 10:27:14 -04:00
trop[bot]
8d6c29ecbc fix: add restore event for minimized maximization (#35410)
Co-authored-by: mlaurencin <mlaurencin@electronjs.org>
2022-08-23 14:39:46 +02:00
trop[bot]
637824e086 fix: promise support with webFrameMain.executeJavaScript (#35359)
* fix: promise support with webFrameMain.executeJavaScript

* chore: reject when result is an error

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2022-08-23 11:39:59 +02:00
trop[bot]
cb6fa8268f fix: ensure chrome colors are initialized (#35401)
* fix: ensure chrome colors are initialized

* build: fix linking on windows

* build: fix linking on windows

* build: add needed files to chromium_src/BUILD

Co-authored-by: Samuel Attard <sattard@salesforce.com>
Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
2022-08-23 11:19:32 +02:00
Sudowoodo Release Bot
76e8536ca8 Bump v21.0.0-alpha.5 2022-08-22 16:25:16 -07:00
trop[bot]
b075434447 fix: IPC emit order in -ipc-ports handler (#35364)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2022-08-18 18:00:45 -07:00
Sudowoodo Release Bot
9673d29ebe Bump v21.0.0-alpha.4 2022-08-18 12:05:12 -07:00
trop[bot]
5e6d152231 fix: don't bypass redirect checks (#35366)
Co-authored-by: Jeremy Rose <japthorp@slack-corp.com>
2022-08-18 10:09:18 -07:00
trop[bot]
b31a4b4394 fix: Frameless window shows frame while opening (#35353)
* fix: Frameless window shows frame while opening

* Clarify comments

* Inline setter

* Edit comment

Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
2022-08-17 15:20:20 -07:00
trop[bot]
28ca18a912 feat: add WebContents.ipc (#35231)
feat: add WebContents.ipc (#34959)

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2022-08-17 09:50:15 -07:00
trop[bot]
8caea9006a fix: add uv_loop_close when object release to fix crash (#35336)
Co-authored-by: yangzuohui <yangzuohui@bytedance.com>
2022-08-16 17:03:05 +09:00
trop[bot]
855536bcb9 refactor: simplify Browser::SetLoginItemSettings (#35329)
refactor: simplify Browser::SetLoginItemSettings

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-08-15 16:43:48 -04:00
trop[bot]
1978a0b5fe fix: serialPort.open() failing (#35339)
fix: serialPort.open() failing

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-08-15 13:53:00 -04:00
Sudowoodo Release Bot
fe70152b43 Bump v21.0.0-alpha.3 2022-08-15 08:42:41 -07:00
trop[bot]
9b38a25206 docs: add Electron deps to license credits file (#35332)
* docs: add Electron deps to license credits file

* fixup! docs: add Electron deps to license credits file

remove nan; it is dev-only

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-08-15 10:42:39 -04:00
trop[bot]
a66d3bf206 docs: removes unused import in preload script (#35334)
* Remove unused import of path

This import gives out the error in the preload script:

Error: module not found: path
    at preloadRequire

* Remove import path as it is not used in the script

note: Removes import path as it is not used in the script

Co-authored-by: Rhitik Bhatt <bhattrhitik95@gmail.com>
2022-08-15 17:06:50 +09:00
Sudowoodo Release Bot
752b10f16f Bump v21.0.0-alpha.2 2022-08-11 09:37:32 -07:00
trop[bot]
5803a67963 docs: fix getStoragePath return type (#35296)
Fixes #35255

Co-authored-by: Samuel Attard <sam@electronjs.org>
2022-08-10 22:42:17 +02:00
trop[bot]
40058af821 fix(docs): fix a typo in section on debugging with VSCode (#35285)
fix(docs): fix a typo

Co-authored-by: Trang Le <trang.thule@zoho.com>
2022-08-09 15:30:29 -07:00
trop[bot]
64b40ea69c docs: update tray docs with info for mac menubar icons (#35221)
Co-authored-by: Brad Carter <16466430+carterbs@users.noreply.github.com>
2022-08-09 09:01:10 +09:00
trop[bot]
7c6e16975f fix: app.relaunch loses args when execPath specified (#35254)
fix: app.relaunch loses args when execPath specified (#35108)

Co-authored-by: Aaron Meriwether <me@ameriwether.com>
2022-08-09 08:54:58 +09:00
trop[bot]
c9e7f33f7e test: temporarily disable tests on mas arm64 that are causing a crash (#35247)
* test: temporarily disable test on mas arm64 that is causing crash

* disable the right test

* chore: speculative fix for CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER crash

* enable all the tests

* Revert "chore: speculative fix for CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER crash"

This reverts commit b7c8ef364c.

* test: disable tests that crash on mas arm64

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-08-08 10:02:58 -04:00
Sudowoodo Release Bot
98aa0ef090 Bump v21.0.0-alpha.1 2022-08-03 07:37:56 -07:00
TAN
c47031a279 docs: Fix the URL bugs at tutorial-6-publishing-updating.md (#35175)
* Update tutorial-6-publishing-updating.md

The dot at the end of the URL will depend on the site that cannot open. Because it will open `https://update.electronjs.org./` which does not exist.

* docs: fix the URL problems at tutorial-6-publishing-updating.md

The dot at the end of the URL will depend on the site that cannot open. Because it will open `https://update.electronjs.org./` which does not exist.

* docs: fix the URL problems at tutorial-6-publishing-updating.md

* docs: fix the URL problems at tutorial-6-publishing-updating.md
2022-08-03 10:20:37 -04:00
Erick Zhao
74432a313c docs: fix link in tutorial (#35192)
Relands https://github.com/electron/electronjs.org-new/pull/240 upstream
2022-08-03 10:12:06 -04:00
Sudowoodo Release Bot
4e919c919c Bump v21.0.0-nightly.20220803 2022-08-03 06:01:39 -07:00
Maya Nedeljković Batić
fb39f241fb docs: update categories to match sidebar (#35196)
This page describes each of the categories available in the sidebar, but some of the category titles didn't match.
2022-08-03 12:03:45 +02:00
Cheng Zhao
afa4f5052b fix: consider dock space when showing menu (#35194) 2022-08-03 17:52:42 +09:00
msizanoen1
7b8fb2b074 fix: Wayland general CSD fixes (#34955)
* fix: broken wayland window decorations due to botched chromium update

The `GetTitlebarBounds().height()` is obviously intended to be placed in
the `top` parameter, which used to be the second one before upstream
removed multi-parameter `gfx::Rect::Inset`, but it's the first parameter
for `gfx::Insets::TLBR`, which was intended to replace the removed
`Inset` function. However, whoever updated Chromium kept the parameter
unchanged, causing the title bar height to be passed to the `left`
parameter, causing the window title bar to be unclickable.

* fix: wayland window top bar buttons unclickable

Use NonClientFrameView::TargetForRect for the ClientFrameViewLinux
implementation because the default inherited from FramelessView blocks
any non-HTCLIENT events.

* fix: add maximized parameter to LinuxUI::GetWindowFrameProvider

* fix: pass frame_->IsMaximized() to GetWindowFrameProvider

This ensures that the toolkit renders the window decorations in maximized mode
while the window is maximized to ensure that there is no empty space around the window.
2022-08-03 17:51:52 +09:00
Cheng Zhao
4e8480b15b chore: fix linking with component ffmpeg (#35178) 2022-08-03 16:51:30 +09:00
Keeley Hammond
3fe00d75e9 chore: update NMV for Electron 21 (#35124) 2022-08-02 12:57:42 -07:00
Jeremy Rose
3d4d1b33ba fix: fail non-fatally when InitLogging fails (#35138) 2022-08-02 15:45:30 -04:00
Robo
53cd23159e chore: remove unsupported skiptaskbar linux impl (#35179)
chore: unsupported skiptaskbar linux impl
2022-08-02 11:53:36 -07:00
Sudowoodo Release Bot
31be6ecf7b Bump v21.0.0-nightly.20220802 2022-08-02 06:01:38 -07:00
Robo
e3893632e7 fix: touch events not recognized by WCO on windows (#35117) 2022-08-02 12:13:58 +09:00
Michaela Laurencin
0cdc946b27 fix: modify file extension generation on Windows (#34723)
* fix: modify file extension generation on Windows

* modify includes

* include vector in header

* add win build flags

* remove hardcoded strings

* Update shell/browser/electron_download_manager_delegate.h

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* fix string manipulation and function definitions

* Update electron_download_manager_delegate.h

* convert to std::string and modify for electron

* Update shell/browser/electron_download_manager_delegate.cc

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* remove vector include and update conversion

* add vectr include for lint

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-08-02 09:40:17 +09:00
John Kleinschmidt
0d36c0cdc6 ci: turn off windows on arm test result comments (#35142) 2022-08-01 18:59:20 -04:00
Shelley Vohr
7588bb7425 fix: DCHECK entering fullscreen while loading url (#35111)
* fix: DCHECK entering fullscreen while loading url

* spec: fixup test
2022-08-01 16:52:58 -04:00
Keeley Hammond
6c17dd2296 fix: ensure native modules use the correct config (#35159)
* fix: ensure native modules are built with config.gypi

This works by patching node.h to check that two defines are set using the equivilant of an XNOR operation.  One define "ELECTRON_ENSURE_CONFIG_GYPI" is set via common.gypi which is _already_ used to build native modules and has been since the dawn of time.  Therefore this define will be set for all native module compilations targetting the Electron runtime.  The second define "USING_ELECTRON_CONFIG_GYPI" is only defined when the gypi argument "using_electron_config_gypi" is set to 1 which is only done so via config.gypi.  Only new enough versions of node-gyp correctly use the config.gypi file thus resulting in a compilation error on version of node-gyp that are too old.

* chore: fix lint

Co-authored-by: Samuel Attard <sattard@salesforce.com>
2022-08-01 07:52:26 -07:00
Sudowoodo Release Bot
29434ee7c6 Bump v21.0.0-nightly.20220801 2022-08-01 06:01:38 -07:00
Charles Kerr
b67c69d741 fix: remove skip-taskbar feature on Linux. (#35123) 2022-08-01 12:42:02 +02:00
Kilian Valkhof
00e9bf107a docs: new main -> renderers messageChannel example (#34978)
* docs: new main -> renderers messageChannel example

* consistent use of your

* fix a typo

* linting

* markdown linting

* Update docs/tutorial/message-ports.md

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

* update code example headings, reference contextIsolation example

* remove nodeIntegration: false from browserWindows

* rename "messagePort" to "electronMessagePort" for compatibility

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2022-07-29 09:47:43 -07:00
Shelley Vohr
9028bb79a8 fix: empty result of webContents.getUserAgent() (#35069)
fix: empty result of webContents.getUserAgent()
2022-07-29 11:09:47 -04:00
Sudowoodo Release Bot
8004cb8722 Bump v21.0.0-nightly.20220729 2022-07-29 06:00:43 -07:00
Sofia Nguy
7f757075bc docs: update E21 release date (#35122)
* docs: update E21 release date

* chore: fix lint

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2022-07-28 21:54:48 -07:00
John Kleinschmidt
674596d11e ci: switch to GHA for WOA (#35109)
* ci: switch to GHA for WOA

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-07-28 19:05:59 -04:00
Sudowoodo Release Bot
3c2ec2280e Bump v21.0.0-nightly.20220728 2022-07-28 06:03:11 -07:00
Jeremy Rose
de1cec8693 test: migrate shell specs to main process (#35058) 2022-07-27 09:18:33 -07:00
Sudowoodo Release Bot
99c2706376 Bump v21.0.0-nightly.20220727 2022-07-27 06:01:22 -07:00
Stuart Schechter
63593ffb22 docs: don't wait for ready event to register open-url listener (#35019)
* Update app.md

Add warning about late registration of the open-url event.

* Update app.md
2022-07-27 14:00:35 +02:00
Samuel Attard
b0c6fb5152 chore: add electon deps to //src gitignore (#35065) 2022-07-27 13:15:34 +02:00
Jeremy Rose
77b4aab720 test: migrate the rest of the webFrame tests to main (#35080) 2022-07-27 11:10:14 +02:00
Jeremy Rose
7c2ed98214 test: migrate more chromium specs to main (#35081) 2022-07-27 11:10:04 +02:00
Charles Kerr
62001dc6cb fix: crash on startup in X11 (#35075)
Fixes #34996.
2022-07-27 13:44:44 +09:00
Keeley Hammond
ff804e3a74 fix: use win_clang_x64 binary for x86 extract symbols (#35078)
fix: use win_clang_x64 for x86 extract symbols
2022-07-27 13:33:07 +09:00
Ian German Mesner
9416091180 fix: allow setsize to be called within a move or resize for preventDefault (#34843)
fix: #34599 allow setsize to be called within a move or resize for preventDefault
2022-07-27 09:02:06 +09:00
Jeremy Rose
6d9e8b65bc test: add process module tests for main process (#35057) 2022-07-26 15:42:50 -07:00
Shelley Vohr
b42fd1ddca fix: handle WCO pressed state when going maximized -> minimized (#35070) 2022-07-26 13:30:15 -04:00
John Kleinschmidt
182ab9ad76 test: remove duplicate test that is causing hang in Windows (#35071) 2022-07-26 13:28:59 -04:00
Jeremy Rose
77e1a046ec test: move chromium spec config to its own folder (#35063) 2022-07-26 09:37:11 -07:00
Devin Foley
0be73d18ef fix: Make disable_color_correct_rendering patch work again (#35050)
Fix disable_color_correct_rendering patch.
2022-07-26 09:35:10 -07:00
Jeremy Rose
c842f63383 test: migrate process module specs to spec-main (#35056) 2022-07-26 09:31:26 -07:00
Sudowoodo Release Bot
6674082041 Bump v21.0.0-nightly.20220726 2022-07-26 06:01:07 -07:00
Jeremy Rose
cabfb8507d test: remove references to robotjs (#35064) 2022-07-26 01:12:04 -07:00
Jeremy Rose
aa40652456 test: remove unused spec/expect-helpers (#35055) 2022-07-26 09:57:12 +02:00
Jeremy Rose
dd68fae081 test: migrate nativeImage specs to main (#35062)
* test: move nativeImage specs to main

* simplify test
2022-07-26 09:57:01 +02:00
Jeremy Rose
ad1bbc198b test: migrate clipboard spec to spec-main (#35059) 2022-07-26 09:37:37 +02:00
electron-roller[bot]
2c51a81e85 chore: bump node to v16.16.0 (main) (#34853)
* chore: bump node in DEPS to v16.16.0

* chore: update patches

* 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>
2022-07-25 17:06:52 -04:00
John Kleinschmidt
648c9934c0 fix: properly fire serial-port-added and serial-port-removed events (#34958)
Based on 2309652: [webhid] Notify chooser context observers on shutdown | https://chromium-review.googlesource.com/c/chromium/src/+/2309652
2022-07-25 10:50:19 -04:00
Sudowoodo Release Bot
aeba6ca973 Bump v21.0.0-nightly.20220725 2022-07-25 06:01:47 -07:00
Mike Lee
49302e4a2f docs: Add missing link to tutorial page (#35035)
Add missing link to tutorial page
2022-07-25 11:22:06 +02:00
Shelley Vohr
57c265198e refactor: use Get/SetID from views:View in Button (#35022) 2022-07-25 09:46:14 +02:00
Keeley Hammond
08dd38d9be docs: update build dependencies for Fedora (#35024) 2022-07-25 15:25:42 +09:00
Sudowoodo Release Bot
dd82a26e95 Bump v21.0.0-nightly.20220722 2022-07-22 06:01:06 -07:00
Jeremy Rose
3c63f075bd chore: remove unused WebContents._sendToFrameInternal (#35010) 2022-07-21 10:25:54 -07:00
Sudowoodo Release Bot
fec4cca8d4 Bump v21.0.0-nightly.20220721 2022-07-21 06:01:19 -07:00
Shelley Vohr
1ed191114a fix: clean up callback handling in webContents.print() (#34894)
* refactor: clean up callback handling in webContents.print()

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-07-21 12:46:15 +02:00
Milan Burda
d4e97483aa refactor: only create webContents after 'will-attach-webview' (#32941) 2022-07-21 11:29:31 +02:00
dependabot[bot]
7ae3025fd5 build(deps): bump terser from 4.6.7 to 4.8.1 (#34987)
Bumps [terser](https://github.com/terser/terser) from 4.6.7 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-21 11:15:00 +02:00
Valentin Hăloiu
67eda4bcc8 fix: add support for --ozone-platform-hint flag on Linux (#34937) 2022-07-21 10:37:54 +02:00
Sudowoodo Release Bot
9f0e7126c4 Bump v21.0.0-nightly.20220720 2022-07-20 08:02:19 -07:00
Keeley Hammond
be7f90481d build: update mediastreamdevicescontroller.patch (#34995) 2022-07-20 08:00:31 -07:00
Sudowoodo Release Bot
6dc1218c37 Revert "Bump v21.0.0-nightly.20220720"
This reverts commit cffcd0d47a.
2022-07-20 07:14:04 -07:00
Sudowoodo Release Bot
cffcd0d47a Bump v21.0.0-nightly.20220720 2022-07-20 06:01:09 -07:00
electron-roller[bot]
9e0a3c44dd chore: bump chromium to 105.0.5187.0 (main) (#34921)
* chore: bump chromium in DEPS to 105.0.5179.0

* chore: update patches

* 3758224: Reland^2 "[flags] Enable freezing of flags"

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

* chore: bump chromium in DEPS to 105.0.5181.0

* chore: update patches

* chore: bump chromium in DEPS to 105.0.5183.0

* chore: bump chromium in DEPS to 105.0.5185.0

* chore: bump chromium in DEPS to 105.0.5187.0

* chore: update patches

* 3723298: Pass RemoteFrame mojo channels through its creation messages.

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

* 3737382: [Code Heath] Replace base::{ListValue,DictionaryValue} in skia et al

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

* Pass RemoteFrame mojo channels through its creation messages.

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

* Changed PrintRenderFrame.PrintWithParams mojo interface to use callback.

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

* 3738183: [CSP] Add support for `DisableWasmEval`

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

* 3740498: Move LinuxUI from //ui/views/linux_ui to //ui/linux

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

* 3558277: Moves subsystem and semantics to enum class

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

* chore: fix broken steps-electron-gn-check

* 3749583: [arm64] Fix undefined symbol linker error

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

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: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-07-20 13:03:34 +02:00
Shelley Vohr
1b96a3aa1d build: consolidate gn templates (#34918) 2022-07-20 11:14:54 +02:00
Jeremy Rose
3c7d446fad refactor: unduplicate MediaStreamDevicesController (#34895)
* refactor: unduplicate MediaStreamDevicesController

* restore old logic for GUM_* request types

* lint

* gn format

* add test for unsupported getDisplayMedia

* simplify + comment
2022-07-20 17:09:14 +09:00
Alexander Petrov
60b6e74e3f fix: merge crash annotations instead of overwriting (#34795)
ElectronCrashReporterClient::GetProcessSimpleAnnotations() merges
annotations provided as argument with global_annotations_,
preserving useful information.
2022-07-19 09:18:04 -07:00
Sudowoodo Release Bot
ba25714e16 Bump v21.0.0-nightly.20220719 2022-07-19 06:01:27 -07:00
Shelley Vohr
05d4966251 fix: delegate to PrintViewManagerBase on failed print (#34893)
fix: delegate to PrintViewManagerBase on failed print
2022-07-19 14:46:08 +02:00
Shelley Vohr
eb8c9452cb fix: crash on BrowserWindow.setEnabled() (#34904)
fix: crash on BrowserWindow.setEnabled()
2022-07-19 12:31:49 +02:00
Shelley Vohr
38848c5bf7 test: optionally validate disabled Node.js specs (#34899) 2022-07-19 12:14:21 +02:00
Shelley Vohr
57b02e153d fix: potential hang on print settings failure (#34892) 2022-07-19 11:45:10 +02:00
John Kleinschmidt
8a0df1f487 ci: wait longer for goma to be ready (#34956) 2022-07-19 10:20:16 +02:00
Sudowoodo Release Bot
c4cde78818 Bump v21.0.0-nightly.20220718 2022-07-18 06:01:46 -07:00
Samuel Attard
f1746c81c6 fix: do not define _LIBCPP_ABI_NAMESPACE=Cr for all native modules (#34932)
This define is only needed when linking against Chromiums libc++ which we currently
do not ship / expose the symbols of.  We probably should make those symbols visible and
actually ensure that electron-rebuild et. al link against our libc++ instead of the system libc++
but for now this fixes compilation issues on macOS where the default system clang links to the system libc++
which does not (obviously) use the Chromium ABI namespace.

For our nan tests which do link against Chromiums libc++ we define the ABI namespace in the spec runner.
2022-07-15 16:57:29 -07:00
Sudowoodo Release Bot
9d23a624c1 Bump v21.0.0-nightly.20220715 2022-07-15 15:12:54 -07:00
Keeley Hammond
574da5a9a1 chore: cherry-pick 5e227bebf193 from v8 (#34931)
* chore: cherry-pick 5e227bebf193 from v8

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-07-15 15:12:01 -07:00
Sudowoodo Release Bot
2afb284456 Revert "Bump v21.0.0-nightly.20220715"
This reverts commit 4bec26cd0c.
2022-07-15 07:32:25 -07:00
Sudowoodo Release Bot
4bec26cd0c Bump v21.0.0-nightly.20220715 2022-07-15 06:01:14 -07:00
Sudowoodo Release Bot
0cb39b5bb5 Revert "Bump v21.0.0-nightly.20220714"
This reverts commit e9f42b4ad4.
2022-07-14 08:12:33 -07:00
Sudowoodo Release Bot
e9f42b4ad4 Bump v21.0.0-nightly.20220714 2022-07-14 06:03:36 -07:00
Samuel Attard
9a5d759ea3 fix: ensure that v8 sandbox isnt enabled for arm (#34914) 2022-07-14 10:46:41 +02:00
electron-roller[bot]
d32e6cc252 chore: bump chromium to 105.0.5173.0 (main) (#34770)
* chore: bump chromium in DEPS to 105.0.5147.0

* chore: update chromium/can_create_window.patch

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

fix minor code shear in patch

* chore: update chromium/port_autofill_colors_to_the_color_pipeline.patch

Xref: chromium/port_autofill_colors_to_the_color_pipeline.patch

fix minor code shear in patch

* chore: remove chromium/posix_replace_doubleforkandexec_with_forkandspawn.patch

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

Removing upstreamed patch

* chore: update patches

* chore: update patches

* chore: add new enum kOffscreenDocument to switch statement

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

* chore: add stub for new parent virtual method OnNewCropVersion()

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

* chore: remove download_schedule arg from DownloadTargetCallback invocation

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

Clean up DownloadLater flags and prefs

* chore: add stub for new parent virtual method OnNewCropVersion()

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

* chore: use base::List for extensions::Event

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

Remove Event constructor overloads that take vector<base::Value>

* refactor: replace ClearStorageDataOptions.origin with .storage_key

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

Refactor ClearData to take StorageKey

* chore: bump chromium in DEPS to 105.0.5149.0

* chore: update patches

* refactor: migrate InspectableWebContents to base::Value::List

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

Migrate DevToolsEmbedderMessageDispatcher to base::Value::List.

* refactor: update electron_api_clipboard_mac Clipboard::ReadFindText()

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

Mac: Remove unused FindPasteboard C++ interface

* chore: bump chromium in DEPS to 105.0.5151.0

* chore: fix code shear in chromium/build_do_not_depend_on_packed_resource_integrity.patch

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

Move Cart DB proto to //components/commerce

* Revert "chore: fix code shear in chromium/build_do_not_depend_on_packed_resource_integrity.patch"

This reverts commit f8de4605eb3d35152b186646fefd8e88d1df836b.

* chore: fix code shear in chromium/build_do_not_depend_on_packed_resource_integrity.patch

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

Move Cart DB proto to //components/commerce

* chore: update patches

* chore: update ElectronAccessibilityUIMessageHandler to use base::Value::List

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

Convert /chrome/browser/accessibility away from WebUI::RegisterDeprecatedMessageCallback

* chore: bump chromium in DEPS to 105.0.5153.0

* chore: bump chromium in DEPS to 105.0.5155.0

* chore: bump chromium in DEPS to 105.0.5157.0

* chore: bump chromium in DEPS to 105.0.5159.0

* chore: update patches

* chore: update CL reference

* Replace ContentMainDelegate::InvokedIn with a variant

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

* Switch devtools_frontend.mojom to mojom.DictValue.

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

* webhid: Bind HID service with service workers

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

* chore: fix lint

* Don't fire load-complete AX notification on macOS for unfocused windows

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

* chore: update patches

* chore: bump chromium in DEPS to 105.0.5165.0

* chore: update patches

* chore: bump chromium in DEPS to 105.0.5167.0

* chore: bump chromium in DEPS to 105.0.5169.0

* chore: bump chromium in DEPS to 105.0.5171.0

* chore: update patches

* chore: bump chromium in DEPS to 105.0.5173.0

* chore: update patches

* 3743346: Stop generating unsupported policies on macOS

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

* 3727612: [Bluetooth][Win] Refactor pairing prompt code

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

* 3737325: system-extensions: Move IsEnabled() out of SystemExtensionsProvider.

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

* 3748635: Remove RenderView from the public API.

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

* fixup: 3743346: Stop generating unsupported policies on macOS

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: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-07-13 17:26:16 -04:00
Gellert Hegyi
440c575aa6 fix: alwaysOnTop browser window option for X11 Linux (#34766)
fix: alwaysontop browser window option for x11
2022-07-13 11:59:57 -07:00
Sudowoodo Release Bot
46e5c537c8 Bump v21.0.0-nightly.20220713 2022-07-13 06:01:20 -07:00
Shelley Vohr
07d168343a fix: enable deviceName validation on Linux (#34872) 2022-07-13 12:23:24 +02:00
Shelley Vohr
62aeb74d7c fix: base::DictionaryValue usage in APNS notifs (#34897) 2022-07-13 12:22:17 +02:00
Joan Xie
afd08c9450 feat: Enable APNS registration + notification delivery in macOS apps (#33574) 2022-07-12 08:38:49 -07:00
Sudowoodo Release Bot
5314ae5342 Bump v21.0.0-nightly.20220712 2022-07-12 06:01:28 -07:00
Samuel Attard
511ff8bc8d fix: ensure that requestMediaKeySystemAccess resolves (#34886)
When widevine was disabled at the build level we never dealt with the callback passed into GetSupportedKeySystems.  This was ok until requests became marked pending in https://chromium-review.googlesource.com/c/chromium/src/+/3430502 until the callback was called.  This resulted in a promise never resolving / rejecting and certain media websites (E.g. spotify) hanging on load waiting for a signal that would never arrive.
2022-07-12 00:48:51 -07:00
Shelley Vohr
95019f0454 fix: update Windows caption buttons to match Win11 style (#34790) 2022-07-12 09:13:40 +02:00
Jeremy Rose
4190ec2482 feat: sandbox preloads by default (#32869) 2022-07-11 16:28:09 -07:00
Valentin Hăloiu
f63bba8ce2 fix: set Wayland application ID (#34855)
* refactor: extract XDG app ID logic into a method

* fix: set application ID on Wayland
2022-07-11 11:26:18 -07:00
Sudowoodo Release Bot
8f3fb8db09 Bump v21.0.0-nightly.20220711 2022-07-11 06:01:12 -07:00
David Sanders
2b862c18ba chore: improve run-clang-tidy.ts behavior when filenames < jobs (#34736) 2022-07-11 12:25:39 +02:00
Samuel Attard
fa8e4a7610 build: use third_party DEPOT_TOOLS when running lint scripts (#34846)
Some folks (especially build_tools users) do not have a version of depot_tools on their path
2022-07-11 12:25:17 +02:00
Shelley Vohr
2eb0e5dcab fix: safer check for WCO button updates (#34833) 2022-07-11 11:45:01 +02:00
Samuel Attard
459404f536 build: run CI tests on Xcode 13.3.0 (#34850)
* build: test disabling security

* build: install python2 during tests

* build: do not install python2 on arm64 runners

* attempt 2

* build: only allow 13.3.0 xcode
2022-07-11 17:04:32 +09:00
Sudowoodo Release Bot
78848f8bfe Bump v21.0.0-nightly.20220708 2022-07-08 06:01:44 -07:00
Samuel Attard
eba9d3fc79 fix: ensure v8 pointer compression + sandbox is enabled on 64bit native modules (#34844)
* fix: ensure v8 pointer compression + sandbox is enabled on 64bit native modules

* build: rely on config.gypi to enable pointer compression
2022-07-08 01:06:06 -07:00
Shelley Vohr
1941c88442 fix: setRepresentedFilename with non-default titlebarStyle (#34834)
fix: setRepresentedFilename with non-default titlebarStyle
2022-07-07 23:33:42 -07:00
Keeley Hammond
e83c3ec744 test: add first-party-set chromium tests (#34827)
test: add first-part-set chromium feature tests
2022-07-07 15:14:53 -04:00
Shelley Vohr
7ec88584b5 fix: WCO pressed background state updates (#34771) 2022-07-07 17:17:20 +02:00
Sudowoodo Release Bot
47d8d4cc5c Bump v21.0.0-nightly.20220707 2022-07-07 06:01:40 -07:00
Sudowoodo Release Bot
f7428baace Bump v21.0.0-nightly.20220706 2022-07-06 06:02:02 -07:00
Jeremy Rose
403bd39d05 chore: modernize base::Value useage in asar/archive (#34796) 2022-07-05 12:35:38 -04:00
David Sanders
c418275228 chore: update Discord invite links (#34730) 2022-07-05 11:55:15 -04:00
David Sanders
98cd16d336 chore: fix typos (#34731) 2022-07-05 11:49:56 -04:00
Jeremy Rose
e5db178ab6 feat: enable v8 sandboxed pointers (#34724)
* feat: enable v8 sandboxed pointers

* update breaking-changes.md

* update zero-fill patch

benchmarks showed the function call was slower
2022-07-05 11:28:22 -04:00
Jeremy Rose
0ee7f14190 chore: modernize Value usage in converters (#34794)
* chore: modernize Value usage in converters

* Date is parsed as an empty object now
2022-07-05 11:25:18 -04:00
Sudowoodo Release Bot
d28ed0da20 Bump v21.0.0-nightly.20220705 2022-07-05 06:01:17 -07:00
Sudowoodo Release Bot
1edf9d2ada Bump v21.0.0-nightly.20220704 2022-07-04 06:02:50 -07:00
Sudowoodo Release Bot
d359736e65 Bump v21.0.0-nightly.20220701 2022-07-01 06:00:58 -07:00
Darshan Sen
c885f9063b docs: document the removal of IA32 Linux support (#34787)
* docs: document the removal of IA32 Linux support

Chromium had dropped support for IA32 Linux, so the Chromium
102.0.4999.0 upgrade PR,
https://github.com/electron/electron/pull/33731, had introduced the commit,
389ef0731e,
to drop support for IA32 Linux but the change landed without an addition
to the documentation for the breaking changes, so this PR adds that.

Closes: https://github.com/electron/electron/issues/34783
Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=1194538
Signed-off-by: Darshan Sen <raisinten@gmail.com>

* Update docs/breaking-changes.md

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

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2022-06-30 09:23:03 -07:00
Sudowoodo Release Bot
c3920c5c02 Bump v21.0.0-nightly.20220630 2022-06-30 06:02:00 -07:00
David Sanders
5d120359f6 chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
Jeremy Rose
0d4e417594 chore: modernize ListValue usage in permission manager (#34662) 2022-06-29 10:09:48 -07:00
Jeremy Rose
4ddd03b1b3 chore: modernize some devtools code using deprecated ListValue (#34655) 2022-06-29 09:39:48 -07:00
Shelley Vohr
7c12baccab build: remove appveyor hook to defunct service (#34789) 2022-06-29 17:19:05 +02:00
Sudowoodo Release Bot
461561c19c Bump v21.0.0-nightly.20220629 2022-06-29 06:01:40 -07:00
Josh Soref
1f814eacb2 build: fix release_dependency_versions workflow (#34573)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-06-29 14:55:59 +02:00
Shelley Vohr
ad2b1fee59 fix: re-enable HKDF crypto functionality (#34767)
* fix: re-enable HKDF crypto functionality

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-06-29 14:53:57 +02:00
Shelley Vohr
35ff95d3c7 fix: <datalist> bounds vertical cutoff (#34759) 2022-06-29 10:14:03 +02:00
Sudowoodo Release Bot
6257e0c348 Bump v21.0.0-nightly.20220628 2022-06-28 20:28:29 -07:00
Keeley Hammond
3310e4039f build: update makeRequest parameters (#34782) 2022-06-28 20:26:00 -07:00
Jeremy Rose
40fbc05bb2 chore: modernize base::Value usage in accessibility_ui (#34666) 2022-06-28 16:40:56 -07:00
Keeley Hammond
3458eac276 chore: update printing patch for main gclient sync (#34777)
chore: update printing patch
2022-06-28 16:40:23 -07:00
Samuel Attard
44b9ee51f4 fix: resolve symlinks when computing relative asar paths for integrity (#34776) 2022-06-28 16:02:00 -07:00
Jeremy Rose
07294cbf15 chore: modernize ListValue usage in gpu info (#34663) 2022-06-28 09:52:59 -07:00
Sudowoodo Release Bot
a4043237da Revert "Bump v21.0.0-nightly.20220628"
This reverts commit f1087cc830.
2022-06-28 07:40:00 -07:00
Micha Hanselmann
704b2199b3 build: fix building with enable_basic_printing false (#34711)
* build: fix building with enable_basic_printing false

* temp flags for ci builds

* fix other systems

* disable cups

* disable print preview

* revert changes

* merge with printing.patch
2022-06-28 16:34:00 +02:00
Sudowoodo Release Bot
f1087cc830 Bump v21.0.0-nightly.20220628 2022-06-28 07:07:08 -07:00
Sudowoodo Release Bot
d028044a24 Revert "Bump v21.0.0-nightly.20220628"
This reverts commit 9c311a2059.
2022-06-28 07:05:52 -07:00
Sudowoodo Release Bot
9c311a2059 Bump v21.0.0-nightly.20220628 2022-06-28 06:01:35 -07:00
dependabot[bot]
47afaddaf5 build(deps-dev): bump got from 6.7.1 to 11.8.5 (#34697)
Bumps [got](https://github.com/sindresorhus/got) from 6.7.1 to 11.8.5.
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v6.7.1...v11.8.5)

---
updated-dependencies:
- dependency-name: got
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-28 11:18:47 +02:00
David Sanders
59d3c12cae chore: remove spurious trailing namespace comments (#34732) 2022-06-28 10:08:55 +02:00
electron-roller[bot]
e86d1cba75 chore: bump chromium to 105.0.5129.0 (main) (#34403)
* chore: bump chromium in DEPS to 104.0.5096.0

* 3651284: Use the entry settings object for window.open navigation

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

* 3644598: Make RenderFrameHost used for notification permission decision

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

* 3642842: Window Placement: Prototype Fullscreen Capability Delegation - Part 2

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

* 3652785: [sandbox] Enable sandboxed pointers on sanitizer builds

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

* 3611967: webhid: Migrate HidDelegate to use BrowserContext and Origin

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

* 3665762: Remove RenderFrameHost::IsRenderFrameCreated from //content/.

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

* 3659375: Fold x509_util_ios and most of x509_util_mac into x509_util_apple

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

* 3656234: [CodeHealth] Remove uses of base::ListValue::Append() (Final, take 2)

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

* chore: update patch indices

* chore: fix lint

* 3644598: Make RenderFrameHost used for notification permission decision

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

* webhid: Migrate HidDelegate to use BrowserContext and Origin

This is a temporary fix for  https://chromium-review.googlesource.com/c/chromium/src/+/3611967 to get the build compiling, but we need to either patch around  https://chromium-review.googlesource.com/c/chromium/src/+/3611967 or move our device permissioning to BrowserContext

* chore: fix lint

* build: run electron/script/gen-libc++-filenames.js

fixes gn check

* chore: bump chromium in DEPS to 104.0.5098.0

* chore: disable flaking tests

* 3682394: Change pipes surrounding code references in comments to backticks

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

* 3652749: Delete GLRenderer and related classes

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

* chore: fixup patch indices

* 3671199: Remove ContentMainDelegate::PostFieldTrialInitialization

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

* 3607963: hid: Do not exclude HID device with no collections

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

* refactor: use ElectronBrowserContext instead of WebContents to persist devices

due to changes like https://chromium-review.googlesource.com/c/chromium/src/+/3611967,
we can no longer use WebContents to store device permissions so this commit
moves device permission storage to live in memory in ElectronBrowserContext
instead.

* 3557253: Deprecate some signature checks

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

* chore: bump chromium in DEPS to 104.0.5100.0

* 3680781: Add policy for Renderer App Container.

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

* chore: update patch indices

* 3675465: Update NetLog network service API to use mojom::DictionaryValue.

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

* chore: bump chromium in DEPS to 104.0.5102.0

* chore: update patches

* chore: bump chromium in DEPS to 104.0.5103.0

* chore: update patches

* chore: bump chromium in DEPS to 104.0.5104.0

* chore: update patches

* fix: add patch for DCHECK in fullscreen test

* build: fix nan build

* build: make the nan spec runner work on macOS

* chore: bump chromium in DEPS to 104.0.5106.0

* chore: update patches

* chore: bump chromium in DEPS to 104.0.5108.0

* chore: update patches

* chore: bump chromium in DEPS to 104.0.5110.0

* chore: update patches

* chore: bump chromium in DEPS to 104.0.5112.0

* chore: bump chromium in DEPS to 105.0.5113.0

* chore: bump chromium in DEPS to 105.0.5115.0

* chore: bump chromium in DEPS to 105.0.5117.0

* chore: update patches

* chore: update libcpp patch

* 3693745: Delete base::LowerCaseEqualsASCII()

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

* 3669226: Remove printing PostTask usage of IO thread

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

* 3687395: Remove DictionaryValue::HasKey().

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

* 3691014: Prevent unsafe narrowing: ui/accessibility, part 2

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

* 3560567: [MSC] Porting GenerateStreams clients to handle stream vectors.

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

* 3684873: [Bluetooth][Win/Linux] Add bluetooth pair confirmation prompt

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

* chore: bump chromium in DEPS to 105.0.5119.0

* chore: missing includes in desktop_notification_controller

* chore: update patches

* 3685951: Reland "Make sure screen object is created once in tests."

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

* fixup: Reland "Make sure screen object is created once in tests."

* 3646014: [API] Deprecate LegacyOOMErrorCallback

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

* chore: bump chromium in DEPS to 105.0.5121.0

* chore: update patches

* 3699085: [cleanup] update PrintBackend::EnumeratePrinters to use reference

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

* chore: bump chromium in DEPS to 105.0.5123.0

* chore: update patches

* chore: bump chromium in DEPS to 105.0.5125.0

* chore: update patches

* 3630082: [sandbox] Also enable the sandbox outside of Chromium builds

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

* chore: bump chromium in DEPS to 105.0.5127.0

* chore: update patches

* chore: bump chromium in DEPS to 105.0.5129.0

* chore: update patches

* 3703741: Remove WebContents::GetMainFrame.

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

* chore: update patches

* fixup! 3703741: Remove WebContents::GetMainFrame.

* fix lint

* more lint

* chore: document breaking change

* 3687671: [v8] Freeze flags after initialization

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

* fixup! 3560567: [MSC] Porting GenerateStreams clients to handle stream vectors.

* use the v8 allocator for node serdes

* chore: update patches

* remove faulty non-v8-sandbox-compatible code

* make NodeArrayBufferAllocator use the v8 allocator under the hood

* fixup! 3560567: [MSC] Porting GenerateStreams clients to handle stream vectors.

* fix build on windows

* 3691954: [Reland][Extensions Bindings] Validate arguments sent to API events

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

* chore: remove deprecated AccessorSignatures

https://github.com/nodejs/nan/pull/941

* Update patches/chromium/notification_provenance.patch

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

* remove chore_expose_v8_initialization_isolate_callbacks.patch

* add link to nodejs/nan#941

* 52026: Do not allow md4 or md5 based signatures in X.509 certificates.

https://boringssl-review.googlesource.com/c/boringssl/+/52026

* chore: update patches

* disable nan buffer-test

* disable sandboxed pointers for now

* force sandboxed pointers off

* improve node allocation patch

* restore accidentally dropped node crypto test patch

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: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@salesforce.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: Jeremy Rose <japthorp@slack-corp.com>
2022-06-27 15:50:08 -05:00
Sudowoodo Release Bot
032e1d9bef Bump v21.0.0-nightly.20220627 2022-06-27 06:02:43 -07:00
David Sanders
39840502be docs: replace broken Windows taskbar images (#34729) 2022-06-27 14:14:01 +02:00
David Sanders
8238cca87b test: use maximize event instead of resize event (#34740) 2022-06-27 10:29:55 +02:00
David Sanders
e2c58d164d chore: replace Object.assign with object spread syntax (#34739) 2022-06-27 10:29:18 +02:00
Milan Burda
ba4893c248 refactor: load webFrame via process._linkedBinding in security-warnings.ts (#34735) 2022-06-27 10:28:35 +02:00
Sudowoodo Release Bot
c5b87e4919 Bump v21.0.0-nightly.20220624 2022-06-24 06:01:02 -07:00
Shelley Vohr
3b881e4a13 fix: WCO respects maximizable/closable/minimizable (#34677) 2022-06-23 13:08:32 -04:00
Sudowoodo Release Bot
106aa0e922 Bump v21.0.0-nightly.20220623 2022-06-23 06:00:50 -07:00
Jeremy Rose
11924bdbb2 chore: modernize ListValue usage in dict_util.mm and related files (#34661)
* chore: modernize ListValue usage in dict_util.mm and related files

* use base::Value::{Dict,List} instead of raw base::Value

* fix compile

* fix build

* fix build again
2022-06-23 15:28:41 +09:00
Jeremy Rose
cd19a741b1 chore: modernize base::Value usage in shell/renderer/printing (#34682)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-06-22 10:37:58 -07:00
Jeremy Rose
5895296239 test: disable flaky transparent window test (#34660) 2022-06-22 10:37:32 -07:00
Sudowoodo Release Bot
e3243ad113 Bump v21.0.0-nightly.20220622 2022-06-22 06:00:53 -07:00
David Sanders
5fee5b0e22 chore: chunk filenames when linting C++ files (#34237)
* chore: chunk filenames when linting C++ files

* chore: refactor code for better readability

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: further tweak

* chore: limit all platforms to 4095 characters on command line

* chore: use python3

* Revert "chore: use python3"

Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2022-06-22 19:23:11 +09:00
Milan Burda
f172136752 chore: remove undocumented page-title-set webview event (#34533) 2022-06-22 17:18:42 +09:00
Juan Cruz Viotti
218797eb61 fix: allow macOS debug builds to be built (#34536)
Extending the `testing` GN profile with the arguments documented to
allow breakpoint debugging
(https://www.electronjs.org/docs/latest/development/debugging#breakpoint-debugging)
doesn't quite work on macOS:

```sh
is_debug = true
symbol_level = 2
forbid_non_component_debug_builds = false
```

The build eventually fails on both Intel and Apple Silicon with the
following (summarized) error:

```sh
[S:41062 R:1 (41062:41247) (C/s:0.1 O/s:13.6)] SOLINK 'obj/electron/electron_framework_shared_library/Electron Framework' 'obj/electron/electron_framework_shared_library/Electron Framework.TOC'
FAILED: obj/electron/electron_framework_shared_library/Electron Framework obj/electron/electron_framework_shared_library/Electron Framework.TOC
...
Undefined symbols for architecture x86_64:
  "platform_util::GetViewForWindow(gfx::NativeWindow)", referenced from:
      BoundsOverlapWithAnyOpenPrompt(gfx::Rect const&, content::WebContents*) in libchrome.a(autofill_popup_view_utils.o)
  "platform_util::GetParent(gfx::NativeView)", referenced from:
      BoundsOverlapWithAnyOpenPrompt(gfx::Rect const&, content::WebContents*) in libchrome.a(autofill_popup_view_utils.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
...
```

This symbol is defined on a file that is not declared as a dependency of
`libchrome` on the GN definitions. Why the problem is not reproducible
on plain testing or release builds remains a mystery to me. I'm guessing
some non-debug path somewhere in the GN definitions does eventually
require that file.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2022-06-22 17:18:12 +09:00
Erick Zhao
e410109a3d docs: expand tutorial (#34604)
* docs: base tutorial update

* more docs

* zzz

* remove unused images
2022-06-22 17:17:48 +09:00
Milan Burda
a5869fe997 refactor: use std::size(args) instead of hardcoded values (#34651) 2022-06-22 10:15:27 +02:00
Jeremy Rose
bf52318c76 fix: modernize ListValue in net converters (#34657) 2022-06-22 10:14:57 +02:00
Jeremy Rose
73c85410c5 chore: modernize ListValue code in session (#34656)
* chore: modernize ListValue code in session

* also in browser_context
2022-06-22 10:14:35 +02:00
Jeremy Rose
ad7aab8338 chore: modernize base::Value usage in WebRequest (#34667) 2022-06-22 10:11:27 +02:00
Sudowoodo Release Bot
140c8d0d0a Bump v21.0.0-nightly.20220621 2022-06-21 09:07:50 -07:00
Keeley Hammond
34fc53e5e6 chore: Revert "build: build & release libcxx objects on darwin (#34586)" (#34680)
Revert "build: build & release libcxx objects on darwin (#34586)"

This reverts commit 2bbbc66eb8.
2022-06-21 09:06:50 -07:00
Sudowoodo Release Bot
528cbe8131 Revert "Bump v21.0.0-nightly.20220621"
This reverts commit 116c32a030.
2022-06-21 08:27:51 -07:00
Sudowoodo Release Bot
116c32a030 Bump v21.0.0-nightly.20220621 2022-06-21 06:00:53 -07:00
Shelley Vohr
530a022b05 fix: window button visibility fullscreen interaction (#34530) 2022-06-21 16:35:53 +09:00
Milan Burda
f3f327823e chore: move main process only accessible API bindings away from common (#34634) 2022-06-21 16:34:56 +09:00
Milan Burda
0f528c1e43 chore: let result: ReturnType<typeof this._callWindowOpenHandler>; (#34628) 2022-06-21 10:39:41 +09:00
Keeley Hammond
2bbbc66eb8 build: build & release libcxx objects on darwin (#34586)
* build: build & release libcxx objects on darwin

* Fix merge error

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2022-06-21 10:35:16 +09:00
Shelley Vohr
3cd5223134 build: mark existing Node.js flakes as dontcare (#34644) 2022-06-20 15:54:52 -04:00
Shelley Vohr
8e45f43f18 refactor: remove deprecated drag-and-drop code (#34615) 2022-06-20 15:17:53 +02:00
Sudowoodo Release Bot
d341610d64 Bump v21.0.0-nightly.20220620 2022-06-20 06:01:30 -07:00
Shelley Vohr
6e9466f96b fix: overzealous media key listening on Windows (#34594) 2022-06-20 19:40:10 +09:00
Shelley Vohr
e2f42e5d99 chore: fix BrowserView painting when origin updated (#34581)
chore: fix View painting when origin updated
2022-06-20 13:31:53 +09:00
Darshan Sen
ec98e95b8a fix: performance problem in crashReporter.start() on macOS (#34609)
fix: performance problem in crashReporter.start() on macOS

This change reduces the duration of crashReporter.start() on Intel macOS
from 622 milliseconds to 257 milliseconds!

Backports https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3641386

  posix: Replace DoubleForkAndExec() with ForkAndSpawn()

  The DoubleForkAndExec() function was taking over 622 milliseconds to run
  on macOS 11 (BigSur) on Intel i5-1038NG7. I did some debugging by adding
  some custom traces and found that the fork() syscall is the bottleneck
  here, i.e., the first fork() takes around 359 milliseconds and the
  nested fork() takes around 263 milliseconds. Replacing the nested fork()
  and exec() with posix_spawn() reduces the time consumption to 257
  milliseconds!

  See https://github.com/libuv/libuv/pull/3064 to know why fork() is so
  slow on macOS and why posix_spawn() is a better replacement.

  Another point to note is that even base::LaunchProcess() from Chromium
  calls posix_spawnp() on macOS -
  8f8d82dea0:base/process/launch_mac.cc;l=295-296

  Change-Id: I25c6ee9629a1ae5d0c32b361b56a1ce0b4b0fd26
  Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3641386
  Reviewed-by: Mark Mentovai <mark@chromium.org>
  Commit-Queue: Mark Mentovai <mark@chromium.org>

Fixes: https://github.com/electron/electron/issues/34321
Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-06-20 13:31:29 +09:00
dependabot[bot]
bf4efb693b build(deps): bump jpeg-js from 0.4.3 to 0.4.4 in /spec-main (#34607)
Bumps [jpeg-js](https://github.com/eugeneware/jpeg-js) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/eugeneware/jpeg-js/releases)
- [Commits](https://github.com/eugeneware/jpeg-js/compare/v0.4.3...v0.4.4)

---
updated-dependencies:
- dependency-name: jpeg-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-20 09:57:25 +09:00
Raymond Zhao
999a225edb refactor: use stubs for gdk-pixbuf dependency (#34077)
* refactor: use stubs for gdk-pixbuf dependency

* Adjust build file

* Add includes

* Merge gdk_pixbuf stubs into gtk stubs

* Split pixbuf sigs into own file again

* Add initialization check

* Apply PR feedback
2022-06-19 17:42:30 -07:00
Milan Burda
b3ec0a801a chore: cleanup undocumented keys from webFrame.getWebPreference() (#34588) 2022-06-19 17:40:03 -07:00
Sudowoodo Release Bot
6f8bfdeb7a Bump v21.0.0-nightly.20220617 2022-06-17 06:02:13 -07:00
Shelley Vohr
20538c4f34 fix: draggable regions updating on bounds change (#34582) 2022-06-17 12:01:38 +02:00
Sudowoodo Release Bot
d2e539c7d4 Bump v21.0.0-nightly.20220616 2022-06-16 06:00:48 -07:00
Josh Soref
ea4278754c chore: fix spelling errors in multiple files (#34574)
* chore: fix spelling in .circleci

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in BUILD.gn

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in appveyor.yml

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in build

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in docs

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in lib

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in script

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in shell

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in spec

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* chore: fix spelling in spec-main

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-06-16 16:46:11 +09:00
Milan Burda
f418a49857 chore: warn when using the deprecated new-window event (#34528) 2022-06-15 18:17:42 -07:00
Jeremy Rose
bad8d5e08a fix: make preload calculation identical between sandbox & non-sandboxed (#34531) 2022-06-15 13:22:28 -07:00
Sudowoodo Release Bot
4ec95edf06 Bump v21.0.0-nightly.20220615 2022-06-15 06:01:24 -07:00
Michaela Laurencin
4c7c0b41c2 feat: add immersive dark mode on windows (#33624)
* feat: add immersive dark mode

* fix syntax and add header

* add me

* Update fuses.json5

* fix: redraw title bar on dark mode change

* chore: SetWindowTheme doesn't seem to be needed

* chore: separate out Win 10 dark mode implementation

* final touches

* final touches

* chore: limit Win 10 to >= 20H1 and drop fuse

* fix types

* fix lint

Co-authored-by: Micha Hanselmann <micha.hanselmann@gmail.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2022-06-14 12:27:28 -04:00
isailaandrei
21ef8501e7 feat: add panel support for BrowserWindow (#34388)
* feat: add NSPanel support for BrowserWindow

* change header guard to satisfy linter

* change panel wording in browser-window

* Revert "change panel wording in browser-window"

This reverts commit 6f3f80f94a.

* change wording in browser-window

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

Co-authored-by: Cheng Zhao <github@zcbenz.com>

* Update shell/browser/ui/cocoa/electron_native_widget_mac.h

Co-authored-by: Cheng Zhao <github@zcbenz.com>

* Changed ScopedDisableResize class to allow for nesting

Co-authored-by: andreiisaila <andreiisaila@microsoft.com>
Co-authored-by: Cheng Zhao <github@zcbenz.com>
2022-06-14 12:24:52 -04:00
Shelley Vohr
bed38e0985 fix: crash when setWindowOpenHandler callback throws (#34523)
* fix: crash when setWindowOpenHandler throws

* refactor: throw as process uncaughtException event
2022-06-14 12:22:23 -04:00
Milan Burda
8de5cdb426 test: add missing page-title-updated event spec for webview (#34529) 2022-06-14 12:15:45 -04:00
Sudowoodo Release Bot
9707812d68 Bump v21.0.0-nightly.20220614 2022-06-14 06:02:37 -07:00
Milan Burda
16cd22ff6a test: use webContents.setWindowOpenHandler() in specs (#34514)
* test: use webContents.setWindowOpenHandler() in specs

* test: use browser-window-created instead of new-window for visibility spec
2022-06-13 13:07:47 -04:00
Jeremy Rose
954fd72500 fix: make navigator.userAgentData non-empty (#34481) 2022-06-13 09:35:42 -07:00
Sudowoodo Release Bot
8157a01a42 Bump v21.0.0-nightly.20220613 2022-06-13 08:39:00 -07:00
Sudowoodo Release Bot
d565243f98 Revert "Bump v21.0.0-nightly.20220613"
This reverts commit 77dcf4a5e0.
2022-06-13 08:37:46 -07:00
Sudowoodo Release Bot
77dcf4a5e0 Bump v21.0.0-nightly.20220613 2022-06-13 06:01:32 -07:00
Milan Burda
2a9b3cc9cd chore: remove unused proxy-window-open.snapshot.txt (#34501)
chore: remove unused spec-main/fixtures/snapshots/proxy-window-open.snapshot.txt
2022-06-13 16:01:34 +09:00
Milan Burda
7ca3f55b10 refactor: move duplicate code to RendererClientBase::ShouldLoadPreload helper (#34477) 2022-06-13 15:58:27 +09:00
Shelley Vohr
e5543a2dd2 fix: all files selection logic on linux (#34496) 2022-06-13 15:57:03 +09:00
John Kleinschmidt
bd81ae08ac fix: don't require glibc 2.29+ on linux arm64 builds (#34491)
* build: use sid sysroot for linux arm64
2022-06-10 14:15:52 -04:00
Sudowoodo Release Bot
57b863c213 Bump v21.0.0-nightly.20220610 2022-06-10 06:02:06 -07:00
Michaela Laurencin
52c0a4fafc docs: add macOS height option info (#34451) 2022-06-09 15:17:27 -04:00
Sudowoodo Release Bot
1302ebf50e Bump v21.0.0-nightly.20220609 2022-06-09 06:01:17 -07:00
Shelley Vohr
37d93b0482 fix: update normal bounds prior to minimizing (#34473) 2022-06-09 10:48:50 +02:00
Shelley Vohr
2fd0194e94 build: update clang-format script (#34286) 2022-06-08 21:26:41 +02:00
Sudowoodo Release Bot
6d50717eed Bump v21.0.0-nightly.20220608 2022-06-08 06:00:42 -07:00
David Sanders
289128b96c chore: use --root instead of --project_root for cpplint (#34456)
--root has been improved upstream in depot_tools to better handle Windows:
https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3648533
2022-06-08 10:29:39 +02:00
Shelley Vohr
16db5a112e fix: html fullscreen transitions stacking (#32905)
* fix: html fullscreen transitions stacking

* spec: move webview test to spec-main
2022-06-07 12:59:50 -04:00
Sudowoodo Release Bot
f44ecb7f03 Bump v21.0.0-nightly.20220607 2022-06-07 07:30:55 -07:00
Sudowoodo Release Bot
8e97f3badf Revert "Bump v21.0.0-nightly.20220607"
This reverts commit a203123473.
2022-06-07 07:12:33 -07:00
Sudowoodo Release Bot
a203123473 Bump v21.0.0-nightly.20220607 2022-06-07 07:11:11 -07:00
Sudowoodo Release Bot
c750936328 Revert "Bump v21.0.0-nightly.20220607"
This reverts commit 5f0f517486.
2022-06-07 07:09:18 -07:00
Sudowoodo Release Bot
5f0f517486 Bump v21.0.0-nightly.20220607 2022-06-07 06:01:42 -07:00
Shelley Vohr
4ec2de659f chore: fix nan spec runner on macOS (#34447) 2022-06-07 12:09:08 +02:00
David Sanders
30d15715a9 build: switch to --use-color flag for clang-tidy (#34457)
chore: switch to --use-color flag for clang-tidy
2022-06-07 09:49:52 +02:00
Samuel Maddock
882fa36940 test: fix for flaky renderer crash test (#34452) 2022-06-06 17:39:58 -04:00
Sudowoodo Release Bot
e56f626b94 Bump v21.0.0-nightly.20220606 2022-06-06 06:02:02 -07:00
Charles Kerr
92b0f3e808 build: add --unique option to release notes script (#34296)
Useful when looking for changes unique to a single branch
2022-06-06 14:51:10 +09:00
Will Anderson
4f99e3e46c docs: fix did-frame-navigate example in webFrameMain docs (#34419)
docs: fix did-frame-navigate example in webFrameMain docs
2022-06-06 14:49:14 +09:00
electron-roller[bot]
f39c1a35e5 chore: bump node to v16.15.1 (main) (#34424) 2022-06-03 16:13:27 +02:00
Sudowoodo Release Bot
05b03b01dc Bump v21.0.0-nightly.20220603 2022-06-03 06:00:36 -07:00
Shelley Vohr
6038e42c23 fix: fullscreen windows aren't resizable on macOS (#34379) 2022-06-03 09:47:19 +02:00
Samuel Maddock
b00c026a54 fix: render process crash handling (#34428)
* fix: crash when renderer process is reused

Could occur when a renderer crashes and the same-origin URL is loaded again
which leads to reusing the renderer process.

* test: renderer process crash recovery

* fix: handle case which leads to render frame DCHECK

* fix: lint
2022-06-02 17:23:01 -07:00
Shelley Vohr
eb26f99f6e test: re-enable shared worker webview test (#34338) 2022-06-02 17:27:37 -04:00
Sudowoodo Release Bot
d13c879a15 Bump v21.0.0-nightly.20220602 2022-06-02 14:15:14 -07:00
Sudowoodo Release Bot
3ad70d0f0b Revert "Bump v21.0.0-nightly.20220602"
This reverts commit eb9888d1d2.
2022-06-02 14:12:58 -07:00
Keeley Hammond
0671f229ac chore: increase timeout for electron-build step (#34427) 2022-06-02 14:12:10 -07:00
Shelley Vohr
539a53786c chore: remove redundant @available checks (#34407)
* chore: require macOS 10.13 for Chromium

* chore: fix lint
2022-06-02 14:43:40 -04:00
Keeley Hammond
000c3d981c build: disable 32-bit Windows symbol generation (#34412) 2022-06-02 09:01:33 -07:00
Sudowoodo Release Bot
eb9888d1d2 Bump v21.0.0-nightly.20220602 2022-06-02 06:01:23 -07:00
Samuel Attard
1cd07c565a fix: crash in WebFrameMain mojo connection when RenderFrameHost is nullptr (#34411)
* fix: crash when RenderFrameHost is nullptr

* chore: lint fix

Co-authored-by: samuelmaddock <samuel.maddock@gmail.com>
2022-06-01 16:03:04 -07:00
Sudowoodo Release Bot
f306fbc010 Revert "Bump v21.0.0-nightly.20220601"
This reverts commit 5057cbf418.
2022-06-01 14:31:30 -07:00
Sudowoodo Release Bot
5057cbf418 Bump v21.0.0-nightly.20220601 2022-06-01 10:32:32 -07:00
Naoki Maeda
561be72373 chore: update husky to v8.0.1 (#34343)
* chore: update husky v8.0.1

* chore: remove unnecessary .husky/.gitignore

ref : https://github.com/typicode/husky/releases/tag/v7.0.0

* chore: add ^ prefix for husky version

* chore: update yarn.lock

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2022-06-01 13:00:48 -04:00
John Kleinschmidt
a38e5d20ff ci: cache python install to better deal with download errors. (#34360)
* ci: cache python install to better deal with download errors.

* chore: use our CDN to download python2

* build: DRY up the python install steps

Co-authored-by: Samuel Attard <sattard@salesforce.com>
2022-06-01 12:59:26 -04:00
Sudowoodo Release Bot
cda8f3c15c Revert "Bump v21.0.0-nightly.20220601"
This reverts commit df91dd6d2b.
2022-06-01 08:28:12 -07:00
Sudowoodo Release Bot
df91dd6d2b Bump v21.0.0-nightly.20220601 2022-06-01 06:02:01 -07:00
electron-roller[bot]
470396d6ac chore: bump chromium to 104.0.5073.0 (main) (#34272) 2022-06-01 08:12:47 +02:00
Sudowoodo Release Bot
3849d19e14 Bump v21.0.0-nightly.20220531 2022-05-31 06:01:31 -07:00
Shelley Vohr
2cb53c5db1 fix: zombie windows when fullscreening and closing (#34378) 2022-05-31 10:43:42 +02:00
Shelley Vohr
93b39b92b5 refactor: printToPDF should be headless (#33654) 2022-05-31 08:21:25 +02:00
Sudowoodo Release Bot
0d69067dee Bump v21.0.0-nightly.20220530 2022-05-30 06:01:33 -07:00
Samuel Attard
fd88908457 fix: hide content protected windows during screen capture with ScreenCaptureKitMac (#34362)
fix: hide content protected windows during screen capture
2022-05-30 14:13:48 +02:00
Keeley Hammond
34a9268e97 ci: re-enable CalculateNativeWinOcclusion (#34374) 2022-05-30 10:28:33 +02:00
Sudowoodo Release Bot
03d9615f99 Bump v21.0.0-nightly.20220527 2022-05-27 06:02:05 -07:00
Sudowoodo Release Bot
2ffa31832e Bump v21.0.0-nightly.20220526 2022-05-26 06:01:46 -07:00
Shelley Vohr
4accf67d2b build: trigger mksnapshot/chromedriver releases automatically (#34346) 2022-05-25 20:52:41 +02:00
Sudowoodo Release Bot
afca3519fd Revert "Bump v20.0.0-nightly.20220525"
This reverts commit 4b3a7b7762.
2022-05-25 06:24:48 -07:00
Sudowoodo Release Bot
4b3a7b7762 Bump v20.0.0-nightly.20220525 2022-05-25 06:18:50 -07:00
Sudowoodo Release Bot
a6a2bb65a4 Revert "Bump v20.0.0-nightly.20220525"
This reverts commit fd559d8516.
2022-05-25 06:16:08 -07:00
Sudowoodo Release Bot
fd559d8516 Bump v20.0.0-nightly.20220525 2022-05-25 06:01:00 -07:00
Shelley Vohr
7bc4b919dc fix: esc not working on Windows during fullscreen (#34317)
* fix: esc not working on Windows during fullscreen

* chore: fix lint
2022-05-24 21:38:38 -07:00
Samuel Attard
6cb2b9eab7 build: do not checkout chromium for ts docs check (#34331) 2022-05-24 14:04:49 -07:00
Sudowoodo Release Bot
b8abf5e38a Bump v20.0.0-nightly.20220524 2022-05-24 06:00:37 -07:00
Milan Burda
6667de28e3 chore: use webContents.setWindowOpenHandler() in default-app (#34308) 2022-05-24 10:23:56 +02:00
Milan Burda
9d3fc9c794 refactor: return options directly in makeBrowserWindowOptions() helper (#34309) 2022-05-24 10:23:16 +02:00
John Kleinschmidt
ba573f5583 feat: add support for HIDDevice.forget() (#34210)
* feat: add support for HIDDevice.forget()

* chore: remove whitespace

* chore: use `SetGetter` to serialize the render_frame_host

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

* fixup chore: use `SetGetter` to serialize the render_frame_host

* fixup after rebase

* fixup for crash on navigator.serial.getPorts()

* fixup for lint

Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
2022-05-23 15:13:18 -04:00
Darshan Sen
df9383cb3c chore: add a TRACE call for crash_reporter::Start() (#34268)
chore: add a TRACE call for crash_reporter::Start()

Initializing the crashReporter takes around 620 milliseconds on Intel
macOS. I have sent a CL to crashpad to partially fix the performance
issue in
https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3641386.
It would be beneficial to log the performance impact of this function in
the traces in case this slows down in the future.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-05-23 08:38:03 -07:00
Milan Burda
09a80ea48c test: use webContents.setWindowOpenHandler() in specs (#34310) 2022-05-23 16:39:50 +02:00
John Kleinschmidt
887b5a7dc7 fix: crash on navigator.serial.getPorts() (#34280)
* fix: crash on navigator.serial.getPorts()

* test: fixup BrowserWindow.setTitlebarOverlay test
2022-05-23 10:33:39 -04:00
Sudowoodo Release Bot
c3fa6005db Bump v20.0.0-nightly.20220523 2022-05-23 06:02:11 -07:00
FantasqueX
89fab6a549 docs: remove X-Content-Security-Policy header in quick-start.md (#34307)
reference: Note: It is known that having both Content-Security-Policy
 and X-Content-Security-Policy or X-Webkit-CSP causes unexpected
 behaviours on certain versions of browsers. Please avoid using deprecated
 X-* headers. https://content-security-policy.com/
also:
1ad18486ed
2022-05-23 14:49:38 +02:00
Milan Burda
291eb60916 fix: building node modules with Visual Studio 2017 (#34217) 2022-05-23 20:04:08 +09:00
Michaela Laurencin
aa3e852a73 docs: add height option and color transparency info (#34278) 2022-05-23 20:01:22 +09:00
Robo
1639ccf98f fix: service worker registration with custom protocols (#34290)
Refs https://github.com/electron/electron/issues/32664
2022-05-23 00:42:37 -07:00
Keeley Hammond
38c21b7aca revert: add first-instance-ack event to the app.requestSingleInstanceLock() flow (#34297)
fix: revert "feat: add first-instance-ack event to the `app.requestSingleInstanceLock()` flow"
2022-05-22 22:20:54 -07:00
Varun Sharma
ff13fa8f0a ci: Add GitHub token permissions for workflows (#34298)
ci: add GitHub token permissions
2022-05-21 17:35:26 -07:00
Sudowoodo Release Bot
ba7dedcc6f Bump v20.0.0-nightly.20220520 2022-05-20 06:00:58 -07:00
Samuel Maddock
5ff94e7f2b fix: crash when creating interface for speculative frame (#33919) 2022-05-19 11:34:58 -07:00
Sudowoodo Release Bot
17c8ec765b Bump v20.0.0-nightly.20220519 2022-05-19 06:00:53 -07:00
Shelley Vohr
588005a9d5 fix: DCHECK on webContents.print() (#34271) 2022-05-19 10:05:07 +02:00
Shelley Vohr
73e0bf973d fix: delayed bounds when moving/resizing and preventing default (#34204) 2022-05-19 10:03:02 +02:00
Sofia Nguy
455544dfb6 docs: Update release dates for E20 (#34267) 2022-05-18 09:39:40 -07:00
Sudowoodo Release Bot
2436152536 Bump v20.0.0-nightly.20220518 2022-05-18 06:00:56 -07:00
electron-roller[bot]
61374019c0 chore: bump chromium to 103.0.5046.0 (main) (#33906)
* chore: bump chromium in DEPS to 103.0.5020.0

* chore: bump chromium in DEPS to 103.0.5022.0

* chore: bump chromium in DEPS to 103.0.5024.0

* chore: update patches

* 3587410: [Printing] Remove JobEventDetails

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

* chore: bump chromium in DEPS to 103.0.5026.0

* chore: update patches

* 3577218: WebUI: Delete webui_resources.grd and related GN targets.

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

* chore: bump chromium in DEPS to 103.0.5028.0

* chore: update patches

* 3579297: Convert UpdatePrintSettings() to use non-deprecated base::Value APIs.

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

* 3560622: serial: Add SerialPort.forget() method

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

* 3581708: Restore original display when moving from tab-fullscreen to browser-fullscreen.

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

* chore: fix authorization flags lint error

* 3583363: Remove net wrappers around base/strings/escape.h

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

* fixup! 3560622: serial: Add SerialPort.forget() method

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

* 3587589: Reland "Propagate the MIME type from DownloadTargetDeterminer to DownloadItem"

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

* 3584006: Remove IsRenderViewLive from content public

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

* 3596174: [api] Remove APIs for resurrecting finalizers

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

* 3368244: Hook SnapshotForContentAnalysis renderer API to scan system prints

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

* chore: bump chromium in DEPS to 103.0.5030.0

* chore: update patches

* chore: bump chromium in DEPS to 103.0.5032.0

* chore: bump chromium in DEPS to 103.0.5034.0

* chore: bump chromium in DEPS to 103.0.5036.0

* chore: update patches

* 3586363: Introduce PrintRenderFrame.PrintWithParams() for batch printing to PDF

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

* 3593199: Remove content::PermissionType references and replace them with blink::PermissionType

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

* 3368244: Hook SnapshotForContentAnalysis renderer API to scan system prints

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

* chore: lint

* chore: bump chromium in DEPS to 103.0.5038.0

* chore: update patches

* fixup! 3560622: serial: Add SerialPort.forget() method

* 3606495: mac screen capture: add metric

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

* chore: bump chromium in DEPS to 103.0.5040.0

* chore: update patches

* 3590840: Add IPs to DnsOverHttpsServerConfig

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

* stub functions for ElectronSerialDelegate and SerialChooserController to fix link

* 3566412: [base] Remove base/android dependency on post_task.h and officially remove post_task.h!

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

* 3347944: [content] No longer hand-off whole MainFunctionParams to BrowserMainParts

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

* fixup! 3566412: [base] Remove base/android dependency on post_task.h and off…
e3ea3e1
…icially remove post_task.h!

* chore: update process_singleton patches for content::GetIOThreadTaskRunner({})

Ref: 2015655: [BrowserThread] Migrate co/pub/br and co/br/scheduler to the new API | https://chromium-review.googlesource.com/c/chromium/src/+/2015655

* chore: migrate base::DeleteSoon to content::GetUIThreadTaskRunner({})->DeleteSoon

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

* chore: remove duplicate functions for RevokePortPermissionWebInitiated & GetPortInfo

* chore: migrate Linux/Windows methods off of post_task.h

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

* 64908: Stop building legacy SwiftShader GL in Chromium

https://swiftshader-review.googlesource.com/c/SwiftShader/+/64908

* 3573245: Added Themed versions of RoundedRectBackground and RoundedRectBorder.

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

* chore: bump chromium in DEPS to 103.0.5042.0

* chore: update patches

* 3571804: [api] Advance API deprecation for V8 version v10.2

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

* fixup! 3571804: [api] Advance API deprecation for V8 version v10.2

* build: fix run-clang-format extension matching

* lint

* fix windows build

* how is clang-format still not working for me

* chore: update patches

* 3623985: Replace ad-hoc SetPublicFirstPartySets calls with method in ContentBrowserClient.

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

* no need to implement WillProvidePublicFirstPartySets; the default is false

* 3601036: [QT] Introduce ui/views/linux_ui/linux_ui_factory.*

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

* 3583363: Remove net wrappers around base/strings/escape.h

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

* lint

* chore: bump chromium in DEPS to 103.0.5044.0

* fix conflicts

* chore: update patches

* upgrade nan

* pin version of nan in tests

* replace my hacky deprecated override fix with the fix from upstream

* revert runtime dcheck in v8

* pin nan version at root too

* refactor: tell gyp to use c++17 when building with our node

* Revert "refactor: tell gyp to use c++17 when building with our node"

This reverts commit 41a03a5799.

* Undo the reversion of 41a03a5799.

This reverts commit 54440abc59.

* disable sequential/test-cpu-prof-kill for now

* also sequential/test-diagnostic-dir-cpu-prof

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>
Co-authored-by: Jeremy Rose <japthorp@slack-corp.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-05-17 12:48:40 -04:00
mkiki01
04b33b319b docs: added units to <webview>.print() pageSize option (#34088) 2022-05-17 11:59:24 -04:00
Shelley Vohr
97c9451efc fix: WCO crash on bad titlebarStyle (#34140)
fix: WCO crash on bad titlebarStyle
2022-05-17 11:50:27 -04:00
Sudowoodo Release Bot
4e3587c7c6 Bump v20.0.0-nightly.20220517 2022-05-17 08:15:20 -07:00
Sudowoodo Release Bot
ccde8994b5 Revert "Bump v20.0.0-nightly.20220517"
This reverts commit 125c324a49.
2022-05-17 08:12:04 -07:00
Sudowoodo Release Bot
125c324a49 Bump v20.0.0-nightly.20220517 2022-05-17 06:03:06 -07:00
Milan Burda
4aba68a59d docs: add missing explanation for [angle|dawn]_enable_vulkan_validation_layers = false (#34216) 2022-05-16 16:18:01 -04:00
Shelley Vohr
7af0b58c98 test: add setTitlebarOverlay spec (#34221)
spec: add setTitlebarOverlay spec
2022-05-16 12:14:27 -04:00
Sudowoodo Release Bot
cc411946d7 Bump v20.0.0-nightly.20220516 2022-05-16 06:02:41 -07:00
Sudowoodo Release Bot
b06737fdac Bump v20.0.0-nightly.20220513 2022-05-13 06:01:28 -07:00
Shelley Vohr
8b5613efcb fix: fetching PDF element from WebLocalFrame (#34176)
fix: fetching PDF element from WebLocalFrame
2022-05-12 20:20:45 -04:00
Shelley Vohr
a8103691ac fix: tray icon not highlighting on empty menu (#34173) 2022-05-12 16:14:11 +02:00
Sudowoodo Release Bot
142e1f667b Bump v20.0.0-nightly.20220512 2022-05-12 06:02:20 -07:00
Samuel Maddock
ff5f66395e chore: upgrade extract-zip for installer (#34166) 2022-05-12 10:18:42 +02:00
Samuel Attard
ba3aca8200 test: fix background transparency flake (#34190) 2022-05-12 09:41:58 +02:00
Shelley Vohr
d67532ee9f fix: crash when loading extension with missing manifest (#34168)
* fix: crash when loading extension missing manifest

* Update electron_paks.gni

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

Co-authored-by: Robo <hop2deep@gmail.com>
2022-05-11 13:41:06 -07:00
John Kleinschmidt
4f8a843606 docs: clarify added/removed events on device APIs (#34177) 2022-05-11 13:01:56 -07:00
Shelley Vohr
dd6ce91f57 fix: call loadUrl when opening new windows from links (#34159)
* fix: call loadUrl when opening new windows from links

* spec: add regression test
2022-05-11 11:34:33 -07:00
John Kleinschmidt
6f8a36f404 test: fixup done being called multiple times (#34175) 2022-05-11 10:23:24 -07:00
Keeley Hammond
c512993744 build: re-enable 32-bit Windows symbol generation (#34162) 2022-05-11 08:27:23 -07:00
FantasqueX
6063d4f8df docs: fix typo in quick-start.md (#34149)
According to Jetbrains LanguageTool, "Consider using All the. "
2022-05-11 10:05:59 -04:00
Sudowoodo Release Bot
64dc90824b Bump v20.0.0-nightly.20220511 2022-05-11 06:01:00 -07:00
Robo
79e1881b2a chore: rm enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch (#34157)
* chore: rm enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch

* chore: update patch
2022-05-11 01:39:51 -07:00
Sudowoodo Release Bot
a853a6ce9f Revert "Bump v20.0.0-nightly.20220510"
This reverts commit 5633c45c19.
2022-05-10 18:40:53 -07:00
Sudowoodo Release Bot
5633c45c19 Bump v20.0.0-nightly.20220510 2022-05-10 18:39:00 -07:00
Jeremy Rose
9bcbe70dbe test: run node specs with py3 (#34154) 2022-05-10 14:26:53 -07:00
Milan Burda
e76cf3e2ed fix: building node modules with Visual Studio 2017 (#34109) 2022-05-10 14:26:07 -07:00
Keeley Hammond
627c2987ba fix: create singleton pipename from user & executable (#34139)
* fix: create singleton pipename from user & executable

* fix: use process id & main thread id for pipe name

* fix: write rand to file using WIN method

* fix: remove file rand, add user_name to pipe

* chore: style fixes, shorten program_name & user_name

* fix: remove user_name
2022-05-10 13:24:40 -07:00
Sudowoodo Release Bot
7f5346b954 Revert "Bump v20.0.0-nightly.20220510"
This reverts commit 4fc42092b8.
2022-05-10 10:33:23 -07:00
Sudowoodo Release Bot
4fc42092b8 Bump v20.0.0-nightly.20220510 2022-05-10 10:27:54 -07:00
Sudowoodo Release Bot
c8fbabae48 Revert "Bump v20.0.0-nightly.20220510"
This reverts commit b94f25c287.
2022-05-10 09:14:27 -07:00
Sudowoodo Release Bot
b94f25c287 Bump v20.0.0-nightly.20220510 2022-05-10 09:05:20 -07:00
Sudowoodo Release Bot
5572659988 Revert "Bump v20.0.0-nightly.20220510"
This reverts commit 030087c1c7.
2022-05-10 08:37:52 -07:00
Sudowoodo Release Bot
030087c1c7 Bump v20.0.0-nightly.20220510 2022-05-10 06:01:41 -07:00
electron-roller[bot]
5391211824 chore: bump node to v16.15.0 (main) (#33947)
* chore: bump node in DEPS to v16.15.0

* chore: update patches

* src: allow preventing InitializeInspector in env

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

* chore: update node gn filenames

* crypto: change default check(Host|Email) behavior

* Revert "crypto: change default check(Host|Email) behavior"

This reverts commit 1f1eb23702.

* update node crypto tests to work with boringssl

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-05-09 18:55:49 -04:00
Robo
00368aca37 chore: stub gtk_native_dialog_get_type (#34141) 2022-05-09 13:37:50 -07:00
Cheng Zhao
9483e714c4 feat: allow customizing browser data location (#33554)
* feat: redirect Electron/Chromium cache location

* fix: network services should also use browserData

* test: browserData

* chore: no need to explicitly create dir

* feat: browserData => sessionData

* test: check existings of specific items

* docs: add background on userData and sessionData

Co-authored-by: emmanuel.kimmerlin@thomsonreuters.com <emmanuel.kimmerlin@thomsonreuters.com>
2022-05-09 10:26:57 -04:00
Darshan Sen
03e68e2efe fix: fix a crash in safeStorage on Linux (#33913)
On Linux, `isEncryptionAvailable()` was crashing instead of returning a
boolean before the 'ready' event was emitted by the app. The reason of
the crash is that [`CreateKeyStorage()`](https://source.chromium.org/chromium/chromium/src/+/main:components/os_crypt/os_crypt_linux.cc;l=74;drc=35be6215ec8f09e50176f36753c68f26c63d1885;bpv=1;bpt=0)
expects the config to be set but the function responsible for setting the
config, [`SetConfig()`](https://source.chromium.org/chromium/chromium/src/+/main:components/os_crypt/os_crypt_linux.cc;l=237;drc=35be6215ec8f09e50176f36753c68f26c63d1885;bpv=1;bpt=0),
is called only after the app is ready inside [`PostCreateMainMessageLoop()`](https://github.com/electron/electron/blob/main/shell/browser/electron_browser_main_parts.cc#L499).
So this changes `IsEncryptionAvailable()` to return `false` when the app
is not ready on Linux and uses that instead of the raw API in other
places like `EncryptString()` and `DecryptString()`.

Fixes: https://github.com/electron/electron/issues/32206
Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-05-09 09:38:53 -04:00
Keeley Hammond
6fea35271c build: change upload-to-s3 vars to upload-to-storage (#34105)
* build: change upload-to-s3 vars to upload-to-az

* build: change upload-to-az to upload-to-storage
2022-05-09 09:34:17 -04:00
Sudowoodo Release Bot
dd7dfd7ecd Bump v20.0.0-nightly.20220509 2022-05-09 06:01:36 -07:00
Raymond Zhao
3ba60de51d docs: add missing ackCallback parameter (#34126) 2022-05-06 13:24:14 -07:00
Sudowoodo Release Bot
1bdbb69351 Bump v20.0.0-nightly.20220506 2022-05-06 12:58:25 -07:00
Keeley Hammond
2900bc55aa build: remove ending slash upload-index-json (#34125) 2022-05-06 12:57:18 -07:00
Sudowoodo Release Bot
0d35084ada Revert "Bump v20.0.0-nightly.20220506"
This reverts commit 0f2da5c830.
2022-05-06 08:14:11 -07:00
Sudowoodo Release Bot
0f2da5c830 Bump v20.0.0-nightly.20220506 2022-05-06 06:01:48 -07:00
Samuel Attard
808efd89ed build: use azure function to hash assets instead of lambda (#34117) 2022-05-06 02:42:34 -07:00
Keeley Hammond
0696320d28 build: remove S3 uploads (#34104) 2022-05-05 21:40:34 -07:00
Shelley Vohr
a401360057 refactor: prevent RemoveFromLoginItems() from mounting volumes from login items (#34068) 2022-05-05 20:46:36 -04:00
Jeremy Rose
d8a7219d07 chore: stop using v8::Locker everywhere (#34078) 2022-05-05 11:50:21 -07:00
Samuel Attard
a2a8e493eb test: unflake some more tests (#34084)
* test: unflake webview fullscreen test

* test: unflake net throttle test

* Update spec-main/api-net-spec.ts

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

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2022-05-05 11:42:38 -07:00
Shelley Vohr
90eb47f70b fix: offscreen rendering crash on input select (#34069) 2022-05-05 09:53:39 -04:00
Sudowoodo Release Bot
323f7d4c19 Bump v20.0.0-nightly.20220505 2022-05-05 06:01:44 -07:00
Jeremy Rose
706d585eb8 build: fix run-clang-format extension matching (#34076) 2022-05-05 10:41:52 +02:00
Raymond Zhao
5b648854d5 fix: requestSingleInstanceLock API sometimes hangs (#33777) 2022-05-04 13:30:30 -04:00
Milan Burda
2091343b78 refactor: initialize member variables directly (#34046) 2022-05-04 16:30:05 +02:00
Sudowoodo Release Bot
4fad376b0e Bump v20.0.0-nightly.20220504 2022-05-04 06:04:36 -07:00
Samuel Attard
60f1e5e008 test: unflake some focus tests (#34061)
* spec: unflake some focus tests

* test: disable flaky webFrame visibiilty spec
2022-05-04 01:29:30 -07:00
Milan Burda
349cd98b0a test: fix nativeModulesEnabled in spec/webview-spec.js (#34027) 2022-05-03 23:56:45 -07:00
Samuel Attard
747dfe5851 build: remove dead circle config bits (#34034) 2022-05-03 12:06:25 -07:00
Milan Burda
658407df7a test: fix require('echo') -> require('@electron-ci/echo') (#34026) 2022-05-03 11:49:01 -04:00
Sudowoodo Release Bot
0893733496 Bump v20.0.0-nightly.20220503 2022-05-03 06:02:57 -07:00
Darshan Sen
f887000d50 fix: make BrowserWindow#isFocused() return false when blur() is called on macOS (#33734)
The isFocused() method on macOS works by checking if the selected
BrowserWindow is a key window. Unfortunately, this didn't work well
with blur() because it wasn't calling any macOS APIs that would change
the key status of the window. Hence, this changes the implementation of
blur() to call orderOut first, which removes the key
status of the window. Then when the orderBack function is called, it
moves the window to the back of its level in the screen list, without
changing the key window.

Fixes: https://github.com/electron/electron/issues/33732
Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-05-03 16:39:18 +09:00
Ruben R
7dee5179cb Handle SIGUSR2 (#33589)
`start-server-webpack-plugin` uses `SIGUSR2` to signal an HMR update to a server process: https://github.com/ericclemmons/start-server-webpack-plugin/blob/master/src/StartServerPlugin.js#L70

Note that this signal does not actually kill the child process, but merely functions as a message-passing system.
2022-05-03 10:36:06 +09:00
John Kleinschmidt
a71936e395 test: skip flaky test on 32-bit Windows (#34021) 2022-05-02 21:08:20 -04:00
Jamie Magee
e1ed96b574 test: scope internal test fixtures under @electron-ci (#33822)
* test: scope internal test fixtures under `@electron`

* Missed references

* Move packages from @electron to @electron-ci scope

* Fix tests
2022-05-02 13:09:23 -04:00
Kevin Ushey
9901d2f281 fix: support mixed-case extensions in Linux file dialogs (#33918) 2022-05-02 11:54:17 -04:00
Keeley Hammond
14f07d7814 fix: move FirstPartySets into the browser process (#33998)
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3448551
2022-05-02 08:20:30 -07:00
Sudowoodo Release Bot
6f851afab5 Bump v20.0.0-nightly.20220502 2022-05-02 06:01:26 -07:00
Milan Burda
682d2e3f78 build: allow script/spec-runner.js with empty list of runners (#33982) 2022-05-02 14:49:13 +09:00
Milan Burda
b55f9d868a spec: allow connections to port 2049 (#33983) 2022-04-30 04:29:05 -07:00
Sudowoodo Release Bot
ce562b6889 Bump v20.0.0-nightly.20220429 2022-04-29 06:01:34 -07:00
Keeley Hammond
015185ad5a fix: fix FirstPartySetsHandler initialization (#33971) 2022-04-28 22:17:19 -07:00
Shelley Vohr
fb534c927a refactor: better solution for resizable frameless DCHECK (#33790)
* refactor: better solution for resizable frameless DCHECK

* fix: also implement TargetForRectin WinFrameView
2022-04-28 20:34:12 -04:00
Jacek Oleksy
192a7fad0d fix: disable MallocNanoZone on mac (#33704) 2022-04-28 10:28:27 -04:00
Sudowoodo Release Bot
097da1d4ba Bump v20.0.0-nightly.20220428 2022-04-28 06:01:07 -07:00
Samuel Attard
b3530d5df8 build: use smaller resource_class because goma (#33905) 2022-04-28 03:17:05 -07:00
Darshan Sen
b5297ea8e2 docs: fix return type of setJumpList() in electron.d.ts (#33910)
Before:
```ts
setJumpList(categories: (JumpListCategory[]) | (null)): void;
```

After:
```ts
setJumpList(categories: (JumpListCategory[]) | (null)): ('ok' | 'error' | 'invalidSeparatorError' | 'fileTypeRegistrationError' | 'customCategoryAccessDeniedError');
```

Fixes: https://github.com/electron/electron/issues/33909
Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-04-28 03:15:23 -07:00
Baoshuo Ren
15c931201a chore: remove git.io (#33933)
* chore: remove git.io

All links on git.io will stop redirecting after April 29, 2022.

- https://github.blog/changelog/2022-04-25-git-io-deprecation/

* fix: lint

Co-authored-by: Charles Kerr <charles@charleskerr.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-04-27 15:56:01 -04:00
Samuel Attard
f91b24deb5 build: ensure sync-done file exists during git cache save (#33949) 2022-04-27 15:54:52 -04:00
Samuel Attard
d2c3e78117 build: actually verify az urls too (#33929) 2022-04-27 10:37:26 -07:00
Sudowoodo Release Bot
a00544c745 Bump v20.0.0-nightly.20220427 2022-04-27 06:00:58 -07:00
Samuel Attard
160d6923db build: improve CI speeds and reduce CI costs (#33904)
* rely on src cache instead of workspace
* run some tasks in the background and "thread join" later
* merge some ninja build commands to reduce overhead
2022-04-26 23:14:59 -07:00
Samuel Attard
6d5501d0bd build: use dev-cdn instead of sysroots s3 bucket (#33922) 2022-04-26 15:21:59 -07:00
Sudowoodo Release Bot
bfabd67112 Bump v20.0.0-nightly.20220426 2022-04-26 06:01:17 -07:00
Sudowoodo Release Bot
40c022ad69 Bump v20.0.0-nightly.20220425 2022-04-25 14:01:18 -07:00
John Kleinschmidt
028a72daac build: fix macos release GN gen (#33915) 2022-04-25 14:00:32 -07:00
John Kleinschmidt
6a1748da06 ci: update release script to handle new CircleCI configs (#33914) 2022-04-25 11:14:16 -04:00
Sudowoodo Release Bot
0a73f60423 Revert "Bump v20.0.0-nightly.20220425"
This reverts commit f48a921d14.
2022-04-25 06:47:42 -07:00
Sudowoodo Release Bot
f48a921d14 Bump v20.0.0-nightly.20220425 2022-04-25 06:02:58 -07:00
electron-roller[bot]
f3e0517b6e chore: bump chromium to 102.0.4999.0 (main) (#33731)
* chore: bump chromium in DEPS to 102.0.4999.0

* 3576640: Set OOM handler during V8 initialization

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

* 3574964: Remove deprecated base::Value usage in print_settings_conversion code.

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

* 3570062: Replicate Active state to render process for all RenderViews.

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

* chore: fixup patch indices

* 3380402: Remove legacy SwiftShader

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

* 3570254: [Local Fonts] Rename permission name from FONT_ACCESS to LOCAL_FONTS.

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

* 3572172: Rename or remove several parameters involved in creation of MimeHandler streams

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

* fix: add missing base/bits include

* chore: fix lint

* chore: remove ia32 Linux support

* chore: patch out swift-format cipd dep on macOS

* build: apply patch better

* build: reset all caches

* build: update zip manifests to remove swiftshared libraries

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

* Revert "build: update zip manifests to remove swiftshared libraries"

This reverts commit 6aeec01ef1a79425a7b7d8c1cfb131a26b91c494.

* Revert "3380402: Remove legacy SwiftShader"

This reverts commit 4c7eebbbf2d0a459cc192959e17ae20f970c2da2.

* build: remove unused swiftshader egl libraries

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: Samuel Attard <sattard@salesforce.com>
2022-04-22 15:36:22 -07:00
Sudowoodo Release Bot
53c3dd68b2 Revert "Bump v20.0.0-nightly.20220422"
This reverts commit 283e4826af.
2022-04-22 11:45:02 -07:00
Sudowoodo Release Bot
283e4826af Bump v20.0.0-nightly.20220422 2022-04-22 11:40:22 -07:00
Sudowoodo Release Bot
e571417c52 Revert "Bump v20.0.0-nightly.20220422"
This reverts commit a5501d7118.
2022-04-22 09:22:41 -07:00
Sudowoodo Release Bot
a5501d7118 Bump v20.0.0-nightly.20220422 2022-04-22 09:18:12 -07:00
Sudowoodo Release Bot
0c8c755ffb Revert "Bump v20.0.0-nightly.20220422"
This reverts commit bb146e3deb.
2022-04-22 09:17:29 -07:00
Sudowoodo Release Bot
bb146e3deb Bump v20.0.0-nightly.20220422 2022-04-22 06:01:30 -07:00
Samuel Attard
33e9bfd99b build: improve circleci config (#33881)
* build: fix conditional restore of git cache

* build: split lint out of setup.yml
2022-04-21 14:34:25 -07:00
Sudowoodo Release Bot
e864bc44c6 Bump v20.0.0-nightly.20220421 2022-04-21 06:05:18 -07:00
Milan Burda
64517b36ef build: fix intermittent compilation failures on macOS (#33768)
* build: fix intermittent compilation failures on macOS

* chore: remove //base dependency from main executable

* chore: fix lint

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2022-04-21 17:25:51 +09:00
Robo
00021a41b1 chore: backport 7c9b3938d from libuv (#33815)
Backports https://github.com/libuv/libuv/pull/3597
2022-04-21 10:38:47 +09:00
Robo
b53118ca28 fix: adopt partition alloc early initialization (#33832)
Refs https://chromium-review.googlesource.com/c/chromium/src/+/3298858
2022-04-20 13:52:15 -07:00
Jeremy Rose
0c864837af chore: use semantic-commit-action (#33857)
* chore: use semantic-commit-action

* Update semantic.yml
2022-04-20 16:49:59 -04:00
Sudowoodo Release Bot
fec147a0cb Bump v20.0.0-nightly.20220420 2022-04-20 06:01:22 -07:00
Samuel Attard
841e0a4e0c fix: include accessibility blink strings (#33840) 2022-04-19 20:00:51 -07:00
Sudowoodo Release Bot
31c2b5703a Bump v20.0.0-nightly.20220419 2022-04-19 06:00:47 -07:00
Darshan Sen
6733279037 docs: document when BrowserWindow and BrowserView can be used (#33696)
We already document such info for other APIs, like the 'screen' API in
f711fe6b57/docs/api/screen.md (L7-L8).
So we should do the same thing for these ones too.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-04-18 10:11:44 -04:00
Samuel Attard
2d0ad04354 docs: update security guide regarding ctx isolation (#33807) 2022-04-18 10:09:54 -04:00
Sudowoodo Release Bot
5ae234d5e1 Bump v20.0.0-nightly.20220418 2022-04-18 06:38:13 -07:00
Robo
0f087127de chore: fix patch conflicts from 37b7e347 (#33818)
* chore: update patches

* chore: address review feedback
2022-04-18 09:36:17 -04:00
Sudowoodo Release Bot
b9c0166b49 Revert "Bump v20.0.0-nightly.20220418"
This reverts commit fd191fc50b.
2022-04-18 06:35:44 -07:00
Sudowoodo Release Bot
fd191fc50b Bump v20.0.0-nightly.20220418 2022-04-18 06:01:41 -07:00
Robo
37b7e347fc fix: potential crash caused by dlopen different gtk libraries (#33650) 2022-04-18 13:24:32 +09:00
Sudowoodo Release Bot
9d4aceb940 Bump v20.0.0-nightly.20220415 2022-04-15 09:32:01 -07:00
Sudowoodo Release Bot
eee4232069 Bump v20.0.0-nightly.20220414 2022-04-14 20:08:45 -07:00
Sudowoodo Release Bot
635b3a94c8 Revert "Bump v20.0.0-nightly.20220414"
This reverts commit 99791f620b.
2022-04-14 20:08:02 -07:00
Sudowoodo Release Bot
99791f620b Bump v20.0.0-nightly.20220414 2022-04-14 18:08:45 -07:00
Keeley Hammond
8b0af86097 ci: build python2 from source (#33793)
* ci: add python2 to publish jobs

* chore: install python2 via circle
2022-04-14 18:07:51 -07:00
Sudowoodo Release Bot
f5e874cbcb Revert "Bump v20.0.0-nightly.20220414"
This reverts commit dda8bc3cd1.
2022-04-14 07:03:05 -07:00
Sudowoodo Release Bot
dda8bc3cd1 Bump v20.0.0-nightly.20220414 2022-04-14 06:13:26 -07:00
Shelley Vohr
233a39dbc9 fix: event propagation after exiting fullscreen on Windows (#33757) 2022-04-14 12:35:36 +02:00
Keeley Hammond
7658edfa1a ci: manually install python@2 (#33785) 2022-04-14 09:53:05 +02:00
Robo
16f8d713ab fix: apply senderFrame details to ipcMain port event (#33756) 2022-04-13 21:01:00 -07:00
Keeley Hammond
3d4d39d67b chore: interpret bytes to string (#33766) 2022-04-13 14:51:00 -07:00
Shelley Vohr
b66667b843 feat: allow null when subscribing notification (#33641)
* feat: allow null when subscribing notification

* docs: document null event
2022-04-13 22:02:33 +02:00
Shelley Vohr
bfbba9dad6 chore: add missing GN dep (#33758) 2022-04-13 10:55:57 -07:00
Shelley Vohr
341b7bdf4a fix: #ARGB to #RGBA conversion (#33707)
* fix: argb to rgba conversion

* chore: remove logging import

* refactor: color_str -> converted_color_str
2022-04-13 10:46:05 +02:00
Sudowoodo Release Bot
4c4e02318f Revert "Bump v20.0.0-nightly.20220412"
This reverts commit de2f48b40f.
2022-04-12 23:49:32 -07:00
Sudowoodo Release Bot
de2f48b40f Bump v20.0.0-nightly.20220412 2022-04-12 21:26:21 -07:00
Sudowoodo Release Bot
a9c52926c0 Revert "Bump v20.0.0-nightly.20220412"
This reverts commit 7038d2d418.
2022-04-12 21:25:04 -07:00
Jeremy Rose
bfa5b21044 docs: note reason for is_cfi = false (#33749) 2022-04-12 21:00:03 -07:00
Samuel Attard
d804cd5de2 build: add comment for enable_cet_shadow_stack (#33747) 2022-04-12 16:23:07 -07:00
Sudowoodo Release Bot
7038d2d418 Bump v20.0.0-nightly.20220412 2022-04-12 16:14:58 -07:00
Sudowoodo Release Bot
b8c0ef9713 Revert "Bump v20.0.0-nightly.20220412"
This reverts commit c5b93eaf17.
2022-04-12 16:13:49 -07:00
Sudowoodo Release Bot
c5b93eaf17 Bump v20.0.0-nightly.20220412 2022-04-12 14:10:26 -07:00
Keeley Hammond
2ca46058cd build: migrate urllib to python3 (#33737) 2022-04-12 14:07:40 -07:00
Shelley Vohr
3057ff0120 docs: note safeStorage.isEncryptionAvailable() needs ready event (#33724) 2022-04-12 12:47:15 -07:00
Sudowoodo Release Bot
48edb2c707 Revert "Bump v20.0.0-nightly.20220412"
This reverts commit 56ab3d73c6.
2022-04-12 12:06:19 -07:00
Sudowoodo Release Bot
56ab3d73c6 Bump v20.0.0-nightly.20220412 2022-04-12 08:05:06 -07:00
Sudowoodo Release Bot
0287c3f511 Revert "Bump v20.0.0-nightly.20220412"
This reverts commit 1c53fc4331.
2022-04-12 07:52:41 -07:00
Sudowoodo Release Bot
1c53fc4331 Bump v20.0.0-nightly.20220412 2022-04-12 06:00:49 -07:00
Jeremy Rose
c0d442364a build: explicitly run scripts with python3 (#33720)
* build: explicitly run scripts with python3

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-04-12 13:21:55 +02:00
electron-roller[bot]
59dd17f2cf chore: bump chromium to 102.0.4989.0 (main) (#33557)
* chore: bump chromium in DEPS to 102.0.4975.0

* chore: bump chromium in DEPS to 102.0.4977.0

* chore: update patches

* Remove parameter of OnGpuProcessCrashed()

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

* hid: Add exclusionFilters option to requestDevice

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

* chore: bump chromium in DEPS to 102.0.4979.0

* chore: bump chromium in DEPS to 102.0.4981.0

* chore: update patches

* Deny notification/push permission for documents in non-standard StoragePartitions

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

* Improve FrameTreeNode tracking in URLLoaderNetworkContext

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

* fixup! Remove parameter of OnGpuProcessCrashed()

* chore: fix lint

* Reland "Use gfx::Insets[F]::TLBR() and gfx::Insets[F]::VH() in the rest of Chrome"

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

* chore: bump chromium in DEPS to 102.0.4983.0

* Ensure EyeDropperView does not access a destroyed window

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

* ci: don't delete dawn .git directory

83901: Adds a generated file with the dawn git hash encoded at build time. | https://dawn-review.googlesource.com/c/dawn/+/83901

* ci: update Windows toolchain

3550827: New toolchain for Windows 10 20348 SDK | https://chromium-review.googlesource.com/c/chromium/src/+/3550827

* chore: bump chromium in DEPS to 102.0.4985.0

* chore: update patches

* chore: bump chromium in DEPS to 102.0.4987.0

* chore: update patches

* 3563432: codehealth: remove uses of DictionaryValue in cbui/webui

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

* chore: update patches after rebase

* Use gfx::Insets[F]::TLBR() and gfx::Insets[F]::VH() in the rest of Chrome

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

* 3565724: Preserve "proper method names" as-is in error.stack.

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

* chore: bump chromium in DEPS to 102.0.4989.0

* chore: update patches

* fixup ci: don't delete dawn .git directory for Windows

* 3560843: Remove multi-parameter version of gfx::Rect[F]::Inset()

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

* 3572711: Remove unused IDS_PDF_TOOLTIP_ROTATE_CW resource.

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

* 3572926: Reland "[Sysroot] Switch to Debian Bullseye stable"

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

* build: fixup sysroots with electron specific dependencies

* fixup Remove multi-parameter version of gfx::Rect[F]::Inset()

* fixup 3565724: Preserve "proper method names" as-is in error.stack.

* fixup Remove multi-parameter version of gfx::Rect[F]::Inset()

* test: add spec for navigator.hid.requestDevice({ exclusionFilters: [...] }

* fixup 3565724: Preserve "proper method names" as-is in error.stack.

* ci: use python3 to get the windows toolchain profile

3525960: Explicitly run everything with python3 | https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3525960

* chore: add diagnostic logging

* fix: try calling process.crash()

* chore: remove logging

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-04-12 13:19:14 +02:00
Shelley Vohr
e8ed9cb4b5 test: re-enable disabled ScriptOrModule specs (#33702) 2022-04-12 12:00:42 +02:00
Jeremy Rose
c9fd255093 build: use python3 to lint (#33627) 2022-04-11 16:05:21 -07:00
Shelley Vohr
caddc83cfe feat: implement chrome.tabs.reload (#33560) 2022-04-11 22:51:10 +02:00
Sudowoodo Release Bot
a7a5e7fcfd Bump v20.0.0-nightly.20220411 2022-04-11 11:23:37 -07:00
Sudowoodo Release Bot
207d4e5823 Revert "Bump v20.0.0-nightly.20220411"
This reverts commit 8e2310db31.
2022-04-11 11:22:06 -07:00
Sudowoodo Release Bot
8e2310db31 Bump v20.0.0-nightly.20220411 2022-04-11 11:08:17 -07:00
Sudowoodo Release Bot
6872306117 Revert "Bump v20.0.0-nightly.20220411"
This reverts commit 9d6e6c45c1.
2022-04-11 11:03:28 -07:00
Keeley Hammond
41c1a7e318 chore: modify uploaded assets for win-ia32 (#33699)
* chore: filter correct symbol files

* chore: upload correct assets
2022-04-11 11:02:01 -07:00
Sudowoodo Release Bot
9d6e6c45c1 Bump v20.0.0-nightly.20220411 2022-04-11 06:01:10 -07:00
Sudowoodo Release Bot
f711fe6b57 Bump v20.0.0-nightly.20220408 2022-04-08 06:04:36 -07:00
John Kleinschmidt
94c2a7671c build: temporarily disable 32-bit Windows symbol generation (#33653)
* build: temporarily disable 32-bit Windows symbol generation

* fix: modify upload.py

* chore: fix comment

Co-authored-by: VerteDinde <vertedinde@electronjs.org>
2022-04-08 04:17:51 -07:00
Milan Burda
4d4682c0e3 fix: report more detailed errors in shell.openExternal() on Windows (#33620) 2022-04-07 11:07:39 -07:00
Sudowoodo Release Bot
7fb1c8faad Revert "Bump v20.0.0-nightly.20220407"
This reverts commit ba8e7b9638.
2022-04-07 08:59:17 -07:00
Sudowoodo Release Bot
ba8e7b9638 Bump v20.0.0-nightly.20220407 2022-04-07 06:02:15 -07:00
Cheng Zhao
75ccec7996 docs: recommend setting e.returnValue (#33628) 2022-04-07 09:39:51 +02:00
Inclusive Coding Bot
68d6d8d451 chore: switch to gender neutral terms (#33532)
* Switch to gender neutral terms

* Update docs/api/web-contents.md

Co-authored-by: Milan Burda <milan.burda@gmail.com>

* Update docs/api/webview-tag.md

Co-authored-by: Milan Burda <milan.burda@gmail.com>

* Update script/release/uploaders/upload.py

Co-authored-by: John Kleinschmidt <jkleinsc@github.com>

* Update docs/tutorial/in-app-purchases.md

Co-authored-by: Milan Burda <milan.burda@gmail.com>

Co-authored-by: inclusive-coding-bot <inclusive-coding-bot@github.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
2022-04-06 17:19:32 -04:00
Jeremy Rose
0168aede8e chore: use //chrome resources directly (#33626) 2022-04-06 09:34:35 -07:00
Sudowoodo Release Bot
a05d9be44f Bump v20.0.0-nightly.20220406 2022-04-06 06:01:36 -07:00
Shelley Vohr
f95e565884 chore: combine some smaller MAS patches (#33595)
* chore: combine some smaller MAS patches

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-04-06 13:40:52 +02:00
David Sanders
4615fc53ca chore: fix typo in NotifyWindowRequestPreferredWidth method name (#33568) 2022-04-05 11:25:07 -05:00
Sudowoodo Release Bot
927ab3104d Revert "Bump v20.0.0-nightly.20220404"
This reverts commit df34d20a21.
2022-04-05 09:17:12 -07:00
Shelley Vohr
cc3743bd43 fix: remove usage of private pid API on MAS (#33594) 2022-04-05 09:09:12 -07:00
Samuel Attard
fcbdaab5e3 fix: add missing translation string for ax tree (#33614) 2022-04-04 20:22:36 -07:00
Samuel Attard
a72acfc535 fix: revert "fix: some frameless windows showing a frame on Windows (#32692)" (#33599)
This reverts commit 7c701367c0.
2022-04-04 17:01:12 -07:00
Samuel Attard
477aa389e6 build: disable RDP 2022-04-04 16:25:32 -07:00
Samuel Attard
1ada5d7ddf Revert "Revert "build: enable RDP for release builds""
This reverts commit dce6c23b33.
2022-04-04 16:25:19 -07:00
Samuel Attard
dce6c23b33 Revert "build: enable RDP for release builds"
This reverts commit d309558f64.
2022-04-04 16:25:10 -07:00
Sudowoodo Release Bot
df34d20a21 Bump v20.0.0-nightly.20220404 2022-04-04 15:50:33 -07:00
Samuel Attard
d309558f64 build: enable RDP for release builds 2022-04-04 15:49:43 -07:00
Sudowoodo Release Bot
128560c4ac Revert "Bump v20.0.0-nightly.20220404"
This reverts commit bff1a37791.
2022-04-04 15:49:20 -07:00
Sudowoodo Release Bot
bff1a37791 Bump v20.0.0-nightly.20220404 2022-04-04 15:46:28 -07:00
Samuel Attard
fcd7dbfa5c build: enable RDP for release builds 2022-04-04 15:45:11 -07:00
Sudowoodo Release Bot
58386fbf43 Revert "Bump v20.0.0-nightly.20220404"
This reverts commit 5985e6fd76a552b9647eb81c0fbaf9f609b11935.
2022-04-04 15:44:53 -07:00
Sudowoodo Release Bot
09251fe24c Bump v20.0.0-nightly.20220404 2022-04-04 15:44:53 -07:00
Samuel Attard
18db9c551d Revert "build: enable RDP for release builds"
This reverts commit c2449c421c.
2022-04-04 15:43:57 -07:00
Samuel Attard
c2449c421c build: enable RDP for release builds 2022-04-04 15:43:36 -07:00
Sudowoodo Release Bot
e28bde9947 Revert "Bump v20.0.0-nightly.20220404"
This reverts commit f287b0b382.
2022-04-04 07:31:00 -07:00
Sudowoodo Release Bot
f287b0b382 Bump v20.0.0-nightly.20220404 2022-04-04 06:03:57 -07:00
Samuel Attard
204b53e7b8 build: upload to AZ as well as S3 (#33573)
* build: upload to AZ aswell as S3

* fix: provide env to azput
2022-04-04 02:32:57 -07:00
David Sanders
0ac6d74536 docs: mark platform-specific functionality for BrowserWindow (#33512) 2022-04-04 18:00:45 +09:00
Micha Hanselmann
78a3752ade fix: create userData on requestSingleInstanceLock() if needed (#33559)
* test: use custom userData folder for requestSingleInstanceLock()

* update test

* prefix test folder path

* fix: create userDataDir on requestSingleInstanceLock() if needed

* Trigger Build
2022-04-04 10:39:55 +09:00
Sudowoodo Release Bot
9207c2aa68 Revert "Bump v20.0.0-nightly.20220401"
This reverts commit 1864edd287.
2022-04-01 09:52:10 -07:00
Sudowoodo Release Bot
1864edd287 Bump v20.0.0-nightly.20220401 2022-04-01 06:02:12 -07:00
Sudowoodo Release Bot
9722ca78b2 Revert "Bump v20.0.0-nightly.20220331"
This reverts commit 7612df7687.
2022-03-31 12:14:36 -07:00
Sudowoodo Release Bot
7612df7687 Bump v20.0.0-nightly.20220331 2022-03-31 06:01:00 -07:00
Cheng Zhao
cbd06cd25e docs: remove "cache" from app.getPath (#33509) 2022-03-31 09:33:38 +09:00
Shelley Vohr
8c8642634d fix: don't unmaximize on macOS if user set max bounds (#33480) 2022-03-31 00:29:02 +02:00
Robo
afe0116d59 fix: build when pdf component is disabled (#33513) 2022-03-30 11:55:38 -07:00
electron-roller[bot]
b711860d21 chore: bump chromium to 102.0.4971.0 (main) (#33454)
* chore: bump chromium in DEPS to 102.0.4965.0

* chore: 3-way merge of chromium/printing.patch

* chore: update patch shear in chromium/picture-in-picture.patch

* chore: update patches

* 3101519: Window Placement: Prototype fullscreen companion window support

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

build: add popup_preventer.cc, .h to our library. It's needed because
FullscreenController, we were already using, started aggregating a
PopupPreventer in 3101519.

* chore: bump chromium in DEPS to 102.0.4967.0

* Revert "3101519: Window Placement: Prototype fullscreen companion window support"

This reverts commit fc215cb99c464e939882ed3f5cf8e9874a8e3311.

Adding popup_preventer might not be the right solution; there are
cascading dependencies.

* 3551449: Add service-based usage for system print settings

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

chore: fix code shear in patches/chromium/printing.patch

* chore: update patches

* chore: bump chromium in DEPS to 102.0.4969.0

* chore: update patches

* chore: bump chromium in DEPS to 102.0.4971.0

* chore: update fix_patch_out_permissions_checks_in_exclusive_access.patch

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

PopupunderPreventer is not useful in //electron since the window
attributes are controlled by the user via setWindowOpenHandler.

* chore: update patches

* Add FirstPartySetsHandler as a interface class in content API.

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

* Create a new MediaStreamRequestType for GetOpenDevice

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

* Support site isolation for <webview> tags in WebViewRendererState.

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

* ci: update xcode version

Refs https://chromium-review.googlesource.com/c/chromium/src/+/3544199
https://developer.apple.com/documentation/screencapturekit/capturing_screen_content_in_macos

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: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2022-03-30 14:08:58 -04:00
Cheng Zhao
929fc8bea5 test: make test apps' name prefixed with electron-test- (#33511) 2022-03-30 13:17:34 -04:00
John Kleinschmidt
a508dce1bf ci: save Windows artifacts at end of job in case they fail (#33510) 2022-03-30 09:50:26 -04:00
Sudowoodo Release Bot
f13f07023f Bump v20.0.0-nightly.20220330 2022-03-30 06:01:28 -07:00
Shelley Vohr
aac546368f test: re-enable test-child-process-stdio-overlapped (#33502) 2022-03-30 12:51:13 +02:00
Cheng Zhao
c119b1ebef chore: remove redundant code in node integration (#33500) 2022-03-29 20:09:42 -07:00
Samuel Attard
df3cfb663c refactor: use posix_spawn instead of NSTask so we can disclaim the spawned ShipIt executable (#33468) 2022-03-29 19:50:59 -07:00
Mitchell Cohen
a9296229c8 feat: add app.isHidden API for macOS (#32155)
* feat: add app.isHidden API

* Update docs/api/app.md

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

* fixed isHidden tests

* Update docs/api/app.md

Co-authored-by: John Kleinschmidt <jkleinsc@github.com>

* Update spec-main/api-app-spec.ts

Co-authored-by: John Kleinschmidt <jkleinsc@github.com>

Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
2022-03-29 21:34:07 -04:00
David Sanders
9c3b159b95 fix: on macOS show BrowserWindow on maximize if not currently shown (#32949) 2022-03-29 19:08:34 -04:00
Keeley Hammond
89c1abd1b3 chore: bump NMV for Electron 20 (#33476) 2022-03-29 16:07:55 -07:00
dependabot[bot]
10f67e64f9 build(deps): bump ansi-regex from 3.0.0 to 3.0.1 in /spec (#33484)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-29 18:47:46 -04:00
Shelley Vohr
0615fadead chore: set v8_typed_array_max_size_in_heap to default (#33496) 2022-03-29 15:34:44 -07:00
Samuel Attard
479f652f90 feat: add new Squirrel.Mac bundle installation method behind flag (#33470) 2022-03-29 14:47:34 -07:00
Samuel Attard
4c988a5a24 docs: fix type of 'value' param in setUserDefaults (#33481) 2022-03-29 14:47:06 -07:00
dependabot[bot]
94498b923e build(deps): bump minimist from 1.2.5 to 1.2.6 in /spec-main (#33431)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-29 12:25:40 -04:00
Shelley Vohr
d1ea62c3e8 fix: getting focused window with destroyed webContents (#33404)
* fix: getting focused window with destroyed webContents

* fix: add extra safeguards
2022-03-29 12:22:58 -04:00
Shelley Vohr
8ea0631b82 test: re-enable desktop specs (#33497) 2022-03-29 11:57:21 -04:00
Shelley Vohr
f0c22a770d chore: fix moveAbove desktopCapturer spec (#33471) 2022-03-29 16:05:08 +02:00
dependabot[bot]
bf3d0e2257 build(deps-dev): bump minimist from 1.2.5 to 1.2.6 (#33432)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-29 15:39:38 +02:00
Sudowoodo Release Bot
9a2b35163e Bump v19.0.0-nightly.20220329 2022-03-29 06:01:08 -07:00
Cheng Zhao
4e66b072da chore: update libuv patch for event loop integration (#31647)
* chore: update libuv patch for loop integration

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-03-29 19:03:07 +09:00
Joseph
6b66fea67d docs: update heading level of webFrame.insertCSS (#33467) 2022-03-29 16:02:30 +09:00
John Kleinschmidt
37a94d9857 ci: fixup esbuild on macos (#33486)
* ci: fixup esbuild on macos

* ci: call update_depot_tools right after clone

* when all else fails, use sed
2022-03-28 20:57:11 -07:00
Gellert Hegyi
4aeeb64d30 fix: crash when WindowButtonsProxy references cleared NSWindow (#33069)
* resets WindowButtonsProxy on window delete on macOS

* fixes reset
2022-03-28 23:02:44 -04:00
Calvin
594dc7e24a chore: update node types version (#33452)
* chore: update node types version

* update express types to solve type conflict

* one more yarn.lock type bump

* update another types package to fix incompatible global declarations

* remove incompatible type magicks

* update our ambient types to match the node types

* fix test type
2022-03-28 14:37:35 -07:00
Charles Kerr
1c5bbba5cf docs: simplify skipTaskbar breaking changes text (#33479) 2022-03-28 15:06:11 -05:00
Baitinq
c4e3a1aad3 docs: Use Node's URL parser in the 5th security recommendation (#33463)
Rule 13 recommends using Node's URL parser for handling url inputs. At
the moment, this is not being followed in the code example for rule 5,
which falls back on checking that the url ends with a '/'. If this was
forgotten when a user copies this code it could introduce security
vulnerabilities if an attacker uses an URL in the following way:

"https://example.com.attacker.com"

Using Node's URL parser fixes this potential missuse and enables the
'/' to be omited from the code example.

Co-authored-by: Baitinq <you@example.com>
2022-03-28 14:25:44 -04:00
Samuel Attard
3c30b59c3e build: store last ninja log in artifacts (#32936) 2022-03-28 13:34:10 -04:00
Marek Rusinowski
cdf2b3f4e4 fix: calling of X11 functions when running under Wayland (#33355)
* fix: don't call X11 functions in file dialog and message box

* refactor: remove unused GtkUiPlatform declaration

* fix: set gtk darktheme only when running under X11

* fix: replace X11 window state watcher with implementation using ozone

* fix: make sure global menu barr is used only when supported

* fix: don't call X11 function in native window views under wayland

* style: fix lint issues

* fix: use GtkUiPlatform::ShowGtkWindow instead of gtk_window_present directly

* refactor: extract CreateGlobalMenuBar into separate function

* refactor: move checking for WaylandWindowDecorations inside class

* fix: check if we run under X11 only in ozone build

* refactor: drop including unused ui/base/ui_base_features.h header

* fix: modify ui_gtk_public_header.patch to also export gtk_ui.h

* fix: refactor guarding of X11 calls

- Introduce patch exposing new electron_can_call_x11 property
- Replace defined(USE_OZONE) with BUILDFLAG(OZONE_PLATFORM_X11) flags

* fix: remove the last remaining usage of USE_X11

* fix: usage of BUILDFLAG(OZONE_PLATFORM_X11) not building on non ozone

* fix: call UpdateWindowState from OnBoundsChanged only under X11
2022-03-28 12:48:50 -04:00
Shelley Vohr
1153a5ce5a fix: BrowserView background color in webContents (#33435)
* chore: fix BrowserView background color in webContents

* disable screen capture test on linux

* spec: fix platform failure condition
2022-03-28 12:47:08 -04:00
Sofia Nguy
9e45a1cd51 docs: Update release dates for E19 and fix typos (#33464) 2022-03-28 09:30:05 -07:00
Sudowoodo Release Bot
d4a34fb175 Bump v19.0.0-nightly.20220328 2022-03-28 06:02:03 -07:00
electron-roller[bot]
c11cd3c14c chore: bump chromium to 102.0.4962.3 (main) (#33447)
* chore: bump chromium in DEPS to 102.0.4962.3

* 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>
2022-03-25 12:35:32 -05:00
Sudowoodo Release Bot
3c5c880a33 Bump v19.0.0-nightly.20220325 2022-03-25 06:01:13 -07:00
Calvin
b03d6dfba9 fix: non-client windows messages on legacy widget host (again) (#33438) 2022-03-25 11:12:09 +01:00
Robo
f60ff18b14 fix: gn check when //printing component is disabled (#33429) 2022-03-24 20:48:23 -07:00
electron-roller[bot]
7e59d784a0 chore: bump chromium to 102.0.4961.0 (main) (#33091)
* chore: bump chromium in DEPS to 101.0.4911.0

* chore: bump chromium in DEPS to 101.0.4913.0

* chore: bump chromium in DEPS to 101.0.4915.0

* chore: bump chromium in DEPS to 101.0.4917.0

* chore: bump chromium in DEPS to 101.0.4919.0

* chore: bump chromium in DEPS to 101.0.4921.0

* chore: bump chromium in DEPS to 101.0.4923.0

* chore: bump chromium in DEPS to 101.0.4925.0

* chore: bump chromium in DEPS to 101.0.4927.0

* chore: bump chromium in DEPS to 101.0.4929.0

* chore: update patches

* chore: bump chromium in DEPS to 101.0.4931.0

* chore: update patches

* 3475388: Remove mojo::InterfacePtr<T> and mojo::InterfacePtrInfo<T>

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

Actual fixes in 1824792: Migrate DisplayClient to the new Mojo types | https://chromium-review.googlesource.com/c/chromium/src/+/1824792

* 3503874: Remove base::size(), base::empty(), and base::data().

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

* chore: reconcile patches with main rebase

* chore: bump chromium in DEPS to 101.0.4933.0

* chore: update patches

* 3329593: [Fenced Frame] Ensure to support external protocols in a fenced frame

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

* 3503874: Remove base::size(), base::empty(), and base::data().

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

* 3446451: Use forward decl of ImageSkiaRep in //ui/gfx/image/image_skia.h

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

* 3499818: partition_alloc: Rename AllocFlags to AllocWithFlags

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

* chore: bump chromium in DEPS to 101.0.4935.0

* chore: update patches

* 3463286: partition_alloc: Move PartitionAlloc into the own namespaces (15 of N)

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

* 3506590: Reland "Support ChromeOS external protocol dialog for Fenced Frame navigations"

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

* 3475388: Remove mojo::InterfacePtr<T> and mojo::InterfacePtrInfo<T>

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

Actual fixes in 1880987: Convert URLLoaderReqeust from //content to new Mojo types | https://chromium-review.googlesource.com/c/chromium/src/+/1880987 The change in the roll started causing the legacy types to fail

* chore: missing SkRegion include

* 3499600: Introduce blink::WebCssOrigin

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

* fixup!: 3503874: Remove base::size(), base::empty(), and base::data().

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

* chore: bump chromium in DEPS to 101.0.4937.0

* chore: update patches

* 3500826: [locales] Refactor locales for ios

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

* 3509531: Make some public Blink media files private

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

* 3497377: bluetooth: Add BluetoothDevice.forget()

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

* chore: bump chromium in DEPS to 101.0.4939.0

* chore: bump chromium in DEPS to 101.0.4941.0

* 3514804: Deprecate all existing uses of mojo_base.mojom.{Dictionary,List}Value.

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

* 3502592: Delete PPAPI init/shutdown code in //pdf.

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

* chore: update patches

* fixup! 3502592: Delete PPAPI init/shutdown code in //pdf.

* chore: bump chromium in DEPS to 101.0.4943.0

* chore: fix lint, remove unneeded headers

* fixup! 3475388: Remove mojo::InterfacePtr<T> and mojo::InterfacePtrInfo<T>

* update mojo calls in offscreen patch

* update hunspell filenames

* chore: bump chromium in DEPS to 101.0.4945.0

* chore: update patches

* fix offscreen patch again

* chore: bump chromium in DEPS to 101.0.4947.0

* chore: update patches

* chore: bump chromium in DEPS to 101.0.4949.0

* support unseasoned pdf

* update patches

* chore: update patches

* chore: [IWYU] include missing skia headers

* chore: bump chromium in DEPS to 101.0.4951.0

* chore: update patches

* 3457645: media: Remove IsKeySystemsUpdateNeeded()

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

* chore: bump chromium in DEPS to 102.0.4952.2

* chore: update patches

* 3488672: Add documentId as a parameter in tabs.connect() and tabs.sendMessage().

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

* 3508375: Fix an issue dangerous dialog is not shown for some apk download

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

* chore: bump chromium in DEPS to 102.0.4953.0

* chore: update patches

* 3510189: Harden up drag and drop support across same-process boundaries.

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

* 3526815: Remove hardcoded colors from chrome/browser/ui/views/overlay/.

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

* chore: bump chromium in DEPS to 102.0.4955.0

* build: add af and ur locale to manifests

3498914 [locales] Add af and ur to desktop

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

* fixup! build: add af and ur locale to manifests

* chore: bump chromium in DEPS to 102.0.4957.0

* 3529090: gin: set JS flags before v8 initialization

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

chore: fix code shear in chromium/gin_enable_disable_v8_platform.patch

* chore: update patches

* 3536433: [network] Rename data_path and http_cache_path from _path to _directory.

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

* 3111565: Relocated Page.printToPDF implementation to //components

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

refactor: inject E args to PrintRequestedPages() and ScriptedPrintCallback

TODO: currently passes a placeholder for job_settings. We have other
code paths that inject settings from electron_api_web_contents.cc.
Should those be injected here as well? (CC @codebytere)

* fixup! 3111565: Relocated Page.printToPDF implementation to //components

* fixup! 3111565: Relocated Page.printToPDF implementation to //components

* 3520025: Make "libcxx_abi_unstable" not a gn arg

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

build: since it is no longer a gn arg, patch it in

* chore: change usages of std::vector with const elements (#33373)

* chore: bump chromium in DEPS to 102.0.4959.0

* chore: update patches

* build: iwyu base/threading/platform_thread.h

* 3525774: Add GPSForCurrentDocument() into PermissionControllerDelegate.

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

refactor: copy upstream impl of GetPermissionStatusForCurrentDocument into +ElectronPermissionManager

* use gclient_gn_args_from instead of hand-copying

* checkout mac on mac

* chore: update patches

* Revert "checkout mac on mac"

This reverts commit fe9ccf49ec.

* fixup! 3525774: Add GPSForCurrentDocument() into PermissionControllerDelegate.

* fixup! 3457645: media: Remove IsKeySystemsUpdateNeeded()

add nogncheck

* fix: set .eslintrc.json to root to avoid cascade to chromium eslintrc

* Xref: 6dfdf79b8c

Xref: https://reviews.llvm.org/D101458

Upstream added a CMakeLists.txt in an include dir ¯\_(ツ)_/¯ and
so it must be enumerated in filenames.libcxxabi.gni

* 3511268: Remove unused headers from cxx17_backports.h

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

use std::size instead of base::size

* iwyu: SkPaint

3488428: [includes] Fix transitive includes of SkImageEncoder

* chore: [IWYU] include missing skia headers

* fixup! 3511268: Remove unused headers from cxx17_backports.h

* chore: bump chromium in DEPS to 102.0.4961.0

* chore: update patches

* fixup! 3475388: Remove mojo::InterfacePtr<T> and mojo::InterfacePtrInfo<T>

chore: remove unused #include

* fixup! 3510189: Harden up drag and drop support across same-process boundaries. | https://chromium-review.googlesource.com/c/chromium/src/+/3510189

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: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2022-03-24 21:39:03 -04:00
Hanlin
92c5dedc76 Update china npmmirror (#33401)
Source: https://zhuanlan.zhihu.com/p/465424728
2022-03-24 20:08:33 -04:00
Calvin
f69b59effc feat: add WCO title bar style setters (#33066)
* feat: add wco title bar style setters

* return after throwing
2022-03-24 20:02:45 -04:00
Jeremy Rose
4fdf8584ed docs: fix SCA and postMessage links in web-frame-main.md (#33415) 2022-03-24 13:12:47 -04:00
David Sanders
962f4a6558 docs: remove pywin32 from Windows build instructions (#33402) 2022-03-24 09:09:12 -04:00
Sudowoodo Release Bot
d5ad18db03 Bump v19.0.0-nightly.20220324 2022-03-24 06:00:50 -07:00
Cheng Zhao
9d698c76c5 chore: update out-dated node patches (#33421) 2022-03-24 10:26:34 +01:00
electron-roller[bot]
db5a3c014a chore: bump node to v16.14.2 (main) (#32833)
* chore: bump node in DEPS to v16.14.0

* src: add flags for controlling process behavior

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

* src: add x509.fingerprint512 to crypto module

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

* deps: upgrade to libuv 1.43.0

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

* chore: fixup patch indices

* chore: add missing filenames

https://github.com/nodejs/node/pull/39283
https://github.com/nodejs/node/pull/40665

* crypto: trim input for NETSCAPE_SPKI_b64_decode

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

* chore: update patches

* chore: bump node in DEPS to v16.14.1

* tools: enable no-empty ESLint rule

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

* chore: update patches

* chore: update patches

* chore: bump node in DEPS to v16.14.2

* chore: update patches

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>
2022-03-23 18:59:54 -04:00
John Kleinschmidt
cc253f5de9 ci: abort CI if goma authentication is invalid (#33413) 2022-03-23 18:55:26 -04:00
John Kleinschmidt
41f94ef154 Revert "test: re-enable webview resize events test (#33220)" (#33409)
This reverts commit c262eac441.
2022-03-23 12:40:29 -04:00
Jeremy Rose
f912130be6 fix: libuv patches to address child_process.spawn slowness (#33337)
* fix: libuv patches to address child_process.spawn slowness

* chore: backport additional patches

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2022-03-23 06:30:54 -07:00
Sudowoodo Release Bot
a5ab10f3d2 Bump v19.0.0-nightly.20220323 2022-03-23 06:00:58 -07:00
David Sanders
6bb492ac23 docs: update Ubuntu version used for Linux prebuilt binaries (#33372) 2022-03-23 18:46:45 +09:00
andreasdj
3744ac0a52 fix: persist BrowserView content bounds when calculating layout (#32747)
Reverting change introduced in PR: https://github.com/electron/electron/pull/30510

Co-authored-by: Andreas Johansson <aj3621@tobii.com>
2022-03-23 10:16:15 +09:00
Samuel Attard
800b96fe14 docs: add new IPC validation section to the security tutorial (#33369)
* docs: add new IPC validation section to the security tutorial

* Update security.md

* Update docs/tutorial/security.md

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

* Update docs/tutorial/security.md

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

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2022-03-22 20:45:23 -04:00
Fedor Indutny
06a00b74e8 fix: initialize asar support in worker threads (#33216)
* fix: initialize asar support in worker threads

Use `ObjectWrap` instead of gin's Wrap in `electron_api_asar.cc` because
gin isn't fully initialized (and apparently not possible to initialize
without ruining the isolate configuration and array buffer allocator) in
worker threads. In the worker thread call `setupAsarSupport` just as we
do for the main process.

* Update lib/asar/fs-wrapper.ts

Co-authored-by: Darshan Sen <raisinten@gmail.com>

* Update patches/node/worker_thread_add_asar_support.patch

Co-authored-by: Darshan Sen <raisinten@gmail.com>

* Add a test

Co-authored-by: Darshan Sen <raisinten@gmail.com>
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-03-22 20:37:55 -04:00
David Sanders
27ddf19f3c chore: use pylint-2.7 (#33232)
* chore: use pylint-2.7

* chore: fix pylint errors
2022-03-22 20:17:35 -04:00
David Sanders
4633376b28 test: fix crash on image.crop (#33148)
* test: fix crash on image.crop

* Trigger CI
2022-03-22 20:14:49 -04:00
Johns Gresham
8ad1470d08 docs: remove extra $ from npm install command (#33366) 2022-03-23 08:54:08 +09:00
Black-Hole
3aec1c3e3f chore: upgrade @electron/get version to ^1.14.1 (#33259)
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
2022-03-22 09:41:21 -07:00
Keeley Hammond
feff8b3584 ci: enable thin LTO on Mac (#33194)
* build: remove thin lto mac patch

* build: remove step-get-more-space-on-mac

* build: remove USE_PREBUILT_V8_CONTEXT_SNAPSHOT

* ci: re-add mksnapshot logic

* ci: re-add USE_PREBUILT_V8_CONTEXT_SNAPSHOT

* ci: re-add get-more-space, delete thin LTO cache & .dSYM

* ci: don't delete v8_snapshot_generator.dSYM

* ci: add timeout to mksnapshot
2022-03-22 11:31:53 -04:00
Sudowoodo Release Bot
b7188f07f4 Bump v19.0.0-nightly.20220322 2022-03-22 06:00:54 -07:00
David Sanders
4d8ebcd19c chore: change usages of std::vector with const elements (#33373) 2022-03-22 01:52:10 -07:00
Samuel Attard
81318f0acc fix: disable SIGUSR1 when --inspect is disabled (#33188) 2022-03-22 16:51:04 +09:00
Samuel Attard
956406a193 fix: use stricter options in SecStaticCodeCheckValidity (#33368)
* fix: use stricter options in SecStaticCodeCheckValidity

* Update patches/squirrel.mac/fix_use_kseccschecknestedcode_kseccsstrictvalidate_in_the_sec.patch

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

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-03-22 00:19:46 -07:00
Charles Kerr
0af2b8de73 docs: mark skipTaskbar as unsupported on Linux (#33226)
Fixes #33124.
2022-03-22 15:12:20 +09:00
Shelley Vohr
f5112632a3 fix: pend bounds change when moving BrowserWindows (#33288)
* fix: ensure bounds changes apply when moving windows

* chore: remove unused queue include
2022-03-22 15:07:09 +09:00
Charles Kerr
c262eac441 test: re-enable webview resize events test (#33220) 2022-03-22 08:55:53 +09:00
Jeremy Rose
d79d3fc7d7 test: fix and re-enable Network.getResponseBody test (#33227) 2022-03-22 08:38:46 +09:00
zeeker999
108ee7037f fix: IncrementCapturerCount doesn't increase the capturer count (#32973) 2022-03-22 08:38:03 +09:00
Shelley Vohr
59246a4c7c fix: NOTREACHED when resizing windows frameless bounds (#33029)
* fix: NOTREACHED when resizing windows frameless bounds

* fix: scope to window_->IsResizable()
2022-03-22 08:30:05 +09:00
David Sanders
2205d725f2 chore: bump @electron/docs-parser version (#33346) 2022-03-21 14:17:25 -04:00
David Sanders
1ccf206e77 docs: add note about supported versions to issue template (#33348) 2022-03-21 13:51:59 -04:00
Shelley Vohr
db79734bfb feat: support more color formats for backgroundColor (#31868) 2022-03-21 18:35:54 +01:00
Sudowoodo Release Bot
4b8b492b62 Bump v19.0.0-nightly.20220321 2022-03-21 06:01:28 -07:00
Milan Burda
755feb4d81 feat: add nativeTheme.inForcedColorsMode (#32956) 2022-03-21 10:30:02 +01:00
Robo
4cc2ed842e fix: iocp integration when process is reused (#33207) 2022-03-21 16:42:22 +09:00
Lalit
e100402b13 docs: possible change in tutorial/ipc (#33218)
The `counter` channel should be `update-counter` channel
2022-03-21 11:13:55 +09:00
David Sanders
45e2f86fe0 chore: fix pylint-2.7 errors (#33233) 2022-03-21 11:11:21 +09:00
BIKI DAS
fdb60240f3 fix: removed unused imported Objects (#33304) 2022-03-21 10:21:21 +09:00
Keeley Hammond
08d54d2416 fix: intialize FPS file in network service (#33339) 2022-03-18 21:29:42 -07:00
Samuel Attard
e07c2b84d7 fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33323)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames

Notes: no-notes

* refactor: extract electron API IPC to its own mojo interface

* fix: just check main frame not primary main frame
2022-03-18 19:50:05 -07:00
Sudowoodo Release Bot
f2b06324b8 Bump v19.0.0-nightly.20220318 2022-03-18 06:01:12 -07:00
Sudowoodo Release Bot
ac6ed62ab9 Bump v19.0.0-nightly.20220317 2022-03-17 06:01:17 -07:00
David Sanders
7acb513ba6 docs: update links to Chromium source (#33309) 2022-03-17 13:45:55 +01:00
David Sanders
ce8e248b60 docs: remove unused images (#33310) 2022-03-17 09:40:00 +01:00
David Sanders
df8fd1b269 build: fix build by removing usage of removed preloadUrl (#33319) 2022-03-17 00:13:48 -07:00
Jeremy Rose
4342b7ff55 chore: remove awkward semi-documented preloadURL WebPreference (#33228) 2022-03-16 16:23:41 -07:00
Jeremy Rose
e904486076 fix: BrowserWindow.fromWebContents should work in browser-window-created (#33257) 2022-03-16 16:23:14 -07:00
Robo
b2c5623a13 fix: crash when destroying node env with pending promises (#33280)
* fix: crash when destroying node env with pending promises

* chore: add spec
2022-03-16 18:54:45 +01:00
David Sanders
652680e801 fix: ensure external memory adjustments are balanced (#33266) 2022-03-16 18:54:30 +01:00
David Sanders
cf3ee7be56 build: drop pywin32 usage (#26186)
* build: drop pywin32 usage

* chore: ignore extra output on AppVeyor
2022-03-16 13:40:47 -04:00
Abhay Gupta
b274011720 fix: fiddle ipc code pattern 3 (#33262) 2022-03-16 11:01:29 -04:00
Jeremy Rose
02fe245521 docs: webFrame.insertCSS should mention options arg (#33274) 2022-03-16 10:56:20 -04:00
Sudowoodo Release Bot
a5382b7780 Bump v19.0.0-nightly.20220316 2022-03-16 06:02:33 -07:00
David Sanders
fc7f38c7ce docs: remove "marked" from process.getBlinkMemoryInfo() (#33263) 2022-03-16 11:51:56 +01:00
Milan Burda
2657383ea7 feat: allow setting code cache directory (#31154)
* feat: allow setting code cache directory

* chore: address review feedback

* chore: update docs

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: rewrite with base::Contains

Co-authored-by: Charles Kerr <charles@charleskerr.com>

Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-03-15 15:34:53 -05:00
CanadaHonk
37a904c299 docs: specify default for BrowserWindow's center option (#33264) 2022-03-15 10:48:25 -07:00
Samuel Attard
c8a3a00017 fix: race condition where webContents can be nullptr during re-focus and a multi-window close sequence (#33063)
* fix: race condition where webContents can be nullptr during re-focus and a multi-window close sequence

* chore: update electron_inspectable_web_contents_view.mm
2022-03-15 10:45:56 -07:00
Aryan Shridhar
7382891015 docs: reword sentence for better understanding (#33265) 2022-03-15 10:11:40 -07:00
Sudowoodo Release Bot
75339dccb3 Bump v19.0.0-nightly.20220315 2022-03-15 06:01:15 -07:00
Sudowoodo Release Bot
4bdb50eeee Bump v19.0.0-nightly.20220314 2022-03-14 06:02:37 -07:00
Milan Burda
039c061d07 fix: add missing [[maybe_unused]] to IsEnvSet (#33224) 2022-03-14 18:19:15 +09:00
Jeremy Rose
f372953256 fix: cppgc/node collisions in renderer process (#33252)
* fix: cppgc/node collisions in renderer process

* Update be_compatible_with_cppgc.patch
2022-03-12 18:28:10 -05:00
Jeremy Rose
cdc27a3793 fix: prevent UAF crash in setCertificateVerifyProc (#33204) 2022-03-11 11:35:48 -08:00
Darshan Sen
bbb79880f7 chore: cherry-pick 2ed58f4 from chromium (#33109)
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3492658
Fixes: https://github.com/electron/electron/issues/33049
Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-03-11 11:19:51 -06:00
Sudowoodo Release Bot
dc63b8e7f4 Bump v19.0.0-nightly.20220311 2022-03-11 05:01:42 -08:00
Sudowoodo Release Bot
b888d9cd17 Bump v19.0.0-nightly.20220310 2022-03-10 05:01:04 -08:00
David Sanders
e589e9b259 fix: fire show event when BrowserWindow shown via maximize() (#32979) 2022-03-09 17:30:42 -05:00
Harry Hopkinson
86e746c36b Formatted C++ Files According to the clang-format file. (#33158) 2022-03-09 16:28:54 -05:00
Jeremy Rose
ebfcf89a0b fix: propagate unsafely-treat-insecure-origin-as-secure to renderer children (#33189)
* fix: propagate unsafely-treat-insecure-origin-as-secure to renderer children

* fix build
2022-03-09 10:15:50 -05:00
Sudowoodo Release Bot
865a29ed17 Bump v19.0.0-nightly.20220309 2022-03-09 05:00:38 -08:00
Shelley Vohr
373a905319 fix: settings not persisting across devtools loads (#33120)
* fix: settings not persisting across devtools loads

* chore: remove redundant RegisterPreference impl
2022-03-08 20:17:43 -05:00
Jeremy Rose
27527fe5ca feat: warn that preloads will be sandboxed by default in v20 (#32868) 2022-03-08 15:39:53 -08:00
Calvin
e41c3e960d fix: non-client mouse events on WCO-enabled windows (#32871) 2022-03-08 16:06:20 -05:00
Shelley Vohr
076bc58b2a fix: crash when showin item in folder on DevTools (#33024) 2022-03-08 14:40:25 -05:00
Milan Burda
b96f15bfc2 fix: patches to use BUILDFLAG(IS_WIN) / BUILDFLAG(IS_MAC) checks (#33160) 2022-03-08 14:38:15 -05:00
Kevin Ushey
3bc3896ee7 docs: fix documented return value for getFocusedWebContents (#33170) 2022-03-08 14:15:05 -05:00
Sudowoodo Release Bot
a20216de7a Bump v19.0.0-nightly.20220308 2022-03-08 05:01:16 -08:00
Samuel Attard
a5a4818b67 chore: add ignore revs file for GH blame UI (#33171) 2022-03-07 18:40:28 -08:00
Jeremy Rose
aa8119515f fix: gracefully fail if app.configureHostResolver is called before ready (#33062) 2022-03-07 16:52:40 -08:00
John Kleinschmidt
3d9b9b97cf build: put v8_context_snapshot_generator.dSYM in its own zip file (#33183) 2022-03-07 18:47:58 -05:00
Makonede
12aa991df2 Fix a typo (#33042) 2022-03-07 17:17:12 -05:00
Chuion
0ff1727ec0 docs: fix missing dependencies in ipc patterns (#33082) 2022-03-07 17:04:58 -05:00
Micha Hanselmann
a1c01ded9c fix: really strip crashpad handler binary (#33126) 2022-03-07 14:49:50 -05:00
Sudowoodo Release Bot
94a85cb191 Revert "Bump v19.0.0-nightly.20220307"
This reverts commit b43f7702c8.
2022-03-07 09:23:13 -08:00
John Kleinschmidt
f45aaea537 test: disable newly added tests on WOA (#33143)
* tests: disable newly added tests on WOA

* test: also disable test on arm64 macOS
2022-03-07 09:18:58 -05:00
Sudowoodo Release Bot
b43f7702c8 Bump v19.0.0-nightly.20220307 2022-03-07 05:01:43 -08:00
Sudowoodo Release Bot
7beffb51fc Revert "Bump v19.0.0-nightly.20220303"
This reverts commit 89725f31bf.
2022-03-05 15:55:12 -08:00
John Kleinschmidt
3663f8e0ae ci: use larger machine for docs only check (#33141) 2022-03-03 16:57:21 -08:00
Alvin Philips
41c81ed066 docs: Updated list numbering (#32991)
* docs: Updated list numbering

The steps to package and distribute an application using electron had incorrect numbering

* Indented text within ordered list sections

* Removed single space

* Fixed indentation
2022-03-03 15:35:51 -08:00
Erick Zhao
62366aeb95 docs: remove platform notices from tutorial titles (#32937)
* docs: remove platform notices from tutorial titles

* Update docs/tutorial/launch-app-from-url-in-another-app.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

Co-authored-by: Mark Lee <malept@users.noreply.github.com>
2022-03-03 09:56:00 -08:00
Sudowoodo Release Bot
89725f31bf Bump v19.0.0-nightly.20220303 2022-03-03 05:02:08 -08:00
Keeley Hammond
f71a6db3ff ci: disable use-thin-lto on Mac only (#33115)
* build: remove use_thin_lto = false

* ci: enabling if things get really bad (all darwin)

* build: lol don't enable that

* build: add patch to disable thin lto for mac
2022-03-02 16:57:26 -08:00
Sudowoodo Release Bot
c040305db4 Revert "Bump v19.0.0-nightly.20220302"
This reverts commit d9bf02d9b6.
2022-03-02 08:56:25 -08:00
Sudowoodo Release Bot
d9bf02d9b6 Bump v19.0.0-nightly.20220302 2022-03-02 05:01:04 -08:00
Sudowoodo Release Bot
318c91b78c Revert "Bump v19.0.0-nightly.20220228"
This reverts commit 998c85af13.
2022-03-01 16:48:02 -08:00
Shelley Vohr
ebd80a0602 fix: max window size defaults to 0 (#33025) 2022-03-01 14:20:07 -08:00
Keeley Hammond
306147ddf5 fix: disable partition alloc on mac (#33114) 2022-03-01 14:16:37 -08:00
Samuel Maddock
7cb62bfc22 test: BrowserWindow backgroundColor and transparency (#31017)
* test: BrowserWindow backgroundColor

* test: allow similar colors

* test: disable linux capturing

* refactor: split screen capture from reading pixel color
2022-03-01 14:14:11 -08:00
Shelley Vohr
283fa2b79d fix: macOS tray icon alternate images (#33026) 2022-02-28 14:59:27 -08:00
Erick Zhao
1e50f7d2b6 docs: consolidate info docs (#32964)
* docs: consolidate info docs

* fill in table

* more newlines to admonitions

* update china mirror thing
2022-02-28 11:46:52 -08:00
Sudowoodo Release Bot
998c85af13 Bump v19.0.0-nightly.20220228 2022-02-28 05:00:53 -08:00
electron-roller[bot]
3da598015b chore: bump chromium to 100.0.4894.0 (main) (#32852)
* chore: bump chromium in DEPS to 100.0.4880.0

* resolve conflicts

* chore: update patches

* fix patch

* PIP20: add a new DocumentOverlayWindowViews subtype

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

* Clean up PictureInPictureWindowManager::EnterPictureInPicture()

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

* Remove StoragePartitionId.

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

* Remove FLoC code

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

* media: Make AddSupportedKeySystems() Async

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

* [Extensions] Move some l10n file util methods to //extensions/browser

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

* chore: IWYU

* Reland "webhid: Grant permissions for policy-allowed devices"

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

* Migrate base::Value::GetList() to base::Value::GetListDeprecated(): 2/N.

https://chromium-review.googlesource.com/c/chromium/src/+/3435727
https://chromium-review.googlesource.com/c/chromium/src/+/3440910
https://chromium-review.googlesource.com/c/chromium/src/+/3440088

* [text blink period] Cache blink period instead of fetching from defaults

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

* chore: update picture-in-picture.patch

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

* ci: update to Xcode 13.2.1

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

* chore: bump chromium in DEPS to 100.0.4882.1

* chore: update patches

* chore: bump chromium in DEPS to 100.0.4884.0

* chore: update patches

* chore: bump chromium in DEPS to 100.0.4886.0

* chore: update patches

* Refactor DownloadManager to use StoragePartitionConfig

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

* Remove ToWebInputElement() in favor of new WebNode::DynamicTo<> helpers.

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

* refactor: autofill to use the color pipeline

https://bugs.chromium.org/p/chromium/issues/detail?id=1249558
https://bugs.chromium.org/p/chromium/issues/detail?id=1003612

* [ProcessSingleton] Add many more trace events to cover all scenarios

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

* fixup! PIP20: add a new DocumentOverlayWindowViews subtype

* chore: bump chromium in DEPS to 100.0.4888.0

* chore: update patches

* chore: update picture-in-picture.patch

* fixup! refactor: autofill to use the color pipeline

* ci: fixup fix sync

(cherry picked from commit c1e3e395465739bce5ca8e1c5ec1f5bd72b99ebd)

* chore: bump chromium in DEPS to 100.0.4889.0

* chore: update patches

* chore: fix feat_add_data_transfer_to_requestsingleinstancelock.patch

* fixup! PIP20: add a new DocumentOverlayWindowViews subtype

* Remove remaining NativeTheme::GetSystemColor() machinery.

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

* ci: fetch proper esbuild for macos

* ci: fixup fetch proper esbuild for macos

* fix: failing Node.js test on outdated CurrentValueSerializerFormatVersion

* chore: bump chromium in DEPS to 100.0.4892.0

* 3460365: Set V8 fatal error callbacks during Isolate initialization

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

* 3454343: PIP20: use permanent top controls

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

* 3465574: Move most of GTK color mixers to ui/color/.

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

* chore: fixup patch indices

* 3445327: [locales] Remove locales reference

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

* 3456548: [DBB][#7] Blue border falls back to all tab if cropped-to zero pixels

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

* 3441196: Convert GuestView's remaining legacy IPC messages to Mojo

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

* 3455491: Don't include run_loop.h in thread_task_runner_handle.h

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

* fixup! 3454343: PIP20: use permanent top controls

* 3442501: Add missing includes of //base/observer_list.h

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

* 3437552: mac: Deploy a new hermetic build of Xcode 13.2.1 13C100

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

* chore: bump chromium in DEPS to 100.0.4894.0

* fixup! 3460365: Set V8 fatal error callbacks during Isolate initialization

* chore: update patches

* 3425231: Use DnsOverHttpsConfig where appropriate

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

* test: disable test-heapsnapshot-near-heap-limit-worker.js

As a result of CLs linked in https://bugs.chromium.org/p/v8/issues/detail?id=12503,
heap snapshotting near the heap limit DCHECKS in Node.js specs. This will
likely require a larger refactor in Node.js so i've disabled the test for
now and opened an upstream issue on node-v8 issue
at https://github.com/nodejs/node-v8/issues/218.

* Port all usage of NativeTheme color IDs to color pipeline

https://bugs.chromium.org/p/chromium/issues/detail?id=1249558

* chore: update patches after rebase

* ci: use gen2 machine for more disk space

* ci: don't try to make root volume writeable

* ci: use older xcode/macos for tests

* fix: html fullscreen transitions stacking

(cherry picked from commit 5e10965cdd7b2a024def5fc568912cefd0f05b44)

* ci: speed up woa testing

(cherry picked from commit 75c33c48b032137794f5734348a9ee3daa60d9de)
(cherry picked from commit e819962340)

* ci: disable flaky tests on WOA

* ci: run remote tests separately to isolate issue there

* tests: disable node test parallel/test-worker-debug for now

* revert: fix: html fullscreen transitions stacking

* tests: disable flaky test on macOS arm64

* fixup circleci config so build tools can find xcode version

* make sure the workspace is clean before job runs

(cherry picked from commit 75f713c974)

* tests: disable flaky test on Linux

* ci: debug why windows i32 is crashing

* Revert "ci: debug why windows i32 is crashing"

This reverts commit 4c4bba87ea.

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-02-25 13:17:35 -05:00
Sudowoodo Release Bot
c1a667c931 Revert "Bump v19.0.0-nightly.20220225"
This reverts commit d5539ce834.
2022-02-25 07:09:17 -08:00
Sudowoodo Release Bot
d5539ce834 Bump v19.0.0-nightly.20220225 2022-02-25 05:01:49 -08:00
Ruslan
067cc8ae2b Update main.js (#33039) 2022-02-24 12:59:29 -08:00
Shelley Vohr
c5a2af7811 fix: tray garbage collection (#33040) 2022-02-24 20:03:59 +01:00
Sudowoodo Release Bot
8cf345660c Bump v19.0.0-nightly.20220224 2022-02-24 05:01:41 -08:00
Sudowoodo Release Bot
da54cfcb3e Revert "Bump v19.0.0-nightly.20220223"
This reverts commit 5b2d3910c1.
2022-02-23 10:12:10 -08:00
Shelley Vohr
268cd31e38 fix: DCHECK when calling app.exit() (#33035) 2022-02-23 16:27:54 +01:00
Sudowoodo Release Bot
5b2d3910c1 Bump v19.0.0-nightly.20220223 2022-02-23 05:00:59 -08:00
Shelley Vohr
08e26175fd fix: broken OSR transparent option (#32885) 2022-02-23 19:33:42 +09:00
t57ser
41b2945ced feat: add ability to configure if window should close when opener closes (#31314)
* feat: Added ability to configure if window should close when opener closes

* fix: check if embedder is destroyed

* fix: correctly take over closeWithOpener property

* chore: Added documentation

* Update docs/api/window-open.md

Co-authored-by: John Kleinschmidt <jkleinsc@github.com>

* chore: refactor

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>

* chore: changed property name from `closeWithOpener` to `outlivesOpener`

* dummy change to kick lint

* undo above

Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2022-02-23 16:59:50 +09:00
Sudowoodo Release Bot
bcf060fab6 Revert "Bump v19.0.0-nightly.20220221"
This reverts commit 83a4ac1841.
2022-02-22 10:52:23 -08:00
Shelley Vohr
e9b9835feb chore: fix out-of-date chromium patch (#33030) 2022-02-22 16:24:11 +09:00
dependabot[bot]
fa7461685d build(deps): bump ajv from 6.10.1 to 6.12.6 (#32865)
Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.10.1 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.10.1...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-21 14:28:34 -08:00
dependabot[bot]
484a70f9b8 build(deps): bump ajv from 6.11.0 to 6.12.6 in /spec-main (#32864)
Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.11.0 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.11.0...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-21 14:27:56 -08:00
Sudowoodo Release Bot
83a4ac1841 Bump v19.0.0-nightly.20220221 2022-02-21 05:04:50 -08:00
David Sanders
1e8da899a3 chore: fix typos (#32985) 2022-02-21 10:27:45 +01:00
David Sanders
069cde09fb fix: don't restore maximized BrowserWindow when calling showInactive (#32870) 2022-02-21 10:23:55 +01:00
Robo
bdad6335c4 fix: command string for windows protocol handler (#32953) 2022-02-21 16:43:27 +09:00
Jeremy Rose
9d72c8b0ad chore: add @electron/wg-security to patches/ CODEOWNERS (#32963) 2022-02-21 10:27:58 +09:00
Kev
faa392af28 docs: fix broken link to GNOME notifications spec (#32934) 2022-02-21 10:23:17 +09:00
dependabot[bot]
683ff2ea02 build(deps): bump ajv from 6.10.2 to 6.12.6 in /spec (#32863)
Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.10.2 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.10.2...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-21 10:19:53 +09:00
dependabot[bot]
9168f65321 build(deps): bump pathval from 1.1.0 to 1.1.1 (#32861)
Bumps [pathval](https://github.com/chaijs/pathval) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/chaijs/pathval/releases)
- [Changelog](https://github.com/chaijs/pathval/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chaijs/pathval/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: pathval
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-21 10:18:58 +09:00
Sudowoodo Release Bot
101e17d6f3 Revert "Bump v19.0.0-nightly.20220216"
This reverts commit c75ec2e689.
2022-02-18 09:08:21 -08:00
Micha Hanselmann
b1463d2da1 fix: stale renderer process on quit (#32888) 2022-02-17 21:02:22 -08:00
Samuel Attard
36e730da93 build: use gen2 macOS resources for tests (#32935) 2022-02-17 13:57:23 -08:00
Cheng Zhao
e08ced5979 chore: update patch to fix CI (#32950) 2022-02-17 21:05:01 +09:00
Shelley Vohr
84cf685e76 fix: webContents.openDevTools({mode}) not working (#32829) 2022-02-17 14:59:13 +09:00
Fedor Indutny
fe43296f7f chore: backport EPROTOTYPE fixes from libuv (#32856)
This commit backports three commits from libuv's 1.x branch to fix
issues with CPU going to 100% on macOS when EPROTOTYPE is returned.

See: abb109f30f
See: 3a7b95593a
See: de24da8c11
2022-02-17 14:58:21 +09:00
Shelley Vohr
34129b83a4 chore: error catching in node_bindings (#32858) 2022-02-17 14:56:53 +09:00
dependabot[bot]
b1777c5ad1 build(deps): bump pathval from 1.1.0 to 1.1.1 in /spec (#32859)
Bumps [pathval](https://github.com/chaijs/pathval) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/chaijs/pathval/releases)
- [Changelog](https://github.com/chaijs/pathval/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chaijs/pathval/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: pathval
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-17 14:56:38 +09:00
Erick Zhao
cc0eb7b908 docs: update checklists (#32902) 2022-02-16 09:47:32 -08:00
Sudowoodo Release Bot
c75ec2e689 Bump v19.0.0-nightly.20220216 2022-02-16 05:01:13 -08:00
Erick Zhao
600c37160b docs: fix relative link in developer documentation (#32844) 2022-02-15 13:54:28 -08:00
Sudowoodo Release Bot
512bb96dcb Revert "Bump v19.0.0-nightly.20220215"
This reverts commit 90f17e4945.
2022-02-15 09:36:37 -08:00
Sudowoodo Release Bot
90f17e4945 Bump v19.0.0-nightly.20220215 2022-02-15 05:01:28 -08:00
Sudowoodo Release Bot
d36524c640 Revert "Bump v19.0.0-nightly.20220214"
This reverts commit 8397bfbd16.
2022-02-14 06:25:11 -08:00
Sudowoodo Release Bot
8397bfbd16 Bump v19.0.0-nightly.20220214 2022-02-14 05:01:42 -08:00
Sudowoodo Release Bot
1e074605dc Revert "Bump v19.0.0-nightly.20220211"
This reverts commit 96c3179f32.
2022-02-11 09:47:06 -08:00
Sudowoodo Release Bot
96c3179f32 Bump v19.0.0-nightly.20220211 2022-02-11 05:00:51 -08:00
Sudowoodo Release Bot
8dfcf817e4 Revert "Bump v19.0.0-nightly.20220210"
This reverts commit 0a120468c0.
2022-02-10 20:37:02 -08:00
Sudowoodo Release Bot
0a120468c0 Bump v19.0.0-nightly.20220210 2022-02-10 17:46:57 -08:00
Keeley Hammond
4fa3310887 build: add stack_trace.h to main delegate (#32854)
* build: add stack_trace.h to main delegate

* build: trigger circleci

* build: free up a tiny bit more space

* build: disable use_thin_lto

* fixup build/args/all.gn

Co-authored-by: Samuel Attard <sam@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-02-10 17:43:14 -08:00
Sudowoodo Release Bot
ceab6a146a Revert "Bump v19.0.0-nightly.20220210"
This reverts commit cd7dc52c53.
2022-02-10 07:02:10 -08:00
Sudowoodo Release Bot
cd7dc52c53 Bump v19.0.0-nightly.20220210 2022-02-10 05:00:42 -08:00
electron-roller[bot]
28ada6ea8b chore: bump chromium to 100.0.4857.0 (main) (#32419)
* chore: bump chromium in DEPS to 99.0.4819.0

* chore: update patches

* chore: bump chromium in DEPS to 99.0.4824.0

* chore: update patches

* chore: bump chromium in DEPS to 99.0.4827.0

* chore: update patches

* 3352511: PiP: Add inkdrop and pointer cursor to PiP window buttons

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

* 3309164: webhid: Show FIDO devices in the chooser if allowed

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

* 3297868: hid: Add experimental HIDDevice.forget()

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

* 3362491: [Extensions] Move i18n API to //extensions

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

* MCC Refactor step0: Allow embedders to register associated_interface binders with RenderFrameHostImpl::associated_registry_.

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

* 3352616: [Gtk] Remove libgtk from the link-line

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

* 3249211: Clear-Site-Data support for partitioned cookies

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

* [Extensions][COIL] Use [allow|block]list in //extensions/common

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

* Begin ScopedUserPrefUpdate migration to modern base::Value

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

* [Code Health] Refactor PrefService GetDict + GetList to use base::Value

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

* 3354997: [CodeHealth] Remove deprecated SetDictionary method

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

* 3287323: Add LacrosPrefStore for lacros settings

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

* 3365916: [PA] Clean up remaining lazy commit code

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

* [MPArch] Target the external protocol error at the responsible frame.

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

* Pass origin to RegisterNonNetworkSubresourceURLLoaderFactories

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

* Linux: Send OSCrypt raw encryption key to the Network Service

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

* [PlzServiceWorker] Remove remaining references to PlzServiceWorker.

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

* chore: fixup for lint

* 3327621: Fix tablet mode detection for Win 11.

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

* 3342428: ax_mac: move AXTextMarker conversion utils under ui umbrella

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

* 3353974: Mac: Use base::Feature for overlay features

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

* chore: bump chromium in DEPS to 99.0.4828.0

* chore: update patches

* chore: bump chromium in DEPS to 99.0.4837.0

* chore: update patches

* chore: update patches

* 3379142: Drop FALLTHROUGH macro
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3379142

* 3381749: C++17: Allow use of std::map::try_emplace and std::map::insert_or_assign
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3381749

* chore: bump chromium in DEPS to 99.0.4839.0

* chore: update patches

* chore: bump chromium in DEPS to 99.0.4840.0

* chore: bump chromium in DEPS to 99.0.4844.0

* 3395881: [api] Deprecate Local<v8::Context> v8::Object::CreationContext()

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

* chore: update patches

* chore: bump chromium in DEPS to 100.0.4845.0

* chore: update patches

* chore: bump chromium in DEPS to 100.0.4847.0

* chore: update patches

* chore: bump chromium in DEPS to 100.0.4849.0

* chore: update patches

* chore: bump chromium in DEPS to 100.0.4851.0

* chore: bump chromium in DEPS to 100.0.4853.0

* update patches

* chore: update patches

* update patches

* 3383599: Fonts Access: Remove prototype that uses a font picker.

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

* 3404768: Remove ALLOW_UNUSED macros

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

* 3374762: Remove ignore_result.h

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

* 3399305: [unseasoned-pdf] Apply proper frame offsets for touch selections

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

* 3402210: [Extensions] Don't trigger unload event for already unloaded extension

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

* 3410912: Combine URLLoaderClient OnReceiveResponse and OnStartLoadingResponseBody.

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

* 3370428: Make the AuthSchemes policy support dynamic refresh

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

* 3407603: Finish ScopedUserPrefUpdate migration to modern base::Value

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

* 3378352: ozone/x11: move code from //ui/p/x11 to //ui/ozone/p/x11

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

* 3370810: Delete chrome/service, AKA the Cloud Print service process.

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

* chore: bump chromium in DEPS to 100.0.4855.0

* chore: update patches

* fixup! 3370810: Delete chrome/service, AKA the Cloud Print service process.

* revert 3348007 to fix windows build

* 3318572: [Code health] Fix gn check errors in //extensions/browser:*

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

* fix printing.patch

* fix iwyu issue

* 3408515: win: Make ShorcutOperation an enum class and modernize names

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

* 3388333: [UIA] Remove dead code accessibility_misc_utils.h/cc

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

* fix windows build? i hope

* patch gn visibility of //ui/ozone/platform/x11

* missing include base/logging.h

* use BUILDFLAG for USE_NSS_CERTS

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

* defined(OS_*) ==> BUILDFLAG(IS_*)

https://bugs.chromium.org/p/chromium/issues/detail?id=1234043

* fixup! 3404768: Remove ALLOW_UNUSED macros

* another attempt to fix windows build

* temporarily disable the custom scheme service worker test

https://github.com/electron/electron/issues/32664

* fix loading mv3 extensions

not sure what cl broke this unfort.

* fixup! 3404768: Remove ALLOW_UNUSED macros

* patch nan

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

* fix node test

* fix nullptr in FindPdfFrame

* patch perfetto to fix build issue on win-ia32

bc44c3c753

* fix build for linux-x64-testing-no-run-as-node

* fix patch

* skip <webview>.capturePage() test

https://github.com/electron/electron/issues/32705

* test: fix failing tests of focus/blur events of WebContents (#32711)

* inherit stdio from app module test child processes

this prevents them from timing out due to full stdout buffers

* test to see if we can get better logs on windows ci

* try again for appveyor log things

* skip contentTracing tests on ia32

* ci: disable gpu compositing

* drop applied patch

* fix merge fail

* Revert "ci: disable gpu compositing"

This reverts commit 0344129fcb.

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: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
Co-authored-by: VerteDinde <khammond@slack-corp.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2022-02-09 18:58:52 -08:00
Erick Zhao
e9a43be9be docs: add IPC doc (#32059)
* docs: add IPC doc

* fix: use "string" primitive

* use 'string' ipcrenderer

* use "number" primitive

* Update docs/tutorial/ipc.md

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>

* Update docs/tutorial/ipc.md

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>

* add code sample

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2022-02-09 11:00:05 -05:00
Cheng Zhao
254dbd7400 test: disable the test that makes spec runner hang on exit (#32834) 2022-02-09 09:20:51 -05:00
Sudowoodo Release Bot
baaa7787af Bump v19.0.0-nightly.20220209 2022-02-09 05:01:45 -08:00
Shelley Vohr
ac1d426c51 fix: pointer lock escape handling (#32369) 2022-02-09 10:40:50 +01:00
Darshan Sen
841d223b3b build: rebuild the dist_zips when the deps get modified (#32713)
* build: rebuild the dist_zips when the deps get modified

The dist.zip generated by the electron_dist_zip action was not getting
updated when changes were being made to the dependencies, like the
source files. It turns out, we were using data_deps for the dependencies
instead of deps. Here is the difference:

data_deps: things needed to ultimately run the thing built by a target
deps: things needed to build the target

So the difference in treatment of both sets of dependencies is actually
intentional.

Signed-off-by: Darshan Sen <raisinten@gmail.com>

* fixup! build: rebuild the dist_zips when the deps get modified

Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-02-08 13:03:33 -05:00
marekharanczyk
e119da8ce2 Make ElectronBrowser mojo interface frame associated. (#32734) 2022-02-08 11:33:21 -05:00
Shelley Vohr
58af7d2a9a fix: failure to print on macOS (#32767) 2022-02-08 16:15:30 +01:00
Sudowoodo Release Bot
c09ce25ab6 Bump v19.0.0-nightly.20220208 2022-02-08 05:01:02 -08:00
Jeremy Rose
ce86e81aa6 docs: clarify meaning of cssOrigin (#32753) 2022-02-08 12:59:28 +01:00
Sudowoodo Release Bot
bf3650eb1f Bump v19.0.0-nightly.20220207 2022-02-07 05:02:35 -08:00
Shelley Vohr
81fcd732c2 fix: savePage throw on relative paths (#32728) 2022-02-07 09:51:59 +01:00
Sudowoodo Release Bot
d46431b564 Bump v19.0.0-nightly.20220204 2022-02-04 05:01:08 -08:00
Shelley Vohr
fb3f5e490e test: improve webContents.savePage() specs (#32727) 2022-02-03 16:56:50 -05:00
Juan Cruz Viotti
7442905dd2 build: Support cygwin in script/lib/util.py (#32731)
Running a build on Cygwin or MSYS2 otherwise fails.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2022-02-03 15:57:21 -05:00
Sudowoodo Release Bot
2526031a5f Bump v19.0.0-nightly.20220203 2022-02-03 05:01:03 -08:00
Keeley Hammond
e0f2511cba chore: bump NMV for Electron 19 (#32703) 2022-02-02 17:14:11 -05:00
Shelley Vohr
4c39eb32b0 refactor: use QuickLookThumbnailing where applicable (#32456) 2022-02-02 23:01:05 +01:00
Cheng Zhao
c3d11e2ea2 test: fix failing tests of focus/blur events of WebContents (#32711) 2022-02-02 10:32:53 -05:00
Sofia Nguy
ed185f324e docs: Update E18 release date (#32665) 2022-02-02 10:07:11 -05:00
Calvin
9a5a45e804 fix: WCO window hover on window controls on Windows (#32672)
* fix: WCO window hover on window controls

* Update shell/browser/ui/win/electron_desktop_window_tree_host_win.cc

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

Co-authored-by: Robo <hop2deep@gmail.com>
2022-02-02 10:06:36 -05:00
Sudowoodo Release Bot
8b6202b6a8 Bump v19.0.0-nightly.20220202 2022-02-02 05:20:39 -08:00
Shelley Vohr
7c701367c0 fix: some frameless windows showing a frame on Windows (#32692) 2022-02-02 11:23:02 +01:00
1099 changed files with 29525 additions and 17082 deletions

1
.circleci/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
config-staging

View File

@@ -6,6 +6,7 @@ setup: true
# Orbs
orbs:
path-filtering: circleci/path-filtering@0.1.0
continuation: circleci/continuation@0.2.0
# All input parameters to pass to build config
parameters:
@@ -13,7 +14,7 @@ parameters:
type: boolean
default: false
upload-to-s3:
upload-to-storage:
type: string
default: '1'
@@ -43,103 +44,33 @@ parameters:
default: all
enum: ["all", "osx-x64", "osx-arm64", "mas-x64", "mas-arm64"]
# Envs
env-global: &env-global
ELECTRON_OUT_DIR: Default
env-linux-medium: &env-linux-medium
<<: *env-global
NUMBER_OF_NINJA_PROCESSES: 3
# Executors
executors:
linux-docker:
parameters:
size:
description: "Docker executor size"
default: 2xlarge+
type: enum
enum: ["medium", "xlarge", "2xlarge+"]
docker:
- image: ghcr.io/electron/build:27db4a3e3512bfd2e47f58cea69922da0835f1d9
resource_class: << parameters.size >>
# List of always run steps
step-checkout-electron: &step-checkout-electron
checkout:
path: src/electron
steps-lint: &steps-lint
steps:
- *step-checkout-electron
- run:
name: Setup third_party Depot Tools
command: |
# "depot_tools" has to be checkout into "//third_party/depot_tools" so pylint.py can a "pylintrc" file.
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git src/third_party/depot_tools
echo 'export PATH="$PATH:'"$PWD"'/src/third_party/depot_tools"' >> $BASH_ENV
- run:
name: Download GN Binary
command: |
chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)"
gn_version="$(curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/DEPS?format=TEXT" | base64 -d | grep gn_version | head -n1 | cut -d\' -f4)"
cipd ensure -ensure-file - -root . \<<-CIPD
\$ServiceURL https://chrome-infra-packages.appspot.com/
@Subdir src/buildtools/linux64
gn/gn/linux-amd64 $gn_version
CIPD
echo 'export CHROMIUM_BUILDTOOLS_PATH="'"$PWD"'/src/buildtools"' >> $BASH_ENV
- run:
name: Download clang-format Binary
command: |
chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)"
sha1_path='buildtools/linux64/clang-format.sha1'
curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/${sha1_path}?format=TEXT" | base64 -d > "src/${sha1_path}"
download_from_google_storage.py --no_resume --no_auth --bucket chromium-clang-format -s "src/${sha1_path}"
- run:
name: Run Lint
command: |
# gn.py tries to find a gclient root folder starting from the current dir.
# When it fails and returns "None" path, the whole script fails. Let's "fix" it.
touch .gclient
# Another option would be to checkout "buildtools" inside the Electron checkout,
# but then we would lint its contents (at least gn format), and it doesn't pass it.
cd src/electron
node script/yarn install --frozen-lockfile
node script/yarn lint
- run:
name: Run Script Typechecker
command: |
cd src/electron
node script/yarn tsc -p tsconfig.script.json
# List of always run jobs.
jobs:
lint:
executor:
name: linux-docker
size: medium
environment:
<<: *env-linux-medium
<<: *steps-lint
# Initial setup workflow
workflows:
lint:
jobs:
# Job inherited from path-filtering orb
- path-filtering/filter:
generate-config:
docker:
- image: cimg/node:16.14
steps:
- checkout
- path-filtering/set-parameters:
base-revision: main
# Params for mapping; `path-to-test parameter-to-set value-for-parameter` for each row
mapping: |
^((?!docs/).)*$ run-build-mac true
^((?!docs/).)*$ run-build-linux true
docs/.* run-docs-only true
^((?!docs/).)*$ run-docs-only false
config-path: .circleci/build_config.yml
- lint
- run:
command: |
cd .circleci/config
yarn
export CIRCLECI_BINARY="$HOME/circleci"
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | DESTDIR=$CIRCLECI_BINARY bash
node build.js
name: Pack config.yml
- continuation/continue:
configuration_path: .circleci/config-staging/built.yml
parameters: /tmp/pipeline-parameters.json
# Initial setup workflow
workflows:
setup:
jobs:
- generate-config

File diff suppressed because it is too large Load Diff

34
.circleci/config/build.js Normal file
View File

@@ -0,0 +1,34 @@
const cp = require('child_process');
const fs = require('fs-extra');
const path = require('path');
const yaml = require('js-yaml');
const STAGING_DIR = path.resolve(__dirname, '..', 'config-staging');
function copyAndExpand(dir = './') {
const absDir = path.resolve(__dirname, dir);
const targetDir = path.resolve(STAGING_DIR, dir);
if (!fs.existsSync(targetDir)) {
fs.mkdirSync(targetDir);
}
for (const file of fs.readdirSync(absDir)) {
if (!file.endsWith('.yml')) {
if (fs.statSync(path.resolve(absDir, file)).isDirectory()) {
copyAndExpand(path.join(dir, file));
}
continue;
}
fs.writeFileSync(path.resolve(targetDir, file), yaml.dump(yaml.load(fs.readFileSync(path.resolve(absDir, file), 'utf8')), {
noRefs: true,
}));
}
}
if (fs.pathExists(STAGING_DIR)) fs.removeSync(STAGING_DIR);
copyAndExpand();
const output = cp.spawnSync(process.env.CIRCLECI_BINARY || 'circleci', ['config', 'pack', STAGING_DIR]);
fs.writeFileSync(path.resolve(STAGING_DIR, 'built.yml'), output.stdout.toString());

View File

@@ -0,0 +1,51 @@
executor:
name: linux-docker
size: medium
steps:
- checkout:
path: src/electron
- run:
name: Setup third_party Depot Tools
command: |
# "depot_tools" has to be checkout into "//third_party/depot_tools" so pylint.py can a "pylintrc" file.
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git src/third_party/depot_tools
echo 'export PATH="$PATH:'"$PWD"'/src/third_party/depot_tools"' >> $BASH_ENV
- run:
name: Download GN Binary
command: |
chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)"
gn_version="$(curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/DEPS?format=TEXT" | base64 -d | grep gn_version | head -n1 | cut -d\' -f4)"
cipd ensure -ensure-file - -root . \<<-CIPD
\$ServiceURL https://chrome-infra-packages.appspot.com/
@Subdir src/buildtools/linux64
gn/gn/linux-amd64 $gn_version
CIPD
echo 'export CHROMIUM_BUILDTOOLS_PATH="'"$PWD"'/src/buildtools"' >> $BASH_ENV
- run:
name: Download clang-format Binary
command: |
chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)"
sha1_path='buildtools/linux64/clang-format.sha1'
curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/${sha1_path}?format=TEXT" | base64 -d > "src/${sha1_path}"
download_from_google_storage.py --no_resume --no_auth --bucket chromium-clang-format -s "src/${sha1_path}"
- run:
name: Run Lint
command: |
# gn.py tries to find a gclient root folder starting from the current dir.
# When it fails and returns "None" path, the whole script fails. Let's "fix" it.
touch .gclient
# Another option would be to checkout "buildtools" inside the Electron checkout,
# but then we would lint its contents (at least gn format), and it doesn't pass it.
cd src/electron
node script/yarn install --frozen-lockfile
node script/yarn lint
- run:
name: Run Script Typechecker
command: |
cd src/electron
node script/yarn tsc -p tsconfig.script.json

View File

@@ -0,0 +1,10 @@
{
"name": "@electron/circleci-config",
"version": "0.0.0",
"private": true,
"license": "MIT",
"dependencies": {
"fs-extra": "^10.1.0",
"js-yaml": "^4.1.0"
}
}

View File

@@ -0,0 +1,43 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
argparse@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
fs-extra@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf"
integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==
dependencies:
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^2.0.0"
graceful-fs@^4.1.6, graceful-fs@^4.2.0:
version "4.2.10"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==
js-yaml@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
dependencies:
argparse "^2.0.1"
jsonfile@^6.0.1:
version "6.1.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
dependencies:
universalify "^2.0.0"
optionalDependencies:
graceful-fs "^4.1.6"
universalify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==

View File

@@ -1,4 +1,5 @@
{
"root": true,
"extends": "standard",
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],

5
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1,5 @@
# Atom --> Electron rename
d9321f4df751fa32813fab1b6387bbd61bd681d0
34c4c8d5088fa183f56baea28809de6f2a427e02
# Enable JS Semicolons
5d657dece4102e5e5304d42e8004b6ad64c0fcda

2
.github/CODEOWNERS vendored
View File

@@ -4,7 +4,7 @@
# https://git-scm.com/docs/gitignore
# Upgrades WG
/patches/ @electron/wg-upgrades
/patches/ @electron/wg-upgrades @electron/wg-security
DEPS @electron/wg-upgrades
# Releases WG

View File

@@ -17,8 +17,11 @@ body:
- type: input
attributes:
label: Electron Version
description: What version of Electron are you using?
placeholder: 12.0.0
description: |
What version of Electron are you using?
Note: Please only report issues for [currently supported versions of Electron](https://www.electronjs.org/docs/latest/tutorial/support#currently-supported-versions).
placeholder: 17.0.0
validations:
required: true
- type: dropdown
@@ -53,7 +56,7 @@ body:
attributes:
label: Last Known Working Electron version
description: What is the last version of Electron this worked in, if applicable?
placeholder: 11.0.0
placeholder: 16.0.0
- type: textarea
attributes:
label: Expected Behavior

View File

@@ -1,2 +0,0 @@
# Always validate the PR title, and ignore the commits
titleOnly: true

View File

@@ -0,0 +1,178 @@
name: Electron WOA Testing
on:
push:
branches: '**'
workflow_dispatch:
inputs:
appveyor_job_id:
description: 'Job Id of Appveyor WOA job to test'
type: text
required: true
jobs:
electron-woa-init:
if: ${{ github.event_name == 'push' && github.repository == 'electron/electron' }}
runs-on: ubuntu-latest
steps:
- name: Dummy step for push event
run: |
echo "This job is a needed initialization step for Electron WOA testing. Another test result will appear once the electron-woa-testing build is done."
electron-woa-testing:
if: ${{ github.event_name == 'workflow_dispatch' && github.repository == 'electron/electron' }}
runs-on: [self-hosted, woa]
permissions:
checks: write
pull-requests: write
steps:
- uses: LouisBrunner/checks-action@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: electron-woa-testing
status: in_progress
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
output: |
{"summary":"Test In Progress","text_description":"See job details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
- name: Clean Workspace
run: |
Remove-Item * -Recurse -Force
shell: powershell
- name: Checkout
uses: actions/checkout@v3
with:
path: src\electron
fetch-depth: 0
- name: Yarn install
run: |
cd src\electron
node script/yarn.js install --frozen-lockfile
- name: Download and extract dist.zip for test
run: |
$localArtifactPath = "$pwd\dist.zip"
$serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/dist.zip"
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" }
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\Default -y $localArtifactPath
shell: powershell
- name: Download and extract native test executables for test
run: |
$localArtifactPath = "src\out\Default\shell_browser_ui_unittests.exe"
$serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/shell_browser_ui_unittests.exe"
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" }
shell: powershell
- name: Download and extract ffmpeg.zip for test
run: |
$localArtifactPath = "$pwd\ffmpeg.zip"
$serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/ffmpeg.zip"
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" }
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\ffmpeg $localArtifactPath
shell: powershell
- name: Download node headers for test
run: |
$localArtifactPath = "src\node_headers.zip"
$serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/node_headers.zip"
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" }
cd src
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y node_headers.zip
shell: powershell
- name: Download electron.lib for test
run: |
$localArtifactPath = "src\out\Default\electron.lib"
$serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/electron.lib"
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" }
shell: powershell
# Uncomment the following block if pdb files are needed to debug issues
# - name: Download pdb files for detailed stacktraces
# if: ${{ github.event_name == 'workflow_dispatch' }}
# run: |
# try {
# $localArtifactPath = "src\pdb.zip"
# $serverArtifactPath = "https://ci.appveyor.com/api/buildjobs/${{ inputs.appveyor_job_id }}/artifacts/pdb.zip"
# Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer ${{ secrets.APPVEYOR_TOKEN }}" }
# cd src
# & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y pdb.zip
# } catch {
# Write-Host "There was an exception encountered while downloading pdb files:" $_.Exception.Message
# } finally {
# $global:LASTEXITCODE = 0
# }
# shell: powershell
- name: Setup node headers
run: |
New-Item src\out\Default\gen\node_headers\Release -Type directory
Copy-Item -path src\out\Default\electron.lib -destination src\out\Default\gen\node_headers\Release\node.lib
shell: powershell
- name: Run Electron Main process tests
run: |
cd src
set npm_config_nodedir=%cd%\out\Default\gen\node_headers
set npm_config_arch=arm64
cd electron
node script/yarn test --runners=main --enable-logging --disable-features=CalculateNativeWinOcclusion
env:
ELECTRON_ENABLE_STACK_DUMPING: true
ELECTRON_OUT_DIR: Default
IGNORE_YARN_INSTALL_ERROR: 1
ELECTRON_TEST_RESULTS_DIR: junit
MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap'
MOCHA_REPORTER: mocha-multi-reporters
ELECTRON_SKIP_NATIVE_MODULE_TESTS: true
- name: Run Electron Remote based tests
if: ${{ success() || failure() }}
run: |
cd src
set npm_config_nodedir=%cd%\out\Default\gen\node_headers
set npm_config_arch=arm64
cd electron
node script/yarn test --runners=remote --enable-logging --disable-features=CalculateNativeWinOcclusion
env:
ELECTRON_OUT_DIR: Default
IGNORE_YARN_INSTALL_ERROR: 1
ELECTRON_TEST_RESULTS_DIR: junit
MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap'
MOCHA_REPORTER: mocha-multi-reporters
ELECTRON_SKIP_NATIVE_MODULE_TESTS: true
- name: Verify ffmpeg
run: |
cd src
echo "Verifying non proprietary ffmpeg"
python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg
shell: cmd
- name: Kill processes left running from last test run
if: ${{ always() }}
run: |
Get-Process | Where Name -Like "electron*" | Stop-Process
Get-Process | Where Name -Like "msedge*" | Stop-Process
shell: powershell
- name: Delete user app data directories
if: ${{ always() }}
run: |
Remove-Item -path $env:APPDATA/Electron* -Recurse -Force -ErrorAction Ignore
shell: powershell
- uses: LouisBrunner/checks-action@v1.1.1
if: ${{ success() }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: electron-woa-testing
conclusion: "${{ job.status }}"
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
output: |
{"summary":"${{ job.status }}","text_description":"See job details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
- uses: LouisBrunner/checks-action@v1.1.1
if: ${{ success() }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: electron-woa-testing
conclusion: "${{ job.status }}"
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
output: |
{"summary":"Job Succeeded","text_description":"See job details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
- uses: LouisBrunner/checks-action@v1.1.1
if: ${{ ! success() }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: electron-woa-testing
conclusion: "${{ job.status }}"
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
output: |
{"summary":"Job Failed","text_description":"See job details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}

View File

@@ -0,0 +1,31 @@
name: Trigger Major Release Dependency Updates
on:
release:
types: [published]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
check_tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check Tag
run: |
if [[ ${{ github.event.release.tag_name }} =~ ^v[0-9]+\.0\.0$ ]]; then
echo ::set-output name=should_release::true
fi
trigger:
runs-on: ubuntu-latest
needs: check_tag
if: needs.check_tag.outputs.should_release == 'true'
steps:
- uses: actions/checkout@v3
- name: Trigger New chromedriver Release
run: |
gh api /repos/:owner/chromedriver/actions/workflows/release.yml/dispatches --input - <<< '{"ref":"main","inputs":{"version":"${{ github.event.release.tag_name }}"}}'
- name: Trigger New mksnapshot Release
run: |
gh api /repos/:owner/mksnapshot/actions/workflows/release.yml/dispatches --input - <<< '{"ref":"main","inputs":{"version":"${{ github.event.release.tag_name }}"}}'

26
.github/workflows/semantic.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: "Check Semantic Commit"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
permissions:
contents: read
jobs:
main:
permissions:
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
name: Validate PR Title
runs-on: ubuntu-latest
steps:
- name: semantic-pull-request
uses: amannn/action-semantic-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
validateSingleCommit: false

1
.husky/.gitignore vendored
View File

@@ -1 +0,0 @@
_

View File

@@ -23,7 +23,5 @@
"br_spaces": 0
},
"single-h1": false,
"no-inline-html": {
"allowed_elements": ["br"]
}
"no-inline-html": false
}

2
.nvmrc
View File

@@ -1 +1 @@
14
16

258
BUILD.gn
View File

@@ -37,12 +37,13 @@ if (is_mac) {
import("build/rules.gni")
assert(
mac_deployment_target == "10.11.0",
mac_deployment_target == "10.13",
"Chromium has updated the mac_deployment_target, please update this assert, update the supported versions documentation (docs/tutorial/support.md) and flag this as a breaking change")
}
if (is_linux) {
import("//build/config/linux/pkg_config.gni")
import("//tools/generate_stubs/rules.gni")
pkg_config("gio_unix") {
packages = [ "gio-unix-2.0" ]
@@ -54,6 +55,48 @@ if (is_linux) {
"gdk-pixbuf-2.0",
]
}
generate_library_loader("libnotify_loader") {
name = "LibNotifyLoader"
output_h = "libnotify_loader.h"
output_cc = "libnotify_loader.cc"
header = "<libnotify/notify.h>"
config = ":libnotify_config"
functions = [
"notify_is_initted",
"notify_init",
"notify_get_server_caps",
"notify_get_server_info",
"notify_notification_new",
"notify_notification_add_action",
"notify_notification_set_image_from_pixbuf",
"notify_notification_set_timeout",
"notify_notification_set_urgency",
"notify_notification_set_hint_string",
"notify_notification_show",
"notify_notification_close",
]
}
# Generates electron_gtk_stubs.h header which contains
# stubs for extracting function ptrs from the gtk library.
# Function signatures for which stubs are required should be
# 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") {
sigs = [
"shell/browser/ui/electron_gdk_pixbuf.sigs",
"shell/browser/ui/electron_gtk.sigs",
]
extra_header = "shell/browser/ui/electron_gtk.fragment"
output_name = "electron_gtk_stubs"
public_deps = [ "//ui/gtk:gtk_config" ]
logging_function = "LogNoop()"
logging_include = "ui/gtk/log_noop.h"
}
}
declare_args() {
@@ -64,6 +107,14 @@ branding = read_file("shell/app/BRANDING.json", "json")
electron_project_name = branding.project_name
electron_product_name = branding.product_name
electron_mac_bundle_id = branding.mac_bundle_id
electron_version = exec_script("script/print-version.py",
[],
"trim string",
[
".git/packed-refs",
".git/HEAD",
"script/lib/get-version.js",
])
if (is_mas_build) {
assert(is_mac,
@@ -92,7 +143,7 @@ config("electron_lib_config") {
include_dirs = [ "." ]
}
# We geneate the definitions twice here, once in //electron/electron.d.ts
# We generate the definitions twice here, once in //electron/electron.d.ts
# and once in $target_gen_dir
# The one in $target_gen_dir is used for the actual TSC build later one
# and the one in //electron/electron.d.ts is used by your IDE (vscode)
@@ -190,6 +241,7 @@ action("electron_js2c") {
action("generate_config_gypi") {
outputs = [ "$root_gen_dir/config.gypi" ]
script = "script/generate-config-gypi.py"
inputs = [ "//third_party/electron_node/configure.py" ]
args = rebase_path(outputs) + [ target_cpu ]
}
@@ -253,42 +305,14 @@ copy("copy_shell_devtools_discovery_page") {
outputs = [ "$target_gen_dir/shell_devtools_discovery_page.html" ]
}
if (is_linux) {
generate_library_loader("libnotify_loader") {
name = "LibNotifyLoader"
output_h = "libnotify_loader.h"
output_cc = "libnotify_loader.cc"
header = "<libnotify/notify.h>"
config = ":libnotify_config"
functions = [
"notify_is_initted",
"notify_init",
"notify_get_server_caps",
"notify_get_server_info",
"notify_notification_new",
"notify_notification_add_action",
"notify_notification_set_image_from_pixbuf",
"notify_notification_set_timeout",
"notify_notification_set_urgency",
"notify_notification_set_hint_string",
"notify_notification_show",
"notify_notification_close",
]
}
}
npm_action("electron_version_args") {
script = "generate-version-json"
outputs = [ "$target_gen_dir/electron_version.args" ]
args = rebase_path(outputs)
args = rebase_path(outputs) + [ "$electron_version" ]
inputs = [
"ELECTRON_VERSION",
"script/generate-version-json.js",
]
inputs = [ "script/generate-version-json.js" ]
}
templated_file("electron_version_header") {
@@ -300,6 +324,39 @@ templated_file("electron_version_header") {
args_files = get_target_outputs(":electron_version_args")
}
templated_file("electron_win_rc") {
deps = [ ":electron_version_args" ]
template = "build/templates/electron_rc.tmpl"
output = "$target_gen_dir/win-resources/electron.rc"
args_files = get_target_outputs(":electron_version_args")
}
copy("electron_win_resource_files") {
sources = [
"shell/browser/resources/win/electron.ico",
"shell/browser/resources/win/resource.h",
]
outputs = [ "$target_gen_dir/win-resources/{{source_file_part}}" ]
}
templated_file("electron_version_file") {
deps = [ ":electron_version_args" ]
template = "build/templates/version_string.tmpl"
output = "$root_build_dir/version"
args_files = get_target_outputs(":electron_version_args")
}
group("electron_win32_resources") {
public_deps = [
":electron_win_rc",
":electron_win_resource_files",
]
}
action("electron_fuses") {
script = "build/fuses/build.py"
@@ -351,16 +408,19 @@ source_set("electron_lib") {
"shell/common/api:mojo",
"//base:base_static",
"//base/allocator:buildflags",
"//chrome:strings",
"//chrome/app:command_ids",
"//chrome/app/resources:platform_locale_settings",
"//components/autofill/core/common:features",
"//components/certificate_transparency",
"//components/embedder_support:browser_util",
"//components/language/core/browser",
"//components/net_log",
"//components/network_hints/browser",
"//components/network_hints/common:mojo_bindings",
"//components/network_hints/renderer",
"//components/network_session_configurator/common",
"//components/omnibox/browser:buildflags",
"//components/os_crypt",
"//components/pref_registry",
"//components/prefs",
@@ -369,6 +429,7 @@ source_set("electron_lib") {
"//components/user_prefs",
"//components/viz/host",
"//components/viz/service",
"//components/webrtc",
"//content/public/browser",
"//content/public/child",
"//content/public/gpu",
@@ -381,9 +442,6 @@ source_set("electron_lib") {
"//media/mojo/mojom",
"//net:extras",
"//net:net_resources",
"//ppapi/host",
"//ppapi/proxy",
"//ppapi/shared_impl",
"//printing/buildflags",
"//services/device/public/cpp/geolocation",
"//services/device/public/cpp/hid",
@@ -472,8 +530,8 @@ source_set("electron_lib") {
if (is_linux) {
deps += [
"//build/config/linux/gtk:gtkprint",
"//components/crash/content/browser",
"//ui/gtk:gtk_config",
]
}
@@ -501,6 +559,8 @@ source_set("electron_lib") {
"StoreKit.framework",
]
weak_frameworks = [ "QuickLookThumbnailing.framework" ]
sources += [
"shell/browser/ui/views/autofill_popup_view.cc",
"shell/browser/ui/views/autofill_popup_view.h",
@@ -534,6 +594,7 @@ source_set("electron_lib") {
if (is_linux) {
libs = [ "xshmfence" ]
deps += [
":electron_gtk_stubs",
":libnotify_loader",
"//build/config/linux/gtk",
"//dbus",
@@ -541,7 +602,8 @@ source_set("electron_lib") {
"//ui/base/ime/linux",
"//ui/events/devices/x11",
"//ui/events/platform/x11",
"//ui/gtk",
"//ui/linux:linux_ui",
"//ui/linux:linux_ui_factory",
"//ui/views/controls/webview",
"//ui/wm",
]
@@ -549,14 +611,13 @@ source_set("electron_lib") {
sources += filenames.lib_sources_linux_x11
public_deps += [
"//ui/base/x",
"//ui/platform_window/x11",
"//ui/ozone/platform/x11",
]
}
configs += [ ":gio_unix" ]
defines += [
# Disable warnings for g_settings_list_schemas.
"GLIB_DISABLE_DEPRECATION_WARNINGS",
"USE_X11=1",
]
sources += [
@@ -594,11 +655,21 @@ source_set("electron_lib") {
if (enable_plugins) {
deps += [ "chromium_src:plugins" ]
sources += [
"shell/renderer/electron_renderer_pepper_host_factory.cc",
"shell/renderer/electron_renderer_pepper_host_factory.h",
"shell/renderer/pepper_helper.cc",
"shell/renderer/pepper_helper.h",
]
}
if (enable_ppapi) {
deps += [
"//ppapi/host",
"//ppapi/proxy",
"//ppapi/shared_impl",
]
}
if (enable_run_as_node) {
sources += [
"shell/app/node_main.cc",
@@ -648,8 +719,6 @@ source_set("electron_lib") {
if (enable_basic_printing) {
sources += [
"shell/browser/printing/print_preview_message_handler.cc",
"shell/browser/printing/print_preview_message_handler.h",
"shell/browser/printing/print_view_manager_electron.cc",
"shell/browser/printing/print_view_manager_electron.h",
"shell/renderer/printing/print_render_frame_helper_delegate.cc",
@@ -694,8 +763,10 @@ source_set("electron_lib") {
deps += [
"//chrome/browser/resources/pdf:resources",
"//components/pdf/browser",
"//components/pdf/browser:interceptors",
"//components/pdf/common",
"//components/pdf/renderer",
"//pdf:pdf_ppapi",
"//pdf",
]
sources += [
"shell/browser/electron_pdf_web_contents_helper_client.cc",
@@ -705,14 +776,6 @@ source_set("electron_lib") {
sources += get_target_outputs(":electron_fuses")
if (is_win && enable_win_dark_mode_window_ui) {
sources += [
"shell/browser/win/dark_mode.cc",
"shell/browser/win/dark_mode.h",
]
libs += [ "uxtheme.lib" ]
}
if (allow_runtime_configurable_key_storage) {
defines += [ "ALLOW_RUNTIME_CONFIGURABLE_KEY_STORAGE" ]
}
@@ -732,7 +795,6 @@ if (is_mac) {
electron_helper_name = "$electron_product_name Helper"
electron_login_helper_name = "$electron_product_name Login Helper"
electron_framework_version = "A"
electron_version = read_file("ELECTRON_VERSION", "trim string")
mac_xib_bundle_data("electron_xibs") {
sources = [ "shell/common/resources/mac/MainMenu.xib" ]
@@ -797,16 +859,11 @@ if (is_mac) {
# Add the SwiftShader .dylibs in the Libraries directory of the Framework.
bundle_data("electron_swiftshader_binaries") {
sources = [
"$root_out_dir/egl_intermediates/libswiftshader_libEGL.dylib",
"$root_out_dir/egl_intermediates/libswiftshader_libGLESv2.dylib",
"$root_out_dir/vk_intermediates/libvk_swiftshader.dylib",
"$root_out_dir/vk_intermediates/vk_swiftshader_icd.json",
]
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
public_deps = [
"//ui/gl:swiftshader_egl_library_copy",
"//ui/gl:swiftshader_vk_library_copy",
]
public_deps = [ "//ui/gl:swiftshader_vk_library_copy" ]
}
}
group("electron_angle_library") {
@@ -888,6 +945,13 @@ if (is_mac) {
"@executable_path/../../../../../..",
]
}
# For component ffmpeg under non-component build, it is linked from
# @loader_path. However the ffmpeg.dylib is moved to a different place
# when generating app bundle, and we should change to link from @rpath.
if (is_component_ffmpeg && !is_component_build) {
ldflags += [ "-Wcrl,installnametool,-change,@loader_path/libffmpeg.dylib,@rpath/libffmpeg.dylib" ]
}
}
template("electron_helper_app") {
@@ -895,7 +959,10 @@ if (is_mac) {
assert(defined(invoker.helper_name_suffix))
output_name = electron_helper_name + invoker.helper_name_suffix
deps = [ ":electron_framework+link" ]
deps = [
":electron_framework+link",
"//base/allocator:early_zone_registration_mac",
]
if (!is_mas_build) {
deps += [ "//sandbox/mac:seatbelt" ]
}
@@ -1003,14 +1070,14 @@ if (is_mac) {
action("electron_app_lproj_dirs") {
outputs = []
foreach(locale, locales_as_mac_outputs) {
foreach(locale, locales_as_apple_outputs) {
outputs += [ "$target_gen_dir/app_infoplist_strings/$locale.lproj" ]
}
script = "build/mac/make_locale_dirs.py"
args = rebase_path(outputs)
}
foreach(locale, locales_as_mac_outputs) {
foreach(locale, locales_as_apple_outputs) {
bundle_data("electron_app_strings_${locale}_bundle_data") {
sources = [ "$target_gen_dir/app_infoplist_strings/$locale.lproj" ]
outputs = [ "{{bundle_resources_dir}}/$locale.lproj" ]
@@ -1019,7 +1086,7 @@ if (is_mac) {
}
group("electron_app_strings_bundle_data") {
public_deps = []
foreach(locale, locales_as_mac_outputs) {
foreach(locale, locales_as_apple_outputs) {
public_deps += [ ":electron_app_strings_${locale}_bundle_data" ]
}
}
@@ -1048,7 +1115,6 @@ if (is_mac) {
"shell/app/electron_main_mac.cc",
"shell/app/uv_stdio_fix.cc",
"shell/app/uv_stdio_fix.h",
"shell/common/electron_constants.cc",
]
include_dirs = [ "." ]
deps = [
@@ -1056,6 +1122,7 @@ if (is_mac) {
":electron_app_plist",
":electron_app_resources",
":electron_fuses",
"//base/allocator:early_zone_registration_mac",
"//electron/buildflags",
]
if (is_mas_build) {
@@ -1099,21 +1166,18 @@ if (is_mac) {
deps = [ ":electron_app" ]
}
extract_symbols("swiftshader_egl_syms") {
binary = "$root_out_dir/libswiftshader_libEGL.dylib"
extract_symbols("egl_syms") {
binary = "$root_out_dir/libEGL.dylib"
symbol_dir = "$root_out_dir/breakpad_symbols"
dsym_file = "$root_out_dir/libswiftshader_libEGL.dylib.dSYM/Contents/Resources/DWARF/libswiftshader_libEGL.dylib"
deps =
[ "//third_party/swiftshader/src/OpenGL/libEGL:swiftshader_libEGL" ]
dsym_file = "$root_out_dir/libEGL.dylib.dSYM/Contents/Resources/DWARF/libEGL.dylib"
deps = [ "//third_party/angle:libEGL" ]
}
extract_symbols("swiftshader_gles_syms") {
binary = "$root_out_dir/libswiftshader_libGLESv2.dylib"
extract_symbols("gles_syms") {
binary = "$root_out_dir/libGLESv2.dylib"
symbol_dir = "$root_out_dir/breakpad_symbols"
dsym_file = "$root_out_dir/libswiftshader_libGLESv2.dylib.dSYM/Contents/Resources/DWARF/libswiftshader_libGLESv2.dylib"
deps = [
"//third_party/swiftshader/src/OpenGL/libGLESv2:swiftshader_libGLESv2",
]
dsym_file = "$root_out_dir/libGLESv2.dylib.dSYM/Contents/Resources/DWARF/libGLESv2.dylib"
deps = [ "//third_party/angle:libGLESv2" ]
}
extract_symbols("crashpad_handler_syms") {
@@ -1125,10 +1189,10 @@ if (is_mac) {
group("electron_symbols") {
deps = [
":egl_syms",
":electron_app_syms",
":electron_framework_syms",
":swiftshader_egl_syms",
":swiftshader_gles_syms",
":gles_syms",
]
if (!is_mas_build) {
@@ -1171,6 +1235,7 @@ if (is_mac) {
":default_app_asar",
":electron_app_manifest",
":electron_lib",
":electron_win32_resources",
":packed_resources",
"//components/crash/core/app",
"//content:sandbox_helper_win",
@@ -1186,7 +1251,7 @@ if (is_mac) {
if (enable_hidpi) {
data += [ "$root_out_dir/chrome_200_percent.pak" ]
}
foreach(locale, locales) {
foreach(locale, platform_pak_locales) {
data += [ "$root_out_dir/locales/$locale.pak" ]
}
@@ -1204,8 +1269,7 @@ if (is_mac) {
if (is_win) {
sources += [
# TODO: we should be generating our .rc files more like how chrome does
"shell/browser/resources/win/electron.rc",
"$target_gen_dir/win-resources/electron.rc",
"shell/browser/resources/win/resource.h",
]
@@ -1265,6 +1329,10 @@ if (is_mac) {
if (!is_component_build && is_component_ffmpeg) {
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}
if (is_linux) {
deps += [ "//sandbox/linux:chrome_sandbox" ]
}
}
}
@@ -1283,27 +1351,23 @@ if (is_mac) {
deps = [ ":electron_app" ]
}
extract_symbols("swiftshader_egl_symbols") {
binary = "$root_out_dir/swiftshader/libEGL$_target_shared_library_suffix"
extract_symbols("egl_symbols") {
binary = "$root_out_dir/libEGL$_target_shared_library_suffix"
symbol_dir = "$root_out_dir/breakpad_symbols"
deps =
[ "//third_party/swiftshader/src/OpenGL/libEGL:swiftshader_libEGL" ]
deps = [ "//third_party/angle:libEGL" ]
}
extract_symbols("swiftshader_gles_symbols") {
binary =
"$root_out_dir/swiftshader/libGLESv2$_target_shared_library_suffix"
extract_symbols("gles_symbols") {
binary = "$root_out_dir/libGLESv2$_target_shared_library_suffix"
symbol_dir = "$root_out_dir/breakpad_symbols"
deps = [
"//third_party/swiftshader/src/OpenGL/libGLESv2:swiftshader_libGLESv2",
]
deps = [ "//third_party/angle:libGLESv2" ]
}
group("electron_symbols") {
deps = [
":egl_symbols",
":electron_app_symbols",
":swiftshader_egl_symbols",
":swiftshader_gles_symbols",
":gles_symbols",
]
}
}
@@ -1387,25 +1451,22 @@ group("licenses") {
]
}
copy("electron_version") {
sources = [ "ELECTRON_VERSION" ]
outputs = [ "$root_build_dir/version" ]
}
dist_zip("electron_dist_zip") {
data_deps = [
":electron_app",
":electron_version",
":electron_version_file",
":licenses",
]
if (is_linux) {
data_deps += [ "//sandbox/linux:chrome_sandbox" ]
}
deps = data_deps
outputs = [ "$root_build_dir/dist.zip" ]
}
dist_zip("electron_ffmpeg_zip") {
data_deps = [ "//third_party/ffmpeg" ]
deps = data_deps
outputs = [ "$root_build_dir/ffmpeg.zip" ]
}
@@ -1423,6 +1484,7 @@ group("electron_chromedriver") {
dist_zip("electron_chromedriver_zip") {
testonly = true
data_deps = electron_chromedriver_deps
deps = data_deps
outputs = [ "$root_build_dir/chromedriver.zip" ]
}
@@ -1441,6 +1503,7 @@ group("electron_mksnapshot") {
dist_zip("electron_mksnapshot_zip") {
data_deps = mksnapshot_deps
deps = data_deps
outputs = [ "$root_build_dir/mksnapshot.zip" ]
}
@@ -1451,6 +1514,7 @@ copy("hunspell_dictionaries") {
dist_zip("hunspell_dictionaries_zip") {
data_deps = [ ":hunspell_dictionaries" ]
deps = data_deps
flatten = true
outputs = [ "$root_build_dir/hunspell_dictionaries.zip" ]
@@ -1464,6 +1528,7 @@ copy("libcxx_headers") {
dist_zip("libcxx_headers_zip") {
data_deps = [ ":libcxx_headers" ]
deps = data_deps
flatten = true
flatten_relative_to = rebase_path(
"$target_gen_dir/electron_libcxx_include/buildtools/third_party/libc++/trunk",
@@ -1479,6 +1544,7 @@ copy("libcxxabi_headers") {
dist_zip("libcxxabi_headers_zip") {
data_deps = [ ":libcxxabi_headers" ]
deps = data_deps
flatten = true
flatten_relative_to = rebase_path(
"$target_gen_dir/electron_libcxxabi_include/buildtools/third_party/libc++abi/trunk",

24
DEPS
View File

@@ -1,28 +1,12 @@
gclient_gn_args_file = 'src/build/config/gclient_args.gni'
gclient_gn_args = [
'build_with_chromium',
'checkout_android',
'checkout_android_native_support',
'checkout_libaom',
'checkout_nacl',
'checkout_pgo_profiles',
'checkout_oculus_sdk',
'checkout_openxr',
'checkout_google_benchmark',
'mac_xcode_version',
'generate_location_tags',
]
gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'99.0.4767.0',
'106.0.5249.168',
'node_version':
'v16.13.2',
'v16.16.0',
'nan_version':
# The following commit hash of NAN is v2.14.2 with *only* changes to the
# test suite. This should be updated to a specific tag when one becomes
# available.
'65b32af46e9d7fab2e4ff657751205b3865f4920',
'16fa32231e2ccd89d2804b3f765319128b20c4ac',
'squirrel.mac_version':
'0e5d146ba13101a1302d59ea6e6e0b3cace4ae38',

View File

@@ -1 +0,0 @@
18.0.0-nightly.20220201

View File

@@ -2,7 +2,7 @@
[![CircleCI Build Status](https://circleci.com/gh/electron/electron/tree/main.svg?style=shield)](https://circleci.com/gh/electron/electron/tree/main)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/4lggi9dpjc1qob7k/branch/main?svg=true)](https://ci.appveyor.com/project/electron-bot/electron-ljo26/branch/main)
[![Electron Discord Invite](https://img.shields.io/discord/745037351163527189?color=%237289DA&label=chat&logo=discord&logoColor=white)](https://discord.com/invite/APGC3k5yaH)
[![Electron Discord Invite](https://img.shields.io/discord/745037351163527189?color=%237289DA&label=chat&logo=discord&logoColor=white)](https://discord.gg/electronjs)
:memo: Available Translations: 🇨🇳 🇧🇷 🇪🇸 🇯🇵 🇷🇺 🇫🇷 🇺🇸 🇩🇪.
View these docs in other languages at [electron/i18n](https://github.com/electron/i18n/tree/master/content/).
@@ -34,6 +34,17 @@ For more installation options and troubleshooting tips, see
[installation](docs/tutorial/installation.md). For info on how to manage Electron versions in your apps, see
[Electron versioning](docs/tutorial/electron-versioning.md).
## Platform support
Each Electron release provides binaries for macOS, Windows, and Linux.
* macOS (High Sierra and up): Electron provides 64-bit Intel and ARM binaries for macOS. Apple Silicon support was added in Electron 11.
* Windows (Windows 7 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8.
* Linux: The prebuilt binaries of Electron are built on Ubuntu 20.04. They have also been verified to work on:
* Ubuntu 14.04 and newer
* Fedora 24 and newer
* Debian 8 and newer
## Quick start & Electron Fiddle
Use [`Electron Fiddle`](https://github.com/electron/fiddle)
@@ -54,12 +65,10 @@ npm start
## Resources for learning Electron
- [electronjs.org/docs](https://electronjs.org/docs) - All of Electron's documentation
- [electron/fiddle](https://github.com/electron/fiddle) - A tool to build, run, and package small Electron experiments
- [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - A very basic starter Electron app
- [electronjs.org/community#boilerplates](https://electronjs.org/community#boilerplates) - Sample starter apps created by the community
- [electron/simple-samples](https://github.com/electron/simple-samples) - Small applications with ideas for taking them further
- [electron/electron-api-demos](https://github.com/electron/electron-api-demos) - An Electron app that teaches you how to use Electron
* [electronjs.org/docs](https://electronjs.org/docs) - All of Electron's documentation
* [electron/fiddle](https://github.com/electron/fiddle) - A tool to build, run, and package small Electron experiments
* [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - A very basic starter Electron app
* [electronjs.org/community#boilerplates](https://electronjs.org/community#boilerplates) - Sample starter apps created by the community
## Programmatic usage
@@ -80,11 +89,15 @@ const child = proc.spawn(electron)
### Mirrors
- [China](https://npmmirror.com/mirrors/electron)
* [China](https://npmmirror.com/mirrors/electron/)
## Documentation Translations
See the [Advanced Installation Instructions](https://www.electronjs.org/docs/latest/tutorial/installation#mirror) to learn how to use a custom mirror.
Find documentation translations in [electron/i18n](https://github.com/electron/i18n).
## Documentation translations
We crowdsource translations for our documentation via [Crowdin](https://crowdin.com/project/electron).
We currently accept translations for Chinese (Simplified), French, German, Japanese, Portuguese,
Russian, and Spanish.
## Contributing
@@ -93,10 +106,10 @@ If you are interested in reporting/fixing issues and contributing directly to th
## Community
Info on reporting bugs, getting help, finding third-party tools and sample apps,
and more can be found in the [support document](docs/tutorial/support.md#finding-support).
and more can be found on the [Community page](https://www.electronjs.org/community).
## License
[MIT](https://github.com/electron/electron/blob/main/LICENSE)
When using the Electron or other GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).
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).

View File

@@ -3,7 +3,7 @@
# - "GN_EXTRA_ARGS" Additional gn arguments for a build config,
# e.g. 'target_cpu="x86"' to build for a 32bit platform.
# https://gn.googlesource.com/gn/+/master/docs/reference.md#target_cpu
# Don't forget to set up "NPM_CONFIG_ARCH" and "TARGET_ARCH" accordningly
# Don't forget to set up "NPM_CONFIG_ARCH" and "TARGET_ARCH" accordingly
# if you pass a custom value for 'target_cpu'.
# - "ELECTRON_RELEASE" Set it to '1' upload binaries on success.
# - "NPM_CONFIG_ARCH" E.g. 'x86'. Is used to build native Node.js modules.
@@ -11,8 +11,8 @@
# - "TARGET_ARCH" Choose from {'ia32', 'x64', 'arm', 'arm64', 'mips64el'}.
# Is used in some publishing scripts, but does NOT affect the Electron binary.
# Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "NPM_CONFIG_ARCH" value.
# - "UPLOAD_TO_S3" Set it to '1' upload a release to the S3 bucket.
# Otherwise the release will be uploaded to the Github Releases.
# - "UPLOAD_TO_STORAGE" Set it to '1' upload a release to the Azure bucket.
# Otherwise the release will be uploaded to the GitHub Releases.
# (The value is only checked if "ELECTRON_RELEASE" is defined.)
#
# The publishing scripts expect access tokens to be defined as env vars,
@@ -23,211 +23,292 @@
# https://www.appveyor.com/docs/build-configuration/#secure-variables
# https://www.appveyor.com/docs/build-configuration/#custom-environment-variables
# Uncomment these lines to enable RDP
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
version: 1.0.{build}
build_cloud: electron-16-core
image: vs2019bt-16.6.2
image: vs2019bt-16.16.11
environment:
GIT_CACHE_PATH: C:\Users\electron\libcc_cache
ELECTRON_OUT_DIR: Default
ELECTRON_ENABLE_STACK_DUMPING: 1
ELECTRON_ALSO_LOG_TO_STDERR: 1
MOCHA_REPORTER: mocha-multi-reporters
MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap
GOMA_FALLBACK_ON_AUTH_FAILURE: true
notifications:
- provider: Webhook
url: https://electron-mission-control.herokuapp.com/rest/appveyor-hook
method: POST
headers:
x-mission-control-secret:
secure: 90BLVPcqhJPG7d24v0q/RRray6W3wDQ8uVQlQjOHaBWkw1i8FoA1lsjr2C/v1dVok+tS2Pi6KxDctPUkwIb4T27u4RhvmcPzQhVpfwVJAG9oNtq+yKN7vzHfg7k/pojEzVdJpQLzeJGcSrZu7VY39Q==
on_build_success: false
on_build_failure: true
on_build_status_changed: false
build_script:
- ps: >-
if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild
} else {
node script/yarn.js install --frozen-lockfile
$result = node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER --prBranch=$env:APPVEYOR_REPO_BRANCH
Write-Output $result
if ($result.ExitCode -eq 0) {
Write-warning "Skipping build for doc only change"; Exit-AppveyorBuild
matrix:
- job_name: Build
- job_name: Test
job_depends_on: Build
clone_folder: C:\projects\src\electron
# the first failed job cancels other jobs and fails entire build
matrix:
fast_finish: true
for:
-
matrix:
only:
- job_name: Build
init:
- ps: >-
if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild
}
}
- echo "Building $env:GN_CONFIG build"
- git config --global core.longpaths true
- cd ..
- mkdir src
- update_depot_tools.bat
- ps: Move-Item $env:APPVEYOR_BUILD_FOLDER -Destination src\electron
- ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools"
- ps: >-
if ($env:GN_CONFIG -ne 'release') {
$env:NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] "
}
- >-
gclient config
--name "src\electron"
--unmanaged
%GCLIENT_EXTRA_ARGS%
"https://github.com/electron/electron"
- ps: >-
if ($env:GN_CONFIG -eq 'release') {
$env:RUN_GCLIENT_SYNC="true"
} else {
cd src\electron
node script\generate-deps-hash.js
$depshash = Get-Content .\.depshash -Raw
$zipfile = "Z:\$depshash.7z"
cd ..\..
if (Test-Path -Path $zipfile) {
# file exists, unzip and then gclient sync
7z x -y $zipfile -mmt=30 -aoa
if (-not (Test-Path -Path "src\buildtools")) {
# the zip file must be corrupt - resync
build_script:
- ps: |
node script/yarn.js install --frozen-lockfile
node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER --prBranch=$env:APPVEYOR_REPO_BRANCH
if ($LASTEXITCODE -eq 0) {
Write-warning "Skipping tests for doc only change"; Exit-AppveyorBuild
}
$global:LASTEXITCODE = 0
- cd ..
- ps: Write-Host "Building $env:GN_CONFIG build"
- git config --global core.longpaths true
- update_depot_tools.bat
- ps: >-
if (Test-Path 'env:RAW_GOMA_AUTH') {
$env:GOMA_OAUTH2_CONFIG_FILE = "$pwd\.goma_oauth2_config"
$env:RAW_GOMA_AUTH | Set-Content $env:GOMA_OAUTH2_CONFIG_FILE
}
- git clone https://github.com/electron/build-tools.git
- cd build-tools
- npm install
- mkdir third_party
- ps: >-
node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })"
- ps: $env:GN_GOMA_FILE = node -e "console.log(require('./src/utils/goma.js').gnFilePath)"
- ps: $env:LOCAL_GOMA_DIR = node -e "console.log(require('./src/utils/goma.js').dir)"
- cd ..\..
- ps: .\src\electron\script\start-goma.ps1 -gomaDir $env:LOCAL_GOMA_DIR
- ps: >-
if (Test-Path 'env:RAW_GOMA_AUTH') {
$goma_login = python $env:LOCAL_GOMA_DIR\goma_auth.py info
if ($goma_login -eq 'Login as Fermi Planck') {
Write-warning "Goma authentication is correct";
} else {
Write-warning "WARNING!!!!!! Goma authentication is incorrect; please update Goma auth token.";
$host.SetShouldExit(1)
}
}
- ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools"
- ps: >-
if ($env:GN_CONFIG -ne 'release') {
$env:NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] "
}
- >-
gclient config
--name "src\electron"
--unmanaged
%GCLIENT_EXTRA_ARGS%
"https://github.com/electron/electron"
- ps: >-
if ($env:GN_CONFIG -eq 'release') {
$env:RUN_GCLIENT_SYNC="true"
} else {
cd src\electron
node script\generate-deps-hash.js
$depshash = Get-Content .\.depshash -Raw
$zipfile = "Z:\$depshash.7z"
cd ..\..
if (Test-Path -Path $zipfile) {
# file exists, unzip and then gclient sync
7z x -y $zipfile -mmt=14 -aoa
if (-not (Test-Path -Path "src\buildtools")) {
# the zip file must be corrupt - resync
$env:RUN_GCLIENT_SYNC="true"
if ($env:TARGET_ARCH -ne 'ia32') {
# only save on x64/woa to avoid contention saving
$env:SAVE_GCLIENT_SRC="true"
}
} else {
# update angle
cd src\third_party\angle
git remote set-url origin https://chromium.googlesource.com/angle/angle.git
git fetch
cd ..\..\..
}
} else {
# file does not exist, gclient sync, then zip
$env:RUN_GCLIENT_SYNC="true"
if ($env:TARGET_ARCH -ne 'ia32') {
# only save on x64/woa to avoid contention saving
$env:SAVE_GCLIENT_SRC="true"
}
} else {
# update angle
cd src\third_party\angle
git remote set-url origin https://chromium.googlesource.com/angle/angle.git
git fetch
cd ..\..\..
}
} else {
# file does not exist, gclient sync, then zip
$env:RUN_GCLIENT_SYNC="true"
if ($env:TARGET_ARCH -ne 'ia32') {
# only save on x64/woa to avoid contention saving
$env:SAVE_GCLIENT_SRC="true"
}
}
}
- if "%RUN_GCLIENT_SYNC%"=="true" ( gclient sync )
- ps: >-
if ($env:SAVE_GCLIENT_SRC -eq 'true') {
# archive current source for future use
# only run on x64/woa to avoid contention saving
$(7z a $zipfile src -xr!android_webview -xr!electron -xr'!*\.git' -xr!third_party\WebKit\LayoutTests! -xr!third_party\blink\web_tests -xr!third_party\blink\perf_tests -slp -t7z -mmt=30)
if ($LASTEXITCODE -ne 0) {
Write-warning "Could not save source to shared drive; continuing anyway"
- if "%RUN_GCLIENT_SYNC%"=="true" ( gclient sync )
- ps: >-
if ($env:SAVE_GCLIENT_SRC -eq 'true') {
# archive current source for future use
# only run on x64/woa to avoid contention saving
$(7z a $zipfile src -xr!android_webview -xr!electron -xr'!*\.git' -xr!third_party\blink\web_tests -xr!third_party\blink\perf_tests -slp -t7z -mmt=30)
if ($LASTEXITCODE -ne 0) {
Write-warning "Could not save source to shared drive; continuing anyway"
}
# build time generation of file gen/angle/angle_commit.h depends on
# third_party/angle/.git
# https://chromium-review.googlesource.com/c/angle/angle/+/2074924
$(7z a $zipfile src\third_party\angle\.git)
if ($LASTEXITCODE -ne 0) {
Write-warning "Failed to add third_party\angle\.git; continuing anyway"
}
# build time generation of file dawn/common/Version_autogen.h depends on third_party/dawn/.git/HEAD
# https://dawn-review.googlesource.com/c/dawn/+/83901
$(7z a $zipfile src\third_party\dawn\.git)
if ($LASTEXITCODE -ne 0) {
Write-warning "Failed to add third_party\dawn\.git; continuing anyway"
}
}
# build time generation of file gen/angle/angle_commit.h depends on
# third_party/angle/.git
# https://chromium-review.googlesource.com/c/angle/angle/+/2074924
$(7z a $zipfile src\third_party\angle\.git)
if ($LASTEXITCODE -ne 0) {
Write-warning "Failed to add third_party\angle\.git; continuing anyway"
- cd src
- set BUILD_CONFIG_PATH=//electron/build/args/%GN_CONFIG%.gn
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") import(\"%GN_GOMA_FILE%\") %GN_EXTRA_ARGS% "
- gn check out/Default //electron:electron_lib
- gn check out/Default //electron:electron_app
- gn check out/Default //electron/shell/common/api:mojo
- if DEFINED GN_GOMA_FILE (ninja -j 300 -C out/Default electron:electron_app) else (ninja -C out/Default electron:electron_app)
- if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default )
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") %GN_EXTRA_ARGS%"
- ninja -C out/ffmpeg electron:electron_ffmpeg_zip
- ninja -C out/Default electron:electron_dist_zip
- ninja -C out/Default shell_browser_ui_unittests
- gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
- ninja -C out/Default electron:electron_mksnapshot_zip
- cd out\Default
- 7z a mksnapshot.zip mksnapshot_args gen\v8\embedded.S
- cd ..\..
- ninja -C out/Default electron:hunspell_dictionaries_zip
- ninja -C out/Default electron:electron_chromedriver_zip
- ninja -C out/Default third_party/electron_node:headers
- python %LOCAL_GOMA_DIR%\goma_ctl.py stat
- python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json
- 7z a node_headers.zip out\Default\gen\node_headers
- 7z a builtins-pgo.zip v8\tools\builtins-pgo
- ps: >-
if ($env:GN_CONFIG -eq 'release') {
# Needed for msdia140.dll on 64-bit windows
$env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin"
ninja -C out/Default electron:electron_symbols
}
}
- ps: >-
if (Test-Path 'env:RAW_GOMA_AUTH') {
$env:GOMA_OAUTH2_CONFIG_FILE = "$pwd\.goma_oauth2_config"
$env:RAW_GOMA_AUTH | Set-Content $env:GOMA_OAUTH2_CONFIG_FILE
}
- git clone https://github.com/electron/build-tools.git
- cd build-tools
- npm install
- mkdir third_party
- ps: >-
node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })"
- ps: $env:GN_GOMA_FILE = node -e "console.log(require('./src/utils/goma.js').gnFilePath)"
- ps: $env:LOCAL_GOMA_DIR = node -e "console.log(require('./src/utils/goma.js').dir)"
- cd ..
- ps: .\src\electron\script\start-goma.ps1 -gomaDir $env:LOCAL_GOMA_DIR
- cd src
- set BUILD_CONFIG_PATH=//electron/build/args/%GN_CONFIG%.gn
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") import(\"%GN_GOMA_FILE%\") %GN_EXTRA_ARGS% "
- gn check out/Default //electron:electron_lib
- gn check out/Default //electron:electron_app
- gn check out/Default //electron/shell/common/api:mojo
- if DEFINED GN_GOMA_FILE (ninja -j 300 -C out/Default electron:electron_app) else (ninja -C out/Default electron:electron_app)
- if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default )
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") %GN_EXTRA_ARGS%"
- ninja -C out/ffmpeg electron:electron_ffmpeg_zip
- ninja -C out/Default electron:electron_dist_zip
- ninja -C out/Default shell_browser_ui_unittests
- gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
- ninja -C out/Default electron:electron_mksnapshot_zip
- cd out\Default
- 7z a mksnapshot.zip mksnapshot_args gen\v8\embedded.S
- cd ..\..
- ninja -C out/Default electron:hunspell_dictionaries_zip
- ninja -C out/Default electron:electron_chromedriver_zip
- ninja -C out/Default third_party/electron_node:headers
- python %LOCAL_GOMA_DIR%\goma_ctl.py stat
- python electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json
- appveyor PushArtifact out/Default/windows_toolchain_profile.json
- appveyor PushArtifact out/Default/dist.zip
- appveyor PushArtifact out/Default/shell_browser_ui_unittests.exe
- appveyor PushArtifact out/Default/chromedriver.zip
- appveyor PushArtifact out/ffmpeg/ffmpeg.zip
- 7z a node_headers.zip out\Default\gen\node_headers
- appveyor PushArtifact node_headers.zip
- appveyor PushArtifact out/Default/mksnapshot.zip
- appveyor PushArtifact out/Default/hunspell_dictionaries.zip
- appveyor PushArtifact out/Default/electron.lib
- ps: >-
if ($env:GN_CONFIG -eq 'release') {
# Needed for msdia140.dll on 64-bit windows
$env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin"
ninja -C out/Default electron:electron_symbols
}
- ps: >-
if ($env:GN_CONFIG -eq 'release') {
python electron\script\zip-symbols.py
appveyor-retry appveyor PushArtifact out/Default/symbols.zip
} else {
# It's useful to have pdb files when debugging testing builds that are
# built on CI.
7z a pdb.zip out\Default\*.pdb
appveyor-retry appveyor PushArtifact pdb.zip
}
- python electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest
test_script:
# Workaround for https://github.com/appveyor/ci/issues/2420
- set "PATH=%PATH%;C:\Program Files\Git\mingw64\libexec\git-core"
- ps: >-
if ((-Not (Test-Path Env:\TEST_WOA)) -And (-Not (Test-Path Env:\ELECTRON_RELEASE)) -And ($env:GN_CONFIG -in "testing", "release")) {
$env:RUN_TESTS="true"
}
- ps: >-
if ($env:RUN_TESTS -eq 'true') {
New-Item .\out\Default\gen\node_headers\Release -Type directory
Copy-Item -path .\out\Default\electron.lib -destination .\out\Default\gen\node_headers\Release\node.lib
} else {
echo "Skipping tests for $env:GN_CONFIG build"
}
- cd electron
# CalculateNativeWinOcclusion is disabled due to https://bugs.chromium.org/p/chromium/issues/detail?id=1139022
- if "%RUN_TESTS%"=="true" ( echo Running test suite & node script/yarn test -- --trace-uncaught --enable-logging --disable-features=CalculateNativeWinOcclusion )
- cd ..
- if "%RUN_TESTS%"=="true" ( echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg )
- echo "About to verify mksnapshot"
- if "%RUN_TESTS%"=="true" ( echo Verifying mksnapshot & python electron\script\verify-mksnapshot.py --build-dir out\Default --source-root %cd% )
- echo "Done verifying mksnapshot"
- if "%RUN_TESTS%"=="true" ( echo Verifying chromedriver & python electron\script\verify-chromedriver.py --build-dir out\Default --source-root %cd% )
- echo "Done verifying chromedriver"
deploy_script:
- cd electron
- ps: >-
if (Test-Path Env:\ELECTRON_RELEASE) {
if (Test-Path Env:\UPLOAD_TO_S3) {
Write-Output "Uploading Electron release distribution to s3"
& python script\release\uploaders\upload.py --verbose --upload_to_s3
- ps: >-
if ($env:GN_CONFIG -eq 'release') {
python3 electron\script\zip-symbols.py
appveyor-retry appveyor PushArtifact out/Default/symbols.zip
} else {
Write-Output "Uploading Electron release distribution to github releases"
& python script\release\uploaders\upload.py --verbose
# It's useful to have pdb files when debugging testing builds that are
# built on CI.
7z a pdb.zip out\Default\*.pdb
}
} elseif (Test-Path Env:\TEST_WOA) {
node script/release/ci-release-build.js --job=electron-woa-testing --ci=VSTS --armTest --appveyorJobId=$env:APPVEYOR_JOB_ID $env:APPVEYOR_REPO_BRANCH
}
- python3 electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest
deploy_script:
- cd electron
- ps: >-
if (Test-Path Env:\ELECTRON_RELEASE) {
if (Test-Path Env:\UPLOAD_TO_STORAGE) {
Write-Output "Uploading Electron release distribution to azure"
& python3 script\release\uploaders\upload.py --verbose --upload_to_storage
} else {
Write-Output "Uploading Electron release distribution to github releases"
& python3 script\release\uploaders\upload.py --verbose
}
} elseif (Test-Path Env:\TEST_WOA) {
node script/release/ci-release-build.js --job=electron-woa-testing --ci=GHA --appveyorJobId=$env:APPVEYOR_JOB_ID $env:APPVEYOR_REPO_BRANCH
}
on_finish:
# Uncomment this lines to enable RDP
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- cd C:\projects\src
- if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
- if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
- if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe)
- if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
- if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
- if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
- if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
- if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
- if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)
- if exist builtins-pgo.zip (appveyor-retry appveyor PushArtifact builtins-pgo.zip)
- ps: >-
if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) {
appveyor-retry appveyor PushArtifact pdb.zip
}
-
matrix:
only:
- job_name: Test
init:
- ps: |
if ($env:RUN_TESTS -ne 'true') {
Write-warning "Skipping tests for $env:APPVEYOR_PROJECT_NAME"; Exit-AppveyorBuild
}
if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild
}
build_script:
- ps: |
node script/yarn.js install --frozen-lockfile
node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER --prBranch=$env:APPVEYOR_REPO_BRANCH
if ($LASTEXITCODE -eq 0) {
Write-warning "Skipping tests for doc only change"; Exit-AppveyorBuild
}
$global:LASTEXITCODE = 0
- ps: |
cd ..
mkdir out\Default
cd ..
# Download build artifacts
$apiUrl = 'https://ci.appveyor.com/api'
$build_info = Invoke-RestMethod -Method Get -Uri "$apiUrl/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/builds/$env:APPVEYOR_BUILD_ID"
$artifacts_to_download = @('dist.zip','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','builtins-pgo.zip')
foreach ($job in $build_info.build.jobs) {
if ($job.name -eq "Build") {
$jobId = $job.jobId
foreach($artifact_name in $artifacts_to_download) {
if ($artifact_name -eq 'shell_browser_ui_unittests.exe' -Or $artifact_name -eq 'electron.lib') {
$outfile = "src\out\Default\$artifact_name"
} else {
$outfile = $artifact_name
}
Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/$artifact_name" -OutFile $outfile
}
}
}
- ps: |
$out_default_zips = @('dist.zip','chromedriver.zip','mksnapshot.zip')
foreach($zip_name in $out_default_zips) {
7z x -y -osrc\out\Default $zip_name
}
- ps: 7z x -y -osrc\out\ffmpeg ffmpeg.zip
- ps: 7z x -y -osrc node_headers.zip
- ps: 7z x -y -osrc builtins-pgo.zip
test_script:
# Workaround for https://github.com/appveyor/ci/issues/2420
- set "PATH=%PATH%;C:\Program Files\Git\mingw64\libexec\git-core"
- ps: |
cd src
New-Item .\out\Default\gen\node_headers\Release -Type directory
Copy-Item -path .\out\Default\electron.lib -destination .\out\Default\gen\node_headers\Release\node.lib
- cd electron
- echo Running main test suite & node script/yarn test -- --trace-uncaught --runners=main --enable-logging=file --log-file=%cd%\electron.log
- echo Running native test suite & node script/yarn test -- --trace-uncaught --runners=native --enable-logging=file --log-file=%cd%\electron.log
- cd ..
- echo Verifying non proprietary ffmpeg & python3 electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg
- echo "About to verify mksnapshot"
- echo Verifying mksnapshot & python3 electron\script\verify-mksnapshot.py --build-dir out\Default --source-root %cd%
- echo "Done verifying mksnapshot"
- echo Verifying chromedriver & python3 electron\script\verify-chromedriver.py --build-dir out\Default --source-root %cd%
- echo "Done verifying chromedriver"
on_finish:
- if exist electron\electron.log ( appveyor-retry appveyor PushArtifact electron\electron.log )

View File

@@ -1,121 +0,0 @@
steps:
- task: CopyFiles@2
displayName: 'Copy Files to: src/electron'
inputs:
TargetFolder: src/electron
- bash: |
cd src/electron
node script/yarn.js install --frozen-lockfile
displayName: 'Yarn install'
- bash: |
export ZIP_DEST=$PWD/src/out/Default
echo "##vso[task.setvariable variable=ZIP_DEST]$ZIP_DEST"
mkdir -p $ZIP_DEST
cd src/electron
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=dist.zip --dest=$ZIP_DEST
cd $ZIP_DEST
unzip -o dist.zip
xattr -cr Electron.app
displayName: 'Download and unzip dist files for test'
env:
CIRCLE_TOKEN: $(CIRCLECI_TOKEN)
- bash: |
export FFMPEG_ZIP_DEST=$PWD/src/out/ffmpeg
mkdir -p $FFMPEG_ZIP_DEST
cd src/electron
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=ffmpeg.zip --dest=$FFMPEG_ZIP_DEST
cd $FFMPEG_ZIP_DEST
unzip -o ffmpeg.zip
displayName: 'Download and unzip ffmpeg for test'
env:
CIRCLE_TOKEN: $(CIRCLECI_TOKEN)
- bash: |
export NODE_HEADERS_DEST=$PWD/src/out/Default/gen
mkdir -p $NODE_HEADERS_DEST
cd src/electron
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=node_headers.tar.gz --dest=$NODE_HEADERS_DEST
cd $NODE_HEADERS_DEST
tar xzf node_headers.tar.gz
displayName: 'Download and untar node header files for test'
env:
CIRCLE_TOKEN: $(CIRCLECI_TOKEN)
- bash: |
export CROSS_ARCH_SNAPSHOTS=$PWD/src/out/Default/cross-arch-snapshots
mkdir -p $CROSS_ARCH_SNAPSHOTS
cd src/electron
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=cross-arch-snapshots/snapshot_blob.bin --dest=$CROSS_ARCH_SNAPSHOTS
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=cross-arch-snapshots/v8_context_snapshot.arm64.bin --dest=$CROSS_ARCH_SNAPSHOTS
displayName: 'Download cross arch snapshot files'
env:
CIRCLE_TOKEN: $(CIRCLECI_TOKEN)
- bash: |
cd src
export ELECTRON_OUT_DIR=Default
export npm_config_arch=arm64
(cd electron && node script/yarn test --enable-logging --runners main)
displayName: 'Run Electron main tests'
timeoutInMinutes: 20
env:
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
IGNORE_YARN_INSTALL_ERROR: 1
ELECTRON_TEST_RESULTS_DIR: junit
- bash: |
cd src
export ELECTRON_OUT_DIR=Default
export npm_config_arch=arm64
(cd electron && node script/yarn test --enable-logging --runners remote)
displayName: 'Run Electron remote tests'
timeoutInMinutes: 20
condition: succeededOrFailed()
env:
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
IGNORE_YARN_INSTALL_ERROR: 1
ELECTRON_TEST_RESULTS_DIR: junit
- bash: |
cd src
python electron/script/verify-ffmpeg.py --source-root "$PWD" --build-dir out/Default --ffmpeg-path out/ffmpeg
displayName: Verify non proprietary ffmpeg
timeoutInMinutes: 5
condition: succeededOrFailed()
env:
TARGET_ARCH: arm64
- bash: |
cd src
echo Verify cross arch snapshot
python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --snapshot-files-dir $PWD/out/Default/cross-arch-snapshots
displayName: Verify cross arch snapshot
timeoutInMinutes: 5
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '*.xml'
searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/'
condition: succeededOrFailed()
- bash: killall Electron || echo "No Electron processes left running"
displayName: 'Kill processes left running from last test run'
condition: always()
- bash: |
rm -rf ~/Library/Application\ Support/Electron*
rm -rf ~/Library/Application\ Support/electron*
displayName: 'Delete user app data directories'
condition: always()
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'
condition: always()

View File

@@ -1,129 +0,0 @@
steps:
- task: CopyFiles@2
displayName: 'Copy Files to: src\electron'
inputs:
TargetFolder: src\electron
- script: |
cd src\electron
node script/yarn.js install --frozen-lockfile
displayName: 'Yarn install'
- powershell: |
$localArtifactPath = "$pwd\dist.zip"
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/dist.zip"
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\Default -y $localArtifactPath
displayName: 'Download and extract dist.zip for test'
env:
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
- powershell: |
$localArtifactPath = "$pwd\src\out\Default\shell_browser_ui_unittests.exe"
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/shell_browser_ui_unittests.exe"
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
displayName: 'Download and extract native test executables for test'
env:
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
- powershell: |
$localArtifactPath = "$pwd\ffmpeg.zip"
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/ffmpeg.zip"
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\ffmpeg $localArtifactPath
displayName: 'Download and extract ffmpeg.zip for test'
env:
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
- powershell: |
$localArtifactPath = "$pwd\src\node_headers.zip"
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/node_headers.zip"
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
cd src
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y node_headers.zip
displayName: 'Download node headers for test'
env:
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
- powershell: |
$localArtifactPath = "$pwd\src\out\Default\electron.lib"
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/electron.lib"
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
displayName: 'Download electron.lib for test'
env:
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
- powershell: |
try {
$localArtifactPath = "$pwd\src\pdb.zip"
$serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/pdb.zip"
Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" }
cd src
& "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y pdb.zip
} catch {
Write-Host "There was an exception encountered while downloading pdb files:" $_.Exception.Message
} finally {
$global:LASTEXITCODE = 0
}
displayName: 'Download pdb files for detailed stacktraces'
env:
APPVEYOR_TOKEN: $(APPVEYOR_TOKEN)
- powershell: |
New-Item src\out\Default\gen\node_headers\Release -Type directory
Copy-Item -path src\out\Default\electron.lib -destination src\out\Default\gen\node_headers\Release\node.lib
displayName: 'Setup node headers'
- script: |
cd src
set npm_config_nodedir=%cd%\out\Default\gen\node_headers
set npm_config_arch=arm64
cd electron
node script/yarn test --runners=main --runTestFilesSeperately --enable-logging --disable-features=CalculateNativeWinOcclusion
displayName: 'Run Electron Main process tests'
env:
ELECTRON_ENABLE_STACK_DUMPING: true
ELECTRON_OUT_DIR: Default
IGNORE_YARN_INSTALL_ERROR: 1
ELECTRON_TEST_RESULTS_DIR: junit
MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap'
MOCHA_REPORTER: mocha-multi-reporters
- script: |
cd src
set npm_config_nodedir=%cd%\out\Default\gen\node_headers
set npm_config_arch=arm64
cd electron
node script/yarn test --runners=remote --enable-logging --disable-features=CalculateNativeWinOcclusion
displayName: 'Run Electron Remote based tests'
env:
ELECTRON_OUT_DIR: Default
IGNORE_YARN_INSTALL_ERROR: 1
ELECTRON_TEST_RESULTS_DIR: junit
MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap'
MOCHA_REPORTER: mocha-multi-reporters
condition: always()
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '*.xml'
searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/'
condition: always()
- script: |
cd src
echo "Verifying non proprietary ffmpeg"
python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg
displayName: 'Verify ffmpeg'
- powershell: |
Get-Process | Where Name Like "electron*" | Stop-Process
Get-Process | Where Name Like "msedge*" | Stop-Process
displayName: 'Kill processes left running from last test run'
condition: always()
- powershell: |
Remove-Item -path $env:APPDATA/Electron* -Recurse -Force -ErrorAction Ignore
displayName: 'Delete user app data directories'
condition: always()

View File

@@ -2,10 +2,9 @@ is_electron_build = true
root_extra_deps = [ "//electron" ]
# Registry of NMVs --> https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json
node_module_version = 103
node_module_version = 109
v8_promise_internal_field_count = 1
v8_typed_array_max_size_in_heap = 0
v8_embedder_string = "-electron.0"
# TODO: this breaks mksnapshot
@@ -22,20 +21,27 @@ proprietary_codecs = true
ffmpeg_branding = "Chrome"
enable_basic_printing = true
# Removes DLLs from the build, which are only meant to be used for Chromium development.
# See https://github.com/electron/electron/pull/17985
angle_enable_vulkan_validation_layers = false
dawn_enable_vulkan_validation_layers = false
# This breaks native node modules
libcxx_abi_unstable = false
# These are disabled because they cause the zip manifest to differ between
# testing and release builds.
# See https://chromium-review.googlesource.com/c/chromium/src/+/2774898.
enable_pseudolocales = false
is_cfi = false
# Make application name configurable at runtime for cookie crypto
allow_runtime_configurable_key_storage = true
# CET shadow stack is incompatible with v8, until v8 is CET compliant
# enabling this flag causes main process crashes where CET is enabled
# Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=357
enable_cet_shadow_stack = false
# For similar reasons, disable CFI, which is not well supported in V8.
# Chromium doesn't have any problems with this because they do not run
# V8 in the browser process.
# Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=281
is_cfi = false

View File

@@ -1,33 +1,22 @@
import("node.gni")
template("node_action") {
assert(defined(invoker.script), "Need script path to run")
assert(defined(invoker.args), "Need script arguments")
# TODO(MarshallOfSound): Move to electron/node, this is the only place it is used now
# Run an action with a given working directory. Behaves identically to the
# action() target type, with the exception that it changes directory before
# running the script.
#
# Parameters:
# cwd [required]: Directory to change to before running the script.
template("chdir_action") {
action(target_name) {
forward_variables_from(invoker,
"*",
[
"script",
"args",
"deps",
"public_deps",
"sources",
"inputs",
"outputs",
])
assert(defined(cwd), "Need cwd in $target_name")
script = "//electron/build/run-in-dir.py"
if (defined(sources)) {
sources += [ invoker.script ]
} else {
assert(defined(inputs))
inputs += [ invoker.script ]
if (!defined(inputs)) {
inputs = []
}
args = [
rebase_path(cwd),
rebase_path(invoker.script),
]
args += invoker.args
inputs += [ invoker.script ]
script = "//electron/build/run-node.py"
args = [ rebase_path(invoker.script) ] + invoker.args
}
}

View File

@@ -1,23 +1,3 @@
config("build_time_executable") {
configs = []
if (is_electron_build && !is_component_build) {
# The executables which have this config applied are dependent on ffmpeg,
# which is always a shared library in an Electron build. However, in the
# non-component build, executables don't have rpath set to search for
# libraries in the executable's directory, so ffmpeg cannot be found. So
# let's make sure rpath is set here.
# See '//build/config/gcc/BUILD.gn' for details on the rpath setting.
if (is_linux) {
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}
if (is_mac) {
ldflags = [ "-Wl,-rpath,@loader_path/." ]
}
}
}
# For MAS build, we force defining "MAS_BUILD".
config("mas_build") {
if (is_mas_build) {

View File

@@ -24,7 +24,11 @@ template("extract_symbols") {
assert(defined(invoker.binary), "Need binary to dump")
assert(defined(invoker.symbol_dir), "Need directory for symbol output")
dump_syms_label = "//third_party/breakpad:dump_syms($host_toolchain)"
if (host_os == "win" && target_cpu == "x86") {
dump_syms_label = "//third_party/breakpad:dump_syms(//build/toolchain/win:win_clang_x64)"
} else {
dump_syms_label = "//third_party/breakpad:dump_syms($host_toolchain)"
}
dump_syms_binary = get_label_info(dump_syms_label, "root_out_dir") +
"/dump_syms$_host_executable_suffix"

View File

@@ -19,17 +19,13 @@ TEMPLATE_H = """
#define FUSE_EXPORT __attribute__((visibility("default")))
#endif
namespace electron {
namespace fuses {
namespace electron::fuses {
extern const volatile char kFuseWire[];
{getters}
} // namespace fuses
} // namespace electron
} // namespace electron::fuses
#endif // ELECTRON_FUSES_H_
"""
@@ -37,17 +33,13 @@ extern const volatile char kFuseWire[];
TEMPLATE_CC = """
#include "electron/fuses.h"
namespace electron {
namespace fuses {
namespace electron::fuses {
const volatile char kFuseWire[] = { /* sentinel */ {sentinel}, /* fuse_version */ {fuse_version}, /* fuse_wire_length */ {fuse_wire_length}, /* fuse_wire */ {initial_config}};
{getters}
}
}
} // namespace electron:fuses
"""
with open(os.path.join(dir_path, "fuses.json5"), 'r') as f:

View File

@@ -7,5 +7,6 @@
"node_options": "1",
"node_cli_inspect": "1",
"embedded_asar_integrity_validation": "0",
"only_load_app_from_asar": "0"
"only_load_app_from_asar": "0",
"load_browser_process_specific_v8_snapshot": "0"
}

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import os
import subprocess
@@ -8,9 +8,7 @@ TEMPLATE = """
#include "node_native_module.h"
#include "node_internals.h"
namespace node {{
namespace native_module {{
namespace node::native_module {{
{definitions}
@@ -18,9 +16,7 @@ void NativeModuleLoader::LoadEmbedderJavaScriptSource() {{
{initializers}
}}
}} // namespace native_module
}} // namespace node
}} // namespace node::native_module
"""
def main():

View File

@@ -4,7 +4,7 @@
# Cocoa .app bundle. The presence of these empty directories is sufficient to
# convince Cocoa that the application supports the named localization, even if
# an InfoPlist.strings file is not provided. Chrome uses these empty locale
# directoires for its helper executable bundles, which do not otherwise
# directories for its helper executable bundles, which do not otherwise
# require any direct Cocoa locale support.
import os

View File

@@ -1,21 +0,0 @@
template("node_action") {
assert(defined(invoker.script), "Need script path to run")
assert(defined(invoker.args), "Need script argumets")
action(target_name) {
forward_variables_from(invoker,
[
"deps",
"public_deps",
"sources",
"inputs",
"outputs",
])
if (!defined(inputs)) {
inputs = []
}
inputs += [ invoker.script ]
script = "//electron/build/run-node.py"
args = [ rebase_path(invoker.script) ] + invoker.args
}
}

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import os
import subprocess

View File

@@ -1,7 +1,7 @@
template("npm_action") {
assert(defined(invoker.script),
"Need script name to run (must be defined in package.json)")
assert(defined(invoker.args), "Need script argumets")
assert(defined(invoker.args), "Need script arguments")
action("npm_pre_flight_" + target_name) {
inputs = [

View File

@@ -1,9 +1,12 @@
from __future__ import with_statement
from __future__ import unicode_literals
import contextlib
import sys
import os
import optparse
import json
import re
import subprocess
sys.path.append("%s/../../build" % os.path.dirname(os.path.realpath(__file__)))
@@ -33,36 +36,56 @@ def calculate_hash(root):
return CalculateHash('.', None)
def windows_installed_software():
import win32com.client
strComputer = "."
objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator")
objSWbemServices = objWMIService.ConnectServer(strComputer, "root\cimv2")
colItems = objSWbemServices.ExecQuery("Select * from Win32_Product")
items = []
powershell_command = [
"Get-CimInstance",
"-Namespace",
"root\cimv2",
"-Class",
"Win32_product",
"|",
"Select",
"vendor,",
"description,",
"@{l='install_location';e='InstallLocation'},",
"@{l='install_date';e='InstallDate'},",
"@{l='install_date_2';e='InstallDate2'},",
"caption,",
"version,",
"name,",
"@{l='sku_number';e='SKUNumber'}",
"|",
"ConvertTo-Json",
]
for objItem in colItems:
item = {}
if objItem.Caption:
item['caption'] = objItem.Caption
if objItem.Caption:
item['description'] = objItem.Description
if objItem.InstallDate:
item['install_date'] = objItem.InstallDate
if objItem.InstallDate2:
item['install_date_2'] = objItem.InstallDate2
if objItem.InstallLocation:
item['install_location'] = objItem.InstallLocation
if objItem.Name:
item['name'] = objItem.Name
if objItem.SKUNumber:
item['sku_number'] = objItem.SKUNumber
if objItem.Vendor:
item['vendor'] = objItem.Vendor
if objItem.Version:
item['version'] = objItem.Version
items.append(item)
proc = subprocess.Popen(
["powershell.exe", "-Command", "-"],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
)
return items
stdout, _ = proc.communicate(" ".join(powershell_command).encode("utf-8"))
if proc.returncode != 0:
raise RuntimeError("Failed to get list of installed software")
# On AppVeyor there's other output related to PSReadline,
# so grab only the JSON output and ignore everything else
json_match = re.match(
r".*(\[.*{.*}.*\]).*", stdout.decode("utf-8"), re.DOTALL
)
if not json_match:
raise RuntimeError(
"Couldn't find JSON output for list of installed software"
)
# Filter out missing keys
return list(
map(
lambda info: {k: info[k] for k in info if info[k]},
json.loads(json_match.group(1)),
)
)
def windows_profile():
@@ -89,7 +112,7 @@ def windows_profile():
def main(options):
if sys.platform == 'win32':
with open(options.output_json, 'wb') as f:
with open(options.output_json, 'w') as f:
json.dump(windows_profile(), f)
else:
raise OSError("Unsupported OS")

View File

@@ -51,7 +51,7 @@ template("compile_ib_files") {
# Template to compile and package Mac XIB files as bundle data.
# Arguments
# sources:
# list of string, sources to comiple
# list of string, sources to compile
# output_path:
# (optional) string, the path to use for the outputs list in the
# bundle_data step. If unspecified, defaults to bundle_resources_dir.

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import os
import subprocess
import sys

View File

@@ -50,8 +50,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 18,0,0,20220201
PRODUCTVERSION 18,0,0,20220201
FILEVERSION $major,$minor,$patch,$prerelease_number
PRODUCTVERSION $major,$minor,$patch,$prerelease_number
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -68,12 +68,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "GitHub, Inc."
VALUE "FileDescription", "Electron"
VALUE "FileVersion", "18.0.0"
VALUE "FileVersion", "$major.$minor.$patch"
VALUE "InternalName", "electron.exe"
VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved."
VALUE "OriginalFilename", "electron.exe"
VALUE "ProductName", "Electron"
VALUE "ProductVersion", "18.0.0"
VALUE "ProductVersion", "$major.$minor.$patch"
VALUE "SquirrelAwareVersion", "1"
END
END

View File

@@ -0,0 +1 @@
$full_version

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import os
import subprocess

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
import os
import subprocess

View File

@@ -19,7 +19,6 @@ buildflag_header("buildflags") {
"ENABLE_ELECTRON_EXTENSIONS=$enable_electron_extensions",
"ENABLE_BUILTIN_SPELLCHECKER=$enable_builtin_spellchecker",
"ENABLE_PICTURE_IN_PICTURE=$enable_picture_in_picture",
"ENABLE_WIN_DARK_MODE_WINDOW_UI=$enable_win_dark_mode_window_ui",
"OVERRIDE_LOCATION_PROVIDER=$enable_fake_location_provider",
]
}

View File

@@ -31,7 +31,4 @@ declare_args() {
# Enable Spellchecker support
enable_builtin_spellchecker = true
# Undocumented Windows dark mode API
enable_win_dark_mode_window_ui = false
}

View File

@@ -6,6 +6,7 @@ import("//build/config/ozone.gni")
import("//build/config/ui.gni")
import("//components/spellcheck/spellcheck_build_features.gni")
import("//electron/buildflags/buildflags.gni")
import("//ppapi/buildflags/buildflags.gni")
import("//printing/buildflags/buildflags.gni")
import("//third_party/widevine/cdm/widevine.gni")
@@ -53,8 +54,16 @@ static_library("chrome") {
"//chrome/browser/predictors/resolve_host_client_impl.cc",
"//chrome/browser/predictors/resolve_host_client_impl.h",
"//chrome/browser/process_singleton.h",
"//chrome/browser/ui/browser_dialogs.cc",
"//chrome/browser/ui/browser_dialogs.h",
"//chrome/browser/process_singleton_internal.cc",
"//chrome/browser/process_singleton_internal.h",
"//chrome/browser/themes/browser_theme_pack.cc",
"//chrome/browser/themes/browser_theme_pack.h",
"//chrome/browser/themes/custom_theme_supplier.cc",
"//chrome/browser/themes/custom_theme_supplier.h",
"//chrome/browser/themes/theme_properties.cc",
"//chrome/browser/themes/theme_properties.h",
"//chrome/browser/ui/color/chrome_color_mixers.cc",
"//chrome/browser/ui/color/chrome_color_mixers.h",
"//chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.cc",
"//chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h",
"//chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc",
@@ -69,6 +78,11 @@ static_library("chrome") {
"//chrome/browser/ui/exclusive_access/keyboard_lock_controller.h",
"//chrome/browser/ui/exclusive_access/mouse_lock_controller.cc",
"//chrome/browser/ui/exclusive_access/mouse_lock_controller.h",
"//chrome/browser/ui/frame/window_frame_util.cc",
"//chrome/browser/ui/frame/window_frame_util.h",
"//chrome/browser/ui/native_window_tracker.h",
"//chrome/browser/ui/ui_features.cc",
"//chrome/browser/ui/ui_features.h",
"//chrome/browser/ui/views/eye_dropper/eye_dropper.cc",
"//chrome/browser/ui/views/eye_dropper/eye_dropper.h",
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view.cc",
@@ -88,7 +102,10 @@ static_library("chrome") {
"//chrome/browser/icon_loader_mac.mm",
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.h",
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm",
"//chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h",
"//chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.mm",
"//chrome/browser/media/webrtc/window_icon_util_mac.mm",
"//chrome/browser/platform_util_mac.mm",
"//chrome/browser/process_singleton_mac.mm",
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.h",
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.mm",
@@ -106,6 +123,8 @@ static_library("chrome") {
"//chrome/browser/ui/view_ids.h",
"//chrome/browser/win/chrome_process_finder.cc",
"//chrome/browser/win/chrome_process_finder.h",
"//chrome/browser/win/titlebar_config.cc",
"//chrome/browser/win/titlebar_config.h",
"//chrome/browser/win/titlebar_config.h",
"//chrome/child/v8_crashpad_support_win.cc",
"//chrome/child/v8_crashpad_support_win.h",
@@ -119,12 +138,15 @@ static_library("chrome") {
if (use_aura) {
sources += [
"//chrome/browser/platform_util_aura.cc",
"//chrome/browser/ui/aura/native_window_tracker_aura.cc",
"//chrome/browser/ui/aura/native_window_tracker_aura.h",
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_aura.cc",
]
}
public_deps = [
"//chrome/browser:dev_ui_browser_resources",
"//chrome/browser/ui/color:mixers",
"//chrome/common",
"//chrome/common:version_header",
"//components/keyed_service/content",
@@ -135,14 +157,7 @@ static_library("chrome") {
"//services/strings",
]
deps = [
"//chrome/browser:resource_prefetch_predictor_proto",
"//components/optimization_guide/proto:optimization_guide_proto",
]
if (enable_basic_printing && is_win) {
deps += [ "//chrome/common:cloud_print_utility_mojom" ]
}
deps = [ "//chrome/browser:resource_prefetch_predictor_proto" ]
if (is_linux) {
sources += [ "//chrome/browser/icon_loader_auralinux.cc" ]
@@ -215,6 +230,10 @@ static_library("chrome") {
"//chrome/browser/printing/printer_query.h",
"//chrome/browser/printing/printing_service.cc",
"//chrome/browser/printing/printing_service.h",
"//components/printing/browser/print_to_pdf/pdf_print_job.cc",
"//components/printing/browser/print_to_pdf/pdf_print_job.h",
"//components/printing/browser/print_to_pdf/pdf_print_utils.cc",
"//components/printing/browser/print_to_pdf/pdf_print_utils.h",
]
if (enable_oop_printing) {
@@ -243,8 +262,6 @@ static_library("chrome") {
sources += [
"//chrome/browser/printing/pdf_to_emf_converter.cc",
"//chrome/browser/printing/pdf_to_emf_converter.h",
"//chrome/utility/printing_handler.cc",
"//chrome/utility/printing_handler.h",
]
}
}
@@ -259,8 +276,12 @@ static_library("chrome") {
"//chrome/browser/ui/views/overlay/close_image_button.cc",
"//chrome/browser/ui/views/overlay/close_image_button.h",
"//chrome/browser/ui/views/overlay/constants.h",
"//chrome/browser/ui/views/overlay/document_overlay_window_views.cc",
"//chrome/browser/ui/views/overlay/document_overlay_window_views.h",
"//chrome/browser/ui/views/overlay/hang_up_button.cc",
"//chrome/browser/ui/views/overlay/hang_up_button.h",
"//chrome/browser/ui/views/overlay/overlay_window_image_button.cc",
"//chrome/browser/ui/views/overlay/overlay_window_image_button.h",
"//chrome/browser/ui/views/overlay/overlay_window_views.cc",
"//chrome/browser/ui/views/overlay/overlay_window_views.h",
"//chrome/browser/ui/views/overlay/playback_image_button.cc",
@@ -275,11 +296,14 @@ static_library("chrome") {
"//chrome/browser/ui/views/overlay/toggle_microphone_button.h",
"//chrome/browser/ui/views/overlay/track_image_button.cc",
"//chrome/browser/ui/views/overlay/track_image_button.h",
"//chrome/browser/ui/views/overlay/video_overlay_window_views.cc",
"//chrome/browser/ui/views/overlay/video_overlay_window_views.h",
]
deps += [
"//chrome/app/vector_icons",
"//components/vector_icons:vector_icons",
"//ui/views/controls/webview",
]
}
@@ -297,10 +321,18 @@ static_library("chrome") {
if (enable_pdf_viewer) {
sources += [
"//chrome/browser/pdf/chrome_pdf_stream_delegate.cc",
"//chrome/browser/pdf/chrome_pdf_stream_delegate.h",
"//chrome/browser/pdf/pdf_extension_util.cc",
"//chrome/browser/pdf/pdf_extension_util.h",
"//chrome/renderer/pepper/chrome_pdf_print_client.cc",
"//chrome/renderer/pepper/chrome_pdf_print_client.h",
"//chrome/browser/pdf/pdf_frame_util.cc",
"//chrome/browser/pdf/pdf_frame_util.h",
"//chrome/browser/plugins/pdf_iframe_navigation_throttle.cc",
"//chrome/browser/plugins/pdf_iframe_navigation_throttle.h",
]
deps += [
"//components/pdf/browser",
"//components/pdf/renderer",
]
}
}
@@ -329,37 +361,32 @@ source_set("plugins") {
"//chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc",
"//chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h",
]
deps += [
"//media:media_buildflags",
"//ppapi/buildflags",
"//ppapi/proxy:ipc",
"//services/device/public/mojom",
]
if (enable_pdf_viewer) {
deps += [ "//components/pdf/browser" ]
}
# renderer side
sources += [
"//chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc",
"//chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h",
"//chrome/renderer/pepper/pepper_flash_font_file_host.cc",
"//chrome/renderer/pepper/pepper_flash_font_file_host.h",
"//chrome/renderer/pepper/pepper_shared_memory_message_filter.cc",
"//chrome/renderer/pepper/pepper_shared_memory_message_filter.h",
]
if (enable_pdf_viewer) {
deps += [ "//components/pdf/renderer" ]
}
deps += [
"//components/strings",
"//media:media_buildflags",
"//ppapi/host",
"//ppapi/proxy",
"//ppapi/proxy:ipc",
"//ppapi/shared_impl",
"//services/device/public/mojom",
"//skia",
"//storage/browser",
]
if (enable_ppapi) {
deps += [
"//ppapi/buildflags",
"//ppapi/host",
"//ppapi/proxy",
"//ppapi/proxy:ipc",
"//ppapi/shared_impl",
]
}
}
# This source set is just so we don't have to depend on all of //chrome/browser
@@ -381,14 +408,19 @@ source_set("chrome_spellchecker") {
"//chrome/browser/spellchecker/spellcheck_factory.h",
"//chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc",
"//chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h",
"//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.cc",
"//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.h",
"//chrome/browser/spellchecker/spellcheck_language_policy_handler.cc",
"//chrome/browser/spellchecker/spellcheck_language_policy_handler.h",
"//chrome/browser/spellchecker/spellcheck_service.cc",
"//chrome/browser/spellchecker/spellcheck_service.h",
]
if (!is_mac) {
sources += [
"//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.cc",
"//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.h",
"//chrome/browser/spellchecker/spellcheck_language_policy_handler.cc",
"//chrome/browser/spellchecker/spellcheck_language_policy_handler.h",
]
}
if (has_spellcheck_panel) {
sources += [
"//chrome/browser/spellchecker/spell_check_panel_host_impl.cc",

View File

@@ -66,9 +66,9 @@ async function createWindow (backgroundColor?: string) {
mainWindow = new BrowserWindow(options);
mainWindow.on('ready-to-show', () => mainWindow!.show());
mainWindow.webContents.on('new-window', (event, url) => {
event.preventDefault();
shell.openExternal(decorateURL(url));
mainWindow.webContents.setWindowOpenHandler(details => {
shell.openExternal(decorateURL(details.url));
return { action: 'deny' };
});
mainWindow.webContents.session.setPermissionRequestHandler((webContents, permission, done) => {

View File

@@ -83,7 +83,7 @@ function loadApplicationPackage (packagePath: string) {
});
try {
// Override app name and version.
// Override app's package.json data.
packagePath = path.resolve(packagePath);
const packageJsonPath = path.join(packagePath, 'package.json');
let appPath;
@@ -104,6 +104,16 @@ function loadApplicationPackage (packagePath: string) {
} else if (packageJson.name) {
app.name = packageJson.name;
}
if (packageJson.desktopName) {
app.setDesktopName(packageJson.desktopName);
} else {
app.setDesktopName(`${app.name}.desktop`);
}
// Set v8 flags, deliberately lazy load so that apps that do not use this
// feature do not pay the price
if (packageJson.v8Flags) {
require('v8').setFlagsFromString(packageJson.v8Flags);
}
appPath = packagePath;
}

View File

@@ -64,15 +64,12 @@ an issue:
* [Automated Testing](tutorial/automated-testing.md)
* [REPL](tutorial/repl.md)
* [Distribution](tutorial/application-distribution.md)
* [Supported Platforms](tutorial/support.md#supported-platforms)
* [Code Signing](tutorial/code-signing.md)
* [Mac App Store](tutorial/mac-app-store-submission-guide.md)
* [Windows Store](tutorial/windows-store-guide.md)
* [Snapcraft](tutorial/snapcraft.md)
* [ASAR Archives](tutorial/asar-archives.md)
* [Updates](tutorial/updates.md)
* [Deploying an Update Server](tutorial/updates.md#deploying-an-update-server)
* [Implementing Updates in Your App](tutorial/updates.md#implementing-updates-in-your-app)
* [Applying Updates](tutorial/updates.md#applying-updates)
* [Getting Support](tutorial/support.md)
## Detailed Tutorials
@@ -86,7 +83,6 @@ These individual tutorials expand on topics discussed in the guide above.
* Electron Releases & Developer Feedback
* [Versioning Policy](tutorial/electron-versioning.md)
* [Release Timelines](tutorial/electron-timelines.md)
* [Testing Widevine CDM](tutorial/testing-widevine-cdm.md)
---

View File

@@ -130,6 +130,11 @@ set `NSPrincipalClass` to `AtomApplication`.
You should call `event.preventDefault()` if you want to handle this event.
As with the `open-file` event, be sure to register a listener for the `open-url`
event early in your application startup to detect if the the application being
is being opened to handle a URL. If you register the listener in response to a
`ready` event, you'll miss URLs that trigger the launch of your application.
### Event: 'activate' _macOS_
Returns:
@@ -484,7 +489,6 @@ Returns:
* `argv` string[] - An array of the second instance's command line arguments
* `workingDirectory` string - The second instance's working directory
* `additionalData` unknown - A JSON object of additional data passed from the second instance
* `ackCallback` unknown - A function that can be used to send data back to the second instance
This event will be emitted inside the primary instance of your application
when a second instance has been executed and calls `app.requestSingleInstanceLock()`.
@@ -496,35 +500,12 @@ non-minimized.
**Note:** If the second instance is started by a different user than the first, the `argv` array will not include the arguments.
**Note:** `ackCallback` allows the user to send data back to the
second instance during the `app.requestSingleInstanceLock()` flow.
This callback can be used for cases where the second instance
needs to obtain additional information from the first instance
before quitting.
Currently, the limit on the message size is kMaxMessageLength,
or around 32kB. To be safe, keep the amount of data passed to 31kB at most.
In order to call the callback, `event.preventDefault()` must be called, first.
If the callback is not called in either case, `null` will be sent back.
If `event.preventDefault()` is not called, but `ackCallback` is called
by the user in the event, then the behaviour is undefined.
This event is guaranteed to be emitted after the `ready` event of `app`
gets emitted.
**Note:** Extra command line arguments might be added by Chromium,
such as `--original-process-start-time`.
### Event: 'first-instance-ack'
Returns:
* `event` Event
* `additionalData` unknown - A JSON object of additional data passed from the first instance, in response to the first instance's `second-instance` event.
This event will be emitted within the second instance during the call to `app.requestSingleInstanceLock()`, when the first instance calls the `ackCallback` provided by the `second-instance` event handler.
## Methods
The `app` object has the following methods:
@@ -606,6 +587,10 @@ You should seek to use the `steal` option as sparingly as possible.
Hides all application windows without minimizing them.
### `app.isHidden()` _macOS_
Returns `boolean` - `true` if the application—including all of its windows—is hidden (e.g. with `Command-H`), `false` otherwise.
### `app.show()` _macOS_
Shows application windows after they were hidden. Does not automatically focus
@@ -631,9 +616,18 @@ Returns `string` - The current application directory.
* `%APPDATA%` on Windows
* `$XDG_CONFIG_HOME` or `~/.config` on Linux
* `~/Library/Application Support` on macOS
* `userData` The directory for storing your app's configuration files, which by
default it is the `appData` directory appended with your app's name.
* `cache`
* `userData` The directory for storing your app's configuration files, which
by default is the `appData` directory appended with your app's name. By
convention files storing user data should be written to this directory, and
it is not recommended to write large files here because some environments
may backup this directory to cloud storage.
* `sessionData` The directory for storing data generated by `Session`, such
as localStorage, cookies, disk cache, downloaded dictionaries, network
state, devtools files. By default this points to `userData`. Chromium may
write very large disk cache here, so if your app does not rely on browser
storage like localStorage or cookies to save user data, it is recommended
to set this directory to other locations to avoid polluting the `userData`
directory.
* `temp` Temporary directory.
* `exe` The current executable file.
* `module` The `libchromiumcontent` library.
@@ -683,9 +677,9 @@ In that case, the directory should be created with `fs.mkdirSync` or similar.
You can only override paths of a `name` defined in `app.getPath`.
By default, web pages' cookies and caches will be stored under the `userData`
By default, web pages' cookies and caches will be stored under the `sessionData`
directory. If you want to change this location, you have to override the
`userData` path before the `ready` event of the `app` module is emitted.
`sessionData` path before the `ready` event of the `app` module is emitted.
### `app.getVersion()`
@@ -714,14 +708,14 @@ Overrides the current application's name.
### `app.getLocale()`
Returns `string` - The current application locale, fetched using Chromium's `l10n_util` library.
Possible return values are documented [here](https://source.chromium.org/chromium/chromium/src/+/master:ui/base/l10n/l10n_util.cc).
Possible return values are documented [here](https://source.chromium.org/chromium/chromium/src/+/main:ui/base/l10n/l10n_util.cc).
To set the locale, you'll want to use a command line switch at app startup, which may be found [here](command-line-switches.md).
**Note:** When distributing your packaged app, you have to also ship the
`locales` folder.
**Note:** On Windows, you have to call it after the `ready` events gets emitted.
**Note:** This API must be called after the `ready` event is emitted.
### `app.getLocaleCountryCode()`
@@ -729,6 +723,12 @@ Returns `string` - User operating system's locale two-letter [ISO 3166](https://
**Note:** When unable to detect locale country code, it returns empty string.
### `app.getSystemLocale()`
Returns `string` - The current system locale. On Windows and Linux, it is fetched using Chromium's `i18n` library. On macOS, the `NSLocale` object is used instead.
**Note:** This API must be called after the `ready` event is emitted.
### `app.addRecentDocument(path)` _macOS_ _Windows_
* `path` string
@@ -861,6 +861,8 @@ Returns `Object`:
* `categories` [JumpListCategory[]](structures/jump-list-category.md) | `null` - Array of `JumpListCategory` objects.
Returns `string`
Sets or removes a custom Jump List for the application, and returns one of the
following strings:
@@ -983,13 +985,6 @@ starts:
const { app } = require('electron')
let myWindow = null
app.on('first-instance-ack', (event, additionalData) => {
// Print out the ack received from the first instance.
// Note this event handler must come before the requestSingleInstanceLock call.
// Expected output: '{"myAckKey":"myAckValue"}'
console.log(JSON.stringify(additionalData))
})
const additionalData = { myKey: 'myValue' }
const gotTheLock = app.requestSingleInstanceLock(additionalData)
@@ -997,19 +992,14 @@ if (!gotTheLock) {
app.quit()
} else {
app.on('second-instance', (event, commandLine, workingDirectory, additionalData) => {
// We must call preventDefault if we're sending back data.
event.preventDefault()
// Print out data received from the second instance.
// Expected output: '{"myKey":"myValue"}'
console.log(JSON.stringify(additionalData))
console.log(additionalData)
// Someone tried to run a second instance, we should focus our window.
if (myWindow) {
if (myWindow.isMinimized()) myWindow.restore()
myWindow.focus()
}
const ackData = { myAckKey: 'myAckValue' }
ackCallback(ackData)
})
// Create myWindow, load the rest of the app, etc...
@@ -1093,7 +1083,7 @@ Activation policy types:
Imports the certificate in pkcs12 format into the platform certificate store.
`callback` is called with the `result` of import operation, a value of `0`
indicates success while any other value indicates failure according to Chromium [net_error_list](https://source.chromium.org/chromium/chromium/src/+/master:net/base/net_error_list.h).
indicates success while any other value indicates failure according to Chromium [net_error_list](https://source.chromium.org/chromium/chromium/src/+/main:net/base/net_error_list.h).
### `app.configureHostResolver(options)`
@@ -1402,7 +1392,7 @@ method returns false. If we fail to perform the copy, then this method will
throw an error. The message in the error should be informative and tell
you exactly what went wrong.
By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the pre-existing running app will assume focus and the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing.
By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the preexisting running app will assume focus and the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing.
For example:

View File

@@ -11,6 +11,9 @@ relative to its owning window. It is meant to be an alternative to the
Process: [Main](../glossary.md#main-process)
This module cannot be used until the `ready` event of the `app`
module is emitted.
### Example
```javascript
@@ -70,5 +73,31 @@ The `bounds` of this BrowserView instance as `Object`.
#### `view.setBackgroundColor(color)` _Experimental_
* `color` string - Color in `#aarrggbb` or `#argb` form. The alpha channel is
optional.
* `color` string - Color in Hex, RGB, ARGB, HSL, HSLA or named CSS color format. The alpha channel is
optional for the hex type.
Examples of valid `color` values:
* Hex
* #fff (RGB)
* #ffff (ARGB)
* #ffffff (RRGGBB)
* #ffffffff (AARRGGBB)
* RGB
* rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\)
* e.g. rgb(255, 255, 255)
* RGBA
* rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\)
* e.g. rgba(255, 255, 255, 1.0)
* HSL
* hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\)
* e.g. hsl(200, 20%, 50%)
* HSLA
* hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)
* e.g. hsla(200, 20%, 50%, 0.5)
* Color name
* Options are listed in [SkParseColor.cpp](https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/src/utils/SkParseColor.cpp;l=11-152;drc=eea4bf52cb0d55e2a39c828b017c80a5ee054148)
* Similar to CSS Color Module Level 3 keywords, but case-sensitive.
* e.g. `blueviolet` or `red`
**Note:** Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBA` or `RGA`.

View File

@@ -4,6 +4,9 @@
Process: [Main](../glossary.md#main-process)
This module cannot be used until the `ready` event of the `app`
module is emitted.
```javascript
// In the main process.
const { BrowserWindow } = require('electron')
@@ -64,7 +67,19 @@ win.loadURL('https://github.com')
```
Note that even for apps that use `ready-to-show` event, it is still recommended
to set `backgroundColor` to make app feel more native.
to set `backgroundColor` to make the app feel more native.
Some examples of valid `backgroundColor` values include:
```js
const win = new BrowserWindow()
win.setBackgroundColor('hsl(230, 100%, 50%)')
win.setBackgroundColor('rgb(255, 145, 145)')
win.setBackgroundColor('#ff00a3')
win.setBackgroundColor('blueviolet')
```
For more information about these color types see valid options in [win.setBackgroundColor](browser-window.md#winsetbackgroundcolorbackgroundcolor).
## Parent and child windows
@@ -146,20 +161,20 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `useContentSize` boolean (optional) - The `width` and `height` would be used as web
page's size, which means the actual window's size will include window
frame's size and be slightly larger. Default is `false`.
* `center` boolean (optional) - Show window in the center of the screen.
* `center` boolean (optional) - Show window in the center of the screen. Default is `false`.
* `minWidth` Integer (optional) - Window's minimum width. Default is `0`.
* `minHeight` Integer (optional) - Window's minimum height. Default is `0`.
* `maxWidth` Integer (optional) - Window's maximum width. Default is no limit.
* `maxHeight` Integer (optional) - Window's maximum height. Default is no limit.
* `resizable` boolean (optional) - Whether window is resizable. Default is `true`.
* `movable` boolean (optional) - Whether window is movable. This is not implemented
on Linux. Default is `true`.
* `minimizable` boolean (optional) - Whether window is minimizable. This is not
implemented on Linux. Default is `true`.
* `maximizable` boolean (optional) - Whether window is maximizable. This is not
implemented on Linux. Default is `true`.
* `closable` boolean (optional) - Whether window is closable. This is not implemented
on Linux. Default is `true`.
* `movable` boolean (optional) _macOS_ _Windows_ - Whether window is
movable. This is not implemented on Linux. Default is `true`.
* `minimizable` boolean (optional) _macOS_ _Windows_ - Whether window is
minimizable. This is not implemented on Linux. Default is `true`.
* `maximizable` boolean (optional) _macOS_ _Windows_ - Whether window is
maximizable. This is not implemented on Linux. Default is `true`.
* `closable` boolean (optional) _macOS_ _Windows_ - Whether window is
closable. This is not implemented on Linux. Default is `true`.
* `focusable` boolean (optional) - Whether the window can be focused. Default is
`true`. On Windows setting `focusable: false` also implies setting
`skipTaskbar: true`. On Linux setting `focusable: false` makes the window
@@ -173,9 +188,10 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `fullscreenable` boolean (optional) - Whether the window can be put into fullscreen
mode. On macOS, also whether the maximize/zoom button should toggle full
screen mode or maximize window. Default is `true`.
* `simpleFullscreen` boolean (optional) - Use pre-Lion fullscreen on macOS. Default is `false`.
* `skipTaskbar` boolean (optional) - Whether to show the window in taskbar. Default is
`false`.
* `simpleFullscreen` boolean (optional) _macOS_ - Use pre-Lion fullscreen on
macOS. Default is `false`.
* `skipTaskbar` boolean (optional) _macOS_ _Windows_ - Whether to show the window in taskbar.
Default is `false`.
* `kiosk` boolean (optional) - Whether the window is in kiosk mode. Default is `false`.
* `title` string (optional) - Default window title. Default is `"Electron"`. If the HTML tag `<title>` is defined in the HTML file loaded by `loadURL()`, this property will be ignored.
* `icon` ([NativeImage](native-image.md) | string) (optional) - The window icon. On Windows it is
@@ -189,29 +205,30 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `parent` BrowserWindow (optional) - Specify parent window. Default is `null`.
* `modal` boolean (optional) - Whether this is a modal window. This only works when the
window is a child window. Default is `false`.
* `acceptFirstMouse` boolean (optional) - Whether clicking an inactive window will also
click through to the web contents. Default is `false` on macOS. This option is not
configurable on other platforms.
* `acceptFirstMouse` boolean (optional) _macOS_ - Whether clicking an
inactive window will also click through to the web contents. Default is
`false` on macOS. This option is not configurable on other platforms.
* `disableAutoHideCursor` boolean (optional) - Whether to hide cursor when typing.
Default is `false`.
* `autoHideMenuBar` boolean (optional) - Auto hide the menu bar unless the `Alt`
key is pressed. Default is `false`.
* `enableLargerThanScreen` boolean (optional) - Enable the window to be resized larger
than screen. Only relevant for macOS, as other OSes allow
larger-than-screen windows by default. Default is `false`.
* `backgroundColor` string (optional) - Window's background color as a hexadecimal value,
like `#66CD00` or `#FFF` or `#80FFFFFF` (alpha in #AARRGGBB format is supported if
`transparent` is set to `true`). Default is `#FFF` (white).
* `enableLargerThanScreen` boolean (optional) _macOS_ - Enable the window to
be resized larger than screen. Only relevant for macOS, as other OSes
allow larger-than-screen windows by default. Default is `false`.
* `backgroundColor` string (optional) - The window's background color in Hex, RGB, RGBA, HSL, HSLA or named CSS color format. Alpha in #AARRGGBB format is supported if `transparent` is set to `true`. Default is `#FFF` (white). See [win.setBackgroundColor](browser-window.md#winsetbackgroundcolorbackgroundcolor) for more information.
* `hasShadow` boolean (optional) - Whether window should have a shadow. Default is `true`.
* `opacity` number (optional) - Set the initial opacity of the window, between 0.0 (fully
transparent) and 1.0 (fully opaque). This is only implemented on Windows and macOS.
* `opacity` number (optional) _macOS_ _Windows_ - Set the initial opacity of
the window, between 0.0 (fully transparent) and 1.0 (fully opaque). This
is only implemented on Windows and macOS.
* `darkTheme` boolean (optional) - Forces using dark theme for the window, only works on
some GTK+3 desktop environments. Default is `false`.
* `transparent` boolean (optional) - Makes the window [transparent](../tutorial/window-customization.md#create-transparent-windows).
Default is `false`. On Windows, does not work unless the window is frameless.
* `type` string (optional) - The type of window, default is normal window. See more about
this below.
* `visualEffectState` string (optional) - Specify how the material appearance should reflect window activity state on macOS. Must be used with the `vibrancy` property. Possible values are:
* `visualEffectState` string (optional) _macOS_ - Specify how the material
appearance should reflect window activity state on macOS. Must be used
with the `vibrancy` property. Possible values are:
* `followWindow` - The backdrop should automatically appear active when the window is active, and inactive when it is not. This is the default.
* `active` - The backdrop should always appear active.
* `inactive` - The backdrop should always appear inactive.
@@ -219,36 +236,42 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
Default is `default`. Possible values are:
* `default` - Results in the standard title bar for macOS or Windows respectively.
* `hidden` - Results in a hidden title bar and a full size content window. On macOS, the window still has the standard window controls (“traffic lights”) in the top left. On Windows, when combined with `titleBarOverlay: true` it will activate the Window Controls Overlay (see `titleBarOverlay` for more information), otherwise no window controls will be shown.
* `hiddenInset` - Only on macOS, results in a hidden title bar with an alternative look
where the traffic light buttons are slightly more inset from the window edge.
* `customButtonsOnHover` - Only on macOS, results in a hidden title bar and a full size
content window, the traffic light buttons will display when being hovered
over in the top left of the window. **Note:** This option is currently
experimental.
* `trafficLightPosition` [Point](structures/point.md) (optional) - Set a
custom position for the traffic light buttons in frameless windows.
* `roundedCorners` boolean (optional) - Whether frameless window should have
rounded corners on macOS. Default is `true`.
* `fullscreenWindowTitle` boolean (optional) _Deprecated_ - Shows the title in
the title bar in full screen mode on macOS for `hiddenInset` titleBarStyle.
Default is `false`.
* `hiddenInset` _macOS_ - Only on macOS, results in a hidden title bar
with an alternative look where the traffic light buttons are slightly
more inset from the window edge.
* `customButtonsOnHover` _macOS_ - Only on macOS, results in a hidden
title bar and a full size content window, the traffic light buttons will
display when being hovered over in the top left of the window.
**Note:** This option is currently experimental.
* `trafficLightPosition` [Point](structures/point.md) (optional) _macOS_ -
Set a custom position for the traffic light buttons in frameless windows.
* `roundedCorners` boolean (optional) _macOS_ - Whether frameless window
should have rounded corners on macOS. Default is `true`. Setting this property
to `false` will prevent the window from being fullscreenable.
* `fullscreenWindowTitle` boolean (optional) _macOS_ _Deprecated_ - Shows
the title in the title bar in full screen mode on macOS for `hiddenInset`
titleBarStyle. Default is `false`.
* `thickFrame` boolean (optional) - Use `WS_THICKFRAME` style for frameless windows on
Windows, which adds standard window frame. Setting it to `false` will remove
window shadow and window animations. Default is `true`.
* `vibrancy` string (optional) - Add a type of vibrancy effect to the window, only on
macOS. Can be `appearance-based`, `light`, `dark`, `titlebar`, `selection`,
`menu`, `popover`, `sidebar`, `medium-light`, `ultra-dark`, `header`, `sheet`, `window`, `hud`, `fullscreen-ui`, `tooltip`, `content`, `under-window`, or `under-page`. Please note that `appearance-based`, `light`, `dark`, `medium-light`, and `ultra-dark` are deprecated and have been removed in macOS Catalina (10.15).
* `zoomToPageWidth` boolean (optional) - Controls the behavior on macOS when
option-clicking the green stoplight button on the toolbar or by clicking the
Window > Zoom menu item. If `true`, the window will grow to the preferred
width of the web page when zoomed, `false` will cause it to zoom to the
width of the screen. This will also affect the behavior when calling
`maximize()` directly. Default is `false`.
* `tabbingIdentifier` string (optional) - Tab group name, allows opening the
window as a native tab on macOS 10.12+. Windows with the same tabbing
identifier will be grouped together. This also adds a native new tab button
to your window's tab bar and allows your `app` and window to receive the
`new-window-for-tab` event.
* `vibrancy` string (optional) _macOS_ - Add a type of vibrancy effect to
the window, only on macOS. Can be `appearance-based`, `light`, `dark`,
`titlebar`, `selection`, `menu`, `popover`, `sidebar`, `medium-light`,
`ultra-dark`, `header`, `sheet`, `window`, `hud`, `fullscreen-ui`,
`tooltip`, `content`, `under-window`, or `under-page`. Please note that
`appearance-based`, `light`, `dark`, `medium-light`, and `ultra-dark` are
deprecated and have been removed in macOS Catalina (10.15).
* `zoomToPageWidth` boolean (optional) _macOS_ - Controls the behavior on
macOS when option-clicking the green stoplight button on the toolbar or by
clicking the Window > Zoom menu item. If `true`, the window will grow to
the preferred width of the web page when zoomed, `false` will cause it to
zoom to the width of the screen. This will also affect the behavior when
calling `maximize()` directly. Default is `false`.
* `tabbingIdentifier` string (optional) _macOS_ - Tab group name, allows
opening the window as a native tab on macOS 10.12+. Windows with the same
tabbing identifier will be grouped together. This also adds a native new
tab button to your window's tab bar and allows your `app` and window to
receive the `new-window-for-tab` event.
* `webPreferences` Object (optional) - Settings of web page's features.
* `devTools` boolean (optional) - Whether to enable DevTools. If it is set to `false`, can not use `BrowserWindow.webContents.openDevTools()` to open DevTools. Default is `true`.
* `nodeIntegration` boolean (optional) - Whether node integration is enabled.
@@ -300,8 +323,8 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `plugins` boolean (optional) - Whether plugins should be enabled. Default is `false`.
* `experimentalFeatures` boolean (optional) - Enables Chromium's experimental features.
Default is `false`.
* `scrollBounce` boolean (optional) - Enables scroll bounce (rubber banding) effect on
macOS. Default is `false`.
* `scrollBounce` boolean (optional) _macOS_ - Enables scroll bounce
(rubber banding) effect on macOS. Default is `false`.
* `enableBlinkFeatures` string (optional) - A list of feature strings separated by `,`, like
`CSSVariables,KeyboardEventKey` to enable. The full list of supported feature
strings can be found in the [RuntimeEnabledFeatures.json5][runtime-enabled-features]
@@ -403,13 +426,17 @@ Possible values are:
* On Linux, possible types are `desktop`, `dock`, `toolbar`, `splash`,
`notification`.
* On macOS, possible types are `desktop`, `textured`.
* On macOS, possible types are `desktop`, `textured`, `panel`.
* The `textured` type adds metal gradient appearance
(`NSTexturedBackgroundWindowMask`).
(`NSWindowStyleMaskTexturedBackground`).
* The `desktop` type places the window at the desktop background window level
(`kCGDesktopWindowLevel - 1`). Note that desktop window will not receive
focus, keyboard or mouse events, but you can use `globalShortcut` to receive
input sparingly.
* The `panel` type enables the window to float on top of full-screened apps
by adding the `NSWindowStyleMaskNonactivatingPanel` style mask,normally
reserved for NSPanel, at runtime. Also, the window will appear on all
spaces (desktops).
* On Windows, possible type is `toolbar`.
### Instance Events
@@ -454,7 +481,7 @@ window.onbeforeunload = (e) => {
// a non-void value will silently cancel the close.
// It is recommended to use the dialog API to let the user confirm closing the
// application.
e.returnValue = false // equivalent to `return false` but not recommended
e.returnValue = false
}
```
@@ -764,7 +791,7 @@ A `boolean` property that determines whether the window is in fullscreen mode.
A `boolean` property that determines whether the window is focusable.
#### `win.visibleOnAllWorkspaces`
#### `win.visibleOnAllWorkspaces` _macOS_ _Linux_
A `boolean` property that determines whether the window is visible on all workspaces.
@@ -801,13 +828,13 @@ A `string` property that determines the title of the native window.
**Note:** The title of the web page can be different from the title of the native window.
#### `win.minimizable`
#### `win.minimizable` _macOS_ _Windows_
A `boolean` property that determines whether the window can be manually minimized by user.
On Linux the setter is a no-op, although the getter returns `true`.
#### `win.maximizable`
#### `win.maximizable` _macOS_ _Windows_
A `boolean` property that determines whether the window can be manually maximized by user.
@@ -822,13 +849,13 @@ maximizes the window.
A `boolean` property that determines whether the window can be manually resized by user.
#### `win.closable`
#### `win.closable` _macOS_ _Windows_
A `boolean` property that determines whether the window can be manually closed by user.
On Linux the setter is a no-op, although the getter returns `true`.
#### `win.movable`
#### `win.movable` _macOS_ _Windows_
A `boolean` property that determines Whether the window can be moved by user.
@@ -992,12 +1019,33 @@ APIs like `win.setSize`.
#### `win.setBackgroundColor(backgroundColor)`
* `backgroundColor` string - Window's background color as a hexadecimal value,
like `#66CD00` or `#FFF` or `#80FFFFFF` (alpha is supported if `transparent`
is `true`). Default is `#FFF` (white).
* `backgroundColor` string - Color in Hex, RGB, RGBA, HSL, HSLA or named CSS color format. The alpha channel is optional for the hex type.
Sets the background color of the window. See [Setting
`backgroundColor`](#setting-the-backgroundcolor-property).
Examples of valid `backgroundColor` values:
* Hex
* #fff (shorthand RGB)
* #ffff (shorthand ARGB)
* #ffffff (RGB)
* #ffffffff (ARGB)
* RGB
* rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\)
* e.g. rgb(255, 255, 255)
* RGBA
* rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\)
* e.g. rgba(255, 255, 255, 1.0)
* HSL
* hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\)
* e.g. hsl(200, 20%, 50%)
* HSLA
* hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)
* e.g. hsla(200, 20%, 50%, 0.5)
* Color name
* Options are listed in [SkParseColor.cpp](https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/src/utils/SkParseColor.cpp;l=11-152;drc=eea4bf52cb0d55e2a39c828b017c80a5ee054148)
* Similar to CSS Color Module Level 3 keywords, but case-sensitive.
* e.g. `blueviolet` or `red`
Sets the background color of the window. See [Setting `backgroundColor`](#setting-the-backgroundcolor-property).
#### `win.previewFile(path[, displayName])` _macOS_
@@ -1041,8 +1089,11 @@ Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window as `
#### `win.getBackgroundColor()`
Returns `string` - Gets the background color of the window. See [Setting
`backgroundColor`](#setting-the-backgroundcolor-property).
Returns `string` - Gets the background color of the window in Hex (`#RRGGBB`) format.
See [Setting `backgroundColor`](#setting-the-backgroundcolor-property).
**Note:** The alpha value is _not_ returned alongside the red, green, and blue values.
#### `win.setContentBounds(bounds[, animate])`
@@ -1273,7 +1324,7 @@ win.setSheetOffset(toolbarRect.height)
Starts or stops flashing the window to attract user's attention.
#### `win.setSkipTaskbar(skip)`
#### `win.setSkipTaskbar(skip)` _macOS_ _Windows_
* `skip` boolean
@@ -1601,7 +1652,7 @@ Changes window icon.
Sets whether the window traffic light buttons should be visible.
#### `win.setAutoHideMenuBar(hide)`
#### `win.setAutoHideMenuBar(hide)` _Windows_ _Linux_
* `hide` boolean
@@ -1610,7 +1661,7 @@ menu bar will only show when users press the single `Alt` key.
If the menu bar is already visible, calling `setAutoHideMenuBar(true)` won't hide it immediately.
#### `win.isMenuBarAutoHide()`
#### `win.isMenuBarAutoHide()` _Windows_ _Linux_
Returns `boolean` - Whether menu bar automatically hides itself.
@@ -1620,11 +1671,11 @@ Returns `boolean` - Whether menu bar automatically hides itself.
Sets whether the menu bar should be visible. If the menu bar is auto-hide, users can still bring up the menu bar by pressing the single `Alt` key.
#### `win.isMenuBarVisible()`
#### `win.isMenuBarVisible()` _Windows_ _Linux_
Returns `boolean` - Whether the menu bar is visible.
#### `win.setVisibleOnAllWorkspaces(visible[, options])`
#### `win.setVisibleOnAllWorkspaces(visible[, options])` _macOS_ _Linux_
* `visible` boolean
* `options` Object (optional)
@@ -1642,7 +1693,7 @@ Sets whether the window should be visible on all workspaces.
**Note:** This API does nothing on Windows.
#### `win.isVisibleOnAllWorkspaces()`
#### `win.isVisibleOnAllWorkspaces()` _macOS_ _Linux_
Returns `boolean` - Whether the window is visible on all workspaces.
@@ -1808,6 +1859,16 @@ with `addBrowserView` or `setBrowserView`.
**Note:** The BrowserView API is currently experimental and may change or be
removed in future Electron releases.
#### `win.setTitleBarOverlay(options)` _Windows_
* `options` Object
* `color` String (optional) _Windows_ - The CSS color of the Window Controls Overlay when enabled.
* `symbolColor` String (optional) _Windows_ - The CSS color of the symbols on the Window Controls Overlay when enabled.
* `height` Integer (optional) _Windows_ - The height of the title bar and Window Controls Overlay in pixels.
On a Window with Window Controls Overlay already enabled, this method updates
the style of the title bar overlay.
[runtime-enabled-features]: https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/runtime_enabled_features.json5?l=70
[page-visibility-api]: https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
[quick-look]: https://en.wikipedia.org/wiki/Quick_Look

View File

@@ -185,7 +185,7 @@ the first write will throw an error. If the passed value is not a `string`, its
Certain headers are restricted from being set by apps. These headers are
listed below. More information on restricted headers can be found in
[Chromium's header utils](https://source.chromium.org/chromium/chromium/src/+/master:services/network/public/cpp/header_util.cc;drc=1562cab3f1eda927938f8f4a5a91991fefde66d3;bpv=1;bpt=1;l=22).
[Chromium's header utils](https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/cpp/header_util.cc;drc=1562cab3f1eda927938f8f4a5a91991fefde66d3;bpv=1;bpt=1;l=22).
* `Content-Length`
* `Host`

View File

@@ -274,8 +274,8 @@ By default inspector websocket url is available in stderr and under /json/list e
[ready]: app.md#event-ready
[play-silent-audio]: https://github.com/atom/atom/pull/9485/files
[debugging-main-process]: ../tutorial/debugging-main-process.md
[logging]: https://source.chromium.org/chromium/chromium/src/+/master:base/logging.h
[logging]: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h
[node-cli]: https://nodejs.org/api/cli.html
[play-silent-audio]: https://github.com/atom/atom/pull/9485/files
[ready]: app.md#event-ready
[severities]: https://source.chromium.org/chromium/chromium/src/+/master:base/logging.h?q=logging::LogSeverity&ss=chromium
[severities]: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h?q=logging::LogSeverity&ss=chromium

View File

@@ -36,7 +36,7 @@ Returns `Promise<string[]>` - resolves with an array of category groups once all
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
categories](https://chromium.googlesource.com/chromium/src/+/master/base/trace_event/builtin_categories.h).
categories](https://chromium.googlesource.com/chromium/src/+/main/base/trace_event/builtin_categories.h).
> **NOTE:** Electron adds a non-default tracing category called `"electron"`.
> This category can be used to capture Electron-specific tracing events.

View File

@@ -35,7 +35,7 @@ page you load in your renderer executes code in this world.
When `contextIsolation` is enabled in your `webPreferences` (this is the default behavior since Electron 12.0.0), your `preload` scripts run in an
"Isolated World". You can read more about context isolation and what it affects in the
[security](../tutorial/security.md#3-enable-context-isolation-for-remote-content) docs.
[security](../tutorial/security.md#3-enable-context-isolation) docs.
## Methods

View File

@@ -139,8 +139,7 @@ green and non-draggable regions will be colored red to aid debugging.
### `ELECTRON_DEBUG_NOTIFICATIONS`
Adds extra logs to [`Notification`](./notification.md) lifecycles on macOS to aid in debugging. Extra logging will be displayed when new Notifications are created or activated. They will also be displayed when common a
tions are taken: a notification is shown, dismissed, its button is clicked, or it is replied to.
Adds extra logs to [`Notification`](./notification.md) lifecycles on macOS to aid in debugging. Extra logging will be displayed when new Notifications are created or activated. They will also be displayed when common actions are taken: a notification is shown, dismissed, its button is clicked, or it is replied to.
Sample output:

View File

@@ -99,6 +99,7 @@ Only `chrome.storage.local` is supported; `chrome.storage.sync` and
The following methods of `chrome.tabs` are supported:
- `chrome.tabs.sendMessage`
- `chrome.tabs.reload`
- `chrome.tabs.executeScript`
- `chrome.tabs.update` (partial support)
- supported properties: `url`, `muted`.

View File

@@ -1,3 +1,10 @@
---
title: "ipcMain"
description: "Communicate asynchronously from the main process to renderer processes."
slug: ipc-main
hide_title: false
---
# ipcMain
> Communicate asynchronously from the main process to renderer processes.
@@ -9,7 +16,9 @@ process, it handles asynchronous and synchronous messages sent from a renderer
process (web page). Messages sent from a renderer will be emitted to this
module.
## Sending Messages
For usage examples, check out the [IPC tutorial].
## Sending messages
It is also possible to send messages from the main process to the renderer
process, see [webContents.send][web-contents-send] for more information.
@@ -21,36 +30,6 @@ process, see [webContents.send][web-contents-send] for more information.
coming from frames that aren't the main frame (e.g. iframes) whereas
`event.sender.send(...)` will always send to the main frame.
An example of sending and handling messages between the render and main
processes:
```javascript
// In main process.
const { ipcMain } = require('electron')
ipcMain.on('asynchronous-message', (event, arg) => {
console.log(arg) // prints "ping"
event.reply('asynchronous-reply', 'pong')
})
ipcMain.on('synchronous-message', (event, arg) => {
console.log(arg) // prints "ping"
event.returnValue = 'pong'
})
```
```javascript
// In renderer process (web page).
// NB. Electron APIs are only accessible from preload, unless contextIsolation is disabled.
// See https://www.electronjs.org/docs/tutorial/process-model#preload-scripts for more details.
const { ipcRenderer } = require('electron')
console.log(ipcRenderer.sendSync('synchronous-message', 'ping')) // prints "pong"
ipcRenderer.on('asynchronous-reply', (event, arg) => {
console.log(arg) // prints "pong"
})
ipcRenderer.send('asynchronous-message', 'ping')
```
## Methods
The `ipcMain` module has the following method to listen for events:
@@ -59,7 +38,7 @@ The `ipcMain` module has the following method to listen for events:
* `channel` string
* `listener` Function
* `event` IpcMainEvent
* `event` [IpcMainEvent][ipc-main-event]
* `...args` any[]
Listens to `channel`, when a new message arrives `listener` would be called with
@@ -69,7 +48,7 @@ Listens to `channel`, when a new message arrives `listener` would be called with
* `channel` string
* `listener` Function
* `event` IpcMainEvent
* `event` [IpcMainEvent][ipc-main-event]
* `...args` any[]
Adds a one time `listener` function for the event. This `listener` is invoked
@@ -93,8 +72,8 @@ Removes listeners of the specified `channel`.
### `ipcMain.handle(channel, listener)`
* `channel` string
* `listener` Function<Promise\<void> | any>
* `event` IpcMainInvokeEvent
* `listener` Function<Promise\<void&#62; | any&#62;
* `event` [IpcMainInvokeEvent][ipc-main-invoke-event]
* `...args` any[]
Adds a handler for an `invoke`able IPC. This handler will be called whenever a
@@ -104,14 +83,14 @@ If `listener` returns a Promise, the eventual result of the promise will be
returned as a reply to the remote caller. Otherwise, the return value of the
listener will be used as the value of the reply.
```js
// Main process
```js title='Main Process'
ipcMain.handle('my-invokable-ipc', async (event, ...args) => {
const result = await somePromise(...args)
return result
})
```
// Renderer process
```js title='Renderer Process'
async () => {
const result = await ipcRenderer.invoke('my-invokable-ipc', arg1, arg2)
// ...
@@ -130,7 +109,7 @@ provided to the renderer process. Please refer to
### `ipcMain.handleOnce(channel, listener)`
* `channel` string
* `listener` Function<Promise\<void> | any>
* `listener` Function<Promise\<void&#62; | any&#62;
* `event` IpcMainInvokeEvent
* `...args` any[]
@@ -146,13 +125,16 @@ Removes any handler for `channel`, if present.
## IpcMainEvent object
The documentation for the `event` object passed to the `callback` can be found
in the [`ipc-main-event`](structures/ipc-main-event.md) structure docs.
in the [`ipc-main-event`][ipc-main-event] structure docs.
## IpcMainInvokeEvent object
The documentation for the `event` object passed to `handle` callbacks can be
found in the [`ipc-main-invoke-event`](structures/ipc-main-invoke-event.md)
found in the [`ipc-main-invoke-event`][ipc-main-invoke-event]
structure docs.
[IPC tutorial]: ../tutorial/ipc.md
[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter
[web-contents-send]: web-contents.md#contentssendchannel-args
[web-contents-send]: ../api/web-contents.md#contentssendchannel-args
[ipc-main-event]:../api/structures/ipc-main-event.md
[ipc-main-invoke-event]:../api/structures/ipc-main-invoke-event.md

View File

@@ -1,3 +1,10 @@
---
title: "ipcRenderer"
description: "Communicate asynchronously from a renderer process to the main process."
slug: ipc-renderer
hide_title: false
---
# ipcRenderer
> Communicate asynchronously from a renderer process to the main process.
@@ -9,7 +16,7 @@ methods so you can send synchronous and asynchronous messages from the render
process (web page) to the main process. You can also receive replies from the
main process.
See [ipcMain](ipc-main.md) for code examples.
See [IPC tutorial](../tutorial/ipc.md) for code examples.
## Methods
@@ -70,7 +77,7 @@ throw an exception.
> them. Attempting to send such objects over IPC will result in an error.
The main process handles it by listening for `channel` with the
[`ipcMain`](ipc-main.md) module.
[`ipcMain`](./ipc-main.md) module.
If you need to transfer a [`MessagePort`][] to the main process, use [`ipcRenderer.postMessage`](#ipcrendererpostmessagechannel-message-transfer).
@@ -89,16 +96,8 @@ Algorithm][SCA], just like [`window.postMessage`][], so prototype chains will no
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
throw an exception.
> **NOTE:** Sending non-standard JavaScript types such as DOM objects or
> special Electron objects will throw an exception.
>
> Since the main process does not have support for DOM objects such as
> `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over
> Electron's IPC to the main process, as the main process would have no way to decode
> them. Attempting to send such objects over IPC will result in an error.
The main process should listen for `channel` with
[`ipcMain.handle()`](ipc-main.md#ipcmainhandlechannel-listener).
[`ipcMain.handle()`](./ipc-main.md#ipcmainhandlechannel-listener).
For example:
@@ -119,16 +118,31 @@ If you need to transfer a [`MessagePort`][] to the main process, use [`ipcRender
If you do not need a response to the message, consider using [`ipcRenderer.send`](#ipcrenderersendchannel-args).
> **Note**
> Sending non-standard JavaScript types such as DOM objects or
> special Electron objects will throw an exception.
>
> Since the main process does not have support for DOM objects such as
> `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over
> Electron's IPC to the main process, as the main process would have no way to decode
> them. Attempting to send such objects over IPC will result in an error.
> **Note**
> If the handler in the main process throws an error,
> the promise returned by `invoke` will reject.
> However, the `Error` object in the renderer process
> will not be the same as the one thrown in the main process.
### `ipcRenderer.sendSync(channel, ...args)`
* `channel` string
* `...args` any[]
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
synchronously. Arguments will be serialized with the [Structured Clone
Algorithm][SCA], just like [`window.postMessage`][], so prototype chains will not be
Algorithm][SCA], just like [`window.postMessage`], so prototype chains will not be
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
throw an exception.
@@ -140,13 +154,13 @@ throw an exception.
> Electron's IPC to the main process, as the main process would have no way to decode
> them. Attempting to send such objects over IPC will result in an error.
The main process handles it by listening for `channel` with [`ipcMain`](ipc-main.md) module,
The main process handles it by listening for `channel` with [`ipcMain`](./ipc-main.md) module,
and replies by setting `event.returnValue`.
> :warning: **WARNING**: Sending a synchronous message will block the whole
> renderer process until the reply is received, so use this method only as a
> last resort. It's much better to use the asynchronous version,
> [`invoke()`](ipc-renderer.md#ipcrendererinvokechannel-args).
> [`invoke()`](./ipc-renderer.md#ipcrendererinvokechannel-args).
### `ipcRenderer.postMessage(channel, message, [transfer])`
@@ -158,7 +172,7 @@ Send a message to the main process, optionally transferring ownership of zero
or more [`MessagePort`][] objects.
The transferred `MessagePort` objects will be available in the main process as
[`MessagePortMain`](message-port-main.md) objects by accessing the `ports`
[`MessagePortMain`](./message-port-main.md) objects by accessing the `ports`
property of the emitted event.
For example:
@@ -197,7 +211,7 @@ the host page instead of the main process.
## Event object
The documentation for the `event` object passed to the `callback` can be found
in the [`ipc-renderer-event`](structures/ipc-renderer-event.md) structure docs.
in the [`ipc-renderer-event`](./structures/ipc-renderer-event.md) structure docs.
[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter
[SCA]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm

View File

@@ -14,7 +14,7 @@ See [`Menu`](menu.md) for examples.
* `menuItem` MenuItem
* `browserWindow` [BrowserWindow](browser-window.md) | undefined - This will not be defined if no window is open.
* `event` [KeyboardEvent](structures/keyboard-event.md)
* `role` string (optional) - Can be `undo`, `redo`, `cut`, `copy`, `paste`, `pasteAndMatchStyle`, `delete`, `selectAll`, `reload`, `forceReload`, `toggleDevTools`, `resetZoom`, `zoomIn`, `zoomOut`, `toggleSpellChecker`, `togglefullscreen`, `window`, `minimize`, `close`, `help`, `about`, `services`, `hide`, `hideOthers`, `unhide`, `quit`, 'showSubstitutions', 'toggleSmartQuotes', 'toggleSmartDashes', 'toggleTextReplacement', `startSpeaking`, `stopSpeaking`, `zoom`, `front`, `appMenu`, `fileMenu`, `editMenu`, `viewMenu`, `shareMenu`, `recentDocuments`, `toggleTabBar`, `selectNextTab`, `selectPreviousTab`, `mergeAllWindows`, `clearRecentDocuments`, `moveTabToNewWindow` or `windowMenu` - Define the action of the menu item, when specified the
* `role` string (optional) - Can be `undo`, `redo`, `cut`, `copy`, `paste`, `pasteAndMatchStyle`, `delete`, `selectAll`, `reload`, `forceReload`, `toggleDevTools`, `resetZoom`, `zoomIn`, `zoomOut`, `toggleSpellChecker`, `togglefullscreen`, `window`, `minimize`, `close`, `help`, `about`, `services`, `hide`, `hideOthers`, `unhide`, `quit`, `showSubstitutions`, `toggleSmartQuotes`, `toggleSmartDashes`, `toggleTextReplacement`, `startSpeaking`, `stopSpeaking`, `zoom`, `front`, `appMenu`, `fileMenu`, `editMenu`, `viewMenu`, `shareMenu`, `recentDocuments`, `toggleTabBar`, `selectNextTab`, `selectPreviousTab`, `mergeAllWindows`, `clearRecentDocuments`, `moveTabToNewWindow` or `windowMenu` - Define the action of the menu item, when specified the
`click` property will be ignored. See [roles](#roles).
* `type` string (optional) - Can be `normal`, `separator`, `submenu`, `checkbox` or
`radio`.

View File

@@ -149,7 +149,7 @@ console.log(image)
* `options` Object
* `width` Integer
* `height` Integer
* `scaleFactor` Double (optional) - Defaults to 1.0.
* `scaleFactor` Number (optional) - Defaults to 1.0.
Returns `NativeImage`
@@ -162,7 +162,7 @@ pixel data returned by `toBitmap()`. The specific format is platform-dependent.
* `options` Object (optional)
* `width` Integer (optional) - Required for bitmap buffers.
* `height` Integer (optional) - Required for bitmap buffers.
* `scaleFactor` Double (optional) - Defaults to 1.0.
* `scaleFactor` Number (optional) - Defaults to 1.0.
Returns `NativeImage`
@@ -225,7 +225,7 @@ The following methods are available on instances of the `NativeImage` class:
#### `image.toPNG([options])`
* `options` Object (optional)
* `scaleFactor` Double (optional) - Defaults to 1.0.
* `scaleFactor` Number (optional) - Defaults to 1.0.
Returns `Buffer` - A [Buffer][buffer] that contains the image's `PNG` encoded data.
@@ -238,7 +238,7 @@ Returns `Buffer` - A [Buffer][buffer] that contains the image's `JPEG` encoded d
#### `image.toBitmap([options])`
* `options` Object (optional)
* `scaleFactor` Double (optional) - Defaults to 1.0.
* `scaleFactor` Number (optional) - Defaults to 1.0.
Returns `Buffer` - A [Buffer][buffer] that contains a copy of the image's raw bitmap pixel
data.
@@ -246,14 +246,14 @@ data.
#### `image.toDataURL([options])`
* `options` Object (optional)
* `scaleFactor` Double (optional) - Defaults to 1.0.
* `scaleFactor` Number (optional) - Defaults to 1.0.
Returns `string` - The data URL of the image.
#### `image.getBitmap([options])`
* `options` Object (optional)
* `scaleFactor` Double (optional) - Defaults to 1.0.
* `scaleFactor` Number (optional) - Defaults to 1.0.
Returns `Buffer` - A [Buffer][buffer] that contains the image's raw bitmap pixel data.
@@ -276,7 +276,7 @@ Returns `boolean` - Whether the image is empty.
#### `image.getSize([scaleFactor])`
* `scaleFactor` Double (optional) - Defaults to 1.0.
* `scaleFactor` Number (optional) - Defaults to 1.0.
Returns [`Size`](structures/size.md).
@@ -317,20 +317,20 @@ will be preserved in the resized image.
#### `image.getAspectRatio([scaleFactor])`
* `scaleFactor` Double (optional) - Defaults to 1.0.
* `scaleFactor` Number (optional) - Defaults to 1.0.
Returns `Float` - The image's aspect ratio.
Returns `Number` - The image's aspect ratio.
If `scaleFactor` is passed, this will return the aspect ratio corresponding to the image representation most closely matching the passed value.
#### `image.getScaleFactors()`
Returns `Float[]` - 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)`
* `options` Object
* `scaleFactor` Double - The scale factor to add the image representation for.
* `scaleFactor` Number (optional) - The scale factor to add the image representation for.
* `width` Integer (optional) - Defaults to 0. Required if a bitmap buffer
is specified as `buffer`.
* `height` Integer (optional) - Defaults to 0. Required if a bitmap buffer

View File

@@ -67,3 +67,8 @@ or is being instructed to show a high-contrast UI.
A `boolean` for if the OS / Chromium currently has an inverted color scheme
or is being instructed to use an inverted color scheme.
### `nativeTheme.inForcedColorsMode` _Windows_ _Readonly_
A `boolean` indicating whether Chromium is in forced colors mode, controlled by system accessibility settings.
Currently, Windows high contrast is the only system setting that triggers forced colors mode.

View File

@@ -178,7 +178,6 @@ Returns an object with V8 heap statistics. Note that all statistics are reported
Returns `Object`:
* `allocated` Integer - Size of all allocated objects in Kilobytes.
* `marked` Integer - Size of all marked objects in Kilobytes.
* `total` Integer - Total allocated space in Kilobytes.
Returns an object with Blink memory information.

View File

@@ -10,11 +10,12 @@ An example of implementing a protocol that has the same effect as the
```javascript
const { app, protocol } = require('electron')
const path = require('path')
const url = require('url')
app.whenReady().then(() => {
protocol.registerFileProtocol('atom', (request, callback) => {
const url = request.url.substr(7)
callback({ path: path.normalize(`${__dirname}/${url}`) })
const filePath = url.fileURLToPath('file://' + request.url.slice('atom://'.length))
callback(filePath)
})
})
```
@@ -175,7 +176,7 @@ property.
* `handler` Function
* `request` [ProtocolRequest](structures/protocol-request.md)
* `callback` Function
* `response` ProtocolResponse
* `response` [ProtocolResponse](structures/protocol-response.md)
Returns `boolean` - Whether the protocol was successfully registered

View File

@@ -0,0 +1,48 @@
# pushNotifications
Process: [Main](../glossary.md#main-process)
> Register for and receive notifications from remote push notification services
For example, when registering for push notifications via Apple push notification services (APNS):
```javascript
const { pushNotifications, Notification } = require('electron')
pushNotifications.registerForAPNSNotifications().then((token) => {
// forward token to your remote notification server
})
pushNotifications.on('received-apns-notification', (event, userInfo) => {
// generate a new Notification object with the relevant userInfo fields
})
```
## Events
The `pushNotification` module emits the following events:
#### Event: 'received-apns-notification' _macOS_
Returns:
* `userInfo` Record<String, any>
Emitted when the app receives a remote notification while running.
See: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc
## Methods
The `pushNotification` module has the following methods:
### `pushNotifications.registerForAPNSNotifications()` _macOS_
Returns `Promise<string>`
Registers the app with Apple Push Notification service (APNS) to receive [Badge, Sound, and Alert](https://developer.apple.com/documentation/appkit/sremotenotificationtype?language=objc) notifications. If registration is successful, the promise will be resolved with the APNS device token. Otherwise, the promise will be rejected with an error message.
See: https://developer.apple.com/documentation/appkit/nsapplication/1428476-registerforremotenotificationtyp?language=objc
### `pushNotifications.unregisterForAPNSNotifications()` _macOS_
Unregisters the app from notifications received from APNS.
See: https://developer.apple.com/documentation/appkit/nsapplication/1428747-unregisterforremotenotifications?language=objc

View File

@@ -18,9 +18,9 @@ The `safeStorage` module has the following methods:
Returns `boolean` - Whether encryption is available.
On Linux, returns true if the secret key is
available. On MacOS, returns true if Keychain is available.
On Windows, returns true with no other preconditions.
On Linux, returns true if the app has emitted the `ready` event and the secret key is available.
On MacOS, returns true if Keychain is available.
On Windows, returns true once the app has emitted the `ready` event.
### `safeStorage.encryptString(plainText)`

View File

@@ -253,9 +253,11 @@ Returns:
* `device` [HIDDevice[]](structures/hid-device.md)
* `frame` [WebFrameMain](web-frame-main.md)
Emitted when a new HID device becomes available. For example, when a new USB device is plugged in.
This event will only be emitted after `navigator.hid.requestDevice` has been called and `select-hid-device` has fired.
Emitted after `navigator.hid.requestDevice` has been called and
`select-hid-device` has fired if a new device becomes available before
the callback from `select-hid-device` is called. This event is intended for
use when using a UI to ask users to pick a device so that the UI can be updated
with the newly added device.
#### Event: 'hid-device-removed'
@@ -266,9 +268,24 @@ Returns:
* `device` [HIDDevice[]](structures/hid-device.md)
* `frame` [WebFrameMain](web-frame-main.md)
Emitted when a HID device has been removed. For example, this event will fire when a USB device is unplugged.
Emitted after `navigator.hid.requestDevice` has been called and
`select-hid-device` has fired if a device has been removed before the callback
from `select-hid-device` is called. This event is intended for use when using
a UI to ask users to pick a device so that the UI can be updated to remove the
specified device.
This event will only be emitted after `navigator.hid.requestDevice` has been called and `select-hid-device` has fired.
#### Event: 'hid-device-revoked'
Returns:
* `event` Event
* `details` Object
* `device` [HIDDevice[]](structures/hid-device.md)
* `origin` string (optional) - The origin that the device has been revoked from.
Emitted after `HIDDevice.forget()` has been called. This event can be used
to help maintain persistent storage of permissions when
`setDevicePermissionHandler` is used.
#### Event: 'select-serial-port'
@@ -348,7 +365,11 @@ Returns:
* `port` [SerialPort](structures/serial-port.md)
* `webContents` [WebContents](web-contents.md)
Emitted after `navigator.serial.requestPort` has been called and `select-serial-port` has fired if a new serial port becomes available. For example, this event will fire when a new USB device is plugged in.
Emitted after `navigator.serial.requestPort` has been called and
`select-serial-port` has fired if a new serial port becomes available before
the callback from `select-serial-port` is called. This event is intended for
use when using a UI to ask users to pick a port so that the UI can be updated
with the newly added port.
#### Event: 'serial-port-removed'
@@ -358,7 +379,11 @@ Returns:
* `port` [SerialPort](structures/serial-port.md)
* `webContents` [WebContents](web-contents.md)
Emitted after `navigator.serial.requestPort` has been called and `select-serial-port` has fired if a serial port has been removed. For example, this event will fire when a USB device is unplugged.
Emitted after `navigator.serial.requestPort` has been called and
`select-serial-port` has fired if a serial port has been removed before the
callback from `select-serial-port` is called. This event is intended for use
when using a UI to ask users to pick a port so that the UI can be updated
to remove the specified port.
### Instance Methods
@@ -567,7 +592,7 @@ the original network configuration.
* `errorCode` Integer - Error code.
* `callback` Function
* `verificationResult` Integer - Value can be one of certificate error codes
from [here](https://source.chromium.org/chromium/chromium/src/+/master:net/base/net_error_list.h).
from [here](https://source.chromium.org/chromium/chromium/src/+/main:net/base/net_error_list.h).
Apart from the certificate error codes, the following special codes can be used.
* `0` - Indicates success and disables Certificate Transparency verification.
* `-2` - Indicates failure.
@@ -610,7 +635,7 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
* `notifications` - Request notification creation and the ability to display them in the user's system tray.
* `midi` - Request MIDI access in the `webmidi` API.
* `midiSysex` - Request the use of system exclusive messages in the `webmidi` API.
* `pointerLock` - Request to directly interpret mouse movements as an input method. Click [here](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API) to know more.
* `pointerLock` - Request to directly interpret mouse movements as an input method. Click [here](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API) to know more. These requests always appear to originate from the main frame.
* `fullscreen` - Request for the app to enter fullscreen mode.
* `openExternal` - Request to open links in external applications.
* `unknown` - An unrecognized permission request
@@ -680,7 +705,6 @@ session.fromPartition('some-partition').setPermissionCheckHandler((webContents,
* `deviceType` string - The type of device that permission is being requested on, can be `hid` or `serial`.
* `origin` string - The origin URL of the device permission check.
* `device` [HIDDevice](structures/hid-device.md) | [SerialPort](structures/serial-port.md)- the device that permission is being requested for.
* `frame` [WebFrameMain](web-frame-main.md) - WebFrameMain checking the device permission.
Sets the handler which can be used to respond to device permission checks for the `session`.
Returning `true` will allow the device to be permitted and `false` will reject it.
@@ -688,8 +712,8 @@ To clear the handler, call `setDevicePermissionHandler(null)`.
This handler can be used to provide default permissioning to devices without first calling for permission
to devices (eg via `navigator.hid.requestDevice`). If this handler is not defined, the default device
permissions as granted through device selection (eg via `navigator.hid.requestDevice`) will be used.
Additionally, the default behavior of Electron is to store granted device permision through the lifetime
of the corresponding WebContents. If longer term storage is needed, a developer can store granted device
Additionally, the default behavior of Electron is to store granted device permision in memory.
If longer term storage is needed, a developer can store granted device
permissions (eg when handling the `select-hid-device` event) and then read from that storage with `setDevicePermissionHandler`.
```javascript
@@ -745,6 +769,71 @@ app.whenReady().then(() => {
})
```
#### `ses.setBluetoothPairingHandler(handler)` _Windows_ _Linux_
* `handler` Function | null
* `details` Object
* `deviceId` string
* `pairingKind` string - The type of pairing prompt being requested.
One of the following values:
* `confirm`
This prompt is requesting confirmation that the Bluetooth device should
be paired.
* `confirmPin`
This prompt is requesting confirmation that the provided PIN matches the
pin displayed on the device.
* `providePin`
This prompt is requesting that a pin be provided for the device.
* `frame` [WebFrameMain](web-frame-main.md)
* `pin` string (optional) - The pin value to verify if `pairingKind` is `confirmPin`.
* `callback` Function
* `response` Object
* `confirmed` boolean - `false` should be passed in if the dialog is canceled.
If the `pairingKind` is `confirm` or `confirmPin`, this value should indicate
if the pairing is confirmed. If the `pairingKind` is `providePin` the value
should be `true` when a value is provided.
* `pin` string | null (optional) - When the `pairingKind` is `providePin`
this value should be the required pin for the Bluetooth device.
Sets a handler to respond to Bluetooth pairing requests. This handler
allows developers to handle devices that require additional validation
before pairing. When a handler is not defined, any pairing on Linux or Windows
that requires additional validation will be automatically cancelled.
macOS does not require a handler because macOS handles the pairing
automatically. To clear the handler, call `setBluetoothPairingHandler(null)`.
```javascript
const { app, BrowserWindow, ipcMain, session } = require('electron')
let bluetoothPinCallback = null
function createWindow () {
const mainWindow = new BrowserWindow({
webPreferences: {
preload: path.join(__dirname, 'preload.js')
}
})
}
// Listen for an IPC message from the renderer to get the response for the Bluetooth pairing.
ipcMain.on('bluetooth-pairing-response', (event, response) => {
bluetoothPinCallback(response)
})
mainWindow.webContents.session.setBluetoothPairingHandler((details, callback) => {
bluetoothPinCallback = callback
// Send a IPC message to the renderer to prompt the user to confirm the pairing.
// Note that this will require logic in the renderer to handle this message and
// display a prompt to the user.
mainWindow.webContents.send('bluetooth-pairing-request', details)
})
app.whenReady().then(() => {
createWindow()
})
```
#### `ses.clearHostResolverCache()`
Returns `Promise<void>` - Resolves when the operation is complete.
@@ -868,6 +957,20 @@ this session just before normal `preload` scripts run.
Returns `string[]` an array of paths to preload scripts that have been
registered.
#### `ses.setCodeCachePath(path)`
* `path` String - Absolute path to store the v8 generated JS code cache from the renderer.
Sets the directory to store the generated JS [code cache](https://v8.dev/blog/code-caching-for-devs) for this session. The directory is not required to be created by the user before this call, the runtime will create if it does not exist otherwise will use the existing directory. If directory cannot be created, then code cache will not be used and all operations related to code cache will fail silently inside the runtime. By default, the directory will be `Code Cache` under the
respective user data folder.
#### `ses.clearCodeCaches(options)`
* `options` Object
* `urls` String[] (optional) - An array of url corresponding to the resource whose generated code cache needs to be removed. If the list is empty then all entries in the cache directory will be removed.
Returns `Promise<void>` - resolves when the code cache clear operation is complete.
#### `ses.setSpellCheckerEnabled(enable)`
* `enable` boolean
@@ -894,7 +997,7 @@ Returns `string[]` - An array of language codes the spellchecker is enabled for.
will fallback to using `en-US`. By default on launch if this setting is an empty list Electron will try to populate this
setting with the current OS locale. This setting is persisted across restarts.
**Note:** On macOS the OS spellchecker is used and has its own list of languages. This API is a no-op on macOS.
**Note:** On macOS the OS spellchecker is used and has its own list of languages. On macOS, this API will return whichever languages have been configured by the OS.
#### `ses.setSpellCheckerDictionaryDownloadURL(url)`
@@ -1011,7 +1114,7 @@ is emitted.
#### `ses.getStoragePath()`
A `string | null` indicating the absolute file system path where data for this
Returns `string | null` - The absolute file system path where data for this
session is persisted on disk. For in memory sessions this returns `null`.
### Instance Properties

View File

@@ -31,4 +31,4 @@
* `uploadData` [ProtocolResponseUploadData](protocol-response-upload-data.md) (optional) - The data used as upload data. This is only
used for URL responses when `method` is `"POST"`.
[net-error]: https://source.chromium.org/chromium/chromium/src/+/master:net/base/net_error_list.h
[net-error]: https://source.chromium.org/chromium/chromium/src/+/main:net/base/net_error_list.h

View File

@@ -8,7 +8,7 @@
* `enable_argument_filter` boolean (optional) - if true, filter event data
according to a specific list of events that have been manually vetted to not
include any PII. See [the implementation in
Chromium][trace_event_args_whitelist.cc] for specifics.
Chromium][trace_event_args_allowlist.cc] for specifics.
* `included_categories` string[] (optional) - a list of tracing categories to
include. Can include glob-like patterns using `*` at the end of the category
name. See [tracing categories][] for the list of categories.
@@ -45,7 +45,7 @@ An example TraceConfig that roughly matches what Chrome DevTools records:
}
```
[tracing categories]: https://chromium.googlesource.com/chromium/src/+/master/base/trace_event/builtin_categories.h
[memory-infra docs]: https://chromium.googlesource.com/chromium/src/+/master/docs/memory-infra/memory_infra_startup_tracing.md#the-advanced-way
[trace_event_args_whitelist.cc]: https://chromium.googlesource.com/chromium/src/+/master/services/tracing/public/cpp/trace_event_args_whitelist.cc
[tracing categories]: https://chromium.googlesource.com/chromium/src/+/main/base/trace_event/builtin_categories.h
[memory-infra docs]: https://chromium.googlesource.com/chromium/src/+/main/docs/memory-infra/memory_infra_startup_tracing.md#the-advanced-way
[trace_event_args_allowlist.cc]: https://chromium.googlesource.com/chromium/src/+/main/services/tracing/public/cpp/trace_event_args_allowlist.cc
[histogram]: https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md

View File

@@ -84,7 +84,7 @@ that contains the user information dictionary sent along with the notification.
### `systemPreferences.subscribeNotification(event, callback)` _macOS_
* `event` string
* `event` string | null
* `callback` Function
* `event` string
* `userInfo` Record<string, unknown>
@@ -109,9 +109,11 @@ example values of `event` are:
* `AppleColorPreferencesChangedNotification`
* `AppleShowScrollBarsSettingChanged`
If `event` is null, the `NSDistributedNotificationCenter` doesnt use it as criteria for delivery to the observer. See [docs](https://developer.apple.com/documentation/foundation/nsnotificationcenter/1411723-addobserverforname?language=objc) for more information.
### `systemPreferences.subscribeLocalNotification(event, callback)` _macOS_
* `event` string
* `event` string | null
* `callback` Function
* `event` string
* `userInfo` Record<string, unknown>
@@ -122,9 +124,11 @@ Returns `number` - The ID of this subscription
Same as `subscribeNotification`, but uses `NSNotificationCenter` for local defaults.
This is necessary for events such as `NSUserDefaultsDidChangeNotification`.
If `event` is null, the `NSNotificationCenter` doesnt use it as criteria for delivery to the observer. See [docs](https://developer.apple.com/documentation/foundation/nsnotificationcenter/1411723-addobserverforname?language=objc) for more information.
### `systemPreferences.subscribeWorkspaceNotification(event, callback)` _macOS_
* `event` string
* `event` string | null
* `callback` Function
* `event` string
* `userInfo` Record<string, unknown>
@@ -135,6 +139,8 @@ Returns `number` - The ID of this subscription
Same as `subscribeNotification`, but uses `NSWorkspace.sharedWorkspace.notificationCenter`.
This is necessary for events such as `NSWorkspaceDidActivateApplicationNotification`.
If `event` is null, the `NSWorkspaceNotificationCenter` doesnt use it as criteria for delivery to the observer. See [docs](https://developer.apple.com/documentation/foundation/nsnotificationcenter/1411723-addobserverforname?language=objc) for more information.
### `systemPreferences.unsubscribeNotification(id)` _macOS_
* `id` Integer
@@ -177,11 +183,11 @@ Some popular `key` and `type`s are:
* `NSPreferredWebServices`: `dictionary`
* `NSUserDictionaryReplacementItems`: `array`
### `systemPreferences.setUserDefault(key, type, value)` _macOS_
### `systemPreferences.setUserDefault<Type extends keyof UserDefaultTypes>(key, type, value)` _macOS_
* `key` string
* `type` string - Can be `string`, `boolean`, `integer`, `float`, `double`, `url`, `array` or `dictionary`.
* `value` string
* `type` Type - Can be `string`, `boolean`, `integer`, `float`, `double`, `url`, `array` or `dictionary`.
* `value` UserDefaultTypes[Type]
Set the value of `key` in `NSUserDefaults`.

View File

@@ -25,15 +25,20 @@ app.whenReady().then(() => {
})
```
__Platform limitations:__
__Platform Considerations__
If you want to keep exact same behaviors on all platforms, you should not
rely on the `click` event; instead, always attach a context menu to the tray icon.
__Linux__
* On Linux the app indicator will be used if it is supported, otherwise
`GtkStatusIcon` will be used instead.
* On Linux distributions that only have app indicator support, you have to
install `libappindicator1` to make the tray icon work.
* The app indicator will be used if it is supported, otherwise
`GtkStatusIcon` will be used instead.
* App indicator will only be shown when it has a context menu.
* When app indicator is used on Linux, the `click` event is ignored.
* On Linux in order for changes made to individual `MenuItem`s to take effect,
* The `click` event is ignored when using the app indicator.
* In order for changes made to individual `MenuItem`s to take effect,
you have to call `setContextMenu` again. For example:
```javascript
@@ -55,10 +60,16 @@ app.whenReady().then(() => {
})
```
* On Windows it is recommended to use `ICO` icons to get best visual effects.
__MacOS__
If you want to keep exact same behaviors on all platforms, you should not
rely on the `click` event and always attach a context menu to the tray icon.
* Icons passed to the Tray constructor should be [Template Images](native-image.md#template-image).
* 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.
* 16x16 (72dpi) and 32x32@2x (144dpi) work well for most icons.
__Windows__
* It is recommended to use `ICO` icons to get best visual effects.
### `new Tray(image, [guid])`

View File

@@ -35,7 +35,7 @@ for all windows, webviews, opened devtools, and devtools extension background pa
### `webContents.getFocusedWebContents()`
Returns `WebContents` - The web contents that is focused in this application, otherwise
Returns `WebContents` | null - The web contents that is focused in this application, otherwise
returns `null`.
### `webContents.fromId(id)`
@@ -45,6 +45,13 @@ returns `null`.
Returns `WebContents` | undefined - A WebContents instance with the given ID, or
`undefined` if there is no WebContents associated with the given ID.
### `webContents.fromFrame(frame)`
* `frame` WebFrameMain
Returns `WebContents` | undefined - A WebContents instance with the given WebFrameMain, or
`undefined` if there is no WebContents associated with the given WebFrameMain.
### `webContents.fromDevToolsTargetId(targetId)`
* `targetId` string - The Chrome DevTools Protocol [TargetID](https://chromedevtools.github.io/devtools-protocol/tot/Target/#type-TargetID) associated with the WebContents instance.
@@ -92,7 +99,7 @@ Returns:
* `frameRoutingId` Integer
This event is like `did-finish-load` but emitted when the load failed.
The full list of error codes and their meaning is available [here](https://source.chromium.org/chromium/chromium/src/+/master:net/base/net_error_list.h).
The full list of error codes and their meaning is available [here](https://source.chromium.org/chromium/chromium/src/+/main:net/base/net_error_list.h).
#### Event: 'did-fail-provisional-load'
@@ -516,6 +523,15 @@ Emitted when the `WebContents` loses focus.
Emitted when the `WebContents` gains focus.
Note that on macOS, having focus means the `WebContents` is the first responder
of window, so switching focus between windows would not trigger the `focus` and
`blur` events of `WebContents`, as the first responder of each window is not
changed.
The `focus` and `blur` events of `WebContents` should only be used to detect
focus change between different `WebContents` and `BrowserView` in the same
window.
#### Event: 'devtools-opened'
Emitted when DevTools is opened.
@@ -811,9 +827,6 @@ This event can be used to configure `webPreferences` for the `webContents`
of a `<webview>` before it's loaded, and provides the ability to set settings
that can't be set via `<webview>` attributes.
**Note:** The specified `preload` script option will appear as `preloadURL`
(not `preload`) in the `webPreferences` object emitted with this event.
#### Event: 'did-attach-webview'
Returns:
@@ -856,6 +869,8 @@ Returns:
Emitted when the renderer process sends an asynchronous message via `ipcRenderer.send()`.
See also [`webContents.ipc`](#contentsipc-readonly), which provides an [`IpcMain`](ipc-main.md)-like interface for responding to IPC messages specifically from this WebContents.
#### Event: 'ipc-message-sync'
Returns:
@@ -866,6 +881,8 @@ Returns:
Emitted when the renderer process sends a synchronous message via `ipcRenderer.sendSync()`.
See also [`webContents.ipc`](#contentsipc-readonly), which provides an [`IpcMain`](ipc-main.md)-like interface for responding to IPC messages specifically from this WebContents.
#### Event: 'preferred-size-changed'
Returns:
@@ -1092,7 +1109,7 @@ Returns `string` - The user agent for this web page.
* `css` string
* `options` Object (optional)
* `cssOrigin` string (optional) - Can be either 'user' or 'author'; Specifying 'user' enables you to prevent websites from overriding the CSS you insert. Default is 'author'.
* `cssOrigin` string (optional) - Can be either 'user' or 'author'. Sets the [cascade origin](https://www.w3.org/TR/css3-cascade/#cascade-origin) of the inserted stylesheet. Default is 'author'.
Returns `Promise<string>` - A promise that resolves with a key for the inserted CSS that can later be used to remove the CSS via `contents.removeInsertedCSS(key)`.
@@ -1422,7 +1439,7 @@ Returns `Promise<PrinterInfo[]>` - Resolves with a [`PrinterInfo[]`](structures/
* `header` string (optional) - string to be printed as page header.
* `footer` string (optional) - string to be printed as page footer.
* `pageSize` string | Size (optional) - Specify page size of the printed document. Can be `A3`,
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height`.
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` and `width`.
* `callback` Function (optional)
* `success` boolean - Indicates success of the print call.
* `failureReason` string - Error description called back if the print fails.
@@ -1453,43 +1470,28 @@ win.webContents.print(options, (success, errorType) => {
#### `contents.printToPDF(options)`
* `options` Object
* `headerFooter` Record<string, string> (optional) - the header and footer for the PDF.
* `title` string - The title for the PDF header.
* `url` string - the url for the PDF footer.
* `landscape` boolean (optional) - `true` for landscape, `false` for portrait.
* `marginsType` Integer (optional) - Specifies the type of margins to use. Uses 0 for
default margin, 1 for no margin, and 2 for minimum margin.
* `scaleFactor` number (optional) - The scale factor of the web page. Can range from 0 to 100.
* `pageRanges` Record<string, number> (optional) - The page range to print.
* `from` number - Index of the first page to print (0-based).
* `to` number - Index of the last page to print (inclusive) (0-based).
* `pageSize` string | Size (optional) - Specify page size of the generated PDF. Can be `A3`,
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` and `width` in microns.
* `printBackground` boolean (optional) - Whether to print CSS backgrounds.
* `printSelectionOnly` boolean (optional) - Whether to print selection only.
* `landscape` boolean (optional) - Paper orientation.`true` for landscape, `false` for portrait. Defaults to false.
* `displayHeaderFooter` boolean (optional) - Whether to display header and footer. Defaults to false.
* `printBackground` boolean (optional) - Whether to print background graphics. Defaults to false.
* `scale` number(optional) - Scale of the webpage rendering. Defaults to 1.
* `pageSize` string | Size (optional) - Specify page size of the generated PDF. Can be `A0`, `A1`, `A2`, `A3`,
`A4`, `A5`, `A6`, `Legal`, `Letter`, `Tabloid`, `Ledger`, or an Object containing `height` and `width` in inches. Defaults to `Letter`.
* `margins` Object (optional)
* `top` number (optional) - Top margin in inches. Defaults to 1cm (~0.4 inches).
* `bottom` number (optional) - Bottom margin in inches. Defaults to 1cm (~0.4 inches).
* `left` number (optional) - Left margin in inches. Defaults to 1cm (~0.4 inches).
* `right` number (optional) - Right margin in inches. Defaults to 1cm (~0.4 inches).
* `pageRanges` string (optional) - Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
* `headerTemplate` string (optional) - HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: `date` (formatted print date), `title` (document title), `url` (document location), `pageNumber` (current page number) and `totalPages` (total pages in the document). For example, `<span class=title></span>` would generate span containing the title.
* `footerTemplate` string (optional) - HTML template for the print footer. Should use the same format as the `headerTemplate`.
* `preferCSSPageSize` boolean (optional) - Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
Returns `Promise<Buffer>` - Resolves with the generated PDF data.
Prints window's web page as PDF with Chromium's preview printing custom
settings.
Prints the window's web page as PDF.
The `landscape` will be ignored if `@page` CSS at-rule is used in the web page.
By default, an empty `options` will be regarded as:
```javascript
{
marginsType: 0,
printBackground: false,
printSelectionOnly: false,
landscape: false,
pageSize: 'A4',
scaleFactor: 100
}
```
Use `page-break-before: always;` CSS style to force to print to a new page.
An example of `webContents.printToPDF`:
```javascript
@@ -1498,7 +1500,7 @@ const fs = require('fs')
const path = require('path')
const os = require('os')
const win = new BrowserWindow({ width: 800, height: 600 })
const win = new BrowserWindow()
win.loadURL('http://github.com')
win.webContents.on('did-finish-load', () => {
@@ -1515,6 +1517,8 @@ win.webContents.on('did-finish-load', () => {
})
```
See [Page.printToPdf](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF) for more information.
#### `contents.addWorkSpace(path)`
* `path` string
@@ -1629,6 +1633,8 @@ Opens the devtools.
When `contents` is a `<webview>` tag, the `mode` would be `detach` by default,
explicitly passing an empty `mode` can force using last used dock state.
On Windows, if Windows Control Overlay is enabled, Devtools will be opened with `mode: 'detach'`.
#### `contents.closeDevTools()`
Closes the devtools.
@@ -1847,7 +1853,7 @@ the cursor when dragging.
#### `contents.savePage(fullPath, saveType)`
* `fullPath` string - The full file path.
* `fullPath` string - The absolute file path.
* `saveType` string - Specify the save type.
* `HTMLOnly` - Save only the HTML of the page.
* `HTMLComplete` - Save complete-html page.
@@ -1992,6 +1998,35 @@ This corresponds to the [animationPolicy][] accessibility feature in Chromium.
### Instance Properties
#### `contents.ipc` _Readonly_
An [`IpcMain`](ipc-main.md) scoped to just IPC messages sent from this
WebContents.
IPC messages sent with `ipcRenderer.send`, `ipcRenderer.sendSync` or
`ipcRenderer.postMessage` will be delivered in the following order:
1. `contents.on('ipc-message')`
2. `contents.mainFrame.on(channel)`
3. `contents.ipc.on(channel)`
4. `ipcMain.on(channel)`
Handlers registered with `invoke` will be checked in the following order. The
first one that is defined will be called, the rest will be ignored.
1. `contents.mainFrame.handle(channel)`
2. `contents.handle(channel)`
3. `ipcMain.handle(channel)`
A handler or event listener registered on the WebContents will receive IPC
messages sent from any frame, including child frames. In most cases, only the
main frame can send IPC messages. However, if the `nodeIntegrationInSubFrames`
option is enabled, it is possible for child frames to send IPC messages also.
In that case, handlers should check the `senderFrame` property of the IPC event
to ensure that the message is coming from the expected frame. Alternatively,
register handlers on the appropriate frame directly using the
[`WebFrameMain.ipc`](web-frame-main.md#frameipc-readonly) interface.
#### `contents.audioMuted`
A `boolean` property that determines whether this page is muted.
@@ -2051,6 +2086,11 @@ when the page becomes backgrounded. This also affects the Page Visibility API.
A [`WebFrameMain`](web-frame-main.md) property that represents the top frame of the page's frame hierarchy.
#### `contents.opener` _Readonly_
A [`WebFrameMain`](web-frame-main.md) property that represents the frame that opened this WebContents, either
with open(), or by navigating a link with a target attribute.
[keyboardevent]: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent
[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter
[SCA]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm

View File

@@ -16,7 +16,7 @@ win.loadURL('https://twitter.com')
win.webContents.on(
'did-frame-navigate',
(event, url, isMainFrame, frameProcessId, frameRoutingId) => {
(event, url, httpResponseCode, httpStatusText, isMainFrame, frameProcessId, frameRoutingId) => {
const frame = webFrameMain.fromId(frameProcessId, frameRoutingId)
if (frame) {
const code = 'document.body.innerHTML = document.body.innerHTML.replaceAll("heck", "h*ck")'
@@ -140,10 +140,45 @@ ipcRenderer.on('port', (e, msg) => {
### Instance Properties
#### `frame.ipc` _Readonly_
An [`IpcMain`](ipc-main.md) instance scoped to the frame.
IPC messages sent with `ipcRenderer.send`, `ipcRenderer.sendSync` or
`ipcRenderer.postMessage` will be delivered in the following order:
1. `contents.on('ipc-message')`
2. `contents.mainFrame.on(channel)`
3. `contents.ipc.on(channel)`
4. `ipcMain.on(channel)`
Handlers registered with `invoke` will be checked in the following order. The
first one that is defined will be called, the rest will be ignored.
1. `contents.mainFrame.handle(channel)`
2. `contents.handle(channel)`
3. `ipcMain.handle(channel)`
In most cases, only the main frame of a WebContents can send or receive IPC
messages. However, if the `nodeIntegrationInSubFrames` option is enabled, it is
possible for child frames to send and receive IPC messages also. The
[`WebContents.ipc`](web-contents.md#contentsipc-readonly) interface may be more
convenient when `nodeIntegrationInSubFrames` is not enabled.
#### `frame.url` _Readonly_
A `string` representing the current URL of the frame.
#### `frame.origin` _Readonly_
A `string` representing the current origin of the frame, serialized according
to [RFC 6454](https://www.rfc-editor.org/rfc/rfc6454). This may be different
from the URL. For instance, if the frame is a child window opened to
`about:blank`, then `frame.origin` will return the parent frame's origin, while
`frame.url` will return the empty string. Pages without a scheme/host/port
triple origin will have the serialized origin of `"null"` (that is, the string
containing the letters n, u, l, l).
#### `frame.top` _Readonly_
A `WebFrameMain | null` representing top frame in the frame hierarchy to which `frame`
@@ -195,3 +230,6 @@ have the same `routingId`.
A `string` representing the [visibility state](https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilityState) of the frame.
See also how the [Page Visibility API](browser-window.md#page-visibility) is affected by other Electron APIs.
[SCA]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
[`postMessage`]: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage

View File

@@ -110,9 +110,11 @@ webFrame.setSpellCheckProvider('en-US', {
})
```
### `webFrame.insertCSS(css)`
### `webFrame.insertCSS(css[, options])`
* `css` string - CSS source code.
* `css` string
* `options` Object (optional)
* `cssOrigin` string (optional) - Can be either 'user' or 'author'. Sets the [cascade origin](https://www.w3.org/TR/css3-cascade/#cascade-origin) of the inserted stylesheet. Default is 'author'.
Returns `string` - A key for the inserted CSS that can later be used to remove
the CSS via `webFrame.removeInsertedCSS(key)`.

View File

@@ -28,7 +28,7 @@ const { session } = require('electron')
// Modify the user agent for all requests to the following urls.
const filter = {
urls: ['https://*.github.com/*', '*://electron.github.io']
urls: ['https://*.github.com/*', '*://electron.github.io/*']
}
session.defaultSession.webRequest.onBeforeSendHeaders(filter, (details, callback) => {

View File

@@ -158,9 +158,6 @@ When the guest page doesn't have node integration this script will still have
access to all Node APIs, but global objects injected by Node will be deleted
after this script has finished executing.
**Note:** This option will appear as `preloadURL` (not `preload`) in
the `webPreferences` specified to the `will-attach-webview` event.
### `httpreferrer`
```html
@@ -559,7 +556,7 @@ Stops any `findInPage` request for the `webview` with the provided `action`.
* `header` string (optional) - string to be printed as page header.
* `footer` string (optional) - string to be printed as page footer.
* `pageSize` string | Size (optional) - Specify page size of the printed document. Can be `A3`,
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height`.
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` in microns.
Returns `Promise<void>`
@@ -568,21 +565,21 @@ Prints `webview`'s web page. Same as `webContents.print([options])`.
### `<webview>.printToPDF(options)`
* `options` Object
* `headerFooter` Record<string, string> (optional) - the header and footer for the PDF.
* `title` string - The title for the PDF header.
* `url` string - the url for the PDF footer.
* `landscape` boolean (optional) - `true` for landscape, `false` for portrait.
* `marginsType` Integer (optional) - Specifies the type of margins to use. Uses 0 for
default margin, 1 for no margin, and 2 for minimum margin.
and `width` in microns.
* `scaleFactor` number (optional) - The scale factor of the web page. Can range from 0 to 100.
* `pageRanges` Record<string, number> (optional) - The page range to print. On macOS, only the first range is honored.
* `from` number - Index of the first page to print (0-based).
* `to` number - Index of the last page to print (inclusive) (0-based).
* `pageSize` string | Size (optional) - Specify page size of the generated PDF. Can be `A3`,
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height`
* `printBackground` boolean (optional) - Whether to print CSS backgrounds.
* `printSelectionOnly` boolean (optional) - Whether to print selection only.
* `landscape` boolean (optional) - Paper orientation.`true` for landscape, `false` for portrait. Defaults to false.
* `displayHeaderFooter` boolean (optional) - Whether to display header and footer. Defaults to false.
* `printBackground` boolean (optional) - Whether to print background graphics. Defaults to false.
* `scale` number(optional) - Scale of the webpage rendering. Defaults to 1.
* `pageSize` string | Size (optional) - Specify page size of the generated PDF. Can be `A0`, `A1`, `A2`, `A3`,
`A4`, `A5`, `A6`, `Legal`, `Letter`, `Tabloid`, `Ledger`, or an Object containing `height` and `width` in inches. Defaults to `Letter`.
* `margins` Object (optional)
* `top` number (optional) - Top margin in inches. Defaults to 1cm (~0.4 inches).
* `bottom` number (optional) - Bottom margin in inches. Defaults to 1cm (~0.4 inches).
* `left` number (optional) - Left margin in inches. Defaults to 1cm (~0.4 inches).
* `right` number (optional) - Right margin in inches. Defaults to 1cm (~0.4 inches).
* `pageRanges` string (optional) - Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
* `headerTemplate` string (optional) - HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: `date` (formatted print date), `title` (document title), `url` (document location), `pageNumber` (current page number) and `totalPages` (total pages in the document). For example, `<span class=title></span>` would generate span containing the title.
* `footerTemplate` string (optional) - HTML template for the print footer. Should use the same format as the `headerTemplate`.
* `preferCSSPageSize` boolean (optional) - Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
Returns `Promise<Uint8Array>` - Resolves with the generated PDF data.

View File

@@ -73,6 +73,11 @@ creating the window. Note that this is more powerful than passing options
through the feature string, as the renderer has more limited privileges in
deciding security preferences than the main process.
In addition to passing in `action` and `overrideBrowserWindowOptions`,
`outlivesOpener` can be passed like: `{ action: 'allow', outlivesOpener: true,
overrideBrowserWindowOptions: { ... } }`. If set to `true`, the newly created
window will not close when the opener window closes. The default value is `false`.
### Native `Window` example
```javascript

View File

@@ -12,6 +12,104 @@ This document uses the following convention to categorize breaking changes:
* **Deprecated:** An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed in a future release.
* **Removed:** An API or feature was removed, and is no longer supported by Electron.
## Planned Breaking API Changes (20.0)
### Behavior Changed: V8 Memory Cage enabled
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
about the V8 memory cage](https://www.electronjs.org/blog/v8-memory-cage) for
more details.
### API Changed: `webContents.printToPDF()`
`webContents.printToPDF()` has been modified to conform to [`Page.printToPDF`](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF) in the Chrome DevTools Protocol. This has been changes in order to
address changes upstream that made our previous implementation untenable and rife with bugs.
**Arguments Changed**
* `pageRanges`
**Arguments Removed**
* `printSelectionOnly`
* `marginsType`
* `headerFooter`
* `scaleFactor`
**Arguments Added**
* `headerTemplate`
* `footerTemplate`
* `displayHeaderFooter`
* `margins`
* `scale`
* `preferCSSPageSize`
```js
// Main process
const { webContents } = require('electron')
webContents.printToPDF({
landscape: true,
displayHeaderFooter: true,
printBackground: true,
scale: 2,
pageSize: 'Ledger',
margins: {
top: 2,
bottom: 2,
left: 2,
right: 2
},
pageRanges: '1-5, 8, 11-13',
headerTemplate: '<h1>Title</h1>',
footerTemplate: '<div><span class="pageNumber"></span></div>',
preferCSSPageSize: true
}).then(data => {
fs.writeFile(pdfPath, data, (error) => {
if (error) throw error
console.log(`Wrote PDF successfully to ${pdfPath}`)
})
}).catch(error => {
console.log(`Failed to write PDF to ${pdfPath}: `, error)
})
```
### Default Changed: renderers without `nodeIntegration: true` are sandboxed by default
Previously, renderers that specified a preload script defaulted to being
unsandboxed. This meant that by default, preload scripts had access to Node.js.
In Electron 20, this default has changed. Beginning in Electron 20, renderers
will be sandboxed by default, unless `nodeIntegration: true` or `sandbox: false`
is specified.
If your preload scripts do not depend on Node, no action is needed. If your
preload scripts _do_ depend on Node, either refactor them to remove Node usage
from the renderer, or explicitly specify `sandbox: false` for the relevant
renderers.
### Removed: `skipTaskbar` on Linux
On X11, `skipTaskbar` sends a `_NET_WM_STATE_SKIP_TASKBAR` message to the X11
window manager. There is not a direct equivalent for Wayland, and the known
workarounds have unacceptable tradeoffs (e.g. Window.is_skip_taskbar in GNOME
requires unsafe mode), so Electron is unable to support this feature on Linux.
### API Changed: `session.setDevicePermissionHandler(handler)`
The handler invoked when `session.setDevicePermissionHandler(handler)` is used
has a change to its arguments. This handler no longer is passed a frame
`[WebFrameMain](api/web-frame-main.md)`, but instead is passed the `origin`, which
is the origin that is checking for device permission.
## Planned Breaking API Changes (19.0)
### Removed: IA32 Linux binaries
This is a result of Chromium 102.0.4999.0 dropping support for IA32 Linux.
This concludes the [removal of support for IA32 Linux](#removed-ia32-linux-support).
## Planned Breaking API Changes (18.0)
### Removed: `nativeWindowOpen`
@@ -346,7 +444,7 @@ value.
In Electron 12, `contextIsolation` will be enabled by default. To restore
the previous behavior, `contextIsolation: false` must be specified in WebPreferences.
We [recommend having contextIsolation enabled](tutorial/security.md#3-enable-context-isolation-for-remote-content) for the security of your application.
We [recommend having contextIsolation enabled](tutorial/security.md#3-enable-context-isolation) for the security of your application.
Another implication is that `require()` cannot be used in the renderer process unless
`nodeIntegration` is `true` and `contextIsolation` is `false`.
@@ -1177,6 +1275,10 @@ not present, then the native module will fail to load on Windows, with an error
message like `Cannot find module`. See the [native module
guide](/docs/tutorial/using-native-node-modules.md) for more.
### Removed: IA32 Linux support
Electron 18 will no longer run on 32-bit Linux systems. See [discontinuing support for 32-bit Linux](https://www.electronjs.org/blog/linux-32bit-support) for more information.
## Breaking API Changes (3.0)
The following list includes the breaking API changes in Electron 3.0.

View File

@@ -64,7 +64,7 @@ If you want to add a new API module to Electron, you'll want to look in [creatin
Electron has a fully-fledged governance system that oversees activity in Electron and whose working groups are responsible for areas like APIs, releases, and upgrades to Electron's dependencies including Chromium and Node.js. Depending on how frequently and to what end you want to contribute, you may want to consider joining a working group.
Details about each group and their reponsibilities can be found in the [governance repo](https://github.com/electron/governance).
Details about each group and their responsibilities can be found in the [governance repo](https://github.com/electron/governance).
## Patches in Electron

View File

@@ -196,12 +196,12 @@ If you test other combinations and find them to work, please update this documen
See the GN reference for allowable values of [`target_os`][target_os values]
and [`target_cpu`][target_cpu values].
[target_os values]: https://gn.googlesource.com/gn/+/master/docs/reference.md#built_in-predefined-variables-target_os_the-desired-operating-system-for-the-build-possible-values
[target_cpu values]: https://gn.googlesource.com/gn/+/master/docs/reference.md#built_in-predefined-variables-target_cpu_the-desired-cpu-architecture-for-the-build-possible-values
[target_os values]: https://gn.googlesource.com/gn/+/main/docs/reference.md#built_in-predefined-variables-target_os_the-desired-operating-system-for-the-build-possible-values
[target_cpu values]: https://gn.googlesource.com/gn/+/main/docs/reference.md#built_in-predefined-variables-target_cpu_the-desired-cpu-architecture-for-the-build-possible-values
#### Windows on Arm (experimental)
To cross-compile for Windows on Arm, [follow Chromium's guide](https://chromium.googlesource.com/chromium/src/+/refs/heads/master/docs/windows_build_instructions.md#Visual-Studio) to get the necessary dependencies, SDK and libraries, then build with `ELECTRON_BUILDING_WOA=1` in your environment before running `gclient sync`.
To cross-compile for Windows on Arm, [follow Chromium's guide](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/windows_build_instructions.md#Visual-Studio) to get the necessary dependencies, SDK and libraries, then build with `ELECTRON_BUILDING_WOA=1` in your environment before running `gclient sync`.
```bat
set ELECTRON_BUILDING_WOA=1

View File

@@ -7,21 +7,7 @@ Follow the guidelines below for building **Electron itself** on Linux, for the p
## Prerequisites
* At least 25GB disk space and 8GB RAM.
* Python 2.7.x. Some distributions like CentOS 6.x still use Python 2.6.x
so you may need to check your Python version with `python -V`.
Please also ensure that your system and Python version support at least TLS 1.2.
For a quick test, run the following script:
```sh
$ npx @electron/check-python-tls
```
If the script returns that your configuration is using an outdated security
protocol, use your system's package manager to update Python to the latest
version in the 2.7.x branch. Alternatively, visit https://www.python.org/downloads/
for detailed instructions.
* Python >= 3.7.
* Node.js. There are various ways to install Node. You can download
source code from [nodejs.org](https://nodejs.org) and compile it.
Doing so permits installing Node on your own home directory as a standard user.
@@ -61,10 +47,10 @@ $ sudo yum install clang dbus-devel gtk3-devel libnotify-devel \
On Fedora, install the following libraries:
```sh
$ sudo dnf install clang dbus-devel gtk3-devel libnotify-devel \
libgnome-keyring-devel xorg-x11-server-utils libcap-devel \
$ sudo dnf install clang dbus-devel gperf gtk3-devel \
libnotify-devel libgnome-keyring-devel libcap-devel \
cups-devel libXtst-devel alsa-lib-devel libXrandr-devel \
nss-devel python-dbusmock openjdk-8-jre
nss-devel python-dbusmock
```
On Arch Linux / Manjaro, install the following libraries:
@@ -96,7 +82,7 @@ $ sudo apt-get install libc6-dev-arm64-cross linux-libc-dev-arm64-cross \
g++-aarch64-linux-gnu
```
And to cross-compile for `arm` or `ia32` targets, you should pass the
And to cross-compile for `arm` or targets, you should pass the
`target_cpu` parameter to `gn gen`:
```sh

View File

@@ -6,45 +6,12 @@ Follow the guidelines below for building **Electron itself** on macOS, for the p
## Prerequisites
* macOS >= 10.11.6
* [Xcode](https://developer.apple.com/technologies/tools/) >= 9.0.0
* macOS >= 11.6.0
* [Xcode](https://developer.apple.com/technologies/tools/). The exact version
needed depends on what branch you are building, but the latest version of
Xcode is generally a good bet for building `main`.
* [node.js](https://nodejs.org) (external)
* Python 2.7 with support for TLS 1.2
## Python
Please also ensure that your system and Python version support at least TLS 1.2.
This depends on both your version of macOS and Python. For a quick test, run:
```sh
$ npx @electron/check-python-tls
```
If the script returns that your configuration is using an outdated security
protocol, you can either update macOS to High Sierra or install a new version
of Python 2.7.x. To upgrade Python, use [Homebrew](https://brew.sh/):
```sh
$ brew install python@2 && brew link python@2 --force
```
If you are using Python as provided by Homebrew, you also need to install
the following Python modules:
* [pyobjc](https://pypi.org/project/pyobjc/#description)
You can use `pip` to install it:
```sh
$ pip install pyobjc
```
## macOS SDK
If you're developing Electron and don't plan to redistribute your
custom Electron build, you may skip this section.
Official Electron builds are built with [Xcode 12.2](https://download.developer.apple.com/Developer_Tools/Xcode_12.2/Xcode_12.2.xip), and the macOS 11.0 SDK. Building with a newer SDK works too, but the releases currently use the 11.0 SDK.
* Python >= 3.7
## Building Electron

View File

@@ -9,14 +9,12 @@ Follow the guidelines below for building **Electron itself** on Windows, for the
* Windows 10 / Server 2012 R2 or higher
* Visual Studio 2017 15.7.2 or higher - [download VS 2019 Community Edition for
free](https://www.visualstudio.com/vs/)
* See [the Chromium build documentation](https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#visual-studio) for more details on which Visual Studio
* See [the Chromium build documentation](https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md#visual-studio) for more details on which Visual Studio
components are required.
* If your Visual Studio is installed in a directory other than the default, you'll need to
set a few environment variables to point the toolchains to your installation path.
* `vs2019_install = DRIVE:\path\to\Microsoft Visual Studio\2019\Community`, replacing `2019` and `Community` with your installed versions and replacing `DRIVE:` with the drive that Visual Studio is on. Often, this will be `C:`.
* `WINDOWSSDKDIR = DRIVE:\path\to\Windows Kits\10`, replacing `DRIVE:` with the drive that Windows Kits is on. Often, this will be `C:`.
* [Python for Windows (pywin32) Extensions](https://pypi.org/project/pywin32/#files)
is also needed in order to run the build process.
* [Node.js](https://nodejs.org/download/)
* [Git](https://git-scm.com)
* Debugging Tools for Windows of Windows SDK 10.0.15063.468 if you plan on

View File

@@ -28,7 +28,7 @@ For C++ and Python, we follow Chromium's [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.
The Python version we are using now is Python 2.7.
The Python version we are using now is Python 3.9.
The C++ code uses a lot of Chromium's abstractions and types, so it's
recommended to get acquainted with them. A good place to start is

View File

@@ -9,7 +9,7 @@ Some of the more common approaches are outlined below.
Chromium contains logging macros which can aid debugging by printing information to console in C++ and Objective-C++.
You might use this to print out variable values, function names, and line numbers, amonst other things.
You might use this to print out variable values, function names, and line numbers, amongst other things.
Some examples:
@@ -25,7 +25,7 @@ See [logging.h](https://chromium.googlesource.com/chromium/src/base/+/refs/heads
## Printing Stacktraces
Chromium contains a helper to print stack traces to console without interrrupting the program.
Chromium contains a helper to print stack traces to console without interrupting the program.
```cpp
#include "base/debug/stack_trace.h"

View File

@@ -24,7 +24,7 @@ contribute:
## Asking for General Help
["Finding Support"](../tutorial/support.md#finding-support) has a
[The Electron website](https://electronjs.org/community) has a
list of resources for getting programming help, reporting security issues,
contributing, and more. Please use the issue tracker for bugs only!

View File

@@ -180,7 +180,7 @@ $ git push origin my-branch
### Step 9: Opening the Pull Request
From within GitHub, opening a new pull request will present you with a template
that should be filled out. It can be found [here](../../.github/PULL_REQUEST_TEMPLATE.md).
that should be filled out. It can be found [here](https://github.com/electron/electron/blob/main/.github/PULL_REQUEST_TEMPLATE.md).
If you do not adequately complete this template, your PR may be delayed in being merged as maintainers
seek more information or clarify ambiguities.

View File

@@ -135,7 +135,7 @@ is only available in renderer processes.
If [sub-pixel anti-aliasing](https://alienryderflex.com/sub_pixel/) is deactivated, then fonts on LCD screens can look blurry. Example:
![subpixel rendering example]
![Subpixel rendering example](images/subpixel-rendering-screenshot.gif)
Sub-pixel anti-aliasing needs a non-transparent background of the layer containing the font glyphs. (See [this issue](https://github.com/electron/electron/issues/6344#issuecomment-420371918) for more info).
@@ -161,4 +161,3 @@ Notice that just setting the background in the CSS does not have the desired eff
[indexed-db]: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
[message-port]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort
[browser-window]: api/browser-window.md
[subpixel rendering example]: images/subpixel-rendering-screenshot.gif

View File

@@ -1,27 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
<div>
<h1>Asynchronous messages</h1>
<i>Supports: Win, macOS, Linux <span>|</span> Process: Both</i>
<div>
<div>
<button id="async-msg">Ping</button>
<span id="async-reply"></span>
</div>
<p>Using <code>ipc</code> to send messages between processes asynchronously is the preferred method since it will return when finished without blocking other operations in the same process.</p>
<p>This example sends a "ping" from this process (renderer) to the main process. The main process then replies with "pong".</p>
</div>
</div>
</div>
<script>
// You can also require other files to run in this process
require('./renderer.js')
</script>
</body>
</html>

View File

@@ -1,29 +0,0 @@
const { app, BrowserWindow, ipcMain } = require('electron')
let mainWindow = null
function createWindow () {
const windowOptions = {
width: 600,
height: 400,
title: 'Asynchronous messages',
webPreferences: {
nodeIntegration: true
}
}
mainWindow = new BrowserWindow(windowOptions)
mainWindow.loadFile('index.html')
mainWindow.on('closed', () => {
mainWindow = null
})
}
app.whenReady().then(() => {
createWindow()
})
ipcMain.on('asynchronous-message', (event, arg) => {
event.sender.send('asynchronous-reply', 'pong')
})

View File

@@ -1,12 +0,0 @@
const { ipcRenderer } = require('electron')
const asyncMsgBtn = document.getElementById('async-msg')
asyncMsgBtn.addEventListener('click', () => {
ipcRenderer.send('asynchronous-message', 'ping')
})
ipcRenderer.on('asynchronous-reply', (event, arg) => {
const message = `Asynchronous message reply: ${arg}`
document.getElementById('async-reply').innerHTML = message
})

View File

@@ -1,27 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
<div>
<h1>Synchronous messages</h1>
<i>Supports: Win, macOS, Linux <span>|</span> Process: Both</i>
<div>
<div>
<button id="sync-msg">Ping</button>
<span id="sync-reply"></span>
</div>
<p>You can use the <code>ipc</code> module to send synchronous messages between processes as well, but note that the synchronous nature of this method means that it <b>will block</b> other operations while completing its task.</p>
<p>This example sends a synchronous message, "ping", from this process (renderer) to the main process. The main process then replies with "pong".</p>
</div>
</div>
</div>
<script>
// You can also require other files to run in this process
require('./renderer.js')
</script>
</body>
</html>

View File

@@ -1,29 +0,0 @@
const { app, BrowserWindow, ipcMain } = require('electron')
let mainWindow = null
function createWindow () {
const windowOptions = {
width: 600,
height: 400,
title: 'Synchronous Messages',
webPreferences: {
nodeIntegration: true
}
}
mainWindow = new BrowserWindow(windowOptions)
mainWindow.loadFile('index.html')
mainWindow.on('closed', () => {
mainWindow = null
})
}
app.whenReady().then(() => {
createWindow()
})
ipcMain.on('synchronous-message', (event, arg) => {
event.returnValue = 'pong'
})

View File

@@ -1,9 +0,0 @@
const { ipcRenderer } = require('electron')
const syncMsgBtn = document.getElementById('sync-msg')
syncMsgBtn.addEventListener('click', () => {
const reply = ipcRenderer.sendSync('synchronous-message', 'ping')
const message = `Synchronous message reply: ${reply}`
document.getElementById('sync-reply').innerHTML = message
})

View File

@@ -1,5 +1,4 @@
const { contextBridge, ipcRenderer } = require('electron')
const path = require('path')
contextBridge.exposeInMainWorld('electron', {
startDrag: (fileName) => {

View File

@@ -1,10 +1,13 @@
const {app, BrowserWindow} = require('electron')
const {app, BrowserWindow, ipcMain} = require('electron')
const path = require('path')
function createWindow () {
const mainWindow = new BrowserWindow({
width: 800,
height: 600
height: 600,
webPreferences: {
preload: path.join(__dirname, 'preload.js')
}
})
mainWindow.webContents.on('select-bluetooth-device', (event, deviceList, callback) => {
@@ -14,6 +17,18 @@ function createWindow () {
}
})
// Listen for a message from the renderer to get the response for the Bluetooth pairing.
ipcMain.on('bluetooth-pairing-response', (event, response) => {
bluetoothPinCallback(response)
})
mainWindow.webContents.session.setBluetoothPairingHandler((details, callback) => {
bluetoothPinCallback = callback
// Send a message to the renderer to prompt the user to confirm the pairing.
mainWindow.webContents.send('bluetooth-pairing-request', details)
})
mainWindow.loadFile('index.html')
}

View File

@@ -0,0 +1,6 @@
const { contextBridge, ipcRenderer } = require('electron')
contextBridge.exposeInMainWorld('electronAPI', {
bluetoothPairingRequest: (callback) => ipcRenderer.on('bluetooth-pairing-request', callback),
bluetoothPairingResponse: (response) => ipcRenderer.send('bluetooth-pairing-response', response)
})

View File

@@ -5,4 +5,30 @@ async function testIt() {
document.getElementById('device-name').innerHTML = device.name || `ID: ${device.id}`
}
document.getElementById('clickme').addEventListener('click',testIt)
document.getElementById('clickme').addEventListener('click',testIt)
window.electronAPI.bluetoothPairingRequest((event, details) => {
const response = {}
switch (details.pairingKind) {
case 'confirm': {
response.confirmed = confirm(`Do you want to connect to device ${details.deviceId}?`)
break
}
case 'confirmPin': {
response.confirmed = confirm(`Does the pin ${details.pin} match the pin displayed on device ${details.deviceId}?`)
break
}
case 'providePin': {
const pin = prompt(`Please provide a pin for ${details.deviceId}.`)
if (pin) {
response.pin = pin
response.confirmed = true
} else {
response.confirmed = false
}
}
}
window.electronAPI.bluetoothPairingResponse(response)
})

View File

@@ -8,20 +8,24 @@ function createWindow () {
})
mainWindow.webContents.session.on('select-hid-device', (event, details, callback) => {
//Add events to handle devices being added or removed before the callback on
//`select-hid-device` is called.
mainWindow.webContents.session.on('hid-device-added', (event, device) => {
console.log('hid-device-added FIRED WITH', device)
//Optionally update details.deviceList
})
mainWindow.webContents.session.on('hid-device-removed', (event, device) => {
console.log('hid-device-removed FIRED WITH', device)
//Optionally update details.deviceList
})
event.preventDefault()
if (details.deviceList && details.deviceList.length > 0) {
callback(details.deviceList[0].deviceId)
}
})
mainWindow.webContents.session.on('hid-device-added', (event, device) => {
console.log('hid-device-added FIRED WITH', device)
})
mainWindow.webContents.session.on('hid-device-removed', (event, device) => {
console.log('hid-device-removed FIRED WITH', device)
})
mainWindow.webContents.session.setPermissionCheckHandler((webContents, permission, requestingOrigin, details) => {
if (permission === 'hid' && details.securityOrigin === 'file:///') {
return true

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