Compare commits

...

148 Commits

Author SHA1 Message Date
Electron Bot
0f7334a77e Bump v13.0.0-beta.25 2021-05-11 18:10:53 -07:00
Electron Bot
eee8bee71b Revert "Bump v13.0.0-beta.25"
This reverts commit 2795185d46.
2021-05-11 17:19:54 -07:00
Electron Bot
2795185d46 Bump v13.0.0-beta.25 2021-05-11 13:59:38 -07:00
trop[bot]
877f096d6b build: offload hash checking logic to lambda worker during release (#29105)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-05-11 13:57:32 -07:00
trop[bot]
b33bb3a860 fix: update NSView radii on fullscreen transition (#29099)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-05-11 16:44:18 +02:00
Milan Burda
86f4126051 fix: webFrame spell checker APIs crashing in sandboxed renderers (#29053) (#29087) 2021-05-10 16:42:30 -07:00
Electron Bot
f895162234 Bump v13.0.0-beta.24 2021-05-10 12:16:53 -07:00
Electron Bot
05e41f89b4 chore: bump chromium to 91.0.4472.38 (13-x-y) (#29045) 2021-05-07 09:29:33 -07:00
Electron Bot
d7378f953a Bump v13.0.0-beta.23 2021-05-07 00:28:38 -07:00
trop[bot]
ed0b654fee chore: cherry-pick 7abc7e45b2 from node (#29048)
Backports: https://github.com/nodejs/node/pull/38506

Co-authored-by: Fedor Indutny <fedor@indutny.com>
2021-05-07 00:19:03 -07:00
Electron Bot
c1c8cbf995 Bump v13.0.0-beta.22 2021-05-06 06:31:26 -07:00
trop[bot]
ab3aa3581a fix: drag region BrowserView calculations on macOS (#29017)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-05-06 20:29:06 +09:00
trop[bot]
20a43d9a72 fix: <webview> focus / blur events don't work with contextIsolation enabled (#29025)
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2021-05-06 20:25:18 +09:00
trop[bot]
27d04084c2 docs: menu must be added on whenReady (#29043)
* Add that that menu must be added on whenReady

When an application menu is added before 'whenReady' all items seem to work except 'recent documents'

This causes the issue listed here: https://github.com/electron/electron/issues/17388

* Make example more complete

* Remove semicolons

* Update docs/tutorial/recent-documents.md

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

Co-authored-by: Matthijs Groen <matthijs.groen@gmail.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2021-05-06 20:23:30 +09:00
trop[bot]
46649965c9 spec: attempt to fix flaky nativeTheme spec (#29036)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-05-05 21:49:48 -07:00
trop[bot]
bea84969d6 docs: link to BrowserView from webview page (#29008)
* docs: Link to `BrowserView` from `webview` page

* fix relative link

Co-authored-by: Hamish Macpherson <hamstu@gmail.com>
2021-05-05 11:30:52 -07:00
trop[bot]
ae67ec24f3 refactor: use "as const" for constant mappings (#29000)
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2021-05-05 15:59:47 +09:00
Electron Bot
d379693967 Bump v13.0.0-beta.21 2021-05-04 14:15:15 -07:00
Keeley Hammond
2fe16c60ea revert: build: fix dump_syms.py to work with python 3 (#28998) 2021-05-04 14:07:32 -07:00
Electron Bot
0853536e04 Revert "Bump v13.0.0-beta.21"
This reverts commit 4e48867af8.
2021-05-04 13:19:01 -07:00
Electron Bot
4e48867af8 Bump v13.0.0-beta.21 2021-05-04 11:49:07 -07:00
Samuel Attard
6bb1d1c5b0 build: import execute method in symbols zip script 2021-05-04 11:40:21 -07:00
Samuel Attard
696cc7c414 build: delete dsyms after they have been zipped in release builds 2021-05-04 11:39:58 -07:00
Samuel Attard
c0c8116a29 build: free up space on macOS some more 2021-05-04 11:39:51 -07:00
trop[bot]
a98ed69874 build: disable pseudolocales in Electron (#28995)
* build: disable pseudolocales in Electron

* Update build/args/all.gn

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

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-05-04 11:38:43 -07:00
trop[bot]
3c230ad272 build: fix dump_syms.py to work with python 3 (#28996)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-05-04 11:38:30 -07:00
Electron Bot
f93a9607b5 Revert "Bump v13.0.0-beta.21"
This reverts commit e7a944e356.
2021-05-04 09:39:00 -07:00
Electron Bot
e7a944e356 Bump v13.0.0-beta.21 2021-05-04 08:09:51 -07:00
trop[bot]
9131a3216a docs: update REPL guide (#28986)
* docs: update REPL guide

* Update docs/tutorial/repl.md

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

Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
2021-05-04 09:57:46 -04:00
trop[bot]
288985f032 fix: close attached sheet on window close (#28988)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-05-04 09:31:42 -04:00
trop[bot]
9c1c8787e9 fix: allow Node.js to manage microtasks queue (#28973)
* fix: allow Node.js to manage microtasks queue

When `uv_run()` resulted in invocation of JS functions the microtask
queue checkpoint in Node's CallbackScope was a no-op because the
expected microtask queue policy was `kExplicit` and Electron ran under
`kScoped` policy. This change switches policy to `kExplicit` right
before `uv_run()` and reverts it back to original value after `uv_run()`
completes to provide better compatibility with Node.

* add comment

Co-authored-by: Fedor Indutny <fedor@indutny.com>
2021-05-03 23:00:44 -07:00
trop[bot]
c55cfa7a9c chore: Browser::SetAppUserModelID is Windows only (#28970)
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2021-05-03 18:52:49 -07:00
Electron Bot
f72597be06 chore: bump chromium to 91.0.4472.33 (13-x-y) (#28660)
* chore: bump chromium in DEPS to 91.0.4472.5

* chore: rebuild chromium/dcheck.patch with import-patches -3

Mechanical only; no code changes

(cherry picked from commit 68e369c945)

* chore: remove content_browser_main_loop.patch

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

The function being patched (BrowserMainLoop::MainMessageLoopRun()) no
longer exists.

NB: if removing this introduces regressions the likely fix will be to
add a similar patch for ShellBrowserMainParts::WillRunMainMessageLoop()
which has similar code and was added at the same time this was removed.

(cherry picked from commit 5220829748)

* chore: rebuild chromium/put_back_deleted_colors_for_autofill.patch with import-patches -3

Mechanical only; no code changes

(cherry picked from commit 7613ca268e)

* chore: rebuild chromium/disable_color_correct_rendering.patch with import-patches -3

Mechanical only; no code changes

(cherry picked from commit c0c5f45195)

* chore: rebuild chromium/eat_allow_disabling_blink_scheduler_throttling_per_renderview.patch with patch

Mechanical only; no code changes

(cherry picked from commit ea6f3e096e)

* chore: rebuild chromium/gpu_notify_when_dxdiag_request_fails.patch with import-patches -3

Mechanical only; no code changes

(cherry picked from commit 8d9aa4f1f2)

* chore: rebuild chromium/ui_gtk_public_header.patch manually

no code changes

(cherry picked from commit 79e84fb72b)

* chore: rebuild chromium/web_contents.patch with import-patches -3

Mechanical only; no code changes

(cherry picked from commit 543fb6dae7)

* chore: remove v8/skip_global_registration_of_shared_arraybuffer_backing_stores.patch

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

This patch has been merged upstream

(cherry picked from commit d36de6e2d6)

* chore: export patches

(cherry picked from commit 7c148e9102)

* chore: update add_trustedauthclient_to_urlloaderfactory.patch

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

Sync with removal of render_frame_id_

(cherry picked from commit fd954aefd4)

* chore: sync chromium/put_back_deleted_colors_for_autofill.patch

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

SkColorFromColorId() no longer takes theme, scheme args

(cherry picked from commit f676453fb8)

* chore: sync chromium/put_back_deleted_colors_for_autofill.patch

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

Change new calls to GetDarkSchemeColor to fit our patched call signature

(cherry picked from commit 27c5d9da5e)

* chore: update add_trustedauthclient_to_urlloaderfactory.patch

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

Sync with removal of render_frame_id_ in our mojom

(cherry picked from commit 285db29015)

* chore: update chromium/frame_host_manager.patch

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

UrlInfo ctor now takes UrlInfo::OriginIsolationRequest instead of a bool

(cherry picked from commit 06ac6c5d6a)

* chore: update chromium/revert_remove_contentrendererclient_shouldfork.patch

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

Upstream has removed `history_list_length_` which we were comparing to 0
to calculate our `is_initial_navigation` bool when calling ShouldFork().
ShouldFork() is ours and none of the code paths actually use that param,
so this commit removes it altogether.

(cherry picked from commit 2b0cb2ca2a)

* chore: update permissions_to_register

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

Replace all uses of APIPermission::ID enum with Mojo type

(cherry picked from commit bfe55a9c68)

* refactor: update return type of PreMainMessageLoopRun()

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

Used to return void; now returns an int errorcode.

Note: 2725153 also has some nice doc updates about Browser's "stages"
(cherry picked from commit 2622e91c44)

* refactor: sync ElectronBrowserMainParts to MainParts changes

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

RunMainMessageLoopParts has been replaced with WillRunMainMessageLoop
so `BrowserMainLoop::result_code_` is no longer available to us for our
exit_code_ pointer.

This variable held a dual role: (1) of course, hold the exit code, but
also (2) was a nullptr before the message loop was ready, indicating to
anyone calling SetExitCode() that we were still in startup and could
just exit() without any extra steps. exit_code_ still fulfills these two
roles but is now a base::Optional.

(cherry picked from commit 0497272fab)

* chore: update ElectronBrowserMainParts::PreDefaultMainMessageLoopRun

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

BrowserMainParts::BrowsePreDefaultMainMesssageLoopRun() has been
removed; move that work to the new WillRunMainMessageLoop().

(cherry picked from commit 77eacd8073)

* refactor: stop using CallbackList; it has been removed.

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2785973
(cherry picked from commit 4bcf9d58b0)

* refactor: update use of threadpools.

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

The upstream code is still in flux (e.g. reverts and re-lands) but the
tl;dr for this commit is (1) include thread_pool.h if you're using it
and (2) don't instantiate pools directly.

(cherry picked from commit 4e33ee0ad3)

* refactor: remove routing_id from CreateLoaderAndStart

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

NB: One logic branch in ProxyingURLLoaderFactory::CreateLoaderAndStart
calls std::make_unique<InProgressRequest>, which needs a routing_id.
This PR uses the member field `routing_id_` since there's no longer one
being passed into CreateLoaderAndStart.

(cherry picked from commit 70759ad342)

* refactor: sync to upstream ParittionOptions churn

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

PartitionOptions' enums have changed.

(cherry picked from commit 48f437b478)

* refactor: update Manifest::Location usage

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

tldr: s/Manifest::FOO/ManifestLocation::kFoo/
(cherry picked from commit 866e02999a)

* update patches

(cherry picked from commit 4444596af5)

* refactor: update extensions::Manifest to upstream

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

-  extensions::Manifest::COMPONENT
+  extensions::mojom::ManifestLocation::kExternalComponent

(cherry picked from commit c97cef7059)

* refactor: sync with upstream UrlInfo ctor changes

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

UrlInfo ctor now takes UrlInfo::OriginIsolationRequest instead of a bool

(cherry picked from commit 7effb909b6)

* chore: update invocation of convert_protocol_to_json.py

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

python3 is being used in parts of the upstream build, but the copy of
convert_protocol_to_json.py invoked in v8/third_party/inspector_protocol
is not python3-friendly. Node has a py2+3-friendly version of it in its
tools directory, so call it instead.

(cherry picked from commit a237fc9aff)

* chore: use extensions::mojom::APIPermissionID

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

tldr:
- extensions::APIPermission::kFoo
+ extensions::mojom::APIPermissionID::kFoo

(cherry picked from commit bf9ef3b636)

* chore: Remove support for TLS1.0/1.1 in SSLVersionMin policy

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

Remove TLS v1.0 & 1.1 from our SSLProtocolVersionFromString() function.
This is the same change made upstream at
https://chromium-review.googlesource.com/c/chromium/src/+/2765737/8/chrome/browser/ssl/ssl_config_service_manager_pref.cc

(cherry picked from commit c4558b031d)

* fixup! chore: update ElectronBrowserMainParts::PreDefaultMainMessageLoopRun

(cherry picked from commit f509f1b8cc)

* chore: Use IDType for permission change subscriptions.

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

tldr: {Subscribe,Unsubscribe}PermissionStatusChange's tag type used to
be an int; now it's the new SubscriptionId type (which is an IdType64).

(cherry picked from commit 11608d2745)

* chore: sync PowerMonitor code to upstream refactor

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

tldr: PowerMonitor has been split into PowerStateObserver,
PowerSuspendObserver, and PowerThermalObserver to reduce number of tasks
posted to consumers who only need notifications for one of those things
instead of all of them.

(cherry picked from commit 2d4c79413b)

* chore: use PartitionOptions's new Cookies field

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2771318
(cherry picked from commit f69e95824f)

* Revert "refactor: remove routing_id from CreateLoaderAndStart"

This reverts commit 8c9773b87a3c84f9073a47089eb2b6889d745245.

8c9773b was only a partial fix; reverting to start & try again.

(cherry picked from commit 96195f845b)

* update patches

(cherry picked from commit 5d64fa28d5)

* chore: update chromium/accelerator.patch

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

tldr: sync patch with upstream renamed variable & macro names.
(cherry picked from commit ce541697e5)

* chore: update chromium/gtk_visibility.patch

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

tldr: no code changes; just updating the diff to apply cleanly.

note: ooh upstream Wayland hacking!
(cherry picked from commit 6ec5c72878)

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

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

tldr: no code changes; just updating the diff to apply cleanly.
(cherry picked from commit 8ae0b0d740)

* chore: update chromium/worker_feat_add_hook_to_notify_script_ready.patch

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

tldr: no code changes; just updating the diff to apply cleanly.
(cherry picked from commit d5b017208b)

* chore: export_all_patches

(cherry picked from commit 218952ec9d)

* chore: update chromium/feat_add_set_theme_source_to_allow_apps_to.patch

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

tldr: NotifyObservers has been renamed to NotifyOnNativeThemeUpdated,
so update the invocation in our patch.

(cherry picked from commit 6fe734f5ca)

* chore: update ElectronBrowserClient w/upstream API

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

tldr: GetDevToolsManagerDelegate() was returning an owned raw pointer.
Replaced it with CreateDevToolsManagerDelegate() which uses unique_ptr<>.

(cherry picked from commit b760f7162b)

* chore: handle new content::PermissionType::FILE_HANDLING in toV8()

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

`file-handling` string confirmed in https://chromium-review.googlesource.com/c/chromium/src/+/2762201/18/chrome/browser/ui/webui/settings/site_settings_helper.cc

(cherry picked from commit d9cdb18eb7)

* refactor: remove routing_id from CreateLoaderAndStart pt 1

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

Part 1: the easiest ones

(cherry picked from commit 6ee282b27a)

* 2796724: Support Python3

https://chromium-review.googlesource.com/c/infra/luci/python-adb/+/2796724
(cherry picked from commit fbf5c04716)

* 2668974: WebShare: Implement SharingServicePicker

https://chromium-review.googlesource.com/c/chromium/src/+/2668974
(cherry picked from commit 74577f2156)

* 2802766: Apply modernize-make-unique to media/

https://chromium-review.googlesource.com/c/chromium/src/+/2802766
(cherry picked from commit 409328fc38)

* 2802823: Apply modernize-make-unique to gpu/

https://chromium-review.googlesource.com/c/chromium/src/+/2802823
(cherry picked from commit 43658b0ed3)

* 2803041: Apply modernize-make-unique to remaining files

https://chromium-review.googlesource.com/c/chromium/src/+/2803041
(cherry picked from commit 01f514f537)

* 2798873: Convert GtkKeyBindingsHandler build checks to runtime checks

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

* 2733595: [ch-r] Parse ACCEPT_CH H2/3 frame and restart with new headers if needed

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

* chore: update patch indices

(cherry picked from commit f078eddc2b)

* 2795107: Remove unused PermissionRequest IDs.

https://chromium-review.googlesource.com/c/chromium/src/+/2795107
(cherry picked from commit 93077afbfb)

* chore: fixup patch indices

(cherry picked from commit 8f2abcee38)

* PiP 1.5: Add microphone, camera, and hang up buttons to the PiP window

https://chromium-review.googlesource.com/c/chromium/src/+/2710023
(cherry picked from commit 4a4da7ad6a)

* fixup! refactor: remove routing_id from CreateLoaderAndStart

(cherry picked from commit a1f0bbb0b5)

* refactor: use URLLoaderNetworkServiceObserver for auth requests from SimpleURLLoader

(cherry picked from commit 186528aab9)

* fixup! chore: fixup patch indices

(cherry picked from commit 3129ea403d)

* 2724817: Expand scope of wasm-eval to all URLs

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

* 2797341: [ozone/x11] Enabled the global shortcut listener.

https://chromium-review.googlesource.com/c/chromium/src/+/2797341
(cherry picked from commit 945890fcf9)

* 2805553: Reland Add GTK ColorMixers to ColorPipeline P1

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

* 2804366: PiP 1.5: Label back to tab button with origin and center it

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

* 2784730: Fix crash on AX mode change in NativeViewHost without a Widget

https://chromium-review.googlesource.com/c/chromium/src/+/2784730
(cherry picked from commit 0fac051a0c)

* chore: update patch indices

(cherry picked from commit 01235ba336)

* 2810174: Add PdfAnnotationsEnabled policy.

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

* 2807829: Allow capturers to indicate if they want a WakeLock or not.

https://chromium-review.googlesource.com/c/chromium/src/+/2807829
(cherry picked from commit 39f0c263d7)

* update patches after cherry picks

* chore: icon_util_x11 is now icon_util_linux

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2791362
(cherry picked from commit fa0d3a0f75)

* build: fix missing symbols on linux build

* use_ozone and use_x11 are not exclusive
* new button view to build for pip

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2797341
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2804366
(cherry picked from commit 28253c6ccc)

* chore: remove patch conflict

(cherry picked from commit 19c9e94014)

* chore: build bttlb on all platforms for pip

(cherry picked from commit ae70252e09)

* build: update linux manifests

(cherry picked from commit 88baf8835c)

* chore: update windows zip manifests

(cherry picked from commit 01a1c37999)

* chore: update mac zip manifests

(cherry picked from commit a203347075)

* chore: update is_media_key patch to handle new ozone impl

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2797341
(cherry picked from commit 9d31092db8)

* build: update sysroots

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2628496
(cherry picked from commit 4985c57685)

* build: add missing base include on windows

(cherry picked from commit ec782c1bde)

* fix: update frame host manager patch for new state transitions

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2714464
(cherry picked from commit 2772241a2c)

* refactor: implement missing URLLoaderNetworkServiceObserver methods

It is against The Mojo Rules to leave hanging callbacks.  These always
have to be called.

Refs: 186528aab9
(cherry picked from commit 2ce2f73a0c)

* spec: fix locale test on local linux

(cherry picked from commit 898f8448f8)

* fix: pass the exit code correctly in new PreMainMessageLoopRun

Refs: 2622e91c44
(cherry picked from commit f8f388573c)

* fix: ensure we early-exit when request_handler_ is not provided

Refs: 93077afbfb
(cherry picked from commit 20cd4cb875)

* fix: strongly set result_code in the BrowserMainLoop

(cherry picked from commit a1d19bc212)

* fix: invalid usage of non-targetted PostTask

You must always either use a host threadpool or specify a target
thread.  In this case we did neither after this refactor.

Refs: 4e33ee0ad3
(cherry picked from commit 3632067c10)

* build: ensure CI is truthy in arm test env

(cherry picked from commit e455f68b64)

* chore: add mojo error code to url loader failure

(cherry picked from commit 60cc150a17)

* fix: handle windowCaptureMacV2 being enabled when fetching media source id

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2709931
(cherry picked from commit f835dd1c2a)

* chore: fix broken gtk_util color patch

(cherry picked from commit e0720df6d4)

* chore: fix gn check

(cherry picked from commit 72ca89b311)

* chore: add node patches for V8 changes

(cherry picked from commit 96027e0186)

* chore: add thread_pool include for views delegate win

(cherry picked from commit 62faa304df)

* chore: remove stray .rej files in patch

(cherry picked from commit 52562150ca)

* chore: bump chromium in DEPS to 91.0.4472.10

* update patches

* Merge branch '13-x-y' into roller/chromium/13-x-y

* update patches

* try to track down WOA failures

* see if this helps websql failure

* chore: debug websql error on WOA

* Revert "chore: debug websql error on WOA"

This reverts commit 572987a15f.

* Revert "see if this helps websql failure"

This reverts commit f771dfe0ab.

* Revert "try to track down WOA failures"

This reverts commit d4eb5efdb3.

* chore: no long disable CalculateNativeWinOcclusion on WOA

This was resolved in https://chromium-review.googlesource.com/c/chromium/src/+/2478082

* run specs separately on WOA

* Update comment

* escape %

* specify files properly

* revert WOA testing changes

* chore: bump chromium in DEPS to 91.0.4472.33

* chore: update patches

* Trigger CI

Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-05-03 20:09:30 -04:00
trop[bot]
5c12606b13 feat: add session.storagePath to get path on disk for session data (#28866)
* feat: add session.storagePath to get path on disk for session data

* spec: add session.storagePath tests

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-05-03 12:14:53 -04:00
trop[bot]
f9bf319e66 docs: remove reference to global Electron install (#28969)
* docs: remove reference to global Electron install

This is a pattern that we actively want to discourage.

* docs: update as per review suggestion

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2021-05-03 11:38:53 -04:00
Electron Bot
b5c3ac3e7b Bump v13.0.0-beta.20 2021-05-03 08:01:43 -07:00
trop[bot]
824028a367 build: add release-env context to publish-macos (#28939)
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2021-04-29 15:24:01 -07:00
trop[bot]
2b23b145d9 docs: uniformize module API doc format (#28926)
This PR ensures that all API modules are present in the README doc,
as there were a couple missing. It also formats all modules to contain
a level-1 heading and a blockquote description.

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2021-04-29 13:38:32 -07:00
trop[bot]
128106520a build: fix npm-run python bytes error (#28936)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-04-29 13:34:05 -07:00
Electron Bot
7e4a9ebc27 Bump v13.0.0-beta.19 2021-04-29 08:03:10 -07:00
trop[bot]
87d3530d1b fix: provide no-op implementation of app.setUserModelId (#28921)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-04-29 09:56:20 +02:00
trop[bot]
bf9dfa8247 docs: remove api/locales page (#28919)
This page is just a table writing out the contents of an array in
the Chromium source code. We don't actively maintain it, and
it's only referenced in one API, so it makes sense to just
link directly to the code here.

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2021-04-28 15:39:19 -07:00
trop[bot]
300e902066 fix: emit window-all-closed after closing the window (#28914)
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-04-28 12:47:16 -07:00
trop[bot]
fa0f9e83f5 build: remove dead python methods and helper (#28895)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-04-28 02:13:38 -07:00
trop[bot]
d32aa032cd docs: the tools folder does not exist anymore (#28888)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-04-28 02:13:20 -07:00
trop[bot]
3fe41bb852 build: actually use SSL when downloading things via python (#28893)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-04-28 02:07:05 -07:00
trop[bot]
58b80c2c06 test: disable shell.trashItem in renderer test on win-ia32 (#28877)
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-04-27 19:58:25 -04:00
trop[bot]
2ec3da29d3 build: fix releases that failed halfway through npm publish actions (#28855)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-04-26 20:38:07 -04:00
trop[bot]
499c1a5067 fix: only set backgroundColor in default-app for default index.html (#28842)
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2021-04-26 11:34:48 -04:00
Electron Bot
544ea7a0c8 Bump v13.0.0-beta.18 2021-04-26 08:02:03 -07:00
trop[bot]
eca4a5cf4c fix: shell.trashItem crash when called in renderer (#28788)
* fix: shell.trashItem crash when called in renderer

* Update api-shell-spec.ts

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

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-04-26 16:23:01 +09:00
trop[bot]
56fc2bce30 docs: fix unintentional emoji in win.getMediaSourceId description (#28784)
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-04-22 13:33:05 -07:00
Electron Bot
4eea01e9b0 Bump v13.0.0-beta.17 2021-04-22 08:01:53 -07:00
Shelley Vohr
232392ffa0 fix: handle async nature of [NSWindow -toggleFullScreen] (#25470) (#28763) 2021-04-22 09:53:46 -04:00
trop[bot]
7816fd240f fix: ensure widget size is set correctly on linux on small screens (#28756)
When creating a widget on linux the bounds are restricted to the screen
size, when calling SetSize / SetBounds they are not.  This fixes this
initialization issue by calling SetBounds after widget creation.

Noticed this issue while running linux tests on xvfb with a screen size
smaller than the default electron window size (resulted in a failed
test).

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-04-21 13:17:33 +02:00
Electron Bot
bcf2d0969c chore: cherry-pick 512cd5e179f4 from v8 (#28753)
* chore: cherry-pick 512cd5e179f4 from v8

* update patches
2021-04-21 12:29:38 +02:00
trop[bot]
ed7f5f3a0b fix: end attached sheet when calling window.hide() (#28694)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-04-21 11:20:31 +02:00
trop[bot]
1937aff793 build: fix docs only change script to pull all files not just 30 (#28744)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-04-19 18:28:58 -07:00
trop[bot]
cf493b995c docs(build-instructions): clarify that these are for building Electron itself (#28728)
Co-authored-by: Mark Lee <electronjs@lazymalevolence.com>
2021-04-19 20:10:37 -04:00
trop[bot]
5bbc64b416 build: read node files as binary files (#28735)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-04-19 20:01:27 -04:00
trop[bot]
287c9eb8c0 chore: clean up some spec things (#28731)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-04-19 12:55:01 -07:00
trop[bot]
f4d77d97e3 fix: do not handle write errors after request is aborted (#28720)
This fixes a flake on linux CI which started recently where the "write"
promise is being rejected after the request has been aborted /
cancelled.  In this case we should drop the error to the floor but
instead we pass it down the stack where it eventually emits a now
unhandled error event.

Example failure: https://app.circleci.com/pipelines/github/electron/electron/38072/workflows/c1faf19b-aa41-4f99-a564-165729222859/jobs/838813

Verified fix by running the test that caused it 10000 times before fix
and 10000 times after.  ~50 failures before, 0 after.

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-04-19 11:26:20 -07:00
Electron Bot
593af18528 Bump v13.0.0-beta.16 2021-04-19 08:01:28 -07:00
trop[bot]
df47f85646 fix: increase corner radius for vibrancy view on big sur (#28679)
* fix: increase corner radius for vibrancy view on big sur

* fix: revert git weirdness

Co-authored-by: Robin Fowler <robinfowler@Robins-MBP.broadband>
2021-04-15 15:58:42 -07:00
Electron Bot
bd3b70a6b5 Bump v13.0.0-beta.15 2021-04-15 08:04:17 -07:00
trop[bot]
9578943848 build: do not require vsts token for releases (#28648)
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-04-14 11:44:43 +02:00
Electron Bot
91de226a62 Bump v13.0.0-beta.14 2021-04-13 13:39:59 -07:00
Electron Bot
7044cb69a8 chore: cherry-pick 02f84c745fc0 from v8 (#28637)
* chore: cherry-pick 02f84c745fc0 from v8

* update patches
2021-04-13 13:29:05 -07:00
Electron Bot
66a2218723 chore: bump chromium to 91.0.4448.0 (13-x-y) (#28127)
* chore: bump chromium in DEPS to 90.0.4430.19

* build: add 'use_rts' definition

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2694187
(cherry picked from commit b820b4078d)

* chore: bump chromium in DEPS to 91.0.4441.0

* chore: update patches

(cherry picked from commit 55e50a0879)

* chore: media_internal_resources becomes resources

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2699022
(cherry picked from commit e715b9c921)

* chore: update patches

(cherry picked from commit c8148febfa)

* refactor: extensions::ViewType moved to mojom

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2710351
(cherry picked from commit 87df2766ba)

* chore: might_have_observers has been removed

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2667839
(cherry picked from commit e900271bea)

* refactor: CertVerifier is not in the network namespace anymore

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2689805
(cherry picked from commit eccfa516c5)

* refactor: ExtensionUserScriptManager is now UserScriptManager

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2657617
(cherry picked from commit 2fed02556d)

* refactor: content::SiteInstance::GetSiteForURL was removed

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2680274
(cherry picked from commit 0d94e0d1d9)

* refactor: MenuItemType was moved to mojom

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2071443
(cherry picked from commit 1a296e59c2)

* refactor: extensions::ViewType was moved to mojom

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2710351
(cherry picked from commit dc36e8e6fc)

* refacotr: grit::ResourceMap replaced with webui::ResourcePath

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2685601
(cherry picked from commit 59669e99cb)

* refactor: blink::MenuItem::Type was moved to mojom

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2071443
(cherry picked from commit be627568b2)

* refactor: CreateDataPipe deprecated form was removed

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2698090
(cherry picked from commit 77ad17b383)

* refactor: DesktopMediaList::Type replaces content::DesktopMediaType_*

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2700637
(cherry picked from commit 4e02d9407a)

* chore: wire up activation_time in OSR

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2638372
(cherry picked from commit f51f427646)

* chore: remove deleted file from chromium_src list

(cherry picked from commit 59432fe30a)

* chore: fix lint

(cherry picked from commit 54cc68dd7a)

* update patches

(cherry picked from commit e99e6a5a8a)

* chore: update patches

(cherry picked from commit 1e16606524)

* fixup gn check

(cherry picked from commit 8f4e362d8f)

* update to xcode 12.4.0

Needed because of 8008deb41c

(cherry picked from commit fae4d87a5a)

* 2752406: [LSC] Replace base::string16 with std::u16string in //ui

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

* 2752406: [LSC] Replace base::string16 with std::u16string in //ui

https://chromium-review.googlesource.com/c/chromium/src/+/2752406
(cherry picked from commit 9e336f5d0c)

* 2752932: Associate each AwProxyingURLLoaderFactory with a frame tree node id.

https://chromium-review.googlesource.com/c/chromium/src/+/2752932
(cherry picked from commit 08036802cb)

* 2651385: Moving Profile::shared_cors_origin_access_list_ into //content layer.

https://chromium-review.googlesource.com/c/chromium/src/+/2651385
(cherry picked from commit 676f74f3dc)

* 2734095: Introduce StoragePartitionId type to wrap current string representation.

https://chromium-review.googlesource.com/c/chromium/src/+/2734095
(cherry picked from commit 76538d2d38)

* chore: bump chromium in DEPS to 90.0.4430.19

* chore: bump chromium in DEPS to 90.0.4430.30

* chore: bump chromium in DEPS to 90.0.4430.40

* chore: bump chromium in DEPS to 90.0.4430.51

* chore: bump chromium in DEPS to 91.0.4446.0

* chore: bump chromium in DEPS to 91.0.4448.0

(cherry picked from commit 003dd6c16c)

* Update patches

(cherry picked from commit 9f5e3f6685)

* 2743594: Remove WebSize from blink.

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

* 2725403: Add URLLoaderClient::OnReceiveEarlyHints()

https://chromium-review.googlesource.com/c/chromium/src/+/2725403
(cherry picked from commit 185c343b22)

* 2651385: Moving Profile::shared_cors_origin_access_list_ into //content layer.

https://chromium-review.googlesource.com/c/chromium/src/+/2651385
(cherry picked from commit 88bbe2a352)

* 2721718: Move HostID to extensions::mojom::HostID

https://chromium-review.googlesource.com/c/chromium/src/+/2721718
(cherry picked from commit 3010dd93e3)

* 2733070: Rename observer to URLLoaderNetworkServiceObserver

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

* Use nogncheck for content/browser/site_instance_impl.h

This is needed because  //content/browser:browser is not a visible target

(cherry picked from commit 5fc298ee5f)

* 2648046: Introduce alert notification helper .app

https://chromium-review.googlesource.com/c/chromium/src/+/2648046
(cherry picked from commit 2cd53eb46a)

* 2752406: [LSC] Replace base::string16 with std::u16string in //ui

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

* only include mac notifications on mac

(cherry picked from commit 3160e608e2)

* add additional skipping of atk toolchain check

(cherry picked from commit 86d23cee40)

* 2757472: Reland "Reland "[LSC] Remove base::string16 alias""

https://chromium-review.googlesource.com/c/chromium/src/+/2757472
(cherry picked from commit 22d8f22cfb)

* 2757472: Reland "Reland "[LSC] Remove base::string16 alias""

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

* 2720306: [api] Remove deprecated [Shared]ArrayBuffer API

https://chromium-review.googlesource.com/c/v8/v8/+/2720306
(cherry picked from commit d0989802bd)

* Fixup 2721718: Move HostID to extensions::mojom::HostID

(cherry picked from commit 29dfabadfd)

* fixup 2651385: Moving Profile::shared_cors_origin_access_list_ into //content layer

(cherry picked from commit 97b6868e9c)

* Fixup 2752406: [LSC] Replace base::string16 with std::u16string in //ui

(cherry picked from commit b6d2ae0455)

* Fixup 2725403: Add URLLoaderClient::OnReceiveEarlyHints()

(cherry picked from commit 7e961d8a37)

* update node headers

(cherry picked from commit c49bc282d5)

* 2693008: Fix loading non-system cursors on Windows on browser_tests

https://chromium-review.googlesource.com/c/chromium/src/+/2693008
(cherry picked from commit 3b183854ff)

* 2757472: Reland "Reland "[LSC] Remove base::string16 alias""

https://chromium-review.googlesource.com/c/chromium/src/+/2757472
(cherry picked from commit 2d3c65beca)

* undo changes to WebContentsPreferences::GetPreloadPath to fix mac build

(cherry picked from commit deeb2de14b)

* fix StrCat issue

(cherry picked from commit 451e0931bf)

* incantations for WebContentsPreferences::GetPreloadPath wide strings

(cherry picked from commit 205f572181)

* bump nan

(cherry picked from commit 74318705c2)

* fix GetAsString maybe?

(cherry picked from commit ea62ecd188)

* windows build fixes

(cherry picked from commit 5b598037bb)

* more windows build fix

(cherry picked from commit 61cf1abd4d)

* SetAppUserModelID -> wstring

(cherry picked from commit 83d93bcbdc)

* upgrade nan dep in tests

(cherry picked from commit 4f97b9303c)

* update patch

* wstrings are cross-platform

(cherry picked from commit 7f7b1f6c8a)

* linter

(cherry picked from commit aaf03765ed)

* only bind setAppUserModelId on windows

(cherry picked from commit 640a145112)

* well that was an odyssey

(cherry picked from commit dd975328a0)

* backport fcdf35e from v8 to fix nan crash

(cherry picked from commit 606fd87d1e)

* disable typedarrays-test.js

(cherry picked from commit 01ca00ec82)

* don't defer in NSWindow creation

https://chromium-review.googlesource.com/c/chromium/src/+/2707696
(cherry picked from commit 3122820e58)

* use PartitionAllocator for ArrayBuffers in the main process

(cherry picked from commit 1f575ca3af)

* fix patches

(cherry picked from commit 54e72fa8e3)

* chore: omit some unnecessary conversions

(cherry picked from commit 0f3620099a)

* refactor: make LoginItemSettings::path a wstring

(cherry picked from commit 9127cff58b)

* refactor: make ShowTaskDialog take a wstr

(cherry picked from commit 1594c54933)

* Revert "refactor: make LoginItemSettings::path a wstring"

This reverts commit 9127cff58b.

(cherry picked from commit 9684d85101)

* fixup patches

This reverts commit 0cc08813a6.

* update patches after merge

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-04-13 11:29:10 -04:00
trop[bot]
1f95fdd5ca build: better error handling for release builds (#28626)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-04-13 09:49:04 -04:00
trop[bot]
b4e70c72a6 fix: crash on invalid select-serial-port callback (#28619)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-04-12 11:40:24 -04:00
Electron Bot
61bd57f851 Bump v13.0.0-beta.13 2021-04-12 08:02:26 -07:00
trop[bot]
5ab8cb7482 fix: load source maps from custom protocols and asar bundles (#28615)
* fix: load source maps from custom protocols and asar bundles

* chore: fix lint

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2021-04-12 06:18:34 -07:00
trop[bot]
d1bb54d175 docs: define the name of the preload script (#28609)
Co-authored-by: KSneijders <32707500+KSneijders@users.noreply.github.com>
2021-04-12 00:14:18 -07:00
trop[bot]
c104b510b0 docs: systemPreferences.subscribeWorkspaceNotification return type (#28613)
Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
2021-04-12 00:12:50 -07:00
trop[bot]
02a2d33edc build: give ASAN tests more memory to avoid SIGKILL or disabling tests (#28592)
* build: give ASAN tests more memory

* test: re-eanble asan tests

Co-authored-by: Samuel Attard <sattard@slack-corp.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-04-09 18:53:06 +09:00
trop[bot]
ad8f93517e chore: don't minimize js in development (#28586)
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-04-09 16:09:53 +09:00
trop[bot]
a58b5ec3f0 docs: note that new-window event is deprecated (#28582)
* docs: note that new-window event is deprecated

* Update breaking-changes.md

* Update docs/breaking-changes.md

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-04-08 12:12:45 -04:00
Electron Bot
32e321cec1 Bump v13.0.0-beta.12 2021-04-08 08:01:27 -07:00
trop[bot]
aae1bfde05 fix: support wasm-eval csp behind WebAssemblyCSP flag (#28569)
* feat: support wasm-eval csp behind WebAssemblyCSP flag

* update patches

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
Co-authored-by: Electron Bot <electron@github.com>
2021-04-08 04:32:39 -07:00
trop[bot]
5be9028c51 fix: allow accessing file:// when web security is disabled (#28557)
* fix: allow accessing file:// when web security is disabled

* test: fix webview tests on web security

* chore: remove unused attributes

* chore: cleanup RegisterURLLoaderFactories method

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-04-07 14:59:54 +09:00
Shelley Vohr
fa5bc2206c fix: errors thrown in functions over the contextBridge (#28446)
* fix: errors thrown in functions over the contextBridge

* spec: add a test

* fix: ensure exception is a v8::Object
2021-04-07 14:57:33 +09:00
trop[bot]
e3cbd70191 fix: call UnregisterIsolate consistently (#28554)
* fix: call `UnregisterIsolate` consistently

`JavascriptEnvironment` is the class that calls `RegisterIsolate()`
so it should be the one to call `UnregisterIsolate`, and this can happen
right before disposing the aforementioned `isolate`.

See: https://github.com/electron/electron/pull/28468

* fix

Co-authored-by: Fedor Indutny <fedor@indutny.com>
2021-04-07 10:07:49 +09:00
trop[bot]
7ce5af334e fix: invoke the window open handler for _blank links (#28536)
* fix: invoke the window open handler for _blank links

* add test

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-04-07 10:05:12 +09:00
trop[bot]
5605358f99 fix: pass postData to new-window event (#28542)
* fix: pass postData to new-window event

* fix type of postBody

* fix type of UploadFile and UploadRawData to be discriminated unions

* exclude the empty string from additionalFeatures

* add a test

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-04-07 09:59:34 +09:00
trop[bot]
6f44fa6dbd fix: dialog DCHECK on Linux (#28534)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-04-07 09:49:17 +09:00
trop[bot]
6e66699822 ci: Add goma fallback flag (#28546)
* ci: fallback to local compile if goma auth fails

* use correct flag

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-04-07 09:48:12 +09:00
trop[bot]
71fda62839 test: disable "fs in renderer process" test under ASan (#28541)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-04-07 09:28:54 +09:00
trop[bot]
2b354894b2 fix: enable system maximization for frameless windows except if transparent (#28527)
* fix: move widget maximization check

* fix linting error

* change workaround to only effect transparent windows

* disable menu maximize and restore for transparent windows

* disable double clicking title bar max/unmax for transparent windows

* add docs change and address review

Co-authored-by: mlaurencin <mlaurencin@electronjs.org>
2021-04-06 00:54:39 -07:00
trop[bot]
114643a624 fix: reject task append to JumpList when description exceeds 260 characters (#28526)
* fix: reject task when description exceeds 260 characters

* Switched out wcslen() for size() [linear -> constant time]

* Included comment describing the need for the additional check

* Added information about character limit to documentation

* Added newline character to end of jump-list-category.md

Co-authored-by: SushiJackal <weingaben@gmail.com>
2021-04-05 23:57:18 -07:00
trop[bot]
d32f37f549 docs: the minimum supported version of macOS is now 10.11 (#28516)
* chore: the minimum supported version is now 10.11

Chromium bumped this version back in December

* Update support.md

Co-authored-by: Samuel Attard <sam@electronjs.org>
2021-04-06 08:56:09 +09:00
trop[bot]
0cba5d7a71 fix: free IsolateData in ~NodeEnvironment (#28484)
This seems to just have been missing here, leaking memory
(and breaking the API contract for Node.js embedding).

Co-authored-by: Anna Henningsen <anna@addaleax.net>
2021-04-06 08:55:02 +09:00
Electron Bot
d76937f2b9 Bump v13.0.0-beta.11 2021-04-05 08:02:44 -07:00
Electron Bot
2cf6909f48 Bump v13.0.0-beta.10 2021-04-01 08:02:20 -07:00
trop[bot]
fb1a41926a fix: put RemoteCertVerifier upstream from the caching and coalescing layers (#28433)
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-03-31 10:26:07 -07:00
trop[bot]
c87ecabf19 chore: update Community link in default menu (#28459)
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2021-03-31 01:31:51 -07:00
trop[bot]
798ef785b4 fix: handle an unparsable pdf manifest (#28453)
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-03-30 23:21:17 -07:00
Antón Molleda
89e2fe2079 docs: backport current tutorials to 13-x-y (#28397) 2021-03-30 11:53:10 -07:00
trop[bot]
250438c2d9 refactor: remove more uses of v8::Isolate::GetCurrent() (#28429)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-30 00:29:28 -07:00
Electron Bot
1176449cc9 Bump v13.0.0-beta.9 2021-03-29 08:01:40 -07:00
Cheng Zhao
a06af22b99 test: load minimal dict for spellchecker (#28398) 2021-03-29 19:43:51 +09:00
trop[bot]
bda746f2e6 feat: initialize field trials from command line arguments (#28402)
Fixes: #27877

Co-authored-by: Saúl Ibarra Corretgé <s@saghul.net>
2021-03-29 00:24:59 -07:00
trop[bot]
1f7f60d505 docs: add missing line in web-contents.md (#28399)
* Update web-contents.md

The text block was rendered as part of the `features` property, not the `handler`

* fix linting

Co-authored-by: Alexander Prinzhorn <alexander@prinzhorn.it>
2021-03-29 09:48:39 +09:00
trop[bot]
50cc80c44e fix: disappearing thumbar after win.hide() (#28390)
* fix: disappearing thumbar after win.hide()

* Add descriptive comment

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-25 12:16:13 -07:00
Electron Bot
00367f0b13 Bump v13.0.0-beta.8 2021-03-25 08:02:12 -07:00
Will Anderson
5d1ada085d docs: update Node API renderer example to use contextBridge (#28370) 2021-03-24 20:40:21 -04:00
trop[bot]
5b414b6f93 fix: isolate Pepper plugins (#28372)
* fix: isolate Pepper plugins

Following suit with a recent change to the same method in Chromium, we
should also isloate Pepper plugins.

* docs: add more context to comment

* fix: remove unsupported test flag behavior

Co-authored-by: clavin <cwatford@slack-corp.com>
2021-03-24 19:53:52 -04:00
trop[bot]
831bbc4b55 feat: allow omitting submitURL when uploadToServer is false (#28283)
* feat: allow omitting submitURL when uploadToServer is false

* docs

* fix test

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-03-24 19:52:42 -04:00
trop[bot]
b89b463a63 doc: desktopCapturer menu position (#28365)
desktopCapturer can be used in both main process and renderer process

Co-authored-by: liulun <xland@live.cn>
2021-03-24 16:59:46 +09:00
trop[bot]
32d3e82d88 fix: make sure service worker scheme is registered with allowServiceWorkers (#28354)
* Fix custom scheme not registered as service worker scheme

* ServiceWorker loaders do not have WebContents associated

* Add test for service worker

* Revert "Fix custom scheme not registered as service worker scheme"

This reverts commit a249235b22.

* Add scheme to ServiceWorkerSchemes

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-03-24 16:55:13 +09:00
trop[bot]
38de02c50a fix: window.print() in pdf plugin (#28351)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-24 10:01:33 +09:00
trop[bot]
b8ef450cf6 ci: cleanup directories on arm64 machines after running tests (#28331)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-03-23 09:47:55 -04:00
trop[bot]
168bcaf8f3 fix: libuv hang on Windows (#28335)
* fix: libuv hang on Windows

* test: add a hang test

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-23 05:16:04 -07:00
trop[bot]
19d26c4a0c fix: escape URL passed to shell.openExternal on windows (#28342)
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-03-23 05:15:33 -07:00
trop[bot]
20bf768517 refactor: prefer embedder-focused InitializeNodeWithArgs (#28325)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-22 12:36:55 -07:00
Electron Bot
71f631641e Bump v13.0.0-beta.7 2021-03-22 08:02:25 -07:00
trop[bot]
5b3c90e6c6 fix: DesktopCapturer gc'd prior to capture completion (#28280)
desktopCapture.getSources() returns a promise which should resolve
when capturing finishes. Internally it creates an instance of
DesktopCapturer which is responsible for resolving or rejecting
the promise.

Between the time DesktopCapturer starts capturing frames and when
it finishes, it's possible for its handle to be GC'd leading to
it never resolving.

These changes pin the instance of DesktopCapturer until it either
finishes or errors.

fixes #25595

Co-authored-by: samuelmaddock <samuel.maddock@gmail.com>
2021-03-22 11:03:24 +09:00
trop[bot]
fb298ca3db fix: drag region offsets in BrowserViews (#28298)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-22 10:59:47 +09:00
trop[bot]
5f07df4a3d fix: bad menu position when no positioning item specified (#28276)
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-03-19 10:20:35 +09:00
trop[bot]
3ecccf2ad3 feat: add process.contextIsolated property (#28252)
* feat: add process.contextIsolation property

* chore: rename process.contextIsolation to process.contextIsolated

* thing

Co-authored-by: Milan Burda <milan.burda@gmail.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-03-18 14:01:06 -07:00
Electron Bot
4cafba5e46 Bump v13.0.0-beta.6 2021-03-18 08:01:58 -07:00
trop[bot]
3b049c9074 feat: add process.contextId used by @electron/remote (#28251)
* feat: add process.contextId used by @electron/remote

* Update docs/api/process.md

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

Co-authored-by: Milan Burda <milan.burda@gmail.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-03-18 15:16:46 +09:00
Will Anderson
0c1ee8ae8b docs: Update Quick Start Guide to work with contextIsolation (#28229)
* docs: Update Quick Start Guide for Electron 12

With `contextIsolation` enabled by default in Electron 12, the Getting Started Guide no longer works as it is written. In order for the basic example to display values from `process.versions`, we need to add a `preload.js` to the example.

* Trigger Build

* docs: add missing curly brace to quick start example code
2021-03-18 15:13:46 +09:00
trop[bot]
4cb842d5e3 fix: recalibrate simpleFullscreen when display metrics change (#28216)
* fix: recalibrate simpleFullscreen when display metrics change

* Address review feedback

* fix: compilation issues

* Address feedback from review

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-18 15:11:02 +09:00
trop[bot]
0ab21dfc98 test: disable some tests under ASan which might receive SIGKILL because of OOM (#28225)
* test: running child app under ASan might receive SIGKILL

* test: renderer process of webview might receive SIGKILL under ASan

* test: increase timeout for asan build

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-03-17 09:54:25 +09:00
trop[bot]
e3ef14e784 docs: document the parameter structure of hookWindowMessage (#28213)
Fixes #28178

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-03-16 15:44:00 -07:00
trop[bot]
010c6fd5be fix: revert "refactor: mmap asar files (#24470)" (#28203)
This reverts commit 01a2e23194.

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-03-16 19:21:21 +09:00
Electron Bot
a12d66d25e Bump v13.0.0-beta.5 2021-03-15 08:01:29 -07:00
trop[bot]
faa5d18389 fix: handle a nil backgroundColor in win.getBackgroundColor() (#28187)
* fix: handle a nil backgroundColor in win.getBackgroundColor()

* spec: add crash case

* fix: update to fix native_views transparent color

* chore: fix lint

Co-authored-by: Samuel Attard <sattard@slack-corp.com>
Co-authored-by: Samuel Attard <sam@electronjs.org>
2021-03-15 11:45:02 +09:00
Cheng Zhao
042e81aecb test: reliably wait for spellchecker to load (#28168) 2021-03-15 10:28:06 +09:00
trop[bot]
a1b46ef8a2 chore: cherry-pick 1fe571a from node (#28110)
Backports https://github.com/nodejs/node/pull/37000

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2021-03-15 10:25:40 +09:00
trop[bot]
7f4ab06f11 fix: convert system colors to device color space in systemPreferences (#28173)
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-03-13 05:00:50 -08:00
trop[bot]
c11d6813e4 fix: ensure child window transparency works (#28112)
* fix: ensure child window transparency works

Windows opened via window.open and intecepted via setWindowOpenHandler
or the `new-window` event should (a) have the correct background color
and (b) that background color should be transparent if specified.

The changes in api_web_contents fix (a) and the changes in
web_contents_preferences fix (b).

Notes: Child windows with specified background colors or transpency now
work as intended

* fix: set background_color in blink prefs apply logic

* chore: update for PR comments

Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-03-12 09:18:41 -08:00
trop[bot]
c10274663c fix: change #if defined(OS_MACOSX) to #if defined(OS_MAC) (#28153)
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2021-03-12 16:44:25 +09:00
trop[bot]
839137c3f4 docs: fix cookies event documentation for type generation (#28140)
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-03-11 16:22:45 -08:00
Electron Bot
529e7e7797 Bump v13.0.0-beta.4 2021-03-11 07:01:34 -08:00
John Kleinschmidt
2ce64944ab chore: bump chromium to 90.0.4415.0 (master) (#27694) (#28082)
* chore: bump chromium in DEPS to 520c02b46668fc608927e0fcd79b6a90885a48bf

* chore: bump chromium in DEPS to 90.0.4414.0

* resolve chromium conflicts

* resolve v8 conflicts

* fix node gn files

* 2673502: Remove RenderViewCreated use from ExtensionHost.

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

* 2676903: [mojo] Remove most legacy Binding classes.

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

* 2644847: Move self-deleting URLLoaderFactory base into //services/network.

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

* 2664006: Remove from mojo::DataPipe.

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

* 2674530: Remove CertVerifierService feature

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

* 2668748: Move OnSSLCertificateError to a new interface.

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

* 2672923: Remove RAPPOR reporting infrastructure.

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

* 2673502: Remove RenderViewCreated use from ExtensionHost.

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

* 2655126: Convert FrameHostMsg_ContextMenu and FrameMsg_ContextMenuClosed|CustomContextMenuAction to Mojo

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

* 2628705: Window Placement: Implement screen.isExtended and change event

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

* 2643161: Refactor storage::kFileSystem*Native*

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

* fix build

* only remove the biggest subdir of //ios

* chore: bump chromium in DEPS to 90.0.4415.0

* update patches

* update sysroots

* 2686147: Remove WebContentsObserver::RenderViewCreated().

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

* 2596429: Fixing how extension's split and spanning modes affect OriginAccessList.

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

* 2686026: [mojo] Delete AssociatedInterfacePtr (replaced by AssociatedRemote)

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

* 2651705: Move ui/base/dragdrop/file_info to ui/base/clipboard

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

* 358217: drawBitmap is deprecated

https://skia-review.googlesource.com/c/skia/+/358217

* fix gn check

* 2678098: Use gen/front_end as input to generate_devtools_grd

https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678098

* 2674530: Remove CertVerifierService feature

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

* fixup 2664006: Remove from mojo::DataPipe.

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

* fixup build_add_electron_tracing_category.patch

* 2673415: [base] Prepare CrashReporterClient for string16 switch

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

* 2673413: Add CursorFactoryWin to handle Cursors on Windows

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

* 2668748: Move OnSSLCertificateError to a new interface.

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

* fix mas gn check

* update patch after merge

* Update node for .mjs files

* build: load v8_prof_processor dependencies as ESM

* chore: add patch to fix linux 32bit

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
(cherry picked from commit ca75bca667)

Co-authored-by: Electron Bot <electron@github.com>
2021-03-10 10:24:58 -08:00
trop[bot]
e6e1372ea7 fix: capturePage not resolving with hidden windows (#28076)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-09 13:13:33 -08:00
trop[bot]
9e723746e9 test: show full object diff (#28069)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-03-09 19:52:20 +09:00
trop[bot]
9a2ea12d71 chore: remove obsolete native node module patch (#28055)
* chore: remove obsolete native node module patch

* update patches

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Electron Bot <electron@github.com>
2021-03-09 17:05:15 +09:00
trop[bot]
877013efe4 build: call goma_ctl.py ensure_start directly (#28061)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-03-08 19:18:24 -08:00
trop[bot]
4c9317aea0 test: ignore the ready event from PDF Viewer (#28048)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-03-08 16:30:18 -05:00
trop[bot]
cc9b4dd968 docs: setWindowOpenHandler should show object return (#28035)
* Should use object return

* Fix lint

Co-authored-by: Domenic Horner <domenic@tgxn.net>
Co-authored-by: Cheng Zhao <github@zcbenz.com>
2021-03-08 11:49:02 -05:00
Electron Bot
747842c930 Bump v13.0.0-beta.3 2021-03-08 07:01:55 -08:00
trop[bot]
174e939b26 test: exit after app.relaunch is called (#28031)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-03-07 19:45:31 +09:00
trop[bot]
f8df8ea9d5 test: fix contextIsolation value for later added test (#28004)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-03-05 10:10:59 +09:00
Electron Bot
da5e0e5ac2 Bump v13.0.0-beta.2 2021-03-04 07:01:51 -08:00
Electron Bot
b136c51747 Bump v13.0.0-beta.1 2021-03-03 13:38:42 -08:00
452 changed files with 5262 additions and 4077 deletions

View File

@@ -85,17 +85,17 @@ machine-linux-2xlarge: &machine-linux-2xlarge
machine-mac: &machine-mac
macos:
xcode: "12.2.0"
xcode: "12.4.0"
machine-mac-large: &machine-mac-large
resource_class: large
macos:
xcode: "12.2.0"
xcode: "12.4.0"
machine-mac-large-arm: &machine-mac-large-arm
resource_class: large
macos:
xcode: "12.2.0"
xcode: "12.4.0"
machine-mac-arm64: &machine-mac-arm64
resource_class: electronjs/macos-arm64
@@ -230,6 +230,18 @@ step-maybe-notify-slack-success: &step-maybe-notify-slack-success
fi
when: on_success
step-maybe-cleanup-arm64-mac: &step-maybe-cleanup-arm64-mac
run:
name: Cleanup after testing
command: |
if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then
killall Electron || echo "No Electron processes left running"
killall Safari || echo "No Safari processes left running"
rm -rf ~/Library/Application\ Support/Electron*
rm -rf ~/Library/Application\ Support/electron*
fi
when: always
step-checkout-electron: &step-checkout-electron
checkout:
path: src/electron
@@ -313,9 +325,10 @@ step-setup-goma-for-build: &step-setup-goma-for-build
npm install
mkdir third_party
node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })"
node -e "require('./src/utils/goma.js').ensure()"
third_party/goma/goma_ctl.py ensure_start
echo 'export GN_GOMA_FILE='`node -e "console.log(require('./src/utils/goma.js').gnFilePath)"` >> $BASH_ENV
echo 'export LOCAL_GOMA_DIR='`node -e "console.log(require('./src/utils/goma.js').dir)"` >> $BASH_ENV
echo 'export GOMA_FALLBACK_ON_AUTH_FAILURE=true' >> $BASH_ENV
cd ..
step-restore-brew-cache: &step-restore-brew-cache
@@ -517,7 +530,9 @@ step-electron-build: &step-electron-build
ninja -C out/Default electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
ninja -C out/Default tools/v8_context_snapshot -j $NUMBER_OF_NINJA_PROCESSES
gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
rm -rf out/Default/clang_x64_v8_arm64/gen
rm -rf out/Default/clang_x64_v8_arm64/obj
rm -rf out/Default/clang_x64/obj
# Regenerate because we just deleted some ninja files
gn gen out/Default --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS"
@@ -840,7 +855,7 @@ step-maybe-zip-symbols: &step-maybe-zip-symbols
export BUILD_PATH="$PWD/out/Default"
ninja -C out/Default electron:licenses
ninja -C out/Default electron:electron_version
electron/script/zip-symbols.py -b $BUILD_PATH
DELETE_DSYMS_AFTER_ZIP=1 electron/script/zip-symbols.py -b $BUILD_PATH
step-symbols-store: &step-symbols-store
store_artifacts:
@@ -1018,7 +1033,7 @@ step-minimize-workspace-size-from-checkout: &step-minimize-workspace-size-from-c
name: Remove some unused data to avoid storing it in the workspace/cache
command: |
rm -rf src/android_webview
rm -rf src/ios
rm -rf src/ios/chrome
rm -rf src/third_party/blink/web_tests
rm -rf src/third_party/blink/perf_tests
rm -rf src/third_party/WebKit/LayoutTests
@@ -1340,6 +1355,8 @@ steps-tests: &steps-tests
- *step-maybe-notify-slack-failure
- *step-maybe-cleanup-arm64-mac
steps-test-nan: &steps-test-nan
steps:
- attach_workspace:
@@ -2311,7 +2328,7 @@ jobs:
<<: *steps-tests
linux-x64-testing-asan-tests:
<<: *machine-linux-medium
<<: *machine-linux-xlarge
environment:
<<: *env-linux-medium
<<: *env-headless-testing
@@ -2595,15 +2612,19 @@ workflows:
- osx-publish-x64-skip-checkout:
requires:
- mac-checkout
context: release-env
- mas-publish-x64-skip-checkout:
requires:
- mac-checkout
context: release-env
- osx-publish-arm64-skip-checkout:
requires:
- mac-checkout
context: release-env
- mas-publish-arm64-skip-checkout:
requires:
- mac-checkout
context: release-env
lint:
when: << pipeline.parameters.run-lint >>

View File

@@ -4,4 +4,3 @@
APPVEYOR_CLOUD_TOKEN=
CIRCLE_TOKEN=
ELECTRON_GITHUB_TOKEN=
VSTS_TOKEN=

4
.gitignore vendored
View File

@@ -68,4 +68,6 @@ ts-gen
.depshash-target
# Used to accelerate builds after sync
patches/mtime-cache.json
patches/mtime-cache.json
spec/fixtures/logo.png

View File

@@ -402,7 +402,10 @@ source_set("electron_lib") {
}
if (!is_mas_build) {
deps += [ "//components/crash/core/app" ]
deps += [
"//components/crash/core/app",
"//components/crash/core/browser",
]
}
sources = filenames.lib_sources
@@ -440,6 +443,7 @@ source_set("electron_lib") {
if (is_mac) {
deps += [
"//components/remote_cocoa/app_shim",
"//components/remote_cocoa/browser",
"//content/common:mac_helpers",
"//ui/accelerated_widget_mac",
]
@@ -619,6 +623,9 @@ source_set("electron_lib") {
"//chrome/services/printing/public/mojom",
"//components/printing/common:mojo_interfaces",
]
if (is_mac) {
deps += [ "//chrome/services/mac_notifications/public/mojom" ]
}
}
if (enable_electron_extensions) {
@@ -632,6 +639,7 @@ source_set("electron_lib") {
"//components/zoom",
"//extensions/browser",
"//extensions/browser:core_api_provider",
"//extensions/browser/updater",
"//extensions/common",
"//extensions/common:core_api_provider",
"//extensions/renderer",

6
DEPS
View File

@@ -14,11 +14,11 @@ gclient_gn_args = [
vars = {
'chromium_version':
'1f252b391a40e2681b0d9aff6497b7401863d1fc',
'91.0.4472.38',
'node_version':
'v14.16.0',
'nan_version':
'2c4ee8a32a299eada3cd6e468bbd0a473bfea96d',
'v2.14.2',
'squirrel.mac_version':
'cdc0729c8bf8576bfef18629186e1e9ecf1b0d9f',
@@ -48,6 +48,8 @@ vars = {
# It's only needed to parse the native tests configurations.
'checkout_pyyaml': False,
'use_rts': False,
'mac_xcode_version': 'default',
# To allow running hooks without parsing the DEPS tree

View File

@@ -1 +1 @@
13.0.0-nightly.20210303
13.0.0-beta.25

View File

@@ -36,6 +36,7 @@ environment:
ELECTRON_ENABLE_STACK_DUMPING: 1
MOCHA_REPORTER: mocha-multi-reporters
MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap
GOMA_FALLBACK_ON_AUTH_FAILURE: true
notifications:
- provider: Webhook
url: https://electron-mission-control.herokuapp.com/rest/appveyor-hook

View File

@@ -19,4 +19,12 @@ enable_basic_printing = true
angle_enable_vulkan_validation_layers = false
dawn_enable_vulkan_validation_layers = false
# This breaks native node modules
libcxx_abi_unstable = false
# These are disabled because they cause the zip manifest to differ between
# testing and release builds.
# See https://chromium-review.googlesource.com/c/chromium/src/+/2774898.
enable_pseudolocales = false
is_cfi = false

View File

@@ -8,6 +8,7 @@
# require any direct Cocoa locale support.
import os
import errno
import sys
@@ -16,7 +17,7 @@ def main(args):
try:
os.makedirs(dirname)
except OSError as e:
if e.errno == os.errno.EEXIST:
if e.errno == errno.EEXIST:
# It's OK if it already exists
pass
else:

View File

@@ -15,12 +15,6 @@ args = [cmd, "run",
try:
subprocess.check_output(args, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
print(
"NPM script '"
+ sys.argv[2]
+ "' failed with code '"
+ str(e.returncode)
+ "':\n"
+ e.output
)
error_msg = "NPM script '{}' failed with code '{}':\n".format(sys.argv[2], e.returncode)
print(error_msg + e.output.decode('ascii'))
sys.exit(e.returncode)

View File

@@ -163,7 +163,7 @@ if ((globalThis.process || binding.process).argv.includes("--profile-electron-in
setImmediate: false
},
optimization: {
minimize: true,
minimize: env.mode === 'production',
minimizer: [
new TerserPlugin({
terserOptions: {

View File

@@ -22,6 +22,11 @@ template("webpack_build") {
"//electron/typings/internal-electron.d.ts",
] + invoker.inputs
mode = "development"
if (is_official_build) {
mode = "production"
}
args = [
"--config",
rebase_path(invoker.config_file),
@@ -29,6 +34,7 @@ template("webpack_build") {
"--output-path=" + rebase_path(get_path_info(invoker.out_file, "dir")),
"--env.buildflags=" +
rebase_path("$target_gen_dir/buildflags/buildflags.h"),
"--env.mode=" + mode,
]
deps += [ "buildflags" ]

View File

@@ -39,6 +39,7 @@ PATHS_TO_SKIP = [
'./crashpad_handler',
# Skip because these are outputs that we don't need.
'resources/inspector',
'gen/third_party/devtools-frontend/src'
]
def skip_path(dep, dist_zip, target_cpu):

View File

@@ -2,6 +2,7 @@
# Use of this source code is governed by the MIT license that can be
# found in the LICENSE file.
import("//build/config/ozone.gni")
import("//build/config/ui.gni")
import("//components/spellcheck/spellcheck_build_features.gni")
import("//electron/buildflags/buildflags.gni")
@@ -16,8 +17,6 @@ static_library("chrome") {
"//chrome/browser/accessibility/accessibility_ui.h",
"//chrome/browser/browser_process.cc",
"//chrome/browser/browser_process.h",
"//chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc",
"//chrome/browser/crash_upload_list/crash_upload_list_crashpad.h",
"//chrome/browser/devtools/devtools_contents_resizing_strategy.cc",
"//chrome/browser/devtools/devtools_contents_resizing_strategy.h",
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.cc",
@@ -46,7 +45,6 @@ static_library("chrome") {
"//chrome/browser/predictors/resolve_host_client_impl.h",
"//chrome/browser/ssl/security_state_tab_helper.cc",
"//chrome/browser/ssl/security_state_tab_helper.h",
"//chrome/browser/ssl/tls_deprecation_config.cc",
"//chrome/browser/ui/views/autofill/autofill_popup_view_utils.cc",
"//chrome/browser/ui/views/autofill/autofill_popup_view_utils.h",
"//extensions/browser/app_window/size_constraints.cc",
@@ -95,12 +93,18 @@ static_library("chrome") {
if (is_linux) {
sources += [ "//chrome/browser/icon_loader_auralinux.cc" ]
if (use_x11 || use_ozone) {
sources +=
[ "//chrome/browser/extensions/global_shortcut_listener_linux.cc" ]
}
if (use_x11) {
sources += [
"//chrome/browser/extensions/global_shortcut_listener_x11.cc",
"//chrome/browser/extensions/global_shortcut_listener_x11.h",
]
} else if (use_ozone) {
}
if (use_ozone) {
deps += [ "//ui/ozone" ]
sources += [
"//chrome/browser/extensions/global_shortcut_listener_ozone.cc",
"//chrome/browser/extensions/global_shortcut_listener_ozone.h",
@@ -191,7 +195,7 @@ static_library("chrome") {
}
if (is_linux) {
sources += [ "//chrome/browser/media/webrtc/window_icon_util_x11.cc" ]
sources += [ "//chrome/browser/media/webrtc/window_icon_util_linux.cc" ]
}
}
@@ -253,8 +257,12 @@ static_library("chrome") {
"//chrome/browser/picture_in_picture/picture_in_picture_window_manager.h",
"//chrome/browser/ui/views/overlay/back_to_tab_image_button.cc",
"//chrome/browser/ui/views/overlay/back_to_tab_image_button.h",
"//chrome/browser/ui/views/overlay/back_to_tab_label_button.cc",
"//chrome/browser/ui/views/overlay/close_image_button.cc",
"//chrome/browser/ui/views/overlay/close_image_button.h",
"//chrome/browser/ui/views/overlay/constants.h",
"//chrome/browser/ui/views/overlay/hang_up_button.cc",
"//chrome/browser/ui/views/overlay/hang_up_button.h",
"//chrome/browser/ui/views/overlay/overlay_window_views.cc",
"//chrome/browser/ui/views/overlay/overlay_window_views.h",
"//chrome/browser/ui/views/overlay/playback_image_button.cc",
@@ -263,6 +271,10 @@ static_library("chrome") {
"//chrome/browser/ui/views/overlay/resize_handle_button.h",
"//chrome/browser/ui/views/overlay/skip_ad_label_button.cc",
"//chrome/browser/ui/views/overlay/skip_ad_label_button.h",
"//chrome/browser/ui/views/overlay/toggle_camera_button.cc",
"//chrome/browser/ui/views/overlay/toggle_camera_button.h",
"//chrome/browser/ui/views/overlay/toggle_microphone_button.cc",
"//chrome/browser/ui/views/overlay/toggle_microphone_button.h",
"//chrome/browser/ui/views/overlay/track_image_button.cc",
"//chrome/browser/ui/views/overlay/track_image_button.h",
]

View File

@@ -90,7 +90,7 @@ CertificateManagerModel::~CertificateManagerModel() = default;
int CertificateManagerModel::ImportFromPKCS12(
PK11SlotInfo* slot_info,
const std::string& data,
const base::string16& password,
const std::u16string& password,
bool is_extractable,
net::ScopedCERTCertificateList* imported_certs) {
return cert_db_->ImportFromPKCS12(slot_info, data, password, is_extractable,

View File

@@ -12,7 +12,6 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
#include "net/cert/nss_cert_database.h"
namespace content {
@@ -46,7 +45,7 @@ class CertificateManagerModel {
// Returns a net error code on failure.
int ImportFromPKCS12(PK11SlotInfo* slot_info,
const std::string& data,
const base::string16& password,
const std::u16string& password,
bool is_extractable,
net::ScopedCERTCertificateList* imported_certs);

View File

@@ -41,14 +41,14 @@ ipcMain.handle('bootstrap', (event) => {
return isTrustedSender(event.sender) ? electronPath : null;
});
async function createWindow () {
async function createWindow (backgroundColor?: string) {
await app.whenReady();
const options: Electron.BrowserWindowConstructorOptions = {
width: 960,
height: 620,
autoHideMenuBar: true,
backgroundColor: '#2f3241',
backgroundColor,
webPreferences: {
preload: path.resolve(__dirname, 'preload.js'),
contextIsolation: true,
@@ -96,7 +96,7 @@ export const loadURL = async (appUrl: string) => {
};
export const loadFile = async (appPath: string) => {
mainWindow = await createWindow();
mainWindow = await createWindow(appPath === 'index.html' ? '#2f3241' : undefined);
mainWindow.loadFile(appPath);
mainWindow.focus();
};

View File

@@ -68,6 +68,7 @@ an issue:
* [Testing on Headless CI Systems (Travis, Jenkins)](tutorial/testing-on-headless-ci.md)
* [DevTools Extension](tutorial/devtools-extension.md)
* [Automated Testing with a Custom Driver](tutorial/automated-testing-with-a-custom-driver.md)
* [REPL](tutorial/repl.md)
* [Distribution](tutorial/application-distribution.md)
* [Supported Platforms](tutorial/support.md#supported-platforms)
* [Code Signing](tutorial/code-signing.md)
@@ -126,6 +127,8 @@ These individual tutorials expand on topics discussed in the guide above.
* [ipcMain](api/ipc-main.md)
* [Menu](api/menu.md)
* [MenuItem](api/menu-item.md)
* [MessageChannelMain](api/message-channel-main.md)
* [MessagePortMain](api/message-port-main.md)
* [net](api/net.md)
* [netLog](api/net-log.md)
* [nativeTheme](api/native-theme.md)
@@ -135,6 +138,7 @@ These individual tutorials expand on topics discussed in the guide above.
* [protocol](api/protocol.md)
* [screen](api/screen.md)
* [session](api/session.md)
* [ShareMenu](api/share-menu.md)
* [systemPreferences](api/system-preferences.md)
* [TouchBar](api/touch-bar.md)
* [Tray](api/tray.md)
@@ -144,15 +148,14 @@ These individual tutorials expand on topics discussed in the guide above.
### Modules for the Renderer Process (Web Page):
* [contextBridge](api/context-bridge.md)
* [desktopCapturer](api/desktop-capturer.md)
* [ipcRenderer](api/ipc-renderer.md)
* [remote](api/remote.md)
* [webFrame](api/web-frame.md)
### Modules for Both Processes:
* [clipboard](api/clipboard.md)
* [crashReporter](api/crash-reporter.md)
* [desktopCapturer](api/desktop-capturer.md)
* [nativeImage](api/native-image.md)
* [shell](api/shell.md)

View File

@@ -753,7 +753,8 @@ Overrides the current application's name.
### `app.getLocale()`
Returns `String` - The current application locale. Possible return values are documented [here](locales.md).
Returns `String` - The current application locale, fetched using Chromium's `l10n_util` library.
Possible return values are documented [here](https://source.chromium.org/chromium/chromium/src/+/master:ui/base/l10n/l10n_util.cc).
To set the locale, you'll want to use a command line switch at app startup, which may be found [here](https://github.com/electron/electron/blob/master/docs/api/command-line-switches.md).
@@ -929,6 +930,10 @@ re-add a removed item to a custom category earlier than that will result in the
entire custom category being omitted from the Jump List. The list of removed
items can be obtained using `app.getJumpListSettings()`.
**Note:** The maximum length of a Jump List item's `description` property is
260 characters. Beyond this limit, the item will not be added to the Jump
List, nor will it be displayed.
Here's a very simple example of creating a custom Jump List:
```javascript

View File

@@ -1,14 +1,16 @@
## Class: BrowserView
> Create and control views.
Process: [Main](../glossary.md#main-process)
# BrowserView
A `BrowserView` can be used to embed additional web content into a
[`BrowserWindow`](browser-window.md). It is like a child window, except that it is positioned
relative to its owning window. It is meant to be an alternative to the
`webview` tag.
## Class: BrowserView
> Create and control views.
Process: [Main](../glossary.md#main-process)
### Example
```javascript

View File

@@ -267,7 +267,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
be the absolute file path to the script.
When node integration is turned off, the preload script can reintroduce
Node global symbols back to the global scope. See example
[here](process.md#event-loaded).
[here](context-bridge.md#exposing-node-global-symbols).
* `sandbox` Boolean (optional) - If set, this will sandbox the renderer
associated with the window, making it compatible with the Chromium
OS-level sandbox and disabling the Node.js engine. This is not the same as
@@ -1301,7 +1301,7 @@ can be be used to listen to changes to tablet mode.
#### `win.getMediaSourceId()`
Returns `String` - Window id in the format of DesktopCapturerSource's id. For example "window:1234:0".
Returns `String` - Window id in the format of DesktopCapturerSource's id. For example "window:1324:0".
More precisely the format is `window:id:other_id` where `id` is `HWND` on
Windows, `CGWindowID` (`uint64_t`) on macOS and `Window` (`unsigned long`) on
@@ -1319,6 +1319,8 @@ The native type of the handle is `HWND` on Windows, `NSView*` on macOS, and
* `message` Integer
* `callback` Function
* `wParam` any - The `wParam` provided to the WndProc
* `lParam` any - The `lParam` provided to the WndProc
Hooks a windows message. The `callback` is called when
the message is received in the WndProc.
@@ -1371,7 +1373,7 @@ Returns `Boolean` - Whether the window's document has been edited.
Returns `Promise<NativeImage>` - Resolves with a [NativeImage](native-image.md)
Captures a snapshot of the page within `rect`. Omitting `rect` will capture the whole visible page.
Captures a snapshot of the page within `rect`. Omitting `rect` will capture the whole visible page. If the page is not visible, `rect` may be empty.
#### `win.loadURL(url[, options])`

View File

@@ -80,6 +80,12 @@ This switch can not be used in `app.commandLine.appendSwitch` since it is parsed
earlier than user's app is loaded, but you can set the `ELECTRON_ENABLE_LOGGING`
environment variable to achieve the same effect.
## --force-fieldtrials=`trials`
Field trials to be forcefully enabled or disabled.
For example: `WebRTC-Audio-Red-For-Opus/Enabled/`
### --host-rules=`rules`
A comma-separated list of `rules` that control how hostnames are mapped.

View File

@@ -33,7 +33,7 @@ page you load in your renderer executes code in this world.
### Isolated World
When `contextIsolation` is enabled in your `webPreferences`, your `preload` scripts run in an
When `contextIsolation` is enabled in your `webPreferences` (this is the default behavior since Electron 12.0.0), your `preload` scripts run in an
"Isolated World". You can read more about context isolation and what it affects in the
[security](../tutorial/security.md#3-enable-context-isolation-for-remote-content) docs.
@@ -110,3 +110,22 @@ has been included below for completeness:
| `Symbol` | N/A | ❌ | ❌ | Symbols cannot be copied across contexts so they are dropped |
If the type you care about is not in the above table, it is probably not supported.
### Exposing Node Global Symbols
The `contextBridge` can be used by the preload script to give your renderer access to Node APIs.
The table of supported types described above also applies to Node APIs that you expose through `contextBridge`.
Please note that many Node APIs grant access to local system resources.
Be very cautious about which globals and APIs you expose to untrusted remote content.
```javascript
const { contextBridge } = require('electron')
const crypto = require('crypto')
contextBridge.exposeInMainWorld('nodeCrypto', {
sha256sum (data) {
const hash = crypto.createHash('sha256')
hash.update(data)
return hash.digest('hex')
}
})
```

View File

@@ -45,6 +45,8 @@ The following events are available on instances of `Cookies`:
#### Event: 'changed'
Returns:
* `event` Event
* `cookie` [Cookie](structures/cookie.md) - The cookie that was changed.
* `cause` String - The cause of the change with one of the following values:

View File

@@ -77,7 +77,8 @@ The `crashReporter` module has the following methods:
### `crashReporter.start(options)`
* `options` Object
* `submitURL` String - URL that crash reports will be sent to as POST.
* `submitURL` String (optional) - URL that crash reports will be sent to as
POST. Required unless `uploadToServer` is `false`.
* `productName` String (optional) - Defaults to `app.name`.
* `companyName` String (optional) _Deprecated_ - Deprecated alias for
`{ globalExtra: { _companyName: ... } }`.

View File

@@ -83,8 +83,10 @@ win.show()
blur effect to the content below the window (i.e. other applications open on
the user's system).
* The window will not be transparent when DevTools is opened.
* On Windows operating systems, transparent windows will not work when DWM is
* On Windows operating systems,
* transparent windows will not work when DWM is
disabled.
* transparent windows can not be maximized using the Windows system menu or by double clicking the title bar. The reasoning behind this can be seen on [this pull request](https://github.com/electron/electron/pull/28207).
* On Linux, users have to put `--enable-transparent-visuals --disable-gpu` in
the command line to disable GPU and allow ARGB to make transparent window,
this is caused by an upstream bug that [alpha channel doesn't work on some

View File

@@ -1,142 +0,0 @@
# Locales
> Locale values returned by `app.getLocale()`.
Electron uses Chromium's `l10n_util` library to fetch the locale. Possible
values are listed below:
| Language Code | Language Name |
|---------------|---------------|
| af | Afrikaans |
| am | Amharic |
| ar | Arabic |
| az | Azerbaijani |
| be | Belarusian |
| bg | Bulgarian |
| bh | Bihari |
| bn | Bengali |
| br | Breton |
| bs | Bosnian |
| ca | Catalan |
| co | Corsican |
| cs | Czech |
| cy | Welsh |
| da | Danish |
| de | German |
| de-AT | German (Austria) |
| de-CH | German (Switzerland) |
| de-DE | German (Germany) |
| el | Greek |
| en | English |
| en-AU | English (Australia) |
| en-CA | English (Canada) |
| en-GB | English (UK) |
| en-NZ | English (New Zealand) |
| en-US | English (US) |
| en-ZA | English (South Africa) |
| eo | Esperanto |
| es | Spanish |
| es-419 | Spanish (Latin America) |
| et | Estonian |
| eu | Basque |
| fa | Persian |
| fi | Finnish |
| fil | Filipino |
| fo | Faroese |
| fr | French |
| fr-CA | French (Canada) |
| fr-CH | French (Switzerland) |
| fr-FR | French (France) |
| fy | Frisian |
| ga | Irish |
| gd | Scots Gaelic |
| gl | Galician |
| gn | Guarani |
| gu | Gujarati |
| ha | Hausa |
| haw | Hawaiian |
| he | Hebrew |
| hi | Hindi |
| hr | Croatian |
| hu | Hungarian |
| hy | Armenian |
| ia | Interlingua |
| id | Indonesian |
| is | Icelandic |
| it | Italian |
| it-CH | Italian (Switzerland) |
| it-IT | Italian (Italy) |
| ja | Japanese |
| jw | Javanese |
| ka | Georgian |
| kk | Kazakh |
| km | Cambodian |
| kn | Kannada |
| ko | Korean |
| ku | Kurdish |
| ky | Kyrgyz |
| la | Latin |
| ln | Lingala |
| lo | Laothian |
| lt | Lithuanian |
| lv | Latvian |
| mk | Macedonian |
| ml | Malayalam |
| mn | Mongolian |
| mo | Moldavian |
| mr | Marathi |
| ms | Malay |
| mt | Maltese |
| nb | Norwegian (Bokmal) |
| ne | Nepali |
| nl | Dutch |
| nn | Norwegian (Nynorsk) |
| no | Norwegian |
| oc | Occitan |
| om | Oromo |
| or | Oriya |
| pa | Punjabi |
| pl | Polish |
| ps | Pashto |
| pt | Portuguese |
| pt-BR | Portuguese (Brazil) |
| pt-PT | Portuguese (Portugal) |
| qu | Quechua |
| rm | Romansh |
| ro | Romanian |
| ru | Russian |
| sd | Sindhi |
| sh | Serbo-Croatian |
| si | Sinhalese |
| sk | Slovak |
| sl | Slovenian |
| sn | Shona |
| so | Somali |
| sq | Albanian |
| sr | Serbian |
| st | Sesotho |
| su | Sundanese |
| sv | Swedish |
| sw | Swahili |
| ta | Tamil |
| te | Telugu |
| tg | Tajik |
| th | Thai |
| ti | Tigrinya |
| tk | Turkmen |
| to | Tonga |
| tr | Turkish |
| tt | Tatar |
| tw | Twi |
| ug | Uighur |
| uk | Ukrainian |
| ur | Urdu |
| uz | Uzbek |
| vi | Vietnamese |
| xh | Xhosa |
| yi | Yiddish |
| yo | Yoruba |
| zh | Chinese |
| zh-CN | Chinese (Simplified) |
| zh-TW | Chinese (Traditional) |
| zu | Zulu |

View File

@@ -1,3 +1,5 @@
# Menu
## Class: Menu
> Create native application menus and context menus.

View File

@@ -9,12 +9,15 @@ channel messaging.
## Class: MessageChannelMain
> Channel interface for channel messaging in the main process.
Process: [Main](../glossary.md#main-process)
Example:
```js
// Main process
const { MessageChannelMain } = require('electron')
const { port1, port2 } = new MessageChannelMain()
w.webContents.postMessage('port', null, [port2])
port1.postMessage({ some: 'message' })

View File

@@ -14,6 +14,8 @@ channel messaging.
## Class: MessagePortMain
> Port interface for channel messaging in the main process.
Process: [Main](../glossary.md#main-process)
### Instance Methods

View File

@@ -30,11 +30,13 @@ In sandboxed renderers the `process` object contains only a subset of the APIs:
* `arch`
* `platform`
* `sandboxed`
* `contextIsolated`
* `type`
* `version`
* `versions`
* `mas`
* `windowsStore`
* `contextId`
## Events
@@ -43,19 +45,6 @@ In sandboxed renderers the `process` object contains only a subset of the APIs:
Emitted when Electron has loaded its internal initialization script and is
beginning to load the web page or the main script.
It can be used by the preload script to add removed Node global symbols back to
the global scope when node integration is turned off:
```javascript
// preload.js
const _setImmediate = setImmediate
const _clearImmediate = clearImmediate
process.once('loaded', () => {
global.setImmediate = _setImmediate
global.clearImmediate = _clearImmediate
})
```
## Properties
### `process.defaultApp` _Readonly_
@@ -93,6 +82,11 @@ A `String` representing the path to the resources directory.
A `Boolean`. When the renderer process is sandboxed, this property is `true`,
otherwise it is `undefined`.
### `process.contextIsolated` _Readonly_
A `Boolean` that indicates whether the current renderer context has `contextIsolation` enabled.
It is `undefined` in the main process.
### `process.throwDeprecation`
A `Boolean` that controls whether or not deprecation warnings will be thrown as
@@ -133,6 +127,13 @@ A `String` representing Electron's version string.
A `Boolean`. If the app is running as a Windows Store app (appx), this property is `true`,
for otherwise it is `undefined`.
### `process.contextId` _Readonly_
A `String` (optional) representing a globally unique ID of the current JavaScript context.
Each frame has its own JavaScript context. When contextIsolation is enabled, the isolated
world also has a separate JavaScript context.
This property is only available in the renderer process.
## Methods
The `process` object has the following methods:

View File

@@ -822,6 +822,11 @@ Returns `Extension[]` - A list of all loaded extensions.
**Note:** This API cannot be called before the `ready` event of the `app` module
is emitted.
#### `ses.getStoragePath()`
A `String | null` indicating the absolute file system path where data for this
session is persisted on disk. For in memory sessions this returns `null`.
### Instance Properties
The following properties are available on instances of `Session`:
@@ -835,6 +840,11 @@ code to the `setSpellCheckerLanguages` API that isn't in this array will result
A `Boolean` indicating whether builtin spell checker is enabled.
#### `ses.storagePath` _Readonly_
A `String | null` indicating the absolute file system path where data for this
session is persisted on disk. For in memory sessions this returns `null`.
#### `ses.cookies` _Readonly_
A [`Cookies`](cookies.md) object for this session.

View File

@@ -1,8 +1,4 @@
## Class: ShareMenu
> Create share menu on macOS.
Process: [Main](../glossary.md#main-process)
# ShareMenu
The `ShareMenu` class creates [Share Menu][share-menu] on macOS, which can be
used to share information from the current context to apps, social media
@@ -11,6 +7,12 @@ accounts, and other services.
For including the share menu as a submenu of other menus, please use the
`shareMenu` role of [`MenuItem`](menu-item.md).
## Class: ShareMenu
> Create share menu on macOS.
Process: [Main](../glossary.md#main-process)
### `new ShareMenu(sharingItem)`
* `sharingItem` SharingItem - The item to share.

View File

@@ -19,3 +19,7 @@
property set then its `type` is assumed to be `tasks`. If the `name` property
is set but the `type` property is omitted then the `type` is assumed to be
`custom`.
**Note:** The maximum length of a Jump List item's `description` property is
260 characters. Beyond this limit, the item will not be added to the Jump
List, nor will it be displayed.

View File

@@ -17,7 +17,7 @@
* `title` String (optional) - The text to be displayed for the item in the Jump List.
Should only be set if `type` is `task`.
* `description` String (optional) - Description of the task (displayed in a tooltip).
Should only be set if `type` is `task`.
Should only be set if `type` is `task`. Maximum length 260 characters.
* `iconPath` String (optional) - The absolute path to an icon to be displayed in a
Jump List, which can be an arbitrary resource file that contains an icon
(e.g. `.ico`, `.exe`, `.dll`). You can usually specify `process.execPath` to

View File

@@ -1,6 +1,6 @@
# UploadFile Object
* `type` String - `file`.
* `type` 'file' - `file`.
* `filePath` String - Path of file to be uploaded.
* `offset` Integer - Defaults to `0`.
* `length` Integer - Number of bytes to read from `offset`.

View File

@@ -1,4 +1,4 @@
# UploadRawData Object
* `type` String - `rawData`.
* `type` 'rawData' - `rawData`.
* `bytes` Buffer - Data to be uploaded.

View File

@@ -130,6 +130,8 @@ This is necessary for events such as `NSUserDefaultsDidChangeNotification`.
* `userInfo` Record<String, unknown>
* `object` String
Returns `Number` - The ID of this subscription
Same as `subscribeNotification`, but uses `NSWorkspace.sharedWorkspace.notificationCenter`.
This is necessary for events such as `NSWorkspaceDidActivateApplicationNotification`.

View File

@@ -1,3 +1,5 @@
# TouchBar
## Class: TouchBar
> Create TouchBar layouts for native macOS applications

View File

@@ -1,3 +1,5 @@
# Tray
## Class: Tray
> Add icons and context menus to the system's notification area.

View File

@@ -1184,6 +1184,7 @@ Ignore application menu shortcuts while this web contents is focused.
* `url` String - The _resolved_ version of the URL passed to `window.open()`. e.g. opening a window with `window.open('foo')` will yield something like `https://the-origin/the/current/path/foo`.
* `frameName` String - Name of the window provided in `window.open()`
* `features` String - Comma separated list of window features provided to `window.open()`.
Returns `{action: 'deny'} | {action: 'allow', overrideBrowserWindowOptions?: BrowserWindowConstructorOptions}` - `deny` cancels the creation of the new
window. `allow` will allow the new window to be created. Specifying `overrideBrowserWindowOptions` allows customization of the created window.
Returning an unrecognized value such as a null, undefined, or an object
@@ -1363,19 +1364,21 @@ Captures a snapshot of the page within `rect`. Omitting `rect` will capture the
Returns `Boolean` - Whether this page is being captured. It returns true when the capturer count
is large then 0.
#### `contents.incrementCapturerCount([size, stayHidden])`
#### `contents.incrementCapturerCount([size, stayHidden, stayAwake])`
* `size` [Size](structures/size.md) (optional) - The preferred size for the capturer.
* `stayHidden` Boolean (optional) - Keep the page hidden instead of visible.
* `stayAwake` Boolean (optional) - Keep the system awake instead of allowing it to sleep.
Increase the capturer count by one. The page is considered visible when its browser window is
hidden and the capturer count is non-zero. If you would like the page to stay hidden, you should ensure that `stayHidden` is set to true.
This also affects the Page Visibility API.
#### `contents.decrementCapturerCount([stayHidden])`
#### `contents.decrementCapturerCount([stayHidden, stayAwake])`
* `stayHidden` Boolean (optional) - Keep the page in hidden state instead of visible.
* `stayAwake` Boolean (optional) - Keep the system awake instead of allowing it to sleep.
Decrease the capturer count by one. The page will be set to hidden or occluded state when its
browser window is hidden or occluded and the capturer count reaches zero. If you want to

View File

@@ -5,7 +5,7 @@
Electron's `webview` tag is based on [Chromium's `webview`][chrome-webview], which
is undergoing dramatic architectural changes. This impacts the stability of `webviews`,
including rendering, navigation, and event routing. We currently recommend to not
use the `webview` tag and to consider alternatives, like `iframe`, Electron's `BrowserView`,
use the `webview` tag and to consider alternatives, like `iframe`, [Electron's `BrowserView`](browser-view.md),
or an architecture that avoids embedded content altogether.
## Enabling

View File

@@ -83,9 +83,9 @@ const mainWindow = new BrowserWindow()
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
if (url.startsWith('https://github.com/')) {
return true
return { action: 'allow' }
}
return false
return { action: 'deny' }
})
mainWindow.webContents.on('did-create-window', (childWindow) => {

View File

@@ -136,6 +136,22 @@ systemPreferences.isHighContrastColorScheme()
nativeTheme.shouldUseHighContrastColors
```
### Deprecated: WebContents `new-window` event
The `new-window` event of WebContents has been deprecated. It is replaced by [`webContents.setWindowOpenHandler()`](api/web-contents.md#contentssetwindowopenhandlerhandler).
```js
// Deprecated in Electron 13
webContents.on('new-window', (event) => {
event.preventDefault()
})
// Replace with
webContents.setWindowOpenHandler((details) => {
return { action: 'deny' }
})
```
## Planned Breaking API Changes (12.0)
### Removed: Pepper Flash support
@@ -160,6 +176,9 @@ the previous behavior, `contextIsolation: false` must be specified in WebPrefere
We [recommend having contextIsolation enabled](https://github.com/electron/electron/blob/master/docs/tutorial/security.md#3-enable-context-isolation-for-remote-content) for the security of your application.
Another implication is that `require()` cannot be used in the renderer process unless
`nodeIntegration` is `true` and `contextIsolation` is `false`.
For more details see: https://github.com/electron/electron/issues/23506
### Removed: `crashReporter.getCrashesDirectory()`

View File

@@ -1,6 +1,8 @@
# Build Instructions
Follow the guidelines below for building Electron.
Follow the guidelines below for building **Electron itself**, for the purposes of creating custom Electron binaries. For bundling and distributing your app code with the prebuilt Electron binaries, see the [application distribution][application-distribution] guide.
[application-distribution]: ../tutorial/application-distribution.md
## Platform prerequisites

View File

@@ -1,6 +1,8 @@
# Build Instructions (Linux)
Follow the guidelines below for building Electron on Linux.
Follow the guidelines below for building **Electron itself** on Linux, for the purposes of creating custom Electron binaries. For bundling and distributing your app code with the prebuilt Electron binaries, see the [application distribution][application-distribution] guide.
[application-distribution]: ../tutorial/application-distribution.md
## Prerequisites

View File

@@ -1,6 +1,8 @@
# Build Instructions (macOS)
Follow the guidelines below for building Electron on macOS.
Follow the guidelines below for building **Electron itself** on macOS, for the purposes of creating custom Electron binaries. For bundling and distributing your app code with the prebuilt Electron binaries, see the [application distribution][application-distribution] guide.
[application-distribution]: ../tutorial/application-distribution.md
## Prerequisites

View File

@@ -1,6 +1,8 @@
# Build Instructions (Windows)
Follow the guidelines below for building Electron on Windows.
Follow the guidelines below for building **Electron itself** on Windows, for the purposes of creating custom Electron binaries. For bundling and distributing your app code with the prebuilt Electron binaries, see the [application distribution][application-distribution] guide.
[application-distribution]: ../tutorial/application-distribution.md
## Prerequisites

View File

@@ -33,8 +33,7 @@ contributing, and more. Please use the issue tracker for bugs only!
To submit a bug report:
When opening a new issue in the [`electron/electron` issue tracker](https://github.com/electron/electron/issues/new/choose), users
will be presented with [a template](https://github.com/electron/electron/blob/master/.github/ISSUE_TEMPLATE/Bug_report.md)
that should be filled in.
will be presented with a template that should be filled in.
If you believe that you have found a bug in Electron, please fill out the template
to the best of your ability.

View File

@@ -100,7 +100,5 @@ script/ - The set of all scripts Electron runs for a variety of purposes.
└── uploaders/ - Uploads various release-related files during release.
```
* **tools** - Helper scripts used by GN files.
* Scripts put here should never be invoked by users directly, unlike those in `script`.
* **typings** - TypeScript typings for Electron's internal code.
* **vendor** - Source code for some third party dependencies.

View File

@@ -8,9 +8,9 @@
<body>
<h1>Hello World!</h1>
<p>
We are using node <script>document.write(process.versions.node)</script>,
Chrome <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.
We are using Node.js <span id="node-version"></span>,
Chromium <span id="chrome-version"></span>,
and Electron <span id="electron-version"></span>.
</p>
</body>
</html>

View File

@@ -1,18 +1,27 @@
const { app, BrowserWindow } = require('electron')
const path = require('path')
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
preload: path.join(__dirname, 'preload.js')
}
})
win.loadFile('index.html')
}
app.whenReady().then(createWindow)
app.whenReady().then(() => {
createWindow()
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
@@ -20,8 +29,3 @@ app.on('window-all-closed', () => {
}
})
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})

View File

@@ -0,0 +1,11 @@
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
if (element) element.innerText = text
}
for (const type of ['chrome', 'node', 'electron']) {
replaceText(`${type}-version`, process.versions[type])
}
})

View File

@@ -11,14 +11,19 @@ npm install electron --save-dev
See the [Electron versioning doc][versioning] for info on how to
manage Electron versions in your apps.
## Global Installation
## Running Electron ad-hoc
You can also install the `electron` command globally in your `$PATH`:
If you're in a pinch and would prefer to not use `npm install` in your local
project, you can also run Electron ad-hoc using the [`npx`][npx] command runner
bundled with `npm`:
```sh
npm install electron -g
npx electron .
```
The above command will run the current working directory with Electron. Note that
any dependencies in your app will not be installed.
## Customization
If you want to change the architecture that is downloaded (e.g., `ia32` on an
@@ -178,6 +183,7 @@ If you need to force a re-download of the asset and the SHASUM file set the
[npm]: https://docs.npmjs.com
[versioning]: ./electron-versioning.md
[npx]: https://docs.npmjs.com/cli/v7/commands/npx
[releases]: https://github.com/electron/electron/releases
[proxy-env-10]: https://github.com/gajus/global-agent/blob/v2.1.5/README.md#environment-variables
[proxy-env]: https://github.com/np-maintain/global-tunnel/blob/v2.7.1/README.md#auto-config

View File

@@ -32,6 +32,7 @@ From a development perspective, an Electron application is essentially a Node.js
my-electron-app/
├── package.json
├── main.js
├── preload.js
└── index.html
```
@@ -55,45 +56,49 @@ The main script may look as follows:
```javascript fiddle='docs/fiddles/quick-start'
const { app, BrowserWindow } = require('electron')
const path = require('path')
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
preload: path.join(__dirname, 'preload.js')
}
})
win.loadFile('index.html')
}
app.whenReady().then(createWindow)
app.whenReady().then(() => {
createWindow()
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
```
##### What is going on above?
1. Line 1: First, you import the `app` and `BrowserWindow` modules of the `electron` package to be able to manage your application's lifecycle events, as well as create and control browser windows.
2. Line 3: After that, you define a function that creates a [new browser window](../api/browser-window.md#new-browserwindowoptions) with node integration enabled, loads `index.html` file into this window (line 12, we will discuss the file later).
3. Line 15: You create a new browser window by invoking the `createWindow` function once the Electron application [is initialized](../api/app.md#appwhenready).
4. Line 17: You add a new listener that tries to quit the application when it no longer has any open windows. This listener is a no-op on macOS due to the operating system's [window management behavior](https://support.apple.com/en-ca/guide/mac-help/mchlp2469/mac).
5. Line 23: You add a new listener that creates a new browser window only if when the application has no visible windows after being activated. For example, after launching the application for the first time, or re-launching the already running application.
2. Line 2: Second, you import the `path` package which provides utility functions for file paths.
3. Line 4: After that, you define a function that creates a [new browser window](../api/browser-window.md#new-browserwindowoptions) with a preload script, loads `index.html` file into this window (line 13, we will discuss the file later).
4. Line 16: You create a new browser window by invoking the `createWindow` function once the Electron application [is initialized](../api/app.md#appwhenready).
5. Line 18: You add a new listener that creates a new browser window only if when the application has no visible windows after being activated. For example, after launching the application for the first time, or re-launching the already running application.
6. Line 25: You add a new listener that tries to quit the application when it no longer has any open windows. This listener is a no-op on macOS due to the operating system's [window management behavior](https://support.apple.com/en-ca/guide/mac-help/mchlp2469/mac).
#### Create a web page
This is the web page you want to display once the application is initialized. This web page represents the Renderer process. You can create multiple browser windows, where each window uses its own independent Renderer. Each window can optionally be granted with full access to Node.js API through the `nodeIntegration` preference.
This is the web page you want to display once the application is initialized. This web page represents the Renderer process. You can create multiple browser windows, where each window uses its own independent Renderer. You can optionally grant access to additional Node.js APIs by exposing them from your preload script.
The `index.html` page looks as follows:
@@ -108,14 +113,38 @@ The `index.html` page looks as follows:
<body style="background: white;">
<h1>Hello World!</h1>
<p>
We are using node <script>document.write(process.versions.node)</script>,
Chrome <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.
We are using Node.js <span id="node-version"></span>,
Chromium <span id="chrome-version"></span>,
and Electron <span id="electron-version"></span>.
</p>
</body>
</html>
```
#### Define a preload script
Your preload script (in our case, the `preload.js` file) acts as a bridge between Node.js and your web page. It allows you to expose specific APIs and behaviors to your web page rather than insecurely exposing the entire Node.js API. In this example we will use the preload script to read version information from the `process` object and update the web page with that info.
```javascript fiddle='docs/fiddles/quick-start'
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
if (element) element.innerText = text
}
for (const type of ['chrome', 'node', 'electron']) {
replaceText(`${type}-version`, process.versions[type])
}
})
```
##### What's going on above?
1. On line 1: First you define an event listener that tells you when the web page has loaded
2. On line 2: Second you define a utility function used to set the text of the placeholders in the `index.html`
3. On line 7: Next you loop through the list of components whose version you want to display
4. On line 8: Finally, you call `replaceText` to look up the version placeholders in `index.html` and set their text value to the values from `process.versions`
#### Modify your package.json file
Your Electron application uses the `package.json` file as the main entry point (as any other Node.js application). The main script of your application is `main.js`, so modify the `package.json` file accordingly:
@@ -167,7 +196,8 @@ The simplest and the fastest way to distribute your newly created app is using
1. Import Electron Forge to your app folder:
```sh
npx @electron-forge/cli import
npm install --save-dev @electron-forge/cli
npx electron-forge import
✔ Checking your system
✔ Initializing Git Repository
@@ -282,7 +312,7 @@ ipcRenderer.invoke('perform-action', ...args)
##### Node.js API
> NOTE: To access the Node.js API from the Renderer process, you need to set the `nodeIntegration` preference to `true`.
> NOTE: To access the Node.js API from the Renderer process, you need to set the `nodeIntegration` preference to `true` and the `contextIsolation` preference to `false`. Please note that access to the Node.js API in any renderer that loads remote content is not recommended for [security reasons](../tutorial/security.md#2-do-not-enable-nodejs-integration-for-remote-content).
Electron exposes full access to Node.js API and its modules both in the Main and the Renderer processes. For example, you can read all the files from the root directory:

View File

@@ -83,6 +83,22 @@ following code snippet to your menu template:
}
```
Make sure the application menu is added after the [`'ready'`](../api/app.md#event-ready)
event and not before, or the menu item will be disabled:
```javascript
const { app, Menu } = require('electron')
const template = [
// Menu template here
]
const menu = Menu.buildFromTemplate(template)
app.whenReady().then(() => {
Menu.setApplicationMenu(menu)
})
```
![macOS Recent Documents menu item][menu-item-image]
When a file is requested from the recent documents menu, the `open-file` event

View File

@@ -1,27 +1,23 @@
# REPL
Read-Eval-Print-Loop (REPL) is a simple, interactive computer programming
environment that takes single user inputs (i.e. single expressions), evaluates
them, and returns the result to the user.
[Read-Eval-Print-Loop](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) (REPL)
is a simple, interactive computer programming environment that takes single user
inputs (i.e. single expressions), evaluates them, and returns the result to the user.
The `repl` module provides a REPL implementation that can be accessed using:
## Main process
* Assuming you have `electron` or `electron-prebuilt` installed as a local
project dependency:
Electron exposes the [Node.js `repl` module](https://nodejs.org/dist/latest/docs/api/repl.html)
through the `--interactive` CLI flag. Assuming you have `electron` installed as a local project
dependency, you should be able to access the REPL with the following command:
```sh
./node_modules/.bin/electron --interactive
```
* Assuming you have `electron` or `electron-prebuilt` installed globally:
**Note:** `electron --interactive` is not available on Windows
(see [electron/electron#5776](https://github.com/electron/electron/pull/5776) for more details).
```sh
electron --interactive
```
## Renderer process
This only creates a REPL for the main process. You can use the Console
tab of the Dev Tools to get a REPL for the renderer processes.
**Note:** `electron --interactive` is not available on Windows.
More information can be found in the [Node.js REPL docs](https://nodejs.org/dist/latest/docs/api/repl.html).
You can use the DevTools Console tab to get a REPL for any renderer process.
To learn more, read [the Chrome documentation](https://developer.chrome.com/docs/devtools/console/).

View File

@@ -44,7 +44,7 @@ Chromium shared library and Node.js. Vulnerabilities affecting these components
may impact the security of your application. By updating Electron to the latest
version, you ensure that critical vulnerabilities (such as *nodeIntegration bypasses*)
are already patched and cannot be exploited in your application. For more information,
see "[Use a current version of Electron](#17-use-a-current-version-of-electron)".
see "[Use a current version of Electron](#15-use-a-current-version-of-electron)".
* **Evaluate your dependencies.** While NPM provides half a million reusable packages,
it is your responsibility to choose trusted 3rd-party libraries. If you use outdated
@@ -99,9 +99,7 @@ You should at least follow these steps to improve the security of your applicati
12. [Disable or limit navigation](#12-disable-or-limit-navigation)
13. [Disable or limit creation of new windows](#13-disable-or-limit-creation-of-new-windows)
14. [Do not use `openExternal` with untrusted content](#14-do-not-use-openexternal-with-untrusted-content)
15. [Disable the `remote` module](#15-disable-the-remote-module)
16. [Filter the `remote` module](#16-filter-the-remote-module)
17. [Use a current version of Electron](#17-use-a-current-version-of-electron)
15. [Use a current version of Electron](#15-use-a-current-version-of-electron)
To automate the detection of misconfigurations and insecure patterns, it is
possible to use
@@ -665,134 +663,7 @@ const { shell } = require('electron')
shell.openExternal('https://example.com/index.html')
```
## 15) Disable the `remote` module
The `remote` module provides a way for the renderer processes to
access APIs normally only available in the main process. Using it, a
renderer can invoke methods of a main process object without explicitly sending
inter-process messages. If your desktop application does not run untrusted
content, this can be a useful way to have your renderer processes access and
work with modules that are only available to the main process, such as
GUI-related modules (dialogs, menus, etc.).
However, if your app can run untrusted content and even if you
[sandbox][sandbox] your renderer processes accordingly, the `remote` module
makes it easy for malicious code to escape the sandbox and have access to
system resources via the higher privileges of the main process. Therefore,
it should be disabled in such circumstances.
### Why?
`remote` uses an internal IPC channel to communicate with the main process.
"Prototype pollution" attacks can grant malicious code access to the internal
IPC channel, which can then be used to escape the sandbox by mimicking `remote`
IPC messages and getting access to main process modules running with higher
privileges.
Additionally, it's possible for preload scripts to accidentally leak modules to a
sandboxed renderer. Leaking `remote` arms malicious code with a multitude
of main process modules with which to perform an attack.
Disabling the `remote` module eliminates these attack vectors. Enabling
context isolation also prevents the "prototype pollution" attacks from
succeeding.
### How?
```js
// Bad if the renderer can run untrusted content
const mainWindow = new BrowserWindow({
webPreferences: {
enableRemoteModule: true
}
})
```
```js
// Good
const mainWindow = new BrowserWindow({
webPreferences: {
enableRemoteModule: false
}
})
```
```html
<!-- Bad if the renderer can run untrusted content -->
<webview enableremotemodule="true" src="page.html"></webview>
<!-- Good -->
<webview enableremotemodule="false" src="page.html"></webview>
```
> **Note:** The default value of `enableRemoteModule` is `false` starting
> from Electron 10. For prior versions, you need to explicitly disable
> the `remote` module by the means above.
## 16) Filter the `remote` module
If you cannot disable the `remote` module, you should filter the globals,
Node, and Electron modules (so-called built-ins) accessible via `remote`
that your application does not require. This can be done by blocking
certain modules entirely and by replacing others with proxies that
expose only the functionality that your app needs.
### Why?
Due to the system access privileges of the main process, functionality
provided by the main process modules may be dangerous in the hands of
malicious code running in a compromised renderer process. By limiting
the set of accessible modules to the minimum that your app needs and
filtering out the others, you reduce the toolset that malicious code
can use to attack the system.
Note that the safest option is to
[fully disable the remote module](#15-disable-the-remote-module). If
you choose to filter access rather than completely disable the module,
you must be very careful to ensure that no escalation of privilege is
possible through the modules you allow past the filter.
### How?
```js
const readOnlyFsProxy = require(/* ... */) // exposes only file read functionality
const allowedModules = new Set(['crypto'])
const proxiedModules = new Map([['fs', readOnlyFsProxy]])
const allowedElectronModules = new Set(['shell'])
const allowedGlobals = new Set()
app.on('remote-require', (event, webContents, moduleName) => {
if (proxiedModules.has(moduleName)) {
event.returnValue = proxiedModules.get(moduleName)
}
if (!allowedModules.has(moduleName)) {
event.preventDefault()
}
})
app.on('remote-get-builtin', (event, webContents, moduleName) => {
if (!allowedElectronModules.has(moduleName)) {
event.preventDefault()
}
})
app.on('remote-get-global', (event, webContents, globalName) => {
if (!allowedGlobals.has(globalName)) {
event.preventDefault()
}
})
app.on('remote-get-current-window', (event, webContents) => {
event.preventDefault()
})
app.on('remote-get-current-web-contents', (event, webContents) => {
event.preventDefault()
})
```
## 17) Use a current version of Electron
## 15) Use a current version of Electron
You should strive for always using the latest available version of Electron.
Whenever a new major version is released, you should attempt to update your

View File

@@ -94,7 +94,7 @@ Following platforms are supported by Electron:
### macOS
Only 64bit binaries are provided for macOS, and the minimum macOS version
supported is macOS 10.10 (Yosemite).
supported is macOS 10.11 (El Capitan).
Native support for Apple Silicon (`arm64`) devices was added in Electron 11.0.0.

View File

@@ -86,12 +86,12 @@ const driver = new webdriver.Builder()
// The "9515" is the port opened by chrome driver.
.usingServer('http://localhost:9515')
.withCapabilities({
chromeOptions: {
'goog:chromeOptions': {
// Here is the path to your Electron binary.
binary: '/Path-to-Your-App.app/Contents/MacOS/Electron'
}
})
.forBrowser('electron')
.forBrowser('chrome') // note: use .forBrowser('electron') for selenium-webdriver <= 3.6.0
.build()
driver.get('http://www.google.com')

View File

@@ -73,7 +73,7 @@ template("electron_extra_paks") {
"//components/resources",
"//content:content_resources",
"//content:dev_ui_content_resources",
"//content/browser/resources/media:media_internals_resources",
"//content/browser/resources/media:resources",
"//content/browser/tracing:resources",
"//content/browser/webrtc/resources",
"//electron:resources",

View File

@@ -51,6 +51,21 @@
<message name="IDS_PICTURE_IN_PICTURE_SKIP_AD_CONTROL_TEXT" desc="Text label of the skip ad control button. The button appears when the user hovers over the Picture-in-Picture window.">
Skip Ad
</message>
<message name="IDS_PICTURE_IN_PICTURE_MUTE_MICROPHONE_TEXT" desc="Text label of the mute microphone control button. The button appears when the user hovers over the Picture-in-Picture window.">
Mute microphone
</message>
<message name="IDS_PICTURE_IN_PICTURE_UNMUTE_MICROPHONE_TEXT" desc="Text label of the unmute microphone control button. The button appears when the user hovers over the Picture-in-Picture window.">
Unmute microphone
</message>
<message name="IDS_PICTURE_IN_PICTURE_TURN_ON_CAMERA_TEXT" desc="Text label of the turn on camera control button. The button appears when the user hovers over the Picture-in-Picture window.">
Turn on camera
</message>
<message name="IDS_PICTURE_IN_PICTURE_TURN_OFF_CAMERA_TEXT" desc="Text label of the turn off camera control button. The button appears when the user hovers over the Picture-in-Picture window.">
Turn off camera
</message>
<message name="IDS_PICTURE_IN_PICTURE_HANG_UP_TEXT" desc="Text label of the hang up control button. The button appears when the user hovers over the Picture-in-Picture window.">
Hang up
</message>
<message name="IDS_PICTURE_IN_PICTURE_CLOSE_CONTROL_TEXT" desc="Text label of the close control button. The button appears when the user hovers over the Picture-in-Picture window.">
Close
</message>

View File

@@ -29,7 +29,6 @@ auto_filenames = {
"docs/api/incoming-message.md",
"docs/api/ipc-main.md",
"docs/api/ipc-renderer.md",
"docs/api/locales.md",
"docs/api/menu-item.md",
"docs/api/menu.md",
"docs/api/message-channel-main.md",

View File

@@ -404,6 +404,8 @@ filenames = {
"shell/browser/native_window_observer.h",
"shell/browser/net/asar/asar_url_loader.cc",
"shell/browser/net/asar/asar_url_loader.h",
"shell/browser/net/asar/asar_url_loader_factory.cc",
"shell/browser/net/asar/asar_url_loader_factory.h",
"shell/browser/net/cert_verifier_client.cc",
"shell/browser/net/cert_verifier_client.h",
"shell/browser/net/electron_url_loader_factory.cc",

View File

@@ -532,15 +532,17 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
return fs.readFile(realPath, options, callback);
}
const buffer = Buffer.alloc(info.size);
const fd = archive.getFd();
if (!(fd >= 0)) {
const error = createError(AsarError.NOT_FOUND, { asarPath, filePath });
nextTick(callback, [error]);
return;
}
logASARAccess(asarPath, filePath, info.offset);
archive.read(info.offset, info.size).then((buf) => {
const buffer = Buffer.from(buf);
callback(null, encoding ? buffer.toString(encoding) : buffer);
}, (err) => {
const error: AsarErrorObject = new Error(`EINVAL, ${err.message} while reading ${filePath} in ${asarPath}`);
error.code = 'EINVAL';
error.errno = -22;
callback(error);
fs.read(fd, buffer, 0, info.size, info.offset, (error: Error) => {
callback(error, encoding ? buffer.toString(encoding) : buffer);
});
};
@@ -573,19 +575,13 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
}
const { encoding } = options;
const buffer = Buffer.alloc(info.size);
const fd = archive.getFd();
if (!(fd >= 0)) throw createError(AsarError.NOT_FOUND, { asarPath, filePath });
logASARAccess(asarPath, filePath, info.offset);
let arrayBuffer: ArrayBuffer;
try {
arrayBuffer = archive.readSync(info.offset, info.size);
} catch (err) {
const error: AsarErrorObject = new Error(`EINVAL, ${err.message} while reading ${filePath} in ${asarPath}`);
error.code = 'EINVAL';
error.errno = -22;
throw error;
}
const buffer = Buffer.from(arrayBuffer);
return encoding ? buffer.toString(encoding) : buffer;
fs.readSync(fd, buffer, 0, info.size, info.offset);
return (encoding) ? buffer.toString(encoding) : buffer;
};
const { readdir } = fs;
@@ -697,17 +693,12 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
return [str, str.length > 0];
}
const buffer = Buffer.alloc(info.size);
const fd = archive.getFd();
if (!(fd >= 0)) return [];
logASARAccess(asarPath, filePath, info.offset);
let arrayBuffer: ArrayBuffer;
try {
arrayBuffer = archive.readSync(info.offset, info.size);
} catch (err) {
const error: AsarErrorObject = new Error(`EINVAL, ${err.message} while reading ${filePath} in ${asarPath}`);
error.code = 'EINVAL';
error.errno = -22;
throw error;
}
const buffer = Buffer.from(arrayBuffer);
fs.readSync(fd, buffer, 0, info.size, info.offset);
const str = buffer.toString('utf8');
return [str, str.length > 0];
};

View File

@@ -63,6 +63,9 @@ Object.defineProperty(app, 'applicationMenu', {
return execFile !== 'electron';
})();
// The native implementation is not provided on non-windows platforms
app.setAppUserModelId = app.setAppUserModelId || (() => {});
app._setDefaultAppPaths = (packagePath) => {
// Set the user path according to application's name.
app.setPath('userData', path.join(app.getPath('appData'), app.name!));

View File

@@ -10,13 +10,13 @@ class CrashReporter {
extra = {},
globalExtra = {},
ignoreSystemCrashHandler = false,
submitURL,
submitURL = '',
uploadToServer = true,
rateLimit = false,
compress = true
} = options || {};
if (submitURL == null) throw new Error('submitURL is a required option to crashReporter.start');
if (uploadToServer && !submitURL) throw new Error('submitURL must be specified when uploadToServer is true');
if (!compress) {
deprecate.log('Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.');

View File

@@ -2,10 +2,10 @@ import { app, BrowserWindow } from 'electron/main';
import type { OpenDialogOptions, OpenDialogReturnValue, MessageBoxOptions, SaveDialogOptions, SaveDialogReturnValue, MessageBoxReturnValue, CertificateTrustDialogOptions } from 'electron/main';
const dialogBinding = process._linkedBinding('electron_browser_dialog');
const DialogType = {
OPEN: 'OPEN' as 'OPEN',
SAVE: 'SAVE' as 'SAVE'
};
enum DialogType {
OPEN = 'OPEN',
SAVE = 'SAVE'
}
enum SaveFileDialogProperties {
createDirectory = 1 << 0,
@@ -72,7 +72,7 @@ const setupSaveDialogProperties = (properties: (keyof typeof SaveFileDialogPrope
return dialogProperties;
};
const setupDialogProperties = (type: keyof typeof DialogType, properties: string[]): number => {
const setupDialogProperties = (type: DialogType, properties: string[]): number => {
if (type === DialogType.OPEN) {
return setupOpenDialogProperties(properties as (keyof typeof OpenFileDialogProperties)[]);
} else if (type === DialogType.SAVE) {

View File

@@ -188,6 +188,11 @@ class ChunkedBodyStream extends Writable {
this._downstream = pipe;
if (this._pendingChunk) {
const doneWriting = (maybeError: Error | void) => {
// If the underlying request has been aborted, we honeslty don't care about the error
// all work should cease as soon as we abort anyway, this error is probably a
// "mojo pipe disconnected" error (code=9)
if (this._clientRequest._aborted) return;
const cb = this._pendingCallback!;
delete this._pendingCallback;
delete this._pendingChunk;

View File

@@ -1,5 +1,5 @@
import { app, ipcMain, session, deprecate, webFrameMain } from 'electron/main';
import type { BrowserWindowConstructorOptions, MenuItem, MenuItemConstructorOptions, LoadURLOptions } from 'electron/main';
import type { BrowserWindowConstructorOptions, LoadURLOptions } from 'electron/main';
import * as url from 'url';
import * as path from 'path';
@@ -61,7 +61,7 @@ const PDFPageSizes: Record<string, ElectronInternal.MediaSize> = {
width_microns: 279400,
custom_display_name: 'Tabloid'
}
};
} as const;
// The minimum micron size Chromium accepts is that where:
// Per printing/units.h:
@@ -94,6 +94,7 @@ const defaultPrintingSetting = {
pagesPerSheet: 1,
isFirstRequest: false,
previewUIID: 0,
// True, if the document source is modifiable. e.g. HTML and not PDF.
previewModifiable: true,
printToPDF: true,
deviceName: 'Save as PDF',
@@ -109,7 +110,7 @@ const defaultPrintingSetting = {
printerType: 2,
title: undefined as string | undefined,
url: undefined as string | undefined
};
} as const;
// JavaScript implementations of WebContents.
const binding = process._linkedBinding('electron_browser_web_contents');
@@ -191,7 +192,7 @@ WebContents.prototype.executeJavaScriptInIsolatedWorld = async function (worldId
let pendingPromise: Promise<any> | undefined;
WebContents.prototype.printToPDF = async function (options) {
const printSettings = {
const printSettings: Record<string, any> = {
...defaultPrintingSetting,
requestID: getNextId()
};
@@ -432,7 +433,11 @@ WebContents.prototype._callWindowOpenHandler = function (event: Electron.Event,
event.preventDefault();
return null;
} else if (response.action === 'allow') {
if (typeof response.overrideBrowserWindowOptions === 'object' && response.overrideBrowserWindowOptions !== null) { return response.overrideBrowserWindowOptions; } else { return {}; }
if (typeof response.overrideBrowserWindowOptions === 'object' && response.overrideBrowserWindowOptions !== null) {
return response.overrideBrowserWindowOptions;
} else {
return {};
}
} else {
event.preventDefault();
console.error('The window open handler response must be an object with an \'action\' property of \'allow\' or \'deny\'.');
@@ -546,18 +551,6 @@ WebContents.prototype._init = function () {
ipcMain.emit(channel, event, message);
});
// Handle context menu action request from pepper plugin.
this.on('pepper-context-menu' as any, function (event: ElectronInternal.Event, params: {x: number, y: number, menu: Array<(MenuItemConstructorOptions) | (MenuItem)>}, callback: () => void) {
// Access Menu via electron.Menu to prevent circular require.
const menu = require('electron').Menu.buildFromTemplate(params.menu);
menu.popup({
window: event.sender.getOwnerBrowserWindow(),
x: params.x,
y: params.y,
callback
});
});
this.on('crashed', (event, ...args) => {
app.emit('renderer-process-crashed', event, this, ...args);
});
@@ -580,19 +573,22 @@ WebContents.prototype._init = function () {
// Make new windows requested by links behave like "window.open".
this.on('-new-window' as any, (event: ElectronInternal.Event, url: string, frameName: string, disposition: string,
rawFeatures: string, referrer: Electron.Referrer, postData: PostData) => {
openGuestWindow({
event,
embedder: event.sender,
disposition,
referrer,
postData,
overrideBrowserWindowOptions: {},
windowOpenArgs: {
url,
frameName,
features: rawFeatures
}
});
const options = this._callWindowOpenHandler(event, url, frameName, rawFeatures);
if (!event.defaultPrevented) {
openGuestWindow({
event,
embedder: event.sender,
disposition,
referrer,
postData,
overrideBrowserWindowOptions: options || {},
windowOpenArgs: {
url,
frameName,
features: rawFeatures
}
});
}
});
let windowOpenOverriddenOptions: BrowserWindowConstructorOptions | null = null;
@@ -604,6 +600,7 @@ WebContents.prototype._init = function () {
// it's technically a BrowserWindowConstructorOptions option because
// we need to access it in the renderer at init time.
backgroundColor: windowOpenOverriddenOptions.backgroundColor,
transparent: windowOpenOverriddenOptions.transparent,
...windowOpenOverriddenOptions.webPreferences
} : undefined;
this._setNextChildWebPreferences(

View File

@@ -27,7 +27,7 @@ export const setDefaultApplicationMenu = () => {
{
label: 'Community Discussions',
click: async () => {
await shell.openExternal('https://discuss.atom.io/c/electron');
await shell.openExternal('https://discord.gg/electron');
}
},
{

View File

@@ -42,7 +42,6 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition
windowOpenArgs: WindowOpenArgs,
}): BrowserWindow | undefined {
const { url, frameName, features } = windowOpenArgs;
const isNativeWindowOpen = !!guest;
const { options: browserWindowOptions, additionalFeatures } = makeBrowserWindowOptions({
embedder,
features,
@@ -57,6 +56,7 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition
windowOpenArgs,
additionalFeatures,
disposition,
postData,
referrer
});
if (didCancelEvent) return;
@@ -74,11 +74,14 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition
webContents: guest,
...browserWindowOptions
});
if (!isNativeWindowOpen) {
if (!guest) {
// We should only call `loadURL` if the webContents was constructed by us in
// the case of BrowserWindowProxy (non-sandboxed, nativeWindowOpen: false),
// as navigating to the url when creating the window from an existing
// webContents is not necessary (it will navigate there anyway).
// This can also happen if we enter this function from OpenURLFromTab, in
// which case the browser process is responsible for initiating navigation
// in the new window.
window.loadURL(url, {
httpReferrer: referrer,
...(postData && {
@@ -146,7 +149,7 @@ function emitDeprecatedNewWindowEvent ({ event, embedder, guest, windowOpenArgs,
const isWebViewWithPopupsDisabled = embedder.getType() === 'webview' && embedder.getLastWebPreferences().disablePopups;
const postBody = postData ? {
data: postData,
headers: formatPostDataHeaders(postData as Electron.UploadRawData[])
...parseContentTypeFormat(postData)
} : null;
embedder.emit(
@@ -276,22 +279,40 @@ function getDeprecatedInheritedOptions (embedder: WebContents) {
return inheritableOptions;
}
function formatPostDataHeaders (postData: Electron.UploadRawData[]) {
function formatPostDataHeaders (postData: PostData) {
if (!postData) return;
let extraHeaders = 'content-type: application/x-www-form-urlencoded';
const { contentType, boundary } = parseContentTypeFormat(postData);
if (boundary != null) { return `content-type: ${contentType}; boundary=${boundary}`; }
if (postData.length > 0) {
const postDataFront = postData[0].bytes.toString();
const boundary = /^--.*[^-\r\n]/.exec(
postDataFront
);
if (boundary != null) {
extraHeaders = `content-type: multipart/form-data; boundary=${boundary[0].substr(
2
)}`;
return `content-type: ${contentType}`;
}
const MULTIPART_CONTENT_TYPE = 'multipart/form-data';
const URL_ENCODED_CONTENT_TYPE = 'application/x-www-form-urlencoded';
// Figure out appropriate headers for post data.
const parseContentTypeFormat = function (postData: Exclude<PostData, undefined>) {
if (postData.length) {
if (postData[0].type === 'rawData') {
// For multipart forms, the first element will start with the boundary
// notice, which looks something like `------WebKitFormBoundary12345678`
// Note, this regex would fail when submitting a urlencoded form with an
// input attribute of name="--theKey", but, uhh, don't do that?
const postDataFront = postData[0].bytes.toString();
const boundary = /^--.*[^-\r\n]/.exec(postDataFront);
if (boundary) {
return {
boundary: boundary[0].substr(2),
contentType: MULTIPART_CONTENT_TYPE
};
}
}
}
return extraHeaders;
}
// Either the form submission didn't contain any inputs (the postData array
// was empty), or we couldn't find the boundary and thus we can assume this is
// a key=value style form.
return {
contentType: URL_ENCODED_CONTENT_TYPE
};
};

View File

@@ -62,7 +62,7 @@ export function parseCommaSeparatedKeyValue (source: string, useSoonToBeDeprecat
for (const keyValuePair of source.split(',')) {
const [key, value] = keyValuePair.split('=').map(str => str.trim());
if (useSoonToBeDeprecatedBehaviorForBareKeys && value === undefined) {
bareKeys.push(key);
if (key) { bareKeys.push(key); }
continue;
}
parsed[key] = coerce(key, value);

View File

@@ -1,4 +1,4 @@
export const webViewEvents: Record<string, string[]> = {
export const webViewEvents: Record<string, readonly string[]> = {
'load-commit': ['url', 'isMainFrame'],
'did-attach': [],
'did-finish-load': [],
@@ -33,4 +33,4 @@ export const webViewEvents: Record<string, string[]> = {
'found-in-page': ['result'],
'did-change-theme-color': ['themeColor'],
'update-target-url': ['url']
};
} as const;

View File

@@ -39,6 +39,10 @@ require('@electron/internal/common/init');
// The global variable will be used by ipc for event dispatching
const v8Util = process._linkedBinding('electron_common_v8_util');
// Expose process.contextId
const contextId = v8Util.getHiddenValue<string>(global, 'contextId');
Object.defineProperty(process, 'contextId', { enumerable: true, value: contextId });
const { ipcRendererInternal } = require('@electron/internal/renderer/ipc-renderer-internal');
const ipcRenderer = require('@electron/internal/renderer/api/ipc-renderer').default;

View File

@@ -8,7 +8,7 @@ import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
const DEPRECATED_EVENTS: Record<string, string> = {
'page-title-updated': 'page-title-set'
};
} as const;
const dispatchEvent = function (
webView: WebViewImpl, eventName: string, eventKey: string, ...args: Array<any>

View File

@@ -162,7 +162,7 @@ export class WebViewImpl {
// Emits focus/blur events.
onFocusChange () {
const hasFocus = document.activeElement === this.webviewNode;
const hasFocus = this.webviewNode.ownerDocument.activeElement === this.webviewNode;
if (hasFocus !== this.hasFocus) {
this.hasFocus = hasFocus;
this.dispatchEvent(hasFocus ? 'focus' : 'blur');

View File

@@ -89,6 +89,10 @@ Object.defineProperty(preloadProcess, 'noDeprecation', {
}
});
// Expose process.contextId
const contextId = v8Util.getHiddenValue<string>(global, 'contextId');
Object.defineProperty(preloadProcess, 'contextId', { enumerable: true, value: contextId });
process.on('loaded', () => (preloadProcess as events.EventEmitter).emit('loaded'));
process.on('exit', () => (preloadProcess as events.EventEmitter).emit('exit'));
(process as events.EventEmitter).on('document-start', () => (preloadProcess as events.EventEmitter).emit('document-start'));

View File

@@ -1,6 +1,6 @@
{
"name": "electron",
"version": "13.0.0-nightly.20210303",
"version": "13.0.0-beta.25",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {
@@ -64,7 +64,6 @@
"shx": "^0.3.2",
"standard-markdown": "^6.0.0",
"stream-json": "^1.7.1",
"sumchecker": "^2.0.2",
"tap-xunit": "^2.4.1",
"temp": "^0.8.3",
"timers-browserify": "1.4.2",

View File

@@ -57,7 +57,7 @@ index 53cb9d2dc8f1962a70dc12b648d27c32be8aca4b..84af06fc56e4aa72d4d48801d7c037ad
callback(EVP_aes_192_ctr(), "aes-192-ctr", NULL, arg);
callback(EVP_aes_256_ctr(), "aes-256-ctr", NULL, arg);
diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h
index c6bec489b51ca2e71b7f81e64a8e59b534e2e91a..512a9003164e65bd4ab896ef75b173dab3a8d1db 100644
index badd496293fb9748adacff10478ea702d1155c5f..8565934bac9a810281b04946cb9f38d7623320f7 100644
--- a/include/openssl/cipher.h
+++ b/include/openssl/cipher.h
@@ -430,6 +430,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);

View File

@@ -10,10 +10,10 @@ this patch is required to provide ripemd160 support in the nodejs crypto
module.
diff --git a/crypto/digest_extra/digest_extra.c b/crypto/digest_extra/digest_extra.c
index 4b4bb38135e6089eaf6f47afda0199567a2397ef..43b7eca808b82a032055f56ce726ce4f38c5f2c5 100644
index 311c5cba0e359a20b34ba6c7ee84c34b6068049f..c4638d40aab0a4b9612216d68cd7fb50823a0ae6 100644
--- a/crypto/digest_extra/digest_extra.c
+++ b/crypto/digest_extra/digest_extra.c
@@ -81,6 +81,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
@@ -83,6 +83,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
{NID_sha384, EVP_sha384, SN_sha384, LN_sha384},
{NID_sha512, EVP_sha512, SN_sha512, LN_sha512},
{NID_md5_sha1, EVP_md5_sha1, SN_md5_sha1, LN_md5_sha1},
@@ -80,10 +80,10 @@ index d540144b293297791c087e0b968a47d368a73695..53cb9d2dc8f1962a70dc12b648d27c32
+ callback(EVP_ripemd160(), "ripemd160", NULL, arg);
}
diff --git a/include/openssl/digest.h b/include/openssl/digest.h
index 8e398e8b87f199cf947e097cf99e175bfc9870da..6c0ce559681817cae3273a50e6533468f17177ee 100644
index 66f1b5dcfd8232a697145acb2b6c2efe890d543f..67fc522172dc3ab56787fa5db3c277fd4811474a 100644
--- a/include/openssl/digest.h
+++ b/include/openssl/digest.h
@@ -89,6 +89,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_sha512_256(void);
@@ -90,6 +90,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);
// MD5 and SHA-1, as used in TLS 1.1 and below.
OPENSSL_EXPORT const EVP_MD *EVP_md5_sha1(void);

View File

@@ -41,7 +41,6 @@ proxy_config_monitor.patch
gritsettings_resource_ids.patch
isolate_holder.patch
notification_provenance.patch
content_browser_main_loop.patch
dump_syms.patch
command-ismediakey.patch
printing.patch
@@ -50,7 +49,6 @@ fix_disable_usage_of_abort_report_np_in_mas_builds.patch
fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch
fix_disable_usage_of_setapplicationisdaemon_and.patch
unsandboxed_ppapi_processes_skip_zygote.patch
patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
build_add_electron_tracing_category.patch
worker_context_will_destroy.patch
frame_host_manager.patch
@@ -100,10 +98,12 @@ fix_use_electron_generated_resources.patch
chore_expose_v8_initialization_isolate_callbacks.patch
export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch
use_public_apis_to_determine_if_a_font_is_a_system_font_in_mas_build.patch
fix_setparentacessibile_crash_win.patch
fix_export_zlib_symbols.patch
don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch
web_contents.patch
add_trustedauthclient_to_urlloaderfactory.patch
fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch
disable_unload_metrics.patch
fix_add_check_for_sandbox_then_result.patch
moves_background_color_setter_of_webview_to_blinks_webprefs_logic.patch
fix_expose_decrementcapturercount_in_web_contents_impl.patch
add_setter_for_browsermainloop_result_code.patch

View File

@@ -10,28 +10,28 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
3. Ctrl-Shift-= should show as Ctrl-+
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 17e1739c12ee38864e735130792321adadb43f08..7b0bfec6f18e883eb7ad7e3bfe564163592f584e 100644
index c44f3d3752025bd3f11db790a97a48e8ba856034..8e0c1446315823a391614b19aa2c4ba2e5faed0d 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -12,6 +12,7 @@
@@ -11,6 +11,7 @@
#include "base/i18n/rtl.h"
#include "base/notreached.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
+#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
@@ -24,9 +25,7 @@
@@ -27,9 +28,7 @@
#include <windows.h>
#endif
-#if !defined(OS_WIN) && (defined(USE_AURA) || defined(OS_APPLE))
-#if !defined(OS_WIN) && (defined(USE_AURA) || defined(OS_MAC))
#include "ui/events/keycodes/keyboard_code_conversion.h"
-#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ui/base/ui_base_features.h"
@@ -205,7 +204,15 @@ base::string16 Accelerator::GetShortcutText() const {
@@ -208,7 +207,15 @@ std::u16string Accelerator::GetShortcutText() const {
shortcut = KeyCodeToName();
#endif
@@ -41,13 +41,13 @@ index 17e1739c12ee38864e735130792321adadb43f08..7b0bfec6f18e883eb7ad7e3bfe564163
+ UsLayoutKeyboardCodeToDomCode(key_code_), flags);
+ if (c != 0) {
+ shortcut =
+ static_cast<base::string16::value_type>(
+ base::ToUpperASCII(static_cast<base::char16>(c)));
+ static_cast<std::u16string::value_type>(
+ base::ToUpperASCII(static_cast<char16_t>(c)));
+ }
#if defined(OS_WIN)
// Our fallback is to try translate the key code to a regular character
// unless it is one of digits (VK_0 to VK_9). Some keyboard
@@ -214,21 +221,14 @@ base::string16 Accelerator::GetShortcutText() const {
@@ -217,21 +224,14 @@ std::u16string Accelerator::GetShortcutText() const {
// accent' for '0'). For display in the menu (e.g. Ctrl-0 for the
// default zoom level), we leave VK_[0-9] alone without translation.
wchar_t key;
@@ -60,12 +60,12 @@ index 17e1739c12ee38864e735130792321adadb43f08..7b0bfec6f18e883eb7ad7e3bfe564163
- // VKEY_UNKNOWN), |::MapVirtualKeyW| returns 0.
- if (key != 0)
- shortcut += key;
-#elif defined(USE_AURA) || defined(OS_APPLE) || defined(OS_ANDROID)
-#elif defined(USE_AURA) || defined(OS_MAC) || defined(OS_ANDROID)
- const uint16_t c = DomCodeToUsLayoutCharacter(
- UsLayoutKeyboardCodeToDomCode(key_code_), false);
- if (c != 0)
- shortcut +=
- static_cast<base::string16::value_type>(base::ToUpperASCII(c));
- static_cast<std::u16string::value_type>(base::ToUpperASCII(c));
+ shortcut = key;
+ }
#endif
@@ -74,13 +74,13 @@ index 17e1739c12ee38864e735130792321adadb43f08..7b0bfec6f18e883eb7ad7e3bfe564163
+ base::StringPrintf("F%d", key_code_ - VKEY_F1 + 1));
}
#if defined(OS_APPLE)
@@ -411,7 +411,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
#if defined(OS_MAC)
@@ -427,7 +427,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
// more information.
if (IsCtrlDown())
shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_CTRL_KEY);
result = ApplyModifierToAcceleratorString(result, IDS_APP_CTRL_KEY);
- else if (IsAltDown())
+ if (IsAltDown())
shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_ALT_KEY);
result = ApplyModifierToAcceleratorString(result, IDS_APP_ALT_KEY);
if (IsCmdDown()) {

View File

@@ -10,10 +10,10 @@ 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 5bcbb68864ed193a519b34a37f1e50c29422235a..c33f108158538c49f9d4d27b8fa89852e829c787 100644
index b3afa0e60f45a10cfe97b129996e1d9489b09a7d..24984b2be369908d72a9493ebb0fa0f9c3e5fc7e 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -261,6 +261,10 @@ int GpuMain(const MainFunctionParams& parameters) {
@@ -265,6 +265,10 @@ int GpuMain(const MainFunctionParams& parameters) {
// to the GpuProcessHost once the GpuServiceImpl has started.
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
@@ -24,7 +24,7 @@ index 5bcbb68864ed193a519b34a37f1e50c29422235a..c33f108158538c49f9d4d27b8fa89852
// 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
@@ -398,7 +402,6 @@ int GpuMain(const MainFunctionParams& parameters) {
@@ -402,7 +406,6 @@ int GpuMain(const MainFunctionParams& parameters) {
}
#endif

View File

@@ -10,10 +10,10 @@ 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 7d2ebf0d8a14fd89e32e35631428f43aed259c16..8efabb6b7825f6fab019d7f83e185a953bb589f1 100644
index 5a733f2086ec10d3010da52a2758e1748d1178e1..d8c7ef2e3c03f5275c1ed58849ec892f811165ef 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -126,6 +126,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -128,6 +128,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
virtual void DidHandleOnloadEvents() {}
virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
int32_t world_id) {}
@@ -23,10 +23,10 @@ index 7d2ebf0d8a14fd89e32e35631428f43aed259c16..8efabb6b7825f6fab019d7f83e185a95
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index a52fcdfcb01d8f9bf5739ba4c4bf47e610f19107..74f4881d51e671e178f8d4ff32a49b0010e9efb2 100644
index 580974507f1a3007564e43b75142772b690a22c5..8999d6bbb3acc55dbedc2b36cca03862614f139f 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4666,6 +4666,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4540,6 +4540,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,10 +40,10 @@ index a52fcdfcb01d8f9bf5739ba4c4bf47e610f19107..74f4881d51e671e178f8d4ff32a49b00
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 9d100f04d9f094320eb99fbaba58c3da1b860ab7..80226249efe0f6192a27e2d55f2f7f57912453b0 100644
index 74944d9fb6ba23c001217607bc9f07c65761b26c..7ffdbb65978239dff50403fedb5c0bcf4d00c231 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -598,6 +598,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -579,6 +579,8 @@ class CONTENT_EXPORT RenderFrameImpl
blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;
@@ -53,10 +53,10 @@ index 9d100f04d9f094320eb99fbaba58c3da1b860ab7..80226249efe0f6192a27e2d55f2f7f57
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 507da809f6d3448dffab4816c0675ece6cb35ba6..2711f5de447714bc1110f9abb559332bb0c4bddf 100644
index 883f83327a5b04ad56d82b91e1c7d8fa674324b1..2b7d8e13dcde8cd916c1d0a804883415b2b23a16 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -567,6 +567,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -570,6 +570,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
@@ -67,7 +67,7 @@ index 507da809f6d3448dffab4816c0675ece6cb35ba6..2711f5de447714bc1110f9abb559332b
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index be5cf4457cd379d5abc119d209d2df6520ad1022..8a0baac5bb8cb403324fb8156be62b924d6d3d1a 100644
index 50aa1b94ac6aab922f570d78f06096226d428c33..7af7ad0b7ed50dfc1ac061a915d3a99291afaec4 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -188,6 +188,7 @@ void LocalWindowProxy::Initialize() {
@@ -79,10 +79,10 @@ index be5cf4457cd379d5abc119d209d2df6520ad1022..8a0baac5bb8cb403324fb8156be62b92
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 9a526ac4808171693146870909e058f41fe56a50..a15e379ee951504fd77b27af61b318d266274b3d 100644
index 44b4f8358fdf0f7a4e00d4ee83a2feea7b794831..7465839150f14856ce6c5e3d47959060cb9bdac8 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -294,6 +294,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -295,6 +295,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) = 0;
@@ -92,10 +92,10 @@ index 9a526ac4808171693146870909e058f41fe56a50..a15e379ee951504fd77b27af61b318d2
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 0e71a094d9b67a6d1f5fb298d7057495e3a37803..cb7bfe7d79d6024b390c77285c2d47150a391c63 100644
index 4d123e82b733cac98f0da49ca5b0424d7f17a301..c59ca72a29aedd83f6f029217c57c5246af28e70 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
@@ -342,6 +342,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -272,6 +272,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
web_frame_->Client()->DidCreateScriptContext(context, world_id);
}
@@ -110,7 +110,7 @@ index 0e71a094d9b67a6d1f5fb298d7057495e3a37803..cb7bfe7d79d6024b390c77285c2d4715
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 28d83f87c1582c8df6209f5d0a9aef130f0a4bea..3822c88091dfc803c4c57256e04bbc3946f8a869 100644
index 76643c8cd72ca5730333bf8e16e65d82e691c0cb..2fb28ccbe9343de7835ec3b5c71c0c1bfdd7d744 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
@@ -76,6 +76,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -123,10 +123,10 @@ index 28d83f87c1582c8df6209f5d0a9aef130f0a4bea..3822c88091dfc803c4c57256e04bbc39
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 3e442a5ddf1dd775febd433e2adb4795a3e5edec..22b5d7fbc3f09ea677444adbd8cae2ecd205b037 100644
index 9f9e6c6188d1f108f584b1117a91fc3e9a5e38ab..05330ea84dc1555bcc9dd6fbbd63e97348b5664d 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -337,6 +337,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
@@ -343,6 +343,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) override {}

View File

@@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement
Realloc on the v8 side and correspondingly in gin.
diff --git a/gin/array_buffer.cc b/gin/array_buffer.cc
index 124c2f72a5cbc2abe8c7686c32b61718d4c95d4b..fa4a478450cc97d231496ab82c74c1a94d1f3557 100644
index 210760801f1d027196111631d34bab3eb5a10792..cdfdf91841b5f2feb248b0c5890ddcfdb5a8f9ce 100644
--- a/gin/array_buffer.cc
+++ b/gin/array_buffer.cc
@@ -43,6 +43,10 @@ void* ArrayBufferAllocator::AllocateUninitialized(size_t length) {
@@ -37,6 +37,10 @@ void* ArrayBufferAllocator::AllocateUninitialized(size_t length) {
return malloc(length);
}
@@ -27,7 +27,7 @@ index 124c2f72a5cbc2abe8c7686c32b61718d4c95d4b..fa4a478450cc97d231496ab82c74c1a9
free(data);
}
diff --git a/gin/array_buffer.h b/gin/array_buffer.h
index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f4ddb2de2 100644
index 086371af29bd8c7520485125deddca411e8b978b..2c6886ddcc47019be4d552d4fddfc1c3d00cbca0 100644
--- a/gin/array_buffer.h
+++ b/gin/array_buffer.h
@@ -21,6 +21,7 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
@@ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f
GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index 4fbbdb2304a40ae4bca03dd51ce55615c5babae2..e2213b00d73f399bb14b7edfa0fb719aa12a6be5 100644
index 7f88acc40ec99f0ecd1b71270980ee6e0c3e203e..42cdbc706a33792859fece7741846c4cc922008a 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -697,6 +697,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
@@ -699,6 +699,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
return result;
}
@@ -54,10 +54,10 @@ index 4fbbdb2304a40ae4bca03dd51ce55615c5babae2..e2213b00d73f399bb14b7edfa0fb719a
if (max_allocation_ != 0 && data)
total_allocation_.fetch_sub(size, std::memory_order_relaxed);
diff --git a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc
index 686806bcafa0939d29bbc6775748a115130feb96..20f7a9a594cf379b2dac6970bc8c02aebc3be360 100644
index ec217020077613d72eee4b5c408bd5e9eda2ae47..7ab2fa4d00eca9d4896653e29c98654ff75d4306 100644
--- a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc
+++ b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc
@@ -127,6 +127,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
@@ -149,6 +149,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
return AllocateMemoryWithFlags(size, policy, base::PartitionAllocReturnNull);
}

View File

@@ -0,0 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <samuel.r.attard@gmail.com>
Date: Wed, 14 Apr 2021 17:19:23 -0700
Subject: add setter for BrowserMainLoop::result_code_
After a recent refactor
(https://chromium-review.googlesource.com/c/chromium/src/+/2725153) the
result_code_ pointer is no longer provided to embedders, but their are
valid use cases for setting custom exit codes of the main loop. This
exposes a simple setter that embedders can call.
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h
index e116a3de7fb765758793b3feecab2654193c3a96..0131d97a8b82d2339c99d1b1c6c3faeba2ae35ff 100644
--- a/content/browser/browser_main_loop.h
+++ b/content/browser/browser_main_loop.h
@@ -167,6 +167,10 @@ class CONTENT_EXPORT BrowserMainLoop {
int GetResultCode() const { return result_code_; }
+ void SetResultCode(int code) {
+ result_code_ = code;
+ }
+
media::AudioManager* audio_manager() const;
bool AudioServiceOutOfProcess() const;
media::AudioSystem* audio_system() const { return audio_system_.get(); }

View File

@@ -1,161 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Wed, 27 Jan 2021 15:20:01 -0800
Subject: add TrustedAuthClient to URLLoaderFactory
This allows intercepting authentication requests for the 'net' module.
Without this, the 'login' event for electron.net.ClientRequest can't be
implemented, because the existing path checks for the presence of a
WebContents, and cancels the authentication if there's no WebContents
available, which there isn't in the case of the 'net' module.
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index fd0f46bfd8d5b7c803042635460cd3b87d2521dc..64a7d8b08f19865cd5d824a9a48ef27abe60a02a 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -228,6 +228,26 @@ struct CTPolicy {
array<string> excluded_legacy_spkis;
};
+interface TrustedAuthClient {
+ OnAuthRequired(
+ mojo_base.mojom.UnguessableToken? window_id,
+ uint32 process_id,
+ uint32 routing_id,
+ uint32 request_id,
+ url.mojom.Url url,
+ bool first_auth_attempt,
+ AuthChallengeInfo auth_info,
+ URLResponseHead? head,
+ pending_remote<AuthChallengeResponder> auth_challenge_responder);
+};
+
+interface TrustedURLLoaderAuthClient {
+ // When a new URLLoader is created, this will be called to pass a
+ // corresponding |auth_client|.
+ OnLoaderCreated(int32 request_id,
+ pending_receiver<TrustedAuthClient> auth_client);
+};
+
interface CertVerifierClient {
Verify(
int32 default_error,
@@ -660,6 +680,8 @@ struct URLLoaderFactoryParams {
// impact because of the extra process hops, so use should be minimized.
pending_remote<TrustedURLLoaderHeaderClient>? header_client;
+ pending_remote<TrustedURLLoaderAuthClient>? auth_client;
+
// Information used restrict access to identity information (like SameSite
// cookies) and to shard network resources, like the cache. If set, takes
// precedence over ResourceRequest::TrustedParams::IsolationInfo field
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 00339d4537993b97bd2a3d62e3aa95057cd41a03..165aba6599c17d74a4ffc3553f018854f7807ab0 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -459,6 +459,7 @@ URLLoader::URLLoader(
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
+ mojom::TrustedURLLoaderAuthClient* url_loader_auth_client,
mojom::OriginPolicyManager* origin_policy_manager,
std::unique_ptr<TrustTokenRequestHelperFactory> trust_token_helper_factory,
const cors::OriginAccessList& origin_access_list,
@@ -523,6 +524,11 @@ URLLoader::URLLoader(
header_client_.set_disconnect_handler(
base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
}
+ if (url_loader_auth_client) {
+ url_loader_auth_client->OnLoaderCreated(request_id_, auth_client_.BindNewPipeAndPassReceiver());
+ auth_client_.set_disconnect_handler(
+ base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
+ }
if (want_raw_headers_) {
options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse |
mojom::kURLLoadOptionSendSSLInfoForCertificateError;
@@ -1169,7 +1175,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
// |this| may have been deleted.
return;
}
- if (!network_context_client_) {
+ if (!network_context_client_ && !auth_client_) {
OnAuthCredentials(base::nullopt);
return;
}
@@ -1185,11 +1191,19 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
if (url_request->response_headers())
head->headers = url_request->response_headers();
head->auth_challenge_info = auth_info;
- network_context_client_->OnAuthRequired(
- fetch_window_id_, factory_params_->process_id, render_frame_id_,
- request_id_, url_request_->url(), first_auth_attempt_, auth_info,
- std::move(head),
- auth_challenge_responder_receiver_.BindNewPipeAndPassRemote());
+ if (auth_client_) {
+ auth_client_->OnAuthRequired(
+ fetch_window_id_, factory_params_->process_id, render_frame_id_,
+ request_id_, url_request_->url(), first_auth_attempt_, auth_info,
+ std::move(head),
+ auth_challenge_responder_receiver_.BindNewPipeAndPassRemote());
+ } else {
+ network_context_client_->OnAuthRequired(
+ fetch_window_id_, factory_params_->process_id, render_frame_id_,
+ request_id_, url_request_->url(), first_auth_attempt_, auth_info,
+ std::move(head),
+ auth_challenge_responder_receiver_.BindNewPipeAndPassRemote());
+ }
auth_challenge_responder_receiver_.set_disconnect_handler(
base::BindOnce(&URLLoader::DeleteSelf, base::Unretained(this)));
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index 7d0dc6685a0f1f7e5e3bcde2b5beb416f2d46030..d339b2a954067c5e2adcac6e64a6507f070e550b 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -129,6 +129,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
+ mojom::TrustedURLLoaderAuthClient* url_loader_auth_client,
mojom::OriginPolicyManager* origin_policy_manager,
std::unique_ptr<TrustTokenRequestHelperFactory>
trust_token_helper_factory,
@@ -494,6 +495,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
base::Optional<base::UnguessableToken> fetch_window_id_;
mojo::Remote<mojom::TrustedHeaderClient> header_client_;
+ mojo::Remote<mojom::TrustedAuthClient> auth_client_;
std::unique_ptr<FileOpenerForUpload> file_opener_for_upload_;
diff --git a/services/network/url_loader_factory.cc b/services/network/url_loader_factory.cc
index 3b9b240615e56ef11a32ac87df2d189aae5c3bfa..bd2f131da2432eb63f0cb6610e10ede219f179c4 100644
--- a/services/network/url_loader_factory.cc
+++ b/services/network/url_loader_factory.cc
@@ -77,6 +77,7 @@ URLLoaderFactory::URLLoaderFactory(
resource_scheduler_client_(std::move(resource_scheduler_client)),
header_client_(std::move(params_->header_client)),
coep_reporter_(std::move(params_->coep_reporter)),
+ auth_client_(std::move(params_->auth_client)),
cors_url_loader_factory_(cors_url_loader_factory),
cookie_observer_(std::move(params_->cookie_observer)) {
DCHECK(context);
@@ -297,6 +298,7 @@ void URLLoaderFactory::CreateLoaderAndStart(
std::move(keepalive_statistics_recorder),
std::move(network_usage_accumulator),
header_client_.is_bound() ? header_client_.get() : nullptr,
+ auth_client_.is_bound() ? auth_client_.get() : nullptr,
context_->origin_policy_manager(), std::move(trust_token_factory),
context_->cors_origin_access_list(), std::move(cookie_observer));
diff --git a/services/network/url_loader_factory.h b/services/network/url_loader_factory.h
index 182b26816da9e82d83c47c3c73ecfdcf3003b967..903a3ad083201ed85e82169698041152278697fa 100644
--- a/services/network/url_loader_factory.h
+++ b/services/network/url_loader_factory.h
@@ -74,6 +74,7 @@ class URLLoaderFactory : public mojom::URLLoaderFactory {
scoped_refptr<ResourceSchedulerClient> resource_scheduler_client_;
mojo::Remote<mojom::TrustedURLLoaderHeaderClient> header_client_;
mojo::Remote<mojom::CrossOriginEmbedderPolicyReporter> coep_reporter_;
+ mojo::Remote<mojom::TrustedURLLoaderAuthClient> auth_client_;
// |cors_url_loader_factory_| owns this.
cors::CorsURLLoaderFactory* cors_url_loader_factory_;

View File

@@ -8,11 +8,11 @@ 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 758b0b1616ecf86b7dd090adce94395851d9baf2..55f20eb6266368c65fc0ec80d52caa332f85ecfb 100644
index 1363ee73abdfb05f7ff422c75b975a9d74f7dd43..ec12fa7fa8069c5bf090302221f67a3c586428a9 100644
--- a/third_party/blink/common/web_preferences/web_preferences.cc
+++ b/third_party/blink/common/web_preferences/web_preferences.cc
@@ -146,6 +146,29 @@ WebPreferences::WebPreferences()
navigate_on_drag_drop(true),
@@ -148,6 +148,29 @@ WebPreferences::WebPreferences()
fake_no_alloc_direct_call_for_testing_enabled(false),
v8_cache_options(blink::mojom::V8CacheOptions::kDefault),
record_whole_document(false),
+
@@ -42,7 +42,7 @@ index 758b0b1616ecf86b7dd090adce94395851d9baf2..55f20eb6266368c65fc0ec80d52caa33
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 e713617a5306c8afc24559b6065aec59a0bc3e5a..80e728d1bac10c18c7799387f6c32339db615cea 100644
index 7fa49dd367b28441c1395b11dfe8795dc230b7e3..32a0bd4831dfbb70d5c23617fbf40458b9ace164 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
@@ -24,6 +24,11 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -57,8 +57,8 @@ index e713617a5306c8afc24559b6065aec59a0bc3e5a..80e728d1bac10c18c7799387f6c32339
!data.ReadLazyFrameLoadingDistanceThresholdsPx(
&out->lazy_frame_loading_distance_thresholds_px) ||
!data.ReadLazyImageLoadingDistanceThresholdsPx(
@@ -150,6 +155,27 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
out->navigate_on_drag_drop = data.navigate_on_drag_drop();
@@ -154,6 +159,27 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
data.fake_no_alloc_direct_call_for_testing_enabled();
out->v8_cache_options = data.v8_cache_options();
out->record_whole_document = data.record_whole_document();
+
@@ -86,7 +86,7 @@ index e713617a5306c8afc24559b6065aec59a0bc3e5a..80e728d1bac10c18c7799387f6c32339
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 02c341e76e009a20f1d564ff4648ef40dd5cb9f3..4a0fd299c4cced5cfe97b209065311fa2f3f4b70 100644
index c457698eba5dcc2dad1b0e674cb6785ffc666b5b..ecd1910993840d6605071e848d5675a4c0f97f5c 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
@@ -9,6 +9,7 @@
@@ -94,10 +94,10 @@ index 02c341e76e009a20f1d564ff4648ef40dd5cb9f3..4a0fd299c4cced5cfe97b209065311fa
#include <vector>
+#include "base/files/file_path.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "build/build_config.h"
@@ -159,6 +160,29 @@ struct BLINK_COMMON_EXPORT WebPreferences {
#include "net/nqe/effective_connection_type.h"
@@ -161,6 +162,29 @@ struct BLINK_COMMON_EXPORT WebPreferences {
blink::mojom::V8CacheOptions v8_cache_options;
bool record_whole_document;
@@ -128,7 +128,7 @@ index 02c341e76e009a20f1d564ff4648ef40dd5cb9f3..4a0fd299c4cced5cfe97b209065311fa
// 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 0bd751d729ecdbc556686e7d38156ca736bd7a33..a4e6b664cb28f8d7bff2955fd935cd467a64ca3b 100644
index e35980e72f5d74a2483f7c62acd1d4b5db7fc5ac..5c3015ee753f9f2697e863d0fd68adf09e1f370c 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 @@
@@ -139,7 +139,7 @@ index 0bd751d729ecdbc556686e7d38156ca736bd7a33..a4e6b664cb28f8d7bff2955fd935cd46
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
@@ -436,6 +437,88 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
@@ -446,6 +447,88 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
return r.record_whole_document;
}
@@ -229,7 +229,7 @@ index 0bd751d729ecdbc556686e7d38156ca736bd7a33..a4e6b664cb28f8d7bff2955fd935cd46
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 1100a97287a02c3a1286513af6a36153ee6f76cb..7e5e12118f0c5c6725fb478a0198a46e500c0157 100644
index 3e2aae1d92b1c60b725bc8386e1d304dfabe384c..fc8113ea2221660ac2bed4e85844a95f31fbedf1 100644
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
@@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom";
@@ -240,7 +240,7 @@ index 1100a97287a02c3a1286513af6a36153ee6f76cb..7e5e12118f0c5c6725fb478a0198a46e
enum PointerType {
kPointerNone = 1, // 1 << 0
@@ -210,6 +211,29 @@ struct WebPreferences {
@@ -212,6 +213,29 @@ struct WebPreferences {
V8CacheOptions v8_cache_options;
bool record_whole_document;

View File

@@ -6,81 +6,81 @@ 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 0c37f6e2caead2f3004f1fbdd2abe7921ef4bea7..6f46775d96153d0c6a0795a1d6085f532daf985c 100644
index 016dab7776139c8ea7eab60569f3e5c5aeff8014..022225c4c02300667c58dc61165cc19d68eb4ca7 100644
--- a/ui/base/models/simple_menu_model.cc
+++ b/ui/base/models/simple_menu_model.cc
@@ -53,6 +53,11 @@ base::string16 SimpleMenuModel::Delegate::GetLabelForCommandId(
return base::string16();
@@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
return std::u16string();
}
+base::string16 SimpleMenuModel::Delegate::GetSecondaryLabelForCommandId(
+std::u16string SimpleMenuModel::Delegate::GetSecondaryLabelForCommandId(
+ int command_id) const {
+ return base::string16();
+ return std::u16string();
+}
+
ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
int command_id) const {
return ImageModel();
@@ -295,6 +300,11 @@ void SimpleMenuModel::SetLabel(int index, const base::string16& label) {
@@ -295,6 +300,11 @@ void SimpleMenuModel::SetLabel(int index, const std::u16string& label) {
MenuItemsChanged();
}
+void SimpleMenuModel::SetSecondaryLabel(int index, const base::string16& secondary_label) {
+void SimpleMenuModel::SetSecondaryLabel(int index, const std::u16string& secondary_label) {
+ items_[ValidateItemIndex(index)].secondary_label = secondary_label;
+ MenuItemsChanged();
+}
+
void SimpleMenuModel::SetMinorText(int index,
const base::string16& minor_text) {
const std::u16string& minor_text) {
items_[ValidateItemIndex(index)].minor_text = minor_text;
@@ -372,6 +382,12 @@ base::string16 SimpleMenuModel::GetLabelAt(int index) const {
@@ -377,6 +387,12 @@ std::u16string SimpleMenuModel::GetLabelAt(int index) const {
return items_[ValidateItemIndex(index)].label;
}
+base::string16 SimpleMenuModel::GetSecondaryLabelAt(int index) const {
+std::u16string SimpleMenuModel::GetSecondaryLabelAt(int index) const {
+ if (IsItemDynamicAt(index))
+ return delegate_->GetSecondaryLabelForCommandId(GetCommandIdAt(index));
+ return items_[ValidateItemIndex(index)].secondary_label;
+}
+
base::string16 SimpleMenuModel::GetMinorTextAt(int index) const {
std::u16string SimpleMenuModel::GetMinorTextAt(int 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 31669898f91d928bb63665d32ab9e4b114fecbf5..6c3f9734e2ee2cb3b6d5f9ed2787751709b013ed 100644
index 5ab6c93bb3599b72952bdc8226e6c473477b7315..1132ec877298d5d5812547ffa12a4be2f2708dc4 100644
--- a/ui/base/models/simple_menu_model.h
+++ b/ui/base/models/simple_menu_model.h
@@ -51,6 +51,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 base::string16 GetLabelForCommandId(int command_id) const;
+ virtual base::string16 GetSecondaryLabelForCommandId(int command_id) const;
virtual std::u16string GetLabelForCommandId(int command_id) const;
+ virtual std::u16string GetSecondaryLabelForCommandId(int command_id) const;
// Gets the icon for the item with the specified id.
virtual ImageModel GetIconForCommandId(int command_id) const;
@@ -154,6 +155,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -153,6 +154,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
// Sets the label for the item at |index|.
void SetLabel(int index, const base::string16& label);
void SetLabel(int index, const std::u16string& label);
+ // Sets the secondary_label for the item at |index|.
+ void SetSecondaryLabel(int index, const base::string16& secondary_label);
+ void SetSecondaryLabel(int index, const std::u16string& secondary_label);
+
// Sets the minor text for the item at |index|.
void SetMinorText(int index, const base::string16& minor_text);
void SetMinorText(int index, const std::u16string& minor_text);
@@ -183,6 +187,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -185,6 +189,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
int GetCommandIdAt(int index) const override;
base::string16 GetLabelAt(int index) const override;
+ base::string16 GetSecondaryLabelAt(int index) const override;
base::string16 GetMinorTextAt(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;
@@ -219,6 +224,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -222,6 +227,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
int command_id = 0;
ItemType type = TYPE_COMMAND;
base::string16 label;
+ base::string16 secondary_label;
base::string16 minor_text;
std::u16string label;
+ std::u16string secondary_label;
std::u16string minor_text;
ImageModel minor_icon;
ImageModel icon;

View File

@@ -6,7 +6,7 @@ Subject: blink-worker-enable-csp-in-file-scheme.patch
This allows file:// URLs in workers to have a CSP.
diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
index 07e84a8cad8689fde5f8a2c054e82851db598e8c..22b959c65d76a31d7a4c9acf1273fe61cef1204f 100644
index 870beea1249e10e59ead3d2777292deb2e559eb2..b8ab71e8395edfaa8cd8e56bbfcc315466239f06 100644
--- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
+++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
@@ -366,7 +366,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
@@ -16,4 +16,4 @@ index 07e84a8cad8689fde5f8a2c054e82851db598e8c..22b959c65d76a31d7a4c9acf1273fe61
- !response.CurrentRequestUrl().ProtocolIs("file") &&
!response.CurrentRequestUrl().ProtocolIs("filesystem")) {
content_security_policy_ = MakeGarbageCollected<ContentSecurityPolicy>();
content_security_policy_->SetOverrideURLForSelf(
content_security_policy_->DidReceiveHeaders(

View File

@@ -15,10 +15,10 @@ 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 9305b576b06a8020583939f357cd42902302b543..d772a31a436bf8f0617d87b5fcf5bd960bf871d9 100644
index b52bd3cffc6fff968c2da489c93e89f69173bcd8..684c9104e6e3c07eaf7a19e2fb00768e7f491519 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -135,14 +135,6 @@ bool Frame::Detach(FrameDetachType type) {
@@ -118,14 +118,6 @@ bool Frame::Detach(FrameDetachType type) {
DCHECK(!IsDetached());
@@ -33,7 +33,7 @@ index 9305b576b06a8020583939f357cd42902302b543..d772a31a436bf8f0617d87b5fcf5bd96
if (type == FrameDetachType::kRemove) {
if (provisional_frame_) {
provisional_frame_->Detach(FrameDetachType::kRemove);
@@ -165,6 +157,14 @@ bool Frame::Detach(FrameDetachType type) {
@@ -148,6 +140,14 @@ bool Frame::Detach(FrameDetachType type) {
GetWindowProxyManager()->ClearForSwap();
}
@@ -49,10 +49,10 @@ index 9305b576b06a8020583939f357cd42902302b543..d772a31a436bf8f0617d87b5fcf5bd96
// 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 ae17afa2ef54f16875107bb462ceac3e741e285f..214bf6868a56e77030583dccf190dac14bcdc190 100644
index a70c5d861a9ae244f23b80180d501388c0193888..d6cf1cbb0beb65f0003051f67d5fa5b723c77a74 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -670,10 +670,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -674,10 +674,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index ae17afa2ef54f16875107bb462ceac3e741e285f..214bf6868a56e77030583dccf190dac1
if (!Client())
return false;
@@ -715,6 +711,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -723,6 +719,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

View File

@@ -7,10 +7,10 @@ This exposes a method for obtaining a reference to an isolated world, which is
otherwise not available in the Blink API.
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index 01599517cc798843e50a7fe1c8d994c37b1cabf6..caa7048d51eeb43a4cfbbc75020e46e20b304898 100644
index 50702c6c3a1871b9d38ad38b5e6844f54ff2fdc5..45368849a627270a13241107e7165e020bf37d79 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -367,6 +367,8 @@ class WebLocalFrame : public WebFrame {
@@ -368,6 +368,8 @@ class WebLocalFrame : public WebFrame {
// Returns the world ID associated with |script_context|.
virtual int32_t GetScriptContextWorldId(
v8::Local<v8::Context> script_context) const = 0;
@@ -20,10 +20,10 @@ index 01599517cc798843e50a7fe1c8d994c37b1cabf6..caa7048d51eeb43a4cfbbc75020e46e2
// Executes script in the context of the current page and returns the value
// that the script evaluated to with callback. Script execution can be
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index f9e9ffead24fab0e5bf73f9a808aa07f30b4370a..e95e8d4e252b30a4f4a5ae16ca78737c48d9cca1 100644
index 80f58a5f2762fa7e1d4aed8e64cca88ae4162c15..8660df6074865b845f1b8341cb1348adb28c2339 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -1033,6 +1033,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
@@ -1037,6 +1037,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
return MainWorldScriptContext()->Global();
}
@@ -38,10 +38,10 @@ index f9e9ffead24fab0e5bf73f9a808aa07f30b4370a..e95e8d4e252b30a4f4a5ae16ca78737c
return BindingSecurity::ShouldAllowAccessToFrame(
CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()),
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
index 786f9dd51861cffd8869f2262104ec79c2066db4..7833167f3deda00f1ccd67b5904f51f6d9162a03 100644
index 04035ce2827f28592f6a80100e9dd5912bff80cf..31edba8a2af07c0dc41bbd47b74259d1dfa1818b 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
@@ -162,6 +162,8 @@ class CORE_EXPORT WebLocalFrameImpl final
@@ -166,6 +166,8 @@ class CORE_EXPORT WebLocalFrameImpl final
v8::Local<v8::Context> MainWorldScriptContext() const override;
int32_t GetScriptContextWorldId(
v8::Local<v8::Context> script_context) const override;

View File

@@ -6,10 +6,10 @@ Subject: boringssl BUILD.gn
Build BoringSSL with some extra functions that nodejs needs.
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index ad77b1b087829ca94940696a9b520c9ce189e7cd..13abac589d07895c51d0848c5a38693d4a32133d 100644
index 00563d7c895eafc16789699cdb5fa82c4fb540a7..ccae86b66cdeddf20ab8a92078a9dc34e960d125 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -46,6 +46,19 @@ config("no_asm_config") {
@@ -45,6 +45,19 @@ config("no_asm_config") {
all_sources = crypto_sources + ssl_sources
all_headers = crypto_headers + ssl_headers

View File

@@ -10,10 +10,10 @@ breakpad independently, as a "browser" process. This patches
crash annotation.
diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc
index 76993a9ec8dcd6c69cf3e58c49838264783a06c9..7b38b3bc102448b1c6f0663875ce305bc6e986ff 100644
index 5eb19c8a47467d8df30316bfbd7f3c2f38aea7c0..094244b198745e6fbbfb8d72e7bc2e0ceb4db88c 100644
--- a/components/crash/core/app/breakpad_linux.cc
+++ b/components/crash/core/app/breakpad_linux.cc
@@ -716,8 +716,13 @@ bool CrashDone(const MinidumpDescriptor& minidump,
@@ -717,8 +717,13 @@ bool CrashDone(const MinidumpDescriptor& minidump,
log_path[log_path_len] = '\0';
info.log_filename = log_path;
#endif
@@ -29,7 +29,7 @@ index 76993a9ec8dcd6c69cf3e58c49838264783a06c9..7b38b3bc102448b1c6f0663875ce305b
info.distro = base::g_linux_distro;
info.distro_length = my_strlen(base::g_linux_distro);
info.upload = upload;
@@ -2023,8 +2028,13 @@ void InitCrashReporter(const std::string& process_type) {
@@ -2024,8 +2029,13 @@ void InitCrashReporter(const std::string& process_type) {
process_type == kWebViewSingleProcessType ||
process_type == kBrowserProcessType ||
#endif

View File

@@ -8,13 +8,13 @@ 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 ad3e86fb45ed6e115e62e89917fff8309a0e0705..c222819b9de97b988c9a2a49f971961e11665cad 100644
index c697f7ced74e8cf7c43ae64e48aefb9822728992..f3008fc4e041b09d580061b2a2581f60dd41f8c4 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -73,6 +73,7 @@
@@ -75,6 +75,7 @@
X("drmcursor") \
X("dwrite") \
X("DXVA Decoding") \
X("DXVA_Decoding") \
+ X("electron") \
X("evdev") \
X("event") \

View File

@@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will
rebuild the entire tree.
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 407ca1a239c1be1012f915721110597e81e75b29..acbde830ca61f9ead221f2ded656a2bd45091d23 100644
index 0ef73ab2b2e124466c4ff22fe662273ade82603b..f2451ca5f2ce1f22b84fe81637314daeb3dc64d8 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,9 @@ if (current_os == "") {
@@ -27,7 +27,7 @@ index 407ca1a239c1be1012f915721110597e81e75b29..acbde830ca61f9ead221f2ded656a2bd
# Set to enable the official build level of optimization. This has nothing
# to do with branding, but enables an additional level of optimization above
# release (!is_debug). This might be better expressed as a tri-state
@@ -345,6 +348,7 @@ default_compiler_configs = [
@@ -336,6 +339,7 @@ default_compiler_configs = [
"//build/config/compiler/pgo:default_pgo_flags",
"//build/config/coverage:default_coverage",
"//build/config/sanitizers:default_sanitizer_flags",

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 b983f4399ceddacd050524eda2bc2936f94ae0e7..fb7b8fe6f89ffd61fa610f9085e5a9b0bbf9c379 100644
index 08a3eb686360e7a53cca75437cbe5f4d15cb9a17..78d3287ef7a708f44bd8ef0290618ef781f09d9c 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -5327,6 +5327,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -5440,6 +5440,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 b983f4399ceddacd050524eda2bc2936f94ae0e7..fb7b8fe6f89ffd61fa610f9085e5a9b0
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 0163353f96889cf405273e78bb3c7f87a0dbf6ac..d72a6ca4307a71d0f9dc8a8b4ce32e1dce305148 100644
index 5efcb22b41690bd178f99fe0745b3438ea043978..63294a8b9ff67cf08d627db17ec374f9e4eb0082 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3541,6 +3541,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3609,6 +3609,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
}
auto* new_contents_impl = new_contents.get();
@@ -39,8 +39,8 @@ index 0163353f96889cf405273e78bb3c7f87a0dbf6ac..d72a6ca4307a71d0f9dc8a8b4ce32e1d
new_contents_impl->GetController().SetSessionStorageNamespace(
partition_id, session_storage_namespace);
@@ -3582,12 +3590,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
AddDestructionObserver(new_contents_impl);
@@ -3651,12 +3659,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
- if (delegate_) {
@@ -53,10 +53,10 @@ index 0163353f96889cf405273e78bb3c7f87a0dbf6ac..d72a6ca4307a71d0f9dc8a8b4ce32e1d
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 3530150bfcb34ceb1f7ae5f17808d0a07cb3d866..330906dd0518b1fb46872e3f62ecd4bfe459294c 100644
index 32d021e049b34a72ab6cf8d86ba0c46a0046d069..f94644667683872fdb2ce3c7a66aef99faf04fdb 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -324,6 +324,10 @@ struct CreateNewWindowParams {
@@ -521,6 +521,10 @@ struct CreateNewWindowParams {
// The impression associated with the navigation in the new window, if
// one is specified.
Impression? impression;
@@ -68,10 +68,10 @@ index 3530150bfcb34ceb1f7ae5f17808d0a07cb3d866..330906dd0518b1fb46872e3f62ecd4bf
// 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 adc83e8b9ba01d830362c3236a22fe09684ceaf8..e3088a155d552c87f009cec282f32730d9cb3655 100644
index 97c47faadb9224497ab9d4551db147e564fa2c55..4c1e26a579f77801941f0ad017e671ec27ac788a 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -554,6 +554,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -567,6 +567,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -81,10 +81,10 @@ index adc83e8b9ba01d830362c3236a22fe09684ceaf8..e3088a155d552c87f009cec282f32730
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 b579683053c37211f68e75a36997a63341ac4103..ecd1d367a7634e377bffbe7590d2c21b49a56e93 100644
index aac67f9733e5a5f1adba22268337d2cc3319d386..2b95f110e48b3938f3a67759e89d7fe969da4933 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -154,6 +154,7 @@ class NetworkService;
@@ -160,6 +160,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@@ -92,7 +92,7 @@ index b579683053c37211f68e75a36997a63341ac4103..ecd1d367a7634e377bffbe7590d2c21b
} // namespace network
namespace sandbox {
@@ -903,6 +904,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -923,6 +924,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -102,7 +102,7 @@ index b579683053c37211f68e75a36997a63341ac4103..ecd1d367a7634e377bffbe7590d2c21b
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 11ff10f2f8a1479f045be6295d7fe7476eb3a28a..bf8e1830f3a394b611e592a1cdfc60c0f8bbcaca 100644
index ba416aebd7936d5cf7f890d071acf503765b47f6..412fa31a6fb853eb757e19e64efb0829753faed9 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -27,6 +27,17 @@ namespace content {
@@ -124,19 +124,19 @@ index 11ff10f2f8a1479f045be6295d7fe7476eb3a28a..bf8e1830f3a394b611e592a1cdfc60c0
const OpenURLParams& params) {
return nullptr;
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 39349ef0c0223f632bddd3b82fd6055344af9fb4..6aba9de130ed9abd81ecc7cae370ed5b5f2fa188 100644
index 96c3b9e9b7e10af7103c5ac85422ffcd10bbe5db..4982f8d2641c3d3162db4f553f3b6726d1bc3593 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -17,6 +17,7 @@
#include "base/strings/string16.h"
@@ -16,6 +16,7 @@
#include "base/memory/scoped_refptr.h"
#include "build/build_config.h"
#include "content/common/content_export.h"
+#include "content/common/frame.mojom.h"
#include "content/public/browser/eye_dropper.h"
#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/media_stream_request.h"
@@ -337,6 +338,13 @@ class CONTENT_EXPORT WebContentsDelegate {
const std::string& partition_id,
@@ -340,6 +341,13 @@ class CONTENT_EXPORT WebContentsDelegate {
const StoragePartitionId& partition_id,
SessionStorageNamespace* session_storage_namespace);
+ virtual void WebContentsCreatedWithFullParams(
@@ -150,7 +150,7 @@ index 39349ef0c0223f632bddd3b82fd6055344af9fb4..6aba9de130ed9abd81ecc7cae370ed5b
// 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 62c54d7c23ba2d918e7fd013d28424335f83278a..050ffabf4078b93d36d2da691644697c14eb85dc 100644
index 67ec081ce312c6c1e010d31ecff2d4febb21cffc..c83a13c0c0349e3eaf52e35b308b469d27e63125 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -28,6 +28,7 @@
@@ -161,7 +161,7 @@ index 62c54d7c23ba2d918e7fd013d28424335f83278a..050ffabf4078b93d36d2da691644697c
#include "third_party/blink/public/web/modules/mediastream/web_media_stream_device_observer.h"
#include "third_party/blink/public/web/web_frame_widget.h"
#include "third_party/blink/public/web/web_local_frame.h"
@@ -381,6 +382,10 @@ WebView* RenderViewImpl::CreateView(
@@ -329,6 +330,10 @@ WebView* RenderViewImpl::CreateView(
params->impression = blink::ConvertWebImpressionToImpression(*impression);
}
@@ -173,10 +173,10 @@ index 62c54d7c23ba2d918e7fd013d28424335f83278a..050ffabf4078b93d36d2da691644697c
// 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 6450bbe41aeb2fd3a43c6731390efcffc753064d..842408de6bff1c3e4be7bbfbc0e1affa6a7af8a3 100644
index e98a48e52631ed70c6aa2fab62f80bdd916f86c5..61650ecaa5c5f726adb43a79119318eb3fab040a 100644
--- a/content/web_test/browser/web_test_content_browser_client.cc
+++ b/content/web_test/browser/web_test_content_browser_client.cc
@@ -442,6 +442,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -449,6 +449,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -186,7 +186,7 @@ index 6450bbe41aeb2fd3a43c6731390efcffc753064d..842408de6bff1c3e4be7bbfbc0e1affa
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h
index 08b5a0fd69b2ba2364e90fa66342880e4f284671..8ea32fadf0962ce87de5f107e5c0996684d5d2b7 100644
index c65d30c9187dd275488ed74bcc3a4eb918d2cbce..e4c6c828150e91f555b1b42e1988a1013ab1a1f0 100644
--- a/content/web_test/browser/web_test_content_browser_client.h
+++ b/content/web_test/browser/web_test_content_browser_client.h
@@ -83,6 +83,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
@@ -221,10 +221,10 @@ index 4f735ad0d97eaac9a57dad137e479f8a7ec33a36..0a3c5821962c85609b64b3625fa6b8d6
} // 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 17e2e87e0ceef4c1cfba34ba8f3ee222ac8b4ca1..0d7dc9553c24d67b0ff25fa86260689cfeff5bbe 100644
index 66625d96c0e4daadeb9979cbd6143c726cbae3b2..45a5e1ca7d1010da894968c7e786e2ab7072fae2 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2019,6 +2019,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -1978,6 +1978,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
}
WebWindowFeatures window_features = GetWindowFeaturesFromString(features);

View File

@@ -9,7 +9,7 @@ we're running with contextIsolation enabled, we should be falling back
to Blink's logic. This will be upstreamed in some form.
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index e2213b00d73f399bb14b7edfa0fb719aa12a6be5..363f9e7a823864f67faa7ce9ec6fd914f371652e 100644
index 42cdbc706a33792859fece7741846c4cc922008a..27c5a49f539ba438d3e58fc3a4cadb116d440c24 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -450,7 +450,7 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context,

View File

@@ -35,7 +35,7 @@ index 5b4d70991e19edcdfee731c56251932bf43e535f..fe1977c5e6ce0f5b30e8be529b9efa51
#endif // CHROME_BROWSER_ANDROID_DOCUMENT_DOCUMENT_WEB_CONTENTS_DELEGATE_H_
diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
index 46322975b9eed687569df3f89f6503513caffbcd..f196c0cf671a4969015219478c58c3a175b70832 100644
index 8642c20123ec62fd6c90c8945d78bc3e04116c5b..f33ad843cc4b602c0e3312be426b81a0332afe66 100644
--- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
+++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
@@ -123,8 +123,7 @@ class DriveWebContentsManager : public content::WebContentsObserver,
@@ -95,7 +95,7 @@ index fb09bf2c5d22e3838575403b53867d0021e13b67..36e7982bbcc7c8b50bb2942ada39862b
content::RenderFrameHost* requesting_frame,
const blink::mojom::FullscreenOptions& options) final;
diff --git a/chrome/browser/ui/ash/assistant/assistant_web_view_impl.cc b/chrome/browser/ui/ash/assistant/assistant_web_view_impl.cc
index 672d5d41e33178ed6c6f62156e69b1adaf099fe8..4c0f8db8a9c40c34df8abfa89d88b0ceaef76392 100644
index e4f3632c84ebe4dcbbc3deb2f49e351c75ec93fd..58902fdaf316ad371ddb3e79e6ebc74cbbafc138 100644
--- a/chrome/browser/ui/ash/assistant/assistant_web_view_impl.cc
+++ b/chrome/browser/ui/ash/assistant/assistant_web_view_impl.cc
@@ -77,10 +77,9 @@ bool AssistantWebViewImpl::IsWebContentsCreationOverridden(
@@ -126,10 +126,10 @@ index 07014765f33bdddebcc5bc32a2713d6523faf394..f866f69f9c810d89f1a0e9e4952293f6
content::WebContents* source,
const content::OpenURLParams& params) override;
diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
index dc7f3bc886e7130c66d98ae6de73c17db746cbe5..6197db3570c860f39f381370e1af37f86a0785ea 100644
index 33f1168f834d138aefb190b7718271d6962b3532..aeb30a22349e0682586bd1bad20dc5e21fd0b08d 100644
--- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
+++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
@@ -64,8 +64,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
@@ -65,8 +65,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -140,10 +140,10 @@ index dc7f3bc886e7130c66d98ae6de73c17db746cbe5..6197db3570c860f39f381370e1af37f8
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index da9ba4c8de7c30842ad397c4307220ddcbd05c1f..6937a1a08a3a784399bf233c70ebca13322f7147 100644
index 29d0321fae4ca79a40cc77b2a48c3464c4fdcc69..607b5d7f0e4b165b68a9306d268e315c58bb01db 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1793,12 +1793,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -1804,12 +1804,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -159,10 +159,10 @@ index da9ba4c8de7c30842ad397c4307220ddcbd05c1f..6937a1a08a3a784399bf233c70ebca13
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 47fee21d0f5a7f68e9debd613e50cdbe03bf7656..1511ed77d9ee90ba27a4731f978f5073b7af0a38 100644
index f1c66751bff73836e58c6550f16dba060b88bd8d..94550c33ac0c84cbc37e30a4a569098af20520ab 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -788,8 +788,7 @@ class Browser : public TabStripModelObserver,
@@ -795,8 +795,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -201,10 +201,10 @@ index 058ec72442d59989c4d6df4a7c791ecfeff0ef99..f7c8c2139382cb2e290c561624291afe
// The profile used for the presentation.
Profile* otr_profile_;
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
index e8cee3297c218cd86b1200003e574c3713ab7afe..48216c9fccf1452f869fcfb24ba5206798c4c4e6 100644
index e878f49dd6cc69f5ba0b43e666277d29ed8c0d91..3a8eb296fee0ac2dda52435b58537a98d90e4467 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
@@ -168,14 +168,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
@@ -169,14 +169,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -222,7 +222,7 @@ index e8cee3297c218cd86b1200003e574c3713ab7afe..48216c9fccf1452f869fcfb24ba52067
java_gurl);
}
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
index 348c65a323c6104030f50e1336ccbd9ada9e7628..c7d6a0041de46784bb28146d5ffd53ded3e5685d 100644
index cf50204a6aeb099d25dc41d4180f8a1e32a63eda..642e88a4de3044173423fae5bfe2e30ef442f366 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
@@ -78,8 +78,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
@@ -264,10 +264,10 @@ index c5c5a7b63b5b3b62a9517cbef3ae23ce57a3c89c..4f1b7e88d6d2ae89a60311c8aeb1fcee
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 39ef587971d4c171fb5878efb7a94c3523b4b80c..14f3ebdc6fe53f8e4a9b3d6ec8d7a8875a20c392 100644
index c4fcae4562a2c7d060e6928fc497cfee6393d0fe..d3521a5ed9fb44efa117a5ec63e0e48a73dd118a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3493,8 +3493,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3561,8 +3561,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,
@@ -278,10 +278,10 @@ index 39ef587971d4c171fb5878efb7a94c3523b4b80c..14f3ebdc6fe53f8e4a9b3d6ec8d7a887
opener, source_site_instance, is_new_browsing_instance,
opener->GetLastCommittedURL(), params.frame_name, params.target_url,
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index bf8e1830f3a394b611e592a1cdfc60c0f8bbcaca..12f8b5b86311eef6c9025bb170111a9334bab455 100644
index 412fa31a6fb853eb757e19e64efb0829753faed9..1378593a48932b8272bafbe70c4797befdc32f02 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -139,8 +139,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
@@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -292,10 +292,10 @@ index bf8e1830f3a394b611e592a1cdfc60c0f8bbcaca..12f8b5b86311eef6c9025bb170111a93
}
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 6aba9de130ed9abd81ecc7cae370ed5b5f2fa188..d19b7ba1cbb686f72ce6989052e5f91d54a086e6 100644
index 4982f8d2641c3d3162db4f553f3b6726d1bc3593..87e11c21bd4a6f07f2897e0027b47f3e74d6e192 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -316,8 +316,7 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -319,8 +319,7 @@ class CONTENT_EXPORT WebContentsDelegate {
SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -306,7 +306,7 @@ index 6aba9de130ed9abd81ecc7cae370ed5b5f2fa188..d19b7ba1cbb686f72ce6989052e5f91d
// 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 bda659c7a464a58413e7eb33a897065268ab3fc6..29950878aca7f1518265561dea79b78d82230982 100644
index 5f49edfabed15d691dc6cc7b17896165297735a7..d64baa43afcf5a0f87797995b84b60d84e1f05a2 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
@@ -212,8 +212,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
@@ -320,7 +320,7 @@ index bda659c7a464a58413e7eb33a897065268ab3fc6..29950878aca7f1518265561dea79b78d
// 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 97273c32a05acf325fd0de22c4f79c1746aa23bc..4b357acd069387963347d35d82371b955147893f 100644
index 9b293d0df6c634bf44a69d607c4eee839a74b4a1..7e5b9cbdcc232c5e20eae0130d800f508411b827 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.h
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h
@@ -55,8 +55,7 @@ class ExtensionOptionsGuest
@@ -334,10 +334,10 @@ index 97273c32a05acf325fd0de22c4f79c1746aa23bc..4b357acd069387963347d35d82371b95
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 8f4c53f3f3cae0efb507b9c8951e5e50883d5dc7..9239b5da0adb3a55c37b41a4b06d2a8ca0b88659 100644
index e2b5240255bfdd77ed7513b26ec404f2ec244151..8e45bb4e1817e5bce6465f895026bbf953920339 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
@@ -381,8 +381,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
@@ -380,8 +380,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -348,10 +348,10 @@ index 8f4c53f3f3cae0efb507b9c8951e5e50883d5dc7..9239b5da0adb3a55c37b41a4b06d2a8c
}
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 d9e22ce31927da93f38f6a5a153222f91580f2c2..e6c8be2ad8175cd4a5b00e69f5072ff359ad862a 100644
index 7d27e12c4e9a7f32af8a26f672359057a643dd67..7a30ac31f79871f2a9afa0345e0e88affe7fe72f 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
@@ -155,8 +155,7 @@ class MimeHandlerViewGuest
@@ -158,8 +158,7 @@ class MimeHandlerViewGuest
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -362,7 +362,7 @@ index d9e22ce31927da93f38f6a5a153222f91580f2c2..e6c8be2ad8175cd4a5b00e69f5072ff3
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc
index 3219179bf421a5d6056837c1c2b492a9ce008516..8b39bf68cfe789dee1398a200671ceac006a7de0 100644
index f50f4343ed5a487538ef9ce819cd19300623a3dd..282bca34f82e5a3b27bc66f0cab494e388f35b9e 100644
--- a/fuchsia/engine/browser/frame_impl.cc
+++ b/fuchsia/engine/browser/frame_impl.cc
@@ -372,8 +372,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
@@ -376,10 +376,10 @@ index 3219179bf421a5d6056837c1c2b492a9ce008516..8b39bf68cfe789dee1398a200671ceac
// can catch bad client behavior while not interfering with normal operation.
constexpr size_t kMaxPendingWebContentsCount = 10;
diff --git a/fuchsia/engine/browser/frame_impl.h b/fuchsia/engine/browser/frame_impl.h
index d6f69a298932496ed5fe29ee2ae43e35503476d4..656abba62cc533f8b8805ce4c9b5e782156aa6ed 100644
index fea7e90aa11231009c442e8a449478f63a6d98eb..7b8802fcec4a2fff3b3d147e1bbd97e54a9b18c6 100644
--- a/fuchsia/engine/browser/frame_impl.h
+++ b/fuchsia/engine/browser/frame_impl.h
@@ -234,8 +234,7 @@ class FrameImpl : public fuchsia::web::Frame,
@@ -237,8 +237,7 @@ class FrameImpl : public fuchsia::web::Frame,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -390,10 +390,10 @@ index d6f69a298932496ed5fe29ee2ae43e35503476d4..656abba62cc533f8b8805ce4c9b5e782
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 e9c7b85e6b62960e7618a5b727e3ae43dd62e8c9..909d2c126efc4efee31e7014666d921d038fbaef 100644
index 4fdbf1c7030bb2b3765780d1e8c5a502679745de..5b59ce27eaa03897e5cbb3115b485a3ea931e871 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -197,8 +197,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
@@ -198,8 +198,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -404,10 +404,10 @@ index e9c7b85e6b62960e7618a5b727e3ae43dd62e8c9..909d2c126efc4efee31e7014666d921d
->options()
->block_new_web_contents();
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
index 39a58363e717a0b9d71b7e3ca26578f81f8fb453..4372cf1e383ef3884048fb2a06c72888abcac9e3 100644
index 9b312a0604c38ea95f03b0ef9885ebaf08ed896c..87d57b3be4609dd1847620d58cb8b61a29114b89 100644
--- a/ui/views/controls/webview/web_dialog_view.cc
+++ b/ui/views/controls/webview/web_dialog_view.cc
@@ -427,8 +427,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
@@ -429,8 +429,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -418,10 +418,10 @@ index 39a58363e717a0b9d71b7e3ca26578f81f8fb453..4372cf1e383ef3884048fb2a06c72888
return delegate_->HandleShouldOverrideWebContentsCreation();
return false;
diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
index 97142bc886e1bbf05871fb6603342ed0cd15dcf8..94206bb4674e696093a5cfc027281254c3bf37ff 100644
index 8c5edd6b46b828bba2422ae11e451625ee4e6894..cc4a53e149fab62a72b321c9a3ec994fb9d87622 100644
--- a/ui/views/controls/webview/web_dialog_view.h
+++ b/ui/views/controls/webview/web_dialog_view.h
@@ -153,8 +153,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
@@ -159,8 +159,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,

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