Compare commits

...

76 Commits

Author SHA1 Message Date
trop[bot]
95caa1f0bd fix: -Wunsafe-buffer-usage warnings in Clipboard::WriteBuffer() (#43813)
* fix: -Wunsafe-buffer-usage warnings in Clipboard::WriteBuffer()

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

* chore: add a DCHECK to confirm the BigBuffer is full

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-20 08:47:49 -05:00
trop[bot]
45a7a5d22c fix: createWindow shouldn't load URL for webContents (#43816)
* fix: createWindow shouldn't load URL for webContents

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

* chore: add non about blank test

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-09-20 08:47:30 -05:00
trop[bot]
3232505c55 docs: document Windows pitfall when updating patches (#43814)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-20 00:30:35 -05:00
trop[bot]
b896dbb103 fix: third time screen sharing on macOS (#43810)
Because we used decrementing negative source ids for fake video id when
instantating a native macOS screen share picker, we eventually hit the
`DesktopMediaID::kFakeId = -3` in Chromium source code which displayed a
test green screen.

In this change we reserve our own fake id of `-4` and decrement the
window id integer for uniqueness instead.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Fedor Indutny <238531+indutny@users.noreply.github.com>
2024-09-19 22:12:19 -05:00
trop[bot]
3ee3844bdb refactor: NotificationPresenter::Create() returns a std::unique_ptr<> (#43804)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-19 22:11:48 -05:00
trop[bot]
78ede09ecd chore: fix compile issue about ambiguous error of multiple methods named 'highlight'. (#43800)
chore: fix ambiguous error of multiple methods named 'highlight'

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: bill.shen <shenyb32768@gmail.com>
2024-09-19 07:20:56 -05:00
Charles Kerr
5c92ea76e9 refactor: reduce code duplication in gin_helper::Promise (33-x-y) (#43778)
refactor: reduce code duplication in gin_helper::Promise (#43716)

* refactor: move scope scaffolding into SettletScope

idea stolen from SpellCheckScope

* refactor: move impl of PromiseBase::RejectPromise() to the cc file

* chore: remove unused #include

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-09-19 13:01:13 +02:00
Charles Kerr
68869c18cd docs: update window customization tutorial (33-x-y) (#43781)
docs: update window customization tutorial (#43388)

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2024-09-19 10:00:36 +02:00
Charles Kerr
d3cfe7aacb chore: iwyu mojom-forward header files (33-x-y) (#43777)
chore: iwyu mojom-forward header files (#43741)

* chore: iwyu mojom.h headers

* fixup! chore: iwyu mojom.h headers

make previously-indirect include dependency direct

* fixup! fixup! chore: iwyu mojom.h headers

make previously-indirect include dependency direct
2024-09-19 09:58:45 +02:00
trop[bot]
753cf3d409 perf: hold V8FunctionInvoker args in a std::array (#43793)
perf: hold V8FunctionInvoker args in a std::array

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-18 18:45:39 -05:00
trop[bot]
3a4664f836 build: let darwin/mas run concurrently (#43792)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2024-09-18 16:37:06 -07:00
trop[bot]
948a28fdb8 perf: hold Emit() arg arrays in a std::array (#43776)
* refactor: CallMethodWithArgs() now takes a span of value handles

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

* perf: use std::array instead of std::vector to hold Emit arg parameter packs

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

* chore: remove unused gin_helper::EmitEvent(iso, obj, name, span<Local>)

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-18 14:55:53 -04:00
trop[bot]
48d4adedaa build: split darwin/mas macOS publish jobs (#43764)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2024-09-17 20:07:46 -07:00
Samuel Attard
a27df94f71 build: improve logging on http errors during release process (#43759)
* build: improve logging on http errors during release process (#43756)

* build: improve logging on http errors during release process (again) (#43757)

* build: improve logging on http errors during release process (again, but more) (#43758)
2024-09-17 15:27:27 -07:00
trop[bot]
888928887c fix: in Emit(), don't leak converted Arg Local<Values> into caller's scope (#43746)
fix: Emit() should not leak converted arg handles into caller's HandleScope

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-17 10:57:21 -05:00
John Kleinschmidt
4ee00641eb ci: move Archaeologist to GHA (#43732)
ci: move Archaeologist to GHA (#43701)

* chore: move Archaeologist to GHA

* chore: test archaelogist changes

* Revert "chore: test archaelogist changes"

This reverts commit a575d6ef3a.

* chore: properly name steps in archaeologist-dig
2024-09-17 11:23:26 -04:00
trop[bot]
12bb7093e2 fix: resizing border on Linux WCO caption buttons (#43744)
Closes https://github.com/electron/electron/issues/43714.

Fixes an issue where the resizing border was not being handled correctly on Linux WCO
caption buttons. This is now taken into account as a part of the NonClientHitTest.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-09-17 15:33:28 +02:00
trop[bot]
6b4f269d22 fix: prevent loading spinner when launching utility process on Windows (#43731)
fix: prevent spinning cursor when launching utility process on Windows

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2024-09-17 11:51:12 +02:00
Charles Kerr
d11c840cf0 refactor: add EmitWarning(v8::Isolate*) helper (#43736)
refactor: add `EmitWarning(v8::Isolate*)` helper (#43722)

* refactor: add EmitWarning(Isolate*, ...) warning

* chore: remove EmitWarning(node::Environment*, ...)

* chore: add code comments

* fixup! refactor: add EmitWarning(Isolate*, ...) warning

* chore: remove unused node #includes
2024-09-17 11:50:48 +02:00
trop[bot]
18bd295873 docs: document View.removeChildView edge case (#43725)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2024-09-16 12:53:10 +02:00
trop[bot]
748f293400 refactor: remove use of deprecated API BuildServiceInstanceFor() (#43707)
* refactor: update BadgeManagerFactory

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

* refactor: update NetworkContextServiceFactory

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

* refactor: update ElectronExtensionSystemFactory

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

* refactor: update UsbChooserContextFactory

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

* refactor: update UsbHidChooserContextFactory

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

* refactor: update SerialChooserContextFactory

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

* refactor: update FileSystemAccessPermissionContextFactory

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

* empty commit

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-13 15:26:10 -05:00
trop[bot]
7a04a77ed0 refactor: avoid minor code repetition in native_image.cc (#43704)
chore: delegate handle creation in NativeImage::Resize()

chore: delegate handle creation in NativeImage::Crop()

chore: delegate handle creation in NativeImage::CreateEmpty()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-12 20:13:27 +02:00
trop[bot]
810a6d6ef4 fix: EyeDropper working in devtools (#43700)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-09-12 19:20:34 +02:00
trop[bot]
27aea84411 fix: native View wrapper crash missing when adding child view (#43696)
fix: native View wrapper crash missing when adding child view

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-09-12 12:48:16 +02:00
trop[bot]
2aa2611f76 feat: add support for system picker in setDisplayMediaRequestHandler (#43680)
* tmp

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

* feat: add support for system picker in setDisplayMediaRequestHandler

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

* oops

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

* Apply suggestions from code review

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

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

* stuff

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

* well...

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

* seems legit

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

* chore: update patch to handle screenCapturer

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

* feat: modify API to use useSystemPicker

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

* fix: gate ScreenCaptureKitPicker to macos 15 or higher

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

* fix: don't use native picker with legacy media selection

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

* chore: code review, boolean set & docs update

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

* fix: add cancelCallback

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

* docs: clarify session & desktopCapturer docs

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

* chore: update patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
Co-authored-by: Samuel Attard <sam@electronjs.org>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2024-09-11 09:57:39 -07:00
trop[bot]
57aeb9dfc6 fix: ensure SetPluginCanSave updated in PDFs (#43686)
fix: ensure SetPluginCanSave updated in PDFs

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-09-11 17:56:23 +02:00
trop[bot]
454218bd2b build: compile Node.js with C++20 support (#43684)
* build: compile with C++20 support

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

* build: update build-image-sha for gcc 10

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-09-11 17:10:33 +02:00
trop[bot]
c56673f83d fix: -Wunsafe-buffer-usage warning in V8Serializer::Serialize() (#43675)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-10 19:00:47 -05:00
trop[bot]
87fc32f0aa fix: restore Chromium default Content-Disposition header parsing (#43670)
* fix: restore Chromium default Content-Disposition header parsing

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

* Update api-web-request-spec.ts

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2024-09-10 12:10:53 -04:00
trop[bot]
c7380437aa fix: -Wunsafe-buffer-usage warnings in asar file IO (#43650)
* fix: -Wunsafe-buffer-usage warnings in ScopedTemporaryFile::InitFromFile()

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

* fix: -Wunsafe-buffer-usage warnings in Archive::Init()

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-09 17:27:49 -05:00
trop[bot]
511dece7ff fix: out-of-scope Local handle in node::CallbackScope (#43640)
refactor: use an EscapableHandleScope

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-09 17:30:34 -04:00
trop[bot]
12ce546ded fix: update BrowserView#lastWindowSize after window resize (#43636)
fix: update BrowserView#lastWindowSize after window resize (#43462)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Zonglong Liu <83216456+mai-121@users.noreply.github.com>
2024-09-09 17:40:27 +02:00
trop[bot]
67da1f2f9f fix: UvHandle move semantics (#43634)
reassign the uv_handle_t of the source

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-09 10:35:58 -05:00
trop[bot]
8d9ed52c72 perf: avoid redundant Promise.GetContext calls (#43620)
refactor: avoid redundant Promise.GetContext calls

Several Promise methods call `GetContext()` multiple times. From looking
at the assembly in obj/electron/electron_lib/promise.o, these redundant
calls are actually being made -- they aren't optmized out.

This PR keeps the return value in a local variable to avoid extra calls.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-08 10:37:42 -05:00
trop[bot]
8d76b8dba9 refactor: take a uint8_t span in ValidateIntegrityOrDie() (#43612)
refactor: take a uint8_t span in ValidateIntegrityOrDie()

Doing some groundwork for fixing unsafe base::File() APIs:

- Change ValidateIntegrityOrDie() to take a span<const uint8_t> arg.
  We'll need this to migrate asar's base::File API calls away from the
  ones tagged `UNSAFE_BUFFER_USAGE` because the safe counterparts use
  span<uint8_t> too.

- Simplify ValidateIntegrityOrDie()'s implementation by using
  crypto::SHA256Hash() instead of reinventing the wheel.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-06 21:56:27 -05:00
trop[bot]
6f68a40430 refactor: NativeWindow::Create() returns a unique_ptr (#43607)
refactor: NativeWindow::Create() returns a unique_ptr

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-06 14:20:09 -05:00
trop[bot]
cf8a97a924 fix: confirm a v8::Value is a v8::Object before casting it (#43601)
fix: confirm a v8::Value is a v8::Object before casting it

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-06 14:18:26 -05:00
trop[bot]
37a7cb2c11 fix: ensure version of xdg-dialog-portal with defaultPath support (#43595)
fix: ensure version of xdg-dialog-portal with defaultPath support

Closes https://github.com/electron/electron/issues/43310

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-09-06 13:58:55 -04:00
trop[bot]
d92770a275 fix: delete UvTaskRunner's timers only after they're closed (#43597)
* fix: free UvTaskRunner timers only after they are closed

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

* refactor: UvTaskRunner now holds UvHandles

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-06 08:37:33 -05:00
trop[bot]
60264f30d8 build: use proper targets for building (#43588)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-09-06 12:07:55 +02:00
trop[bot]
b31a4dcdf3 docs: explain ipcRenderer behavior in context-bridge.md (#43584)
* docs: explain ipcRenderer behavior in context-bridge.md

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>

* Update context-bridge.md

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>

* Update context-bridge.md

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>

* Update docs/api/context-bridge.md

Co-authored-by: Erik Moura <erikian@erikian.dev>

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>

* Update context-bridge.md

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>

* Update context-bridge.md

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>

* Update context-bridge.md

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>

* Update docs/api/context-bridge.md

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

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>

* Update docs/api/context-bridge.md

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

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>
2024-09-05 17:05:46 -04:00
trop[bot]
1d3200d7da fix: Launch apps with XDG_ACTIVATION_TOKEN in ozone/wayland (#43579)
* fix: Launch apps with XDG_ACTIVATION_TOKEN in ozone/wayland

Ensure apps are launched with the activation token received from
xdg_activation_v1 protocol.

Co-authored-by: Orko Garai <orko@igalia.com>

* add focus_launched_process option

Co-authored-by: Orko Garai <orko@igalia.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Orko Garai <orko@igalia.com>
2024-09-05 15:00:15 -05:00
trop[bot]
bf10a437bc build: fix telemetry error when using autoninja (#43574)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-09-05 09:08:38 -04:00
trop[bot]
60247e685d perf: use v8::Local<v8::Object> as the key in ObjectCache (#43568)
* perf: use v8::Object* as direct keys instead of using hash + a linked list

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

* refactor: use v8::Local<v8::Object> as the key

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-05 10:08:42 +02:00
trop[bot]
5d340577b6 fix: systemMediaPermissionDenied should not check camera perms when the request is asking for screen share (#43543)
* fix: systemMediaPermissionDenied: should check for screen capture perms instead of camera

Co-authored-by: George Xu <george.xu@slack-corp.com>

* Revert "fix: systemMediaPermissionDenied: should check for screen capture perms instead of camera"

This reverts commit e9cc672165.

Co-authored-by: George Xu <george.xu@slack-corp.com>

* should only do these checks for audio or video, but not screenshare

Co-authored-by: George Xu <george.xu@slack-corp.com>

* no service

Co-authored-by: George Xu <george.xu@slack-corp.com>

* oops

Co-authored-by: George Xu <george.xu@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: George Xu <george.xu@slack-corp.com>
2024-09-04 22:52:18 -05:00
trop[bot]
40316df338 fix: -Wunsafe-buffer-usage warnings in IsUrlArg() (#43539)
* fix: -Wunsafe-buffer-usage warnings in IsUrlArg()

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

* chore: improve code comments for CheckCommandLineArguments()

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

* chore: reduce diffs from main

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

* refactor: CheckCommandLineArguments takes a StringVector arg

Fixes another buffer warning!

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-04 22:51:54 -05:00
trop[bot]
e92eb210bb refactor: declare gin::Wrapper subclasses as final (#43565)
As per the gin docs: "Wrappable<T> explicitly does not support further
subclassing of T. Subclasses of Wrappable<T> should be declared final."

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-04 21:26:25 -05:00
trop[bot]
f30c9120a1 build: don't run symbol generation on PS (#43559)
fix: don't run symbol generation on PS

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2024-09-04 18:39:25 +01:00
trop[bot]
986a621bfc fix: don't use deprecate-soon class v8::String::Value (#43551)
* fix: remove use of deprecated v8::String::Value

Upstream marked v8::String::Value as `V8_DEPRECATE_SOON` last month,
so let's stop using it.

The replacement code mostly does the same as v8::String::Value();
but since our test only cares about the length and not the contents,
we get a small perf win of not needing to allocate a char array and
not needing to call Local::String::Write().

Upstream V8_DEPRECATE_SOON:
Xref: https://chromium-review.googlesource.com/c/v8/v8/+/5667299kkk

v8::String::Value() implementation:
20226b740b/src/api/api.cc (10883)

History on why we used it:
80c1a9739d
f49ed30f72

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

* Update shell/common/gin_converters/file_path_converter.h

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

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

* fixup! Update shell/common/gin_converters/file_path_converter.h

do not return success for all non-Null non-Strings

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-09-04 11:00:34 -05:00
trop[bot]
6172e1d2b9 fix: Use XDG_ACTIVATION_TOKEN in wayland when launched by other app (#43546)
When an electron app is launched by another app ensure that the
XDG_ACTIVATION_TOKEN env var is read and used for activation using
xdg_activation_v1 protocol.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Orko Garai <orko@igalia.com>
2024-09-04 17:28:06 +02:00
trop[bot]
0ee624c308 build: free up macos disk space as soon as possible (#43536)
* chore: free up macos disk space as soon as possible

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

* build: free up disk space on gn check too

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-09-04 09:55:22 +01:00
trop[bot]
d8e46cdd50 chore: speed up cache only reclient for fork PRs (#43506)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-08-30 20:26:12 -04:00
trop[bot]
bcf948595d fix: devtools dock state with WCO on linux (#43499)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2024-08-29 11:27:10 -04:00
electron-roller[bot]
66fa1f4665 chore: bump node to v20.17.0 (33-x-y) (#43426)
* chore: bump node in DEPS to v20.17.0

* module: disallow CJS <-> ESM edges in a cycle from require(esm)

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

* src: expose LookupAndCompile with parameters

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

* src: fix -Wshadow warning

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

* lib: convert WeakMaps in cjs loader with symbol properties

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

* src: reduce unnecessary serialization of CLI options in C++

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

* build: ensure v8_pointer_compression_sandbox is enabled on 64bit

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

* lib: improve error message when index not found on cjs

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

* src,lib: expose getCategoryEnabledBuffer to use on node.http

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

* deps: update c-ares to v1.32.2

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

* chore: update patch indices

* deps: update V8 to 12.2

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

* stream: Expose DuplexPair API

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-08-27 15:03:21 -04:00
trop[bot]
1fcd981e5e refactor: simplify KeyWeakMap impl (#43483)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-08-26 18:09:12 -04:00
trop[bot]
9a3618e912 refactor: prefer std::ranges over begin() and end() (#43482)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-08-26 14:37:56 -04:00
trop[bot]
d55e120038 chore: remove unused WinFrameView::kInactiveTitlebarFeatureAlpha (#43476)
added in Aug 2021 (41646d11, #29600) but never used

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-08-24 00:33:31 -05:00
trop[bot]
26d6f62c01 fix: ensure bounds stability in OnWidgetBoundsChanged (#43457)
* fix: ensure bounds stability in OnWidgetBoundsChanged

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

* Update shell/browser/native_window_views.cc

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

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-08-24 00:31:48 -05:00
trop[bot]
d769f1ea71 build: update appveyor image to latest version (#43472)
* build: update appveyor image to latest version

Co-authored-by: electron-appveyor-updater[bot] <161660339+electron-appveyor-updater[bot]@users.noreply.github.com>

* build: update appveyor image to latest version (#43451)

Co-authored-by: electron-appveyor-updater[bot] <161660339+electron-appveyor-updater[bot]@users.noreply.github.com>
(cherry picked from commit e6555ac5e1)

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-appveyor-updater[bot] <161660339+electron-appveyor-updater[bot]@users.noreply.github.com>
2024-08-23 23:07:45 -05:00
trop[bot]
f08c6f2e85 perf: prefer GURL string_view getters (#43471)
* chore: avoid double-call to url.scheme() in WebContentsZoomController::SetZoomMode()

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

* perf: use gurl.scheme_piece() in GetAppInfoHelperForProtocol()

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

* perf: use gurl.scheme_piece() in Browser::GetApplicationNameForProtocol()

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

* refactor: add std::less<> to HandlersMap

This lets us search it using string_view keys

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

* refactor: ProtocolRegistry::FindRegistered() now takes a std::string_view

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

* perf: use gurl.scheme_piece() in InspectableWebContents::LoadNetworkResource()

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

* refactor: ProtocolRegistry::FindIntercepted() now takes a std::string_view

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

* perf: use gurl.scheme_piece() in SimpleURLLoaderWrapper::GetURLLoaderFactoryForURL()

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

* perf: use gurl.scheme_piece() in ProxyingURLLoaderFactory::CreateLoaderAndStart()

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

* perf: use gurl.host_piece() in ElectronWebUIControllerFactory::GetWebUIType()

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

* perf: use gurl.host_piece() in ElectronWebUIControllerFactory::CreateWebUIControllerForURL()

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-08-23 20:58:59 -05:00
trop[bot]
824b1aeb71 test: add -pdf-ready-to-print event to WebContents for testing (#43465)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-08-23 17:16:22 -05:00
trop[bot]
ddc19e3ea0 chore: remove unused method asar::ClearArchives() (#43468)
chore: remove unused asar::ClearArchives()

last use removed in Jun 2021 (b1d1ac65, #29293)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-08-23 17:02:40 -05:00
trop[bot]
d9aa185ec5 docs: titleBarOverlay is defined as a BaseWindow ctor option (#43460)
docs: titleBarOverlay is defined as a BaseWindow ctor option

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-08-23 10:38:46 -05:00
electron-roller[bot]
3169351511 chore: bump chromium to 130.0.6672.0 (33-x-y) (#43444)
chore: bump chromium in DEPS to 130.0.6672.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2024-08-22 18:27:38 -05:00
trop[bot]
75ce3ac6a2 fix: menu should allow focused BaseWindow where possible (#43438)
fix: menu should allow focused BaseWindow

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-08-22 15:51:20 -05:00
trop[bot]
656a86169a chore: bump chromium to 130.0.6671.0 (33-x-y) (#43440)
* chore: bump chromium in DEPS to 130.0.6671.0

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

* 5802591: [Partitioned Popins] (6) Add permissions policy for popin

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

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

* 5794132: [video pip] Move back to tab button to the header

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

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-08-22 15:50:23 -05:00
trop[bot]
e08be7d8ce chore: fix typos in 'spec/' folder (and one in 'lib/' folder) (#43432)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Alexander Cyon <alex.cyon@gmail.com>
2024-08-22 12:30:24 -05:00
trop[bot]
150d332f10 fix: documentation spelling errors (#43435)
chore: fix typos in 'docs/' folder.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Alexander Cyon <alex.cyon@gmail.com>
2024-08-22 16:04:02 +02:00
trop[bot]
85bac873e7 fix: touch bar functionality on BaseWindow (#43422)
* fix: touch bar functionality on BaseWindow

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

* test: add test for BaseWindow.setTouchBar

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-08-22 16:03:33 +02:00
trop[bot]
706d416284 docs: clarify icon value in Notification (#43414)
* docs: clarify icon value in Notification

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

* Update docs/api/notification.md

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

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-08-21 21:30:13 -05:00
trop[bot]
0a1e906aa8 refactor: move impl functions into private namespace (#43408)
* refactor: move into unnamed namespace: IsKillURL()

refactor: move into unnamed namespace: ResolvePossiblyRelativeURL()

refactor: move into unnamed namespace: AllowFileAccess()

refactor: move into unnamed namespace: PrepareURLForNavigation()

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

* refactor: move into unnamed namespace: GetMonitors()

refactor: move into unnamed namespace: GetEDIDProperty()

refactor: move into unnamed namespace: MonitorAtomIdToDisplayId()

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

* refactor: move into unnamed namespace: GetPermissionInfos() } refactor: move into unnamed namespace: GetPermissionAliases()

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

* refactor: move into unnamed namespace: OnOpenExternal()

refactor: move into unnamed namespace: HandleExternalProtocolInUI()

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

* refactor: move into unnamed namespace: BindMimeHandlerService()

refactor: move into unnamed namespace: BindBeforeUnloadControl()

refactor: move into unnamed namespace: BindBadgeServiceForServiceWorker()

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

* refactor: move into unnamed namespace: GetClientIdPath()

refactor: move into unnamed namespace: ReadClientId()

refactor: move into unnamed namespace: WriteClientId()

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

* refactor: move into unnamed namespace: HasExplicitLogFile()

refactor: move into unnamed namespace: DetermineLoggingDestination()

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

* refactor: move into unnamed namespace: GetArchiveCache()

refactor: move into unnamed namespace: GetArchiveCacheLock()

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

* refactor: move into unnamed namespace: GetParameters()

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

* refactor: move into unnamed namespace: GetDoomed()

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

* refactor: move into unnamed namespace: EncodeToken()

refactor: move into unnamed namespace: PortInfoToValue()

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-08-21 19:43:01 -05:00
trop[bot]
cd944384e2 docs: update timelines for E33 (#43411)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2024-08-21 15:50:50 -07:00
trop[bot]
dbd7840254 chore: bump chromium to 130.0.6669.0 (33-x-y) (#43403)
* chore: bump chromium in DEPS to 130.0.6669.0

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

* 5789734: Consolidate all the accessibility scale factor utility code into one file

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

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

* 5798543: [autofill] Don't emit autofill audit reports if inspector not connected

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

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

* 5797073: [wasm] Spill all loop inputs before entering loop

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

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

* chore: fixup patch indices

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

* 5795224: Version 13.0.0

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

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-08-21 20:20:13 +02:00
Charles Kerr
6263a39d9a refactor: NodeBindings::Create() returns a unique_ptr (#43381)
refactor: NodeBindings::Create() returns a unique_ptr (#43361)

* refactor: NodeBindings::Create() returns a unique_ptr

* empty commit
2024-08-21 10:15:04 +02:00
Keeley Hammond
5134328872 chore: cherry-pick 9797576 from v8 (#43385)
chore: cherry-pick 9797576 from v8 (#43376)

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-08-20 15:46:00 -07:00
Charles Kerr
2d240453de chore: remove unused ConvertableToTraceFormatWrapper (33-x-y) (#43378)
chore: remove unused ConvertableToTraceFormatWrapper (#43356)

* chore: remove unused ConvertableToTraceFormatWrapper

Last use removed in Apr 2024 (39bf441b, #41880)

* fixup! chore: remove unused ConvertableToTraceFormatWrapper

remove now-unused trace_event.h header, too
2024-08-20 16:53:28 -05:00
304 changed files with 2373 additions and 1511 deletions

View File

@@ -69,7 +69,7 @@ runs:
shell: bash
run: |
cd src
e build electron:electron_dist_zip -j $NUMBER_OF_NINJA_PROCESSES
e build --target electron:electron_dist_zip -j $NUMBER_OF_NINJA_PROCESSES
if [ "${{ inputs.is-asan }}" != "true" ]; then
target_os=${{ inputs.target-platform == 'linux' && 'linux' || 'mac'}}
if [ "${{ inputs.artifact-platform }}" = "mas" ]; then
@@ -81,7 +81,7 @@ runs:
shell: bash
run: |
cd src
e build electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES
e build --target electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES
gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
# Remove unused args from mksnapshot_args
SEDOPTION="-i"
@@ -104,7 +104,7 @@ runs:
fi
fi
e build electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
e build --target electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
(cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S)
- name: Generate Cross-Arch Snapshot (arm/arm64) ${{ inputs.step-suffix }}
shell: bash
@@ -130,24 +130,24 @@ runs:
shell: bash
run: |
cd src
e build electron:electron_chromedriver -j $NUMBER_OF_NINJA_PROCESSES
e build electron:electron_chromedriver_zip
e build --target electron:electron_chromedriver -j $NUMBER_OF_NINJA_PROCESSES
e build --target electron:electron_chromedriver_zip
- name: Build Node.js headers ${{ inputs.step-suffix }}
shell: bash
run: |
cd src
e build electron:node_headers
e build --target electron:node_headers
- name: Generate & Zip Symbols ${{ inputs.step-suffix }}
shell: bash
run: |
# Generate breakpad symbols on release builds
if [ "${{ inputs.generate-symbols }}" = "true" ]; then
e build electron:electron_symbols
e build --target electron:electron_symbols
fi
cd src
export BUILD_PATH="$(pwd)/out/Default"
e build electron:licenses
e build electron:electron_version_file
e build --target electron:licenses
e build --target electron:electron_version_file
if [ "${{ inputs.is-release }}" = "true" ]; then
DELETE_DSYMS_AFTER_ZIP=1 electron/script/zip-symbols.py -b $BUILD_PATH
else

View File

@@ -0,0 +1,24 @@
name: 'Generate Types for Archaeologist Dig'
description: 'Generate Types for Archaeologist Dig'
inputs:
sha-file:
description: 'File containing sha'
required: true
filename:
description: 'Filename to write types to'
required: true
runs:
using: "composite"
steps:
- name: Generating Types for SHA in ${{ inputs.sha-file }}
shell: bash
run: |
git checkout $(cat ${{ inputs.sha-file }})
rm -rf node_modules
yarn install --frozen-lockfile --ignore-scripts
echo "#!/usr/bin/env node\nglobal.x=1" > node_modules/typescript/bin/tsc
node node_modules/.bin/electron-docs-parser --dir=./ --outDir=./ --moduleVersion=0.0.0-development
node node_modules/.bin/electron-typescript-definitions --api=electron-api.json --outDir=artifacts
mv artifacts/electron.d.ts artifacts/${{ inputs.filename }}
git checkout .
working-directory: ./electron

61
.github/workflows/archaeologist-dig.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: Archaeologist
on:
pull_request:
jobs:
archaeologist-dig:
name: Archaeologist Dig
runs-on: ubuntu-latest
steps:
- name: Checkout Electron
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.0.2
with:
fetch-depth: 0
- name: Setting Up Dig Site
run: |
echo "remote: ${{ github.event.pull_request.head.repo.clone_url }}"
echo "sha ${{ github.event.pull_request.head.sha }}"
echo "base ref ${{ github.event.pull_request.base.ref }}"
git clone https://github.com/electron/electron.git electron
cd electron
mkdir -p artifacts
git remote add fork ${{ github.event.pull_request.head.repo.clone_url }} && git fetch fork
git checkout ${{ github.event.pull_request.head.sha }}
git merge-base origin/${{ github.event.pull_request.base.ref }} HEAD > .dig-old
echo ${{ github.event.pull_request.head.sha }} > .dig-new
cp .dig-old artifacts
- name: Generating Types for SHA in .dig-new
uses: ./.github/actions/generate-types
with:
sha-file: .dig-new
filename: electron.new.d.ts
- name: Generating Types for SHA in .dig-old
uses: ./.github/actions/generate-types
with:
sha-file: .dig-old
filename: electron.old.d.ts
- name: Upload artifacts
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0
with:
name: artifacts
path: electron/artifacts
include-hidden-files: true
- name: Set job output
run: |
git diff --no-index electron.old.d.ts electron.new.d.ts > patchfile || true
if [ -s patchfile ]; then
echo "Changes Detected"
echo "## Changes Detected" > $GITHUB_STEP_SUMMARY
echo "Looks like the \`electron.d.ts\` file changed." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`\`\`\`diff" >> $GITHUB_STEP_SUMMARY
cat patchfile >> $GITHUB_STEP_SUMMARY
echo "\`\`\`\`\`\`" >> $GITHUB_STEP_SUMMARY
else
echo "No Changes Detected"
echo "## No Changes" > $GITHUB_STEP_SUMMARY
echo "We couldn't see any changes in the \`electron.d.ts\` artifact" >> $GITHUB_STEP_SUMMARY
fi
working-directory: ./electron/artifacts

View File

@@ -53,7 +53,7 @@ jobs:
id: set-output
run: |
if [ -z "${{ inputs.build-image-sha }}" ]; then
echo "build-image-sha=cf814a4d2501e8e843caea071a6b70a48e78b855" >> "$GITHUB_OUTPUT"
echo "build-image-sha=77262e58c37631ab082482f42c33cdf68c6c394b" >> "$GITHUB_OUTPUT"
else
echo "build-image-sha=${{ inputs.build-image-sha }}" >> "$GITHUB_OUTPUT"
fi

View File

@@ -40,7 +40,7 @@ jobs:
with:
generate-sas-token: 'true'
publish-x64:
publish-x64-darwin:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
needs: checkout-macos
with:
@@ -48,13 +48,29 @@ jobs:
build-runs-on: macos-14-xlarge
target-platform: macos
target-arch: x64
target-variant: darwin
is-release: true
gn-build-type: release
generate-symbols: true
upload-to-storage: ${{ inputs.upload-to-storage }}
secrets: inherit
publish-arm64:
publish-x64-mas:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
needs: checkout-macos
with:
environment: production-release
build-runs-on: macos-14-xlarge
target-platform: macos
target-arch: x64
target-variant: mas
is-release: true
gn-build-type: release
generate-symbols: true
upload-to-storage: ${{ inputs.upload-to-storage }}
secrets: inherit
publish-arm64-darwin:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
needs: checkout-macos
with:
@@ -62,6 +78,22 @@ jobs:
build-runs-on: macos-14-xlarge
target-platform: macos
target-arch: arm64
target-variant: darwin
is-release: true
gn-build-type: release
generate-symbols: true
upload-to-storage: ${{ inputs.upload-to-storage }}
secrets: inherit
publish-arm64-mas:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
needs: checkout-macos
with:
environment: production-release
build-runs-on: macos-14-xlarge
target-platform: macos
target-arch: arm64
target-variant: mas
is-release: true
gn-build-type: release
generate-symbols: true

View File

@@ -15,6 +15,10 @@ on:
type: string
description: 'Arch to build for, can be x64, arm64 or arm'
required: true
target-variant:
type: string
description: 'Variant to build for, no effect on non-macOS target platforms. Can be darwin, mas or all.'
default: all
build-runs-on:
type: string
description: 'What host to run the build'
@@ -57,7 +61,7 @@ on:
concurrency:
group: electron-build-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ inputs.is-asan }}-${{ github.ref }}
group: electron-build-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ inputs.target-variant }}-${{ inputs.is-asan }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
env:
@@ -82,6 +86,12 @@ jobs:
with:
path: src/electron
fetch-depth: 0
- name: Free up space (macOS)
if: ${{ inputs.target-platform == 'macos' }}
uses: ./src/electron/.github/actions/free-space-macos
- name: Check disk space after freeing up space
if: ${{ inputs.target-platform == 'macos' }}
run: df -h
- name: Setup Node.js/npm
if: ${{ inputs.target-platform == 'macos' }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
@@ -182,6 +192,7 @@ jobs:
if: ${{ inputs.target-platform == 'macos' }}
uses: ./src/electron/.github/actions/free-space-macos
- name: Build Electron
if: ${{ inputs.target-platform != 'macos' || (inputs.target-variant == 'all' || inputs.target-variant == 'darwin') }}
uses: ./src/electron/.github/actions/build-electron
with:
target-arch: ${{ inputs.target-arch }}
@@ -193,13 +204,13 @@ jobs:
upload-to-storage: '${{ inputs.upload-to-storage }}'
is-asan: '${{ inputs.is-asan }}'
- name: Set GN_EXTRA_ARGS for MAS Build
if: ${{ inputs.target-platform == 'macos' }}
if: ${{ inputs.target-platform == 'macos' && (inputs.target-variant == 'all' || inputs.target-variant == 'mas') }}
run: |
echo "MAS_BUILD=true" >> $GITHUB_ENV
GN_EXTRA_ARGS='is_mas_build=true'
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
- name: Build Electron (MAS)
if: ${{ inputs.target-platform == 'macos' }}
if: ${{ inputs.target-platform == 'macos' && (inputs.target-variant == 'all' || inputs.target-variant == 'mas') }}
uses: ./src/electron/.github/actions/build-electron
with:
target-arch: ${{ inputs.target-arch }}

View File

@@ -54,6 +54,23 @@ jobs:
with:
path: src/electron
fetch-depth: 0
- name: Cleanup disk space on macOS
if: ${{ inputs.target-platform == 'macos' }}
shell: bash
run: |
sudo mkdir -p $TMPDIR/del-target
tmpify() {
if [ -d "$1" ]; then
sudo mv "$1" $TMPDIR/del-target/$(echo $1|shasum -a 256|head -n1|cut -d " " -f1)
fi
}
tmpify /Library/Developer/CoreSimulator
tmpify ~/Library/Developer/CoreSimulator
sudo rm -rf $TMPDIR/del-target
- name: Check disk space after freeing up space
if: ${{ inputs.target-platform == 'macos' }}
run: df -h
- name: Install Build Tools
uses: ./src/electron/.github/actions/install-build-tools
- name: Init Build Tools

View File

@@ -733,6 +733,7 @@ source_set("electron_lib") {
"//components/pdf/common:util",
"//components/pdf/renderer",
"//pdf",
"//pdf:content_restriction",
]
sources += [
"shell/browser/electron_pdf_document_helper_client.cc",

4
DEPS
View File

@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'129.0.6668.0',
'130.0.6672.0',
'node_version':
'v20.16.0',
'v20.17.0',
'nan_version':
'e14bdcd1f72d62bca1d541b66da43130384ec213',
'squirrel.mac_version':

View File

@@ -29,7 +29,7 @@
version: 1.0.{build}
build_cloud: electronhq-16-core
image: e-129.0.6656.0
image: e-130.0.6672.0
environment:
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
ELECTRON_OUT_DIR: Default
@@ -95,6 +95,8 @@ for:
- git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
- ps: New-Item -Name depot_tools\.disable_auto_update -ItemType File
- depot_tools\bootstrap\win_tools.bat
- ps: |
Set-Content -Path $pwd\depot_tools\build_telemetry.cfg -Value '{"user": "info@electronjs.org", "status": "opt-out", "countdown": 10, "version": 1}'
- ps: $env:PATH="$pwd\depot_tools;$env:PATH"
- ps: >-
if (Test-Path -Path "$pwd\src\electron") {
@@ -115,6 +117,13 @@ for:
$env:RBE_experimental_credentials_helper = $env:RECLIENT_HELPER
- ps: >-
$env:RBE_experimental_credentials_helper_args = "print"
- ps: >-
if ($env:ELECTRON_RBE_JWT -eq '') {
$env:RBE_fail_early_min_action_count = "0"
$env:RBE_fail_early_min_fallback_ratio = "0"
$env:RBE_exec_strategy = "local"
$env:RBE_remote_update_cache= "false"
}
- cd ..\..
- ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools"
- ps: >-
@@ -167,8 +176,8 @@ for:
if ($env:GN_CONFIG -eq 'release') {
# Needed for msdia140.dll on 64-bit windows
$env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin"
autoninja -C out/Default electron:electron_symbols
}
- if "%GN_CONFIG%"=="release" ( autoninja -C out/Default electron:electron_symbols )
- ps: >-
if ($env:GN_CONFIG -eq 'release') {
python3 electron\script\zip-symbols.py

View File

@@ -29,7 +29,7 @@
version: 1.0.{build}
build_cloud: electronhq-16-core
image: e-129.0.6656.0
image: e-130.0.6672.0
environment:
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
ELECTRON_OUT_DIR: Default
@@ -93,6 +93,8 @@ for:
- git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
- ps: New-Item -Name depot_tools\.disable_auto_update -ItemType File
- depot_tools\bootstrap\win_tools.bat
- ps: |
Set-Content -Path $pwd\depot_tools\build_telemetry.cfg -Value '{"user": "info@electronjs.org", "status": "opt-out", "countdown": 10, "version": 1}'
- ps: $env:PATH="$pwd\depot_tools;$env:PATH"
- ps: >-
if (Test-Path -Path "$pwd\src\electron") {
@@ -113,6 +115,13 @@ for:
$env:RBE_experimental_credentials_helper = $env:RECLIENT_HELPER
- ps: >-
$env:RBE_experimental_credentials_helper_args = "print"
- ps: >-
if ($env:ELECTRON_RBE_JWT -eq '') {
$env:RBE_fail_early_min_action_count = "0"
$env:RBE_fail_early_min_fallback_ratio = "0"
$env:RBE_exec_strategy = "local"
$env:RBE_remote_update_cache= "false"
}
- cd ..\..
- ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools"
- ps: >-
@@ -164,8 +173,8 @@ for:
if ($env:GN_CONFIG -eq 'release') {
# Needed for msdia140.dll on 64-bit windows
$env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin"
autoninja -C out/Default electron:electron_symbols
}
- if "%GN_CONFIG%"=="release" ( autoninja -C out/Default electron:electron_symbols )
- ps: >-
if ($env:GN_CONFIG -eq 'release') {
python3 electron\script\zip-symbols.py

View File

@@ -114,6 +114,8 @@ static_library("chrome") {
"//chrome/browser/ui/view_ids.h",
"//chrome/browser/ui/views/eye_dropper/eye_dropper.cc",
"//chrome/browser/ui/views/eye_dropper/eye_dropper.h",
"//chrome/browser/ui/views/overlay/back_to_tab_button.cc",
"//chrome/browser/ui/views/overlay/back_to_tab_button.h",
"//chrome/browser/ui/views/overlay/back_to_tab_label_button.cc",
"//chrome/browser/ui/views/overlay/close_image_button.cc",
"//chrome/browser/ui/views/overlay/close_image_button.h",

View File

@@ -147,6 +147,25 @@ has been included below for completeness:
If the type you care about is not in the above table, it is probably not supported.
### Exposing ipcRenderer
Attempting to send the entire `ipcRenderer` module as an object over the `contextBridge` will result in
an empty object on the receiving side of the bridge. Sending over `ipcRenderer` in full can let any
code send any message, which is a security footgun. To interact through `ipcRenderer`, provide a safe wrapper
like below:
```js
// Preload (Isolated World)
contextBridge.exposeInMainWorld('electron', {
onMyEventName: (callback) => ipcRenderer.on('MyEventName', (e, ...args) => callback(args))
})
```
```js @ts-nocheck
// Renderer (Main World)
window.electron.onMyEventName(data => { /* ... */ })
```
### Exposing Node Global Symbols
The `contextBridge` can be used by the preload script to give your renderer access to Node APIs.

View File

@@ -20,7 +20,11 @@ app.whenReady().then(() => {
// Grant access to the first screen found.
callback({ video: sources[0], audio: 'loopback' })
})
})
// If true, use the system picker if available.
// Note: this is currently experimental. If the system picker
// is available, it will be used and the media request handler
// will not be invoked.
}, { useSystemPicker: true })
mainWindow.loadFile('index.html')
})

View File

@@ -10,9 +10,9 @@ See [`Menu`](menu.md) for examples.
* `options` Object
* `click` Function (optional) - Will be called with
`click(menuItem, browserWindow, event)` when the menu item is clicked.
`click(menuItem, window, event)` when the menu item is clicked.
* `menuItem` MenuItem
* `browserWindow` [BrowserWindow](browser-window.md) | undefined - This will not be defined if no window is open.
* `window` [BaseWindow](base-window.md) | undefined - This will not be defined if no window is open.
* `event` [KeyboardEvent](structures/keyboard-event.md)
* `role` string (optional) - Can be `undo`, `redo`, `cut`, `copy`, `paste`, `pasteAndMatchStyle`, `delete`, `selectAll`, `reload`, `forceReload`, `toggleDevTools`, `resetZoom`, `zoomIn`, `zoomOut`, `toggleSpellChecker`, `togglefullscreen`, `window`, `minimize`, `close`, `help`, `about`, `services`, `hide`, `hideOthers`, `unhide`, `quit`, `showSubstitutions`, `toggleSmartQuotes`, `toggleSmartDashes`, `toggleTextReplacement`, `startSpeaking`, `stopSpeaking`, `zoom`, `front`, `appMenu`, `fileMenu`, `editMenu`, `viewMenu`, `shareMenu`, `recentDocuments`, `toggleTabBar`, `selectNextTab`, `selectPreviousTab`, `showAllTabs`, `mergeAllWindows`, `clearRecentDocuments`, `moveTabToNewWindow` or `windowMenu` - Define the action of the menu item, when specified the
`click` property will be ignored. See [roles](#roles).
@@ -146,7 +146,7 @@ A `Function` that is fired when the MenuItem receives a click event.
It can be called with `menuItem.click(event, focusedWindow, focusedWebContents)`.
* `event` [KeyboardEvent](structures/keyboard-event.md)
* `focusedWindow` [BrowserWindow](browser-window.md)
* `focusedWindow` [BaseWindow](browser-window.md)
* `focusedWebContents` [WebContents](web-contents.md)
#### `menuItem.submenu`

View File

@@ -36,7 +36,7 @@ Returns `boolean` - Whether or not desktop notifications are supported on the cu
* `subtitle` string (optional) _macOS_ - A subtitle for the notification, which will be displayed below the title.
* `body` string (optional) - The body text of the notification, which will be displayed below the title or subtitle.
* `silent` boolean (optional) - Whether or not to suppress the OS notification noise when showing the notification.
* `icon` (string | [NativeImage](native-image.md)) (optional) - An icon to use in the notification.
* `icon` (string | [NativeImage](native-image.md)) (optional) - An icon to use in the notification. If a string is passed, it must be a valid path to a local icon file.
* `hasReply` boolean (optional) _macOS_ - Whether or not to add an inline reply option to the notification.
* `timeoutType` string (optional) _Linux_ _Windows_ - The timeout duration of the notification. Can be 'default' or 'never'.
* `replyPlaceholder` string (optional) _macOS_ - The placeholder to write in the inline reply input field.

View File

@@ -953,7 +953,7 @@ session.fromPartition('some-partition').setPermissionCheckHandler((webContents,
})
```
#### `ses.setDisplayMediaRequestHandler(handler)`
#### `ses.setDisplayMediaRequestHandler(handler[, opts])`
* `handler` Function | null
* `request` Object
@@ -980,12 +980,18 @@ session.fromPartition('some-partition').setPermissionCheckHandler((webContents,
and this is set to `true`, then local playback of audio will not be muted (e.g. using `MediaRecorder`
to record `WebFrameMain` with this flag set to `true` will allow audio to pass through to the speakers
while recording). Default is `false`.
* `opts` Object (optional) _macOS_ _Experimental_
* `useSystemPicker` Boolean - true if the available native system picker should be used. Default is `false`. _macOS_ _Experimental_
This handler will be called when web content requests access to display media
via the `navigator.mediaDevices.getDisplayMedia` API. Use the
[desktopCapturer](desktop-capturer.md) API to choose which stream(s) to grant
access to.
`useSystemPicker` allows an application to use the system picker instead of providing a specific video source from `getSources`.
This option is experimental, and currently available for MacOS 15+ only. If the system picker is available and `useSystemPicker`
is set to `true`, the handler will not be invoked.
```js
const { session, desktopCapturer } = require('electron')
@@ -994,7 +1000,11 @@ session.defaultSession.setDisplayMediaRequestHandler((request, callback) => {
// Grant access to the first screen found.
callback({ video: sources[0] })
})
})
// Use the system picker if available.
// Note: this is currently experimental. If the system picker
// is available, it will be used and the media request handler
// will not be invoked.
}, { useSystemPicker: true })
```
Passing a [WebFrameMain](web-frame-main.md) object as a video or audio stream
@@ -1511,7 +1521,7 @@ Returns `Promise<void>` - resolves when all data has been cleared.
Clears various different types of data.
This method clears more types of data and is more thourough than the
This method clears more types of data and is more thorough than the
`clearStorageData` method.
**Note:** Cookies are stored at a broader scope than origins. When removing cookies and filtering by `origins` (or `excludeOrigins`), the cookies will be removed at the [registrable domain](https://url.spec.whatwg.org/#host-registrable-domain) level. For example, clearing cookies for the origin `https://really.specific.origin.example.com/` will end up clearing all cookies for `example.com`. Clearing cookies for the origin `https://my.website.example.co.uk/` will end up clearing all cookies for `example.co.uk`.

View File

@@ -91,6 +91,10 @@
title bar and a full size content window, the traffic light buttons will
display when being hovered over in the top left of the window.
**Note:** This option is currently experimental.
* `titleBarOverlay` Object | Boolean (optional) - When using a frameless window in conjunction with `win.setWindowButtonVisibility(true)` on macOS or using a `titleBarStyle` so that the standard window controls ("traffic lights" on macOS) are visible, this property enables the Window Controls Overlay [JavaScript APIs][overlay-javascript-apis] and [CSS Environment Variables][overlay-css-env-vars]. Specifying `true` will result in an overlay with default system colors. Default is `false`.
* `color` String (optional) _Windows_ _Linux_ - The CSS color of the Window Controls Overlay when enabled. Default is the system color.
* `symbolColor` String (optional) _Windows_ - The CSS color of the symbols on the Window Controls Overlay when enabled. Default is the system color.
* `height` Integer (optional) - The height of the title bar and Window Controls Overlay in pixels. Default is system height.
* `trafficLightPosition` [Point](point.md) (optional) _macOS_ -
Set a custom position for the traffic light buttons in frameless windows.
* `roundedCorners` boolean (optional) _macOS_ - Whether frameless window
@@ -149,3 +153,6 @@ Possible values are:
reserved for NSPanel, at runtime. Also, the window will appear on all
spaces (desktops).
* On Windows, possible type is `toolbar`.
[overlay-css-env-vars]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#css-environment-variables
[overlay-javascript-apis]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#javascript-apis

View File

@@ -2,10 +2,3 @@
* `webPreferences` [WebPreferences](web-preferences.md?inline) (optional) - Settings of web page's features.
* `paintWhenInitiallyHidden` boolean (optional) - Whether the renderer should be active when `show` is `false` and it has just been created. In order for `document.visibilityState` to work correctly on first load with `show: false` you should set this to `false`. Setting this to `false` will cause the `ready-to-show` event to not fire. Default is `true`.
* `titleBarOverlay` Object | Boolean (optional) - When using a frameless window in conjunction with `win.setWindowButtonVisibility(true)` on macOS or using a `titleBarStyle` so that the standard window controls ("traffic lights" on macOS) are visible, this property enables the Window Controls Overlay [JavaScript APIs][overlay-javascript-apis] and [CSS Environment Variables][overlay-css-env-vars]. Specifying `true` will result in an overlay with default system colors. Default is `false`.
* `color` String (optional) _Windows_ _Linux_ - The CSS color of the Window Controls Overlay when enabled. Default is the system color.
* `symbolColor` String (optional) _Windows_ - The CSS color of the symbols on the Window Controls Overlay when enabled. Default is the system color.
* `height` Integer (optional) - The height of the title bar and Window Controls Overlay in pixels. Default is system height.
[overlay-css-env-vars]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#css-environment-variables
[overlay-javascript-apis]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#javascript-apis

View File

@@ -39,7 +39,7 @@ updates the control in the touch bar. Possible values:
#### `touchBarScrubber.overlayStyle`
A `string` representing the style that selected items in the scrubber should have. This style is overlayed on top
A `string` representing the style that selected items in the scrubber should have. This style is overlaid on top
of the scrubber item instead of being placed behind it. Updating this value immediately updates the control in the
touch bar. Possible values:

View File

@@ -55,6 +55,8 @@ it becomes the topmost view.
* `view` View - Child view to remove.
If the view passed as a parameter is not a child of this view, this method is a no-op.
#### `view.setBounds(bounds)`
* `bounds` [Rectangle](structures/rectangle.md) - New bounds of the View.

View File

@@ -14,7 +14,7 @@ The `webUtils` module has the following methods:
Returns `string` - The file system path that this `File` object points to. In the case where the object passed in is not a `File` object an exception is thrown. In the case where the File object passed in was constructed in JS and is not backed by a file on disk an empty string is returned.
This method superceded the previous augmentation to the `File` object with the `path` property. An example is included below.
This method superseded the previous augmentation to the `File` object with the `path` property. An example is included below.
```js
// Before

View File

@@ -65,6 +65,8 @@ $ git rebase --autosquash -i [COMMIT_SHA]^
$ ../electron/script/git-export-patches -o ../electron/patches/v8
```
Note that the `^` symbol [can cause trouble on Windows](https://stackoverflow.com/questions/14203952/git-reset-asks-more/14204318#14204318). The workaround is to either quote it `"[COMMIT_SHA]^"` or avoid it `[COMMIT_SHA]~1`.
#### Removing a patch
```bash

View File

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

View File

@@ -97,7 +97,7 @@ The [Window Controls Overlay API][] is a web standard that gives web apps the ab
customize their title bar region when installed on desktop. Electron exposes this API
through the `BrowserWindow` constructor option `titleBarOverlay`.
This option only works whenever a custom `titlebarStyle` is applied on macOS or Windows.
This option only works whenever a custom `titlebarStyle` is applied.
When `titleBarOverlay` is enabled, the window controls become exposed in their default
position, and DOM elements cannot use the area underneath this region.
@@ -107,7 +107,6 @@ Specifying `true` on either platform will result in an overlay region with defau
system colors:
```js title='main.js'
// on macOS or Windows
const { BrowserWindow } = require('electron')
const win = new BrowserWindow({
titleBarStyle: 'hidden',

View File

@@ -270,6 +270,7 @@ filenames = {
"shell/browser/api/electron_api_debugger.h",
"shell/browser/api/electron_api_desktop_capturer.cc",
"shell/browser/api/electron_api_desktop_capturer.h",
"shell/browser/api/electron_api_desktop_capturer_mac.mm",
"shell/browser/api/electron_api_dialog.cc",
"shell/browser/api/electron_api_download_item.cc",
"shell/browser/api/electron_api_download_item.h",

View File

@@ -1,5 +1,7 @@
import { EventEmitter } from 'events';
import type { BaseWindow as TLWT } from 'electron/main';
import { TouchBar } from 'electron/main';
const { BaseWindow } = process._linkedBinding('electron_browser_base_window') as { BaseWindow: typeof TLWT };
Object.setPrototypeOf(BaseWindow.prototype, EventEmitter.prototype);
@@ -15,6 +17,10 @@ BaseWindow.prototype._init = function (this: TLWT) {
}
};
BaseWindow.prototype.setTouchBar = function (touchBar) {
(TouchBar as any)._setOnWindow(touchBar, this);
};
// Properties
Object.defineProperty(BaseWindow.prototype, 'autoHideMenuBar', {

View File

@@ -145,6 +145,12 @@ export default class BrowserView {
if (this.#autoHorizontalProportion || this.#autoVerticalProportion) {
this.#webContentsView.setBounds(newViewBounds);
}
// Update #lastWindowSize value after browser windows resize
this.#lastWindowSize = {
width: newBounds.width,
height: newBounds.height
};
}
get webContentsView () {

View File

@@ -1,4 +1,4 @@
import { BaseWindow, WebContents, TouchBar, BrowserView } from 'electron/main';
import { BaseWindow, WebContents, BrowserView } from 'electron/main';
import type { BrowserWindow as BWT } from 'electron/main';
const { BrowserWindow } = process._linkedBinding('electron_browser_window') as { BrowserWindow: typeof BWT };
@@ -100,10 +100,6 @@ BrowserWindow.fromBrowserView = (browserView: BrowserView) => {
return BrowserWindow.fromWebContents(browserView.webContents);
};
BrowserWindow.prototype.setTouchBar = function (touchBar) {
(TouchBar as any)._setOnWindow(touchBar, this);
};
// Forwarded to webContents:
BrowserWindow.prototype.loadURL = function (...args) {

View File

@@ -1,5 +1,5 @@
import { BrowserWindow } from 'electron/main';
const { createDesktopCapturer } = process._linkedBinding('electron_browser_desktop_capturer');
const { createDesktopCapturer, isDisplayMediaSystemPickerAvailable } = process._linkedBinding('electron_browser_desktop_capturer');
const deepEqual = (a: ElectronInternal.GetSourcesOptions, b: ElectronInternal.GetSourcesOptions) => JSON.stringify(a) === JSON.stringify(b);
@@ -13,6 +13,8 @@ function isValid (options: Electron.SourcesOptions) {
return Array.isArray(options?.types);
}
export { isDisplayMediaSystemPickerAvailable };
export async function getSources (args: Electron.SourcesOptions) {
if (!isValid(args)) throw new Error('Invalid options');

View File

@@ -1,4 +1,4 @@
import { app, BrowserWindow, session, webContents, WebContents, MenuItemConstructorOptions } from 'electron/main';
import { app, BaseWindow, BrowserWindow, session, webContents, WebContents, MenuItemConstructorOptions } from 'electron/main';
const isMac = process.platform === 'darwin';
const isWindows = process.platform === 'win32';
@@ -13,7 +13,7 @@ interface Role {
label: string;
accelerator?: string;
checked?: boolean;
windowMethod?: ((window: BrowserWindow) => void);
windowMethod?: ((window: BaseWindow) => void);
webContentsMethod?: ((webContents: WebContents) => void);
appMethod?: () => void;
registerAccelerator?: boolean;
@@ -53,8 +53,10 @@ export const roleList: Record<RoleId, Role> = {
label: 'Force Reload',
accelerator: 'Shift+CmdOrCtrl+R',
nonNativeMacOSRole: true,
windowMethod: (window: BrowserWindow) => {
window.webContents.reloadIgnoringCache();
windowMethod: (window: BaseWindow) => {
if (window instanceof BrowserWindow) {
window.webContents.reloadIgnoringCache();
}
}
},
front: {
@@ -110,7 +112,11 @@ export const roleList: Record<RoleId, Role> = {
label: 'Reload',
accelerator: 'CmdOrCtrl+R',
nonNativeMacOSRole: true,
windowMethod: w => w.reload()
windowMethod: (w: BaseWindow) => {
if (w instanceof BrowserWindow) {
w.reload();
}
}
},
resetzoom: {
label: 'Actual Size',
@@ -164,7 +170,7 @@ export const roleList: Record<RoleId, Role> = {
togglefullscreen: {
label: 'Toggle Full Screen',
accelerator: isMac ? 'Control+Command+F' : 'F11',
windowMethod: (window: BrowserWindow) => {
windowMethod: (window: BaseWindow) => {
window.setFullScreen(!window.isFullScreen());
}
},
@@ -361,7 +367,7 @@ export function getDefaultSubmenu (role: RoleId) {
return submenu;
}
export function execute (role: RoleId, focusedWindow: BrowserWindow, focusedWebContents: WebContents) {
export function execute (role: RoleId, focusedWindow: BaseWindow, focusedWebContents: WebContents) {
if (!canExecuteRole(role)) return false;
const { appMethod, webContentsMethod, windowMethod } = roleList[role];

View File

@@ -1,5 +1,5 @@
import * as roles from '@electron/internal/browser/api/menu-item-roles';
import { Menu, BrowserWindow, WebContents, KeyboardEvent } from 'electron/main';
import { Menu, BaseWindow, WebContents, KeyboardEvent } from 'electron/main';
let nextCommandId = 0;
@@ -53,7 +53,7 @@ const MenuItem = function (this: any, options: any) {
});
const click = options.click;
this.click = (event: KeyboardEvent, focusedWindow: BrowserWindow, focusedWebContents: WebContents) => {
this.click = (event: KeyboardEvent, focusedWindow: BaseWindow, focusedWebContents: WebContents) => {
// Manually flip the checked flags when clicked.
if (!roles.shouldOverrideCheckStatus(this.role) &&
(this.type === 'checkbox' || this.type === 'radio')) {

View File

@@ -1,4 +1,4 @@
import { BaseWindow, MenuItem, webContents, Menu as MenuType, BrowserWindow, MenuItemConstructorOptions } from 'electron/main';
import { BaseWindow, MenuItem, webContents, Menu as MenuType, MenuItemConstructorOptions } from 'electron/main';
import { sortMenuItems } from '@electron/internal/browser/api/menu-utils';
import { setApplicationMenuWasSet } from '@electron/internal/browser/default-menu';
@@ -54,7 +54,7 @@ Menu.prototype._executeCommand = function (event, id) {
const command = this.commandsMap[id];
if (!command) return;
const focusedWindow = BaseWindow.getFocusedWindow();
command.click(event, focusedWindow instanceof BrowserWindow ? focusedWindow : undefined, webContents.getFocusedWebContents());
command.click(event, focusedWindow, webContents.getFocusedWebContents());
};
Menu.prototype._menuWillShow = function () {

View File

@@ -1,11 +1,39 @@
import { fetchWithSession } from '@electron/internal/browser/api/net-fetch';
import { net } from 'electron/main';
const { fromPartition, fromPath, Session } = process._linkedBinding('electron_browser_session');
const { isDisplayMediaSystemPickerAvailable } = process._linkedBinding('electron_browser_desktop_capturer');
// Fake video window that activates the native system picker
// This is used to get around the need for a screen/window
// id in Chrome's desktopCapturer.
let fakeVideoWindowId = -1;
// See content/public/browser/desktop_media_id.h
const kMacOsNativePickerId = -4;
const systemPickerVideoSource = Object.create(null);
Object.defineProperty(systemPickerVideoSource, 'id', {
get () {
return `window:${kMacOsNativePickerId}:${fakeVideoWindowId--}`;
}
});
systemPickerVideoSource.name = '';
Object.freeze(systemPickerVideoSource);
Session.prototype.fetch = function (input: RequestInfo, init?: RequestInit) {
return fetchWithSession(input, init, this, net.request);
};
Session.prototype.setDisplayMediaRequestHandler = function (handler, opts) {
if (!handler) return this._setDisplayMediaRequestHandler(handler, opts);
this._setDisplayMediaRequestHandler(async (req, callback) => {
if (opts && opts.useSystemPicker && isDisplayMediaSystemPickerAvailable()) {
return callback({ video: systemPickerVideoSource });
}
return handler(req, callback);
}, opts);
};
export default {
fromPartition,
fromPath,

View File

@@ -284,7 +284,7 @@ const escapeItemSymbol = Symbol('escape item');
class TouchBar extends EventEmitter implements Electron.TouchBar {
// Bind a touch bar to a window
static _setOnWindow (touchBar: TouchBar | Electron.TouchBarConstructorOptions['items'], window: Electron.BrowserWindow) {
static _setOnWindow (touchBar: TouchBar | Electron.TouchBarConstructorOptions['items'], window: Electron.BaseWindow) {
if (window._touchBar != null) {
window._touchBar._removeFromWindow(window);
}
@@ -383,7 +383,7 @@ class TouchBar extends EventEmitter implements Electron.TouchBar {
return this[escapeItemSymbol];
}
_addToWindow (window: Electron.BrowserWindow) {
_addToWindow (window: Electron.BaseWindow) {
const { id } = window;
// Already added to window
@@ -439,7 +439,7 @@ class TouchBar extends EventEmitter implements Electron.TouchBar {
escapeItemListener(this.escapeItem);
}
_removeFromWindow (window: Electron.BrowserWindow) {
_removeFromWindow (window: Electron.BaseWindow) {
const removeListeners = this.windowListeners.get(window.id);
if (removeListeners != null) removeListeners();
}

View File

@@ -71,14 +71,6 @@ export function openGuestWindow ({ embedder, guest, referrer, disposition, postD
throw new Error('Invalid webContents. Created window should be connected to webContents passed with options object.');
}
webContents.loadURL(url, {
httpReferrer: referrer,
...(postData && {
postData,
extraHeaders: formatPostDataHeaders(postData as Electron.UploadRawData[])
})
});
handleWindowLifecycleEvents({ embedder, frameName, guest, outlivesOpener });
}

View File

@@ -212,7 +212,7 @@ if (packagePath) {
}
});
} else {
// Call appCodeLoaded before just for safety, it doesn't matter here as _load is syncronous
// Call appCodeLoaded before just for safety, it doesn't matter here as _load is synchronous
appCodeLoaded!();
process._firstFileName = Module._resolveFilename(path.join(packagePath, mainStartupScript), null, false);
Module._load(path.join(packagePath, mainStartupScript), Module, true);

View File

@@ -129,3 +129,5 @@ feat_enable_passing_exit_code_on_service_process_crash.patch
chore_remove_reference_to_chrome_browser_themes.patch
feat_enable_customizing_symbol_color_in_framecaptionbutton.patch
build_expose_webplugininfo_interface_to_electron.patch
feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
feat_allow_-4_as_a_macos_screen_share_id.patch

View File

@@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
This should be upstreamed.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index abe3efcde9def9144804ec2a7f3b5ebfa308bcb7..70da55386d842a9f4ff6e84b13b9f1d99244516e 100644
index d2be94d0d77ef798c888177cd4b882521335059b..8ed6f393da68f6d4ccb951f4d2c951e66e791b8f 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -258,6 +258,10 @@ int GpuMain(MainFunctionParams parameters) {
@@ -24,7 +24,7 @@ index abe3efcde9def9144804ec2a7f3b5ebfa308bcb7..70da55386d842a9f4ff6e84b13b9f1d9
// We are experiencing what appear to be memory-stomp issues in the GPU
// process. These issues seem to be impacting the task executor and listeners
// registered to it. Create the task executor on the heap to guard against
@@ -357,7 +361,6 @@ int GpuMain(MainFunctionParams parameters) {
@@ -358,7 +362,6 @@ int GpuMain(MainFunctionParams parameters) {
#endif
const bool dead_on_arrival = !init_success;

View File

@@ -23,7 +23,7 @@ index ad0092ef2e13853e4bb8b923481559a043b00ab7..1c2dfd23f18733e21312992877ae1499
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 498cec822e5f1b36f4864bcf8bb8f31f11e96456..f1fef17fba419e26dfe82c4449621447b0f2f2a0 100644
index 6d7b1acf986b8cd83c10c43135a975e6a2c9db7f..55ef555fd10a08a5b903e2e86b363934c9d026b9 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4722,6 +4722,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,

View File

@@ -23,10 +23,10 @@ index 68ef2666b57f95f0a4f463c34ca4b074b9e38d87..d399155b4221f4ea49cc57b14d2cd084
return receiver_.BindNewEndpointAndPassDedicatedRemote();
}
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 2dcb41397b68ee22e71a4e21adcc843abc1422aa..5d94da88fe9c8ca0f94644b9940886967ae64b40 100644
index 6876e6cc484741d23b0b13f6b44a1327b63a470d..8cc8441e1343ac420ad0f35374b9060e9a3f35b7 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -738,6 +738,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -753,6 +753,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@@ -104,10 +104,10 @@ index c980f3f76a37a4207bb54f18fbcdb8d0950c8856..91a9dfe56fbbcd1cc873add438947dd2
+ SetSchedulerThrottling(bool allowed);
};
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
index 4220a0aebf4a2ce3d62f76c441b6ec1b5e11ffa1..6ea17602d2b186b81cf7dc69750bd302ff717aea 100644
index 746af7113a66d26de389237ebd90ec9e6a569cc3..f2f14184eafc919a303da6679a516bdd3a825a51 100644
--- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h
@@ -362,6 +362,7 @@ class BLINK_EXPORT WebView {
@@ -368,6 +368,7 @@ class BLINK_EXPORT WebView {
// Scheduling -----------------------------------------------------------
virtual PageScheduler* Scheduler() const = 0;
@@ -116,10 +116,10 @@ index 4220a0aebf4a2ce3d62f76c441b6ec1b5e11ffa1..6ea17602d2b186b81cf7dc69750bd302
// 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 42b00bd0b3c228824a6765496a9badde3cb8871b..c27999d3380185c082b828f1c3644dda35361eac 100644
index 8f3603538170a4e66a3f832b1882ed587383cfcc..3f3945f8aa35513050060df8d65059b89f9b3933 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2443,6 +2443,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
@@ -2449,6 +2449,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
"old_state", old_state, "new_state", new_state);
@@ -130,7 +130,7 @@ index 42b00bd0b3c228824a6765496a9badde3cb8871b..c27999d3380185c082b828f1c3644dda
bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
!old_state->is_in_back_forward_cache;
bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
@@ -3965,10 +3969,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3971,10 +3975,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@@ -155,10 +155,10 @@ index 42b00bd0b3c228824a6765496a9badde3cb8871b..c27999d3380185c082b828f1c3644dda
// Do not throttle if the page should be painting.
bool is_visible =
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
index d4f129c072ef1c9d26b7c7123fc517b0f20bfa05..309440db5306b588fd8db9607ee8ca39ea6ebe7e 100644
index 69318d9676ed633de315c8b2167679439a3874c1..8b9593d8bcaeed498257bd11eb1027fc78ba14bd 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -446,6 +446,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -448,6 +448,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override;
@@ -166,7 +166,7 @@ index d4f129c072ef1c9d26b7c7123fc517b0f20bfa05..309440db5306b588fd8db9607ee8ca39
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -926,6 +927,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -929,6 +930,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

@@ -11,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index a79561241a182e5e168201598aef29dd2fff3d02..7877c4a4609a2915d2661b85e2f99f6a741f2d6d 100644
index 78923a81c64fb7738f4e457e3166a88f3c150564..ee348433544550f99622b52252fd1064c46da35a 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -196,11 +196,16 @@ if (!is_android && !is_mac) {
@@ -200,11 +200,16 @@ if (!is_android && !is_mac) {
"common/crash_keys.h",
]
@@ -33,10 +33,10 @@ index a79561241a182e5e168201598aef29dd2fff3d02..7877c4a4609a2915d2661b85e2f99f6a
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 59773d17657448a508a8cea31ca3a1f72f3c5abc..9b8941bbcef63772715e05521a8d6c91db3cb600 100644
index 7a23e63b800f87b6189ca04ce33c2c9b971e1152..50c51fad27925adf4a1e5fc9e03f7bca2153daa5 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4474,7 +4474,7 @@ static_library("browser") {
@@ -4482,7 +4482,7 @@ static_library("browser") {
]
}
@@ -46,10 +46,10 @@ index 59773d17657448a508a8cea31ca3a1f72f3c5abc..9b8941bbcef63772715e05521a8d6c91
# than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index d93bf848e80c87b924cd1d0fd4d6a8588cedd642..4fc0bbe2a5d10c2c59cc9b66c1790ce7062c38e6 100644
index 633854df22c94cb2b7e02c1eda2663ca8091e11e..79ed45cf2b14ac3f504317305f4ae10e5413ff63 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -7049,9 +7049,12 @@ test("unit_tests") {
@@ -7050,9 +7050,12 @@ test("unit_tests") {
"//chrome/notification_helper",
]
@@ -63,7 +63,7 @@ index d93bf848e80c87b924cd1d0fd4d6a8588cedd642..4fc0bbe2a5d10c2c59cc9b66c1790ce7
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -8080,6 +8083,10 @@ test("unit_tests") {
@@ -8079,6 +8082,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
]
@@ -74,7 +74,7 @@ index d93bf848e80c87b924cd1d0fd4d6a8588cedd642..4fc0bbe2a5d10c2c59cc9b66c1790ce7
sources += [
# The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc",
@@ -8147,7 +8154,6 @@ test("unit_tests") {
@@ -8146,7 +8153,6 @@ test("unit_tests") {
# Non-android deps for "unit_tests" target.
deps += [
"../browser/screen_ai:screen_ai_install_state",

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 9c63417070d5a7a2ce734703990ccff8908abe3c..07a730f626ca1e8b9f360cd706041de98adbc213 100644
index 14f11b689cc55f3dd2a53598bba504e5fb317f6c..7a436aa00f9a54ff04dc05f0a49776b6acc81c1e 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -8870,6 +8870,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -8876,6 +8876,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 9c63417070d5a7a2ce734703990ccff8908abe3c..07a730f626ca1e8b9f360cd706041de9
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index e8eb786e8f3992046b5a0112c0fe76ff414f26b3..56c87788fdbe3c50bb5b9dea47a35510a42b4e8e 100644
index 69f8d47043457b8a5947585d474bebfc963cc2c0..30f60283002c6b0fb540a47def95e8496dccebdb 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4756,6 +4756,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4760,6 +4760,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
new_contents_impl->partitioned_popin_opener_ = opener->GetWeakPtr();
}
@@ -37,7 +37,7 @@ index e8eb786e8f3992046b5a0112c0fe76ff414f26b3..56c87788fdbe3c50bb5b9dea47a35510
// If the new frame has a name, make sure any SiteInstances that can find
// this named frame have proxies for it. Must be called after
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
@@ -4797,12 +4803,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4801,12 +4807,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@@ -51,10 +51,10 @@ index e8eb786e8f3992046b5a0112c0fe76ff414f26b3..56c87788fdbe3c50bb5b9dea47a35510
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 37a00f8d520e6043faa9b202e2f7a3d7a0794664..08b56afaa591137aafc4aad38da84361742bbe66 100644
index aa982181c584f25e11383bcdac7d11fd6d72105f..79e9eac46a5ccc54a9a6a167b81e31f6b4ae0ddf 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -605,6 +605,10 @@ struct CreateNewWindowParams {
@@ -610,6 +610,10 @@ struct CreateNewWindowParams {
// The navigation initiator's user activation and ad status.
blink.mojom.NavigationInitiatorActivationAndAdStatus
initiator_activation_and_ad_status;
@@ -79,7 +79,7 @@ index 79c37e0aeb8aa1cca6db91ab5ac572cde61e65c5..58253590cfacda1684ab968c9dda7a4f
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 ddca696e47412f0a054fd8c305bcca19a225e3e9..e3b8c5ba47193b57124ce743179a1b2009eb3ce7 100644
index 19891b56fca5d0633b0ad3fb162918c3a2df1962..1aabf4da23e5492c33b3d29bf5cc641aba510bda 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -190,6 +190,7 @@ class NetworkService;
@@ -148,7 +148,7 @@ index 553a8726a501171a44cbca4d7d8a9e026347f1c8..c4ba5fb97c43609fe570ce3401bb9f07
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 3a708d41f0a10d6179dadcdbcd4c9f46bfc8149e..498cec822e5f1b36f4864bcf8bb8f31f11e96456 100644
index b3abe03a22357fa98e604e87fd9cdd8b6e804eff..6d7b1acf986b8cd83c10c43135a975e6a2c9db7f 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6704,6 +6704,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -210,15 +210,15 @@ index c576ace24e81cc877aa2595d40e0a13a7af9f6a2..210fb97d44c19c29af424cc7b9cb3169
} // 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 20081a8a84ffbebda7cf8e3c0d9d106b11ce0373..c232c87f9c2c6cafd76a47cae53cf5d10522a4fc 100644
index 96d7ba915e3d4248ad801237b0b43ff0b55be1a2..24cf1a2aa6f821c4d5597d98f3bf98a10bd30555 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2240,6 +2240,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2245,6 +2245,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, entered_window);
+ window_features.raw_features = features;
+
// In fenced frames, we should always use `noopener`.
if (GetFrame()->IsInFencedFrameTree()) {
window_features.noopener = true;
+ window_features.raw_features = features;
if (window_features.is_partitioned_popin &&
!IsFeatureEnabled(

View File

@@ -18,10 +18,10 @@ index 9056030523807b8023493c0be9c9675da792852e..a1b949528e0a164c1bad98dbfbef282f
/googleurl
/gpu/gles2_conform_test
diff --git a/third_party/.gitignore b/third_party/.gitignore
index 01ec2d471d349d79bf749caa778b5ca73c6a48bc..f204940dba74ef3fd82e4516f39bb992a5d56156 100644
index 41f346652c8510f1df3211e4430d492ca565f51e..b784b4d7b28c3c1445274dd624f6d5729cf9eae1 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -44,7 +44,9 @@
@@ -43,7 +43,9 @@
/data_sharing_sdk
/devserver
/directxsdk
@@ -31,7 +31,7 @@ index 01ec2d471d349d79bf749caa778b5ca73c6a48bc..f204940dba74ef3fd82e4516f39bb992
/espresso/lib/
/eyesfree/src
/fast_float/src
@@ -100,6 +102,7 @@
@@ -97,6 +99,7 @@
/mocha
/mockito/src
/nacl_sdk_binaries/
@@ -39,7 +39,7 @@ index 01ec2d471d349d79bf749caa778b5ca73c6a48bc..f204940dba74ef3fd82e4516f39bb992
/ninja
/node/*.tar.gz
/node/linux/
@@ -149,6 +152,7 @@
@@ -146,6 +149,7 @@
/spirv-headers/src
/spirv-tools/src
/sqlite4java/lib/

View File

@@ -7,10 +7,10 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch
actions in the non-client caption area.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 15632812583b85d4263dd285a9f30ca6d81af46d..f5d919c31659b05a2d5b6dd145896ec047a8c49a 100644
index 94366475b7f9d128d8208de44d4d8a11096b146b..5867a8ae7e416ddc29a8a251dc6271009f3409db 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
@@ -1277,6 +1277,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
@@ -1281,6 +1281,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
window()->SetProperty(aura::client::kHeadlessBoundsKey, bounds);
}
@@ -22,7 +22,7 @@ index 15632812583b85d4263dd285a9f30ca6d81af46d..f5d919c31659b05a2d5b6dd145896ec0
DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() {
return new DesktopNativeCursorManagerWin();
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index 531c73e496ab8ba9078ccbe2ad07fcd7814215ac..fd363fc3de773dfe6775d3ff084ebf8091efbce8 100644
index 286fcdf651131d231b07a52a53a1945c144c79ea..73d0729784e339b9abc20f7f22bccee1e0393c1c 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -264,6 +264,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin

View File

@@ -80,10 +80,10 @@ index 28cd699814f32a7a569d63936b9544567a66d9c4..fd461fa448d983481dc4c0c7d03b1945
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index dc07c5029aa49bffa650af0b61ea827c04c0f7a7..3665ed6b475e03ceb52141fbc18c882a50ddeb6c 100644
index 1d361fc5f0dd410dfea799362e335c60579b4a11..dfaf5afa01558c2d3d66ae132c9ee6d97fa27893 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2127,12 +2127,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -2076,12 +2076,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -99,10 +99,10 @@ index dc07c5029aa49bffa650af0b61ea827c04c0f7a7..3665ed6b475e03ceb52141fbc18c882a
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 9081a0ed32b64202ead5495f188a97cedf1a6d35..d5735087d26aae5a7a66c12d188a305d89a64a39 100644
index e0d442f6b20b9deb37058daafe95f6a00b7658e6..b7ab3a6459961c3feaa4f0a1f5bc56d2993f7656 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -954,8 +954,7 @@ class Browser : public TabStripModelObserver,
@@ -947,8 +947,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -141,10 +141,10 @@ index ca72b324bf7c3b81ac94b53f0ff454d2df177950..d60ef3075d126e2bbd50c8469f2bf67c
// The profile used for the presentation.
raw_ptr<Profile, DanglingUntriaged> otr_profile_;
diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
index 04bebdaef96035bddd4f21dc7841316132755de2..51804ef750bca964c17509a9e0c6c968e21c9151 100644
index 5a108924282d5b0d1fd07be54fcfbfac66ef4ac5..988da4fa08083e264f1fe840d47113f1f1598fb3 100644
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
@@ -92,8 +92,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
@@ -93,8 +93,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -218,10 +218,10 @@ index c5b0d3b23b8da318ae55fcac2515a1187f261469..16ed1f46c9afde0ff25750128b4fcff6
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 b5887cb0a8312efbaf31c9552a59af65f6f82e07..15d6c1bee20af41785f226b4495cec7a7a7a523b 100644
index 5bcf895fbcc395ab664e208772e0fe5a9f99e153..e3246011d776a8242530b117a55d0c909277a6d5 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4652,8 +4652,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4656,8 +4656,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,

View File

@@ -9,10 +9,10 @@ rate-limiting, compression and global annotations.
This should be upstreamed.
diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc
index 3f3ed53d48fc4b19642cae847e69982782790e31..51d089f9fa0e1734f98f270a81a200beda71f2f4 100644
index 0e9fe8892af82d77f8530ead358e820d9b6b3912..43465dd285a99c40f3bc4dca19945fb08060160b 100644
--- a/components/crash/core/app/crash_reporter_client.cc
+++ b/components/crash/core/app/crash_reporter_client.cc
@@ -141,6 +141,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
@@ -145,6 +145,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
return false;
}

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 fd3eeb9f52367e0c0fca33b82036290d02d4ca0d..5aa97cc936de10882841c2ea28f0b8bc480ba904 100644
index 6a595dfebeeb53706b60429bc904095a2ab4cba9..dfed708b59a3b5f8e898e428b98adbc76f55fdf8 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -557,7 +557,11 @@
@@ -558,7 +558,11 @@
return;
host()->WasHidden();

View File

@@ -6,7 +6,7 @@ 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 c77a3fa9a247c074783da42a540823bb3bddea65..300a585505e117d52c52eb5b085ebba421156f77 100644
index ebe28a98d062b00d64b648987606b9d806088487..220cf4c17885da4b4f312709d3eff260100b9726 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -787,6 +787,9 @@ void RenderWidgetHostImpl::WasHidden() {

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 de2139d2e7f938d08aa824fdd90e1633dc34ac69..38c228c1df9ae5cbd27844b01929a964bba53f55 100644
index 5e216bba01de04bd3b2fb9ee5df6edd8904424f2..98edabd37a1faa35c2ba0413f6a5c3b4f871ff5e 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -1338,6 +1338,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1347,6 +1347,7 @@ void Navigator::RecordNavigationMetrics(
.InMilliseconds());
}
@@ -35,7 +35,7 @@ index de2139d2e7f938d08aa824fdd90e1633dc34ac69..38c228c1df9ae5cbd27844b01929a964
// 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 &&
@@ -1387,6 +1388,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1396,6 +1397,7 @@ void Navigator::RecordNavigationMetrics(
first_before_unload_start_time)
.InMilliseconds());
}

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 668b9bbb908a521a0b06caab2fb170e946b33862..15632812583b85d4263dd285a9f30ca6d81af46d 100644
index 66e1c0fa5058166d4697589c6099a1717cfb7f32..94366475b7f9d128d8208de44d4d8a11096b146b 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
@@ -582,7 +582,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {

View File

@@ -33,7 +33,7 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 0344da969bd5f1adf01d8e285397d4136c8e0b8e..e5e99e0812956e059cc29c5d19245bfbfa641066 100644
index 20ac173e49c24fb3e31a6d2e5616c1cc574a06b7..f24c875d4e6e167244bf3e4858bc7fdb0ccf833f 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1747,6 +1747,13 @@ void NetworkContext::SetNetworkConditions(
@@ -51,7 +51,7 @@ index 0344da969bd5f1adf01d8e285397d4136c8e0b8e..e5e99e0812956e059cc29c5d19245bfb
// 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 5ddd56b235229f85fa2d0619b7f4614cb00d914e..96141984c65f368e07bc180beb22969846cba479 100644
index 78a76afc774a1a4c61d3010d6b03fd2879ccd39a..860b979e1bb89f7834344159cbe2be5b31186ff7 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -317,6 +317,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -63,7 +63,7 @@ index 5ddd56b235229f85fa2d0619b7f4614cb00d914e..96141984c65f368e07bc180beb229698
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CT_SUPPORTED)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 1b3143b046135369c8b6a22b15d16fbfea3e615a..f0ac67db0fe669e4eef06cde7d06354a62f43d34 100644
index c399fad53c56619d415f1ee36765953de5f1c84a..57f472dd92ac29a487e8f7894981425148671b12 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1304,6 +1304,9 @@ interface NetworkContext {
@@ -77,7 +77,7 @@ index 1b3143b046135369c8b6a22b15d16fbfea3e615a..f0ac67db0fe669e4eef06cde7d06354a
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index 3640daadd0f1874930d0ffe9e560b53771e1ade7..2ddeb269418531c177b1519276371eeef7f7b4c7 100644
index 407beb272038b19e6165495f247404b9654ecc2d..5485521a842da04455aae092fd7b67fbd725bcc6 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -155,6 +155,7 @@ class TestNetworkContext : public mojom::NetworkContext {

View File

@@ -12,10 +12,10 @@ 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 c27999d3380185c082b828f1c3644dda35361eac..dbdb105dfac4b490033b795cedb95be43fbddcc9 100644
index 3f3945f8aa35513050060df8d65059b89f9b3933..282ae9ec41d68e8f0fad2bb735475241d3515ea4 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -168,6 +168,7 @@
@@ -169,6 +169,7 @@
#include "third_party/blink/renderer/core/view_transition/view_transition_supplement.h"
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
#include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h"
@@ -23,7 +23,7 @@ index c27999d3380185c082b828f1c3644dda35361eac..dbdb105dfac4b490033b795cedb95be4
#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"
@@ -1841,6 +1842,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
@@ -1847,6 +1848,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
#if BUILDFLAG(IS_MAC)
web_view_impl->SetMaximumLegibleScale(
prefs.default_maximum_page_scale_factor);

View File

@@ -199,10 +199,21 @@ index 58985ce62dc569256bad5e94de9c0d125fc470d0..33436784b691c860d58f8b4dfcc6718e
&SelectFileDialogLinuxKde::OnSelectSingleFolderDialogResponse, this,
parent));
diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.cc b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
index 61ddcbf7bf57e423099c7d392a19b3ec79b5d03f..8c3f4058ad7e9f6460c8d0516a150db612e8f574 100644
index 61ddcbf7bf57e423099c7d392a19b3ec79b5d03f..920d0610943091f850e44e3e0481abd7fe08f881 100644
--- a/ui/shell_dialogs/select_file_dialog_linux_portal.cc
+++ b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
@@ -221,6 +221,8 @@ void SelectFileDialogLinuxPortal::SelectFileImpl(
@@ -44,7 +44,9 @@ constexpr char kMethodStartServiceByName[] = "StartServiceByName";
constexpr char kXdgPortalService[] = "org.freedesktop.portal.Desktop";
constexpr char kXdgPortalObject[] = "/org/freedesktop/portal/desktop";
-constexpr int kXdgPortalRequiredVersion = 3;
+// Version 4 includes support for current_folder option to the OpenFile method via
+// https://github.com/flatpak/xdg-desktop-portal/commit/71165a5.
+constexpr int kXdgPortalRequiredVersion = 4;
constexpr char kXdgPortalRequestInterfaceName[] =
"org.freedesktop.portal.Request";
@@ -221,6 +223,8 @@ void SelectFileDialogLinuxPortal::SelectFileImpl(
weak_factory_.GetWeakPtr()));
info_->type = type;
info_->main_task_runner = base::SequencedTaskRunner::GetCurrentDefault();
@@ -211,7 +222,7 @@ index 61ddcbf7bf57e423099c7d392a19b3ec79b5d03f..8c3f4058ad7e9f6460c8d0516a150db6
if (owning_window) {
if (auto* root = owning_window->GetRootWindow()) {
@@ -557,7 +559,9 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions(
@@ -557,7 +561,9 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions(
response_handle_token);
if (type == SelectFileDialog::Type::SELECT_UPLOAD_FOLDER) {
@@ -222,7 +233,7 @@ index 61ddcbf7bf57e423099c7d392a19b3ec79b5d03f..8c3f4058ad7e9f6460c8d0516a150db6
l10n_util::GetStringUTF8(
IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON));
}
@@ -566,6 +570,8 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions(
@@ -566,6 +572,8 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions(
type == SelectFileDialog::Type::SELECT_UPLOAD_FOLDER ||
type == SelectFileDialog::Type::SELECT_EXISTING_FOLDER) {
AppendBoolOption(&options_writer, kFileChooserOptionDirectory, true);

View File

@@ -0,0 +1,63 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Fedor Indutny <indutny@signal.org>
Date: Tue, 17 Sep 2024 17:51:46 -0700
Subject: feat: allow -4 as a macos screen share id
We use fake video source ids for native macOS screen share window picker
of the following form:
window:-4:-1
Where the last digit represents the window id and decrements with each
requested screen share.
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
index 27b7edd2e99f36ebf3381781f2d2b3e7aff3eca1..30b3c896d5d6f12d63a7e12df0c90c767a5d5a71 100644
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
@@ -503,7 +503,9 @@ void OnStart(std::optional<bool> use_native_picker) override {
if (@available(macOS 15.0, *)) {
constexpr bool DefaultUseNativePicker = true;
- if (use_native_picker.value_or(DefaultUseNativePicker) && source_.id < 0 && source_.window_id == 0) {
+ if (use_native_picker.value_or(DefaultUseNativePicker) &&
+ source_.id == DesktopMediaID::kMacOsNativePickerId &&
+ source_.window_id < 0) {
auto* picker = [SCContentSharingPicker sharedPicker];
ScreenCaptureKitDeviceMac::active_streams_++;
picker.maximumStreamCount = @(ScreenCaptureKitDeviceMac::active_streams_);
diff --git a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
index f38ea5df3b6c694aed3a54486733130a2bec606b..f34ea831e3f0988b85940b11ca5484069f3013cb 100644
--- a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
+++ b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
@@ -316,8 +316,16 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
break;
}
+#if defined(USE_AURA)
+ bool allow_window_id = false;
+#elif BUILDFLAG(IS_MAC)
+ bool allow_window_id =
+ desktop_id.id == DesktopMediaID::kMacOsNativePickerId;
+#endif
+
#if defined(USE_AURA) || BUILDFLAG(IS_MAC)
- if (desktop_id.window_id != DesktopMediaID::kNullId) {
+ if (!allow_window_id &&
+ desktop_id.window_id != DesktopMediaID::kNullId) {
// For the other capturers, when a bug reports the type of capture it's
// easy enough to determine which capturer was used, but it's a little
// fuzzier with window capture.
diff --git a/content/public/browser/desktop_media_id.h b/content/public/browser/desktop_media_id.h
index 415156d403a59bf426cf4561a9d58ecdb27524b4..78aa7b2359c684d5305bf6352751dfbb7ca00d29 100644
--- a/content/public/browser/desktop_media_id.h
+++ b/content/public/browser/desktop_media_id.h
@@ -27,6 +27,8 @@ struct CONTENT_EXPORT DesktopMediaID {
static constexpr Id kNullId = 0;
// Represents a fake id to create a dummy capturer for autotests.
static constexpr Id kFakeId = -3;
+ // Represents an id to use native macOS picker for screenshare
+ static constexpr Id kMacOsNativePickerId = -4;
#if defined(USE_AURA) || BUILDFLAG(IS_MAC)
// Assigns integer identifier to the |window| and returns its DesktopMediaID.

View File

@@ -0,0 +1,331 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <marshallofsound@electronjs.org>
Date: Thu, 8 Aug 2024 08:39:10 -0700
Subject: feat: allow usage of SCContentSharingPicker on supported platforms
This is implemented as a magic "window id" that instead of pulling an SCStream manually
instead farms out to the screen picker.
diff --git a/content/browser/media/capture/desktop_capture_device_mac.cc b/content/browser/media/capture/desktop_capture_device_mac.cc
index 88c56f4dfcc1f8517ef1e8b6f1d37f5ba4d0b2c7..a75493a6d4d8ce8340a2d820eff5eed4e6a95109 100644
--- a/content/browser/media/capture/desktop_capture_device_mac.cc
+++ b/content/browser/media/capture/desktop_capture_device_mac.cc
@@ -28,7 +28,7 @@ class DesktopCaptureDeviceMac : public IOSurfaceCaptureDeviceBase {
~DesktopCaptureDeviceMac() override = default;
// IOSurfaceCaptureDeviceBase:
- void OnStart() override {
+ void OnStart(std::optional<bool> use_native_picker) override {
requested_format_ = capture_params().requested_format;
requested_format_.pixel_format = media::PIXEL_FORMAT_NV12;
DCHECK_GT(requested_format_.frame_size.GetArea(), 0);
diff --git a/content/browser/media/capture/io_surface_capture_device_base_mac.cc b/content/browser/media/capture/io_surface_capture_device_base_mac.cc
index 8a774911ce0f610b2c993976d108f840696c1d02..5ead7287e2d765d043f8b9c0229a2ee825d9f544 100644
--- a/content/browser/media/capture/io_surface_capture_device_base_mac.cc
+++ b/content/browser/media/capture/io_surface_capture_device_base_mac.cc
@@ -20,7 +20,7 @@ void IOSurfaceCaptureDeviceBase::AllocateAndStart(
client_ = std::move(client);
capture_params_ = params;
- OnStart();
+ OnStart(params.use_native_picker);
}
void IOSurfaceCaptureDeviceBase::StopAndDeAllocate() {
diff --git a/content/browser/media/capture/io_surface_capture_device_base_mac.h b/content/browser/media/capture/io_surface_capture_device_base_mac.h
index 8ac12480f663a74dfbdcf7128a582a81b4474d25..db6802a2603e1d3c3039e49737438124bf2ee1f1 100644
--- a/content/browser/media/capture/io_surface_capture_device_base_mac.h
+++ b/content/browser/media/capture/io_surface_capture_device_base_mac.h
@@ -25,7 +25,7 @@ class CONTENT_EXPORT IOSurfaceCaptureDeviceBase
~IOSurfaceCaptureDeviceBase() override;
// OnStart is called by AllocateAndStart.
- virtual void OnStart() = 0;
+ virtual void OnStart(std::optional<bool> use_native_picker) = 0;
// OnStop is called by StopAndDeAllocate.
virtual void OnStop() = 0;
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
index b6129282c6807702cf88e0a3e2ba233e41a20960..1c2d0c6dd4101fe0bac69e3018bbbedadce224cc 100644
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
@@ -24,24 +24,83 @@
std::optional<gfx::Size>,
std::optional<gfx::Rect>)>;
using ErrorCallback = base::RepeatingClosure;
+using CancelCallback = base::RepeatingClosure;
+
+API_AVAILABLE(macos(15.0))
+@interface ScreenCaptureKitPickerHelper
+ : NSObject <SCContentSharingPickerObserver>
+
+- (void)contentSharingPicker:(SCContentSharingPicker *)picker
+ didCancelForStream:(SCStream *)stream;
+
+- (void)contentSharingPicker:(SCContentSharingPicker *)picker
+ didUpdateWithFilter:(SCContentFilter *)filter
+ forStream:(SCStream *)stream;
+
+- (void)contentSharingPickerStartDidFailWithError:(NSError *)error;
+
+@end
+
+@implementation ScreenCaptureKitPickerHelper {
+ base::RepeatingCallback<void(SCContentFilter *)> _pickerCallback;
+ ErrorCallback _errorCallback;
+ CancelCallback _cancelCallback;
+}
+
+- (void)contentSharingPicker:(SCContentSharingPicker *)picker
+ didCancelForStream:(SCStream *)stream {
+ // TODO: This doesn't appear to be called on Apple's side;
+ // implement this logic
+ _cancelCallback.Run();
+}
+
+- (void)contentSharingPicker:(SCContentSharingPicker *)picker
+ didUpdateWithFilter:(SCContentFilter *)filter
+ forStream:(SCStream *)stream {
+ if (stream == nil) {
+ _pickerCallback.Run(filter);
+ [picker removeObserver:self];
+ }
+}
+
+- (void)contentSharingPickerStartDidFailWithError:(NSError *)error {
+ _errorCallback.Run();
+}
+
+- (instancetype)initWithStreamPickCallback:(base::RepeatingCallback<void(SCContentFilter *)>)pickerCallback
+ cancelCallback:(CancelCallback)cancelCallback
+ errorCallback:(ErrorCallback)errorCallback {
+ if (self = [super init]) {
+ _pickerCallback = pickerCallback;
+ _cancelCallback = cancelCallback;
+ _errorCallback = errorCallback;
+ }
+ return self;
+}
+
+@end
API_AVAILABLE(macos(12.3))
@interface ScreenCaptureKitDeviceHelper
: NSObject <SCStreamDelegate, SCStreamOutput>
- (instancetype)initWithSampleCallback:(SampleCallback)sampleCallback
+ cancelCallback:(CancelCallback)cancelCallback
errorCallback:(ErrorCallback)errorCallback;
@end
@implementation ScreenCaptureKitDeviceHelper {
SampleCallback _sampleCallback;
+ CancelCallback _cancelCallback;
ErrorCallback _errorCallback;
}
- (instancetype)initWithSampleCallback:(SampleCallback)sampleCallback
+ cancelCallback:(CancelCallback)cancelCallback
errorCallback:(ErrorCallback)errorCallback {
if (self = [super init]) {
_sampleCallback = sampleCallback;
+ _cancelCallback = cancelCallback;
_errorCallback = errorCallback;
}
return self;
@@ -141,7 +200,8 @@ + (SCStreamConfiguration*)streamConfigurationWithFrameSize:(gfx::Size)frameSize
class API_AVAILABLE(macos(12.3)) ScreenCaptureKitDeviceMac
: public IOSurfaceCaptureDeviceBase,
- public ScreenCaptureKitResetStreamInterface {
+ public ScreenCaptureKitResetStreamInterface
+ {
public:
explicit ScreenCaptureKitDeviceMac(const DesktopMediaID& source,
SCContentFilter* filter)
@@ -152,18 +212,41 @@ explicit ScreenCaptureKitDeviceMac(const DesktopMediaID& source,
device_task_runner_,
base::BindRepeating(&ScreenCaptureKitDeviceMac::OnStreamSample,
weak_factory_.GetWeakPtr()));
+ CancelCallback cancel_callback = base::BindPostTask(
+ device_task_runner_,
+ base::BindRepeating(&ScreenCaptureKitDeviceMac::OnStreamError,
+ weak_factory_.GetWeakPtr()));
ErrorCallback error_callback = base::BindPostTask(
device_task_runner_,
base::BindRepeating(&ScreenCaptureKitDeviceMac::OnStreamError,
weak_factory_.GetWeakPtr()));
helper_ = [[ScreenCaptureKitDeviceHelper alloc]
initWithSampleCallback:sample_callback
+ cancelCallback:cancel_callback
errorCallback:error_callback];
+
+ if (@available(macOS 15.0, *)) {
+ auto picker_callback = base::BindPostTask(
+ device_task_runner_,
+ base::BindRepeating(&ScreenCaptureKitDeviceMac::OnContentFilterReady, weak_factory_.GetWeakPtr())
+ );
+ auto* picker_observer = [[ScreenCaptureKitPickerHelper alloc] initWithStreamPickCallback:picker_callback cancelCallback:cancel_callback errorCallback:error_callback];
+ [[SCContentSharingPicker sharedPicker] addObserver:picker_observer];
+ }
}
ScreenCaptureKitDeviceMac(const ScreenCaptureKitDeviceMac&) = delete;
ScreenCaptureKitDeviceMac& operator=(const ScreenCaptureKitDeviceMac&) =
delete;
- ~ScreenCaptureKitDeviceMac() override = default;
+ ~ScreenCaptureKitDeviceMac() override {
+ if (@available(macOS 15.0, *)) {
+ auto* picker = [SCContentSharingPicker sharedPicker];
+ ScreenCaptureKitDeviceMac::active_streams_--;
+ picker.maximumStreamCount = @(ScreenCaptureKitDeviceMac::active_streams_);
+ if (ScreenCaptureKitDeviceMac::active_streams_ == 0 && picker.active) {
+ picker.active = false;
+ }
+ }
+ }
void OnShareableContentCreated(SCShareableContent* content) {
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
@@ -232,7 +315,7 @@ void CreateStream(SCContentFilter* filter) {
return;
}
- if (@available(macOS 14.0, *)) {
+ if (@available(macOS 15.0, *)) {
// Update the content size. This step is neccessary when used together
// with SCContentSharingPicker. If the Chrome picker is used, it will
// change to retina resolution if applicable.
@@ -241,6 +324,9 @@ void CreateStream(SCContentFilter* filter) {
filter.contentRect.size.height * filter.pointPixelScale);
}
+ OnContentFilterReady(filter);
+ }
+ void OnContentFilterReady(SCContentFilter* filter) {
gfx::RectF dest_rect_in_frame;
actual_capture_format_ = capture_params().requested_format;
actual_capture_format_.pixel_format = media::PIXEL_FORMAT_NV12;
@@ -254,6 +340,7 @@ void CreateStream(SCContentFilter* filter) {
stream_ = [[SCStream alloc] initWithFilter:filter
configuration:config
delegate:helper_];
+
{
NSError* error = nil;
bool add_stream_output_result =
@@ -395,7 +482,7 @@ void OnStreamError() {
if (fullscreen_module_) {
fullscreen_module_->Reset();
}
- OnStart();
+ OnStart(std::nullopt);
} else {
client()->OnError(media::VideoCaptureError::kScreenCaptureKitStreamError,
FROM_HERE, "Stream delegate called didStopWithError");
@@ -418,23 +505,39 @@ void OnUpdateConfigurationError() {
}
// IOSurfaceCaptureDeviceBase:
- void OnStart() override {
+ void OnStart(std::optional<bool> use_native_picker) override {
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
- if (filter_) {
- // SCContentSharingPicker is used where filter_ is set on creation.
- CreateStream(filter_);
- } else {
- // Chrome picker is used.
- auto content_callback = base::BindPostTask(
- device_task_runner_,
- base::BindRepeating(
- &ScreenCaptureKitDeviceMac::OnShareableContentCreated,
- weak_factory_.GetWeakPtr()));
- auto handler = ^(SCShareableContent* content, NSError* error) {
- content_callback.Run(content);
- };
- [SCShareableContent getShareableContentWithCompletionHandler:handler];
+
+ if (@available(macOS 15.0, *)) {
+ constexpr bool DefaultUseNativePicker = true;
+ if (use_native_picker.value_or(DefaultUseNativePicker) && source_.id < 0 && source_.window_id == 0) {
+ auto* picker = [SCContentSharingPicker sharedPicker];
+ ScreenCaptureKitDeviceMac::active_streams_++;
+ picker.maximumStreamCount = @(ScreenCaptureKitDeviceMac::active_streams_);
+ if (!picker.active) {
+ picker.active = true;
+ }
+ NSMutableArray<NSNumber*>* exclude_ns_windows = [NSMutableArray array];
+ [[[[NSApplication sharedApplication] windows] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSWindow* win, NSDictionary *bindings) {
+ return [win sharingType] == NSWindowSharingNone;
+ }]] enumerateObjectsUsingBlock:^(NSWindow* win, NSUInteger idx, BOOL *stop) {
+ [exclude_ns_windows addObject:@([win windowNumber])];
+ }];
+ picker.defaultConfiguration.excludedWindowIDs = exclude_ns_windows;
+ [picker present];
+ return;
+ }
}
+
+ auto content_callback = base::BindPostTask(
+ device_task_runner_,
+ base::BindRepeating(
+ &ScreenCaptureKitDeviceMac::OnShareableContentCreated,
+ weak_factory_.GetWeakPtr()));
+ auto handler = ^(SCShareableContent* content, NSError* error) {
+ content_callback.Run(content);
+ };
+ [SCShareableContent getShareableContentWithCompletionHandler:handler];
}
void OnStop() override {
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
@@ -492,6 +595,8 @@ void ResetStreamTo(SCWindow* window) override {
}
private:
+ static int active_streams_;
+
const DesktopMediaID source_;
SCContentFilter* const filter_;
const scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
@@ -521,6 +626,8 @@ void ResetStreamTo(SCWindow* window) override {
base::WeakPtrFactory<ScreenCaptureKitDeviceMac> weak_factory_{this};
};
+int ScreenCaptureKitDeviceMac::active_streams_ = 0;
+
} // namespace
// Although ScreenCaptureKit is available in 12.3 there were some bugs that
diff --git a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
index 7adf8264cfa9980c4a8414bf0f8bfa9ad70ec0b3..d162612dc70a2b57190aaf558aca8f46cbdedcad 100644
--- a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
+++ b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
@@ -360,13 +360,15 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
std::move(after_start_capture_callback));
break;
#else
+ media::VideoCaptureParams updated_params = params;
+ updated_params.use_native_picker = stream_type != blink::mojom::MediaStreamType::GUM_DESKTOP_VIDEO_CAPTURE;
// All cases other than tab capture or Aura desktop/window capture.
TRACE_EVENT_INSTANT0(TRACE_DISABLED_BY_DEFAULT("video_and_image_capture"),
"UsingDesktopCapturer", TRACE_EVENT_SCOPE_THREAD);
start_capture_closure = base::BindOnce(
&InProcessVideoCaptureDeviceLauncher::
DoStartDesktopCaptureOnDeviceThread,
- base::Unretained(this), desktop_id, params,
+ base::Unretained(this), desktop_id, updated_params,
CreateDeviceClient(media::VideoCaptureBufferType::kSharedMemory,
kMaxNumberOfBuffers, std::move(receiver),
std::move(receiver_on_io_thread)),
diff --git a/media/capture/video_capture_types.h b/media/capture/video_capture_types.h
index f2b75f5b2f547ad135c1288bf3639b26dedc8053..ef18724d9f2ea68a47b66fc3981f58a73ac1b51d 100644
--- a/media/capture/video_capture_types.h
+++ b/media/capture/video_capture_types.h
@@ -355,6 +355,8 @@ struct CAPTURE_EXPORT VideoCaptureParams {
// Flag indicating whether HiDPI mode should be enabled for tab capture
// sessions.
bool is_high_dpi_enabled = true;
+
+ std::optional<bool> use_native_picker;
};
CAPTURE_EXPORT std::ostream& operator<<(

View File

@@ -6,8 +6,9 @@ Subject: feat: configure launch options for service process
- POSIX:
Allows configuring base::LaunchOptions::fds_to_remap when launching the child process.
- Win:
Allows configuring base::LaunchOptions::handles_to_inherit, base::LaunchOptions::stdout_handle
and base::LaunchOptions::stderr_handle when launching the child process.
Allows configuring base::LaunchOptions::handles_to_inherit, base::LaunchOptions::stdout_handle,
base::LaunchOptions::stderr_handle and base::LaunchOptions::feedback_cursor_off when launching
the child process.
- All:
Allows configuring base::LauncOptions::current_directory, base::LaunchOptions::enviroment
and base::LaunchOptions::clear_environment.
@@ -110,7 +111,7 @@ index f1a415f7bd56ece5ab07d2408dbfddf658b45ff3..49bf8f75583cc7b2de415f4ebb427573
}
diff --git a/content/browser/child_process_launcher_helper_win.cc b/content/browser/child_process_launcher_helper_win.cc
index 2a01487c8ff837357f6d62dba80115b0ec64c343..8b1ed51630dc4fe77bd0edadb85f04fb8962cdd8 100644
index 2a01487c8ff837357f6d62dba80115b0ec64c343..74343f6a3bfb1eab2aaf1c0b5fba6ceaf9399ef6 100644
--- a/content/browser/child_process_launcher_helper_win.cc
+++ b/content/browser/child_process_launcher_helper_win.cc
@@ -24,6 +24,8 @@
@@ -122,7 +123,7 @@ index 2a01487c8ff837357f6d62dba80115b0ec64c343..8b1ed51630dc4fe77bd0edadb85f04fb
namespace {
// Helper to avoid marking the log file as non-executable every time we launch a
@@ -132,6 +134,30 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
@@ -132,6 +134,31 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
mojo_channel_->PrepareToPassRemoteEndpoint(&options->handles_to_inherit,
command_line());
}
@@ -150,10 +151,11 @@ index 2a01487c8ff837357f6d62dba80115b0ec64c343..8b1ed51630dc4fe77bd0edadb85f04fb
+ options->current_directory = delegate_->GetCurrentDirectory();
+ options->environment = delegate_->GetEnvironment();
+ options->clear_environment = !delegate_->ShouldInheritEnvironment();
+ options->feedback_cursor_off = !delegate_->ShouldShowFeedbackCursor();
return true;
}
@@ -159,7 +185,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThread(
@@ -159,7 +186,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThread(
ChildProcessLauncherHelper::Process process;
*launch_result =
StartSandboxedProcess(delegate_.get(), *command_line(),
@@ -163,16 +165,17 @@ index 2a01487c8ff837357f6d62dba80115b0ec64c343..8b1ed51630dc4fe77bd0edadb85f04fb
}
diff --git a/content/browser/service_process_host_impl.cc b/content/browser/service_process_host_impl.cc
index bdd5bec301f5fcff2d3e3d7994ecbc4eae46da36..45cf31157c535a0cdc9236a07e2ffffd166ba412 100644
index bdd5bec301f5fcff2d3e3d7994ecbc4eae46da36..f6082bada22c5f4e70af60ea6f555b0f363919c5 100644
--- a/content/browser/service_process_host_impl.cc
+++ b/content/browser/service_process_host_impl.cc
@@ -205,6 +205,16 @@ void LaunchServiceProcess(mojo::GenericPendingReceiver receiver,
@@ -205,6 +205,17 @@ void LaunchServiceProcess(mojo::GenericPendingReceiver receiver,
options.allow_gpu_client.value()) {
host->SetAllowGpuClient();
}
+
+#if BUILDFLAG(IS_WIN)
+ host->SetStdioHandles(std::move(options.stdout_handle), std::move(options.stderr_handle));
+ host->SetFeedbackCursorOff(options.feedback_cursor_off);
+#elif BUILDFLAG(IS_POSIX)
+ host->SetAdditionalFds(std::move(options.fds_to_remap));
+#endif
@@ -184,7 +187,7 @@ index bdd5bec301f5fcff2d3e3d7994ecbc4eae46da36..45cf31157c535a0cdc9236a07e2ffffd
host->GetChildProcess()->BindServiceInterface(std::move(receiver));
}
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
index bb266d4baddd1fa4d49ef7fac1ac8d5d85c934d4..8550dbc7209c1ac2b6a4b6d493167cfc05d8adbc 100644
index bb266d4baddd1fa4d49ef7fac1ac8d5d85c934d4..61369ff1ffe9ab511224b7e72b283df9e9262fd6 100644
--- a/content/browser/utility_process_host.cc
+++ b/content/browser/utility_process_host.cc
@@ -179,11 +179,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
@@ -203,7 +206,7 @@ index bb266d4baddd1fa4d49ef7fac1ac8d5d85c934d4..8550dbc7209c1ac2b6a4b6d493167cfc
bool UtilityProcessHost::Start() {
return StartProcess();
@@ -230,6 +232,24 @@ void UtilityProcessHost::SetZygoteForTesting(ZygoteCommunication* handle) {
@@ -230,6 +232,30 @@ void UtilityProcessHost::SetZygoteForTesting(ZygoteCommunication* handle) {
}
#endif // BUILDFLAG(USE_ZYGOTE)
@@ -224,11 +227,17 @@ index bb266d4baddd1fa4d49ef7fac1ac8d5d85c934d4..8550dbc7209c1ac2b6a4b6d493167cfc
+ const base::FilePath& cwd) {
+ current_directory_ = cwd;
+}
+
+#if BUILDFLAG(IS_WIN)
+void UtilityProcessHost::SetFeedbackCursorOff(bool feedback_cursor_off) {
+ feedback_cursor_off_ = feedback_cursor_off;
+}
+#endif // BUILDFLAG(IS_WIN)
+
mojom::ChildProcess* UtilityProcessHost::GetChildProcess() {
return static_cast<ChildProcessHostImpl*>(process_->GetHost())
->child_process();
@@ -437,9 +457,22 @@ bool UtilityProcessHost::StartProcess() {
@@ -437,9 +463,26 @@ bool UtilityProcessHost::StartProcess() {
}
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
@@ -249,11 +258,15 @@ index bb266d4baddd1fa4d49ef7fac1ac8d5d85c934d4..8550dbc7209c1ac2b6a4b6d493167cfc
- sandbox_type_, env_, *cmd_line);
+ sandbox_type_, env_, current_directory_, *cmd_line,
+ inherit_environment_);
+
+#if BUILDFLAG(IS_WIN)
+ delegate->SetFeedbackCursorOff(feedback_cursor_off_);
+#endif // BUILDFLAG(IS_WIN)
#if BUILDFLAG(IS_WIN)
if (!preload_libraries_.empty()) {
diff --git a/content/browser/utility_process_host.h b/content/browser/utility_process_host.h
index 9791ae2f761043b9eecd9064a6fd39a6e2339af4..1083f1683a05825f51f5b2d71f8107d910fa2474 100644
index 9791ae2f761043b9eecd9064a6fd39a6e2339af4..c1809298c830b814f886859c2626d6bce7b9ac8c 100644
--- a/content/browser/utility_process_host.h
+++ b/content/browser/utility_process_host.h
@@ -29,6 +29,10 @@
@@ -283,7 +296,7 @@ index 9791ae2f761043b9eecd9064a6fd39a6e2339af4..1083f1683a05825f51f5b2d71f8107d9
// Starts the utility process.
bool Start();
@@ -138,6 +146,16 @@ class CONTENT_EXPORT UtilityProcessHost
@@ -138,6 +146,21 @@ class CONTENT_EXPORT UtilityProcessHost
void SetZygoteForTesting(ZygoteCommunication* handle);
#endif // BUILDFLAG(USE_ZYGOTE)
@@ -296,11 +309,16 @@ index 9791ae2f761043b9eecd9064a6fd39a6e2339af4..1083f1683a05825f51f5b2d71f8107d9
+
+ // Sets the working directory of the process.
+ void SetCurrentDirectory(const base::FilePath& cwd);
+
+#if BUILDFLAG(IS_WIN)
+ // Specifies if the process should trigger mouse cursor feedback.
+ void SetFeedbackCursorOff(bool feedback_cursor_off);
+#endif // BUILDFLAG(IS_WIN)
+
// Returns a control interface for the running child process.
mojom::ChildProcess* GetChildProcess();
@@ -191,6 +209,22 @@ class CONTENT_EXPORT UtilityProcessHost
@@ -191,6 +214,27 @@ class CONTENT_EXPORT UtilityProcessHost
std::optional<raw_ptr<ZygoteCommunication>> zygote_for_testing_;
#endif // BUILDFLAG(USE_ZYGOTE)
@@ -319,12 +337,17 @@ index 9791ae2f761043b9eecd9064a6fd39a6e2339af4..1083f1683a05825f51f5b2d71f8107d9
+
+ // Inherit enviroment from parent process.
+ bool inherit_environment_ = true;
+
+#if BUILDFLAG(IS_WIN)
+ // Specifies if the process should trigger mouse cursor feedback.
+ bool feedback_cursor_off_ = false;
+#endif // BUILDFLAG(IS_WIN)
+
// Indicates whether the process has been successfully launched yet, or if
// launch failed.
enum class LaunchState {
diff --git a/content/browser/utility_sandbox_delegate.cc b/content/browser/utility_sandbox_delegate.cc
index ad5ad7b27da8bc1b435bbb91e9e0eaa98aef9612..4f469e32f0e3ae88d11e6a6a1bb577c1302c624d 100644
index ad5ad7b27da8bc1b435bbb91e9e0eaa98aef9612..f72fadc75ecf165fe29ac2f1bd8c63a718a0c610 100644
--- a/content/browser/utility_sandbox_delegate.cc
+++ b/content/browser/utility_sandbox_delegate.cc
@@ -34,17 +34,19 @@ UtilitySandboxedProcessLauncherDelegate::
@@ -351,7 +374,7 @@ index ad5ad7b27da8bc1b435bbb91e9e0eaa98aef9612..4f469e32f0e3ae88d11e6a6a1bb577c1
#if DCHECK_IS_ON()
bool supported_sandbox_type =
sandbox_type_ == sandbox::mojom::Sandbox::kNoSandbox ||
@@ -107,11 +109,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
@@ -107,11 +109,28 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
return sandbox_type_;
}
@@ -368,11 +391,22 @@ index ad5ad7b27da8bc1b435bbb91e9e0eaa98aef9612..4f469e32f0e3ae88d11e6a6a1bb577c1
+base::FilePath UtilitySandboxedProcessLauncherDelegate::GetCurrentDirectory() {
+ return current_directory_;
+}
+
+#if BUILDFLAG(IS_WIN)
+void UtilitySandboxedProcessLauncherDelegate::SetFeedbackCursorOff(
+ bool feedback_cursor_off) {
+ feedback_cursor_off_ = feedback_cursor_off;
+}
+
+bool UtilitySandboxedProcessLauncherDelegate::ShouldShowFeedbackCursor() {
+ return !feedback_cursor_off_;
+}
+#endif // BUILDFLAG(IS_WIN)
#if BUILDFLAG(USE_ZYGOTE)
ZygoteCommunication* UtilitySandboxedProcessLauncherDelegate::GetZygote() {
diff --git a/content/browser/utility_sandbox_delegate.h b/content/browser/utility_sandbox_delegate.h
index 368fb567e46a55bdc44820d5b7a2a08ac6cc4ffd..57c0d369e7373f755391da3fafbdaea86358d962 100644
index 368fb567e46a55bdc44820d5b7a2a08ac6cc4ffd..f5238dcd76d74e6705061063ee847f8447650deb 100644
--- a/content/browser/utility_sandbox_delegate.h
+++ b/content/browser/utility_sandbox_delegate.h
@@ -30,7 +30,9 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate
@@ -386,7 +420,7 @@ index 368fb567e46a55bdc44820d5b7a2a08ac6cc4ffd..57c0d369e7373f755391da3fafbdaea8
~UtilitySandboxedProcessLauncherDelegate() override;
sandbox::mojom::Sandbox GetSandboxType() override;
@@ -56,18 +58,16 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate
@@ -56,18 +58,21 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate
ZygoteCommunication* GetZygote() override;
#endif // BUILDFLAG(USE_ZYGOTE)
@@ -395,6 +429,11 @@ index 368fb567e46a55bdc44820d5b7a2a08ac6cc4ffd..57c0d369e7373f755391da3fafbdaea8
-#endif // BUILDFLAG(IS_POSIX)
+ bool ShouldInheritEnvironment() override;
+ base::FilePath GetCurrentDirectory() override;
+
+#if BUILDFLAG(IS_WIN)
+ void SetFeedbackCursorOff(bool feedback_cursor_off);
+ bool ShouldShowFeedbackCursor() override;
+#endif // BUILDFLAG(IS_WIN)
#if BUILDFLAG(USE_ZYGOTE)
void SetZygote(ZygoteCommunication* handle);
@@ -407,7 +446,7 @@ index 368fb567e46a55bdc44820d5b7a2a08ac6cc4ffd..57c0d369e7373f755391da3fafbdaea8
#if BUILDFLAG(IS_WIN)
std::vector<base::FilePath> preload_libraries_;
@@ -77,12 +77,14 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate
@@ -77,12 +82,17 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate
std::optional<raw_ptr<ZygoteCommunication>> zygote_;
#endif // BUILDFLAG(USE_ZYGOTE)
@@ -419,6 +458,9 @@ index 368fb567e46a55bdc44820d5b7a2a08ac6cc4ffd..57c0d369e7373f755391da3fafbdaea8
#endif // BUILDFLAG(IS_WIN)
base::CommandLine cmd_line_;
+ bool inherit_environment_;
+#if BUILDFLAG(IS_WIN)
+ bool feedback_cursor_off_ = false;
+#endif // BUILDFLAG(IS_WIN)
};
} // namespace content
@@ -445,10 +487,10 @@ index b96d6a879e8b6664559bac69f726321fdb02b40f..bfeec6ddb98d4127c1dcfe5999894f1c
} // namespace content
diff --git a/content/public/browser/service_process_host.cc b/content/public/browser/service_process_host.cc
index 8defae52a201a97c402e304216ce772a717a9f7e..a3cdeab1c22cf9f1b5ea0c25d2d7cbff9b68b683 100644
index 8defae52a201a97c402e304216ce772a717a9f7e..4aee78366398c018e315ef15e631d0792ee79c47 100644
--- a/content/public/browser/service_process_host.cc
+++ b/content/public/browser/service_process_host.cc
@@ -52,12 +52,45 @@ ServiceProcessHost::Options::WithExtraCommandLineSwitches(
@@ -52,12 +52,53 @@ ServiceProcessHost::Options::WithExtraCommandLineSwitches(
return *this;
}
@@ -490,12 +532,20 @@ index 8defae52a201a97c402e304216ce772a717a9f7e..a3cdeab1c22cf9f1b5ea0c25d2d7cbff
+ clear_environment = new_environment;
+ return *this;
+}
+
+#if BUILDFLAG(IS_WIN)
+ServiceProcessHost::Options& ServiceProcessHost::Options::WithFeedbackCursorOff(
+ bool turn_feedback_cursor_off) {
+ feedback_cursor_off = turn_feedback_cursor_off;
+ return *this;
+}
+#endif // #if BUILDFLAG(IS_WIN)
+
#if BUILDFLAG(IS_WIN)
ServiceProcessHost::Options&
ServiceProcessHost::Options::WithPreloadedLibraries(
diff --git a/content/public/browser/service_process_host.h b/content/public/browser/service_process_host.h
index 0062d2cb6634b8b29977a0312516b1b13936b40a..22e1191b57f56aa31b2c82fcc3ec0972f16752a8 100644
index 0062d2cb6634b8b29977a0312516b1b13936b40a..611a52e908f4cb70fbe5628e220a082e45320b70 100644
--- a/content/public/browser/service_process_host.h
+++ b/content/public/browser/service_process_host.h
@@ -14,6 +14,7 @@
@@ -517,7 +567,7 @@ index 0062d2cb6634b8b29977a0312516b1b13936b40a..22e1191b57f56aa31b2c82fcc3ec0972
namespace base {
class Process;
} // namespace base
@@ -94,11 +99,30 @@ class CONTENT_EXPORT ServiceProcessHost {
@@ -94,11 +99,35 @@ class CONTENT_EXPORT ServiceProcessHost {
// Specifies extra command line switches to append before launch.
Options& WithExtraCommandLineSwitches(std::vector<std::string> switches);
@@ -544,11 +594,16 @@ index 0062d2cb6634b8b29977a0312516b1b13936b40a..22e1191b57f56aa31b2c82fcc3ec0972
+ // environment from the parent process.
+ Options& WithEnvironment(const base::EnvironmentMap& environment,
+ bool new_environment);
+
+#if BUILDFLAG(IS_WIN)
+ // Specifies if the process should trigger mouse cursor feedback.
+ Options& WithFeedbackCursorOff(bool feedback_cursor_off);
+#endif // #if BUILDFLAG(IS_WIN)
+
#if BUILDFLAG(IS_WIN)
// Specifies libraries to preload before the sandbox is locked down. Paths
// should be absolute paths. Libraries will be preloaded before sandbox
@@ -127,11 +151,20 @@ class CONTENT_EXPORT ServiceProcessHost {
@@ -127,11 +156,23 @@ class CONTENT_EXPORT ServiceProcessHost {
std::optional<GURL> site;
std::optional<int> child_flags;
std::vector<std::string> extra_switches;
@@ -566,6 +621,9 @@ index 0062d2cb6634b8b29977a0312516b1b13936b40a..22e1191b57f56aa31b2c82fcc3ec0972
+ base::FilePath current_directory;
+ base::EnvironmentMap environment;
+ bool clear_environment = false;
+#if BUILDFLAG(IS_WIN)
+ bool feedback_cursor_off = false;
+#endif // BUILDFLAG(IS_WIN)
};
// An interface which can be implemented and registered/unregistered with
@@ -583,10 +641,10 @@ index 9bb4b30ba0f5d37ec2b28f0848d94f34c24f9423..b614fef01ee5cdf81b7112be721b851c
} // namespace content
diff --git a/content/public/common/sandboxed_process_launcher_delegate.cc b/content/public/common/sandboxed_process_launcher_delegate.cc
index 9c1aa450f32b6812d4a87cd0b9ee0dfb1a9557f4..3360302b4511ed914ac2d5756dcc7edf7e675631 100644
index 9c1aa450f32b6812d4a87cd0b9ee0dfb1a9557f4..c281fc33709376dbd50af281c219f3f5bda5635b 100644
--- a/content/public/common/sandboxed_process_launcher_delegate.cc
+++ b/content/public/common/sandboxed_process_launcher_delegate.cc
@@ -68,11 +68,17 @@ ZygoteCommunication* SandboxedProcessLauncherDelegate::GetZygote() {
@@ -68,11 +68,23 @@ ZygoteCommunication* SandboxedProcessLauncherDelegate::GetZygote() {
}
#endif // BUILDFLAG(USE_ZYGOTE)
@@ -603,11 +661,17 @@ index 9c1aa450f32b6812d4a87cd0b9ee0dfb1a9557f4..3360302b4511ed914ac2d5756dcc7edf
+base::FilePath SandboxedProcessLauncherDelegate::GetCurrentDirectory() {
+ return base::FilePath();
+}
+
+#if BUILDFLAG(IS_WIN)
+bool SandboxedProcessLauncherDelegate::ShouldShowFeedbackCursor() {
+ return true;
+}
+#endif // #if BUILDFLAG(IS_WIN)
#if BUILDFLAG(IS_MAC)
diff --git a/content/public/common/sandboxed_process_launcher_delegate.h b/content/public/common/sandboxed_process_launcher_delegate.h
index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8d1933de2 100644
index cb43aa14c9742f3788ae58c3e49b890cd532f327..276b2a06fabba559eb1caaaa9129b9f78058aa9f 100644
--- a/content/public/common/sandboxed_process_launcher_delegate.h
+++ b/content/public/common/sandboxed_process_launcher_delegate.h
@@ -6,6 +6,7 @@
@@ -618,7 +682,7 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8
#include "base/files/scoped_file.h"
#include "base/process/process.h"
#include "build/build_config.h"
@@ -57,10 +58,14 @@ class CONTENT_EXPORT SandboxedProcessLauncherDelegate
@@ -57,10 +58,19 @@ class CONTENT_EXPORT SandboxedProcessLauncherDelegate
virtual ZygoteCommunication* GetZygote();
#endif // BUILDFLAG(USE_ZYGOTE)
@@ -632,6 +696,11 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8
+
+ // Specifies the directory to change to before executing the process.
+ virtual base::FilePath GetCurrentDirectory();
+
+#if BUILDFLAG(IS_WIN)
+ // Override this if the process should not trigger mouse cursor feedback.
+ virtual bool ShouldShowFeedbackCursor();
+#endif // #if BUILDFLAG(IS_WIN)
#if BUILDFLAG(IS_MAC)
// Whether or not to disclaim TCC responsibility for the process, defaults to

View File

@@ -521,7 +521,7 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf
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 f0c4c7eb70207c58cc7db85c20c0417bf1deeecd..3a9facb4671147d10648c04aac9155d7c60f89ce 100644
index 03790c67247044236ac0948b10763d7eeba26389..2544644da43ecc2cac5c39e11d4764b9b881d249 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
@@ -102,7 +102,8 @@ RootCompositorFrameSinkImpl::Create(

View File

@@ -75,10 +75,10 @@ index 5d692d88c9f95845c97f848fd421916c52bd2416..b0131582dc0a308e1525b12b554dd03e
PictureInPictureOcclusionTracker*
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index 9b74fd8accacb16860cf6961016c1f5205e98ba0..4557f8b4fa9bc16058f5a831e572f0cb0f0e1a31 100644
index 98363d75fe7103df8794d85c672fae1cb71c8179..5e556fb6ea2141c415f6f8aa63eaaa5309f15adc 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -349,11 +349,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
@@ -350,11 +350,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
#endif // BUILDFLAG(IS_WIN)

View File

@@ -87,10 +87,10 @@ index 0c7d5b2c1d3e97420913bd643bb2a524a76fc286..653793fa480f035ce11e079b370bf5ed
// The view with active text input state, i.e., a focused <input> element.
// It will be nullptr if no such view exists. Note that the active view
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index d40a93ff8cc7ff113e8655f6cae049a182eca290..ee9ac575851959397d54bb337903cdd3a9ae62d5 100644
index 9ff1f515733c6459666170d47899f44e8605f775..dfbcbe8d64a52ffc3a6e2b7c282ec3b3a446c0f4 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -9215,7 +9215,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
@@ -9223,7 +9223,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
"WebContentsImpl::OnFocusedElementChangedInFrame",
"render_frame_host", frame);
RenderWidgetHostViewBase* root_view =

View File

@@ -11,7 +11,7 @@ This patch should be upstreamed as a conditional revert of the logic in desktop
vs mobile runtimes. i.e. restore the old logic only on desktop platforms
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 5405ac0b56463ff63b35ac9c5639b0b01df3f53f..7d14758a09b561878ae71ca74928352b249320a4 100644
index dc34e96861a95abccf9b63df0e73c810a4b9cd85..194c26ad281732303f1ae60759527bd32fc9abe2 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2040,9 +2040,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {

View File

@@ -20,7 +20,7 @@ index 424b73ed6ccda8a29ddfb17e7c1ed2dbbe222711..2391a8e29a9501b7f2461867991819bb
injector_->ExpectsResults(), injector_->ShouldWaitForPromise());
}
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index 3019c0981a9febef2d8c1692265d5464cc3cba50..6837fae343e28f077b8d5fbd0239f1805ae3004f 100644
index 3e3a9bd563082734a0f20d921ad17ee86055a605..668ea139160deebf068d5b01cc2d44ed5bb73df1 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -446,6 +446,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
@@ -216,7 +216,7 @@ index abb5727537fa14576d49d8afbc78fcffc2b74919..fa3dd9fabcebdc8ea87f398e79847db7
mojom::blink::WantResultOption::kWantResult, wait_for_promise);
}
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 740edf24927389194ba8fa0d45c2a3c6b1990170..f4c30ed1f8ea87ca7da5ad7e1eaf53998042841c 100644
index cff5338a2137a851a2c081e9a444d5cb54eedc96..aa4122b66f3805f49b97427def7eca2543837037 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
@@ -1098,14 +1098,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
@@ -236,9 +236,9 @@ index 740edf24927389194ba8fa0d45c2a3c6b1990170..f4c30ed1f8ea87ca7da5ad7e1eaf5399
+ want_result_option, promise_behavior);
}
v8::MaybeLocal<v8::Value> WebLocalFrameImpl::CallFunctionEvenIfScriptDisabled(
bool WebLocalFrameImpl::IsInspectorConnected() {
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 08f39d6d29d5e19a6007b8c6d8aa3fec0b85cf32..0f6e41535a73d7051cf52517b225c5bfbac1f1cb 100644
index e43e3aabbdb30f9e566444b515cd475390e87d21..49a63b5b88f72d98bedf492277fb682646279942 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
@@ -196,6 +196,7 @@ class CORE_EXPORT WebLocalFrameImpl final

View File

@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
Allows embedder to intercept site instances created by chromium.
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index d8e55dd35c7bcfc341585b901ed8dc261d03870a..eaa3b5fe6320a746298c45c799ef4b29877d3542 100644
index c8c9bf3aa329b314027b5b3826fe496b47c30188..dc5357a845f1a5c5fc71188b07aa17902b049e36 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -4471,6 +4471,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -4478,6 +4478,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@@ -20,7 +20,7 @@ index d8e55dd35c7bcfc341585b901ed8dc261d03870a..eaa3b5fe6320a746298c45c799ef4b29
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index e3b8c5ba47193b57124ce743179a1b2009eb3ce7..7270f41928836daed875b99253798e50080f83a8 100644
index 1aabf4da23e5492c33b3d29bf5cc641aba510bda..f821a47caf042b4093bd6cf7b951fd8c28c73d4a 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -331,6 +331,11 @@ class CONTENT_EXPORT ContentBrowserClient {

View File

@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
index 57ce06d745941ef9c751e419cb1ac9ffe2739ff1..85709343c4a05af740616230c89c8bc83b9705b0 100644
index e4fd0a20a398ac90e76ed7a4253f21dcb1179fa1..b095cbda934d749ca3c1d37a1e2cd9d299ba046b 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -1347,6 +1347,11 @@
@@ -1351,6 +1351,11 @@
"includes": [8460],
},

View File

@@ -35,7 +35,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
system priority.
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 2561c2726d27ea2d2175dc52d0906481a231456a..1520bdd11f9770b7937b705f78a0191d934d0c6e 100644
index d3ba541d8d31bdb7bb2d3453ed5c85a7aab0e433..fbddb16dc4228e5baee3c94f88743c64113e14cb 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1046,6 +1046,7 @@ component("base") {
@@ -468,7 +468,7 @@ index 00493dc6c3f0229438b440a6fb2438ca668aba6b..6ce251058868529551cd6f008f840e06
return kAttributes;
}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index a0f17bb4ff8eede75f46bb365aca5cd59a90ebad..023183b173146264a1c0a602a3f8e64c94f5690f 100644
index 29dc84944dbf42dfdfdc43b8a49913cff374d919..3c3dfc789890eda3007c0723e6730e5fb88c4646 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -72,6 +72,7 @@ source_set("browser") {
@@ -526,7 +526,7 @@ index cde2af9e67566aa010cf94b003f4c36ccd887879..88352a659a7aaac708c4e3b23ac888dd
return false;
}
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index a4f19d10fdcb6cf09272bb7ef4e0290fa2d8239b..19dfbbfea9ace18e53b1de64066ffb161fa845cc 100644
index 2285564db47ef15eb9a83affd1e481b5671c3940..bc18a276d3029c3b858cfcb378ae2e4255d4d83e 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -53,7 +53,9 @@ class CursorManager;
@@ -537,9 +537,9 @@ index a4f19d10fdcb6cf09272bb7ef4e0290fa2d8239b..19dfbbfea9ace18e53b1de64066ffb16
@class NSAccessibilityRemoteUIElement;
+#endif
@class RenderWidgetHostViewCocoa;
@class CursorAccessibilityScaleFactorObserver;
@@ -685,9 +687,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
namespace content {
@@ -684,9 +686,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// EnsureSurfaceSynchronizedForWebTest().
uint32_t latest_capture_sequence_number_ = 0u;
@@ -552,10 +552,10 @@ index a4f19d10fdcb6cf09272bb7ef4e0290fa2d8239b..19dfbbfea9ace18e53b1de64066ffb16
// Used to force the NSApplication's focused accessibility element to be the
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
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 9f7b35dc9d0fd6190f689c3e7aa9e730a27e8e8c..fd3eeb9f52367e0c0fca33b82036290d02d4ca0d 100644
index dc71d54f9be1600e039b0d7361c7a31ee4e20cdb..6a595dfebeeb53706b60429bc904095a2ab4cba9 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -272,8 +272,10 @@
@@ -273,8 +273,10 @@
void RenderWidgetHostViewMac::MigrateNSViewBridge(
remote_cocoa::mojom::Application* remote_cocoa_application,
uint64_t parent_ns_view_id) {
@@ -566,7 +566,7 @@ index 9f7b35dc9d0fd6190f689c3e7aa9e730a27e8e8c..fd3eeb9f52367e0c0fca33b82036290d
// Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
// pointers. `ns_view_` gets reinitialized later in this method.
@@ -1636,8 +1638,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1637,8 +1639,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -577,7 +577,7 @@ index 9f7b35dc9d0fd6190f689c3e7aa9e730a27e8e8c..fd3eeb9f52367e0c0fca33b82036290d
return [GetInProcessNSView() window];
}
@@ -1686,9 +1690,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1687,9 +1691,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -589,7 +589,7 @@ index 9f7b35dc9d0fd6190f689c3e7aa9e730a27e8e8c..fd3eeb9f52367e0c0fca33b82036290d
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -2212,20 +2218,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -2213,20 +2219,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken(
GetRenderWidgetAccessibilityTokenCallback callback) {
base::ProcessId pid = getpid();
@@ -629,10 +629,10 @@ index 9f48c905f4abbb0f2e184299a915232cf6a0f6b0..f2d36e7b59533d7514a61a931341ef61
public_deps = [
":mojo_bindings",
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
index 6b6d292cf28c25c5ee903b2833eaf797bcbd8706..cedeb95341224e404372f7e54b8c8b026c6fb926 100644
index 2ac766d0149f0405b3fcad0ec1b6e0685ed3658c..5554eb0e084becf8100579f1d15e4796345676ba 100644
--- a/content/renderer/BUILD.gn
+++ b/content/renderer/BUILD.gn
@@ -232,6 +232,7 @@ target(link_target_type, "renderer") {
@@ -230,6 +230,7 @@ target(link_target_type, "renderer") {
}
configs += [ "//content:content_implementation" ]
@@ -709,7 +709,7 @@ index a119b4439bfb9218c7aaf09dca8e78527da7f20d..faa813b003940280c6eeb87e70173019
} // namespace content
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index 5a094bb42e828ca98b92f07d1a2451ace9766c5e..375472c4d8924397d22fb38662558c81fe8fe389 100644
index 73c16e94f6e8e037f82cfb403e1d60f89be523ed..ae8a3ecc109027b9ab86f970e612360056eacd55 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -504,6 +504,7 @@ static_library("test_support") {
@@ -736,7 +736,7 @@ index 5a094bb42e828ca98b92f07d1a2451ace9766c5e..375472c4d8924397d22fb38662558c81
public_deps = [
":test_interfaces",
@@ -2991,6 +2994,7 @@ test("content_unittests") {
@@ -2990,6 +2993,7 @@ test("content_unittests") {
}
configs += [ "//build/config:precompiled_headers" ]
@@ -1413,7 +1413,7 @@ index c8171f0527fe5194f0ea73b57c4444d4c630fbc4..7fa66598f2a541600602af47b3e1ed7b
// Accessible object
if (AXElementWrapper::IsValidElement(value)) {
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 1388140fcb81fcd56404aba6dea3ec32911b963c..3a3302bc8039eebc1ebc8094c14e242ed653a6f2 100644
index 64aca0117cd273bfcec0549e7b5b8ac77f2c91ce..e44c1bd4dd100b6b9b390f1fb07dc8e684182561 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -363,6 +363,7 @@ component("base") {
@@ -1592,10 +1592,10 @@ index dd1a98234966ba069bb6c7e6ab95f64cae0b0f1f..fa17d4b1974b6844ee11343f652d6896
// enough.
return PlatformFontMac::SystemFontType::kGeneral;
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index c8b1335d46fc37a9d699f1ef57bdd822ae5d29dd..93a72a8c52f4789f456889d018b3cf5497714760 100644
index b2b1a783ac0c243ef5cf573b2e73af82b432fbf9..1b43204b8ce15b9cc4cbf6c5a3d6853ab5da0858 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -721,6 +721,7 @@ component("views") {
@@ -722,6 +722,7 @@ component("views") {
"IOSurface.framework",
"QuartzCore.framework",
]
@@ -1603,7 +1603,7 @@ index c8b1335d46fc37a9d699f1ef57bdd822ae5d29dd..93a72a8c52f4789f456889d018b3cf54
}
if (is_win) {
@@ -1153,6 +1154,8 @@ source_set("test_support") {
@@ -1154,6 +1155,8 @@ source_set("test_support") {
"//ui/base/mojom:mojom",
]
@@ -1613,10 +1613,10 @@ index c8b1335d46fc37a9d699f1ef57bdd822ae5d29dd..93a72a8c52f4789f456889d018b3cf54
sources += [
"test/desktop_window_tree_host_win_test_api.cc",
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
index 4d2776c4a245dc755d4619c8680952cb8290e404..1f5a395de74f5d2d1a18c5f8ca7eeabfc671ede2 100644
index 9879c3456c12e2b0f0d550df1062da4a50a8e89d..83560d83ee240bb9197476d00578197fd299c12f 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -31,7 +31,9 @@
@@ -32,7 +32,9 @@
#include "ui/views/window/dialog_observer.h"
@class NativeWidgetMacNSWindow;
@@ -1640,7 +1640,7 @@ index 4d2776c4a245dc755d4619c8680952cb8290e404..1f5a395de74f5d2d1a18c5f8ca7eeabf
// Used to force the NSApplication's focused accessibility element to be the
// views::Views accessibility tree when the NSView for this is focused.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index c45bb34a05ad4e068f0f9f8bcab1da3dc84306e8..1dac5aef9961651cc1786eca028f2590ad34cfff 100644
index 8b05cee4302216bf804320abc708d69379ab4a64..ad3b5fe6f39bb21d3b33a8828e7f4de7b04226fa 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -349,7 +349,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1679,7 +1679,7 @@ index c45bb34a05ad4e068f0f9f8bcab1da3dc84306e8..1dac5aef9961651cc1786eca028f2590
// Explicitly set the keyboard accessibility state on regaining key
// window status.
if (is_key && is_content_first_responder)
@@ -1498,17 +1508,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1473,17 +1483,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
@@ -1700,7 +1700,7 @@ index c45bb34a05ad4e068f0f9f8bcab1da3dc84306e8..1dac5aef9961651cc1786eca028f2590
*pid = getpid();
id element_id = GetNativeViewAccessible();
@@ -1521,6 +1534,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1496,6 +1509,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
}
*token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id);

View File

@@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement
session.setCertificateVerifyCallback.
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index dff1afbe01fcd5904c50d5a546934fada8efd491..0344da969bd5f1adf01d8e285397d4136c8e0b8e 100644
index b2fae4a95035a0b371288ce9e85bcb83f04d809b..20ac173e49c24fb3e31a6d2e5616c1cc574a06b7 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -157,6 +157,11 @@
@@ -147,7 +147,7 @@ index dff1afbe01fcd5904c50d5a546934fada8efd491..0344da969bd5f1adf01d8e285397d413
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
diff --git a/services/network/network_context.h b/services/network/network_context.h
index c73d2ca100eeda97406427f6ff20b12b0ce393f2..5ddd56b235229f85fa2d0619b7f4614cb00d914e 100644
index d588c312ab2ed0068df49cdacfe3247345b0dbcb..78a76afc774a1a4c61d3010d6b03fd2879ccd39a 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -115,6 +115,7 @@ class URLMatcher;
@@ -167,7 +167,7 @@ index c73d2ca100eeda97406427f6ff20b12b0ce393f2..5ddd56b235229f85fa2d0619b7f4614c
void ResetURLLoaderFactories() override;
void GetViaObliviousHttp(
mojom::ObliviousHttpRequestPtr request,
@@ -925,6 +928,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -926,6 +929,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
std::vector<base::OnceClosure> dismount_closures_;
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
@@ -177,7 +177,7 @@ index c73d2ca100eeda97406427f6ff20b12b0ce393f2..5ddd56b235229f85fa2d0619b7f4614c
std::unique_ptr<HostResolver> internal_host_resolver_;
std::set<std::unique_ptr<HostResolver>, base::UniquePtrComparator>
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 0678afc12458f8609741bce73effe5315ec94036..1b3143b046135369c8b6a22b15d16fbfea3e615a 100644
index b3775284f55c7204c16989bd0eed50cd909ee0a4..c399fad53c56619d415f1ee36765953de5f1c84a 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -298,6 +298,16 @@ struct SocketBrokerRemotes {
@@ -208,7 +208,7 @@ index 0678afc12458f8609741bce73effe5315ec94036..1b3143b046135369c8b6a22b15d16fbf
CreateURLLoaderFactory(pending_receiver<URLLoaderFactory> url_loader_factory,
URLLoaderFactoryParams params);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index c025846455a8a3b024fe6f39274c68b8f8d30899..3640daadd0f1874930d0ffe9e560b53771e1ade7 100644
index 5d01189f263ae9d8f86304a74efb73bfacbf846d..407beb272038b19e6165495f247404b9654ecc2d 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -63,6 +63,8 @@ class TestNetworkContext : public mojom::NetworkContext {

View File

@@ -133,7 +133,7 @@ index 46b071609e56e8602b04d1cd9f5f4ebd7e4f4ae1..6092383e0f8f1c0d829a8ef8af53a786
const GURL& document_url,
const WeakDocumentPtr& weak_document_ptr,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 5624843d3e153d9aa69f146f668a29ec67c9315f..018082bc193c2ca6c945c4c238da74df55796112 100644
index eb065352102e539a690c1e06587cb3ac332c7dd1..fd695ec92ca4ff87aaa08c09aea4d1e2b36dddf9 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2048,7 +2048,7 @@ void RenderProcessHostImpl::CreateNotificationService(

View File

@@ -10,7 +10,7 @@ an about:blank check to this area.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index aaf595ff8a39e3bb8158b23fbac64930b0ebe69a..2d3a6281dba48a8bef5812beb025016d60c38cec 100644
index 8635932b649e575ccf98beb1b43afa3ba9d6e194..e8b05c28cd4da089c8cab916f530e81c8c67fac6 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -785,8 +785,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(

View File

@@ -39,7 +39,7 @@ index d236578cefc347e772305ac7ec54b9734e4aa20b..6bb89cea3b6b91ec8ea351ed60c4e405
ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
kCloseButtonIconSize));
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index cab32e89d40c86fa99e9e2375b968d99c7859003..9b74fd8accacb16860cf6961016c1f5205e98ba0 100644
index 0f0f44450b36c1ae38b60c34bff139c0104fe042..98363d75fe7103df8794d85c672fae1cb71c8179 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -17,9 +17,11 @@
@@ -52,9 +52,9 @@ index cab32e89d40c86fa99e9e2375b968d99c7859003..9b74fd8accacb16860cf6961016c1f52
#include "chrome/browser/ui/browser_finder.h"
+#endif
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/views/overlay/back_to_tab_button.h"
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
#include "chrome/browser/ui/views/overlay/close_image_button.h"
@@ -61,7 +63,7 @@
@@ -62,7 +64,7 @@
#include "ui/aura/window.h"
#endif
@@ -63,7 +63,7 @@ index cab32e89d40c86fa99e9e2375b968d99c7859003..9b74fd8accacb16860cf6961016c1f52
#include "chrome/browser/shell_integration_win.h"
#include "content/public/browser/render_widget_host_view.h"
#include "ui/aura/window.h"
@@ -314,7 +316,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
@@ -315,7 +317,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
overlay_window->Init(std::move(params));
overlay_window->OnRootViewReady();

View File

@@ -676,7 +676,7 @@ index 3c2fdc9f9a6c60efc4b0afacbfb83eef55917791..8fd9aff538fa03da6c171927c316d4f6
PrintingFailed(int32 cookie, PrintFailureReason reason);
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
index cd4a61255d677784f93d831b619c07f2682162ec..49452c0467adb8a086d3d1c3c823cf8b62839358 100644
index a56221b3d7ed30ba20766f902a934f47e71c63a3..c45900640ffa0baa61acc1341a963f0a4e136b27 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -51,6 +51,7 @@
@@ -687,7 +687,7 @@ index cd4a61255d677784f93d831b619c07f2682162ec..49452c0467adb8a086d3d1c3c823cf8b
#include "printing/units.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
@@ -1222,14 +1223,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
@@ -1225,14 +1226,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
}
print_in_progress_ = true;
@@ -704,7 +704,7 @@ index cd4a61255d677784f93d831b619c07f2682162ec..49452c0467adb8a086d3d1c3c823cf8b
if (!weak_this) {
return;
}
@@ -1260,12 +1261,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
@@ -1263,12 +1264,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
receivers_.Add(this, std::move(receiver));
}
@@ -722,7 +722,7 @@ index cd4a61255d677784f93d831b619c07f2682162ec..49452c0467adb8a086d3d1c3c823cf8b
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) {
return;
@@ -1282,9 +1285,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
@@ -1285,9 +1288,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
is_loading_ = frame->WillPrintSoon();
if (is_loading_) {
@@ -736,7 +736,7 @@ index cd4a61255d677784f93d831b619c07f2682162ec..49452c0467adb8a086d3d1c3c823cf8b
SetupOnStopLoadingTimeout();
return;
}
@@ -1294,7 +1298,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
@@ -1297,7 +1301,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
// plugin node and print that instead.
auto plugin = delegate_->GetPdfElement(frame);
@@ -745,7 +745,7 @@ index cd4a61255d677784f93d831b619c07f2682162ec..49452c0467adb8a086d3d1c3c823cf8b
if (render_frame_gone_) {
return;
@@ -1451,6 +1455,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
@@ -1454,6 +1458,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
return;
@@ -754,7 +754,7 @@ index cd4a61255d677784f93d831b619c07f2682162ec..49452c0467adb8a086d3d1c3c823cf8b
print_preview_context_.OnPrintPreview();
#if BUILDFLAG(IS_CHROMEOS_ASH)
@@ -2043,17 +2049,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -2046,17 +2052,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@@ -777,7 +777,7 @@ index cd4a61255d677784f93d831b619c07f2682162ec..49452c0467adb8a086d3d1c3c823cf8b
DidFinishPrinting(PrintingResult::kFailPrintInit);
return;
}
@@ -2074,8 +2082,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -2077,8 +2085,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
print_pages_params_->params->print_scaling_option;
auto self = weak_ptr_factory_.GetWeakPtr();
@@ -794,7 +794,7 @@ index cd4a61255d677784f93d831b619c07f2682162ec..49452c0467adb8a086d3d1c3c823cf8b
// Check if `this` is still valid.
if (!self)
return;
@@ -2336,29 +2351,37 @@ void PrintRenderFrameHelper::IPCProcessed() {
@@ -2339,29 +2354,37 @@ void PrintRenderFrameHelper::IPCProcessed() {
}
bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame,
@@ -883,10 +883,10 @@ index 14de029740ffbebe06d309651c1a2c007d9fb96b..e9bf9c5bef2a9235260e7d6c8d26d415
ScriptingThrottler scripting_throttler_;
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 023183b173146264a1c0a602a3f8e64c94f5690f..c98eb3bc508956c9ff01670abb1cf060fe0b254a 100644
index 3c3dfc789890eda3007c0723e6730e5fb88c4646..00e4d081a6afac7414cb91d7d5bb276881f49ea0 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -3023,8 +3023,9 @@ source_set("browser") {
@@ -3025,8 +3025,9 @@ source_set("browser") {
"//ppapi/shared_impl",
]

View File

@@ -30,7 +30,7 @@ index 5674449d78669351471533c16b4385fa54328455..ecde17055787e0ec7dc1d635aa513ff6
// RenderWidgetHost on the primary main frame, and false otherwise.
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 300a585505e117d52c52eb5b085ebba421156f77..5405ac0b56463ff63b35ac9c5639b0b01df3f53f 100644
index 220cf4c17885da4b4f312709d3eff260100b9726..dc34e96861a95abccf9b63df0e73c810a4b9cd85 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1974,6 +1974,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
@@ -44,10 +44,10 @@ index 300a585505e117d52c52eb5b085ebba421156f77..5405ac0b56463ff63b35ac9c5639b0b0
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 56c87788fdbe3c50bb5b9dea47a35510a42b4e8e..b5887cb0a8312efbaf31c9552a59af65f6f82e07 100644
index 30f60283002c6b0fb540a47def95e8496dccebdb..5bcf895fbcc395ab664e208772e0fe5a9f99e153 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5447,6 +5447,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -5451,6 +5451,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get();
}
@@ -60,10 +60,10 @@ index 56c87788fdbe3c50bb5b9dea47a35510a42b4e8e..b5887cb0a8312efbaf31c9552a59af65
RenderWidgetHostImpl* render_widget_host) {
return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost();
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index abf97090109393b0a1a029d602851a3138abc39d..43d2eb6c9c0c8333ac649d57f22213e8b5b60358 100644
index d223145c0d62db4311b13c60098ffd0b043b376c..ac8df36e9bef3dc4dd52b63d2db7ea3a9f3162ce 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1109,6 +1109,7 @@ class CONTENT_EXPORT WebContentsImpl
@@ -1107,6 +1107,7 @@ class CONTENT_EXPORT WebContentsImpl
void SendScreenRects() override;
void SendActiveState(bool active) override;
TextInputManager* GetTextInputManager() override;
@@ -72,7 +72,7 @@ index abf97090109393b0a1a029d602851a3138abc39d..43d2eb6c9c0c8333ac649d57f22213e8
RenderWidgetHostImpl* render_widget_host) override;
bool IsShowingContextMenuOnPage() const override;
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index 0fdc42b4c027ee17e98dada04dee5d018f4003e6..03e55751526db0c1771fb17ac957e83f4b308363 100644
index c780eb133181dc2c94c07723244c8db4f938247a..56939f97cb41e1f0136fe97300cc30519a19723e 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -33,6 +33,7 @@

View File

@@ -8,7 +8,7 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w
to upstream this change to Chrome.
diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
index 22ae6223d89316fe4fe419c54e201111275671cf..a95bd243ab43cd1878cd62e76999e706d3b084ec 100644
index f6c1502ef5c782fa435e35dc05e5024c38881028..bcd81f8d78b9745aa883508a51c2a0d0505dae20 100644
--- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
+++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
@@ -42,7 +42,6 @@

View File

@@ -52,10 +52,10 @@ Some alternatives to this patch:
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 19c940ccf37f16804e16d1c54a638d1c6f13384d..a79561241a182e5e168201598aef29dd2fff3d02 100644
index ef70be5f9e11d4f24668ff25ed3c25eeeeeb3c57..78923a81c64fb7738f4e457e3166a88f3c150564 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1581,7 +1581,7 @@ if (is_chrome_branded && !is_android) {
@@ -1585,7 +1585,7 @@ if (is_chrome_branded && !is_android) {
}
}
@@ -64,7 +64,7 @@ index 19c940ccf37f16804e16d1c54a638d1c6f13384d..a79561241a182e5e168201598aef29dd
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
@@ -1620,6 +1620,12 @@ if (!is_android) {
@@ -1624,6 +1624,12 @@ if (!is_android) {
}
}

View File

@@ -6,7 +6,7 @@ Subject: scroll_bounce_flag.patch
Patch to make scrollBounce option work.
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index c8bdd54e22b9b5af03fb84d50614c54f778e0d78..252ddae46cebaa6a7864aa24970482c4eade217a 100644
index 2ffea4d9b7890ff6760c4226875adfbda90d476b..c3cf1992340c8f844d6540068264fa97dbca6958 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1281,7 +1281,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {

View File

@@ -22,7 +22,7 @@ However, the patch would need to be reviewed by the security team, as it
does touch a security-sensitive class.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 018082bc193c2ca6c945c4c238da74df55796112..a73d45693c26e75f4d19ebf971d4cc04013c1a2b 100644
index fd695ec92ca4ff87aaa08c09aea4d1e2b36dddf9..e17653460749d455b4732d63195395fe3ea1d864 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1698,9 +1698,15 @@ bool RenderProcessHostImpl::Init() {

View File

@@ -9,10 +9,10 @@ is needed for OSR.
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 15d6c1bee20af41785f226b4495cec7a7a7a523b..f6ee9889a13febef9945fef2973bca759c713ac1 100644
index e3246011d776a8242530b117a55d0c909277a6d5..b35f23dd329f700eb85e5d206ac78cb0be4f2a19 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3636,6 +3636,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3640,6 +3640,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create());
@@ -26,7 +26,7 @@ index 15d6c1bee20af41785f226b4495cec7a7a7a523b..f6ee9889a13febef9945fef2973bca75
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3646,6 +3653,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3650,6 +3657,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}
@@ -35,7 +35,7 @@ index 15d6c1bee20af41785f226b4495cec7a7a7a523b..f6ee9889a13febef9945fef2973bca75
CHECK(view_.get());
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 73715da6824efbce7823b6b43b9aaf08378f3b33..c04223ef7bbd74f1f1c7ef690a1a8e6e5b882abc 100644
index cb42c99bacb204ef9573b3845673971c72f0344a..5258c9f6b5a1be7e5aa4ee850adcbd3c7d3864f0 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -109,10 +109,13 @@ class BrowserContext;

View File

@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 07a730f626ca1e8b9f360cd706041de98adbc213..aaf595ff8a39e3bb8158b23fbac64930b0ebe69a 100644
index 7a436aa00f9a54ff04dc05f0a49776b6acc81c1e..8635932b649e575ccf98beb1b43afa3ba9d6e194 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -8024,6 +8024,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -8030,6 +8030,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}
@@ -37,10 +37,10 @@ index 07a730f626ca1e8b9f360cd706041de98adbc213..aaf595ff8a39e3bb8158b23fbac64930
if (had_fullscreen_token && !GetView()->HasFocus())
GetView()->Focus();
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index f6ee9889a13febef9945fef2973bca759c713ac1..d40a93ff8cc7ff113e8655f6cae049a182eca290 100644
index b35f23dd329f700eb85e5d206ac78cb0be4f2a19..9ff1f515733c6459666170d47899f44e8605f775 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3891,21 +3891,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
@@ -3895,21 +3895,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
const input::NativeWebKeyboardEvent& event) {
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
"WebContentsImpl::PreHandleKeyboardEvent");
@@ -78,7 +78,7 @@ index f6ee9889a13febef9945fef2973bca759c713ac1..d40a93ff8cc7ff113e8655f6cae049a1
}
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
@@ -4064,7 +4068,7 @@ void WebContentsImpl::EnterFullscreenMode(
@@ -4068,7 +4072,7 @@ void WebContentsImpl::EnterFullscreenMode(
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
DCHECK(CanEnterFullscreenMode(requesting_frame));
DCHECK(requesting_frame->IsActive());

View File

@@ -26,10 +26,10 @@ index 784e0a5166d6bece3f6a251e7cab1192e576af22..efd8ef49f1f2b6ecd6c3638b56e40c4e
// An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 8ad54eacf1ec5ff94d3f85484cce9c80103ce3d4..7490df0c5fa6a0f3b292a130f1930f537ac186a3 100644
index da2515e0067a977691227bfacb3643cf1c23cc5c..f892e242564d33766ab94aa466460df4bebaf929 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -902,6 +902,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -881,6 +881,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@@ -43,10 +43,10 @@ index 8ad54eacf1ec5ff94d3f85484cce9c80103ce3d4..7490df0c5fa6a0f3b292a130f1930f53
const v8::Local<v8::Context>& worker) {
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index b2eae6bcf84a68f60ad00f5a84a7bcda42b6c7aa..4514bae97793815bc5ae0e94819253f7b5374116 100644
index 69c52cb8333fc8e967631c2f9535e8f15a421ee0..937714ced2e73ae3950c35e012f633d916de6f5c 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -197,6 +197,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -195,6 +195,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@@ -55,10 +55,10 @@ index b2eae6bcf84a68f60ad00f5a84a7bcda42b6c7aa..4514bae97793815bc5ae0e94819253f7
const blink::WebSecurityOrigin& script_origin) override;
blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel(
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index cbc11108212e72e569503f3b1a746b37e4305274..2b8bb13dda4c66d9b7e16a5faf779083b19f0b7d 100644
index 700e93a9ed053e4141658c86a26ec230aed42916..394b2f06501f52478614ba6565dfae47b3ce1e8f 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -670,6 +670,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -662,6 +662,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

View File

@@ -35,10 +35,10 @@ index efd8ef49f1f2b6ecd6c3638b56e40c4e418f3493..9d8a1947e371d085486c1c4e27edfb03
// from the worker thread.
virtual void WillDestroyWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 7490df0c5fa6a0f3b292a130f1930f537ac186a3..f8619a6fa8b735884483290a3875280d6090d5e8 100644
index f892e242564d33766ab94aa466460df4bebaf929..d2fb42a27d51e1bb4725fce3aea9387f8f9a3017 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -914,6 +914,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
@@ -893,6 +893,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
worker);
}
@@ -52,10 +52,10 @@ index 7490df0c5fa6a0f3b292a130f1930f537ac186a3..f8619a6fa8b735884483290a3875280d
const blink::WebSecurityOrigin& script_origin) {
return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 4514bae97793815bc5ae0e94819253f7b5374116..9738e154823fd438730485b1b1d24932d45e9518 100644
index 937714ced2e73ae3950c35e012f633d916de6f5c..811390014521eeeb98bb122d827d652d7230622d 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -197,6 +197,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -195,6 +195,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@@ -65,10 +65,10 @@ index 4514bae97793815bc5ae0e94819253f7b5374116..9738e154823fd438730485b1b1d24932
bool AllowScriptExtensionForServiceWorker(
const blink::WebSecurityOrigin& script_origin) override;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 2b8bb13dda4c66d9b7e16a5faf779083b19f0b7d..26d8496e05659a1a4fdb3ee5f664dc7d7314046b 100644
index 394b2f06501f52478614ba6565dfae47b3ce1e8f..46a8c958c0f896a42106f73ce13171eefbd0f662 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -670,6 +670,8 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -662,6 +662,8 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

View File

@@ -23,14 +23,14 @@ index 2a68349448c163fa29af327a03b11678e61f5789..42285328055ddb7c76548258f3c4847d
template<typename T>
class PersistentBase :
diff --git a/nan_persistent_12_inl.h b/nan_persistent_12_inl.h
index d9649e867606c6356e393e9964b5607a08ea4e3a..09a8d6d722b8e8af367f71a2b0685bbb7a6fa40e 100644
index d9649e867606c6356e393e9964b5607a08ea4e3a..ad89657e204259018f1e3814a864410a0917a915 100644
--- a/nan_persistent_12_inl.h
+++ b/nan_persistent_12_inl.h
@@ -129,4 +129,15 @@ class Global : public v8::UniquePersistent<T> {
};
#endif
+#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 12 && V8_MINOR_VERSION >= 5)
+#if defined(V8_MAJOR_VERSION) && ((V8_MAJOR_VERSION >= 12 && V8_MINOR_VERSION >= 5) || V8_MAJOR_VERSION >= 13)
+template<typename T>
+struct CopyablePersistentTraits {
+ typedef v8::Persistent<T, CopyablePersistentTraits<T> > CopyablePersistent;

View File

@@ -17,7 +17,6 @@ feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch
support_v8_sandboxed_pointers.patch
build_ensure_native_module_compilation_fails_if_not_using_a_new.patch
fix_expose_the_built-in_electron_module_via_the_esm_loader.patch
fix_expose_lookupandcompile_with_parameters.patch
enable_crashpad_linux_node_processes.patch
fix_lazyload_fs_in_esm_loaders_to_apply_asar_patches.patch
chore_expose_importmoduledynamically_and.patch
@@ -25,7 +24,6 @@ test_formally_mark_some_tests_as_flaky.patch
fix_adapt_debugger_tests_for_upstream_v8_changes.patch
chore_remove_--no-harmony-atomics_related_code.patch
fix_account_for_createexternalizablestring_v8_global.patch
fix_-wshadow_warning.patch
fix_do_not_resolve_electron_entrypoints.patch
ci_ensure_node_tests_set_electron_run_as_node.patch
fix_assert_module_in_the_renderer_process.patch
@@ -37,7 +35,6 @@ fix_capture_embedder_exceptions_before_entering_v8.patch
spec_add_iterator_to_global_intrinsics.patch
test_make_test-node-output-v8-warning_generic.patch
test_match_wpt_streams_transferable_transform-stream-members_any_js.patch
build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch
fix_revert_src_lb_reducing_c_calls_of_esm_legacy_main_resolve.patch
deprecate_vector_v8_local_in_v8.patch
fix_remove_deprecated_errno_constants.patch
@@ -52,6 +49,7 @@ chore_remove_calls_to_v8_functioncallbackinfo_holder.patch
src_do_not_use_soon-to-be-deprecated_v8_api.patch
fix_add_property_query_interceptors.patch
src_account_for_openssl_unexpected_version.patch
windows_32bit_config_change_callback_needs_to_be_stdcall.patch
fix_building_with_unicode.patch
src_stop_using_deprecated_fields_of_fastapicallbackoptions.patch
build_don_t_redefine_win32_lean_and_mean.patch
src_use_supported_api_to_get_stalled_tla_messages.patch
build_compile_with_c_20_support.patch

View File

@@ -537,10 +537,10 @@ index 0e69d7383762f6b81c5b57698aa9d121d5a9c401..35bbeb37acc7ccb14b4b8a644ec3d4c7
cflags_c = [
"-mavx512vl",
diff --git a/deps/cares/BUILD.gn b/deps/cares/BUILD.gn
index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..087e27424f3997575e4e089a57955d04b8802321 100644
index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..d083aea4cb895d8425041879f1b22a6ee43a0b60 100644
--- a/deps/cares/BUILD.gn
+++ b/deps/cares/BUILD.gn
@@ -1,14 +1,170 @@
@@ -1,14 +1,172 @@
-##############################################################################
-# #
-# DO NOT EDIT THIS FILE! #
@@ -566,7 +566,6 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..087e27424f3997575e4e089a57955d04
+ "include/ares_dns.h",
+ "include/ares_dns_record.h",
+ "include/ares_nameser.h",
+ "include/ares_rules.h",
+ "include/ares_version.h",
+ "src/lib/ares__addrinfo2hostent.c",
+ "src/lib/ares__addrinfo_localhost.c",
@@ -604,6 +603,8 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..087e27424f3997575e4e089a57955d04
+ "src/lib/ares_data.h",
+ "src/lib/ares_destroy.c",
+ "src/lib/ares_dns_mapping.c",
+ "src/lib/ares_dns_multistring.c",
+ "src/lib/ares_dns_multistring.h",
+ "src/lib/ares_dns_name.c",
+ "src/lib/ares_dns_parse.c",
+ "src/lib/ares_dns_record.c",
@@ -637,6 +638,7 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..087e27424f3997575e4e089a57955d04
+ "src/lib/ares_library_init.c",
+ "src/lib/ares_ipv6.h",
+ "src/lib/ares_math.c",
+ "src/lib/ares_metrics.c",
+ "src/lib/ares_options.c",
+ "src/lib/ares_parse_a_reply.c",
+ "src/lib/ares_parse_aaaa_reply.c",
@@ -673,7 +675,6 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..087e27424f3997575e4e089a57955d04
+ "src/lib/ares_version.c",
+ "src/lib/inet_net_pton.c",
+ "src/lib/inet_ntop.c",
+ "src/lib/setup_once.h",
+ "src/tools/ares_getopt.c",
+ "src/tools/ares_getopt.h",
+ ]
@@ -694,6 +695,7 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..087e27424f3997575e4e089a57955d04
+ defines += [ "CARES_PULL_WS2TCPIP_H=1" ]
+ include_dirs += [ "config/win32" ]
+ sources += [
+ "src/lib/ares_sysconfig_win.c",
+ "src/lib/config-win32.h",
+ "src/lib/windows_port.c",
+ ]
@@ -1263,10 +1265,10 @@ index 0000000000000000000000000000000000000000..af9cbada10203b387fb9732b346583b1
+}
diff --git a/filenames.json b/filenames.json
new file mode 100644
index 0000000000000000000000000000000000000000..679329d847fbfe303792cab5881287890c9961f4
index 0000000000000000000000000000000000000000..646df853a2b985f14fd66cae6af854977c074706
--- /dev/null
+++ b/filenames.json
@@ -0,0 +1,736 @@
@@ -0,0 +1,737 @@
+// This file is automatically generated by generate_gn_filenames_json.py
+// DO NOT EDIT
+{
@@ -1636,6 +1638,7 @@ index 0000000000000000000000000000000000000000..679329d847fbfe303792cab588128789
+ "lib/internal/streams/destroy.js",
+ "lib/internal/streams/duplex.js",
+ "lib/internal/streams/duplexify.js",
+ "lib/internal/streams/duplexpair.js",
+ "lib/internal/streams/end-of-stream.js",
+ "lib/internal/streams/from.js",
+ "lib/internal/streams/lazy_transform.js",
@@ -2221,10 +2224,10 @@ index 909fd14345fcd988c381e640280f4b33f2e0c351..800431e6659f95f0495cb90b8fa2cccb
+ args = rebase_path(inputs + outputs, root_build_dir)
}
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index bbb63df7899d4b9bf80e13eee78453352dd5c75b..804296db12f7864f72648f5f36834a924503e4a6 100644
index 706ea4f5cb90525c8ea56f794320a733c45a193f..c7ae7759595bfc7fdc31dab174a7514ddd8345e7 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -765,6 +765,7 @@ void BuiltinLoader::RegisterExternalReferences(
@@ -773,6 +773,7 @@ void BuiltinLoader::RegisterExternalReferences(
registry->Register(GetNatives);
RegisterExternalReferencesForInternalizedBuiltinCode(registry);
@@ -2233,7 +2236,7 @@ index bbb63df7899d4b9bf80e13eee78453352dd5c75b..804296db12f7864f72648f5f36834a92
} // namespace builtins
diff --git a/src/node_builtins.h b/src/node_builtins.h
index 75a7f3dd89e096d13ad7d70ed29d301cd56315b5..9a20a275fbe5df9f384b7b1d1d26806e7cd05384 100644
index 1cb85b9058d06555382e565dc32192a9fa48ed9f..cec9be01abd107e8612f70daf19b4834e118ffcf 100644
--- a/src/node_builtins.h
+++ b/src/node_builtins.h
@@ -74,6 +74,8 @@ using BuiltinCodeCacheMap =

View File

@@ -0,0 +1,42 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Wed, 4 Sep 2024 16:39:23 +0200
Subject: build: compile with C++20 support
Refs https://github.com/nodejs/node/pull/45427
V8 requires C++20 support as of https://chromium-review.googlesource.com/c/v8/v8/+/5587859.
This can be removed when Electron upgrades to a version of Node.js containing the required V8 version.
diff --git a/common.gypi b/common.gypi
index 8736ad12eec294070a5160a64248044cd16347c9..216200c279c599f6dee228120ff5f3943fa52ffd 100644
--- a/common.gypi
+++ b/common.gypi
@@ -307,7 +307,7 @@
'VCCLCompilerTool': {
'AdditionalOptions': [
'/Zc:__cplusplus',
- '-std:c++17'
+ '-std:c++20'
],
'BufferSecurityCheck': 'true',
'DebugInformationFormat': 1, # /Z7 embed info in .obj files
@@ -489,7 +489,7 @@
}],
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
- 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ],
+ 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++20' ],
'defines': [ '__STDC_FORMAT_MACROS' ],
'ldflags': [ '-rdynamic' ],
'target_conditions': [
@@ -660,7 +660,7 @@
['clang==1', {
'xcode_settings': {
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
- 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++17', # -std=gnu++17
+ 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++20', # -std=gnu++20
'CLANG_CXX_LIBRARY': 'libc++',
},
}],

View File

@@ -0,0 +1,36 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Fri, 23 Aug 2024 16:50:19 +0200
Subject: build: don't redefine WIN32_LEAN_AND_MEAN
https://github.com/nodejs/node/pull/53722 added a new define for WIN32_LEAN_AND_MEAN
without first checking to see if it was defined - other areas in c-ares do this so
we should here as well. Compilation errors occur otherwise:
../../third_party/electron_node/deps/cares/include\ares_build.h(168,11): error: 'WIN32_LEAN_AND_MEAN' macro redefined [-Werror,-Wmacro-redefined]
168 | # define WIN32_LEAN_AND_MEAN
| ^
<command line>(25,9): note: previous definition is here
25 | #define WIN32_LEAN_AND_MEAN 1
| ^
1 error generated.
[287 processes, 49437/51449 @ 48.5/s : 1018.562s] CC obj/third_party/electron_node/deps/cares/cares/ares__socket.obj
FAILED: obj/third_party/electron_node/deps/cares/cares/ares__socket.obj
This should be upstreamed.
diff --git a/deps/cares/include/ares_build.h b/deps/cares/include/ares_build.h
index 18a92606a817145302c73b5081b4c989799bc620..bafd26d9210d2347fec41f028e9e65088b83c48c 100644
--- a/deps/cares/include/ares_build.h
+++ b/deps/cares/include/ares_build.h
@@ -165,7 +165,9 @@
# define CARES_TYPEOF_ARES_SOCKLEN_T int
#elif defined(_WIN32)
-# define WIN32_LEAN_AND_MEAN
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_HAVE_WINDOWS_H 1
# define CARES_HAVE_SYS_TYPES_H 1

View File

@@ -33,12 +33,12 @@ index 8d7204f6cb48f783adc4d1c1eb2de0c83b7fffe2..a154559a56bf383d3c26af523c9bb07b
// Non-alphabetic chars.
diff --git a/lib/internal/http.js b/lib/internal/http.js
index b20b3cd229efcd9701791309361b7d106f315900..6b2820c9dcce5e658b694f53e75d93707c4320d7 100644
index c26c322aafc64ed9ca2a7c1fd703555a251db9de..f94bc5824d6c83fd1feca31c572dcfd3ac130bda 100644
--- a/lib/internal/http.js
+++ b/lib/internal/http.js
@@ -10,8 +10,8 @@ const {
const { setUnrefTimeout } = require('internal/timers');
const { trace, isTraceCategoryEnabled } = internalBinding('trace_events');
const { getCategoryEnabledBuffer, trace } = internalBinding('trace_events');
const {
- CHAR_LOWERCASE_B,
- CHAR_LOWERCASE_E,
@@ -47,7 +47,7 @@ index b20b3cd229efcd9701791309361b7d106f315900..6b2820c9dcce5e658b694f53e75d9370
} = require('internal/constants');
let utcCache;
@@ -44,11 +44,13 @@ function isTraceHTTPEnabled() {
@@ -46,11 +46,13 @@ function isTraceHTTPEnabled() {
const traceEventCategory = 'node,node.http';
function traceBegin(...args) {

View File

@@ -7,7 +7,7 @@ Subject: build: ensure native module compilation fails if not using a new
This should not be upstreamed, it is a quality-of-life patch for downstream module builders.
diff --git a/common.gypi b/common.gypi
index 9a27610992612b59eadcc8e481683cf1e6a5dbb6..1fad20645d059ad5f3efaa9279f582f99cb1006b 100644
index 689e7fb2339253d0f2be3ccf33ecd76660ccf176..8736ad12eec294070a5160a64248044cd16347c9 100644
--- a/common.gypi
+++ b/common.gypi
@@ -87,6 +87,8 @@
@@ -19,7 +19,7 @@ index 9a27610992612b59eadcc8e481683cf1e6a5dbb6..1fad20645d059ad5f3efaa9279f582f9
##### end V8 defaults #####
# When building native modules using 'npm install' with the system npm,
@@ -286,6 +288,7 @@
@@ -287,6 +289,7 @@
# Defines these mostly for node-gyp to pickup.
'defines': [
'_GLIBCXX_USE_CXX11_ABI=1',
@@ -27,7 +27,7 @@ index 9a27610992612b59eadcc8e481683cf1e6a5dbb6..1fad20645d059ad5f3efaa9279f582f9
],
# Forcibly disable -Werror. We support a wide range of compilers, it's
@@ -415,6 +418,11 @@
@@ -416,6 +419,11 @@
}],
],
}],
@@ -40,7 +40,7 @@ index 9a27610992612b59eadcc8e481683cf1e6a5dbb6..1fad20645d059ad5f3efaa9279f582f9
# list in v8/BUILD.gn.
['v8_enable_v8_checks == 1', {
diff --git a/configure.py b/configure.py
index f189ba2bf09fc248b3c1ce3c3535b939a4160ad2..2c24db93618f88f5f07e95a3edf63fb7942ac009 100755
index 3084cc964cbe6d02f98d08cd6f847ea7f4a3d0db..5b6a3b62082985debf6ebc4bc09a7d056f58514a 100755
--- a/configure.py
+++ b/configure.py
@@ -1559,6 +1559,7 @@ def configure_library(lib, output, pkgname=None):
@@ -52,7 +52,7 @@ index f189ba2bf09fc248b3c1ce3c3535b939a4160ad2..2c24db93618f88f5f07e95a3edf63fb7
o['variables']['v8_enable_javascript_promise_hooks'] = 1
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
diff --git a/src/node.h b/src/node.h
index c267ed1eeaa2d8b6ecd5a1563a4e9440bf0cca00..e55256996f2c85b0ae3854cbd1b83ca88a3e22cb 100644
index 4f2eb9d0aab88b70c86339e750799080e980d7da..df3fb3372d6357b5d77b4f683e309b8483998128 100644
--- a/src/node.h
+++ b/src/node.h
@@ -22,6 +22,12 @@

View File

@@ -1,35 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Wed, 17 Jan 2024 16:01:08 +0100
Subject: build: ensure v8_pointer_compression_sandbox is enabled on 64bit
The defines themselves were upstreamed in https://github.com/nodejs/node/pull/50820
but the ability to configure the variables themselves were not. This adds that back
in.
This should be upstreamed.
diff --git a/common.gypi b/common.gypi
index 1fad20645d059ad5f3efaa9279f582f99cb1006b..4fbb33550e8a044b92997a42eb6603f151ba1043 100644
--- a/common.gypi
+++ b/common.gypi
@@ -134,6 +134,7 @@
['target_arch in "arm ia32 mips mipsel ppc"', {
'v8_enable_pointer_compression': 0,
'v8_enable_31bit_smis_on_64bit_arch': 0,
+ 'v8_enable_sandbox': 0
}],
['target_arch in "ppc64 s390x"', {
'v8_enable_backtrace': 1,
diff --git a/configure.py b/configure.py
index 2c24db93618f88f5f07e95a3edf63fb7942ac009..4e6dc7378e4435b90246eb072379cea1bfdad09c 100755
--- a/configure.py
+++ b/configure.py
@@ -1573,6 +1573,7 @@ def configure_v8(o):
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
o['variables']['v8_enable_maglev'] = 1 if options.v8_enable_maglev else 0
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
+ o['variables']['v8_enable_sandbox'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression or options.disable_shared_ro_heap else 1
o['variables']['v8_enable_extensible_ro_snapshot'] = 0

View File

@@ -34,7 +34,7 @@ index f5ecc15159f457cd0b8069c0427b7c758c916c4e..c9ce67391f321989b0af48159b4da3ab
let kResistStopPropagation;
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index 804296db12f7864f72648f5f36834a924503e4a6..2cac503e92640a4683a4be6969f1ed40e42785a0 100644
index c7ae7759595bfc7fdc31dab174a7514ddd8345e7..4bf80aa6cc6385dc376fd0a3538efc27fe5bd0a2 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -35,6 +35,7 @@ using v8::Value;
@@ -46,10 +46,10 @@ index 804296db12f7864f72648f5f36834a924503e4a6..2cac503e92640a4683a4be6969f1ed40
AddExternalizedBuiltin(
"internal/deps/cjs-module-lexer/lexer",
diff --git a/src/node_builtins.h b/src/node_builtins.h
index 9a20a275fbe5df9f384b7b1d1d26806e7cd05384..a1a9fe7d592f0d57b70dcee8c865b99d71248bf2 100644
index cec9be01abd107e8612f70daf19b4834e118ffcf..3d9c6b962423555257bad4ebaad9ebd821d00042 100644
--- a/src/node_builtins.h
+++ b/src/node_builtins.h
@@ -132,6 +132,7 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
@@ -138,6 +138,7 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
// Generated by tools/js2c.py as node_javascript.cc
void LoadJavaScriptSource(); // Loads data into source_

View File

@@ -15,10 +15,10 @@ This patch is expected to be deleted once we catch up with a Node.js
upgrade that includes the original Node.js commit above.
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
index 9ad67e0993da4c3e3f8a14681edbf941cf14e2e6..29ed378d32d452518dc929e60e6038ba4ca38a5c 100644
index ff658ec88e5161cd66536ee6e95dba675b16eccc..9bbb8ab908d8d992abb43254860d51f57f56387b 100644
--- a/src/module_wrap.cc
+++ b/src/module_wrap.cc
@@ -186,8 +186,7 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
@@ -202,8 +202,7 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
}
Local<String> source_text = args[2].As<String>();
@@ -28,7 +28,7 @@ index 9ad67e0993da4c3e3f8a14681edbf941cf14e2e6..29ed378d32d452518dc929e60e6038ba
line_offset,
column_offset,
true, // is cross origin
@@ -394,7 +393,6 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo<Value>& args) {
@@ -464,7 +463,6 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo<Value>& args) {
ShouldNotAbortOnUncaughtScope no_abort_scope(realm->env());
TryCatchScope try_catch(realm->env());
@@ -37,7 +37,7 @@ index 9ad67e0993da4c3e3f8a14681edbf941cf14e2e6..29ed378d32d452518dc929e60e6038ba
bool timed_out = false;
bool received_signal = false;
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index f9a090f5c3e04403602ba383032e7f3230669a92..3f82db324d406e342abee23ab0d7f7c9807ff652 100644
index 4bf80aa6cc6385dc376fd0a3538efc27fe5bd0a2..3e37aa8b0c9696cceb3f3cfab9721f38c74a2fba 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -267,7 +267,7 @@ MaybeLocal<Function> BuiltinLoader::LookupAndCompileInternal(

View File

@@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form
of this.
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index 155485dbab0d46bb225fa40e99f555d805659c4f..8183cffe9d7060571c08f696abb7c090e6df3be8 100644
index 364469160af5e348f8890417de16a63c0d1dca67..75d5f58fe02fa8cfa7716ffaf761d567ab403a2c 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -1331,6 +1331,13 @@ Module.prototype._compile = function(content, filename) {
@@ -1441,6 +1441,13 @@ Module.prototype._compile = function(content, filename, loadAsESM = false) {
if (getOptionValue('--inspect-brk') && process._eval == null) {
if (!resolvedArgv) {
// We enter the repl if we're not given a filename argument.
@@ -26,10 +26,10 @@ index 155485dbab0d46bb225fa40e99f555d805659c4f..8183cffe9d7060571c08f696abb7c090
try {
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
index 8fad2fe617e4f8d2364b8c9d3cfb27c265f08b5b..710af646aaf97f88ac2ee003d8f83388ccf9a84f 100644
index 59308ab817fb864a7b84ecf349c9e08d1c710342..8398657065b28a4451b8fe3996e63838a1645314 100644
--- a/lib/internal/process/pre_execution.js
+++ b/lib/internal/process/pre_execution.js
@@ -244,12 +244,14 @@ function patchProcessObject(expandArgv1) {
@@ -245,12 +245,14 @@ function patchProcessObject(expandArgv1) {
if (expandArgv1 && process.argv[1] &&
!StringPrototypeStartsWith(process.argv[1], '-')) {
// Expand process.argv[1] into a full path.

View File

@@ -11,10 +11,10 @@ its own blended handler between Node and Blink.
Not upstreamable.
diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js
index d7867864bba7141b7ba12b171d185a94ed25d01d..d93a248d8a96fe1dffa08b39cfe3ea7b368db54a 100644
index 150816057129c147c13ce044474f341581679f34..dd8627653265e22f55e67ec4a47641b20fba6c9d 100644
--- a/lib/internal/modules/esm/utils.js
+++ b/lib/internal/modules/esm/utils.js
@@ -24,7 +24,7 @@ const {
@@ -30,7 +30,7 @@ const {
ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING,
ERR_INVALID_ARG_VALUE,
} = require('internal/errors').codes;
@@ -23,7 +23,7 @@ index d7867864bba7141b7ba12b171d185a94ed25d01d..d93a248d8a96fe1dffa08b39cfe3ea7b
const {
loadPreloadModules,
initializeFrozenIntrinsics,
@@ -236,12 +236,13 @@ let _forceDefaultLoader = false;
@@ -273,12 +273,13 @@ let _forceDefaultLoader = false;
* @param {boolean} [forceDefaultLoader=false] - A boolean indicating disabling custom loaders.
*/
function initializeESM(forceDefaultLoader = false) {
@@ -40,10 +40,10 @@ index d7867864bba7141b7ba12b171d185a94ed25d01d..d93a248d8a96fe1dffa08b39cfe3ea7b
/**
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
index 501e4d7b7ea180588737fcbb2bf6ff79abfb9d9a..cce67100588bf6b47d26ee9168a123cb813b822e 100644
index eea74bed4bb8a980f99a9a1404c9a2df203ca09c..e862b51293135995c527c32aa3c3579780d7831c 100644
--- a/src/module_wrap.cc
+++ b/src/module_wrap.cc
@@ -561,7 +561,7 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback(
@@ -752,7 +752,7 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback(
return module->module_.Get(isolate);
}
@@ -52,7 +52,7 @@ index 501e4d7b7ea180588737fcbb2bf6ff79abfb9d9a..cce67100588bf6b47d26ee9168a123cb
Local<Context> context,
Local<v8::Data> host_defined_options,
Local<Value> resource_name,
@@ -626,12 +626,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
@@ -817,12 +817,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
Realm* realm = Realm::GetCurrent(args);
HandleScope handle_scope(isolate);
@@ -68,7 +68,7 @@ index 501e4d7b7ea180588737fcbb2bf6ff79abfb9d9a..cce67100588bf6b47d26ee9168a123cb
}
void ModuleWrap::HostInitializeImportMetaObjectCallback(
@@ -673,13 +674,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
@@ -864,13 +865,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
Realm* realm = Realm::GetCurrent(args);
Isolate* isolate = realm->isolate();
@@ -87,7 +87,7 @@ index 501e4d7b7ea180588737fcbb2bf6ff79abfb9d9a..cce67100588bf6b47d26ee9168a123cb
MaybeLocal<Value> ModuleWrap::SyntheticModuleEvaluationStepsCallback(
diff --git a/src/module_wrap.h b/src/module_wrap.h
index e17048357feca2419087621ed280de30882a90bc..63682be31ce00a3bf7b9be909cac4b7f9ec02a8e 100644
index 45a338b38e01c824f69ea59ee286130c67e9eddf..99bb079df11696fc3ba5e6bcca7e7a42818fe3d1 100644
--- a/src/module_wrap.h
+++ b/src/module_wrap.h
@@ -7,6 +7,7 @@
@@ -123,7 +123,7 @@ index e17048357feca2419087621ed280de30882a90bc..63682be31ce00a3bf7b9be909cac4b7f
private:
ModuleWrap(Realm* realm,
v8::Local<v8::Object> object,
@@ -102,7 +112,6 @@ class ModuleWrap : public BaseObject {
@@ -110,7 +120,6 @@ class ModuleWrap : public BaseObject {
v8::Local<v8::String> specifier,
v8::Local<v8::FixedArray> import_attributes,
v8::Local<v8::Module> referrer);

View File

@@ -10,7 +10,7 @@ https://issues.chromium.org/issues/333672197
This patch can be removed once Node addresses this change.
diff --git a/src/node_internals.h b/src/node_internals.h
index 6b4ec38bd092358a9433a1179dbe1e71f56aa387..0a9eaba5c71f711c58799d77a9de6072304deb9a 100644
index 5dff80ee287256ba40bfa496df6db60a18fbb9d7..a9162b4e2ee48dbebec8dc52b6990369be15fe4a 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -67,7 +67,7 @@ template <typename T, int (*F)(const typename T::HandleType*, sockaddr*, int*)>

View File

@@ -21,10 +21,10 @@ index 606a6f5caa3b11b6d2a9068ed2fd65800530a5eb..080dcce21da05ccea398d8a856deb397
typedef void (*FreeCallback)(char* data, void* hint);
diff --git a/src/node_errors.h b/src/node_errors.h
index 30f66a7648bff4e9b5cd9e9ba516d9c854482263..9eb9a1a932e2f097827ab24b1f3abd2ce20a51af 100644
index ad40141ca92c5a46ae2e4dfa96e4d6c239da8516..c462e5afcaa2328c4908fff462fc7c9fbfc1fd5f 100644
--- a/src/node_errors.h
+++ b/src/node_errors.h
@@ -227,7 +227,7 @@ inline v8::Local<v8::Value> ERR_BUFFER_TOO_LARGE(v8::Isolate* isolate) {
@@ -232,7 +232,7 @@ inline v8::Local<v8::Value> ERR_BUFFER_TOO_LARGE(v8::Isolate* isolate) {
char message[128];
snprintf(message, sizeof(message),
"Cannot create a Buffer larger than 0x%zx bytes",

View File

@@ -9,10 +9,10 @@ This patch can be removed when Electron upgrades to a version of Node.js that
contains the above CL.
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
index cce67100588bf6b47d26ee9168a123cb813b822e..9ad67e0993da4c3e3f8a14681edbf941cf14e2e6 100644
index e862b51293135995c527c32aa3c3579780d7831c..ff658ec88e5161cd66536ee6e95dba675b16eccc 100644
--- a/src/module_wrap.cc
+++ b/src/module_wrap.cc
@@ -169,7 +169,9 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
@@ -186,7 +186,9 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
export_names[i] = export_name_val.As<String>();
}

View File

@@ -8,7 +8,7 @@ to child processes spawned with `ELECTRON_RUN_AS_NODE` which is used
by the crashpad client to connect with the handler process.
diff --git a/lib/child_process.js b/lib/child_process.js
index c09fca512584ce2c674ae1d05136ff4cd8ea8471..d4edaa71a7bf6660bad209fbfbc43014bb4bf741 100644
index 48870b35ad0f3411f2d509b12d92a9e0d20046f9..e7ef454d2d71207ae7b2788a437b82bf7732716e 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -61,6 +61,7 @@ let debug = require('internal/util/debuglog').debuglog(
@@ -27,7 +27,7 @@ index c09fca512584ce2c674ae1d05136ff4cd8ea8471..d4edaa71a7bf6660bad209fbfbc43014
args = [...execArgv, modulePath, ...args];
if (typeof options.stdio === 'string') {
@@ -617,6 +617,22 @@ function normalizeSpawnArguments(file, args, options) {
@@ -618,6 +618,22 @@ function normalizeSpawnArguments(file, args, options) {
'options.windowsVerbatimArguments');
}
@@ -50,7 +50,7 @@ index c09fca512584ce2c674ae1d05136ff4cd8ea8471..d4edaa71a7bf6660bad209fbfbc43014
if (options.shell) {
validateArgumentNullCheck(options.shell, 'options.shell');
const command = ArrayPrototypeJoin([file, ...args], ' ');
@@ -650,7 +666,6 @@ function normalizeSpawnArguments(file, args, options) {
@@ -651,7 +667,6 @@ function normalizeSpawnArguments(file, args, options) {
ArrayPrototypeUnshift(args, file);
}

View File

@@ -1,45 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Fri, 7 Jul 2023 11:28:19 -0500
Subject: fix: -Wshadow warning
In utils.h's `ERROR_AND_ABORT` macro, rename the static local variable
`args` to avoid -Wshadow warnings in code that calls `ERROR_AND_ABORT()`
or `CHECK()` from a function that already has an `args` variable.
This patch could be removed after upstreaming to Node.js.
Example warning:
In file included from ../../third_party/electron_node/src/inspector/runtime_agent.cc:3:
In file included from ../../third_party/electron_node/src/env-inl.h:32:
../../third_party/electron_node/src/node_internals.h:72:3: error: declaration shadows a local variable [-Werror,-Wshadow]
72 | CHECK(args[0]->IsObject());
| ^
../../third_party/electron_node/src/util.h:154:7: note: expanded from macro 'CHECK'
154 | ERROR_AND_ABORT(expr); \
| ^
../../third_party/electron_node/src/util.h:132:38: note: expanded from macro 'ERROR_AND_ABORT'
132 | static const node::AssertionInfo args = { \
| ^
../../third_party/electron_node/src/node_internals.h:67:67: note: previous declaration is here
67 | void GetSockOrPeerName(const v8::FunctionCallbackInfo<v8::Value>& args) {
| ^
1 error generated.
diff --git a/src/util.h b/src/util.h
index 3ae876e5484f0ebacfae6749cc336f42cd69bf14..8e9e8289de249119d6b8078abe32db6b885dfaab 100644
--- a/src/util.h
+++ b/src/util.h
@@ -146,9 +146,9 @@ void DumpJavaScriptBacktrace(FILE* fp);
do { \
/* Make sure that this struct does not end up in inline code, but */ \
/* rather in a read-only data section when modifying this code. */ \
- static const node::AssertionInfo args = { \
+ static const node::AssertionInfo error_and_abort_args = { \
__FILE__ ":" STRINGIFY(__LINE__), #expr, PRETTY_FUNCTION_NAME}; \
- node::Assert(args); \
+ node::Assert(error_and_abort_args); \
/* `node::Assert` doesn't return. Add an [[noreturn]] abort() here to */ \
/* make the compiler happy about no return value in the caller */ \
/* function when calling ERROR_AND_ABORT. */ \

View File

@@ -7,7 +7,7 @@ common.gypi is a file that's included in the node header bundle, despite
the fact that we do not build node with gyp.
diff --git a/common.gypi b/common.gypi
index 0af8af37c6cf02d99456d30e4639bbddf8e6ace9..9a27610992612b59eadcc8e481683cf1e6a5dbb6 100644
index 7c0b4a0851b295ee0c86f701c997b739a3cb7a7a..689e7fb2339253d0f2be3ccf33ecd76660ccf176 100644
--- a/common.gypi
+++ b/common.gypi
@@ -89,6 +89,23 @@

View File

@@ -13,7 +13,7 @@ if the override has been disabled.
This will be upstreamed.
diff --git a/lib/assert.js b/lib/assert.js
index 9dfcf80a913942c93b206c6f871ac7807c7a7e81..4d25a22aedf7d7182bb709864e29b7e725336323 100644
index eadc3844c20128bb9f9a269e5d599f8febf17421..e4615e55c0847d969e9c95295ddecfc640019c99 100644
--- a/lib/assert.js
+++ b/lib/assert.js
@@ -66,6 +66,7 @@ const { inspect } = require('internal/util/inspect');
@@ -44,10 +44,10 @@ index 9dfcf80a913942c93b206c6f871ac7807c7a7e81..4d25a22aedf7d7182bb709864e29b7e7
let filename = call.getFileName();
const line = call.getLineNumber() - 1;
diff --git a/src/api/environment.cc b/src/api/environment.cc
index f9d29f0065b1de63a62cfdce74a9705c22dd87d7..3f44160f1bd40fc2d4658f10edf0d0b374732ca2 100644
index fe41619f45913fe31a59771c8d1af6cde3b89f66..bb6c6d51846fed1d160ec9dcd5a5dd67b4fef911 100644
--- a/src/api/environment.cc
+++ b/src/api/environment.cc
@@ -277,6 +277,9 @@ void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s) {
@@ -244,6 +244,9 @@ void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s) {
auto* prepare_stack_trace_cb = s.prepare_stack_trace_callback ?
s.prepare_stack_trace_callback : PrepareStackTraceCallback;
isolate->SetPrepareStackTraceCallback(prepare_stack_trace_cb);
@@ -58,18 +58,24 @@ index f9d29f0065b1de63a62cfdce74a9705c22dd87d7..3f44160f1bd40fc2d4658f10edf0d0b3
}
diff --git a/src/node_options.cc b/src/node_options.cc
index 28fbd93c5d4a6f379844e10e556920b7614910d8..53cf93719bea001db09697b56f197815549dc953 100644
index 74955717117001393e8b55809b4e4a1424019dad..409c6e3918e3ef7c9d35f87e093cb965cb889dd7 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -1321,6 +1321,11 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) {
Local<Context> context = env->context();
Local<Object> ret = Object::New(isolate);
@@ -1393,14 +1393,16 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) {
}
Isolate* isolate = args.GetIsolate();
+ if (ret->Set(context,
+ FIXED_ONE_BYTE_STRING(env->isolate(), "hasPrepareStackTraceCallback"),
+ Boolean::New(isolate, !env->prepare_stack_trace_callback().IsEmpty()))
+ .IsNothing()) return;
+
if (ret->Set(context,
FIXED_ONE_BYTE_STRING(env->isolate(), "shouldNotRegisterESMLoader"),
Boolean::New(isolate, env->should_not_register_esm_loader()))
- constexpr size_t kOptionsSize = 4;
+ constexpr size_t kOptionsSize = 5;
std::array<Local<Name>, kOptionsSize> names = {
+ FIXED_ONE_BYTE_STRING(env->isolate(), "hasPrepareStackTraceCallback"),
FIXED_ONE_BYTE_STRING(env->isolate(), "shouldNotRegisterESMLoader"),
FIXED_ONE_BYTE_STRING(env->isolate(), "noGlobalSearchPaths"),
FIXED_ONE_BYTE_STRING(env->isolate(), "noBrowserGlobals"),
FIXED_ONE_BYTE_STRING(env->isolate(), "hasEmbedderPreload")};
std::array<Local<Value>, kOptionsSize> values = {
+ Boolean::New(isolate, env->prepare_stack_trace_callback().IsEmpty()),
Boolean::New(isolate, env->should_not_register_esm_loader()),
Boolean::New(isolate, env->no_global_search_paths()),
Boolean::New(isolate, env->no_browser_globals()),

View File

@@ -1,33 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Keeley Hammond <khammond@slack-corp.com>
Date: Thu, 25 Jul 2024 15:29:12 -0700
Subject: fix: building with UNICODE
Use the unicode version of 'RegOpenKeyEx' to avoid compilation error on string type.
Backport of https://github.com/c-ares/c-ares/pull/802.
diff --git a/deps/cares/src/lib/ares_event_configchg.c b/deps/cares/src/lib/ares_event_configchg.c
index c9b39f7b3358f37e61fb95e440695a9b590c2090..b33141ce3a30dd92509de8a4aff1a7fc76a5b915 100644
--- a/deps/cares/src/lib/ares_event_configchg.c
+++ b/deps/cares/src/lib/ares_event_configchg.c
@@ -319,15 +319,15 @@ ares_status_t ares_event_configchg_init(ares_event_configchg_t **configchg,
/* Monitor HKLM\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\Interfaces
* and HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces
* for changes via RegNotifyChangeKeyValue() */
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
- "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces",
+ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+ L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces",
0, KEY_NOTIFY, &c->regip4) != ERROR_SUCCESS) {
status = ARES_ESERVFAIL;
goto done;
}
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
- "SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters\\Interfaces",
+ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+ L"SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters\\Interfaces",
0, KEY_NOTIFY, &c->regip6) != ERROR_SUCCESS) {
status = ARES_ESERVFAIL;
goto done;

View File

@@ -381,7 +381,7 @@ index fcf1922bcdba733af6c22f142db4f7b099947757..9f72ae4e41a113e752f40795103c2af5
assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex);
assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex);
diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js
index fb580e1b315445182538c56fc114742ce896bf4c..36014fe7cb411016d72a7f4ab118923d12e97898 100644
index 8ae0a002fec0944737d2c6ae73fc8956e41beb50..5b37236a6c2f1ec1761d8143c8ea6a7e2a837a7a 100644
--- a/test/parallel/test-crypto-dh.js
+++ b/test/parallel/test-crypto-dh.js
@@ -55,18 +55,17 @@ const crypto = require('crypto');
@@ -411,7 +411,7 @@ index fb580e1b315445182538c56fc114742ce896bf4c..36014fe7cb411016d72a7f4ab118923d
};
}
@@ -99,10 +98,16 @@ const crypto = require('crypto');
@@ -100,10 +99,16 @@ const crypto = require('crypto');
// Through a fluke of history, g=0 defaults to DH_GENERATOR (2).
{
const g = 0;

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