Compare commits

...

143 Commits
gha ... v21.2.2

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
307 changed files with 5609 additions and 2237 deletions

View File

@@ -454,7 +454,7 @@ step-delete-git-directories: &step-delete-git-directories
command: |
if [ "`uname`" == "Darwin" ]; then
cd src
( find . -type d -name ".git" -not -path "./third_party/angle/*" -not -path "./third_party/dawn/*" ) | xargs rm -rf
( find . -type d -name ".git" -not -path "./third_party/angle/*" -not -path "./third_party/dawn/*" -not -path "./electron/*" ) | xargs rm -rf
fi
# On macOS the yarn install command during gclient sync was run on a linux
@@ -635,7 +635,7 @@ step-electron-publish: &step-electron-publish
cd src/electron
if [ "$UPLOAD_TO_STORAGE" == "1" ]; then
echo 'Uploading Electron release distribution to Azure'
script/release/uploaders/upload.py --verbose --UPLOAD_TO_STORAGE
script/release/uploaders/upload.py --verbose --upload_to_storage
else
echo 'Uploading Electron release distribution to GitHub releases'
script/release/uploaders/upload.py --verbose
@@ -661,6 +661,7 @@ step-persist-data-for-tests: &step-persist-data-for-tests
- src/buildtools/third_party/libc++
- src/buildtools/third_party/libc++abi
- src/out/Default/obj/buildtools/third_party
- src/v8/tools/builtins-pgo
step-electron-dist-unzip: &step-electron-dist-unzip
run:
@@ -812,7 +813,7 @@ step-maybe-zip-symbols: &step-maybe-zip-symbols
cd src
export BUILD_PATH="$PWD/out/Default"
ninja -C out/Default electron:licenses
ninja -C out/Default electron:electron_version
ninja -C out/Default electron:electron_version_file
DELETE_DSYMS_AFTER_ZIP=1 electron/script/zip-symbols.py -b $BUILD_PATH
step-maybe-cross-arch-snapshot: &step-maybe-cross-arch-snapshot
@@ -872,12 +873,12 @@ step-touch-sync-done: &step-touch-sync-done
step-maybe-restore-src-cache: &step-maybe-restore-src-cache
restore_cache:
keys:
- v14-src-cache-{{ checksum "src/electron/.depshash" }}
- v15-src-cache-{{ checksum "src/electron/.depshash" }}
name: Restoring src cache
step-maybe-restore-src-cache-marker: &step-maybe-restore-src-cache-marker
restore_cache:
keys:
- v14-src-cache-marker-{{ checksum "src/electron/.depshash" }}
- v15-src-cache-marker-{{ checksum "src/electron/.depshash" }}
name: Restoring src cache marker
# Restore exact or closest git cache based on the hash of DEPS and .circle-sync-done
@@ -953,13 +954,14 @@ step-minimize-workspace-size-from-checkout: &step-minimize-workspace-size-from-c
rm -rf third_party/electron_node/deps/openssl
rm -rf third_party/electron_node/deps/v8
rm -rf chrome/test/data/xr/webvr_info
rm -rf src/third_party/angle/third_party/VK-GL-CTS/src
# Save the src cache based on the deps hash
step-save-src-cache: &step-save-src-cache
save_cache:
paths:
- /var/portal
key: v14-src-cache-{{ checksum "/var/portal/src/electron/.depshash" }}
key: v15-src-cache-{{ checksum "/var/portal/src/electron/.depshash" }}
name: Persisting src cache
step-make-src-cache-marker: &step-make-src-cache-marker
run:
@@ -969,7 +971,7 @@ step-save-src-cache-marker: &step-save-src-cache-marker
save_cache:
paths:
- .src-cache-marker
key: v14-src-cache-marker-{{ checksum "/var/portal/src/electron/.depshash" }}
key: v15-src-cache-marker-{{ checksum "/var/portal/src/electron/.depshash" }}
step-maybe-early-exit-no-doc-change: &step-maybe-early-exit-no-doc-change
run:

View File

@@ -1,2 +0,0 @@
# Always validate the PR title, and ignore the commits
titleOnly: true

4
.github/workflows/release_dependency_versions.yml vendored Normal file → Executable file
View File

@@ -14,13 +14,13 @@ jobs:
- uses: actions/checkout@v3
- name: Check Tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.0\.0$ ]]; then
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: jobs.check_tag.outputs.should_release == 'true'
if: needs.check_tag.outputs.should_release == 'true'
steps:
- uses: actions/checkout@v3
- name: Trigger New chromedriver Release

2
.nvmrc
View File

@@ -1 +1 @@
14
16

View File

@@ -107,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,
@@ -302,12 +310,9 @@ npm_action("electron_version_args") {
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") {
@@ -319,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"
@@ -404,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",
@@ -620,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",
@@ -750,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" ]
@@ -1191,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",
@@ -1224,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",
]
@@ -1407,15 +1451,10 @@ 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) {

2
DEPS
View File

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'105.0.5187.0',
'106.0.5249.168',
'node_version':
'v16.16.0',
'nan_version':

View File

@@ -1 +0,0 @@
21.0.0-nightly.20220803

View File

@@ -38,7 +38,7 @@ For more installation options and troubleshooting tips, see
Each Electron release provides binaries for macOS, Windows, and Linux.
* macOS (El Capitan and up): Electron provides 64-bit Intel and ARM binaries for macOS. Apple Silicon support was added in Electron 11.
* 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

View File

@@ -34,213 +34,281 @@ environment:
MOCHA_REPORTER: mocha-multi-reporters
MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap
GOMA_FALLBACK_ON_AUTH_FAILURE: true
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: >-
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";
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 {
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=30 -aoa
if (-not (Test-Path -Path "src\buildtools")) {
# the zip file must be corrupt - resync
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
}
# 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"
}
}
- 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
- 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
}
- 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
- if "%RUN_TESTS%"=="true" ( echo Running main test suite & node script/yarn test -- --trace-uncaught --runners=main --enable-logging=file --log-file=%cd%\electron.log )
- if "%RUN_TESTS%"=="true" ( echo Running remote test suite & node script/yarn test -- --trace-uncaught --runners=remote --runTestFilesSeparately --enable-logging=file --log-file=%cd%\electron.log )
- if "%RUN_TESTS%"=="true" ( echo Running native test suite & node script/yarn test -- --trace-uncaught --runners=native --enable-logging=file --log-file=%cd%\electron.log )
- 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_STORAGE) {
Write-Output "Uploading Electron release distribution to azure"
& python script\release\uploaders\upload.py --verbose --upload_to_storage
- 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=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 ..
- 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)
- ps: >-
if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) {
appveyor-retry appveyor PushArtifact pdb.zip
}
- 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
}
- if exist electron\electron.log ( appveyor-retry appveyor PushArtifact electron\electron.log )
-
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

@@ -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

@@ -50,8 +50,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 21,0,0,20220803
PRODUCTVERSION 21,0,0,20220803
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", "21.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", "21.0.0"
VALUE "ProductVersion", "$major.$minor.$patch"
VALUE "SquirrelAwareVersion", "1"
END
END

View File

@@ -0,0 +1 @@
$full_version

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")
@@ -55,6 +56,14 @@ static_library("chrome") {
"//chrome/browser/process_singleton.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,7 +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",
@@ -110,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",
@@ -131,6 +146,7 @@ static_library("chrome") {
public_deps = [
"//chrome/browser:dev_ui_browser_resources",
"//chrome/browser/ui/color:mixers",
"//chrome/common",
"//chrome/common:version_header",
"//components/keyed_service/content",
@@ -141,10 +157,7 @@ static_library("chrome") {
"//services/strings",
]
deps = [
"//chrome/browser:resource_prefetch_predictor_proto",
"//components/optimization_guide/proto:optimization_guide_proto",
]
deps = [ "//chrome/browser:resource_prefetch_predictor_proto" ]
if (is_linux) {
sources += [ "//chrome/browser/icon_loader_auralinux.cc" ]
@@ -217,6 +230,8 @@ 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",
]
@@ -358,15 +373,20 @@ source_set("plugins") {
deps += [
"//components/strings",
"//media:media_buildflags",
"//ppapi/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

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

@@ -68,6 +68,7 @@ an issue:
* [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)
* [Getting Support](tutorial/support.md)
@@ -82,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

@@ -715,7 +715,7 @@ To set the locale, you'll want to use a command line switch at app startup, whic
**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()`
@@ -723,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

View File

@@ -246,7 +246,8 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `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`.
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`.

View File

@@ -96,14 +96,6 @@ 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).
@@ -126,6 +118,21 @@ 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

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

@@ -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

@@ -635,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
@@ -769,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.
@@ -932,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)`
@@ -1049,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

@@ -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

@@ -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.
@@ -862,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:
@@ -872,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:
@@ -1622,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.
@@ -1985,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.
@@ -2044,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

@@ -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`

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

@@ -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,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

@@ -33,12 +33,16 @@ function createWindow () {
if (permission === 'serial' && details.securityOrigin === 'file:///') {
return true
}
return false
})
mainWindow.webContents.session.setDevicePermissionHandler((details) => {
if (details.deviceType === 'serial' && details.origin === 'file://') {
return true
}
return false
})
mainWindow.loadFile('index.html')

View File

@@ -11,8 +11,8 @@ can either use specialized tooling or manual approaches.
## With tooling
There are a couple tools out there that exist to package and distribute your Electron app.
We recommend using [Electron Forge](https://www.electronforge.io). You can check out
its documentation directly, or refer to the [Packaging and Distribution](./tutorial-5-packaging.md)
We recommend using [Electron Forge](./forge-overview.md). You can check out
its [documentation](https://www.electronforge.io) directly, or refer to the [Packaging and Distribution](./tutorial-5-packaging.md)
part of the Electron tutorial.
## Manual packaging

View File

@@ -0,0 +1,175 @@
---
title: ASAR Archives
description: What is ASAR archive and how does it affect the application.
slug: asar-archives
hide_title: false
---
After creating an [application distribution](application-distribution.md), the
app's source code are usually bundled into an [ASAR
archive](https://github.com/electron/asar), which is a simple extensive archive
format designed for Electron apps. By bundling the app we can mitigate issues
around long path names on Windows, speed up `require` and conceal your source
code from cursory inspection.
The bundled app runs in a virtual file system and most APIs would just work
normally, but for some cases you might want to work on ASAR archives explicitly
due to a few caveats.
## Using ASAR Archives
In Electron there are two sets of APIs: Node APIs provided by Node.js and Web
APIs provided by Chromium. Both APIs support reading files from ASAR archives.
### Node API
With special patches in Electron, Node APIs like `fs.readFile` and `require`
treat ASAR archives as virtual directories, and the files in it as normal
files in the filesystem.
For example, suppose we have an `example.asar` archive under `/path/to`:
```sh
$ asar list /path/to/example.asar
/app.js
/file.txt
/dir/module.js
/static/index.html
/static/main.css
/static/jquery.min.js
```
Read a file in the ASAR archive:
```javascript
const fs = require('fs')
fs.readFileSync('/path/to/example.asar/file.txt')
```
List all files under the root of the archive:
```javascript
const fs = require('fs')
fs.readdirSync('/path/to/example.asar')
```
Use a module from the archive:
```javascript
require('./path/to/example.asar/dir/module.js')
```
You can also display a web page in an ASAR archive with `BrowserWindow`:
```javascript
const { BrowserWindow } = require('electron')
const win = new BrowserWindow()
win.loadURL('file:///path/to/example.asar/static/index.html')
```
### Web API
In a web page, files in an archive can be requested with the `file:` protocol.
Like the Node API, ASAR archives are treated as directories.
For example, to get a file with `$.get`:
```html
<script>
let $ = require('./jquery.min.js')
$.get('file:///path/to/example.asar/file.txt', (data) => {
console.log(data)
})
</script>
```
### Treating an ASAR archive as a Normal File
For some cases like verifying the ASAR archive's checksum, we need to read the
content of an ASAR archive as a file. For this purpose you can use the built-in
`original-fs` module which provides original `fs` APIs without `asar` support:
```javascript
const originalFs = require('original-fs')
originalFs.readFileSync('/path/to/example.asar')
```
You can also set `process.noAsar` to `true` to disable the support for `asar` in
the `fs` module:
```javascript
const fs = require('fs')
process.noAsar = true
fs.readFileSync('/path/to/example.asar')
```
## Limitations of the Node API
Even though we tried hard to make ASAR archives in the Node API work like
directories as much as possible, there are still limitations due to the
low-level nature of the Node API.
### Archives Are Read-only
The archives can not be modified so all Node APIs that can modify files will not
work with ASAR archives.
### Working Directory Can Not Be Set to Directories in Archive
Though ASAR archives are treated as directories, there are no actual
directories in the filesystem, so you can never set the working directory to
directories in ASAR archives. Passing them as the `cwd` option of some APIs
will also cause errors.
### Extra Unpacking on Some APIs
Most `fs` APIs can read a file or get a file's information from ASAR archives
without unpacking, but for some APIs that rely on passing the real file path to
underlying system calls, Electron will extract the needed file into a
temporary file and pass the path of the temporary file to the APIs to make them
work. This adds a little overhead for those APIs.
APIs that requires extra unpacking are:
* `child_process.execFile`
* `child_process.execFileSync`
* `fs.open`
* `fs.openSync`
* `process.dlopen` - Used by `require` on native modules
### Fake Stat Information of `fs.stat`
The `Stats` object returned by `fs.stat` and its friends on files in `asar`
archives is generated by guessing, because those files do not exist on the
filesystem. So you should not trust the `Stats` object except for getting file
size and checking file type.
### Executing Binaries Inside ASAR archive
There are Node APIs that can execute binaries like `child_process.exec`,
`child_process.spawn` and `child_process.execFile`, but only `execFile` is
supported to execute binaries inside ASAR archive.
This is because `exec` and `spawn` accept `command` instead of `file` as input,
and `command`s are executed under shell. There is no reliable way to determine
whether a command uses a file in asar archive, and even if we do, we can not be
sure whether we can replace the path in command without side effects.
## Adding Unpacked Files to ASAR archives
As stated above, some Node APIs will unpack the file to the filesystem when
called. Apart from the performance issues, various anti-virus scanners might
be triggered by this behavior.
As a workaround, you can leave various files unpacked using the `--unpack` option.
In the following example, shared libraries of native Node.js modules will not be
packed:
```sh
$ asar pack app app.asar --unpack *.node
```
After running the command, you will notice that a folder named `app.asar.unpacked`
was created together with the `app.asar` file. It contains the unpacked files
and should be shipped together with the `app.asar` archive.

View File

@@ -0,0 +1,53 @@
---
title: 'ASAR Integrity'
description: 'An experimental feature that ensures the validity of ASAR contents at runtime.'
slug: asar-integrity
hide_title: false
---
## Platform Support
Currently ASAR integrity checking is only supported on macOS.
## Requirements
### Electron Forge / Electron Packager
If you are using `>= electron-packager@15.4.0` or `>= @electron-forge/core@6.0.0-beta.61` then all these requirements are met for you automatically and you can skip to [Toggling the Fuse](#toggling-the-fuse).
### Other build systems
In order to enable ASAR integrity checking you need to ensure that your `app.asar` file was generated by a version of the `asar` npm package that supports asar integrity. Support was introduced in version `3.1.0`.
Your must then populate a valid `ElectronAsarIntegrity` dictionary block in your packaged apps `Info.plist`. An example is included below.
```plist
<key>ElectronAsarIntegrity</key>
<dict>
<key>Resources/app.asar</key>
<dict>
<key>algorithm</key>
<string>SHA256</string>
<key>hash</key>
<string>9d1f61ea03c4bb62b4416387a521101b81151da0cfbe18c9f8c8b818c5cebfac</string>
</dict>
</dict>
```
Valid `algorithm` values are currently `SHA256` only. The `hash` is a hash of the ASAR header using the given algorithm. The `asar` package exposes a `getRawHeader` method whose result can then be hashed to generate this value.
## Toggling the Fuse
ASAR integrity checking is currently disabled by default and can be enabled by toggling a fuse. See [Electron Fuses](fuses.md) for more information on what Electron Fuses are and how they work. When enabling this fuse you typically also want to enable the `onlyLoadAppFromAsar` fuse otherwise the validity checking can be bypassed via the Electron app code search path.
```js
require('@electron/fuses').flipFuses(
// E.g. /a/b/Foo.app
pathToPackagedApp,
{
version: FuseVersion.V1,
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true
}
)
```

View File

@@ -26,10 +26,8 @@ beginners, using a command line tool is likely to be helpful*.
## electron-forge
A "complete tool for building modern Electron applications". Electron Forge
unifies the existing (and well maintained) build tools for Electron development
into a cohesive package so that anyone can jump right in to Electron
development.
Electron Forge is a tool for packaging and publishing Electron applications. It unifies Electron's tooling ecosystem
into a single extensible interface so that anyone can jump right into making Electron apps.
Forge comes with [a ready-to-use template](https://electronforge.io/templates) using Webpack as a bundler. It includes an example typescript configuration and provides two configuration files to enable easy customization. It uses the same core modules used by the
greater Electron community (like [`electron-packager`](https://github.com/electron/electron-packager))

View File

@@ -54,85 +54,11 @@ and notarized requires a few additions to your configuration. [Forge](https://el
collection of the official Electron tools, using [`electron-packager`],
[`electron-osx-sign`], and [`electron-notarize`] under the hood.
Let's take a look at an example `package.json` configuration with all required fields. Not all of them are
required: the tools will be clever enough to automatically find a suitable `identity`, for instance,
but we recommend that you are explicit.
```json title="package.json" {7}
{
"name": "my-app",
"version": "0.0.1",
"config": {
"forge": {
"packagerConfig": {
"osxSign": {
"identity": "Developer ID Application: Felix Rieseberg (LT94ZKYDCJ)",
"hardened-runtime": true,
"entitlements": "entitlements.plist",
"entitlements-inherit": "entitlements.plist",
"signature-flags": "library"
},
"osxNotarize": {
"appleId": "felix@felix.fun",
"appleIdPassword": "my-apple-id-password"
}
}
}
}
}
```
The `entitlements.plist` file referenced here needs the following macOS-specific entitlements
to assure the Apple security mechanisms that your app is doing these things
without meaning any harm:
```xml title="entitlements.plist"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.debugger</key>
<true/>
</dict>
</plist>
```
Note that up until Electron 12, the `com.apple.security.cs.allow-unsigned-executable-memory` entitlement was required
as well. However, it should not be used anymore if it can be avoided.
To see all of this in action, check out Electron Fiddle's source code,
[especially its `electron-forge` configuration
file](https://github.com/electron/fiddle/blob/master/forge.config.js).
If you plan to access the microphone or camera within your app using Electron's APIs, you'll also
need to add the following entitlements:
```xml title="entitlements.plist"
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
```
If these are not present in your app's entitlements when you invoke, for example:
```js title="main.js"
const { systemPreferences } = require('electron')
const microphone = systemPreferences.askForMediaAccess('microphone')
```
Your app may crash. See the Resource Access section in [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime) for more information and entitlements you may need.
### Using Electron Builder
Electron Builder comes with a custom solution for signing your application. You
can find [its documentation here](https://www.electron.build/code-signing).
Detailed instructions on how to configure your application can be found in the [Electron Forge Code Signing Tutorial](https://www.electronforge.io/guides/code-signing/code-signing-macos).
### Using Electron Packager
If you're not using an integrated build pipeline like Forge or Builder, you
If you're not using an integrated build pipeline like Forge, you
are likely using [`electron-packager`], which includes [`electron-osx-sign`] and
[`electron-notarize`].
@@ -204,36 +130,7 @@ commit it to your source code.
### Using Electron Forge
Once you have a code signing certificate file (`.pfx`), you can sign
[Squirrel.Windows][maker-squirrel] and [MSI][maker-msi] installers in Electron Forge
with the `certificateFile` and `certificatePassword` fields in their respective
configuration objects.
For example, if you keep your Forge config in your `package.json` file and are
creating a Squirrel.Windows installer:
```json {9-15} title='package.json'
{
"name": "my-app",
"version": "0.0.1",
//...
"config": {
"forge": {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"certificateFile": "./cert.pfx",
"certificatePassword": "this-is-a-secret"
}
}
]
}
}
//...
}
```
Electron Forge is the recommended way to sign your `Squirrel.Windows` and `WiX MSI` installers. Detailed instructions on how to configure your application can be found in the [Electron Forge Code Signing Tutorial](https://www.electronforge.io/guides/code-signing/code-signing-macos).
### Using electron-winstaller (Squirrel.Windows)

View File

@@ -16,6 +16,10 @@ with bluetooth devices. In order to use this API in Electron, developers will
need to handle the [`select-bluetooth-device` event on the webContents](../api/web-contents.md#event-select-bluetooth-device)
associated with the device request.
Additionally, [`ses.setBluetoothPairingHandler(handler)`](../api/session.md#sessetbluetoothpairinghandlerhandler-windows-linux)
can be used to handle pairing to bluetooth devices on Windows or Linux when
additional validation such as a pin is needed.
### Example
This example demonstrates an Electron application that automatically selects

View File

@@ -11,7 +11,7 @@ you can deliver it to your users.
## Packaging
To distribute your app with Electron, you need to package all your resources and assets
into an executable and rebrand it. To do this, you can either use specialized tooling
into an executable and rebrand it. To do this, you can either use specialized tooling like Electron Forge
or do it manually. See the [Application Packaging][application-packaging] tutorial
for more information.

View File

@@ -0,0 +1,36 @@
# Distributing Apps With Electron Forge
Electron Forge is a tool for packaging and publishing Electron applications.
It unifies Electron's build tooling ecosystem into
a single extensible interface so that anyone can jump right into making Electron apps.
## Getting started
The [Electron Forge docs] contain detailed information on taking your application
from source code to your end users' machines.
This includes:
* Packaging your application [(package)]
* Generating executables and installers for each OS [(make)], and,
* Publishing these files to online platforms to download [(publish)].
For beginners, we recommend following through Electron's [tutorial] to develop, build,
package and publish your first Electron app. If you have already developed an app on your machine
and want to start on packaging and distribution, start from [step 5] of the tutorial.
## Getting help
* If you need help with developing your app, our [community Discord server][discord] is a great place
to get advice from other Electron app developers.
* If you suspect you're running into a bug with Forge, please check the [GitHub issue tracker]
to see if any existing issues match your problem. If not, feel free to fill out our bug report
template and submit a new issue.
[Electron Forge Docs]: https://www.electronforge.io/
[step 5]: ./tutorial-5-packaging.md
[(package)]: https://www.electronforge.io/cli#package
[(make)]: https://www.electronforge.io/cli#make
[(publish)]: https://www.electronforge.io/cli#publish
[GitHub issue tracker]: https://github.com/electron-userland/electron-forge/issues
[discord]: https://discord.gg/APGC3k5yaH
[tutorial]: https://www.electronjs.org/docs/latest/tutorial/tutorial-prerequisites

View File

@@ -8,6 +8,59 @@ For a subset of Electron functionality it makes sense to disable certain feature
Fuses are the solution to this problem, at a high level they are "magic bits" in the Electron binary that can be flipped when packaging your Electron app to enable / disable certain features / restrictions. Because they are flipped at package time before you code sign your app the OS becomes responsible for ensuring those bits aren't flipped back via OS level code signing validation (Gatekeeper / App Locker).
## Current Fuses
### `runAsNode`
**Default:** Enabled
**@electron/fuses:** `FuseV1Options.RunAsNode`
The runAsNode fuse toggles whether the `ELECTRON_RUN_AS_NODE` environment variable is respected or not. Please note that if this fuse is disabled then `process.fork` in the main process will not function as expected as it depends on this environment variable to function.
### `cookieEncryption`
**Default:** Disabled
**@electron/fuses:** `FuseV1Options.EnableCookieEncryption`
The cookieEncryption fuse toggles whether the cookie store on disk is encrypted using OS level cryptography keys. By default the sqlite database that Chromium uses to store cookies stores the values in plaintext. If you wish to ensure your apps cookies are encrypted in the same way Chrome does then you should enable this fuse. Please note it is a one-way transition, if you enable this fuse existing unencrypted cookies will be encrypted-on-write but if you then disable the fuse again your cookie store will effectively be corrupt and useless. Most apps can safely enable this fuse.
### `nodeOptions`
**Default:** Enabled
**@electron/fuses:** `FuseV1Options.EnableNodeOptionsEnvironmentVariable`
The nodeOptions fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions) environment variable is respected or not. This environment variable can be used to pass all kinds of custom options to the Node.js runtime and isn't typically used by apps in production. Most apps can safely disable this fuse.
### `nodeCliInspect`
**Default:** Enabled
**@electron/fuses:** `FuseV1Options.EnableNodeCliInspectArguments`
The nodeCliInspect fuse toggles whether the `--inspect`, `--inspect-brk`, etc. flags are respected or not. When disabled it also ensures that `SIGUSR1` signal does not initialize the main process inspector. Most apps can safely disable this fuse.
### `embeddedAsarIntegrityValidation`
**Default:** Disabled
**@electron/fuses:** `FuseV1Options.EnableEmbeddedAsarIntegrityValidation`
The embeddedAsarIntegrityValidation fuse toggles an experimental feature on macOS that validates the content of the `app.asar` file when it is loaded. This feature is designed to have a minimal performance impact but may marginally slow down file reads from inside the `app.asar` archive.
For more information on how to use asar integrity validation please read the [Asar Integrity](asar-integrity.md) documentation.
### `onlyLoadAppFromAsar`
**Default:** Disabled
**@electron/fuses:** `FuseV1Options.OnlyLoadAppFromAsar`
The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asar`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code.
### `loadBrowserProcessSpecificV8Snapshot`
**Default:** Disabled
**@electron/fuses:** `FuseV1Options.LoadBrowserProcessSpecificV8Snapshot`
The loadBrowserProcessSpecificV8Snapshot fuse changes which V8 snapshot file is used for the browser process. By default Electron's processes will all use the same V8 snapshot file. When this fuse is enabled the browser process uses the file called `browser_v8_context_snapshot.bin` for its V8 snapshot. The other processes will use the V8 snapshot file that they normally do.
## How do I flip the fuses?
### The easy way
@@ -20,11 +73,18 @@ require('@electron/fuses').flipFuses(
require('electron'),
// Fuses to flip
{
runAsNode: false
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false
}
)
```
You can validate the fuses have been flipped or check the fuse status of an arbitrary Electron app using the fuses CLI.
```bash
npx @electron/fuses read --app /Applications/Foo.app
```
### The hard way
#### Quick Glossary

View File

@@ -47,7 +47,7 @@ are the different categories and what you can expect on each one:
- **Examples**: Quick references to add features to your Electron app.
- **Development**: Miscellaneous development guides.
- **Distribution**: Learn how to distribute your app to end users.
- **Testing and debugging**: How to debug JavaScript, write tests, and other tools used
- **Testing And Debugging**: How to debug JavaScript, write tests, and other tools used
to create quality Electron applications.
- **References**: Useful links to better understand how the Electron project works
and is organized.

View File

@@ -232,7 +232,7 @@ how to meet the Mac App Store requirements.
### Upload
The Application Loader should be used to upload the signed app to iTunes
[Apple Transporter][apple-transporter] should be used to upload the signed app to App Store
Connect for processing, making sure you have [created a record][create-record]
before uploading.
@@ -345,7 +345,8 @@ Electron uses following cryptographic algorithms:
[app-sandboxing]: https://developer.apple.com/app-sandboxing/
[app-notarization]: https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution
[submitting-your-app]: https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/SubmittingYourApp/SubmittingYourApp.html
[create-record]: https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/CreatingiTunesConnectRecord.html
[create-record]: https://help.apple.com/app-store-connect/#/dev2cd126805
[apple-transporter]: https://help.apple.com/itc/transporteruserguide/en.lproj/static.html
[submit-for-review]: https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SubmittingTheApp.html
[export-compliance]: https://help.apple.com/app-store-connect/#/devc3f64248f
[user-selected]: https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingAppSandbox.html#//apple_ref/doc/uid/TP40011195-CH4-SW6

View File

@@ -101,7 +101,7 @@ app.whenReady().then(async () => {
}
})
const secondaryWindow = BrowserWindow({
const secondaryWindow = new BrowserWindow({
show: false,
webPreferences: {
contextIsolation: false,
@@ -144,7 +144,7 @@ to use `contextIsolation` and set up specific contextBridge calls for each of yo
expected messages, but for the simplicity of this example we don't. You can find an
example of context isolation further down this page at [Communicating directly between the main process and the main world of a context-isolated page](#communicating-directly-between-the-main-process-and-the-main-world-of-a-context-isolated-page)
That means window.messagePort is globally available and you can call
That means window.electronMessagePort is globally available and you can call
`postMessage` on it from anywhere in your app to send a message to the other
renderer.
@@ -272,7 +272,7 @@ const makeStreamingRequest = (element, callback) => {
}
makeStreamingRequest(42, (data) => {
console.log('got response data:', event.data)
console.log('got response data:', data)
})
// We will see "got response data: 42" 10 times.
```

View File

@@ -20,6 +20,8 @@ const win = new BrowserWindow({
The `nodeIntegrationInWorker` can be used independent of `nodeIntegration`, but
`sandbox` must not be set to `true`.
**Note:** This option is not available in [`SharedWorker`s](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker) or [`Service Worker`s](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker) owing to incompatibilities in sandboxing policies.
## Available APIs
All built-in modules of Node.js are supported in Web Workers, and `asar`

View File

@@ -22,7 +22,6 @@ In `preload.js` use the [`contextBridge`] to inject a method `window.electron.st
```js
const { contextBridge, ipcRenderer } = require('electron')
const path = require('path')
contextBridge.exposeInMainWorld('electron', {
startDrag: (fileName) => {

View File

@@ -12,28 +12,10 @@ the GPU service and the network service.
See Chromium's [Sandbox design document][sandbox] for more information.
## Electron's sandboxing policies
Electron comes with a mixed sandbox environment, meaning sandboxed processes can run
alongside privileged ones. By default, renderer processes are not sandboxed, but
utility processes are. Note that as in Chromium, the main (browser) process is
privileged and cannot be sandboxed.
Historically, this mixed sandbox approach was established because having Node.js available
in the renderer is an extremely powerful tool for app developers. Unfortunately, this
feature is also an equally massive security vulnerability.
Theoretically, unsandboxed renderers are not a problem for desktop applications that
only display trusted code, but they make Electron less secure than Chromium for
displaying untrusted web content. However, even purportedly trusted code may be
dangerous — there are countless attack vectors that malicious actors can use, from
cross-site scripting to content injection to man-in-the-middle attacks on remotely loaded
websites, just to name a few. For this reason, we recommend enabling renderer sandboxing
for the vast majority of cases under an abundance of caution.
<!--TODO: update this guide when #28466 is either solved or closed -->
Note that there is an active discussion in the issue tracker to enable renderer sandboxing
by default. See [#28466][issue-28466]) for details.
Starting from Electron 20, the sandbox is enabled for renderer processes without any
further configuration. If you want to disable the sandbox for a process, see the
[Disabling the sandbox for a single process](#disabling-the-sandbox-for-a-single-process)
section.
## Sandbox behaviour in Electron
@@ -46,12 +28,17 @@ When renderer processes in Electron are sandboxed, they behave in the same way a
regular Chrome renderer would. A sandboxed renderer won't have a Node.js
environment initialized.
<!-- TODO(erickzhao): when we have a solid guide for IPC, link it here -->
Therefore, when the sandbox is enabled, renderer processes can only perform privileged
tasks (such as interacting with the filesystem, making changes to the system, or spawning
subprocesses) by delegating these tasks to the main process via inter-process
communication (IPC).
:::note
For more info on inter-process communication, check out our [IPC guide](./ipc.md).
:::
### Preload scripts
In order to allow renderer processes to communicate with the main process, preload
@@ -66,7 +53,7 @@ but can only import a subset of Electron and Node's built-in modules:
In addition, the preload script also polyfills certain Node.js primitives as globals:
* [`Buffer`](https://nodejs.org/api/Buffer.html)
* [`Buffer`](https://nodejs.org/api/buffer.html)
* [`process`](../api/process.md)
* [`clearImmediate`](https://nodejs.org/api/timers.html#timers_clearimmediate_immediate)
* [`setImmediate`](https://nodejs.org/api/timers.html#timers_setimmediate_callback_args)
@@ -83,13 +70,17 @@ privileged APIs to untrusted code running in the renderer process unless
## Configuring the sandbox
### Enabling the sandbox for a single process
For most apps, sandboxing is the best choice. In certain use cases that are incompatible with
the sandbox (for instance, when using native node modules in the renderer),
it is possible to disable the sandbox for specific processes. This comes with security
risks, especially if any untrusted code or content is present in the unsandboxed process.
In Electron, renderer sandboxing can be enabled on a per-process basis with
the `sandbox: true` preference in the [`BrowserWindow`][browser-window] constructor.
### Disabling the sandbox for a single process
```js
// main.js
In Electron, renderer sandboxing can be disabled on a per-process basis with
the `sandbox: false` preference in the [`BrowserWindow`][browser-window] constructor.
```js title='main.js'
app.whenReady().then(() => {
const win = new BrowserWindow({
webPreferences: {
@@ -100,17 +91,30 @@ app.whenReady().then(() => {
})
```
Sandboxing is also disabled whenever Node.js integration is enabled in the renderer.
This can be done through the BrowserWindow constructor with the `nodeIntegration: true` flag.
```js title='main.js'
app.whenReady().then(() => {
const win = new BrowserWindow({
webPreferences: {
nodeIntegration: true
}
})
win.loadURL('https://google.com')
})
```
### Enabling the sandbox globally
If you want to force sandboxing for all renderers, you can also use the
[`app.enableSandbox`][enable-sandbox] API. Note that this API has to be called before the
app's `ready` event.
```js
// main.js
```js title='main.js'
app.enableSandbox()
app.whenReady().then(() => {
// no need to pass `sandbox: true` since `app.enableSandbox()` was called.
// any sandbox:false calls are overridden since `app.enableSandbox()` was called.
const win = new BrowserWindow()
win.loadURL('https://google.com')
})
@@ -139,16 +143,16 @@ issues:
have, to inherit everything we can from Chromium, and to respond quickly to
security issues, but Electron cannot be as secure as Chromium without the
resources that Chromium is able to dedicate.
2. Some security features in Chrome (such as Safe Browsing and Certificate
1. Some security features in Chrome (such as Safe Browsing and Certificate
Transparency) require a centralized authority and dedicated servers, both of
which run counter to the goals of the Electron project. As such, we disable
those features in Electron, at the cost of the associated security they
would otherwise bring.
3. There is only one Chromium, whereas there are many thousands of apps built
1. There is only one Chromium, whereas there are many thousands of apps built
on Electron, all of which behave slightly differently. Accounting for those
differences can yield a huge possibility space, and make it challenging to
ensure the security of the platform in unusual use cases.
4. We can't push security updates to users directly, so we rely on app vendors
1. We can't push security updates to users directly, so we rely on app vendors
to upgrade the version of Electron underlying their app in order for
security updates to reach users.

View File

@@ -256,7 +256,7 @@ the sandbox in all renderers. Loading, reading or processing any untrusted
content in an unsandboxed process, including the main process, is not advised.
:::info
For more information on what `contextIsolation` is and how to enable it please
For more information on what Process Sandboxing is and how to enable it please
see our dedicated [Process Sandboxing](sandbox.md) document.
:::info

View File

@@ -1,95 +0,0 @@
# Testing Widevine CDM
In Electron you can use the Widevine CDM library shipped with Chrome browser.
Widevine Content Decryption Modules (CDMs) are how streaming services protect
content using HTML5 video to web browsers without relying on an NPAPI plugin
like Flash or Silverlight. Widevine support is an alternative solution for
streaming services that currently rely on Silverlight for playback of
DRM-protected video content. It will allow websites to show DRM-protected video
content in Firefox without the use of NPAPI plugins. The Widevine CDM runs in an
open-source CDM sandbox providing better user security than NPAPI plugins.
#### Note on VMP
As of [`Electron v1.8.0 (Chrome v59)`](https://electronjs.org/releases#1.8.1),
the below steps are may only be some of the necessary steps to enable Widevine;
any app on or after that version intending to use the Widevine CDM may need to
be signed using a license obtained from [Widevine](https://www.widevine.com/)
itself.
Per [Widevine](https://www.widevine.com/):
> Chrome 59 (and later) includes support for Verified Media Path (VMP). VMP
> provides a method to verify the authenticity of a device platform. For browser
> deployments, this will provide an additional signal to determine if a
> browser-based implementation is reliable and secure.
>
> The proxy integration guide has been updated with information about VMP and
> how to issue licenses.
>
> Widevine recommends our browser-based integrations (vendors and browser-based
> applications) add support for VMP.
To enable video playback with this new restriction,
[castLabs](https://castlabs.com/open-source/downstream/) has created a
[fork](https://github.com/castlabs/electron-releases) that has implemented the
necessary changes to enable Widevine to be played in an Electron application if
one has obtained the necessary licenses from widevine.
## Getting the library
Open `chrome://components/` in Chrome browser, find `Widevine Content Decryption Module`
and make sure it is up to date, then you can find the library files from the
application directory.
### On Windows
The library file `widevinecdm.dll` will be under
`Program Files(x86)/Google/Chrome/Application/CHROME_VERSION/WidevineCdm/_platform_specific/win_(x86|x64)/`
directory.
### On macOS
The library file `libwidevinecdm.dylib` will be under
`/Applications/Google Chrome.app/Contents/Versions/CHROME_VERSION/Google Chrome Framework.framework/Versions/A/Libraries/WidevineCdm/_platform_specific/mac_(x86|x64)/`
directory.
**Note:** Make sure that chrome version used by Electron is greater than or
equal to the `min_chrome_version` value of Chrome's widevine cdm component.
The value can be found in `manifest.json` under `WidevineCdm` directory.
## Using the library
After getting the library files, you should pass the path to the file
with `--widevine-cdm-path` command line switch, and the library's version
with `--widevine-cdm-version` switch. The command line switches have to be
passed before the `ready` event of `app` module gets emitted.
Example code:
```javascript
const { app, BrowserWindow } = require('electron')
// You have to pass the directory that contains widevine library here, it is
// * `libwidevinecdm.dylib` on macOS,
// * `widevinecdm.dll` on Windows.
app.commandLine.appendSwitch('widevine-cdm-path', '/path/to/widevine_library')
// The version of plugin can be got from `chrome://components` page in Chrome.
app.commandLine.appendSwitch('widevine-cdm-version', '1.4.8.866')
let win = null
app.whenReady().then(() => {
win = new BrowserWindow()
win.show()
})
```
## Verifying Widevine CDM support
To verify whether widevine works, you can use following ways:
* Open https://shaka-player-demo.appspot.com/ and load a manifest that uses
`Widevine`.
* Open http://www.dash-player.com/demo/drm-test-area/, check whether the page
says `bitdash uses Widevine in your browser`, then play the video.

View File

@@ -123,7 +123,7 @@ the list of versions in the [electron/releases] repository.
[homebrew]: https://brew.sh/
[mdn-guide]: https://developer.mozilla.org/en-US/docs/Learn/
[node]: https://nodejs.org/
[node-guide]: https://nodejs.dev/learn
[node-guide]: https://nodejs.dev/en/learn/
[node-download]: https://nodejs.org/en/download/
[nvm]: https://github.com/nvm-sh/nvm
[process-model]: ./process-model.md

View File

@@ -350,7 +350,7 @@ app.whenReady().then(() => {
## Optional: Debugging from VS Code
If you want to debug your application using VS Code, you have need attach VS Code to
If you want to debug your application using VS Code, you need to attach VS Code to
both the main and renderer processes. Here is a sample configuration for you to
run. Create a launch.json configuration in a new `.vscode` folder in your project:
@@ -369,12 +369,12 @@ run. Create a launch.json configuration in a new `.vscode` folder in your projec
"name": "Renderer",
"port": 9222,
"request": "attach",
"type": "pwa-chrome",
"type": "chrome",
"webRoot": "${workspaceFolder}"
},
{
"name": "Main",
"type": "pwa-node",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
@@ -398,11 +398,11 @@ What we have done in the `launch.json` file is to create 3 configurations:
- `Main` is used to start the main process and also expose port 9222 for remote debugging
(`--remote-debugging-port=9222`). This is the port that we will use to attach the debugger
for the `Renderer`. Because the main process is a Node.js process, the type is set to
`pwa-node` (`pwa-` is the prefix that tells VS Code to use the latest JavaScript debugger).
`node`.
- `Renderer` is used to debug the renderer process. Because the main process is the one
that creates the process, we have to "attach" to it (`"request": "attach"`) instead of
creating a new one.
The renderer process is a web one, so the debugger we have to use is `pwa-chrome`.
The renderer process is a web one, so the debugger we have to use is `chrome`.
- `Main + renderer` is a [compound task] that executes the previous ones simultaneously.
:::caution

View File

@@ -38,7 +38,25 @@ called a **preload**.
## Augmenting the renderer with a preload script
A BrowserWindow's preload script runs in a context that has access to both the HTML DOM
and a Node.js environment. Preload scripts are injected before a web page loads in the renderer,
and a limited subset of Node.js and Electron APIs.
:::info Preload script sandboxing
From Electron 20 onwards, preload scripts are **sandboxed** by default and no longer have access
to a full Node.js environment. Practically, this means that you have a polyfilled `require`
function that only has access to a limited set of APIs.
| Available API | Details |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Electron modules | Renderer process modules |
| Node.js modules | [`events`](https://nodejs.org/api/events.html), [`timers`](https://nodejs.org/api/timers.html), [`url`](https://nodejs.org/api/url.html) |
| Polyfilled globals | [`Buffer`](https://nodejs.org/api/buffer.html), [`process`](../api/process.md), [`clearImmediate`](https://nodejs.org/api/timers.html#timers_clearimmediate_immediate), [`setImmediate`](https://nodejs.org/api/timers.html#timers_setimmediate_callback_args) |
For more information, check out the [Process Sandboxing](./sandbox.md) guide.
:::
Preload scripts are injected before a web page loads in the renderer,
similar to a Chrome extension's [content scripts][content-script]. To add features to your renderer
that require privileged access, you can define [global] objects through the
[contextBridge][contextbridge] API.

View File

@@ -111,6 +111,12 @@ Electron Forge can be configured to create distributables in different OS-specif
:::
:::tip Creating and Adding Application Icons
Setting custom application icons requires a few additions to your config. Check out [Forge's icon tutorial] for more information.
:::
:::note Packaging without Electron Forge
If you want to manually package your code, or if you're just interested understanding the
@@ -214,6 +220,7 @@ information.
[electron forge]: https://www.electronforge.io
[electron forge cli documentation]: https://www.electronforge.io/cli#commands
[makers]: https://www.electronforge.io/config/makers
[Forge's icon tutorial]: https://www.electronforge.io/guides/create-and-add-icons
<!-- Tutorial links -->

View File

@@ -142,6 +142,7 @@ auto_filenames = {
"lib/common/define-properties.ts",
"lib/common/ipc-messages.ts",
"lib/common/web-view-methods.ts",
"lib/common/webpack-globals-provider.ts",
"lib/renderer/api/context-bridge.ts",
"lib/renderer/api/crash-reporter.ts",
"lib/renderer/api/ipc-renderer.ts",

View File

@@ -671,8 +671,6 @@ filenames = {
"shell/renderer/electron_render_frame_observer.h",
"shell/renderer/electron_renderer_client.cc",
"shell/renderer/electron_renderer_client.h",
"shell/renderer/electron_renderer_pepper_host_factory.cc",
"shell/renderer/electron_renderer_pepper_host_factory.h",
"shell/renderer/electron_sandboxed_renderer_client.cc",
"shell/renderer/electron_sandboxed_renderer_client.h",
"shell/renderer/guest_view_container.cc",

View File

@@ -42,9 +42,11 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__algorithm/is_sorted.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/is_sorted_until.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/iter_swap.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/iterator_operations.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/lexicographical_compare.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/lower_bound.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/make_heap.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/make_projected.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/max.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/max_element.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/merge.h",
@@ -67,14 +69,92 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__algorithm/pop_heap.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/prev_permutation.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/push_heap.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_adjacent_find.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_all_of.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_any_of.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_binary_search.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_clamp.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_backward.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_if.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_n.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_count.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_count_if.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_equal.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_equal_range.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_fill.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_fill_n.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_end.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_first_of.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_if.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_if_not.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_for_each.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_for_each_n.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_generate.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_generate_n.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_includes.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_inplace_merge.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_heap.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_heap_until.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_partitioned.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_permutation.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_sorted.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_sorted_until.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_iterator_concept.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_lexicographical_compare.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_lower_bound.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_make_heap.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_max.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_max_element.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_merge.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_min.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_min_element.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_minmax.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_minmax_element.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_mismatch.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_move.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_move_backward.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_next_permutation.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_none_of.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_nth_element.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partial_sort.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partial_sort_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition_point.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_pop_heap.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_prev_permutation.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_push_heap.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove_copy_if.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove_if.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace_copy_if.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace_if.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_reverse.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_reverse_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_rotate.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_rotate_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_sample.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_search.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_search_n.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_difference.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_intersection.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_symmetric_difference.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_union.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_shuffle.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_sort.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_sort_heap.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_stable_partition.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_stable_sort.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_swap_ranges.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_transform.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_unique.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_unique_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_upper_bound.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/remove.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/remove_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/remove_copy_if.h",
@@ -104,9 +184,11 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__algorithm/stable_sort.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/swap_ranges.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/transform.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/uniform_random_bit_generator_adaptor.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/unique.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/unique_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/unwrap_iter.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/unwrap_range.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/upper_bound.h",
"//buildtools/third_party/libc++/trunk/include/__assert",
"//buildtools/third_party/libc++/trunk/include/__availability",
@@ -118,15 +200,28 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__bsd_locale_fallbacks.h",
"//buildtools/third_party/libc++/trunk/include/__charconv/chars_format.h",
"//buildtools/third_party/libc++/trunk/include/__charconv/from_chars_result.h",
"//buildtools/third_party/libc++/trunk/include/__charconv/tables.h",
"//buildtools/third_party/libc++/trunk/include/__charconv/to_chars_base_10.h",
"//buildtools/third_party/libc++/trunk/include/__charconv/to_chars_result.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/calendar.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/convert_to_timespec.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/day.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/duration.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/file_clock.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/hh_mm_ss.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/high_resolution_clock.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/literals.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/month.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/month_weekday.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/monthday.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/steady_clock.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/system_clock.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/time_point.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/weekday.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/year.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/year_month.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/year_month_day.h",
"//buildtools/third_party/libc++/trunk/include/__chrono/year_month_weekday.h",
"//buildtools/third_party/libc++/trunk/include/__compare/common_comparison_category.h",
"//buildtools/third_party/libc++/trunk/include/__compare/compare_partial_order_fallback.h",
"//buildtools/third_party/libc++/trunk/include/__compare/compare_strong_order_fallback.h",
@@ -169,6 +264,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__coroutine/noop_coroutine_handle.h",
"//buildtools/third_party/libc++/trunk/include/__coroutine/trivial_awaitables.h",
"//buildtools/third_party/libc++/trunk/include/__debug",
"//buildtools/third_party/libc++/trunk/include/__debug_utils/randomize_range.h",
"//buildtools/third_party/libc++/trunk/include/__errc",
"//buildtools/third_party/libc++/trunk/include/__filesystem/copy_options.h",
"//buildtools/third_party/libc++/trunk/include/__filesystem/directory_entry.h",
@@ -186,7 +282,12 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__filesystem/recursive_directory_iterator.h",
"//buildtools/third_party/libc++/trunk/include/__filesystem/space_info.h",
"//buildtools/third_party/libc++/trunk/include/__filesystem/u8path.h",
"//buildtools/third_party/libc++/trunk/include/__format/buffer.h",
"//buildtools/third_party/libc++/trunk/include/__format/concepts.h",
"//buildtools/third_party/libc++/trunk/include/__format/enable_insertable.h",
"//buildtools/third_party/libc++/trunk/include/__format/extended_grapheme_cluster_table.h",
"//buildtools/third_party/libc++/trunk/include/__format/format_arg.h",
"//buildtools/third_party/libc++/trunk/include/__format/format_arg_store.h",
"//buildtools/third_party/libc++/trunk/include/__format/format_args.h",
"//buildtools/third_party/libc++/trunk/include/__format/format_context.h",
"//buildtools/third_party/libc++/trunk/include/__format/format_error.h",
@@ -200,9 +301,11 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__format/formatter_floating_point.h",
"//buildtools/third_party/libc++/trunk/include/__format/formatter_integer.h",
"//buildtools/third_party/libc++/trunk/include/__format/formatter_integral.h",
"//buildtools/third_party/libc++/trunk/include/__format/formatter_output.h",
"//buildtools/third_party/libc++/trunk/include/__format/formatter_pointer.h",
"//buildtools/third_party/libc++/trunk/include/__format/formatter_string.h",
"//buildtools/third_party/libc++/trunk/include/__format/parser_std_format_spec.h",
"//buildtools/third_party/libc++/trunk/include/__format/unicode.h",
"//buildtools/third_party/libc++/trunk/include/__functional/binary_function.h",
"//buildtools/third_party/libc++/trunk/include/__functional/binary_negate.h",
"//buildtools/third_party/libc++/trunk/include/__functional/bind.h",
@@ -210,6 +313,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__functional/bind_front.h",
"//buildtools/third_party/libc++/trunk/include/__functional/binder1st.h",
"//buildtools/third_party/libc++/trunk/include/__functional/binder2nd.h",
"//buildtools/third_party/libc++/trunk/include/__functional/boyer_moore_searcher.h",
"//buildtools/third_party/libc++/trunk/include/__functional/compose.h",
"//buildtools/third_party/libc++/trunk/include/__functional/default_searcher.h",
"//buildtools/third_party/libc++/trunk/include/__functional/function.h",
@@ -230,11 +334,16 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__functional/unary_negate.h",
"//buildtools/third_party/libc++/trunk/include/__functional/unwrap_ref.h",
"//buildtools/third_party/libc++/trunk/include/__functional/weak_result_type.h",
"//buildtools/third_party/libc++/trunk/include/__fwd/hash.h",
"//buildtools/third_party/libc++/trunk/include/__fwd/pair.h",
"//buildtools/third_party/libc++/trunk/include/__fwd/span.h",
"//buildtools/third_party/libc++/trunk/include/__fwd/string_view.h",
"//buildtools/third_party/libc++/trunk/include/__hash_table",
"//buildtools/third_party/libc++/trunk/include/__ios/fpos.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/access.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/advance.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/back_insert_iterator.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/bounded_iter.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/common_iterator.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/concepts.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/counted_iterator.h",
@@ -255,6 +364,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__iterator/iterator_traits.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/mergeable.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/move_iterator.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/move_sentinel.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/next.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/ostream_iterator.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/ostreambuf_iterator.h",
@@ -268,14 +378,15 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__iterator/sortable.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/unreachable_sentinel.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/wrap_iter.h",
"//buildtools/third_party/libc++/trunk/include/__libcpp_version",
"//buildtools/third_party/libc++/trunk/include/__locale",
"//buildtools/third_party/libc++/trunk/include/__mbstate_t.h",
"//buildtools/third_party/libc++/trunk/include/__memory/addressof.h",
"//buildtools/third_party/libc++/trunk/include/__memory/allocate_at_least.h",
"//buildtools/third_party/libc++/trunk/include/__memory/allocation_guard.h",
"//buildtools/third_party/libc++/trunk/include/__memory/allocator.h",
"//buildtools/third_party/libc++/trunk/include/__memory/allocator_arg_t.h",
"//buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h",
"//buildtools/third_party/libc++/trunk/include/__memory/assume_aligned.h",
"//buildtools/third_party/libc++/trunk/include/__memory/auto_ptr.h",
"//buildtools/third_party/libc++/trunk/include/__memory/compressed_pair.h",
"//buildtools/third_party/libc++/trunk/include/__memory/concepts.h",
@@ -285,6 +396,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__memory/ranges_uninitialized_algorithms.h",
"//buildtools/third_party/libc++/trunk/include/__memory/raw_storage_iterator.h",
"//buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h",
"//buildtools/third_party/libc++/trunk/include/__memory/swap_allocator.h",
"//buildtools/third_party/libc++/trunk/include/__memory/temporary_buffer.h",
"//buildtools/third_party/libc++/trunk/include/__memory/uninitialized_algorithms.h",
"//buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h",
@@ -355,8 +467,10 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__ranges/empty_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/enable_borrowed_range.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/enable_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/filter_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/iota_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/join_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/lazy_split_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/non_propagating_cache.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/owning_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/range_adaptor.h",
@@ -371,16 +485,16 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__ranges/transform_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/view_interface.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/views.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/zip_view.h",
"//buildtools/third_party/libc++/trunk/include/__split_buffer",
"//buildtools/third_party/libc++/trunk/include/__std_stream",
"//buildtools/third_party/libc++/trunk/include/__string",
"//buildtools/third_party/libc++/trunk/include/__string/char_traits.h",
"//buildtools/third_party/libc++/trunk/include/__string/extern_template_lists.h",
"//buildtools/third_party/libc++/trunk/include/__support/android/locale_bionic.h",
"//buildtools/third_party/libc++/trunk/include/__support/fuchsia/xlocale.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/gettod_zos.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/limits.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/locale_mgmt_zos.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/nanosleep.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/support.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/xlocale.h",
"//buildtools/third_party/libc++/trunk/include/__support/musl/xlocale.h",
"//buildtools/third_party/libc++/trunk/include/__support/newlib/xlocale.h",
@@ -398,10 +512,136 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__threading_support",
"//buildtools/third_party/libc++/trunk/include/__tree",
"//buildtools/third_party/libc++/trunk/include/__tuple",
"//buildtools/third_party/libc++/trunk/include/__type_traits/add_const.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/add_cv.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/add_lvalue_reference.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/add_pointer.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/add_rvalue_reference.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/add_volatile.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/aligned_storage.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/aligned_union.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/alignment_of.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/apply_cv.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/can_extract_key.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/common_reference.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/common_type.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/conditional.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/conjunction.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/copy_cv.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/copy_cvref.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/decay.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/dependent_type.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/disjunction.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/enable_if.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/extent.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/has_unique_object_representation.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/has_virtual_destructor.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/integral_constant.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_abstract.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_aggregate.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_arithmetic.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_array.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_assignable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_base_of.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_bounded_array.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_callable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_char_like_type.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_class.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_compound.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_const.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_constant_evaluated.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_convertible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_copy_assignable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_copy_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_core_convertible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_default_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_destructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_empty.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_enum.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_final.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_floating_point.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_function.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_fundamental.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_implicitly_default_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_integral.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_literal_type.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_member_function_pointer.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_member_object_pointer.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_member_pointer.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_move_assignable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_move_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_assignable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_convertible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_copy_assignable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_copy_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_default_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_destructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_move_assignable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_move_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_null_pointer.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_object.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_pod.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_pointer.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_polymorphic.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_primary_template.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_reference.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_reference_wrapper.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_referenceable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_same.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_scalar.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_scoped_enum.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_signed.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_signed_integer.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_standard_layout.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_swappable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivial.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_assignable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_copy_assignable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_copy_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_copyable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_default_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_destructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_move_assignable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_move_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_unbounded_array.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_union.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_unsigned.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_unsigned_integer.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_valid_expansion.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_void.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_volatile.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/lazy.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/make_32_64_or_128_bit.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/make_const_lvalue_ref.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/make_signed.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/make_unsigned.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/maybe_const.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/nat.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/negation.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/promote.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/rank.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_all_extents.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_const.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_const_ref.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_cv.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_cvref.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_extent.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_pointer.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_reference.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_volatile.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/result_of.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/type_identity.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/type_list.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/underlying_type.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/void_t.h",
"//buildtools/third_party/libc++/trunk/include/__undef_macros",
"//buildtools/third_party/libc++/trunk/include/__utility/as_const.h",
"//buildtools/third_party/libc++/trunk/include/__utility/auto_cast.h",
"//buildtools/third_party/libc++/trunk/include/__utility/cmp.h",
"//buildtools/third_party/libc++/trunk/include/__utility/convert_to_integral.h",
"//buildtools/third_party/libc++/trunk/include/__utility/declval.h",
"//buildtools/third_party/libc++/trunk/include/__utility/exchange.h",
"//buildtools/third_party/libc++/trunk/include/__utility/forward.h",
@@ -417,6 +657,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__utility/transaction.h",
"//buildtools/third_party/libc++/trunk/include/__utility/unreachable.h",
"//buildtools/third_party/libc++/trunk/include/__variant/monostate.h",
"//buildtools/third_party/libc++/trunk/include/__verbose_abort",
"//buildtools/third_party/libc++/trunk/include/algorithm",
"//buildtools/third_party/libc++/trunk/include/any",
"//buildtools/third_party/libc++/trunk/include/array",
@@ -512,7 +753,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/map",
"//buildtools/third_party/libc++/trunk/include/math.h",
"//buildtools/third_party/libc++/trunk/include/memory",
"//buildtools/third_party/libc++/trunk/include/module.modulemap",
"//buildtools/third_party/libc++/trunk/include/module.modulemap.in",
"//buildtools/third_party/libc++/trunk/include/mutex",
"//buildtools/third_party/libc++/trunk/include/new",
"//buildtools/third_party/libc++/trunk/include/numbers",
@@ -532,6 +773,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/span",
"//buildtools/third_party/libc++/trunk/include/sstream",
"//buildtools/third_party/libc++/trunk/include/stack",
"//buildtools/third_party/libc++/trunk/include/stdatomic.h",
"//buildtools/third_party/libc++/trunk/include/stdbool.h",
"//buildtools/third_party/libc++/trunk/include/stddef.h",
"//buildtools/third_party/libc++/trunk/include/stdexcept",

View File

@@ -18,4 +18,4 @@
}
]
}
}
}

View File

@@ -72,9 +72,8 @@ BrowserWindow.getAllWindows = () => {
BrowserWindow.getFocusedWindow = () => {
for (const window of BrowserWindow.getAllWindows()) {
const hasWC = window.webContents && !window.webContents.isDestroyed();
if (!window.isDestroyed() && hasWC) {
if (window.isFocused() || window.isDevToolsFocused()) return window;
if (!window.isDestroyed() && window.webContents && !window.webContents.isDestroyed()) {
if (window.isFocused() || window.webContents.isDevToolsFocused()) return window;
}
}
return null;

View File

@@ -2,7 +2,4 @@ import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl';
const ipcMain = new IpcMainImpl();
// Do not throw exception when channel name is "error".
ipcMain.on('error', () => {});
export default ipcMain;

View File

@@ -9,12 +9,15 @@ import { ipcMainInternal } from '@electron/internal/browser/ipc-main-internal';
import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-utils';
import { MessagePortMain } from '@electron/internal/browser/message-port-main';
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl';
// session is not used here, the purpose is to make sure session is initialized
// before the webContents module.
// eslint-disable-next-line
session
const webFrameMainBinding = process._linkedBinding('electron_browser_web_frame_main');
let nextId = 0;
const getNextId = function () {
return ++nextId;
@@ -170,13 +173,13 @@ WebContents.prototype.printToPDF = async function (options) {
headerTemplate: '',
footerTemplate: '',
printBackground: false,
scale: 1,
scale: 1.0,
paperWidth: 8.5,
paperHeight: 11,
marginTop: 0,
marginBottom: 0,
marginLeft: 0,
marginRight: 0,
paperHeight: 11.0,
marginTop: 0.4,
marginBottom: 0.4,
marginLeft: 0.4,
marginRight: 0.4,
pageRanges: '',
preferCSSPageSize: false
};
@@ -206,7 +209,7 @@ WebContents.prototype.printToPDF = async function (options) {
if (typeof options.scale !== 'number') {
return Promise.reject(new Error('scale must be a Number'));
}
printSettings.scaleFactor = options.scale;
printSettings.scale = options.scale;
}
const { pageSize } = options;
@@ -446,12 +449,14 @@ WebContents.prototype.loadURL = function (url, options) {
const removeListeners = () => {
this.removeListener('did-finish-load', finishListener);
this.removeListener('did-fail-load', failListener);
this.removeListener('did-navigate-in-page', finishListener);
this.removeListener('did-start-navigation', navigationListener);
this.removeListener('did-stop-loading', stopLoadingListener);
this.removeListener('destroyed', stopLoadingListener);
};
this.on('did-finish-load', finishListener);
this.on('did-fail-load', failListener);
this.on('did-navigate-in-page', finishListener);
this.on('did-start-navigation', navigationListener);
this.on('did-stop-loading', stopLoadingListener);
this.on('destroyed', stopLoadingListener);
@@ -533,6 +538,11 @@ const addReturnValueToEvent = (event: Electron.IpcMainEvent) => {
});
};
const getWebFrameForEvent = (event: Electron.IpcMainEvent | Electron.IpcMainInvokeEvent) => {
if (!event.processId || !event.frameId) return null;
return webFrameMainBinding.fromIdOrNull(event.processId, event.frameId);
};
const commandLine = process._linkedBinding('electron_common_command_line');
const environment = process._linkedBinding('electron_common_environment');
@@ -556,6 +566,12 @@ WebContents.prototype._init = function () {
this._windowOpenHandler = null;
const ipc = new IpcMainImpl();
Object.defineProperty(this, 'ipc', {
get () { return ipc; },
enumerable: true
});
// Dispatch IPC messages to the ipc module.
this.on('-ipc-message' as any, function (this: Electron.WebContents, event: Electron.IpcMainEvent, internal: boolean, channel: string, args: any[]) {
addSenderFrameToEvent(event);
@@ -564,6 +580,9 @@ WebContents.prototype._init = function () {
} else {
addReplyToEvent(event);
this.emit('ipc-message', event, channel, ...args);
const maybeWebFrame = getWebFrameForEvent(event);
maybeWebFrame && maybeWebFrame.ipc.emit(channel, event, ...args);
ipc.emit(channel, event, ...args);
ipcMain.emit(channel, event, ...args);
}
});
@@ -575,8 +594,10 @@ WebContents.prototype._init = function () {
console.error(`Error occurred in handler for '${channel}':`, error);
event.sendReply({ error: error.toString() });
};
const target = internal ? ipcMainInternal : ipcMain;
if ((target as any)._invokeHandlers.has(channel)) {
const maybeWebFrame = getWebFrameForEvent(event);
const targets: (ElectronInternal.IpcMainInternal| null)[] = internal ? [ipcMainInternal] : [maybeWebFrame && maybeWebFrame.ipc, ipc, ipcMain];
const target = targets.find(target => target && (target as any)._invokeHandlers.has(channel));
if (target) {
(target as any)._invokeHandlers.get(channel)(event, ...args);
} else {
event._throw(`No handler registered for '${channel}'`);
@@ -590,10 +611,13 @@ WebContents.prototype._init = function () {
ipcMainInternal.emit(channel, event, ...args);
} else {
addReplyToEvent(event);
if (this.listenerCount('ipc-message-sync') === 0 && ipcMain.listenerCount(channel) === 0) {
const maybeWebFrame = getWebFrameForEvent(event);
if (this.listenerCount('ipc-message-sync') === 0 && ipc.listenerCount(channel) === 0 && ipcMain.listenerCount(channel) === 0 && (!maybeWebFrame || maybeWebFrame.ipc.listenerCount(channel) === 0)) {
console.warn(`WebContents #${this.id} called ipcRenderer.sendSync() with '${channel}' channel without listeners.`);
}
this.emit('ipc-message-sync', event, channel, ...args);
maybeWebFrame && maybeWebFrame.ipc.emit(channel, event, ...args);
ipc.emit(channel, event, ...args);
ipcMain.emit(channel, event, ...args);
}
});
@@ -601,6 +625,9 @@ WebContents.prototype._init = function () {
this.on('-ipc-ports' as any, function (event: Electron.IpcMainEvent, internal: boolean, channel: string, message: any, ports: any[]) {
addSenderFrameToEvent(event);
event.ports = ports.map(p => new MessagePortMain(p));
const maybeWebFrame = getWebFrameForEvent(event);
maybeWebFrame && maybeWebFrame.ipc.emit(channel, event, message);
ipc.emit(channel, event, message);
ipcMain.emit(channel, event, message);
});
@@ -813,6 +840,10 @@ export function fromId (id: string) {
return binding.fromId(id);
}
export function fromFrame (frame: Electron.WebFrameMain) {
return binding.fromFrame(frame);
}
export function fromDevToolsTargetId (targetId: string) {
return binding.fromDevToolsTargetId(targetId);
}

View File

@@ -1,7 +1,16 @@
import { MessagePortMain } from '@electron/internal/browser/message-port-main';
import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl';
const { WebFrameMain, fromId } = process._linkedBinding('electron_browser_web_frame_main');
Object.defineProperty(WebFrameMain.prototype, 'ipc', {
get () {
const ipc = new IpcMainImpl();
Object.defineProperty(this, 'ipc', { value: ipc });
return ipc;
}
});
WebFrameMain.prototype.send = function (channel, ...args) {
if (typeof channel !== 'string') {
throw new Error('Missing required channel argument');

View File

@@ -4,6 +4,13 @@ import { IpcMainInvokeEvent } from 'electron/main';
export class IpcMainImpl extends EventEmitter {
private _invokeHandlers: Map<string, (e: IpcMainInvokeEvent, ...args: any[]) => void> = new Map();
constructor () {
super();
// Do not throw exception when channel name is "error".
this.on('error', () => {});
}
handle: Electron.IpcMain['handle'] = (method, fn) => {
if (this._invokeHandlers.has(method)) {
throw new Error(`Attempted to register a second handler for '${method}'`);

View File

@@ -1,6 +1,3 @@
import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl';
export const ipcMainInternal = new IpcMainImpl() as ElectronInternal.IpcMainInternal;
// Do not throw exception when channel name is "error".
ipcMainInternal.on('error', () => {});

23
lib/common/.eslintrc.json Normal file
View File

@@ -0,0 +1,23 @@
{
"rules": {
"no-restricted-imports": [
"error",
{
"paths": [
"electron",
"electron/main",
"electron/renderer"
],
"patterns": [
"./*",
"../*",
"@electron/internal/browser/*",
"@electron/internal/isolated_renderer/*",
"@electron/internal/renderer/*",
"@electron/internal/sandboxed_worker/*",
"@electron/internal/worker/*"
]
}
]
}
}

View File

@@ -1,5 +1,6 @@
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
// eslint-disable-next-line no-restricted-imports
import type * as ipcRendererUtilsModule from '@electron/internal/renderer/ipc-renderer-internal-utils';
const clipboard = process._linkedBinding('electron_common_clipboard');

View File

@@ -0,0 +1,18 @@
{
"rules": {
"no-restricted-imports": [
"error",
{
"paths": [
"electron",
"electron/main"
],
"patterns": [
"./*",
"../*",
"@electron/internal/browser/*"
]
}
]
}
}

View File

@@ -0,0 +1,18 @@
{
"rules": {
"no-restricted-imports": [
"error",
{
"paths": [
"electron",
"electron/main"
],
"patterns": [
"./*",
"../*",
"@electron/internal/browser/*"
]
}
]
}
}

View File

@@ -1,4 +1,4 @@
import { ipcRenderer } from 'electron';
import { ipcRenderer } from 'electron/renderer';
import { ipcRendererInternal } from '@electron/internal/renderer/ipc-renderer-internal';
import type * as webViewInitModule from '@electron/internal/renderer/web-view/web-view-init';

View File

@@ -2,7 +2,7 @@ import { internalContextBridge } from '@electron/internal/renderer/api/context-b
import { ipcRendererInternal } from '@electron/internal/renderer/ipc-renderer-internal';
import * as ipcRendererUtils from '@electron/internal/renderer/ipc-renderer-internal-utils';
import { webFrame } from 'electron/renderer';
import { IPC_MESSAGES } from '../common/ipc-messages';
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
const { contextIsolationEnabled } = internalContextBridge;

View File

@@ -1,4 +1,4 @@
import { webFrame, WebFrame } from 'electron';
import { webFrame, WebFrame } from 'electron/renderer';
import * as ipcRendererUtils from '@electron/internal/renderer/ipc-renderer-internal-utils';
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';

View File

@@ -186,7 +186,10 @@ export class SrcAttribute extends WebViewAttribute {
opts.userAgent = useragent;
}
(this.webViewImpl.webviewNode as Electron.WebviewTag).loadURL(this.getValue(), opts);
(this.webViewImpl.webviewNode as Electron.WebviewTag).loadURL(this.getValue(), opts)
.catch(err => {
console.error('Unexpected error while loading URL', err);
});
}
}

View File

@@ -0,0 +1,18 @@
{
"rules": {
"no-restricted-imports": [
"error",
{
"paths": [
"electron",
"electron/main"
],
"patterns": [
"./*",
"../*",
"@electron/internal/browser/*"
]
}
]
}
}

18
lib/worker/.eslintrc.json Normal file
View File

@@ -0,0 +1,18 @@
{
"rules": {
"no-restricted-imports": [
"error",
{
"paths": [
"electron",
"electron/main"
],
"patterns": [
"./*",
"../*",
"@electron/internal/browser/*"
]
}
]
}
}

View File

@@ -70,8 +70,30 @@ function isInstalled () {
// unzips and makes path.txt point at the correct executable
function extractFile (zipPath) {
return extract(zipPath, { dir: path.join(__dirname, 'dist') })
.then(() => fs.promises.writeFile(path.join(__dirname, 'path.txt'), platformPath));
return new Promise((resolve, reject) => {
const distPath = process.env.ELECTRON_OVERRIDE_DIST_PATH || path.join(__dirname, 'dist');
extract(zipPath, { dir: path.join(__dirname, 'dist') })
.then(() => {
// If the zip contains an "electron.d.ts" file,
// move that up
const srcTypeDefPath = path.join(distPath, 'electron.d.ts');
const targetTypeDefPath = path.join(__dirname, 'electron.d.ts');
const hasTypeDefinitions = fs.existsSync(srcTypeDefPath);
if (hasTypeDefinitions) {
try {
fs.renameSync(srcTypeDefPath, targetTypeDefPath);
} catch (err) {
reject(err);
}
}
// Write a "path.txt" file.
return fs.promises.writeFile(path.join(__dirname, 'path.txt'), platformPath);
})
.catch((err) => reject(err));
});
}
function getPlatformPath () {

View File

@@ -1,10 +1,11 @@
{
"name": "electron",
"version": "21.0.0-nightly.20220803",
"version": "0.0.0-development",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {
"@azure/storage-blob": "^12.9.0",
"@electron/asar": "^3.2.1",
"@electron/docs-parser": "^0.12.4",
"@electron/typescript-definitions": "^8.9.5",
"@octokit/auth-app": "^2.10.0",
@@ -31,7 +32,6 @@
"@types/webpack-env": "^1.16.3",
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.4.1",
"asar": "^3.1.0",
"aws-sdk": "^2.814.0",
"check-for-leaks": "^1.2.1",
"colors": "1.4.0",
@@ -146,4 +146,4 @@
"resolutions": {
"nan": "nodejs/nan#16fa32231e2ccd89d2804b3f765319128b20c4ac"
}
}
}

View File

@@ -76,7 +76,6 @@ chore_provide_iswebcontentscreationoverridden_with_full_params.patch
fix_properly_honor_printing_page_ranges.patch
export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch
fix_export_zlib_symbols.patch
don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch
web_contents.patch
webview_fullscreen.patch
disable_unload_metrics.patch
@@ -115,3 +114,16 @@ short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch
chore_add_electron_deps_to_gitignores.patch
chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch
add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch
add_electron_deps_to_license_credits_file.patch
feat_add_set_can_resize_mutator.patch
fix_revert_emulationhandler_update_functions_to_early_return.patch
fix_return_v8_value_from_localframe_requestexecutescript.patch
disable_optimization_guide_for_preconnect_feature.patch
fix_the_gn_gen_for_components_segmentation_platform.patch
fix_crash_loading_non-standard_schemes_in_iframes.patch
create_browser_v8_snapshot_file_name_fuse.patch
cherry-pick-c83640db21b5.patch
fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch
build_allow_electron_to_use_exec_script.patch
cherry-pick-933cc81c6bad.patch

View File

@@ -10,7 +10,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
3. Ctrl-Shift-= and Ctrl-Plus show up as such
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 9fca6ff3e62204095ff0edc6fafce3a61cd2ff5c..089f8b818018a600cc8c90811f09374a1f702d8b 100644
index e032433d7096a941132c25528781ecbf375eb9af..33d88f947bc9a0a4795f1584e114952f942b277b 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -11,6 +11,7 @@
@@ -44,7 +44,7 @@ index 9fca6ff3e62204095ff0edc6fafce3a61cd2ff5c..089f8b818018a600cc8c90811f09374a
}
#if BUILDFLAG(IS_MAC)
@@ -447,7 +457,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
@@ -445,7 +455,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
const std::u16string& shortcut) const {
std::u16string result = shortcut;
@@ -53,7 +53,7 @@ index 9fca6ff3e62204095ff0edc6fafce3a61cd2ff5c..089f8b818018a600cc8c90811f09374a
result = ApplyModifierToAcceleratorString(result, IDS_APP_SHIFT_KEY);
// Note that we use 'else-if' in order to avoid using Ctrl+Alt as a shortcut.
@@ -455,7 +465,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
@@ -453,7 +463,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
// more information.
if (IsCtrlDown())
result = ApplyModifierToAcceleratorString(result, IDS_APP_CTRL_KEY);

View File

@@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
This should be upstreamed.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index b692a49b71661b8394c1126250fb150653aece97..c087c0f99a15edd3a9c776a68c76b2cf46257123 100644
index d435206f773dd30086ae81868412bc28029935d8..a0856c214d962199a2e51c7bd14f0f676d35507e 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -239,6 +239,10 @@ int GpuMain(MainFunctionParams parameters) {
@@ -24,16 +24,16 @@ index b692a49b71661b8394c1126250fb150653aece97..c087c0f99a15edd3a9c776a68c76b2cf
// We are experiencing what appear to be memory-stomp issues in the GPU
// process. These issues seem to be impacting the task executor and listeners
// registered to it. Create the task executor on the heap to guard against
@@ -337,7 +341,6 @@ int GpuMain(MainFunctionParams parameters) {
ChildProcess gpu_process(io_thread_type);
DCHECK(base::ThreadPoolInstance::Get()->WasStarted());
@@ -323,7 +327,6 @@ int GpuMain(MainFunctionParams parameters) {
const_cast<base::CommandLine*>(&command_line), gpu_preferences);
const bool dead_on_arrival = !init_success;
- auto* client = GetContentClient()->gpu();
if (client)
client->PostIOThreadCreated(gpu_process.io_task_runner());
if (client) {
client->PostSandboxInitialized();
}
diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h
index 04274b751b498456fc4b269bfbc6399b4f27d3ed..2fb98baf0df4e191e5e18fd7055cc2d92a2156df 100644
index a5d868b9e409c986bc85dfd71bb0363b5fa22145..9abe1cf5b2cc8ce60387ddf81b7c13aff9c178c4 100644
--- a/content/public/gpu/content_gpu_client.h
+++ b/content/public/gpu/content_gpu_client.h
@@ -29,6 +29,10 @@ class CONTENT_EXPORT ContentGpuClient {

View File

@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
context, which can cause some preload scripts to trip.
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index 5a7d3da58451f491ed6dfabd3bc31a645843bb60..36cbf8c5c01330acc8b3a708bd6481ede21d73be 100644
index 7d169540590b83924766b1d423dc1bc46ab35250..f5bbb6ab26bd714d667236071a2eb0a5794a5631 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -136,6 +136,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -23,10 +23,10 @@ index 5a7d3da58451f491ed6dfabd3bc31a645843bb60..36cbf8c5c01330acc8b3a708bd6481ed
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 4a69ce45890fd9ab730eef460396ab495b7a332a..3e186230715aaf840959a93038167749e3735a08 100644
index 8199122b2d759aa8b27affabe67b108fb9a16c38..97cf24ad5f4a64322f242b0c339a807e3edb23fc 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4435,6 +4435,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4345,6 +4345,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,10 +40,10 @@ index 4a69ce45890fd9ab730eef460396ab495b7a332a..3e186230715aaf840959a93038167749
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 351a3a257a3eca98c4a2caf724714cbc788b5d72..73dbb5a289411ea32f06cb1ea50ef98153923101 100644
index c8e822502d1b18c701a303024c3cba7e434d7829..89a048fbdaec8a8ea184790b78b0c63cfda7d171 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -606,6 +606,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -588,6 +588,8 @@ class CONTENT_EXPORT RenderFrameImpl
uint32_t ng_call_count) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;
@@ -53,10 +53,10 @@ index 351a3a257a3eca98c4a2caf724714cbc788b5d72..73dbb5a289411ea32f06cb1ea50ef981
int world_id) override;
void DidChangeScrollOffset() override;
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index acb427e4a6688f14f4a6ceaec8bf3988525c5e08..35623174f16399d5fff637a07554e43c55f902d1 100644
index 4ef7353157272a623cea6b086b84da72ca795fca..548f6afd429695088bd83743fa6f6c1cd4197276 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -606,6 +606,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -584,6 +584,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
@@ -79,7 +79,7 @@ index c8af53d40eaa1dd3a0067948a8cda80d1599cee3..4de918ee52efa7ec27a21aa2f57616d3
if (World().IsMainWorld()) {
GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index 27b366933ce11a029920b9f85060f8cce8deaacd..110996a9d55c1ba779e8aff598e9847dd6a38d86 100644
index 83a62e23b1d395b0aa545de5b828c24196cccc6d..0ca8163eb9ab87aead27bc8b2ee9e614d7e1d8c7 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -301,6 +301,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -92,7 +92,7 @@ index 27b366933ce11a029920b9f85060f8cce8deaacd..110996a9d55c1ba779e8aff598e9847d
int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index 7cbb31ddff83ea89ae879dfe190b62a8cdbeb7cf..ebc2f572b3340b7ca8719073afda8d266b18cbe5 100644
index 2ac22a0410eea7f67cc7eb066879da649f7c6a0e..53ec3d177afbd75b4e67c6ab847094994c291dcb 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -273,6 +273,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -110,7 +110,7 @@ index 7cbb31ddff83ea89ae879dfe190b62a8cdbeb7cf..ebc2f572b3340b7ca8719073afda8d26
v8::Local<v8::Context> context,
int32_t world_id) {
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index c95ef4a4a3f9d40e0e4bedf6fc42225190626c42..36cc932782437b9f5d301416f5a4e8f48c3c837a 100644
index c974fa2f7c7f9c2aa5f075ec4aeb887d0b104453..b4ed9b2fadcfad7676387045b8581eb8d33e89e8 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -123,10 +123,10 @@ index c95ef4a4a3f9d40e0e4bedf6fc42225190626c42..36cc932782437b9f5d301416f5a4e8f4
int32_t world_id) override;
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index d44adfd65bd9a71996cdd323a5220d2dcaa09de2..1011a318a7d79186abe556d03f78badc725c802a 100644
index a2d7e97958d378dc5d37524f2f5516205c010749..e3f605938b3eea7f1c4dfac8e3c25014ebd15476 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -366,6 +366,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
@@ -367,6 +367,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) override {}

View File

@@ -0,0 +1,45 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Tue, 9 Aug 2022 12:35:36 -0500
Subject: add electron deps to license credits file
Ensure that licenses for the dependencies introduced by Electron
are included in `LICENSES.chromium.html`
diff --git a/tools/licenses.py b/tools/licenses.py
index a58dbf44370baabbfa2986c734c96a210cc16f1d..1d6934460f788ab76275710e727fb062f5c92b5b 100755
--- a/tools/licenses.py
+++ b/tools/licenses.py
@@ -347,6 +347,32 @@ SPECIAL_CASES = {
"License File":
"/third_party/swiftshader/third_party/SPIRV-Headers/LICENSE",
},
+
+ os.path.join('third_party', 'electron_node'): {
+ "Name": "Node.js",
+ "URL": "https://github.com/nodejs/node",
+ "License": "MIT",
+ "License File": "/third_party/electron_node/LICENSE",
+ },
+ os.path.join('third_party', 'squirrel.mac'): {
+ "Name": "Squirrel",
+ "URL": "https://github.com/Squirrel/Squirrel.Mac",
+ "License": "MIT",
+ "License File": "/third_party/squirrel.mac/LICENSE",
+ },
+ os.path.join('third_party', 'squirrel.mac', 'vendor', 'mantle'): {
+ "Name": "Mantle",
+ "URL": "https://github.com/Mantle/Mantle",
+ "License": "MIT",
+ "License File": "/third_party/squirrel.mac/vendor/mantle/LICENSE.md",
+ },
+ os.path.join('third_party', 'squirrel.mac', 'vendor', 'ReactiveObjC'): {
+ "Name": "ReactiveObjC",
+ "URL": "https://github.com/ReactiveCocoa/ReactiveObjC",
+ "License": "MIT",
+ "License File":
+ "/third_party/squirrel.mac/vendor/ReactiveObjC/LICENSE.md",
+ },
}
# Special value for 'License File' field used to indicate that the license file

View File

@@ -8,10 +8,10 @@ decorations in maximized mode where needed, preventing empty space caused
by decoration shadows and rounded titlebars around the window while maximized.
diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc
index 50c01fb42bc1a7350fae4773f1b549355c6cdc25..ab49a67e3b20cd240f532cfbf868533bb1f293d8 100644
index dd42b1e87cf30413f96fdcfed9d8dc8c04fd537a..6c0612fb0f0dca32486d04491f9cd49a428836d1 100644
--- a/ui/gtk/gtk_ui.cc
+++ b/ui/gtk/gtk_ui.cc
@@ -511,13 +511,15 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
@@ -500,13 +500,15 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
return nullptr;
}
@@ -31,10 +31,10 @@ index 50c01fb42bc1a7350fae4773f1b549355c6cdc25..ab49a67e3b20cd240f532cfbf868533b
}
diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h
index 5206acf475346f50e0f31b7432d9b93afc3a8ad0..9f2b3cca2337b4528f9451c2fdec7c67021c949f 100644
index e73bbdf28fba1f5b96d326dd7b0fd9aaa33ba221..5a537c8f6291909392824d62fc04209ad662d59a 100644
--- a/ui/gtk/gtk_ui.h
+++ b/ui/gtk/gtk_ui.h
@@ -93,7 +93,7 @@ class GtkUi : public ui::LinuxUi {
@@ -94,7 +94,7 @@ class GtkUi : public ui::LinuxUiBase {
bool PreferDarkTheme() const override;
bool AnimationsEnabled() const override;
std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
@@ -43,7 +43,7 @@ index 5206acf475346f50e0f31b7432d9b93afc3a8ad0..9f2b3cca2337b4528f9451c2fdec7c67
base::flat_map<std::string, std::string> GetKeyboardLayoutMap() override;
std::string GetCursorThemeName() override;
int GetCursorThemeSize() override;
@@ -197,6 +197,8 @@ class GtkUi : public ui::LinuxUi {
@@ -199,6 +199,8 @@ class GtkUi : public ui::LinuxUiBase {
// while Chrome is running.
std::unique_ptr<ui::WindowFrameProvider> solid_frame_provider_;
std::unique_ptr<ui::WindowFrameProvider> transparent_frame_provider_;
@@ -139,7 +139,7 @@ index e4dbdad327eb77994ffd7f068c67336a19897915..d3ae0636455489a7c7443df85cb76995
// In GTK4, there's no way to obtain the frame thickness from CSS values
// directly, so we must determine it experimentally based on the drawn
diff --git a/ui/gtk/window_frame_provider_gtk.h b/ui/gtk/window_frame_provider_gtk.h
index da0f7c33a260f8d98a73c126def30944589001df..a2999a6dcea30a9e468f974301b3a4f03dcb8aeb 100644
index 8370c1cb3f8c3532d94e1265242cbf2397920480..2e0105ba8782dfe0a3ac169850734032c8ab071c 100644
--- a/ui/gtk/window_frame_provider_gtk.h
+++ b/ui/gtk/window_frame_provider_gtk.h
@@ -14,7 +14,7 @@ namespace gtk {
@@ -162,10 +162,10 @@ index da0f7c33a260f8d98a73c126def30944589001df..a2999a6dcea30a9e468f974301b3a4f0
} // namespace gtk
diff --git a/ui/linux/linux_ui.h b/ui/linux/linux_ui.h
index 0cd8a0e101de186e11ead65526c7f0abc60c6577..7db580ce04a407877ca4108ec087120cdb9ce2ad 100644
index dee97740309e29c29d9c9c6c757455cddc817dbb..e5b71cd2b5e9e6252fe13c54bb54e26365347e2a 100644
--- a/ui/linux/linux_ui.h
+++ b/ui/linux/linux_ui.h
@@ -176,7 +176,7 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUi
@@ -175,7 +175,7 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUi {
// if transparency is unsupported and the frame should be rendered opaque.
// The returned object is not owned by the caller and will remain alive until
// the process ends.

View File

@@ -29,7 +29,7 @@ index 1eb1d0fe4696f26e7de43fc8797c283e9e6db042..766f8d8df866ce7fbc337cecceb715cc
objects_.clear();
platform_representations_.clear();
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
index c47909313da0d7cd8a2b3cd670327011af66e3fb..0d259c21507f38124dfa46aceeacfda76cfd4a38 100644
index 96f5bf8b6b5f3ed5ab25e15845f0de455eb68e0b..e6718a893e1bc5c970245c8265c95dda5d5fa2ff 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.h
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
@@ -84,6 +84,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {

View File

@@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 261e1dda1e128e22d15f3454f9012265db45bd74..98b130f0791d1ca2d59ef62151df7e60f3f40831 100644
index 5c03f1194643c6f7302131404f7d869502f1e18b..fa990e6a444d5321213d956b01ba89ef21d57bd2 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -666,6 +666,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -659,6 +659,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@@ -22,10 +22,10 @@ index 261e1dda1e128e22d15f3454f9012265db45bd74..98b130f0791d1ca2d59ef62151df7e60
return is_active();
}
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index 3ccc771a82992ae70c770fa6d2dde92904aa17db..505091e9006f7d41fa8d02e603afef1d10b35bf4 100644
index dfefe47c77c723c1cfdc6abe0e8ff96bc5ec6ddd..8d195ec46b9a6ea830c1ff36ee740b3b8be2b341 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -138,6 +138,7 @@ class CONTENT_EXPORT RenderViewHostImpl
@@ -137,6 +137,7 @@ class CONTENT_EXPORT RenderViewHostImpl
void EnablePreferredSizeMode() override;
void WriteIntoTrace(perfetto::TracedProto<TraceProto> context) const override;
@@ -34,7 +34,7 @@ index 3ccc771a82992ae70c770fa6d2dde92904aa17db..505091e9006f7d41fa8d02e603afef1d
void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences);
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
index 4d2a4c6746e1dbfc619faf2e16eaa4948d74e372..6c9f190ff595234eca18ff20ca0655da4689b7a2 100644
index 2e4af843d7d0bbef5b7e6357de73355068b38948..77c69de4a541c56389ae11330f67c5fb6bbc4d2a 100644
--- a/content/public/browser/render_view_host.h
+++ b/content/public/browser/render_view_host.h
@@ -77,6 +77,9 @@ class CONTENT_EXPORT RenderViewHost {
@@ -47,36 +47,23 @@ index 4d2a4c6746e1dbfc619faf2e16eaa4948d74e372..6c9f190ff595234eca18ff20ca0655da
private:
// This interface should only be implemented inside content.
friend class RenderViewHostImpl;
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 2f073474d8be6d8051606b0f07272969d3936f28..7f9ec06a10b4cba254737fabdc38dddf86137ad7 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -147,6 +147,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient {
bool was_created_by_renderer,
scoped_refptr<base::SingleThreadTaskRunner> task_runner);
+ void OnSetSchedulerThrottling(bool allowed);
+
static WindowOpenDisposition NavigationPolicyToDisposition(
blink::WebNavigationPolicy policy);
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
index 39bfc2200e924d0c589cfd07f085f182ef6853a6..bddff6d5ad3f6d08c4dc48e66ebc5319b1a5ec28 100644
index 6ff7c34463f3ce5011ea8711d23f9cd11da38d8b..2b8e313dfac2ea9fad0583bb5e98d0c385e8584a 100644
--- a/third_party/blink/public/mojom/page/page.mojom
+++ b/third_party/blink/public/mojom/page/page.mojom
@@ -108,4 +108,7 @@ interface PageBroadcast {
// Sent to whole page, but should only be used by the main frame.
SetPageBaseBackgroundColor(skia.mojom.SkColor? color);
@@ -137,4 +137,7 @@ interface PageBroadcast {
mojo_base.mojom.UnguessableToken devtools_frame_token,
RemoteFrameInterfacesFromBrowser remote_frame_interfaces,
RemoteMainFrameInterfaces remote_main_frame_interfaces);
+
+ // Whether to enable the Renderer scheduler background throttling.
+ SetSchedulerThrottling(bool allowed);
};
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
index b01562ebe042bd23e7b5184aa28bb42f98f81ecb..5392b5ac0f95eab7fef3c59fd2e9b2dc2cfb7342 100644
index 3af33a4d699b5bbfb0a1abac9408ad322a47a5ac..30bc8aa73fb46a0306ccc837a99cc4d58daef99d 100644
--- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h
@@ -361,6 +361,7 @@ class WebView {
@@ -366,6 +366,7 @@ class WebView {
// Scheduling -----------------------------------------------------------
virtual PageScheduler* Scheduler() const = 0;
@@ -85,10 +72,10 @@ index b01562ebe042bd23e7b5184aa28bb42f98f81ecb..5392b5ac0f95eab7fef3c59fd2e9b2dc
// Visibility -----------------------------------------------------------
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 390e47422a0a106d0e5746c0af0611d420af8025..9151815e6bf33a3a6980f8337f578dc90e458696 100644
index 231f76d07d8a0d3d060b30e0ff6eabe4aa33d755..40aa3b1a5c569e66b6f5d1630afe248c40d5715b 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3742,6 +3742,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3787,6 +3787,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@@ -102,7 +89,7 @@ index 390e47422a0a106d0e5746c0af0611d420af8025..9151815e6bf33a3a6980f8337f578dc9
void WebViewImpl::SetVisibilityState(
mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) {
@@ -3753,7 +3760,8 @@ void WebViewImpl::SetVisibilityState(
@@ -3798,7 +3805,8 @@ void WebViewImpl::SetVisibilityState(
}
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
GetPage()->GetPageScheduler()->SetPageVisible(
@@ -113,10 +100,10 @@ index 390e47422a0a106d0e5746c0af0611d420af8025..9151815e6bf33a3a6980f8337f578dc9
mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() {
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
index ce3a483a4c06dc56a8a71d32d4d4a7077d524c2e..1cab34e52858808bceb52556c7ad0bbaa7584225 100644
index 08cc81481cbe4fe40a7df6316db765fa2eac7fda..c5dfefd84b44de5a2c28afb2b9bd8035647da12b 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -417,6 +417,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -425,6 +425,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override;
@@ -124,7 +111,7 @@ index ce3a483a4c06dc56a8a71d32d4d4a7077d524c2e..1cab34e52858808bceb52556c7ad0bba
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -864,6 +865,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -875,6 +876,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// If true, we send IPC messages when |preferred_size_| changes.
bool send_preferred_size_changes_ = false;

View File

@@ -8,13 +8,13 @@ WebPreferences of in-process child windows, rather than relying on
process-level command line switches, as before.
diff --git a/third_party/blink/common/web_preferences/web_preferences.cc b/third_party/blink/common/web_preferences/web_preferences.cc
index 6d51f6a77c21b60ab756dbf8d4961b351a2e2b07..26b820b3ce387e01900cec4227ff290113a833c3 100644
index e5c9ebda8156c1a7c32f7eb0661dff40f022c264..8840d4be4b49b27dfb257866f6a074efc34ff869 100644
--- a/third_party/blink/common/web_preferences/web_preferences.cc
+++ b/third_party/blink/common/web_preferences/web_preferences.cc
@@ -142,6 +142,19 @@ WebPreferences::WebPreferences()
fake_no_alloc_direct_call_for_testing_enabled(false),
@@ -143,6 +143,19 @@ WebPreferences::WebPreferences()
v8_cache_options(blink::mojom::V8CacheOptions::kDefault),
record_whole_document(false),
stylus_handwriting_enabled(false),
+ // Begin Electron-specific WebPreferences.
+ context_isolation(false),
+ is_webview(false),
@@ -32,13 +32,13 @@ index 6d51f6a77c21b60ab756dbf8d4961b351a2e2b07..26b820b3ce387e01900cec4227ff2901
accelerated_video_decode_enabled(false),
animation_policy(
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
index 187fd8d9818693262256d5cbddd5e02659ba903d..28e5178361e03d1ac851fa74214931b2332dd9c2 100644
index cfd107cf7257b5c0c2482baba8964e1d2508fc8b..6a2e25a3d7700df9c59952ff19c9ce62d391005c 100644
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
@@ -148,6 +148,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
data.fake_no_alloc_direct_call_for_testing_enabled();
@@ -149,6 +149,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
out->v8_cache_options = data.v8_cache_options();
out->record_whole_document = data.record_whole_document();
out->stylus_handwriting_enabled = data.stylus_handwriting_enabled();
+ // Begin Electron-specific WebPreferences.
+ out->context_isolation = data.context_isolation();
+ out->is_webview = data.is_webview();
@@ -51,12 +51,12 @@ index 187fd8d9818693262256d5cbddd5e02659ba903d..28e5178361e03d1ac851fa74214931b2
+ out->enable_plugins = data.enable_plugins();
+ out->enable_websql = data.enable_websql();
+ out->webview_tag = data.webview_tag();
+ // End Electron-specific WebPreferences.s
+ // End Electron-specific WebPreferences.
out->cookie_enabled = data.cookie_enabled();
out->accelerated_video_decode_enabled =
data.accelerated_video_decode_enabled();
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
index 59947bfd3c042e5f7d3993967fece9b519f93472..cb2a53f6147767394585ed371744d8a140aace71 100644
index adbb4f0de4d787ac7710de06de2bf3b32dc6491f..c68a71ca2e272874420d309f2154cf89cf99b7ec 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
@@ -10,6 +10,7 @@
@@ -67,10 +67,10 @@ index 59947bfd3c042e5f7d3993967fece9b519f93472..cb2a53f6147767394585ed371744d8a1
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h"
@@ -154,6 +155,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
blink::mojom::V8CacheOptions v8_cache_options;
bool record_whole_document;
@@ -159,6 +160,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
// If true, stylus handwriting recognition to text input will be available in
// editable input fields which are non-password type.
bool stylus_handwriting_enabled;
+ // Begin Electron-specific WebPreferences.
+ bool context_isolation;
+ bool is_webview;
@@ -84,12 +84,11 @@ index 59947bfd3c042e5f7d3993967fece9b519f93472..cb2a53f6147767394585ed371744d8a1
+ bool enable_websql;
+ bool webview_tag;
+ // End Electron-specific WebPreferences.
+
// This flags corresponds to a Page's Settings' setCookieEnabled state. It
// only controls whether or not the "document.cookie" field is properly
// connected to the backing store, for instance if you wanted to be able to
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
index bd425a5869477de9095c6a41c683609d065b08c0..c7ba3ff52c9de01028c9e2be214e20cd91cbf309 100644
index fa2db0ccc2d9f72aa4976816548df31f83c2ef54..ab896b217be1f8695c6d05414252a37c8086369d 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
@@ -6,6 +6,7 @@
@@ -100,8 +99,8 @@ index bd425a5869477de9095c6a41c683609d065b08c0..c7ba3ff52c9de01028c9e2be214e20cd
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
@@ -428,6 +429,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
return r.record_whole_document;
@@ -438,6 +439,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
return r.stylus_handwriting_enabled;
}
+ // Begin Electron-specific WebPreferences.
@@ -154,7 +153,7 @@ index bd425a5869477de9095c6a41c683609d065b08c0..c7ba3ff52c9de01028c9e2be214e20cd
return r.cookie_enabled;
}
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
index 738ac646e075f7a37ba2a263c7799a755e63d3fb..40ab2a4b9a1f9de5f201502adebc166a48fccd35 100644
index 656ed9364bc7b5874273797f3587d5d74f2c6bdb..e8e990b10890cca95ecc8927222e622eee8b888f 100644
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
@@ -10,6 +10,7 @@ import "third_party/blink/public/mojom/v8_cache_options.mojom";
@@ -165,10 +164,10 @@ index 738ac646e075f7a37ba2a263c7799a755e63d3fb..40ab2a4b9a1f9de5f201502adebc166a
enum PointerType {
kPointerNone = 1, // 1 << 0
@@ -206,6 +207,20 @@ struct WebPreferences {
V8CacheOptions v8_cache_options;
bool record_whole_document;
@@ -210,6 +211,19 @@ struct WebPreferences {
// If true, stylus handwriting recognition to text input will be available in
// editable input fields which are non-password type.
bool stylus_handwriting_enabled;
+ // Begin Electron-specific WebPreferences.
+ bool context_isolation;
+ bool is_webview;
@@ -182,7 +181,6 @@ index 738ac646e075f7a37ba2a263c7799a755e63d3fb..40ab2a4b9a1f9de5f201502adebc166a
+ bool enable_websql;
+ bool webview_tag;
+ // End Electron-specific WebPreferences.
+
// This flags corresponds to a Page's Settings' setCookieEnabled state. It
// only controls whether or not the "document.cookie" field is properly
// connected to the backing store, for instance if you wanted to be able to

View File

@@ -6,7 +6,7 @@ Subject: Allow setting secondary label via SimpleMenuModel
Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976
diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
index 20a3b1efcb52be5e10dc184df620ec8102f2aff3..dfebc65b2ce180e4cd175ab8d09ad7e16f6b8df5 100644
index 6e1ed6b05b9358a46c796ac175a6556703477a1f..f138d6dc153694c2c3fbb8c98d9557e5bab8214e 100644
--- a/ui/base/models/simple_menu_model.cc
+++ b/ui/base/models/simple_menu_model.cc
@@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
@@ -21,36 +21,36 @@ index 20a3b1efcb52be5e10dc184df620ec8102f2aff3..dfebc65b2ce180e4cd175ab8d09ad7e1
ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
int command_id) const {
return ImageModel();
@@ -304,6 +309,11 @@ void SimpleMenuModel::SetLabel(int index, const std::u16string& label) {
@@ -311,6 +316,11 @@ void SimpleMenuModel::SetLabel(size_t index, const std::u16string& label) {
MenuItemsChanged();
}
+void SimpleMenuModel::SetSecondaryLabel(int index, const std::u16string& secondary_label) {
+void SimpleMenuModel::SetSecondaryLabel(size_t index, const std::u16string& secondary_label) {
+ items_[ValidateItemIndex(index)].secondary_label = secondary_label;
+ MenuItemsChanged();
+}
+
void SimpleMenuModel::SetMinorText(int index,
void SimpleMenuModel::SetMinorText(size_t index,
const std::u16string& minor_text) {
items_[ValidateItemIndex(index)].minor_text = minor_text;
@@ -396,6 +406,12 @@ std::u16string SimpleMenuModel::GetLabelAt(int index) const {
@@ -404,6 +414,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
return items_[ValidateItemIndex(index)].label;
}
+std::u16string SimpleMenuModel::GetSecondaryLabelAt(int index) const {
+std::u16string SimpleMenuModel::GetSecondaryLabelAt(size_t index) const {
+ if (IsItemDynamicAt(index))
+ return delegate_->GetSecondaryLabelForCommandId(GetCommandIdAt(index));
+ return items_[ValidateItemIndex(index)].secondary_label;
+}
+
std::u16string SimpleMenuModel::GetMinorTextAt(int index) const {
std::u16string SimpleMenuModel::GetMinorTextAt(size_t index) const {
return items_[ValidateItemIndex(index)].minor_text;
}
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
index eadda341710f3a2e35f0e5c6aeb65a0dcc7bf0dd..2a7cbfa33702b9a5b89d1e69d5e8d0af83735bd7 100644
index 7ecb2f6cae709af8c512cfb6cac71d449a9b39c4..b7781d44125c1d66dba90bc39f9f17b194a85665 100644
--- a/ui/base/models/simple_menu_model.h
+++ b/ui/base/models/simple_menu_model.h
@@ -49,6 +49,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -50,6 +50,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
// Some command ids have labels and icons that change over time.
virtual bool IsItemForCommandIdDynamic(int command_id) const;
virtual std::u16string GetLabelForCommandId(int command_id) const;
@@ -58,25 +58,25 @@ index eadda341710f3a2e35f0e5c6aeb65a0dcc7bf0dd..2a7cbfa33702b9a5b89d1e69d5e8d0af
// Gets the icon for the item with the specified id.
virtual ImageModel GetIconForCommandId(int command_id) const;
@@ -160,6 +161,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -167,6 +168,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
// Sets the label for the item at |index|.
void SetLabel(int index, const std::u16string& label);
void SetLabel(size_t index, const std::u16string& label);
+ // Sets the secondary_label for the item at |index|.
+ void SetSecondaryLabel(int index, const std::u16string& secondary_label);
+ void SetSecondaryLabel(size_t index, const std::u16string& secondary_label);
+
// Sets the minor text for the item at |index|.
void SetMinorText(int index, const std::u16string& minor_text);
void SetMinorText(size_t index, const std::u16string& minor_text);
@@ -199,6 +203,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
int GetCommandIdAt(int index) const override;
std::u16string GetLabelAt(int index) const override;
+ std::u16string GetSecondaryLabelAt(int index) const override;
std::u16string GetMinorTextAt(int index) const override;
ImageModel GetMinorIconAt(int index) const override;
bool IsItemDynamicAt(int index) const override;
@@ -238,6 +243,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -206,6 +210,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
ui::MenuSeparatorType GetSeparatorTypeAt(size_t index) const override;
int GetCommandIdAt(size_t index) const override;
std::u16string GetLabelAt(size_t index) const override;
+ std::u16string GetSecondaryLabelAt(size_t index) const override;
std::u16string GetMinorTextAt(size_t index) const override;
ImageModel GetMinorIconAt(size_t index) const override;
bool IsItemDynamicAt(size_t index) const override;
@@ -246,6 +251,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
int command_id = 0;
ItemType type = TYPE_COMMAND;
std::u16string label;

View File

@@ -15,7 +15,7 @@ Refs changes in:
This patch reverts the changes to fix associated crashes in Electron.
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
index 1ced95928589b38d76df1c460df7712e8e8c1611..2977ba7ce2f6a102f04bd9ad591fc583fd836051 100644
index 0e50579d9b1c989beee4113d6762d32b8074efb4..bbcd21ddc38a799fe4226447f9b3447f1ea54feb 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -124,14 +124,6 @@ bool Frame::Detach(FrameDetachType type) {
@@ -49,10 +49,10 @@ index 1ced95928589b38d76df1c460df7712e8e8c1611..2977ba7ce2f6a102f04bd9ad591fc583
// its owning reference back to our owning LocalFrame.
client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 5fccf35dfef38989bd68c69cfc35ac5d716ec165..dc45af36b30091b98cb37c927abd9a294c27bb71 100644
index 90cf3971e573aaec7a85ccf4b6fff9f931924bdc..bb4e80de2930b2e3213cc7c4469bb2875760ebee 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -544,10 +544,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -547,10 +547,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index 5fccf35dfef38989bd68c69cfc35ac5d716ec165..dc45af36b30091b98cb37c927abd9a29
if (!Client())
return false;
@@ -593,6 +589,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -596,6 +592,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

View File

@@ -13,7 +13,7 @@ on linux. If removing this patch doesn't cause a compile failure, it's
fine to delete!
diff --git a/components/crash/core/common/crash_key.h b/components/crash/core/common/crash_key.h
index c0771b00922c1f21ec9dba726c5c7cd51c267d69..d731c7bf168c4b8df0a46da40c9164b4ac6239f3 100644
index bf88c1180ee507c97e2613d4aba12a8e87fcfcd3..fae2b77315784f9167c0fcf4cc5330520c14b862 100644
--- a/components/crash/core/common/crash_key.h
+++ b/components/crash/core/common/crash_key.h
@@ -219,6 +219,10 @@ class CrashKeyStringCombined : public internal::CrashKeyStringCombinedImpl {

View File

@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index a1a93418b0b0d56f92647aa1087bb4485c354201..191bfe2d3922d2e65f0be10d6436c50efc3b0880 100644
index be712614ac5be3573427247d7032432f18e47a15..4ad49e65f6139b43a8f9d1041dfdd4b6951ca7a7 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -80,6 +80,7 @@

View File

@@ -0,0 +1,18 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@salesforce.com>
Date: Fri, 21 Oct 2022 16:29:06 -0700
Subject: build: allow electron to use exec_script
This is similar to the //build usecase so we're OK adding ourselves here
diff --git a/.gn b/.gn
index 7b9768eb315ef8a4d8d61bcf07d43c70f3ea9582..0857ee17a35dabc19c2a04f6a5dd7d631e4b7ee8 100644
--- a/.gn
+++ b/.gn
@@ -169,4 +169,6 @@ exec_script_whitelist =
"//tools/grit/grit_rule.gni",
"//tools/gritsettings/BUILD.gn",
+
+ "//electron/BUILD.gn"
]

View File

@@ -9,7 +9,7 @@ and can be removed when the crash in fork is resolved.
Related issue: https://github.com/electron/electron/issues/32718
diff --git a/base/allocator/allocator.gni b/base/allocator/allocator.gni
index c3c62f83553bd0d258de4d5d9ecd8b02a74f594b..3dbf4462fa056db7a4084453ef35f1b944fbd093 100644
index 674def40cfdc83432d0f3ced8ab3f570dc9e8b1b..96e5e5e145715218724f93041060df60d709839a 100644
--- a/base/allocator/allocator.gni
+++ b/base/allocator/allocator.gni
@@ -20,7 +20,7 @@ _disable_partition_alloc = is_component_build || (is_win && is_debug)

View File

@@ -13,16 +13,15 @@ This patch can be removed when enable_print_content_analysis can be more
easily enabled or disabled by default with buildflags.
diff --git a/printing/buildflags/buildflags.gni b/printing/buildflags/buildflags.gni
index 1d2b24adbb39215531bbe189d6191dba026d4f68..88b7962836cfe93a59d1569245f4815f22be355e 100644
index e57b8edde3b3e8f7a9cd580e2bcd039f1beebdff..f49cbaa980674444ccaee4a615dc99e9c630f7b8 100644
--- a/printing/buildflags/buildflags.gni
+++ b/printing/buildflags/buildflags.gni
@@ -36,8 +36,7 @@ declare_args() {
@@ -36,7 +36,7 @@ declare_args() {
# Enable snapshotting a page when printing for its content to be analyzed for
# sensitive content by enterprise users.
- enable_print_content_analysis =
- is_chromeos_ash || is_chromeos_lacros || is_win || is_linux || is_mac
+ enable_print_content_analysis = is_chromeos_ash || is_chromeos_lacros
- enable_print_content_analysis = is_chromeos || is_win || is_linux || is_mac
+ enable_print_content_analysis = is_chromeos
}
declare_args() {

View File

@@ -11,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index a9e0afc645b8bd543590e80b55a7461381373187..3d2e799541e26f5e421e20ccaff65020687314c2 100644
index 0223183c4e869e835429a52ad7d9eb381a2d21f5..47162ccaa75ea637b7ce5ed0fed976862b14c427 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -175,11 +175,16 @@ if (!is_android && !is_mac) {
@@ -176,11 +176,16 @@ if (!is_android && !is_mac) {
"common/crash_keys.h",
]
@@ -33,10 +33,10 @@ index a9e0afc645b8bd543590e80b55a7461381373187..3d2e799541e26f5e421e20ccaff65020
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 244373ba428ada917929c5161eb2c75ef1ccf8d3..556a613a6697eeea6b15894449fec884b97ec8b5 100644
index bb193ea0cb1df492e52a5023bd84852bfc3985ce..f89c54a1f73f26ca142a2764fd235111e6cbeff0 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4574,7 +4574,7 @@ static_library("browser") {
@@ -4623,7 +4623,7 @@ static_library("browser") {
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll.
@@ -46,10 +46,10 @@ index 244373ba428ada917929c5161eb2c75ef1ccf8d3..556a613a6697eeea6b15894449fec884
sources += [ "certificate_viewer_stub.cc" ]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 8c1a1b9c39a4ba00784ef91aaa81bf2453ac13e6..95e2f70445568d95351e8b1b5da71dc8e85e46cd 100644
index ade95f3592fc54e69ec8717c7542ef2eae645056..c339589fc723be5ad49cca88bddbd9ae8a649644 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -5963,7 +5963,6 @@ test("unit_tests") {
@@ -6038,7 +6038,6 @@ test("unit_tests") {
deps += [
"//chrome:other_version",
@@ -57,7 +57,7 @@ index 8c1a1b9c39a4ba00784ef91aaa81bf2453ac13e6..95e2f70445568d95351e8b1b5da71dc8
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:crash_reporter_client_win_unit_tests",
@@ -5988,6 +5987,10 @@ test("unit_tests") {
@@ -6063,6 +6062,10 @@ test("unit_tests") {
"//ui/resources",
]
@@ -68,16 +68,16 @@ index 8c1a1b9c39a4ba00784ef91aaa81bf2453ac13e6..95e2f70445568d95351e8b1b5da71dc8
ldflags = [
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
@@ -6879,7 +6882,7 @@ test("unit_tests") {
@@ -6964,7 +6967,7 @@ test("unit_tests") {
}
deps += [
- "//chrome:packed_resources_integrity_hash",
+ # "//chrome:packed_resources_integrity_hash",
"//chrome/browser/autofill_assistant/password_change/vector_icons:vector_icons",
"//chrome/browser/enterprise/connectors/analysis:features",
"//chrome/browser/media/router:test_support",
"//chrome/browser/media/router/discovery:discovery",
@@ -6993,6 +6996,10 @@ test("unit_tests") {
@@ -7083,6 +7086,10 @@ test("unit_tests") {
}
}

View File

@@ -7,7 +7,7 @@ Build libc++ as static library to compile and pass
nan tests
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
index b3e5378f711c54b76c73179e791646d4e5e4e96b..262c8e53ec25b2e91a73b5971d64dbe5d5e005a1 100644
index 01f5a1713c28f077e624fe1ea1c84fa3b514d660..3837b9ccf00b2d9f0b655a2c08e96d5020b0afbf 100644
--- a/buildtools/third_party/libc++/BUILD.gn
+++ b/buildtools/third_party/libc++/BUILD.gn
@@ -44,7 +44,11 @@ config("winver") {

View File

@@ -6,7 +6,7 @@ Subject: build: make libcxx_abi_unstable false for electron
https://nornagon.medium.com/a-libc-odyssey-973e51649063
diff --git a/build/config/c++/BUILD.gn b/build/config/c++/BUILD.gn
index 09324583a2f98621fe328ec9f0178736dabe6d2b..d57c2c16ea3475c3ad77e81bdb9700ec2f64976a 100644
index 5d222aaccd15cbcdd413094e33bd48fd3798de8f..a2653637c2735b268dc4e6174536565d9add17bf 100644
--- a/build/config/c++/BUILD.gn
+++ b/build/config/c++/BUILD.gn
@@ -29,10 +29,12 @@ config("runtime_library") {

View File

@@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index bdfc0719057218afeb61fec8f4e75298c3baa54c..9c6f51f1667d9bf1b430a83747faebf633a324c7 100644
index 753d3cb544f812689616ce7bd05d24844f20883c..1f58d6a342b0c1e0c5fd4d525a684a166f11a69d 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -7283,6 +7283,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -7313,6 +7313,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@@ -21,10 +21,10 @@ index bdfc0719057218afeb61fec8f4e75298c3baa54c..9c6f51f1667d9bf1b430a83747faebf6
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 860e52ddb3db1ccc38a7ef6e11acc0da67c98ac5..14bc2c9e77b7db69d03c00314fe55806d2a9e38c 100644
index 8e1c0feede6dc599c0bc78d6278726b16c7931df..2b393e7e7089d17a0906610c3c8979c20928a5f6 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3990,6 +3990,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4012,6 +4012,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
}
auto* new_contents_impl = new_contents.get();
@@ -39,7 +39,7 @@ index 860e52ddb3db1ccc38a7ef6e11acc0da67c98ac5..14bc2c9e77b7db69d03c00314fe55806
new_contents_impl->GetController().SetSessionStorageNamespace(
partition_config, session_storage_namespace);
@@ -4034,12 +4042,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4056,12 +4064,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@@ -53,10 +53,10 @@ index 860e52ddb3db1ccc38a7ef6e11acc0da67c98ac5..14bc2c9e77b7db69d03c00314fe55806
new_contents_impl, opener, params.target_url,
params.referrer.To<Referrer>(), params.disposition,
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index cc492885ec8ae5577c6e8702dc30749331332103..c852b894f976304e6b20908a6e66ccd698887604 100644
index 4eee5f6c069c83039bf0acee71056d8ed4ea92eb..9212926fba9d06296c9c46a95519b6ed777569ee 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -587,6 +587,10 @@ struct CreateNewWindowParams {
@@ -574,6 +574,10 @@ struct CreateNewWindowParams {
// Additional parameters for creating picture-in-picture windows.
blink.mojom.PictureInPictureWindowOptions? pip_options;
@@ -68,7 +68,7 @@ index cc492885ec8ae5577c6e8702dc30749331332103..c852b894f976304e6b20908a6e66ccd6
// Operation result when the renderer asks the browser to create a new window.
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 15620fd7b5d95eb031641e0eeb6d4c2ec74071d2..8f75315f0d4ba45314be5d2d88a417b44ba2c254 100644
index a9c96d4b463929143c7de0ec29d4afee5315fd92..2750d9f6c377b36fd1684077d9eec1cde78c856c 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -617,6 +617,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -81,10 +81,10 @@ index 15620fd7b5d95eb031641e0eeb6d4c2ec74071d2..8f75315f0d4ba45314be5d2d88a417b4
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index cadbd44a85b6117cd001c1dec120d18520ff2855..e0bfafe859b600ac5033f78d1eb5823ddda956c4 100644
index bac29d867e465c87f69ea4f28eac118718db0992..7eb47e0c73c7f0d8a0cadcf5b8163f8a5154faea 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -165,6 +165,7 @@ class NetworkService;
@@ -163,6 +163,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@@ -92,7 +92,7 @@ index cadbd44a85b6117cd001c1dec120d18520ff2855..e0bfafe859b600ac5033f78d1eb5823d
} // namespace network
namespace sandbox {
@@ -993,6 +994,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -999,6 +1000,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -102,7 +102,7 @@ index cadbd44a85b6117cd001c1dec120d18520ff2855..e0bfafe859b600ac5033f78d1eb5823d
bool opener_suppressed,
bool* no_javascript_access);
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index ef3889063b562a37fbd945fe30db0d776ecaee7a..99e8449e9c515dd70ed88546a71f83ae139178fe 100644
index 74847a4fbd4d0d897ce6aecd1b39e30bc226f8f4..3ddcc2d403a68fdc2b4b0246899cd9507ecc6195 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -26,6 +26,17 @@ namespace content {
@@ -124,7 +124,7 @@ index ef3889063b562a37fbd945fe30db0d776ecaee7a..99e8449e9c515dd70ed88546a71f83ae
const OpenURLParams& params) {
return nullptr;
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index b088cb301003359fefad0ea9ca42b96f0cf3de6c..eec7bf18d17e85bde8017d4c8e7f064987b4d4d3 100644
index 0274e3bb5cc62ce2c52be68a50b57c339fc5bba7..1ea3e1fdf067ea54ce54d31f494ac2bf42b2de3f 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -16,6 +16,7 @@
@@ -149,13 +149,13 @@ index b088cb301003359fefad0ea9ca42b96f0cf3de6c..eec7bf18d17e85bde8017d4c8e7f0649
// Notifies the delegate about the creation of a new WebContents. This
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 913b3647c4632b580fa1551f4ebfeaca6f9fe17e..9cc6a793a1ec3e53db1ef31aec37c569695b197e 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -315,6 +315,10 @@ WebView* RenderViewImpl::CreateView(
/*openee_can_access_opener_origin=*/true, !creator->IsAllowedToDownload(),
creator->IsAdSubframe());
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index d70f6df69aa604972755d1cfe0cfcd2b0369f68c..8199122b2d759aa8b27affabe67b108fb9a16c38 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6196,6 +6196,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
/*openee_can_access_opener_origin=*/true,
!GetWebFrame()->IsAllowedToDownload(), GetWebFrame()->IsAdFrame());
+ params->raw_features = features.raw_features.Utf8(
+ WTF::UTF8ConversionMode::kStrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD);
@@ -165,10 +165,10 @@ index 913b3647c4632b580fa1551f4ebfeaca6f9fe17e..9cc6a793a1ec3e53db1ef31aec37c569
// moved on send.
bool is_background_tab =
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
index d6dd69c53b66a89ea63927319d7b385f91921ea2..71748596f4d05de73263ed11b122d75a38b49616 100644
index 40b82385697d8721ef6da3d0c77544d6d0ca400c..3a2d5207fb2eeea4b016012b09c3668af8dc35b4 100644
--- a/content/web_test/browser/web_test_content_browser_client.cc
+++ b/content/web_test/browser/web_test_content_browser_client.cc
@@ -440,6 +440,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -482,6 +482,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -212,12 +212,12 @@ index 34570168ccb123f5102dcf8fa6bbf98e7c373ec6..192701e56d258da41b3724292853885e
} // namespace blink
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
index ec10f16c6e6c5507ad2fb0afe306a744885eb58e..3f7a069c3f1b8412074864eb99bf47469a699837 100644
index 5bf3339038b6a8498221d1bd222ec340d78d1b92..c4be7a96144ac53be856fbf52dff8e990aa736aa 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2084,6 +2084,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2091,6 +2091,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, entered_window);
GetWindowFeaturesFromString(features, entered_window, completed_url);
+ window_features.raw_features = features;
+

View File

@@ -0,0 +1,323 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Sat, 10 Sep 2022 05:53:49 +0000
Subject: Remove symlinks from FileChooserImpl folder upload result
FileChooserImpl is the browser-side implementation of
<input type=file>. When uploading a whole folder, it
currently uses DirectoryLister to list all the files in a
directory. The result also includes resolved symbolic links
(which may even hide deep in some subfolder), which is not a
desired behavior.
Therefore, this patch removes all symbolic links from the
result by checking each file against `base::IsLink()`. Since
the function needs blocking calls to access file data, the
job is sent to a worker pool thread.
Fixed: 1345275
Change-Id: I8ab58214c87944408c64b177e915247a7485925b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3866767
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1045491}
diff --git a/content/browser/web_contents/file_chooser_impl.cc b/content/browser/web_contents/file_chooser_impl.cc
index 7a3ea45d32c97980c141662f6a071cc517a15ad8..1aa19f7a735b444f2c33d5084edcdd14e3c2f5c5 100644
--- a/content/browser/web_contents/file_chooser_impl.cc
+++ b/content/browser/web_contents/file_chooser_impl.cc
@@ -4,8 +4,11 @@
#include "content/browser/web_contents/file_chooser_impl.h"
+#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
+#include "base/ranges/algorithm.h"
+#include "base/task/thread_pool.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/renderer_host/back_forward_cache_disable.h"
#include "content/browser/renderer_host/render_frame_host_delegate.h"
@@ -18,6 +21,19 @@
namespace content {
+namespace {
+
+std::vector<blink::mojom::FileChooserFileInfoPtr> RemoveSymlinks(
+ std::vector<blink::mojom::FileChooserFileInfoPtr> files) {
+ auto new_end = base::ranges::remove_if(
+ files, &base::IsLink,
+ [](const auto& file) { return file->get_native_file()->file_path; });
+ files.erase(new_end, files.end());
+ return files;
+}
+
+} // namespace
+
FileChooserImpl::FileSelectListenerImpl::~FileSelectListenerImpl() {
#if DCHECK_IS_ON()
if (!was_file_select_listener_function_called_) {
@@ -51,8 +67,20 @@ void FileChooserImpl::FileSelectListenerImpl::FileSelected(
"FileSelectListener::FileSelectionCanceled()";
was_file_select_listener_function_called_ = true;
#endif
- if (owner_)
- owner_->FileSelected(std::move(files), base_dir, mode);
+ if (!owner_)
+ return;
+
+ if (mode != blink::mojom::FileChooserParams::Mode::kUploadFolder) {
+ owner_->FileSelected(base_dir, mode, std::move(files));
+ return;
+ }
+
+ base::ThreadPool::PostTaskAndReplyWithResult(
+ FROM_HERE,
+ {base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
+ base::BindOnce(&RemoveSymlinks, std::move(files)),
+ base::BindOnce(&FileChooserImpl::FileSelected, owner_->GetWeakPtr(),
+ base_dir, mode));
}
void FileChooserImpl::FileSelectListenerImpl::FileSelectionCanceled() {
@@ -162,9 +190,9 @@ void FileChooserImpl::EnumerateChosenDirectory(
}
void FileChooserImpl::FileSelected(
- std::vector<blink::mojom::FileChooserFileInfoPtr> files,
const base::FilePath& base_dir,
- blink::mojom::FileChooserParams::Mode mode) {
+ blink::mojom::FileChooserParams::Mode mode,
+ std::vector<blink::mojom::FileChooserFileInfoPtr> files) {
listener_impl_ = nullptr;
if (!render_frame_host_) {
std::move(callback_).Run(nullptr);
diff --git a/content/browser/web_contents/file_chooser_impl.h b/content/browser/web_contents/file_chooser_impl.h
index b9f11f9e6a0b548cb5ab8ca721ae823e079ce6fa..b628b29a5f84264e62bb3fa9e92550787b8342de 100644
--- a/content/browser/web_contents/file_chooser_impl.h
+++ b/content/browser/web_contents/file_chooser_impl.h
@@ -37,6 +37,8 @@ class CONTENT_EXPORT FileChooserImpl : public blink::mojom::FileChooser,
// FileSelectListener overrides:
+ // TODO(xiaochengh): Move |file| to the end of the argument list to match
+ // the argument ordering of FileChooserImpl::FileSelected().
void FileSelected(std::vector<blink::mojom::FileChooserFileInfoPtr> files,
const base::FilePath& base_dir,
blink::mojom::FileChooserParams::Mode mode) override;
@@ -68,9 +70,9 @@ class CONTENT_EXPORT FileChooserImpl : public blink::mojom::FileChooser,
~FileChooserImpl() override;
- void FileSelected(std::vector<blink::mojom::FileChooserFileInfoPtr> files,
- const base::FilePath& base_dir,
- blink::mojom::FileChooserParams::Mode mode);
+ void FileSelected(const base::FilePath& base_dir,
+ blink::mojom::FileChooserParams::Mode mode,
+ std::vector<blink::mojom::FileChooserFileInfoPtr> files);
void FileSelectionCanceled();
@@ -82,6 +84,10 @@ class CONTENT_EXPORT FileChooserImpl : public blink::mojom::FileChooser,
const base::FilePath& directory_path,
EnumerateChosenDirectoryCallback callback) override;
+ base::WeakPtr<FileChooserImpl> GetWeakPtr() {
+ return weak_factory_.GetWeakPtr();
+ }
+
private:
explicit FileChooserImpl(RenderFrameHostImpl* render_frame_host);
@@ -95,6 +101,8 @@ class CONTENT_EXPORT FileChooserImpl : public blink::mojom::FileChooser,
raw_ptr<RenderFrameHostImpl> render_frame_host_;
scoped_refptr<FileSelectListenerImpl> listener_impl_;
base::OnceCallback<void(blink::mojom::FileChooserResultPtr)> callback_;
+
+ base::WeakPtrFactory<FileChooserImpl> weak_factory_{this};
};
} // namespace content
diff --git a/content/browser/web_contents/file_chooser_impl_browsertest.cc b/content/browser/web_contents/file_chooser_impl_browsertest.cc
index 5aa120cd2e9fab1492f5d0993adbb2f80a4aa732..2acd2216331bd9be56eb9705f0e9c0d3bceb9e93 100644
--- a/content/browser/web_contents/file_chooser_impl_browsertest.cc
+++ b/content/browser/web_contents/file_chooser_impl_browsertest.cc
@@ -5,14 +5,18 @@
#include "content/browser/web_contents/file_chooser_impl.h"
#include "base/bind.h"
+#include "base/files/file_util.h"
+#include "base/path_service.h"
#include "base/run_loop.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "content/public/common/content_paths.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
+#include "content/test/content_browser_test_utils_internal.h"
#include "url/gurl.h"
#include "url/url_constants.h"
@@ -143,11 +147,52 @@ IN_PROC_BROWSER_TEST_F(FileChooserImplBrowserTest,
->SetListenerFunctionCalledTrueForTesting();
std::vector<blink::mojom::FileChooserFileInfoPtr> files;
files.emplace_back(blink::mojom::FileChooserFileInfoPtr(nullptr));
- chooser->FileSelected(std::move(files), base::FilePath(),
- blink::mojom::FileChooserParams::Mode::kOpen);
+ chooser->FileSelected(base::FilePath(),
+ blink::mojom::FileChooserParams::Mode::kOpen,
+ std::move(files));
// Test passes if this run_loop.Run() returns instead of timing out.
run_loop.Run();
}
+// https://crbug.com/1345275
+IN_PROC_BROWSER_TEST_F(FileChooserImplBrowserTest, UploadFolderWithSymlink) {
+ EXPECT_TRUE(NavigateToURL(
+ shell(), GetTestUrl(".", "file_input_webkitdirectory.html")));
+
+ // The folder contains a regular file and a symbolic link.
+ // When uploading the folder, the symbolic link should be excluded.
+ base::FilePath dir_test_data;
+ ASSERT_TRUE(base::PathService::Get(DIR_TEST_DATA, &dir_test_data));
+ base::FilePath folder_to_upload =
+ dir_test_data.AppendASCII("file_chooser").AppendASCII("dir_with_symlink");
+
+ base::FilePath text_file = folder_to_upload.AppendASCII("text_file.txt");
+ base::FilePath symlink_file = folder_to_upload.AppendASCII("symlink");
+
+ // Skip the test if symbolic links are not supported.
+ {
+ base::ScopedAllowBlockingForTesting allow_blocking;
+ if (!base::IsLink(symlink_file))
+ return;
+ }
+
+ std::unique_ptr<FileChooserDelegate> delegate(
+ new FileChooserDelegate({text_file, symlink_file}, base::OnceClosure()));
+ shell()->web_contents()->SetDelegate(delegate.get());
+ EXPECT_TRUE(ExecJs(shell(),
+ "(async () => {"
+ " let listener = new Promise("
+ " resolve => fileinput.onchange = resolve);"
+ " fileinput.click();"
+ " await listener;"
+ "})()"));
+
+ EXPECT_EQ(
+ 1, EvalJs(shell(), "document.getElementById('fileinput').files.length;"));
+ EXPECT_EQ(
+ "text_file.txt",
+ EvalJs(shell(), "document.getElementById('fileinput').files[0].name;"));
+}
+
} // namespace content
diff --git a/content/test/content_browser_test_utils_internal.cc b/content/test/content_browser_test_utils_internal.cc
index 8183cb7e6547f42b27afc323fe136e2157e4dd03..dbdf244571956645c6494c4cdab514dd42dbb6c2 100644
--- a/content/test/content_browser_test_utils_internal.cc
+++ b/content/test/content_browser_test_utils_internal.cc
@@ -447,9 +447,14 @@ Shell* OpenPopup(const ToRenderFrameHost& opener,
return new_shell_observer.GetShell();
}
+FileChooserDelegate::FileChooserDelegate(std::vector<base::FilePath> files,
+ base::OnceClosure callback)
+ : files_(std::move(files)), callback_(std::move(callback)) {}
+
FileChooserDelegate::FileChooserDelegate(const base::FilePath& file,
base::OnceClosure callback)
- : file_(file), callback_(std::move(callback)) {}
+ : FileChooserDelegate(std::vector<base::FilePath>(1, file),
+ std::move(callback)) {}
FileChooserDelegate::~FileChooserDelegate() = default;
@@ -457,16 +462,18 @@ void FileChooserDelegate::RunFileChooser(
RenderFrameHost* render_frame_host,
scoped_refptr<content::FileSelectListener> listener,
const blink::mojom::FileChooserParams& params) {
- // Send the selected file to the renderer process.
- auto file_info = blink::mojom::FileChooserFileInfo::NewNativeFile(
- blink::mojom::NativeFileInfo::New(file_, std::u16string()));
+ // Send the selected files to the renderer process.
std::vector<blink::mojom::FileChooserFileInfoPtr> files;
- files.push_back(std::move(file_info));
- listener->FileSelected(std::move(files), base::FilePath(),
- blink::mojom::FileChooserParams::Mode::kOpen);
+ for (const auto& file : files_) {
+ auto file_info = blink::mojom::FileChooserFileInfo::NewNativeFile(
+ blink::mojom::NativeFileInfo::New(file, std::u16string()));
+ files.push_back(std::move(file_info));
+ }
+ listener->FileSelected(std::move(files), base::FilePath(), params.mode);
params_ = params.Clone();
- std::move(callback_).Run();
+ if (callback_)
+ std::move(callback_).Run();
}
FrameTestNavigationManager::FrameTestNavigationManager(
diff --git a/content/test/content_browser_test_utils_internal.h b/content/test/content_browser_test_utils_internal.h
index 6ae5e8f81a189702d5ed9bef003696f34c525dd3..3bf1bb93e15b0a5270262837802e140ad72a9231 100644
--- a/content/test/content_browser_test_utils_internal.h
+++ b/content/test/content_browser_test_utils_internal.h
@@ -176,9 +176,11 @@ Shell* OpenPopup(const ToRenderFrameHost& opener,
class FileChooserDelegate : public WebContentsDelegate {
public:
// Constructs a WebContentsDelegate that mocks a file dialog.
- // The mocked file dialog will always reply that the user selected |file|.
- // |callback| is invoked when RunFileChooser() is called.
+ // The mocked file dialog will always reply that the user selected |file| or
+ // |files|. |callback| is invoked when RunFileChooser() is called.
FileChooserDelegate(const base::FilePath& file, base::OnceClosure callback);
+ FileChooserDelegate(std::vector<base::FilePath> files,
+ base::OnceClosure callback);
~FileChooserDelegate() override;
// Implementation of WebContentsDelegate::RunFileChooser.
@@ -190,7 +192,7 @@ class FileChooserDelegate : public WebContentsDelegate {
const blink::mojom::FileChooserParams& params() const { return *params_; }
private:
- base::FilePath file_;
+ std::vector<base::FilePath> files_;
base::OnceClosure callback_;
blink::mojom::FileChooserParamsPtr params_;
};
diff --git a/content/test/data/file_chooser/dir_with_symlink/symlink b/content/test/data/file_chooser/dir_with_symlink/symlink
new file mode 120000
index 0000000000000000000000000000000000000000..7857c689f7043265b4e6d4dcdf6d40d0be2d3d60
--- /dev/null
+++ b/content/test/data/file_chooser/dir_with_symlink/symlink
@@ -0,0 +1 @@
+../linked_text_file.txt
\ No newline at end of file
diff --git a/content/test/data/file_chooser/dir_with_symlink/text_file.txt b/content/test/data/file_chooser/dir_with_symlink/text_file.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8e27be7d6154a1f68ea9160ef0e18691d20560dc
--- /dev/null
+++ b/content/test/data/file_chooser/dir_with_symlink/text_file.txt
@@ -0,0 +1 @@
+text
diff --git a/content/test/data/file_chooser/linked_text_file.txt b/content/test/data/file_chooser/linked_text_file.txt
new file mode 100644
index 0000000000000000000000000000000000000000..9a1f4bc60917c014eac1464ad664a0271c288b84
--- /dev/null
+++ b/content/test/data/file_chooser/linked_text_file.txt
@@ -0,0 +1 @@
+linked text file
diff --git a/content/test/data/file_input_webkitdirectory.html b/content/test/data/file_input_webkitdirectory.html
new file mode 100644
index 0000000000000000000000000000000000000000..5b7bb501f7eb5d9f28751f36380e4ad01d2da0c7
--- /dev/null
+++ b/content/test/data/file_input_webkitdirectory.html
@@ -0,0 +1 @@
+<input type="file" id="fileinput" webkitdirectory />

View File

@@ -0,0 +1,122 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <samuel.r.attard@gmail.com>
Date: Wed, 5 Oct 2022 06:03:23 +0000
Subject: build: set DTSDKBuild correctly when generating plist files
Currently we set DTSDKBuild to the version of the SDK used to build
Chromium. This value is supposed to be the build version (this is
what xcode sets it to for instance). We read this value out of the
SDK directly and use it instead.
Change-Id: Ieb7990f13095683ad8c026f027b2605ae39523a4
diff --git a/build/config/mac/mac_sdk.gni b/build/config/mac/mac_sdk.gni
index 43577925d2ef9cd79970d8307104e0abc1756583..0819d4cc1b17f216eae8c1a562b0301ba6298d57 100644
--- a/build/config/mac/mac_sdk.gni
+++ b/build/config/mac/mac_sdk.gni
@@ -40,6 +40,11 @@ declare_args() {
# will fail.
mac_sdk_official_version = "12.3"
+ # The SDK build version used when making official builds. This is a single
+ # exact version found at "System/Library/CoreServices/SystemVersion.plist"
+ # inside the SDK.
+ mac_sdk_official_build_version = "21E226"
+
# Production builds should use hermetic Xcode. If you want to do production
# builds with system Xcode to test new SDKs, set this.
# Don't set this on any bots.
@@ -103,11 +108,13 @@ if (use_system_xcode) {
find_sdk_args = [
"--print_sdk_path",
"--print_bin_path",
+ "--print_sdk_build",
mac_sdk_min,
]
find_sdk_lines =
exec_script("//build/mac/find_sdk.py", find_sdk_args, "list lines")
- mac_sdk_version = find_sdk_lines[2]
+ mac_sdk_version = find_sdk_lines[3]
+ mac_sdk_build_version = find_sdk_lines[2]
if (mac_sdk_path == "") {
mac_sdk_path = find_sdk_lines[0]
mac_bin_path = find_sdk_lines[1]
@@ -116,6 +123,7 @@ if (use_system_xcode) {
}
} else {
mac_sdk_version = mac_sdk_official_version
+ mac_sdk_build_version = mac_sdk_official_build_version
_dev = _hermetic_xcode_path + "/Contents/Developer"
_sdk = "MacOSX${mac_sdk_version}.sdk"
mac_sdk_path = _dev + "/Platforms/MacOSX.platform/Developer/SDKs/$_sdk"
diff --git a/build/config/mac/rules.gni b/build/config/mac/rules.gni
index 03073f830401c4891376a3b59e2e7a870e3d34b7..04d403054c1a83fcbbc70be7cfd239ecbec315d3 100644
--- a/build/config/mac/rules.gni
+++ b/build/config/mac/rules.gni
@@ -41,7 +41,7 @@ template("mac_info_plist") {
apple_info_plist(target_name) {
format = "xml1"
extra_substitutions = [
- "MAC_SDK_BUILD=$mac_sdk_version",
+ "MAC_SDK_BUILD=$mac_sdk_build_version",
"MAC_SDK_NAME=$mac_sdk_name$mac_sdk_version",
"MACOSX_DEPLOYMENT_TARGET=$mac_deployment_target",
"CHROMIUM_MIN_SYSTEM_VERSION=$mac_min_system_version",
diff --git a/build/mac/find_sdk.py b/build/mac/find_sdk.py
index d86f3109357a9246d570cb02992dc82552ba7c20..b2400c7e8c70957e364444f509880900ce3b641f 100755
--- a/build/mac/find_sdk.py
+++ b/build/mac/find_sdk.py
@@ -24,6 +24,7 @@ Sample Output:
from __future__ import print_function
import os
+import plistlib
import re
import subprocess
import sys
@@ -51,6 +52,9 @@ def main():
parser.add_option("--print_bin_path",
action="store_true", dest="print_bin_path", default=False,
help="Additionally print the path the toolchain bin dir.")
+ parser.add_option("--print_sdk_build",
+ action="store_true", dest="print_sdk_build", default=False,
+ help="Additionally print the build version of the SDK.")
options, args = parser.parse_args()
if len(args) != 1:
parser.error('Please specify a minimum SDK version')
@@ -80,20 +84,30 @@ def main():
if not sdks:
raise Exception('No %s+ SDK found' % min_sdk_version)
best_sdk = sorted(sdks, key=parse_version)[0]
+ sdk_name = 'MacOSX' + best_sdk + '.sdk'
+ sdk_path = os.path.join(sdk_dir, sdk_name)
if options.print_sdk_path:
- sdk_name = 'MacOSX' + best_sdk + '.sdk'
- print(os.path.join(sdk_dir, sdk_name))
+ print(sdk_path)
if options.print_bin_path:
bin_path = 'Toolchains/XcodeDefault.xctoolchain/usr/bin/'
print(os.path.join(dev_dir, bin_path))
- return best_sdk
+ if options.print_sdk_build:
+ system_version_plist = os.path.join(sdk_path,
+ 'System/Library/CoreServices/SystemVersion.plist')
+ with open(system_version_plist, 'rb') as f:
+ system_version_info = plistlib.load(f)
+ if 'ProductBuildVersion' not in system_version_info:
+ raise Exception('Failed to determine ProductBuildVersion' +
+ 'for SDK at path %s' % system_version_plist)
+ print(system_version_info['ProductBuildVersion'])
+
+ print(best_sdk)
if __name__ == '__main__':
if sys.platform != 'darwin':
raise Exception("This script only runs on Mac")
- print(main())
- sys.exit(0)
+ sys.exit(main())

View File

@@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores
Makes things like "git status" quicker when developing electron locally
diff --git a/.gitignore b/.gitignore
index d68a1b2dd91704a00be9cce6ccfa5daf7da35e1a..ab30dd802543491352d3b407f12127c04742d1ab 100644
index 651d8ec7d8e98e7588f8f182018188ab234d5c5a..1fc645a7f748d3cad8ca2f4fa9897454cb937a4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -229,6 +229,7 @@ vs-chromium-project.txt
@@ -230,6 +230,7 @@ vs-chromium-project.txt
/delegate_execute
/device/serial/device_serial_mojo.xml
/docs/website

View File

@@ -7,7 +7,7 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch
actions in the non-client caption area.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index f6b37bdec2343d45447b419aeadbe2aa19493c3c..bdbf7153f27376bd68459f9cb480bff7485c9e98 100644
index 2b1fa6a345247fdbb17bd2381ab9e74a8af40b8d..f11cefe945c33c82cafe7ac0d496f3fcfbc48931 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -1169,6 +1169,10 @@ void DesktopWindowTreeHostWin::HandleWindowScaleFactorChanged(
@@ -34,10 +34,10 @@ index 0aae49ec83b88057434af5bbfb54b10e53469918..058e5dc978e76a71fa02dc9e275592f3
Widget* GetWidget();
const Widget* GetWidget() const;
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 3b546cf67089e6677fc668b4d1d6c0863282dff5..c6810f162806b36494885b2f63982a756d4dcd38 100644
index 2dbe61a4bdf6556f6db101e47d81d37417736bd1..dec439f15a7995b14ccf4ef95651413911b5fc4f 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3129,15 +3129,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3137,15 +3137,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
SetMsgHandled(FALSE);
// We must let Windows handle the caption buttons if it's drawing them, or
// they won't work.

View File

@@ -63,10 +63,10 @@ index faa684c429e8cd5817c043db48dcbea33c6c8782..8b5991bc8279585cc0749f6816aa8a03
content::RenderFrameHost* requesting_frame,
const blink::mojom::FullscreenOptions& options) final;
diff --git a/chrome/browser/ui/ash/ash_web_view_impl.cc b/chrome/browser/ui/ash/ash_web_view_impl.cc
index 268355f22577cf21926e209a9fcdb3f52314f2ac..80f998cdb10d9955e438ba5ef4599b35c448fae2 100644
index a3083a16b1317cc58b87e13f30498bcf3e475eaf..50deda6f7ee9b2cbf57288d54a30a44022be808a 100644
--- a/chrome/browser/ui/ash/ash_web_view_impl.cc
+++ b/chrome/browser/ui/ash/ash_web_view_impl.cc
@@ -84,10 +84,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
@@ -96,10 +96,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -108,10 +108,10 @@ index 1318d5e04d5448d2b357454c3ce4207264288760..3b0324c35d5b18ed2e29264aae860c48
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index fd22d62a1346ee0f7c10659681e9a0e44535b44a..d51973a4ffdd2ea448fc3e8fab7cf3a47e867c7a 100644
index 244584b4df1fb85241212c44cca7da3e87c174f3..1e6239c111b0ea765388f384385789537f473237 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1798,12 +1798,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -1811,12 +1811,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -127,10 +127,10 @@ index fd22d62a1346ee0f7c10659681e9a0e44535b44a..d51973a4ffdd2ea448fc3e8fab7cf3a4
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 64eeec32ac70f32b71cd30f7d1adb1f12fa6fa46..8ebf50854a4fdf2cdc9b7f90844456c12902cb4b 100644
index 38ee0d848089a4abefa357e47169da871753df6e..53332516617dc196ce21d674ab6987c6de8438e0 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -843,8 +843,7 @@ class Browser : public TabStripModelObserver,
@@ -852,8 +852,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -246,10 +246,10 @@ index c6bd5c19f8a7ceec17c9e32af5296a9617f3a619..02199b439fba7fdc617b7f7980d958b7
void AddNewContents(content::WebContents* source,
std::unique_ptr<content::WebContents> new_contents,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index ad3f25362279d889e800cee3fd20240cc6d176a9..9b532970afe951f7c12629903baa39f2b8de1a5e 100644
index 47b85a2bd890485dec96e23fb2cb8f8553f5c4e2..7f04a05eec8780e735e0458c75103d9f2e9b858b 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3916,8 +3916,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -3938,8 +3938,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,
@@ -260,7 +260,7 @@ index ad3f25362279d889e800cee3fd20240cc6d176a9..9b532970afe951f7c12629903baa39f2
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
opener, source_site_instance, is_new_browsing_instance,
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index 99e8449e9c515dd70ed88546a71f83ae139178fe..4f395474d3e0e1bf7a594fe3fa3e4cb53327aa69 100644
index 3ddcc2d403a68fdc2b4b0246899cd9507ecc6195..eecc92f2ffce2c2eeb5fde977da6b94a29923b67 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -134,8 +134,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
@@ -274,7 +274,7 @@ index 99e8449e9c515dd70ed88546a71f83ae139178fe..4f395474d3e0e1bf7a594fe3fa3e4cb5
}
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index eec7bf18d17e85bde8017d4c8e7f064987b4d4d3..d5457e3a2ae96305cbd215f0340295339c7838e5 100644
index 1ea3e1fdf067ea54ce54d31f494ac2bf42b2de3f..aa9af63f6d4708660496e5892f00766281be22c9 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -317,8 +317,7 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -288,10 +288,10 @@ index eec7bf18d17e85bde8017d4c8e7f064987b4d4d3..d5457e3a2ae96305cbd215f034029533
// Allow delegate to creates a custom WebContents when
// WebContents::CreateNewWindow() is called. This function is only called
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
index 8349c8cb2078d09c9550024ae5ca845bdebfbd35..e3763eaa2c6f7ce842cf8964bf5590efd3892c61 100644
index add3f3f73b1e44401b31330cd06f8c9211c62516..a64b0d6dac663b23e6cec32c2898ae88157ad602 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
@@ -213,8 +213,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
@@ -199,8 +199,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -302,7 +302,7 @@ index 8349c8cb2078d09c9550024ae5ca845bdebfbd35..e3763eaa2c6f7ce842cf8964bf5590ef
// view is used for displaying embedded extension options, we want any
// external links to be opened in a new tab, not in a new guest view so we
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h
index 7350382146178f58960a9bf68cd959076d2d9790..a70a94d14bdfa993feab60b8e4f32e1002cf38cc 100644
index f1c474143b087988b8084ad1bdf01b8ba80327e8..47ffb7d406eb04622fffce9f0671eddab4ff8fe3 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.h
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h
@@ -58,8 +58,7 @@ class ExtensionOptionsGuest
@@ -316,10 +316,10 @@ index 7350382146178f58960a9bf68cd959076d2d9790..a70a94d14bdfa993feab60b8e4f32e10
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 9fa230c1cd95f71690f5beef7b77c9759215e3e0..f0160abfd4980d323c8e3def86df7bdf3a137dc3 100644
index 75a2534e3be7102a221378afbfef3df8e6a8555e..495fc687379c6456384acc3a1864c5f0c49ad47f 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -403,8 +403,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
@@ -399,8 +399,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -330,10 +330,10 @@ index 9fa230c1cd95f71690f5beef7b77c9759215e3e0..f0160abfd4980d323c8e3def86df7bdf
}
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
index ef6faf317dd4168adf6fd530a7da0b80f9166dec..f401659a81d4aeaf71039d71eb8fec4844497334 100644
index 26dc86a7534d9296f1b1f772ec95f5313c61061c..925152a6c1fb645dfff5bd7238b620a8344de734 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
@@ -171,8 +171,7 @@ class MimeHandlerViewGuest
@@ -170,8 +170,7 @@ class MimeHandlerViewGuest
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -372,7 +372,7 @@ index 0661fd642dcee69a7c8f955490dadf32dc0eb468..e3fa74da87513fbfcd035fa872dc938d
int opener_render_process_id,
int opener_render_frame_id,
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
index 807879aa4894e5fabe043d07d5899e5700a7c172..5044c462ccfeaeb4aeb2dd3189e40e60c835ed73 100644
index aa488570851f68e892b024c901f31b658929fc72..efe6a6bc939a6bdea0eaca65e12242e23f3e6d59 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -179,8 +179,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {

View File

@@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm,
as its not supported in the current version of chrome.
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
index f3cf8498493526d125eb42a7c42f7ad85dbc1fc2..35ec5dc4d87ecc61bd0f48be4c5d5867e9f75cce 100644
index 30da015cffeb945973d0045ce297467ab16d7db6..53e7bd0f7dbff8c620a5827abb3ba871703a4f06 100644
--- a/chrome/renderer/media/chrome_key_systems.cc
+++ b/chrome/renderer/media/chrome_key_systems.cc
@@ -17,7 +17,9 @@
@@ -20,7 +20,7 @@ index f3cf8498493526d125eb42a7c42f7ad85dbc1fc2..35ec5dc4d87ecc61bd0f48be4c5d5867
#include "components/cdm/renderer/external_clear_key_key_system_properties.h"
#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "content/public/renderer/render_thread.h"
@@ -184,12 +186,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) {
@@ -235,12 +237,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) {
// Returns whether persistent-license session can be supported.
bool CanSupportPersistentLicense() {

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