Compare commits

...

97 Commits

Author SHA1 Message Date
Electron Bot
94bce49d0f Bump v14.0.0-beta.11 2021-07-01 06:31:09 -07:00
electron-roller[bot]
4b59ebefb8 chore: bump chromium to 93.0.4557.4 (14-x-y) (#29954)
* chore: bump chromium in DEPS to 93.0.4557.4

* chore: update patches

* Fix warnings for -Wc++11-narrowing.

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

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

* Reland "Roll src/buildtools/third_party/libc++/trunk/ 8fa879467..79a2e924d (426 commits)"

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

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2021-07-01 00:37:37 -07:00
trop[bot]
5a202219b6 fix: crash when clicking links with target=_blank from webview (#29949)
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2021-06-30 09:40:34 -07:00
Omar Kilani
f5392751d1 fix: geolocation crashes electron on macOS (#29343) (#29914) 2021-06-29 13:45:12 -07:00
trop[bot]
8486a73b86 chore: bump chromium to 93.0.4552.0 (14-x-y) (#29522)
* chore: bump chromium to 93.0.4550.0 (main) (#29751)

* chore: bump chromium to 93.0.4552.0 (main) (#29862)

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>

Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-06-29 12:56:10 -07:00
Electron Bot
23a5789af6 Bump v14.0.0-beta.10 2021-06-28 06:30:53 -07:00
trop[bot]
9a6ac40593 chore: remove unused and broken ipcRendererInternal.sendTo() (#29897)
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2021-06-28 15:54:02 +09:00
Jeremy Rose
5530497c82 feat: undo nativeWindowOpen default change, warn instead (#29869)
* Revert "feat: enable nativeWindowOpen by default (#28552)"

This reverts commit f8bdef5349.

* warn when nativeWindowOpen is undefined

* Update browser-window.md
2021-06-28 15:40:29 +09:00
trop[bot]
5d6b8919b7 fix: stop window.open from hanging when prevented (#29883)
* fix: stop window.open from hanging when prevented

* add test

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-06-28 15:23:49 +09:00
trop[bot]
755af34e1c fix: properly order out child windows (#29889)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-06-25 17:54:54 +09:00
trop[bot]
b49248d34c fix: Inspector method overrides when contextIsolation enabled (#29886)
* fix: Inspector method overrides when contextIsolation enabled

* fix: handle DevToolsAPI call

* refactor: always use webFrame.executeJavaScript

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-06-25 17:51:07 +09:00
trop[bot]
272f9db3f8 fix: deny instead of canceling when certificate-error passes false (#29826) (#29870)
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-06-25 17:11:01 +09:00
Electron Bot
5c3670c68c Bump v14.0.0-beta.9 2021-06-24 06:30:34 -07:00
Robo
dfe061017f chore: remove revert_remove_contentrendererclient_shouldfork.patch (#29858) 2021-06-24 00:27:43 -07:00
Jeremy Rose
d79d073513 refactor: use PathProvider for user-data-dir and others (#29649) (#29865) 2021-06-23 16:40:02 -07:00
Jeremy Rose
2dbe781ea3 chore: bump chromium to 93.0.4539.0 (main) (#29608) (#29864)
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Samuel Attard <sam@electronjs.org>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-06-23 13:12:35 -07:00
trop[bot]
c0d5a148e5 fix: child window alwaysOnTop level persistence (#29855)
* fix: child window alwaysOnTop level

* chore: add undocumented getAlwaysOnTopLevel

* test: add test for level persistence

* Address feedback from review

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-06-23 17:51:33 +09:00
trop[bot]
fe2f8c31c2 docs: fix broken markdown in dialog.md (#29849)
* docs: fix broken markdown in dialog.md

* &#32;

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-06-23 15:10:40 +09:00
trop[bot]
3f8f78de50 fix: properly handle optional requestHeaders with onBeforeSendHeaders (#29835)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-23 10:08:56 +09:00
trop[bot]
8cd0c8152e fix: allow ppapi processes access to resource bundle on all platforms (#29831)
* wip: debug resource bundle failure

* fix: include ppapi subprocesses for windows resource bundle

* fix: allow ppapi plugin processes access to resource bundle on all platforms.

Aligns with chrome_main_delegate here: https://chromium-review.googlesource.com/c/chromium/src/+/2619003

* chore: remove incorrectly backported patches

Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: VerteDinde <khammond@slack-corp.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2021-06-22 14:59:19 +09:00
Electron Bot
0fe50bb64e Bump v14.0.0-beta.8 2021-06-21 06:31:02 -07:00
trop[bot]
e203029c4c fix: update Squirel.Mac to fix CPU spin during update (#29806)
* fix: update Squirel.Mac to fix CPU spin during update

Refs: https://github.com/Squirrel/Squirrel.Mac/pull/259
Closes: #29119

* chore: update patches

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2021-06-21 19:06:24 +09:00
trop[bot]
19cbb030d0 fix: do not cancel CORS preflight request on proxy auth. (#29812)
* fix: do not cancel CORS preflight request on proxy auth. (#29266)

* fix: do not cancel CORS preflight request on proxy auth.

If connecting via proxy, preflight request can receive 407
header response from proxy. This does not mean request
was finished even though it received headers (from proxy,
not the destination server), so prevent "completing"
and most importantly deleting it, which causes request
to be canceled in network layer. Just continue to monitor it
and await proper response from server. Also add circut breaker
to cancel request if proxy auth failed 3 times (for example
user keeps cancelling auth). This behavior happens only
when app registered WebRequest api listeners.

* Port chromium webrequest changes to electron code.

Move relevant parts of chromium WebRequestProxyingURLLoaderFactory from
https://chromium-review.googlesource.com/c/chromium/src/+/2011781
into electron ProxyingURLLoaderFactory.

* Update code to upstreamed version and remove retyr count failsafe.

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

* chore: add required header

Co-authored-by: marekharanczyk <48673767+marekharanczyk@users.noreply.github.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-06-21 19:05:41 +09:00
trop[bot]
12f835858e fix: microtasks policy in CreateEnvironment (#29809)
* fix: microtasks policy in CreateEnvironment

Microtasks policy should not be updated for the renderer because
`NodeBindings::CreateEnvironment` might be entered with or without
`UvRunOnce()` on stack. One of the examples of such calls is
`window.open()` which is possible to invoke while `uv_run()` is still
running (e.g. with `setImmediate()`).

All in all, it doesn't matter that much which policy we use since
`v8::MicrotasksScope` has a check for the policy in its destructor and
no commits will be made if the policy is `kExplicit`. It is important,
however, to not change the policy in the middle of `UvRunOnce()` so we
should respect whatever we currently have and move on.

Fix: #29463

* Move test to a better place

* Update spec-main/fixtures/crash-cases/setimmediate-window-open-crash/index.html

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

* Update spec-main/fixtures/crash-cases/setimmediate-window-open-crash/index.html

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

* simplify crash-case

* comment

* fix comment

Co-authored-by: Fedor Indutny <fedor@indutny.com>
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Fedor Indutny <indutny@signal.org>
2021-06-21 15:49:36 +09:00
trop[bot]
6d39c35de7 fix: flakey extension bg page test (#29802)
Co-authored-by: samuelmaddock <samuel.maddock@gmail.com>
2021-06-21 14:00:11 +09:00
trop[bot]
879b32840b fix: fix hover state not clear bug when BrowserWindow is not resizable (#611) (#29801)
Co-authored-by: sssooonnnggg <sssooonnnggg111@gmail.com>
2021-06-21 13:59:51 +09:00
trop[bot]
5b2a6f6a2b docs: clarify use of ELECTRON_SKIP_BINARY_DOWNLOAD (#29746)
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2021-06-21 10:10:11 +09:00
trop[bot]
0d72f4ee48 fix: select element not working on Windows (#29771)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-06-21 10:09:32 +09:00
John Kleinschmidt
1666664502 ci: run linux arm tests on CircleCI (#29765)
* ci: run linux arm tests on CircleCI

* cleanup electron dirs after testing

(cherry picked from commit 1c0a6045fb)

* use start-stop-daemon to kill Xvfb

(cherry picked from commit 1d10a68c31)
2021-06-18 14:27:14 -04:00
trop[bot]
4055bf0d58 fix: color select eyedropper not working within DevTools (#29752)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-06-17 12:00:17 -04:00
Electron Bot
bc0cd83447 Bump v14.0.0-beta.7 2021-06-17 06:31:23 -07:00
trop[bot]
17c3649811 fix: ensure detached devtools are not always draggable (#29738)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-06-17 15:29:05 +09:00
trop[bot]
56926d9bee fix: draggable regions with devtools open (#29735)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-06-17 15:23:00 +09:00
trop[bot]
2f4e729f8d fix: potential crash when setting vibrancy (#29723)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-06-17 15:20:27 +09:00
trop[bot]
1789cfa5d3 fix: setWindowOpenHandler call syntax (#29727)
Co-authored-by: kdau <kevin@kdau.com>
2021-06-16 10:12:51 -07:00
trop[bot]
5e3bdfd920 fix: disable CET as v8 deoptimization is incompatible with it (#29688)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-06-16 09:57:44 -07:00
trop[bot]
6128e25ace chore: bumping NAN dep to include test changes (#29713)
Co-authored-by: clavin <clavin@electronjs.org>
2021-06-16 09:57:25 -07:00
trop[bot]
2fcd000f0c chore: disable default async spellchecker on Windows (#29705)
* chore: disable default async spellchecker on Windows

* chore: disable kWinRetrieveSuggestionsOnlyOnDemand in feature list

Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: VerteDinde <khammond@slack-corp.com>
2021-06-15 14:09:47 -04:00
trop[bot]
f1fcdbd4a0 docs: Update represented-file fiddle tutorial (#29694)
* Update represented-file fiddle.

* add index and code back to guide

Co-authored-by: Kevin Hartman <kevin@hart.mn>
Co-authored-by: Ethan Arrowood <ethan.arrowood@gmail.com>
2021-06-15 11:36:51 +09:00
trop[bot]
014409f98e build: restore workspace on osx builds to get docs-only-change file (#29687)
* build: restore workspace on osx builds to get docs-only-change file

* build: clean up attached workspace before checking out from cache

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-06-14 13:39:22 -07:00
trop[bot]
3b39ff300b docs: fix typo in process-model.md (#29684)
Co-authored-by: Luke Ingalls <45518011+lukeingalls@users.noreply.github.com>
2021-06-14 10:13:07 -07:00
trop[bot]
e81d3756d5 docs: fix file mode of versioning-sketch-2.png (#29682)
Unlike the other files, this file had its executable bit set in its file
mode. This change removes the executable bit to align its file mode with
the rest of the files.

Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Darshan Sen <raisinten@gmail.com>
2021-06-14 10:12:45 -07:00
Electron Bot
789bfe627b Bump v14.0.0-beta.6 2021-06-14 06:31:26 -07:00
trop[bot]
f465439843 fix: check DCHECK_IS_ON() instead of #ifdef DCHECK_IS_ON (#29675)
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-06-14 21:00:03 +09:00
trop[bot]
066e356ada fix: use correct spelling of attachment with Content-Disposition header (#29673)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-14 20:58:49 +09:00
trop[bot]
7665ba0838 fix: copy received data in URLPipeLoader to prevent corruption (#29670)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-14 17:47:37 +09:00
trop[bot]
b884381311 docs: fix typo (#29583)
* Typo fix

* Update main.js

Co-authored-by: ZReC <contact.zrec@gmail.com>
2021-06-14 09:34:52 +09:00
trop[bot]
1d0be9d6ed docs: fix image links in performance.md (#29632)
* docs: fix image links in performance.md

Fixes https://github.com/electron/electron/issues/29580

Signed-off-by: Darshan Sen <raisinten@gmail.com>

* Apply suggestions from code review

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

Co-authored-by: Darshan Sen <raisinten@gmail.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-14 09:34:12 +09:00
trop[bot]
f4ed98c43b fix: ensure custom traffic lights float to top (#29628)
* fix: ensure custom traffic lights float to top

* chore: split into separate function

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-06-14 09:33:24 +09:00
trop[bot]
faf3477388 fix: select-bluetooth-device on Windows (#29613)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-06-10 11:02:16 -04:00
Electron Bot
8cf7c46570 Bump v14.0.0-beta.5 2021-06-10 06:31:14 -07:00
trop[bot]
dd5dd2a426 chore: bump chromium to 93.0.4536.0 (14-x-y) (#29617)
* chore: bump chromium in DEPS to 93.0.4536.0

* chore: update patches

* Make InkDrop a View class property

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

Replace old views::Button::ink_drop() calls with views::InkDrop::Get()

* Convert use of gfx::ImageSkia to ui::ImageModel for WidgetDelegates

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

Update GetWindowIcon(), GetWindowAppIcon(), and GetDevToolsWindowIcon()
to return ui::ImageModel instead of gfx::ImageSkia.

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-06-09 11:34:08 -07:00
trop[bot]
0e673d069d chore: bump chromium to 93.0.4535.0 (14-x-y) (#29597)
* chore: bump chromium in DEPS to 93.0.4533.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4534.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4535.0

* chore: remove PdfViewerDocumentProperties from feature-flag conditional

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

This feature is now enabled by default upstream.

* chore: remove kPdfViewerPresentationMode from feature-flag conditional

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

This feature is now enabled by default upstream.

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-06-09 09:49:04 -07:00
trop[bot]
d24de10707 fix: ensure fuse order is read in a stable way (#29616)
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-06-09 09:27:13 -07:00
trop[bot]
6a429e9d04 chore: bump chromium to 93.0.4532.2 (14-x-y) (#29596)
* chore: bump chromium in DEPS to 93.0.4531.0

* chore: update patches

* Remove IPC::Listener from WebContentsObserver

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

* serial: Move serial policy from profile to local state

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

* chore: fix pip test

* chore: bump chromium in DEPS to 93.0.4532.2

* chore: update patches

* Follow up ColorChooser clean ups

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

* Distinguish between no default printer vs. query error

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

* chore: remove build_do_not_include_vr_directx_helpers_when_enable_vr.patch

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2021-06-08 14:45:37 -07:00
trop[bot]
172ac25013 chore: bump chromium to 93.0.4530.0 (master) (#29594)
* chore: bump chromium in DEPS to 92.0.4512.6

* 2887336: [CaptureHandle][#2] Propagate CaptureHandleConfig in browser process

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

* refactor: base::Optional -> absl::optional

* chore: fixup patch indices

* chore: bump chromium in DEPS to 92.0.4514.0

* 2899417: Make build work when enable_pdf is set to false.

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

* 2904731: use BrowserContext instead of Profile in PreconnectManager

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

* 2295749: fix: check IsSecureEventInputEnabled in constructor before setting SetPasswordInputEnabled to true

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

* 2893803: Add a GetWebView to RenderFrame.

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

* 2892345: Implement WebContents::ForEachRenderFrameHost

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

* chore: fixup patch indices

* 2892048: Real instance methods for BrowserContext: remaining 5 methods.

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

* 2902821: [mojo] Don't require full header includes for referenced interfaces

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

* 2496500: Remove last deprecated extension Event ctor.

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

* chore: fixup malformed pepper support patch

* chore: bump chromium in DEPS to 92.0.4515.0

* 2908461: Add CreateEmptyPrintPagesParamsPtr() inside print_view_manager_base.cc.

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

* 2880838: viz: add optional HDRMetadata to TransferableResource

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

* chore: fixup patch indices

* chore: bump chromium in DEPS to 92.0.4515.5

* chore: update patches

* chore: bump chromium in DEPS to 92.0.4515.7

* chore: bump chromium in DEPS to 92.0.4515.9

* chore: bump chromium in DEPS to 93.0.4522.0

* chore: bump chromium in DEPS to 93.0.4523.0

* chore: bump chromium in DEPS to 93.0.4524.0

* chore: update patches

* chore: enable_pak_file_integrity_checks was reverted

* chore: update patches

* refactor: base/optional was replaced with absl::optional

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

* refactor: replace all usages of base::nullopt with absl::nullopt

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

* chore: add missing base::Contains include

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

* refactor: replace all usages of base::make_optional with
absl::make_optional

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

* refactor: replace WorldScriptContext() with GetScriptContextFromWorldId

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

* chore: clean up left over opening namespace

Refs: 95bfe6d08f

* chore: add missing base::Contains include

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

* refactor: replace GetCurrentDisplayIterator with the hard checker
GetCurrentDisplay

This code looks suspicious but if the iterator was invalid before it
will also be invalid now.

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

* refactor: headers are now passed directly in extensions client

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

* refactor: base::DictionaryValue::empty() has been removed

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

* chore: add missing includes for network URLLoaderFactory

Refs: unknown, probably a side effect of header changes

* refactor: make convenience wrapper around AppendArg

There is no converter FromV8 for base::StringPiece (apparently its not
possible).  So we now take in an std::string and use the construct for
StringPiece to do implicit conversion.

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

* chore: add patch

* chore: bump chromium in DEPS to 93.0.4525.0

* chore: update patches

* refactor: CanResize has been de-virtualized

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

* chore: update resource integrity patch

* chore: add character encoding idl patch

* chore: bump chromium in DEPS to 93.0.4526.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4527.0

* chore: bump chromium in DEPS to 93.0.4528.0

* chore: update patches

* chore: update idl encoding patch

* chore: bump chromium in DEPS to 93.0.4529.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4530.0

* chore: update patches

* fix: only SetCanResize after the widget has been initialized

* chore: add patch for vr on windows gn gen

* spec: fix focus related tests on linux due to delay in focus swap

* chore: remove new usages of base::Optional from main

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-06-08 13:19:11 -07:00
trop[bot]
e3a613d103 fix: improper wrapping of fs.promises.readFile (#29577) 2021-06-08 10:31:14 +02:00
trop[bot]
73696eadde fix: make intermediates work with 'select-client-certificate' (#29570)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-08 11:40:33 +09:00
Electron Bot
bdbf78dca8 Bump v14.0.0-beta.4 2021-06-07 06:31:35 -07:00
trop[bot]
40dbeb6836 docs: Update notifications (renderer) docs (#29566)
* remove version information from html

* change format for readability

* clarify which console the message should appear in

* minor changes to renderer.md

* update UI on click instead of developer console

* remove node-integration and fix md

* update content

* chore: remove ****

Co-authored-by: Jeremy Foster <jeremy.foster@live.com>
Co-authored-by: Ethan Arrowood <ethan.arrowood@gmail.com>
Co-authored-by: Cheng Zhao <github@zcbenz.com>
2021-06-07 14:44:26 +09:00
trop[bot]
3ff100521d docs: Updated "recent documents" fiddle tutorial (#29562)
* Port recent-documents fiddle to 12-x-y.

* Update recent-documents tutorial.

* update for review comments

Co-authored-by: Kevin Hartman <kevin@hart.mn>
Co-authored-by: Ethan Arrowood <ethan.arrowood@gmail.com>
2021-06-07 14:43:24 +09:00
trop[bot]
f1752a0b6f chore: return early on promise rejection (#29539)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-07 10:17:00 +09:00
trop[bot]
e67b244571 fix: change ASAR archive cache to per-process to fix leak (#29536)
* fix: change ASAR archive cache to per-process to fix leak (#29292)

* chore: address code review comments

* chore: tighten up thread-safety

* chore: better address code review comments

* chore: more code review changes

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-04 13:18:58 +09:00
Electron Bot
fef79701e0 Bump v14.0.0-beta.3 2021-06-03 06:31:50 -07:00
trop[bot]
c2877a342c chore: fix typos in comments (#29519)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-03 01:00:01 -07:00
trop[bot]
4e610b1948 build: Improve squirrel.mac BUILD.gn xcrun_action error (#29514)
Right now, if executing `xcrun` fails, then the error message prints the
second argument to the `xcrun.py` script, which is the first argument to
the tool that `xcrun` is executing, making the whole error message quite
confusing.

Consider the following error:

```
python ../../third_party/squirrel.mac/build/xcrun.py dtrace -h -s /private/tmp/20210531211008-def376dc/src/third_party/squirrel.mac/vendor/ReactiveObjC/ReactiveObjC/RACSignalProvider.d -o /private/tmp/20210531211008-def376dc/src/out/release/gen/third_party/squirrel.mac/dtrace/RACSignalProvider.h
xcrun script '-h' failed with code '71':
xcrun: error: can't exec '/tmp/20210531211008-def376dc/dtrace' (errno=Permission denied)
```

The command that `xcrun` is executing is `dtrace`, but the error just
mentions the `-h` flag.

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

Co-authored-by: Juan Cruz Viotti <jv@jviotti.com>
2021-06-03 00:53:46 -07:00
trop[bot]
4d30e7618a fix: keep shifted character in menu accelerator (#29481)
* fix: correctly handle shifted char in accelerator

* test: use actual accelerator of NSMenuItem

* chore: simplify KeyboardCodeFromStr

* chore: GetAcceleratorTextAt is testing only

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-06-03 00:53:09 -07:00
trop[bot]
7381738d85 docs: link to IncomingMessage (#29517)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-03 16:20:21 +09:00
trop[bot]
0f2ad3e384 chore: remove unused methods (#29475)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-06-03 14:47:59 +09:00
trop[bot]
b8812c8942 build: update support.md on stable version bumps (#29500)
* build: update support.md on stable version bumps

* build: update supported on major stable & nightly bumps

* test: updateSupported tests

* chore: fix syntax

* chore: use fspromise in version-bumper script/spec

Co-authored-by: VerteDinde <khammond@slack-corp.com>
2021-06-03 14:47:30 +09:00
Milan Burda
7a11390b8a test: add spec for --require filtering in NODE_OPTIONS (#29508) 2021-06-03 14:43:28 +09:00
trop[bot]
6ab2684234 feat: support loading debug urls with loadURL() (#29466)
* feat: support loading debug urls with loadURL()

* use FROM_ADDRESS_BAR

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-06-02 17:04:08 -07:00
Samuel Attard
80f051d859 feat: add experimental cookie encryption support (#27524) (#29492)
* feat: add experimental cookie encryption support on macOS

* chore: fix TODO

* update patches

* feat: make cookie encryption work on windows

* chore: update cookie encryption support comments

* fix: only call OSCrypt::Init on windows

* chore: make cookie encryption work on linux

* Update shell/browser/net/system_network_context_manager.cc

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

* chore: fix lint

* chore: update patches

* chore: update patches to upstreamed variants

* chore: use chrome ::switches constants

* chore: remove bad patch

* build: disable cookie encryption by default

* chore: update patches

* fix: provide std::string to NoDestructor

* chore: fix macos, nodestructor syntax

* build: fix macOS build due to mismatch in DEFINE

Co-authored-by: Electron Bot <electron@github.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>

Co-authored-by: Electron Bot <electron@github.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-06-02 16:54:35 -07:00
trop[bot]
95e7c6d53a refactor: point prepare-release at main (#29498)
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-06-02 14:05:30 -07:00
trop[bot]
1b4c3428a9 chore: don't use after move (#29480)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-02 22:25:31 +09:00
trop[bot]
8edb7b456f build: Support building Electron on msys2 (#29476)
Electron already seems to support `cygwin`, so `msys` is a natural
addition. This is the only required change as far as I can see on my
local development environment, as otherwise the build scripts don't
realize that msys = windows.

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

Co-authored-by: Juan Cruz Viotti <jv@jviotti.com>
2021-06-02 22:24:37 +09:00
trop[bot]
6362736703 fix: inspector context menu throwing an error (#29472)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-06-02 16:17:57 +09:00
trop[bot]
670ae438b9 docs: Updated "progress bar" fiddle feature in docs (#29471)
* improve progress bar fiddle

* add comments to code snippet

* edits to progress-bar tutorial

* remove versions and nodeIntegration

* limit line length to 100

* implement standard linter suggestions

* add indeterminate and clear timers

* update to have reader replace all of main.js

* remove extra button

* loop the progress bar

* add logic to show reset state briefly

* Update docs/tutorial/progress-bar.md

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

* chore: fix lint

Co-authored-by: Jeremy Foster <jeremy.foster@live.com>
Co-authored-by: Cheng Zhao <github@zcbenz.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2021-06-02 16:17:35 +09:00
trop[bot]
10c6959c7f refactor: use main in release-notes (#29410)
* refactor: use main in release-notes

* fix: use default_branch in release-notes (#29415)

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-06-01 14:06:56 -07:00
trop[bot]
1066dce975 chore: remove duplicate option get for CustomScheme (#29455)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-01 19:12:59 +09:00
trop[bot]
d584afdf5b fix: Alt+Click should not toggle menu bar (#29452)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-06-01 19:11:54 +09:00
trop[bot]
0d69ba8ca2 fix: add service worker schemes from command line in renderer (#29440)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-01 17:51:42 +09:00
trop[bot]
c2ba3ab114 chore: use consistent parameter names (#29441)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-06-01 15:25:46 +09:00
trop[bot]
72a33e79d0 fix: correctly handle Alt+Key shortcuts (#29444)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-06-01 15:25:04 +09:00
trop[bot]
3ee0536b1d Fixes issue with reference links (#29429)
Co-authored-by: Vishal <34849822+vthukral94@users.noreply.github.com>
2021-06-01 10:38:12 +09:00
Electron Bot
846a12056d Bump v14.0.0-beta.2 2021-05-31 06:33:28 -07:00
trop[bot]
e0f6313739 refactor: publish-to-npm respects main (#29408) 2021-05-31 10:33:01 +02:00
trop[bot]
8866b312ad docs: update link to Chromium's coding style guide (#29398)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-05-31 10:19:48 +02:00
trop[bot]
cb8fada7a0 fix: close autoHide menu bar when focus is lost (#29349)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-05-28 19:00:55 +09:00
trop[bot]
b983bda721 Update quick-start.md (#29371)
In version 13.0.1 preload process should added to webPreferences.

Co-authored-by: aydon <41415004+congjiye@users.noreply.github.com>
2021-05-27 18:52:56 -07:00
trop[bot]
3125ec093d docs: fix typos in clang-tidy examples (#29355)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2021-05-27 18:52:44 -07:00
trop[bot]
a27329d9ad refactor: version-utils respects main (#29392)
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-05-27 18:44:59 -07:00
trop[bot]
5362882cf6 refactor: getCurrentBranch respects main (#29386)
* refactor: getCurrentBranch respects main

* add note about migration

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-05-27 18:43:44 -07:00
trop[bot]
c58446d9d7 docs: remove freenode channel from support list (#29383)
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-05-27 17:24:25 -07:00
trop[bot]
1c2ed2ba95 docs: Update notifications (main) docs (#29357)
* remove version info from index.html page

* remove nodeIntegration

* format code and update readme

* add note to user in index.html

Co-authored-by: Jeremy Foster <jeremy.foster@live.com>
2021-05-27 12:41:33 -07:00
trop[bot]
1c0e496ee2 docs: fix link to docs/fiddle/quick-start (#29353)
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2021-05-27 12:38:48 -07:00
Electron Bot
0f32b0f1ce Bump v14.0.0-beta.1 2021-05-26 10:13:55 -07:00
354 changed files with 3057 additions and 2118 deletions

View File

@@ -86,6 +86,14 @@ executors:
resource_class: electronjs/macos-arm64
machine: true
linux-arm:
resource_class: electronjs/linux-arm
machine: true
linux-arm64:
resource_class: electronjs/linux-arm64
machine: true
# The config expects the following environment variables to be set:
# - "SLACK_WEBHOOK" Slack hook URL to send notifications.
#
@@ -233,7 +241,14 @@ step-maybe-cleanup-arm64-mac: &step-maybe-cleanup-arm64-mac
killall Safari || echo "No Safari processes left running"
rm -rf ~/Library/Application\ Support/Electron*
rm -rf ~/Library/Application\ Support/electron*
elif [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
XVFB=/usr/bin/Xvfb
/sbin/start-stop-daemon --stop --exec $XVFB || echo "Xvfb not running"
pkill electron || echo "electron not running"
rm -rf ~/.config/Electron*
rm -rf ~/.config/electron*
fi
when: always
step-checkout-electron: &step-checkout-electron
@@ -733,7 +748,7 @@ step-verify-mksnapshot: &step-verify-mksnapshot
command: |
if [ "$IS_ASAN" != "1" ]; then
cd src
if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then
if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --snapshot-files-dir $PWD/cross-arch-snapshots
else
python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default
@@ -858,28 +873,6 @@ step-maybe-cross-arch-snapshot: &step-maybe-cross-arch-snapshot
cp out/Default-mksnapshot-test/*.bin cross-arch-snapshots
fi
step-maybe-trigger-arm-test: &step-maybe-trigger-arm-test
run:
name: Trigger an arm test on VSTS if applicable
command: |
cd src
# Only run for non-fork prs
if [ "$TRIGGER_ARM_TEST" == "true" ] && [ -z "$CIRCLE_PR_NUMBER" ]; then
#Trigger VSTS job, passing along CircleCI job number and branch to build
if [ "`uname`" == "Darwin" ]; then
if [ x"$MAS_BUILD" == x"true" ]; then
export DEVOPS_BUILD="electron-mas-arm64-testing"
else
export DEVOPS_BUILD="electron-osx-arm64-testing"
fi
echo "Triggering $DEVOPS_BUILD build on Azure DevOps"
node electron/script/release/ci-release-build.js --job=$DEVOPS_BUILD --ci=DevOps --armTest --circleBuildNum=$CIRCLE_BUILD_NUM $CIRCLE_BRANCH
else
echo "Triggering electron-$TARGET_ARCH-testing build on VSTS"
node electron/script/release/ci-release-build.js --job=electron-$TARGET_ARCH-testing --ci=VSTS --armTest --circleBuildNum=$CIRCLE_BUILD_NUM $CIRCLE_BRANCH
fi
fi
step-maybe-generate-typescript-defs: &step-maybe-generate-typescript-defs
run:
name: Generate type declarations
@@ -1238,7 +1231,7 @@ steps-tests: &steps-tests
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec-main/*-spec.ts | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE
(cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.js | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE
else
if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then
if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
export ELECTRON_SKIP_NATIVE_MODULE_TESTS=true
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging)
(cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging)
@@ -1429,6 +1422,8 @@ commands:
steps:
- attach_workspace:
at: .
- *step-maybe-early-exit-doc-only-change
- run: rm -rf src/electron
- *step-restore-brew-cache
- *step-install-gnutar-on-mac
- *step-save-brew-cache
@@ -1556,6 +1551,7 @@ commands:
- when:
condition: << parameters.build >>
steps:
- move_and_store_all_artifacts
- run:
name: Remove the big things on macOS, this seems to be better on average
command: |
@@ -1573,11 +1569,6 @@ commands:
steps:
- *step-save-out-cache
- move_and_store_all_artifacts
# Trigger tests on arm hardware if needed
- *step-maybe-trigger-arm-test
- *step-maybe-notify-slack-failure
electron-publish:
@@ -1897,7 +1888,7 @@ jobs:
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
steps:
- electron-build:
persist: false
persist: true
checkout: true
use-out-cache: false
@@ -1942,7 +1933,7 @@ jobs:
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
steps:
- electron-build:
persist: false
persist: true
checkout: true
use-out-cache: false
@@ -1997,7 +1988,7 @@ jobs:
persist: true
checkout: false
checkout-and-assume-cache: true
attach: false
attach: true
osx-testing-x64-gn-check:
executor:
@@ -2073,7 +2064,7 @@ jobs:
persist: true
checkout: false
checkout-and-assume-cache: true
attach: false
attach: true
mas-testing-x64:
executor: macos
@@ -2089,7 +2080,7 @@ jobs:
persist: true
checkout: false
checkout-and-assume-cache: true
attach: false
attach: true
mas-testing-x64-gn-check:
executor:
@@ -2167,7 +2158,7 @@ jobs:
persist: true
checkout: false
checkout-and-assume-cache: true
attach: false
attach: true
# Layer 3: Tests.
linux-x64-unittests:
@@ -2321,6 +2312,24 @@ jobs:
<<: *env-send-slack-notifications
<<: *steps-verify-ffmpeg
linux-arm-testing-tests:
executor: linux-arm
environment:
<<: *env-arm
<<: *env-global
<<: *env-headless-testing
<<: *env-stack-dumping
<<: *steps-tests
linux-arm64-testing-tests:
executor: linux-arm64
environment:
<<: *env-arm64
<<: *env-global
<<: *env-headless-testing
<<: *env-stack-dumping
<<: *steps-tests
osx-testing-x64-tests:
executor:
name: macos
@@ -2500,8 +2509,23 @@ workflows:
- linux-ia32-testing
- linux-arm-testing
- linux-arm-testing-tests:
filters:
branches:
# Do not run this on forked pull requests
ignore: /pull\/[0-9]+/
requires:
- linux-arm-testing
- linux-arm64-testing
- linux-arm64-testing-tests:
filters:
branches:
# Do not run this on forked pull requests
ignore: /pull\/[0-9]+/
requires:
- linux-arm64-testing
- linux-arm64-testing-gn-check:
requires:
- linux-checkout-for-workspace

View File

@@ -1,6 +1,7 @@
import("//build/config/locales.gni")
import("//build/config/ui.gni")
import("//build/config/win/manifest.gni")
import("//components/os_crypt/features.gni")
import("//components/spellcheck/spellcheck_build_features.gni")
import("//content/public/app/mac_helpers.gni")
import("//extensions/buildflags/buildflags.gni")
@@ -296,7 +297,7 @@ templated_file("electron_version_header") {
action("electron_fuses") {
script = "build/fuses/build.py"
inputs = [ "build/fuses/fuses.json" ]
inputs = [ "build/fuses/fuses.json5" ]
outputs = [
"$target_gen_dir/fuses.h",
@@ -335,6 +336,7 @@ source_set("electron_lib") {
"//components/network_hints/common:mojo_bindings",
"//components/network_hints/renderer",
"//components/network_session_configurator/common",
"//components/os_crypt",
"//components/pref_registry",
"//components/prefs",
"//components/security_state/content",
@@ -350,7 +352,6 @@ source_set("electron_lib") {
"//device/bluetooth",
"//device/bluetooth/public/cpp",
"//gin",
"//media/blink:blink",
"//media/capture/mojom:video_capture",
"//media/mojo/mojom",
"//net:extras",
@@ -367,6 +368,7 @@ source_set("electron_lib") {
"//skia",
"//third_party/blink/public:blink",
"//third_party/blink/public:blink_devtools_inspector_resources",
"//third_party/blink/public/platform/media",
"//third_party/boringssl",
"//third_party/electron_node:node_lib",
"//third_party/inspector_protocol:crdtp",
@@ -684,6 +686,10 @@ source_set("electron_lib") {
]
libs += [ "uxtheme.lib" ]
}
if (allow_runtime_configurable_key_storage) {
defines += [ "ALLOW_RUNTIME_CONFIGURABLE_KEY_STORAGE" ]
}
}
electron_paks("packed_resources") {
@@ -1398,7 +1404,8 @@ dist_zip("hunspell_dictionaries_zip") {
}
copy("libcxx_headers") {
sources = libcxx_headers + libcxx_licenses
sources = libcxx_headers + libcxx_licenses +
[ "//buildtools/third_party/libc++/__config_site" ]
outputs = [ "$target_gen_dir/electron_libcxx_include/{{source_root_relative_dir}}/{{source_file_part}}" ]
}

12
DEPS
View File

@@ -10,17 +10,21 @@ gclient_gn_args = [
'checkout_openxr',
'checkout_google_benchmark',
'mac_xcode_version',
'generate_location_tags',
]
vars = {
'chromium_version':
'92.0.4511.0',
'93.0.4557.4',
'node_version':
'v14.17.0',
'nan_version':
'v2.14.2',
# The following commit hash of NAN is v2.14.2 with *only* changes to the
# test suite. This should be updated to a specific tag when one becomes
# available.
'65b32af46e9d7fab2e4ff657751205b3865f4920',
'squirrel.mac_version':
'cdc0729c8bf8576bfef18629186e1e9ecf1b0d9f',
'0e5d146ba13101a1302d59ea6e6e0b3cace4ae38',
'pyyaml_version': '3.12',
@@ -52,6 +56,8 @@ vars = {
'mac_xcode_version': 'default',
'generate_location_tags': False,
# To allow running hooks without parsing the DEPS tree
'process_deps': True,

View File

@@ -1 +1 @@
14.0.0-nightly.20210524
14.0.0-beta.11

View File

@@ -29,4 +29,7 @@ enable_pseudolocales = false
is_cfi = false
enable_pak_file_integrity_checks = false
# Make application name configurable at runtime for cookie crypto
allow_runtime_configurable_key_storage = true
enable_cet_shadow_stack = false

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env python3
from collections import OrderedDict
import json
import os
import sys
@@ -49,8 +50,8 @@ const volatile char kFuseWire[] = { /* sentinel */ {sentinel}, /* fuse_version *
}
"""
with open(os.path.join(dir_path, "fuses.json"), 'r') as f:
fuse_defaults = json.load(f)
with open(os.path.join(dir_path, "fuses.json5"), 'r') as f:
fuse_defaults = json.loads(''.join(line for line in f.readlines() if not line.strip()[0] == "/"), object_pairs_hook=OrderedDict)
fuse_version = fuse_defaults['_version']
del fuse_defaults['_version']

View File

@@ -2,5 +2,6 @@
"_comment": "Modifying the fuse schema in any breaking way should result in the _version prop being incremented. NEVER remove a fuse or change its meaning, instead mark it as removed with 'r'",
"_schema": "0 == off, 1 == on, r == removed fuse",
"_version": 1,
"run_as_node": "1"
"run_as_node": "1",
"cookie_encryption": "0"
}

View File

@@ -88,6 +88,10 @@ static_library("chrome") {
"//components/optimization_guide/proto:optimization_guide_proto",
]
if (enable_basic_printing && is_win) {
deps += [ "//chrome/common:cloud_print_utility_mojom" ]
}
if (is_linux) {
sources += [ "//chrome/browser/icon_loader_auralinux.cc" ]
if (use_x11 || use_ozone) {
@@ -142,6 +146,8 @@ static_library("chrome") {
if (enable_color_chooser) {
sources += [
"//chrome/browser/devtools/devtools_eye_dropper.cc",
"//chrome/browser/devtools/devtools_eye_dropper.h",
"//chrome/browser/platform_util.cc",
"//chrome/browser/platform_util.h",
"//chrome/browser/ui/browser_dialogs.h",

View File

@@ -157,15 +157,14 @@ void CertificateManagerModel::GetCertDBOnIOThread(
CreationCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
auto did_get_cert_db_callback = base::AdaptCallbackForRepeating(
base::BindOnce(&CertificateManagerModel::DidGetCertDBOnIOThread,
std::move(callback)));
auto split_callback = base::SplitOnceCallback(base::BindOnce(
&CertificateManagerModel::DidGetCertDBOnIOThread, std::move(callback)));
net::NSSCertDatabase* cert_db =
GetNSSCertDatabaseForResourceContext(context, did_get_cert_db_callback);
net::NSSCertDatabase* cert_db = GetNSSCertDatabaseForResourceContext(
context, std::move(split_callback.first));
// If the NSS database was already available, |cert_db| is non-null and
// |did_get_cert_db_callback| has not been called. Call it explicitly.
if (cert_db)
did_get_cert_db_callback.Run(cert_db);
std::move(split_callback.second).Run(cert_db);
}

View File

@@ -109,7 +109,7 @@ function loadApplicationPackage (packagePath: string) {
try {
const filePath = Module._resolveFilename(packagePath, module, true);
app._setDefaultAppPaths(appPath || path.dirname(filePath));
app.setAppPath(appPath || path.dirname(filePath));
} catch (e) {
showErrorMessage(`Unable to find Electron app at ${packagePath}\n\n${e.message}`);
return;

View File

@@ -342,8 +342,9 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
context in the dev tools by selecting the 'Electron Isolated Context'
entry in the combo box at the top of the Console tab.
* `nativeWindowOpen` Boolean (optional) - Whether to use native
`window.open()`. Defaults to `true`. Child windows will always have node
integration disabled unless `nodeIntegrationInSubFrames` is true.
`window.open()`. Defaults to `false`. Child windows will always have node
integration disabled unless `nodeIntegrationInSubFrames` is true. **Note:** The default
value will be changing to `true` in Electron 15.
* `webviewTag` Boolean (optional) - Whether to enable the [`<webview>` tag](webview-tag.md).
Defaults to `false`. **Note:** The
`preload` script configured for the `<webview>` will have node integration

View File

@@ -71,7 +71,7 @@ const request = net.request({
Returns:
* `response` IncomingMessage - An object representing the HTTP response message.
* `response` [IncomingMessage](incoming-message.md) - An object representing the HTTP response message.
#### Event: 'login'

View File

@@ -24,7 +24,7 @@ The `dialog` module has the following methods:
* `buttonLabel` String (optional) - Custom label for the confirmation button, when
left empty the default label will be used.
* `filters` [FileFilter[]](structures/file-filter.md) (optional)
* `properties` String[] (optional) - Contains which features the dialog should
* `properties` String[]&#32;(optional) - Contains which features the dialog should
use. The following values are supported:
* `openFile` - Allow files to be selected.
* `openDirectory` - Allow directories to be selected.
@@ -87,7 +87,7 @@ dialog.showOpenDialogSync(mainWindow, {
* `buttonLabel` String (optional) - Custom label for the confirmation button, when
left empty the default label will be used.
* `filters` [FileFilter[]](structures/file-filter.md) (optional)
* `properties` String[] (optional) - Contains which features the dialog should
* `properties` String[]&#32;(optional) - Contains which features the dialog should
use. The following values are supported:
* `openFile` - Allow files to be selected.
* `openDirectory` - Allow directories to be selected.
@@ -112,7 +112,7 @@ Returns `Promise<Object>` - Resolve with an object containing the following:
* `canceled` Boolean - whether or not the dialog was canceled.
* `filePaths` String[] - An array of file paths chosen by the user. If the dialog is cancelled this will be an empty array.
* `bookmarks` String[] (optional) _macOS_ _mas_ - An array matching the `filePaths` array of base64 encoded strings which contains security scoped bookmark data. `securityScopedBookmarks` must be enabled for this to be populated. (For return values, see [table here](#bookmarks-array).)
* `bookmarks` String[]&#32;(optional) _macOS_ _mas_ - An array matching the `filePaths` array of base64 encoded strings which contains security scoped bookmark data. `securityScopedBookmarks` must be enabled for this to be populated. (For return values, see [table here](#bookmarks-array).)
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
@@ -165,7 +165,7 @@ dialog.showOpenDialog(mainWindow, {
displayed in front of the filename text field.
* `showsTagField` Boolean (optional) _macOS_ - Show the tags input box,
defaults to `true`.
* `properties` String[] (optional)
* `properties` String[]&#32;(optional)
* `showHiddenFiles` - Show hidden files in dialog.
* `createDirectory` _macOS_ - Allow creating new directories from dialog.
* `treatPackageAsDirectory` _macOS_ - Treat packages, such as `.app` folders,
@@ -195,7 +195,7 @@ The `filters` specifies an array of file types that can be displayed, see
* `nameFieldLabel` String (optional) _macOS_ - Custom label for the text
displayed in front of the filename text field.
* `showsTagField` Boolean (optional) _macOS_ - Show the tags input box, defaults to `true`.
* `properties` String[] (optional)
* `properties` String[]&#32;(optional)
* `showHiddenFiles` - Show hidden files in dialog.
* `createDirectory` _macOS_ - Allow creating new directories from dialog.
* `treatPackageAsDirectory` _macOS_ - Treat packages, such as `.app` folders,
@@ -227,7 +227,7 @@ expanding and collapsing the dialog.
`"warning"`. On Windows, `"question"` displays the same icon as `"info"`, unless
you set an icon using the `"icon"` option. On macOS, both `"warning"` and
`"error"` display the same warning icon.
* `buttons` String[] (optional) - Array of texts for buttons. On Windows, an empty array
* `buttons` String[]&#32;(optional) - Array of texts for buttons. On Windows, an empty array
will result in one button labeled "OK".
* `defaultId` Integer (optional) - Index of the button in the buttons array which will
be selected by default when the message box opens.
@@ -269,7 +269,7 @@ If `browserWindow` is not shown dialog will not be attached to it. In such case
`"warning"`. On Windows, `"question"` displays the same icon as `"info"`, unless
you set an icon using the `"icon"` option. On macOS, both `"warning"` and
`"error"` display the same warning icon.
* `buttons` String[] (optional) - Array of texts for buttons. On Windows, an empty array
* `buttons` String[]&#32;(optional) - Array of texts for buttons. On Windows, an empty array
will result in one button labeled "OK".
* `defaultId` Integer (optional) - Index of the button in the buttons array which will
be selected by default when the message box opens.

View File

@@ -6,15 +6,16 @@ untrusted content within a renderer. Windows can be created from the renderer in
* clicking on links or submitting forms adorned with `target=_blank`
* JavaScript calling `window.open()`
For same-origin content, the new window is created within the same process,
enabling the parent to access the child window directly. This can be very
useful for app sub-windows that act as preference panels, or similar, as the
parent can render to the sub-window directly, as if it were a `div` in the
parent. This is the same behavior as in the browser.
In non-sandboxed renderers, or when `nativeWindowOpen` is false (the default), this results in the creation of a
[`BrowserWindowProxy`](browser-window-proxy.md), a light wrapper around
`BrowserWindow`.
When `nativeWindowOpen` is set to false, `window.open` instead results in the
creation of a [`BrowserWindowProxy`](browser-window-proxy.md), a light wrapper
around `BrowserWindow`.
However, when the `sandbox` (or directly, `nativeWindowOpen`) option is set, a
`Window` instance is created, as you'd expect in the browser. For same-origin
content, the new window is created within the same process, enabling the parent
to access the child window directly. This can be very useful for app sub-windows that act
as preference panels, or similar, as the parent can render to the sub-window
directly, as if it were a `div` in the parent.
Electron pairs this native Chrome `Window` with a BrowserWindow under the hood.
You can take advantage of all the customization available when creating a
@@ -67,50 +68,18 @@ window.open('https://github.com', '_blank', 'top=500,left=200,frame=false,nodeIn
To customize or cancel the creation of the window, you can optionally set an
override handler with `webContents.setWindowOpenHandler()` from the main
process. Returning `{ action: 'deny' }` cancels the window. Returning `{
action: 'allow', overrideBrowserWindowOptions: { ... } }` will allow opening
the window and setting the `BrowserWindowConstructorOptions` to be used when
creating the window. Note that this is more powerful than passing options
through the feature string, as the renderer has more limited privileges in
deciding security preferences than the main process.
### Native `Window` example
```javascript
// main.js
const mainWindow = new BrowserWindow()
// In this example, only windows with the `about:blank` url will be created.
// All other urls will be blocked.
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
if (url === 'about:blank') {
return {
frame: false,
fullscreenable: false,
backgroundColor: 'black',
webPreferences: {
preload: 'my-child-window-preload-script.js'
}
}
}
return false
})
```
```javascript
// renderer process (mainWindow)
const childWindow = window.open('', 'modal')
childWindow.document.write('<h1>Hello</h1>')
```
process. Returning `false` cancels the window, while returning an object sets
the `BrowserWindowConstructorOptions` used when creating the window. Note that
this is more powerful than passing options through the feature string, as the
renderer has more limited privileges in deciding security preferences than the
main process.
### `BrowserWindowProxy` example
```javascript
// main.js
const mainWindow = new BrowserWindow({
webPreferences: { nativeWindowOpen: false }
})
const mainWindow = new BrowserWindow()
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
if (url.startsWith('https://github.com/')) {
@@ -132,3 +101,39 @@ mainWindow.webContents.on('did-create-window', (childWindow) => {
const windowProxy = window.open('https://github.com/', null, 'minimizable=false')
windowProxy.postMessage('hi', '*')
```
### Native `Window` example
```javascript
// main.js
const mainWindow = new BrowserWindow({
webPreferences: {
nativeWindowOpen: true
}
})
// In this example, only windows with the `about:blank` url will be created.
// All other urls will be blocked.
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
if (url === 'about:blank') {
return {
action: 'allow',
overrideBrowserWindowOptions: {
frame: false,
fullscreenable: false,
backgroundColor: 'black',
webPreferences: {
preload: 'my-child-window-preload-script.js'
}
}
}
}
return { action: 'deny' }
})
```
```javascript
// renderer process (mainWindow)
const childWindow = window.open('', 'modal')
childWindow.document.write('<h1>Hello</h1>')
```

View File

@@ -12,6 +12,18 @@ This document uses the following convention to categorize breaking changes:
* **Deprecated:** An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed in a future release.
* **Removed:** An API or feature was removed, and is no longer supported by Electron.
## Planned Breaking API Changes (15.0)
### Default Changed: `nativeWindowOpen` defaults to `true`
Prior to Electron 15, `window.open` was by default shimmed to use
`BrowserWindowProxy`. This meant that `window.open('about:blank')` did not work
to open synchronously scriptable child windows, among other incompatibilities.
`nativeWindowOpen: true` is no longer experimental, and is now the default.
See the documentation for [window.open in Electron](api/window-open.md)
for more details.
## Planned Breaking API Changes (14.0)
### Removed: `app.allowRendererProcessReuse`
@@ -43,16 +55,6 @@ ensure your code works with this property enabled. It has been enabled by defau
You will be affected by this change if you use either `webFrame.executeJavaScript` or `webFrame.executeJavaScriptInIsolatedWorld`. You will need to ensure that values returned by either of those methods are supported by the [Context Bridge API](api/context-bridge.md#parameter--error--return-type-support) as these methods use the same value passing semantics.
### Default Changed: `nativeWindowOpen` defaults to `true`
Prior to Electron 14, `window.open` was by default shimmed to use
`BrowserWindowProxy`. This meant that `window.open('about:blank')` did not work
to open synchronously scriptable child windows, among other incompatibilities.
`nativeWindowOpen` is no longer experimental, and is now the default.
See the documentation for [window.open in Electron](api/window-open.md)
for more details.
### Removed: BrowserWindowConstructorOptions inheriting from parent windows
Prior to Electron 14, windows opened with `window.open` would inherit

View File

@@ -10,12 +10,12 @@ files, you need to have built Electron so that it knows which compiler flags
were used. There is one required option for the script `--output-dir`, which
tells the script which build directory to pull the compilation information
from. A typical usage would be:
`npm run lint:clang-tiy --out-dir ../out/Testing`
`npm run lint:clang-tidy --out-dir ../out/Testing`
With no filenames provided, all C/C++/Objective-C files will be checked.
You can provide a list of files to be checked by passing the filenames after
the options:
`npm run lint:clang-tiy --out-dir ../out/Testing shell/browser/api/electron_api_app.cc`
`npm run lint:clang-tidy --out-dir ../out/Testing shell/browser/api/electron_api_app.cc`
While `clang-tidy` has a
[long list](https://clang.llvm.org/extra/clang-tidy/checks/list.html)

View File

@@ -25,7 +25,7 @@ You can run `npm run lint` to show any style issues detected by `cpplint` and
## C++ and Python
For C++ and Python, we follow Chromium's [Coding
Style](https://www.chromium.org/developers/coding-style). You can use
Style](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/styleguide/styleguide.md). You can use
[clang-format](clang-format.md) to format the C++ code automatically. There is
also a script `script/cpplint.py` to check whether all files conform.

View File

@@ -22,7 +22,7 @@ function createWindow () {
})
ipcMain.handle('dark-mode:system', () => {
nativeTheme.themeSouce = 'system'
nativeTheme.themeSource = 'system'
})
}

View File

@@ -7,10 +7,6 @@
</head>
<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>.
</p>
<p>After launching this application, you should see the system notification.</p>
</body>
</html>

View File

@@ -3,21 +3,17 @@ const { app, BrowserWindow, Notification } = require('electron')
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
height: 600
})
win.loadFile('index.html')
}
const NOTIFICATION_TITLE = 'Basic Notification'
const NOTIFICATION_BODY = 'Notification from the Main process'
function showNotification () {
const notification = {
title: 'Basic Notification',
body: 'Notification from the Main process'
}
new Notification(notification).show()
new Notification({ title: NOTIFICATION_TITLE, body: NOTIFICATION_BODY }).show()
}
app.whenReady().then(createWindow).then(showNotification)

View File

@@ -7,11 +7,9 @@
</head>
<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>.
</p>
<p>After launching this application, you should see the system notification.</p>
<p id="output">Click it to see the effect in this interface.</p>
<script src="renderer.js"></script>
</body>
</html>

View File

@@ -3,10 +3,7 @@ const { app, BrowserWindow } = require('electron')
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
height: 600
})
win.loadFile('index.html')

View File

@@ -1,7 +1,6 @@
const myNotification = new Notification('Title', {
body: 'Notification from the Renderer process'
})
const NOTIFICATION_TITLE = 'Title'
const NOTIFICATION_BODY = 'Notification from the Renderer process. Click to log to console.'
const CLICK_MESSAGE = 'Notification clicked!'
myNotification.onclick = () => {
console.log('Notification clicked')
}
new Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY })
.onclick = () => document.getElementById("output").innerText = CLICK_MESSAGE

View File

@@ -7,10 +7,9 @@
</head>
<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>.
</p>
<p>Keep an eye on the dock (Mac) or taskbar (Windows, Unity) for this application!</p>
<p>It should indicate a progress that advances from 0 to 100%.</p>
<p>It should then show indeterminate (Windows) or pin at 100% (other operating systems)
briefly and then loop.</p>
</body>
</html>

View File

@@ -1,21 +1,39 @@
const { app, BrowserWindow } = require('electron')
let progressInterval
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
height: 600
})
win.loadFile('index.html')
win.setProgressBar(0.5)
}
const INCREMENT = 0.03
const INTERVAL_DELAY = 100 // ms
let c = 0
progressInterval = setInterval(() => {
// update progress bar to next value
// values between 0 and 1 will show progress, >1 will show indeterminate or stick at 100%
win.setProgressBar(c)
// increment or reset progress bar
if (c < 2) {
c += INCREMENT
} else {
c = (-INCREMENT * 5) // reset to a bit less than 0 to show reset state
}
}, INTERVAL_DELAY)
}
app.whenReady().then(createWindow)
// before the app is terminated, clear both timers
app.on('before-quit', () => {
clearInterval(progressInterval)
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {

View File

@@ -2,15 +2,14 @@
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<title>Recent Documents</title>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
</head>
<body>
<h1>Hello World!</h1>
<h1>Recent Documents</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>.
Right click on the app icon to see recent documents.
You should see `recently-used.md` added to the list of recent files
</p>
</body>
</html>

View File

@@ -5,17 +5,15 @@ const path = require('path')
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
height: 600
})
win.loadFile('index.html')
}
const fileName = 'recently-used.md'
fs.writeFile(fileName, 'Lorem Ipsum', () => {
app.addRecentDocument(path.join(process.cwd(), `${fileName}`))
app.addRecentDocument(path.join(__dirname, fileName))
})
app.whenReady().then(createWindow)

View File

@@ -4,13 +4,14 @@
<meta charset="UTF-8">
<title>Hello World!</title>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<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>.
Click on the title with the <pre>Command</pre> or <pre>Control</pre> key pressed.
You should see a popup with the represented file at the top.
</p>
</body>
</body>
</html>

View File

@@ -4,10 +4,7 @@ const os = require('os');
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
height: 600
})
win.loadFile('index.html')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 32 KiB

0
docs/images/versioning-sketch-2.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -159,7 +159,7 @@ function createWindow () {
})
ipcMain.handle('dark-mode:system', () => {
nativeTheme.themeSouce = 'system'
nativeTheme.themeSource = 'system'
})
}

View File

@@ -51,4 +51,4 @@ Somewhere in the Electron binary there will be a sequence of bytes that look lik
To flip a fuse you find its position in the fuse wire and change it to "0" or "1" depending on the state you'd like.
You can view the current schema [here](https://github.com/electron/electron/blob/master/build/fuses/fuses.json).
You can view the current schema [here](https://github.com/electron/electron/blob/master/build/fuses/fuses.json5).

View File

@@ -135,14 +135,18 @@ a text file. A typical cache might look like this:
## Skip binary download
When installing the `electron` NPM package, it automatically downloads the electron binary.
Under the hood, Electron's JavaScript API binds to a binary that contains its
implementations. Because this binary is crucial to the function of any Electron app,
it is downloaded by default in the `postinstall` step every time you install `electron`
from the npm registry.
This can sometimes be unnecessary, e.g. in a CI environment, when testing another component.
However, if you want to install your project's dependencies but don't need to use
Electron functionality, you can set the `ELECTRON_SKIP_BINARY_DOWNLOAD` environment
variable to prevent the binary from being downloaded. For instance, this feature can
be useful in continuous integration environments when running unit tests that mock
out the `electron` module.
To prevent the binary from being downloaded when you install all npm dependencies you can set the environment variable `ELECTRON_SKIP_BINARY_DOWNLOAD`.
E.g.:
```sh
```sh npm2yarn
ELECTRON_SKIP_BINARY_DOWNLOAD=1 npm install
```

View File

@@ -49,11 +49,11 @@ is a great place to get advice from other Electron app developers.
the [GitHub issue tracker][issue-tracker] to see if any existing issues match your
problem. If not, feel free to fill out our bug report template and submit a new issue.
[chromium](https://www.chromium.org/)
[node](https://nodejs.org/)
[mdn-guide](https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web)
[node-guide](https://nodejs.dev/learn)
[comic](https://www.google.com/googlebooks/chrome/)
[fiddle](https://electronjs.org/fiddle)
[issue-tracker](https://github.com/electron/electron/issues)
[discord](https://discord.gg/electron)
[chromium]: https://www.chromium.org/
[node]: https://nodejs.org/
[mdn-guide]: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web
[node-guide]: https://nodejs.dev/learn
[comic]: https://www.google.com/googlebooks/chrome/
[fiddle]: https://electronjs.org/fiddle
[issue-tracker]: https://github.com/electron/electron/issues
[discord]: https://discord.gg/electron

View File

@@ -18,7 +18,7 @@ To show notifications in the Main process, you need to use the
### Show notifications in the Renderer process
Assuming you have a working Electron application from the
Starting with a working application from the
[Quick Start Guide](quick-start.md), add the following line to the
`index.html` file before the closing `</body>` tag:
@@ -26,26 +26,22 @@ Assuming you have a working Electron application from the
<script src="renderer.js"></script>
```
and add the `renderer.js` file:
...and add the `renderer.js` file:
```javascript fiddle='docs/fiddles/features/notifications/renderer'
const myNotification = new Notification('Title', {
body: 'Notification from the Renderer process'
})
const NOTIFICATION_TITLE = 'Title'
const NOTIFICATION_BODY = 'Notification from the Renderer process. Click to log to console.'
const CLICK_MESSAGE = 'Notification clicked'
myNotification.onclick = () => {
console.log('Notification clicked')
}
new Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY })
.onclick = () => console.log(CLICK_MESSAGE)
```
After launching the Electron application, you should see the notification:
![Notification in the Renderer process](../images/notification-renderer.png)
If you open the Console and then click the notification, you will see the
message that was generated after triggering the `onclick` event:
![Onclick message for the notification](../images/message-notification-renderer.png)
Additionally, if you click on the notification, the DOM will update to show "Notification clicked!".
### Show notifications in the Main process
@@ -55,18 +51,17 @@ Starting with a working application from the
```javascript fiddle='docs/fiddles/features/notifications/main'
const { Notification } = require('electron')
const NOTIFICATION_TITLE = 'Basic Notification'
const NOTIFICATION_BODY = 'Notification from the Main process'
function showNotification () {
const notification = {
title: 'Basic Notification',
body: 'Notification from the Main process'
}
new Notification(notification).show()
new Notification({ title: NOTIFICATION_TITLE, body: NOTIFICATION_BODY }).show()
}
app.whenReady().then(createWindow).then(showNotification)
```
After launching the Electron application, you should see the notification:
After launching the Electron application, you should see the system notification:
![Notification in the Main process](../images/notification-main.png)

View File

@@ -120,9 +120,9 @@ file in the directory you executed it in. Both files can be analyzed using
the Chrome Developer Tools, using the `Performance` and `Memory` tabs
respectively.
![performance-cpu-prof]
![Performance CPU Profile][performance-cpu-prof]
![performance-heap-prof]
![Performance Heap Memory Profile][performance-heap-prof]
In this example, on the author's machine, we saw that loading `request` took
almost half a second, whereas `node-fetch` took dramatically less memory

View File

@@ -138,7 +138,7 @@ way to import Electron's content scripts.
<!-- Note: This guide doesn't take sandboxing into account, which might fundamentally
change the statements here. -->
Preload scripts contain code that executes in a renderer process before its web content
begins loading. These scripts runs within the renderer context, but are granted more
begins loading. These scripts run within the renderer context, but are granted more
privileges by having access to Node.js APIs.
A preload script can be attached to the main process in the `BrowserWindow` constructor's

View File

@@ -31,30 +31,70 @@ currently at 63% towards completion, you would call it as
`setProgressBar(0.63)`.
Setting the parameter to negative values (e.g. `-1`) will remove the progress
bar, whereas setting it to values greater than `1` (e.g. `2`) will switch the
progress bar to indeterminate mode (Windows-only -- it will clamp to 100%
otherwise). In this mode, a progress bar remains active but does not show an
actual percentage. Use this mode for situations when you do not know how long
an operation will take to complete.
bar. Setting it to a value greater than `1` will indicate an indeterminate progress bar
in Windows or clamp to 100% in other operating systems. An indeterminate progress bar
remains active but does not show an actual percentage, and is used for situations when
you do not know how long an operation will take to complete.
See the [API documentation for more options and modes][setprogressbar].
## Example
Starting with a working application from the
[Quick Start Guide](quick-start.md), add the following lines to the
`main.js` file:
In this example, we add a progress bar to the main window that increments over time
using Node.js timers.
```javascript fiddle='docs/fiddles/features/progress-bar'
const { BrowserWindow } = require('electron')
const win = new BrowserWindow()
const { app, BrowserWindow } = require('electron')
win.setProgressBar(0.5)
let progressInterval
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600
})
win.loadFile('index.html')
const INCREMENT = 0.03
const INTERVAL_DELAY = 100 // ms
let c = 0
progressInterval = setInterval(() => {
// update progress bar to next value
// values between 0 and 1 will show progress, >1 will show indeterminate or stick at 100%
win.setProgressBar(c)
// increment or reset progress bar
if (c < 2) c += INCREMENT
else c = 0
}, INTERVAL_DELAY)
}
app.whenReady().then(createWindow)
// before the app is terminated, clear both timers
app.on('before-quit', () => {
clearInterval(progressInterval)
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
```
After launching the Electron application, you should see the bar in
the dock (macOS) or taskbar (Windows, Unity), indicating the progress
percentage you just defined.
After launching the Electron application, the dock (macOS) or taskbar (Windows, Unity)
should show a progress bar that starts at zero and progresses through 100% to completion.
It should then show indeterminate (Windows) or pin to 100% (other operating systems)
briefly and then loop.
![macOS dock progress bar](../images/dock-progress-bar.png)

View File

@@ -299,7 +299,9 @@ function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
preload: path.join(__dirname, 'preload.js')
webPreferences: {
preload: path.join(__dirname, 'preload.js')
}
})
win.loadFile('index.html')
@@ -440,7 +442,7 @@ window.addEventListener('DOMContentLoaded', () => {
</html>
```
```fiddle docs/fiddles/quickstart
```fiddle docs/fiddles/quick-start
```
To summarize all the steps we've done:

View File

@@ -13,39 +13,62 @@ __Application dock menu:__
![macOS Dock Menu][dock-menu-image]
To add a file to recent documents, you need to use the
[app.addRecentDocument][addrecentdocument] API.
## Example
### Add an item to recent documents
Starting with a working application from the
[Quick Start Guide](quick-start.md), add the following lines to the
`main.js` file:
### Managing recent documents
```javascript fiddle='docs/fiddles/features/recent-documents'
const { app } = require('electron')
const { app, BrowserWindow } = require('electron')
const fs = require('fs')
const path = require('path')
app.addRecentDocument('/Users/USERNAME/Desktop/work.type')
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600
})
win.loadFile('index.html')
}
const fileName = 'recently-used.md'
fs.writeFile(fileName, 'Lorem Ipsum', () => {
app.addRecentDocument(path.join(__dirname, fileName))
})
app.whenReady().then(createWindow)
app.on('window-all-closed', () => {
app.clearRecentDocuments()
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
```
#### Adding a recent document
To add a file to recent documents, use the
[app.addRecentDocument][addrecentdocument] API.
After launching the Electron application, right click the application icon.
You should see the item you just added. In this guide, the item is a Markdown
file located in the root of the project:
In this guide, the item is a Markdown file located in the root of the project.
You should see `recently-used.md` added to the list of recent files:
![Recent document](../images/recent-documents.png)
### Clear the list of recent documents
#### Clearing the list of recent documents
To clear the list of recent documents, you need to use
[app.clearRecentDocuments][clearrecentdocuments] API in the `main.js` file:
```javascript
const { app } = require('electron')
app.clearRecentDocuments()
```
To clear the list of recent documents, use the
[app.clearRecentDocuments][clearrecentdocuments] API.
In this guide, the list of documents is cleared once all windows have been
closed.
## Additional information

View File

@@ -20,23 +20,40 @@ To set the represented file of window, you can use the
## Example
Starting with a working application from the
[Quick Start Guide](quick-start.md), add the following lines to the
`main.js` file:
```javascript fiddle='docs/fiddles/features/represented-file'
const { app, BrowserWindow } = require('electron')
const os = require('os');
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600
})
}
app.whenReady().then(() => {
const win = new BrowserWindow()
win.setRepresentedFilename('/etc/passwd')
win.setRepresentedFilename(os.homedir())
win.setDocumentEdited(true)
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
```
After launching the Electron application, click on the title with `Command` or
`Control` key pressed. You should see a popup with the file you just defined:
`Control` key pressed. You should see a popup with the represented file at the top.
In this guide, this is the current user's home directory:
![Represented file](../images/represented-file.png)

View File

@@ -16,7 +16,6 @@ you can interact with the community in these locations:
* Sharing ideas with other Electron app developers
* And more!
* [`electron`](https://discuss.atom.io/c/electron) category on the Atom forums
* `#atom-shell` channel on Freenode
* `#electron` channel on [Atom's Slack](https://discuss.atom.io/t/join-us-on-slack/16638?source_topic_id=25406)
* [`electron-ru`](https://telegram.me/electron_ru) *(Russian)*
* [`electron-br`](https://electron-br.slack.com) *(Brazilian Portuguese)*

View File

@@ -13,23 +13,46 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__functional_base",
"//buildtools/third_party/libc++/trunk/include/__functional_base_03",
"//buildtools/third_party/libc++/trunk/include/__hash_table",
"//buildtools/third_party/libc++/trunk/include/__iterator/concepts.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/incrementable_traits.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/iter_move.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/iterator_traits.h",
"//buildtools/third_party/libc++/trunk/include/__iterator/readable_traits.h",
"//buildtools/third_party/libc++/trunk/include/__libcpp_version",
"//buildtools/third_party/libc++/trunk/include/__locale",
"//buildtools/third_party/libc++/trunk/include/__memory/addressof.h",
"//buildtools/third_party/libc++/trunk/include/__memory/allocation_guard.h",
"//buildtools/third_party/libc++/trunk/include/__memory/allocator.h",
"//buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h",
"//buildtools/third_party/libc++/trunk/include/__memory/base.h",
"//buildtools/third_party/libc++/trunk/include/__memory/auto_ptr.h",
"//buildtools/third_party/libc++/trunk/include/__memory/compressed_pair.h",
"//buildtools/third_party/libc++/trunk/include/__memory/construct_at.h",
"//buildtools/third_party/libc++/trunk/include/__memory/pointer_safety.h",
"//buildtools/third_party/libc++/trunk/include/__memory/pointer_traits.h",
"//buildtools/third_party/libc++/trunk/include/__memory/utilities.h",
"//buildtools/third_party/libc++/trunk/include/__memory/raw_storage_iterator.h",
"//buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h",
"//buildtools/third_party/libc++/trunk/include/__memory/temporary_buffer.h",
"//buildtools/third_party/libc++/trunk/include/__memory/uninitialized_algorithms.h",
"//buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h",
"//buildtools/third_party/libc++/trunk/include/__mutex_base",
"//buildtools/third_party/libc++/trunk/include/__node_handle",
"//buildtools/third_party/libc++/trunk/include/__nullptr",
"//buildtools/third_party/libc++/trunk/include/__ranges/access.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/concepts.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/data.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/empty.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/enable_borrowed_range.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/size.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/view.h",
"//buildtools/third_party/libc++/trunk/include/__split_buffer",
"//buildtools/third_party/libc++/trunk/include/__sso_allocator",
"//buildtools/third_party/libc++/trunk/include/__std_stream",
"//buildtools/third_party/libc++/trunk/include/__string",
"//buildtools/third_party/libc++/trunk/include/__support/android/locale_bionic.h",
"//buildtools/third_party/libc++/trunk/include/__support/fuchsia/xlocale.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/gettod_zos.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/limits.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/locale_mgmt_aix.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/locale_mgmt_zos.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/nanosleep.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/support.h",
"//buildtools/third_party/libc++/trunk/include/__support/ibm/xlocale.h",
@@ -49,6 +72,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__tree",
"//buildtools/third_party/libc++/trunk/include/__tuple",
"//buildtools/third_party/libc++/trunk/include/__undef_macros",
"//buildtools/third_party/libc++/trunk/include/__utility/to_underlying.h",
"//buildtools/third_party/libc++/trunk/include/algorithm",
"//buildtools/third_party/libc++/trunk/include/any",
"//buildtools/third_party/libc++/trunk/include/array",
@@ -152,6 +176,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/ostream",
"//buildtools/third_party/libc++/trunk/include/queue",
"//buildtools/third_party/libc++/trunk/include/random",
"//buildtools/third_party/libc++/trunk/include/ranges",
"//buildtools/third_party/libc++/trunk/include/ratio",
"//buildtools/third_party/libc++/trunk/include/regex",
"//buildtools/third_party/libc++/trunk/include/scoped_allocator",

View File

@@ -490,63 +490,83 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
}
};
function fsReadFileAsar (pathArgument: string, options: any, callback: any) {
const pathInfo = splitPath(pathArgument);
if (pathInfo.isAsar) {
const { asarPath, filePath } = pathInfo;
if (typeof options === 'function') {
callback = options;
options = { encoding: null };
} else if (typeof options === 'string') {
options = { encoding: options };
} else if (options === null || options === undefined) {
options = { encoding: null };
} else if (typeof options !== 'object') {
throw new TypeError('Bad arguments');
}
const { encoding } = options;
const archive = getOrCreateArchive(asarPath);
if (!archive) {
const error = createError(AsarError.INVALID_ARCHIVE, { asarPath });
nextTick(callback, [error]);
return;
}
const info = archive.getFileInfo(filePath);
if (!info) {
const error = createError(AsarError.NOT_FOUND, { asarPath, filePath });
nextTick(callback, [error]);
return;
}
if (info.size === 0) {
nextTick(callback, [null, encoding ? '' : Buffer.alloc(0)]);
return;
}
if (info.unpacked) {
const realPath = archive.copyFileOut(filePath);
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);
fs.read(fd, buffer, 0, info.size, info.offset, (error: Error) => {
callback(error, encoding ? buffer.toString(encoding) : buffer);
});
}
}
const { readFile } = fs;
fs.readFile = function (pathArgument: string, options: any, callback: any) {
const pathInfo = splitPath(pathArgument);
if (!pathInfo.isAsar) return readFile.apply(this, arguments);
const { asarPath, filePath } = pathInfo;
if (typeof options === 'function') {
callback = options;
options = { encoding: null };
} else if (typeof options === 'string') {
options = { encoding: options };
} else if (options === null || options === undefined) {
options = { encoding: null };
} else if (typeof options !== 'object') {
throw new TypeError('Bad arguments');
if (!pathInfo.isAsar) {
return readFile.apply(this, arguments);
}
const { encoding } = options;
const archive = getOrCreateArchive(asarPath);
if (!archive) {
const error = createError(AsarError.INVALID_ARCHIVE, { asarPath });
nextTick(callback, [error]);
return;
}
const info = archive.getFileInfo(filePath);
if (!info) {
const error = createError(AsarError.NOT_FOUND, { asarPath, filePath });
nextTick(callback, [error]);
return;
}
if (info.size === 0) {
nextTick(callback, [null, encoding ? '' : Buffer.alloc(0)]);
return;
}
if (info.unpacked) {
const realPath = archive.copyFileOut(filePath);
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);
fs.read(fd, buffer, 0, info.size, info.offset, (error: Error) => {
callback(error, encoding ? buffer.toString(encoding) : buffer);
});
return fsReadFileAsar(pathArgument, options, callback);
};
fs.promises.readFile = util.promisify(fs.readFile);
const { readFile: readFilePromise } = fs.promises;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
fs.promises.readFile = function (pathArgument: string, options: any) {
const pathInfo = splitPath(pathArgument);
if (!pathInfo.isAsar) {
return readFilePromise.apply(this, arguments);
}
const p = util.promisify(fsReadFileAsar);
return p(pathArgument, options);
};
const { readFileSync } = fs;
fs.readFileSync = function (pathArgument: string, options: any) {

View File

@@ -66,19 +66,6 @@ Object.defineProperty(app, 'applicationMenu', {
// 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!));
app.setPath('userCache', path.join(app.getPath('cache'), app.name!));
app.setAppPath(packagePath);
// Add support for --user-data-dir=
if (app.commandLine.hasSwitch('user-data-dir')) {
const userDataDir = app.commandLine.getSwitchValue('user-data-dir');
if (path.isAbsolute(userDataDir)) app.setPath('userData', userDataDir);
}
};
if (process.platform === 'darwin') {
const setDockMenu = app.dock!.setMenu;
app.dock!.setMenu = (menu) => {

View File

@@ -54,7 +54,7 @@ const isChromeDevTools = function (pageURL: string) {
};
const assertChromeDevTools = function (contents: Electron.WebContents, api: string) {
const pageURL = contents._getURL();
const pageURL = contents.getURL();
if (!isChromeDevTools(pageURL)) {
console.error(`Blocked ${pageURL} from calling ${api}`);
throw new Error(`Blocked ${api}`);

View File

@@ -76,6 +76,7 @@ ipcMainInternal.on(
const referrer: Electron.Referrer = { url: '', policy: 'strict-origin-when-cross-origin' };
const browserWindowOptions = event.sender._callWindowOpenHandler(event, { url, frameName, features, disposition: 'new-window', referrer });
if (event.defaultPrevented) {
event.returnValue = null;
return;
}
const guest = openGuestWindow({

View File

@@ -129,7 +129,7 @@ if (packageJson.v8Flags != null) {
require('v8').setFlagsFromString(packageJson.v8Flags);
}
app._setDefaultAppPaths(packagePath);
app.setAppPath(packagePath);
// Load the chrome devtools support.
require('@electron/internal/browser/devtools');

View File

@@ -18,7 +18,7 @@ ipcRenderer.sendToHost = function (channel, ...args) {
};
ipcRenderer.sendTo = function (webContentsId, channel, ...args) {
return ipc.sendTo(internal, webContentsId, channel, args);
return ipc.sendTo(webContentsId, channel, args);
};
ipcRenderer.invoke = async function (channel, ...args) {

View File

@@ -1,16 +1,32 @@
import { internalContextBridge } from '@electron/internal/renderer/api/context-bridge';
import { ipcRendererInternal } from '@electron/internal/renderer/ipc-renderer-internal';
import * as ipcRendererUtils from '@electron/internal/renderer/ipc-renderer-internal-utils';
import { webFrame } from 'electron/renderer';
import { IPC_MESSAGES } from '../common/ipc-messages';
const { contextIsolationEnabled } = internalContextBridge;
/* Corrects for some Inspector adaptations needed in Electron.
* 1) Use menu API to show context menu.
* 2) Correct for Chromium returning undefined for filesystem.
* 3) Use dialog API to override file chooser dialog.
*/
window.onload = function () {
// Use menu API to show context menu.
window.InspectorFrontendHost!.showContextMenuAtPoint = createMenu;
// correct for Chromium returning undefined for filesystem
window.Persistence!.FileSystemWorkspaceBinding.completeURL = completeURL;
// Use dialog API to override file chooser dialog.
window.UI!.createFileSelectorElement = createFileSelectorElement;
if (contextIsolationEnabled) {
internalContextBridge.overrideGlobalValueFromIsolatedWorld([
'InspectorFrontendHost', 'showContextMenuAtPoint'
], createMenu);
internalContextBridge.overrideGlobalValueFromIsolatedWorld([
'Persistence', 'FileSystemWorkspaceBinding', 'completeURL'
], completeURL);
internalContextBridge.overrideGlobalValueFromIsolatedWorld([
'UI', 'createFileSelectorElement'
], createFileSelectorElement);
} else {
window.InspectorFrontendHost!.showContextMenuAtPoint = createMenu;
window.Persistence!.FileSystemWorkspaceBinding.completeURL = completeURL;
window.UI!.createFileSelectorElement = createFileSelectorElement;
}
};
// Extra / is needed as a result of MacOS requiring absolute paths
@@ -36,9 +52,10 @@ const createMenu = function (x: number, y: number, items: ContextMenuItem[]) {
const isEditMenu = useEditMenuItems(x, y, items);
ipcRendererInternal.invoke<number>(IPC_MESSAGES.INSPECTOR_CONTEXT_MENU, items, isEditMenu).then(id => {
if (typeof id === 'number') {
window.DevToolsAPI!.contextMenuItemSelected(id);
webFrame.executeJavaScript(`window.DevToolsAPI.contextMenuItemSelected(${JSON.stringify(id)})`);
}
window.DevToolsAPI!.contextMenuCleared();
webFrame.executeJavaScript('window.DevToolsAPI.contextMenuCleared()');
});
};

View File

@@ -4,7 +4,8 @@ const { ipc } = process._linkedBinding('electron_renderer_ipc');
const internal = true;
const ipcRendererInternal = new EventEmitter() as any as ElectronInternal.IpcRendererInternal;
export const ipcRendererInternal = new EventEmitter() as any as ElectronInternal.IpcRendererInternal;
ipcRendererInternal.send = function (channel, ...args) {
return ipc.send(internal, channel, args);
};
@@ -13,10 +14,6 @@ ipcRendererInternal.sendSync = function (channel, ...args) {
return ipc.sendSync(internal, channel, args);
};
ipcRendererInternal.sendTo = function (webContentsId, channel, ...args) {
return ipc.sendTo(internal, webContentsId, channel, args);
};
ipcRendererInternal.invoke = async function<T> (channel: string, ...args: any[]) {
const { error, result } = await ipc.invoke<T>(internal, channel, args);
if (error) {
@@ -24,5 +21,3 @@ ipcRendererInternal.invoke = async function<T> (channel: string, ...args: any[])
}
return result;
};
export { ipcRendererInternal };

View File

@@ -1,6 +1,6 @@
{
"name": "electron",
"version": "14.0.0-nightly.20210524",
"version": "14.0.0-beta.11",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {

View File

@@ -12,10 +12,10 @@ https://boringssl-review.googlesource.com/c/boringssl/+/33984 for a
similar patch that was merged upstream.
diff --git a/crypto/cipher_extra/cipher_extra.c b/crypto/cipher_extra/cipher_extra.c
index b132265bc103658dba3de6e0c3dc50d3634da5b0..588a4773437c311877f275bf3679f9688cda3c46 100644
index 786a5d5fb13d7ceafc9b7d58c0aaccb88552506d..5ede89f9f0761d1da1baa899e9a02b77ffcffe93 100644
--- a/crypto/cipher_extra/cipher_extra.c
+++ b/crypto/cipher_extra/cipher_extra.c
@@ -101,10 +101,14 @@ const EVP_CIPHER *EVP_get_cipherbyname(const char *name) {
@@ -105,10 +105,14 @@ const EVP_CIPHER *EVP_get_cipherbyname(const char *name) {
return EVP_des_ede3_cbc();
} else if (OPENSSL_strcasecmp(name, "aes-128-cbc") == 0) {
return EVP_aes_128_cbc();

View File

@@ -6,10 +6,10 @@ Subject: expose des-ede3
This should be upstreamed.
diff --git a/crypto/cipher_extra/cipher_extra.c b/crypto/cipher_extra/cipher_extra.c
index 588a4773437c311877f275bf3679f9688cda3c46..e771ed6589b4579cc35300d5b2a1b68d92e444f5 100644
index 5ede89f9f0761d1da1baa899e9a02b77ffcffe93..8205e121c152fe4e2d8df34a1ac2fe0498381f31 100644
--- a/crypto/cipher_extra/cipher_extra.c
+++ b/crypto/cipher_extra/cipher_extra.c
@@ -93,6 +93,8 @@ const EVP_CIPHER *EVP_get_cipherbyname(const char *name) {
@@ -97,6 +97,8 @@ const EVP_CIPHER *EVP_get_cipherbyname(const char *name) {
return EVP_rc4();
} else if (OPENSSL_strcasecmp(name, "des-cbc") == 0) {
return EVP_des_cbc();

View File

@@ -80,7 +80,7 @@ index d540144b293297791c087e0b968a47d368a73695..53cb9d2dc8f1962a70dc12b648d27c32
+ callback(EVP_ripemd160(), "ripemd160", NULL, arg);
}
diff --git a/include/openssl/digest.h b/include/openssl/digest.h
index 66f1b5dcfd8232a697145acb2b6c2efe890d543f..67fc522172dc3ab56787fa5db3c277fd4811474a 100644
index 12542c18b2563c83f0f37a0cbbab6847060ab180..f96c5c59ddfa7aee63bb0212812dd14c677b59cb 100644
--- a/include/openssl/digest.h
+++ b/include/openssl/digest.h
@@ -90,6 +90,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);

View File

@@ -3,7 +3,6 @@ dcheck.patch
accelerator.patch
blink_file_path.patch
blink_local_frame.patch
blink_world_context.patch
can_create_window.patch
disable_hidden.patch
dom_storage_limits.patch
@@ -16,7 +15,6 @@ enable_reset_aspect_ratio.patch
v8_context_snapshot_generator.patch
boringssl_build_gn.patch
pepper_plugin_support.patch
no_cache_storage_check.patch
gtk_visibility.patch
sysroot.patch
resource_file_conflict.patch
@@ -49,7 +47,6 @@ build_add_electron_tracing_category.patch
worker_context_will_destroy.patch
frame_host_manager.patch
crashpad_pid_check.patch
preconnect_feature.patch
network_service_allow_remote_certificate_verification_logic.patch
put_back_deleted_colors_for_autofill.patch
disable_color_correct_rendering.patch
@@ -60,7 +57,6 @@ allow_new_privileges_in_unsandboxed_child_processes.patch
expose_setuseragent_on_networkcontext.patch
feat_add_set_theme_source_to_allow_apps_to.patch
add_webmessageportconverter_entangleandinjectmessageportchannel.patch
revert_remove_contentrendererclient_shouldfork.patch
ignore_rc_check.patch
remove_usage_of_incognito_apis_in_the_spellchecker.patch
chore_use_electron_resources_not_chrome_for_spellchecker.patch
@@ -73,7 +69,7 @@ gpu_notify_when_dxdiag_request_fails.patch
feat_allow_embedders_to_add_observers_on_created_hunspell.patch
feat_add_onclose_to_messageport.patch
ui_gtk_public_header.patch
allow_in_process_windows_to_have_different_web_prefs.patch
allow_in-process_windows_to_have_different_web_prefs.patch
refactor_expose_cursor_changes_to_the_webcontentsobserver.patch
crash_allow_setting_more_options.patch
breakpad_treat_node_processes_as_browser_processes.patch
@@ -83,7 +79,6 @@ crash_allow_disabling_compression_on_linux.patch
allow_setting_secondary_label_via_simplemenumodel.patch
feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch
fix_patch_out_profile_refs_in_accessibility_ui.patch
fix_check_issecureeventinputenabled_in_constructor_before_setting.patch
skip_atk_toolchain_check.patch
worker_feat_add_hook_to_notify_script_ready.patch
chore_provide_iswebcontentscreationoverridden_with_full_params.patch
@@ -99,6 +94,9 @@ fix_add_check_for_sandbox_then_result.patch
extend_apply_webpreferences.patch
fix_expose_decrementcapturercount_in_web_contents_impl.patch
add_setter_for_browsermainloop_result_code.patch
chore_allow_overriding_of_enable_pak_file_integrity_checks.patch
make_include_of_stack_trace_h_unconditional.patch
build_libc_as_static_library.patch
build_do_not_depend_on_packed_resource_integrity.patch
don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch
refactor_restore_base_adaptcallbackforrepeating.patch
hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch

View File

@@ -1,16 +1,16 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 4 Oct 2018 14:57:02 -0700
Subject: accelerator.patch
Subject: fix: improve shortcut text of Accelerator
This patch makes three changes to Accelerator::GetShortcutText to improve shortcut display text in menus:
1. Ctrl-Alt-<Key> accelerators show as Ctrl-Alt-<Key> instead of as Ctrl-<Key>
2. F2-F24 accelerators show up as such
3. Ctrl-Shift-= should show as Ctrl-+
3. Ctrl-Shift-= and Ctrl-Plus show up as such
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index d6913b15149f773cad28b5e2278b0f80df3d2896..15f944c4bb2fde7241b643f6a979a81ebce844b1 100644
index d6913b15149f773cad28b5e2278b0f80df3d2896..25342f62acdc28806a0e6ae0bd129c59083ccf06 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -11,6 +11,7 @@
@@ -21,61 +21,39 @@ index d6913b15149f773cad28b5e2278b0f80df3d2896..15f944c4bb2fde7241b643f6a979a81e
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
@@ -27,9 +28,7 @@
#include <windows.h>
@@ -234,6 +235,11 @@ std::u16string Accelerator::GetShortcutText() const {
#endif
-#if !defined(OS_WIN) && (defined(USE_AURA) || defined(OS_MAC))
#include "ui/events/keycodes/keyboard_code_conversion.h"
-#endif
#if defined(OS_CHROMEOS)
#include "ui/base/ui_base_features.h"
@@ -233,7 +232,15 @@ std::u16string Accelerator::GetShortcutText() const {
shortcut = KeyCodeToName();
#endif
+ unsigned int flags = 0;
if (shortcut.empty()) {
+ const uint16_t c = DomCodeToUsLayoutCharacter(
+ UsLayoutKeyboardCodeToDomCode(key_code_), flags);
+ if (c != 0) {
+ shortcut =
+ static_cast<std::u16string::value_type>(
+ base::ToUpperASCII(static_cast<char16_t>(c)));
+ }
+ // When a shifted char is explicitly specified, for example Ctrl+Plus,
+ // use the shifted char directly.
+ if (shifted_char) {
+ shortcut += *shifted_char;
+ } else {
#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
@@ -242,21 +249,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;
- if (base::IsAsciiDigit(key_code_))
+ if (base::IsAsciiDigit(key_code_)) {
key = static_cast<wchar_t>(key_code_);
- else
- key = LOWORD(::MapVirtualKeyW(key_code_, MAPVK_VK_TO_CHAR));
- // If there is no translation for the given |key_code_| (e.g.
- // VKEY_UNKNOWN), |::MapVirtualKeyW| returns 0.
- if (key != 0)
- shortcut += key;
-#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<std::u16string::value_type>(base::ToUpperASCII(c));
+ shortcut = key;
+ }
@@ -257,6 +263,10 @@ std::u16string Accelerator::GetShortcutText() const {
shortcut +=
static_cast<std::u16string::value_type>(base::ToUpperASCII(c));
#endif
+ }
+ if (key_code_ > VKEY_F1 && key_code_ <= VKEY_F24)
+ shortcut = base::UTF8ToUTF16(
+ base::StringPrintf("F%d", key_code_ - VKEY_F1 + 1));
}
#if defined(OS_MAC)
@@ -452,7 +452,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
@@ -444,7 +454,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
const std::u16string& shortcut) const {
std::u16string result = shortcut;
- if (IsShiftDown())
+ if (!shifted_char && IsShiftDown())
result = ApplyModifierToAcceleratorString(result, IDS_APP_SHIFT_KEY);
// Note that we use 'else-if' in order to avoid using Ctrl+Alt as a shortcut.
@@ -452,7 +462,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
// more information.
if (IsCtrlDown())
result = ApplyModifierToAcceleratorString(result, IDS_APP_CTRL_KEY);
@@ -84,3 +62,24 @@ index d6913b15149f773cad28b5e2278b0f80df3d2896..15f944c4bb2fde7241b643f6a979a81e
result = ApplyModifierToAcceleratorString(result, IDS_APP_ALT_KEY);
if (IsCmdDown()) {
diff --git a/ui/base/accelerators/accelerator.h b/ui/base/accelerators/accelerator.h
index 780a45f9ca2dd60e0deac27cc6e8f69e72cd8435..b1b46f18e9c600820fdd2d26631eac38da672811 100644
--- a/ui/base/accelerators/accelerator.h
+++ b/ui/base/accelerators/accelerator.h
@@ -16,6 +16,7 @@
#include <utility>
#include "base/component_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "ui/events/event_constants.h"
@@ -129,6 +130,8 @@ class COMPONENT_EXPORT(UI_BASE) Accelerator {
return interrupted_by_mouse_event_;
}
+ absl::optional<char16_t> shifted_char;
+
private:
std::u16string ApplyLongFormModifiers(const std::u16string& shortcut) const;
std::u16string ApplyShortFormModifiers(const std::u16string& shortcut) const;

View File

@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
context, which can cause some preload scripts to trip.
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index 107c22e38babc4860d53d4fb539f322e6dec1df0..366382caddffc3beb363fe96eab63ea7474f81d1 100644
index e24c169444c699f295de2c1f1f42683eeca73436..4675cdccb1876a318a9a0253cdf552bb65516310 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -127,6 +127,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -23,10 +23,10 @@ index 107c22e38babc4860d53d4fb539f322e6dec1df0..366382caddffc3beb363fe96eab63ea7
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index e0c8e8c19450b067757a8e8289f46f32b7d443eb..0f13101c719e6f43cfc5d281d0f6f345d475744d 100644
index 9ae95b8118e37e22d6faddf62cd06b182d2033db..388dbbfc8b9e1b191c03792f41d5de75edb3b867 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4135,6 +4135,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4381,6 +4381,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,10 +40,10 @@ index e0c8e8c19450b067757a8e8289f46f32b7d443eb..0f13101c719e6f43cfc5d281d0f6f345
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 77aaa3c08c1268c246f698a02df3e8a1aa4ef294..ffc6a5d1cd16ee2aecee027e9a321f1e435f5410 100644
index 3249400765135a0693ef9ba81045152c00bb0820..5abb2bed3e403a11016899cbb7701a80a9bb6399 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -576,6 +576,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -583,6 +583,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 77aaa3c08c1268c246f698a02df3e8a1aa4ef294..ffc6a5d1cd16ee2aecee027e9a321f1e
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 4b3b9b1c4034656fdf5f9862d3fffa66f51e72fe..55e69bb644e2c47ac15fe8b2e255d660b8a51b4f 100644
index 346027ed008208978d187e025b90e7cc667698d6..c2aa23af0cae2b0a7322cd8809b9015fd953938a 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -577,6 +577,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -578,6 +578,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
@@ -79,10 +79,10 @@ index 83b81f4c1fd4232ee5c2b7b1b7b85424164f3acc..bdd4a0031af6f9c2b701979dd469867c
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 d8ac4cd5b0847b03ed30663dea24654c6e29d2f0..8c46855d4a5f888425ea4b6d4f69c74ac649933e 100644
index cc3f43d1d06bd41193d5035d9e4a46342ff6a548..f44020c144b17626d833cf3a6d8ceb25602fd767 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -291,6 +291,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -293,6 +293,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) = 0;
@@ -92,10 +92,10 @@ index d8ac4cd5b0847b03ed30663dea24654c6e29d2f0..8c46855d4a5f888425ea4b6d4f69c74a
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 3538350785762dc742f862ff0e9ba8f43c92199a..0c980c66d861af11760faf1f1f78070d9f487367 100644
index 0748a5f4f636792c05e436bd7186b35ca7b023a5..2df7e6cf8b474f0a86763e521c4058ec868b4683 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
@@ -272,6 +272,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -273,6 +273,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
web_frame_->Client()->DidCreateScriptContext(context, world_id);
}
@@ -110,7 +110,7 @@ index 3538350785762dc742f862ff0e9ba8f43c92199a..0c980c66d861af11760faf1f1f78070d
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 aab6643b89899a2b7f5bd74d4501bbf74562a663..8a3dddf797106e3d5da6a75d458ddea97cdf5edc 100644
index 0391fc4cd19f44b54896fb80dfc0d95816fcf878..b2242b4f084ffd3934a5f1fc23c0412cf69b99c7 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
@@ -77,6 +77,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -123,10 +123,10 @@ index aab6643b89899a2b7f5bd74d4501bbf74562a663..8a3dddf797106e3d5da6a75d458ddea9
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 f4e37cb5be1a84b9610d2d33f126e040d5ff4822..8cc53215effecb53ee383c33469a27f1e267daf6 100644
index ac2ed9b3bb99ceec9cc72477e38bc0fbd7f7f4f9..1401e63a14cab972b4ccc7a25098536aca74d7f2 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -349,6 +349,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
@@ -350,6 +350,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) override {}

View File

@@ -10,10 +10,10 @@ 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 30d6d6f54e453c5b9690bc028005d4169f7d71c4..76228c72b87368d5372ed812693b81e7d4d370d0 100644
index 090ca9c6e8785c6e9f1b9245771645ea19805795..fdf587055a71103c21f27fd79e5714baa24ea5c4 100644
--- a/content/browser/browser_main_loop.h
+++ b/content/browser/browser_main_loop.h
@@ -164,6 +164,10 @@ class CONTENT_EXPORT BrowserMainLoop {
@@ -161,6 +161,10 @@ class CONTENT_EXPORT BrowserMainLoop {
int GetResultCode() const { return result_code_; }

View File

@@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index e38a3a04c260d66b0f116d101c197824e3aaae93..bb3c79f407ab638fcd3180f6b16af98ec6ece5f8 100644
index 7edf048346a2f99ea1aba461861d7775372b4563..2b7eed39bf4a1dbf1b0dec8fd58f9269f791e5df 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -611,6 +611,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -617,6 +617,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@@ -22,7 +22,7 @@ index e38a3a04c260d66b0f116d101c197824e3aaae93..bb3c79f407ab638fcd3180f6b16af98e
return is_active();
}
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index 8926801ad5fdc5a560cb8a1eb40675eb5416f5cc..691abfe3802c207f402aef54eae481aaedafc364 100644
index e319cbff63898fe49076844ca3e7a5e8bb8bd164..83439b2b05b79ca02f02767217bb915ba3e51d37 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -135,6 +135,7 @@ class CONTENT_EXPORT RenderViewHostImpl
@@ -34,7 +34,7 @@ index 8926801ad5fdc5a560cb8a1eb40675eb5416f5cc..691abfe3802c207f402aef54eae481aa
void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences);
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
index 9f1acca2bdb697b79a01362a9a5d8dd098eca925..c57c03b838a773d41614002afee27520f4488c6f 100644
index 740d1c322b740d374dd0287d99daebc1fe39ceda..f6ed1402120c0d8b30356c87a52d88fe39ed08d9 100644
--- a/content/public/browser/render_view_host.h
+++ b/content/public/browser/render_view_host.h
@@ -90,6 +90,9 @@ class CONTENT_EXPORT RenderViewHost {
@@ -48,35 +48,35 @@ index 9f1acca2bdb697b79a01362a9a5d8dd098eca925..c57c03b838a773d41614002afee27520
// This interface should only be implemented inside content.
friend class RenderViewHostImpl;
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index dfaf88a323e6b1e63cc2b7abd1d7a1dcc26b1b8c..9cbc5fcf90d54173c84b5e91c620d175166ed9b3 100644
index a4e38fd9825fdb2c16f728d8012bb2392cb31dfe..2239f82411d0ba73b95020e18d3838507521dd1c 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -183,6 +183,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
@@ -154,6 +154,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
static WindowOpenDisposition NavigationPolicyToDisposition(
blink::WebNavigationPolicy policy);
+ void OnSetSchedulerThrottling(bool allowed);
+
// Misc private functions ----------------------------------------------------
// In OOPIF-enabled modes, this tells each RenderFrame with a pending state
// ---------------------------------------------------------------------------
// ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put
// it in the same order in the .cc file as it was in the header.
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
index e122d4ffb857023841dabcb6fed352d7586d8344..3c7cd1cb8b204024a0835150302ee8896e01ee45 100644
index a428fe70d2ca5f21a529e881e41d87f4ba46ed32..8af5470ee168ae49ef3764c28c39e08b3fdbd1a7 100644
--- a/third_party/blink/public/mojom/page/page.mojom
+++ b/third_party/blink/public/mojom/page/page.mojom
@@ -73,4 +73,7 @@ interface PageBroadcast {
@@ -77,4 +77,7 @@ interface PageBroadcast {
// Set history offset and length.
SetHistoryOffsetAndLength(int32 offset, int32 length);
// Sent to whole page, but should only be used by the main frame.
SetPageBaseBackgroundColor(skia.mojom.SkColor? color);
+
+ // Whether to enable the Renderer scheduler background throttling.
+ SetSchedulerThrottling(bool allowed);
};
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
index 26aafb1350fe3e5df35800d858794b60aa309f21..e686722564b5d85ee77acc09ccba93d8605b1a0a 100644
index 04906f28c8e03f1692690713b2ca5c9e3b188236..c4e453bb2dfa1857e73ac4dcc1e202e7a378acf6 100644
--- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h
@@ -357,6 +357,7 @@ class WebView {
@@ -363,6 +363,7 @@ class WebView {
// Scheduling -----------------------------------------------------------
virtual PageScheduler* Scheduler() const = 0;
@@ -85,10 +85,10 @@ index 26aafb1350fe3e5df35800d858794b60aa309f21..e686722564b5d85ee77acc09ccba93d8
// Visibility -----------------------------------------------------------
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index e5d12060da4fd6366313a28f4a99ac52ce119803..ff5dda58a3db3efeea952f0ae75cf85575e1a12c 100644
index c91848389bebee7e25e8243f1490e1fff6db638a..d0f12dd329ac67e635ce39601b9939ffceddc0c0 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3559,6 +3559,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3577,6 +3577,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@@ -102,7 +102,7 @@ index e5d12060da4fd6366313a28f4a99ac52ce119803..ff5dda58a3db3efeea952f0ae75cf855
void WebViewImpl::SetVisibilityState(
mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) {
@@ -3570,7 +3577,8 @@ void WebViewImpl::SetVisibilityState(
@@ -3588,7 +3595,8 @@ void WebViewImpl::SetVisibilityState(
}
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
GetPage()->GetPageScheduler()->SetPageVisible(
@@ -113,10 +113,10 @@ index e5d12060da4fd6366313a28f4a99ac52ce119803..ff5dda58a3db3efeea952f0ae75cf855
mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() {
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
index e536aeacc79dcc5cf45674fbc4d288a8265a7548..c06214e3c714c96acd104208c7495397e924bc12 100644
index 07afcf4eb67fb5cb51f94ba0055f101481014f8f..f3e9a9fd15ffe4072c8d30a563329efd23c39aa6 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -403,6 +403,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -412,6 +412,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override;
@@ -124,7 +124,7 @@ index e536aeacc79dcc5cf45674fbc4d288a8265a7548..c06214e3c714c96acd104208c7495397
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -828,6 +829,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -838,6 +839,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// If true, we send IPC messages when |preferred_size_| changes.
bool send_preferred_size_changes_ = false;

View File

@@ -8,15 +8,14 @@ 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 8a1315f7f89588bb21c6d3c21a7de7c07fed9679..2ad5dc0b70a2b0bf298866dd2b9515112d3583f0 100644
index 8a1315f7f89588bb21c6d3c21a7de7c07fed9679..51cc790f7e1ba1440a6ffaa56c9e01687fc35c06 100644
--- a/third_party/blink/common/web_preferences/web_preferences.cc
+++ b/third_party/blink/common/web_preferences/web_preferences.cc
@@ -148,6 +148,23 @@ WebPreferences::WebPreferences()
@@ -148,6 +148,22 @@ WebPreferences::WebPreferences()
fake_no_alloc_direct_call_for_testing_enabled(false),
v8_cache_options(blink::mojom::V8CacheOptions::kDefault),
record_whole_document(false),
+ // Begin Electron-specific WebPreferences.
+ background_color(base::EmptyString()),
+ opener_id(0),
+ context_isolation(false),
+ guest_instance_id(0),
@@ -36,22 +35,21 @@ index 8a1315f7f89588bb21c6d3c21a7de7c07fed9679..2ad5dc0b70a2b0bf298866dd2b951511
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 ab2d320a4073308c249821a060e870afc0dbc3a5..1799d27380c112d98e55e63b9dd842c78014c62a 100644
index c6b92861449ffd929b03971fb62efc18305eb1fe..ce78fe29ab799944c2c3d7b41a0c44b970b11d05 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,
@@ -23,6 +23,10 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
!data.ReadCursiveFontFamilyMap(&out->cursive_font_family_map) ||
!data.ReadFantasyFontFamilyMap(&out->fantasy_font_family_map) ||
!data.ReadPictographFontFamilyMap(&out->pictograph_font_family_map) ||
+ // Begin Electron-specific WebPreferences.
+ !data.ReadPreloads(&out->preloads) ||
+ !data.ReadBackgroundColor(&out->background_color) ||
+ !data.ReadPreload(&out->preload) ||
+ // End Electron-specific WebPreferences.
!data.ReadLazyFrameLoadingDistanceThresholdsPx(
&out->lazy_frame_loading_distance_thresholds_px) ||
!data.ReadLazyImageLoadingDistanceThresholdsPx(
@@ -154,6 +159,21 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -155,6 +159,21 @@ 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();
@@ -74,7 +72,7 @@ index ab2d320a4073308c249821a060e870afc0dbc3a5..1799d27380c112d98e55e63b9dd842c7
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 84736bea7ac7b6fcc85782ba9faecb23a0d6574c..99b0d5866781e26022fb3fd8ef684562582d8204 100644
index 4517bf43c1b80f1aa0f3ba8e67e78b8b91e19f8a..492f6c948af74bb925826a1075e6343f147f0eb2 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
@@ -10,6 +10,7 @@
@@ -85,13 +83,12 @@ index 84736bea7ac7b6fcc85782ba9faecb23a0d6574c..99b0d5866781e26022fb3fd8ef684562
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h"
@@ -160,6 +161,25 @@ struct BLINK_COMMON_EXPORT WebPreferences {
@@ -162,6 +163,24 @@ struct BLINK_COMMON_EXPORT WebPreferences {
blink::mojom::V8CacheOptions v8_cache_options;
bool record_whole_document;
+ // Begin Electron-specific WebPreferences.
+ std::vector<base::FilePath> preloads;
+ std::string background_color;
+ int opener_id;
+ bool context_isolation;
+ int guest_instance_id;
@@ -112,7 +109,7 @@ index 84736bea7ac7b6fcc85782ba9faecb23a0d6574c..99b0d5866781e26022fb3fd8ef684562
// 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 90a2bb1a13afd749b540545fff22ba2134917b5d..5ca57b9b52de2b398ed19ae0e2ce5bf3a2387469 100644
index 0313bac28edf43e84c6e914f85af75fb541bb7ea..6eedfe15cc02b3c1ee531a94d77f8d4e04feb11f 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 @@
@@ -123,7 +120,7 @@ index 90a2bb1a13afd749b540545fff22ba2134917b5d..5ca57b9b52de2b398ed19ae0e2ce5bf3
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
@@ -446,6 +447,72 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
@@ -446,6 +447,68 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
return r.record_whole_document;
}
@@ -132,10 +129,6 @@ index 90a2bb1a13afd749b540545fff22ba2134917b5d..5ca57b9b52de2b398ed19ae0e2ce5bf3
+ return r.preloads;
+ }
+
+ static const std::string& background_color(const blink::web_pref::WebPreferences& r) {
+ return r.background_color;
+ }
+
+ static int opener_id(const blink::web_pref::WebPreferences& r) {
+ return r.opener_id;
+ }
@@ -197,24 +190,23 @@ index 90a2bb1a13afd749b540545fff22ba2134917b5d..5ca57b9b52de2b398ed19ae0e2ce5bf3
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 db9994ca72f244d6e626d8793ec0cc181a582ea4..234a3aabfa4e0aa3fb32bd18b33fce3d03ac57af 100644
index 121ea7b186d6cadc0d3a9ebbca64ca9a1563e8f2..a0c29218cf5196a248dc93e76d5a50a242fb0a9c 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";
import "third_party/blink/public/mojom/v8_cache_options.mojom";
@@ -10,6 +10,7 @@ import "third_party/blink/public/mojom/v8_cache_options.mojom";
import "url/mojom/url.mojom";
import "url/mojom/origin.mojom";
import "mojo/public/mojom/base/string16.mojom";
+import "mojo/public/mojom/base/file_path.mojom";
enum PointerType {
kPointerNone = 1, // 1 << 0
@@ -212,6 +213,25 @@ struct WebPreferences {
@@ -213,6 +214,24 @@ struct WebPreferences {
V8CacheOptions v8_cache_options;
bool record_whole_document;
+ // Begin Electron-specific WebPreferences.
+ array<mojo_base.mojom.FilePath> preloads;
+ string background_color;
+ int32 opener_id;
+ bool context_isolation;
+ int32 guest_instance_id;

View File

@@ -6,7 +6,7 @@ Subject: Allow setting secondary label via SimpleMenuModel
Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976
diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
index 976a45c49c810b228e7576926979001593de8dcb..2975dcd4a946edd7100789a1c3d8e3637d2bd86c 100644
index e7504cd790821ffa213961b51c0c9ab7763ddd82..bd96c37404e930a59d5c91c921b324a10aae38d3 100644
--- a/ui/base/models/simple_menu_model.cc
+++ b/ui/base/models/simple_menu_model.cc
@@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
@@ -21,7 +21,7 @@ index 976a45c49c810b228e7576926979001593de8dcb..2975dcd4a946edd7100789a1c3d8e363
ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
int command_id) const {
return ImageModel();
@@ -295,6 +300,11 @@ void SimpleMenuModel::SetLabel(int index, const std::u16string& label) {
@@ -304,6 +309,11 @@ void SimpleMenuModel::SetLabel(int index, const std::u16string& label) {
MenuItemsChanged();
}
@@ -33,7 +33,7 @@ index 976a45c49c810b228e7576926979001593de8dcb..2975dcd4a946edd7100789a1c3d8e363
void SimpleMenuModel::SetMinorText(int index,
const std::u16string& minor_text) {
items_[ValidateItemIndex(index)].minor_text = minor_text;
@@ -382,6 +392,12 @@ std::u16string SimpleMenuModel::GetLabelAt(int index) const {
@@ -391,6 +401,12 @@ std::u16string SimpleMenuModel::GetLabelAt(int index) const {
return items_[ValidateItemIndex(index)].label;
}
@@ -47,7 +47,7 @@ index 976a45c49c810b228e7576926979001593de8dcb..2975dcd4a946edd7100789a1c3d8e363
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 6127fb6a161598a58d08fb68f171fd02b9cbb6a7..5297195cb7128106a376818ade66daf0a5f6b868 100644
index 4536b388717844cc74905760828e80ea6d64b7b1..2f9b507b623307e37eb1eb216e96363881404b25 100644
--- a/ui/base/models/simple_menu_model.h
+++ b/ui/base/models/simple_menu_model.h
@@ -50,6 +50,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -58,7 +58,7 @@ index 6127fb6a161598a58d08fb68f171fd02b9cbb6a7..5297195cb7128106a376818ade66daf0
// Gets the icon for the item with the specified id.
virtual ImageModel GetIconForCommandId(int command_id) const;
@@ -153,6 +154,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -157,6 +158,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
// Sets the label for the item at |index|.
void SetLabel(int index, const std::u16string& label);
@@ -68,7 +68,7 @@ index 6127fb6a161598a58d08fb68f171fd02b9cbb6a7..5297195cb7128106a376818ade66daf0
// Sets the minor text for the item at |index|.
void SetMinorText(int index, const std::u16string& minor_text);
@@ -188,6 +192,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -192,6 +196,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
int GetCommandIdAt(int index) const override;
std::u16string GetLabelAt(int index) const override;
@@ -76,7 +76,7 @@ index 6127fb6a161598a58d08fb68f171fd02b9cbb6a7..5297195cb7128106a376818ade66daf0
std::u16string GetMinorTextAt(int index) const override;
ImageModel GetMinorIconAt(int index) const override;
bool IsItemDynamicAt(int index) const override;
@@ -226,6 +231,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -230,6 +235,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
int command_id = 0;
ItemType type = TYPE_COMMAND;
std::u16string label;

View File

@@ -7,10 +7,10 @@ This is used by editors to obtain the filesystem path from a dragged file. See
documentation at https://electronjs.org/docs/api/file-object
diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
index 7c21e6bc889c5bead5aa25a3a7582918d2f6d953..fe255a5d6afca61852adead82beaac275ebe9c54 100644
index d70a95cc9b28674dd4ac925e9f1aca481e60c34b..fa9d21a20e77867a7d596e0df4ec143edb871f27 100644
--- a/third_party/blink/renderer/core/fileapi/file.h
+++ b/third_party/blink/renderer/core/fileapi/file.h
@@ -200,6 +200,9 @@ class CORE_EXPORT File final : public Blob {
@@ -191,6 +191,9 @@ class CORE_EXPORT File final : public Blob {
}
const String& name() const { return name_; }

View File

@@ -15,7 +15,7 @@ Refs changes in:
This patch reverts the changes to fix associated crashes in Electron.
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
index a190fd8233e295555d4b5e93cb3a8edd59d7df59..37f199f6e6471d97105ffad9dd7d4450cb02331f 100644
index 8bf6b4bc077cc41da5e0e6b13302bc343537c68f..01bddc0bcb7476408023c4cfc042a0883c16430c 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -120,14 +120,6 @@ bool Frame::Detach(FrameDetachType type) {
@@ -49,10 +49,10 @@ index a190fd8233e295555d4b5e93cb3a8edd59d7df59..37f199f6e6471d97105ffad9dd7d4450
// 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 fab2d2cbc446cc283939830f5e8fe9bb5b500b73..7530888913597ac9afd32d634d461c74f1da69ed 100644
index fd9c44f62701c3b4c70e46ab86992c34777a8579..975d90d7ce9ef5a39ac8e7407982495adf5ead32 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -785,10 +785,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -808,10 +808,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index fab2d2cbc446cc283939830f5e8fe9bb5b500b73..7530888913597ac9afd32d634d461c74
if (!Client())
return false;
@@ -834,6 +830,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -858,6 +854,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

View File

@@ -1,52 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Anonymous <anonymous@electronjs.org>
Date: Thu, 20 Sep 2018 17:45:11 -0700
Subject: blink_world_context.patch
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 fd6ce9a3df30bc11387db8ee63293f202a8d00aa..014a71c2b81cb6ab3a6a295d8ee6f403f75770fd 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -369,6 +369,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;
+ virtual v8::Local<v8::Context> WorldScriptContext(
+ v8::Isolate* isolate, int world_id) const = 0;
// 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 35290011b1c32b8695e08ec80398e4df2cf611dc..1ae8fc18f467c50f2a7e0de9e24d708514c5cc86 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
@@ -1078,6 +1078,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
return MainWorldScriptContext()->Global();
}
+v8::Local<v8::Context> WebLocalFrameImpl::WorldScriptContext(
+ v8::Isolate* isolate, int world_id) const {
+ scoped_refptr<DOMWrapperWorld> world = DOMWrapperWorld::EnsureIsolatedWorld(
+ isolate, world_id);
+ return ToScriptState(GetFrame(), *world)->GetContext();
+}
+
bool WebFrame::ScriptCanAccess(WebFrame* target) {
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 415bd0ead0d6be7e73dbdfc2066612b7abee99b4..7e6512649709e68b9ea9cd829f6b7ffadf8a59dd 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
@@ -170,6 +170,8 @@ class CORE_EXPORT WebLocalFrameImpl final
v8::Local<v8::Context> MainWorldScriptContext() const override;
int32_t GetScriptContextWorldId(
v8::Local<v8::Context> script_context) const override;
+ v8::Local<v8::Context> WorldScriptContext(
+ v8::Isolate* isolate, int world_id) const override;
void RequestExecuteScriptAndReturnValue(const WebScriptSource&,
bool user_gesture,
WebScriptExecutionCallback*) override;

View File

@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index 563674ae9631732979d973f5233a3b707312d638..779b76fe62c520f1681a82343a21aa4d734b3a55 100644
index a9616406d4d3742c90aa0d1cf65ab84cfb8890ed..32142ed13cfca009e09578dff79e94030233cfbf 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -77,6 +77,7 @@

View File

@@ -0,0 +1,90 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@slack-corp.com>
Date: Thu, 27 May 2021 17:21:07 -0700
Subject: build: do not depend on packed_resource_integrity
This ensures we do not depend on a target that does not exist when
building Electron, electron generates its own .pak files via
electron_repack and therefore this integrity target which is generated
by the chrome_paks target does not exist. This can not be upstreamed,
if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index a1aa8466ead6e428544ff00d7fcf3f92a3daf080..b7afa3200133220fecea3a410d90222082d1b961 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -172,11 +172,16 @@ if (!is_android && !is_mac) {
"common/crash_keys.h",
]
+ if (!is_electron_build) {
+ deps += [
+ ":packed_resources_integrity",
+ ]
+ }
+
deps += [
":chrome_dll",
":chrome_exe_version",
":copy_first_run",
- ":packed_resources_integrity",
":visual_elements_resources",
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 57fa8d4642c61997081cc5c7336e253f019a1390..1d774971cc1557303b9ebfa9c6226bfdbccdf679 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4290,7 +4290,7 @@ static_library("browser") {
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll.
- if (!is_win) {
+ if (!is_win && !is_electron_build) {
deps += [ "//chrome:packed_resources_integrity" ]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index f51ad2e7b6df421c902c61b5c0f0d3c4ca541cb1..a4c47f966324d75c7b4a9def367b354cf23dfa80 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -5214,7 +5214,6 @@ test("unit_tests") {
assert(toolkit_views)
sources += [ "../browser/ui/startup/credential_provider_signin_info_fetcher_win_unittest.cc" ]
deps += [
- "//chrome:packed_resources_integrity",
"//chrome/browser:chrome_process_finder",
"//chrome/browser/safe_browsing/chrome_cleaner",
"//chrome/browser/safe_browsing/chrome_cleaner:public",
@@ -5227,6 +5226,12 @@ test("unit_tests") {
"//components/chrome_cleaner/public/proto",
"//ui/events/devices:test_support",
]
+
+ if (!is_electron_build) {
+ deps += [
+ "//chrome:packed_resources_integrity",
+ ]
+ }
}
if (is_win || is_chromeos_ash || is_mac) {
@@ -5785,7 +5790,6 @@ test("unit_tests") {
}
deps += [
- "//chrome:packed_resources_integrity_hash",
"//chrome/browser:cart_db_content_proto",
"//chrome/browser/media/router:test_support",
"//chrome/browser/promo_browser_command:mojo_bindings",
@@ -5820,6 +5824,9 @@ test("unit_tests") {
"//ui/color:test_support",
"//ui/native_theme:test_support",
]
+ if (!is_electron_build) {
+ deps += [ "//chrome:packed_resources_integrity_hash" ]
+ }
if (is_win) {
deps += [ "//components/chrome_cleaner/public/proto:test_only_proto" ]
}

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 0ef73ab2b2e124466c4ff22fe662273ade82603b..f2451ca5f2ce1f22b84fe81637314daeb3dc64d8 100644
index 725894d05274355be4ad5d6ac3388a489220a50c..e568780d699a9ac977e509165b2e9b0516cde779 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,9 @@ if (current_os == "") {
@@ -27,7 +27,7 @@ index 0ef73ab2b2e124466c4ff22fe662273ade82603b..f2451ca5f2ce1f22b84fe81637314dae
# 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
@@ -336,6 +339,7 @@ default_compiler_configs = [
@@ -337,6 +340,7 @@ default_compiler_configs = [
"//build/config/compiler/pgo:default_pgo_flags",
"//build/config/coverage:default_coverage",
"//build/config/sanitizers:default_sanitizer_flags",

View File

@@ -7,10 +7,10 @@ Build libc++ as static library to compile and pass
nan tests
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
index 65f6e8585ad374ad59e7670babfedd2fbdfbaa43..7928a03447347f441e1e7dfc43f7a8e475eb120b 100644
index 01d122aa78f15e0c94b1ee8ae54e08dace0aca0d..5ed9952afd4f4331c98ad41b7d79936794056ce8 100644
--- a/buildtools/third_party/libc++/BUILD.gn
+++ b/buildtools/third_party/libc++/BUILD.gn
@@ -32,7 +32,11 @@ config("winver") {
@@ -41,7 +41,11 @@ config("winver") {
if (libcxx_is_shared) {
_libcxx_target_type = "shared_library"
} else {
@@ -23,7 +23,7 @@ index 65f6e8585ad374ad59e7670babfedd2fbdfbaa43..7928a03447347f441e1e7dfc43f7a8e4
}
target(_libcxx_target_type, "libc++") {
# Most things that need to depend on libc++ should do so via the implicit
@@ -40,6 +44,7 @@ target(_libcxx_target_type, "libc++") {
@@ -49,6 +53,7 @@ target(_libcxx_target_type, "libc++") {
# need to explicitly depend on libc++.
visibility = [
"//build/config:common_deps",

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 9708cea34a2a15bf0ad10d0acbd23870abcc0bf7..05b5abd7b4b9aca999ed428ed50fcf2d6983b767 100644
index 70bf5fae269d934b9658502c1efca4c364f199de..5c16a9ee9bbf461c24456613ff709f4f608e3441 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -5720,6 +5720,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -6082,6 +6082,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 9708cea34a2a15bf0ad10d0acbd23870abcc0bf7..05b5abd7b4b9aca999ed428ed50fcf2d
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index ec8c6d3956485103b7add39d111ba372126ce21f..04e320e1b0150dbf7edd42be88c3ab6ceaecf46f 100644
index 16f12ae09c0ad4ca720452a9afa6279645c2384e..0bd0bffa7f2166823148143c590283a03d8ef65b 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3658,6 +3658,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3770,6 +3770,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
}
auto* new_contents_impl = new_contents.get();
@@ -39,7 +39,7 @@ index ec8c6d3956485103b7add39d111ba372126ce21f..04e320e1b0150dbf7edd42be88c3ab6c
new_contents_impl->GetController().SetSessionStorageNamespace(
partition_id, session_storage_namespace);
@@ -3700,12 +3708,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3812,12 +3820,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@@ -53,10 +53,10 @@ index ec8c6d3956485103b7add39d111ba372126ce21f..04e320e1b0150dbf7edd42be88c3ab6c
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 5f6980ca1865dfb58830de7012d7c3f499457e3d..04bfe5f3cc0fdaf5065d64f1a0a9ec6b2595e5f8 100644
index a61f273506fecd8574ffd0bb04d507adef7859c8..3a4a6efca3a66b12409da15e4f360fb8e3a40e2c 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -455,6 +455,10 @@ struct CreateNewWindowParams {
@@ -519,6 +519,10 @@ struct CreateNewWindowParams {
// The impression associated with the navigation in the new window, if
// one is specified.
Impression? impression;
@@ -68,10 +68,10 @@ index 5f6980ca1865dfb58830de7012d7c3f499457e3d..04bfe5f3cc0fdaf5065d64f1a0a9ec6b
// 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 1b1761121436278e1d113da19f58dd832117ef69..92675cb2cf49b7fb750612ac6edc4ee39c349f9b 100644
index 0703cbb93d207e8d6529cc6005e5e66091ba03f0..dd18f6b137ae5c724400d4229a2867474824dc56 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -561,6 +561,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -562,6 +562,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -81,10 +81,10 @@ index 1b1761121436278e1d113da19f58dd832117ef69..92675cb2cf49b7fb750612ac6edc4ee3
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 0b1a60bf8cdc0452d9f818d799e8ece5400698bd..c24c05c17e5511d247fb93a4f987dd852742b5a4 100644
index 6000d0326898e33cdf4b311c88e5400d8be71ed2..7430e483567b227630bc42933820e2d4e5559ed7 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -158,6 +158,7 @@ class NetworkService;
@@ -160,6 +160,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@@ -92,7 +92,7 @@ index 0b1a60bf8cdc0452d9f818d799e8ece5400698bd..c24c05c17e5511d247fb93a4f987dd85
} // namespace network
namespace sandbox {
@@ -928,6 +929,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,10 +102,10 @@ index 0b1a60bf8cdc0452d9f818d799e8ece5400698bd..c24c05c17e5511d247fb93a4f987dd85
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 bf70b55e6b643686c6b57fbd4a51ad4f6927fa56..1d7b049404282bddb26ea04ab26a0fa726d5a958 100644
index 9d906c4d2bab5ab152054e6745da850246f340d9..3c059e6e709759fe3f7aba342f9a0f4b36f329ff 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -27,6 +27,17 @@ namespace content {
@@ -28,6 +28,17 @@ namespace content {
WebContentsDelegate::WebContentsDelegate() = default;
@@ -124,7 +124,7 @@ index bf70b55e6b643686c6b57fbd4a51ad4f6927fa56..1d7b049404282bddb26ea04ab26a0fa7
const OpenURLParams& params) {
return nullptr;
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index b1cfa654259d431adfada00a00f9bfc8ae5ab292..484d36de2ac0ef3b1d19bbd0d6c79db84e53b7fb 100644
index 0574d390dc94aa1d17dfa9db805f846024b7956f..a2a3550272da12eee911a7ef0d9a21dd85dd23be 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -16,6 +16,7 @@
@@ -135,7 +135,7 @@ index b1cfa654259d431adfada00a00f9bfc8ae5ab292..484d36de2ac0ef3b1d19bbd0d6c79db8
#include "content/public/browser/eye_dropper.h"
#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/media_stream_request.h"
@@ -340,6 +341,13 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -338,6 +339,13 @@ class CONTENT_EXPORT WebContentsDelegate {
const StoragePartitionId& partition_id,
SessionStorageNamespace* session_storage_namespace);
@@ -150,10 +150,10 @@ index b1cfa654259d431adfada00a00f9bfc8ae5ab292..484d36de2ac0ef3b1d19bbd0d6c79db8
// 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 9ee8f76a0de7fa8ab568363b97c9dc22eb698e15..71d98e472641d6ebbc8857365ee1ee36c6ee1ff9 100644
index 2f697c7819d8ec0acd04c3c2949c084eb830b341..12e85524a462a1846674e7f01eb8b6d6b3efdc8c 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -27,6 +27,7 @@
@@ -26,6 +26,7 @@
#include "third_party/blink/public/platform/impression_conversions.h"
#include "third_party/blink/public/platform/modules/video_capture/web_video_capture_impl_manager.h"
#include "third_party/blink/public/platform/url_conversion.h"
@@ -161,7 +161,7 @@ index 9ee8f76a0de7fa8ab568363b97c9dc22eb698e15..71d98e472641d6ebbc8857365ee1ee36
#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"
@@ -312,6 +313,10 @@ WebView* RenderViewImpl::CreateView(
@@ -284,6 +285,10 @@ WebView* RenderViewImpl::CreateView(
params->impression = blink::ConvertWebImpressionToImpression(*impression);
}
@@ -173,10 +173,10 @@ index 9ee8f76a0de7fa8ab568363b97c9dc22eb698e15..71d98e472641d6ebbc8857365ee1ee36
// 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 5e9b1a409f5fb0dd683cc67318bae9c542816451..e2a3780b6ea5e15839b89ff92c85e57e7c48b017 100644
index d21606dd0a194a645decdc81a0c1390e0492ded0..c015934debd27937d583269950c2e2d5dc82cd53 100644
--- a/content/web_test/browser/web_test_content_browser_client.cc
+++ b/content/web_test/browser/web_test_content_browser_client.cc
@@ -450,6 +450,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -451,6 +451,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -220,7 +220,7 @@ index 84d32491a56528a84b4395fba1d54cdbb38d522b..09998a83c449ef8cd9f360fbcdcf7edc
} // 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 06983193aa144c526b606c6b1291b2271a4570b3..cf2bc64ee509727570cc55a08dcdb39d3f18cce9 100644
index 9797f3dfa05ada91cb83a6d271df19a5fbb1ab93..fc7278a77d78096b7eb804fae9210d9dea8bbf17 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -1989,6 +1989,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,

View File

@@ -1,34 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Tue, 11 May 2021 21:35:39 -0400
Subject: chore: allow overriding of enable_pak_file_integrity_checks
enable_pak_file_integrity_checks is not currently overridable
but Electron does not need to run this.
diff --git a/chrome/browser/buildflags.gni b/chrome/browser/buildflags.gni
index 8c19e707371c7ad4fbcd46d58b147de3bfc89790..17c82c078a2beb8146c39290aa37703c7a3b07f2 100644
--- a/chrome/browser/buildflags.gni
+++ b/chrome/browser/buildflags.gni
@@ -21,11 +21,13 @@ declare_args() {
# app_session_service and some not.
enable_app_session_service =
!(is_chromeos_lacros || is_chromecast || is_android)
-}
-# If true, the resource .pak files will be hashed and the digest will be
-# embedded in the binary and checked at run-time. This is incompatible with
-# enable_resource_allowlist_generation on Windows because it creates a circular
-# dependency with chrome_dll.
-enable_pak_file_integrity_checks =
- !(enable_resource_allowlist_generation && is_win) && !is_android
+
+ # If true, the resource .pak files will be hashed and the digest will be
+ # embedded in the binary and checked at run-time. This is incompatible with
+ # enable_resource_allowlist_generation on Windows because it creates a circular
+ # dependency with chrome_dll.
+ enable_pak_file_integrity_checks =
+ !(enable_resource_allowlist_generation && is_win) && !is_android
+
+}
\ No newline at end of file

View File

@@ -9,10 +9,10 @@ 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 72248101cdaee12ff71d0d6cd9b83ea50db2c829..2b242fa4f7cb0562c31a48ba5aad49f534fbd71c 100644
index bcc26d522043fe2f6ce0ffa68e4974340b4568da..a4b0c75ac58fc0df97f486f568ceba2f0c0c6425 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -464,7 +464,7 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context,
@@ -448,7 +448,7 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context,
return {true, std::move(stringified_source)};
}

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 d072e66a2ad8a05c9678c98aa5dbeecd4a925465..3874397a4f3096cc965fc8ce4ee955c763ab3ada 100644
index da0ad734988065816dc32198d2aaac0062786813..ab83950ac2a90b773635fdfb6016623c0b40c9f9 100644
--- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
+++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
@@ -124,8 +124,7 @@ class DriveWebContentsManager : public content::WebContentsObserver,
@@ -48,7 +48,7 @@ index d072e66a2ad8a05c9678c98aa5dbeecd4a925465..3874397a4f3096cc965fc8ce4ee955c7
content::WebContents* CreateCustomWebContents(
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
@@ -235,15 +234,14 @@ bool DriveWebContentsManager::IsWebContentsCreationOverridden(
@@ -239,15 +238,14 @@ bool DriveWebContentsManager::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -67,10 +67,10 @@ index d072e66a2ad8a05c9678c98aa5dbeecd4a925465..3874397a4f3096cc965fc8ce4ee955c7
return extension && extension->id() == app_id_;
}
diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc
index 4499d9df3723b1c721aef919cbe376166985ddab..c641a8e3dc64f98aacc09567cc5fc9edcc6c9ff5 100644
index 412e6b05265a97077c3b617e12908c88719e6e73..8365a0d5923beb2ffbd837535db2abc23e32e891 100644
--- a/chrome/browser/media/offscreen_tab.cc
+++ b/chrome/browser/media/offscreen_tab.cc
@@ -283,8 +283,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
@@ -282,8 +282,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -140,10 +140,10 @@ index ef84e04d628fb5cdbaf8fbbf84af3bf23e00c522..f1ee0bee5bfd08227a29498f8410d5d3
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 7c840e8a0cbe1b8e5b7ebfba5d4dbd1488f4a530..b0854e1191b2fb124b4dfd52bd49a13f321829b3 100644
index 8a1af8eb8efd51d51e9ea4155dc55a493673a74b..563a95d6ee87d61b086d7aa822a5c547c4bbaf1e 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1793,12 +1793,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -1786,12 +1786,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -159,10 +159,10 @@ index 7c840e8a0cbe1b8e5b7ebfba5d4dbd1488f4a530..b0854e1191b2fb124b4dfd52bd49a13f
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 71ce1e28e6291dcf5a8765003b93054eca360925..11d87d0ad1f86963b52c870adcdc65c2322ececc 100644
index ab9c5fb85f83b2ffb04bf21be631d38cfacd8835..6166d92517629ce17b48845f30c2086ce26ceabf 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -796,8 +796,7 @@ class Browser : public TabStripModelObserver,
@@ -803,8 +803,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 e878f49dd6cc69f5ba0b43e666277d29ed8c0d91..3a8eb296fee0ac2dda52435b58537a98d90e4467 100644
index 9364a722de5183c077a9c50b8c8a48ffa3a0fea6..ddde17de38bc5ca904046702a28a88d7c00f18c4 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
@@ -169,14 +169,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
@@ -170,14 +170,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -222,7 +222,7 @@ index e878f49dd6cc69f5ba0b43e666277d29ed8c0d91..3a8eb296fee0ac2dda52435b58537a98
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 cf50204a6aeb099d25dc41d4180f8a1e32a63eda..642e88a4de3044173423fae5bfe2e30ef442f366 100644
index 4b832f4c3a051eefca57909958334631335e03e1..8aed42112d8fad7df813524cf700d8082ad75c47 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,24 +264,24 @@ 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 e240f8a32b1f7f69afa992861c995e668695c51f..87792fc94a84ed3336c70d431516150a91ec5928 100644
index fed37a4d228e89e658d1ddcd3dc10c419cbb487c..69ea4796e62fc492a3444a92e7dfc14a9e079ce3 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3610,8 +3610,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3718,8 +3718,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,
- opener->GetLastCommittedURL(), params.frame_name,
- params.target_url)) {
+ opener->GetLastCommittedURL(), params)) {
return static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
opener, source_site_instance, is_new_browsing_instance,
opener->GetLastCommittedURL(), params.frame_name, params.target_url,
auto* web_contents_impl =
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
opener, source_site_instance, is_new_browsing_instance,
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index 1d7b049404282bddb26ea04ab26a0fa726d5a958..ee6c311ba410a01ea90c95369abfdba1ae422388 100644
index 3c059e6e709759fe3f7aba342f9a0f4b36f329ff..c39d3cddfec0ea06c97a3c0a9c6493c398bbbea8 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
@@ -136,8 +136,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -292,10 +292,10 @@ index 1d7b049404282bddb26ea04ab26a0fa726d5a958..ee6c311ba410a01ea90c95369abfdba1
}
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 484d36de2ac0ef3b1d19bbd0d6c79db84e53b7fb..339577e0e4297904b186a2b2abae6fc9e8c4625e 100644
index a2a3550272da12eee911a7ef0d9a21dd85dd23be..6ad04f6be7b6fa89ca7f910b34eea20eea18cce5 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -319,8 +319,7 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -317,8 +317,7 @@ class CONTENT_EXPORT WebContentsDelegate {
SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -334,10 +334,10 @@ index 9b293d0df6c634bf44a69d607c4eee839a74b4a1..7e5b9cbdcc232c5e20eae0130d800f50
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 8dc27c2df589861c3176a54c02abe821419e39c7..7e5d49798cd4f55e6b3e24f5f10824f5043c2ddd 100644
index 2dc016e4be765413b4cef0f5471dcf9240f73ff5..224cd2be71670ac565d02ecb2838123154255dc6 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
@@ -380,8 +380,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
@@ -386,8 +386,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -348,7 +348,7 @@ index 8dc27c2df589861c3176a54c02abe821419e39c7..7e5d49798cd4f55e6b3e24f5f10824f5
}
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 7d27e12c4e9a7f32af8a26f672359057a643dd67..7a30ac31f79871f2a9afa0345e0e88affe7fe72f 100644
index bb90319f768ed2f3a3e530d64bf622de585ce163..d84de1d218267887f6b8624f913438ebc4aa7a79 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
@@ -158,8 +158,7 @@ class MimeHandlerViewGuest
@@ -362,10 +362,10 @@ index 7d27e12c4e9a7f32af8a26f672359057a643dd67..7a30ac31f79871f2a9afa0345e0e88af
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 ba54048e3af4e71a38afbd07ad1e5bef57aa589b..833f4425b6499c8bbcd17dfa488e8126ac28bd1c 100644
index 34a11c791c6044c6a1fcea65807a9055723c89d4..a437cfe197194c0fb7082a4811c238b1c22bfa67 100644
--- a/fuchsia/engine/browser/frame_impl.cc
+++ b/fuchsia/engine/browser/frame_impl.cc
@@ -381,8 +381,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
@@ -388,8 +388,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -376,10 +376,10 @@ index ba54048e3af4e71a38afbd07ad1e5bef57aa589b..833f4425b6499c8bbcd17dfa488e8126
// 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 5ae42572b62fa277aae17e6722f714a90dd9496e..5aa358ecdf4b1a7f3a272834fd50e7bee49accc8 100644
index a9e134ba416af9ca27c580892bd1c4599912ec82..39ddf61c9506b6bb12b3fe51e0a1cabacd3ece70 100644
--- a/fuchsia/engine/browser/frame_impl.h
+++ b/fuchsia/engine/browser/frame_impl.h
@@ -240,8 +240,7 @@ class FrameImpl : public fuchsia::web::Frame,
@@ -242,8 +242,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 5ae42572b62fa277aae17e6722f714a90dd9496e..5aa358ecdf4b1a7f3a272834fd50e7be
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 4e4b37cc0fbbcf8f630a4e928c957261e9a03603..610848b09bba4dfa7dd645ca62354930b74e3ed5 100644
index dd1f6129173a0e19023f4ec9b66c44486b080456..d10468c06f84b59387af0a8fd5bc1c06108865eb 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -198,8 +198,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
@@ -192,8 +192,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 4e4b37cc0fbbcf8f630a4e928c957261e9a03603..610848b09bba4dfa7dd645ca62354930
->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 cd3f3c8849060fec8d9612d26c6c34caeefb3995..1ed386fd54918b24ebc81d6c2524e5d1fe02a655 100644
index 606f82c4e9708c4099425603b6e8c3e6859f088b..b8a2dfb475c0ca9ae24901ca31bb92f328827bf7 100644
--- a/ui/views/controls/webview/web_dialog_view.cc
+++ b/ui/views/controls/webview/web_dialog_view.cc
@@ -429,8 +429,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
@@ -438,8 +438,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -418,10 +418,10 @@ index cd3f3c8849060fec8d9612d26c6c34caeefb3995..1ed386fd54918b24ebc81d6c2524e5d1
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 96896f5600495ff89b5209bb8cd72d7add6b404a..7df417f0509ddd993fa11bf6fb23ae68886d8008 100644
index 978155add287e3ce57ece8db0b142a7154b378b0..7bdfe79c5c77f91cdd59df65761504b1f532b2e4 100644
--- a/ui/views/controls/webview/web_dialog_view.h
+++ b/ui/views/controls/webview/web_dialog_view.h
@@ -159,8 +159,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
@@ -160,8 +160,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,

View File

@@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from
Electrons grit header instead of Chromes
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index be9370112776419a6df98c364e9eae149eabdbb4..f6ce53126e53995966692fbbbf74c3bf3489a088 100644
index c77a5d0e3eb23fcb6940b333b9eb8e472be0f601..57fa8d4642c61997081cc5c7336e253f019a1390 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -6350,6 +6350,7 @@ static_library("browser") {
@@ -6444,6 +6444,7 @@ static_library("browser") {
deps += [
"//components/spellcheck/browser",
"//components/spellcheck/common",
@@ -19,7 +19,7 @@ index be9370112776419a6df98c364e9eae149eabdbb4..f6ce53126e53995966692fbbbf74c3bf
if (!is_android) {
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
index d511c9085253ebfba69ba37f41193d15638bb10f..d98cfc569c775b52687a533e03c595a5e45be87e 100644
index 2b7aa1add57dccbcbf8202cead5b7d2d5a174270..2ba03fc045f2e4bb12f173aacb6581ccb20bfc5a 100644
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
@@ -6,7 +6,7 @@
@@ -44,10 +44,10 @@ index 41761e18716a7d9221511978dc4582a1804920e2..faea3d936c678e31fa29b93ae1ccd976
]
}
diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc
index 49e30e1fa3e980c09ff783fde9982ee4f58aca9f..04f0871ca950a7a5963989bbe728b9b18b198b09 100644
index ba4d8473077d1cc35cec531750460a7ee289c1b0..1b19de36dc654f3b8c544f6ce8fc5ac058354cbc 100644
--- a/components/language/core/browser/language_prefs.cc
+++ b/components/language/core/browser/language_prefs.cc
@@ -22,7 +22,7 @@
@@ -23,7 +23,7 @@
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"

View File

@@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm,
as its not supported in the current version of chrome.
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
index 0ccd5815839ff3bc3b05e76241959912f0730b6b..36cecfb80de305a93e6dd4aef087f169630fa502 100644
index ac83e2c1290d16db38d6f91f3bb7eeab1adafed6..7f6b9cb64bbf3533c2d2f4ee30566e3ee4e217fa 100644
--- a/chrome/renderer/media/chrome_key_systems.cc
+++ b/chrome/renderer/media/chrome_key_systems.cc
@@ -16,7 +16,9 @@
@@ -20,10 +20,10 @@ index 0ccd5815839ff3bc3b05e76241959912f0730b6b..36cecfb80de305a93e6dd4aef087f169
#include "components/cdm/renderer/external_clear_key_key_system_properties.h"
#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "content/public/renderer/render_thread.h"
@@ -201,12 +203,14 @@ static SupportedCodecs GetSupportedCodecs(
@@ -258,12 +260,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) {
// Returns persistent-license session support.
static EmeSessionTypeSupport GetPersistentLicenseSupport(
bool supported_by_the_cdm) {
EmeSessionTypeSupport GetPersistentLicenseSupport(bool supported_by_the_cdm) {
+#if 0
// Do not support persistent-license if the process cannot persist data.
// TODO(crbug.com/457487): Have a better plan on this. See bug for details.

View File

@@ -201,7 +201,7 @@ index 60f7ad6ffb28fa6554e02a7e031408f4d1124d86..0e8325e993178443d926249c427957bb
}
diff --git a/ui/base/x/x11_global_shortcut_listener.cc b/ui/base/x/x11_global_shortcut_listener.cc
index 658c04c865f0e0f17501fc97965adc3bd56c709a..8c693eecbca10cd8b287fdd504d498e6a5e72e96 100644
index a772666160a71e8e31242e25a8f3383ad9b914bf..7ed78ff875ccf9c38a480d0d59f4688ada1a3ad3 100644
--- a/ui/base/x/x11_global_shortcut_listener.cc
+++ b/ui/base/x/x11_global_shortcut_listener.cc
@@ -32,11 +32,13 @@ const x11::ModMask kModifiersMasks[] = {

View File

@@ -102,7 +102,7 @@ index e3fc1fb2bcab31d6a7cb325a892acb26dc00d4e4..fd654d6e514de416457c283caeb1895d
arguments.push_back("--monitor-self");
}
diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc
index 686be7964d77dbba91a6265d157d05d97d5823fb..3e4585f7ba14650fa8b7e644b026147e0bac5119 100644
index 7dd251b2fdda8c59bb630a5d3ee86e9e858f256e..93f1d5954651ef961c72b97885a708ecff2e9aa7 100644
--- a/components/crash/core/app/crashpad_win.cc
+++ b/components/crash/core/app/crashpad_win.cc
@@ -89,6 +89,7 @@ base::FilePath PlatformCrashpadInitialization(

View File

@@ -16,7 +16,7 @@ https://github.com/electron/electron/pull/18483#discussion_r292703588
https://github.com/electron/electron/pull/18483#issuecomment-501090683
diff --git a/third_party/crashpad/crashpad/util/win/exception_handler_server.cc b/third_party/crashpad/crashpad/util/win/exception_handler_server.cc
index a520c720ceb0152d11acb3acac02e0852a84d786..dd237a7b84350e3c254719630d4f5f9da17bb1aa 100644
index 9394256e05748297988dd457439875409ed96461..a5502155e6bb9370cf73a9a571054eac9b0253a2 100644
--- a/third_party/crashpad/crashpad/util/win/exception_handler_server.cc
+++ b/third_party/crashpad/crashpad/util/win/exception_handler_server.cc
@@ -444,9 +444,16 @@ bool ExceptionHandlerServer::ServiceClientConnection(

View File

@@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the
failing checks and allow the rest of the target to have them enabled.
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index d1f10922b82e4e0578d1c32978784216117e0696..8f0a750d1a5957b987c5ac506455587a09474461 100644
index f790065679a560251a9368c82549ed386a2396c9..7ce509e58839e574443cf486193139b3602634cf 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -889,10 +889,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
@@ -923,10 +923,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
UINT cf_format = format.ToFormatEtc().cfFormat;

View File

@@ -19,10 +19,10 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try
re-submitting the patch.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 8b557bdeb4b8f3660cb9aa1adaf2bf28b6a326bf..aa8ffdd580292b88ff32ea536d34080c12db1778 100644
index 81638b94331aad6ab9bda9ecd8f1c24f6f1f57f3..4524ccc46b869006b13c435948e022afb492e964 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -737,7 +737,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
@@ -735,7 +735,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
}
#endif
@@ -68,7 +68,7 @@ index 3038f9d25798f36811b6398f8cc0e7d83ecc41b0..68189c36c47ef85b345b0ccc40c456f8
// Re-initializes schemes for tests.
CONTENT_EXPORT void ReRegisterContentSchemesForTests();
diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc
index 17d256b852b6e7615cf4e52e4a2d7fa326a4df44..bd0512902df4484e8714cda9ab1352b1c672a1cd 100644
index 8c71a579ee69d77547698c2135e3b4453c126b97..9b7fd8949b13d97982a100a36d9f73c9947b8853 100644
--- a/content/public/app/content_main_delegate.cc
+++ b/content/public/app/content_main_delegate.cc
@@ -42,6 +42,10 @@ bool ContentMainDelegate::ShouldHandleConsoleControlEvents() {
@@ -83,10 +83,10 @@ index 17d256b852b6e7615cf4e52e4a2d7fa326a4df44..bd0512902df4484e8714cda9ab1352b1
return true;
}
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
index dd16f2c082665e74cc3c0aaa1ddb53977ce4a7ea..1806baf2d97b36e5c5097516c82d14fce7ca41a5 100644
index 5e45724edf07ac33c9a423ecb6b6077f19e13b04..84f77390772828554e446d1e6f99198b76e9f835 100644
--- a/content/public/app/content_main_delegate.h
+++ b/content/public/app/content_main_delegate.h
@@ -65,6 +65,20 @@ class CONTENT_EXPORT ContentMainDelegate {
@@ -69,6 +69,20 @@ class CONTENT_EXPORT ContentMainDelegate {
// returning initialization error code. Default behavior is CHECK(false).
virtual int TerminateForFatalInitializationError();

View File

@@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue
can be found at https://github.com/electron/electron/issues/1821
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 41363666bbbec7a92ac563282816f0a058979bc7..82ec517dbd675ad8b4a78848b7d2a7f71512c2d5 100644
index a221915d4ca70f4e0c31902012f4739495c601fc..771b57e0380ff3b042fdbb2434127e8dba965b03 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -307,6 +307,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
@@ -37,7 +37,7 @@ index 41363666bbbec7a92ac563282816f0a058979bc7..82ec517dbd675ad8b4a78848b7d2a7f7
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
!ui::win::IsAeroGlassEnabled())) {
if (should_lock_)
@@ -978,6 +983,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
@@ -976,6 +981,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
return scoped_enable;
}

View File

@@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
https://crbug.com/634542 and https://crbug.com/711107.
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index f75e776fc6cae207a7ba42fa7d893b3e8cb02856..6a9563fe2a7570bb0109a8dab83983c3935f49c5 100644
index 41a143a1cb391b038600ab648bb8ce7d40157297..fa0b01f1420846d4c39a5631304259cc3a06b671 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1791,6 +1791,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
@@ -1799,6 +1799,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace(
gfx::ContentColorUsage content_color_usage) const {
@@ -35,7 +35,7 @@ index f75e776fc6cae207a7ba42fa7d893b3e8cb02856..6a9563fe2a7570bb0109a8dab83983c3
// If we are likely to software composite the resource, we use sRGB because
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index 7fa2b4da8c86c89b97a747a5f965485923fae7c9..dd91f7c9eff59824b6571a97be0529f62592d185 100644
index bd5bcf4a03022869fe610015e882ff1980d8a0e8..a3fdd7ae208719bd10ddf1044a501e44e0897ae8 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -95,6 +95,8 @@ class CC_EXPORT LayerTreeSettings {
@@ -81,10 +81,10 @@ index f919df4d79a1168269c1538ac13a2a944586cf4e..fc34cf5d7dab95e7b6fc0576674b3e2b
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d07259b74dfaa 100644
index 7d1dace6d2b6a06576b35db25f89f5fffb8a162c..ea1d0f6ecb297e438c428198327c937581db1de1 100644
--- a/components/viz/service/display/gl_renderer.cc
+++ b/components/viz/service/display/gl_renderer.cc
@@ -87,6 +87,9 @@
@@ -89,6 +89,9 @@
using gpu::gles2::GLES2Interface;
@@ -94,7 +94,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
namespace viz {
namespace {
@@ -677,8 +680,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
@@ -679,8 +682,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) {
SetBlendEnabled(quad->ShouldDrawWithBlending());
@@ -106,7 +106,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
// Use the full quad_rect for debug quads to not move the edges based on
// partial swaps.
@@ -1668,7 +1672,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
@@ -1670,7 +1674,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
params->use_color_matrix, tint_gl_composited_content_,
params->apply_shader_based_rounded_corner &&
ShouldApplyRoundedCorner(params->quad)),
@@ -116,7 +116,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
}
void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) {
@@ -2141,15 +2146,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
@@ -2143,15 +2148,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA,
tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@@ -136,7 +136,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
gfx::ColorTransform::TriStim col(color_f.fR, color_f.fG, color_f.fB);
color_transform->Transform(&col, 1);
color_f.fR = col.x();
@@ -2371,7 +2377,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
@@ -2373,7 +2379,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
: NON_PREMULTIPLIED_ALPHA,
false, false, tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@@ -146,7 +146,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
if (current_program_->tint_color_matrix_location() != -1) {
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
@@ -2470,7 +2477,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
@@ -2472,7 +2479,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
!quad->ShouldDrawWithBlending(), has_tex_clamp_rect,
tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@@ -156,7 +156,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
if (current_program_->tint_color_matrix_location() != -1) {
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
@@ -2580,7 +2588,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
@@ -2582,7 +2590,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
// The source color space should never be RGB.
DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB());
@@ -166,7 +166,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
#if defined(OS_WIN)
// Force sRGB output on Windows for overlay candidate video quads to match
@@ -2761,7 +2770,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
@@ -2763,7 +2772,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
ShouldApplyRoundedCorner(quad)),
@@ -176,7 +176,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
@@ -2832,8 +2842,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
@@ -2834,8 +2844,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
// Bind the program to the GL state.
@@ -184,21 +184,21 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
- CurrentRenderPassColorSpace(),
+ SetUseProgram(draw_cache_.program_key, PATCH_CS(locked_quad.color_space()),
+ PATCH_CS(CurrentRenderPassColorSpace()),
/*adjust_src_white_level=*/draw_cache_.is_video_frame);
/*adjust_src_white_level=*/draw_cache_.is_video_frame,
locked_quad.hdr_metadata());
if (current_program_->rounded_corner_rect_location() != -1) {
@@ -3661,7 +3671,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
const gfx::ColorSpace& src_color_space,
@@ -3691,7 +3701,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
const gfx::ColorSpace& dst_color_space,
bool adjust_src_white_level) {
bool adjust_src_white_level,
absl::optional<gfx::HDRMetadata> hdr_metadata) {
- DCHECK(dst_color_space.IsValid());
+ if (settings_->enable_color_correct_rendering) {
+ DCHECK(dst_color_space.IsValid());
+ }
gfx::ColorSpace adjusted_src_color_space = src_color_space;
if (adjust_src_white_level) {
// If the input color space is HDR, and it did not specify a white level,
@@ -4040,9 +4052,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
if (adjust_src_white_level && src_color_space.IsHDR()) {
// TODO(b/183236148): consider using the destination's HDR static metadata
@@ -4074,9 +4086,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple);
}
@@ -211,7 +211,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
*new_bounds = gfx::RectF(updated_dst_rect.origin(),
gfx::SizeF((*overlay_texture)->texture.size()));
@@ -4262,8 +4274,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
@@ -4296,8 +4308,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
PrepareGeometry(SHARED_BINDING);
@@ -222,14 +222,14 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
gfx::Transform render_matrix;
render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
@@ -4453,3 +4465,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
@@ -4487,3 +4499,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
GLRenderer::OverlayTexture::~OverlayTexture() = default;
} // namespace viz
+
+#undef PATCH_CS
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index f0689a0342831498b5bde01af92839137cc0ac87..47541cb43e55b01b59f1680a8628973cc6a22afb 100644
index 59b34cdb1dc63b8d239cae5397b2a5a4f607bf1c..e2f556532459b1129465ca2b83aa1485b89271fa 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -225,6 +225,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -241,10 +241,10 @@ index f0689a0342831498b5bde01af92839137cc0ac87..47541cb43e55b01b59f1680a8628973c
sandbox::policy::switches::kGpuSandboxAllowSysVShm,
sandbox::policy::switches::kGpuSandboxFailuresFatal,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index c54084b7b1b7b3459a4b34f4afc0891db5cdb6a7..b5b89e2c1d97b9a1f0979f76a1ac1acbd435f677 100644
index 85e3dd76f528b3e60b86bef6a9231135ef2bc0f5..922e8e30a2918ef99dc53fc9124d56916d57ea5e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -213,6 +213,7 @@
@@ -216,6 +216,7 @@
#include "ui/accessibility/accessibility_switches.h"
#include "ui/base/ui_base_switches.h"
#include "ui/display/display_switches.h"
@@ -252,7 +252,7 @@ index c54084b7b1b7b3459a4b34f4afc0891db5cdb6a7..b5b89e2c1d97b9a1f0979f76a1ac1acb
#include "ui/gl/gl_switches.h"
#include "ui/native_theme/native_theme_features.h"
#include "url/origin.h"
@@ -3237,6 +3238,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -3376,6 +3377,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
// Propagate the following switches to the renderer command line (along
// with any associated values) if present in the browser command line.
static const char* const kSwitchNames[] = {
@@ -293,7 +293,7 @@ index 628c6bca129cd58a25984ff8300bfb4c33ec7ebf..ff9ce55f2701990b5b6119c18575477b
}
diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
index f5751beeb390b556dde8598b67b5fc9270e6805b..b155ad47f19950602000cecba52b1176ef95a749 100644
index 4d87cdf578fdd2cbde7929e3a8c7cabfbb1fc836..be8550927a7c9cdc001dedef66672453846c5dfa 100644
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
@@ -25,6 +25,7 @@
@@ -315,7 +315,7 @@ index f5751beeb390b556dde8598b67b5fc9270e6805b..b155ad47f19950602000cecba52b1176
// is what the renderer uses if its not threaded.
settings.enable_checker_imaging =
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
index e5fd0a36f83e14f13ad37525266076d791829900..f75d17d9506e7f9aad9f95a9a2026db4dda2706e 100644
index 4e22b4cf0bd06955af5fbac32db084f41d547545..087ec6df3e7cf53e0d79c7b3edb581dc426ff3a3 100644
--- a/ui/gfx/mac/io_surface.cc
+++ b/ui/gfx/mac/io_surface.cc
@@ -20,6 +20,7 @@

View File

@@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index c4ba0addc40a9f9b304ae207b765a0ed6f1bcb45..2e21eb0b6fcb5de410e30617f1949590dc8427f2 100644
index 23d00ebbd6563a2bee1c79819c3745f56ad6f53b..fc26b0cb92c0b4ace52d64a5994422ad056de034 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -478,7 +478,11 @@
@@ -482,7 +482,11 @@
return;
host()->WasHidden();

View File

@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
Electron uses this to disable background throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index b38b11e555791ca37646bc6fad9d31509cad0533..738920fccc048d0a4471dac407619afde3811def 100644
index 0d77511c47610b8f54f9ceab2956c069d54bd4d8..a2227fabbafb9a5e162c063d2aaa494f78cdd610 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -712,6 +712,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -769,6 +769,9 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_)
return;
@@ -20,10 +20,10 @@ index b38b11e555791ca37646bc6fad9d31509cad0533..738920fccc048d0a4471dac407619afd
blink::mojom::PointerLockResult::kWrongDocument);
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 1490224235f9a34fc76e688349e1bb86bbcbe967..eb2a4320080c15e1b884587cf0777f30846d99ff 100644
index bdba3cf07542d494c45ef9167642898b196f06cc..db5eb3b795ab2442058dbf16375f5f132a80a61f 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -850,6 +850,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -855,6 +855,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
mojom::CreateFrameWidgetParamsPtr
BindAndGenerateCreateFrameWidgetParamsForNewWindow();
@@ -34,10 +34,10 @@ index 1490224235f9a34fc76e688349e1bb86bbcbe967..eb2a4320080c15e1b884587cf0777f30
// |routing_id| must not be MSG_ROUTING_NONE.
// If this object outlives |delegate|, DetachDelegate() must be called when
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index b8ae3c5d06c09139966accc3861e2c65d6310fb9..00de546240344c20548f05ff750a86223c9613ed 100644
index 150b03e368ec3ae0d9b3c8c6eb61e5ca830c1fbc..65cead03331f7680cde35333e7c316fced8a9056 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -595,7 +595,7 @@ void RenderWidgetHostViewAura::HideImpl() {
@@ -594,7 +594,7 @@ void RenderWidgetHostViewAura::HideImpl() {
DCHECK(visibility_ == Visibility::HIDDEN ||
visibility_ == Visibility::OCCLUDED);

View File

@@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
should continue seeking for a real fix.
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
index 3654c2b2511677afd472c4ccd62b20d3e81d240c..719cef1979ff95fa778fe11e5325a41d1d4751ba 100644
index 07e6c5b525f954f3408fbc5b5df8c9c01a901f76..619d303b51501b2d2a400ba05a18eb11d09cee7a 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -1078,6 +1078,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1074,6 +1074,7 @@ void Navigator::RecordNavigationMetrics(
.InMilliseconds());
}
@@ -35,7 +35,7 @@ index 3654c2b2511677afd472c4ccd62b20d3e81d240c..719cef1979ff95fa778fe11e5325a41d
// If this is a same-process navigation and we have timestamps for unload
// durations, fill those metrics out as well.
if (params.unload_start && params.unload_end &&
@@ -1124,6 +1125,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1120,6 +1121,7 @@ void Navigator::RecordNavigationMetrics(
first_before_unload_start_time)
.InMilliseconds());
}

View File

@@ -0,0 +1,87 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Wed, 16 Jun 2021 11:30:28 -0400
Subject: Don't run PCScan functions if PCScan is disabled
PCScan should not be invoked if PCScan is disabled. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/2916657.
diff --git a/base/allocator/partition_allocator/memory_reclaimer.cc b/base/allocator/partition_allocator/memory_reclaimer.cc
index fd846ca91cb17638bf07ca35bf695099174f8f00..5b2ab293ade39b2ecd68d0438034da77417b1e94 100644
--- a/base/allocator/partition_allocator/memory_reclaimer.cc
+++ b/base/allocator/partition_allocator/memory_reclaimer.cc
@@ -121,6 +121,7 @@ void PartitionAllocMemoryReclaimer::Reclaim(int flags) {
AutoLock lock(lock_); // Has to protect from concurrent (Un)Register calls.
TRACE_EVENT0("base", "PartitionAllocMemoryReclaimer::Reclaim()");
+#if defined(PA_ALLOW_PCSCAN)
// PCScan quarantines freed slots. Trigger the scan first to let it call
// FreeNoHooksImmediate on slots that pass the quarantine.
//
@@ -137,6 +138,7 @@ void PartitionAllocMemoryReclaimer::Reclaim(int flags) {
: PCScan::InvocationMode::kBlocking;
PCScan::PerformScanIfNeeded(invocation_mode);
}
+#endif
#if defined(PA_THREAD_CACHE_SUPPORTED)
// Don't completely empty the thread cache outside of low memory situations,
diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc
index dbf96f68f9d8ca74616af10c236ebe24984b2b5e..5d27063a6b8b88a40a2b12ec5a4e1583fef4af1c 100644
--- a/base/threading/platform_thread_posix.cc
+++ b/base/threading/platform_thread_posix.cc
@@ -40,6 +40,7 @@
#endif
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
+#include "base/allocator/partition_allocator/partition_alloc_config.h"
#include "base/allocator/partition_allocator/starscan/pcscan.h"
#include "base/allocator/partition_allocator/starscan/stack/stack.h"
#endif
@@ -73,7 +74,7 @@ void* ThreadFunc(void* params) {
base::ThreadRestrictions::SetSingletonAllowed(false);
#if !defined(OS_NACL)
-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
+#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN)
internal::PCScan::NotifyThreadCreated(internal::GetStackPointer());
#endif
@@ -99,7 +100,7 @@ void* ThreadFunc(void* params) {
PlatformThread::CurrentHandle().platform_handle(),
PlatformThread::CurrentId());
-#if !defined(OS_NACL) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
+#if !defined(OS_NACL) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN)
internal::PCScan::NotifyThreadDestroyed();
#endif
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
index 86e240b231d3236aea1b0343e0e6763282ff70c9..0d85d2acb6652a580f79a2c4ca2277562dd5156b 100644
--- a/base/threading/platform_thread_win.cc
+++ b/base/threading/platform_thread_win.cc
@@ -28,6 +28,7 @@
#include <windows.h>
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
+#include "base/allocator/partition_allocator/partition_alloc_config.h"
#include "base/allocator/partition_allocator/starscan/pcscan.h"
#include "base/allocator/partition_allocator/starscan/stack/stack.h"
#endif
@@ -104,7 +105,7 @@ DWORD __stdcall ThreadFunc(void* params) {
FALSE,
DUPLICATE_SAME_ACCESS);
-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
+#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN)
internal::PCScan::NotifyThreadCreated(internal::GetStackPointer());
#endif
@@ -126,7 +127,7 @@ DWORD __stdcall ThreadFunc(void* params) {
PlatformThread::CurrentId());
}
-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
+#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN)
internal::PCScan::NotifyThreadDestroyed();
#endif

View File

@@ -11,14 +11,14 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572
Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index ba517758ddd044a32e9c364bd803e0090d19b8cb..23717632bad15eaaf34d9190d242724cc1a4a07b 100644
index 388dbbfc8b9e1b191c03792f41d5de75edb3b867..7e8e5ef54bf77f56b5cc5e3b21fd60b54f802ba8 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2278,7 +2278,7 @@ blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() {
@@ -2354,7 +2354,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
}
const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() {
- return GetWebFrame()->View()->GetWebPreferences();
- return GetWebView()->GetWebPreferences();
+ return render_view_->GetWebView()->GetWebPreferences();
}

View File

@@ -5,16 +5,16 @@ Subject: dump_syms.patch
dylib currently fails to resolve Squirrel.framework on OSX, we need to fix
this but it is not a blocker for releasing Electron. This patch removes
the hard fail on dylib resolve failure from dump_syms
tthe hard fail on dylib resolve failure from dump_syms
diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py
index 5ad2b1a6cabc0970b8dda3a3313400205eb0da46..b9d387cb7b45bd8ec197872b9fa4bf632c506ca9 100755
index 1d12ce255505ee5612380cd14d0b127bd7c564d1..3ebbe8add082c648f7444c3a976acf0fa1efcc3f 100755
--- a/components/crash/content/tools/generate_breakpad_symbols.py
+++ b/components/crash/content/tools/generate_breakpad_symbols.py
@@ -204,7 +204,7 @@ def GetSharedLibraryDependenciesMac(binary, exe_path):
@@ -205,7 +205,7 @@ def GetSharedLibraryDependenciesMac(binary, exe_path):
'ERROR: failed to resolve %s, exe_path %s, loader_path %s, '
'rpaths %s' % (m.group(1), exe_path, loader_path,
', '.join(rpaths)))
', '.join(rpaths))), file=sys.stderr)
- sys.exit(1)
+ # sys.exit(1)
return deps

View File

@@ -6,7 +6,7 @@ Subject: feat: enable setting aspect ratio to 0
Make SetAspectRatio accept 0 as valid input, which would reset to null.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index fb8bbb639f6b6d93581b4eb6500a54deb331f18d..71a5b130e2c956f4d43c9a5b6a21f887dca66cfb 100644
index f6c41d83fbd4ef613c951c1d0fee46d8379c1ded..a362a573bef4ce15d82335990c50cb0e6a72d053 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -491,7 +491,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
@@ -19,10 +19,10 @@ index fb8bbb639f6b6d93581b4eb6500a54deb331f18d..71a5b130e2c956f4d43c9a5b6a21f887
aspect_ratio.height());
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 82ec517dbd675ad8b4a78848b7d2a7f71512c2d5..4a44a9f5fe9ffa69ebd7bb10e02f7b6f8acdb21c 100644
index 771b57e0380ff3b042fdbb2434127e8dba965b03..41fa3c23b9a5d8596f2fb44d0957ab6e1f60a95a 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -928,8 +928,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
@@ -926,8 +926,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
}
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) {

View File

@@ -9,7 +9,7 @@ correctly tagged with MAP_JIT we need to use gins page allocator instead
of the default V8 allocator. This probably can't be usptreamed.
diff --git a/gin/public/v8_platform.h b/gin/public/v8_platform.h
index 967ef1dffddfb4d6e30c7b97eacc099c70f4ef31..9c870947e2747c9c73bbf9a058a689b8b422f470 100644
index fa0e7faad9296b9be8d662324c52f40e502f2e38..a579b359c684ccd72dcbe43f40b4aa7b4779c36b 100644
--- a/gin/public/v8_platform.h
+++ b/gin/public/v8_platform.h
@@ -25,6 +25,7 @@ class GIN_EXPORT V8Platform : public v8::Platform {

View File

@@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
};
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 81acb80ef2a52b2133dcc59a1214723345095f61..634ef00866805f3953327f92f572e370ac56e015 100644
index 3a34df559a160c51488242bb7541a0a939ba67a3..42bf611491cda4778c1c109be6237814dd5e8c45 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1140,6 +1140,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1184,6 +1184,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@@ -51,10 +51,10 @@ index 81acb80ef2a52b2133dcc59a1214723345095f61..634ef00866805f3953327f92f572e370
// This may only be called on NetworkContexts created with the constructor
// that calls MakeURLRequestContext().
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 22e155061860f6782b261205f6297c09f8c6e1fa..656d1de560a1db7ff4973a9e087fcb7cd9e976e0 100644
index 3457e652131b962a574352803d06f5f4e47b6e59..c347bc731d58e5610cdbabb71075f30f282b4ab7 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -254,6 +254,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -255,6 +255,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override;
@@ -63,10 +63,10 @@ index 22e155061860f6782b261205f6297c09f8c6e1fa..656d1de560a1db7ff4973a9e087fcb7c
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 6f830a84d20e39b802b44465882f9ae0627a0759..b425a47d5a70267418fee69b55080ac05328a0b5 100644
index 2595d0b342951d03dcc9d809b33b3f2705e14aa3..3c6798196ada1e28936e8b2bc5530b675a9ea994 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -952,6 +952,9 @@ interface NetworkContext {
@@ -949,6 +949,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);
@@ -77,10 +77,10 @@ index 6f830a84d20e39b802b44465882f9ae0627a0759..b425a47d5a70267418fee69b55080ac0
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index a63f76756d4cb7e5cd60d6d7f2b2c5be5b45d3bf..13cff4ac5f699e78f3fb4fb6753b94e87f4d09e2 100644
index b10229fcdef0d6a50a03df26761511be5d3a2f04..65ef615b3a7cf3f8fc79b3972311265ec9dc91e0 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -117,6 +117,7 @@ class TestNetworkContext : public mojom::NetworkContext {
@@ -123,6 +123,7 @@ class TestNetworkContext : public mojom::NetworkContext {
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override {}

View File

@@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be
done in future work.
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index ff5dda58a3db3efeea952f0ae75cf85575e1a12c..f68aefa3d56949f42690c2a807ccffa5d2fc89cd 100644
index d0f12dd329ac67e635ce39601b9939ffceddc0c0..fdeb405ada2ecafec58c22966d3b8508e67d8120 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -155,6 +155,7 @@
@@ -23,20 +23,11 @@ index ff5dda58a3db3efeea952f0ae75cf85575e1a12c..f68aefa3d56949f42690c2a807ccffa5
#include "third_party/blink/renderer/platform/graphics/image.h"
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
@@ -1787,6 +1788,16 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
RuntimeEnabledFeatures::SetTranslateServiceEnabled(
prefs.translate_service_available);
+
+ SkColor color = SK_ColorTRANSPARENT;
+ if (!prefs.guest_instance_id) { // not inside electron <webview /> tag, which is always transparent.
+ Color blink_color;
+ if (blink_color.SetFromString(WebString::FromASCII(prefs.background_color)))
+ color = static_cast<SkColor>(blink_color);
+ }
+ web_view->SetBaseBackgroundColor(color);
+
@@ -1781,6 +1782,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
#if defined(OS_MAC)
web_view_impl->SetMaximumLegibleScale(
prefs.default_maximum_page_scale_factor);
+ SetUseExternalPopupMenus(!prefs.offscreen);
}
#endif
void WebViewImpl::ThemeChanged() {
#if defined(OS_WIN)

View File

@@ -10,10 +10,10 @@ get this standardised, but in lieu of that, this makes MessagePort a
whole bunch more useful!
diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
index 002ee34ce9a1bbcbdeb5c54967a2f22b1444cc85..c22870137449bf55a62f74d702e25fa6547baca3 100644
index cc07bc2680c8d287369b626efb0889bf8359b863..dac42ab3a11d1a01e948e979f56502e1525e0727 100644
--- a/third_party/blink/renderer/core/messaging/message_port.cc
+++ b/third_party/blink/renderer/core/messaging/message_port.cc
@@ -158,6 +158,7 @@ void MessagePort::close() {
@@ -159,6 +159,7 @@ void MessagePort::close() {
Entangle(pipe.TakePort0());
}
closed_ = true;

View File

@@ -13,10 +13,10 @@ uses internally for things like menus and devtools.
We can remove this patch once it has in some shape been upstreamed.
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
index db0681f9278b4a60f6c25faf37fdb2aba41d65a6..58655f4285d3835b51c43e0b55fe15d9d6360a7f 100644
index cfacc084fe300f0d2863183723b4126f69b1377a..9278659d6b25b55518d2eee41ac845458358912a 100644
--- a/ui/native_theme/native_theme.cc
+++ b/ui/native_theme/native_theme.cc
@@ -135,6 +135,8 @@ absl::optional<SkColor> NativeTheme::GetColorProviderColor(
@@ -136,6 +136,8 @@ absl::optional<SkColor> NativeTheme::GetColorProviderColor(
}
bool NativeTheme::ShouldUseDarkColors() const {
@@ -26,10 +26,10 @@ index db0681f9278b4a60f6c25faf37fdb2aba41d65a6..58655f4285d3835b51c43e0b55fe15d9
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index 519e969c3088b9990cbc596aad7b87c5e1bfc133..a414b5a5dbdbf8c05d2a0f543fa498e2563c4566 100644
index 06c11ef6f03a5de803d9f8d3893d614e763afb16..cd7e6bdbf24c4ee1b5fd0047b83de2c12106d7da 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -403,6 +403,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -404,6 +404,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
SkColor GetUnprocessedSystemColor(ColorId color_id,
ColorScheme color_scheme) const;
@@ -52,7 +52,7 @@ index 519e969c3088b9990cbc596aad7b87c5e1bfc133..a414b5a5dbdbf8c05d2a0f543fa498e2
// Returns a shared instance of the native theme that should be used for web
// rendering. Do not use it in a normal application context (i.e. browser).
// The returned object should not be deleted by the caller. This function is
@@ -577,6 +593,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -573,6 +589,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
bool forced_colors_ = false;
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
@@ -61,10 +61,10 @@ index 519e969c3088b9990cbc596aad7b87c5e1bfc133..a414b5a5dbdbf8c05d2a0f543fa498e2
SEQUENCE_CHECKER(sequence_checker_);
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index ae908912cd5ea1b2cd43974e1b8ea1bc0c600042..d0a34eca1ded4cbba46fe1d0655a49018b667461 100644
index eafe512bc90d967eaadddc2e355c418ecd7dd83a..581de5b8a056dc1d529568e7c4c1f5f48555f579 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -749,6 +749,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
@@ -748,6 +748,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
// ...unless --force-dark-mode was specified in which case caveat emptor.
if (InForcedColorsMode() && !IsForcedDarkMode())
return false;

View File

@@ -12,23 +12,36 @@ This patch adds a list of "streaming protocols" to the MultibufferDataSource in
other protocols to register their streaming behavior. MultibufferDataSource::AssumeFullyBuffered()
then refers to the list so that it can correctly determine the data source's settings.
diff --git a/media/blink/multibuffer_data_source.cc b/media/blink/multibuffer_data_source.cc
index c157471b08e12edf2ff5385e78cd4cbe2e8129a9..5ef9dbd289f50359f611290d6a42b2f2aac77977 100644
--- a/media/blink/multibuffer_data_source.cc
+++ b/media/blink/multibuffer_data_source.cc
@@ -10,9 +10,11 @@
diff --git a/third_party/blink/public/platform/media/multi_buffer_data_source.h b/third_party/blink/public/platform/media/multi_buffer_data_source.h
index 8bf52b6cb5fe9f253450bd0262c94d95f0072b2e..9aff9afcbd27ce06ea523821b39fa3adfb94a6bf 100644
--- a/third_party/blink/public/platform/media/multi_buffer_data_source.h
+++ b/third_party/blink/public/platform/media/multi_buffer_data_source.h
@@ -30,6 +30,8 @@ class BufferedDataSourceHost;
class MediaLog;
class MultiBufferReader;
+void BLINK_PLATFORM_EXPORT AddStreamingScheme(const char* new_scheme);
+
// A data source capable of loading URLs and buffering the data using an
// in-memory sliding window.
//
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
index d1977cfbc3df216b4c320a452c516e72d6091d5c..dce79179d6465d05feef42543d6bdc911fd368c3 100644
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
@@ -9,9 +9,11 @@
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/location.h"
#include "base/macros.h"
+#include "base/no_destructor.h"
#include "base/numerics/ranges.h"
#include "base/numerics/safe_conversions.h"
#include "base/single_thread_task_runner.h"
+#include "base/strings/string_util.h"
#include "media/base/media_log.h"
#include "media/blink/buffered_data_source_host_impl.h"
#include "media/blink/multibuffer_reader.h"
@@ -60,10 +62,22 @@ const int kUpdateBufferSizeFrequency = 32;
#include "net/base/net_errors.h"
#include "third_party/blink/public/platform/media/buffered_data_source_host_impl.h"
@@ -59,10 +61,22 @@ const int kUpdateBufferSizeFrequency = 32;
// How long to we delay a seek after a read?
constexpr base::TimeDelta kSeekDelay = base::TimeDelta::FromMilliseconds(20);
@@ -48,12 +61,12 @@ index c157471b08e12edf2ff5385e78cd4cbe2e8129a9..5ef9dbd289f50359f611290d6a42b2f2
+ GetStreamingSchemes()->push_back(new_scheme);
+}
+
class MultibufferDataSource::ReadOperation {
class MultiBufferDataSource::ReadOperation {
public:
ReadOperation(int64_t position,
@@ -153,7 +167,14 @@ bool MultibufferDataSource::media_has_played() const {
ReadOperation() = delete;
@@ -153,7 +167,14 @@ bool MultiBufferDataSource::media_has_played() const {
bool MultibufferDataSource::AssumeFullyBuffered() const {
bool MultiBufferDataSource::AssumeFullyBuffered() const {
DCHECK(url_data_);
- return !url_data_->url().SchemeIsHTTPOrHTTPS();
+
@@ -66,17 +79,4 @@ index c157471b08e12edf2ff5385e78cd4cbe2e8129a9..5ef9dbd289f50359f611290d6a42b2f2
+ return true;
}
void MultibufferDataSource::SetReader(MultiBufferReader* reader) {
diff --git a/media/blink/multibuffer_data_source.h b/media/blink/multibuffer_data_source.h
index 2f35c43811e98679c739d1d672fd6dce517ea24f..b598d58c26a12f0e97ecfcb611baf46a86af4a62 100644
--- a/media/blink/multibuffer_data_source.h
+++ b/media/blink/multibuffer_data_source.h
@@ -32,6 +32,8 @@ class BufferedDataSourceHost;
class MediaLog;
class MultiBufferReader;
+void MEDIA_BLINK_EXPORT AddStreamingScheme(const char* new_scheme);
+
// A data source capable of loading URLs and buffering the data using an
// in-memory sliding window.
//
void MultiBufferDataSource::SetReader(MultiBufferReader* reader) {

View File

@@ -7,10 +7,10 @@ Subject: feat: allow embedders to add observers on created hunspell
This patch is used by Electron to implement spellchecker events.
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index 14e9f03d5663e68082827fb0a00f61ca03ead8d0..4ff0bc6f55de133aa0622690665ddcf42c791f5a 100644
index 340667d184550f09077c0c6afb3e0befc9f3044e..c60be9ac250466dc882d950c4ec64787c0c19053 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -482,6 +482,9 @@ void SpellcheckService::LoadDictionaries() {
@@ -466,6 +466,9 @@ void SpellcheckService::LoadDictionaries() {
std::make_unique<SpellcheckHunspellDictionary>(
dictionary, platform_spellcheck_language, context_, this));
hunspell_dictionaries_.back()->AddObserver(this);
@@ -20,7 +20,7 @@ index 14e9f03d5663e68082827fb0a00f61ca03ead8d0..4ff0bc6f55de133aa0622690665ddcf4
hunspell_dictionaries_.back()->Load();
}
@@ -534,6 +537,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
@@ -518,6 +521,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
(!hunspell_dictionaries_.empty() || enable_if_uninitialized);
}

View File

@@ -81,10 +81,10 @@ index 1026b739d283f0fc252fa2af83a6d4cf51bc8553..fe562ab60ce98b8bb0c5080a6428deb3
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 2ff8732060011e2e1d06861e1197c80b2fba2692..3b954f2f5ae931bf4c297141137315ebbff03cdc 100644
index 4e93b8609553ec903fe9a7b48019c6c7e0390bf7..5d67d1c65ed158099372e7e4d263fbf59dfad1af 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -135,6 +135,8 @@ viz_component("service") {
@@ -137,6 +137,8 @@ viz_component("service") {
"display_embedder/output_surface_provider_impl.h",
"display_embedder/server_shared_bitmap_manager.cc",
"display_embedder/server_shared_bitmap_manager.h",
@@ -108,7 +108,7 @@ index 77d463e683d8b8d3a202681a6884eacaab79d70d..05d51cb2637d34c073cd0025e3658036
} // namespace viz
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc
index bd64ee19f71691bfaf9be2a523b5f5efbbff5066..dc82c4653b2fe22de0ed4ab73c06b85d8f3ecd35 100644
index 827084542417d45c9db8082e2c2537e7bdb8ff7f..927b48bbd855fdaebe2b26b8efbb7c48fec0c1a6 100644
--- a/components/viz/service/display_embedder/output_surface_provider_impl.cc
+++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc
@@ -25,6 +25,7 @@
@@ -127,7 +127,7 @@ index bd64ee19f71691bfaf9be2a523b5f5efbbff5066..dc82c4653b2fe22de0ed4ab73c06b85d
#include "ui/base/ui_base_switches.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/init/gl_factory.h"
@@ -131,7 +133,8 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
@@ -130,7 +132,8 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
mojom::DisplayClient* display_client,
DisplayCompositorMemoryAndTaskController* gpu_dependency,
const RendererSettings& renderer_settings,
@@ -137,7 +137,7 @@ index bd64ee19f71691bfaf9be2a523b5f5efbbff5066..dc82c4653b2fe22de0ed4ab73c06b85d
#if BUILDFLAG(IS_CHROMEOS_ASH)
if (surface_handle == gpu::kNullSurfaceHandle)
return std::make_unique<OutputSurfaceUnified>();
@@ -143,7 +146,7 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
@@ -142,7 +145,7 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
if (!gpu_compositing) {
output_surface = std::make_unique<SoftwareOutputSurface>(
@@ -146,7 +146,7 @@ index bd64ee19f71691bfaf9be2a523b5f5efbbff5066..dc82c4653b2fe22de0ed4ab73c06b85d
} else if (renderer_settings.use_skia_renderer) {
DCHECK(gpu_dependency);
{
@@ -252,10 +255,22 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
@@ -251,10 +254,22 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
std::unique_ptr<SoftwareOutputDevice>
OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
gpu::SurfaceHandle surface_handle,
@@ -497,7 +497,7 @@ index 599b06c1765ef4ddbfeb2fd96e0875098f7c6ae1..2151fc8aa710162a3870639bd6e952df
waiting_on_draw_ack_ = true;
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
index 6ea2c624e1e31414bf8765582ab89dd0551c1111..07248135401dc29d6747c91edd027b0abb433e3e 100644
index be4b04dc525a548276eed50cbfc83603b1f2095b..d9995ac8b5e832ac329ce113aa837a6a587c39bd 100644
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
@@ -47,7 +47,8 @@ RootCompositorFrameSinkImpl::Create(
@@ -511,7 +511,7 @@ index 6ea2c624e1e31414bf8765582ab89dd0551c1111..07248135401dc29d6747c91edd027b0a
// Creating output surface failed. The host can send a new request, possibly
// with a different compositing mode.
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
index 83a23404d1c029af6f7e7aa695bfe60e71d86fde..eef92d3366715774670ebcdcb76ad84ddd8a4ed0 100644
index 50ff2c9facc2a2155bd0882924335294277fe3b6..ef7707d5195bfba3675e5aed6f2bc3b63bec51cf 100644
--- a/content/browser/compositor/viz_process_transport_factory.cc
+++ b/content/browser/compositor/viz_process_transport_factory.cc
@@ -395,8 +395,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@@ -567,7 +567,7 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index fe4e33a62087ce5714c897d75373c061f9a1d3f9..35daaf212772863b6b5def361ad5d467af7dabd2 100644
index 3c226fe6c61f042942ac6c01e08f95209536470b..67a8a6fd29e93268f960d8e3dde19d563877b09a 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -80,6 +80,7 @@ class DisplayPrivate;

View File

@@ -8,7 +8,7 @@ patch and doing further investigation in the future. This patch cannot
be upstreamed.
diff --git a/sandbox/linux/bpf_dsl/bpf_dsl.cc b/sandbox/linux/bpf_dsl/bpf_dsl.cc
index 82a40696b8756305e6af83beec351c58c9c1a9e6..5ef1852331b8ebe0834c9951fb67177226997e8b 100644
index 846dc7a83d12be57cb91bd0a7f9e698990776684..1c3dba162b8eb4af28c78e84b5553447e4f1c76a 100644
--- a/sandbox/linux/bpf_dsl/bpf_dsl.cc
+++ b/sandbox/linux/bpf_dsl/bpf_dsl.cc
@@ -305,6 +305,7 @@ Elser::~Elser() {

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