Compare commits

..

361 Commits

Author SHA1 Message Date
trop[bot]
93d70103aa docs: update build prerequisites (#47698)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-07-09 12:31:48 +02:00
trop[bot]
6e9a46042d fix: fullscreen for windows without rounded corners (#47682)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-07-08 15:22:52 +02:00
trop[bot]
f4e709c47e refactor: avoid a few unnecessary strings (#47654)
* perf: replace string temporary with string_view in GetXdgAppId()

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

* perf: replace string temporary with string_view in ToV8(WindowOpenDisposition)

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

* perf: replace string temporary with string_view in ToV8(electron::api::WebContents::Type)

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>
2025-07-04 10:58:45 +02:00
trop[bot]
549c73a8b4 fix: accent color should reflect system settings without restart (#47656)
fix: accentColor should reflect system settings without restart

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-07-03 22:19:26 +02:00
trop[bot]
90a0f81302 fix: crash on source capture with empty thumbnail size (#47653)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-07-03 19:19:22 +02:00
trop[bot]
841a770c6c build: update yarn to 1.22.22 (#47638)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@anthropic.com>
2025-07-03 14:41:59 +02:00
electron-roller[bot]
cc05e5f40e chore: bump chromium to 138.0.7204.97 (37-x-y) (#47619)
* chore: bump chromium in DEPS to 138.0.7204.51

* chore: bump chromium in DEPS to 138.0.7204.97

* Revert "Reland "FSA: Only normalize the hardcoded rules once during initialization""

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-07-02 12:12:01 +02:00
electron-roller[bot]
65c062d3f9 chore: bump node to v22.17.0 (37-x-y) (#47555)
* chore: bump node in DEPS to v22.17.0

* build: use //third_party/simdutf by default in GN

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

* chore: adjust crypto specs:

- https://github.com/nodejs/node/pull/58117
- https://github.com/nodejs/node/pull/58387

* deps: update libuv to 1.51.0

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

* test: fix test-buffer-tostring-range on allocation failure

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

* build: use FILE_OFFSET_BITS=64 esp. on 32-bit arch

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

* build: use //third_party/simdutf by default in GN

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

* inspector: add protocol method Network.dataReceived

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

* test: force slow JSON.stringify path for overflow

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

* chore: fixup patch indices

* 6049967: Remove protocol::Maybe and roll inspector_protocol

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

* chore: fixup crypto test patch

* src: fix module buffer allocation

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

* crypto: expose process.features.openssl_is_boringssl

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

* util: add internal assignFunctionName() function

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

* build: fix pointer compression builds

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

* chore: put back config options

* fixup! deps: update libuv to 1.51.0

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
2025-06-30 14:49:16 +02:00
trop[bot]
fc55862138 fix: Reland "[accessibility] Platform node lifetime cleanups" (#47611)
Reland "[accessibility] Platform node lifetime cleanups"

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

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-30 11:17:19 +02:00
trop[bot]
2856008e52 refactor: sync IsKillURL() with upstream impl in extension_tab_util.cc (#47595)
Use base::MakeFixedFlatSet()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-30 11:17:04 +02:00
electron-roller[bot]
abba008673 chore: bump chromium to 138.0.7204.49 (37-x-y) (#47558)
chore: bump chromium in DEPS to 138.0.7204.49

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2025-06-30 11:00:22 +02:00
trop[bot]
bbf8003f0f test: fix nan tests on macOS (#47607)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-30 10:59:18 +02:00
trop[bot]
9aedb9c1f4 perf: avoid copying a vector when calling ConvertToWeakPtrVector() (#47601)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-30 10:29:14 +02:00
trop[bot]
47e927ac2b refactor: avoid copies of large objects in range based for loops (#47605)
* Avoid copies of large objects in range-based for-loops.

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

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

* Avoid copies of large objects in range-based for-loops in Browser::ShowAboutPanel()

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>
2025-06-30 10:28:55 +02:00
trop[bot]
e73d57cc08 docs: update example apps (#47600)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-06-29 21:58:08 +02:00
trop[bot]
99a224e45b refactor: make context bridge's private keys hidden, constexpr string_views (#47586)
* refactor: local functions GetPrivate(), SetPrivate() now take std::string_views

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

* refactor: make local keys std::string_views instead of C-style char arrays

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

* refactor: make local keys constexpr

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

* refactor: move local keys into local anonymous namespace

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>
2025-06-27 14:38:49 -05:00
trop[bot]
1754c55c05 docs: fix --experimental-network-inspection spelling (#47573)
doc: fix `--experimental-network-inspection` spelling

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-06-26 16:38:14 +02:00
trop[bot]
1eb8f7e705 refactor: remove stray .c_str() calls for absl::StrFormat() (#47577)
refactor: remove stray .c_str() calls for absl::StrFormat()

StrFormat() understands std::string, std::string_view

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-26 08:18:06 -05:00
trop[bot]
e45eab5b35 docs: update asar integrity fuse availability (#47567)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-06-25 17:07:04 -05:00
trop[bot]
75cda9e16b feat: support customizing window accent color on Windows (#47537)
* fix: support window accent color in frameless windows

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

* refactor: allow customization

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

* Update docs/api/structures/base-window-options.md

Co-authored-by: Will Anderson <andersonw@dropbox.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>
2025-06-25 20:41:42 +02:00
trop[bot]
be53277b54 docs: Add C++/Linux tutorial (#47550)
* docs: Add C++/Linux tutorial

Co-authored-by: Felix Rieseberg <fr@makenotion.com>

* Update docs/tutorial/native-code-and-electron-cpp-linux.md

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

Co-authored-by: Felix Rieseberg <fr@makenotion.com>

* Apply suggestions from code review

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>

Co-authored-by: Felix Rieseberg <felix@felixrieseberg.com>

* Apply suggestions from code review

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

Co-authored-by: Felix Rieseberg <felix@felixrieseberg.com>

* Apply suggestions from code review

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

Co-authored-by: Felix Rieseberg <felix@felixrieseberg.com>

* Implement more feedback, lint

Co-authored-by: Felix Rieseberg <felix@felixrieseberg.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
Co-authored-by: Felix Rieseberg <felix@felixrieseberg.com>
2025-06-25 09:34:09 -04:00
trop[bot]
253d49b24f fix: ensure /dev/null fd is closed on failure (#47543)
* fix: ensure /dev/null fd is closed on failure

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

* chore: ignore closehandle for windows

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Robo <hop2deep@gmail.com>
2025-06-24 21:12:21 +02:00
trop[bot]
42325294ab build: rewrite push-patch to use the github API instead of local git commits to ensure commits are signed (#47530)
* build: rewrite push-patch to use the github API instead of local git commits to ensure commits are signed

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* again

(cherry picked from commit a21afc3e45)

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

* use pr head ref

(cherry picked from commit 0edcc985fa)

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2025-06-24 11:55:24 +02:00
trop[bot]
285bbc560b refactor: simplify titlebar overlay initialization (#47524)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-24 10:39:53 +02:00
trop[bot]
713030b21a feat: add menu item role palette and header (#47245)
* feat: add menu item role `palette` and `header`

Co-authored-by: Gellert Hegyi <gellihegyi@gmail.com>

* adds comments

Co-authored-by: Gellert Hegyi <gellihegyi@gmail.com>

* refactors new role items to new item types

Co-authored-by: Gellert Hegyi <gellert@poolside.ai>

* docs: custom type

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* docs: note types only available on mac 14+

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Gellert Hegyi <gellihegyi@gmail.com>
Co-authored-by: Gellert Hegyi <gellert@poolside.ai>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
2025-06-23 19:54:53 -04:00
trop[bot]
9e453030ae docs: update timelines for E38 (#47526)
Update electron-timelines.md

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>
2025-06-23 08:32:58 -07:00
trop[bot]
d4e22c97b2 build: combine dependent libc patch (#47521)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-23 14:40:04 +02:00
trop[bot]
6ce5f88940 build: update cache action to latest (#47520)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-06-23 14:39:56 +02:00
trop[bot]
cfa2efe0c2 feat: add support for --no-experimental-global-navigator (#47418)
chore: add support for --no-experimental-global-navigator

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-06-23 12:21:38 +02:00
electron-roller[bot]
221f5ee3d6 chore: bump chromium to 138.0.7204.35 (37-x-y) (#47504)
* chore: bump chromium in DEPS to 138.0.7204.35

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-06-19 18:47:59 -04:00
trop[bot]
2f1dfc73ac feat: support HIDDevice.collections (#47483)
* feat: support HIDDevice.collections

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

* Update docs/api/structures/hid-device.md

Co-authored-by: Erick Zhao <ezhao@slack-corp.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>
2025-06-18 20:47:06 +02:00
Niklas Wenzel
3ea4c6c3e7 fix: utilityProcess running user script after process.exit is called (#47492)
fix: utilityProcess running user script after process.exit is called (#47469)

* fix: utilityProcess running user script after process.exit is called

* docs: update breaking changes

* chore: update spec

* chore: update spec/api-utility-process-spec.ts



* chore: remove interface bound checks

---------

Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-06-17 21:01:50 -05:00
electron-roller[bot]
5bd18aac95 chore: bump chromium to 138.0.7204.23 (37-x-y) (#47455)
* chore: bump chromium in DEPS to 138.0.7204.23

* chore: update patches

* test: fixup api-desktop-capturer-spec.ts for linux

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-06-17 11:38:13 -04:00
Keeley Hammond
03c32ba3be fix: revert moving IsClosed() and IsClosable() into NativeWindow::Close() (#47485)
fix: revert moving IsClosed() and IsClosable() into NativeWindow::Close() (#47482)

Revert "refactor: move `IsClosed()` and `IsClosable()` tests into `NativeWindow::Close()` (#46888)"

This reverts commit 3faddd5ae2.
2025-06-16 21:20:53 -07:00
trop[bot]
bef6e11b9d refactor: move gin::Converter<PreloadScript> impl to a .cc file (#47466)
refactor: move gin::Converter<PreloadScript> impl to a .cc file

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-06-16 11:10:01 -04:00
trop[bot]
f72ec2c45a refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath> (#47453)
* refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath>

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

* fixup! refactor: have ShowSaveDialogSync() return a std::optional<base::FilePath>

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>
2025-06-13 10:03:03 +02:00
trop[bot]
ba6f0358b0 docs: update remaining references to electron-quick-start (#47448)
* chore: udpate remaining references to electron-quick-start

Co-authored-by: Anny Yang <yangannyx@gmail.com>

* chore: Update docs/tutorial/tutorial-1-prerequisites.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

Co-authored-by: Anny Yang <anny@electronjs.org>

* chore: Update docs/tutorial/tutorial-3-preload.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

Co-authored-by: Anny Yang <anny@electronjs.org>

* chore: Update docs/tutorial/tutorial-2-first-app.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

Co-authored-by: Anny Yang <anny@electronjs.org>

* chore: linebreak

Co-authored-by: Anny Yang <yangannyx@gmail.com>

* chore: swap minimal-repro for npx create-electron-app

Co-authored-by: Anny Yang <yangannyx@gmail.com>

* chore: add back code commands

Co-authored-by: Anny Yang <yangannyx@gmail.com>

* chore: add whitespace

Co-authored-by: Anny Yang <yangannyx@gmail.com>

* chore: remove reference to repo containing old quick start

Co-authored-by: Anny Yang <yangannyx@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Anny Yang <yangannyx@gmail.com>
Co-authored-by: Anny Yang <anny@electronjs.org>
2025-06-12 12:25:24 +02:00
trop[bot]
2f4472f058 fix: crash calling Fetch.continueResponse with WebContentsView (#47444)
fix: crash calling Fetch.continueResponse with WebContentsView

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-11 12:25:18 -05:00
trop[bot]
32599dda44 docs: mention kwallet6 command line option (#47437)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-06-10 18:37:12 -05:00
trop[bot]
d2c95a28bb fix: add back fallback wasm-trap handling (#47345)
* fix: add back fallback wasm-trap handling

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

This change sets up wasm-trap handling for the case where content_shell
has not enabled crash reporting but moves the responsibility to
ElectronRendererClient. The default ContentRendererClient assumes
that crash reporting is enabled (crashpad enabled by default) and does
not set up its own handler.

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

* chore: fix build

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-06-10 18:02:14 +02:00
trop[bot]
e90404be7d docs: no class inheritance (#47433)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-06-10 13:12:24 +02:00
trop[bot]
b494ae62ba feat: [net] add "priority" option to net.request (#47321)
document the default value of priority option

Update the priority test to not use the httpbin.org as server

Fixed the lint errors

Fixed the build error

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Zeeker <13848632+zeeker999@users.noreply.github.com>
2025-06-10 10:28:46 +02:00
electron-roller[bot]
5953dca8be chore: bump chromium to 138.0.7204.15 (37-x-y) (#46980)
* chore: bump chromium in DEPS to 138.0.7166.1

* chore: bump chromium in DEPS to 138.0.7166.2

* chore: bump chromium in DEPS to 138.0.7168.1

* chore: bump chromium in DEPS to 138.0.7169.2

* chore: bump chromium in DEPS to 138.0.7170.1

* chore: bump chromium in DEPS to 138.0.7172.1

* chore: bump chromium in DEPS to 138.0.7173.0

* chore: bump chromium in DEPS to 138.0.7175.0

* chore: bump chromium in DEPS to 138.0.7177.1

* chore: bump chromium in DEPS to 138.0.7178.2

* chore: bump chromium in DEPS to 138.0.7180.1

* chore: bump chromium in DEPS to 138.0.7181.0

* chore: bump chromium in DEPS to 138.0.7182.2

* chore: bump chromium in DEPS to 138.0.7184.0

* chore: bump chromium in DEPS to 138.0.7186.0

* chore: bump chromium in DEPS to 138.0.7188.0

* chore: bump chromium in DEPS to 138.0.7190.1

* chore: bump chromium in DEPS to 138.0.7192.0

* chore: bump chromium in DEPS to 138.0.7194.1

* chore: bump chromium in DEPS to 138.0.7196.1

* chore: bump chromium in DEPS to 138.0.7198.1

* chore: bump chromium in DEPS to 138.0.7200.0

* chore: bump chromium in DEPS to 138.0.7202.0

* chore: bump chromium in DEPS to 138.0.7204.0

* chore: bump chromium in DEPS to 138.0.7204.5

* chore: bump chromium in DEPS to 138.0.7204.4

* 6543986: Mac: decouple deserializing and applying sandbox policy

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

(cherry picked from commit d386063e9d2414a35c91c4fa017665d950de5882)

* 6566111: Change UtilityProcessHost to manage its instance internally
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6566111

(cherry picked from commit 93a0a91d447c118de33efec079365f5d0e8363db)

* chore: update patches

* 6577970: Remove superfluous includes for base/strings/stringprintf.h in headers
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6577970

(cherry picked from commit 9ba045f3715d85792e4aa12139e7e05e0b772634)

* 6568811: Add FunctionCall structured metrics event for DevTools
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6568811

(cherry picked from commit 79ae6f2c8b53568b6277998cfe9a91e3a1ee595b)

* [PDF Ink Signatures] Support PdfAnnotationsEnabled policy

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

* Mac: Switch to Xcode 16.3 (16E140) and SDK 15.4 (24E241)

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

* chore: bump chromium in DEPS to 138.0.7204.15

* chore: update patches

* fixup Mac: decouple deserializing and applying sandbox policy

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

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-06-09 09:32:23 -04:00
trop[bot]
9f4b16fa81 fix: rework lifetime mgmt of ClearDataTask/ClearDataOperation (#47412)
* fix: rework lifetime mgmt of ClearDataTask/ClearDataOperation

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

* Update shell/browser/api/electron_api_session.cc

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

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

* Update shell/browser/api/electron_api_session.cc

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

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

* Update shell/browser/api/electron_api_session.cc

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

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

* Update shell/browser/api/electron_api_session.cc

Co-authored-by: Robo <hop2deep@gmail.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>
2025-06-08 12:56:35 +02:00
trop[bot]
a6569b116e fix: printing PDF via webContents.print() (#47398)
fix: printing PDF via webContents.print()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-08 12:56:02 +02:00
trop[bot]
dd0fb7d24d fix: silent printing of PDFs with webContents.print (#47397)
fix: silent printing

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-07 07:59:50 +02:00
trop[bot]
d657036a1b docs: remove electron-quick-start from README (#47387)
Refs https://github.com/electron/.permissions/pull/293

The repo was renamed to `minimal-repro` and is no longer intended to be used as a way to start new projects (see PR above).

Since we really want bugs in `electron/electron` to be reported with a Fiddle gist instead of a standalone repo (makes reproducing and bisecting sooo much easier and safer!), I removed the repo from the README completely instead of mentioning as an issue reproduction starting point.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-06-07 07:59:20 +02:00
John Kleinschmidt
b875976f04 build: cache gitcache dir (#47396)
build: cache gitcache dir (#47328)

* revert build: migrate to new chromium git auth

* build: cache gitcache dir
2025-06-07 07:59:03 +02:00
trop[bot]
f1f7bd631f docs: mention Azure Trusted Signing (#47384)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-06-05 20:11:30 +02:00
trop[bot]
08e27c02ea docs: Add Swift/macOS tutorial (#47381)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Felix Rieseberg <fr@makenotion.com>
2025-06-05 19:12:37 +02:00
John Kleinschmidt
8275e86f0a chore: update patches (#47382) 2025-06-05 10:51:39 -04:00
trop[bot]
3fdb77abf1 feat: allow intercepting mouse events (#47364)
* feat: allow intercepting mouse events

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

* test: add specs

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

* Update spec/api-web-contents-spec.ts

Co-authored-by: David Sanders <dsanders11@ucsbalum.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>
2025-06-05 15:47:42 +02:00
trop[bot]
2e2d1f1612 feat: expose win.isContentProtected() (#47310)
* feat: expose win.isContentProtected()

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

* chore: remove stray _isContentProtected

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>
2025-06-05 15:46:57 +02:00
trop[bot]
c68389ad98 docs: update link to runAsNode fuse (#47376)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-06-05 15:20:35 +02:00
trop[bot]
380351c01b fix: do not load source for electron module in ESM loader synchronous flow (#47342)
* fix: do not load electron from ESM loader's CJS compatibility

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

* chore: upgrade patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2025-06-05 10:04:11 +02:00
Keeley Hammond
c382d4c875 chore: cherry-pick 45eb42cd398e from v8 (#47356)
* chore: cherry-pick 45eb42cd398e from v8

* chore: update patches
2025-06-04 17:46:54 +02:00
Keeley Hammond
2fb2cc030d chore: cherry-pick f1e6422a355c from chromium (#47358)
* chore: cherry-pick f1e6422a355c from chromium

* chore: update patches
2025-06-04 17:38:39 +02:00
trop[bot]
1d8e9e1d52 fix: addChildView() crashes when adding a closed WebContentsView (#47338)
fix: addChildView() crashes when add a closed WebContentsView

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sida Zhu <zhusida@bytedance.com>
2025-06-04 14:08:49 +02:00
electron-roller[bot]
bdcf09861e chore: bump node to v22.16.0 (37-x-y) (#47216) 2025-06-04 05:34:16 +02:00
Keeley Hammond
cd1afd6d9a chore: cherry-pick 1 changes from 1-M137 (#47352)
* chore: [37-x-y] cherry-pick 1 changes from 1-M137

* 7bc0a67ebfbf from v8

* chore: update patches
2025-06-04 01:28:18 +02:00
trop[bot]
ca22facaaf chore: bump chromium to 138.0.7190.0 (37-x-y) (#47349)
* chore: bump chromium in DEPS to 138.0.7180.0

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

* 6546797: Add a metric for the overall success of the "safe storage" item retrieval.

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

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

* 6548078: extensions: Fix TODO in ScriptInjectionTracker for desktop Android

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

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

* 6544950: Revert "FSA: Only normalize the hardcoded rules once during initialization"

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

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

* chore: bump chromium in DEPS to 138.0.7181.0

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

* chore: update patches

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

* fix: correctly clamp HSL shift values between 0 and 1

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

* chore: bump DEPS to 138.0.7183.0

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

* 6553142: Remove SelectFileDialogLinuxKde | https://chromium-review.googlesource.com/c/chromium/src/+/6553142

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

* chore: update patches

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

* chore: bump chromium in DEPS to 138.0.7184.0

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

* chore: bump chromium in DEPS to 138.0.7186.0

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

* chore: bump chromium in DEPS to 138.0.7190.0

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

* chore: update patches

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

* 6547778: Remove some superfluous //ui/gfx includes from //chrome headers | https://chromium-review.googlesource.com/c/chromium/src/+/6547778

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

* 6556022: Reland FSA: Only normalize the hardcoded rules once during initialization | https://chromium-review.googlesource.com/c/chromium/src/+/6556022

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

* fix: remove pdf_extension_util::AddAdditionalData https://chromium-review.googlesource.com/c/chromium/src/+/4099130

This was removed 2 years ago in Chrome.

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* fix: provide BrowserContext to pdf_extension_util::AddAdditionalData https://chromium-review.googlesource.com/c/chromium/src/+/6558173

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* fixup! 6556022: Reland FSA: Only normalize the hardcoded rules once during initialization | https://chromium-review.googlesource.com/c/chromium/src/+/6556022

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* fix: pass in navigation throttle registry https://chromium-review.googlesource.com/c/chromium/src/+/6536175

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* fixup! 6556022: Reland "FSA: Only normalize the hardcoded rules once during initialization" | https://chromium-review.googlesource.com/c/chromium/src/+/6556022

This partially reverts commit 20d709dd15ba0ff332e24ee314149d642dc5d47c.

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

* 6545984: corner-shape: render dashed & dotted borders Refs https://chromium-review.googlesource.com/c/chromium/src/+/6545984

Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>

* Update corner smoothing expected images

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

* Apply "future" revert commit to fix windows build

> Reason for revert: Multiple eng reporting that this is causing build failures due to too-long pathnames, with no immediate feasible workaround

This issue also affects our CI builds.

Problematic CL in current roll: 6494836: [webgl] Add stub WebGL[2]RenderingContextWebGPU | https://chromium-review.googlesource.com/c/chromium/src/+/6494836
"Future" revert CL: 6565622: Revert "[webgl] Add stub WebGL[2]RenderingContextWebGPU" | https://chromium-review.googlesource.com/c/chromium/src/+/6565622

This patch should automatically disappear when we roll the revert.

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

* 6533919: win: don't add WS_CAPTION style to popup windows https://chromium-review.googlesource.com/c/chromium/src/+/6533919

This mirrors the change made earlier to the code ours is based on: 6374074: [headless] Provide headless aware window metrics on Windows | https://chromium-review.googlesource.com/c/chromium/src/+/6374074

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

* chore: update patches

---------

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: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-06-03 17:06:30 -04:00
trop[bot]
95212a539b docs: correct 'select-bluetooth-device' requirement (#47336)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-06-03 10:53:54 +02:00
trop[bot]
91c153ed0b fix: Squirrel.Mac crash when zip extraction fails (#47302)
* fix: Squirrel.Mac crash when zip extraction process fails to launch

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* chore: add end-to-end test

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-05-30 10:46:12 -04:00
trop[bot]
ab78c8a295 docs: add documentation for ImageView (#47297)
* docs: Add documentation for ImageView

* docs: Add ImageView main process module list in README.md

* test: Add some basic tests for ImageView

* test: Fill out Window embedding tests to better reflect how someone might use an ImageView

* docs: Add notes about using ImageView as a splash screen



* docs: Update ImageView example to show a more complete splash screen example

* docs: Remove view resizing logic since the ImageView automatically gets resized

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Will Anderson <andersonw@dropbox.com>
2025-05-30 13:48:13 +02:00
trop[bot]
c2e8d71683 ci: add a problem matcher for ESLint output (#47305)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-30 11:00:37 +02:00
trop[bot]
47e0baf21d fix: regression with directory selection in macOS dialogs (#47277)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-05-27 11:17:32 -04:00
trop[bot]
f9b86609a9 fix: titlebar showing in content protected window (#47266)
Closes https://github.com/electron/electron/issues/47152.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-27 14:24:48 +02:00
trop[bot]
7dd024a9dc chore: debug crash on DevTools SetOwnerWindow (#47263)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-26 20:32:45 -07:00
trop[bot]
65b9accc80 build: migrate to new chromium git auth (#47255)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-26 10:06:40 +02:00
trop[bot]
584fa31adc chore: update @electron/lint-roller to 3.1.1 (#47257)
* chore: update @electron/lint-roller to 3.1.1

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

* docs: fix broken link in breaking-changes.md

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

* chore: fix for Node.js versions without require(esm)

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-26 09:45:48 +02:00
trop[bot]
c0149676fb refactor: use base::fixed_flat_set in NativeWindowViews::SetAlwaysOnTop() (#47237)
refactor: use base::fixed_flat_set in NativeWindowViews::SetAlwaysOnTop()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-25 07:56:50 -05:00
trop[bot]
b39305af61 ci: add problem matcher for patch conflict output (#47225)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-22 17:31:08 -04:00
trop[bot]
6e7271ff7e ci: add problem matcher for clang output (#47220)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-22 10:30:16 -07:00
trop[bot]
3e07a0e9a3 build: fix depot tool pathing on Windows (#47205)
build: properly set depot_tools pathing for Windows

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-22 11:16:37 -04:00
trop[bot]
6a16fc3144 build(dev-deps): update @electron/lint-roller and markdownlint-cli2 (#47145)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-22 12:37:27 +02:00
trop[bot]
e53a7c7c00 fix: remove extra 'suspend'/'resume' handling from powerMonitor (#47188)
fix: remove extra 'suspend'/'resume' handling from powerMonitor

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-22 00:01:17 -05:00
trop[bot]
63052c45a1 refactor: prefer base::circular_deque over std::deque (#47192)
* refactor: use base::circular_deque in ResolveProxyHelper

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

* refactor: use base::circular_deque in GetExtraCrashKeys()

refactor: reduce visibility of kMaxCrashKeyValueSize

This change is to match Chromium's usage advice from
base/containers/README.md: `base:circular_deque` is preferred over
`std::deque` to provide consistent performance across platforms.

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>
2025-05-21 15:49:18 -05:00
trop[bot]
28c5f7026f refactor: make NativeWindow::transparent_ const (#47198)
* refactor: use in-class member initialization for NativeWindow::widget_

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

* refactor: make NativeWindow::transparent_ const

refactor: make NativeWindow::enable_larger_than_screen_ const

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

* chore: make linter happy after rebase

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>
2025-05-21 15:32:52 -05:00
trop[bot]
c78be76176 refactor: make NativeWindow::has_client_frame_ const (#47180)
* refactor: make NativeWindow::has_client_frame_ const

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

* refactor: make NativeWindow::has_client_frame_ const but not constexpr

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>
2025-05-21 11:44:36 +02:00
trop[bot]
73dd132202 refactor: match upstream macOS a11y handling (#47170)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-21 10:31:47 +02:00
trop[bot]
f6e7cdb8b6 refactor: make NativeWindow::pending_transitions_ a base::queue (#47181)
refactor: make NativeWindow::pending_transitions a base::queue

Follow the base/containers/README.md advice that "Chromium code should
always use `base::circular_deque` or `base::queue` in preference to
`std::deque` or `std::queue` due to memory usage and platform variation."

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-20 21:02:47 -05:00
trop[bot]
54f2c93fec build: update_depot_tools on initial install (#47169)
this ensures that python is setup for proper use from depot_tools

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-20 19:46:05 +02:00
trop[bot]
ecc00f149f fix: prevent gc monitor 2nd pass crash (#47165)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: reito <cnschwarzer@qq.com>
2025-05-20 11:55:54 -05:00
electron-roller[bot]
791235b15b chore: bump node to v22.15.1 (37-x-y) (#47104)
* chore: bump node in DEPS to v22.15.1

* chore: fixup patch indices

* src: fix error handling on async crypto operations

https://github.com/nodejs-private/node-private/pull/709

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-20 13:32:53 +02:00
trop[bot]
692d648edb refactor: NativeWindows should prefer widget() over GetWidget() for internal use (#47155)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-19 18:52:14 -05:00
trop[bot]
bbb6aabe41 fix: explicit microtask scope DCHECK condition (#47140)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2025-05-19 21:01:05 +02:00
trop[bot]
cc302c2f07 perf: don't create unused menuitem icons (#47129)
GTK >= 3.90.0 removed support for menuitem icons. When Electron is
built with GTK >= 3.90.0, our code builds these icons and then throws
them away unused. Instead, let's just not build them.

Our gtk_util::GdkPixbufFromSkBitmap utility uses BGRAToRGBA and is
expensive to call.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-16 08:47:16 -05:00
trop[bot]
b6779056f2 test: fix desktopCapturer mocha syntax (#47113)
do not nest `it` calls in desktopCapturer specs

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-16 02:32:22 -05:00
trop[bot]
d7990ca180 refactor: decouple NativeWindowViews and GlobalMenuBarX11 (#47119)
The GlobalMenuBar used to hold a raw_ptr reference to its NativeWindow;
but since it doesn't use it & only wants the gfx::AcceleratedWidget info,
let's remove the NativeWindowViews reference.

AFAICT, GlobalMenuBarX11::window_ has never been used

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-15 19:39:05 -05:00
trop[bot]
7cb5a46b66 refactor: make TrackableObject::weak_map_id() constexpr (#47115)
* refactor: make TrackableObject::weak_map_id() constexpr

refactor: make BaseWindow::GetID() inline and constexpr

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

* refactor: make NativeWindow::window_id() constexpr too

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>
2025-05-15 19:38:34 -05:00
trop[bot]
917e95433a docs: add note on DIP and DPI (#47121)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-05-15 17:16:33 -05:00
trop[bot]
7db9671420 chore: bump chromium to 138.0.7178.0 (37-x-y) (#47106)
* chore: bump chromium in DEPS to 138.0.7178.0

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

* 6351556: [source-phase-imports] Support Wasm Source Phase Imports

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

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

* chore: update patches

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

* 6509682: extensions: Use ChromeExtensionsBrowserClient on desktop Android, part 2

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

Co-authored-by: David Sanders <dsanders11@ucsbalum.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: David Sanders <dsanders11@ucsbalum.com>
2025-05-15 16:47:39 -04:00
trop[bot]
a3d19d7a99 fix: opening package paths as directory on macOS (#47108)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-05-15 16:11:05 -04:00
trop[bot]
f1562543a3 feat: add support for --experimental-network-inspection (#47031)
* feat: add support for `--experimental-network-inspection`

Co-authored-by: Aman Karmani <aman@tmm1.net>

* docs: fix minor formatting issues

visible on both GH[1] and the docs site[2]

[1] https://github.com/electron/electron/blob/main/docs/api/command-line-switches.md#nodejs-flags
[2] https://www.electronjs.org/docs/latest/api/command-line-switches#--inspect-brkhostport

Co-authored-by: Aman Karmani <aman@tmm1.net>

* docs: add entry for new nodejs flag

Co-authored-by: Aman Karmani <aman@tmm1.net>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Aman Karmani <aman@tmm1.net>
2025-05-14 16:03:02 -05:00
trop[bot]
bf54b8d709 feat: enable innerWidth and innerHeight for window open (#47039)
feat: enable innerWidth and innerHeight for window open (#46749)

* feat: enable innerWidth and innerHeight for window open

* update comment for added special innerWidth and innerHeight

* update 100 min spec requirement handling

* update testing to include getContentSize

* update macOS min requirement handling

* adjust refactored consts

* update const values from nativewindowviews

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>
2025-05-14 16:02:46 -05:00
trop[bot]
ec83c1303c feat: enable secondary label for macOS menu (#47042)
* feat: enable secondary label for macOS menu

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

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

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

Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>

* fix for lint

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

* update docs for sublabel

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org>
Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>
2025-05-14 16:02:32 -05:00
trop[bot]
ec1b0f4923 refactor: remove CreateViewForWidget patch (#47084)
* refactor: remove CreateViewForWidget patch

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

* chore: rm unintended osr change

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-05-14 16:01:44 -05:00
trop[bot]
be5b02386d chore: bump chromium to 138.0.7177.0 (37-x-y) (#47085)
* chore: bump chromium in DEPS to 138.0.7177.0

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

* 6530423: [WebContents] Fix IsNeverComposited() calls during initialization

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

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

* 6512551: [ios] Enable -Wobjc-property-assign-on-object-type

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

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

* chore: update patches

Co-authored-by: David Sanders <dsanders11@ucsbalum.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: David Sanders <dsanders11@ucsbalum.com>
2025-05-14 13:55:23 -04:00
trop[bot]
df8ed0acc3 refactor: use kKeyModifiers in IsAltModifier() (#47089)
We probably didn't use this before because IsAltModifier() was written
two years before the KeyModifiers mask was added upstream in 98ec378a.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-14 12:53:59 -05:00
trop[bot]
8de0bb5bc3 chore: bump chromium to 138.0.7175.0 (37-x-y) (#47078)
* chore: bump chromium in DEPS to 138.0.7166.0

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

* chore: bump chromium in DEPS to 138.0.7166.2

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

* 6508373: Add WebContents, Tab getters for future Clank navigation capture rework

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

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

* 6470924: Introduce auto-populated Search Engine icons.

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

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

* 6502977: Force same tab navigation while actor coordinator is acting on a tab

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

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

* chore: bump chromium in DEPS to 138.0.7168.0

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

* chore: update patches

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

* fix grit patch

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

* chore: bump Chromium to 138.0.7169.2

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

* fixup! 6508373: Add WebContents, Tab getters for future Clank navigation capture rework

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

* 6493688: NavigationThrottleRunner2: void CreateThrottlesForNavigation

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

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

* 6488755: Reland "WebSQL: Remove WebPreference"

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

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

* 6428707: FSA: Only normalize the hardcoded rules once during initialization

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

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

* chore: fixup patch indices

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

* chore: bump chromium in DEPS to 138.0.7170.0

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

* 6514121: Remove origin calculation debug info and related methods

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

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

* chore: bump chromium in DEPS to 138.0.7172.0

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

* chore: bump chromium in DEPS to 138.0.7173.0

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

* chore: bump chromium in DEPS to 138.0.7175.0

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

* fixup! 6514121: Remove origin calculation debug info and related methods

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

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

* 6531585: Don't retry LayerTreeSink creation on the high priority queue

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

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

* 6512253: Modernize base::apple's base bundle ID

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

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

* fixup! 6428707: FSA: Only normalize the hardcoded rules once during initialization

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

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

* fixup! 6508373: Add WebContents, Tab getters for future Clank navigation capture rework

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

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

* chore: update patches

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

* chore: update patches

---------

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>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-14 10:07:45 -04:00
trop[bot]
25c7f0017a fix: white window flicker on window creation (#47051)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-11 15:00:11 -05:00
trop[bot]
546d9f4ba6 fix: webview crash on focus (#47036)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-09 17:46:53 -05:00
trop[bot]
434f77e6c1 docs: unify [!NOTE] structure (#47048)
* docs: unify [!NOTE] structure

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

* Update docs/api/command-line.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

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

* Update docs/api/browser-window.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

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

* Update docs/api/download-item.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

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

* Update docs/api/global-shortcut.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

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

* revert line break

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2025-05-09 17:46:11 -05:00
trop[bot]
ace7ef4316 fix: restore previous Windows screenshotting (#47033)
Fixes https://github.com/electron/electron/issues/45990

We previously made a change in https://github.com/electron/electron/pull/45868
to fix content protection being lost on hide and re-show. However, this
cause a breaking change where protected windows were made opaque black
instead of being hidden as before. This overrides relevant methods in
ElectronDesktopWindowTreeHostWin to restore the previous behavior.
without regressing the original issue.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-09 13:10:44 -04:00
trop[bot]
0e9c0d8c04 fix: use-after-move of bus connection in xdg portal detection (#47023)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-05-09 09:39:17 -05:00
trop[bot]
8f37d42241 build: move release script to new hasher function (#46993)
build: move to new hasher function

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2025-05-09 09:38:19 +02:00
trop[bot]
3d836267ed refactor: use gin_helper::Dictionary::ValueOrDefault() (#47014)
refactor: use `gin_helper::Dictionary::ValueOrDefault()` (#46982)

* refactor: use ValueOrDefault() in electron_api_web_contents.cc

* refactor: use ValueOrDefault() in electron_api_url_loader.cc

* refactor: use ValueOrDefault() in electron_download_manager_delegate.cc

* refactor: use ValueOrDefault() in electron_touch_bar.mm

* refactor: use ValueOrDefault() in electron_url_loader_factory.cc

* refactor: use ValueOrDefault() in electron_browser_context.cc

* refactor: use ValueOrDefault() in electron_touch_bar.mm

* refactor: use ValueOrDefault() in blink_converter.cc

* feat: add ValueOrDefault() to PersistentDictionary

* empty commit

* refactor: use ValueOrDefault() in blink_converter.cc

* refactor: inline the rectangle base::Value::Dict

* refactor: remove has_scroll temporary

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-09 09:36:47 +02:00
trop[bot]
440cdec061 build: update hasher return value (#47011)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2025-05-09 09:36:35 +02:00
trop[bot]
4eea6e4974 build: remove deps_add_v8_object_setinternalfieldfornodecore.patch (#46998)
chore: remove deps_add_v8_object_setinternalfieldfornodecore.patch

This was a Node 20-specific workaround that's no longer needed in Node 22.

Xref: https://github.com/nodejs/node/pull/49874.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-08 15:34:41 -05:00
trop[bot]
2c6f713d72 refactor: reduce use of NativeWidgetPrivate (#47006)
* refactor: do not use native_widget_private() in NativeWindowViews::SetContentProtection()

refactor: do not use native_widget_private() in NativeWindowViews::IsContentProtected()

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

* refactor: do not use native_widget_private() in NativeWindowViews::Show()

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

* chore: remove native_widget_private #include from native_window_views_win

Not needed since Feb 2025: 9199d5c6

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>
2025-05-08 15:33:43 -05:00
trop[bot]
057437f739 test: enable hasShadow tests on Linux (#47001)
refactor: enable hasShadow tests on Linux

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-08 09:37:26 -05:00
trop[bot]
b59a7ef2c3 refactor: Node.js temporary "explicit" microtask policy scope pattern (#46991)
refactor: Node.js explicit microtask scope pattern

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2025-05-08 01:06:31 -05:00
trop[bot]
069c9a9e1f chore: bump chromium to 138.0.7165.0 (37-x-y) (#46985)
* chore: bump chromium in DEPS to 138.0.7165.0

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

* 6492127: Add new less invasive context menu mode for mobile interesttarget

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

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

* chore: fixup patch indices

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>
2025-05-07 20:01:39 -05:00
trop[bot]
5602efb2b6 fix: printing when no mediaSize specified (#46971)
fix: printing when no mediaSize specified

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-07 09:36:17 +02:00
trop[bot]
839590eb90 chore: bump chromium to 138.0.7164.0 (37-x-y) (#46964)
* chore: bump chromium in DEPS to 138.0.7164.0

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

* 6508870: Add missing PermissionType mapping and remove default case.

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

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

* chore: fixup patch indices

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>
2025-05-07 09:35:56 +02:00
trop[bot]
c9d1615b19 refactor: add gin_helper::Dictionary::ValueOrDefault() (#46969)
* feat: add gin_helper::Dictionary::ValueOrDefault()

A convenience function for using a default value if the
specified key isn't present in the dictionary.

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

* refactor: use ValueOrDefault() in native_window.cc

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

* refactor: use ValueOrDefault() in native_window_mac.mm

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

* refactor: use ValueOrDefault() in native_window_views.cc

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

* refactor: use ValueOrDefault() in electron_api_native_image.cc

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>
2025-05-06 19:11:30 -05:00
trop[bot]
4597f4ba9e refactor: pass gfx::ResizeEdge by value (#46960)
refactor: pass gfx::ResizeEdge by value

It is an enum class, so no reason to pass by reference

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-06 16:08:57 -05:00
trop[bot]
2cf774b2b8 test: test menu rendering accelerators (#46965)
* test: test menu rendering accelerators

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

* Update spec/api-menu-spec.ts

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

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>
2025-05-06 15:56:36 -05:00
trop[bot]
3029cdb4dd fix: crash on macOS dialog after window-all-closed (#46952)
fix: crash on dialog after window-all-closed

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-06 17:29:14 +02:00
trop[bot]
6bd6180703 fix: allowed dialog file types with one filter (#46946)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-06 16:10:25 +02:00
electron-roller[bot]
cd023b54f5 chore: bump node to v22.15.0 (37-x-y) (#46869)
* chore: bump node in DEPS to v22.15.0

* inspector: fix GN build

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

* test: search cctest files

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

* crypto: fix missing OPENSSL_NO_ENGINE guard

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

* test,crypto: make tests work for BoringSSL

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

* module: use synchronous hooks for preparsing in import(cjs)

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

* deps: update simdjson to 3.12.0

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

* build: remove explicit linker call to libm on macOS

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

* test: make eval snapshot comparison more flexible

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

* src: allow embedder customization of OOMErrorHandler

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

* src: do not pass nullptr to std::string ctor

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

* src: lock the isolate properly in IsolateData destructor

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

* chore: shrink --trace-atomics-wait patch

* chore: fixup patch indices

* build: fix GN build failure

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

* crypto: expose security levels

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

* zlib: add zstd support

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

* test: move crypto related common utilities in common/crypto

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

* cli: move --trace-atomics-wait to eol

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

* test: disable test-https-client-renegotiation-limit

BoringSSL doesn't support caller-initiated renegotiation - see
https://source.chromium.org/chromium/chromium/src/+/main:third_party/boringssl/src/ssl/ssl_lib.cc;l=1627-1631

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-06 10:29:19 +02:00
Charles Kerr
7dfa2b92fb refactor: remove some NativeWindow public API (37-x-y) (#46934)
refactor: remove some `NativeWindow` public API (#46919)

* refactor: make NativeWindow::titlebar_overlay_height_ private

* refactor: make NativeWindow::set_has_frame() protected

* refactor: remove NativeWindow::background_material()

It's only used once, in NativeWindow, so use |background_material_| directly.

* refactor: remove NativeWindow::vibrancy()

It's only used once, in a NativeWindow method, so use |vibrancy_| directly.

* refactor: unfriend api::BrowserView

It was added in Oct 2022 by 23d4a25 for access to protected NativeWindow
methods add_inspectable_view() and remove_inspectable_view().

That dependency was removed in Nov 2022 by 184ac2b, so BrowserView
doesn't need access to NativeWindow's private fields & methods anymore.

* refactor: make NativeWindow::ContentBoundsToWindowBounds() protected

refactor: make NativeWindow::WindowBoundsToContentBounds() protected
2025-05-06 09:51:08 +02:00
trop[bot]
8189b01987 docs: use correct heading level for API function (#46941)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-05-05 16:28:15 -05:00
trop[bot]
0c683552ec chore: bump chromium to 138.0.7160.0 (37-x-y) (#46938)
* chore: bump chromium in DEPS to 138.0.7158.0

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

* chore: bump chromium in DEPS to 138.0.7160.0

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

* 6509206: Move Keychain UI suppression code into apple_keychain.cc

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

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

* 6489036: Fix DesktopDataControlsDialog for Glic

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

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

* chore: fixup patch indices

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

* 6506662: Reland "NavigationThrottleRunner2: content::NavigationThrottleRegistry"

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

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

* 6499811: [video pip] Add live caption dialog

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

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

* 6487926: Add GetMaxImageDimension function to ScreenAI service API for OCR.

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

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

* 6494942: [json] Activate stringify fast-path by default

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

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>
2025-05-05 16:05:40 -05:00
trop[bot]
018e2f6a31 refactor: devirtualize NativeWindow methods (#46931)
* refactor: devirtualize NativeWindow::SetSize()

refactor: devirtualize NativeWindow::GetSize()

refactor: devirtualize NativeWindow::SetPosition()

refactor: devirtualize NativeWindow::GetPosition()

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

* refactor: devirtualize NativeWinodw::SetMinimumSize()

refactor: devirtualize NativeWinodw::GetMinimumSize()

refactor: devirtualize NativeWinodw::SetMaximumSize()

refactor: devirtualize NativeWinodw::GetMaximumSize()

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

* refactor: devirtualize NativeWindow::SetSheetOffset()

refactor: devirtualize NativeWindow::GetSheetOffsetX()

refactor: devirtualize NativeWindow::GetSheetOffsetY()

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

* refactor: devirtualize NativeWindow::GetContentMinimumSize()

refactor: devirtualize NativeWindow::GetContentMaximumSize()

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>
2025-05-05 20:39:50 +02:00
trop[bot]
3c8d971c53 refactor: simplify NativeWindow::FullScreenTransitionState (#46929)
* refactor: make NativeWindow::fullscreen_transition_state_ private

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

* refactor: add NativeWindow::is_transitioning_fullscreen() helper

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

* refactor: remove unused NativeWindow::fullscreen_transition_state()

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

* refactor: replace NativeWindow::set_fullscreen_transition_state() with NativeWindow::set_is_transitioning_fullscreen()

refactor: remove unused NativeWindow::FullScreenTransitionState

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>
2025-05-05 13:26:41 -04:00
trop[bot]
258762929f refactor: add NativeWindow::FromWidget() helper (#46928)
refactor: add NativeWindow::FromWidet() helper

refactor: make kElectronNativeWindowKey a protected field

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-05 13:02:47 -04:00
trop[bot]
01994637e8 fix: xdg portal version detection for file dialogs on linux (#46922)
* chore: use dbus thread for portal version detection

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

* Update shell/browser/ui/file_dialog_linux_portal.cc

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

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-05 20:59:34 +09:00
trop[bot]
0810fe54d4 chore: bump chromium to 138.0.7156.0 (37-x-y) (#46913)
* chore: bump chromium in DEPS to 138.0.7156.0

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

* chore: update patches

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

* chore: ICWYU

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

* Allow SecKeychain and SecItem implementations of AppleKeychain to coexist

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

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

---------

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: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-02 22:46:54 -05:00
trop[bot]
d783f134d9 feat: support dip <-> screen conversion on Linux X11 (#46895)
feat: support dip <-> screen conversion on Linux

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-05-02 19:08:50 -05:00
trop[bot]
bf94f88569 refactor: move IsClosed() and IsClosable() tests into NativeWindow::Close() (#46907)
refactor: devirtualize NativeWindow::IsClosed()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-05-02 19:08:28 -05:00
trop[bot]
47e25dfd57 fix: prevent log files being written to current directory on Windows (#46910)
* fix: prevent log files being written to current directory on Windows

Co-authored-by: Derek Cicerone <derekcicerone@gmail.com>

* Update shell/common/logging.cc

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

Co-authored-by: Derek Cicerone <120135886+derekcicerone@users.noreply.github.com>

* chore: add test

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

* chore: update includes

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

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

* chore: address review feedback

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Derek Cicerone <derekcicerone@gmail.com>
Co-authored-by: Derek Cicerone <120135886+derekcicerone@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-05-02 19:08:00 -05:00
trop[bot]
03d83c293f chore: bump chromium to 138.0.7154.0 (37-x-y) (#46894)
* chore: bump chromium in DEPS to 138.0.7152.0

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

* chore: update patches

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

* chore: bump chromium in DEPS to 138.0.7154.0

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

* chore: update patches

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

* ozone/wayland: Fix bookmark dropdown right click context menu

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

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

* Use base::cstring_view in base::Environment

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

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

* Remove Add/Remove AXMode methods

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

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

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

* build: update filenames.libcxx.gni

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

* Use base::cstring_view in base::Environment

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

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

* Use getters to expose NativePixmapHandle from GpuMemoryBufferHandle

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

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

---------

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: John Kleinschmidt <jkleinsc@electronjs.org>
2025-05-02 10:08:04 -04:00
trop[bot]
46e3ab6353 refactor: use base::ObserverList::Notify() (#46896)
* refactor: use ObserverList::Notify() in shell/browser/window_list.cc

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

* refactor: use ObserverList::Notify() in shell/browser/web_contents_zoom_controller.cc

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

* refactor: use ObserverList::Notify() in shell/browser/usb/usb_chooser_context.cc

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

* refactor: use ObserverList::Notify() in shell/browser/usb/electron_usb_delegate.cc

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

* refactor: use ObserverList::Notify() in shell/browser/ui/views/menu_delegate.cc

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

* refactor: use ObserverList::Notify() in shell/browser/ui/tray_icon.cc

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

* refactor: use ObserverList::Notify() in shell/browser/ui/electron_menu_model.cc

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

* refactor: use ObserverList::Notify() in shell/browser/serial/serial_chooser_context.cc

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

* refactor: use ObserverList::Notify() in shell/browser/native_window.cc

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

* refactor: use ObserverList::Notify() in shell/browser/serial/electron_serial_delegate.cc

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

* refactor: use ObserverList::Notify() in shell/browser/browser.cc

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

* refactor: use ObserverList::Notify() in shell/browser/api/electron_api_web_contents.cc

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

* refactor: use ObserverList::Notify() in shell/browser/hid/electron_hid_delegate.cc

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

* refactor: use ObserverList::Notify() in shell/browser/hid/hid_chooser_context.cc

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>
2025-05-02 07:50:47 -05:00
trop[bot]
620f3a57dd docs: clarified usage of createFromPath() (#46898)
* docs: clarified usage of createFromPath()

Co-authored-by: Yuri <rarescrap@gmail.com>

* Update docs/api/native-image.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

Co-authored-by: Yuri <rarescrap@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Yuri <rarescrap@gmail.com>
2025-05-02 13:19:52 +02:00
trop[bot]
534ad05cf2 fix: revert macOS content protection logic refactor (#46891)
Revert "refactor: use upstream content protection logic on macOS (#46813)"

This reverts commit 34adb976b6.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2025-05-02 13:18:46 +02:00
trop[bot]
7c77018b19 refactor: don't call deprecated WidgetDelegate API in NativeWindowViews (#46885)
* refactor: don't call RegisterDeleteDelegateCallback()

move NativeWindowViews' on-widget-delegate-destroyed callback logic to
the NativeWindowViews destructor.

Since NativeWindowViews subclasses from WidgetDelegate and |this| *is*
the delegate being destroyed, we can handle this more cleanly in
~NativeWindowViews() instead of in a separate callback.

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

* chore: remove NativeWindowViews from the grandfathered-classes-that-can-call-deprecated-views-behavior patch

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

* refactor: don't call RegisterDeleteDelegateCallback()

RegisterDeleteDelegateCallback() is private upstream API, so we
shouldn't be using it.

Move the on-widget-delegate-destroyed callback logic over to our methods
NativeWindowViews::OnWidgetDestroying() and
NativeWindowViews::OnWidgetDestroyed().

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>
2025-05-01 23:52:19 -05:00
trop[bot]
6696b98ecc refactor: add EmitDeprecationWarning helper (#46878)
* refactor: add EmitDeprecationWarning helper

Also switches EmitWarning to using Node's ProcessEmitWarningGeneric

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

* chore: use node namespace for function call

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-05-01 11:41:45 -05:00
electron-roller[bot]
d842d17ff3 chore: bump chromium to 137.0.7151.0 (main) (#46854)
* chore: bump chromium in DEPS to 137.0.7151.0

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-04-29 16:49:44 -04:00
dependabot[bot]
ecd745305e build(deps): bump actions/download-artifact from 4.2.1 to 4.3.0 (#46852)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.2.1 to 4.3.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](95815c38cf...d3f86a106a)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 11:20:23 -04:00
Charles Kerr
2734088d20 fix: fix and enable accessibilitySupportEnabled tests (#46825)
* test: do not skip visibleOnAllWorkspaces tests on Windows

That feature is supported on Linux, so move the test from the
"window states (excluding Linux)" section into the
"window states" section.

* fix: nested it() calls in visibleOnAllWorkspaces specs

* test: enable accessibilitySupportEnabled tests

test: check both getters after calling each setter

fix: do not assume the default initial value of accessibilitySupportEnabled

* chore: remove redundant test case

* chore: disable accessibilitySupportEnabled tests on Linux
2025-04-28 23:52:26 -05:00
zoy
4641bc9619 fix: fullscreen fillet / recovery is incorrect (#46641)
* fix: fullscreen fillet / recovery is incorrect

Signed-off-by: ZOY\zoy-l <zoy-l@outlook.com>

* fix: maintain frameless consistency on windows 11

* fix: maintain frameless consistency on windows 11

* chore: modify the comments

---------

Signed-off-by: ZOY\zoy-l <zoy-l@outlook.com>
2025-04-28 16:54:08 -04:00
Charles Kerr
3f3c297c7a fix: enable some tests that were accidentally disabled (#46816)
* test: add platform test on visibleOnAllWorkspaces tests

visibleOnAllWorkspaces is not supported on Windows

* test: do not skip visibleOnAllWorkspaces tests on Windows

That feature is supported on Linux, so move the test from the
"window states (excluding Linux)" section into the
"window states" section.

* fix: nested it() calls in visibleOnAllWorkspaces specs

* chore: make the process.platform test simpler

* fix: tests that were not run in api-app-spec due to nested it()

* fix: tests that were not run in api-browser-window-spec due to nested it()

* chore: annotate disabled test

* fix: enable `autoHideMenuBar` tests on Linux and Windows (#46818)

* fix: enable autoHideMenuBar tests

* docs: mark autoHideMenuBar as supported on Linux, Windows
2025-04-28 12:32:57 -05:00
Bruno Pitrus
062d3a6168 fix: build error with enable_electron_extensions=false (#46812)
Fix build error with enable_electron_extensions=false

In file included from ../../base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h:13,
                 from ../../base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h:50,
                 from ../../base/memory/raw_ptr.h:11,
                 from ../../base/memory/weak_ptr.h:82,
                 from ../../electron/shell/browser/usb/electron_usb_delegate.h:14,
                 from ../../electron/shell/browser/usb/electron_usb_delegate.cc:5:
../../base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h:279:3: warning: multi-line comment [-Wcomment]
  279 |   //       \
      |   ^
../../base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h:281:3: warning: multi-line comment [-Wcomment]
  281 |   //         \
      |   ^
In file included from /usr/include/c++/14/memory:78,
                 from ../../electron/shell/browser/usb/electron_usb_delegate.h:8:
/usr/include/c++/14/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = device::mojom::UsbDeviceInfo]’:
/usr/include/c++/14/bits/unique_ptr.h:399:17:   required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = device::mojom::UsbDeviceInfo; _Dp = std::default_delete<device::mojom::UsbDeviceInfo>]’
  399 |           get_deleter()(std::move(__ptr));
      |           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
../../mojo/public/cpp/bindings/struct_ptr.h:48:3:   required from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = mojo::StructPtr<device::mojom::UsbDeviceInfo>]’
   48 |   ~StructPtr() = default;
      |   ^
/usr/include/c++/14/bits/stl_construct.h:149:22:   required from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = mojo::StructPtr<device::mojom::UsbDeviceInfo>]’
  149 |       std::destroy_at(__pointer);
      |       ~~~~~~~~~~~~~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_construct.h:163:19:   required from ‘static constexpr void std::_Destroy_aux<<anonymous> >::__destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = mojo::StructPtr<device::mojom::UsbDeviceInfo>*; bool <anonymous> = false]’
  163 |             std::_Destroy(std::__addressof(*__first));
      |             ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_construct.h:193:44:   required from ‘constexpr void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = mojo::StructPtr<device::mojom::UsbDeviceInfo>*]’
  193 |         return std::_Destroy_aux<false>::__destroy(__first, __last);
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/alloc_traits.h:981:20:   required from ‘constexpr void std::_Destroy(_ForwardIterator, _ForwardIterator, allocator<_T2>&) [with _ForwardIterator = mojo::StructPtr<device::mojom::UsbDeviceInfo>*; _Tp = mojo::StructPtr<device::mojom::UsbDeviceInfo>]’
  981 |       std::_Destroy(__first, __last);
      |       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:735:15:   required from ‘constexpr std::vector<_Tp, _Alloc>::~vector() [with _Tp = mojo::StructPtr<device::mojom::UsbDeviceInfo>; _Alloc = std::allocator<mojo::StructPtr<device::mojom::UsbDeviceInfo> >]’
  735 |         std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
      |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  736 |                       _M_get_Tp_allocator());
      |                       ~~~~~~~~~~~~~~~~~~~~~~
../../electron/shell/browser/usb/electron_usb_delegate.cc:231:74:   required from here
  231 |     std::move(callback).Run(std::vector<device::mojom::UsbDeviceInfoPtr>());
      |                                                                          ^
/usr/include/c++/14/bits/unique_ptr.h:91:23: error: invalid application of ‘sizeof’ to incomplete type ‘device::mojom::UsbDeviceInfo’
   91 |         static_assert(sizeof(_Tp)>0,
      |                       ^~~~~~~~~~~
2025-04-28 11:56:17 -04:00
electron-roller[bot]
f2240e07f0 chore: bump chromium to 137.0.7149.0 (main) (#46777)
* chore: bump chromium in DEPS to 137.0.7144.0

* chore: bump chromium in DEPS to 137.0.7145.0

* chore: bump chromium in DEPS to 137.0.7147.0

* chore: update patches

* Remove deprecated GetVar(std::string_view, std::string*) overload

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

* fixup! Remove deprecated GetVar(std::string_view, std::string*) overload

* fixup! Remove deprecated GetVar(std::string_view, std::string*) overload

* chore: bump chromium in DEPS to 137.0.7149.0

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-04-28 11:39:12 -04:00
David Sanders
0c103f390c test: refactor deprecate-helpers.ts to warning-helpers.ts (#46808)
Add a generic expectWarningMessages and start checking warning names
2025-04-28 11:18:34 -04:00
Charles Kerr
27f6adf8df fix: run visibleOnAllWorkspaces tests on the right platforms (#46815)
* test: add platform test on visibleOnAllWorkspaces tests

visibleOnAllWorkspaces is not supported on Windows

* test: do not skip visibleOnAllWorkspaces tests on Windows

That feature is supported on Linux, so move the test from the
"window states (excluding Linux)" section into the
"window states" section.

* fix: nested it() calls in visibleOnAllWorkspaces specs

* chore: make the process.platform test simpler
2025-04-28 10:34:00 -04:00
Shelley Vohr
b03c71213e refactor: use upstream content protection logic on macOS (#46780)
* refactor: use upstream content protection logic on macOS

* Update shell/browser/native_window.h

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

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-26 11:31:30 -05:00
Charles Kerr
c2ab63f6d7 refactor: use absl::InlinedVector in ToV8(ElectronPermissionManager) (#44854)
perf: use a stack-allocated string_view array in ToV8(USBProtectedClasses)
2025-04-25 16:11:15 -05:00
Calvin
b92c68b053 docs: call out breaking change for GTK 4 default on GNOME (#46793)
docs: add breaking change for GTK 4 default on GNOME
2025-04-25 13:31:28 -07:00
Charles Kerr
450b2d0ba3 refactor: remove public method BrowserWindow::GetWeakPtr() (#46763)
refactor: remove public method electron::api::BrowserWindow::GetWeakPtr()
2025-04-25 15:01:52 -05:00
Charles Kerr
b40b4dc015 refactor: use std::map::try_emplace() over std::map::insert() (#46761)
refactor: prefer std::map::try_emplace() over std::map::insert()
2025-04-25 13:11:53 -05:00
Evan Simkowitz
8fa7d324d1 fix: set XDG_CURRENT_DESKTOP env var back to original value before invoking xdg utils (#45310)
* Fix XDG_CURRENT_DESKTOP before invoking XDGUtil

* apply suggestion

* use existing XDG_CURRENT_DESKTOP const
2025-04-25 11:31:36 -05:00
Felix Rieseberg
7fa297a849 docs: Add ObjC/macOS tutorial (#46694) 2025-04-25 10:29:25 -05:00
John Kleinschmidt
55505ba4df docs: additional update of breaking changes for 36-x-y (#46781) 2025-04-25 11:28:33 -04:00
Shelley Vohr
372cdb5dee fix: bluetooth crash in select-bluetooth-device event (#46745)
fix: bluetooth crash on bluetooth off
2025-04-25 10:26:19 -05:00
Calvin
973e5d0249 build: update NMV to 136 for Electron 37 (#46764)
build: update NMV to 136 for Electron 36
2025-04-25 11:20:29 -04:00
Michaela Laurencin
0171f648b1 docs: correct breaking-changes.md for 36.0.0 release (#46762) 2025-04-25 16:10:35 +02:00
Charles Kerr
74c4ae0b55 refactor: use net::CanonicalCookie::IsDomainMatch() (#46748)
* refactor: use net::CanonicalCookie::IsDomainMatch()

Previously we had been rolling our own impl

* test: add pattern-matching tests for our cookie API
2025-04-25 16:08:16 +02:00
Charles Kerr
06a99d6770 refactor: make node Buffers more friendly to base::span / std::span (#46724)
* refactor: add electron::Buffer namespace; move the Buffer as_byte_span() into it

* feat: add electron::Buffer::Copy()

a span-friendly version of node::Buffer::Copy()

* refactor: use electron::Buffer::Copy() in electron_api_base_window.cc

* refactor: use electron::Buffer::Copy() in electron_api_data_pipe_holder.cc

* refactor: use electron::Buffer::Copy() in electron_api_safe_storage.cc

* refactor: use electron::Buffer::Copy() in electron_api_clipboard.cc

* refactor: use electron::Buffer::Copy() in osr_converter.cc

* refactor: use electron::Buffer::Copy() in electron_api_native_image.cc

* refactor: use electron::Buffer::Copy() in net_converter.cc

* refactor: use electron::Buffer::Copy() in electron_api_web_contents.cc

* refactor: make NewEmptyBuffer() return a Local<Value>
2025-04-25 08:00:09 -05:00
Shelley Vohr
1976e935e7 fix: missing HandleScope in RemoveFromParentChildWindows (#46758) 2025-04-25 14:04:25 +02:00
Calvin
51dbe69e45 fix: vibrancy window border (#46648)
* fix: vibrancy window border

* Use WidgetDelegate::OnWidgetInitialized instead
2025-04-25 11:42:48 +02:00
Calvin
08318dc05d fix: corner smoothing with 0 radii (#46751) 2025-04-25 10:54:04 +02:00
wujinli
3e78bbde6a fix: crash when renderer process crashes while webview is reloading (#46735)
WebView uses WebContentsViewChildFrame, which doesn't have a Focus impl
and triggers a fatal NOTREACHED.
2025-04-25 10:10:27 +02:00
electron-roller[bot]
37f8db15e9 chore: bump chromium to 137.0.7143.0 (main) (#46757)
* chore: bump chromium in DEPS to 137.0.7142.0

* chore: bump chromium in DEPS to 137.0.7143.0

* Add accelerator API to get shortcut vector representation

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

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-04-25 14:53:51 +09:00
electron-roller[bot]
08b7a1f801 chore: bump chromium to 137.0.7141.0 (main) (#46725)
* chore: bump chromium in DEPS to 137.0.7139.0

* chore: bump chromium in DEPS to 137.0.7141.0

* chore: update patches

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6474596
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6443472
Refs https://chromium-review.googlesource.com/c/chromium/src/+/6471184

* [ServiceWorker] Pipe is_for_service_worker into OverrideURLLoaderFactoryParams

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

* Reland "[PermissionOptions] Use PermissionDescriptorPtr in PermissionControllerDelegate"

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

* clickiness: Check attestation and user settings on origins

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

* extensions : Move ReloadExtension from ExtensionService

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

* fixup! Update AppleKeychain API to be friendlier

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

* chore: script/gen-libc++-filenames.js

* Rename ColorVariant::CovertToSkColor() to ColorVariant::ResolveToSkColor()

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

* [headless] Provide headless aware window metrics on Windows

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-04-24 17:18:38 +09:00
Charles Kerr
e9f279afd1 chore: remove WebContents.getNativeView() (#46734)
chore: remove never-used WebContents.getNativeView().

This was added in https://github.com/electron/electron/pull/10308 but
was never used and never documented, not even as experimental API.
2025-04-23 20:33:50 -05:00
Charles Kerr
c7b0bdab7e fix: explicitly call GetNativeNSView() on macOS (#46733)
* fix: explicitly call GetNativeNSView() on macOS

* chore: move macOS impl to a .mm file

This is needed in order to access gfx::NativeView::GetNativeNSView()
2025-04-23 17:55:18 -05:00
Charles Kerr
686ae47696 refactor: remove redundant NativeImage::GetBitmap() (#46696)
* refactor: remove redundant NativeImage::GetBitmap()

* docs: mark NativeImage.getBitmap() as deprecated

* have getBitmap() emit a deprecation warning

* docs: update obsolete refefence to getBitmap()

* test: update obsolete refefences to getBitmap()

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-04-23 11:00:43 +02:00
electron-roller[bot]
dd03cceda0 chore: bump chromium to 137.0.7128.1 (main) (#46482)
* chore: bump chromium in DEPS to 137.0.7107.0

* chore: bump chromium in DEPS to 137.0.7109.0

* chore: bump chromium in DEPS to 137.0.7111.0

* chore: bump chromium in DEPS to 137.0.7113.0

* 6384240: Remove double-declaration for accessibility on macOS | https://chromium-review.googlesource.com/c/chromium/src/+/6384240

* 6422872: Remove unused includes in isolation_info_mojom_traits.h | https://chromium-review.googlesource.com/c/chromium/src/+/6422872

* chore: update patches

* 6400733: Avoid ipc_message_macros.h usage in some foo_param_traits_macros.h files | https://chromium-review.googlesource.com/c/chromium/src/+/6400733

* chore: update patches

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410

* chore: iwyu

* refactor: prefer value initialization over memset()

From the looks up upstream commits in base/, it looks like memset()
could trigger `-Wunsafe-buffer-usage` warnings soon?

Value initialization is more C++ish and less error-prone anyway,
due to memset()'s easily swappable parameters.

* refactor: NotifyIcon::InitIconData() returns a NOTIFYICONDATA

This follows F.20 in the C++ Core Guidelines and also removes the need
for memset()

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410

remove all uses of:

- strcmp()

* fixup!  6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410

* 6433203: Add a PassKey to RegisterDeleteDelegateCallback(). | https://chromium-review.googlesource.com/c/chromium/src/+/6433203

* chore: bump chromium in DEPS to 137.0.7115.0

* 6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077

* chore: update patches

* 6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077

* fix: add pragma for MacSDK unsafe buffers | 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410

* chore: bump chromium in DEPS to 137.0.7117.0

* chore: update patches

* chore: update filesnames.libcxx.gni

* 6431756: Replace SetOwnedByWidget() bool arg with a PassKey. | https://chromium-review.googlesource.com/c/chromium/src/+/6431756

* 6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077

* 6428345: Remove ExtensionService usage from ChromeExtensionRegistrarDelegate | https://chromium-review.googlesource.com/c/chromium/src/+/6428345

* 6384315: Migrate extensions_enabled from ExtensionService to Registrar | https://chromium-review.googlesource.com/c/chromium/src/+/6384315

* 6428749: [extensions] Refactor ExtensionService for AddNewAndUpdateExtension. | https://chromium-review.googlesource.com/c/chromium/src/+/6428749

* chore: bump chromium in DEPS to 137.0.7119.0

* 6440290: corner-shape: support inset shadow | https://chromium-review.googlesource.com/c/chromium/src/+/6440290

* 6429230: FSA: Move blocked paths to the PermissionContext class | https://chromium-review.googlesource.com/c/chromium/src/+/6429230

* chore: update patches

* chore: bump chromium in DEPS to 137.0.7121.0

* chore: update patches

* fix: partially revert 6443473: Remove ItemDelete from the Mac version of AppleKeychain | https://chromium-review.googlesource.com/c/chromium/src/+/6443473

* fix: update filenames.libcxx.gni

* chore: bump chromium in DEPS to 137.0.7123.0

* chore: update patches

* chore: "grandfather in" electron views too

Lock further access to View::set_owned_by_client() | https://chromium-review.googlesource.com/c/chromium/src/+/6448510

* chore: update feat_corner_smoothing_css_rule_and_blink_painting.patch

corner-shape: support inset shadow | https://chromium-review.googlesource.com/c/chromium/src/+/6440290

* refactor: grandfather in AutofillPopupView as a subclass of WidgetDelegateView

Add a PassKey for std::make_unique<WidgetDelegateView>() | https://chromium-review.googlesource.com/c/chromium/src/+/6442265

* Provide dbus appmenu information on Wayland | https://chromium-review.googlesource.com/c/chromium/src/+/6405535

* [extensions] Move OnExtensionInstalled out of ExtensionService. | https://chromium-review.googlesource.com/c/chromium/src/+/6443325

* refactor: grandfather in NativeWindowViews for delete callbacks

6433203: Add a PassKey to RegisterDeleteDelegateCallback(). | https://chromium-review.googlesource.com/c/chromium/src/+/6433203

* chore: merge the four "grandfather" patches into one

* [A11yPerformance] Remove IsAccessibilityAllowed() | 6404386: [A11yPerformance] Remove IsAccessibilityAllowed() | https://chromium-review.googlesource.com/c/chromium/src/+/6404386

NB: the changes here are copied from the upstream changes in
chrome/browser/ui/webui/accessibility/accessibility_ui.cc

* 6420753: [PermissionOptions] Use PermissionDescriptorPtr in PermissionController | https://chromium-review.googlesource.com/c/chromium/src/+/6420753

* 6429573: [accessibility] Move mode change out of AccessibilityNotificationWaiter | https://chromium-review.googlesource.com/c/chromium/src/+/6429573

* chore: e patches all

* 6419936: [win] Change ScreenWin public static methods to virtual | https://chromium-review.googlesource.com/c/chromium/src/+/6419936

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410

remove all uses of:

- fprintf()
- fputs()
- snprintf()
- vsnprintf()

* fix: size conversion FTBFS on Win

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410

remove all uses of:

- wcscpy_s()

* 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410

remove all uses of:

- wcsncpy_s()

* chore: update mas_avoid_private_macos_api_usage.patch.patch

6394283: Remove double-declaration for accessibility on iOS | https://chromium-review.googlesource.com/c/chromium/src/+/6394283

Lots of context shear in this commit but the only interesting part is:

-+  return nullptr;
++  return {};

Which is needed because the return type is sometimes not a pointer.

* chore: e patches all

* chore: disable -Wmacro-redefined warning in electron_main_win.cc

* chore: bump chromium in DEPS to 137.0.7123.5

* refactor: patch electron PermissionTypes into blink

6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077

* chore: e patches all

* chore: remove the box_painter_base.cc part of feat_corner_smoothing_css_rule_and_blink_painting.patch

as per code review @ https://github.com/electron/electron/pull/46482#pullrequestreview-2777338370

* test: enable window-smaller-than-64x64 test on Linux

* chore: bump chromium in DEPS to 137.0.7124.1

* chore: bump chromium in DEPS to 137.0.7125.1

* chore: bump chromium in DEPS to 137.0.7127.3

* 6459201: [Extensions] Remove ExtensionSystem::FinishDelayedInstallationIfReady() | https://chromium-review.googlesource.com/c/chromium/src/+/6459201

* 6454796: [Extensions] Move (most) registrar delayed install logic to //extensions | https://chromium-review.googlesource.com/c/chromium/src/+/6454796

* chore: bump chromium in DEPS to 137.0.7128.1

* chore: e patches all

* chore: node ./script/gen-libc++-filenames.js

* [views] Gate DesktopWindowTreeHostWin::window_enlargement_ behind flag

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

* feat: allow opt-out animated_content_sampler.

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

* Trigger CI

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-04-22 15:53:29 -04:00
Kolja
d0e13cc262 fix: file dialog filters not working correctly (#46660) 2025-04-22 13:31:04 +02:00
Shelley Vohr
858a93f886 build: don't kill ssh sessions on checkout failure (#46708) 2025-04-22 13:30:27 +02:00
Michaela Laurencin
e383eaa465 fix: stop menu minimization if set false (#46279) 2025-04-22 10:58:30 +02:00
Milan Burda
274b148554 docs: cleanup docs/tutorial/custom-window-styles.md (#46597) 2025-04-22 10:23:35 +02:00
Charles Kerr
7083419361 refactor: make electron::api::BaseWindow fields private (#46689)
refactor: make electron::api::BaseWindow fields private
2025-04-22 10:19:11 +02:00
reito
ac2c0c76fe fix: osr stutter fix backport for electron. (#46650)
* fix: osr stutter fix backport for electron.

* nit: chromium upstream patch link
2025-04-22 10:18:21 +02:00
Michaela Laurencin
3ad87787f8 docs: update timelines for E37 (#46704) 2025-04-21 13:34:02 -07:00
Robo
ec8f7f185e fix: crash on reconversion with google IME and editcontext on macOS (#46688) 2025-04-21 09:49:14 +09:00
Calvin
f15fa56e38 refactor: reduce & remove no-op MicrotasksScope calls (#46681)
* fix: do not run microtasks in V8Serializer in browser process

* Remove no-op MicrotasksScope in `shell/browser/api/electron_api_auto_updater.cc`

This call was added in https://github.com/electron/electron/pull/40576 as an expansion of `gin_helper::EmitEvent`.

Since this only runs in the browser process and `bool ignore_browser_checkpoint = true` this code is a no-op.

Node should perform a microtask checkpoint if necessary in `node::MakeCallback`.

* Remove no-op MicrotasksScope in `shell/common/api/electron_bindings.cc`

This method is only called by the browser process. The containing function, `ElectronBindings::DidReceiveMemoryDump`, is only used in two places:

* `ElectronBindings::GetProcessMemoryInfo` in the same file, which has a `CHECK` that it's running in the browser process at the top.
* From `shell/browser/api/electron_api_web_contents.cc`, which is only run in the browser process.

Added a DCHECK for clarity and validation.

* Replace `gin_helper::MicrotasksScope` with `v8::MicrotasksScope` in `shell/renderer/`

The browser check is unnecessary in the renderer. Since `gin_helper::MicrotasksScope` will always act exactly like `v8::MicrotasksScope`, it's clear to just use the v8 object directly. This also brings them in line with the many other uses of `v8::MicrotasksScope` in `shell/renderer/`.
2025-04-19 12:18:03 -05:00
Charles Kerr
297c4297b1 perf: avoid triple map lookup in ElectronHidDelegate::GetContextObserver() (#46672)
perf: avoid triple map lookup in ElectronHidDelegate::GetContextObserver()
2025-04-19 10:51:52 -05:00
Calvin
3a982ecad5 fix: do not run microtasks in V8Serializer in browser process (#46668) 2025-04-19 11:43:02 +09:00
Charles Kerr
926a6ee8bd refactor: remove WebContentsPermissionHelper::PermissionTypes::KEYBOARD_LOCK (#46670)
refactor: remove electron::WebContentsPermissionHelper::PermissionTypes::KEYBOARD_LOCK

This was added in 344aba0. In the time when this PR initially went up and
when 344aba0 landed, upstream added blink::PermissionTypes::KEYBOARD_LOCK.
Our duplicate copy can be removed.
2025-04-18 16:14:45 -05:00
Shelley Vohr
437542767a fix: backgroundMaterial on initial activate (#46657)
* fix: backgroundMaterial on initial activate

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

* Update patches/chromium/fix_activate_background_material_on_windows.patch

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

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-17 20:34:45 +02:00
Shelley Vohr
a29e1170b9 feat: support Web Serial & WebUSB blocklists (#46600) 2025-04-17 20:34:34 +02:00
Shelley Vohr
352a403efd fix: postMessage crash with invalid transferrable (#46639) 2025-04-17 15:09:48 +02:00
John Kleinschmidt
e8117f8e40 build: update build tools (#46656)
* build: update build tools

* chore: fix core.fscache

* chore: fix core.preloadindex

---------

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-04-17 10:32:17 +02:00
Shelley Vohr
32fea719b3 refactor: migrate to non-deprecated allowedContentTypes on macOS (#46623)
refactor: migrated to non-deprecated allowedContentTypes on macOS
2025-04-15 09:51:34 -05:00
Shelley Vohr
14df4aab83 fix: window border on Gnome Wayland (#46624) 2025-04-15 15:45:33 +02:00
dependabot[bot]
24e46849c7 build(deps): bump actions/setup-node from 4.3.0 to 4.4.0 (#46636)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](cdca7365b2...49933ea528)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 4.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-15 15:44:04 +02:00
Shelley Vohr
489d30edfb build: roll build-images (#46625) 2025-04-14 16:10:46 -04:00
Shelley Vohr
e748b521b2 test: fix node spec disabled tests (#46627) 2025-04-14 11:38:27 -04:00
Shelley Vohr
51bffb533e fix: paint and flash issues on macOS (#46615)
* fix: paint and flash issues on macOS

* Adhere to paintWhenInitiallyHidden
2025-04-14 16:29:07 +02:00
Shelley Vohr
62b5b5f99d fix: handle potential missing close event property (#46605)
fix: handle missing close event property
2025-04-11 13:07:26 -04:00
Keeley Hammond
a9b2ec514b fix: fallback to old MacOS context menu behavior if no frame is present (#46595)
* fix: fallback to old MacOS context menu behavior if no frame is present

Co-authored-by: georgexu99 <georgexu99@electronjs.org>
Co-authored-by: erickzhao <erickzhao@electronjs.org>
Co-authored-by: clavin <calvin@electronjs.org>

* docs: add additional option for focusedFrame

* fix: handle frame found, but no view update from rfh

* fix: fix conditional

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

---------

Co-authored-by: georgexu99 <georgexu99@electronjs.org>
Co-authored-by: erickzhao <erickzhao@electronjs.org>
Co-authored-by: clavin <calvin@electronjs.org>
Co-authored-by: Calvin <clavin@users.noreply.github.com>
2025-04-11 10:15:35 -04:00
Shelley Vohr
3064b24c9d refactor: use default printing path when no user options (#46587) 2025-04-11 10:14:29 -04:00
David Sanders
74d641c7b3 build: ignore files in .git when running markdownlint-cli2 (#46608) 2025-04-10 18:37:07 -05:00
Shelley Vohr
446d0769ed feat: expose nativeTheme.shouldUseDarkColorsForSystemIntegratedUI (#46438)
feat: expose shouldUseDarkColorsForSystemIntegratedUI

Closes https://github.com/electron/electron/issues/46429.
Refs https://github.com/electron/electron/pull/19735.

This PR adds a new API `shouldUseDarkColorsForSystemIntegratedUI` to the
`nativeTheme` module. This API returns a boolean indicating whether the
system is using dark colors for system integrated UI elements. This is
useful for applications that want to adapt their UI to match the system
theme, especially for those that use system integrated UI elements like
the shell theme or taskbar appearance.
2025-04-10 12:08:29 +02:00
Jemil Suleimanov
013133867b docs: unify documentation example and fiddle for IPC pattern-1 (#46517)
* docs: unify documentation examples and fiddle

* docs: remove changes in ipc documentation
2025-04-10 12:08:10 +02:00
Yuri
de407e82b7 docs: updated tray doc with tooltip removing (#46515)
added tooltip removing doc
2025-04-09 11:50:08 -04:00
Charles Kerr
c6e6a03a24 fix: NativeWindow.window_id() returns same value for all windows (#46562)
fix: NativeWindow.window_id() returns same value for all windows
2025-04-09 10:45:06 -05:00
Shelley Vohr
c1c74b0a6c fix: re-enable OOP printing on Linux (#46529) 2025-04-09 15:42:16 +02:00
Shelley Vohr
45a0494287 fix: remove obsoleted --inspect-brk logic (#46560)
fix: remove obsoleted --inspect-brk logic
2025-04-09 15:35:40 +02:00
Shelley Vohr
521108e2a5 fix: crash on parent window close and focur/blur (#46559) 2025-04-09 15:35:30 +02:00
dependabot[bot]
93a51cc756 build(deps): bump github/codeql-action from 3.28.13 to 3.28.15 (#46554)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.13 to 3.28.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](1b549b9259...45775bd823)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.28.15
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-09 10:36:38 +02:00
Charles Kerr
ab23758e51 refactor: use v8::True(isolate) and v8::False(isolate) (#46544) 2025-04-08 12:58:39 -05:00
Charles Kerr
9069542d0b refactor: remove unnecessary const_cast (#46543)
refactor: remove unnecessary const_cast

unnecessary since July 2019 in 50b9c70
2025-04-08 12:58:28 -05:00
Charles Kerr
636cbc19ac refactor: simplify some BaseWindow JS getters (#46542)
* refactor: return a std::array<int 2> from BaseWindow::GetMaximumSize()

* refactor: return a std::array<int 2> from BaseWindow::GetMinimumSize()

* refactor: return a std::array<int 2> from BaseWindow::GetPosition()

* refactor: return a std::array<int 2> from BaseWindow::GetSize()

* refactor: return a std::array<int 2> from BaseWindow::GetContentSize()

* refactor: extract helper method ToArray(const gfx::Size)

* refactor: #include correctness
2025-04-08 10:58:12 -05:00
Shelley Vohr
1a6de10da8 fix: assert.ok in the renderer process (#46528)
fix: assert.ok in the renderer process
2025-04-08 07:09:54 -05:00
Charles Kerr
b1731407bc refactor: make TrackableObjectBase::weak_map_id_ const (#46524)
refactor: make TrackableObjectBase::weak_map_id_ const

simplify declaration and initialization
2025-04-07 20:49:05 -05:00
Charles Kerr
4bb7a4ceb0 refactor: make api::View methods const, private (#46545)
* refactor: make api::View::GetBounds() const

* refactor: make api::View::OnViewBoundsChanged() private

refactor: make api::View::OnViewIsDeleting() private

refactor: make api::View::OnChildViewRemoved() private

* refactor: make ChildPair private
2025-04-07 16:23:36 -05:00
Shelley Vohr
e22b83abf2 build: update codespaces config (#46533) 2025-04-07 16:29:33 -04:00
Niklas Wenzel
bbc9d1cdc1 build: emphasize the need for a testcase in our issue template (#46447) 2025-04-07 10:50:59 -07:00
Charles Kerr
85dce12be3 refactor: migrate to View::AddChildView(std::unique_ptr<ui::View*>) (#46474)
* refactor: use AddChildView(std::unique_ptr<View>) in OpaqueFrameView::CreateButton()

Xref: https://issues.chromium.org/issues/40485510

* refactor: use AddChildView(std::unique_ptr<View>) in MenuBar::RebuildChildren()

* refactor: use AddChildView(std::unique_ptr<View>) for ClientFrameViewLinux labels

* refactor: use AddChildView(std::unique_ptr<View>) for ClientFrameViewLinux buttons

* refactor: use AddChildView(std::unique_ptr<View>) in AutofillPopupView

* refactor: use AddChildViewRaw() to flag the edge cases that we still need to fix

* chore: use west coast const for consistency
2025-04-07 09:20:46 -05:00
Charles Kerr
a6875c732c docs: note that titleBarOverlay.symbolColor is supported on Linux (#46492)
docs: note that titleBarOverlay.symbolColor is supported on Linux

this is supported via OpaqueFrameView
2025-04-07 11:10:54 +02:00
Charles Kerr
c0fdf09f28 perf: on Windows, make Archive::HeaderIntegrity() faster (#46509)
* perf: do not clone the map each time we call Archive::HeaderIntegrity()

* perf: use absl::flat_hash_map for the integrity cache

* perf: do not clone the JSON payload string

* perf: preallocate capacity for the integrity cache

* perf: use move variant of insert_or_assign()

* refactor: simplify integrity cache building

remove unnecessary std::optional<>

* refactor: use base::FindOrNull()

* refactor: remove unused #includes

* refactor: make variable types explicit

* fix: make res_size unsigned

* refactor: put GetIntegrityConfigCache() in an unnamed namespace

refator: put LoadIntegrityConfig() in an unnamed namespace

* fix: oops, missing rel_path_utf8 key

* fix: oops, fix Wunreachable-code-return
2025-04-07 11:10:29 +02:00
Charles Kerr
41d8f90d68 refactor: use base::flat_set in WebContents::DidUpdateFaviconUrl() (#46475)
* refactor: add gin::Converter<std::span>::ToV8()

* feat: add ToV8(const base::flat_set<T>&)

* perf: use a flat_set in WebContents::TitleWasSet()

* refactor: add gin::Converter<std::array>::ToV8()
2025-04-07 10:16:02 +02:00
Charles Kerr
3c5c9c8e19 perf: avoid redundant virtual method call in NativeWindowViews::SetEnabledInternal() (#46508)
perf: avoid redundant virtual method call in NativeWindowViews::SetEnabledInternal()

Why waste time make lot call when few call do trick?
2025-04-06 19:02:04 -07:00
Hailey
ac18decc56 revert: allow NSMenuItems to be disabled (#46502)
Revert "fix: allow NSMenuItems to be disabled (#46307)"

This reverts commit ac616ef41d.
2025-04-06 20:42:05 -05:00
Charles Kerr
052da50aeb refactor: remove unused electron::api::App::FileIconCallback (#46490)
refactor: remove electron::api::App::FileIconCallback

last use removed in 2018 by 3f15f516
2025-04-05 00:39:17 -05:00
Charles Kerr
4e33d1690d refactor: instantiate navigation_entries local variable on the stack (#46453)
* refactor: instantiate navigation_entries on the stack instead of the heap

* refactor: reserve the full size of navigation_entries

* refactor: use emplace_back to simplify the code a little
2025-04-04 16:55:27 -05:00
Shelley Vohr
c2ae4afb8f fix: destroy parent port backend when JS env exits (#46437)
* fix: destroy parent port backend when JS env exits

* fix: close parent port before destroying

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-04-04 11:02:54 -05:00
Felix Rieseberg
e81e3acd2d docs: Add C++/Win32 tutorial (#46160)
* docs: Add C++/Win32 tutorial

* Update docs/tutorial/native-code-and-electron-cpp-win32.md

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

* Update docs/tutorial/native-code-and-electron-cpp-win32.md

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

* Update docs/tutorial/native-code-and-electron-cpp-win32.md

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

* Update docs/tutorial/native-code-and-electron-cpp-win32.md

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

* Update docs/tutorial/native-code-and-electron-cpp-win32.md

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

* docs: make linter happy

---------

Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-04-04 08:00:45 -05:00
electron-roller[bot]
9c019b6147 chore: bump chromium to 136.0.7095.0 (main) (#46118)
* chore: bump chromium in DEPS to 136.0.7076.0

* chore: bump chromium in DEPS to 136.0.7077.0

* 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | https://chromium-review.googlesource.com/c/chromium/src/+/6368856

* 6356528: Clean up LegacyRenderWidgetHostHWND code | https://chromium-review.googlesource.com/c/chromium/src/+/6356528

* chore: export patches

* 6339113: [Viewport Segments] Add CDP commands to override Viewport Segments without overriding other device properties. | https://chromium-review.googlesource.com/c/chromium/src/+/6339113

* 6352169: [DevTools][MultiInstance] Support new tab in another window on Android | https://chromium-review.googlesource.com/c/chromium/src/+/6352169

* 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | https://chromium-review.googlesource.com/c/chromium/src/+/6368856

* 6360858:Clickiness: Wire response from URLLoader to DB, add e2e tests| https://chromium-review.googlesource.com/c/chromium/src/+/6360858

* chore: bump chromium in DEPS to 136.0.7079.0

* chore: export patches

* chore: bump chromium in DEPS to 136.0.7081.0

* chore: export patches

* chore: bump chromium in DEPS to 136.0.7083.0

* 6361987: Remove double-declaration with gfx::NativeView and gfx::NativeWindow | https://chromium-review.googlesource.com/c/chromium/src/+/6361987

* chore: export patches

* chore: bump chromium in DEPS to 136.0.7087.0

* chore: export patches

* fix: include node patch for missing AtomicsWaitEvent
https://chromium-review.googlesource.com/c/chromium/src/+/6385540

* build: add depot_tools python to path

* fix: cppgc init and unregistering v8 isolate

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

CppGc is now initialized earlier so Node can skip reinitializing it.

Additionally, gin::IsolateHandle was attempting to destruct an already destructed
v8::Isolate upon electron::JavaScriptEnvironment destruction. By removing the call
to NodePlatform::UnregisterIsolate, this fixes the crash on app shutdown.

* fix: unregister isolate after destruction

See code comment.

* chore: bump chromium in DEPS to 136.0.7095.0

* chore: sync patches

* fix: add script_parsing::ContentScriptType parameter
https://chromium-review.googlesource.com/c/chromium/src/+/6298395

* fix: migrate content::BrowserAccessibilityState methods
https://chromium-review.googlesource.com/c/chromium/src/+/6401437
https://chromium-review.googlesource.com/c/chromium/src/+/6383275

* feat: enableHappyEyeballs option for host resolver
https://chromium-review.googlesource.com/c/chromium/src/+/6332599

* fix: add new cookie exclusion reason
https://chromium-review.googlesource.com/c/chromium/src/+/6343479

* fix: add new url loader method
https://chromium-review.googlesource.com/c/chromium/src/+/6337340

* fix: add new cppgc header file for electron_node headers
https://chromium-review.googlesource.com/c/v8/v8/+/6348644

* fix: disable CREL on Linux ARM64
https://chromium-review.googlesource.com/q/I3a62f02f564f07be63173b0773b4ecaffbe939b9

* fixup! fix: add new cppgc header file for electron_node headers https://chromium-review.googlesource.com/c/v8/v8/+/6348644

* chore: update corner smoothing patch

* fixup! chore: update corner smoothing patch

* chore: disable NAN weak tests

These two tests are incompatible with a V8 change that disallows running JS code from a weak finalizer callback.

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

* test: fix task starvation in node test

A V8 change makes these contexts get collected in a task that is posted
and run asynchronously. The tests were synchronously GC'ing in an
infinite loop, preventing the task loop from running the task that would
GC these contexts.

This change should be upstreamed in some way.

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: alice <alice@makenotion.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: clavin <clavin@electronjs.org>
2025-04-03 19:02:49 -05:00
Charles Kerr
0a5da83a1b perf: avoid redundant map lookup in HidChooserContext::DeviceChanged() (#46451)
perf: avoid redundant map lookup in HidChooserContext::DeviceChanged()
2025-04-03 17:51:37 -05:00
Fedor Indutny
7601af5200 fix: don't copy 'package.json's out of ASAR file (#46390)
New Node.js module resolution system reads `package.json` from imported
modules by reading from the file natively in C++ without calling into
`fs.readFileSync`. The ASAR FS wrapper code had copied files out into a
temporary folder as a workaround, but it is inefficient and does not
cover all module resolution mechanisms in Node.js.

In this change we expose `overrideReadFileSync` method on the `modules`
binding in Node.js, and use this override to call into ASAR-supporting
`fs.readFileSync`.
2025-04-03 13:39:53 -07:00
yangllu
e46b0c8ddc fix: gin_helper::Promise in GPUInfoManager must be destroyed before destroying Node/V8 (#46434)
* fix: gin_helper::Promise in GPUInfoManager must be destroyed before destroying Node/V8

* fix: use CleanedUpAtExit to control the lifetime of GPUInfoManager
2025-04-03 10:12:12 -07:00
Samuel Attard
0e3246e20d fix: ensure maximize is emitted when reduce motion is enabled on macOS (#46459)
* fix: ensure maximize is emitted when reduce motion is enabled on macOS

* Revert "build: reenable graphics effects for macOS tests (#46454)"

This reverts commit 682ea345ac.
2025-04-03 11:14:16 -05:00
Charles Kerr
0ff98810ba fix: NativeWindowViews::GetRestoredState() can return wrong state when maximized (#46450)
fix: NativeWindowViews::GetRestoredState() returning wrong state

Introduced by the af58931 Chromium 131.0.6744.0 roll, specifically
https://github.com/electron/electron/pull/43948/commits/9840662#diff-f9d7ef7

98406626
2025-04-03 08:55:04 -05:00
Shelley Vohr
f48680a983 fix: zlib pointer alignment (#46435)
fix: fix zlib pointer alignment
2025-04-03 09:35:38 -04:00
Niklas Wenzel
682ea345ac build: reenable graphics effects for macOS tests (#46454) 2025-04-02 21:33:12 -05:00
Charles Kerr
a21c805ece perf: avoid redundant call to virtual methods GetProcess() and GetID() (#46409) 2025-04-02 11:57:09 -05:00
Charles Kerr
6f24dbaab4 perf: prefer absl::flat_hash_set over std::set when sorted order is not needed (#46410)
* perf: use an absl::flat_hash_set for UsbChooserContext::ephemeral_devices_

* perf: use an absl::flat_hash_set for GlobalMenuBarRegistrarX11::live_windows_

* perf: use an absl::flat_hash_set for NativeWindowViews::forwarding_windows_

* perf: use an absl::flat_hash_set for OffScreenRenderWidgetHostView::guest_host_views_

perf: use an absl::flat_hash_set for OffScreenRenderWidgetHostView::proxy_views_

* perf: use an absl::flat_hash_set for NativeWindow::injected_frames_

* perf: use an absl::flat_hash_set for NativeWindow::background_throttling_sources_
2025-04-02 11:03:36 -05:00
Charles Kerr
36e233797c perf: cache the return value of IsX11() (#46391)
* perf: cache the return value of IsX11()

* fix: mark as nodiscard for those who call, but mark as maybe_unused for Windows
2025-04-01 15:28:01 -05:00
Shelley Vohr
c02e5bc72c build: make it clearer when cookie auth runs (#46406) 2025-04-01 10:44:51 -07:00
Charles Kerr
5499c800a7 perf: avoid redundant map lookup in UsbChooserContext::OnDeviceRemoved() (#46387) 2025-04-01 12:39:34 -05:00
Charles Kerr
0492f0f745 perf: have ErrorThrower lazily lookup the current isolate (#46388)
perf: have ErrorThrower lazy-lookup the current isolate

ErrorThrower's default constructor is marked as "should rarely if ever
be used" because it's expensive to call.

Unfortunately, nearly every instance of ErrorThrower comes as an argument
in gin_helper's JS-->C++ function marshalling where a thrower is
default-constructed and then populated in gin_helper::GetNextArgument()
with an assignment operator to a temporary ErrorThrower constructed
with the gin::Arguments' isolate.

tldr: most of the time we use the slow constructor first, then throw
that work away unused by overwriting with a fast-constructed one.

This refactor avoids that cost by deferring the expensive work to
`ErrorThrower::isolate()`, where it happens only as a fallback iff
isolate_ hasn't been set.
2025-04-01 12:25:27 -05:00
Charles Kerr
ac1ffb1bff fix: leaked gfx::Canvas in AutofillPopupView::OnPaint() (#46384)
* perf: avoid redundant call to popup_bounds_in_view()

* refactor: use a std::optional<> for paint_canvas local

* fix: fix leaked gfx::Canvas in AutofillPopupView::OnPaint()

* refactor: remove redundant get() call when testing smart pointer for nonempty

* refactor: remove unnecessary draw_canvas variable

* refactor: rename bitmap to offscreen_bitmap for symmetry

* refactor: avoid another redundant call to popup_bounds_in_view()
2025-04-01 11:22:26 -05:00
Charles Kerr
5a6f1ede6a feat!: remove support for ProtocolResponse.session null value (#46264)
BREAKING CHANGE

This was deprecated in f7ba0d3b & is now being removed for Electron 37.
2025-04-01 08:52:12 -05:00
zoy
0e687d3082 fix: rounded corners disappear momentarily on window close (#46382)
fix: Explicitly set rounded corners in borderless mode on Windows 11

Signed-off-by: zoy <zoy-l@outlook.com>
2025-04-01 15:43:54 +02:00
Calvin
08da2b0b07 chore: move build files to build/ dir (#46368) 2025-04-01 13:42:14 +02:00
Shelley Vohr
9c4720766d fix: UtilityProcess.fork crash before app ready (#46380)
fix: UtilityProcess.fork crash before app ready
2025-04-01 13:42:03 +02:00
Shelley Vohr
5da75c4a97 feat: support system-context-menu on Linux (#45848)
feat: support system-context-menu on Linux
2025-04-01 11:00:39 +02:00
Charles Kerr
77833eddfb perf: avoid unnecessary vector copy in GetMimeTypeToExtensionIdMap() (#46373)
* perf: avoid making an unnecessary copy of the vector

MimeTypesHandler::GetMIMETypeAllowlist() returns a const&, so we can
iterate that directly instead of making a temporary copy of it.

* perf: move the call to ExtensionRegistry::Get() outside of the loop

Also, keep the previous behavior of not calling it at all if there
aren't any whitelisted extensions.

* perf: avoid redundant map lookup

* refactor: const correctness

* refactor: cleanup
2025-03-31 21:52:49 -05:00
Calvin
1730062c8f fix: flicker and ghosting in transparent windows on macOS (#46353)
* fix: transparent flicker on MAS

* Gate condition on `IsTranslucent` instead
2025-03-31 18:12:35 -05:00
Calvin
09135443a0 feat: Corner Smoothing CSS rule (Reland) (#46278)
* feat: Corner Smoothing CSS rule (Reland)

Reland of #45185

* Fix patch conflicts

* fixup! Fix patch conflicts

* Update expected image

The dashed border is subtly different. The new version is correct and the old one was incorrect.
2025-03-31 11:22:23 -05:00
Charles Kerr
fcd836e34f refactor: remove field unused weak_factory_ (#46363)
refactor: remove unused weak_factory_

Appears to have been added in e3f61b46 but never used
2025-03-31 10:39:21 +02:00
Charles Kerr
28fd7c5a17 perf: improve temporaries in WebWorkerObserver::WorkerScriptReadyForEvaluation() (#46347)
refactor: small refactor to WebWorkerObserver::WorkerScriptReadyForEvaluation()

- replace a std::vector<std::string> local with a compile-time array
  of std::string_view
- remove .c_str() pessimization when making v8 Strings from string_views
2025-03-30 23:21:39 -05:00
Charles Kerr
ae6930030a perf: prefer absl::flat_hash_set over std::unordered_set (#46348)
* perf: use absl::flat_hash_set in SpellCheckClient::SpellCheckText()

* perf: use absl::flat_hash_set in MessagePort::DisentanglePorts()
2025-03-30 23:21:18 -05:00
Charles Kerr
2fa4fb0da9 refactor: use v8::String::Empty() when creating empty strings (#46349)
refactor: use v8::String::Empty() when creating empty strings
2025-03-30 21:14:18 -05:00
Charles Kerr
bf93427cbb perf: avoid double map lookup in HidChooserContext::DeviceRemoved() (#46343) 2025-03-28 21:34:24 -05:00
Charles Kerr
72fc65d2c5 perf: avoid 3x call to GetID() in RegisterPendingSiteInstance() (#46339)
perf: avoid 3x call to GetID() in RegisterPendingSiteInstance()
2025-03-28 21:33:45 -05:00
Charles Kerr
2baa4a3514 perf: avoid a double-map lookup in NotificationPresenter::RemoveNotification() (#46338)
perf: avoid a double-map lokup in NotificationPresenter::RemoveNotification()
2025-03-28 21:33:11 -05:00
Samuel Attard
49aba471dc feat: add support for associating a Menu with a WebFrameMain (#45138)
* feat: add support for associating a Menu with a WebFrameMain

This allows certain OS level features to activate such as Writing Tools, Autofill.. and Services.

There appears to be a bug in macOS where the responder chain isn't traversed if the menu is not popped up using an event, as such we spoof a fake mouse event at the write coordinates in the right window and use that to open the menu.

* build: fix build on non-mac

* build: oops missed a header

* fix: safely handle optional T* by checking nullptr too

* build: fix gn check and build errors

* docs: suggested changes

* feat: default `frame` to `window.webContents.mainFrame` when possible

* fix: avoid deref nullptr view

* Revert "feat: default `frame` to `window.webContents.mainFrame` when possible"

This reverts commit 2e88836819.

* fix: lint

* Remove redundant scoped objects

This code, including the comments, matches almost exactly the behavior of this argument to the function.

* Add ScopedPumpMessagesInPrivateModes patch

* More null pointer safety

---------

Co-authored-by: clavin <clavin@electronjs.org>
2025-03-28 11:50:07 -07:00
Charles Kerr
46b108e9a4 perf: avoid redundant map lookups in GetStorageMask() (#46315)
* perf: avoid a redundant map lookuop in GetStorageMask()

* perf: avoid a redundant map lookup in GetDataTypeMask()
2025-03-28 00:25:25 -05:00
Hailey
ac616ef41d fix: allow NSMenuItems to be disabled (#46307)
* fix: disable NSMenu autoenable feature to allow disabling of NSMenuItems

* style: fix linter issues and update comments

* chore: remove unneeded comment
2025-03-27 17:43:46 -07:00
Charles Kerr
e09712f0e1 perf: avoid a triple-redundant map lookup in ViewsDelegate::GetAppbarAutohideEdges() (#46306)
perf: avoid a triple-redundant map lookup in ViewsDelegate::GetAppbarAutohideEdges()
2025-03-27 14:32:27 -05:00
Charles Kerr
35c90fd807 perf: avoid double map lookup in WebFrameMain::UpdateRenderFrameHost() (#46293)
perf: avoid double map lookup in WebFrameMain::UpdateRenderFrameHost()
2025-03-27 14:32:01 -05:00
Shelley Vohr
756423e81e build: validate Chromium cookie authentication (#46274) 2025-03-27 14:29:01 -05:00
Shelley Vohr
dc61a6ab80 fix: possible crash in shell.readShortcutLink (#46294)
fix: possible crash in shell.readShortcutLink
2025-03-27 14:27:32 -05:00
Shelley Vohr
a0c859fc4f build: roll build-images SHAs (#46291) 2025-03-27 10:39:02 +01:00
Shelley Vohr
17e38230d5 fix: crash when drag-dropping some files (#46253)
* fix: crash when drag-dropping some files

* fix: extra destination context scope
2025-03-26 17:17:23 -05:00
Charles Kerr
3ae285b614 perf: avoid std::map temporaries in WebContents::DevToolsRequestFileSystems() (#46268)
* perf: move the GetDevToolsWebContents() call outside of the loop

* perf: remove std::map temporary in WebContents::DevToolsRequestFileSystems()

* refactor: remove unused GetAddedFileSystemPaths()

* perf: remove std::vector temporary in WebContents::DevToolsRequestFileSystems()
2025-03-26 16:26:56 -05:00
Shelley Vohr
3212f60d69 fix: set userAgent on navigationHistory.restore() (#46260)
fix: set userAgent on navigationHistory restore
2025-03-26 10:59:19 -05:00
Charles Kerr
a5076a663b perf: avoid redundant map lookup in WebContents::DevToolsIndexPath() (#46254)
perf: avoid double map lookup in WebContents::DevToolsIndexPath()
2025-03-26 10:30:02 -05:00
Shelley Vohr
d2c2261c58 fix: hard crash on invalid command line switches (#46004)
* fix: hard crash on invalid command line switch

* Update docs/api/command-line.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* chore: feedback from review

* docs: Add breaking change note

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-03-26 08:14:03 -05:00
Charles Kerr
8412d78310 perf: avoid redundant map lookup in AddComponentResourceEntries() (#46255)
* perf: avoid double map lookup in ElectronComponentExtensionResourceManager::AddComponentResourceEntries()

* perf: move the path key when calling try_emplace()
2025-03-26 08:12:16 -05:00
Charles Kerr
48a38c0289 fix: build failure when printing is disabled (#46283)
fix: ftbfs when printing is disabled
2025-03-26 10:04:39 +01:00
Charles Kerr
6e44662f15 perf: avoid redundant map lookup in WebFrameMain constructor (#46238)
perf: avoid double map lookup in WebFrameMain constructor
2025-03-25 16:53:24 -05:00
Charles Kerr
c8d3184a95 refactor: migrate hashing code to new upstream crypto::hash API (#46237)
* refactor: migrate AsarFileValidator to crypto::hash

This change migrates AsarFileValidator's uses of crypto::secure_hash
to the new crypto::hash API, which has more memory safety and less
heap allocations.

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

* refactor: migrate ValidateIntegrityOrDie to crypto::hash

This change migrates ValidateIntegrityOrDie's use of crypto::SHA256Hash
to the new crypto::hash API, which has more memory safety and less heap
allocations.

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6287609
2025-03-25 15:01:17 -05:00
dependabot[bot]
bb0ddcad27 build(deps): bump actions/setup-node from 4.2.0 to 4.3.0 (#46092)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](1d0ff469b7...cdca7365b2)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 13:29:22 -05:00
John Kleinschmidt
4eda76de36 build: fixup windows source cache for release (#46236)
* build: fixup windows source cache for release

* build: fixup ffmpeg gn gen

* build: add build-tools depot_tools to PATH

There are some cases where it is still expected that depot_tools be in the path

* put back regular gn gen for ffmpeg

* build: add retry to moving source cache

This resolves the error: `Move-Item : The process cannot access the file because it is being used by another process.`
2025-03-25 14:24:58 -04:00
Charles Kerr
ced8fdbce8 perf: avoid std::map temporaries in IsDevToolsFileSystemAdded() (#46230)
* refactor: extract-method GetAddedFileSystems()

* refactor: use GetAddedFileSystems() in GetAddedFileSystemPaths()

* refactor: use GetAddedFileSystems() in IsDevToolsFileSystemAdded()
2025-03-25 11:42:58 -05:00
Charles Kerr
f7ba0d3b4b docs: deprecate setting ProtocolResponse.session to null (#46131)
* docs: deprecate setting ProtocolResponse.session to null

* docs: mark null ProtocolResponse.session as deprecated in struct docs

* Update docs/breaking-changes.md

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

---------

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2025-03-25 10:04:21 -05:00
Charles Kerr
4f4e23a3b3 perf: avoid redundant map lookups in GlobalShortcut (#46229)
* perf: avoid redundant map lookup in GlobalShortcut::OnKeyPressed()

* perf: avoid redundant map lookup in GlobalShortcut::ExecuteCommand()
2025-03-25 09:46:03 -05:00
Shelley Vohr
1d6cb348b4 fix: webContents.printToPDF() with cross-process subframes (#46218)
fix: webContents.printToPDF() with cross-process subframes
2025-03-25 08:16:47 -05:00
dependabot[bot]
8e856dfdb8 build(deps): bump github/codeql-action from 3.28.11 to 3.28.13 (#46240)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.11 to 3.28.13.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](6bb031afdd...1b549b9259)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 12:21:23 +01:00
John Beutner
cf82c3215f perf: don't wait for thumbnails if they were not requested on macOS (#46138)
When using the SCK thumbnail capturer, the first refresh has the list of
sources, and the second refresh has the thumbnails. If thumbnails are
not needed, only wait for the first refresh.
2025-03-25 12:20:38 +01:00
Robo
307d4f94c7 fix: oob string read when parsing node_options (#46210)
* fix: oob string read when parsing node_options

* chore: re-enable test

* fix: missing linux server env for tests
2025-03-25 19:33:10 +09:00
dependabot[bot]
cfada0347e build(deps): bump actions/download-artifact from 4.1.9 to 4.2.1 (#46239) 2025-03-25 08:47:33 +01:00
dependabot[bot]
7cb921369b build(deps): bump actions/upload-artifact from 4.6.1 to 4.6.2 (#46241) 2025-03-25 08:46:18 +01:00
Robo
a86e44b176 fix: NODE_OPTIONS parsing for child processes on macOS (#46209)
* fix: NODE_OPTIONS parsing for child processes on macOS

* chore: temporarily disable test

* chore: apply review feedback

* chore: fix build
2025-03-25 13:01:37 +09:00
Calvin
abaef13c0b fix: Revert "feat: Corner Smoothing CSS rule" (#46231)
Revert "feat: Corner Smoothing CSS rule (#45185)"

This reverts commit b75e802280.
2025-03-24 20:36:49 +01:00
John Beutner
cfd64b5f89 fix: handle OnDelegatedSourceListDismissed asynchronously (#46112)
This fixes a crash with the PipeWire capturer caused by a Chromium
change introduced in
https://chromium-review.googlesource.com/c/chromium/src/+/5783826.

DesktopMediaListBase now calls Refresh(true) after dispatching
DesktopMediaListObserver::OnDelegatedSourceListDismissed, so it's
important not to call DesktopCapturer::HandleFailure (which deallocates
the DesktopMediaList) synchronously from OnDelegatedSourceListDismissed.
2025-03-24 20:09:11 +01:00
John Kleinschmidt
cbcd779610 build: fixup release builds (#46228) 2025-03-24 14:34:57 -04:00
Calvin
b75e802280 feat: Corner Smoothing CSS rule (#45185)
* feat: Corner Smoothing

* Patch Blink to add CSS rule and Painting

* Add `system-ui` keyword

* Add `cornerSmoothingCSS` web preference

* Add tests

* Documentation

* fixup! Documentation

* fix: initialize smoothness value

* Use a 1.0 scale factor in tests

* Fix tests for CI

* Fix tests

* fixup! Merge branch 'main' into clavin/corner-smoothing

* Add code docs

* Document `system-ui` keyword values

* Address review comments

* fixup! Address review comments

* Address review comments

* Update patch to address upstream changes

The patch went from 694 lines to 505 lines, which is a 27.2% smaller!

* fixup! Update patch to address upstream changes
2025-03-24 11:46:12 -04:00
Shelley Vohr
9ec14b91e7 feat: add BrowserWindow.isSnapped() (#46079)
* feat: add BrowserWindow.isSnapped() on Windows

* docs: mark _Readonly_
2025-03-24 12:09:14 +01:00
Shelley Vohr
47cf4e7bfd fix: Wayland resizing border (#46155)
* fix: Wayland resizing border

Closes https://github.com/electron/electron/issues/44543
Refs CL:5180720

Fixes an issue where the resizing border didn't work as expected on Wayland windows.

* fix: border insets when fullscreen
2025-03-24 12:08:24 +01:00
Charles Kerr
b8150f33db refactor: remove unused weak_factory_ in electron_management_api_delegate.cc (#46200)
refactor: remove unused weak_factory_

Appears to have been added in 3745b76da but never used
2025-03-24 12:07:49 +01:00
Charles Kerr
02a4bd5942 refactor: remove unused method ProxyingWebSocket::web_request_api() (#46201)
Appears to have been added in c608d6d7 but never used
2025-03-24 10:09:24 +01:00
Charles Kerr
7ed4f0ca27 perf: use absl::flat_hash_map instead of std::unordered_map (#46202)
* perf: make ElectronUsbDelegate::controller_map_ an absl::flat_hash_map

* perf: make ElectronSerialDelegate::controller_map_ an absl::flat_hash_map

* perf: make ElectronHidDelegate::controller_map_ an absl::flat_hash_map

* perf: make FrameTreeNodeIdMap an absl::flat_hash_map

* perf: make AutofillDriverFactory::driver_map_ an absl::flat_hash_map

* perf: make asar::Archive::external_files_ an absl::flat_hash_map

* perf: make VersionIdMap an absl::flat_hash_map

* perf: make ObjectCache::proxy_map_ an absl::flat_hash_map

* docs: add TODO to investigate absl map in KeyWeakMap
2025-03-24 10:09:14 +01:00
Shelley Vohr
964090d086 fix: ensure TraverseParent bails on resource path exit (#46100)
* fix: ensure TraverseParent bails on resource path exit

* Address review changes
2025-03-24 10:06:59 +01:00
Erik Moura
e9082ea57a docs: fix capitalization for InputEvent.modifiers (#46130) 2025-03-23 16:38:15 -05:00
Charles Kerr
5623c96dd7 refactor: remove unused field ServiceWorkerMain::weak_factory_ (#46171)
refactor: remove unused field ServiceWorkerMain::weak_factory_

Added in a467d06, appears to have never been used
2025-03-23 10:14:45 +01:00
Charles Kerr
3fd35abe98 refactor: remove unused method ElectronBrowserContext::GetWeakPtr() (#46170)
* refactor: use forward declaration of MediaDeviceIDSalt in electron_browser_context.h

* refactor: remove unused #include from browser_context.h

* refactor: remove unused ElectronBrowserContext::GetWeakPtr()

last use removed in Aug 2020 by bac2f46
2025-03-22 10:15:15 -05:00
Charles Kerr
a81e11d9de refactor: use = default to define trivial destructors (#46165)
refactor: use '= default' to define trivial destructors
2025-03-21 16:15:34 -05:00
John Kleinschmidt
db47267be4 build: Use windows src cache (#45881)
build: use source cache on windows
2025-03-21 14:45:08 -04:00
Charles Kerr
6723bfbe32 refactor: reduce coupling in electron::api::Protocol (#46122)
* refactor: decouple api::Protocol from ElectronBrowserContext

now they do not know about each other

* refactor: make electron::api::ProtocolError private

* refactor: remove unused isolate arg in Protocol constructor

* refactor: use =default for trivial destructor
2025-03-21 07:33:25 -05:00
Shelley Vohr
603057b198 fix: remove File.path from types (#46005) 2025-03-21 08:40:49 +01:00
Shelley Vohr
9ccc63d682 fix: add missing cpp_heap to Node.js worker CreateParams (#46104) 2025-03-21 08:40:28 +01:00
LZL
4d7161f36e feat: add ffmpeg.dll to delay load configuration (#46151)
feat: set ffmpeg.dll as a delay-loaded DLL

Updated the /DELAYLOAD linker config in BUILD.gn to set ffmpeg.dll
as a delay-loaded DLL. This reduces startup overhead and prevents unnecessary
loading when ffmpeg-related functionality is not used (e.g., the browser process
was unnecessarily loading it).
2025-03-21 16:24:34 +09:00
Shelley Vohr
32141eacfb refactor: use upstream Widget::IsVisibleOnAllWorkspaces() (#45887)
* refactor: use upstream Widget::IsVisibleOnAllWorkspaces()

* chore: add to breaking changes
2025-03-20 23:43:47 -05:00
Charles Kerr
1b5db9989e refactor: make URLPipeLoader private (#46113)
Move the URLPipeLoader class into an anonymous namespace in
electron_url_loader_factory.cc.
2025-03-20 15:47:47 -05:00
Charles Kerr
46967ca9c9 refactor: Add ElectronBrowserContext::BrowserContexts() (#46089)
* refactor: add ElectronBrowserContext::BrowserContexts()

* refactor: use ElectronBrowserContext::BrowserContexts() in ElectronBrowserMainParts::PostMainMessageLoopRun()

* refactor: use ElectronBrowserContext::BrowserContexts() in ElectronExtensionsBrowserClient::IsValidContext()

* refactor: use ElectronBrowserContext::BrowserContexts() in ElectronExtensionsBrowserClient::BroadcastEventToRenderers()

* refactor: move PartitionKey, BrowserContextMap private

* refactor: add ElectronBrowserContext::IsValidContext()

decouple ElectronExtensionsBrowserClient from the internals of ElectronBrowserContext
2025-03-20 11:17:26 -05:00
Charles Kerr
273baf4ec2 refactor: use base::NumberToString() (#46141)
base::NumberToString() is slightly more efficient than
absl::StrFormat("%u").
2025-03-20 10:13:28 +01:00
Charles Kerr
c4800d9934 refactor: remove ToV8(isolate, const char*) (#46108) 2025-03-20 10:04:50 +01:00
Shelley Vohr
86cc9f626f fix: APNS token ids are lowercase ASCII (#46101) 2025-03-20 07:57:50 +01:00
Shelley Vohr
09a3bcf0f0 fix: webContents.print() crash on Linux (#46087) 2025-03-20 06:41:00 +01:00
Shelley Vohr
bf64967b68 build: combine pipewire patches (#46129) 2025-03-19 23:26:06 -05:00
Niklas Wenzel
bf1d377e08 docs: use optional chaining for app.dock (#46119)
docs: use optional chaining for app.dock
2025-03-19 18:34:03 -05:00
Shelley Vohr
d424c3aee7 test: disable parallel/test-worker-resource-limits (#46105)
test: disable parallel/test-worker-resource-limits
2025-03-19 22:03:26 +01:00
Niklas Wenzel
e4d660af86 docs: fix code example in breaking-changes.md (#46093) 2025-03-19 11:20:22 +01:00
Shelley Vohr
2efd75e2ca build: fail for out of date patches on forks (#46080) 2025-03-19 10:05:51 +01:00
electron-roller[bot]
b13f05e2dc chore: bump chromium to 136.0.7067.0 (main) (#46018)
* chore: bump chromium in DEPS to 136.0.7066.0

* chore: bump chromium in DEPS to 136.0.7067.0

* 6325710: [LNA] Add Local Network Access permission type

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

* 6342514: Create frame mojo endpoints in renderer during window.open()

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

* 6344040: Create widget mojo endpoints in renderer process for window.open()

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

* chore: update patches

* 6349218: Move ExtensionService::install_directory() to ExtensionRegistrar

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

* 6349395: Move ExtensionService::extensions_enabled() to ExtensionRegistrar

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

* 6331510: Migrate views::Background class to ui::ColorVariant | https://chromium-review.googlesource.com/c/chromium/src/+/6331510

* build: reorder set-cookie step https://github.com/electron/electron/pull/46091

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: alice <alice@makenotion.com>
2025-03-18 19:20:54 -04:00
Shelley Vohr
dcbab692c0 test: fix app.dock for corrected type (#46110)
test: fix app.dock for corrected type
2025-03-18 17:44:39 -04:00
Niklas Wenzel
71f3ff6bf2 docs: fix types of app.dock (#46073) 2025-03-18 13:14:08 +01:00
Alice Zhao
ff0a14a7c6 build: move set chromium cookie before build tools step (#46091)
build: move set cookie before build tools
2025-03-18 10:07:05 +01:00
Charles Kerr
4bf99c9bea refactor: add ElectronBrowserContext::GetDefaultBrowserContext() (#46065)
* refactor: add ElectronBrowserContext::DestroyAllContexts()

Simpler semantics than previous implementation; also hides the
"default context must be destroyed last" implementation detail.

* refactor: add ElectronBrowserContext::GetDefaultBrowserContext()

clearer semantics than everyone calling From("", false)
2025-03-17 08:43:23 -05:00
Charles Kerr
9513486bf3 refactor: use GetDefaultStoragePartition() instead of GetStoragePartition(nullptr) (#46064)
refactor: use GetDefaultStoragePartition()

Use GetDefaultStorageParition() instead of GetStoragePartition(nullptr)

- It improves code uniformity, since we use get-default everywhere else
- It's more readable
- It's marginally faster, since GetStoragePartition() has more steps

Added in 49b0a1bf4a
2025-03-17 08:39:55 -05:00
Charles Kerr
bea7d618f1 fix: warning in file picker UI (#46067) 2025-03-16 20:49:15 -05:00
Charles Kerr
4ad20ccb39 chore: e patches all (#46068) 2025-03-16 14:04:01 -05:00
Charles Kerr
73a017577e perf: avoid redundant map lookup in ElectronBrowserContext::From() (#46044)
perf: avoid redundant map lookup in ElectronBrowserContext::FromPath()
2025-03-15 09:51:20 -05:00
Shelley Vohr
2d8a547692 build: fix compound bash conditional in patchup (#46047) 2025-03-15 09:57:59 +01:00
Charles Kerr
5f0603ed28 fix: ElectronBrowserContext raw_ptr bug + remove dead code (#46030)
refactor: remove unused ElectronBrowserContext::extension_system()

Last use removed on Jul 21, 2020 by 2fb14f5 in PR #24575

This fixes a raw_ptr warning by letting us remove the raw_ptr field
`ElectronBrowserContext::extension_system_`.
2025-03-14 23:35:10 -05:00
Sam Maddock
afca4e271e feat: ServiceWorkerMain.scriptURL (#45863)
feat: serviceWorker.scriptURL
2025-03-14 21:00:13 -04:00
Charles Kerr
30d2fadb28 refactor: replace base::StringPrintf() calls with absl::StrFormat() (#46024)
The former is now a pass-through for the latter and is slated for removal

Xref: https://issues.chromium.org/issues/40241565

https://chromium-review.googlesource.com/c/chromium/src/+/4907781
2025-03-14 17:14:32 -05:00
Charles Kerr
3271b82094 refactor: remove unused system header includes (#46015)
* chore: remove unused #include <string>

* chore: remove unused #include <optional>

* chore: remove unused #include <vector>

* chore: remove unused #include <string_view>

* chore: remove unused #include <memory>

* chore: remove unused #include <utility>

* chore: remove unused #include <tuple>

* chore: remove unused #include <unordered_set>

* chore: remove unused #include <functional>

* chore: iwyu <set>

* chore: iwyu <map>
2025-03-14 10:59:15 -05:00
Shelley Vohr
c0e180758b fix: don't crash Utility Processes on unhandled rejections (#45921)
* fix: don't crash on unhandled rejections

* Update docs/breaking-changes.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-03-14 09:09:02 -05:00
Shelley Vohr
5817d27429 fix: take Snapped status into account when showing a window (#46006) 2025-03-14 09:07:27 -05:00
Michaela Laurencin
4812b4e6c2 fix: prevent title change for within page navigation (#45981)
* fix: prevent title change for on page navigation

* add back and forward testing

* update Chromium comment

* remove errant script tag
2025-03-14 12:10:23 +01:00
Shelley Vohr
7c0b7b417b fix: emit context-menu event in Windows draggable regions (#45851)
fix: emit context-menu event in Windows draggable regions
2025-03-14 10:29:29 +01:00
Charles Kerr
785fe5f3b6 refactor: make a variadic gin_helper::internal::InvokeFactory() (#45988)
refactor: make a variadic gin_helper::internal::InvokeFactory()
2025-03-13 17:24:49 -05:00
Shelley Vohr
502a6b0166 build: roll sysroots again (#46016) 2025-03-13 16:28:53 -05:00
Shelley Vohr
4a28e60e89 fix: package import existence verification (#45997) 2025-03-13 14:51:43 -05:00
Shelley Vohr
a90d50e13f fix: don't crash Web Workers on unhandled rejections (#45992) 2025-03-13 13:09:23 -05:00
electron-roller[bot]
962d8b325a chore: bump chromium to 136.0.7064.0 (main) (#45985)
* chore: bump chromium in DEPS to 136.0.7063.0

* chore: bump chromium in DEPS to 136.0.7064.0

* 6169919: Instantiate Linux (or CrOS) system fonts using Fontations

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

* 6341209: Remove file-wide unsafe buffer suppression from content/ [1 of N].

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

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-03-13 12:02:06 -05:00
Charles Kerr
c813bc2a92 refactor: use private inheritance from mojo::MessageReceiver (#45973)
* refactor: make UtilityProcessWrapper inherit privately from mojo::MessageReceiver

* refactor: make ParentPort inherit privately from mojo::MessageReceiver

* refactor: make MessagePort inherit privately from mojo::MessageReceiver
2025-03-12 19:06:41 +01:00
Shelley Vohr
5ce41bac8d fix: system-context-menu should only fire in draggable regions (#45893)
fix: system-context-menu should only fire in draggable regions
2025-03-12 13:47:58 +01:00
David Sanders
6bc7bde229 ci: don't fail branch created workflow if previous board not found (#45986) 2025-03-12 09:27:40 +01:00
electron-roller[bot]
2de8fd7d93 chore: bump chromium to 136.0.7062.0 (main) (#45957)
* chore: bump chromium in DEPS to 136.0.7059.0

* chore: bump chromium in DEPS to 136.0.7060.0

* chore: bump chromium in DEPS to 136.0.7062.0

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2025-03-11 17:44:08 -04:00
Shelley Vohr
dcd319cfbe build: roll sysroots to pick up glibc fix (#45974) 2025-03-11 17:31:48 -04:00
Shelley Vohr
cd56b96544 refactor: remove usage of V8's {Attach|Detach}CppHeap() (#45922)
* refactor: remove usage of V8's {Attach|Detach}CppHeap()

* chore: remove revert patch
2025-03-11 18:54:33 +01:00
Charles Kerr
22262c14f1 test: fix timing issue in utilityProcess test fixtures (#45964)
* fix: potential timing issue in utilityProcess test

* fix: potential timing issue in utilityProcess esm test
2025-03-11 17:41:42 +01:00
dependabot[bot]
6e056709be build(deps): bump github/codeql-action from 3.28.10 to 3.28.11 (#45970)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.10 to 3.28.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b56ba49b26...6bb031afdd)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 10:44:00 -05:00
dependabot[bot]
2f63b20acf build(deps): bump dsanders11/project-actions from 1.5.2 to 1.7.0 (#45969)
Bumps [dsanders11/project-actions](https://github.com/dsanders11/project-actions) from 1.5.2 to 1.7.0.
- [Release notes](https://github.com/dsanders11/project-actions/releases)
- [Changelog](https://github.com/dsanders11/project-actions/blob/main/.releaserc.json)
- [Commits](7fc3c5441a...2134fe7cc7)

---
updated-dependencies:
- dependency-name: dsanders11/project-actions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 10:43:46 -05:00
Felix Rieseberg
eb126eecb0 docs: Add 'Native Code and Electron' (#45882)
* docs: Add 'Native Code and Electron'

* docs: Add node-gyp requirements

* Update docs/tutorial/native-code-and-electron.md

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

* Cross-platform clean command

* Mention napi-rs

* Apply suggestions from code review

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

* Fix lint, fix more comments

* Apply suggestions from code review

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

---------

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2025-03-10 13:45:33 -07:00
Shelley Vohr
4e1a915f1a build: remove patches merged upstream (#45963) 2025-03-10 20:00:28 +01:00
Charles Kerr
f2b09ff0bd fix: remove redundant MediaCaptureDevicesDispatcher::GetInstance() call (#45929)
fix: remove redundant MediaCaptureDevicesDispatcher::GetInstance() call

This appears to be a copy-paste error introduced in 465dee2c
2025-03-10 09:44:24 -05:00
electron-roller[bot]
b0c11371e0 chore: bump chromium to 136.0.7058.1 (main) (#45928)
* chore: bump chromium in DEPS to 136.0.7056.0

* chore: update mas_avoid_private_macos_api_usage.patch.patch

no manual changes; patch applied with fuzz

* chore: update fix_adapt_exclusive_access_for_electron_needs.patch

patch applied manually due to context shear

6319958: [FS] Replace GURL with url::Origin for Excluisve Access Bubble | https://chromium-review.googlesource.com/c/chromium/src/+/6319958

* chore: update feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch

no manual changes; patch applied with fuzz

6311876: Expose captured surface resolution for MacOS | https://chromium-review.googlesource.com/c/chromium/src/+/6311876

* chore: e patches all

* 6319958: [FS] Replace GURL with url::Origin for Excluisve Access Bubble | https://chromium-review.googlesource.com/c/chromium/src/+/6319958

* 6326673: views: Delete the single-parameter Widget::InitParams constructor. | https://chromium-review.googlesource.com/c/chromium/src/+/6326673

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

* 6331102: [A11yPerformance] Rename AXMode::kScreenReader to kExtendedProperties | https://chromium-review.googlesource.com/c/chromium/src/+/6331102

Sync with shell/browser/ui/webui/accessibility_ui.cc to
upstream chrome/browser/accessibility/accessibility_ui.cc
changes in 4af8657

* chore: bump Chromium 136.0.7058.1 (#45933)

chore: bump chromium in DEPS to 136.0.7058.1

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-10 00:30:34 -05:00
Samuel Attard
9b2e7db469 chore: cherry-pick 9dacf5694dfd from chromium (#45936) 2025-03-09 16:26:06 -07:00
Samuel Attard
f04c06a0db chore: cherry-pick 521faebc8a7c from chromium (#45941) 2025-03-09 16:23:04 -07:00
Charles Kerr
8ac061ebe7 fix: race condition in utilityProcess tests (#45926) 2025-03-09 17:37:35 -05:00
Milan Burda
b30f31e1f6 refactor: eliminate duplicate code in spec/api-process-spec.ts (#45927) 2025-03-09 17:37:14 -05:00
Charles Kerr
288ef37b1d perf: prefer base::SplitStringPiece() over base::SplitString() (#45924)
* perf: use base::SplitStringPiece() in SetNodeOptions()

* perf: use base::SplitStringPiece() in StringToAccelerator()

* refactor: StringToAccelerator() now takes a std::string_view
2025-03-09 17:36:13 -05:00
electron-roller[bot]
20414f66ca chore!: bump chromium to 136.0.7054.0 (main) (#45923)
* chore: bump chromium in DEPS to 136.0.7054.0

* chore: update allow_in-process_windows_to_have_different_web_prefs.patch

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

patch applied manually due to context shear

* chore: e patches all

* refactor!: Session.clearStorageData(syncable)

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

Remove syncable type from opts.quota in Session.clearStorageData(opts)
because it that category has been removed upstream.

BREAKING CHANGE: Removed ses.clearDataStorage({ quota: 'syncable' })

* docs: deprecate Session.clearDataStorage({ quota })

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-07 17:49:21 -06:00
electron-roller[bot]
458b14b8ed chore: bump chromium to 136.0.7053.1 (main) (#45906)
* chore: bump chromium in DEPS to 136.0.7052.0

* chore: update mas_avoid_private_macos_api_usage.patch.patch

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

patch applied manually due to context shear

* chore: update preconnect_manager.patch

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

patch applied manually due to context shear

* chore: e patches all

* chore: bump chromium to 136.0.7053.1

* chore: update fix_remove_profiles_from_spellcheck_service.patch

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

patch applied manually due to context shear

* chore: e patches all

* chore: revert removal of v8 API used by Node.js

* devtools: Remove DevToolsUIBindings::SendJsonRequest() | https://chromium-review.googlesource.com/c/chromium/src/+/6326236

* 6244461: Merge //content/common/user_agent.cc into //components/embedder_support:user_agent | https://chromium-review.googlesource.com/c/chromium/src/+/6244461

* 6313744: Migrate views::Background factory methods to ColorVariant | https://chromium-review.googlesource.com/c/chromium/src/+/6313744

* 6314545: Remove multiple argument support from base::ToString() | https://chromium-review.googlesource.com/c/chromium/src/+/6314545

* 6317362: [Extensions] Inline MessagingDelegate::CreateReceiverForTab() | https://chromium-review.googlesource.com/c/chromium/src/+/6317362

* 6308998: Add SettingAccess structured metrics event for DevTools | https://chromium-review.googlesource.com/c/chromium/src/+/6308998

* 6295214: Remove redundant state field in per-extension preferences | https://chromium-review.googlesource.com/c/chromium/src/+/6295214

NB: this change is copied from the upstream change to extensions/shell/browser/shell_extension_loader.cc

* fix: ui/ linter error

This is showing up in an eslint build step in Electron:

> /__w/electron/electron/src/out/Default/gen/ui/webui/resources/cr_elements/preprocessed/cr_menu_selector/cr_menu_selector.ts
>   77:23  error  This assertion is unnecessary since the receiver accepts the original type of the expression  @typescript-eslint/no-unnecessary-type-assertion
>
> ✖ 1 problem (1 error, 0 warnings)
>   1 error and 0 warnings potentially fixable with the `--fix` option.

However, removing the assertion causes a typescript build failure:

> gen/ui/webui/resources/cr_elements/preprocessed/cr_menu_selector/cr_menu_selector.ts:77:23 - error TS2345: Argument of type 'HTMLElement | null' is not assignable to parameter of type 'HTMLElement'.
>   Type 'null' is not assignable to type 'HTMLElement'.
>
> 77         items.indexOf(this.querySelector<HTMLElement>(':focus'));
>                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So I think the two different steps may be picking up typescript definitions.

This patch should be removed after the issue is tracked down
and fixed in a followup task.

* fix: -Wnonnull warning

Fixes this warning:

> 2025-03-07T01:05:01.8637705Z ../../third_party/electron_node/src/debug_utils.cc(257,12): error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
> 2025-03-07T01:05:01.8638267Z   257 |     return nullptr;
> 2025-03-07T01:05:01.8638481Z       |            ^~~~~~~
> 2025-03-07T01:05:01.8638700Z 1 error generated.

Not sure why this warning was never triggered before; `git blame`
indicates this code hasn't changed in ages:

> c40a8273ef2 (Michaël Zasso    2024-05-10 09:50:20 +0200 255) #endif  // DEBUG
> 8e2d33f1562 (Anna Henningsen  2018-06-07 16:54:29 +0200 256)     }
> 247b5130595 (Refael Ackermann 2018-10-22 15:07:00 -0400 257)     return nullptr;
> 247b5130595 (Refael Ackermann 2018-10-22 15:07:00 -0400 258)   }

Presumably this is failing in this Chromium roll due to a
clang version bump.

We should remove this patch after upstreaming it.

* docs: add upstream pr link for Node patch

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-07 11:35:59 -06:00
Robo
530ccfe350 fix: resolve font list in default prefernce values (#45905)
* fix: resolve font list in default prefernce values

* chore: fix unsafe buffer usage

* docs: add code comment
2025-03-07 18:22:03 +09:00
Robo
041ada1586 build: match upstream with unsafe buffer paths (#45853)
* build: match upstream with unsafe buffer paths

* Don't assume STL iterators are pointers

Refs https://issues.chromium.org/issues/328308661

* chore: spanify process_singleton_win.cc
2025-03-06 16:04:18 -05:00
yangllu
d987bee007 fix: javascript heap OOM is not raised (#45895)
fix: javascript heap oom is not raised in node::OOMErrorHandler

node::OOMErrorHandler terminates the process directly without raising an
oom exception. To fix it, set an oom handler into node from electron.
2025-03-06 17:34:19 +01:00
Erick Zhao
431a791a99 chore: emphasize documentation style guide (#45639)
docs: emphasize documentation style guide
2025-03-06 17:17:06 +01:00
dependabot[bot]
9441cf4627 build(deps): bump dsanders11/project-actions from 1.5.1 to 1.5.2 (#45901)
Bumps [dsanders11/project-actions](https://github.com/dsanders11/project-actions) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/dsanders11/project-actions/releases)
- [Changelog](https://github.com/dsanders11/project-actions/blob/main/.releaserc.json)
- [Commits](9c80cd31f5...7fc3c5441a)

---
updated-dependencies:
- dependency-name: dsanders11/project-actions
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 16:38:31 +01:00
Charles Kerr
bb1c3dff21 chore: bump chromium to 135.0.7049.7 (main) (#45900)
chore: bump chromium in DEPS to 135.0.7049.7
2025-03-05 16:36:52 -05:00
303 changed files with 3390 additions and 4883 deletions

View File

@@ -1,4 +1,5 @@
{
"name": "Electron Core Development Environment",
"dockerComposeFile": "docker-compose.yml",
"service": "buildtools",
"onCreateCommand": ".devcontainer/on-create-command.sh",
@@ -33,27 +34,15 @@
"surajbarkale.ninja",
"ms-vscode.cpptools",
"mutantdino.resourcemonitor",
"dsanders11.vscode-electron-build-tools",
"dbaeumer.vscode-eslint",
"shakram02.bash-beautify",
"marshallofsound.gnls-electron",
"marshallofsound.gnls-electron"
],
"settings": {
"editor.tabSize": 2,
"bashBeautify.tabSize": 2,
"typescript.tsdk": "node_modules/typescript/lib",
"[gn]": {
"editor.formatOnSave": true
},
"[javascript]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
},
"[typescript]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
},
"javascript.preferences.quoteStyle": "single",
"typescript.preferences.quoteStyle": "single"
}

View File

@@ -73,7 +73,7 @@ body:
- type: input
attributes:
label: Testcase Gist URL
description: If you can reproduce the issue in a standalone test case, please use [Electron Fiddle](https://github.com/electron/fiddle) to create one and to publish it as a [GitHub gist](https://gist.github.com) and put the gist URL here. This is **the best way** to ensure this issue is triaged quickly.
description: Electron maintainers need a standalone test case to reproduce and fix your issue. Please use [Electron Fiddle](https://github.com/electron/fiddle) to create one and to publish it as a [GitHub gist](https://gist.github.com). Then put the gist URL here. Issues without testcase gists receive less attention and might be closed without a maintainer taking a closer look. To maximize how much attention your issue receives, please include a testcase gist right from the start.
placeholder: https://gist.github.com/...
- type: textarea
attributes:

View File

@@ -11,10 +11,9 @@ runs:
git config --global core.autocrlf false
git config --global branch.autosetuprebase always
git config --global core.fscache true
git config --global core.longpaths true
git config --global core.preloadindex true
fi
export BUILD_TOOLS_SHA=6e8526315ea3b4828882497e532b8340e64e053c
export BUILD_TOOLS_SHA=f2a960b4d82e6b5c9dbbd437378a39489f399c50
npm i -g @electron/build-tools
# Update depot_tools to ensure python
e d update_depot_tools

View File

@@ -96,7 +96,7 @@ runs:
$TEMP_DIR=New-Item -ItemType Directory -Path temp-cache
$TEMP_DIR_PATH = $TEMP_DIR.FullName
C:\ProgramData\Chocolatey\bin\7z.exe -y -snld x $src_cache -o"$TEMP_DIR_PATH"
C:\ProgramData\Chocolatey\bin\7z.exe -y x $src_cache -o"$TEMP_DIR_PATH"
- name: Move Src Cache (Windows)
if: ${{ inputs.target-platform == 'win' }}

View File

@@ -13,7 +13,7 @@ jobs:
with:
fetch-depth: 0
- name: Setup Node.js/npm
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 20.19.x
- name: Setting Up Dig Site
@@ -41,7 +41,7 @@ jobs:
sha-file: .dig-old
filename: electron.old.d.ts
- name: Upload artifacts
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #v4.6.1
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
with:
name: artifacts
path: electron/artifacts

View File

@@ -94,7 +94,7 @@ jobs:
}))
- name: Create Release Project Board
if: ${{ steps.check-major-version.outputs.MAJOR }}
uses: dsanders11/project-actions/copy-project@9c80cd31f58599941c64f74636bea95ba5d46090 # v1.5.1
uses: dsanders11/project-actions/copy-project@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
id: create-release-board
with:
drafts: true
@@ -114,14 +114,15 @@ jobs:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: Find Previous Release Project Board
if: ${{ steps.check-major-version.outputs.MAJOR }}
uses: dsanders11/project-actions/find-project@9c80cd31f58599941c64f74636bea95ba5d46090 # v1.5.1
uses: dsanders11/project-actions/find-project@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
id: find-prev-release-board
with:
fail-if-project-not-found: false
title: ${{ steps.generate-project-metadata.outputs.prev-prev-major }}-x-y
token: ${{ steps.generate-token.outputs.token }}
- name: Close Previous Release Project Board
if: ${{ steps.check-major-version.outputs.MAJOR }}
uses: dsanders11/project-actions/close-project@9c80cd31f58599941c64f74636bea95ba5d46090 # v1.5.1
if: ${{ steps.find-prev-release-board.outputs.number }}
uses: dsanders11/project-actions/close-project@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
with:
project-number: ${{ steps.find-prev-release-board.outputs.number }}
token: ${{ steps.generate-token.outputs.token }}

View File

@@ -20,7 +20,7 @@ jobs:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
org: electron
- name: Set status
uses: dsanders11/project-actions/edit-item@9c80cd31f58599941c64f74636bea95ba5d46090 # v1.5.1
uses: dsanders11/project-actions/edit-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
with:
token: ${{ steps.generate-token.outputs.token }}
project-number: 90
@@ -39,7 +39,7 @@ jobs:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
org: electron
- name: Set status
uses: dsanders11/project-actions/edit-item@9c80cd31f58599941c64f74636bea95ba5d46090 # v1.5.1
uses: dsanders11/project-actions/edit-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
with:
token: ${{ steps.generate-token.outputs.token }}
project-number: 90

View File

@@ -19,7 +19,7 @@ jobs:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
org: electron
- name: Add to Issue Triage
uses: dsanders11/project-actions/add-item@9c80cd31f58599941c64f74636bea95ba5d46090 # v1.5.1
uses: dsanders11/project-actions/add-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
with:
field: Reporter
field-value: ${{ github.event.issue.user.login }}

View File

@@ -19,7 +19,7 @@ jobs:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
org: electron
- name: Remove from issue triage
uses: dsanders11/project-actions/delete-item@9c80cd31f58599941c64f74636bea95ba5d46090 # v1.5.1
uses: dsanders11/project-actions/delete-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
with:
token: ${{ steps.generate-token.outputs.token }}
project-number: 90

View File

@@ -30,7 +30,7 @@ jobs:
org: electron
- name: Set status
if: ${{ steps.check-for-blocked-labels.outputs.NOT_BLOCKED }}
uses: dsanders11/project-actions/edit-item@9c80cd31f58599941c64f74636bea95ba5d46090 # v1.5.1
uses: dsanders11/project-actions/edit-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
with:
token: ${{ steps.generate-token.outputs.token }}
project-number: 90

View File

@@ -102,7 +102,7 @@ jobs:
run: df -h
- name: Setup Node.js/npm
if: ${{ inputs.target-platform == 'macos' }}
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 20.19.x
cache: yarn

View File

@@ -79,7 +79,7 @@ jobs:
cp "C:\Python311\python.exe" "C:\Python311\python3.exe"
- name: Setup Node.js/npm
if: ${{ inputs.target-platform == 'win' }}
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 20.19.x
- name: Add TCC permissions on macOS
@@ -103,7 +103,6 @@ jobs:
"'kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
"'kTCCServiceCamera','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
"'kTCCServiceBluetoothAlways','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
"'kTCCServiceAppleEvents','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
)
for values in "${userValuesArray[@]}"; do
# Sonoma and higher have a few extra values
@@ -136,7 +135,6 @@ jobs:
git config --global core.autocrlf false
git config --global branch.autosetuprebase always
git config --global core.fscache true
git config --global core.longpaths true
git config --global core.preloadindex true
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
# Ensure depot_tools does not update.
@@ -151,12 +149,12 @@ jobs:
echo "DISABLE_CRASH_REPORTER_TESTS=true" >> $GITHUB_ENV
echo "IS_ASAN=true" >> $GITHUB_ENV
- name: Download Generated Artifacts
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: generated_artifacts_${{ env.ARTIFACT_KEY }}
path: ./generated_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
- name: Download Src Artifacts
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: src_artifacts_${{ env.ARTIFACT_KEY }}
path: ./src_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
@@ -251,7 +249,7 @@ jobs:
if: always() && !cancelled()
- name: Upload Test Artifacts
if: always() && !cancelled()
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: test_artifacts_${{ env.ARTIFACT_KEY }}_${{ matrix.shard }}
path: src/electron/spec/artifacts

View File

@@ -61,12 +61,12 @@ jobs:
- name: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Download Generated Artifacts
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
- name: Download Src Artifacts
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}
@@ -115,12 +115,12 @@ jobs:
- name: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Download Generated Artifacts
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
- name: Download Src Artifacts
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}

View File

@@ -33,7 +33,7 @@ jobs:
creds: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
org: electron
- name: Set status
uses: dsanders11/project-actions/edit-item@9c80cd31f58599941c64f74636bea95ba5d46090 # v1.5.1
uses: dsanders11/project-actions/edit-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
with:
token: ${{ steps.generate-token.outputs.token }}
project-number: 94

View File

@@ -42,7 +42,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: SARIF file
path: results.sarif
@@ -50,6 +50,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
with:
sarif_file: results.sarif

View File

@@ -27,7 +27,7 @@ jobs:
PROJECT_NUMBER=$(gh project list --owner electron --format json | jq -r '.projects | map(select(.title | test("^[0-9]+-x-y$"))) | max_by(.number) | .number')
echo "PROJECT_NUMBER=$PROJECT_NUMBER" >> "$GITHUB_OUTPUT"
- name: Update Completed Stable Prep Items
uses: dsanders11/project-actions/completed-by@9c80cd31f58599941c64f74636bea95ba5d46090 # v1.5.1
uses: dsanders11/project-actions/completed-by@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
with:
field: Prep Status
field-value: ✅ Complete

View File

@@ -17,19 +17,19 @@ import("//tools/grit/repack.gni")
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
import("//v8/gni/snapshot_toolchain.gni")
import("build/asar.gni")
import("build/electron_paks.gni")
import("build/extract_symbols.gni")
import("build/js2c_toolchain.gni")
import("build/npm.gni")
import("build/templated_file.gni")
import("build/tsc.gni")
import("build/webpack/webpack.gni")
import("buildflags/buildflags.gni")
import("electron_paks.gni")
import("filenames.auto.gni")
import("filenames.gni")
import("filenames.hunspell.gni")
import("filenames.libcxx.gni")
import("filenames.libcxxabi.gni")
import("js2c_toolchain.gni")
if (is_mac) {
import("//build/config/mac/rules.gni")
@@ -314,7 +314,7 @@ asar("default_app_asar") {
}
grit("resources") {
source = "electron_resources.grd"
source = "build/electron_resources.grd"
outputs = [
"grit/electron_resources.h",

2
DEPS
View File

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'136.0.7103.177',
'138.0.7204.97',
'node_version':
'v22.17.0',
'nan_version':

View File

@@ -1,8 +1,8 @@
{
"plugins": [
"import"
"unicorn"
],
"rules": {
"import/enforce-node-protocol-usage": ["error", "always"]
"unicorn/prefer-node-protocol": "error"
}
}

View File

@@ -2,7 +2,7 @@ is_electron_build = true
root_extra_deps = [ "//electron" ]
# Registry of NMVs --> https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
node_module_version = 135
node_module_version = 136
v8_promise_internal_field_count = 1
v8_embedder_string = "-electron.0"
@@ -73,5 +73,3 @@ enterprise_cloud_content_analysis = false
# TODO: remove dependency on legacy ipc
# https://issues.chromium.org/issues/40943039
content_enable_legacy_ipc = true
clang_unsafe_buffers_paths = "//electron/electron_unsafe_buffers_paths.txt"

View File

@@ -85,6 +85,8 @@ static_library("chrome") {
"//chrome/browser/process_singleton.h",
"//chrome/browser/process_singleton_internal.cc",
"//chrome/browser/process_singleton_internal.h",
"//chrome/browser/serial/serial_blocklist.cc",
"//chrome/browser/serial/serial_blocklist.h",
"//chrome/browser/themes/browser_theme_pack.cc",
"//chrome/browser/themes/browser_theme_pack.h",
"//chrome/browser/themes/custom_theme_supplier.cc",
@@ -144,6 +146,8 @@ static_library("chrome") {
"//chrome/browser/ui/views/overlay/video_overlay_window_views.h",
"//chrome/browser/ui/webui/accessibility/accessibility_ui.cc",
"//chrome/browser/ui/webui/accessibility/accessibility_ui.h",
"//chrome/browser/usb/usb_blocklist.cc",
"//chrome/browser/usb/usb_blocklist.h",
"//extensions/browser/app_window/size_constraints.cc",
"//extensions/browser/app_window/size_constraints.h",
"//ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.cc",

View File

@@ -1,8 +1,8 @@
{
"plugins": [
"import"
"unicorn"
],
"rules": {
"import/enforce-node-protocol-usage": ["error", "always"]
"unicorn/prefer-node-protocol": "error"
}
}

View File

@@ -290,7 +290,7 @@ Specify ways of the inspector web socket url exposure.
By default inspector websocket url is available in stderr and under /json/list endpoint on `http://host:port/json/list`.
### `--experimental-network-inspector`
### `--experimental-network-inspection`
Enable support for devtools network inspector events, for visibility into requests made by the nodejs `http` and `https` modules.

View File

@@ -20,8 +20,14 @@ See [`Menu`](menu.md) for examples.
* `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).
* `type` string (optional) - Can be `normal`, `separator`, `submenu`, `checkbox` or
`radio`.
* `type` string (optional)
* `normal`
* `separator`
* `submenu`
* `checkbox`
* `radio`
* `header` - Only available on macOS 14 and up.
* `palette` - Only available on macOS 14 and up.
* `label` string (optional)
* `sublabel` string (optional) _macOS_ - Available in macOS >= 14.4
* `toolTip` string (optional) _macOS_ - Hover text for this menu item.
@@ -162,7 +168,10 @@ item's submenu, if present.
#### `menuItem.type`
A `string` indicating the type of the item. Can be `normal`, `separator`, `submenu`, `checkbox` or `radio`.
A `string` indicating the type of the item. Can be `normal`, `separator`, `submenu`, `checkbox`, `radio`, `header` or `palette`.
> [!NOTE]
> `header` and `palette` are only available on macOS 14 and up.
#### `menuItem.role`

View File

@@ -46,6 +46,10 @@ An [`IpcMainServiceWorker`](ipc-main-service-worker.md) instance scoped to the s
A `string` representing the scope URL of the service worker.
#### `serviceWorker.scriptURL` _Readonly_ _Experimental_
A `string` representing the script URL of the service worker.
#### `serviceWorker.versionId` _Readonly_ _Experimental_
A `number` representing the ID of the specific version of the service worker script in its scope.

View File

@@ -25,9 +25,8 @@
and URL responses.
* `method` string (optional) - The HTTP `method`. This is only used for file
and URL responses.
* `session` Session (optional) - The session used for requesting URL, by default
the HTTP request will reuse the current session. Setting `session` to `null`
would use a random independent session. This is only used for URL responses.
* `session` Session (optional) - The session used for requesting URL.
The HTTP request will reuse the current session by default.
* `uploadData` [ProtocolResponseUploadData](protocol-response-upload-data.md) (optional) - The data used as upload data. This is only
used for URL responses when `method` is `"POST"`.

View File

@@ -14,11 +14,54 @@ This document uses the following convention to categorize breaking changes:
## Planned Breaking API Changes (37.0)
### Utility Process unhandled rejection behavior change
Utility Processes will now warn with an error message when an unhandled
rejection occurs instead of crashing the process.
To restore the previous behavior, you can use:
```js
process.on('unhandledRejection', () => {
process.exit(1)
})
```
### Behavior Changed: `process.exit()` kills utility process synchronously
Calling `process.exit()` in a utility process will now kill the utility process synchronously.
This brings the behavior of `process.exit()` in line with Node.js behavior.
Please refer to the
[Node.js docs](https://nodejs.org/docs/latest-v22.x/api/process.html#processexitcode) and
[PR #45690](https://github.com/electron/electron/pull/45690) to understand the potential
implications of that, e.g., when calling `console.log()` before `process.exit()`.
### Behavior Changed: WebUSB and WebSerial Blocklist Support
[WebUSB](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API) and [Web Serial](https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API) now support the [WebUSB Blocklist](https://wicg.github.io/webusb/#blocklist) and [Web Serial Blocklist](https://wicg.github.io/serial/#blocklist) used by Chromium and outlined in their respective specifications.
To disable these, users can pass `disable-usb-blocklist` and `disable-serial-blocklist` as command line flags.
### Removed: `null` value for `session` property in `ProtocolResponse`
This deprecated feature has been removed.
Previously, setting the `ProtocolResponse.session` property to `null`
would create a random independent session. This is no longer supported.
Using single-purpose sessions here is discouraged due to overhead costs;
however, old code that needs to preserve this behavior can emulate it by
creating a random session with `session.fromPartition(some_random_string)`
and then using it in `ProtocolResponse.session`.
### Behavior Changed: `BrowserWindow.IsVisibleOnAllWorkspaces()` on Linux
`BrowserWindow.IsVisibleOnAllWorkspaces()` will now return false on Linux if the
window is not currently visible.
## Planned Breaking API Changes (36.0)
### Behavior Changes: `app.commandLine`
`app.commandLine` will convert upper-cases switches and arguments to lowercase.
@@ -40,9 +83,7 @@ bitmap = image.getBitmap()
bitmap = image.toBitmap()
```
## Planned Breaking API Changes (36.0)
### Removed:`isDefault` and `status` properties on `PrinterInfo`
### Removed: `isDefault` and `status` properties on `PrinterInfo`
These properties have been removed from the PrinterInfo Object
because they have been removed from upstream Chromium.
@@ -54,12 +95,6 @@ When calling `Session.clearStorageData(options)`, the `options.quota` type
[removed](https://chromium-review.googlesource.com/c/chromium/src/+/6309405)
from upstream Chromium.
### Deprecated: `quota` property in `Session.clearStorageData(options)`
When calling `Session.clearStorageData(options)`, the `options.quota`
property is deprecated. Since the `syncable` type was removed, there
is only type left -- `'temporary'` -- so specifying it is unnecessary.
### Deprecated: `null` value for `session` property in `ProtocolResponse`
Previously, setting the ProtocolResponse.session property to `null`
@@ -70,6 +105,12 @@ however, old code that needs to preserve this behavior can emulate it by
creating a random session with `session.fromPartition(some_random_string)`
and then using it in `ProtocolResponse.session`.
### Deprecated: `quota` property in `Session.clearStorageData(options)`
When calling `Session.clearStorageData(options)`, the `options.quota`
property is deprecated. Since the `syncable` type was removed, there
is only type left -- `'temporary'` -- so specifying it is unnecessary.
### Deprecated: Extension methods and events on `session`
`session.loadExtension`, `session.removeExtension`, `session.getExtension`,

View File

@@ -1,6 +1,12 @@
const { app, BrowserWindow, ipcMain } = require('electron/main')
const path = require('node:path')
function handleSetTitle (event, title) {
const webContents = event.sender
const win = BrowserWindow.fromWebContents(webContents)
win.setTitle(title)
}
function createWindow () {
const mainWindow = new BrowserWindow({
webPreferences: {
@@ -8,16 +14,11 @@ function createWindow () {
}
})
ipcMain.on('set-title', (event, title) => {
const webContents = event.sender
const win = BrowserWindow.fromWebContents(webContents)
win.setTitle(title)
})
mainWindow.loadFile('index.html')
}
app.whenReady().then(() => {
ipcMain.on('set-title', handleSetTitle)
createWindow()
app.on('activate', function () {

View File

@@ -57,7 +57,7 @@ the WebHID API:
### Blocklist
By default Electron employs the same [blocklist](https://github.com/WICG/webhid/blob/main/blocklist.txt)
By default Electron employs the same [blocklist](https://wicg.github.io/webhid/#blocklist)
used by Chromium. If you wish to override this behavior, you can do so by
setting the `disable-hid-blocklist` flag:
@@ -104,6 +104,16 @@ There are several additional APIs for working with the Web Serial API:
* [`ses.setPermissionCheckHandler(handler)`](../api/session.md#sessetpermissioncheckhandlerhandler)
can be used to disable serial access for specific origins.
### Blocklist
By default Electron employs the same [blocklist](https://wicg.github.io/serial/#blocklist)
used by Chromium. If you wish to override this behavior, you can do so by
setting the `disable-serial-blocklist` flag:
```js
app.commandLine.appendSwitch('disable-serial-blocklist')
```
### Example
This example demonstrates an Electron application that automatically selects
@@ -145,6 +155,16 @@ Electron provides several APIs for working with the WebUSB API:
* [`ses.setUSBProtectedClassesHandler](../api/session.md#sessetusbprotectedclasseshandlerhandler)
can be used to allow usage of [protected USB classes](https://wicg.github.io/webusb/#usbinterface-interface) that are not available by default.
### Blocklist
By default Electron employs the same [blocklist](https://wicg.github.io/webusb/#blocklist)
used by Chromium. If you wish to override this behavior, you can do so by
setting the `disable-usb-blocklist` flag:
```js
app.commandLine.appendSwitch('disable-usb-blocklist')
```
### Example
This example demonstrates an Electron application that automatically selects

View File

@@ -9,10 +9,11 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
| 37.0.0 | 2025-May-01 | 2025-May-28 | 2025-Jun-24 | 2026-Jan-13 | M138 | TBD | ✅ |
| 38.0.0 | 2025-Jun-26 | 2025-Aug-06 | 2025-Sep-02 | 2026-Mar-10 | M140 | TBD | ✅ |
| 37.0.0 | 2025-May-01 | 2025-May-28 | 2025-Jun-24 | 2026-Jan-13 | M138 | v22.16 | ✅ |
| 36.0.0 | 2025-Mar-06 | 2025-Apr-02 | 2025-Apr-29 | 2025-Oct-28 | M136 | v22.14 | ✅ |
| 35.0.0 | 2025-Jan-16 | 2025-Feb-05 | 2025-Mar-04 | 2025-Sep-02 | M134 | v22.14 | ✅ |
| 34.0.0 | 2024-Oct-17 | 2024-Nov-13 | 2025-Jan-14 | 2025-Jun-24 | M132 | v20.18 | |
| 34.0.0 | 2024-Oct-17 | 2024-Nov-13 | 2025-Jan-14 | 2025-Jun-24 | M132 | v20.18 | 🚫 |
| 33.0.0 | 2024-Aug-22 | 2024-Sep-18 | 2024-Oct-15 | 2025-Apr-29 | M130 | v20.18 | 🚫 |
| 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-14 | M126 | v20.14 | 🚫 |

View File

@@ -143,7 +143,7 @@ The `electron/electron` repository also enforces squash merging, so you only nee
## Historical versioning (Electron 1.X)
Electron versions _< 2.0_ did not conform to the [SemVer](https://semver.org) spec: major versions corresponded to end-user API changes, minor versions corresponded to Chromium major releases, and patch versions corresponded to new features and bug fixes. While convenient for developers merging features, it creates problems for developers of client-facing applications. The QA testing cycles of major apps like Slack, Teams, Skype, VS Code, and GitHub Desktop can be lengthy and stability is a highly desired outcome. There is a high risk in adopting new features while trying to absorb bug fixes.
Electron versions _< 2.0_ did not conform to the [SemVer](https://semver.org) spec: major versions corresponded to end-user API changes, minor versions corresponded to Chromium major releases, and patch versions corresponded to new features and bug fixes. While convenient for developers merging features, it creates problems for developers of client-facing applications. The QA testing cycles of major apps like Slack, Teams, VS Code, and GitHub Desktop can be lengthy and stability is a highly desired outcome. There is a high risk in adopting new features while trying to absorb bug fixes.
Here is an example of the 1.x strategy:

View File

@@ -44,7 +44,7 @@ Electron combines Chromium, Node.js, and the ability to write custom native code
### Enterprise-grade
Electron is reliable, secure, stable, and mature. It is the premier choice for companies building their flagship product. We have a list of some of those companies on our homepage, but just among chat apps, Slack, Discord, and Skype are built with Electron. Among AI applications, both OpenAIs ChatGPT and Anthropics Claude use Electron. Visual Studio Code, Loom, Canva, Notion, Docker, and countless other leading developers of software bet on Electron.
Electron is reliable, secure, stable, and mature. It is the premier choice for companies building their flagship product. We have a list of some of those companies on our homepage, but just among chat apps, Slack, Discord, and Signal are built with Electron. Among AI applications, both OpenAIs ChatGPT and Anthropics Claude use Electron. Visual Studio Code, Loom, Canva, Notion, Docker, and countless other leading developers of software bet on Electron.
We did make it a priority to make Electron easy to work with and a delight for developers. Thats likely the main reason why Electron became as popular as it is today — but what keeps Electron alive and thriving is the maintainers focus on making Electron as stable, secure, performant, and capable of mission-critical use cases for end users as possible. Were building an Electron that is ready to be used in scenarios where unfixable bugs, unpatched security holes, and outages of any kind are worst-case scenarios.

View File

@@ -1,35 +0,0 @@
# Copyright 2024 The Electron Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# The set of path prefixes that should be checked for unsafe buffer usage (see
# -Wunsafe-buffer-usage in Clang).
#
# ***
# Paths should be written as relative to the root of the source tree with
# unix-style path separators. Directory prefixes should end with `/`, such
# as `base/`.
# ***
#
# Files in this set are known to not use pointer arithmetic/subscripting, and
# make use of constructs like base::span or containers like std::vector instead.
#
# See `docs/unsafe_buffers.md`.
# These directories are excluded because they come from outside Electron and
# we don't have control over their contents.
-base/
-chrome/
-components/
-content/browser/indexed_db
-device/
-extensions/
-google_apis/
-net/
-services/
-skia/
-third_party/
-tools/
-ui/
-url/
-v8/

View File

@@ -65,6 +65,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__algorithm/next_permutation.h",
"//third_party/libc++/src/include/__algorithm/none_of.h",
"//third_party/libc++/src/include/__algorithm/nth_element.h",
"//third_party/libc++/src/include/__algorithm/out_value_result.h",
"//third_party/libc++/src/include/__algorithm/partial_sort.h",
"//third_party/libc++/src/include/__algorithm/partial_sort_copy.h",
"//third_party/libc++/src/include/__algorithm/partition.h",
@@ -341,7 +342,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__algorithm/all_of.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/any_of.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/binary_search.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/clamp.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/comp.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/comp_ref_type.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/copy.h",
@@ -361,19 +361,11 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__algorithm/find_if.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/find_if_not.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/find_segment_if.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/fold.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/for_each.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/for_each_n.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/for_each_segment.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/generate.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/generate_n.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/half_positive.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/in_found_result.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/in_fun_result.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/in_in_out_result.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/in_in_result.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/in_out_out_result.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/in_out_result.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/includes.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/inplace_merge.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/is_heap.h",
@@ -385,7 +377,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__algorithm/iter_swap.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/iterator_operations.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/lexicographical_compare.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/lexicographical_compare_three_way.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/lower_bound.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/make_heap.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/make_projected.h",
@@ -394,7 +385,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__algorithm/merge.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/min.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/min_element.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/min_max_result.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/minmax.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/minmax_element.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/mismatch.h",
@@ -410,99 +400,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__algorithm/partition_point.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/pop_heap.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/prev_permutation.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/pstl.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/push_heap.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_adjacent_find.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_all_of.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_any_of.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_binary_search.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_clamp.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_contains.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_contains_subrange.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_copy.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_copy_backward.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_copy_if.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_copy_n.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_count.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_count_if.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_ends_with.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_equal.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_equal_range.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_fill.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_fill_n.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_find.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_find_end.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_find_first_of.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_find_if.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_find_if_not.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_find_last.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_for_each.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_for_each_n.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_generate.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_generate_n.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_includes.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_inplace_merge.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_is_heap.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_is_heap_until.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_is_partitioned.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_is_permutation.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_is_sorted.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_is_sorted_until.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_iterator_concept.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_lexicographical_compare.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_lower_bound.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_make_heap.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_max.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_max_element.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_merge.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_min.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_min_element.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_minmax.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_minmax_element.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_mismatch.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_move.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_move_backward.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_next_permutation.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_none_of.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_nth_element.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_partial_sort.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_partial_sort_copy.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_partition.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_partition_copy.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_partition_point.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_pop_heap.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_prev_permutation.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_push_heap.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_remove.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_remove_copy.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_remove_copy_if.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_remove_if.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_replace.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_replace_copy.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_replace_copy_if.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_replace_if.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_reverse.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_reverse_copy.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_rotate.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_rotate_copy.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_sample.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_search.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_search_n.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_set_difference.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_set_intersection.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_set_symmetric_difference.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_set_union.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_shuffle.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_sort.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_sort_heap.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_stable_partition.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_stable_sort.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_starts_with.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_swap_ranges.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_transform.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_unique.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_unique_copy.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/ranges_upper_bound.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/remove.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/remove_copy.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/remove_copy_if.h",
@@ -515,15 +413,12 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__algorithm/reverse_copy.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/rotate.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/rotate_copy.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/sample.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/search.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/search_n.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/set_difference.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/set_intersection.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/set_symmetric_difference.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/set_union.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/shift_left.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/shift_right.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/shuffle.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/sift_down.h",
"//third_party/libc++/src/include/__cxx03/__algorithm/simd_utils.h",
@@ -547,7 +442,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__atomic/atomic_flag.h",
"//third_party/libc++/src/include/__cxx03/__atomic/atomic_init.h",
"//third_party/libc++/src/include/__cxx03/__atomic/atomic_lock_free.h",
"//third_party/libc++/src/include/__cxx03/__atomic/atomic_ref.h",
"//third_party/libc++/src/include/__cxx03/__atomic/atomic_sync.h",
"//third_party/libc++/src/include/__cxx03/__atomic/check_memory_order.h",
"//third_party/libc++/src/include/__cxx03/__atomic/contention_t.h",
@@ -557,100 +451,19 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__atomic/kill_dependency.h",
"//third_party/libc++/src/include/__cxx03/__atomic/memory_order.h",
"//third_party/libc++/src/include/__cxx03/__atomic/to_gcc_order.h",
"//third_party/libc++/src/include/__cxx03/__bit/bit_cast.h",
"//third_party/libc++/src/include/__cxx03/__bit/bit_ceil.h",
"//third_party/libc++/src/include/__cxx03/__bit/bit_floor.h",
"//third_party/libc++/src/include/__cxx03/__bit/bit_log2.h",
"//third_party/libc++/src/include/__cxx03/__bit/bit_width.h",
"//third_party/libc++/src/include/__cxx03/__bit/blsr.h",
"//third_party/libc++/src/include/__cxx03/__bit/byteswap.h",
"//third_party/libc++/src/include/__cxx03/__bit/countl.h",
"//third_party/libc++/src/include/__cxx03/__bit/countr.h",
"//third_party/libc++/src/include/__cxx03/__bit/endian.h",
"//third_party/libc++/src/include/__cxx03/__bit/has_single_bit.h",
"//third_party/libc++/src/include/__cxx03/__bit/invert_if.h",
"//third_party/libc++/src/include/__cxx03/__bit/popcount.h",
"//third_party/libc++/src/include/__cxx03/__bit/rotate.h",
"//third_party/libc++/src/include/__cxx03/__bit_reference",
"//third_party/libc++/src/include/__cxx03/__charconv/chars_format.h",
"//third_party/libc++/src/include/__cxx03/__charconv/from_chars_integral.h",
"//third_party/libc++/src/include/__cxx03/__charconv/from_chars_result.h",
"//third_party/libc++/src/include/__cxx03/__charconv/tables.h",
"//third_party/libc++/src/include/__cxx03/__charconv/to_chars.h",
"//third_party/libc++/src/include/__cxx03/__charconv/to_chars_base_10.h",
"//third_party/libc++/src/include/__cxx03/__charconv/to_chars_floating_point.h",
"//third_party/libc++/src/include/__cxx03/__charconv/to_chars_integral.h",
"//third_party/libc++/src/include/__cxx03/__charconv/to_chars_result.h",
"//third_party/libc++/src/include/__cxx03/__charconv/traits.h",
"//third_party/libc++/src/include/__cxx03/__chrono/calendar.h",
"//third_party/libc++/src/include/__cxx03/__chrono/concepts.h",
"//third_party/libc++/src/include/__cxx03/__chrono/convert_to_timespec.h",
"//third_party/libc++/src/include/__cxx03/__chrono/convert_to_tm.h",
"//third_party/libc++/src/include/__cxx03/__chrono/day.h",
"//third_party/libc++/src/include/__cxx03/__chrono/duration.h",
"//third_party/libc++/src/include/__cxx03/__chrono/exception.h",
"//third_party/libc++/src/include/__cxx03/__chrono/file_clock.h",
"//third_party/libc++/src/include/__cxx03/__chrono/formatter.h",
"//third_party/libc++/src/include/__cxx03/__chrono/hh_mm_ss.h",
"//third_party/libc++/src/include/__cxx03/__chrono/high_resolution_clock.h",
"//third_party/libc++/src/include/__cxx03/__chrono/leap_second.h",
"//third_party/libc++/src/include/__cxx03/__chrono/literals.h",
"//third_party/libc++/src/include/__cxx03/__chrono/local_info.h",
"//third_party/libc++/src/include/__cxx03/__chrono/month.h",
"//third_party/libc++/src/include/__cxx03/__chrono/month_weekday.h",
"//third_party/libc++/src/include/__cxx03/__chrono/monthday.h",
"//third_party/libc++/src/include/__cxx03/__chrono/ostream.h",
"//third_party/libc++/src/include/__cxx03/__chrono/parser_std_format_spec.h",
"//third_party/libc++/src/include/__cxx03/__chrono/statically_widen.h",
"//third_party/libc++/src/include/__cxx03/__chrono/steady_clock.h",
"//third_party/libc++/src/include/__cxx03/__chrono/sys_info.h",
"//third_party/libc++/src/include/__cxx03/__chrono/system_clock.h",
"//third_party/libc++/src/include/__cxx03/__chrono/time_point.h",
"//third_party/libc++/src/include/__cxx03/__chrono/time_zone.h",
"//third_party/libc++/src/include/__cxx03/__chrono/time_zone_link.h",
"//third_party/libc++/src/include/__cxx03/__chrono/tzdb.h",
"//third_party/libc++/src/include/__cxx03/__chrono/tzdb_list.h",
"//third_party/libc++/src/include/__cxx03/__chrono/weekday.h",
"//third_party/libc++/src/include/__cxx03/__chrono/year.h",
"//third_party/libc++/src/include/__cxx03/__chrono/year_month.h",
"//third_party/libc++/src/include/__cxx03/__chrono/year_month_day.h",
"//third_party/libc++/src/include/__cxx03/__chrono/year_month_weekday.h",
"//third_party/libc++/src/include/__cxx03/__chrono/zoned_time.h",
"//third_party/libc++/src/include/__cxx03/__compare/common_comparison_category.h",
"//third_party/libc++/src/include/__cxx03/__compare/compare_partial_order_fallback.h",
"//third_party/libc++/src/include/__cxx03/__compare/compare_strong_order_fallback.h",
"//third_party/libc++/src/include/__cxx03/__compare/compare_three_way.h",
"//third_party/libc++/src/include/__cxx03/__compare/compare_three_way_result.h",
"//third_party/libc++/src/include/__cxx03/__compare/compare_weak_order_fallback.h",
"//third_party/libc++/src/include/__cxx03/__compare/is_eq.h",
"//third_party/libc++/src/include/__cxx03/__compare/ordering.h",
"//third_party/libc++/src/include/__cxx03/__compare/partial_order.h",
"//third_party/libc++/src/include/__cxx03/__compare/strong_order.h",
"//third_party/libc++/src/include/__cxx03/__compare/synth_three_way.h",
"//third_party/libc++/src/include/__cxx03/__compare/three_way_comparable.h",
"//third_party/libc++/src/include/__cxx03/__compare/weak_order.h",
"//third_party/libc++/src/include/__cxx03/__concepts/arithmetic.h",
"//third_party/libc++/src/include/__cxx03/__concepts/assignable.h",
"//third_party/libc++/src/include/__cxx03/__concepts/boolean_testable.h",
"//third_party/libc++/src/include/__cxx03/__concepts/class_or_enum.h",
"//third_party/libc++/src/include/__cxx03/__concepts/common_reference_with.h",
"//third_party/libc++/src/include/__cxx03/__concepts/common_with.h",
"//third_party/libc++/src/include/__cxx03/__concepts/constructible.h",
"//third_party/libc++/src/include/__cxx03/__concepts/convertible_to.h",
"//third_party/libc++/src/include/__cxx03/__concepts/copyable.h",
"//third_party/libc++/src/include/__cxx03/__concepts/derived_from.h",
"//third_party/libc++/src/include/__cxx03/__concepts/destructible.h",
"//third_party/libc++/src/include/__cxx03/__concepts/different_from.h",
"//third_party/libc++/src/include/__cxx03/__concepts/equality_comparable.h",
"//third_party/libc++/src/include/__cxx03/__concepts/invocable.h",
"//third_party/libc++/src/include/__cxx03/__concepts/movable.h",
"//third_party/libc++/src/include/__cxx03/__concepts/predicate.h",
"//third_party/libc++/src/include/__cxx03/__concepts/regular.h",
"//third_party/libc++/src/include/__cxx03/__concepts/relation.h",
"//third_party/libc++/src/include/__cxx03/__concepts/same_as.h",
"//third_party/libc++/src/include/__cxx03/__concepts/semiregular.h",
"//third_party/libc++/src/include/__cxx03/__concepts/swappable.h",
"//third_party/libc++/src/include/__cxx03/__concepts/totally_ordered.h",
"//third_party/libc++/src/include/__cxx03/__condition_variable/condition_variable.h",
"//third_party/libc++/src/include/__cxx03/__config",
"//third_party/libc++/src/include/__cxx03/__config_site.in",
@@ -660,10 +473,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__configuration/config_site_shim.h",
"//third_party/libc++/src/include/__cxx03/__configuration/language.h",
"//third_party/libc++/src/include/__cxx03/__configuration/platform.h",
"//third_party/libc++/src/include/__cxx03/__coroutine/coroutine_handle.h",
"//third_party/libc++/src/include/__cxx03/__coroutine/coroutine_traits.h",
"//third_party/libc++/src/include/__cxx03/__coroutine/noop_coroutine_handle.h",
"//third_party/libc++/src/include/__cxx03/__coroutine/trivial_awaitables.h",
"//third_party/libc++/src/include/__cxx03/__debug_utils/randomize_range.h",
"//third_party/libc++/src/include/__cxx03/__debug_utils/sanitizers.h",
"//third_party/libc++/src/include/__cxx03/__debug_utils/strict_weak_ordering_check.h",
@@ -672,81 +481,18 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__exception/nested_exception.h",
"//third_party/libc++/src/include/__cxx03/__exception/operations.h",
"//third_party/libc++/src/include/__cxx03/__exception/terminate.h",
"//third_party/libc++/src/include/__cxx03/__expected/bad_expected_access.h",
"//third_party/libc++/src/include/__cxx03/__expected/expected.h",
"//third_party/libc++/src/include/__cxx03/__expected/unexpect.h",
"//third_party/libc++/src/include/__cxx03/__expected/unexpected.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/copy_options.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/directory_entry.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/directory_iterator.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/directory_options.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/file_status.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/file_time_type.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/file_type.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/filesystem_error.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/operations.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/path.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/path_iterator.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/perm_options.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/perms.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/recursive_directory_iterator.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/space_info.h",
"//third_party/libc++/src/include/__cxx03/__filesystem/u8path.h",
"//third_party/libc++/src/include/__cxx03/__format/buffer.h",
"//third_party/libc++/src/include/__cxx03/__format/concepts.h",
"//third_party/libc++/src/include/__cxx03/__format/container_adaptor.h",
"//third_party/libc++/src/include/__cxx03/__format/enable_insertable.h",
"//third_party/libc++/src/include/__cxx03/__format/escaped_output_table.h",
"//third_party/libc++/src/include/__cxx03/__format/extended_grapheme_cluster_table.h",
"//third_party/libc++/src/include/__cxx03/__format/format_arg.h",
"//third_party/libc++/src/include/__cxx03/__format/format_arg_store.h",
"//third_party/libc++/src/include/__cxx03/__format/format_args.h",
"//third_party/libc++/src/include/__cxx03/__format/format_context.h",
"//third_party/libc++/src/include/__cxx03/__format/format_error.h",
"//third_party/libc++/src/include/__cxx03/__format/format_functions.h",
"//third_party/libc++/src/include/__cxx03/__format/format_parse_context.h",
"//third_party/libc++/src/include/__cxx03/__format/format_string.h",
"//third_party/libc++/src/include/__cxx03/__format/format_to_n_result.h",
"//third_party/libc++/src/include/__cxx03/__format/formatter.h",
"//third_party/libc++/src/include/__cxx03/__format/formatter_bool.h",
"//third_party/libc++/src/include/__cxx03/__format/formatter_char.h",
"//third_party/libc++/src/include/__cxx03/__format/formatter_floating_point.h",
"//third_party/libc++/src/include/__cxx03/__format/formatter_integer.h",
"//third_party/libc++/src/include/__cxx03/__format/formatter_integral.h",
"//third_party/libc++/src/include/__cxx03/__format/formatter_output.h",
"//third_party/libc++/src/include/__cxx03/__format/formatter_pointer.h",
"//third_party/libc++/src/include/__cxx03/__format/formatter_string.h",
"//third_party/libc++/src/include/__cxx03/__format/formatter_tuple.h",
"//third_party/libc++/src/include/__cxx03/__format/indic_conjunct_break_table.h",
"//third_party/libc++/src/include/__cxx03/__format/parser_std_format_spec.h",
"//third_party/libc++/src/include/__cxx03/__format/range_default_formatter.h",
"//third_party/libc++/src/include/__cxx03/__format/range_formatter.h",
"//third_party/libc++/src/include/__cxx03/__format/unicode.h",
"//third_party/libc++/src/include/__cxx03/__format/width_estimation_table.h",
"//third_party/libc++/src/include/__cxx03/__format/write_escaped.h",
"//third_party/libc++/src/include/__cxx03/__functional/binary_function.h",
"//third_party/libc++/src/include/__cxx03/__functional/binary_negate.h",
"//third_party/libc++/src/include/__cxx03/__functional/bind.h",
"//third_party/libc++/src/include/__cxx03/__functional/bind_back.h",
"//third_party/libc++/src/include/__cxx03/__functional/bind_front.h",
"//third_party/libc++/src/include/__cxx03/__functional/binder1st.h",
"//third_party/libc++/src/include/__cxx03/__functional/binder2nd.h",
"//third_party/libc++/src/include/__cxx03/__functional/boyer_moore_searcher.h",
"//third_party/libc++/src/include/__cxx03/__functional/compose.h",
"//third_party/libc++/src/include/__cxx03/__functional/default_searcher.h",
"//third_party/libc++/src/include/__cxx03/__functional/function.h",
"//third_party/libc++/src/include/__cxx03/__functional/hash.h",
"//third_party/libc++/src/include/__cxx03/__functional/identity.h",
"//third_party/libc++/src/include/__cxx03/__functional/invoke.h",
"//third_party/libc++/src/include/__cxx03/__functional/is_transparent.h",
"//third_party/libc++/src/include/__cxx03/__functional/mem_fn.h",
"//third_party/libc++/src/include/__cxx03/__functional/mem_fun_ref.h",
"//third_party/libc++/src/include/__cxx03/__functional/not_fn.h",
"//third_party/libc++/src/include/__cxx03/__functional/operations.h",
"//third_party/libc++/src/include/__cxx03/__functional/perfect_forward.h",
"//third_party/libc++/src/include/__cxx03/__functional/pointer_to_binary_function.h",
"//third_party/libc++/src/include/__cxx03/__functional/pointer_to_unary_function.h",
"//third_party/libc++/src/include/__cxx03/__functional/ranges_operations.h",
"//third_party/libc++/src/include/__cxx03/__functional/reference_wrapper.h",
"//third_party/libc++/src/include/__cxx03/__functional/unary_function.h",
"//third_party/libc++/src/include/__cxx03/__functional/unary_negate.h",
@@ -755,24 +501,19 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__fwd/bit_reference.h",
"//third_party/libc++/src/include/__cxx03/__fwd/complex.h",
"//third_party/libc++/src/include/__cxx03/__fwd/deque.h",
"//third_party/libc++/src/include/__cxx03/__fwd/format.h",
"//third_party/libc++/src/include/__cxx03/__fwd/fstream.h",
"//third_party/libc++/src/include/__cxx03/__fwd/functional.h",
"//third_party/libc++/src/include/__cxx03/__fwd/ios.h",
"//third_party/libc++/src/include/__cxx03/__fwd/istream.h",
"//third_party/libc++/src/include/__cxx03/__fwd/mdspan.h",
"//third_party/libc++/src/include/__cxx03/__fwd/memory.h",
"//third_party/libc++/src/include/__cxx03/__fwd/memory_resource.h",
"//third_party/libc++/src/include/__cxx03/__fwd/ostream.h",
"//third_party/libc++/src/include/__cxx03/__fwd/pair.h",
"//third_party/libc++/src/include/__cxx03/__fwd/queue.h",
"//third_party/libc++/src/include/__cxx03/__fwd/span.h",
"//third_party/libc++/src/include/__cxx03/__fwd/sstream.h",
"//third_party/libc++/src/include/__cxx03/__fwd/stack.h",
"//third_party/libc++/src/include/__cxx03/__fwd/streambuf.h",
"//third_party/libc++/src/include/__cxx03/__fwd/string.h",
"//third_party/libc++/src/include/__cxx03/__fwd/string_view.h",
"//third_party/libc++/src/include/__cxx03/__fwd/subrange.h",
"//third_party/libc++/src/include/__cxx03/__fwd/tuple.h",
"//third_party/libc++/src/include/__cxx03/__fwd/vector.h",
"//third_party/libc++/src/include/__cxx03/__hash_table",
@@ -782,43 +523,22 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__iterator/aliasing_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/back_insert_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/bounded_iter.h",
"//third_party/libc++/src/include/__cxx03/__iterator/common_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/concepts.h",
"//third_party/libc++/src/include/__cxx03/__iterator/counted_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/cpp17_iterator_concepts.h",
"//third_party/libc++/src/include/__cxx03/__iterator/data.h",
"//third_party/libc++/src/include/__cxx03/__iterator/default_sentinel.h",
"//third_party/libc++/src/include/__cxx03/__iterator/distance.h",
"//third_party/libc++/src/include/__cxx03/__iterator/empty.h",
"//third_party/libc++/src/include/__cxx03/__iterator/erase_if_container.h",
"//third_party/libc++/src/include/__cxx03/__iterator/front_insert_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/incrementable_traits.h",
"//third_party/libc++/src/include/__cxx03/__iterator/indirectly_comparable.h",
"//third_party/libc++/src/include/__cxx03/__iterator/insert_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/istream_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/istreambuf_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/iter_move.h",
"//third_party/libc++/src/include/__cxx03/__iterator/iter_swap.h",
"//third_party/libc++/src/include/__cxx03/__iterator/iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/iterator_traits.h",
"//third_party/libc++/src/include/__cxx03/__iterator/iterator_with_data.h",
"//third_party/libc++/src/include/__cxx03/__iterator/mergeable.h",
"//third_party/libc++/src/include/__cxx03/__iterator/move_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/move_sentinel.h",
"//third_party/libc++/src/include/__cxx03/__iterator/next.h",
"//third_party/libc++/src/include/__cxx03/__iterator/ostream_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/ostreambuf_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/permutable.h",
"//third_party/libc++/src/include/__cxx03/__iterator/prev.h",
"//third_party/libc++/src/include/__cxx03/__iterator/projected.h",
"//third_party/libc++/src/include/__cxx03/__iterator/ranges_iterator_traits.h",
"//third_party/libc++/src/include/__cxx03/__iterator/readable_traits.h",
"//third_party/libc++/src/include/__cxx03/__iterator/reverse_access.h",
"//third_party/libc++/src/include/__cxx03/__iterator/reverse_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/segmented_iterator.h",
"//third_party/libc++/src/include/__cxx03/__iterator/size.h",
"//third_party/libc++/src/include/__cxx03/__iterator/sortable.h",
"//third_party/libc++/src/include/__cxx03/__iterator/unreachable_sentinel.h",
"//third_party/libc++/src/include/__cxx03/__iterator/wrap_iter.h",
"//third_party/libc++/src/include/__cxx03/__locale",
"//third_party/libc++/src/include/__cxx03/__locale_dir/locale_base_api/android.h",
@@ -849,16 +569,9 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__math/remainder.h",
"//third_party/libc++/src/include/__cxx03/__math/roots.h",
"//third_party/libc++/src/include/__cxx03/__math/rounding_functions.h",
"//third_party/libc++/src/include/__cxx03/__math/special_functions.h",
"//third_party/libc++/src/include/__cxx03/__math/traits.h",
"//third_party/libc++/src/include/__cxx03/__math/trigonometric_functions.h",
"//third_party/libc++/src/include/__cxx03/__mbstate_t.h",
"//third_party/libc++/src/include/__cxx03/__mdspan/default_accessor.h",
"//third_party/libc++/src/include/__cxx03/__mdspan/extents.h",
"//third_party/libc++/src/include/__cxx03/__mdspan/layout_left.h",
"//third_party/libc++/src/include/__cxx03/__mdspan/layout_right.h",
"//third_party/libc++/src/include/__cxx03/__mdspan/layout_stride.h",
"//third_party/libc++/src/include/__cxx03/__mdspan/mdspan.h",
"//third_party/libc++/src/include/__cxx03/__memory/addressof.h",
"//third_party/libc++/src/include/__cxx03/__memory/align.h",
"//third_party/libc++/src/include/__cxx03/__memory/aligned_alloc.h",
@@ -872,14 +585,9 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__memory/auto_ptr.h",
"//third_party/libc++/src/include/__cxx03/__memory/builtin_new_allocator.h",
"//third_party/libc++/src/include/__cxx03/__memory/compressed_pair.h",
"//third_party/libc++/src/include/__cxx03/__memory/concepts.h",
"//third_party/libc++/src/include/__cxx03/__memory/construct_at.h",
"//third_party/libc++/src/include/__cxx03/__memory/destruct_n.h",
"//third_party/libc++/src/include/__cxx03/__memory/inout_ptr.h",
"//third_party/libc++/src/include/__cxx03/__memory/out_ptr.h",
"//third_party/libc++/src/include/__cxx03/__memory/pointer_traits.h",
"//third_party/libc++/src/include/__cxx03/__memory/ranges_construct_at.h",
"//third_party/libc++/src/include/__cxx03/__memory/ranges_uninitialized_algorithms.h",
"//third_party/libc++/src/include/__cxx03/__memory/raw_storage_iterator.h",
"//third_party/libc++/src/include/__cxx03/__memory/shared_ptr.h",
"//third_party/libc++/src/include/__cxx03/__memory/swap_allocator.h",
@@ -888,54 +596,18 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__memory/uninitialized_algorithms.h",
"//third_party/libc++/src/include/__cxx03/__memory/unique_ptr.h",
"//third_party/libc++/src/include/__cxx03/__memory/uses_allocator.h",
"//third_party/libc++/src/include/__cxx03/__memory/uses_allocator_construction.h",
"//third_party/libc++/src/include/__cxx03/__memory/voidify.h",
"//third_party/libc++/src/include/__cxx03/__memory_resource/memory_resource.h",
"//third_party/libc++/src/include/__cxx03/__memory_resource/monotonic_buffer_resource.h",
"//third_party/libc++/src/include/__cxx03/__memory_resource/polymorphic_allocator.h",
"//third_party/libc++/src/include/__cxx03/__memory_resource/pool_options.h",
"//third_party/libc++/src/include/__cxx03/__memory_resource/synchronized_pool_resource.h",
"//third_party/libc++/src/include/__cxx03/__memory_resource/unsynchronized_pool_resource.h",
"//third_party/libc++/src/include/__cxx03/__mutex/lock_guard.h",
"//third_party/libc++/src/include/__cxx03/__mutex/mutex.h",
"//third_party/libc++/src/include/__cxx03/__mutex/once_flag.h",
"//third_party/libc++/src/include/__cxx03/__mutex/tag_types.h",
"//third_party/libc++/src/include/__cxx03/__mutex/unique_lock.h",
"//third_party/libc++/src/include/__cxx03/__node_handle",
"//third_party/libc++/src/include/__cxx03/__numeric/accumulate.h",
"//third_party/libc++/src/include/__cxx03/__numeric/adjacent_difference.h",
"//third_party/libc++/src/include/__cxx03/__numeric/exclusive_scan.h",
"//third_party/libc++/src/include/__cxx03/__numeric/gcd_lcm.h",
"//third_party/libc++/src/include/__cxx03/__numeric/inclusive_scan.h",
"//third_party/libc++/src/include/__cxx03/__numeric/inner_product.h",
"//third_party/libc++/src/include/__cxx03/__numeric/iota.h",
"//third_party/libc++/src/include/__cxx03/__numeric/midpoint.h",
"//third_party/libc++/src/include/__cxx03/__numeric/partial_sum.h",
"//third_party/libc++/src/include/__cxx03/__numeric/pstl.h",
"//third_party/libc++/src/include/__cxx03/__numeric/reduce.h",
"//third_party/libc++/src/include/__cxx03/__numeric/saturation_arithmetic.h",
"//third_party/libc++/src/include/__cxx03/__numeric/transform_exclusive_scan.h",
"//third_party/libc++/src/include/__cxx03/__numeric/transform_inclusive_scan.h",
"//third_party/libc++/src/include/__cxx03/__numeric/transform_reduce.h",
"//third_party/libc++/src/include/__cxx03/__ostream/basic_ostream.h",
"//third_party/libc++/src/include/__cxx03/__ostream/print.h",
"//third_party/libc++/src/include/__cxx03/__pstl/backend.h",
"//third_party/libc++/src/include/__cxx03/__pstl/backend_fwd.h",
"//third_party/libc++/src/include/__cxx03/__pstl/backends/default.h",
"//third_party/libc++/src/include/__cxx03/__pstl/backends/libdispatch.h",
"//third_party/libc++/src/include/__cxx03/__pstl/backends/serial.h",
"//third_party/libc++/src/include/__cxx03/__pstl/backends/std_thread.h",
"//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/any_of.h",
"//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/cpu_traits.h",
"//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/fill.h",
"//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/find_if.h",
"//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/for_each.h",
"//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/merge.h",
"//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/stable_sort.h",
"//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/transform.h",
"//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/transform_reduce.h",
"//third_party/libc++/src/include/__cxx03/__pstl/dispatch.h",
"//third_party/libc++/src/include/__cxx03/__pstl/handle_exception.h",
"//third_party/libc++/src/include/__cxx03/__random/bernoulli_distribution.h",
"//third_party/libc++/src/include/__cxx03/__random/binomial_distribution.h",
"//third_party/libc++/src/include/__cxx03/__random/cauchy_distribution.h",
@@ -970,62 +642,11 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__random/student_t_distribution.h",
"//third_party/libc++/src/include/__cxx03/__random/subtract_with_carry_engine.h",
"//third_party/libc++/src/include/__cxx03/__random/uniform_int_distribution.h",
"//third_party/libc++/src/include/__cxx03/__random/uniform_random_bit_generator.h",
"//third_party/libc++/src/include/__cxx03/__random/uniform_real_distribution.h",
"//third_party/libc++/src/include/__cxx03/__random/weibull_distribution.h",
"//third_party/libc++/src/include/__cxx03/__ranges/access.h",
"//third_party/libc++/src/include/__cxx03/__ranges/all.h",
"//third_party/libc++/src/include/__cxx03/__ranges/as_rvalue_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/chunk_by_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/common_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/concepts.h",
"//third_party/libc++/src/include/__cxx03/__ranges/container_compatible_range.h",
"//third_party/libc++/src/include/__cxx03/__ranges/counted.h",
"//third_party/libc++/src/include/__cxx03/__ranges/dangling.h",
"//third_party/libc++/src/include/__cxx03/__ranges/data.h",
"//third_party/libc++/src/include/__cxx03/__ranges/drop_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/drop_while_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/elements_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/empty.h",
"//third_party/libc++/src/include/__cxx03/__ranges/empty_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/enable_borrowed_range.h",
"//third_party/libc++/src/include/__cxx03/__ranges/enable_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/filter_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/from_range.h",
"//third_party/libc++/src/include/__cxx03/__ranges/iota_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/istream_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/join_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/lazy_split_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/movable_box.h",
"//third_party/libc++/src/include/__cxx03/__ranges/non_propagating_cache.h",
"//third_party/libc++/src/include/__cxx03/__ranges/owning_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/range_adaptor.h",
"//third_party/libc++/src/include/__cxx03/__ranges/rbegin.h",
"//third_party/libc++/src/include/__cxx03/__ranges/ref_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/rend.h",
"//third_party/libc++/src/include/__cxx03/__ranges/repeat_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/reverse_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/single_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/size.h",
"//third_party/libc++/src/include/__cxx03/__ranges/split_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/subrange.h",
"//third_party/libc++/src/include/__cxx03/__ranges/take_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/take_while_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/to.h",
"//third_party/libc++/src/include/__cxx03/__ranges/transform_view.h",
"//third_party/libc++/src/include/__cxx03/__ranges/view_interface.h",
"//third_party/libc++/src/include/__cxx03/__ranges/views.h",
"//third_party/libc++/src/include/__cxx03/__ranges/zip_view.h",
"//third_party/libc++/src/include/__cxx03/__split_buffer",
"//third_party/libc++/src/include/__cxx03/__std_clang_module",
"//third_party/libc++/src/include/__cxx03/__std_mbstate_t.h",
"//third_party/libc++/src/include/__cxx03/__stop_token/atomic_unique_lock.h",
"//third_party/libc++/src/include/__cxx03/__stop_token/intrusive_list_view.h",
"//third_party/libc++/src/include/__cxx03/__stop_token/intrusive_shared_ptr.h",
"//third_party/libc++/src/include/__cxx03/__stop_token/stop_callback.h",
"//third_party/libc++/src/include/__cxx03/__stop_token/stop_source.h",
"//third_party/libc++/src/include/__cxx03/__stop_token/stop_state.h",
"//third_party/libc++/src/include/__cxx03/__stop_token/stop_token.h",
"//third_party/libc++/src/include/__cxx03/__string/char_traits.h",
"//third_party/libc++/src/include/__cxx03/__string/constexpr_c_functions.h",
"//third_party/libc++/src/include/__cxx03/__string/extern_template_lists.h",
@@ -1040,9 +661,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__system_error/error_code.h",
"//third_party/libc++/src/include/__cxx03/__system_error/error_condition.h",
"//third_party/libc++/src/include/__cxx03/__system_error/system_error.h",
"//third_party/libc++/src/include/__cxx03/__thread/formatter.h",
"//third_party/libc++/src/include/__cxx03/__thread/id.h",
"//third_party/libc++/src/include/__cxx03/__thread/jthread.h",
"//third_party/libc++/src/include/__cxx03/__thread/poll_with_backoff.h",
"//third_party/libc++/src/include/__cxx03/__thread/support/c11.h",
"//third_party/libc++/src/include/__cxx03/__thread/support/external.h",
@@ -1054,7 +673,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__thread/timed_backoff_policy.h",
"//third_party/libc++/src/include/__cxx03/__tree",
"//third_party/libc++/src/include/__cxx03/__tuple/find_index.h",
"//third_party/libc++/src/include/__cxx03/__tuple/ignore.h",
"//third_party/libc++/src/include/__cxx03/__tuple/make_tuple_types.h",
"//third_party/libc++/src/include/__cxx03/__tuple/sfinae_helpers.h",
"//third_party/libc++/src/include/__cxx03/__tuple/tuple_element.h",
@@ -1074,7 +692,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__type_traits/aligned_union.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/alignment_of.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/can_extract_key.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/common_reference.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/common_type.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/conditional.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/conjunction.h",
@@ -1087,12 +704,10 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__type_traits/disjunction.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/enable_if.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/extent.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/has_unique_object_representation.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/has_virtual_destructor.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/integral_constant.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/invoke.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/is_abstract.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/is_aggregate.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/is_allocator.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/is_always_bitcastable.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/is_arithmetic.h",
@@ -1124,7 +739,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__type_traits/is_member_pointer.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/is_nothrow_assignable.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/is_nothrow_constructible.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/is_nothrow_convertible.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/is_nothrow_destructible.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/is_null_pointer.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/is_object.h",
@@ -1184,18 +798,13 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__type_traits/unwrap_ref.h",
"//third_party/libc++/src/include/__cxx03/__type_traits/void_t.h",
"//third_party/libc++/src/include/__cxx03/__undef_macros",
"//third_party/libc++/src/include/__cxx03/__utility/as_const.h",
"//third_party/libc++/src/include/__cxx03/__utility/as_lvalue.h",
"//third_party/libc++/src/include/__cxx03/__utility/auto_cast.h",
"//third_party/libc++/src/include/__cxx03/__utility/cmp.h",
"//third_party/libc++/src/include/__cxx03/__utility/convert_to_integral.h",
"//third_party/libc++/src/include/__cxx03/__utility/declval.h",
"//third_party/libc++/src/include/__cxx03/__utility/empty.h",
"//third_party/libc++/src/include/__cxx03/__utility/exception_guard.h",
"//third_party/libc++/src/include/__cxx03/__utility/exchange.h",
"//third_party/libc++/src/include/__cxx03/__utility/forward.h",
"//third_party/libc++/src/include/__cxx03/__utility/forward_like.h",
"//third_party/libc++/src/include/__cxx03/__utility/in_place.h",
"//third_party/libc++/src/include/__cxx03/__utility/integer_sequence.h",
"//third_party/libc++/src/include/__cxx03/__utility/is_pointer_in_range.h",
"//third_party/libc++/src/include/__cxx03/__utility/is_valid_range.h",
@@ -1208,16 +817,12 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/__utility/rel_ops.h",
"//third_party/libc++/src/include/__cxx03/__utility/small_buffer.h",
"//third_party/libc++/src/include/__cxx03/__utility/swap.h",
"//third_party/libc++/src/include/__cxx03/__utility/to_underlying.h",
"//third_party/libc++/src/include/__cxx03/__utility/unreachable.h",
"//third_party/libc++/src/include/__cxx03/__variant/monostate.h",
"//third_party/libc++/src/include/__cxx03/__verbose_abort",
"//third_party/libc++/src/include/__cxx03/algorithm",
"//third_party/libc++/src/include/__cxx03/any",
"//third_party/libc++/src/include/__cxx03/array",
"//third_party/libc++/src/include/__cxx03/atomic",
"//third_party/libc++/src/include/__cxx03/barrier",
"//third_party/libc++/src/include/__cxx03/bit",
"//third_party/libc++/src/include/__cxx03/bitset",
"//third_party/libc++/src/include/__cxx03/cassert",
"//third_party/libc++/src/include/__cxx03/ccomplex",
@@ -1225,7 +830,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/cerrno",
"//third_party/libc++/src/include/__cxx03/cfenv",
"//third_party/libc++/src/include/__cxx03/cfloat",
"//third_party/libc++/src/include/__cxx03/charconv",
"//third_party/libc++/src/include/__cxx03/chrono",
"//third_party/libc++/src/include/__cxx03/cinttypes",
"//third_party/libc++/src/include/__cxx03/ciso646",
@@ -1233,12 +837,9 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/clocale",
"//third_party/libc++/src/include/__cxx03/cmath",
"//third_party/libc++/src/include/__cxx03/codecvt",
"//third_party/libc++/src/include/__cxx03/compare",
"//third_party/libc++/src/include/__cxx03/complex",
"//third_party/libc++/src/include/__cxx03/complex.h",
"//third_party/libc++/src/include/__cxx03/concepts",
"//third_party/libc++/src/include/__cxx03/condition_variable",
"//third_party/libc++/src/include/__cxx03/coroutine",
"//third_party/libc++/src/include/__cxx03/csetjmp",
"//third_party/libc++/src/include/__cxx03/csignal",
"//third_party/libc++/src/include/__cxx03/cstdarg",
@@ -1257,36 +858,17 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/deque",
"//third_party/libc++/src/include/__cxx03/errno.h",
"//third_party/libc++/src/include/__cxx03/exception",
"//third_party/libc++/src/include/__cxx03/execution",
"//third_party/libc++/src/include/__cxx03/expected",
"//third_party/libc++/src/include/__cxx03/experimental/__config",
"//third_party/libc++/src/include/__cxx03/experimental/__simd/aligned_tag.h",
"//third_party/libc++/src/include/__cxx03/experimental/__simd/declaration.h",
"//third_party/libc++/src/include/__cxx03/experimental/__simd/reference.h",
"//third_party/libc++/src/include/__cxx03/experimental/__simd/scalar.h",
"//third_party/libc++/src/include/__cxx03/experimental/__simd/simd.h",
"//third_party/libc++/src/include/__cxx03/experimental/__simd/simd_mask.h",
"//third_party/libc++/src/include/__cxx03/experimental/__simd/traits.h",
"//third_party/libc++/src/include/__cxx03/experimental/__simd/utility.h",
"//third_party/libc++/src/include/__cxx03/experimental/__simd/vec_ext.h",
"//third_party/libc++/src/include/__cxx03/experimental/iterator",
"//third_party/libc++/src/include/__cxx03/experimental/memory",
"//third_party/libc++/src/include/__cxx03/experimental/propagate_const",
"//third_party/libc++/src/include/__cxx03/experimental/simd",
"//third_party/libc++/src/include/__cxx03/experimental/type_traits",
"//third_party/libc++/src/include/__cxx03/experimental/utility",
"//third_party/libc++/src/include/__cxx03/ext/__hash",
"//third_party/libc++/src/include/__cxx03/ext/hash_map",
"//third_party/libc++/src/include/__cxx03/ext/hash_set",
"//third_party/libc++/src/include/__cxx03/fenv.h",
"//third_party/libc++/src/include/__cxx03/filesystem",
"//third_party/libc++/src/include/__cxx03/float.h",
"//third_party/libc++/src/include/__cxx03/format",
"//third_party/libc++/src/include/__cxx03/forward_list",
"//third_party/libc++/src/include/__cxx03/fstream",
"//third_party/libc++/src/include/__cxx03/functional",
"//third_party/libc++/src/include/__cxx03/future",
"//third_party/libc++/src/include/__cxx03/initializer_list",
"//third_party/libc++/src/include/__cxx03/inttypes.h",
"//third_party/libc++/src/include/__cxx03/iomanip",
"//third_party/libc++/src/include/__cxx03/ios",
@@ -1294,35 +876,23 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/iostream",
"//third_party/libc++/src/include/__cxx03/istream",
"//third_party/libc++/src/include/__cxx03/iterator",
"//third_party/libc++/src/include/__cxx03/latch",
"//third_party/libc++/src/include/__cxx03/limits",
"//third_party/libc++/src/include/__cxx03/list",
"//third_party/libc++/src/include/__cxx03/locale",
"//third_party/libc++/src/include/__cxx03/locale.h",
"//third_party/libc++/src/include/__cxx03/map",
"//third_party/libc++/src/include/__cxx03/math.h",
"//third_party/libc++/src/include/__cxx03/mdspan",
"//third_party/libc++/src/include/__cxx03/memory",
"//third_party/libc++/src/include/__cxx03/memory_resource",
"//third_party/libc++/src/include/__cxx03/module.modulemap",
"//third_party/libc++/src/include/__cxx03/mutex",
"//third_party/libc++/src/include/__cxx03/new",
"//third_party/libc++/src/include/__cxx03/numbers",
"//third_party/libc++/src/include/__cxx03/numeric",
"//third_party/libc++/src/include/__cxx03/optional",
"//third_party/libc++/src/include/__cxx03/ostream",
"//third_party/libc++/src/include/__cxx03/print",
"//third_party/libc++/src/include/__cxx03/queue",
"//third_party/libc++/src/include/__cxx03/random",
"//third_party/libc++/src/include/__cxx03/ranges",
"//third_party/libc++/src/include/__cxx03/ratio",
"//third_party/libc++/src/include/__cxx03/regex",
"//third_party/libc++/src/include/__cxx03/scoped_allocator",
"//third_party/libc++/src/include/__cxx03/semaphore",
"//third_party/libc++/src/include/__cxx03/set",
"//third_party/libc++/src/include/__cxx03/shared_mutex",
"//third_party/libc++/src/include/__cxx03/source_location",
"//third_party/libc++/src/include/__cxx03/span",
"//third_party/libc++/src/include/__cxx03/sstream",
"//third_party/libc++/src/include/__cxx03/stack",
"//third_party/libc++/src/include/__cxx03/stdatomic.h",
@@ -1332,17 +902,14 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/stdint.h",
"//third_party/libc++/src/include/__cxx03/stdio.h",
"//third_party/libc++/src/include/__cxx03/stdlib.h",
"//third_party/libc++/src/include/__cxx03/stop_token",
"//third_party/libc++/src/include/__cxx03/streambuf",
"//third_party/libc++/src/include/__cxx03/string",
"//third_party/libc++/src/include/__cxx03/string.h",
"//third_party/libc++/src/include/__cxx03/string_view",
"//third_party/libc++/src/include/__cxx03/strstream",
"//third_party/libc++/src/include/__cxx03/syncstream",
"//third_party/libc++/src/include/__cxx03/system_error",
"//third_party/libc++/src/include/__cxx03/tgmath.h",
"//third_party/libc++/src/include/__cxx03/thread",
"//third_party/libc++/src/include/__cxx03/tuple",
"//third_party/libc++/src/include/__cxx03/type_traits",
"//third_party/libc++/src/include/__cxx03/typeindex",
"//third_party/libc++/src/include/__cxx03/typeinfo",
@@ -1351,7 +918,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__cxx03/unordered_set",
"//third_party/libc++/src/include/__cxx03/utility",
"//third_party/libc++/src/include/__cxx03/valarray",
"//third_party/libc++/src/include/__cxx03/variant",
"//third_party/libc++/src/include/__cxx03/vector",
"//third_party/libc++/src/include/__cxx03/version",
"//third_party/libc++/src/include/__cxx03/wchar.h",
@@ -1390,8 +956,10 @@ libcxx_headers = [
"//third_party/libc++/src/include/__flat_map/sorted_equivalent.h",
"//third_party/libc++/src/include/__flat_map/sorted_unique.h",
"//third_party/libc++/src/include/__flat_map/utils.h",
"//third_party/libc++/src/include/__flat_set/flat_multiset.h",
"//third_party/libc++/src/include/__flat_set/flat_set.h",
"//third_party/libc++/src/include/__flat_set/ra_iterator.h",
"//third_party/libc++/src/include/__flat_set/utils.h",
"//third_party/libc++/src/include/__format/buffer.h",
"//third_party/libc++/src/include/__format/concepts.h",
"//third_party/libc++/src/include/__format/container_adaptor.h",
@@ -1563,6 +1131,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__math/traits.h",
"//third_party/libc++/src/include/__math/trigonometric_functions.h",
"//third_party/libc++/src/include/__mbstate_t.h",
"//third_party/libc++/src/include/__mdspan/aligned_accessor.h",
"//third_party/libc++/src/include/__mdspan/default_accessor.h",
"//third_party/libc++/src/include/__mdspan/extents.h",
"//third_party/libc++/src/include/__mdspan/layout_left.h",
@@ -1587,6 +1156,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__memory/destroy.h",
"//third_party/libc++/src/include/__memory/destruct_n.h",
"//third_party/libc++/src/include/__memory/inout_ptr.h",
"//third_party/libc++/src/include/__memory/is_sufficiently_aligned.h",
"//third_party/libc++/src/include/__memory/noexcept_move_assign_container.h",
"//third_party/libc++/src/include/__memory/out_ptr.h",
"//third_party/libc++/src/include/__memory/pointer_traits.h",
@@ -1636,6 +1206,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__numeric/midpoint.h",
"//third_party/libc++/src/include/__numeric/partial_sum.h",
"//third_party/libc++/src/include/__numeric/pstl.h",
"//third_party/libc++/src/include/__numeric/ranges_iota.h",
"//third_party/libc++/src/include/__numeric/reduce.h",
"//third_party/libc++/src/include/__numeric/saturation_arithmetic.h",
"//third_party/libc++/src/include/__numeric/transform_exclusive_scan.h",
@@ -1850,7 +1421,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__type_traits/is_member_pointer.h",
"//third_party/libc++/src/include/__type_traits/is_nothrow_assignable.h",
"//third_party/libc++/src/include/__type_traits/is_nothrow_constructible.h",
"//third_party/libc++/src/include/__type_traits/is_nothrow_convertible.h",
"//third_party/libc++/src/include/__type_traits/is_nothrow_destructible.h",
"//third_party/libc++/src/include/__type_traits/is_null_pointer.h",
"//third_party/libc++/src/include/__type_traits/is_object.h",
@@ -2042,7 +1612,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/mdspan",
"//third_party/libc++/src/include/memory",
"//third_party/libc++/src/include/memory_resource",
"//third_party/libc++/src/include/module.modulemap",
"//third_party/libc++/src/include/module.modulemap.in",
"//third_party/libc++/src/include/mutex",
"//third_party/libc++/src/include/new",
"//third_party/libc++/src/include/numbers",

View File

@@ -71,7 +71,7 @@ const MenuItem = function (this: any, options: any) {
};
};
MenuItem.types = ['normal', 'separator', 'submenu', 'checkbox', 'radio'];
MenuItem.types = ['normal', 'separator', 'submenu', 'checkbox', 'radio', 'header', 'palette'];
MenuItem.prototype.getDefaultRoleAccelerator = function () {
return roles.getDefaultAccelerator(this.role);

View File

@@ -143,6 +143,9 @@ Menu.prototype.insert = function (pos, item) {
if (item.toolTip) this.setToolTip(pos, item.toolTip);
if (item.icon) this.setIcon(pos, item.icon);
if (item.role) this.setRole(pos, item.role);
if (item.type === 'palette' || item.type === 'header') {
this.setCustomType(pos, item.type);
}
// Make menu accessible to items.
item.overrideReadOnlyProperty('menu', this);
@@ -264,9 +267,11 @@ function removeExtraSeparators (items: (MenuItemConstructorOptions | MenuItem)[]
function insertItemByType (this: MenuType, item: MenuItem, pos: number) {
const types = {
normal: () => this.insertItem(pos, item.commandId, item.label),
header: () => this.insertItem(pos, item.commandId, item.label),
checkbox: () => this.insertCheckItem(pos, item.commandId, item.label),
separator: () => this.insertSeparator(pos),
submenu: () => this.insertSubMenu(pos, item.commandId, item.label, item.submenu),
palette: () => this.insertSubMenu(pos, item.commandId, item.label, item.submenu),
radio: () => {
// Grouping radio menu items
item.overrideReadOnlyProperty('groupId', generateGroupId(this.items, pos));

View File

@@ -28,12 +28,13 @@
"dugite": "^2.7.1",
"eslint": "^8.57.1",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-mocha": "^10.5.0",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.6.0",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-unicorn": "^55.0.0",
"events": "^3.2.0",
"folder-hash": "^2.1.1",
"got": "^11.8.5",

View File

@@ -10,7 +10,7 @@ this patch is required to provide ripemd160 support in the nodejs crypto
module.
diff --git a/crypto/digest/digest_extra.cc b/crypto/digest/digest_extra.cc
index f68ede9156ee57526f4578953c350798a1299f00..1de18075e1cfa7f9660fa3b065cd20bafcbe7ee8 100644
index 4cbfa1f53bb669c24c7f055f4fee7f144f72115a..120cb84e07e0539c038bca059b794d8f9f932a51 100644
--- a/crypto/digest/digest_extra.cc
+++ b/crypto/digest/digest_extra.cc
@@ -45,6 +45,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
@@ -82,7 +82,7 @@ index e04b80cd6a1a215fc87f8fd8d750c3d258c3974f..8fdf1c624794f568bfc77b7b6b0c510b
void EVP_MD_do_all(void (*callback)(const EVP_MD *cipher, const char *name,
diff --git a/include/openssl/digest.h b/include/openssl/digest.h
index b36c5885a31ff3242ac3104e6d875a008c7c39e4..8fe32508a00263295313e77992e2c208459ca42c 100644
index b5f76c34efea47fb52f1642c8ca7e8a78c1ae678..b2420a9614453de35e1918d65d42ff95fbf9cf9e 100644
--- a/include/openssl/digest.h
+++ b/include/openssl/digest.h
@@ -48,6 +48,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);

View File

@@ -20,10 +20,10 @@ index 2cdcbc346175eeee69402ecee7f169e61c655199..f7226fe711e4214b216ea2c5173a0212
case ssl_open_record_error:
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
index d228b1c3b517e21fb8022c1927b0bc522f46bf78..4a94410d0ea4daabde1397c78c5e5de113398ddf 100644
index 69f3fe2f5c193a30dd90368048804109db563da3..52393736adee2d50de218ac86c9e7cbcd9d6bf6d 100644
--- a/ssl/ssl_lib.cc
+++ b/ssl/ssl_lib.cc
@@ -1205,7 +1205,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
@@ -1204,7 +1204,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
}
if (ret_code == 0) {
@@ -32,7 +32,7 @@ index d228b1c3b517e21fb8022c1927b0bc522f46bf78..4a94410d0ea4daabde1397c78c5e5de1
return SSL_ERROR_ZERO_RETURN;
}
// An EOF was observed which violates the protocol, and the underlying
@@ -2572,13 +2572,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
@@ -2571,13 +2571,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
}

View File

@@ -4,7 +4,6 @@ blink_local_frame.patch
can_create_window.patch
disable_hidden.patch
dom_storage_limits.patch
render_widget_host_view_base.patch
render_widget_host_view_mac.patch
webview_cross_drag.patch
gin_enable_disable_v8_platform.patch
@@ -119,7 +118,6 @@ build_run_reclient_cfg_generator_after_chrome.patch
fix_getcursorscreenpoint_wrongly_returns_0_0.patch
fix_add_support_for_skipping_first_2_no-op_refreshes_in_thumb_cap.patch
refactor_expose_file_system_access_blocklist.patch
partially_revert_is_newly_created_to_allow_for_browser_initiated.patch
feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch
fix_font_face_resolution_when_renderer_is_blocked.patch
feat_enable_passing_exit_code_on_service_process_crash.patch
@@ -129,7 +127,6 @@ build_allow_electron_mojom_interfaces_to_depend_on_blink.patch
osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch
feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
chore_partial_revert_of.patch
fix_software_compositing_infinite_loop.patch
fix_adjust_headless_mode_handling_in_native_widget.patch
refactor_unfilter_unresponsive_events.patch
build_disable_thin_lto_mac.patch
@@ -141,11 +138,6 @@ ignore_parse_errors_for_resolveshortcutproperties.patch
feat_add_signals_when_embedder_cleanup_callbacks_run_for.patch
feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch
fix_win32_synchronous_spellcheck.patch
chore_remove_conflicting_allow_unsafe_libc_calls.patch
fix_linter_error.patch
revert_enable_crel_for_arm32_targets.patch
mac_fix_check_on_ime_reconversion_due_to_invalid_replacement_range.patch
fix_osr_stutter_fix_backport_for_electron.patch
do_not_check_the_order_of_display_id_order_on_windows.patch
make_focus_methods_in_webcontentsviewchildframe_notimplemented.patch
cherry-pick-f1e6422a355c.patch
chore_grandfather_in_electron_views_and_delegates.patch
refactor_patch_electron_permissiontypes_into_blink.patch

View File

@@ -5,12 +5,11 @@ Subject: fix: improve shortcut text of Accelerator
This patch makes three changes to Accelerator::GetShortcutText to improve shortcut display text in menus:
1. Ctrl-Alt-<Key> accelerators show as Ctrl-Alt-<Key> instead of as Ctrl-<Key>
2. F2-F24 accelerators show up as such
3. Ctrl-Shift-= and Ctrl-Plus show up as such
1. F2-F24 accelerators show up as such
2. Ctrl-Shift-= and Ctrl-Plus show up as such
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 5590f9d425229d87373c5b53651d2e2d17b779e4..407cbd7e7811e3053e35e26f24e3c049cdd59a46 100644
index 5ad9332dd27ceda7d67cd3f571b12218a4415a40..ffe083836c39fb60b4bff1f9fbdd6cebb7fa9d1d 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -12,6 +12,7 @@
@@ -21,51 +20,51 @@ index 5590f9d425229d87373c5b53651d2e2d17b779e4..407cbd7e7811e3053e35e26f24e3c049
#include "base/strings/utf_string_conversions.h"
#include "base/types/cxx23_to_underlying.h"
#include "build/build_config.h"
@@ -109,6 +110,11 @@ std::u16string Accelerator::GetShortcutText() const {
@@ -164,6 +165,11 @@ std::u16string Accelerator::GetKeyCodeStringForShortcut() const {
#endif
if (shortcut.empty()) {
if (key_string.empty()) {
+ // When a shifted char is explicitly specified, for example Ctrl+Plus,
+ // use the shifted char directly.
+ if (shifted_char) {
+ shortcut += *shifted_char;
+ key_string += *shifted_char;
+ } else {
#if BUILDFLAG(IS_WIN)
// Our fallback is to try translate the key code to a regular character
// unless it is one of digits (VK_0 to VK_9). Some keyboard
@@ -133,6 +139,10 @@ std::u16string Accelerator::GetShortcutText() const {
shortcut +=
@@ -190,6 +196,10 @@ std::u16string Accelerator::GetKeyCodeStringForShortcut() const {
static_cast<std::u16string::value_type>(base::ToUpperASCII(c));
}
#endif
+ }
+ if (key_code_ > VKEY_F1 && key_code_ <= VKEY_F24)
+ shortcut = base::UTF8ToUTF16(
+ key_string = base::UTF8ToUTF16(
+ base::StringPrintf("F%d", key_code_ - VKEY_F1 + 1));
}
#if BUILDFLAG(IS_MAC)
@@ -317,7 +327,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
const std::u16string& shortcut) const {
std::u16string result = shortcut;
return key_string;
@@ -350,7 +360,7 @@ std::vector<std::u16string> Accelerator::GetLongFormModifiers() const {
modifiers.push_back(l10n_util::GetStringUTF16(IDS_APP_CTRL_KEY));
}
- if (IsShiftDown()) {
+ if (!shifted_char && IsShiftDown()) {
result = ApplyModifierToAcceleratorString(result, IDS_APP_SHIFT_KEY);
modifiers.push_back(l10n_util::GetStringUTF16(IDS_APP_SHIFT_KEY));
}
diff --git a/ui/base/accelerators/accelerator.h b/ui/base/accelerators/accelerator.h
index 198c7469f410d3516b8a18493c5e4588d02487c2..e4995824ae2f3bb8045a3841a6213a4b315845a8 100644
index e7d5adfac920c97df8bab9bf4ed69a835ee314a9..9aeea7cb4c48d1ccc27304fa99238151b2811c87 100644
--- a/ui/base/accelerators/accelerator.h
+++ b/ui/base/accelerators/accelerator.h
@@ -18,6 +18,7 @@
#include <utility>
#include <vector>
#include "base/component_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
#include "base/time/time.h"
#include "build/blink_buildflags.h"
#include "build/build_config.h"
@@ -185,6 +186,8 @@ class COMPONENT_EXPORT(UI_BASE) Accelerator {
@@ -189,6 +190,8 @@ class COMPONENT_EXPORT(UI_BASE) Accelerator {
return interrupted_by_mouse_event_;
}
@@ -73,4 +72,4 @@ index 198c7469f410d3516b8a18493c5e4588d02487c2..e4995824ae2f3bb8045a3841a6213a4b
+
private:
friend class AcceleratorTestMac;
std::u16string ApplyLongFormModifiers(const std::u16string& shortcut) const;
std::vector<std::u16string> GetLongFormModifiers() const;

View File

@@ -10,12 +10,12 @@ 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 0d8bb93bf146c3058a30693673f0c23fdea90ae8..55f76337a445345c06531ce05e603db30daf759f 100644
index 5cf9e02f97e1378b0b1a55feb007b7d664fc4a84..d1fdf00a1b65fe0f5510608c165df93cf6c13e38 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -268,6 +268,10 @@ int GpuMain(MainFunctionParams parameters) {
@@ -269,6 +269,10 @@ int GpuMain(MainFunctionParams parameters) {
// to the GpuProcessHost once the GpuServiceImpl has started.
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
viz::GpuLogMessageManager::GetInstance()->InstallPreInitializeLogHandler();
+ auto* client = GetContentClient()->gpu();
+ if (client)

View File

@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
context, which can cause some preload scripts to trip.
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index 44da0544b778d6ff4c14b6f4e8463cb8260d2f0d..8ae8939af4141a684b7a6d50a43e1abb354ea028 100644
index db655a7b52eacb74f2a8637db36abd87f6b86792..8014cb08e2090a12ea8b9e92cb8f93c96921d400 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -149,6 +149,8 @@ class CONTENT_EXPORT RenderFrameObserver
@@ -23,10 +23,10 @@ index 44da0544b778d6ff4c14b6f4e8463cb8260d2f0d..8ae8939af4141a684b7a6d50a43e1abb
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index b78c7f64fd5e21a8d89318791bf639ab367d2d48..e8850312da428bcb9ec45b7c8605be1e516b22de 100644
index 5c8ffb1462a21f5d798656efc872ba09d6c0de99..2129c419a3ac4d989f2316484779debaebf90d7c 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4800,6 +4800,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4808,6 +4808,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,7 +40,7 @@ index b78c7f64fd5e21a8d89318791bf639ab367d2d48..e8850312da428bcb9ec45b7c8605be1e
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index a072319de5d16d8004cb33792b2275320627fe6a..f52aa0470ca53c9997961c398d2c79d25967562e 100644
index 6a9e696762cc0276f10971933363257591d12bfe..3cd045ed24c47465788c40cc68b050be11ed6f97 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -653,6 +653,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -53,10 +53,10 @@ index a072319de5d16d8004cb33792b2275320627fe6a..f52aa0470ca53c9997961c398d2c79d2
int world_id) override;
void DidChangeScrollOffset() override;
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index fade7618e12889da5a1c3cbe465dec0869634407..53aaf91fe5e68465c9ec8b181e33b5ee95a5a5aa 100644
index f59582f677806c07381bc608f9cca84a7af51a2b..174113297c8e5a5928c1d9166c417cb6328cfc82 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -664,6 +664,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -661,6 +661,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
@@ -79,10 +79,10 @@ index f7e0144c74f879e9b29871d7c372b99e127966bb..c3cd7b77ed282f212a56d151dc3fbec3
if (World().IsMainWorld()) {
probe::DidCreateMainWorldContext(GetFrame());
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index 8bb6b0465069529f79aaec21792e8b159535b3e9..f9782531c639d07002dda07732750a0007109468 100644
index e52a535450964b0938b66f7506225fda0cde04a2..841e9b36df4c32040d2b3c71514266fc330c99c7 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -299,6 +299,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -300,6 +300,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) = 0;
@@ -92,7 +92,7 @@ index 8bb6b0465069529f79aaec21792e8b159535b3e9..f9782531c639d07002dda07732750a00
int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index 66cc44003157657c68e90d295f877789395eca8d..19cd8460711d5d5b1b76c9e4cb82ed7fc71b410c 100644
index 96fc9e0646f943e86e927de2686a8da94625ae6c..30e9721cccd285a347f35e2d7a539547ac41247c 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -295,6 +295,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -110,7 +110,7 @@ index 66cc44003157657c68e90d295f877789395eca8d..19cd8460711d5d5b1b76c9e4cb82ed7f
v8::Local<v8::Context> context,
int32_t world_id) {
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index 4c7375a27a22f04694e14fecc17d633734d4cccc..ea2a32b151aaf07b5704e463d01714eb41680afb 100644
index 5dbc9c1f5f45c8753dd5510ffad2c5d4c20c814b..4223ba0db6c267a4574ab4a76c5a6f365223416c 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -82,6 +82,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -123,10 +123,10 @@ index 4c7375a27a22f04694e14fecc17d633734d4cccc..ea2a32b151aaf07b5704e463d01714eb
int32_t world_id) override;
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index 286d95397da7b90ba28b4c4faaae26d6ab71a496..23fd67571152897b3bc93fde8e98e1d554cce275 100644
index 069ccf925bc0c6f1a5b707670cc3c931dd2a25a9..49ccc167276ed544c800483c4a8655b254304ee8 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -417,6 +417,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
@@ -418,6 +418,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) override {}

View File

@@ -7,7 +7,7 @@ Ensure that licenses for the dependencies introduced by Electron
are included in `LICENSES.chromium.html`
diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
index 7b948007755d306babea73498c17031c437ae6dc..adcfad8931c314f86d26347ccda438af452b8167 100755
index b0807ee3d8ebcf34f0d740362aa46c8631562d38..118d200b74953c0068ad59300ccc0e3041d77a10 100755
--- a/tools/licenses/licenses.py
+++ b/tools/licenses/licenses.py
@@ -337,6 +337,31 @@ SPECIAL_CASES = {

View File

@@ -10,7 +10,7 @@ usage of BrowserList and Browser as we subclass related methods and use our
WindowList.
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f175743848e0cc2e 100644
index afd58dd8c32582c17a3a9508f0755ac894022a40..7034cb00d27e2c6ca06d89ae59365934762a402b 100644
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
@@ -48,6 +48,7 @@
@@ -20,8 +20,8 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438
+#include "electron/shell/browser/electron_browser_context.h"
#include "ui/accessibility/accessibility_features.h"
#include "ui/accessibility/ax_updates_and_events.h"
#include "ui/accessibility/platform/ax_platform_node.h"
@@ -171,7 +172,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
#include "ui/accessibility/platform/ax_platform.h"
@@ -174,7 +175,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
rvh->GetRoutingID(), accessibility_mode);
}
@@ -30,17 +30,17 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438
base::Value::Dict BuildTargetDescriptor(Browser* browser) {
base::Value::Dict target_data;
target_data.Set(kSessionIdField, browser->session_id().id());
@@ -192,7 +193,7 @@ void HandleAccessibilityRequestCallback(
DCHECK(ShouldHandleAccessibilityRequestCallback(path));
@@ -198,7 +199,7 @@ void HandleAccessibilityRequestCallback(
auto& browser_accessibility_state =
*content::BrowserAccessibilityState::GetInstance();
base::Value::Dict data;
- PrefService* pref = Profile::FromBrowserContext(current_context)->GetPrefs();
+ PrefService* pref = static_cast<electron::ElectronBrowserContext*>(current_context)->prefs();
ui::AXMode mode =
content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode();
bool is_a11y_allowed = content::BrowserAccessibilityState::GetInstance()
@@ -221,7 +222,7 @@ void HandleAccessibilityRequestCallback(
data.Set(kPDFPrinting, pdf_printing ? kOn : kOff);
ui::AXMode mode = browser_accessibility_state.GetAccessibilityMode();
bool native = mode.has_mode(ui::AXMode::kNativeAPIs);
bool web = mode.has_mode(ui::AXMode::kWebContents);
@@ -259,7 +260,7 @@ void HandleAccessibilityRequestCallback(
data.Set(kIsScreenReaderActive, is_screen_reader_active);
std::string pref_api_type =
- pref->GetString(prefs::kShownAccessibilityApiType);
@@ -48,7 +48,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438
bool pref_api_type_supported = false;
std::vector<ui::AXApiType::Type> supported_api_types =
@@ -288,11 +289,11 @@ void HandleAccessibilityRequestCallback(
@@ -327,11 +328,11 @@ void HandleAccessibilityRequestCallback(
data.Set(kPagesField, std::move(page_list));
base::Value::List browser_list;
@@ -62,7 +62,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438
data.Set(kBrowsersField, std::move(browser_list));
std::string json_string;
@@ -762,7 +763,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
@@ -805,7 +806,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
const std::string value = CheckJSValue(data.FindString(kValueField));
if (string_name == kApiTypeField) {
@@ -72,7 +72,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438
pref->SetString(prefs::kShownAccessibilityApiType, value);
}
}
@@ -816,7 +818,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
@@ -859,7 +861,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@@ -82,7 +82,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438
ui::AXApiType::Type api_type =
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
std::string accessibility_contents =
@@ -843,6 +846,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -886,6 +889,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@@ -90,7 +90,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438
for (Browser* browser : *BrowserList::GetInstance()) {
if (browser->session_id().id() == session_id) {
base::Value::Dict result = BuildTargetDescriptor(browser);
@@ -855,6 +859,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -898,6 +902,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
return;
}
}
@@ -98,7 +98,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438
#endif // !BUILDFLAG(IS_ANDROID)
// No browser with the specified |session_id| was found.
base::Value::Dict result;
@@ -898,11 +903,13 @@ void AccessibilityUIMessageHandler::StopRecording(
@@ -941,11 +946,13 @@ void AccessibilityUIMessageHandler::StopRecording(
}
ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
@@ -115,7 +115,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438
// Check to see if it is in the supported types list.
if (std::find(supported_types.begin(), supported_types.end(), api_type) ==
supported_types.end()) {
@@ -972,8 +979,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
@@ -1015,8 +1022,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
// static
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {

View File

@@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
index 6c679ef877067297ec3bf1a23af6c03a2af8dcf5..1ac93433189580c13b69cd52ce62681a8620da3d 100644
index 74e94044c3e18f513eb2ffa051039270f9bd56a1..f824ec4005b6640bdd3d35382f4dddf975893ea9 100644
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
@@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
@@ -167,6 +167,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
(network::mojom::AttributionSupport support),
(override));
@@ -23,10 +23,10 @@ index 6c679ef877067297ec3bf1a23af6c03a2af8dcf5..1ac93433189580c13b69cd52ce62681a
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 6c1e46e58d975137eee6c0fd7b01d2ae970a2e10..5ca29616369e76e298eb03188e18ca545c76a162 100644
index a0335fef252b46976ea2caf95e1bf3ef7d52585d..0a97013b60fcfeb8fac55d686b107b1175c9be04 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -765,6 +765,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -760,6 +760,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@@ -39,7 +39,7 @@ index 6c1e46e58d975137eee6c0fd7b01d2ae970a2e10..5ca29616369e76e298eb03188e18ca54
return is_active();
}
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index 56e52f079d1ad7c7a22764b976f0c8b2cc48dff2..1231fe522ad103e94d3c30ad7d5e5d23df9b3554 100644
index 6eade0d29bc266a6a8928e768c923687bd12e656..53465bc76a22ae97ba4602d02a41f52e194af68b 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -135,6 +135,7 @@ class CONTENT_EXPORT RenderViewHostImpl
@@ -51,7 +51,7 @@ index 56e52f079d1ad7c7a22764b976f0c8b2cc48dff2..1231fe522ad103e94d3c30ad7d5e5d23
void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index d719b546b8c3c59003698b26dead065da7d76341..95a52f1cc2024e4a9cd694429d5304a5860a1c1e 100644
index a13dd521b7263c66c94dac3d3caf6ebbed92d229..ce9295ee37ad58aab9f18f80daa72f91d5e0c27e 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -579,8 +579,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
@@ -80,10 +80,10 @@ index 20ca763ff7f55e8176b77349b41917b11e051ae6..a50c122064b5f0092f57e3d508fb1938
// This interface should only be implemented inside content.
friend class RenderViewHostImpl;
diff --git a/content/test/test_page_broadcast.h b/content/test/test_page_broadcast.h
index 913e465918750df6852c3ede34a75ecebab8b1fa..c81d6ad098cf977cbd8933721e539c52056c258b 100644
index 3f4fdfcdf2f701a394e182bd61baf226338ef7f8..f2faa1225e8ca6abb190e6f7a0775545fa3f785d 100644
--- a/content/test/test_page_broadcast.h
+++ b/content/test/test_page_broadcast.h
@@ -50,6 +50,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
@@ -51,6 +51,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
network::mojom::AttributionSupport support) override;
void UpdateColorProviders(
const blink::ColorProviderColorMaps& color_provider_colors) override;
@@ -92,10 +92,10 @@ index 913e465918750df6852c3ede34a75ecebab8b1fa..c81d6ad098cf977cbd8933721e539c52
mojo::AssociatedReceiver<blink::mojom::PageBroadcast> receiver_;
};
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
index f868a3cc56b49b7fdac9fa1415386bd3a59a3dd7..ac7e92740bf7a61f3d8dcf8feff0fee978ffbfee 100644
index b6a4e3609af1f090f1f845d77fa0589e5b178d8a..989b2cf76ce88614b57e75ce2fcace101225f43e 100644
--- a/third_party/blink/public/mojom/page/page.mojom
+++ b/third_party/blink/public/mojom/page/page.mojom
@@ -173,4 +173,7 @@ interface PageBroadcast {
@@ -175,4 +175,7 @@ interface PageBroadcast {
// 2. The ColorProvider associated with the WebContents changes as a result
// of theme changes.
UpdateColorProviders(ColorProviderColorMaps color_provider_colors);
@@ -104,10 +104,10 @@ index f868a3cc56b49b7fdac9fa1415386bd3a59a3dd7..ac7e92740bf7a61f3d8dcf8feff0fee9
+ SetSchedulerThrottling(bool allowed);
};
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
index b1689844282d6917b9750fbc6a875848ddf84b70..f1cc159b7c3448a33a6d9e213f8fbd3b47141fb7 100644
index 7c1eb9baabfb9e0f3645421b5cbe467862252638..00d2cd41d795cb550e16fb80944b238252e4e53c 100644
--- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h
@@ -371,6 +371,7 @@ class BLINK_EXPORT WebView {
@@ -370,6 +370,7 @@ class BLINK_EXPORT WebView {
// Scheduling -----------------------------------------------------------
virtual PageScheduler* Scheduler() const = 0;
@@ -116,10 +116,10 @@ index b1689844282d6917b9750fbc6a875848ddf84b70..f1cc159b7c3448a33a6d9e213f8fbd3b
// 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 1af1fa035b3da8967526d704e362ddbc5c3194ac..f470ada1bf84938427fb89f4508e5f56aaeebc1f 100644
index 97141017fa2ca72746d5269d6da2e08201e85972..2390395a3df10aca3510a619e91dab674de60e67 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2466,6 +2466,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
@@ -2469,6 +2469,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
"old_state", old_state, "new_state", new_state);
@@ -130,7 +130,7 @@ index 1af1fa035b3da8967526d704e362ddbc5c3194ac..f470ada1bf84938427fb89f4508e5f56
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 &&
@@ -3989,10 +3993,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3992,10 +3996,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@@ -155,7 +155,7 @@ index 1af1fa035b3da8967526d704e362ddbc5c3194ac..f470ada1bf84938427fb89f4508e5f56
// 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 06f7cf79b4526ca3ec7670c234a6bb8faec32f04..b8fe2a9b7b6b4de2a689f3857c7ce44909e6f2dc 100644
index eaa593b41ec2e9a12fca53eb9925e6b868a4d9f1..8ce3ea0e5d6e5bdff982b956de305047347b4385 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -448,6 +448,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,

View File

@@ -8,10 +8,10 @@ WebPreferences of in-process child windows, rather than relying on
process-level command line switches, as before.
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
index 2612e54a2b0d3c71bd8efe9340bc58c795500140..e590387effc958ba7215e75ea1e2a8173f624d02 100644
index 96bb1f2205a4f81b78626f8c277c0b82a048895b..881e6fa91b25758a3b3523119360bd92b5fc5802 100644
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
@@ -148,6 +148,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -151,6 +151,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
out->v8_cache_options = data.v8_cache_options();
out->record_whole_document = data.record_whole_document();
out->stylus_handwriting_enabled = data.stylus_handwriting_enabled();
@@ -32,7 +32,7 @@ index 2612e54a2b0d3c71bd8efe9340bc58c795500140..e590387effc958ba7215e75ea1e2a817
out->accelerated_video_decode_enabled =
data.accelerated_video_decode_enabled();
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
index 85f312a9ea1eca0ff7ba4c679fabb3156aabbc0b..a9dc007a93003610d68e3118b4a47a86d4e16f6e 100644
index 5c29a554f51023e63948bb7b28fcfdfa02089d66..ce0a19a2a848ac7c3543651a2b4de99dcfc66475 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
@@ -9,6 +9,7 @@
@@ -43,7 +43,7 @@ index 85f312a9ea1eca0ff7ba4c679fabb3156aabbc0b..a9dc007a93003610d68e3118b4a47a86
#include "build/build_config.h"
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
@@ -451,6 +452,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
@@ -452,6 +453,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
// WebView and by `kWebPayments` feature flag everywhere.
bool payment_request_enabled = false;
@@ -65,7 +65,7 @@ index 85f312a9ea1eca0ff7ba4c679fabb3156aabbc0b..a9dc007a93003610d68e3118b4a47a86
// chrome, except for the cases where it would require lots of extra work for
// the embedder to use the same default value.
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
index 9b7bc55a0e61de85688b2370012e14f8b47c43ab..63b035046ac3d565e5ee1f3a3c559da88d81f059 100644
index ce4074d601eca1d9ca6b30a8b5904366a47d0595..08cd7f1858a63d0d33fee5d345fefce19d2add93 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
@@ -8,6 +8,7 @@
@@ -76,7 +76,7 @@ index 9b7bc55a0e61de85688b2370012e14f8b47c43ab..63b035046ac3d565e5ee1f3a3c559da8
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
@@ -437,6 +438,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
@@ -443,6 +444,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
return r.stylus_handwriting_enabled;
}
@@ -130,7 +130,7 @@ index 9b7bc55a0e61de85688b2370012e14f8b47c43ab..63b035046ac3d565e5ee1f3a3c559da8
return r.cookie_enabled;
}
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
index e7c3bc263844c0ddeb9011440e2c0fd8f848ca27..142dae3834fe96f120727ef9ffe1250607bcadec 100644
index 3d0dcedeb104f72a5b7022c990ed9c9fa1989cf6..2963bb74ecdceaf340a00ee984b9a3a65c25cfc9 100644
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
@@ -8,9 +8,11 @@ import "third_party/blink/public/mojom/css/preferred_color_scheme.mojom";
@@ -145,7 +145,7 @@ index e7c3bc263844c0ddeb9011440e2c0fd8f848ca27..142dae3834fe96f120727ef9ffe12506
enum PointerType {
kPointerNone = 1, // 1 << 0
kPointerFirstType = kPointerNone,
@@ -218,6 +220,19 @@ struct WebPreferences {
@@ -219,6 +221,19 @@ struct WebPreferences {
// If true, stylus handwriting recognition to text input will be available in
// editable input fields which are non-password type.
bool stylus_handwriting_enabled;

View File

@@ -6,7 +6,7 @@ Subject: allow new privileges in unsandboxed child processes
This allows unsandboxed child process to launch setuid processes on Linux.
diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc
index add20a2f81d66e51e1be5a3f3b35ef6b340b4cc3..31a2a14a95540477297943df9b09b1e4659a884d 100644
index 75cafbe0dbd7d4b3dca4c8fe56e17cd836123588..8f551374e1ffc729081f7d50e73671313c641bb6 100644
--- a/content/browser/child_process_launcher_helper_linux.cc
+++ b/content/browser/child_process_launcher_helper_linux.cc
@@ -64,6 +64,15 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(

View File

@@ -15,7 +15,7 @@ Refs changes in:
This patch reverts the changes to fix associated crashes in Electron.
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
index 2072f6b14289b1f3a76dbccc98f29aa178c1c35c..d7017437a7e7e6ac130677e52731d0482bf20664 100644
index c9f34fa47702504ccdefb8d61c55f5eaae501085..26df03d777c9ea487cae37f3df91d1df233b75e2 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -134,14 +134,6 @@ bool Frame::Detach(FrameDetachType type) {
@@ -33,7 +33,7 @@ index 2072f6b14289b1f3a76dbccc98f29aa178c1c35c..d7017437a7e7e6ac130677e52731d048
if (type == FrameDetachType::kRemove) {
if (provisional_frame_) {
provisional_frame_->Detach(FrameDetachType::kRemove);
@@ -165,6 +157,14 @@ bool Frame::Detach(FrameDetachType type) {
@@ -166,6 +158,14 @@ bool Frame::Detach(FrameDetachType type) {
GetWindowProxyManager()->ClearForSwap();
}
@@ -49,10 +49,10 @@ index 2072f6b14289b1f3a76dbccc98f29aa178c1c35c..d7017437a7e7e6ac130677e52731d048
// its owning reference back to our owning LocalFrame.
client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 84ce7a810816d8229f15b23a2f8bf36c00989378..f721051f30f517c863a935765d5dcd4760ab461e 100644
index 43759ed40b3356a838e30772b815d51d20136707..afa8d181e836739f4136cf51ae323f29b0b25ebe 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -750,10 +750,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -727,10 +727,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index 84ce7a810816d8229f15b23a2f8bf36c00989378..f721051f30f517c863a935765d5dcd47
if (!Client())
return false;
@@ -807,6 +803,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -784,6 +780,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

View File

@@ -8,14 +8,14 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index 19e3f2fc7b3e08f690eb8c3b56c5b5222f645691..b0b7af16b6719a08ab7908ab4d96a5d2c3ea0340 100644
index 31c41cb8e8cc0d0c43811ce7e97a03f4feb38feb..8adb5a1d415e3424f41d87b19100eedcb55c9e61 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -91,6 +91,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
@@ -118,6 +118,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
perfetto::Category("drm"),
perfetto::Category("drmcursor"),
perfetto::Category("dwrite"),
+ perfetto::Category("electron"),
perfetto::Category("evdev"),
perfetto::Category("evdev").SetTags("input"),
perfetto::Category("event"),
perfetto::Category("exo"),

View File

@@ -10,10 +10,10 @@ Needed for:
2) //electron/shell/common:web_contents_utility
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
index 55921115094f7437ce10db1cac1debe9adc10ea9..7040d83af340f052f5cab4437433e3dd0a688390 100644
index 35fc76646e912075c744b48b5ddec73f885ea5e8..6ce2825bf558d5f50b9df45227284103375aa2e4 100644
--- a/content/public/common/BUILD.gn
+++ b/content/public/common/BUILD.gn
@@ -379,6 +379,8 @@ mojom("interfaces") {
@@ -381,6 +381,8 @@ mojom("interfaces") {
"//content/common/*",
"//extensions/common:mojom",
"//extensions/common:mojom_blink",

View File

@@ -6,10 +6,10 @@ Subject: build: allow electron to use exec_script
This is similar to the //build usecase so we're OK adding ourselves here
diff --git a/.gn b/.gn
index 54d2631ec203207f44038a36439613709fec1669..d7e197dc75dd711b1b2eb179a58de9030bde0465 100644
index ae58a0b0a64ae1fdb3f9cd8587041d71a121c6b9..0ed56526002b12deb6d29f3dd23a0d74d8e7473c 100644
--- a/.gn
+++ b/.gn
@@ -173,4 +173,27 @@ exec_script_allowlist =
@@ -167,4 +167,27 @@ exec_script_allowlist =
"//tools/grit/grit_rule.gni",
"//tools/gritsettings/BUILD.gn",

View File

@@ -11,7 +11,7 @@ This patch can (and should) be removed when we can prevent those symbols
from being stripped in the release build.
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
index 5b98b4aedab5b700d21d6a8eac11c81cc13f6b39..8ee6f54f67c300a52074f33f9d6fe08a68e3be4b 100644
index a47aa1cf4fb55c91908e15f1c406d79a48697cf8..a05a20229749e032e6d26d87177aebc4955ce081 100644
--- a/build/config/compiler/compiler.gni
+++ b/build/config/compiler/compiler.gni
@@ -79,7 +79,7 @@ declare_args() {

View File

@@ -11,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 95c73dcb082999d0a85d82f1fe330d27c88055ca..64cd976eba849435779b280b2941f9150b5d1d36 100644
index 72c637f9f3ba48bb7ab06678fe833f33d2cfddc8..e9c8ae3cdb7ba400c59cc469a1a80b5063738ffa 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -200,11 +200,16 @@ if (!is_android && !is_mac) {
@@ -197,11 +197,16 @@ if (!is_android && !is_mac) {
"common/crash_keys.h",
]
@@ -33,10 +33,10 @@ index 95c73dcb082999d0a85d82f1fe330d27c88055ca..64cd976eba849435779b280b2941f915
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index b5783087429ee651d21e04f6f5f11f5cb6f015a8..dae1cca8cee4fccfed3183aca1ba7cc32652ea58 100644
index 36fe07a692e9be5b99f9e59157b90963a6485f8b..d8cf68e953213f309537e74d954d874950ede24a 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4599,7 +4599,7 @@ static_library("browser") {
@@ -4715,7 +4715,7 @@ static_library("browser") {
[ "//chrome/browser/ui/webui/signin:profile_impl" ]
}
@@ -46,10 +46,10 @@ index b5783087429ee651d21e04f6f5f11f5cb6f015a8..dae1cca8cee4fccfed3183aca1ba7cc3
# than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 4dac075ed00691be14546b8bcd8f1b14fdc038b1..593ef717845c2c4c98aacd077d0696de207cff29 100644
index 0f493aeb49901e2917009b942f9b1e14e3fcf758..349079dc25f91fd426d523345ba66271c42ea084 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -7096,9 +7096,12 @@ test("unit_tests") {
@@ -7243,9 +7243,12 @@ test("unit_tests") {
"//chrome/notification_helper",
]
@@ -63,7 +63,7 @@ index 4dac075ed00691be14546b8bcd8f1b14fdc038b1..593ef717845c2c4c98aacd077d0696de
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -8067,6 +8070,10 @@ test("unit_tests") {
@@ -8209,6 +8212,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
]
@@ -74,8 +74,8 @@ index 4dac075ed00691be14546b8bcd8f1b14fdc038b1..593ef717845c2c4c98aacd077d0696de
sources += [
# The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc",
@@ -8122,7 +8129,6 @@ test("unit_tests") {
# Non-android deps for "unit_tests" target.
@@ -8266,7 +8273,6 @@ test("unit_tests") {
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
deps += [
"../browser/screen_ai:screen_ai_install_state",
- "//chrome:packed_resources_integrity_header",

View File

@@ -7,7 +7,7 @@ These are variables we add to the root BUILDCONFIG so that they're available
everywhere, without having to import("//electron/.../flags.gni").
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index a9d2caeb1c92e102daa9a8bd5bdc5a55af418cf4..efb5bf91722d4b18ae704ebf7355a13f253bef20 100644
index 706f0f32fe3d5b43692167ce8013699575fbf7b7..40ea2de7a32d7b720ebaa21f6bea4c46a9a20697 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,9 @@ if (current_os == "") {

View File

@@ -7,10 +7,10 @@ Build libc++ as static library to compile and pass
nan tests
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
index d2e6e482d82782d1004e1f8ea377e69cbbe2677b..2bb9ec60180cf80be6e565081d56ea747820196b 100644
index 78e270c731f1d40adb231fd16877f83ce1e34e31..cf15334412329f8e0dbdf11e744a425d6d571c7f 100644
--- a/buildtools/third_party/libc++/BUILD.gn
+++ b/buildtools/third_party/libc++/BUILD.gn
@@ -272,6 +272,7 @@ target(libcxx_target_type, "libc++") {
@@ -423,6 +423,7 @@ target(libcxx_target_type, "libc++") {
# need to explicitly depend on libc++.
visibility = [
"//build/config:common_deps",

View File

@@ -5,16 +5,20 @@ Subject: build: make libcxx_abi_unstable false for electron
https://nornagon.medium.com/a-libc-odyssey-973e51649063
See also https://github.com/electron/electron/issues/45810#issuecomment-2691417213.
diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site
index 67075bd8b4d42e6e6d651cb0988d64eccb64cc23..e240ff6fff94a6cebf8662996712fe7eb22e5fff 100644
index 67075bd8b4d42e6e6d651cb0988d64eccb64cc23..ddf1693002aa171b3d91aa4ef08f5b360e4adddc 100644
--- a/buildtools/third_party/libc++/__config_site
+++ b/buildtools/third_party/libc++/__config_site
@@ -18,7 +18,7 @@
@@ -18,7 +18,9 @@
// _LIBCPP_ABI_NAMESPACE to a shorter value.
#define _LIBCPP_ABI_NAMESPACE __Cr
-#define _LIBCPP_ABI_VERSION 2
+#define _LIBCPP_ABI_VERSION 1
+#define _LIBCPP_ABI_USE_WRAP_ITER_IN_STD_ARRAY
+#define _LIBCPP_ABI_USE_WRAP_ITER_IN_STD_STRING_VIEW
#define _LIBCPP_ABI_FORCE_ITANIUM 0
#define _LIBCPP_ABI_FORCE_MICROSOFT 0

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 775a132ea523c509433a3a9560fe3a5419dfaa3f..2b99d0b584760ab3f51561c030ca199055bacd26 100644
index 23cd457563d7d534e924428ac6da2b475e579326..d8698f9f37eefa50bf4e29a164b2cc302c32ecdf 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9652,6 +9652,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -9725,6 +9725,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,12 +21,12 @@ index 775a132ea523c509433a3a9560fe3a5419dfaa3f..2b99d0b584760ab3f51561c030ca1990
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 2896b2b15d9c22e27c37719867c20213b9983984..83c5918c1bc0417ed3c744828b9f93e7c00d22c3 100644
index f3204a39253652a906f8976c666395e8afa033a8..a45bf004f5096809b5fc7b70faa0b7fa7b257049 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5101,6 +5101,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params,
opener);
@@ -5293,6 +5293,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
// Sets the newly created WebContents WindowOpenDisposition.
new_contents_impl->original_window_open_disposition_ = params.disposition;
+ if (delegate_) {
+ delegate_->WebContentsCreatedWithFullParams(this, render_process_id,
@@ -37,7 +37,7 @@ index 2896b2b15d9c22e27c37719867c20213b9983984..83c5918c1bc0417ed3c744828b9f93e7
// 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
@@ -5142,12 +5148,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5334,12 +5340,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@@ -51,10 +51,10 @@ index 2896b2b15d9c22e27c37719867c20213b9983984..83c5918c1bc0417ed3c744828b9f93e7
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 55bb4ae3bab4cdf20b3e1dde9450a5c0e4e62b37..fe444c7fa140166a1b65c7a8a2676e2de7c4e0fc 100644
index 09f1899c9b044a05b2e40c291f17fdf1f9f2fcac..89643bf7059d4fc0d6de6116ffe0fdac883b3fc9 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -646,6 +646,10 @@ struct CreateNewWindowParams {
@@ -653,6 +653,10 @@ struct CreateNewWindowParams {
pending_associated_remote<blink.mojom.Widget> widget;
pending_associated_receiver<blink.mojom.FrameWidgetHost> frame_widget_host;
pending_associated_remote<blink.mojom.FrameWidget> frame_widget;
@@ -66,10 +66,10 @@ index 55bb4ae3bab4cdf20b3e1dde9450a5c0e4e62b37..fe444c7fa140166a1b65c7a8a2676e2d
// Operation result when the renderer asks the browser to create a new window.
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index e2382e9769cb79d676715187a2b8b00392e5445c..22400e44369b8ffb4b3fd886c981afea7a90da02 100644
index 4a377944faaf947ef478e2d858444b5d3a000c47..f8fffc6d41d26d15ff1f563005d58039099d069e 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -820,6 +820,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -848,6 +848,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -79,10 +79,10 @@ index e2382e9769cb79d676715187a2b8b00392e5445c..22400e44369b8ffb4b3fd886c981afea
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 9b75a6c3c222a93319e0f26f351aed3dbe6ead28..8a7ea32eb4ea4a78662b96a2eef5a0de4229d214 100644
index 0d0d957b353e0b147efce4380c445f664741d6f4..08b098fa486c77294250563edbc5d2421fda3d69 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -199,6 +199,7 @@ class NetworkService;
@@ -200,6 +200,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@@ -90,7 +90,7 @@ index 9b75a6c3c222a93319e0f26f351aed3dbe6ead28..8a7ea32eb4ea4a78662b96a2eef5a0de
} // namespace network
namespace sandbox {
@@ -1376,6 +1377,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1409,6 +1410,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -100,7 +100,7 @@ index 9b75a6c3c222a93319e0f26f351aed3dbe6ead28..8a7ea32eb4ea4a78662b96a2eef5a0de
bool opener_suppressed,
bool* no_javascript_access);
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index b390356721fa226c348923f33601c4a1a2d9702d..97a3ea6f292563a41fd41f812ac72526a96d8471 100644
index f42be2a1cc5ba3ccb52e48985e0532a34675e826..f6ab6ab2b036c7621b429181c3ff89d9f1ff77f9 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -32,6 +32,17 @@ namespace content {
@@ -122,7 +122,7 @@ index b390356721fa226c348923f33601c4a1a2d9702d..97a3ea6f292563a41fd41f812ac72526
WebContents* source,
const OpenURLParams& params,
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index da319cb20733150366d85bee95609f0f2d9def7f..8a18958035cc1dd26be558349f64f7727570c4ba 100644
index d33274984bf6523beeb3ab5ee586499d224bff3c..83bdd195339eb7d61ac88e2994fd8dabe93f6ecc 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -18,6 +18,7 @@
@@ -133,7 +133,7 @@ index da319cb20733150366d85bee95609f0f2d9def7f..8a18958035cc1dd26be558349f64f772
#include "content/public/browser/eye_dropper.h"
#include "content/public/browser/fullscreen_types.h"
#include "content/public/browser/invalidate_type.h"
@@ -376,6 +377,13 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -380,6 +381,13 @@ class CONTENT_EXPORT WebContentsDelegate {
const StoragePartitionConfig& partition_config,
SessionStorageNamespace* session_storage_namespace);
@@ -148,10 +148,10 @@ index da319cb20733150366d85bee95609f0f2d9def7f..8a18958035cc1dd26be558349f64f772
// 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 b46ceca2998e6f3706aff3705b9639948eebf60b..b78c7f64fd5e21a8d89318791bf639ab367d2d48 100644
index d83b79b725d28b22903e3f6227e982a2ed5573f5..5c8ffb1462a21f5d798656efc872ba09d6c0de99 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6925,6 +6925,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6937,6 +6937,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
GetWebFrame()->IsAdScriptInStack());
@@ -163,10 +163,10 @@ index b46ceca2998e6f3706aff3705b9639948eebf60b..b78c7f64fd5e21a8d89318791bf639ab
// moved on send.
bool is_background_tab =
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
index fa36b9907988ab971c94eae317e6e1dc4d170762..a2cafef6cae2fd78580fdf90dae17ac6586a7312 100644
index 7f265db63f3fa34ab568e30e356db3cb259e7067..b55188e4b75913a531c2def09343b9ed3d589940 100644
--- a/content/web_test/browser/web_test_content_browser_client.cc
+++ b/content/web_test/browser/web_test_content_browser_client.cc
@@ -534,6 +534,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -531,6 +531,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -176,10 +176,10 @@ index fa36b9907988ab971c94eae317e6e1dc4d170762..a2cafef6cae2fd78580fdf90dae17ac6
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h
index 9c6bbdc4f8e4f78fd745ac4e71510d9534925a78..f4a68476f71e8283bb3da3642758416efb98c168 100644
index b50d5628cfe6dc3009d889b6a8c4a0925d19592b..43d67de5ef7552bec5ced1496318724c01a806ce 100644
--- a/content/web_test/browser/web_test_content_browser_client.h
+++ b/content/web_test/browser/web_test_content_browser_client.h
@@ -93,6 +93,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
@@ -94,6 +94,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -210,10 +210,10 @@ index 82e9d3dfb5f7da76d89fe15ae61d379fa46e177d..fd035512099a54dff6cc951a2226c23a
} // 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 f4a1ed78679c5efaea6494a4aa8b22fff31cba1b..afa637807b0a5bdef126031f219115ecee8d478d 100644
index 23e8b0820df2546e0097d667758c818ef725a2e7..ef692c6d82dee347bc8956cb2337fa7a35f0c50d 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2272,6 +2272,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2318,6 +2318,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, entered_window);

View File

@@ -1,273 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Date: Wed, 21 May 2025 23:25:12 -0700
Subject: Enforce SharedWorker::Terminate() procedure order
During the investigation of crbug.com/409059706, we observed that
PerformShutdownOnWorkerThread() is called during the status is
running.
I suppose the root cause is race condition between `Terminate()`
procedure and a child process termination procedure in different
thread. WorkerThread can be terminated if two conditions are met;
`Terminate()` is called and all child worker threads have been
terminated. Both `Terminate()` and the child process termination
procedure may call `PerformShutdownOnWorkerThread()`, and former
is executed regardless of two conditions are met. The latter
is called if `Terminate()` is called and no child processes.
To be clear, "`Terminate()` is called" does not mean
`PrepareForShutdownOnWorkerThread()` is executed. `Terminate()`
queues it after the flag to tell `Terminate()` call. And, when
the issue happen, I am quite sure the flag is set but,
`PrepareForShutdownOnWorkerThread()` won't be executed yet.
The fix is that:
1. The "Terminate() is called" flag to be multi staged.
The flag is used for two purpose; a. avoid re-enter of
`Terminate()`, and b. `PrepareForShutdownOnWorkerThread()` is
in flight. The CL changed the flag to enum to represent
the stage properly.
2. `PerformShutdownOnWorkerThread()` is queued even if it is
called within the child process termination procedure.
It avoid the execution order flip between
`PrepareForShutdownOnWorkerThread()` and
`PerformShutdownOnWorkerThread()`.
In addition, this change ensures `PerformShutdownOnWorkerThread()`
is called once. While `PerformShutdownOnWorkerThread()` touches
fields inside, the fields must not be touched at some point within
the function, the function is actually not re-entrant when it reaches
to the end. Upon mikt@ suggestion, I made
`PerformShutdownOnWorkerThread()` is called only when two conditions
are fulfilled. i.e. `Terminate()` is called and the number of child
threads is 0. Also, the CL uses the enum to show
`PerformShutdownOnWorkerThread()` is in-flight to avoid re-entrance
in this level.
Bug: 409059706
Change-Id: I81a1c3b1a34e827fa75ec2d1a9b37023965dbe27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6543412
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1463892}
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
index b6f2e57224c8a50ffa65b70b30cf0eda77691613..68ac835c14901a22cd8ae1b55470e4b0a3d9dea8 100644
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -2828,6 +2828,13 @@ BASE_FEATURE(kWebviewAccelerateSmallCanvases,
"WebviewAccelerateSmallCanvases",
base::FEATURE_DISABLED_BY_DEFAULT);
+// WorkerThread termination procedure (prepare and shutdown) runs sequentially
+// in the same task without calling another cross thread post task.
+// Kill switch for crbug.com/409059706.
+BASE_FEATURE(kWorkerThreadSequentialShutdown,
+ "WorkerThreadSequentialShutdown",
+ base::FEATURE_ENABLED_BY_DEFAULT);
+
BASE_FEATURE(kNoReferrerForPreloadFromSubresource,
"NoReferrerForPreloadFromSubresource",
base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h
index 9970347ef0ccb1801bbdd9e3ff904ae7591567c6..1cd31c80405bac33b11749587e5b05c0fd461856 100644
--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -1844,6 +1844,8 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kWebUSBTransferSizeLimit);
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kWebviewAccelerateSmallCanvases);
+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kWorkerThreadSequentialShutdown);
+
// Kill switch for https://crbug.com/415810136.
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kNoReferrerForPreloadFromSubresource);
diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
index 9b2878bc23c78f092816524608776dd32fbde5a1..6d1f954733fbc574bcb1fda229fd30e7303fb9aa 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -264,9 +264,10 @@ void WorkerThread::Terminate() {
DCHECK_CALLED_ON_VALID_THREAD(parent_thread_checker_);
{
base::AutoLock locker(lock_);
- if (requested_to_terminate_)
+ if (termination_progress_ != TerminationProgress::kNotRequested) {
return;
- requested_to_terminate_ = true;
+ }
+ termination_progress_ = TerminationProgress::kRequested;
}
// Schedule a task to forcibly terminate the script execution in case that the
@@ -282,10 +283,33 @@ void WorkerThread::Terminate() {
*task_runner, FROM_HERE,
CrossThreadBindOnce(&WorkerThread::PrepareForShutdownOnWorkerThread,
CrossThreadUnretained(this)));
- PostCrossThreadTask(
- *task_runner, FROM_HERE,
- CrossThreadBindOnce(&WorkerThread::PerformShutdownOnWorkerThread,
- CrossThreadUnretained(this)));
+
+ if (!base::FeatureList::IsEnabled(
+ blink::features::kWorkerThreadSequentialShutdown)) {
+ PostCrossThreadTask(
+ *task_runner, FROM_HERE,
+ CrossThreadBindOnce(&WorkerThread::PerformShutdownOnWorkerThread,
+ CrossThreadUnretained(this)));
+ return;
+ }
+
+ bool perform_shutdown = false;
+ {
+ base::AutoLock locker(lock_);
+ CHECK_EQ(TerminationProgress::kRequested, termination_progress_);
+ termination_progress_ = TerminationProgress::kPrepared;
+ if (num_child_threads_ == 0) {
+ termination_progress_ = TerminationProgress::kPerforming;
+ perform_shutdown = true;
+ }
+ }
+
+ if (perform_shutdown) {
+ PostCrossThreadTask(
+ *task_runner, FROM_HERE,
+ CrossThreadBindOnce(&WorkerThread::PerformShutdownOnWorkerThread,
+ CrossThreadUnretained(this)));
+ }
}
void WorkerThread::TerminateForTesting() {
@@ -422,20 +446,48 @@ scoped_refptr<base::SingleThreadTaskRunner> WorkerThread::GetTaskRunner(
void WorkerThread::ChildThreadStartedOnWorkerThread(WorkerThread* child) {
DCHECK(IsCurrentThread());
-#if DCHECK_IS_ON()
+ child_threads_.insert(child);
{
base::AutoLock locker(lock_);
DCHECK_EQ(ThreadState::kRunning, thread_state_);
+ CHECK_EQ(TerminationProgress::kNotRequested, termination_progress_);
+ if (base::FeatureList::IsEnabled(
+ blink::features::kWorkerThreadSequentialShutdown)) {
+ ++num_child_threads_;
+ CHECK_EQ(child_threads_.size(), num_child_threads_);
+ }
}
-#endif
- child_threads_.insert(child);
}
void WorkerThread::ChildThreadTerminatedOnWorkerThread(WorkerThread* child) {
DCHECK(IsCurrentThread());
child_threads_.erase(child);
- if (child_threads_.empty() && CheckRequestedToTerminate())
- PerformShutdownOnWorkerThread();
+ if (!base::FeatureList::IsEnabled(
+ blink::features::kWorkerThreadSequentialShutdown)) {
+ if (child_threads_.empty() && CheckRequestedToTerminate()) {
+ PerformShutdownOnWorkerThread();
+ }
+ return;
+ }
+
+ bool perform_shutdown = false;
+ {
+ base::AutoLock locker(lock_);
+ --num_child_threads_;
+ CHECK_EQ(child_threads_.size(), num_child_threads_);
+ if (num_child_threads_ == 0 &&
+ termination_progress_ == TerminationProgress::kPrepared) {
+ termination_progress_ = TerminationProgress::kPerforming;
+ perform_shutdown = true;
+ }
+ }
+ if (perform_shutdown) {
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner =
+ GetWorkerBackingThread().BackingThread().GetTaskRunner();
+ GetWorkerBackingThread().BackingThread().GetTaskRunner()->PostTask(
+ FROM_HERE, WTF::BindOnce(&WorkerThread::PerformShutdownOnWorkerThread,
+ WTF::Unretained(this)));
+ }
}
WorkerThread::WorkerThread(WorkerReportingProxy& worker_reporting_proxy)
@@ -781,18 +833,32 @@ void WorkerThread::PerformShutdownOnWorkerThread() {
DCHECK(IsCurrentThread());
{
base::AutoLock locker(lock_);
- DCHECK(requested_to_terminate_);
+ if (!base::FeatureList::IsEnabled(
+ blink::features::kWorkerThreadSequentialShutdown)) {
+ DCHECK_NE(TerminationProgress::kNotRequested, termination_progress_);
+ } else {
+ DCHECK_EQ(TerminationProgress::kPerforming, termination_progress_);
+ }
DCHECK_EQ(ThreadState::kReadyToShutdown, thread_state_);
if (exit_code_ == ExitCode::kNotTerminated)
SetExitCode(ExitCode::kGracefullyTerminated);
}
- // When child workers are present, wait for them to shutdown before shutting
- // down this thread. ChildThreadTerminatedOnWorkerThread() is responsible
- // for completing shutdown on the worker thread after the last child shuts
- // down.
- if (!child_threads_.empty())
- return;
+ if (!base::FeatureList::IsEnabled(
+ blink::features::kWorkerThreadSequentialShutdown)) {
+ // When child workers are present, wait for them to shutdown before shutting
+ // down this thread. ChildThreadTerminatedOnWorkerThread() is responsible
+ // for completing shutdown on the worker thread after the last child shuts
+ // down.
+ if (!child_threads_.empty()) {
+ return;
+ }
+ } else {
+ // Child workers must not exist when `PerformShutdownOnWorkerThread()`
+ // is called because it has already been checked before calling the
+ // function.
+ CHECK(child_threads_.empty());
+ }
inspector_task_runner_->Dispose();
if (worker_inspector_controller_) {
@@ -848,7 +914,7 @@ void WorkerThread::SetExitCode(ExitCode exit_code) {
bool WorkerThread::CheckRequestedToTerminate() {
base::AutoLock locker(lock_);
- return requested_to_terminate_;
+ return termination_progress_ != TerminationProgress::kNotRequested;
}
void WorkerThread::PauseOrFreeze(mojom::blink::FrameLifecycleState state,
diff --git a/third_party/blink/renderer/core/workers/worker_thread.h b/third_party/blink/renderer/core/workers/worker_thread.h
index 48174fc364fd6d98f90b5a99a4ae403602691a52..e0423486b891d4d8638f455a01d07adc5b10b25b 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.h
+++ b/third_party/blink/renderer/core/workers/worker_thread.h
@@ -321,6 +321,13 @@ class CORE_EXPORT WorkerThread : public Thread::TaskObserver {
kTerminationUnnecessary,
};
+ enum class TerminationProgress {
+ kNotRequested,
+ kRequested,
+ kPrepared,
+ kPerforming,
+ };
+
// Returns true if we should synchronously terminate the script execution so
// that a shutdown task can be handled by the thread event loop.
TerminationState ShouldTerminateScriptExecution()
@@ -422,8 +429,10 @@ class CORE_EXPORT WorkerThread : public Thread::TaskObserver {
// A unique identifier among all WorkerThreads.
const int worker_thread_id_;
- // Set on the parent thread.
- bool requested_to_terminate_ GUARDED_BY(lock_) = false;
+ // Represents progress after the Terminate() call.
+ TerminationProgress termination_progress_ GUARDED_BY(lock_) =
+ TerminationProgress::kNotRequested;
+ size_t num_child_threads_ GUARDED_BY(lock_) = 0;
ThreadState thread_state_ GUARDED_BY(lock_) = ThreadState::kNotStarted;
ExitCode exit_code_ GUARDED_BY(lock_) = ExitCode::kNotTerminated;

View File

@@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores
Makes things like "git status" quicker when developing electron locally
diff --git a/.gitignore b/.gitignore
index 0a0f0118d5c1a5a2f3ad28b068bebb849eba7246..5ca6d03b709ef119ccd6482b2f305f8a3aeb7438 100644
index d69c2f1ff69789512d89eed5982da803e0fcd813..0d4ba5c34634785d297340a8168f7ea18448f8e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -217,6 +217,7 @@ vs-chromium-project.txt
@@ -222,6 +222,7 @@ vs-chromium-project.txt
/data
/delegate_execute
/device/serial/device_serial_mojo.xml
@@ -18,12 +18,12 @@ index 0a0f0118d5c1a5a2f3ad28b068bebb849eba7246..5ca6d03b709ef119ccd6482b2f305f8a
/googleurl
/gpu/gles2_conform_test
diff --git a/third_party/.gitignore b/third_party/.gitignore
index 3e117f79191d5cea0fb4f1c6b0e95513562d7691..f197d17a55a802b01aaba602eff7c83f2a55c7b5 100644
index ad591b3a0f2afe24d53dac76655f81790c1baa50..080d19d34659290e70f599e3d91da286013be76f 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -45,7 +45,9 @@
/devserver
@@ -46,7 +46,9 @@
/directxsdk
/dragonbox/src
/edk2
+/electron_node
/elfutils/src
@@ -31,7 +31,7 @@ index 3e117f79191d5cea0fb4f1c6b0e95513562d7691..f197d17a55a802b01aaba602eff7c83f
/espresso/lib/
/eyesfree/src
/fast_float/src
@@ -93,6 +95,7 @@
@@ -94,6 +96,7 @@
/mocha
/mockito/src
/nacl_sdk_binaries/
@@ -39,7 +39,7 @@ index 3e117f79191d5cea0fb4f1c6b0e95513562d7691..f197d17a55a802b01aaba602eff7c83f
/ninja
/node/*.tar.gz
/node/linux/
@@ -137,7 +140,7 @@
@@ -138,7 +141,7 @@
/spirv-cross/src
/spirv-headers/src
/spirv-tools/src

View File

@@ -0,0 +1,91 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Mon, 14 Apr 2025 11:34:25 -0500
Subject: chore: "grandfather in" Electron Views and Delegates
6441736: Block further usage of WidgetDelegateView. | https://chromium-review.googlesource.com/c/chromium/src/+/6441736
6442265: Add a PassKey for std::make_unique<WidgetDelegateView>(). | https://chromium-review.googlesource.com/c/chromium/src/+/6442265
6448510: Lock further access to View::set_owned_by_client(). | https://chromium-review.googlesource.com/c/chromium/src/+/6448510
diff --git a/ui/views/view.h b/ui/views/view.h
index 0dbbd7979ad79a7a74681222fcf36a315f0634ce..b04e77440c1273c5b866ea329e62ac07fdcf5404 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -82,6 +82,19 @@ class ArcNotificationContentView;
class WideFrameView;
} // namespace ash
+namespace electron {
+class DevToolsWindowDelegate;
+class InspectableWebContentsView;
+class MenuBar;
+class RootView;
+class RootViewMac;
+}
+
+namespace electron::api {
+class ImageView;
+class View;
+}
+
namespace exo {
class ShellSurfaceBase;
}
@@ -324,6 +337,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public:
class OwnedByClientPassKey {
private:
+ // TODO(ckerr) can this list be shortened?
+ friend class electron::DevToolsWindowDelegate;
+ friend class electron::InspectableWebContentsView;
+ friend class electron::MenuBar;
+ friend class electron::RootView;
+ friend class electron::RootViewMac;
+ friend class electron::api::ImageView;
+ friend class electron::api::View;
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop class.
diff --git a/ui/views/widget/widget_delegate.h b/ui/views/widget/widget_delegate.h
index d2011a5c04973980e245f498ad4e6e1f65e6cc4b..f1aecd776878a368cc7debccfd5db6bd098c7ec4 100644
--- a/ui/views/widget/widget_delegate.h
+++ b/ui/views/widget/widget_delegate.h
@@ -165,6 +165,12 @@ namespace crostini {
class AppRestartDialog;
}
+namespace electron {
+class AutofillPopupView;
+class DevToolsWindowDelegate;
+class NativeWindowMac;
+}
+
namespace enterprise_connectors {
class ContentAnalysisDialogController;
class ContentAnalysisDialogBehaviorBrowserTest;
@@ -374,6 +380,7 @@ class VIEWS_EXPORT WidgetDelegate {
class OwnedByWidgetPassKey {
private:
+ friend class electron::DevToolsWindowDelegate;
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `SetOwnedByWidget()`.
@@ -470,6 +477,7 @@ class VIEWS_EXPORT WidgetDelegate {
};
class RegisterDeleteCallbackPassKey {
private:
+ friend class electron::NativeWindowMac;
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop `RegisterDeleteDelegateCallback()`.
@@ -927,6 +935,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
View* GetContentsView() override;
private:
+ friend class electron::AutofillPopupView;
// DO NOT ADD TO THIS LIST!
// These existing cases are "grandfathered in", but there shouldn't be more.
// See comments atop class.

View File

@@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
of explicitly adding ScopedAllowBlocking calls as friends.
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
index d97240a7b0dcf63737808850b6ef83852155b794..4a58b1f3e8c2bee32084be82977239e911598077 100644
index b1abcfaab58df4555d3a26481915d64ef5458e17..f2f43454c1c124da9983998564837ebf3589aefd 100644
--- a/base/threading/thread_restrictions.h
+++ b/base/threading/thread_restrictions.h
@@ -132,6 +132,7 @@ class KeyStorageLinux;
@@ -28,7 +28,7 @@ index d97240a7b0dcf63737808850b6ef83852155b794..4a58b1f3e8c2bee32084be82977239e9
namespace enterprise_connectors {
class LinuxKeyRotationCommand;
} // namespace enterprise_connectors
@@ -575,6 +579,7 @@ class BASE_EXPORT ScopedAllowBlocking {
@@ -577,6 +581,7 @@ class BASE_EXPORT ScopedAllowBlocking {
friend class ::DesktopNotificationBalloon;
friend class ::FirefoxProfileLock;
friend class ::GaiaConfig;
@@ -36,10 +36,10 @@ index d97240a7b0dcf63737808850b6ef83852155b794..4a58b1f3e8c2bee32084be82977239e9
friend class ::ProfileImpl;
friend class ::ScopedAllowBlockingForProfile;
friend class ::StartupTabProviderImpl;
@@ -614,6 +619,7 @@ class BASE_EXPORT ScopedAllowBlocking {
@@ -615,6 +620,7 @@ class BASE_EXPORT ScopedAllowBlocking {
friend class cronet::CronetPrefsManager;
friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
friend class drive::FakeDriveService;
friend class extensions::DesktopAndroidExtensionSystem;
+ friend class electron::ScopedAllowBlockingForElectron;
friend class extensions::InstalledLoader;
friend class extensions::UnpackedInstaller;

View File

@@ -34,10 +34,10 @@ index 39b5a8fdd165efd74b00256552b51b5413107958..bfc4ef4f50efff4a77f2aef64335bb7e
class ScrollEvent;
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 1d298f66a2c2a0f02668af797b3a421fe5578d56..4780229a4453ad5ca2c89b786459f64c58bf2272 100644
index cc9f13770da77d9522a48abeb9d831b7b8b742f9..a415140b94e467adfbc3dbbaa026e897a0f66c06 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
@@ -1386,6 +1386,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
@@ -1358,6 +1358,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
window()->SetProperty(aura::client::kHeadlessBoundsKey, bounds);
}
@@ -49,22 +49,22 @@ index 1d298f66a2c2a0f02668af797b3a421fe5578d56..4780229a4453ad5ca2c89b786459f64c
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 2ee5e4b4673f4f18880dddecc48118c89823fd3f..37109b8d3d439073b5c9e2ea3597c36f32de5704 100644
index c8339591dc55a792fd20f6c4340eac49f56a7f50..b85d1cdec49b10628d2f3d3d2e07513beb830456 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
@@ -268,6 +268,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin : public DesktopWindowTreeHost,
@@ -271,6 +271,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
void HandleWindowSizeUnchanged() override;
void HandleWindowScaleFactorChanged(float window_scale_factor) override;
void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) override;
+ bool HandleMouseEventForCaption(UINT message) const override;
// Overridden from WidgetObserver.
void OnWidgetThemeChanged(Widget* widget) override;
Widget* GetWidget();
const Widget* GetWidget() const;
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 701f89b053674be1bad0a1a3612340a65c1ccfe7..ac7e189f26da75f6f8b40e69cf4bfee94acddd38 100644
index 011448d24c557059423f6901b7e1100e476f0c9f..06fc8190385139f165bad0c2da2fb22d7a2c3d76 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3186,15 +3186,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3161,15 +3161,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
}
// We must let Windows handle the caption buttons if it's drawing them, or
// they won't work.
@@ -86,7 +86,7 @@ index 701f89b053674be1bad0a1a3612340a65c1ccfe7..ac7e189f26da75f6f8b40e69cf4bfee9
return 0;
}
}
@@ -3217,6 +3221,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3192,6 +3196,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
// handle alt-space, or in the frame itself.
is_right_mouse_pressed_on_caption_ = false;
ReleaseCapture();
@@ -94,7 +94,7 @@ index 701f89b053674be1bad0a1a3612340a65c1ccfe7..ac7e189f26da75f6f8b40e69cf4bfee9
// |point| is in window coordinates, but WM_NCHITTEST and TrackPopupMenu()
// expect screen coordinates.
POINT screen_point = CR_POINT_INITIALIZER_FROM_LPARAM(l_param);
@@ -3224,7 +3229,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3199,7 +3204,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
w_param = static_cast<WPARAM>(SendMessage(
hwnd(), WM_NCHITTEST, 0, MAKELPARAM(screen_point.x, screen_point.y)));
if (w_param == HTCAPTION || w_param == HTSYSMENU) {
@@ -114,10 +114,10 @@ index 701f89b053674be1bad0a1a3612340a65c1ccfe7..ac7e189f26da75f6f8b40e69cf4bfee9
}
} else if (message == WM_NCLBUTTONDOWN &&
diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
index 83c26bf2b4bc11c0e3d839093eea56eed1bf581b..075e456e851bbde2b0174ca0cc34428cc32b6966 100644
index 320b3263875807ccca2f013d51bc67a0c341cba3..67c761715aa2cc2ad52a5105a485af0514a4148f 100644
--- a/ui/views/win/hwnd_message_handler_delegate.h
+++ b/ui/views/win/hwnd_message_handler_delegate.h
@@ -255,6 +255,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
@@ -252,6 +252,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
// Called when the headless window bounds has changed.
virtual void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) = 0;

View File

@@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it
by changing something in Electron.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 5465e9d42a5c4eed3b6f819418a7b0ab92c7eae2..54ff9675fef009c5bb79becb59146436508ad835 100644
index 0fba6e8b5f1f9ecde06b9d846b4ace984cdfc943..b50e3c2ecb6f9f3322cfd16fc7bcbd8935f863a2 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5020,7 +5020,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5209,7 +5209,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
: IsGuest();
// While some guest types do not have a guest SiteInstance, the ones that
// don't all override WebContents creation above.

View File

@@ -14,10 +14,10 @@ This change patches it out to prevent the DCHECK.
It can be removed once/if we see a better solution to the problem.
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index adaa1cd426c138972b088d0d0093b0e1653af231..be4684c94ba2214255c5dbe9cdcf1ea316c60c06 100644
index c88f60749ed5c1371a4b85540f515c2124043f53..cea6f1123dcff9b7531783fb6d50c43e9e1cd5fb 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -229,7 +229,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
@@ -227,7 +227,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
BrowserContext* browser_context,
const StoragePartitionConfig& partition_config) {
DCHECK(browser_context);

View File

@@ -28,3 +28,21 @@ index e3b9f14a4cf2167064ce6716053e663adffa1542..65f13a4607c8145858fd47d81cb9960c
// When the enterprise policy is not set, use finch/feature flag choice.
return base::FeatureList::IsEnabled(
diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc
index 8967bad0bc644d7a1541fdf86fa9d65c0b2c5dd0..25f75dd808e56dbcb3f6a4e284f7485427507e7e 100644
--- a/chrome/browser/pdf/pdf_extension_util.cc
+++ b/chrome/browser/pdf/pdf_extension_util.cc
@@ -245,10 +245,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) {
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(ENABLE_PDF_INK2)
bool IsPdfAnnotationsEnabledByPolicy(content::BrowserContext* context) {
+# if 0
PrefService* prefs =
context ? Profile::FromBrowserContext(context)->GetPrefs() : nullptr;
return !prefs || !prefs->IsManagedPreference(prefs::kPdfAnnotationsEnabled) ||
prefs->GetBoolean(prefs::kPdfAnnotationsEnabled);
+#endif
+ return true;
}
#endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(ENABLE_PDF_INK2)

View File

@@ -7,10 +7,10 @@ Pending upstream patch, this gives us fuller access to the window.open params
so that we will be able to decide whether to cancel it or not.
diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc
index bfcdf050e603b953d15a0898200c8f031a1f84c6..b1f163b6da4d2197d404a5a0fbd31a5b346d3d69 100644
index 7a9effeec99682ef063ebe71f209e6ed9fc4cad4..71ef44be47a8665ee36449a38333ddf9cff33ad4 100644
--- a/chrome/browser/media/offscreen_tab.cc
+++ b/chrome/browser/media/offscreen_tab.cc
@@ -286,8 +286,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
@@ -287,8 +287,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -21,10 +21,10 @@ index bfcdf050e603b953d15a0898200c8f031a1f84c6..b1f163b6da4d2197d404a5a0fbd31a5b
// uses this to spawn new windows/tabs, which is also not allowed for
// offscreen tabs.
diff --git a/chrome/browser/media/offscreen_tab.h b/chrome/browser/media/offscreen_tab.h
index 2fa0d6e1be27cc429e4a0237b5bfafa7aaa06c56..3decb327b10e3cd3edc1765491a7eb6056be7a51 100644
index 231e3595f218aeebe28d0b13ce6182e7a4d6f4e1..609bd205d1cd0404cab3471765bef8b0e053d061 100644
--- a/chrome/browser/media/offscreen_tab.h
+++ b/chrome/browser/media/offscreen_tab.h
@@ -107,8 +107,7 @@ class OffscreenTab final : public ProfileObserver,
@@ -108,8 +108,7 @@ class OffscreenTab final : public ProfileObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -35,10 +35,10 @@ index 2fa0d6e1be27cc429e4a0237b5bfafa7aaa06c56..3decb327b10e3cd3edc1765491a7eb60
content::RenderFrameHost* requesting_frame,
const blink::mojom::FullscreenOptions& options) final;
diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
index a0c24e09a5dffa8be119309738abe57e82ef76b3..3e362f622b72d7cb97a838e71014b035c47728c0 100644
index a17c406b59530a8f57f6cb48905a697dd208a41f..0e22e90c1d570eb4c86ac1f24c5a6e9159be8ea1 100644
--- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
+++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
@@ -79,8 +79,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
@@ -80,8 +80,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -49,10 +49,10 @@ index a0c24e09a5dffa8be119309738abe57e82ef76b3..3e362f622b72d7cb97a838e71014b035
}
diff --git a/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc b/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc
index 44be6359d6a7acf88072569d8d4f85c688f5ed81..ee377313b25e13c011b1ed4aa31ea059f020a5b7 100644
index 08c84ca91f7e477e4e8d6370513d90d2fb9801f1..41e04444274f40fdedbf8d97bfd149f2ac682e53 100644
--- a/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc
+++ b/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc
@@ -120,10 +120,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
@@ -121,10 +121,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -66,10 +66,10 @@ index 44be6359d6a7acf88072569d8d4f85c688f5ed81..ee377313b25e13c011b1ed4aa31ea059
/*from_user_gesture=*/true);
return true;
diff --git a/chrome/browser/ui/ash/web_view/ash_web_view_impl.h b/chrome/browser/ui/ash/web_view/ash_web_view_impl.h
index 4fd8dff1089cd6afa6a66dc185734d7671657281..0a1f4268ea771a3d5d4a2668928c6e5d1b618c68 100644
index b6582b4013d9682d32bd524b4053b443a4df00f8..afcbce72e0f247b4d5a637b27c9f25d913cfa14b 100644
--- a/chrome/browser/ui/ash/web_view/ash_web_view_impl.h
+++ b/chrome/browser/ui/ash/web_view/ash_web_view_impl.h
@@ -59,8 +59,7 @@ class AshWebViewImpl : public ash::AshWebView,
@@ -60,8 +60,7 @@ class AshWebViewImpl : public ash::AshWebView,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -80,29 +80,33 @@ index 4fd8dff1089cd6afa6a66dc185734d7671657281..0a1f4268ea771a3d5d4a2668928c6e5d
content::WebContents* source,
const content::OpenURLParams& params,
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index d45f8f1713c875f2d430f9155f0cbe626a5f233f..00c7db5afa636d5d1da4e5d2cb01ebcbec70304b 100644
index 8c5e577eb89cf1ee85e76fea6385f7a18a60143b..2ae70471cfa301570d696662182773e868054143 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2289,12 +2289,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -2392,8 +2392,7 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
- const std::string& frame_name,
- const GURL& target_url) {
+ const content::mojom::CreateNewWindowParams& params) {
return window_container_type ==
content::mojom::WindowContainerType::BACKGROUND &&
ShouldCreateBackgroundContents(source_site_instance, opener_url,
- frame_name);
+ params.frame_name);
if (IsActorCoordinatorActingOnTab(
profile(), content::WebContents::FromRenderFrameHost(opener))) {
// If an ActorCoordinator is acting on the opener, prevent it from creating
@@ -2405,7 +2404,7 @@ bool Browser::IsWebContentsCreationOverridden(
return (window_container_type ==
content::mojom::WindowContainerType::BACKGROUND &&
ShouldCreateBackgroundContents(source_site_instance, opener_url,
- frame_name));
+ params.frame));
}
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index ce1e404e45a60e43de9580fe8d60fa72ec90b8f4..9267e93fdd03fad3848a45a1c6d090566cac317c 100644
index 1de7f9596b2f8f545ad5da7db51a35e5e0fc8592..0db8f52ef8375970f966fe8a2e3e06a8b2eeac02 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -1005,8 +1005,7 @@ class Browser : public TabStripModelObserver,
@@ -1026,8 +1026,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -113,10 +117,10 @@ index ce1e404e45a60e43de9580fe8d60fa72ec90b8f4..9267e93fdd03fad3848a45a1c6d09056
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
index 0d2a68ea6b9f08b5c1f1113181b08d55a3265192..0dfa27fa14d1308c059534953e190922ddb3bc0a 100644
index a05510eadf5c9ff24bb7999aa76229946319280f..a80ecc46f8a6b84de83d608257d45ae61ccc2170 100644
--- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
+++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
@@ -205,8 +205,7 @@ bool PresentationReceiverWindowController::IsWebContentsCreationOverridden(
@@ -206,8 +206,7 @@ bool PresentationReceiverWindowController::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -127,10 +131,10 @@ index 0d2a68ea6b9f08b5c1f1113181b08d55a3265192..0dfa27fa14d1308c059534953e190922
// uses this to spawn new windows/tabs, which is also not allowed for
// local presentations.
diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
index ca72b324bf7c3b81ac94b53f0ff454d2df177950..d60ef3075d126e2bbd50c8469f2bf67cfa05c6f7 100644
index 3fc06be01f20e8cd314d95d73a3f58c2f0742fe9..c07910ae59a185442f37ea6e7b96fdf3a33aba82 100644
--- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
+++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
@@ -105,8 +105,7 @@ class PresentationReceiverWindowController final
@@ -106,8 +106,7 @@ class PresentationReceiverWindowController final
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -141,10 +145,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 1085003ab18d471d5c018ac68041924d458fcec7..4aac70febec9f0abadd1ecb96d9066e6c270efca 100644
index 1c30afe192809d85ced6af595347353ec3cb5364..af48bb2755c33f6c372be6b51048b3cf3fd0be0b 100644
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
@@ -100,8 +100,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
@@ -101,8 +101,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -155,10 +159,10 @@ index 1085003ab18d471d5c018ac68041924d458fcec7..4aac70febec9f0abadd1ecb96d9066e6
}
content::WebContents* CreateCustomWebContents(
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
index e0264aff5b60bb5e76ac7687222403dfba516e66..915abd2475f6be95d973f827522f7ef12052a81c 100644
index 807f43c164015e9372623b6ca9db1293640a530f..5e1875cde93f27e3d0324c84b94f076b33123495 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
@@ -189,14 +189,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
@@ -199,14 +199,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -176,10 +180,10 @@ index e0264aff5b60bb5e76ac7687222403dfba516e66..915abd2475f6be95d973f827522f7ef1
java_gurl);
}
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
index 67a01b48ae88c7e25aeb5c5103b26afa037f4f97..0ceb539c9c3051b5521236cf866ccb107727c8a9 100644
index 7a8cdc28f87399e494a58490cdc4ac0dd4b06520..0c2a83b44f6909b5b3a6303715e1611d039711bb 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
@@ -82,8 +82,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
@@ -84,8 +84,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -190,10 +194,10 @@ index 67a01b48ae88c7e25aeb5c5103b26afa037f4f97..0ceb539c9c3051b5521236cf866ccb10
bool DidAddMessageToConsole(content::WebContents* source,
blink::mojom::ConsoleMessageLevel log_level,
diff --git a/components/offline_pages/content/background_loader/background_loader_contents.cc b/components/offline_pages/content/background_loader/background_loader_contents.cc
index e0e9a5a8c1d8c242d39935e2456052619af33cc6..80518793447c70e8fc1dae9b42a59d40427ae52b 100644
index 14f2758f2d71d4d4ba77e4fcb9be40bb878526e0..536db4f8fe9771b60f0359df5c680b298c89cad4 100644
--- a/components/offline_pages/content/background_loader/background_loader_contents.cc
+++ b/components/offline_pages/content/background_loader/background_loader_contents.cc
@@ -89,8 +89,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden(
@@ -86,8 +86,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -204,7 +208,7 @@ index e0e9a5a8c1d8c242d39935e2456052619af33cc6..80518793447c70e8fc1dae9b42a59d40
return true;
}
diff --git a/components/offline_pages/content/background_loader/background_loader_contents.h b/components/offline_pages/content/background_loader/background_loader_contents.h
index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17250c5eca 100644
index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c58df53573 100644
--- a/components/offline_pages/content/background_loader/background_loader_contents.h
+++ b/components/offline_pages/content/background_loader/background_loader_contents.h
@@ -66,8 +66,7 @@ class BackgroundLoaderContents : public content::WebContentsDelegate {
@@ -218,24 +222,24 @@ index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17
content::WebContents* AddNewContents(
content::WebContents* source,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index d13c38de7a2e69565020ab92c874bf1289d63833..d7ec62c6761bcc8d4bb5889e873e22c4a27e7f17 100644
index c034b546289ba069194ad65d3d3bc0703a3afe9c..e603c0fddbf4efaeb225686c1791ffb581e9e6c0 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4983,8 +4983,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
// TODO(crbug.com/40202416): Support a way for MPArch guests to support this.
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,
- opener->GetLastCommittedURL(), params.frame_name,
- params.target_url)) {
+ opener->GetLastCommittedURL(), params)) {
@@ -5172,8 +5172,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ &&
delegate_->IsWebContentsCreationOverridden(
opener, source_site_instance, params.window_container_type,
- opener->GetLastCommittedURL(), params.frame_name,
- params.target_url)) {
+ opener->GetLastCommittedURL(), params)) {
auto* web_contents_impl =
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
opener, source_site_instance, is_new_browsing_instance,
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index 97a3ea6f292563a41fd41f812ac72526a96d8471..b299dd5659100d317a3574e902bf2c29c5defd2c 100644
index f6ab6ab2b036c7621b429181c3ff89d9f1ff77f9..d151ba757ae81c6f023ee08328ab155405b0fb95 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -159,8 +159,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
@@ -160,8 +160,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
SiteInstance* source_site_instance,
mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -246,10 +250,10 @@ index 97a3ea6f292563a41fd41f812ac72526a96d8471..b299dd5659100d317a3574e902bf2c29
}
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 8a18958035cc1dd26be558349f64f7727570c4ba..7d9c9b06bcc57ef5eb0a2ca74ee20632a1393f9e 100644
index 83bdd195339eb7d61ac88e2994fd8dabe93f6ecc..682e5eecb7ce514094f76253447aa7ac4b6f29b1 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -355,8 +355,7 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -359,8 +359,7 @@ class CONTENT_EXPORT WebContentsDelegate {
SiteInstance* source_site_instance,
mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -260,10 +264,10 @@ index 8a18958035cc1dd26be558349f64f7727570c4ba..7d9c9b06bcc57ef5eb0a2ca74ee20632
// Allow delegate to creates a custom WebContents when
// WebContents::CreateNewWindow() is called. This function is only called
diff --git a/extensions/browser/guest_view/app_view/app_view_guest.cc b/extensions/browser/guest_view/app_view/app_view_guest.cc
index f8b00fec3f2786822b22c052051c524f766c059d..85a535d0b1e49619fec8c9f5c67896204c9fb164 100644
index 0f2c21513e07e8ddb387c165754d7ec67942a719..c381abf67c261b92f1c65c485b69321f44080343 100644
--- a/extensions/browser/guest_view/app_view/app_view_guest.cc
+++ b/extensions/browser/guest_view/app_view/app_view_guest.cc
@@ -153,8 +153,7 @@ bool AppViewGuest::IsWebContentsCreationOverridden(
@@ -154,8 +154,7 @@ bool AppViewGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -274,7 +278,7 @@ index f8b00fec3f2786822b22c052051c524f766c059d..85a535d0b1e49619fec8c9f5c6789620
return true;
diff --git a/extensions/browser/guest_view/app_view/app_view_guest.h b/extensions/browser/guest_view/app_view/app_view_guest.h
index 136448c9df06b9704e95d2797a60907d7ec5170a..21cc7b08dd8f9e4a32d29dd35c42ec2ce9f6cd53 100644
index 7695578f626f2a0c7fefae2bc1d5c35e5ac154f2..78958bff12ce41ae5ad77f43279a4b35b9408a12 100644
--- a/extensions/browser/guest_view/app_view/app_view_guest.h
+++ b/extensions/browser/guest_view/app_view/app_view_guest.h
@@ -10,6 +10,7 @@
@@ -285,7 +289,7 @@ index 136448c9df06b9704e95d2797a60907d7ec5170a..21cc7b08dd8f9e4a32d29dd35c42ec2c
#include "extensions/browser/guest_view/app_view/app_view_guest_delegate.h"
#include "extensions/browser/lazy_context_task_queue.h"
@@ -79,8 +80,7 @@ class AppViewGuest : public guest_view::GuestView<AppViewGuest> {
@@ -80,8 +81,7 @@ class AppViewGuest : public guest_view::GuestView<AppViewGuest> {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -296,10 +300,10 @@ index 136448c9df06b9704e95d2797a60907d7ec5170a..21cc7b08dd8f9e4a32d29dd35c42ec2c
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
index 2fca443b4bebf29c2835440a9db8a56f7373032f..6b704b57c08714b0a314e98d49e58676987d2995 100644
index 5bd9d59a961a03f3cd3a806bc1af58c3eaee2b58..40d7ae8d6248163524a8c1350b625e107a8ae64a 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
@@ -262,8 +262,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
@@ -263,8 +263,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -310,10 +314,10 @@ index 2fca443b4bebf29c2835440a9db8a56f7373032f..6b704b57c08714b0a314e98d49e58676
// This method handles opening links from within the guest. Since this guest
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h
index e39031afd8fff7cb6e278555cc58a48d86407d65..f67f6a5603c1fa9e66ccdde9b601df9a11cae738 100644
index 56d86e3d1179df2d5f34eb6216989aef2687f49f..236f3ccf8354b156737e03929ee538f99f1f4adf 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.h
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h
@@ -73,8 +73,7 @@ class ExtensionOptionsGuest
@@ -74,8 +74,7 @@ class ExtensionOptionsGuest
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -324,10 +328,10 @@ index e39031afd8fff7cb6e278555cc58a48d86407d65..f67f6a5603c1fa9e66ccdde9b601df9a
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 60de0d74ee40fedcbae96e5049e21dc238bf33bf..c568d4d08f772e1d381820bed826a0b64a631449 100644
index 0bba5f4b0abdaa55b7e406d39ccf3de33bf53194..ed4b8e0215a12adf95273109f7e4968d7b0cbf2a 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -452,8 +452,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
@@ -453,8 +453,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -338,10 +342,10 @@ index 60de0d74ee40fedcbae96e5049e21dc238bf33bf..c568d4d08f772e1d381820bed826a0b6
return true;
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
index 2dcf51f335f5dac39f431c3e0f56f8789f33d40b..2b433624d0604e0b9da5117b9e83cc1559b74740 100644
index 7eeffdfbda9611806c6f260f0c68f6d84689cb7e..5d8f6d132068d7fabaa52bc61354c71a8ac8cd20 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
@@ -186,8 +186,7 @@ class MimeHandlerViewGuest
@@ -187,8 +187,7 @@ class MimeHandlerViewGuest
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -352,10 +356,10 @@ index 2dcf51f335f5dac39f431c3e0f56f8789f33d40b..2b433624d0604e0b9da5117b9e83cc15
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc
index 635050eedc20fb89608677bcebeb5f8187bd4b59..1220f377169f8209db39654b7ddbf1da52c017b7 100644
index bd09d0f34a1610d64a1438b618ef5b3786315e91..4b2a979db1e00bc0d7f3b1b54570c305070acccc 100644
--- a/fuchsia_web/webengine/browser/frame_impl.cc
+++ b/fuchsia_web/webengine/browser/frame_impl.cc
@@ -575,8 +575,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
@@ -581,8 +581,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -366,10 +370,10 @@ index 635050eedc20fb89608677bcebeb5f8187bd4b59..1220f377169f8209db39654b7ddbf1da
// can catch bad client behavior while not interfering with normal operation.
constexpr size_t kMaxPendingWebContentsCount = 10;
diff --git a/fuchsia_web/webengine/browser/frame_impl.h b/fuchsia_web/webengine/browser/frame_impl.h
index 1012a909ef1fcae51c218ae519fe7e0db65ab087..127b1ae940bc9313aecb635e2b01bb6f541d9adb 100644
index 756d4192271d6a65cfe8e1511737c565b543cb1f..5688f6f745056565c3c01947f741c4d13e27b6ae 100644
--- a/fuchsia_web/webengine/browser/frame_impl.h
+++ b/fuchsia_web/webengine/browser/frame_impl.h
@@ -307,8 +307,7 @@ class WEB_ENGINE_EXPORT FrameImpl : public fuchsia::web::Frame,
@@ -308,8 +308,7 @@ class WEB_ENGINE_EXPORT FrameImpl : public fuchsia::web::Frame,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -380,10 +384,10 @@ index 1012a909ef1fcae51c218ae519fe7e0db65ab087..127b1ae940bc9313aecb635e2b01bb6f
int opener_render_process_id,
int opener_render_frame_id,
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
index 7ca1e83ba1fd2dc5ea7c7ce644c3b7c54b9999f9..c1639653714d6973bcb5a0b37cb7028db8406742 100644
index b8f48c883d7adfd765b1561fd00e563ab54d20f5..0b3d8eef0ed0021d3546ff963e721eae277dcb1b 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -206,8 +206,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
@@ -207,8 +207,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -394,10 +398,10 @@ index 7ca1e83ba1fd2dc5ea7c7ce644c3b7c54b9999f9..c1639653714d6973bcb5a0b37cb7028d
->options()
->block_new_web_contents();
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
index bf432db4ca8463f2451dc09d5ca484da1235634f..e144be74ce2d34f50d26d08d5bf206f7aa64c5d3 100644
index 42e0654da5659ba647529c4b0b97ec5df61d59a1..406e2ca73c182005014b56824e89ddfb25fd28f5 100644
--- a/ui/views/controls/webview/web_dialog_view.cc
+++ b/ui/views/controls/webview/web_dialog_view.cc
@@ -487,8 +487,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
@@ -490,8 +490,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -408,10 +412,10 @@ index bf432db4ca8463f2451dc09d5ca484da1235634f..e144be74ce2d34f50d26d08d5bf206f7
return delegate_->HandleShouldOverrideWebContentsCreation();
}
diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
index c96aeb2571961fa2ad033ca38600006e0e657699..2c733734103bf2cc0af9bcfb32d753053a287775 100644
index 0fa7e807d22f6f04b84f2d949fbdf892b94996bf..b0490ae36c9999a766bbf346e35807740f4f9af6 100644
--- a/ui/views/controls/webview/web_dialog_view.h
+++ b/ui/views/controls/webview/web_dialog_view.h
@@ -167,8 +167,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
@@ -168,8 +168,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,

View File

@@ -1,49 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Sat, 22 Feb 2025 13:15:39 -0600
Subject: chore: remove conflicting allow_unsafe_libc_calls
We want builds to fail if a buffer warning comes from Electron code but
not from code that we don't maintain (e.g. upstream Chromium code), so
//electron/electron_unsafe_buffer_paths.txt turns off Chromium warnings.
There are some upstream files that generate warnings *and* also have
pragmas that override //electron/electron_unsafe_buffer_paths.txt,
forcing them to be tested. This breaks our build.
Files can be removed from this patch when upstream either removes the
pragma or fixes the other warnings. This patch can be removed when no
files are left.
diff --git a/net/cookies/parsed_cookie.cc b/net/cookies/parsed_cookie.cc
index 7d5d0106a3675b3fa21b0e00a755f5c0ed11c87b..d26c645d70b54b31815c8140954ee6d0a34fa8af 100644
--- a/net/cookies/parsed_cookie.cc
+++ b/net/cookies/parsed_cookie.cc
@@ -2,11 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef UNSAFE_BUFFERS_BUILD
-// TODO(crbug.com/390223051): Remove C-library calls to fix the errors.
-#pragma allow_unsafe_libc_calls
-#endif
-
// Portions of this code based on Mozilla:
// (netwerk/cookie/src/nsCookieService.cpp)
/* ***** BEGIN LICENSE BLOCK *****
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index 11572f927d97da20627dec498b92e445b5db4589..9b02d35a19d8610ade71b96c11551a1050847b49 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -2,11 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifdef UNSAFE_BUFFERS_BUILD
-// TODO(crbug.com/390223051): Remove C-library calls to fix the errors.
-#pragma allow_unsafe_libc_calls
-#endif
-
// The rules for header parsing were borrowed from Firefox:
// http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/http/src/nsHttpResponseHead.cpp
// The rules for parsing content-types were also borrowed from Firefox:

View File

@@ -11,7 +11,7 @@ not need this dependency.
refs https://chromium-review.googlesource.com/c/chromium/src/+/5573603
diff --git a/chrome/browser/ui/color/BUILD.gn b/chrome/browser/ui/color/BUILD.gn
index 77c7485b0fa885ddff38f336d1c7a52f2e969c73..045c0751a0c43f3360e334dd227b6cff7ddfd681 100644
index 29c3dafa96df631e36aa1ced6798990c768adeaa..0281a50f04fecfc4ded3805a8f9637e184288581 100644
--- a/chrome/browser/ui/color/BUILD.gn
+++ b/chrome/browser/ui/color/BUILD.gn
@@ -84,9 +84,6 @@ source_set("mixers") {

View File

@@ -39,10 +39,10 @@ index e87c180342b967756efeb701c73207fcee8754f1..42e37564e585987d367921568f0f1d2b
NOTREACHED();
}
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
index c98ecc36007185052481b6479b2ba4608e326021..dd0e4553b78997beea0f11242eeb9f759359066f 100644
index b6985bd63a34c55154fcfae601add6ce6c451704..fb44cc65b1a15c8b69410a2a2cb925a0326bb438 100644
--- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
@@ -111,7 +111,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
@@ -147,7 +147,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
const bool registered =
platform_global_shortcut_listener_->RegisterAccelerator(
accelerator.key_code(), accelerator.IsAltDown(),
@@ -52,7 +52,7 @@ index c98ecc36007185052481b6479b2ba4608e326021..dd0e4553b78997beea0f11242eeb9f75
if (registered) {
registered_hot_keys_.insert(accelerator);
}
@@ -126,14 +127,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
@@ -162,14 +163,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
platform_global_shortcut_listener_->UnregisterAccelerator(
accelerator.key_code(), accelerator.IsAltDown(), accelerator.IsCtrlDown(),
@@ -70,7 +70,7 @@ index c98ecc36007185052481b6479b2ba4608e326021..dd0e4553b78997beea0f11242eeb9f75
int modifiers = 0;
if (is_alt_down) {
modifiers |= ui::EF_ALT_DOWN;
@@ -144,6 +146,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
@@ -180,6 +182,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
if (is_shift_down) {
modifiers |= ui::EF_SHIFT_DOWN;
}
@@ -95,10 +95,10 @@ index 9e63dd9d33abc89a7bbef75992925356470ebb26..9071afc9bb01db832164909a202effaf
bool is_listening_ = false;
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_win.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_win.cc
index 034ccea0cda4265abbfc889178f4cba4f3bd7eb8..384f0968aca07cde1fe6434a318e5334f6ecbe9e 100644
index d3838460df1f61dbcee1cc6586632cb218fec97a..4351cfeea03b8adc5da8500db1faf6d8b8811454 100644
--- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_win.cc
+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_win.cc
@@ -67,6 +67,8 @@ void GlobalAcceleratorListenerWin::OnWndProc(HWND hwnd,
@@ -66,6 +66,8 @@ void GlobalAcceleratorListenerWin::OnWndProc(HWND hwnd,
modifiers |= (LOWORD(lparam) & MOD_SHIFT) ? ui::EF_SHIFT_DOWN : 0;
modifiers |= (LOWORD(lparam) & MOD_ALT) ? ui::EF_ALT_DOWN : 0;
modifiers |= (LOWORD(lparam) & MOD_CONTROL) ? ui::EF_CONTROL_DOWN : 0;
@@ -107,7 +107,7 @@ index 034ccea0cda4265abbfc889178f4cba4f3bd7eb8..384f0968aca07cde1fe6434a318e5334
ui::Accelerator accelerator(ui::KeyboardCodeForWindowsKeyCode(key_code),
modifiers);
@@ -97,6 +99,7 @@ bool GlobalAcceleratorListenerWin::StartListeningForAccelerator(
@@ -96,6 +98,7 @@ bool GlobalAcceleratorListenerWin::StartListeningForAccelerator(
modifiers |= accelerator.IsShiftDown() ? MOD_SHIFT : 0;
modifiers |= accelerator.IsCtrlDown() ? MOD_CONTROL : 0;
modifiers |= accelerator.IsAltDown() ? MOD_ALT : 0;

View File

@@ -116,10 +116,10 @@ index 42fe73aefe44f218d6a5e8cb1550ff48859c4b70..a1235f0c7ad44ae9c9fdc805af5b9dc5
arguments.push_back("--monitor-self");
}
diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc
index 0e00d26f79231a01e88981b30ff950e427cd31f4..70f014c75031f9529501e102f97e0e1adadb8ffb 100644
index 5b811cbbc51544cbff7c2e99c3a7ced824990002..f2376d74fbd2c8196184035fc0fb24a0a8ebfe0e 100644
--- a/components/crash/core/app/crashpad_win.cc
+++ b/components/crash/core/app/crashpad_win.cc
@@ -92,6 +92,7 @@ bool PlatformCrashpadInitialization(
@@ -93,6 +93,7 @@ bool PlatformCrashpadInitialization(
std::map<std::string, std::string> process_annotations;
GetPlatformCrashpadAnnotations(&process_annotations);
@@ -127,7 +127,7 @@ index 0e00d26f79231a01e88981b30ff950e427cd31f4..70f014c75031f9529501e102f97e0e1a
std::string url = crash_reporter_client->GetUploadUrl();
@@ -129,6 +130,13 @@ bool PlatformCrashpadInitialization(
@@ -133,6 +134,13 @@ bool PlatformCrashpadInitialization(
std::vector<std::string> arguments(start_arguments);

View File

@@ -7,10 +7,10 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 7550d3eb796059aeb108f25071c8028bddebb100..db59a147bd6b4fb596170d9b86c5e71a20b62abc 100644
index d55c408557e15650897c9ed6d5b6bd83178a551f..f1c54919990af204004380b0d84ee750de5e3c35 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -273,8 +273,13 @@ void AsanProcessInfoCB(const char*, bool*) {
@@ -275,8 +275,13 @@ void AsanProcessInfoCB(const char*, bool*) {
}
#endif // defined(ADDRESS_SANITIZER)
@@ -25,7 +25,7 @@ index 7550d3eb796059aeb108f25071c8028bddebb100..db59a147bd6b4fb596170d9b86c5e71a
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
base::FileDescriptorStore& file_descriptor_store =
base::FileDescriptorStore::GetInstance();
@@ -303,11 +308,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
@@ -305,11 +310,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
#endif // V8_USE_EXTERNAL_STARTUP_DATA
@@ -40,7 +40,7 @@ index 7550d3eb796059aeb108f25071c8028bddebb100..db59a147bd6b4fb596170d9b86c5e71a
#endif // V8_USE_EXTERNAL_STARTUP_DATA
}
@@ -980,7 +986,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
@@ -1005,7 +1011,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
return TerminateForFatalInitializationError();
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
@@ -94,7 +94,7 @@ index db611d99a6c0f18f39967b38791822fda7d175b5..cc150475de655d5ef20a107ae3ef80c0
friend class ContentClientCreator;
friend class ContentClientInitializer;
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 11cafc3e1588cce52b76cc2f09f66b3e451fb087..e07bdaeccecc8015462e35d5cf4606335e2e962c 100644
index c79f996e2cbfe3e71f7de29424329dfc0d39a726..03c9bc18566794a668981bba6235b226e07eff74 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -660,8 +660,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,

View File

@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index ff25eb3670d2391c6fb41b7c612c30ee8798983f..116763b520713a5c61462b2e048a7358486831a2 100644
index 8d92bd66121e43992a1e26f7d5860b803ec8c3cb..edbf15cdbc45918d5ec86220cfe8c5398fa1af2c 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1969,6 +1969,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1979,6 +1979,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
loader_factory_bundle_info =
context()->loader_factory_bundle_for_update_check()->Clone();
@@ -38,7 +38,7 @@ index ff25eb3670d2391c6fb41b7c612c30ee8798983f..116763b520713a5c61462b2e048a7358
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
browser_context(), scope)) {
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
@@ -1988,9 +2008,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1998,9 +2018,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeScheme) &&
scope.scheme_piece() == kChromeUIScheme) {
config->RegisterURLDataSource(browser_context());
@@ -49,7 +49,7 @@ index ff25eb3670d2391c6fb41b7c612c30ee8798983f..116763b520713a5c61462b2e048a7358
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
browser_context(), kChromeUIScheme,
base::flat_set<std::string>()));
@@ -1998,9 +2016,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -2008,9 +2026,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeUntrusted) &&
scope.scheme_piece() == kChromeUIUntrustedScheme) {
config->RegisterURLDataSource(browser_context());

View File

@@ -41,7 +41,7 @@ index a82e0b1a7e999817c8ee420ceddeb7ca9ee78caf..e07f4ded61a7a64983da1b6d07315aee
int DesktopMediaListBase::GetSourceCount() const {
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
index 9368d56f2b434b1a7101f28908f070ad9908be7e..804eb2c7ede137b8c9d0cf43042ff7f20dad5b91 100644
index de56c9b94f92e9abf69b1d4894e5d386cad6d3cd..f8955ef7cc43b1854b29841ed65260a1966a4b19 100644
--- a/chrome/browser/media/webrtc/desktop_media_list_base.h
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.h
@@ -39,7 +39,7 @@ class DesktopMediaListBase : public DesktopMediaList {

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 1a726fb4a9e8173dc7da6901eb1632c7f326358e..ae8a4117db2f6bac1d62981e7c0e35cf1eee68da 100644
index dc1dc1c15db217c4b8640b9c6ec6c051c0abb12b..52d8e830a68a6dfa3e3065548df3b69a5756ede2 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -561,7 +561,11 @@
@@ -560,7 +560,11 @@
return;
host()->WasHidden();

View File

@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
Electron uses this to disable background throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 573269ba54150d5350e5c3589217c5e7f41d560d..20fcda4eb20459b69247003c51c2a3ed37c7b1e8 100644
index 252edf0bb40ba4c16061425013d9e4c559b91e78..624094ba6459f3663a12f868c4cb47dfa9f8dce1 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -832,6 +832,10 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -833,6 +833,10 @@ void RenderWidgetHostImpl::WasHidden() {
return;
}
@@ -21,10 +21,10 @@ index 573269ba54150d5350e5c3589217c5e7f41d560d..20fcda4eb20459b69247003c51c2a3ed
// Prompts should remain open and functional across tab switches.
if (!delegate_ || !delegate_->IsWaitingForPointerLockPrompt(this)) {
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 3b3eec99c80a8d3081bb0b1b5cfda76c70d8d23c..d4a2affd94a2aa11299222822485e9df84da18fc 100644
index f24d02054c89c8bc6b75e127146cb97a72e3f94a..9b8919ab2d8c9432c5d908337e7a19bd055b440e 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -1016,6 +1016,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -1021,6 +1021,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// Requests a commit and forced redraw in the renderer compositor.
void ForceRedrawForTesting();
@@ -35,7 +35,7 @@ index 3b3eec99c80a8d3081bb0b1b5cfda76c70d8d23c..d4a2affd94a2aa11299222822485e9df
// |routing_id| must not be MSG_ROUTING_NONE.
// If this object outlives |delegate|, DetachDelegate() must be called when
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 5867fc3e77326991f30d835d08d3cfafe2b6687c..d719b546b8c3c59003698b26dead065da7d76341 100644
index e6235611a2ae643f4c968fcc0dcd5b47baa0a081..a13dd521b7263c66c94dac3d3caf6ebbed92d229 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -643,7 +643,7 @@ void RenderWidgetHostViewAura::HideImpl() {

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 d05708d42a0dc1aea4faad3be19f558c93e93265..13dda0bf6560ca03c4c88e787cc4165dfe745b26 100644
index 3c736de224325fec247308ea8adef3c1186029f9..8b5fd128120b2a4db387bf42b632c9e2e94f7cd4 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -1464,6 +1464,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1478,6 +1478,7 @@ void Navigator::RecordNavigationMetrics(
.InMilliseconds());
}
@@ -35,7 +35,7 @@ index d05708d42a0dc1aea4faad3be19f558c93e93265..13dda0bf6560ca03c4c88e787cc4165d
// 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 &&
@@ -1513,6 +1514,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1527,6 +1528,7 @@ void Navigator::RecordNavigationMetrics(
first_before_unload_start_time)
.InMilliseconds());
}

View File

@@ -1,68 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mitsuru Oshima <oshima@chromium.org>
Date: Thu, 17 Apr 2025 16:49:21 -0700
Subject: Do not check the order of Display ID order on Windows
Id is generated by Windows side logic so this rule isn't applicable.
Bug: 394622418
Change-Id: I79c7f91103c6b752b6a7a123aacd3573a9ab815f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6471333
Reviewed-by: Vincent Chiang <vincentchiang@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1448671}
diff --git a/ui/display/display_layout.cc b/ui/display/display_layout.cc
index 0d3746d8174868b743990b5ab10b3506819ef0ea..85d5c06851148576ab4dd272918215335292b4aa 100644
--- a/ui/display/display_layout.cc
+++ b/ui/display/display_layout.cc
@@ -500,6 +500,7 @@ void DisplayLayout::ApplyToDisplayList(Displays* display_list,
if (!DisplayLayout::Validate(DisplayListToDisplayIdList(*display_list),
*this)) {
// Prevent invalid and non-relevant display layouts.
+ LOG(ERROR) << "Invalid Display Layout";
return;
}
@@ -549,15 +550,19 @@ bool DisplayLayout::Validate(const DisplayIdList& list,
bool has_primary_as_parent = false;
// The placement list must be sorted by the first 8 bits of the display IDs.
+#if BUILDFLAG(IS_CHROMEOS)
int64_t prev_id = std::numeric_limits<int8_t>::min();
+#endif // BUILDFLAG(IS_CHROMEOS)
for (const auto& placement : layout.placement_list) {
- // Placements are sorted by display_id.
+#if BUILDFLAG(IS_CHROMEOS)
+ // Placements are sorted by display_id on ChromeOS.
if (prev_id >= (placement.display_id & 0xFF)) {
DISPLAY_LOG(ERROR) << "PlacementList must be sorted by first 8 bits of"
<< " display_id ";
return false;
}
prev_id = (placement.display_id & 0xFF);
+#endif // BUILDFLAG(IS_CHROMEOS)
if (placement.display_id == kInvalidDisplayId) {
DISPLAY_LOG(ERROR) << "display_id is not initialized";
return false;
diff --git a/ui/display/display_layout_unittest.cc b/ui/display/display_layout_unittest.cc
index 68327c8a6b71853a0f1bf3c0351e38865bcbe054..4ea830ef086eb009c692a0b90b100eaaed303fd0 100644
--- a/ui/display/display_layout_unittest.cc
+++ b/ui/display/display_layout_unittest.cc
@@ -122,6 +122,7 @@ TEST(DisplayLayoutTest, SwapPrimaryDisplayThreeDisplays) {
EXPECT_EQ(Position::RIGHT, layout->placement_list[1].position);
}
+#if BUILDFLAG(IS_CHROMEOS)
// Makes sure that only the least significant 8 bits of the display IDs in the
// placement lists are used to validate their sort order.
TEST(DisplayLayoutTest, PlacementSortOrder) {
@@ -148,6 +149,8 @@ TEST(DisplayLayoutTest, PlacementSortOrder) {
EXPECT_TRUE(DisplayLayout::Validate({456, 0x0504, 0x0605, 0x0406}, *layout));
}
+#endif // BUILDFLAG(IS_CHROMEOS)
+
namespace {
class TwoDisplays

View File

@@ -6,10 +6,10 @@ 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 82e6f7c91bac6e8a973947dace1a33de8078a86b..1d298f66a2c2a0f02668af797b3a421fe5578d56 100644
index 93cede29651ef2fc0a77c6a7a569f9b8d1fe4ba9..cc9f13770da77d9522a48abeb9d831b7b8b742f9 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
@@ -636,7 +636,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
@@ -609,7 +609,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
void DesktopWindowTreeHostWin::SetAspectRatio(
const gfx::SizeF& aspect_ratio,
const gfx::Size& excluded_margin) {
@@ -19,10 +19,10 @@ index 82e6f7c91bac6e8a973947dace1a33de8078a86b..1d298f66a2c2a0f02668af797b3a421f
excluded_margin);
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index a183cfe07b357e0b17e3781e85b79f7c371cbea8..ea67a60d78f4adec960bb4954486420bce423c14 100644
index 1a8943c86cb1bb79f83bfd867619b805aaa0c329..6df5e54cefe71393cb6189cc15240d21d2262059 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1010,8 +1010,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
@@ -993,8 +993,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
const gfx::Size& excluded_margin) {

View File

@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index ee56aab6831be256390b88e65a2a949c591bbd31..60c6977d2ffd0da0286e25e5645c11c19d6ab376 100644
index b91e9da008c121d2afbc5fd4c3c9ea401a6191a8..0b3d0538bd10c0364aa4b1a928f135893ddc7864 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1814,6 +1814,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1842,6 +1842,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@@ -51,10 +51,10 @@ index ee56aab6831be256390b88e65a2a949c591bbd31..60c6977d2ffd0da0286e25e5645c11c1
// 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 930e0bd987c48d111b2c8d71147c09e4418bda6c..9373a53c5cac879c689fcea77f1dbbb32cf35b9e 100644
index fcddda19a4d37052312748a6dd4e5ffdee1d240b..259d97bb314273600ad0541260043ea0ff02e015 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -323,6 +323,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -326,6 +326,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override;
@@ -63,10 +63,10 @@ index 930e0bd987c48d111b2c8d71147c09e4418bda6c..9373a53c5cac879c689fcea77f1dbbb3
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 399d0363749e9b79749185bcc1dcd746b026231e..1abd312f068e9326e4a9f95ed58bdb04e35afea8 100644
index de945e5f2cb5398c37617fce5e00834b481d3875..0ca66dd8038a0410c4949d9a00f43c156c3b46c5 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1275,6 +1275,9 @@ interface NetworkContext {
@@ -1282,6 +1282,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);
@@ -77,10 +77,10 @@ index 399d0363749e9b79749185bcc1dcd746b026231e..1abd312f068e9326e4a9f95ed58bdb04
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index da8551db16849cf82a6e3a7eaeb451cae0707f2d..6e20b8dd4f134ea7a8808223cd59064d89f5ce09 100644
index c57dcce278f96c9bd3157fd5d2ce0f9d0ecbef53..5a86df4d57aa255b63e503050d31320e80124700 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -158,6 +158,7 @@ class TestNetworkContext : public mojom::NetworkContext {
@@ -159,6 +159,7 @@ class TestNetworkContext : public mojom::NetworkContext {
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override {}

View File

@@ -12,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 f470ada1bf84938427fb89f4508e5f56aaeebc1f..524928729e34cc6b2ae427181e2ac4f8c1128688 100644
index 2390395a3df10aca3510a619e91dab674de60e67..f8fae134e122a223440530bd696db899dce2fe56 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -171,6 +171,7 @@
@@ -172,6 +172,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 f470ada1bf84938427fb89f4508e5f56aaeebc1f..524928729e34cc6b2ae427181e2ac4f8
#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"
@@ -1861,6 +1862,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
@@ -1864,6 +1865,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

@@ -13,19 +13,20 @@ app.requestSingleInstanceLock API so that users can pass in a JSON
object for the second instance to send to the first instance.
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
index 31f5b160e4cd755cfb56a62b04261ee1bee80277..4305ba61d2489c5817785077d1ace8767b41bdde 100644
index 2748dd196fe1f56357348a204e24f0b8a28b97dd..5800dd00b47c657d9e6766f3fc5a30654cffffa6 100644
--- a/chrome/browser/process_singleton.h
+++ b/chrome/browser/process_singleton.h
@@ -18,6 +18,8 @@
@@ -18,7 +18,8 @@
#include "base/functional/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h"
#include "base/process/process.h"
-
+#include "base/containers/span.h"
+#include "base/memory/raw_span.h"
#include "ui/gfx/native_widget_types.h"
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID)
@@ -100,21 +102,24 @@ class ProcessSingleton {
#include "base/files/scoped_temp_dir.h"
#endif
@@ -99,21 +100,24 @@ class ProcessSingleton {
// should handle it (i.e., because the current process is shutting down).
using NotificationCallback =
base::RepeatingCallback<bool(base::CommandLine command_line,
@@ -52,7 +53,7 @@ index 31f5b160e4cd755cfb56a62b04261ee1bee80277..4305ba61d2489c5817785077d1ace876
~ProcessSingleton();
// Notify another process, if available. Otherwise sets ourselves as the
@@ -178,7 +183,10 @@ class ProcessSingleton {
@@ -177,7 +181,10 @@ class ProcessSingleton {
#endif
private:
@@ -179,7 +180,7 @@ index 08cbe32a258bf478f1da0a07064d3e9ef14c44a5..b9f2a43cb90fac4b031a4b4da38d6435
if (!WriteToSocket(socket.fd(), to_send.data(), to_send.length())) {
// Try to kill the other process, because it might have been dead.
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
index d91f58ebe3a024bc41ed72121c49172f68e0d862..255160d6bd6b2ea1cd640fde8f4b4ce598148418 100644
index d91f58ebe3a024bc41ed72121c49172f68e0d862..7b85ba5ed8d0c2a152899ad65f275e6680a93dba 100644
--- a/chrome/browser/process_singleton_win.cc
+++ b/chrome/browser/process_singleton_win.cc
@@ -81,10 +81,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) {
@@ -197,7 +198,7 @@ index d91f58ebe3a024bc41ed72121c49172f68e0d862..255160d6bd6b2ea1cd640fde8f4b4ce5
static const int min_message_size = 7;
if (cds->cbData < min_message_size * sizeof(wchar_t) ||
cds->cbData % sizeof(wchar_t) != 0) {
@@ -134,6 +136,37 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds,
@@ -134,6 +136,23 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds,
const std::wstring cmd_line =
msg.substr(second_null + 1, third_null - second_null);
*parsed_command_line = base::CommandLine::FromString(cmd_line);
@@ -210,32 +211,18 @@ index d91f58ebe3a024bc41ed72121c49172f68e0d862..255160d6bd6b2ea1cd640fde8f4b4ce5
+ return true;
+ }
+
+ // Get length of the additional data.
+ const std::wstring additional_data_length_string =
+ msg.substr(third_null + 1, fourth_null - third_null);
+ size_t additional_data_length;
+ base::StringToSizeT(additional_data_length_string, &additional_data_length);
+
+ const std::wstring::size_type fifth_null =
+ msg.find_first_of(L'\0', fourth_null + 1);
+ if (fifth_null == std::wstring::npos ||
+ fifth_null == msg.length()) {
+ LOG(WARNING) << "Invalid format for start command, we need a string in 6 "
+ "parts separated by NULLs";
+ }
+
+ // Get the actual additional data.
+ const std::wstring additional_data =
+ msg.substr(fourth_null + 1, fifth_null - fourth_null);
+ const uint8_t* additional_data_bytes =
+ reinterpret_cast<const uint8_t*>(additional_data.c_str());
+ *parsed_additional_data = std::vector<uint8_t>(additional_data_bytes,
+ additional_data_bytes + additional_data_length);
+ msg.substr(third_null + 1, fourth_null - third_null);
+ base::span<const uint8_t> additional_data_bytes =
+ base::as_byte_span(additional_data);
+ *parsed_additional_data = std::vector<uint8_t>(
+ additional_data_bytes.begin(), additional_data_bytes.end());
+
return true;
}
return false;
@@ -155,13 +188,14 @@ bool ProcessLaunchNotification(
@@ -155,13 +174,14 @@ bool ProcessLaunchNotification(
base::CommandLine parsed_command_line(base::CommandLine::NO_PROGRAM);
base::FilePath current_directory;
@@ -253,7 +240,7 @@ index d91f58ebe3a024bc41ed72121c49172f68e0d862..255160d6bd6b2ea1cd640fde8f4b4ce5
return true;
}
@@ -265,9 +299,11 @@ bool ProcessSingleton::EscapeVirtualization(
@@ -265,9 +285,11 @@ bool ProcessSingleton::EscapeVirtualization(
ProcessSingleton::ProcessSingleton(
const std::string& program_name,
const base::FilePath& user_data_dir,
@@ -265,7 +252,7 @@ index d91f58ebe3a024bc41ed72121c49172f68e0d862..255160d6bd6b2ea1cd640fde8f4b4ce5
program_name_(program_name),
is_app_sandboxed_(is_app_sandboxed),
is_virtualized_(false),
@@ -294,7 +330,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
@@ -294,7 +316,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
return PROCESS_NONE;
}
@@ -275,7 +262,7 @@ index d91f58ebe3a024bc41ed72121c49172f68e0d862..255160d6bd6b2ea1cd640fde8f4b4ce5
return PROCESS_NOTIFIED;
case NotifyChromeResult::NOTIFY_FAILED:
diff --git a/chrome/browser/win/chrome_process_finder.cc b/chrome/browser/win/chrome_process_finder.cc
index 019ac7e93e009a713ce56ee8bcacf467b4fe769d..9417403bb9cacd0572b37493ab2d98130313db4d 100644
index 019ac7e93e009a713ce56ee8bcacf467b4fe769d..283693966c041340983aa78a95f8a274db601fb4 100644
--- a/chrome/browser/win/chrome_process_finder.cc
+++ b/chrome/browser/win/chrome_process_finder.cc
@@ -39,7 +39,9 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir) {
@@ -289,13 +276,13 @@ index 019ac7e93e009a713ce56ee8bcacf467b4fe769d..9417403bb9cacd0572b37493ab2d9813
TRACE_EVENT0("startup", "AttemptToNotifyRunningChrome");
DCHECK(remote_window);
@@ -68,12 +70,29 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) {
@@ -68,12 +70,24 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) {
new_command_line.AppendSwitchNative(switches::kSourceShortcut, si.lpTitle);
// Send the command line to the remote chrome window.
- // Format is "START\0<<<current directory>>>\0<<<commandline>>>".
+ // Format is
+ // "START\0<current-directory>\0<command-line>\0<additional-data-length>\0<additional-data>".
+ // "START\0<current-directory>\0<command-line>\0<additional-data>".
std::wstring to_send = base::StrCat(
{std::wstring_view{L"START\0", 6}, cur_dir.value(),
std::wstring_view{L"\0", 1}, new_command_line.GetCommandLineString(),
@@ -303,11 +290,6 @@ index 019ac7e93e009a713ce56ee8bcacf467b4fe769d..9417403bb9cacd0572b37493ab2d9813
+ size_t additional_data_size = additional_data.size_bytes();
+ if (additional_data_size) {
+ // Send over the size, because the reinterpret cast to wchar_t could
+ // add padding.
+ to_send.append(base::UTF8ToWide(base::NumberToString(additional_data_size)));
+ to_send.append(L"\0", 1); // Null separator.
+
+ size_t padded_size = additional_data_size / sizeof(wchar_t);
+ if (additional_data_size % sizeof(wchar_t) != 0) {
+ padded_size++;

View File

@@ -62,10 +62,10 @@ index 97cceb20da0fccf0603cf2d4b1c8985314b1e850..0632d7fdc975dfdc3cc24bd8e641a268
SEQUENCE_CHECKER(sequence_checker_);
};
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index dcf2d14d92f8b5a5dd7bf22f8ce00f030824c989..04d0f5d9416eaba569f49a25e7e8c1a89e50ecfe 100644
index 0c6d689295a03fc088b57487037d85f4d634a5f4..8e3bab233e8611c68e79d53f125560f4fb086a1e 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -696,6 +696,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
@@ -697,6 +697,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
if (InForcedColorsMode() && !IsForcedDarkMode()) {
return false;
}

View File

@@ -149,7 +149,7 @@ index 402355cb836cea14e9ee725a142a4bad44fd5bed..7e7f028dcfb87c7b80adebabac19ced8
void* FromV8Impl(v8::Isolate* isolate, v8::Local<v8::Value> val,
diff --git a/gin/wrappable.h b/gin/wrappable.h
index 4e7115685a5bf6997e78edcc1851e28bd00b1aa2..ca51fe33605e855438e88969e3d3cc734ef4523e 100644
index 2ae2cf67157ce8b161ae917291a913d237b7d535..c8c8cbe84e946cebde97a71b42815c62ccaf7b96 100644
--- a/gin/wrappable.h
+++ b/gin/wrappable.h
@@ -80,6 +80,13 @@ class GIN_EXPORT WrappableBase {

View File

@@ -13,7 +13,7 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass
then refers to the list so that it can correctly determine the data source's settings.
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
index c19436994faa21246c8c2e53e96c7ce3fffede4f..31c2efe2acd8c11bb5a861fa42841fe0e76c1141 100644
index 3e010fbec46d799839a2c50ed14c1d5744e99a30..ed98c853ba013acb8908a1651742d510bc8e4475 100644
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
@@ -11,8 +11,10 @@
@@ -48,7 +48,7 @@ index c19436994faa21246c8c2e53e96c7ce3fffede4f..31c2efe2acd8c11bb5a861fa42841fe0
class MultiBufferDataSource::ReadOperation {
public:
ReadOperation() = delete;
@@ -160,7 +174,14 @@ bool MultiBufferDataSource::media_has_played() const {
@@ -149,7 +163,14 @@ bool MultiBufferDataSource::media_has_played() const {
bool MultiBufferDataSource::AssumeFullyBuffered() const {
DCHECK(url_data_);
@@ -65,7 +65,7 @@ index c19436994faa21246c8c2e53e96c7ce3fffede4f..31c2efe2acd8c11bb5a861fa42841fe0
void MultiBufferDataSource::SetReader(
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h
index 5277d480ce3ac065501a986b323e8f3a983acd75..6666dd87cd8971c7ed05a4bc141e19b9be549e54 100644
index e886847425b1ea0b620a60e7b477249efac3c689..92dea7a9f491bb548f68d918ebde60cbf2a7d67f 100644
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h
@@ -17,6 +17,7 @@

View File

@@ -260,97 +260,12 @@ index 61683d0eddb04c494ca5e650e7d556b44968ec49..5492456a9138b250e97a5479838bb443
+ bool allow_multiple_selection_ = false;
};
} // namespace ui
diff --git a/ui/shell_dialogs/select_file_dialog_linux_kde.cc b/ui/shell_dialogs/select_file_dialog_linux_kde.cc
index 9d45ec49a4fb5e12407b65b83c1ba0c13cd0dfd8..400cce91b020ecd5e48566f125515d2cfe3ea6af 100644
--- a/ui/shell_dialogs/select_file_dialog_linux_kde.cc
+++ b/ui/shell_dialogs/select_file_dialog_linux_kde.cc
@@ -155,9 +155,20 @@ class SelectFileDialogLinuxKde : public SelectFileDialogLinux {
void OnSelectMultiFileDialogResponse(
gfx::AcceleratedWidget parent,
std::unique_ptr<KDialogOutputParams> results);
+
+ // Common function for OnSelectSingleFolderDialogResponse and
+ // OnSelectMultiFileDialogResponse.
+ void SelectMultiFileDialogHelper(
+ bool allow_folder,
+ gfx::AcceleratedWidget parent,
+ std::unique_ptr<KDialogOutputParams> results);
+
void OnSelectSingleFolderDialogResponse(
gfx::AcceleratedWidget parent,
std::unique_ptr<KDialogOutputParams> results);
+ void OnSelectMultiFolderDialogResponse(
+ gfx::AcceleratedWidget parent,
+ std::unique_ptr<KDialogOutputParams> results);
// Should be either DESKTOP_ENVIRONMENT_KDE3, KDE4, KDE5, or KDE6.
base::nix::DesktopEnvironment desktop_;
@@ -468,6 +479,7 @@ void SelectFileDialogLinuxKde::CreateSelectFolderDialog(
int title_message_id = (type == SELECT_UPLOAD_FOLDER)
? IDS_SELECT_UPLOAD_FOLDER_DIALOG_TITLE
: IDS_SELECT_FOLDER_DIALOG_TITLE;
+ bool multiple_selection = allow_multiple_selection();
pipe_task_runner_->PostTaskAndReplyWithResult(
FROM_HERE,
base::BindOnce(
@@ -475,10 +487,12 @@ void SelectFileDialogLinuxKde::CreateSelectFolderDialog(
KDialogParams(
"--getexistingdirectory", GetTitle(title, title_message_id),
default_path.empty() ? *last_opened_path() : default_path, parent,
- false, false)),
+ false, multiple_selection)),
base::BindOnce(
- &SelectFileDialogLinuxKde::OnSelectSingleFolderDialogResponse, this,
- parent));
+ multiple_selection
+ ? &SelectFileDialogLinuxKde::OnSelectMultiFolderDialogResponse
+ : &SelectFileDialogLinuxKde::OnSelectSingleFolderDialogResponse,
+ this, parent));
}
void SelectFileDialogLinuxKde::CreateFileOpenDialog(
@@ -568,7 +582,8 @@ void SelectFileDialogLinuxKde::OnSelectSingleFolderDialogResponse(
SelectSingleFileHelper(true, std::move(results));
}
-void SelectFileDialogLinuxKde::OnSelectMultiFileDialogResponse(
+void SelectFileDialogLinuxKde::SelectMultiFileDialogHelper(
+ bool allow_folder,
gfx::AcceleratedWidget parent,
std::unique_ptr<KDialogOutputParams> results) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -586,7 +601,7 @@ void SelectFileDialogLinuxKde::OnSelectMultiFileDialogResponse(
base::SplitStringPiece(results->output, "\n", base::KEEP_WHITESPACE,
base::SPLIT_WANT_NONEMPTY)) {
base::FilePath path(line);
- if (CallDirectoryExistsOnUIThread(path))
+ if (!allow_folder && CallDirectoryExistsOnUIThread(path))
continue;
filenames_fp.push_back(path);
}
@@ -598,4 +613,16 @@ void SelectFileDialogLinuxKde::OnSelectMultiFileDialogResponse(
MultiFilesSelected(filenames_fp);
}
+void SelectFileDialogLinuxKde::OnSelectMultiFolderDialogResponse(
+ gfx::AcceleratedWidget parent,
+ std::unique_ptr<KDialogOutputParams> results) {
+ SelectMultiFileDialogHelper(true, parent, std::move(results));
+}
+
+void SelectFileDialogLinuxKde::OnSelectMultiFileDialogResponse(
+ gfx::AcceleratedWidget parent,
+ std::unique_ptr<KDialogOutputParams> results) {
+ SelectMultiFileDialogHelper(false, parent, std::move(results));
+}
+
} // namespace ui
diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.cc b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
index b23d357d4e21f10be82f0ea37b1ec3e959fc2c0b..e768afc05b42d4d026c88f1516d4e9db84e8dff6 100644
index 8dafba0690d9cde3506b60a21ba36c49394d9125..03fdd2d86e776d4be60c52790dcb2946e9341954 100644
--- a/ui/shell_dialogs/select_file_dialog_linux_portal.cc
+++ b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
@@ -28,6 +28,7 @@
@@ -29,6 +29,7 @@
#include "dbus/message.h"
#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
@@ -358,7 +273,7 @@ index b23d357d4e21f10be82f0ea37b1ec3e959fc2c0b..e768afc05b42d4d026c88f1516d4e9db
#include "ui/aura/window_tree_host.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/native_widget_types.h"
@@ -99,7 +100,7 @@ void OnGetPropertyReply(dbus::Response* response) {
@@ -100,7 +101,7 @@ void OnGetPropertyReply(dbus::Response* response) {
: ServiceAvailability::kNotAvailable;
}
@@ -367,7 +282,7 @@ index b23d357d4e21f10be82f0ea37b1ec3e959fc2c0b..e768afc05b42d4d026c88f1516d4e9db
if (!service_started.value_or(false)) {
g_service_availability = ServiceAvailability::kNotAvailable;
return;
@@ -166,18 +167,24 @@ void SelectFileDialogLinuxPortal::StartAvailabilityTestInBackground() {
@@ -167,18 +168,24 @@ void SelectFileDialogLinuxPortal::StartAvailabilityTestInBackground() {
GetMainTaskRunner() = base::SequencedTaskRunner::GetCurrentDefault();
@@ -392,7 +307,7 @@ index b23d357d4e21f10be82f0ea37b1ec3e959fc2c0b..e768afc05b42d4d026c88f1516d4e9db
}
bool SelectFileDialogLinuxPortal::IsRunning(
@@ -382,11 +389,14 @@ DbusDictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
@@ -383,11 +390,14 @@ DbusDictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
const PortalFilterSet& filter_set) {
DbusDictionary dict;
@@ -410,7 +325,7 @@ index b23d357d4e21f10be82f0ea37b1ec3e959fc2c0b..e768afc05b42d4d026c88f1516d4e9db
[[fallthrough]];
case SelectFileDialog::SELECT_FOLDER:
case SelectFileDialog::Type::SELECT_EXISTING_FOLDER:
@@ -399,6 +409,10 @@ DbusDictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
@@ -400,6 +410,10 @@ DbusDictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
break;
}
@@ -418,6 +333,6 @@ index b23d357d4e21f10be82f0ea37b1ec3e959fc2c0b..e768afc05b42d4d026c88f1516d4e9db
+ dict.PutAs(kFileChooserOptionAcceptLabel, DbusString(accept_label));
+ }
+
if (!default_path.empty()) {
if (!default_path.empty() && base::IsStringUTF8(default_path.value())) {
if (default_path_exists) {
// If this is an existing directory, navigate to that directory, with no

View File

@@ -51,7 +51,7 @@ index 04ca1efa6037e6b20294d9b9b9c794356f0e2439..a484a8fb9c32a1ffe20c78afad1f7cf5
"https://redirector.gvt1.com/edgedl/chrome/dict/";
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
index def025dbffec3f44074604fcfb441b769886c3ab..459e8be9dcbf6d3ede156b57abcf9c9ede5587c7 100644
index caeaf418c3fcac7dba27110848205db851328881..52b54d5e88d3b73ca0b44113e2151896cf16e5e7 100644
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
@@ -96,6 +96,8 @@ class SpellcheckHunspellDictionary : public SpellcheckDictionary {

View File

@@ -9,7 +9,7 @@ embedders to make custom schemes allow V8 code cache.
Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/5019665
diff --git a/content/browser/code_cache/generated_code_cache.cc b/content/browser/code_cache/generated_code_cache.cc
index cad3cf44df0c65067d18490ee7694fd0f82153af..0f9b64a81e0c4114bd885b24ff65c458810ceb99 100644
index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa438467fdf4 100644
--- a/content/browser/code_cache/generated_code_cache.cc
+++ b/content/browser/code_cache/generated_code_cache.cc
@@ -8,6 +8,7 @@
@@ -20,7 +20,7 @@ index cad3cf44df0c65067d18490ee7694fd0f82153af..0f9b64a81e0c4114bd885b24ff65c458
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
@@ -32,6 +33,7 @@
@@ -31,6 +32,7 @@
#include "net/http/http_cache.h"
#include "third_party/blink/public/common/scheme_registry.h"
#include "url/gurl.h"
@@ -28,7 +28,7 @@ index cad3cf44df0c65067d18490ee7694fd0f82153af..0f9b64a81e0c4114bd885b24ff65c458
using storage::BigIOBuffer;
@@ -44,7 +46,7 @@ constexpr char kSeparator[] = " \n";
@@ -43,7 +45,7 @@ constexpr char kSeparator[] = " \n";
// We always expect to receive valid URLs that can be used as keys to the code
// cache. The relevant checks (for ex: resource_url is valid, origin_lock is
@@ -37,7 +37,7 @@ index cad3cf44df0c65067d18490ee7694fd0f82153af..0f9b64a81e0c4114bd885b24ff65c458
//
// This function doesn't enforce anything in the production code. It is here
// to make the assumptions explicit and to catch any errors when DCHECKs are
@@ -54,33 +56,55 @@ void CheckValidKeys(const GURL& resource_url,
@@ -53,33 +55,55 @@ void CheckValidKeys(const GURL& resource_url,
GeneratedCodeCache::CodeCacheType cache_type) {
// If the resource url is invalid don't cache the code.
DCHECK(resource_url.is_valid());
@@ -117,10 +117,10 @@ index cad3cf44df0c65067d18490ee7694fd0f82153af..0f9b64a81e0c4114bd885b24ff65c458
// Generates the cache key for the given |resource_url|, |origin_lock| and
diff --git a/content/browser/code_cache/generated_code_cache.h b/content/browser/code_cache/generated_code_cache.h
index c5fb0546fb8724a6ba34b55d8d52b2f70ad5bc0c..883c4022aa58e5eb5345ec4e8815a1374160d96c 100644
index 94602e2319d3f7ed557da98e0598c9f96d986260..0a9a856d8bd9d702eb49e45a54c141a39f5ec622 100644
--- a/content/browser/code_cache/generated_code_cache.h
+++ b/content/browser/code_cache/generated_code_cache.h
@@ -52,12 +52,14 @@ class CONTENT_EXPORT GeneratedCodeCache {
@@ -51,12 +51,14 @@ class CONTENT_EXPORT GeneratedCodeCache {
// Cache type. Used for collecting statistics for JS and Wasm in separate
// buckets.
enum CodeCacheType {
@@ -140,10 +140,10 @@ index c5fb0546fb8724a6ba34b55d8d52b2f70ad5bc0c..883c4022aa58e5eb5345ec4e8815a137
// JavaScript from chrome and chrome-untrusted pages. The resource URLs are
diff --git a/content/browser/code_cache/generated_code_cache_browsertest.cc b/content/browser/code_cache/generated_code_cache_browsertest.cc
index be7a332d8c071f09a2a09c382e7c6c906008c9ec..8227df3c7faa07552c7ce5cc88941285dfa9ca9c 100644
index 8faec12f8a618d587964c1ffaf868dc104fa7311..6294358f6d28864e761d31a1497f96f8cc454788 100644
--- a/content/browser/code_cache/generated_code_cache_browsertest.cc
+++ b/content/browser/code_cache/generated_code_cache_browsertest.cc
@@ -11,17 +11,22 @@
@@ -12,17 +12,22 @@
#include "base/time/time.h"
#include "content/browser/code_cache/generated_code_cache_context.h"
#include "content/browser/renderer_host/code_cache_host_impl.h"
@@ -163,10 +163,10 @@ index be7a332d8c071f09a2a09c382e7c6c906008c9ec..8227df3c7faa07552c7ce5cc88941285
#include "content/shell/browser/shell.h"
#include "content/test/content_browser_test_utils_internal.h"
+#include "content/test/test_content_client.h"
#include "net/base/features.h"
#include "net/dns/mock_host_resolver.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/page/v8_compile_hints_histograms.h"
@@ -30,6 +35,8 @@ namespace content {
@@ -32,6 +37,8 @@ namespace content {
namespace {
@@ -175,7 +175,7 @@ index be7a332d8c071f09a2a09c382e7c6c906008c9ec..8227df3c7faa07552c7ce5cc88941285
bool SupportsSharedWorker() {
#if BUILDFLAG(IS_ANDROID)
// SharedWorkers are not enabled on Android. https://crbug.com/154571
@@ -874,4 +881,82 @@ IN_PROC_BROWSER_TEST_F(LocalCompileHintsBrowserTest, LocalCompileHints) {
@@ -955,4 +962,82 @@ IN_PROC_BROWSER_TEST_F(LocalCompileHintsBrowserTest, LocalCompileHints) {
}
}
@@ -411,7 +411,7 @@ index cf71655553cf510e1309ac47bdd5ddab08e52672..0a02d17d06e080f40bf12bb2e48f51ad
std::vector<std::string> extension_schemes;
// Registers a URL scheme with a predefined default custom handler.
diff --git a/url/url_util.cc b/url/url_util.cc
index 67c4c5f3ce124e111fb7a70e16386120cf24d9b8..d9876cd58ff28ea1af87596691cd836b815825dd 100644
index e09d63ee585919842b2b92f9a53b85f67da90531..9e844e2ac9da41dd711497412d03e9b313726162 100644
--- a/url/url_util.cc
+++ b/url/url_util.cc
@@ -135,6 +135,9 @@ struct SchemeRegistry {

View File

@@ -317,10 +317,10 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
// 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 0ab684dc8e792359abb90b91917eddae42e6123d..f0f08a834f06c7669da6030640434308a5cbd056 100644
index 23b19cc8405293aa44c4f2c20f715f8443fcd151..21c0c84dc6e3128b641fac682e3069a0acb97c0b 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(
@@ -322,8 +322,16 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
break;
}
@@ -338,7 +338,7 @@ index 0ab684dc8e792359abb90b91917eddae42e6123d..f0f08a834f06c7669da6030640434308
// 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.
@@ -333,13 +341,15 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
@@ -339,13 +347,15 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
}
#endif // defined(USE_AURA) || BUILDFLAG(IS_MAC)
@@ -356,7 +356,7 @@ index 0ab684dc8e792359abb90b91917eddae42e6123d..f0f08a834f06c7669da6030640434308
kMaxNumberOfBuffers, std::move(receiver),
std::move(receiver_on_io_thread)),
diff --git a/content/public/browser/desktop_media_id.h b/content/public/browser/desktop_media_id.h
index 415156d403a59bf426cf4561a9d58ecdb27524b4..78aa7b2359c684d5305bf6352751dfbb7ca00d29 100644
index 294b5f79955ba72976f8ba127fd19556c81e322c..27553e51b281575c5cb7a4ba4dab06d19704388e 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 {

View File

@@ -19,7 +19,7 @@ to STDOUT_FILENO/STD_OUTPUT_HANDLE and STDERR_FILENO/STD_ERROR_HANDLE allowing t
parent process to read from the pipe.
diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h
index ac6f72c99800d5437ddc4aa203870242fb9220b9..93055bda5478f4b7b401ae06dcddce36a26f5ad7 100644
index 2f85aeb4f51c0d126214616027c9c4cec710e263..26d35b53bcc41807452bcc68b484781d491b7a23 100644
--- a/content/browser/child_process_launcher.h
+++ b/content/browser/child_process_launcher.h
@@ -33,6 +33,7 @@
@@ -30,7 +30,7 @@ index ac6f72c99800d5437ddc4aa203870242fb9220b9..93055bda5478f4b7b401ae06dcddce36
#endif
#if BUILDFLAG(IS_POSIX)
@@ -188,7 +189,10 @@ struct ChildProcessLauncherFileData {
@@ -192,7 +193,10 @@ struct ChildProcessLauncherFileData {
delete;
~ChildProcessLauncherFileData();
@@ -42,7 +42,7 @@ index ac6f72c99800d5437ddc4aa203870242fb9220b9..93055bda5478f4b7b401ae06dcddce36
// Files opened by the browser and passed as corresponding file descriptors
// in the child process. If a FilePath is provided, the file will be opened
// and the descriptor cached for future process launches. If a ScopedFD is
@@ -203,6 +207,15 @@ struct ChildProcessLauncherFileData {
@@ -207,6 +211,15 @@ struct ChildProcessLauncherFileData {
std::map<std::string, std::variant<base::FilePath, base::ScopedFD>>
files_to_preload;
#endif
@@ -59,7 +59,7 @@ index ac6f72c99800d5437ddc4aa203870242fb9220b9..93055bda5478f4b7b401ae06dcddce36
// Launches a process asynchronously and notifies the client of the process
diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc
index 31a2a14a95540477297943df9b09b1e4659a884d..c02a81b1bd14a300dbbb47ad7aac2d2d7f3bb10f 100644
index 8f551374e1ffc729081f7d50e73671313c641bb6..6e7a3f46b82f82035f612f9700281d0edb363de5 100644
--- a/content/browser/child_process_launcher_helper_linux.cc
+++ b/content/browser/child_process_launcher_helper_linux.cc
@@ -64,6 +64,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
@@ -111,7 +111,7 @@ index 1d981cec12769d145b694b61772b4c09616df9f0..cf9d9bfe7af12e16520354ebd1f7bc40
}
diff --git a/content/browser/child_process_launcher_helper_win.cc b/content/browser/child_process_launcher_helper_win.cc
index cb0e7d5c5dc0154c6e88ad08ce097afdce4041f9..09b9cff76d9585297fe60f91970c610ac445f06a 100644
index 0791b5317fc6846389f65f93734ae5e816d04623..48948b409d6da58ade72c60ed848df4931d0eaab 100644
--- a/content/browser/child_process_launcher_helper_win.cc
+++ b/content/browser/child_process_launcher_helper_win.cc
@@ -24,6 +24,8 @@
@@ -165,111 +165,118 @@ index cb0e7d5c5dc0154c6e88ad08ce097afdce4041f9..09b9cff76d9585297fe60f91970c610a
FinishStartSandboxedProcessOnLauncherThread,
this));
diff --git a/content/browser/service_host/service_process_host_impl.cc b/content/browser/service_host/service_process_host_impl.cc
index 96c9563aac5847e742de5d9c9236f78bcb6cfd9c..73c9d585579ad5bdc407687b8becd0b7f2d704af 100644
index d9c14f91747bde0e76056d7f2f2ada166e67f994..53be16879777a3b9bef58ead5f7e420c1bf6acbe 100644
--- a/content/browser/service_host/service_process_host_impl.cc
+++ b/content/browser/service_host/service_process_host_impl.cc
@@ -66,6 +66,17 @@ void LaunchServiceProcess(mojo::GenericPendingReceiver receiver,
options.allow_gpu_client.value()) {
host->SetAllowGpuClient();
@@ -69,6 +69,17 @@ void LaunchServiceProcess(mojo::GenericPendingReceiver receiver,
utility_options.WithGpuClientAllowed();
}
+
+#if BUILDFLAG(IS_WIN)
+ host->SetStdioHandles(std::move(options.stdout_handle), std::move(options.stderr_handle));
+ host->SetFeedbackCursorOff(options.feedback_cursor_off);
+ utility_options.WithStdioHandles(std::move(service_options.stdout_handle),
+ std::move(service_options.stderr_handle));
+ utility_options.WithFeedbackCursorOff(service_options.feedback_cursor_off);
+#elif BUILDFLAG(IS_POSIX)
+ host->SetAdditionalFds(std::move(options.fds_to_remap));
+ utility_options.WithAdditionalFds(std::move(service_options.fds_to_remap));
+#endif
+ host->SetCurrentDirectory(options.current_directory);
+ host->SetEnv(options.environment);
+ if (options.clear_environment)
+ host->ClearEnvironment();
host->Start();
host->GetChildProcess()->BindServiceInterface(std::move(receiver));
}
+ utility_options.WithCurrentDirectory(service_options.current_directory);
+ utility_options.WithEnvironment(service_options.environment,
+ service_options.clear_environment);
+
utility_options.WithBoundServiceInterfaceOnChildProcess(std::move(receiver));
UtilityProcessHost::Start(std::move(utility_options),
diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc
index 9e01e61bf1fce448a93eaa3d5f363fc835b78538..d210af6fb317c922a8415a67a7ccd1d8a4a88ea1 100644
index 7db71d28fa05458bf88f468e67446ccde8a4b964..9d6c67c66576058723a6fb0a5abb279f05f15f4f 100644
--- a/content/browser/service_host/utility_process_host.cc
+++ b/content/browser/service_host/utility_process_host.cc
@@ -190,11 +190,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
return process_->GetData();
@@ -244,13 +244,13 @@ UtilityProcessHost::Options& UtilityProcessHost::Options::WithFileToPreload(
}
#endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
-#if BUILDFLAG(IS_POSIX)
void UtilityProcessHost::SetEnv(const base::EnvironmentMap& env) {
UtilityProcessHost::Options& UtilityProcessHost::Options::WithEnvironment(
- const base::EnvironmentMap& env) {
+ const base::EnvironmentMap& env,
+ bool new_environment) {
env_ = env;
+ inherit_environment_ = !new_environment;
return *this;
}
-#endif
+
+void UtilityProcessHost::ClearEnvironment() {
+ inherit_environment_ = false;
+}
bool UtilityProcessHost::Start() {
return StartProcess();
@@ -241,6 +243,30 @@ void UtilityProcessHost::SetZygoteForTesting(ZygoteCommunication* handle) {
#if BUILDFLAG(USE_ZYGOTE)
UtilityProcessHost::Options& UtilityProcessHost::Options::WithZygoteForTesting(
@@ -260,6 +260,36 @@ UtilityProcessHost::Options& UtilityProcessHost::Options::WithZygoteForTesting(
}
#endif // BUILDFLAG(USE_ZYGOTE)
+#if BUILDFLAG(IS_WIN)
+void UtilityProcessHost::SetStdioHandles(
+UtilityProcessHost::Options& UtilityProcessHost::Options::WithStdioHandles(
+ base::win::ScopedHandle stdout_handle,
+ base::win::ScopedHandle stderr_handle) {
+ stdout_handle_ = std::move(stdout_handle);
+ stderr_handle_ = std::move(stderr_handle);
+ return *this;
+}
+#elif BUILDFLAG(IS_POSIX)
+void UtilityProcessHost::SetAdditionalFds(base::FileHandleMappingVector mapping) {
+UtilityProcessHost::Options& UtilityProcessHost::Options::WithAdditionalFds(
+ base::FileHandleMappingVector mapping) {
+ fds_to_remap_ = std::move(mapping);
+ return *this;
+}
+#endif
+
+void UtilityProcessHost::SetCurrentDirectory(
+UtilityProcessHost::Options& UtilityProcessHost::Options::WithCurrentDirectory(
+ const base::FilePath& cwd) {
+ current_directory_ = cwd;
+ return *this;
+}
+
+#if BUILDFLAG(IS_WIN)
+void UtilityProcessHost::SetFeedbackCursorOff(bool feedback_cursor_off) {
+UtilityProcessHost::Options& UtilityProcessHost::Options::WithFeedbackCursorOff(
+ bool feedback_cursor_off) {
+ feedback_cursor_off_ = feedback_cursor_off;
+ return *this;
+}
+#endif // BUILDFLAG(IS_WIN)
+
mojom::ChildProcess* UtilityProcessHost::GetChildProcess() {
return static_cast<ChildProcessHostImpl*>(process_->GetHost())
->child_process();
@@ -456,9 +482,26 @@ bool UtilityProcessHost::StartProcess() {
}
UtilityProcessHost::Options&
UtilityProcessHost::Options::WithBoundReceiverOnChildProcessForTesting(
mojo::GenericPendingReceiver receiver) {
@@ -521,9 +551,26 @@ bool UtilityProcessHost::StartProcess() {
}
#endif // BUILDFLAG(ENABLE_GPU_CHANNEL_MEDIA_CAPTURE) && !BUILDFLAG(IS_WIN)
+#if BUILDFLAG(IS_WIN)
+ file_data_->stdout_handle = std::move(stdout_handle_);
+ file_data_->stderr_handle = std::move(stderr_handle_);
+ options_.file_data_->stdout_handle = std::move(options_.stdout_handle_);
+ options_.file_data_->stderr_handle = std::move(options_.stderr_handle_);
+#elif BUILDFLAG(IS_POSIX)
+ if (!fds_to_remap_.empty()) {
+ for (const auto& remapped_fd : fds_to_remap_) {
+ file_data_->additional_remapped_fds.emplace(
+ remapped_fd.second, remapped_fd.first);
+ }
+ if (!options_.fds_to_remap_.empty()) {
+ for (const auto& remapped_fd : options_.fds_to_remap_) {
+ options_.file_data_->additional_remapped_fds.emplace(remapped_fd.second,
+ remapped_fd.first);
+ }
+ }
+#endif
+
std::unique_ptr<UtilitySandboxedProcessLauncherDelegate> delegate =
std::make_unique<UtilitySandboxedProcessLauncherDelegate>(
- sandbox_type_, env_, *cmd_line);
+ sandbox_type_, env_, current_directory_, *cmd_line,
+ inherit_environment_);
std::unique_ptr<UtilitySandboxedProcessLauncherDelegate> delegate =
std::make_unique<UtilitySandboxedProcessLauncherDelegate>(
- options_.sandbox_type_, options_.env_, *cmd_line);
+ options_.sandbox_type_, options_.env_, options_.current_directory_,
+ *cmd_line, options_.inherit_environment_);
+
+#if BUILDFLAG(IS_WIN)
+ delegate->SetFeedbackCursorOff(feedback_cursor_off_);
+ delegate->SetFeedbackCursorOff(options_.feedback_cursor_off_);
+#endif // BUILDFLAG(IS_WIN)
#if BUILDFLAG(IS_WIN)
if (!preload_libraries_.empty()) {
if (!options_.preload_libraries_.empty()) {
diff --git a/content/browser/service_host/utility_process_host.h b/content/browser/service_host/utility_process_host.h
index d13e6db4857242480591bff040709532d16f513d..1164da12ee71a8575c17bf1b84a505e8a32b96b3 100644
index 4335d7ff718c3d7de92320ba11c39c3957303788..55379fbe9233ba96f6e4729e2b7d534c0c6884a0 100644
--- a/content/browser/service_host/utility_process_host.h
+++ b/content/browser/service_host/utility_process_host.h
@@ -30,6 +30,10 @@
@@ -29,6 +29,10 @@
#include "content/public/common/zygote/zygote_handle.h"
#endif // BUILDFLAG(USE_ZYGOTE)
@@ -280,77 +287,74 @@ index d13e6db4857242480591bff040709532d16f513d..1164da12ee71a8575c17bf1b84a505e8
namespace base {
class Thread;
} // namespace base
@@ -99,9 +103,13 @@ class CONTENT_EXPORT UtilityProcessHost
@@ -111,14 +115,31 @@ class CONTENT_EXPORT UtilityProcessHost
std::variant<base::FilePath, base::ScopedFD> file);
#endif
// Returns information about the utility child process.
const ChildProcessData& GetData();
-#if BUILDFLAG(IS_POSIX)
+
+ // Set/Unset environment variables.
void SetEnv(const base::EnvironmentMap& env);
- Options& WithEnvironment(const base::EnvironmentMap& env);
-#endif
+
+ // Clear the environment for the new process before processing
+ // changes from SetEnv.
+ void ClearEnvironment();
+ // Specifies the environment that should be applied to the process.
+ // |new_environment| controls whether the process should inherit
+ // environment from the parent process.
+ Options& WithEnvironment(const base::EnvironmentMap& env,
+ bool new_environment);
// Starts the utility process.
bool Start();
@@ -139,6 +147,21 @@ class CONTENT_EXPORT UtilityProcessHost
void SetZygoteForTesting(ZygoteCommunication* handle);
#if BUILDFLAG(USE_ZYGOTE)
Options& WithZygoteForTesting(ZygoteCommunication* handle);
#endif // BUILDFLAG(USE_ZYGOTE)
+#if BUILDFLAG(IS_WIN)
+ void SetStdioHandles(base::win::ScopedHandle stdout_handle,
+ base::win::ScopedHandle stderr_handle);
+ Options& WithStdioHandles(base::win::ScopedHandle stdout_handle,
+ base::win::ScopedHandle stderr_handle);
+#elif BUILDFLAG(IS_POSIX)
+ void SetAdditionalFds(base::FileHandleMappingVector mapping);
+ Options& WithAdditionalFds(base::FileHandleMappingVector mapping);
+#endif
+
+ // Sets the working directory of the process.
+ void SetCurrentDirectory(const base::FilePath& cwd);
+ // Sets the working directory of the process.
+ Options& WithCurrentDirectory(const base::FilePath& cwd);
+
+#if BUILDFLAG(IS_WIN)
+ // Specifies if the process should trigger mouse cursor feedback.
+ void SetFeedbackCursorOff(bool feedback_cursor_off);
+ // Specifies if the process should trigger mouse cursor feedback.
+ Options& WithFeedbackCursorOff(bool feedback_cursor_off);
+#endif // BUILDFLAG(IS_WIN)
+
// Returns a control interface for the running child process.
mojom::ChildProcess* GetChildProcess();
@@ -192,6 +215,27 @@ class CONTENT_EXPORT UtilityProcessHost
std::optional<raw_ptr<ZygoteCommunication>> zygote_for_testing_;
// Requests that the process bind a receiving pipe targeting the interface
// named by `receiver`. Calls to this method generally end up in
// `ChildThreadImpl::OnBindReceiver()` and the option is used for testing
@@ -162,6 +183,27 @@ class CONTENT_EXPORT UtilityProcessHost
std::optional<raw_ptr<ZygoteCommunication>> zygote_for_testing_;
#endif // BUILDFLAG(USE_ZYGOTE)
+#if BUILDFLAG(IS_WIN)
+ // Specifies the handles for redirection of stdout and stderr.
+ base::win::ScopedHandle stdout_handle_;
+ base::win::ScopedHandle stderr_handle_;
+ // Specifies the handles for redirection of stdout and stderr.
+ base::win::ScopedHandle stdout_handle_;
+ base::win::ScopedHandle stderr_handle_;
+#elif BUILDFLAG(IS_POSIX)
+ // Specifies file descriptors to propagate into the child process
+ // based on the mapping.
+ base::FileHandleMappingVector fds_to_remap_;
+ // Specifies file descriptors to propagate into the child process
+ // based on the mapping.
+ base::FileHandleMappingVector fds_to_remap_;
+#endif
+
+ // If not empty, change to this directory before executing the new process.
+ base::FilePath current_directory_;
+ // If not empty, change to this directory before executing the new process.
+ base::FilePath current_directory_;
+
+ // Inherit enviroment from parent process.
+ bool inherit_environment_ = true;
+ // 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;
+ // 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 {
#if BUILDFLAG(ENABLE_GPU_CHANNEL_MEDIA_CAPTURE)
// Whether or not to bind viz::mojom::Gpu to the utility process.
bool allowed_gpu_;
diff --git a/content/browser/service_host/utility_sandbox_delegate.cc b/content/browser/service_host/utility_sandbox_delegate.cc
index 824afc2cfd01a0321d1b01cd370243dafefa1d24..ab77c85595dd5bde9eb9fd21f4914e1f9dfd4433 100644
index 5ff3c5dcb972eb635107557ea7c26eb1f3331d22..5b1939226dcb84a61b09eefe69ab24a5ad595e1b 100644
--- a/content/browser/service_host/utility_sandbox_delegate.cc
+++ b/content/browser/service_host/utility_sandbox_delegate.cc
@@ -38,17 +38,19 @@ UtilitySandboxedProcessLauncherDelegate::
@@ -39,17 +39,19 @@ UtilitySandboxedProcessLauncherDelegate::
UtilitySandboxedProcessLauncherDelegate(
sandbox::mojom::Sandbox sandbox_type,
const base::EnvironmentMap& env,
@@ -374,7 +378,7 @@ index 824afc2cfd01a0321d1b01cd370243dafefa1d24..ab77c85595dd5bde9eb9fd21f4914e1f
#if DCHECK_IS_ON()
bool supported_sandbox_type =
sandbox_type_ == sandbox::mojom::Sandbox::kNoSandbox ||
@@ -114,11 +116,28 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
@@ -115,11 +117,28 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
return sandbox_type_;
}

View File

@@ -21,7 +21,7 @@ making three primary changes to Blink:
* Mostly simple "plumbing" for the setting through blink.
diff --git a/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc b/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc
index 5e233d63c09088d73cd1a54a58b235018c193ac3..4f2dcb339ad79f31ba5e4c347cb91d5639d27ce6 100644
index c13dfd7f20e6f281f51ae373ceebeb86104c5cd9..fac89df9f23f3f098096d2a07a07e623b1067270 100644
--- a/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc
+++ b/third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc
@@ -128,6 +128,8 @@ bool StructTraits<blink::mojom::RendererPreferencesDataView,
@@ -32,9 +32,9 @@ index 5e233d63c09088d73cd1a54a58b235018c193ac3..4f2dcb339ad79f31ba5e4c347cb91d56
+
out->canvas_noise_token = data.canvas_noise_token();
return true;
out->view_source_line_wrap_enabled = data.view_source_line_wrap_enabled();
diff --git a/third_party/blink/public/common/renderer_preferences/renderer_preferences.h b/third_party/blink/public/common/renderer_preferences/renderer_preferences.h
index ff84a20511448d4211d0e25dfc12e7eabc34a9e0..886e9d819c3bde7f33eec3497d1cadb76de4237f 100644
index 75acd696a5258e52f5c17b88559dfb3f6373c669..34b5ed725702dca72c383c1def08fdb835f7fa6b 100644
--- a/third_party/blink/public/common/renderer_preferences/renderer_preferences.h
+++ b/third_party/blink/public/common/renderer_preferences/renderer_preferences.h
@@ -91,6 +91,7 @@ struct BLINK_COMMON_EXPORT RendererPreferences {
@@ -43,10 +43,10 @@ index ff84a20511448d4211d0e25dfc12e7eabc34a9e0..886e9d819c3bde7f33eec3497d1cadb7
std::vector<uint16_t> explicitly_allowed_network_ports;
+ bool electron_corner_smoothing_css{true};
uint64_t canvas_noise_token{0};
RendererPreferences();
// The default value must be false to avoid performance problems on very large
// source pages.
diff --git a/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h b/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h
index c88ddaf7fd5fc27889bcacac9366330e4013eba3..e4f492a11637886c60ece665371d117f3a34ec8d 100644
index defe40d7091cb4ba4b099a22aeaee71f78ff5e77..e8326fa7a3c45c08c7d9250edd52a6d73fcc3ff9 100644
--- a/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h
+++ b/third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h
@@ -275,6 +275,11 @@ struct BLINK_COMMON_EXPORT
@@ -62,7 +62,7 @@ index c88ddaf7fd5fc27889bcacac9366330e4013eba3..e4f492a11637886c60ece665371d117f
const ::blink::RendererPreferences& data) {
return data.canvas_noise_token;
diff --git a/third_party/blink/public/mojom/renderer_preferences.mojom b/third_party/blink/public/mojom/renderer_preferences.mojom
index 65766b955e81bfc332bc2c4e0b9da48389c1bd68..a475e1bfee46f0a77d1cfbdea47e9de6516d1194 100644
index f8361faf6151210d65a597562c533aaa0a5235df..328238c34a9381fbbeb5970af3de721c8412104e 100644
--- a/third_party/blink/public/mojom/renderer_preferences.mojom
+++ b/third_party/blink/public/mojom/renderer_preferences.mojom
@@ -202,6 +202,8 @@ struct RendererPreferences {
@@ -75,7 +75,7 @@ index 65766b955e81bfc332bc2c4e0b9da48389c1bd68..a475e1bfee46f0a77d1cfbdea47e9de6
// used for canvas noising.
uint64 canvas_noise_token = 0;
diff --git a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
index a4c78d85e525224823ce4b2434519cc0a39922ef..8071b283b48ab89226313bb199c0cece67ca5039 100644
index a96527c653d2108de572d1e94c3ce703b45f2830..f8eb2af2c97f888307f2be588c336d4209f6cb3e 100644
--- a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
+++ b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom
@@ -48,6 +48,7 @@ enum CSSSampleId {
@@ -87,10 +87,10 @@ index a4c78d85e525224823ce4b2434519cc0a39922ef..8071b283b48ab89226313bb199c0cece
// This CSSSampleId represents page load for CSS histograms. It is recorded once
// per page visit for each CSS histogram being logged on the blink side and the
diff --git a/third_party/blink/public/web/web_settings.h b/third_party/blink/public/web/web_settings.h
index a53b4901dde0dc83dce6c9b56616eef0d02d94a5..b419672af985f673f375fbb63b4d2b2c419e3e03 100644
index c37f784a1309da14354881d48a5a76a965930926..bffd221d2b3f3701710025103fa564c233e203d1 100644
--- a/third_party/blink/public/web/web_settings.h
+++ b/third_party/blink/public/web/web_settings.h
@@ -285,6 +285,7 @@ class WebSettings {
@@ -287,6 +287,7 @@ class WebSettings {
virtual void SetRequireTransientActivationAndAuthorizationForSubAppsAPIs(
bool) = 0;
virtual void SetRootScrollbarThemeColor(std::optional<SkColor>) = 0;
@@ -99,23 +99,23 @@ index a53b4901dde0dc83dce6c9b56616eef0d02d94a5..b419672af985f673f375fbb63b4d2b2c
protected:
~WebSettings() = default;
diff --git a/third_party/blink/renderer/build/scripts/core/css/css_properties.py b/third_party/blink/renderer/build/scripts/core/css/css_properties.py
index aa3a6b93cceae8c8bfbefdd7a043ae576f921979..17544d7ed4757fb51e2f82fd1b90638131ba05cc 100755
index 6e991652d242795e292cea4c94cff59aaea078fa..b6834c78575520bb6e584dd2ce3333ac17299fef 100755
--- a/third_party/blink/renderer/build/scripts/core/css/css_properties.py
+++ b/third_party/blink/renderer/build/scripts/core/css/css_properties.py
@@ -313,7 +313,7 @@ class CSSProperties(object):
if name_without_leading_dash.startswith('-'):
@@ -314,7 +314,7 @@ class CSSProperties(object):
name_without_leading_dash = name_without_leading_dash[1:]
internal_visited_order = 1
- if name_without_leading_dash.startswith('internal-visited-'):
+ if name_without_leading_dash.startswith('internal-'):
if name_without_leading_dash.startswith(
- 'internal-visited-'
+ 'internal-'
) or name_without_leading_dash.startswith(
'internal-forced-visited-'):
internal_visited_order = 0
property_.sorting_key = (-property_.priority,
internal_visited_order,
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5
index 15ed205144fbb058bcc88953acb8380574cb7044..1795bceb2e7548c6e072c1bd2ce6abd0b3bd8188 100644
index 5619eae5a36f63627df605eeff049866ea846477..50bad85a916e5bb097d687cbc4d1721ecefa6c39 100644
--- a/third_party/blink/renderer/core/css/css_properties.json5
+++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -8796,6 +8796,24 @@
@@ -8866,6 +8866,24 @@
property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"],
},
@@ -141,10 +141,10 @@ index 15ed205144fbb058bcc88953acb8380574cb7044..1795bceb2e7548c6e072c1bd2ce6abd0
{
name: "-internal-visited-color",
diff --git a/third_party/blink/renderer/core/css/css_property_equality.cc b/third_party/blink/renderer/core/css/css_property_equality.cc
index 10ab8a458fb3348476a6e904f684af77c55b103a..37339df2a5601b59abc50fe75fb844e1b7bb5368 100644
index 9ec4976d64834bd4c09f3740edcd28334dd4ec50..e47da0a85670e800e74da957d6441d70d1c7ddd8 100644
--- a/third_party/blink/renderer/core/css/css_property_equality.cc
+++ b/third_party/blink/renderer/core/css/css_property_equality.cc
@@ -346,6 +346,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property,
@@ -348,6 +348,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property,
return a.DominantBaseline() == b.DominantBaseline();
case CSSPropertyID::kDynamicRangeLimit:
return a.GetDynamicRangeLimit() == b.GetDynamicRangeLimit();
@@ -154,10 +154,10 @@ index 10ab8a458fb3348476a6e904f684af77c55b103a..37339df2a5601b59abc50fe75fb844e1
return a.EmptyCells() == b.EmptyCells();
case CSSPropertyID::kFill:
diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
index 3fb84db022f14819239cd55da79f43cb9b0bcbc7..c4b7ff8ea240054d9394a0691e978e9b10eecc50 100644
index e519e13fea11950cc619e384f774b61a6e2385c0..8289ca0a41da1532692673a3e426e8688d93b32e 100644
--- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
+++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
@@ -12047,5 +12047,25 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
@@ -12175,5 +12175,25 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue(
CSSValueID::kNone>(stream);
}
@@ -184,11 +184,11 @@ index 3fb84db022f14819239cd55da79f43cb9b0bcbc7..c4b7ff8ea240054d9394a0691e978e9b
} // namespace css_longhand
} // namespace blink
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
index f7f49ef23b77c7a3f27ae8ba129e5eea1617d545..0ddf6f59c45d2f6212317dc18f3c5a80eeda5395 100644
index 5618121a0b5621290a19f147bfbe9bf316fb3f27..bb1bd90371ce847d48ff9a228b098a26d28f5c6d 100644
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
@@ -3859,4 +3859,12 @@ PositionArea StyleBuilderConverter::ConvertPositionArea(
return PositionArea(span[0], span[1], span[2], span[3]);
@@ -3962,4 +3962,12 @@ FitText StyleBuilderConverter::ConvertFitText(StyleResolverState& state,
return FitText(target, method, size_limit);
}
+Length StyleBuilderConverter::ConvertCornerSmoothing(StyleResolverState& state, const CSSValue& value) {
@@ -201,23 +201,23 @@ index f7f49ef23b77c7a3f27ae8ba129e5eea1617d545..0ddf6f59c45d2f6212317dc18f3c5a80
+
} // namespace blink
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
index b9f8145af13fb9d68e85f166905476c177c3a053..0a9ad304f5039747a0580ab63664d4429a67970d 100644
index 7104b5866a9bac0cdd26518eddcf80322280ad92..692b186f302130155fbb1b163bb195c0253276af 100644
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
@@ -419,6 +419,8 @@ class StyleBuilderConverter {
const CSSValue&);
@@ -422,6 +422,8 @@ class StyleBuilderConverter {
static PositionArea ConvertPositionArea(StyleResolverState&, const CSSValue&);
static FitText ConvertFitText(StyleResolverState&, const CSSValue&);
+
+ static Length ConvertCornerSmoothing(StyleResolverState&, const CSSValue&);
};
template <typename T>
diff --git a/third_party/blink/renderer/core/exported/web_settings_impl.cc b/third_party/blink/renderer/core/exported/web_settings_impl.cc
index 4a29a2200eaab5084078e928a68c862296c6ff91..fcd879deec0e68b3b6988402d19570cf0065daa2 100644
index 90692da7bddd9e26e58cb26d8b29dbddf958fbca..6bcd9d736edab85572e405ab74d57adc0fcce921 100644
--- a/third_party/blink/renderer/core/exported/web_settings_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_settings_impl.cc
@@ -816,4 +816,8 @@ void WebSettingsImpl::SetRootScrollbarThemeColor(
@@ -820,4 +820,8 @@ void WebSettingsImpl::SetRootScrollbarThemeColor(
settings_->SetRootScrollbarThemeColor(theme_color);
}
@@ -227,10 +227,10 @@ index 4a29a2200eaab5084078e928a68c862296c6ff91..fcd879deec0e68b3b6988402d19570cf
+
} // namespace blink
diff --git a/third_party/blink/renderer/core/exported/web_settings_impl.h b/third_party/blink/renderer/core/exported/web_settings_impl.h
index 5e8d2bfbccd0625c2598544a9cba3d71373eded2..e68a97ee75754fc7196f11cf5c731550b5a12276 100644
index aa8b248b94ea7f6c0e04dc66e976dc7923ff3a98..868630ed2adb8f40fb7f002d45b260c0881ef10f 100644
--- a/third_party/blink/renderer/core/exported/web_settings_impl.h
+++ b/third_party/blink/renderer/core/exported/web_settings_impl.h
@@ -237,6 +237,7 @@ class CORE_EXPORT WebSettingsImpl final : public WebSettings {
@@ -238,6 +238,7 @@ class CORE_EXPORT WebSettingsImpl final : public WebSettings {
void SetRequireTransientActivationAndAuthorizationForSubAppsAPIs(
bool) override;
void SetRootScrollbarThemeColor(std::optional<SkColor>) override;
@@ -239,11 +239,11 @@ index 5e8d2bfbccd0625c2598544a9cba3d71373eded2..e68a97ee75754fc7196f11cf5c731550
bool RenderVSyncNotificationEnabled() const {
return render_v_sync_notification_enabled_;
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 524928729e34cc6b2ae427181e2ac4f8c1128688..9ce184f279b11a90c7d6f9b9ab7b20da09122a40 100644
index f8fae134e122a223440530bd696db899dce2fe56..cec68a428fbf63932066ceb296c3db3eb9e34166 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3576,6 +3576,9 @@ void WebViewImpl::UpdateRendererPreferences(
CanvasNoiseToken::Set(renderer_preferences_.canvas_noise_token);
@@ -3579,6 +3579,9 @@ void WebViewImpl::UpdateRendererPreferences(
renderer_preferences_.view_source_line_wrap_enabled);
MaybePreloadSystemFonts(GetPage());
+
@@ -253,10 +253,10 @@ index 524928729e34cc6b2ae427181e2ac4f8c1128688..9ce184f279b11a90c7d6f9b9ab7b20da
void WebViewImpl::SetHistoryIndexAndLength(int32_t history_index,
diff --git a/third_party/blink/renderer/core/frame/settings.json5 b/third_party/blink/renderer/core/frame/settings.json5
index f4cdee12ea4352067f5de3e074e43d51ef56d2e5..6377e4b1ea8aa46b0bf69f8420b6c439bea70dba 100644
index c96100f7d26c14b8be1329cdb4d8a007b14d9c00..8b2429d5ac958f9a2c7aae546b44da903def8e69 100644
--- a/third_party/blink/renderer/core/frame/settings.json5
+++ b/third_party/blink/renderer/core/frame/settings.json5
@@ -1261,5 +1261,10 @@
@@ -1265,5 +1265,10 @@
initial: false,
type: "bool"
},
@@ -267,33 +267,6 @@ index f4cdee12ea4352067f5de3e074e43d51ef56d2e5..6377e4b1ea8aa46b0bf69f8420b6c439
+ },
],
}
diff --git a/third_party/blink/renderer/core/paint/box_painter_base.cc b/third_party/blink/renderer/core/paint/box_painter_base.cc
index 57f71cbd80d88416693e5b83f695fd02eb7a405b..d638da7a734fa40de118d056c59488b63caff7e2 100644
--- a/third_party/blink/renderer/core/paint/box_painter_base.cc
+++ b/third_party/blink/renderer/core/paint/box_painter_base.cc
@@ -417,16 +417,20 @@ void BoxPainterBase::PaintInsetBoxShadow(const PaintInfo& info,
ContouredRect inner_rounded_rect(
FloatRoundedRect(inner_rect, bounds.GetRadii()));
ApplySpreadToShadowShape(inner_rounded_rect, -shadow.Spread());
+ ContouredRect contoured_bounds(
+ bounds, ContouredBorderGeometry::ContouredBorder(
+ style, PhysicalRect::EnclosingRect(bounds.Rect()))
+ .GetCornerCurvature());
if (inner_rounded_rect.IsEmpty()) {
// |AutoDarkMode::Disabled()| is used because |shadow_color| has already
// been adjusted for dark mode.
- context.FillRoundedRect(bounds, shadow_color, AutoDarkMode::Disabled());
+ context.FillContouredRect(contoured_bounds, shadow_color, AutoDarkMode::Disabled());
continue;
}
GraphicsContextStateSaver state_saver(context);
if (bounds.IsRounded()) {
// TODO(crbug.com/397459628) render corner-shape with box-shadow
- context.ClipContouredRect(ContouredRect(bounds));
+ context.ClipContouredRect(contoured_bounds);
} else {
context.Clip(bounds.Rect());
}
diff --git a/third_party/blink/renderer/core/paint/contoured_border_geometry.cc b/third_party/blink/renderer/core/paint/contoured_border_geometry.cc
index 2c2f4f405074e5baa4a26f255283404f86b40e21..ebeb7d6988ee9e6a4e78cb82fc01fdad6721eaef 100644
--- a/third_party/blink/renderer/core/paint/contoured_border_geometry.cc
@@ -334,10 +307,10 @@ index 2c2f4f405074e5baa4a26f255283404f86b40e21..ebeb7d6988ee9e6a4e78cb82fc01fdad
ContouredRect PixelSnappedContouredBorderInternal(
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index 291676c6583722a3dfbac4d4aaad1ea2ae3cc079..5cd89e8c6c79ab339ffbc330d9bcdb08cca6e869 100644
index 0b166b8dc52c87d41d4e0a9c7be04d10ef67ca97..67b634759de01995a99a2bb89eb20ad7e6651b42 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1646,6 +1646,8 @@ component("platform") {
@@ -1652,6 +1652,8 @@ component("platform") {
"widget/widget_base.h",
"widget/widget_base_client.h",
"windows_keyboard_codes.h",
@@ -347,7 +320,7 @@ index 291676c6583722a3dfbac4d4aaad1ea2ae3cc079..5cd89e8c6c79ab339ffbc330d9bcdb08
sources -= blink_platform_avx_files
diff --git a/third_party/blink/renderer/platform/geometry/contoured_rect.h b/third_party/blink/renderer/platform/geometry/contoured_rect.h
index b147b8d321d865295007516b15d0aaccfc6f7fac..8f54a3a657c660a52fcd4c94865ca2197b0af514 100644
index 0dbfffdfbea2cb75f7f3ea94ead20cc8bbe08bb3..021b9cdebb023941e7a78afbc1c3c939f3b9cfa0 100644
--- a/third_party/blink/renderer/platform/geometry/contoured_rect.h
+++ b/third_party/blink/renderer/platform/geometry/contoured_rect.h
@@ -47,19 +47,29 @@ class PLATFORM_EXPORT ContouredRect {
@@ -382,8 +355,8 @@ index b147b8d321d865295007516b15d0aaccfc6f7fac..8f54a3a657c660a52fcd4c94865ca219
+ return (top_left_ == kRound) && IsUniform() && !IsSmooth();
}
constexpr bool IsUniform() const {
@@ -71,6 +81,7 @@ class PLATFORM_EXPORT ContouredRect {
constexpr bool IsConvex() const {
@@ -76,6 +86,7 @@ class PLATFORM_EXPORT ContouredRect {
constexpr float TopRight() const { return top_right_; }
constexpr float BottomRight() const { return bottom_right_; }
constexpr float BottomLeft() const { return bottom_left_; }
@@ -391,7 +364,7 @@ index b147b8d321d865295007516b15d0aaccfc6f7fac..8f54a3a657c660a52fcd4c94865ca219
constexpr bool operator==(const CornerCurvature&) const = default;
@@ -81,6 +92,7 @@ class PLATFORM_EXPORT ContouredRect {
@@ -86,6 +97,7 @@ class PLATFORM_EXPORT ContouredRect {
float top_right_ = kRound;
float bottom_right_ = kRound;
float bottom_left_ = kRound;
@@ -400,7 +373,7 @@ index b147b8d321d865295007516b15d0aaccfc6f7fac..8f54a3a657c660a52fcd4c94865ca219
// A Corner is a axis-aligned quad, with the points ordered (start, outer,
diff --git a/third_party/blink/renderer/platform/geometry/path_builder.cc b/third_party/blink/renderer/platform/geometry/path_builder.cc
index 346cfc0b13b31808fbe1381b3785150810f347bb..ebb2be8cc3bb71c4df6526d743a851121e36c138 100644
index 171cb3dd87609f5ecab79a25fe0978cd6e4b04f4..7e7deae45bfb66c3a3702f30092a23fb5b79bf4b 100644
--- a/third_party/blink/renderer/platform/geometry/path_builder.cc
+++ b/third_party/blink/renderer/platform/geometry/path_builder.cc
@@ -4,6 +4,7 @@
@@ -411,7 +384,7 @@ index 346cfc0b13b31808fbe1381b3785150810f347bb..ebb2be8cc3bb71c4df6526d743a85112
#include "third_party/blink/renderer/platform/geometry/contoured_rect.h"
#include "third_party/blink/renderer/platform/geometry/infinite_int_rect.h"
#include "third_party/blink/renderer/platform/geometry/path.h"
@@ -231,6 +232,26 @@ PathBuilder& PathBuilder::AddContouredRect(
@@ -247,6 +248,26 @@ PathBuilder& PathBuilder::AddContouredRect(
AddRoundedRect(target_rect);
return *this;
}
@@ -437,4 +410,4 @@ index 346cfc0b13b31808fbe1381b3785150810f347bb..ebb2be8cc3bb71c4df6526d743a85112
+
const FloatRoundedRect& origin_rect = contoured_rect.GetOriginRect();
if (origin_rect == target_rect) {
// This would include the outer border of the rect, as well as shadow and

View File

@@ -90,7 +90,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 067b3cc0d6a8b5990dc4bad0f15e47bd4922a26a..4aaf506c9fadb3f4c5a79560bf4558462d2c8705 100644
index 7f53771dbebb480e5d10fd6926e86120f020b1ee..1ce3faf14e3770c18a67717bcd0a8d07d7720045 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -178,6 +178,8 @@ viz_component("service") {
@@ -204,10 +204,10 @@ index e4b46a79560e7698a6400b2ab8a57f38205a8718..3cb2518c6644cf0618f625d981befd46
const raw_ptr<GpuServiceImpl> gpu_service_impl_;
diff --git a/components/viz/service/display_embedder/software_output_device_mac.cc b/components/viz/service/display_embedder/software_output_device_mac.cc
index 446229f7dea794a0148543d112c63b8c38183262..15d097a5761a07cfbc763d6fc739ca35cf3c8660 100644
index 80b4d99c08b622b080cf6d725ebc3cdfbcad7d32..d9c56e04dfd771368a82b852daae297a47fde80e 100644
--- a/components/viz/service/display_embedder/software_output_device_mac.cc
+++ b/components/viz/service/display_embedder/software_output_device_mac.cc
@@ -111,6 +111,8 @@ void SoftwareOutputDeviceMac::UpdateAndCopyBufferDamage(
@@ -112,6 +112,8 @@ void SoftwareOutputDeviceMac::UpdateAndCopyBufferDamage(
SkCanvas* SoftwareOutputDeviceMac::BeginPaint(
const gfx::Rect& new_damage_rect) {
@@ -216,7 +216,7 @@ index 446229f7dea794a0148543d112c63b8c38183262..15d097a5761a07cfbc763d6fc739ca35
// Record the previous paint buffer.
Buffer* previous_paint_buffer =
buffer_queue_.empty() ? nullptr : buffer_queue_.back().get();
@@ -199,6 +201,7 @@ void SoftwareOutputDeviceMac::EndPaint() {
@@ -202,6 +204,7 @@ void SoftwareOutputDeviceMac::EndPaint() {
ca_layer_params.is_empty = false;
ca_layer_params.scale_factor = scale_factor_;
ca_layer_params.pixel_size = pixel_size_;
@@ -522,10 +522,10 @@ index f0aca972c4a81c3dfb536e14244daafae21ee716..a15afbc1a3519e657121b4952444d2f4
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 2b6ceac536ca667caad8f1aa1d8ab6c5139083d8..869468a0ab7708fc300a098c47d5d490f17190a8 100644
index 671923d06e450edc191e5717537d74b91678872d..6bae1cc6634256e449b02e92a4e7899573926109 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
@@ -115,7 +115,8 @@ RootCompositorFrameSinkImpl::Create(
@@ -130,7 +130,8 @@ RootCompositorFrameSinkImpl::Create(
params->gpu_compositing, params->widget);
auto output_surface = output_surface_provider->CreateOutputSurface(
params->widget, params->gpu_compositing, display_client.get(),
@@ -564,10 +564,10 @@ index 399fba1a3d4e601dc2cdd5f1f4def8b7fd7a3011..8bcbe0d26c80323155d536c0d3a177a1
gpu::SyncPointManager* GetSyncPointManager() override;
gpu::Scheduler* GetGpuScheduler() override;
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
index 7839f5afb9ac1aef3f809042d14e6bf2f48f84af..7df780d195e3cfcbfc0857133f2c0d21abe04121 100644
index 130067b91baa360a7234fecfe6342c8239d587b5..d701328102f9a53e12b1b2e2a86265910692ca59 100644
--- a/content/browser/compositor/viz_process_transport_factory.cc
+++ b/content/browser/compositor/viz_process_transport_factory.cc
@@ -431,8 +431,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@@ -387,8 +387,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
root_params->display_private =
display_private.BindNewEndpointAndPassReceiver();
@@ -585,10 +585,10 @@ index 7839f5afb9ac1aef3f809042d14e6bf2f48f84af..7df780d195e3cfcbfc0857133f2c0d21
compositor_data.display_client->GetBoundRemote(resize_task_runner_);
mojo::AssociatedRemote<viz::mojom::ExternalBeginFrameController>
diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom
index 3046e60995bceb1c9931038be3d309577a830a60..4476f48510f807d03f05a4afa2a648dac8720010 100644
index e063835e87f08e6a2359886a96d7b78954e3d5b2..34bcf67726f64466d11a56d7a315ce7e05a0cb3d 100644
--- a/services/viz/privileged/mojom/compositing/display_private.mojom
+++ b/services/viz/privileged/mojom/compositing/display_private.mojom
@@ -125,7 +125,6 @@ interface DisplayClient {
@@ -119,7 +119,6 @@ interface DisplayClient {
// Creates a LayeredWindowUpdater implementation to draw into a layered
// window.
@@ -597,7 +597,7 @@ index 3046e60995bceb1c9931038be3d309577a830a60..4476f48510f807d03f05a4afa2a648da
// Sends the created child window to the browser process so that it can be
diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
index 4828bfcb0c221ce9de3f1fe9952849c542e7e3df..4d3667deff36216db4d51ae3f01f732d691f4866 100644
index 3066550e422058eec23d5fe3e655625f5446d694..7358b05a646a2f80717a91182c4929776a404179 100644
--- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
+++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
@@ -39,6 +39,7 @@ struct RootCompositorFrameSinkParams {
@@ -620,7 +620,7 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index c802f9aae242c1be364890e0e6968d09be87f946..38b6c47f526b428562f340966352d32ba918f2d5 100644
index 385074e896f4a2e66dec8f5629a2f60b06affb0a..8d37f968825055d1d86da2cf0aac5d011fef7e8c 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -88,6 +88,7 @@ class DisplayPrivate;
@@ -657,7 +657,7 @@ index c802f9aae242c1be364890e0e6968d09be87f946..38b6c47f526b428562f340966352d32b
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -629,6 +642,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -631,6 +644,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
simple_begin_frame_observers_;
std::unique_ptr<ui::HostBeginFrameObserver> host_begin_frame_observer_;

View File

@@ -11,7 +11,7 @@ ServiceProcessHost::Observer functions, but we need to pass the exit code to
the observer.
diff --git a/content/browser/service_host/service_process_tracker.cc b/content/browser/service_host/service_process_tracker.cc
index 594629e45acd6cac9deba2d02c682a523c80e2fb..61be7804bbf370df3d2925880804866a631d35fa 100644
index e900841900325dd090b04f85151dc7b2f04a6613..e402bcf07aa0704c113ce472db547ffcfb04a4bf 100644
--- a/content/browser/service_host/service_process_tracker.cc
+++ b/content/browser/service_host/service_process_tracker.cc
@@ -48,12 +48,14 @@ void ServiceProcessTracker::NotifyTerminated(ServiceProcessId id) {
@@ -22,7 +22,7 @@ index 594629e45acd6cac9deba2d02c682a523c80e2fb..61be7804bbf370df3d2925880804866a
+void ServiceProcessTracker::NotifyCrashed(ServiceProcessId id, int exit_code) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
auto iter = processes_.find(id);
CHECK(iter != processes_.end(), base::NotFatalUntil::M130);
CHECK(iter != processes_.end());
for (auto& observer : observers_) {
- observer.OnServiceProcessCrashed(iter->second.Duplicate());
+ auto params = iter->second.Duplicate();
@@ -80,10 +80,10 @@ index 801db538979ba62facdcf3a472dade56723ca639..7abac9a5b13b393713534ae51664c2e5
private:
const std::string service_interface_name_;
diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc
index d210af6fb317c922a8415a67a7ccd1d8a4a88ea1..0de01879f618555030e87ea79a94d41232811c2c 100644
index 9d6c67c66576058723a6fb0a5abb279f05f15f4f..d692bc5929bce7801d0a91cb99ab9c5f07ba5d7b 100644
--- a/content/browser/service_host/utility_process_host.cc
+++ b/content/browser/service_host/utility_process_host.cc
@@ -541,7 +541,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {
@@ -609,7 +609,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {
// Take ownership of |client_| so the destructor doesn't notify it of
// termination.
auto client = std::move(client_);
@@ -93,10 +93,10 @@ index d210af6fb317c922a8415a67a7ccd1d8a4a88ea1..0de01879f618555030e87ea79a94d412
std::optional<std::string> UtilityProcessHost::GetServiceName() {
diff --git a/content/browser/service_host/utility_process_host.h b/content/browser/service_host/utility_process_host.h
index 1164da12ee71a8575c17bf1b84a505e8a32b96b3..4cbc30fc4b57440d06a0a0f642cc44c5c755e7f9 100644
index 55379fbe9233ba96f6e4729e2b7d534c0c6884a0..850592294efd2c0a0fdc253b7b3fb6441b91d730 100644
--- a/content/browser/service_host/utility_process_host.h
+++ b/content/browser/service_host/utility_process_host.h
@@ -79,7 +79,7 @@ class CONTENT_EXPORT UtilityProcessHost
@@ -68,7 +68,7 @@ class CONTENT_EXPORT UtilityProcessHost
virtual void OnProcessLaunched(const base::Process& process) {}
virtual void OnProcessTerminatedNormally() {}
@@ -104,7 +104,7 @@ index 1164da12ee71a8575c17bf1b84a505e8a32b96b3..4cbc30fc4b57440d06a0a0f642cc44c5
+ virtual void OnProcessCrashed(int exit_code) {}
};
// This class is self-owned. It must be instantiated using new, and shouldn't
struct CONTENT_EXPORT Options {
diff --git a/content/public/browser/service_process_info.h b/content/public/browser/service_process_info.h
index 1a8656aef341cd3b23af588fb00569b79d6cd100..6af523eb27a8c1e5529721c029e5b3ba0708b9fc 100644
--- a/content/public/browser/service_process_info.h

View File

@@ -12,10 +12,10 @@ We attempt to migrate the safe storage key from the old account, if that migrati
Existing apps that aren't built for the app store should be unimpacted, there is one edge case where a user uses BOTH an AppStore and a darwin build of the same app only one will keep it's access to the safestorage key as during the migration we delete the old account. This is an acceptable edge case as no one should be actively using two versions of the same app.
diff --git a/components/os_crypt/sync/keychain_password_mac.mm b/components/os_crypt/sync/keychain_password_mac.mm
index a179c9bc02158130f4b15bf8022721f4b53a8303..8fd3f42725e6618737110459b1b1021e3709f0df 100644
index 77409051c67a5a7bd3826a7063666954a38a86f0..397c5a17f0dc4d662f6413234ddc430b680fb0b3 100644
--- a/components/os_crypt/sync/keychain_password_mac.mm
+++ b/components/os_crypt/sync/keychain_password_mac.mm
@@ -24,6 +24,12 @@
@@ -26,6 +26,12 @@
using KeychainNameContainerType = const base::NoDestructor<std::string>;
#endif
@@ -28,55 +28,41 @@ index a179c9bc02158130f4b15bf8022721f4b53a8303..8fd3f42725e6618737110459b1b1021e
namespace {
// These two strings ARE indeed user facing. But they are used to access
@@ -83,11 +89,18 @@
std::string KeychainPassword::GetPassword() const {
UInt32 password_length = 0;
void* password_data = nullptr;
+ KeychainPassword::KeychainNameType service_name = GetServiceName();
+ KeychainPassword::KeychainNameType account_name = GetAccountName();
@@ -95,11 +101,49 @@
uma_result);
};
+ const std::string account_name_suffix = kAccountNameSuffix;
+ const std::string suffixed_account_name = account_name + account_name_suffix;
+ const std::string suffixed_account_name = GetAccountName() + account_name_suffix;
auto password =
- keychain_->FindGenericPassword(GetServiceName(), GetAccountName());
+ keychain_->FindGenericPassword(GetServiceName(), suffixed_account_name);
+
+ if (password.has_value()) {
+ return std::string(base::as_string_view(*password));
+ }
+
+ // We should check if the suffixed account exists first
OSStatus error = keychain_->FindGenericPassword(
- GetServiceName().size(), GetServiceName().c_str(),
- GetAccountName().size(), GetAccountName().c_str(), &password_length,
+ service_name.size(), service_name.c_str(),
+ suffixed_account_name.size(), suffixed_account_name.c_str(), &password_length,
&password_data, /*item=*/nullptr);
+ // If it exists we can return it immediately
if (error == noErr) {
std::string password =
std::string(static_cast<char*>(password_data), password_length);
@@ -95,6 +108,49 @@
return password;
}
+ // If the error was anything other than "it does not exist" we should error out here
+ // This normally means the account exists but we were deniged access to it
+ if (error != errSecItemNotFound) {
+ OSSTATUS_LOG(ERROR, error) << "Keychain lookup for suffixed key failed";
+ // This normally means the account exists but we were denied access to it
+ if (password.error() != errSecItemNotFound) {
+ OSSTATUS_LOG(ERROR, password.error()) << "Keychain lookup for suffixed key failed";
+ return std::string();
+ }
+
+ // If the suffixed account didn't exist, we should check if the legacy non-suffixed account
+ // exists. If it does we can use that key and migrate it to the new account
+ base::apple::ScopedCFTypeRef<SecKeychainItemRef> item_ref;
+ error = keychain_->FindGenericPassword(
+ service_name.size(), service_name.c_str(),
+ account_name.size(), account_name.c_str(), &password_length,
+ &password_data, item_ref.InitializeInto());
+
+ if (error == noErr) {
+ std::string password =
+ std::string(static_cast<char*>(password_data), password_length);
+ password =
+ keychain_->FindGenericPassword(GetServiceName(), GetAccountName(),
+ item_ref.InitializeInto());
if (password.has_value()) {
uma_result = FindGenericPasswordResult::kPasswordFound;
+
+ // If we found the legacy account name we should copy it over to
+ // the new suffixed account
+ error = keychain_->AddGenericPassword(
+ service_name.size(), service_name.data(), suffixed_account_name.size(),
+ suffixed_account_name.data(), password.size(), password_data, NULL);
+ OSStatus error = keychain_->AddGenericPassword(
+ GetServiceName(), suffixed_account_name, *password);
+
+ if (error == noErr) {
+ // If we successfully made the suffixed account we can delete the old
@@ -90,12 +76,147 @@ index a179c9bc02158130f4b15bf8022721f4b53a8303..8fd3f42725e6618737110459b1b1021e
+ OSSTATUS_DLOG(ERROR, error) << "Keychain add for suffixed key failed";
+ }
+
+ keychain_->ItemFreeContent(password_data);
+ return password;
+ }
return std::string(base::as_string_view(*password));
}
diff --git a/crypto/apple_keychain.h b/crypto/apple_keychain.h
index 605a6db7fd8de4e9863d1b98c78bb628e9600987..dccc5f565733875b1c9e54cbff7383eafd5370e4 100644
--- a/crypto/apple_keychain.h
+++ b/crypto/apple_keychain.h
@@ -18,6 +18,12 @@
namespace crypto {
+#if BUILDFLAG(IS_IOS)
+using AppleSecKeychainItemRef = void*;
+#else
+using AppleSecKeychainItemRef = SecKeychainItemRef;
+#endif
+
+ // If the legacy account name was not found, make a new account in the
+ // with the suffixed name
if (error == errSecItemNotFound) {
std::string password = AddRandomPasswordToKeychain(
*keychain_, GetServiceName(), GetAccountName());
// DEPRECATED: use `AppleKeychainV2` instead.
// Wraps the KeychainServices API in a very thin layer, to allow it to be
// mocked out for testing.
@@ -46,13 +52,18 @@ class CRYPTO_EXPORT AppleKeychain {
// std::vector<uint8_t> arm is populated instead.
virtual base::expected<std::vector<uint8_t>, OSStatus> FindGenericPassword(
std::string_view service_name,
- std::string_view account_name) const = 0;
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item = nullptr) const = 0;
virtual OSStatus AddGenericPassword(
std::string_view service_name,
std::string_view account_name,
base::span<const uint8_t> password) const = 0;
+#if BUILDFLAG(IS_MAC)
+ virtual OSStatus ItemDelete(AppleSecKeychainItemRef item) const;
+#endif // !BUILDFLAG(IS_MAC)
+
protected:
AppleKeychain();
};
diff --git a/crypto/apple_keychain_secitem.h b/crypto/apple_keychain_secitem.h
index 1632c22c669607f9da8b4fe7783ee716c6467f6e..3f0e3e0af568627a0aae352a65be4cc7d5d40802 100644
--- a/crypto/apple_keychain_secitem.h
+++ b/crypto/apple_keychain_secitem.h
@@ -17,7 +17,8 @@ class CRYPTO_EXPORT AppleKeychainSecItem : public AppleKeychain {
base::expected<std::vector<uint8_t>, OSStatus> FindGenericPassword(
std::string_view service_name,
- std::string_view account_name) const override;
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const override;
OSStatus AddGenericPassword(
std::string_view service_name,
diff --git a/crypto/apple_keychain_secitem.mm b/crypto/apple_keychain_secitem.mm
index 12b400a1f2d6c11bc4ac67d0a2c98984d0be24e0..1abb4623bfabacbca34068113fac2030fea2c065 100644
--- a/crypto/apple_keychain_secitem.mm
+++ b/crypto/apple_keychain_secitem.mm
@@ -118,7 +118,8 @@
base::expected<std::vector<uint8_t>, OSStatus>
AppleKeychainSecItem::FindGenericPassword(std::string_view service_name,
- std::string_view account_name) const {
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const {
base::apple::ScopedCFTypeRef<CFDictionaryRef> query =
MakeGenericPasswordQuery(service_name, account_name);
diff --git a/crypto/apple_keychain_seckeychain.cc b/crypto/apple_keychain_seckeychain.cc
index c7f015a4108f93ef121c7bb56c3d67634a723146..6d905154de42cbc151b5dfd77af277e5a5b021a0 100644
--- a/crypto/apple_keychain_seckeychain.cc
+++ b/crypto/apple_keychain_seckeychain.cc
@@ -26,14 +26,15 @@ AppleKeychainSecKeychain::~AppleKeychainSecKeychain() = default;
base::expected<std::vector<uint8_t>, OSStatus>
AppleKeychainSecKeychain::FindGenericPassword(
std::string_view service_name,
- std::string_view account_name) const {
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const {
base::AutoLock lock(GetMacSecurityServicesLock());
uint32_t password_length = 0;
void* password_data = nullptr;
OSStatus status = SecKeychainFindGenericPassword(
nullptr, service_name.length(), service_name.data(),
account_name.length(), account_name.data(), &password_length,
- &password_data, nullptr);
+ &password_data, item);
if (status != noErr) {
return base::unexpected(status);
}
@@ -59,6 +60,11 @@ OSStatus AppleKeychainSecKeychain::AddGenericPassword(
password.data(), nullptr);
}
+OSStatus AppleKeychain::ItemDelete(AppleSecKeychainItemRef item) const {
+ base::AutoLock lock(GetMacSecurityServicesLock());
+ return SecKeychainItemDelete(item);
+}
+
#pragma clang diagnostic pop
} // namespace crypto
diff --git a/crypto/apple_keychain_seckeychain.h b/crypto/apple_keychain_seckeychain.h
index ecf5e229c8f05a27574b635abc9c781d175c1773..6afb09c59011035337a287783bbef0c6b7d29d9a 100644
--- a/crypto/apple_keychain_seckeychain.h
+++ b/crypto/apple_keychain_seckeychain.h
@@ -20,7 +20,8 @@ class CRYPTO_EXPORT AppleKeychainSecKeychain : public AppleKeychain {
base::expected<std::vector<uint8_t>, OSStatus> FindGenericPassword(
std::string_view service_name,
- std::string_view account_name) const override;
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const override;
OSStatus AddGenericPassword(
std::string_view service_name,
diff --git a/crypto/mock_apple_keychain.cc b/crypto/mock_apple_keychain.cc
index d766dc41299f32bc766e4efce5925c93f21b60c5..7f09d477ba152cbca798f3ef7a213786cc95a338 100644
--- a/crypto/mock_apple_keychain.cc
+++ b/crypto/mock_apple_keychain.cc
@@ -32,7 +32,8 @@ MockAppleKeychain::~MockAppleKeychain() = default;
base::expected<std::vector<uint8_t>, OSStatus>
MockAppleKeychain::FindGenericPassword(std::string_view service_name,
- std::string_view account_name) const {
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const {
IncrementKeychainAccessHistogram();
// When simulating |noErr|, return canned |passwordData| and
diff --git a/crypto/mock_apple_keychain.h b/crypto/mock_apple_keychain.h
index fd903e64c7bf43c634518c6756183e6ee2579504..a0089ce75ee8c6c49fb7f6181be79d4c8e1fb1d2 100644
--- a/crypto/mock_apple_keychain.h
+++ b/crypto/mock_apple_keychain.h
@@ -38,7 +38,8 @@ class CRYPTO_EXPORT MockAppleKeychain : public AppleKeychain {
// AppleKeychain implementation.
base::expected<std::vector<uint8_t>, OSStatus> FindGenericPassword(
std::string_view service_name,
- std::string_view account_name) const override;
+ std::string_view account_name,
+ AppleSecKeychainItemRef* item) const override;
OSStatus AddGenericPassword(
std::string_view service_name,

View File

@@ -7,7 +7,7 @@ This allows embedders to call SetDefersLoading without reaching into Blink inter
This might be upstreamable?
diff --git a/third_party/blink/public/web/web_document_loader.h b/third_party/blink/public/web/web_document_loader.h
index 0527831e1f8d7923ba0f687a5c0da8573189d867..f72af0e6cfcf06d47bd917def993f081530ab66b 100644
index 33e23680b927d417b0882c7572fe32dc2d2b90c3..9413492f8e0fd6c5371c66329e1ad6d4163ba670 100644
--- a/third_party/blink/public/web/web_document_loader.h
+++ b/third_party/blink/public/web/web_document_loader.h
@@ -38,6 +38,7 @@
@@ -28,10 +28,10 @@ index 0527831e1f8d7923ba0f687a5c0da8573189d867..f72af0e6cfcf06d47bd917def993f081
// Returns the http referrer of original request which initited this load.
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
index e86efe8c9fc2d27fefc5e47afe401b8a6b1419ba..9d1ef55e4e122f30564f35406c8b51335e3d6996 100644
index bcf51f743caa1e7da6cb80f2e219661cde0efab6..ddb36c1757ec7e0a3a1f19a2687a1f3e3d590b6e 100644
--- a/third_party/blink/renderer/core/loader/document_loader.h
+++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -328,7 +328,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
@@ -325,7 +325,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
soft_navigation_heuristics_task_id,
bool should_skip_screenshot);

View File

@@ -17,7 +17,7 @@ headers, moving forward we should find a way in upstream to provide
access to these headers for loader clients created on the browser process.
diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc
index 7d97d0fd5481bead1f655f2f933a3ae89a729834..9b4c41209190086353b9a87833c07aabb47470bd 100644
index 0becf4f37532fb7acfdf4d516a72f7048e98c550..0a267234eff1684fe2e6231584ccd1b5c9ed03e3 100644
--- a/services/network/public/cpp/resource_request.cc
+++ b/services/network/public/cpp/resource_request.cc
@@ -178,6 +178,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=(
@@ -37,10 +37,10 @@ index 7d97d0fd5481bead1f655f2f933a3ae89a729834..9b4c41209190086353b9a87833c07aab
allow_cookies_from_browser == other.allow_cookies_from_browser &&
include_request_cookies_with_response ==
diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
index 538e2a52da142a442342383d223ea0d90b75be8f..19f0defab1d1ba3369423842e4eabbceee781091 100644
index df29c7cb739a488684c0c50bc5343df101911a31..86b5576c9c10e5544347117e4f6b09d7692caffa 100644
--- a/services/network/public/cpp/resource_request.h
+++ b/services/network/public/cpp/resource_request.h
@@ -77,6 +77,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
@@ -78,6 +78,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
bool has_user_activation = false;
bool allow_cookies_from_browser = false;
bool include_request_cookies_with_response = false;
@@ -49,10 +49,10 @@ index 538e2a52da142a442342383d223ea0d90b75be8f..19f0defab1d1ba3369423842e4eabbce
mojo::PendingRemote<mojom::TrustTokenAccessObserver> trust_token_observer;
mojo::PendingRemote<mojom::URLLoaderNetworkServiceObserver>
diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc
index 2021e4c8f05008dd57e67c14fc7e66bf49bd6e3e..2a5ed7fc54f9efd773ec6dded1b66bb9c9f26580 100644
index 088517d1a9800de0d09c745bbe1ef2fe416c3425..2303ede53f1ee7a827befec560069d97601c2b80 100644
--- a/services/network/public/cpp/url_request_mojom_traits.cc
+++ b/services/network/public/cpp/url_request_mojom_traits.cc
@@ -49,6 +49,7 @@ bool StructTraits<network::mojom::TrustedUrlRequestParamsDataView,
@@ -50,6 +50,7 @@ bool StructTraits<network::mojom::TrustedUrlRequestParamsDataView,
out->allow_cookies_from_browser = data.allow_cookies_from_browser();
out->include_request_cookies_with_response =
data.include_request_cookies_with_response();
@@ -61,10 +61,10 @@ index 2021e4c8f05008dd57e67c14fc7e66bf49bd6e3e..2a5ed7fc54f9efd773ec6dded1b66bb9
mojo::PendingRemote<network::mojom::CookieAccessObserver>>();
out->trust_token_observer = data.TakeTrustTokenObserver<
diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h
index 30a38e3f82360417b682c516263f62181825c621..db8a479f483a041a6944465deb6f799a2a9bd93a 100644
index 45defbfca47574ed002052a2ba2b1517a3ea89f4..a4f7a0cc7346b2e413cec1f56ec1d0484f94ed34 100644
--- a/services/network/public/cpp/url_request_mojom_traits.h
+++ b/services/network/public/cpp/url_request_mojom_traits.h
@@ -71,6 +71,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
@@ -72,6 +72,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
const network::ResourceRequest::TrustedParams& trusted_params) {
return trusted_params.include_request_cookies_with_response;
}
@@ -76,10 +76,10 @@ index 30a38e3f82360417b682c516263f62181825c621..db8a479f483a041a6944465deb6f799a
cookie_observer(
const network::ResourceRequest::TrustedParams& trusted_params) {
diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
index 78fa9126457ee380b12e39e3bf35ea4c2ccaa36c..4f39fa5d3bd665e3343882d11f1ab5747c80610e 100644
index 392d697a8d1573815bf08e37b1bcc5c0c7493116..cf9915b9322487734b27a1776e721440035d7ad7 100644
--- a/services/network/public/mojom/url_request.mojom
+++ b/services/network/public/mojom/url_request.mojom
@@ -74,6 +74,9 @@ struct TrustedUrlRequestParams {
@@ -87,6 +87,9 @@ struct TrustedUrlRequestParams {
// client which should not be able to see them.
bool include_request_cookies_with_response = false;
@@ -90,18 +90,18 @@ index 78fa9126457ee380b12e39e3bf35ea4c2ccaa36c..4f39fa5d3bd665e3343882d11f1ab574
// a cookie. If this is set to non-null, the observer passed to
// URLLoaderFactory will be ignored.
diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom
index 72188dae668f2bd91b8b7f181448f459600a82c2..b3dae05e160160cc8f2decee5af78c21bd76c822 100644
index 99bf736ebe303d46ab1ced924ba929a0cd258909..e10c8782d2704ff9cff8062d201a433935b66964 100644
--- a/services/network/public/mojom/url_response_head.mojom
+++ b/services/network/public/mojom/url_response_head.mojom
@@ -13,6 +13,7 @@ import "services/network/public/mojom/attribution.mojom";
@@ -14,6 +14,7 @@ import "services/network/public/mojom/encoded_body_length.mojom";
import "services/network/public/mojom/fetch_api.mojom";
import "services/network/public/mojom/http_request_headers.mojom";
import "services/network/public/mojom/ip_address_space.mojom";
+import "services/network/public/mojom/http_raw_headers.mojom";
import "services/network/public/mojom/ip_endpoint.mojom";
import "services/network/public/mojom/load_timing_info.mojom";
import "services/network/public/mojom/network_param.mojom";
@@ -51,6 +52,9 @@ struct URLResponseHead {
import "services/network/public/mojom/load_timing_internal_info.mojom";
@@ -52,6 +53,9 @@ struct URLResponseHead {
// The response headers or NULL if the URL type does not support headers.
HttpResponseHeaders headers;
@@ -112,10 +112,10 @@ index 72188dae668f2bd91b8b7f181448f459600a82c2..b3dae05e160160cc8f2decee5af78c21
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 01ddddb7f8f3723814cca8c38ed7150ee1270d57..9a79c530f3b9bfec8ce7307cf202efba8f14c905 100644
index b4e32dd34c6d5f826da777dce7502da7ff75e76a..dcc180c6eab0c145721c4a06f74a3feef859b363 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -673,6 +673,9 @@ URLLoader::URLLoader(
@@ -388,6 +388,9 @@ URLLoader::URLLoader(
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
base::SequencedTaskRunner::GetCurrentDefault()),
per_factory_orb_state_(context.GetMutableOrbState()),
@@ -125,7 +125,7 @@ index 01ddddb7f8f3723814cca8c38ed7150ee1270d57..9a79c530f3b9bfec8ce7307cf202efba
devtools_request_id_(request.devtools_request_id),
options_(PopulateOptions(options,
factory_params_->is_orb_enabled,
@@ -982,7 +985,7 @@ void URLLoader::ConfigureRequest(
@@ -524,7 +527,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
&URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this)));
}
@@ -134,7 +134,7 @@ index 01ddddb7f8f3723814cca8c38ed7150ee1270d57..9a79c530f3b9bfec8ce7307cf202efba
url_request_->SetResponseHeadersCallback(base::BindRepeating(
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
}
@@ -2146,6 +2149,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
@@ -1129,6 +1132,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
}
response_ = BuildResponseHead();
@@ -153,12 +153,12 @@ index 01ddddb7f8f3723814cca8c38ed7150ee1270d57..9a79c530f3b9bfec8ce7307cf202efba
+ }
DispatchOnRawResponse();
// Parse and remove the Trust Tokens response headers, if any are expected,
ad_auction_event_record_request_helper_.HandleResponse(
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index e6962f686212ca39d66b5d21bd3ff1f852e83644..fd3eb86e2f0f9b3705029befc54c85690e8ca519 100644
index b0f14e050dea10385e244085dcf1d40542220404..89ed2779e5fff251b6d0d52e91c6a321673b33e6 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -773,6 +773,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -601,6 +601,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
resource_scheduler_request_handle_;

View File

@@ -20,10 +20,10 @@ This patch will be removed when the deprecated sync api support is
removed.
diff --git a/components/permissions/permission_util.cc b/components/permissions/permission_util.cc
index 6f4d9651862e90abaa22b93e1dcf97ac07592c5c..d91d81297e7cdb79ee7b7a3979dcedf977e16c92 100644
index b379cc24f772260ea360779b26ca0836d21c89c4..bface283d508d1c1a3f9fd297d92e048bdd423af 100644
--- a/components/permissions/permission_util.cc
+++ b/components/permissions/permission_util.cc
@@ -389,6 +389,7 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe(
@@ -520,6 +520,7 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe(
return ContentSettingsType::WEB_APP_INSTALLATION;
case PermissionType::LOCAL_NETWORK_ACCESS:
return ContentSettingsType::LOCAL_NETWORK_ACCESS;
@@ -32,7 +32,7 @@ index 6f4d9651862e90abaa22b93e1dcf97ac07592c5c..d91d81297e7cdb79ee7b7a3979dcedf9
break;
}
diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc
index 0c6b537ddc2afbc4cd22f1c08f1bbae3c3bbffe3..333f557c89bc03ae5b25060359b9af096b188726 100644
index bc4dd4c643f2aa4cba07c0560e14f65f3c6aa291..b1c9f2d59559ed33cd32ad1f22b221029018cf0f 100644
--- a/content/browser/permissions/permission_controller_impl.cc
+++ b/content/browser/permissions/permission_controller_impl.cc
@@ -87,6 +87,7 @@ PermissionToSchedulingFeature(PermissionType permission_name) {
@@ -43,8 +43,22 @@ index 0c6b537ddc2afbc4cd22f1c08f1bbae3c3bbffe3..333f557c89bc03ae5b25060359b9af09
return std::nullopt;
}
}
diff --git a/content/browser/permissions/permission_descriptor_util.cc b/content/browser/permissions/permission_descriptor_util.cc
index 6c36ada80f6f225b84a8f3832405128f8ba83224..714d582d1060873765b24770b18eddcbbdcf5506 100644
--- a/content/browser/permissions/permission_descriptor_util.cc
+++ b/content/browser/permissions/permission_descriptor_util.cc
@@ -171,6 +171,9 @@ content::PermissionDescriptorUtil::CreatePermissionDescriptorForPermissionType(
case blink::PermissionType::LOCAL_NETWORK_ACCESS:
return CreatePermissionDescriptor(
blink::mojom::PermissionName::LOCAL_NETWORK_ACCESS);
+ case blink::PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ:
+ return CreatePermissionDescriptor(
+ blink::mojom::PermissionName::DEPRECATED_SYNC_CLIPBOARD_READ);
case blink::PermissionType::NUM:
NOTREACHED();
}
diff --git a/third_party/blink/common/permissions/permission_utils.cc b/third_party/blink/common/permissions/permission_utils.cc
index aad897dbc32caa3469a2f04b4f004355888c84d8..875260fc2a884ab5b1e62cd45fc91c2e4dc162ee 100644
index 6886f5764a87dd8b41746969745e80c82b69430b..cb39508717b9ebdd30470f6d7fd7e8626cc65948 100644
--- a/third_party/blink/common/permissions/permission_utils.cc
+++ b/third_party/blink/common/permissions/permission_utils.cc
@@ -101,6 +101,8 @@ std::string GetPermissionString(PermissionType permission) {
@@ -57,15 +71,15 @@ index aad897dbc32caa3469a2f04b4f004355888c84d8..875260fc2a884ab5b1e62cd45fc91c2e
NOTREACHED();
}
@@ -175,6 +177,7 @@ PermissionTypeToPermissionsPolicyFeature(PermissionType permission) {
case PermissionType::NOTIFICATIONS:
case PermissionType::KEYBOARD_LOCK:
case PermissionType::POINTER_LOCK:
// TODO(crbug.com/394009026): Add permission policy for LNA.
case PermissionType::LOCAL_NETWORK_ACCESS:
+ case PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ:
return std::nullopt;
case PermissionType::NUM:
diff --git a/third_party/blink/public/common/permissions/permission_utils.h b/third_party/blink/public/common/permissions/permission_utils.h
index 947bd8125bf300a3a82c811810e31996e6147c7c..caeeaf6cecf7da47c39b140dfcc295fba12f6f84 100644
index 5c82a641538802bc459782ea422a1186045b054a..c286d87043ec4cb2e51ec9d82d08e4c84f5a270c 100644
--- a/third_party/blink/public/common/permissions/permission_utils.h
+++ b/third_party/blink/public/common/permissions/permission_utils.h
@@ -65,6 +65,7 @@ enum class PermissionType {
@@ -76,11 +90,25 @@ index 947bd8125bf300a3a82c811810e31996e6147c7c..caeeaf6cecf7da47c39b140dfcc295fb
// Always keep this at the end.
NUM,
diff --git a/third_party/blink/public/mojom/permissions/permission.mojom b/third_party/blink/public/mojom/permissions/permission.mojom
index 02e1941c37173a1e84e5190eb396f1007a8bbc2c..e47f2089a6a187b26c981afa1ef4135ec5e6a9e7 100644
--- a/third_party/blink/public/mojom/permissions/permission.mojom
+++ b/third_party/blink/public/mojom/permissions/permission.mojom
@@ -43,7 +43,8 @@ enum PermissionName {
AR,
HAND_TRACKING,
WEB_PRINTING,
- SMART_CARD
+ SMART_CARD,
+ DEPRECATED_SYNC_CLIPBOARD_READ
};
struct MidiPermissionDescriptor {
diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h
index 28f616f21f998c7cd1c794e58efaccf9e6c11e6e..c64896642209124e500db2ed6fe2357e426cd10b 100644
index 5c71490d17ffe3f2f57b18e58e947f20ff3f66e3..75209a69c33780a0c71d48e184cc1897f0cb8a36 100644
--- a/third_party/blink/public/platform/web_content_settings_client.h
+++ b/third_party/blink/public/platform/web_content_settings_client.h
@@ -55,6 +55,9 @@ class WebContentSettingsClient {
@@ -54,6 +54,9 @@ class WebContentSettingsClient {
// Controls whether access to write the clipboard is allowed for this frame.
virtual bool AllowWriteToClipboard() { return false; }
@@ -112,3 +140,16 @@ index c269698764bb8ae7f85c5d476436f5ae5209576d..65d7fd94128a755609192784722074c6
}
bool ClipboardCommands::ExecuteCopy(LocalFrame& frame,
diff --git a/third_party/blink/renderer/modules/permissions/permission_utils.cc b/third_party/blink/renderer/modules/permissions/permission_utils.cc
index 691726eb23434005adc559534fc0aeede937cc92..a980ed6afb84eceef9c9b594b325e8e3783821ec 100644
--- a/third_party/blink/renderer/modules/permissions/permission_utils.cc
+++ b/third_party/blink/renderer/modules/permissions/permission_utils.cc
@@ -145,6 +145,8 @@ String PermissionNameToString(PermissionName name) {
return "web-printing";
case PermissionName::SMART_CARD:
return "smart-card";
+ case PermissionName::DEPRECATED_SYNC_CLIPBOARD_READ:
+ return "deprecated-sync-clipboard-read";
}
}

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