Compare commits

...

18 Commits

Author SHA1 Message Date
trop[bot]
b9b982cd7d docs: clarify utilityProcess child.pid value (#44363)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-10-22 19:22:02 +02:00
trop[bot]
633cec167e fix: crash when generating shortcut text for super accelerator (#44346)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-10-22 19:21:40 +02:00
trop[bot]
f003c1ea6a build: update appveyor image to latest version (#44362)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-appveyor-updater[bot] <161660339+electron-appveyor-updater[bot]@users.noreply.github.com>
2024-10-22 12:37:46 -04:00
trop[bot]
7973861ffc fix: software compositing infinite loop (#44350)
* fix: software compositing infinite loop

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

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

* chore: update patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Maddock <smaddock@slack-corp.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2024-10-21 20:44:56 -04:00
trop[bot]
98930bb2b6 build: fixup reclient use for prod builds (#44345)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-10-21 17:15:13 -04:00
electron-roller[bot]
d0f8a31a4c chore: bump chromium to 132.0.6789.1 (34-x-y) (#44328)
* chore: bump chromium to 132.0.6787.0 (main) (#44329)

* chore: bump chromium in DEPS to 132.0.6785.0

* chore: bump chromium in DEPS to 132.0.6787.0

* 5837702: mac fullscreen: always show traffic lights

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

* 5892572: Move SimpleMenuModel out of ui/base

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

* 5938185: Remove lacros code from //ui/base/clipboard

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

* chore: fixup patch indices

* 5939514: Wire up the preference of overlay scrollbars to the ChromeOS settings

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

* chore: fixup patch indices

---------

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

* chore: bump chromium to 132.0.6788.0 (main) (#44331)

chore: bump chromium in DEPS to 132.0.6788.0

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

* chore: bump chromium in DEPS to 132.0.6789.1

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-10-21 10:50:20 -04:00
trop[bot]
e21c3cb801 fix: respect setAlwaysOnTop before showInactive on Linux under X11 (#44322)
fix: respect setAlwaysOnTop before showInactive on Linux under X11 (#44078)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Beutner <31829097+cptpcrd@users.noreply.github.com>
2024-10-18 16:19:27 -04:00
trop[bot]
b6ce8d02ce build: update appveyor image to latest version (#44317)
* build: update appveyor image to latest version

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

* chore: update patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-appveyor-updater[bot] <161660339+electron-appveyor-updater[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-10-18 14:00:16 -04:00
trop[bot]
bc8e80a1f5 chore: bump chromium to 132.0.6783.0 (34-x-y) (#44319)
* chore: bump chromium in DEPS to 132.0.6782.0

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

* chore: bump chromium in DEPS to 132.0.6783.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: 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: John Kleinschmidt <jkleinsc@electronjs.org>
2024-10-18 13:59:02 -04:00
trop[bot]
e76a504d10 fix: Linux crash after webContents.print() with no parent window (#44284)
fix: Linux crash after print with no parent window

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-10-18 10:40:46 -04:00
trop[bot]
82a1cc5f0f chore: bump chromium to 132.0.6781.0 (34-x-y) (#44308)
* chore: bump chromium in DEPS to 132.0.6781.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>

* 5933789: [MappableSI] Remove kill-switch from RenderableGpuMemoryBufferVideoFramePool.

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

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

* 5938992: Reland: Remove `force_guest_profile` param from context getters.

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

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

* 5928743: spanification: Add WTF::String::FromUTF8(span<>) overloads

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

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

* 5898835: Update windows SDK version to 10.0.26100.1742

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

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>
2024-10-18 15:42:18 +02:00
trop[bot]
3e3a6fb211 chore: fixup reclient read only access on forks (#44303)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-10-17 13:36:13 -04:00
electron-roller[bot]
34a6cd2bd8 chore: bump chromium to 132.0.6779.0 (34-x-y) (#44272)
* chore: bump chromium in DEPS to 131.0.6778.4

* chore: bump chromium to 131.0.6778.0 (main) (#44251)

* chore: bump chromium in DEPS to 131.0.6778.0

* 5803393: [UI] Add alias for mojo version of `MenuSourceType`

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
(cherry picked from commit ef84f13650)

* chore: bump chromium in DEPS to 132.0.6779.0

(cherry picked from commit 77f17523f2)

* chore: update patches

(cherry picked from commit fed9888232)

* 5904951: controlledframe: Disable File System Access for <controlledframe>

https://chromium-review.googlesource.com/c/chromium/src/+/5904951
(cherry picked from commit 289a2fb86a)

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-10-16 21:41:53 -04:00
trop[bot]
8689cf2b3f build: remove dead code in prepare release script (#44286)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2024-10-16 17:37:11 -04:00
trop[bot]
71e00fdbcf fix: ensure utilityProcess only emits one 'exit' event (#44265)
fix: ensure utilityProcess only emits one exit

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-10-16 16:34:09 -04:00
trop[bot]
92ed2a898d fix: trace-startup crashing child process on macOS (#44275)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2024-10-16 16:33:45 -04:00
trop[bot]
4241045017 fix: use proper PDF save approach (#44279)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-10-16 13:52:17 -04:00
trop[bot]
354d6155d8 fix: -Wunsafe-buffer-usage warnings in TaskbarHost::SetThumbarButtons() (#44259)
* fix: -Wunsafe-buffer-usage warnings in TaskbarHost::SetThumbarButtons()

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

* fixup! fix: -Wunsafe-buffer-usage warning in ChunkedDataPipeReadableStream (#44211)

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-10-15 23:31:35 -05:00
85 changed files with 720 additions and 471 deletions

View File

@@ -159,21 +159,19 @@ runs:
run: |
cd src
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true $GN_EXTRA_ARGS"
autoninja -C out/ffmpeg electron:electron_ffmpeg_zip -j $NUMBER_OF_NINJA_PROCESSES
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg -j $NUMBER_OF_NINJA_PROCESSES
- name: Generate Hunspell Dictionaries ${{ inputs.step-suffix }}
shell: bash
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'linux' }}
run: |
cd src
autoninja -C out/Default electron:hunspell_dictionaries_zip -j $NUMBER_OF_NINJA_PROCESSES
e build --target electron:hunspell_dictionaries_zip -j $NUMBER_OF_NINJA_PROCESSES
- name: Generate Libcxx ${{ inputs.step-suffix }}
shell: bash
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'linux' }}
run: |
cd src
autoninja -C out/Default electron:libcxx_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
autoninja -C out/Default electron:libcxxabi_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
autoninja -C out/Default electron:libcxx_objects_zip -j $NUMBER_OF_NINJA_PROCESSES
e build --target electron:libcxx_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
e build --target electron:libcxxabi_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
e build --target electron:libcxx_objects_zip -j $NUMBER_OF_NINJA_PROCESSES
- name: Generate TypeScript Definitions ${{ inputs.step-suffix }}
if: ${{ inputs.is-release == 'true' }}
shell: bash

View File

@@ -6,6 +6,6 @@ runs:
- name: Install Build Tools
shell: bash
run: |
export BUILD_TOOLS_SHA=33dc5186556bfbf7b0121a00cdd89ed3802e47da
export BUILD_TOOLS_SHA=eeb1a11392e4cec08fd926c93b31ab556dc0c23b
npm i -g @electron/build-tools
e auto-update disable

View File

@@ -164,7 +164,7 @@ jobs:
uses: ./src/electron/.github/actions/install-build-tools
- name: Init Build Tools
run: |
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }} --only-sdk
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
- name: Run Electron Only Hooks
run: |
gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
@@ -177,18 +177,9 @@ jobs:
- name: Fix Sync (macOS)
if: ${{ inputs.target-platform == 'macos' }}
uses: ./src/electron/.github/actions/fix-sync-macos
- name: Install build-tools & Setup RBE
- name: Setup Number of Ninja Processes
run: |
echo "NUMBER_OF_NINJA_PROCESSES=${{ inputs.target-platform == 'linux' && '300' || '200' }}" >> $GITHUB_ENV
cd ~/.electron_build_tools
npx yarn --ignore-engines
# Pull down credential helper and print status
node -e "require('./src/utils/reclient.js').downloadAndPrepare({})"
HELPER=$(node -p "require('./src/utils/reclient.js').helperPath({})")
$HELPER login
echo 'RBE_service='`node -e "console.log(require('./src/utils/reclient.js').serviceAddress)"` >> $GITHUB_ENV
echo 'RBE_credentials_helper='`node -e "console.log(require('./src/utils/reclient.js').helperPath({}))"` >> $GITHUB_ENV
echo 'RBE_credentials_helper_args=print' >> $GITHUB_ENV
- name: Free up space (macOS)
if: ${{ inputs.target-platform == 'macos' }}
uses: ./src/electron/.github/actions/free-space-macos

View File

@@ -75,7 +75,7 @@ jobs:
uses: ./src/electron/.github/actions/install-build-tools
- name: Init Build Tools
run: |
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }} --only-sdk
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
- name: Get Depot Tools
timeout-minutes: 5
run: |

2
DEPS
View File

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'131.0.6776.0',
'132.0.6789.1',
'node_version':
'v20.18.0',
'nan_version':

View File

@@ -29,7 +29,7 @@
version: 1.0.{build}
build_cloud: electronhq-16-core
image: e-131.0.6734.0-node-20.17-0
image: e-132.0.6788.0
environment:
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
ELECTRON_OUT_DIR: Default
@@ -38,8 +38,8 @@ environment:
MOCHA_REPORTER: mocha-multi-reporters
MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, mocha-junit-reporter, tap"
DEPOT_TOOLS_WIN_TOOLCHAIN: 1
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_"
GYP_MSVS_HASH_7393122652: 3ba76c5c20
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_"
GYP_MSVS_HASH_698eb5635a: e2bf90edff
PYTHONIOENCODING: UTF-8
matrix:
@@ -128,8 +128,6 @@ for:
if ($env:ELECTRON_RBE_JWT -eq '') {
$env:RBE_fail_early_min_action_count = "0"
$env:RBE_fail_early_min_fallback_ratio = "0"
$env:RBE_exec_strategy = "local"
$env:RBE_remote_update_cache= "false"
}
- cd ..\..
- ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools"
@@ -158,7 +156,7 @@ for:
- gn check out/Default //electron:electron_app
- gn check out/Default //electron/shell/common:mojo
- gn check out/Default //electron/shell/common:plugin
- if DEFINED ELECTRON_RBE_JWT (autoninja -j 300 -C out/Default electron:electron_app) else (autoninja -C out/Default electron:electron_app)
- autoninja -j 300 -C out/Default electron:electron_app
- if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default )
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true %GN_EXTRA_ARGS%"
- autoninja -C out/ffmpeg electron:electron_ffmpeg_zip

View File

@@ -29,7 +29,7 @@
version: 1.0.{build}
build_cloud: electronhq-16-core
image: e-131.0.6734.0-node-20.17-0
image: e-132.0.6788.0
environment:
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
ELECTRON_OUT_DIR: Default
@@ -39,7 +39,7 @@ environment:
MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, mocha-junit-reporter, tap"
DEPOT_TOOLS_WIN_TOOLCHAIN: 1
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_"
GYP_MSVS_HASH_7393122652: 3ba76c5c20
GYP_MSVS_HASH_698eb5635a: e2bf90edff
PYTHONIOENCODING: UTF-8
matrix:
@@ -123,8 +123,6 @@ for:
if ($env:ELECTRON_RBE_JWT -eq '') {
$env:RBE_fail_early_min_action_count = "0"
$env:RBE_fail_early_min_fallback_ratio = "0"
$env:RBE_exec_strategy = "local"
$env:RBE_remote_update_cache= "false"
}
- cd ..\..
- ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools"
@@ -153,7 +151,7 @@ for:
- gn check out/Default //electron:electron_app
- gn check out/Default //electron/shell/common:mojo
- gn check out/Default //electron/shell/common:plugin
- if DEFINED ELECTRON_RBE_JWT (autoninja -j 300 -C out/Default electron:electron_app) else (autoninja -C out/Default electron:electron_app)
- autoninja -j 300 -C out/Default electron:electron_app
- if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default )
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true %GN_EXTRA_ARGS%"
- autoninja -C out/ffmpeg electron:electron_ffmpeg_zip

View File

@@ -86,9 +86,21 @@ true if the kill is successful, and false otherwise.
#### `child.pid`
A `Integer | undefined` representing the process identifier (PID) of the child process.
If the child process fails to spawn due to errors, then the value is `undefined`. When
Until the child process has spawned successfully, the value is `undefined`. When
the child process exits, then the value is `undefined` after the `exit` event is emitted.
```js
const child = utilityProcess.fork(path.join(__dirname, 'test.js'))
child.on('spawn', () => {
console.log(child.pid) // Integer
})
child.on('exit', () => {
console.log(child.pid) // undefined
})
```
#### `child.stdout`
A `NodeJS.ReadableStream | null` that represents the child process's stdout.

View File

@@ -20,10 +20,10 @@ index 7de8923518dbfb69fef62d7781f906b30cf62155..7a4310d6d8e85f07f0ae6c97726d909c
case ssl_open_record_error:
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
index c84c50710475f5e0ac8633bb97abafdca7fb324f..724d854540ced9b57a7fc804f61fff89f6f9fadf 100644
index f0b3872e95d21646e6fb943f012a11287c1cf5a8..1f7bd4b503f6f4406248c1b48c2dc87f84e903c6 100644
--- a/ssl/ssl_lib.cc
+++ b/ssl/ssl_lib.cc
@@ -1335,7 +1335,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
@@ -1337,7 +1337,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
}
if (ret_code == 0) {
@@ -32,7 +32,7 @@ index c84c50710475f5e0ac8633bb97abafdca7fb324f..724d854540ced9b57a7fc804f61fff89
return SSL_ERROR_ZERO_RETURN;
}
// An EOF was observed which violates the protocol, and the underlying
@@ -2707,13 +2707,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
@@ -2709,13 +2709,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
}

View File

@@ -132,3 +132,5 @@ build_expose_webplugininfo_interface_to_electron.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
ui_add_missing_shortcut_text_for_vkey_command_on_linux.patch
fix_software_compositing_infinite_loop.patch

View File

@@ -23,10 +23,10 @@ index ad0092ef2e13853e4bb8b923481559a043b00ab7..1c2dfd23f18733e21312992877ae1499
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 21ecced6578552e30c1a01841053f679355b7729..288f7d591426e970bddd76bc8c4c4610ba36cd02 100644
index 6e8b3fbcc9c553a725bbd8e5a710be6be239a88b..ba7cb724f30582b51fd53cad99271b0651eff08c 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,
@@ -4781,6 +4781,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,7 +40,7 @@ index 21ecced6578552e30c1a01841053f679355b7729..288f7d591426e970bddd76bc8c4c4610
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 7cbbc9c3924f5c37e4d0665b2e3dd961aff227cb..f6bcf5b1dcace172256a49b4745b26cd8354427d 100644
index 764763cb6967cb365882083fc4c0572869cc962a..85d682d3233bd10fbe54a050280649e3a82f9a00 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -651,6 +651,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -53,10 +53,10 @@ index 7cbbc9c3924f5c37e4d0665b2e3dd961aff227cb..f6bcf5b1dcace172256a49b4745b26cd
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 26c92021ceb5dc5cead46f9dcb8c73dc502bcc8b..9a6984cffc8ff24e9c5caf9dae2b1b65595edb94 100644
index 8ebdaf39d5cc0539b24b843d82937adbe12a51d1..201d2bfaf21a92274d475d9a790ca9334ffbdd92 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -665,6 +665,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -664,6 +664,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}

View File

@@ -8,12 +8,12 @@ was removed as part of the Raw Clipboard API scrubbing.
https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
index 28df49366e87d17c831b8f941e30faa19cf36626..d68c58edeb6abec865f6ad051e5da2c0bdc7981d 100644
index bbdd3598894f5455f890ffde1d3cf8076b9a9176..7b2724f8c2baa2461645e85c07b6487b93540251 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
@@ -237,6 +237,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting(
@@ -227,6 +227,16 @@ void ScopedClipboardWriter::WriteData(const std::u16string& format,
}
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+void ScopedClipboardWriter::WriteUnsafeRawData(const std::u16string& format,
+ mojo_base::BigBuffer data) {
@@ -29,10 +29,10 @@ index 28df49366e87d17c831b8f941e30faa19cf36626..d68c58edeb6abec865f6ad051e5da2c0
objects_.clear();
platform_representations_.clear();
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
index 96ba9abb9b7efab79adbf299c6bd3b4f7a4501e1..0916b81ec5b3cb123185b7cff332120ee498fb57 100644
index af932ade8d50f304be850dc1ff4f77b618c12c1f..a907fdebfa901938abded0eae203c093d8387f5b 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.h
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
@@ -89,6 +89,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
@@ -88,6 +88,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
// This is only used to write custom format data.
void WriteData(const std::u16string& format, mojo_base::BigBuffer data);
@@ -42,4 +42,4 @@ index 96ba9abb9b7efab79adbf299c6bd3b4f7a4501e1..0916b81ec5b3cb123185b7cff332120e
+
void WriteImage(const SkBitmap& bitmap);
#if BUILDFLAG(IS_CHROMEOS_LACROS)
// Mark the data to be written as confidential.

View File

@@ -23,10 +23,10 @@ index e392efaf2e1ac3cfbef2d787ba40f0491b67f3cc..d45c7570484a7c1bfca25c860a1ddd2d
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 52ce9d2c8c5e29b8dce26116c04dac087b83571d..1c9573708b1b27cffaac175740e1ed826c8115ec 100644
index b1196c76de2092b41c139b040cef0915b9a1015e..5583bcd62964a2d9d5ed6223034b4201d5bc7932 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -746,6 +746,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -760,6 +760,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@@ -51,7 +51,7 @@ index 961e55732d9c3aa5437e9cc6eca7a2c8d06bd335..f0fc8d303dc9de2419d5f5d769657faf
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 5de852d1bab55804b521e128c48f3013281872f2..e8a74b48864e71597996ef13463a358acecb5b7e 100644
index dff505e44145b630c03715bf4c2e5ff8a264602e..233a352c5c2cb5ce66fc67989a0d93a3d08523c6 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -585,8 +585,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
@@ -155,7 +155,7 @@ index b5281ba47164159d10ca16b7641cfdc8a4bfbbef..734c055e1828d790f2abb80243bc10fa
// 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 e85443e4492d31f043b50e4d6e51b1b36ee2c11e..cadc45e27f3d45fbf7a2edc713e1e1f5a714d01e 100644
index bd7c22360193d52e1acf5a8dc82e3da34285ea37..78aabb76e02b7713d47242c28b0b7a3818faf6e9 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

@@ -5,11 +5,11 @@ Subject: Allow setting secondary label via SimpleMenuModel
Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976
diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
index fbf6043fc4322561438de7d09dfd9a4ec541af8a..e85a4a16e9090435e742fb127c0bc607c644b51b 100644
--- a/ui/base/models/simple_menu_model.cc
+++ b/ui/base/models/simple_menu_model.cc
@@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
diff --git a/ui/menus/simple_menu_model.cc b/ui/menus/simple_menu_model.cc
index d30328dcd753afc86e642f8a9de409097795da92..9378991a4c21c4ed42df6d3a7396a9b8c55faf17 100644
--- a/ui/menus/simple_menu_model.cc
+++ b/ui/menus/simple_menu_model.cc
@@ -54,6 +54,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
return std::u16string();
}
@@ -21,7 +21,7 @@ index fbf6043fc4322561438de7d09dfd9a4ec541af8a..e85a4a16e9090435e742fb127c0bc607
ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
int command_id) const {
return ImageModel();
@@ -338,6 +343,11 @@ void SimpleMenuModel::SetLabel(size_t index, const std::u16string& label) {
@@ -341,6 +346,11 @@ void SimpleMenuModel::SetLabel(size_t index, const std::u16string& label) {
MenuItemsChanged();
}
@@ -33,7 +33,7 @@ index fbf6043fc4322561438de7d09dfd9a4ec541af8a..e85a4a16e9090435e742fb127c0bc607
void SimpleMenuModel::SetMinorText(size_t index,
const std::u16string& minor_text) {
items_[ValidateItemIndex(index)].minor_text = minor_text;
@@ -433,6 +443,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
@@ -440,6 +450,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
return items_[ValidateItemIndex(index)].label;
}
@@ -46,11 +46,11 @@ index fbf6043fc4322561438de7d09dfd9a4ec541af8a..e85a4a16e9090435e742fb127c0bc607
std::u16string SimpleMenuModel::GetMinorTextAt(size_t index) const {
return items_[ValidateItemIndex(index)].minor_text;
}
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
index e7d5811973ab8e81c0a4c8e93ef8653e0aebded8..d43bcbc19564c49c87e10951f7d6a2ed4a027586 100644
--- a/ui/base/models/simple_menu_model.h
+++ b/ui/base/models/simple_menu_model.h
@@ -99,6 +99,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
diff --git a/ui/menus/simple_menu_model.h b/ui/menus/simple_menu_model.h
index 7f327f34e7f5d1c8760c3a14b550b835457d8362..0b7fe12964aa0dadfc79427df1f4738c5a06ae65 100644
--- a/ui/menus/simple_menu_model.h
+++ b/ui/menus/simple_menu_model.h
@@ -99,6 +99,7 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel {
// Some command ids have labels and icons that change over time.
virtual bool IsItemForCommandIdDynamic(int command_id) const;
virtual std::u16string GetLabelForCommandId(int command_id) const;
@@ -58,7 +58,7 @@ index e7d5811973ab8e81c0a4c8e93ef8653e0aebded8..d43bcbc19564c49c87e10951f7d6a2ed
// Gets the icon for the item with the specified id.
virtual ImageModel GetIconForCommandId(int command_id) const;
@@ -218,6 +219,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -218,6 +219,9 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel {
// Sets the label for the item at |index|.
void SetLabel(size_t index, const std::u16string& label);
@@ -68,7 +68,7 @@ index e7d5811973ab8e81c0a4c8e93ef8653e0aebded8..d43bcbc19564c49c87e10951f7d6a2ed
// Sets the minor text for the item at |index|.
void SetMinorText(size_t index, const std::u16string& minor_text);
@@ -261,6 +265,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -261,6 +265,7 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel {
ui::MenuSeparatorType GetSeparatorTypeAt(size_t index) const override;
int GetCommandIdAt(size_t index) const override;
std::u16string GetLabelAt(size_t index) const override;
@@ -76,7 +76,7 @@ index e7d5811973ab8e81c0a4c8e93ef8653e0aebded8..d43bcbc19564c49c87e10951f7d6a2ed
std::u16string GetMinorTextAt(size_t index) const override;
ImageModel GetMinorIconAt(size_t index) const override;
bool IsItemDynamicAt(size_t index) const override;
@@ -300,6 +305,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -300,6 +305,7 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel {
int command_id = 0;
ItemType type = TYPE_COMMAND;
std::u16string label;

View File

@@ -49,7 +49,7 @@ index 2f33ec660a975522c473ecd50e633b5edaca707f..65221a51927d9f44bd6adbad88fa1144
// 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 e3c85632cffc85a228082432dc25cb49ee184890..0778fbf495f43257b1ea218e18776c1893589f3e 100644
index 6b64f27fb8f6dccfa20caea63407edb3adc5d045..0614c5e043fd0b88397863e02fd23feee2c19016 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -746,10 +746,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {

View File

@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index 5ba3046b83e881574470dc551745b855c785e05c..8d417c70a6e1b959353563d25ec6ff532ae34573 100644
index bf7628ed923556b471c9758311d6d62ea6056125..39a7cc14091bb43967e0c6413a035353701b856a 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -88,6 +88,7 @@

View File

@@ -33,10 +33,10 @@ index f40c70d840845fdb6171ab6ba4cdcf92dbfd9965..7d762b40f44d8dc3cd1cb63c56a188f9
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 46219ca4fbc09900414526a1e3b8980be79cd29c..bc4a61474cfd88f95485dcd80185b3be3db2b855 100644
index 246010af5d09afcdd46188c70f74e24fc093a4b6..7b154ad07b3740e6e5f48bc8b5eafec0ab8be5c2 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4532,7 +4532,7 @@ static_library("browser") {
@@ -4518,7 +4518,7 @@ static_library("browser") {
]
}
@@ -46,10 +46,10 @@ index 46219ca4fbc09900414526a1e3b8980be79cd29c..bc4a61474cfd88f95485dcd80185b3be
# than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 04996332eac1c4a30db285ff875ebbec982b9055..353a5c6e4d9a7bdee57a3f2f6d0c563a34a66fa1 100644
index 29029bfcb44f6f6b34ea37b80a611000c3bf3d28..c3c472d62a9d9c3b4b3edd43f6f270fe8b0720b8 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -6723,9 +6723,12 @@ test("unit_tests") {
@@ -6753,9 +6753,12 @@ test("unit_tests") {
"//chrome/notification_helper",
]
@@ -63,7 +63,7 @@ index 04996332eac1c4a30db285ff875ebbec982b9055..353a5c6e4d9a7bdee57a3f2f6d0c563a
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -7682,6 +7685,10 @@ test("unit_tests") {
@@ -7696,6 +7699,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
]
@@ -74,7 +74,7 @@ index 04996332eac1c4a30db285ff875ebbec982b9055..353a5c6e4d9a7bdee57a3f2f6d0c563a
sources += [
# The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc",
@@ -7734,7 +7741,6 @@ test("unit_tests") {
@@ -7748,7 +7755,6 @@ test("unit_tests") {
# Non-android deps for "unit_tests" target.
deps += [
"../browser/screen_ai:screen_ai_install_state",

View File

@@ -7,10 +7,10 @@ Allows implementing electron::mojom::ElectronPluginInfoHost interface
which provides plugin details between browser<->renderer.
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
index 0b7e43edf99ce901141ca9271f7130658525fd23..88dbc54c6b7d857cc0c572eb831d457348af236c 100644
index 4695de42ecfa44f2339957b6ca8e3420b39b8a42..ac694247d243ddbb61f884646d4d3006e30ec367 100644
--- a/content/public/common/BUILD.gn
+++ b/content/public/common/BUILD.gn
@@ -370,6 +370,7 @@ mojom("interfaces") {
@@ -376,6 +376,7 @@ mojom("interfaces") {
"//content/common/*",
"//extensions/common:mojom",
"//extensions/common:mojom_blink",

View File

@@ -6,7 +6,7 @@ Subject: build: make libcxx_abi_unstable false for electron
https://nornagon.medium.com/a-libc-odyssey-973e51649063
diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site
index 260a4a9772a625ff02d66faffdd6937215402261..6e485725c967ca27d8ffe6b52c47dddd0d82bd7e 100644
index 6e4f7269e3db2f7de54f0cfe1fa31303c96f9796..9b207c8cfda3cd9b6c64d2042383312f8abb5619 100644
--- a/buildtools/third_party/libc++/__config_site
+++ b/buildtools/third_party/libc++/__config_site
@@ -18,7 +18,9 @@

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 98c865765c57d3387c9193df0fab73bae678983a..f737902ba9a5ff5b98940eca4a8e7c057c64b3bd 100644
index 4babd9f35aa9b7bb4cc23b190671d2adc509942e..9f530a1a768d27070f10fc40c6af51f56f42f0ca 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9115,6 +9115,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -9123,6 +9123,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,
@@ -51,10 +51,10 @@ index f25b2cc6c138a4e201b6ec9f74f9cb5734195f24..c67be0c23f8b8d6f49ee82e1617c0f3c
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 61ee456a1bfb842aefd8b644ff0ae630a698ef7c..cbf4276337139a81d46fb263bce8f5ee98da39a6 100644
index 8e571dc1371cf2aa7c8354f0b4e492e0d030b485..c878169e7838849cbc23df2ed94ca65da4518f7f 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -610,6 +610,10 @@ struct CreateNewWindowParams {
@@ -617,6 +617,10 @@ struct CreateNewWindowParams {
// The navigation initiator's user activation and ad status.
blink.mojom.NavigationInitiatorActivationAndAdStatus
initiator_activation_and_ad_status;
@@ -66,10 +66,10 @@ index 61ee456a1bfb842aefd8b644ff0ae630a698ef7c..cbf4276337139a81d46fb263bce8f5ee
// 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 21967547790cacc162d9b125e60ca24919b6b485..af7126cec088e5ece113dfbea19674421182abaa 100644
index 225e8ebcd6ffc5396268c002c53307b81680be09..981c5a6919201e7c0557330833d6756aea08c8d6 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -765,6 +765,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -774,6 +774,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -79,7 +79,7 @@ index 21967547790cacc162d9b125e60ca24919b6b485..af7126cec088e5ece113dfbea1967442
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 0f6781dc459e1072e1f538b2c60c21699b175852..ad94803577af27c84e247ace2137995a9ca886e0 100644
index a521f0fc8b3acc45e93996997a26e05771b56a03..47efdce8d0aacf331d7b54ca787dc0afd1595029 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -196,6 +196,7 @@ class NetworkService;
@@ -90,7 +90,7 @@ index 0f6781dc459e1072e1f538b2c60c21699b175852..ad94803577af27c84e247ace2137995a
} // namespace network
namespace sandbox {
@@ -1325,6 +1326,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1339,6 +1340,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -148,10 +148,10 @@ index 19dff7ea3f62e5095ee03335978dac5d58cc1465..cbec82fe1fbc43c188ac9c0cf318ee49
// 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 1fd3487243760d5a64bcd27f7022d8d0326bab65..21ecced6578552e30c1a01841053f679355b7729 100644
index 0cbe72d5fb0d564243e596e5b6eea8cb9f181fc1..6e8b3fbcc9c553a725bbd8e5a710be6be239a88b 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6858,6 +6858,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6848,6 +6848,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
GetWebFrame()->IsAdScriptInStack());
@@ -163,7 +163,7 @@ index 1fd3487243760d5a64bcd27f7022d8d0326bab65..21ecced6578552e30c1a01841053f679
// 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 b181f3d7429cdccfede3803b0659fc877d68e884..874753add7c176871fee299d32199ebfd9526c68 100644
index 3991d60e9e40c7b01637c1a2a2817e61157bfb3f..1ed70a0d597cc49edb96dbe95ea9f43b60a73aa2 100644
--- a/content/web_test/browser/web_test_content_browser_client.cc
+++ b/content/web_test/browser/web_test_content_browser_client.cc
@@ -520,6 +520,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -176,7 +176,7 @@ index b181f3d7429cdccfede3803b0659fc877d68e884..874753add7c176871fee299d32199ebf
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 126fe65469971b91e763a5e7640649dff1a096c4..398feea2aec7ece17d62259320db9035edabeccd 100644
index 3c8c4a24af84a6c037ce93b10c8f77827cc64440..9389650aac41a76c77cb4924a6a53f0920a4dc65 100644
--- a/content/web_test/browser/web_test_content_browser_client.h
+++ b/content/web_test/browser/web_test_content_browser_client.h
@@ -92,6 +92,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {

View File

@@ -34,10 +34,10 @@ index 1e2c5bb35cc314d44dba85a9bafc5e55bf2b5f14..d110d0a2f005888c4450262fc1887cbf
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 de8284b0b75511d11dc3afed60efc75788d0a7d0..1d47f744b21b23afa48687e1bcc3a0f02f042a87 100644
index 6b5ed4cec3847ace96b8c1f028b789154b9cad7f..24854c7fbfefd11dabf899817f068d69f574e290 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3135,15 +3135,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3140,15 +3140,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
SetMsgHandled(FALSE);
// We must let Windows handle the caption buttons if it's drawing them, or
// they won't work.

View File

@@ -141,7 +141,7 @@ 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 520674b0a5061057fa4b769ba5db93da81531d3f..b364e20f7bba27f3f167aa201e26c9160f1128cd 100644
index bd31ef4d919c9ddce958024a93edf1aab44436b6..6b7c5c7b2dd0fa83797ef57a34f7eb9969779488 100644
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
@@ -97,8 +97,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
@@ -380,10 +380,10 @@ index 6d1f959d85f7c96d5d9ac84d4ae7831bec5cc706..682ff6a2f4cbde454c1ab06db43dd128
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 0b9e6f37e0a5fcf1c4a1871f6750708abc5d0a1c..eb30d03da8dfa5e1a701f2b871bdfe9879a59e75 100644
index d9c8efd5dfadddc923c9bf4abc21c029ed9f842e..efb45a765c1a2cace1d4ae5dca344e7542f66bfd 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -197,8 +197,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
@@ -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,

View File

@@ -6,7 +6,7 @@ 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 69eb2ad17a15a17ca274a3a3128de9b841061a95..8eb231302c35ac6de1bfdfd53019287723cf40ed 100644
index e305d25a8f2a34ac90f4d503a9c74dcc6c553cdf..17625e389a23b8620853e66b8e0edd69d561d9a2 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -559,7 +559,11 @@

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 5a521aa5a61172954ad09a49c44a22633b1471ac..ce714ed077d9e5a22b5de926408fbe6d35cc04d6 100644
index 0f818deb682df60f33b89a34ca0eedef020e3a75..9fe8ce99d4b5fe83bf66c37d7acec4d4e670f8c2 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -789,6 +789,10 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -790,6 +790,10 @@ void RenderWidgetHostImpl::WasHidden() {
return;
}
@@ -21,10 +21,10 @@ index 5a521aa5a61172954ad09a49c44a22633b1471ac..ce714ed077d9e5a22b5de926408fbe6d
// Prompts should remain open and functional across tab switches.
if (!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 b8dadc4cca4621e991cdc874e0663cedd3f48d74..34ceb4c605a767e1eaf5434a68132f98b0a4056c 100644
index 39f00090f4ab24ee3a8bd3a8f0e26b3f5156454b..b306f1b435a38ef8e3aaa1172fc6bdb90b20f1a4 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -1018,6 +1018,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -1019,6 +1019,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// Requests a commit and forced redraw in the renderer compositor.
void ForceRedrawForTesting();
@@ -35,7 +35,7 @@ index b8dadc4cca4621e991cdc874e0663cedd3f48d74..34ceb4c605a767e1eaf5434a68132f98
// |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 55548735a1d1072a4d5d3c463a759c0ebf243af9..5de852d1bab55804b521e128c48f3013281872f2 100644
index ac44bba7a596eed995b2e66f72c5f54ba73d3dd3..dff505e44145b630c03715bf4c2e5ff8a264602e 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -649,7 +649,7 @@ void RenderWidgetHostViewAura::HideImpl() {

View File

@@ -19,10 +19,10 @@ index 6cd2eace306cb6b3b8d39d968f898c6468d00eea..e2146f0a06fb70d16c48fe6e06d0615c
excluded_margin);
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 328cf96499fa2ec23259339cffce467de142acc6..466738cc252dceae3fcaa7c44aaa29ff945386ef 100644
index 8e0e565f4a8a1e39070a9225bcfc277e3eb0ba60..fc0c3a59dc308d675cc3997231df2c9b9ad02e83 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -962,8 +962,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
@@ -967,8 +967,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 43fe136e619f0fd4473f44bfb48247d532550b11..a121455608abc4fa6405d61fe0fa90081432cde2 100644
index 0b78b88754394cbbd5ffcc5694b2fdbd862ff6a8..9ea1e303fa40b03479f83a1fe7f4cb734fde7923 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1746,6 +1746,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1764,6 +1764,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@@ -51,7 +51,7 @@ index 43fe136e619f0fd4473f44bfb48247d532550b11..a121455608abc4fa6405d61fe0fa9008
// 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 a898e09ac0c989952fe2032ca4ea6ddfdacc59e6..46f3936d93277293f2b876759cb1e3a2661e4c44 100644
index 345fa438ad2afea7946117b8bac7bb6f08669b28..c191762087c5c4e777f8ff9fb6f4cf89171626e8 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -316,6 +316,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -63,10 +63,10 @@ index a898e09ac0c989952fe2032ca4ea6ddfdacc59e6..46f3936d93277293f2b876759cb1e3a2
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 362d2c79a4f8bda162f87841ba0629e88347bf14..1d26180ac8bd6bfff98d4dddabd44f50911073e1 100644
index f4c35e58af2eb5e009772de967000546fff9d290..2438d1beeeaf85eb980f04c66e21440ba5c28aa2 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1287,6 +1287,9 @@ interface NetworkContext {
@@ -1222,6 +1222,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);

View File

@@ -13,10 +13,10 @@ uses internally for things like menus and devtools.
We can remove this patch once it has in some shape been upstreamed.
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
index 09aeff0a2303ab5e3629677585c8bbb9313acc1f..c28593e409784e8de770eec4cb9b4e30e6de0dbf 100644
index 358225da145e73aedaab16f4dad3199411715c04..9c0a211ae8d5b4238e0dc663d4a3048367a80e34 100644
--- a/ui/native_theme/native_theme.cc
+++ b/ui/native_theme/native_theme.cc
@@ -208,6 +208,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
@@ -211,6 +211,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
NativeTheme::~NativeTheme() = default;
bool NativeTheme::ShouldUseDarkColors() const {
@@ -26,7 +26,7 @@ index 09aeff0a2303ab5e3629677585c8bbb9313acc1f..c28593e409784e8de770eec4cb9b4e30
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index c8e200ba27bd5e9307469ea8fb4e3f8e8466877d..7add0446eaa276bbfbbb7bf4eb90f8b6684da61d 100644
index c49860df0c20ca3b34a10a3d522b8b5e6930d46d..f3e6e07037d474c5fdc9078e52096f51ae4bdea6 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -445,6 +445,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -53,14 +53,14 @@ index c8e200ba27bd5e9307469ea8fb4e3f8e8466877d..7add0446eaa276bbfbbb7bf4eb90f8b6
// Returns a shared instance of the native theme that should be used for web
// rendering. Do not use it in a normal application context (i.e. browser).
// The returned object should not be deleted by the caller. This function is
@@ -673,6 +690,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -689,6 +706,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
std::optional<base::TimeDelta> caret_blink_interval_;
+ ThemeSource theme_source_ = ThemeSource::kSystem;
SEQUENCE_CHECKER(sequence_checker_);
};
// Obtaining the PrefersAlwaysShowScrollbar system setting can be expensive,
// so it is cached in this boolean.
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index c1523bbdbf16e1df1bf158b7b053dce09116f2fc..06831ec767f6ba81e76f52322fc2d81a45c2c275 100644
--- a/ui/native_theme/native_theme_win.cc

View File

@@ -199,10 +199,10 @@ index 58985ce62dc569256bad5e94de9c0d125fc470d0..33436784b691c860d58f8b4dfcc6718e
&SelectFileDialogLinuxKde::OnSelectSingleFolderDialogResponse, this,
parent));
diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.cc b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
index 1495d07341d8991cf167fd7018c0ef52decc3554..4ee2cab4de9da4e9ae8f64f3b23c9db489b21cd2 100644
index 2658b98695703b994319b85a4e033dd3d8e639d9..4a829931097d657f35636649cb743b264925a359 100644
--- a/ui/shell_dialogs/select_file_dialog_linux_portal.cc
+++ b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
@@ -44,7 +44,9 @@ constexpr char kMethodStartServiceByName[] = "StartServiceByName";
@@ -40,7 +40,9 @@ namespace {
constexpr char kXdgPortalService[] = "org.freedesktop.portal.Desktop";
constexpr char kXdgPortalObject[] = "/org/freedesktop/portal/desktop";
@@ -213,7 +213,7 @@ index 1495d07341d8991cf167fd7018c0ef52decc3554..4ee2cab4de9da4e9ae8f64f3b23c9db4
constexpr char kXdgPortalRequestInterfaceName[] =
"org.freedesktop.portal.Request";
@@ -221,6 +223,8 @@ void SelectFileDialogLinuxPortal::SelectFileImpl(
@@ -214,6 +216,8 @@ void SelectFileDialogLinuxPortal::SelectFileImpl(
weak_factory_.GetWeakPtr()));
info_->type = type;
info_->main_task_runner = base::SequencedTaskRunner::GetCurrentDefault();
@@ -222,7 +222,7 @@ index 1495d07341d8991cf167fd7018c0ef52decc3554..4ee2cab4de9da4e9ae8f64f3b23c9db4
if (owning_window) {
if (auto* root = owning_window->GetRootWindow()) {
@@ -550,7 +554,9 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions(
@@ -455,7 +459,9 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions(
response_handle_token);
if (type == SelectFileDialog::Type::SELECT_UPLOAD_FOLDER) {
@@ -233,7 +233,7 @@ index 1495d07341d8991cf167fd7018c0ef52decc3554..4ee2cab4de9da4e9ae8f64f3b23c9db4
l10n_util::GetStringUTF8(
IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON));
}
@@ -559,6 +565,8 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions(
@@ -464,6 +470,8 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions(
type == SelectFileDialog::Type::SELECT_UPLOAD_FOLDER ||
type == SelectFileDialog::Type::SELECT_EXISTING_FOLDER) {
AppendBoolOption(&options_writer, kFileChooserOptionDirectory, true);
@@ -243,10 +243,10 @@ index 1495d07341d8991cf167fd7018c0ef52decc3554..4ee2cab4de9da4e9ae8f64f3b23c9db4
AppendBoolOption(&options_writer, kFileChooserOptionMultiple, true);
}
diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.h b/ui/shell_dialogs/select_file_dialog_linux_portal.h
index 47e3b0e658858ba5f3219f04d258bdf6dd7c26ed..ff8eaabb406cdf759f7a62725171aaf9f74ce183 100644
index d57a52b3ccbd3bd6d390615351ea2ad1e475b157..433f34ac6779611623241cd977dd1214e97fece7 100644
--- a/ui/shell_dialogs/select_file_dialog_linux_portal.h
+++ b/ui/shell_dialogs/select_file_dialog_linux_portal.h
@@ -117,6 +117,8 @@ class SelectFileDialogLinuxPortal : public SelectFileDialogLinux {
@@ -120,6 +120,8 @@ class SelectFileDialogLinuxPortal : public SelectFileDialogLinux {
Type type;
// The task runner the SelectFileImpl method was called on.
scoped_refptr<base::SequencedTaskRunner> main_task_runner;

View File

@@ -397,7 +397,7 @@ index ce9644d33fe83379127b01bf9a2b1c4badc3bc7c..fd486d4637ae4766ed78571dee7f9ceb
if (schemes.allow_non_standard_schemes_in_origins)
url::EnableNonStandardSchemesForAndroidWebView();
diff --git a/content/public/common/content_client.h b/content/public/common/content_client.h
index 9dc2d5a33858da7c31fd87bbbabe3899301fa52d..ebf0bb23b9aedb7bf9eb8af52b4756dba452183e 100644
index 89b70ce1e26612ae85dfcfa088718cb0c79881a2..f78342eca69ace7c3bb5f63cc986074657435ac2 100644
--- a/content/public/common/content_client.h
+++ b/content/public/common/content_client.h
@@ -142,6 +142,9 @@ class CONTENT_EXPORT ContentClient {

View File

@@ -311,7 +311,7 @@ index 128bca8bb64113418551a20164f67ef5e5a88253..93f86ec79364db1f46c5d2eb015a11cf
// 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 5b76ef79789414fd1f18b0629873e7722c9fbd1c..fff10d51944ba27556b97abc3222308e440645cd 100644
index abd86442bb1cd2ce77f9dd1f24d22b356517a67f..4195075121859047fd1d3c6fdf45fe35f742a3e1 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
@@ -329,8 +329,16 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
@@ -363,7 +363,7 @@ index 415156d403a59bf426cf4561a9d58ecdb27524b4..78aa7b2359c684d5305bf6352751dfbb
#if defined(USE_AURA) || BUILDFLAG(IS_MAC)
// Assigns integer identifier to the |window| and returns its DesktopMediaID.
diff --git a/media/capture/video_capture_types.h b/media/capture/video_capture_types.h
index 53e8077c9c0b635df0abdeca43fa9a6373c68252..2805e36cc42190d8197d83f5df235094570e3d5d 100644
index f2b75f5b2f547ad135c1288bf3639b26dedc8053..ef18724d9f2ea68a47b66fc3981f58a73ac1b51d 100644
--- a/media/capture/video_capture_types.h
+++ b/media/capture/video_capture_types.h
@@ -355,6 +355,8 @@ struct CAPTURE_EXPORT VideoCaptureParams {

View File

@@ -85,7 +85,7 @@ index 31a2a14a95540477297943df9b09b1e4659a884d..c02a81b1bd14a300dbbb47ad7aac2d2d
DCHECK(GetZygoteForLaunch());
// Environment variables could be supported in the future, but are not
diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc
index bbea8fff37040029996d1e91e592f6cb5bf8fbc2..13bbd8486279bf575010ab5ad62ba24a0d4cb24f 100644
index 572f23d579c0bce81b4b63f7030297d469ef3fbd..5a6ce0a7888f449ad73c6870bab569df7a23bd80 100644
--- a/content/browser/child_process_launcher_helper_mac.cc
+++ b/content/browser/child_process_launcher_helper_mac.cc
@@ -110,7 +110,8 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
@@ -98,7 +98,7 @@ index bbea8fff37040029996d1e91e592f6cb5bf8fbc2..13bbd8486279bf575010ab5ad62ba24a
options->disclaim_responsibility = delegate_->DisclaimResponsibility();
options->enable_cpu_security_mitigations =
delegate_->EnableCpuSecurityMitigations();
@@ -176,6 +177,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
@@ -177,6 +178,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
base::StringPrintf("%s%d", sandbox::switches::kSeatbeltClient, pipe));
}
@@ -347,10 +347,10 @@ index faa41e5f2571f7a8aa4eef927eca003801d787f6..16d5efc5f9191020aa2180d665cf5207
// launch failed.
enum class LaunchState {
diff --git a/content/browser/utility_sandbox_delegate.cc b/content/browser/utility_sandbox_delegate.cc
index 6285d8eb5d05f7afbe45a314f423786d5ae01f53..5954f509ee80460ab73042ed39e236067e6f0d9b 100644
index 87bff385e6893206aedb9bbf108254056b4e93a7..e845a03fb69ff5997c0facc0bacdfcc3df0e0bdb 100644
--- a/content/browser/utility_sandbox_delegate.cc
+++ b/content/browser/utility_sandbox_delegate.cc
@@ -34,17 +34,19 @@ UtilitySandboxedProcessLauncherDelegate::
@@ -41,17 +41,19 @@ UtilitySandboxedProcessLauncherDelegate::
UtilitySandboxedProcessLauncherDelegate(
sandbox::mojom::Sandbox sandbox_type,
const base::EnvironmentMap& env,
@@ -374,7 +374,7 @@ index 6285d8eb5d05f7afbe45a314f423786d5ae01f53..5954f509ee80460ab73042ed39e23606
#if DCHECK_IS_ON()
bool supported_sandbox_type =
sandbox_type_ == sandbox::mojom::Sandbox::kNoSandbox ||
@@ -113,11 +115,28 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
@@ -120,11 +122,28 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
return sandbox_type_;
}
@@ -406,10 +406,10 @@ index 6285d8eb5d05f7afbe45a314f423786d5ae01f53..5954f509ee80460ab73042ed39e23606
#if BUILDFLAG(USE_ZYGOTE)
ZygoteCommunication* UtilitySandboxedProcessLauncherDelegate::GetZygote() {
diff --git a/content/browser/utility_sandbox_delegate.h b/content/browser/utility_sandbox_delegate.h
index 27cef06ded34680c6bfa3e954924de645a1b8217..7c114956a77da7b60526dd93593d84627356bb16 100644
index f3167c642c1f594c29ef7aa2a92a246f1d045344..f1f1dc8082b6039bf119ce10e7e4ca0e941d4cbd 100644
--- a/content/browser/utility_sandbox_delegate.h
+++ b/content/browser/utility_sandbox_delegate.h
@@ -30,7 +30,9 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate
@@ -34,7 +34,9 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate
public:
UtilitySandboxedProcessLauncherDelegate(sandbox::mojom::Sandbox sandbox_type,
const base::EnvironmentMap& env,
@@ -420,7 +420,7 @@ index 27cef06ded34680c6bfa3e954924de645a1b8217..7c114956a77da7b60526dd93593d8462
~UtilitySandboxedProcessLauncherDelegate() override;
sandbox::mojom::Sandbox GetSandboxType() override;
@@ -55,18 +57,21 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate
@@ -59,9 +61,14 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate
ZygoteCommunication* GetZygote() override;
#endif // BUILDFLAG(USE_ZYGOTE)
@@ -437,7 +437,8 @@ index 27cef06ded34680c6bfa3e954924de645a1b8217..7c114956a77da7b60526dd93593d8462
#if BUILDFLAG(USE_ZYGOTE)
void SetZygote(ZygoteCommunication* handle);
#endif // BUILDFLAG(USE_ZYGOTE_HANDLE)
@@ -72,9 +79,7 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate
#endif // BUILDFLAG(IS_MAC)
private:
-#if BUILDFLAG(IS_POSIX)
@@ -446,7 +447,7 @@ index 27cef06ded34680c6bfa3e954924de645a1b8217..7c114956a77da7b60526dd93593d8462
#if BUILDFLAG(IS_WIN)
std::vector<base::FilePath> preload_libraries_;
@@ -76,12 +81,17 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate
@@ -84,12 +89,17 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate
std::optional<raw_ptr<ZygoteCommunication>> zygote_;
#endif // BUILDFLAG(USE_ZYGOTE)
@@ -641,10 +642,10 @@ index 5c24090e3311a89dc2a9162045feaacda574bb99..b772a2a054e9d19025ebd2909acf1b92
} // namespace content
diff --git a/content/public/common/sandboxed_process_launcher_delegate.cc b/content/public/common/sandboxed_process_launcher_delegate.cc
index 8656215a709012eef80532e7aac197818ac292df..74ad339d8f8fcc62628006171e0a7ad265143625 100644
index 4792134063125aba1a6a21cf9ab4a91d8d9e9486..61b98eb66722ed8e6cb83d5e08cf0c618449d1e0 100644
--- a/content/public/common/sandboxed_process_launcher_delegate.cc
+++ b/content/public/common/sandboxed_process_launcher_delegate.cc
@@ -64,11 +64,23 @@ ZygoteCommunication* SandboxedProcessLauncherDelegate::GetZygote() {
@@ -70,11 +70,23 @@ ZygoteCommunication* SandboxedProcessLauncherDelegate::GetZygote() {
}
#endif // BUILDFLAG(USE_ZYGOTE)
@@ -671,18 +672,18 @@ index 8656215a709012eef80532e7aac197818ac292df..74ad339d8f8fcc62628006171e0a7ad2
#if BUILDFLAG(IS_MAC)
diff --git a/content/public/common/sandboxed_process_launcher_delegate.h b/content/public/common/sandboxed_process_launcher_delegate.h
index 4b2ea0e2680c552b853fcbe4f5e4765a908f8915..6e8af760d986911ed6030b24244e9b21eeba865c 100644
index b67f4f87d588386409a90cd49e8338272c6e0d51..c34a80ec8db1b868a7f387ea4a11d71d550cdb15 100644
--- a/content/public/common/sandboxed_process_launcher_delegate.h
+++ b/content/public/common/sandboxed_process_launcher_delegate.h
@@ -6,6 +6,7 @@
#define CONTENT_PUBLIC_COMMON_SANDBOXED_PROCESS_LAUNCHER_DELEGATE_H_
@@ -8,6 +8,7 @@
#include <optional>
#include "base/environment.h"
+#include "base/files/file_path.h"
#include "base/files/scoped_file.h"
#include "base/process/process.h"
#include "build/build_config.h"
@@ -56,10 +57,19 @@ class CONTENT_EXPORT SandboxedProcessLauncherDelegate
@@ -62,10 +63,19 @@ class CONTENT_EXPORT SandboxedProcessLauncherDelegate
virtual ZygoteCommunication* GetZygote();
#endif // BUILDFLAG(USE_ZYGOTE)

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 c72cff69afab53000392220abc7decde1236e178..a94783f6dee223294d1ac0d332067b490303bc98 100644
index 964dc5c3aa8440fd3076f2198b2c89e9b8b82816..cbfdf25e7f4881fb9b6b3c7425702ea0b22e51af 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -172,6 +172,8 @@ viz_component("service") {
@@ -521,7 +521,7 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf
waiting_on_draw_ack_ = true;
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
index 5243e23874994b543f14dd26fc1b45dafea97c67..20ce7d15f56f54afc6c24e2df8e9808243ea49ca 100644
index ad65e087075b576222fe9541948afdd777e76cbf..20f0f50e226ce6e488a7636d4d3c08e3d2e2f5e5 100644
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
@@ -102,7 +102,8 @@ RootCompositorFrameSinkImpl::Create(

View File

@@ -28,10 +28,10 @@ index 23b29fe25bc463ff1d36aa502a27c4222595e7c5..c1ac6172c4cee72f64f42ca64d2db9c0
// 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 c2e86a2fdc530a7b11bfa9fac7ce7d8d36685962..0b84f0b42ab9ad08ef727ef14c7226b32e1871ac 100644
index aa2e582b43a0ca9cad9c1e62c5887ff3f699b86a..1b514b8d881a8feee2426dd0557b3354c63f4417 100644
--- a/third_party/blink/renderer/core/loader/document_loader.h
+++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -320,7 +320,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
@@ -324,7 +324,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
std::optional<scheduler::TaskAttributionId>
soft_navigation_heuristics_task_id);

View File

@@ -112,7 +112,7 @@ index 3450c15835d8b792f37764f6edc4a4560be435ef..b1034aa141d6121f8e1524fb34a28a04
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 07142dacbb70d8610604d80328a1176efc1cf2c0..aa1bd9c89083c20a7455a97dd5b2d6e5ce1dc123 100644
index 9e9b917e3f2aa9a56d4db931211828a913ed7f40..05d82fa5dd20acf84d33ca92bddedb9c6132ac36 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -598,6 +598,9 @@ URLLoader::URLLoader(

View File

@@ -14,10 +14,10 @@ This patch likely can't be upstreamed as-is, as Chromium doesn't have
this use case in mind currently.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index ae24de9ce9d3a2d6c9d7612104e1ef13bbd84f9f..c7ce5bc2aaa8bd29c41c253bd9b6fc9e713ff5a5 100644
index d0d7155c9130e4139c59e993520aa82162a0cc5d..94f3bd5c73d3474164e4bab4ec74743d86a43fce 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -909,13 +909,13 @@ void HWNDMessageHandler::FrameTypeChanged() {
@@ -914,13 +914,13 @@ void HWNDMessageHandler::FrameTypeChanged() {
void HWNDMessageHandler::PaintAsActiveChanged() {
if (!delegate_->HasNonClientView() || !delegate_->CanActivate() ||
@@ -33,7 +33,7 @@ index ae24de9ce9d3a2d6c9d7612104e1ef13bbd84f9f..c7ce5bc2aaa8bd29c41c253bd9b6fc9e
}
void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon,
@@ -2264,17 +2264,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message,
@@ -2269,17 +2269,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message,
if (IsVisible())
delegate_->SchedulePaint();

View File

@@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the
BrowserWindow.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 466738cc252dceae3fcaa7c44aaa29ff945386ef..de8284b0b75511d11dc3afed60efc75788d0a7d0 100644
index fc0c3a59dc308d675cc3997231df2c9b9ad02e83..6b5ed4cec3847ace96b8c1f028b789154b9cad7f 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3689,14 +3689,29 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
@@ -3694,14 +3694,29 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
min_window_size = delegate_->DIPToScreenSize(min_window_size);
max_window_size = delegate_->DIPToScreenSize(max_window_size);

View File

@@ -40,7 +40,7 @@ index 53bba48293111e74daba50dde617fb78f1bcc7ee..67083fb13db2020f432ec488a784bcfb
// origin of |common_params.url| and/or |common_params.initiator_origin|.
url::Origin resolved_origin = url::Origin::Resolve(
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
index 547a483db71e2980cc040fe853775fbc07723979..85c6d240a68e52b9d59fae7bbe36603e627b2893 100644
index ca0f254f2d38c238851ae0daf50b49b10922c186..c5063f9b0b428b8ece8816a812e6616e207504b0 100644
--- a/third_party/blink/renderer/core/loader/document_loader.cc
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
@@ -2264,6 +2264,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {

View File

@@ -13,54 +13,128 @@ This patch can be removed should we choose to support chrome.fileSystem
or support it enough to fix the crash.
diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts
index 2e621b9a66b0443ad961d32a6bed47e1128035a8..5e7c0e238bfe6eb55a2e795681529679a35b8d03 100644
index 020e31e04887008cba6ed04407124c034b9565a2..8a8a7eb411dc6946254d0d92e043a22bdd2053f9 100644
--- a/chrome/browser/resources/pdf/pdf_viewer.ts
+++ b/chrome/browser/resources/pdf/pdf_viewer.ts
@@ -1012,7 +1012,15 @@ export class PdfViewerElement extends PdfViewerBaseElement {
@@ -1020,28 +1020,27 @@ export class PdfViewerElement extends PdfViewerBaseElement {
dataArray = [result.dataToSave];
}
+ const a = document.createElement('a');
+ a.download = this.attachments_[index].name;
const blob = new Blob(dataArray);
+ // <if expr="not _google_chrome">
+ a.href = URL.createObjectURL(blob);
+ a.click();
+ URL.revokeObjectURL(a.href);
+ // </if>
+ // <if expr="_google_chrome">
- const blob = new Blob(dataArray);
const fileName = this.attachments_[index].name;
chrome.fileSystem.chooseEntry(
{type: 'saveFile', suggestedName: fileName},
@@ -1034,6 +1042,7 @@ export class PdfViewerElement extends PdfViewerBaseElement {
// </if>
});
});
+ // </if>
- chrome.fileSystem.chooseEntry(
- {type: 'saveFile', suggestedName: fileName},
- (entry?: FileSystemFileEntry) => {
- if (chrome.runtime.lastError) {
- if (chrome.runtime.lastError.message !== 'User cancelled') {
- console.error(
- 'chrome.fileSystem.chooseEntry failed: ' +
- chrome.runtime.lastError.message);
- }
- return;
- }
- entry!.createWriter((writer: FileWriter) => {
- writer.write(blob);
- // <if expr="enable_ink">
- // Unblock closing the window now that the user has saved
- // successfully.
- this.setShowBeforeUnloadDialog_(false);
- // </if>
- });
- });
+ const blob = new Blob(dataArray);
+
+ try {
+ const fileHandle = await window.showSaveFilePicker({
+ suggestedName: fileName,
+ });
+
+ const writable = await fileHandle.createWritable();
+ await writable.write(blob);
+ await writable.close();
+ // <if expr="enable_ink">
+ // Unblock closing the window now that the user has saved
+ // successfully.
+ this.setShowBeforeUnloadDialog_(false);
+ // </if>
+ } catch (error: any) {
+ if (error.name !== 'AbortError') {
+ console.error('window.showSaveFilePicker failed: ' + error);
+ }
+ }
}
/**
@@ -1162,7 +1171,15 @@ export class PdfViewerElement extends PdfViewerBaseElement {
@@ -1169,36 +1168,33 @@ export class PdfViewerElement extends PdfViewerBaseElement {
fileName = fileName + '.pdf';
}
// Create blob before callback to avoid race condition.
+ const a = document.createElement('a');
+ a.download = fileName;
- // Create blob before callback to avoid race condition.
const blob = new Blob([result.dataToSave], {type: 'application/pdf'});
+ // <if expr="not _google_chrome">
+ a.href = URL.createObjectURL(blob);
+ a.click();
+ URL.revokeObjectURL(a.href);
+ // </if>
+ // <if expr="_google_chrome">
chrome.fileSystem.chooseEntry(
{
type: 'saveFile',
@@ -1191,6 +1208,7 @@ export class PdfViewerElement extends PdfViewerBaseElement {
// </if>
});
});
+ // </if>
- chrome.fileSystem.chooseEntry(
- {
- type: 'saveFile',
- accepts: [{description: '*.pdf', extensions: ['pdf']}],
- suggestedName: fileName,
- },
- (entry?: FileSystemFileEntry) => {
- if (chrome.runtime.lastError) {
- if (chrome.runtime.lastError.message !== 'User cancelled') {
- console.error(
- 'chrome.fileSystem.chooseEntry failed: ' +
- chrome.runtime.lastError.message);
- }
- return;
- }
- entry!.createWriter((writer: FileWriter) => {
- writer.write(blob);
- // <if expr="enable_ink or enable_pdf_ink2">
- // Unblock closing the window now that the user has saved
- // successfully.
- this.setShowBeforeUnloadDialog_(false);
- // </if>
- // <if expr="enable_pdf_ink2">
- this.hasSavedEdits_ =
- this.hasSavedEdits_ || requestType === SaveRequestType.EDITED;
- // </if>
- });
- });
+ try {
+ const fileHandle = await window.showSaveFilePicker({
+ suggestedName: fileName,
+ types: [{
+ description: 'PDF Files',
+ accept: { 'application/pdf': ['.pdf'] },
+ }],
+ });
+
+ const writable = await fileHandle.createWritable();
+ await writable.write(blob);
+ await writable.close();
+ // <if expr="enable_ink or enable_pdf_ink2">
+ // Unblock closing the window now that the user has saved
+ // successfully.
+ this.setShowBeforeUnloadDialog_(false);
+ // </if>
+ // <if expr="enable_pdf_ink2">
+ this.hasSavedEdits_ =
+ this.hasSavedEdits_ || requestType === SaveRequestType.EDITED;
+ // </if>
+ } catch (error: any) {
+ if (error.name !== 'AbortError') {
+ console.error('window.showSaveFilePicker failed: ' + error);
+ }
+ }
// <if expr="enable_pdf_ink2">
// Ink2 doesn't need to exit annotation mode after save.
@@ -1308,6 +1304,9 @@ declare global {
interface HTMLElementTagNameMap {
'pdf-viewer': PdfViewerElement;
}
+ interface Window {
+ showSaveFilePicker(opts: unknown): Promise<FileSystemFileHandle>;
+ }
}
customElements.define(PdfViewerElement.is, PdfViewerElement);

View File

@@ -12,7 +12,7 @@ invisible state of the `viz::DisplayScheduler` owned
by the `ui::Compositor`.
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 16cc8169d80709f9a6d18401f34582c3f90eba5c..127d18f0183afc96ed648f5508e65d0a5a46fc92 100644
index 15908ea0f5a8f84d1381678291a818a26c5f5bda..3552cebebd6425e4152f4b0bf63d3fe0ea5fbda6 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -344,7 +344,8 @@ void Compositor::SetLayerTreeFrameSink(

View File

@@ -11,7 +11,7 @@ while the renderer is blocked. This Cl takes an approach similar to that taken i
MediaQueryList in order to enable the promise to be resolved.
diff --git a/third_party/blink/renderer/core/css/font_face_set_document.cc b/third_party/blink/renderer/core/css/font_face_set_document.cc
index 921e3339e967b759e3074278e920616bc85b40b3..c0ffacc4082367e0296359fa5e0aedae53217506 100644
index a477f3364122643cd79305adf86bb3cbbbded37e..479778c0118c7813ab424f4adb4f424f89ce3596 100644
--- a/third_party/blink/renderer/core/css/font_face_set_document.cc
+++ b/third_party/blink/renderer/core/css/font_face_set_document.cc
@@ -27,6 +27,7 @@
@@ -22,7 +22,7 @@ index 921e3339e967b759e3074278e920616bc85b40b3..c0ffacc4082367e0296359fa5e0aedae
#include "third_party/blink/renderer/bindings/core/v8/dictionary.h"
#include "third_party/blink/renderer/core/css/css_font_face.h"
#include "third_party/blink/renderer/core/css/css_font_selector.h"
@@ -144,21 +145,27 @@ FontFaceSetDocument::CSSConnectedFontFaceList() const {
@@ -141,21 +142,27 @@ FontFaceSetDocument::CSSConnectedFontFaceList() const {
}
void FontFaceSetDocument::FireDoneEventIfPossible() {

View File

@@ -9,10 +9,10 @@ focus node change via TextInputManager.
chromium-bug: https://crbug.com/1369605
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 e8a74b48864e71597996ef13463a358acecb5b7e..ec0f008b280561158f602f05563fd9a87fba3f97 100644
index 233a352c5c2cb5ce66fc67989a0d93a3d08523c6..95d607a5231a2c5f41ff5961e6bc3e8fe059d2f1 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -3036,6 +3036,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
@@ -3064,6 +3064,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
}
}
@@ -26,10 +26,10 @@ index e8a74b48864e71597996ef13463a358acecb5b7e..ec0f008b280561158f602f05563fd9a8
RenderWidgetHostViewAura* popup_child_host_view) {
popup_child_host_view_ = popup_child_host_view;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 3bf12c0dfa6c2501c0fe7f7412ff9b9c1a0639d3..77a4e6b42a566afeca0b6b18bfb23dad0714b974 100644
index 1d513861a831d0a4249209b234026c99ddca0b1b..58425f47285db368e3966ab96347d3c56327253e 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -635,6 +635,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
@@ -642,6 +642,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
RenderWidgetHostViewBase* updated_view) override;
void OnTextSelectionChanged(TextInputManager* text_input_mangager,
RenderWidgetHostViewBase* updated_view) override;
@@ -39,10 +39,10 @@ index 3bf12c0dfa6c2501c0fe7f7412ff9b9c1a0639d3..77a4e6b42a566afeca0b6b18bfb23dad
// Detaches |this| from the input method object.
// is_removed flag is true if this is called while the window is
diff --git a/content/browser/renderer_host/text_input_manager.cc b/content/browser/renderer_host/text_input_manager.cc
index 96af80ef11e55c86ad70ebcdd8c22387438e16e7..5f1cdec055dceff8b8fc171d07c52bccca08bd43 100644
index 8b6bfb7c6678b321b410a004bd8d24dc00033aca..b630baee31b9f1a99c5f87a90818ab2a2023e40f 100644
--- a/content/browser/renderer_host/text_input_manager.cc
+++ b/content/browser/renderer_host/text_input_manager.cc
@@ -167,6 +167,7 @@ void TextInputManager::UpdateTextInputState(
@@ -184,6 +184,7 @@ void TextInputManager::UpdateTextInputState(
if (text_input_state.type == ui::TEXT_INPUT_TYPE_NONE &&
active_view_ != view) {
@@ -50,7 +50,7 @@ index 96af80ef11e55c86ad70ebcdd8c22387438e16e7..5f1cdec055dceff8b8fc171d07c52bcc
// We reached here because an IPC is received to reset the TextInputState
// for |view|. But |view| != |active_view_|, which suggests that at least
// one other view has become active and we have received the corresponding
@@ -454,6 +455,12 @@ void TextInputManager::NotifyObserversAboutInputStateUpdate(
@@ -486,6 +487,12 @@ void TextInputManager::NotifyObserversAboutInputStateUpdate(
observer.OnUpdateTextInputStateCalled(this, updated_view, did_update_state);
}
@@ -64,10 +64,10 @@ index 96af80ef11e55c86ad70ebcdd8c22387438e16e7..5f1cdec055dceff8b8fc171d07c52bcc
TextInputManager::SelectionRegion::SelectionRegion(
diff --git a/content/browser/renderer_host/text_input_manager.h b/content/browser/renderer_host/text_input_manager.h
index 0c7d5b2c1d3e97420913bd643bb2a524a76fc286..653793fa480f035ce11e079b370bf5ed5cacfa65 100644
index 51522e60d6dc14f1113cc438558b6b393c3fe73a..153ed02f493a83ef9ca354cc18736f9394fc9a72 100644
--- a/content/browser/renderer_host/text_input_manager.h
+++ b/content/browser/renderer_host/text_input_manager.h
@@ -71,6 +71,10 @@ class CONTENT_EXPORT TextInputManager {
@@ -72,6 +72,10 @@ class CONTENT_EXPORT TextInputManager {
virtual void OnTextSelectionChanged(
TextInputManager* text_input_manager,
RenderWidgetHostViewBase* updated_view) {}
@@ -78,7 +78,7 @@ index 0c7d5b2c1d3e97420913bd643bb2a524a76fc286..653793fa480f035ce11e079b370bf5ed
};
// Text selection bounds.
@@ -275,6 +279,7 @@ class CONTENT_EXPORT TextInputManager {
@@ -308,6 +312,7 @@ class CONTENT_EXPORT TextInputManager {
void NotifyObserversAboutInputStateUpdate(RenderWidgetHostViewBase* view,
bool did_update_state);

View File

@@ -18,10 +18,10 @@ or resizing, but Electron does not seem to run into that issue
for opaque frameless windows even with that block commented out.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 1d47f744b21b23afa48687e1bcc3a0f02f042a87..ae24de9ce9d3a2d6c9d7612104e1ef13bbd84f9f 100644
index 24854c7fbfefd11dabf899817f068d69f574e290..d0d7155c9130e4139c59e993520aa82162a0cc5d 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1737,7 +1737,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
@@ -1742,7 +1742,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS),
0);

View File

@@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop
vs mobile runtimes. i.e. restore the old logic only on desktop platforms
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 3815310c78446a3cebc61680a01a374d0295e7a3..912669bdf7886b69f8386dd10ad1c1aaba2f5f27 100644
index 1ca77c290c177826b090f636f73667c5a0094c1a..e89a6985b85c0c6b26800689e470a9c538d89e2a 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2048,9 +2048,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
@@ -2049,9 +2049,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
// The resize message (which may not happen immediately) will carry with it
// the screen info as well as the new size (if the screen has changed scale

View File

@@ -64,7 +64,7 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..7a985067b1371604644d48159f2f5aa7
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 0778fbf495f43257b1ea218e18776c1893589f3e..61914f3d8f580bcd5b67b6fce9e967da472b33d8 100644
index 0614c5e043fd0b88397863e02fd23feee2c19016..8549807e503c70c4d080b726e89972b71c60f3d3 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -3131,6 +3131,7 @@ void LocalFrame::RequestExecuteScript(
@@ -85,10 +85,10 @@ index 0778fbf495f43257b1ea218e18776c1893589f3e..61914f3d8f580bcd5b67b6fce9e967da
void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() {
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
index 72722ddbecb7a006ec407b374c8d75c5054f9574..cb4c93a8356f35e5766e843006161143e539666f 100644
index acbb40738b38a5c029ca89473927b53ad9a43e16..d9fa5bb2cfff5a08d884358c4b4e4ffbac80e7ea 100644
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -818,6 +818,7 @@ class CORE_EXPORT LocalFrame final
@@ -824,6 +824,7 @@ class CORE_EXPORT LocalFrame final
mojom::blink::EvaluationTiming,
mojom::blink::LoadEventBlockingOption,
WebScriptExecutionCallback,
@@ -97,7 +97,7 @@ index 72722ddbecb7a006ec407b374c8d75c5054f9574..cb4c93a8356f35e5766e843006161143
mojom::blink::WantResultOption,
mojom::blink::PromiseResultOption);
diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
index b719b08633f5b705aa76283440a9f4d09d7ee472..44e5535f3117ef267f0bddcc34598c4214cdff7e 100644
index e169f07a251ae3d00058e5831b104cff2b1d412c..a85f0ae8a0536efa5f6d4c56d65d414a7be8ec40 100644
--- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
@@ -968,6 +968,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(

View File

@@ -6,18 +6,18 @@ Subject: fix: select the first menu item when opened via keyboard
This fixes an accessibility issue where the root view is 'focused' to the screen reader instead of the first menu item as with all other native menus. This patch will be upstreamed.
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index c394177f4a19ba07f88211db4f329fd10a93e21b..ddb08212356e6d16474bf6e2bf596fec20d142fe 100644
index 901a933aa92a0857b5cbdce63f9788662e8a7d87..ec4d8122d519c763da40f5abeaa27f891a02953d 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -578,6 +578,7 @@ void MenuController::Run(Widget* parent,
@@ -579,6 +579,7 @@ void MenuController::Run(Widget* parent,
MenuAnchorPosition position,
bool context_menu,
bool is_nested_drag,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures) {
exit_type_ = ExitType::kNone;
possible_drag_ = false;
@@ -642,6 +643,14 @@ void MenuController::Run(Widget* parent,
@@ -643,6 +644,14 @@ void MenuController::Run(Widget* parent,
// Set the selection, which opens the initial menu.
SetSelection(root, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
@@ -32,7 +32,7 @@ index c394177f4a19ba07f88211db4f329fd10a93e21b..ddb08212356e6d16474bf6e2bf596fec
if (button_controller) {
pressed_lock_ = button_controller->TakeLock(
false, ui::LocatedEvent::FromIfValid(event));
@@ -2283,19 +2292,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
@@ -2284,19 +2293,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
}
item->GetSubmenu()->ShowAt(params);
@@ -58,22 +58,22 @@ index c394177f4a19ba07f88211db4f329fd10a93e21b..ddb08212356e6d16474bf6e2bf596fec
item->GetSubmenu()->GetWidget()->SetNativeWindowProperty(
diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h
index e1c59fd911f71cf6e50201b6a683207f6924ab81..cba08b4ee0c6ea6cf991af2dc9ff8943b1bcf24b 100644
index e516d8035db49893de0c7b62b7bc755f1c96cece..102b45f09ad7ffcd082e8e2369e19cf611bd6568 100644
--- a/ui/views/controls/menu/menu_controller.h
+++ b/ui/views/controls/menu/menu_controller.h
@@ -137,6 +137,7 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
@@ -138,6 +138,7 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate,
MenuAnchorPosition position,
bool context_menu,
bool is_nested_drag,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures = gfx::NativeView());
bool for_drop() const { return for_drop_; }
diff --git a/ui/views/controls/menu/menu_runner.cc b/ui/views/controls/menu/menu_runner.cc
index 9f746392f6d83831a22d0ce8b2bb647a069d8692..cb640f1ae930f610c7eed18e3655ac2e1b2b19fa 100644
index 720cd4aed05c1ab13df4908714b03cb76ff913bb..f5d6f0e386b7bdfff744dc0071d3f52c59d0b539 100644
--- a/ui/views/controls/menu/menu_runner.cc
+++ b/ui/views/controls/menu/menu_runner.cc
@@ -89,7 +89,7 @@ void MenuRunner::RunMenuAt(
@@ -90,7 +90,7 @@ void MenuRunner::RunMenuAt(
}
impl_->RunMenuAt(parent, button_controller, bounds, anchor, run_types_,
@@ -83,14 +83,14 @@ index 9f746392f6d83831a22d0ce8b2bb647a069d8692..cb640f1ae930f610c7eed18e3655ac2e
}
diff --git a/ui/views/controls/menu/menu_runner_impl.cc b/ui/views/controls/menu/menu_runner_impl.cc
index 0ef0f5ed80dcdbc2047d878811b45fa92a4bc7fc..cc1e079afc74169c438977f727c28e0b8a0819e5 100644
index 0ef0f5ed80dcdbc2047d878811b45fa92a4bc7fc..173d1ac1937b994a9619a1dba13aa89dcc057c32 100644
--- a/ui/views/controls/menu/menu_runner_impl.cc
+++ b/ui/views/controls/menu/menu_runner_impl.cc
@@ -115,6 +115,7 @@ void MenuRunnerImpl::RunMenuAt(
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t run_types,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
std::optional<gfx::RoundedCornersF> corners,
std::optional<std::string> show_menu_host_duration_histogram) {
@@ -104,26 +104,34 @@ index 0ef0f5ed80dcdbc2047d878811b45fa92a4bc7fc..cc1e079afc74169c438977f727c28e0b
void MenuRunnerImpl::Cancel() {
diff --git a/ui/views/controls/menu/menu_runner_impl.h b/ui/views/controls/menu/menu_runner_impl.h
index c36540ede44a1ce83fc9b411a7639f9379f21977..1c3464af16aad2df09530efd889edc2e80bdc098 100644
index c36540ede44a1ce83fc9b411a7639f9379f21977..d7d48040ecb16fd2a8e27a8ab30f096117f3289e 100644
--- a/ui/views/controls/menu/menu_runner_impl.h
+++ b/ui/views/controls/menu/menu_runner_impl.h
@@ -52,6 +52,7 @@ class VIEWS_EXPORT MenuRunnerImpl : public MenuRunnerImplInterface,
@@ -14,6 +14,7 @@
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
+#include "ui/base/mojom/menu_source_type.mojom.h"
#include "ui/views/controls/menu/menu_controller_delegate.h"
#include "ui/views/controls/menu/menu_runner_impl_interface.h"
#include "ui/views/views_export.h"
@@ -52,6 +53,7 @@ class VIEWS_EXPORT MenuRunnerImpl : public MenuRunnerImplInterface,
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t run_types,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
std::optional<gfx::RoundedCornersF> corners = std::nullopt,
std::optional<std::string> show_menu_host_duration_histogram =
diff --git a/ui/views/controls/menu/menu_runner_impl_adapter.cc b/ui/views/controls/menu/menu_runner_impl_adapter.cc
index 35f1542e2162d08b164dfdda0ac3b4f78221f105..59175a7b1ab31af9b393a33f706168157e74d9fd 100644
index 35f1542e2162d08b164dfdda0ac3b4f78221f105..80601aaa1d5f80f482390237b11d09b37056b301 100644
--- a/ui/views/controls/menu/menu_runner_impl_adapter.cc
+++ b/ui/views/controls/menu/menu_runner_impl_adapter.cc
@@ -35,11 +35,12 @@ void MenuRunnerImplAdapter::RunMenuAt(
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t types,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
std::optional<gfx::RoundedCornersF> corners,
std::optional<std::string> show_menu_host_duration_histogram) {
@@ -134,74 +142,106 @@ index 35f1542e2162d08b164dfdda0ac3b4f78221f105..59175a7b1ab31af9b393a33f70616815
void MenuRunnerImplAdapter::Cancel() {
diff --git a/ui/views/controls/menu/menu_runner_impl_adapter.h b/ui/views/controls/menu/menu_runner_impl_adapter.h
index 546818cef0120746366547aa2470e35def534195..5a314986b6155c7a427c5e39947a5b5c546d3477 100644
index 546818cef0120746366547aa2470e35def534195..8c55c2fe3a99bab06178f2de8e2c189a53d1a401 100644
--- a/ui/views/controls/menu/menu_runner_impl_adapter.h
+++ b/ui/views/controls/menu/menu_runner_impl_adapter.h
@@ -43,6 +43,7 @@ class VIEWS_EXPORT MenuRunnerImplAdapter : public MenuRunnerImplInterface {
@@ -11,6 +11,7 @@
#include <string>
#include "base/memory/raw_ptr.h"
+#include "ui/base/mojom/menu_source_type.mojom.h"
#include "ui/views/controls/menu/menu_runner_impl_interface.h"
#include "ui/views/views_export.h"
@@ -43,6 +44,7 @@ class VIEWS_EXPORT MenuRunnerImplAdapter : public MenuRunnerImplInterface {
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t types,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
std::optional<gfx::RoundedCornersF> corners = std::nullopt,
std::optional<std::string> show_menu_host_duration_histogram =
diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.h b/ui/views/controls/menu/menu_runner_impl_cocoa.h
index b0d033493973054d3fb140c63da77eda46d60dce..fde5c729a80fbd513141c7d4db0d2e306aeb2cf2 100644
index b0d033493973054d3fb140c63da77eda46d60dce..da3f1732e79802b164f019455a61990c400fa0d7 100644
--- a/ui/views/controls/menu/menu_runner_impl_cocoa.h
+++ b/ui/views/controls/menu/menu_runner_impl_cocoa.h
@@ -42,6 +42,7 @@ class VIEWS_EXPORT MenuRunnerImplCocoa : public MenuRunnerImplInterface {
@@ -10,6 +10,7 @@
#include "base/functional/callback.h"
#include "base/time/time.h"
+#include "ui/base/mojom/menu_source_type.mojom.h"
#include "ui/views/controls/menu/menu_runner_impl_interface.h"
@class MenuControllerCocoa;
@@ -42,6 +43,7 @@ class VIEWS_EXPORT MenuRunnerImplCocoa : public MenuRunnerImplInterface {
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t run_types,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
std::optional<gfx::RoundedCornersF> corners,
std::optional<std::string> show_menu_host_duration_histogram) override;
diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.mm b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
index c585f056973e2f8b299e7af81c384b67ad74958b..ac9f99c986dec7cb5c4eb9fc6601eef5aa7c5eee 100644
index d9ee2469c6f5e2e9eb674013740a97c9fd201a7c..8602f6cd6afd77c8c77561207f994b217023e537 100644
--- a/ui/views/controls/menu/menu_runner_impl_cocoa.mm
+++ b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
@@ -69,6 +69,7 @@
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t run_types,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
std::optional<gfx::RoundedCornersF> corners,
std::optional<std::string> show_menu_host_duration_histogram) {
diff --git a/ui/views/controls/menu/menu_runner_impl_interface.h b/ui/views/controls/menu/menu_runner_impl_interface.h
index 972abab3bf46f815f6713b2e2e5b4db78ac4a432..b52a55f4267171ff5a907e0f76b8172b1b972271 100644
index 972abab3bf46f815f6713b2e2e5b4db78ac4a432..5ed86b0e9455b5e6cd7db06bb62098c2ddac81e8 100644
--- a/ui/views/controls/menu/menu_runner_impl_interface.h
+++ b/ui/views/controls/menu/menu_runner_impl_interface.h
@@ -46,6 +46,7 @@ class MenuRunnerImplInterface {
@@ -9,6 +9,7 @@
#include <string>
#include "base/functional/callback_forward.h"
+#include "ui/base/mojom/menu_source_type.mojom.h"
#include "ui/views/controls/menu/menu_runner.h"
namespace gfx {
@@ -46,6 +47,7 @@ class MenuRunnerImplInterface {
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t run_types,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
std::optional<gfx::RoundedCornersF> corners = std::nullopt,
std::optional<std::string> show_menu_host_duration_histogram =
diff --git a/ui/views/controls/menu/menu_runner_impl_mac.h b/ui/views/controls/menu/menu_runner_impl_mac.h
index db81eab045142c73de4fd751ece93ed8d6d653f7..2852652a7989abf417f9406eed5cbd98dd6c37f8 100644
index db81eab045142c73de4fd751ece93ed8d6d653f7..1278784445dc9484395f298da8b28388083f2216 100644
--- a/ui/views/controls/menu/menu_runner_impl_mac.h
+++ b/ui/views/controls/menu/menu_runner_impl_mac.h
@@ -39,6 +39,7 @@ class VIEWS_EXPORT MenuRunnerImplMac : public MenuRunnerImplInterface {
@@ -15,6 +15,7 @@
#include "components/remote_cocoa/common/menu.mojom.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
+#include "ui/base/mojom/menu_source_type.mojom.h"
#include "ui/views/controls/menu/menu_runner_impl_interface.h"
namespace views::internal {
@@ -39,6 +40,7 @@ class VIEWS_EXPORT MenuRunnerImplMac : public MenuRunnerImplInterface {
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t run_types,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
std::optional<gfx::RoundedCornersF> corners,
std::optional<std::string> show_menu_host_duration_histogram) override;
diff --git a/ui/views/controls/menu/menu_runner_impl_mac.mm b/ui/views/controls/menu/menu_runner_impl_mac.mm
index 27f83d5eece36ec1230fbb2d840614b309aa7408..6e41b2dc2c9a7cb4d30d2679afaf8b51f055d46a 100644
index 27f83d5eece36ec1230fbb2d840614b309aa7408..3dea102a8fa8fa3830f1a78225b48de100ccb970 100644
--- a/ui/views/controls/menu/menu_runner_impl_mac.mm
+++ b/ui/views/controls/menu/menu_runner_impl_mac.mm
@@ -46,6 +46,7 @@
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t run_types,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
std::optional<gfx::RoundedCornersF> corners,
std::optional<std::string> show_menu_host_duration_histogram) {
@@ -217,26 +257,34 @@ index 27f83d5eece36ec1230fbb2d840614b309aa7408..6e41b2dc2c9a7cb4d30d2679afaf8b51
void MenuRunnerImplMac::Cancel() {
diff --git a/ui/views/controls/menu/menu_runner_impl_remote_cocoa.h b/ui/views/controls/menu/menu_runner_impl_remote_cocoa.h
index 7aaf6d82e09d47db1a209ae074638ccf56afc7c9..c1b0f6bb3d4b7c2f85aacccf2323c23df0b89e7d 100644
index 7aaf6d82e09d47db1a209ae074638ccf56afc7c9..84287a01fb69e5739f9ea6c3620ff36281258926 100644
--- a/ui/views/controls/menu/menu_runner_impl_remote_cocoa.h
+++ b/ui/views/controls/menu/menu_runner_impl_remote_cocoa.h
@@ -57,6 +57,7 @@ class VIEWS_EXPORT MenuRunnerImplRemoteCocoa
@@ -15,6 +15,7 @@
#include "components/remote_cocoa/common/menu.mojom.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
+#include "ui/base/mojom/menu_source_type.mojom.h"
#include "ui/views/controls/menu/menu_runner_impl_interface.h"
namespace views {
@@ -57,6 +58,7 @@ class VIEWS_EXPORT MenuRunnerImplRemoteCocoa
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t run_types,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
std::optional<gfx::RoundedCornersF> corners,
std::optional<std::string> show_menu_host_duration_histogram) override;
diff --git a/ui/views/controls/menu/menu_runner_impl_remote_cocoa.mm b/ui/views/controls/menu/menu_runner_impl_remote_cocoa.mm
index e171461e288365f85892d429aad4895b0929a61d..6faf66a503e2f1c37322d8613b290c0ce4348439 100644
index e171461e288365f85892d429aad4895b0929a61d..351b3ac118aed40e5cf709eb1e5191aa569e607e 100644
--- a/ui/views/controls/menu/menu_runner_impl_remote_cocoa.mm
+++ b/ui/views/controls/menu/menu_runner_impl_remote_cocoa.mm
@@ -69,6 +69,7 @@
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t run_types,
+ ui::MenuSourceType source_type,
+ ui::mojom::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
std::optional<gfx::RoundedCornersF> corners,
std::optional<std::string> show_menu_host_duration_histogram) {

View File

@@ -0,0 +1,31 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Maddock <smaddock@slack-corp.com>
Date: Fri, 18 Oct 2024 11:11:11 -0400
Subject: fix: software compositing infinite loop
When GPU compositing is unavailable, LayerTreeView::RequestNewLayerTreeFrameSink
may run in an infinite loop due to a race condition. Need to allow time to
process CompositingModeFallbackToSoftware IPC to disable GPU compositing.
https://issues.chromium.org/345275130
diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
index 9497ab591864295231db47fdc526e59935e6aa31..635fa41649db41800f99da2683cc955b2e1e935f 100644
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_view.cc
@@ -374,9 +374,13 @@ void LayerTreeView::DidFailToInitializeLayerTreeFrameSink() {
// unable to be killed after Chrome is closed.
// https://issues.chromium.org/336164423
if (!Platform::Current()->IsGpuRemoteDisconnected()) {
- layer_tree_host_->GetTaskRunnerProvider()->MainThreadTaskRunner()->PostTask(
+ // CompositingModeFallbackToSoftware IPC will disable GPU compositing in
+ // RenderThread. Post task with delay to give time to receive this IPC and
+ // prevent infinite loop of retries for software renderers.
+ // https://issues.chromium.org/345275130
+ layer_tree_host_->GetTaskRunnerProvider()->MainThreadTaskRunner()->PostDelayedTask(
FROM_HERE, base::BindOnce(&LayerTreeView::RequestNewLayerTreeFrameSink,
- weak_factory_.GetWeakPtr()));
+ weak_factory_.GetWeakPtr()), base::Milliseconds(10));
}
}

View File

@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
Allows embedder to intercept site instances created by chromium.
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index 5b38f2caad8e093e44e3231f3a13c3976b15da10..b1c61e7f860decb254c837fb6a05573f39769bd9 100644
index cc0f32c6f27a32a41290bdc23447f809770482aa..e51f29ec59a86950c2fb74292ecb4db669719478 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -4535,6 +4535,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -4515,6 +4515,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@@ -20,7 +20,7 @@ index 5b38f2caad8e093e44e3231f3a13c3976b15da10..b1c61e7f860decb254c837fb6a05573f
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index ad94803577af27c84e247ace2137995a9ca886e0..10c384267137a983eef90c3de9086f5139a17cc7 100644
index 47efdce8d0aacf331d7b54ca787dc0afd1595029..c1a6d33d248255eb2b6f391062816f6a3fd38590 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -337,6 +337,11 @@ class CONTENT_EXPORT ContentBrowserClient {

View File

@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
index b131fe5e2ee2adc4ba2e04932ff351510e5adf88..6a42ae3402dda916a45505a9b44905add5193db3 100644
index 38cf9d8fd803f47c57d5491648cb6ae445c1c380..935f197f0a47e4786c017e9fdef16b7c597d8fae 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -1370,6 +1370,11 @@
@@ -1373,6 +1373,11 @@
"includes": [10060],
},

View File

@@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index c8ba4c7ed137e8aef49d619708c5ad0427813cbf..1159436f57f5746e887dacffe88826996652644d 100755
index a07f3fff802db2eb1fcc496ab33e76d24ef1dbab..a157fc3ae1f637d3fc4b2748e0e65b251d8164a6 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -304,6 +304,8 @@ def GetDefaultHostOs():

View File

@@ -35,10 +35,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to
system priority.
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 3d2dab5457c7e5f2de0dee28ec533b36fc767a40..e5eb12a276d346beb70d6115ccc6de838e5d8803 100644
index de197a0826f550f39c2438b5bcd53e7f1d463f1b..71d826841792ba99f1d2afca152332e7ff65ee1a 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1037,6 +1037,7 @@ component("base") {
@@ -1040,6 +1040,7 @@ component("base") {
"//build:ios_buildflags",
"//build/config/compiler:compiler_buildflags",
"//third_party/modp_b64",
@@ -81,7 +81,7 @@ index 4bf9a3c27e05c6635b2beb8e880b5b43dbed61b5..f328fbb49c45991f44a9c75325491d08
} // namespace base
diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
index f8ab18cc6b0e5e3d63c1a548aa1d031703c3e96c..c9eb1f688a0ff8f99c8d869cf2cf14206347b359 100644
index 697eff8aad0142ce0537feec816f9b31fd767061..504a3cba21622b8d79bf6563f3a009c47b093d50 100644
--- a/base/process/launch_mac.cc
+++ b/base/process/launch_mac.cc
@@ -21,13 +21,19 @@
@@ -198,17 +198,17 @@ index e7a65e97b51d93bff864889813317fb7c6ffc846..bb1fc0c99164ae4bdaaaa78e87c30e88
using crypto::AppleKeychain;
diff --git a/components/remote_cocoa/app_shim/BUILD.gn b/components/remote_cocoa/app_shim/BUILD.gn
index 1458e7d8edcf2fe17b0ab09b8552bdd817b700f9..f5ebc83573ef3fe7e50910cb8ff1ae33fbb7c35b 100644
index da8b246916811fbee1e63d0aa95be9fa3ae12bfb..3bcd78507a15bb12ffe71a5f67e756000ca2633a 100644
--- a/components/remote_cocoa/app_shim/BUILD.gn
+++ b/components/remote_cocoa/app_shim/BUILD.gn
@@ -86,6 +86,7 @@ component("app_shim") {
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/strings:ui_strings_grit",
@@ -75,6 +75,7 @@ component("app_shim") {
"//components/crash/core/common",
"//components/remote_cocoa/common:mojo",
"//components/system_media_controls",
+ "//electron/build/config:generate_mas_config",
]
frameworks = [
"Cocoa.framework",
"//mojo/public/cpp/bindings",
"//net",
"//ui/accelerated_widget_mac",
diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components/remote_cocoa/app_shim/application_bridge.mm
index e9f4e5131238b9fb5f1b4b3e90a0cb84a7fc15b4..8b5f4cae3123ac5480ad73f0c873fca0d62f7c9f 100644
--- a/components/remote_cocoa/app_shim/application_bridge.mm
@@ -453,7 +453,7 @@ index f71ea08f64ab5cd36f6bd1e2d3d2908d4de80ba6..4b3450b3bd44a35964bd935453861101
// Beware: This view was briefly removed (in favor of a bare CALayer) in
// https://crrev.com/c/1236675. The ordering of unassociated layers relative
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 050ff22c63d6aba75ef1b41e5ffe3869e016a5a7..c72cff69afab53000392220abc7decde1236e178 100644
index d1a60edcb29d5d2484badf6cb2853871c1e7bcec..964dc5c3aa8440fd3076f2198b2c89e9b8b82816 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -376,6 +376,7 @@ viz_component("service") {
@@ -464,7 +464,7 @@ index 050ff22c63d6aba75ef1b41e5ffe3869e016a5a7..c72cff69afab53000392220abc7decde
}
if (is_android || use_ozone) {
@@ -650,6 +651,7 @@ viz_source_set("unit_tests") {
@@ -656,6 +657,7 @@ viz_source_set("unit_tests") {
"display_embedder/software_output_device_mac_unittest.mm",
]
frameworks = [ "IOSurface.framework" ]
@@ -558,10 +558,10 @@ index 13c3fe06c417a2565e6af4552930a56c44a01fb3..ef67191f5d010451cde2b084d6165c7d
return kAttributes;
}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 2d5c5f20907719f50663911e21f8eedf016f251f..e025a098d1e77c682b3e12fb8f1a7f300fdb119e 100644
index cb085a13580106f0218285dc5ad51912d60735d2..f51437492310908f582d3d68cf460c1f8892436c 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -320,6 +320,7 @@ source_set("browser") {
@@ -323,6 +323,7 @@ source_set("browser") {
"//ui/strings:ax_strings",
"//ui/touch_selection",
"//v8:v8_version",
@@ -604,7 +604,7 @@ index 2285564db47ef15eb9a83affd1e481b5671c3940..cf5e79a5540d8208c34579d7e8b5a571
// Used to force the NSApplication's focused accessibility element to be the
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index c6512e8ce79f757a77a0d952e8d82d12d8be449c..69eb2ad17a15a17ca274a3a3128de9b841061a95 100644
index 34fb29866785ef07c6dca4cfc85966df1c479b5f..e305d25a8f2a34ac90f4d503a9c74dcc6c553cdf 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -48,6 +48,7 @@
@@ -677,10 +677,10 @@ index c6512e8ce79f757a77a0d952e8d82d12d8be449c..69eb2ad17a15a17ca274a3a3128de9b8
///////////////////////////////////////////////////////////////////////////////
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 9f48c905f4abbb0f2e184299a915232cf6a0f6b0..83e1af29e9b035e54b447941d55b95eb960219f1 100644
index 357c5a754f6b3f2992646dda4955aa5b53e0b84f..faf49fec0f54dfb258945e59bc7ee3d15a8a21e7 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -287,6 +287,7 @@ source_set("common") {
@@ -284,6 +284,7 @@ source_set("common") {
"//ui/shell_dialogs",
"//url",
"//url/ipc:url_ipc",
@@ -689,10 +689,10 @@ index 9f48c905f4abbb0f2e184299a915232cf6a0f6b0..83e1af29e9b035e54b447941d55b95eb
defines = []
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
index 27ab1bc3f30877a498ce5061babe6005e6d4678c..d6a03a5725d2f1eb7d4d3e4f8ce2b42ff0725a24 100644
index 55a3baeeec34e9e89b75e93cd17486baef6e550e..cdd5750c7a84e38501e4b6d24e6a2c365b9ce5f1 100644
--- a/content/renderer/BUILD.gn
+++ b/content/renderer/BUILD.gn
@@ -336,6 +336,7 @@ target(link_target_type, "renderer") {
@@ -334,6 +334,7 @@ target(link_target_type, "renderer") {
"//ui/surface",
"//url",
"//v8",
@@ -771,10 +771,10 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
} // namespace content
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index b16333d20e5e48b79a6a494581f74d0791ffefa4..4cc8f764c551f1ee11828f31dae143c0fdefeb30 100644
index f5130062e82601932c346b348cfbbddc218fcca0..8c0998257db56d02ceeab8543cc74fa1018f053b 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -638,6 +638,7 @@ static_library("test_support") {
@@ -640,6 +640,7 @@ static_library("test_support") {
"//url",
"//url/mojom:url_mojom_gurl",
"//v8",
@@ -782,7 +782,7 @@ index b16333d20e5e48b79a6a494581f74d0791ffefa4..4cc8f764c551f1ee11828f31dae143c0
]
data_deps = [
@@ -1107,6 +1108,7 @@ static_library("browsertest_support") {
@@ -1109,6 +1110,7 @@ static_library("browsertest_support") {
}
configs += [ "//v8:external_startup_data" ]
@@ -790,7 +790,7 @@ index b16333d20e5e48b79a6a494581f74d0791ffefa4..4cc8f764c551f1ee11828f31dae143c0
}
mojom("content_test_mojo_bindings") {
@@ -1930,6 +1932,7 @@ test("content_browsertests") {
@@ -1931,6 +1933,7 @@ test("content_browsertests") {
"//ui/shell_dialogs",
"//ui/snapshot",
"//ui/webui:test_support",
@@ -798,7 +798,7 @@ index b16333d20e5e48b79a6a494581f74d0791ffefa4..4cc8f764c551f1ee11828f31dae143c0
]
if (!(is_chromeos_ash && target_cpu == "arm64" && current_cpu == "arm")) {
@@ -3207,6 +3210,7 @@ test("content_unittests") {
@@ -3206,6 +3209,7 @@ test("content_unittests") {
"//ui/latency:test_support",
"//ui/shell_dialogs:shell_dialogs",
"//ui/webui:test_support",
@@ -1371,10 +1371,10 @@ index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..9921ccb10d3455600eddd85f77f10228
} // namespace sandbox
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
index 3bc370e0beafd792ba4737013b3e7d59da8cf306..aa391a0b23372c944ab11a6496771ecbbe6b5e1a 100644
index c73b33c834353abcf2f209d5a2ee79f76e701e7d..f6a507adee7ff387f131eb14b27ee01e51a20714 100644
--- a/third_party/blink/renderer/core/BUILD.gn
+++ b/third_party/blink/renderer/core/BUILD.gn
@@ -403,6 +403,7 @@ component("core") {
@@ -404,6 +404,7 @@ component("core") {
"//ui/gfx/geometry",
"//ui/gfx/geometry:geometry_skia",
"//ui/strings",
@@ -1612,10 +1612,10 @@ index c8171f0527fe5194f0ea73b57c4444d4c630fbc4..c2ac4da580e3e7f749a0a4de1e859af6
// Accessible object
if (AXElementWrapper::IsValidElement(value)) {
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 8ce9bc840e32fde0f058733376e74e1238a69a7f..cdf34bc28085df368e14fe11df28df019370a69d 100644
index d7541d80aab34a06348359fbcdb41c7d45579b6a..b72f3f34cbe5059940025c2dd89dfa89960436d1 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -386,6 +386,13 @@ component("base") {
@@ -380,6 +380,13 @@ component("base") {
sources += [ "resource/resource_bundle_lacros.cc" ]
}
@@ -1629,7 +1629,7 @@ index 8ce9bc840e32fde0f058733376e74e1238a69a7f..cdf34bc28085df368e14fe11df28df01
if (is_ios) {
sources += [
"device_form_factor_ios.mm",
@@ -537,6 +544,12 @@ component("base") {
@@ -530,6 +537,12 @@ component("base") {
"//url",
]
@@ -1752,7 +1752,7 @@ index 84afacf999c4905fdbaba332e19058a6471c3436..bbab402c8c11e62dad7fa946d9550efa
deps += [ "//build:ios_buildflags" ]
}
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
index c4ab83ca4f48e5357fe9bcf024b3f95612223cdf..d97c9731884769079e53fa334f44319e339b4fc2 100644
index 29ae2da6a8a2c2a612dfb92f7f9c03ca5fa306b1..440c139a32a0c205e77b657d4aab64684661a01d 100644
--- a/ui/display/mac/screen_mac.mm
+++ b/ui/display/mac/screen_mac.mm
@@ -30,6 +30,7 @@
@@ -1837,10 +1837,10 @@ index fe3f85073e31de487a08e57d7f9b07aa4eccf8f3..cf5b07203c8bd559a404600cc98cc8ec
// enough.
return PlatformFontMac::SystemFontType::kGeneral;
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index 4ba2f9a9ed0aa26cc54f0fbaa70eb280b1dd3a69..f7cf6cdb3038d962d7a2ce2be02c75a502ff7766 100644
index b0032a1d1d23acb43b702295ac7a5e3445610fbe..a1568062e4657f787fb28d04d1ffecc9d77d1376 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -722,6 +722,8 @@ component("views") {
@@ -723,6 +723,8 @@ component("views") {
"IOSurface.framework",
"QuartzCore.framework",
]
@@ -1849,7 +1849,7 @@ index 4ba2f9a9ed0aa26cc54f0fbaa70eb280b1dd3a69..f7cf6cdb3038d962d7a2ce2be02c75a5
}
if (is_win) {
@@ -1155,6 +1157,8 @@ source_set("test_support") {
@@ -1157,6 +1159,8 @@ source_set("test_support") {
"//ui/base/mojom:ui_base_types",
]

View File

@@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement
session.setCertificateVerifyCallback.
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index d18f5b091d33ef307ec7c416fd5963a002782af2..43fe136e619f0fd4473f44bfb48247d532550b11 100644
index a9af5589e17c4480bfe553f76769ed50a63d596f..0b78b88754394cbbd5ffcc5694b2fdbd862ff6a8 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -156,6 +156,11 @@
@@ -157,6 +157,11 @@
#include "services/network/web_transport.h"
#include "url/gurl.h"
@@ -22,7 +22,7 @@ index d18f5b091d33ef307ec7c416fd5963a002782af2..43fe136e619f0fd4473f44bfb48247d5
#if BUILDFLAG(IS_CT_SUPPORTED)
// gn check does not account for BUILDFLAG(). So, for iOS builds, it will
// complain about a missing dependency on the target exposing this header. Add a
@@ -580,6 +585,99 @@ mojom::URLLoaderFactoryParamsPtr CreateURLLoaderFactoryParamsForPrefetch() {
@@ -598,6 +603,99 @@ void RecordHSTSPreconnectUpgradeReason(HSTSRedirectUpgradeReason reason) {
} // namespace
@@ -122,7 +122,7 @@ index d18f5b091d33ef307ec7c416fd5963a002782af2..43fe136e619f0fd4473f44bfb48247d5
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
NetworkContext::NetworkContextHttpAuthPreferences::
@@ -961,6 +1059,13 @@ void NetworkContext::SetClient(
@@ -979,6 +1077,13 @@ void NetworkContext::SetClient(
client_.Bind(std::move(client));
}
@@ -136,7 +136,7 @@ index d18f5b091d33ef307ec7c416fd5963a002782af2..43fe136e619f0fd4473f44bfb48247d5
void NetworkContext::CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -2509,6 +2614,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2529,6 +2634,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
std::move(cert_verifier));
cert_verifier = std::move(cert_verifier_with_trust_anchors);
#endif // BUILDFLAG(IS_CHROMEOS)
@@ -147,7 +147,7 @@ index d18f5b091d33ef307ec7c416fd5963a002782af2..43fe136e619f0fd4473f44bfb48247d5
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 256de870d2c6defd3f0b389ee5f596c01051533f..a898e09ac0c989952fe2032ca4ea6ddfdacc59e6 100644
index 3ab2d4f27dc258bbb82aa2c929a5ee717a933bd8..345fa438ad2afea7946117b8bac7bb6f08669b28 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -114,6 +114,7 @@ class URLMatcher;
@@ -177,10 +177,10 @@ index 256de870d2c6defd3f0b389ee5f596c01051533f..a898e09ac0c989952fe2032ca4ea6ddf
std::unique_ptr<HostResolver> internal_host_resolver_;
std::set<std::unique_ptr<HostResolver>, base::UniquePtrComparator>
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 83bce4a3bf9dc2574bc0f9ab8921f3dfe632ec27..362d2c79a4f8bda162f87841ba0629e88347bf14 100644
index 7a77b8dcf945d4b2d25ea51a6aebcf1663324139..f4c35e58af2eb5e009772de967000546fff9d290 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -298,6 +298,16 @@ struct SocketBrokerRemotes {
@@ -299,6 +299,16 @@ struct SocketBrokerRemotes {
pending_remote<SocketBroker> server;
};
@@ -197,7 +197,7 @@ index 83bce4a3bf9dc2574bc0f9ab8921f3dfe632ec27..362d2c79a4f8bda162f87841ba0629e8
// Parameters for constructing a network context.
struct NetworkContextParams {
@@ -976,6 +986,9 @@ interface NetworkContext {
@@ -911,6 +921,9 @@ interface NetworkContext {
// Sets a client for this network context.
SetClient(pending_remote<NetworkContextClient> client);

View File

@@ -7,7 +7,7 @@ Pass RenderFrameHost through to PlatformNotificationService
so Electron can identify which renderer a notification came from.
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
index 412e1fb55f901c573455fbea722f5f371e0c0566..725b67ea1ab00bc3a834221a77e2b722b8720032 100644
index ff536e07810d0360d4125587bcc90a2bd3f3ff12..2f632906947fc9b02eaf8547dce5e2b5a9ca46a3 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -218,6 +218,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
@@ -133,7 +133,7 @@ index 05d3a12dd84c7005d46cc73b312f97ef418d96f5..4765de982802541b3efc7211d106acc7
const GURL& document_url,
const WeakDocumentPtr& weak_document_ptr,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 22667bee38eb6f71c28132eaf4002f2b46ca3b39..aa6d50c94b28e3a3191acc9a12617205a1c797a9 100644
index 244fa3b44eab8ee51da79d2375e7ae3cadf3ad9b..f25a3e94ae2040cd266f8947babd172ee9036ac8 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2110,7 +2110,7 @@ void RenderProcessHostImpl::CreateNotificationService(

View File

@@ -36,10 +36,10 @@ index 2096591596a26464ab8f71a399ccb16a04edfd59..9eb966b3ddc3551d6beeff123071b2c9
Microsoft::WRL::ComPtr<ID3D11Texture2D> d3d11_texture;
diff --git a/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc b/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
index 596affaba0993b3db652e5deee3c8d6ba25eb21f..e9c94742fe318dfd0e8d510f3ea0e0020145a2a0 100644
index b27bcf13d3a5f7c8e85a677766718f4362467022..df1b2d697f7cce028d0d6d86190b3218b8f662a5 100644
--- a/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
+++ b/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
@@ -205,7 +205,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat(
@@ -193,7 +193,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat(
bool FrameResources::Initialize() {
auto* context = pool_->GetContext();
@@ -48,7 +48,7 @@ index 596affaba0993b3db652e5deee3c8d6ba25eb21f..e9c94742fe318dfd0e8d510f3ea0e002
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
gfx::BufferUsage::SCANOUT_VEA_CPU_READ
#else
@@ -219,6 +219,23 @@ bool FrameResources::Initialize() {
@@ -207,6 +207,23 @@ bool FrameResources::Initialize() {
const gfx::Size buffer_size_in_pixels =
GetBufferSizeInPixelsForVideoPixelFormat(format_, coded_size_);
@@ -69,29 +69,15 @@ index 596affaba0993b3db652e5deee3c8d6ba25eb21f..e9c94742fe318dfd0e8d510f3ea0e002
+ }
+#endif
+
// Create the GpuMemoryBuffer if MappableSharedImages is not enabled. When its
// enabled, clients only create a mappable shared image directly without
// needing to create a GMB.
@@ -226,11 +243,11 @@ bool FrameResources::Initialize() {
kUseMappableSIForRenderableGpuMemoryBufferVideoFramePool);
if (!is_mappable_si_enabled) {
gpu_memory_buffer_ = context->CreateGpuMemoryBuffer(
- buffer_size_in_pixels, buffer_format, kBufferUsage);
+ buffer_size_in_pixels, buffer_format, buffer_usage);
if (!gpu_memory_buffer_) {
LOG(ERROR) << "Failed to allocate GpuMemoryBuffer for frame: coded_size="
<< coded_size_.ToString()
- << ", usage=" << static_cast<int>(kBufferUsage);
+ << ", usage=" << static_cast<int>(buffer_usage);
return false;
}
constexpr gpu::SharedImageUsageSet kSharedImageUsage =
#if BUILDFLAG(IS_MAC)
gpu::SHARED_IMAGE_USAGE_MACOS_VIDEO_TOOLBOX |
@@ -231,7 +248,7 @@ bool FrameResources::Initialize() {
viz::GetSharedImageFormat(buffer_format);
@@ -264,7 +281,7 @@ bool FrameResources::Initialize() {
if (is_mappable_si_enabled) {
shared_image_ = context->CreateSharedImage(
- buffer_size_in_pixels, kBufferUsage, si_format, color_space_,
+ buffer_size_in_pixels, buffer_usage, si_format, color_space_,
kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, kSharedImageUsage,
sync_token_);
} else {
shared_image_ = context->CreateSharedImage(
- buffer_size_in_pixels, kBufferUsage, si_format, color_space_,
+ buffer_size_in_pixels, buffer_usage, si_format, color_space_,
kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, kSharedImageUsage,
sync_token_);
if (!shared_image_) {

View File

@@ -10,10 +10,10 @@ an about:blank check to this area.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 8abcf9d0bf63496692408464ca5e5a3ede9dac4b..a21bc7a8dfa8edaad2a32f274e2dbfbcd7ac525c 100644
index b03f7c5517681454caf3a0abf527088f63cfea94..61a6856c84c808b4b01c5f3643e7745f21aff357 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -783,8 +783,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
@@ -784,8 +784,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
// TODO(crbug.com/40092527): Consider adding a separate boolean that
// tracks this instead of piggybacking `origin_calculation_debug_info`.
if (renderer_side_origin.opaque() &&

View File

@@ -68,10 +68,10 @@ index 163eacc8bb6654880d37111923a87ea5a6134485..565258e9bd4cc52e347e1f4a72ee29ec
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
}
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002a3bfe286 100644
index 0be340500be01bb9fb1084ff2d22a79cfd972635..71cf230089548e40b95e47660bc5cd0a850bf147 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -87,6 +87,20 @@ namespace printing {
@@ -83,6 +83,20 @@ namespace printing {
namespace {
@@ -92,7 +92,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
void OnDidGetDefaultPrintSettings(
scoped_refptr<PrintQueriesQueue> queue,
bool want_pdf_settings,
@@ -95,9 +109,9 @@ void OnDidGetDefaultPrintSettings(
@@ -91,9 +105,9 @@ void OnDidGetDefaultPrintSettings(
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (printer_query->last_status() != mojom::ResultCode::kSuccess) {
@@ -104,7 +104,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
std::move(callback).Run(nullptr);
return;
}
@@ -107,9 +121,9 @@ void OnDidGetDefaultPrintSettings(
@@ -103,9 +117,9 @@ void OnDidGetDefaultPrintSettings(
params->document_cookie = printer_query->cookie();
if (!PrintMsgPrintParamsIsValid(*params)) {
@@ -116,7 +116,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
std::move(callback).Run(nullptr);
return;
}
@@ -121,14 +135,14 @@ void OnDidGetDefaultPrintSettings(
@@ -117,14 +131,14 @@ void OnDidGetDefaultPrintSettings(
void OnDidScriptedPrint(
scoped_refptr<PrintQueriesQueue> queue,
std::unique_ptr<PrinterQuery> printer_query,
@@ -135,7 +135,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
}
std::move(callback).Run(nullptr);
return;
@@ -186,9 +200,11 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
@@ -182,9 +196,11 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
: PrintManager(web_contents),
queue_(g_browser_process->print_job_manager()->queue()) {
DCHECK(queue_);
@@ -147,7 +147,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
}
PrintViewManagerBase::~PrintViewManagerBase() {
@@ -212,12 +228,16 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() {
@@ -208,12 +224,16 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() {
}
#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
@@ -166,7 +166,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
for (auto& observer : GetTestObservers()) {
observer.OnPrintNow(rfh);
@@ -299,7 +319,7 @@ void PrintViewManagerBase::PrintDocument(
@@ -295,7 +315,7 @@ void PrintViewManagerBase::PrintDocument(
const gfx::Size& page_size,
const gfx::Rect& content_area,
const gfx::Point& offsets) {
@@ -175,7 +175,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
if (content_analysis_before_printing_document_) {
std::move(content_analysis_before_printing_document_)
.Run(print_data, page_size, content_area, offsets);
@@ -346,12 +366,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
@@ -342,12 +362,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
}
PRINTER_LOG(EVENT) << "Paper printable area updated for vendor id "
<< print_settings->requested_media().vendor_id;
@@ -190,7 +190,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
base::Value::Dict job_settings,
std::unique_ptr<PrintSettings> print_settings,
UpdatePrintSettingsCallback callback) {
@@ -359,7 +380,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
@@ -355,7 +376,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
settings->pages = GetPageRangesFromJobSettings(job_settings);
settings->params = mojom::PrintParams::New();
RenderParamsFromPrintSettings(*print_settings, settings->params.get());
@@ -200,7 +200,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
if (!PrintMsgPrintParamsIsValid(*settings->params)) {
mojom::PrinterType printer_type = static_cast<mojom::PrinterType>(
*job_settings.FindInt(kSettingPrinterType));
@@ -371,6 +393,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
@@ -367,6 +389,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
return;
}
@@ -211,7 +211,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
set_cookie(settings->params->document_cookie);
std::move(callback).Run(std::move(settings));
}
@@ -412,7 +438,9 @@ void PrintViewManagerBase::OnPrintSettingsDone(
@@ -408,7 +434,9 @@ void PrintViewManagerBase::OnPrintSettingsDone(
UnregisterSystemPrintClient();
}
#endif
@@ -221,7 +221,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
std::move(callback).Run(base::Value("Update settings failed"));
return;
}
@@ -441,7 +469,7 @@ void PrintViewManagerBase::StartLocalPrintJob(
@@ -437,7 +465,7 @@ void PrintViewManagerBase::StartLocalPrintJob(
PrinterHandler::PrintCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -230,7 +230,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
// Populating `content_analysis_before_printing_document_` if needed should be
// done first in this function's workflow, this way other code can check if
// content analysis is going to happen and delay starting `print_job_` to
@@ -674,7 +702,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings(
@@ -670,7 +698,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings(
#if BUILDFLAG(ENABLE_OOP_PRINTING)
if (ShouldPrintJobOop() &&
@@ -239,7 +239,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
!analyzing_content_ &&
#endif
!query_with_ui_client_id().has_value()) {
@@ -702,7 +730,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings(
@@ -698,7 +726,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings(
// Sometimes it is desired to get the PDF settings as opposed to the settings
// of the default system print driver.
@@ -248,7 +248,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
bool want_pdf_settings = analyzing_content_;
#else
bool want_pdf_settings = false;
@@ -746,10 +774,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -742,10 +770,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
// `job_settings` does not yet contain the rasterized PDF dpi, so if the user
// has the print preference set, fetch it for use in
// `PrintSettingsFromJobSettings()`.
@@ -260,7 +260,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
if (prefs && prefs->HasPrefPath(prefs::kPrintRasterizePdfDpi)) {
int value = prefs->GetInteger(prefs::kPrintRasterizePdfDpi);
if (value > 0)
@@ -774,8 +799,22 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -770,8 +795,22 @@ void PrintViewManagerBase::UpdatePrintSettings(
}
}
@@ -285,7 +285,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
// fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()`
// for in-browser queries.
if (printer_type == mojom::PrinterType::kLocal) {
@@ -796,8 +835,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -792,8 +831,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
}
#endif
@@ -294,7 +294,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
}
void PrintViewManagerBase::SetAccessibilityTree(
@@ -813,7 +850,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
@@ -809,7 +846,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
void PrintViewManagerBase::IsPrintingEnabled(
IsPrintingEnabledCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -303,7 +303,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
}
void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
@@ -839,7 +876,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
@@ -835,7 +872,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
return;
}
#endif
@@ -312,7 +312,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
std::optional<enterprise_connectors::ContentAnalysisDelegate::Data>
scanning_data = enterprise_data_protection::GetPrintAnalysisData(
web_contents(), enterprise_data_protection::PrintScanningContext::
@@ -869,11 +906,9 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
@@ -865,11 +902,9 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
// destroyed. In such cases the error notification to the user will
// have already been displayed, and a second message should not be
// shown.
@@ -326,7 +326,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
ReleasePrinterQuery();
}
@@ -885,15 +920,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
@@ -881,15 +916,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
test_observers_.RemoveObserver(&observer);
}
@@ -351,7 +351,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
}
void PrintViewManagerBase::RenderFrameDeleted(
@@ -935,13 +979,14 @@ void PrintViewManagerBase::SystemDialogCancelled() {
@@ -931,13 +975,14 @@ void PrintViewManagerBase::SystemDialogCancelled() {
// System dialog was cancelled. Clean up the print job and notify the
// BackgroundPrintingManager.
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -367,7 +367,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
}
void PrintViewManagerBase::OnDocDone(int job_id, PrintedDocument* document) {
@@ -958,18 +1003,26 @@ void PrintViewManagerBase::OnJobDone() {
@@ -951,18 +996,26 @@ void PrintViewManagerBase::OnJobDone() {
// Printing is done, we don't need it anymore.
// print_job_->is_job_pending() may still be true, depending on the order
// of object registration.
@@ -396,7 +396,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
TerminatePrintJob(true);
}
@@ -979,7 +1032,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
@@ -972,7 +1025,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
// Is the document already complete?
if (print_job_->document() && print_job_->document()->IsComplete()) {
@@ -405,7 +405,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
return true;
}
@@ -1032,7 +1085,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
@@ -1025,7 +1078,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
// Disconnect the current `print_job_`.
auto weak_this = weak_ptr_factory_.GetWeakPtr();
@@ -417,7 +417,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
if (!weak_this)
return false;
@@ -1052,7 +1108,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
@@ -1045,7 +1101,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
#endif
print_job_->AddObserver(*this);
@@ -426,7 +426,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
return true;
}
@@ -1110,7 +1166,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -1103,7 +1159,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
// Ensure that any residual registration of printing client is released.
// This might be necessary in some abnormal cases, such as the associated
// render process having terminated.
@@ -435,7 +435,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
if (!analyzing_content_) {
UnregisterSystemPrintClient();
}
@@ -1120,6 +1176,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -1113,6 +1169,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
}
#endif
@@ -447,7 +447,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
if (!print_job_)
return;
@@ -1127,7 +1188,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -1120,7 +1181,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
// printing_rfh_ should only ever point to a RenderFrameHost with a live
// RenderFrame.
DCHECK(rfh->IsRenderFrameLive());
@@ -456,7 +456,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
}
print_job_->RemoveObserver(*this);
@@ -1169,7 +1230,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
@@ -1162,7 +1223,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
}
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
@@ -465,7 +465,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
return true;
if (!cookie) {
@@ -1192,7 +1253,7 @@ bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
@@ -1185,7 +1246,7 @@ bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
return false;
}
@@ -474,7 +474,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
// Don't start printing if enterprise checks are being performed to check if
// printing is allowed, or if content analysis is going to take place right
// before starting `print_job_`.
@@ -1323,6 +1384,8 @@ void PrintViewManagerBase::CompleteScriptedPrint(
@@ -1316,6 +1377,8 @@ void PrintViewManagerBase::CompleteScriptedPrint(
auto callback_wrapper = base::BindOnce(
&PrintViewManagerBase::ScriptedPrintReply, weak_ptr_factory_.GetWeakPtr(),
std::move(callback), render_process_host->GetID());
@@ -483,7 +483,7 @@ index 5c2be309159b3f7c67601a08366b5221c198a1fb..0ae0552e3683d226df39d292f45d7002
#if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
DisableThirdPartyBlocking();
#endif
@@ -1337,10 +1400,10 @@ void PrintViewManagerBase::CompleteScriptedPrint(
@@ -1330,10 +1393,10 @@ void PrintViewManagerBase::CompleteScriptedPrint(
params->expected_pages_count, params->has_selection, params->margin_type,
params->is_scripted, !render_process_host->IsPdf(),
base::BindOnce(&OnDidScriptedPrint, queue_, std::move(printer_query),
@@ -860,10 +860,10 @@ index 9c91fdf50b38ad437279eaada4359a7a95911d07..8eed4887949d0c30f067d86aaa971ee5
ScriptingThrottler scripting_throttler_;
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index e025a098d1e77c682b3e12fb8f1a7f300fdb119e..4f66fb182b99be75f8147c2ecc450833f8efdcd0 100644
index f51437492310908f582d3d68cf460c1f8892436c..dbff945f9e54a5c947c23efff4d11d57d07b8a4e 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -3003,8 +3003,9 @@ source_set("browser") {
@@ -3001,8 +3001,9 @@ source_set("browser") {
"//ppapi/shared_impl",
]

View File

@@ -30,10 +30,10 @@ index dea7ba2237cea261fe0b526753e1a9c4e355e484..9e3bf5eca5e9ad99112069a28b7fb8c1
// RenderWidgetHost on the primary main frame, and false otherwise.
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index ce714ed077d9e5a22b5de926408fbe6d35cc04d6..3815310c78446a3cebc61680a01a374d0295e7a3 100644
index 9fe8ce99d4b5fe83bf66c37d7acec4d4e670f8c2..1ca77c290c177826b090f636f73667c5a0094c1a 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1982,6 +1982,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
@@ -1983,6 +1983,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
if (view_) {
view_->UpdateCursor(cursor);
}

View File

@@ -8,10 +8,10 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w
to upstream this change to Chrome.
diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
index c9db1ca9b650effbdf3374038fea663574b414ad..9e6843c6477b9d1034951c51d64ca1b9bfb7bb17 100644
index 83c679ab4b6a7eb128402406441e503a951b1c79..3cfa97bea3eeadf01ff5bc090a9f59e61e932309 100644
--- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
+++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
@@ -45,7 +45,6 @@
@@ -46,7 +46,6 @@
#include "chrome/browser/ui/file_system_access/file_system_access_dangerous_file_dialog.h"
#include "chrome/browser/ui/file_system_access/file_system_access_dialogs.h"
#include "chrome/browser/ui/file_system_access/file_system_access_restricted_directory_dialog.h"
@@ -19,7 +19,7 @@ index c9db1ca9b650effbdf3374038fea663574b414ad..9e6843c6477b9d1034951c51d64ca1b9
#include "chrome/grit/generated_resources.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
@@ -239,126 +238,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) {
@@ -250,126 +249,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) {
}
#endif
@@ -151,11 +151,11 @@ index c9db1ca9b650effbdf3374038fea663574b414ad..9e6843c6477b9d1034951c51d64ca1b9
// Describes a rule for blocking a directory, which can be constructed
// dynamically (based on state) or statically (from kBlockedPaths).
diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h
index 67c777c9576587500f37d066689ec072ff483c8f..6390432e93d2517cf94902bd2cf66ad5ac7379f6 100644
index b28cc5b1227060ae7cb889a0689ceb55fc52a8f8..dd2f36727d547f26406ea8e0bc8c276cac2b163c 100644
--- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h
+++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h
@@ -17,7 +17,7 @@
#include "base/time/default_clock.h"
@@ -18,7 +18,7 @@
#include "base/types/expected.h"
#include "chrome/browser/file_system_access/file_system_access_features.h"
#include "chrome/browser/file_system_access/file_system_access_permission_request_manager.h"
-#include "components/enterprise/buildflags/buildflags.h"
@@ -163,7 +163,7 @@ index 67c777c9576587500f37d066689ec072ff483c8f..6390432e93d2517cf94902bd2cf66ad5
#include "components/permissions/features.h"
#include "components/permissions/object_permission_context_base.h"
#include "content/public/browser/file_system_access_permission_context.h"
@@ -30,7 +30,7 @@
@@ -31,7 +31,7 @@
#include "chrome/browser/web_applications/web_app_install_manager_observer.h"
#endif
@@ -172,7 +172,7 @@ index 67c777c9576587500f37d066689ec072ff483c8f..6390432e93d2517cf94902bd2cf66ad5
#include "components/enterprise/common/files_scan_data.h"
#endif
@@ -333,6 +333,127 @@ class ChromeFileSystemAccessPermissionContext
@@ -337,6 +337,127 @@ class ChromeFileSystemAccessPermissionContext
// KeyedService:
void Shutdown() override;
@@ -300,7 +300,7 @@ index 67c777c9576587500f37d066689ec072ff483c8f..6390432e93d2517cf94902bd2cf66ad5
protected:
SEQUENCE_CHECKER(sequence_checker_);
@@ -352,7 +473,7 @@ class ChromeFileSystemAccessPermissionContext
@@ -356,7 +477,7 @@ class ChromeFileSystemAccessPermissionContext
void PermissionGrantDestroyed(PermissionGrantImpl* grant);

View File

@@ -7,10 +7,10 @@ Subject: refactor: expose HostImportModuleDynamically and
This is so that Electron can blend Blink's and Node's implementations of these isolate handlers.
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index 647dccf244835b1305383dcc7f29f99debd5ec1e..8331b123362dc82a0cd2c206c29e10bd46ef6a16 100644
index c3f7b26c1613abbc5cc8378d175db2ef5187b2b4..f5e61f6201bc3721a2ceb14ec09b625f2db939aa 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -638,7 +638,9 @@ bool WasmJSPromiseIntegrationEnabledCallback(v8::Local<v8::Context> context) {
@@ -649,7 +649,9 @@ bool WasmJSPromiseIntegrationEnabledCallback(v8::Local<v8::Context> context) {
execution_context);
}
@@ -21,7 +21,7 @@ index 647dccf244835b1305383dcc7f29f99debd5ec1e..8331b123362dc82a0cd2c206c29e10bd
v8::Local<v8::Context> context,
v8::Local<v8::Data> v8_host_defined_options,
v8::Local<v8::Value> v8_referrer_resource_url,
@@ -716,7 +718,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
@@ -727,7 +729,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
}
// https://html.spec.whatwg.org/C/#hostgetimportmetaproperties
@@ -30,7 +30,7 @@ index 647dccf244835b1305383dcc7f29f99debd5ec1e..8331b123362dc82a0cd2c206c29e10bd
v8::Local<v8::Module> module,
v8::Local<v8::Object> meta) {
v8::Isolate* isolate = context->GetIsolate();
@@ -759,9 +761,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) {
@@ -770,9 +772,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) {
return os;
}
@@ -40,7 +40,7 @@ index 647dccf244835b1305383dcc7f29f99debd5ec1e..8331b123362dc82a0cd2c206c29e10bd
void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
// Set up garbage collection before setting up anything else as V8 may trigger
// GCs during Blink setup.
@@ -781,9 +780,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
@@ -792,9 +791,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
isolate->SetWasmJSPIEnabledCallback(WasmJSPromiseIntegrationEnabledCallback);
isolate->SetSharedArrayBufferConstructorEnabledCallback(
SharedArrayBufferConstructorEnabledCallback);

View File

@@ -6,7 +6,7 @@ Subject: Revert "Remove the AllowAggressiveThrottlingWithWebSocket feature."
This reverts commit 615c1810a187840ffeb04096087efff86edb37de.
diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
index 39bfd837c6ae7a7dbee6c0a592d4cad000194d57..634261d13cc3a869bf600f0af2e170346e8b5051 100644
index 1c379f1b335f763120ff856cf93828cfa1a7c496..1f2c439ba3c41301defd1813901024a8fc34fbf5 100644
--- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
+++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
@@ -104,6 +104,17 @@ enum WebSocketOpCode {

View File

@@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
Patch to make scrollBounce option work.
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index b60da2ae38f80f41a938629ba3d1de19a5afde4f..b92ad04c7cd91546a669eaf8e5f627536eda496f 100644
index 15e28effa2cbfe7662a466d9a4664818d343e3d8..d71cbbe887ba0cc2fb3e9595edef1bb68857c2d4 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1276,7 +1276,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
@@ -1277,7 +1277,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
}
bool RenderThreadImpl::IsElasticOverscrollEnabled() {

View File

@@ -22,7 +22,7 @@ However, the patch would need to be reviewed by the security team, as it
does touch a security-sensitive class.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index aa6d50c94b28e3a3191acc9a12617205a1c797a9..513eaeb291806f7a3bb6230cb63f17780c103cdc 100644
index f25a3e94ae2040cd266f8947babd172ee9036ac8..7d3d2d917440efef069a81861aaeebd9e382f884 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1755,6 +1755,10 @@ bool RenderProcessHostImpl::Init() {

View File

@@ -0,0 +1,50 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Tue, 22 Oct 2024 00:27:27 +0900
Subject: Add missing shortcut text for VKEY_COMMAND on linux
Backports https://chromium-review.googlesource.com/c/chromium/src/+/5947724
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 32a3fc0843656eaa87b85dd63ac1ade6d83b6e5b..ed1ff076b1db6b77d0684bae1931714bf575ebe8 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -419,6 +419,8 @@ std::u16string Accelerator::ApplyLongFormModifiers(
result = ApplyModifierToAcceleratorString(result, IDS_APP_SEARCH_KEY);
#elif BUILDFLAG(IS_WIN)
result = ApplyModifierToAcceleratorString(result, IDS_APP_WINDOWS_KEY);
+#elif BUILDFLAG(IS_LINUX)
+ result = ApplyModifierToAcceleratorString(result, IDS_APP_SUPER_KEY);
#else
NOTREACHED();
#endif
diff --git a/ui/base/accelerators/accelerator_unittest.cc b/ui/base/accelerators/accelerator_unittest.cc
index 3b29229c02b0dac7197d3e4bf6014733e0f9669a..cfd9396184e16237cbf49c693af0bd80f8a2ee16 100644
--- a/ui/base/accelerators/accelerator_unittest.cc
+++ b/ui/base/accelerators/accelerator_unittest.cc
@@ -58,6 +58,9 @@ TEST(AcceleratorTest, MAYBE_GetShortcutText) {
{VKEY_OEM_COMMA, EF_CONTROL_DOWN, u"Ctrl+Comma", u"⌃,"},
#if BUILDFLAG(IS_MAC)
{VKEY_T, EF_COMMAND_DOWN | EF_CONTROL_DOWN, nullptr, u"⌃⌘T"},
+#endif
+#if BUILDFLAG(IS_LINUX)
+ {VKEY_T, EF_COMMAND_DOWN | EF_CONTROL_DOWN, u"Super+Ctrl+T", nullptr},
#endif
};
diff --git a/ui/strings/ui_strings.grd b/ui/strings/ui_strings.grd
index bf64f8fbc6d8f6700b40aa0d798dadc67ecc5db6..9307df9b60bcc7bd2a44bb98bc0720901cd8f4a0 100644
--- a/ui/strings/ui_strings.grd
+++ b/ui/strings/ui_strings.grd
@@ -767,6 +767,11 @@ need to be translated for each locale.-->
Win
</message>
</if>
+ <if expr="is_linux">
+ <message name="IDS_APP_SUPER_KEY" desc="Windows key on Windows keyboards, and Command key on Mac keyboards.">
+ Super
+ </message>
+ </if>
<if expr="chromeos_ash">
<message name="IDS_APP_META_KEY" desc="External Meta key (Search key on ChromeOS keyboards, Windows key on Windows keyboards, and Command key on Mac keyboards)">
Meta

View File

@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index f737902ba9a5ff5b98940eca4a8e7c057c64b3bd..8abcf9d0bf63496692408464ca5e5a3ede9dac4b 100644
index 9f530a1a768d27070f10fc40c6af51f56f42f0ca..b03f7c5517681454caf3a0abf527088f63cfea94 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -8230,6 +8230,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -8238,6 +8238,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}

View File

@@ -26,10 +26,10 @@ index 784e0a5166d6bece3f6a251e7cab1192e576af22..efd8ef49f1f2b6ecd6c3638b56e40c4e
// An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index da2515e0067a977691227bfacb3643cf1c23cc5c..f892e242564d33766ab94aa466460df4bebaf929 100644
index c668742dfc8698b9ef175ab6869e9785c9494a4b..3e6fc0c71a2ebf38643c95a65e5fdc0b011beb4b 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -881,6 +881,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -876,6 +876,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@@ -43,10 +43,10 @@ index da2515e0067a977691227bfacb3643cf1c23cc5c..f892e242564d33766ab94aa466460df4
const v8::Local<v8::Context>& worker) {
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 69c52cb8333fc8e967631c2f9535e8f15a421ee0..937714ced2e73ae3950c35e012f633d916de6f5c 100644
index 17c01a1f03ad4d4fa8a9783a00e159fff7c67940..1bfec2280e6d1f5cb5c157d237069bdee44b9a5d 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -195,6 +195,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -194,6 +194,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@@ -55,10 +55,10 @@ index 69c52cb8333fc8e967631c2f9535e8f15a421ee0..937714ced2e73ae3950c35e012f633d9
const blink::WebSecurityOrigin& script_origin) override;
blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel(
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 700e93a9ed053e4141658c86a26ec230aed42916..394b2f06501f52478614ba6565dfae47b3ce1e8f 100644
index 797f48206e28884df6cce0dc9cd1cffd54b5b03f..9f90e46f989c6def8e92f61e179e938f8a0ec29c 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -662,6 +662,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -664,6 +664,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

View File

@@ -35,10 +35,10 @@ index efd8ef49f1f2b6ecd6c3638b56e40c4e418f3493..9d8a1947e371d085486c1c4e27edfb03
// from the worker thread.
virtual void WillDestroyWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index f892e242564d33766ab94aa466460df4bebaf929..d2fb42a27d51e1bb4725fce3aea9387f8f9a3017 100644
index 3e6fc0c71a2ebf38643c95a65e5fdc0b011beb4b..5bedaca384dee72af14f2df6d421d2d4ab6f7da4 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -893,6 +893,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
@@ -888,6 +888,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
worker);
}
@@ -52,10 +52,10 @@ index f892e242564d33766ab94aa466460df4bebaf929..d2fb42a27d51e1bb4725fce3aea9387f
const blink::WebSecurityOrigin& script_origin) {
return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 937714ced2e73ae3950c35e012f633d916de6f5c..811390014521eeeb98bb122d827d652d7230622d 100644
index 1bfec2280e6d1f5cb5c157d237069bdee44b9a5d..c327e48cbefa0cbfe7192449a97896f3f84be70a 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -195,6 +195,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -194,6 +194,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@@ -65,10 +65,10 @@ index 937714ced2e73ae3950c35e012f633d916de6f5c..811390014521eeeb98bb122d827d652d
bool AllowScriptExtensionForServiceWorker(
const blink::WebSecurityOrigin& script_origin) override;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 394b2f06501f52478614ba6565dfae47b3ce1e8f..46a8c958c0f896a42106f73ce13171eefbd0f662 100644
index 9f90e46f989c6def8e92f61e179e938f8a0ec29c..5d1abdae16d41f443fa346f8042e3f3ed54a236d 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -662,6 +662,8 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -664,6 +664,8 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

View File

@@ -46,10 +46,10 @@ index 3e57ae8efe33f326ef0e5d609c311d4be5b8afd6..dc521d39c2280dfc3217e97c1e413b2b
V8_INLINE static void* GetAlignedPointerFromInternalField(
const BasicTracedReference<Object>& object, int index) {
diff --git a/src/api/api.cc b/src/api/api.cc
index 29dd26037bc9ce4c21f421cba32bc3077bb064d2..674b5c7efb35be2ee0935cae89eac70cc835d448 100644
index 6fb8d2c72d7bd895ef3157b6fb9a53522a06c983..9ba0614f13b5ab372674dbbacb5b0b705b317fdc 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -6406,14 +6406,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
@@ -6407,14 +6407,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
i::Cast<i::JSObject>(*obj)->GetEmbedderField(index), isolate));
}

View File

@@ -205,17 +205,6 @@ async function tagRelease (version: string) {
}
}
// function to determine if there have been commits to main since the last release
async function changesToRelease () {
const lastCommitWasRelease =
/^Bump v[0-9]+.[0-9]+.[0-9]+(-beta.[0-9]+)?(-alpha.[0-9]+)?(-nightly.[0-9]+)?$/g;
const lastCommit = await GitProcess.exec(
['log', '-n', '1', "--pretty=format:'%s'"],
ELECTRON_DIR
);
return !lastCommitWasRelease.test(lastCommit.stdout);
}
export async function printNextVersion (options: PrepareReleaseOptions) {
const newVersion = await getNewVersion(options, DryRunMode.DRY_RUN);
console.log(newVersion);
@@ -225,17 +214,9 @@ export async function prepareRelease (options: PrepareReleaseOptions) {
const currentBranch =
options.targetBranch || (await getCurrentBranch(ELECTRON_DIR));
const changes = await changesToRelease();
if (changes) {
const newVersion = await getNewVersion(options, DryRunMode.DRY_RUN);
console.log(`${pass} Starting release of ${newVersion}`);
await createRelease(options, currentBranch);
await pushRelease(currentBranch);
await runReleaseBuilds(currentBranch, newVersion);
} else {
console.log(
'There are no new changes to this branch since the last release, aborting release.'
);
process.exit(1);
}
const newVersion = await getNewVersion(options, DryRunMode.DRY_RUN);
console.log(`${pass} Starting release of ${newVersion}`);
await createRelease(options, currentBranch);
await pushRelease(currentBranch);
await runReleaseBuilds(currentBranch, newVersion);
}

View File

@@ -23,6 +23,13 @@ int ElectronMain(int argc, char* argv[]) {
params.argc = argc;
params.argv = const_cast<const char**>(argv);
electron::ElectronCommandLine::Init(argc, argv);
// Ensure that Bundle Id is set before ContentMain.
// Refs https://chromium-review.googlesource.com/c/chromium/src/+/5581006
delegate.OverrideChildProcessPath();
delegate.OverrideFrameworkBundlePath();
delegate.SetUpBundleOverrides();
return content::ContentMain(std::move(params));
}

View File

@@ -271,12 +271,6 @@ std::optional<int> ElectronMainDelegate::BasicStartupComplete() {
kNonWildcardDomainNonPortSchemes, kNonWildcardDomainNonPortSchemesSize);
#endif
#if BUILDFLAG(IS_MAC)
OverrideChildProcessPath();
OverrideFrameworkBundlePath();
SetUpBundleOverrides();
#endif
#if BUILDFLAG(IS_WIN)
// Ignore invalid parameter errors.
_set_invalid_parameter_handler(InvalidParameterHandler);

View File

@@ -34,6 +34,12 @@ class ElectronMainDelegate : public content::ContentMainDelegate {
ElectronMainDelegate(const ElectronMainDelegate&) = delete;
ElectronMainDelegate& operator=(const ElectronMainDelegate&) = delete;
#if BUILDFLAG(IS_MAC)
void OverrideChildProcessPath();
void OverrideFrameworkBundlePath();
void SetUpBundleOverrides();
#endif
protected:
// content::ContentMainDelegate:
std::string_view GetBrowserV8SnapshotFilename() override;
@@ -57,12 +63,6 @@ class ElectronMainDelegate : public content::ContentMainDelegate {
#endif
private:
#if BUILDFLAG(IS_MAC)
void OverrideChildProcessPath();
void OverrideFrameworkBundlePath();
void SetUpBundleOverrides();
#endif
std::unique_ptr<content::ContentBrowserClient> browser_client_;
std::unique_ptr<content::ContentClient> content_client_;
std::unique_ptr<content::ContentGpuClient> gpu_client_;

View File

@@ -247,12 +247,16 @@ void UtilityProcessWrapper::OnServiceProcessLaunch(
}
void UtilityProcessWrapper::HandleTermination(uint64_t exit_code) {
// HandleTermination is called from multiple callsites,
// we need to ensure we only process it for the first callsite.
if (terminated_)
return;
terminated_ = true;
if (pid_ != base::kNullProcessId)
GetAllUtilityProcessWrappers().Remove(pid_);
CloseConnectorPort();
EmitWithoutEvent("exit", exit_code);
Unpin();
}
@@ -292,13 +296,8 @@ void UtilityProcessWrapper::CloseConnectorPort() {
}
void UtilityProcessWrapper::Shutdown(uint64_t exit_code) {
if (pid_ != base::kNullProcessId)
GetAllUtilityProcessWrappers().Remove(pid_);
node_service_remote_.reset();
CloseConnectorPort();
// Emit 'exit' event
EmitWithoutEvent("exit", exit_code);
Unpin();
HandleTermination(exit_code);
}
void UtilityProcessWrapper::PostMessage(gin::Arguments* args) {

View File

@@ -105,6 +105,7 @@ class UtilityProcessWrapper final
int stdout_read_fd_ = -1;
int stderr_read_fd_ = -1;
bool connector_closed_ = false;
bool terminated_ = false;
std::unique_ptr<mojo::Connector> connector_;
blink::MessagePortDescriptor host_port_;
mojo::Receiver<node::mojom::NodeServiceClient> receiver_{this};

View File

@@ -121,21 +121,18 @@ BrowserContext* ElectronExtensionsBrowserClient::GetOriginalContext(
content::BrowserContext*
ElectronExtensionsBrowserClient::GetContextRedirectedToOriginal(
content::BrowserContext* context,
bool force_guest_profile) {
content::BrowserContext* context) {
return GetOriginalContext(context);
}
content::BrowserContext* ElectronExtensionsBrowserClient::GetContextOwnInstance(
content::BrowserContext* context,
bool force_guest_profile) {
content::BrowserContext* context) {
return context;
}
content::BrowserContext*
ElectronExtensionsBrowserClient::GetContextForOriginalOnly(
content::BrowserContext* context,
bool force_guest_profile) {
content::BrowserContext* context) {
return context->IsOffTheRecord() ? nullptr : context;
}

View File

@@ -63,14 +63,11 @@ class ElectronExtensionsBrowserClient
content::BrowserContext* GetOriginalContext(
content::BrowserContext* context) override;
content::BrowserContext* GetContextRedirectedToOriginal(
content::BrowserContext* context,
bool force_guest_profile) override;
content::BrowserContext* context) override;
content::BrowserContext* GetContextOwnInstance(
content::BrowserContext* context,
bool force_guest_profile) override;
content::BrowserContext* context) override;
content::BrowserContext* GetContextForOriginalOnly(
content::BrowserContext* context,
bool force_guest_profile) override;
content::BrowserContext* context) override;
bool AreExtensionsDisabledForContext(
content::BrowserContext* context) override;
bool IsGuestSession(content::BrowserContext* context) const override;

View File

@@ -560,6 +560,12 @@ bool FileSystemAccessPermissionContext::IsFileTypeDangerous(
return false;
}
base::expected<void, std::string>
FileSystemAccessPermissionContext::CanShowFilePicker(
content::RenderFrameHost* rfh) {
return base::ok();
}
bool FileSystemAccessPermissionContext::CanObtainReadPermission(
const url::Origin& origin) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);

View File

@@ -78,7 +78,8 @@ class FileSystemAccessPermissionContext
bool IsFileTypeDangerous(const base::FilePath& path,
const url::Origin& origin) override;
base::expected<void, std::string> CanShowFilePicker(
content::RenderFrameHost* rfh) override;
bool CanObtainReadPermission(const url::Origin& origin) override;
bool CanObtainWritePermission(const url::Origin& origin) override;

View File

@@ -538,6 +538,11 @@ void NativeWindowViews::ShowInactive() {
#if BUILDFLAG(IS_LINUX)
if (global_menu_bar_)
global_menu_bar_->OnWindowMapped();
// On X11, setting Z order before showing the window doesn't take effect,
// so we have to call it again.
if (IsX11())
widget()->SetZOrderLevel(widget()->GetZOrderLevel());
#endif
}

View File

@@ -15,7 +15,7 @@
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/observer_list_types.h"
#include "ui/base/models/simple_menu_model.h"
#include "ui/menus/simple_menu_model.h"
#include "url/gurl.h"
namespace electron {

View File

@@ -5,6 +5,7 @@
#include "shell/browser/ui/win/taskbar_host.h"
#include <objbase.h>
#include <array>
#include <string>
#include "base/strings/utf_string_conversions.h"
@@ -25,10 +26,10 @@ namespace {
// From MSDN:
// https://msdn.microsoft.com/en-us/library/windows/desktop/dd378460(v=vs.85).aspx#thumbbars
// The thumbnail toolbar has a maximum of seven buttons due to the limited room.
const size_t kMaxButtonsCount = 7;
constexpr size_t kMaxButtonsCount = 7U;
// The base id of Thumbar button.
const int kButtonIdBase = 40001;
constexpr int kButtonIdBase = 40001;
bool GetThumbarButtonFlags(const std::vector<std::string>& flags,
THUMBBUTTONFLAGS* out) {
@@ -72,10 +73,10 @@ bool TaskbarHost::SetThumbarButtons(HWND window,
// The number of buttons in thumbar can not be changed once it is created,
// so we have to claim kMaxButtonsCount buttons initially in case users add
// more buttons later.
base::win::ScopedHICON icons[kMaxButtonsCount] = {};
THUMBBUTTON thumb_buttons[kMaxButtonsCount] = {};
auto icons = std::array<base::win::ScopedHICON, kMaxButtonsCount>{};
auto thumb_buttons = std::array<THUMBBUTTON, kMaxButtonsCount>{};
for (size_t i = 0; i < kMaxButtonsCount; ++i) {
for (size_t i = 0U; i < kMaxButtonsCount; ++i) {
THUMBBUTTON& thumb_button = thumb_buttons[i];
// Set ID.
@@ -118,10 +119,11 @@ bool TaskbarHost::SetThumbarButtons(HWND window,
// Finally add them to taskbar.
HRESULT r;
if (thumbar_buttons_added_) {
r = taskbar_->ThumbBarUpdateButtons(window, kMaxButtonsCount,
thumb_buttons);
r = taskbar_->ThumbBarUpdateButtons(window, thumb_buttons.size(),
thumb_buttons.data());
} else {
r = taskbar_->ThumbBarAddButtons(window, kMaxButtonsCount, thumb_buttons);
r = taskbar_->ThumbBarAddButtons(window, thumb_buttons.size(),
thumb_buttons.data());
}
thumbar_buttons_added_ = true;

View File

@@ -252,8 +252,8 @@ namespace util {
* |v8::ArrayBufferView::ByteLength()|.
*/
base::span<uint8_t> as_byte_span(v8::Local<v8::ArrayBufferView> val) {
uint8_t* data =
static_cast<uint8_t*>(val->Buffer()->Data()) + val->ByteOffset();
uint8_t* data = UNSAFE_BUFFERS(static_cast<uint8_t*>(val->Buffer()->Data()) +
val->ByteOffset());
const size_t size = val->ByteLength();
return UNSAFE_BUFFERS(base::span{data, size});
}

View File

@@ -287,7 +287,7 @@ void RendererClientBase::RenderThreadStarted() {
ParseSchemesCLISwitch(command_line, switches::kBypassCSPSchemes);
for (const std::string& scheme : csp_bypassing_schemes)
blink::SchemeRegistry::RegisterURLSchemeAsBypassingContentSecurityPolicy(
WTF::String::FromUTF8(scheme.data(), scheme.length()));
WTF::String::FromUTF8(scheme));
std::vector<std::string> code_cache_schemes_list =
ParseSchemesCLISwitch(command_line, switches::kCodeCacheSchemes);

View File

@@ -2514,6 +2514,22 @@ describe('BrowserWindow module', () => {
expect(c.isAlwaysOnTop()).to.be.true('child is not always on top');
expect(c._getAlwaysOnTopLevel()).to.equal('screen-saver');
});
it('works when called prior to show', async () => {
w = new BrowserWindow({ show: false });
w.setAlwaysOnTop(true, 'screen-saver');
w.show();
await setTimeout(1000);
expect(w.isAlwaysOnTop()).to.be.true('is not alwaysOnTop');
});
it('works when called prior to showInactive', async () => {
w = new BrowserWindow({ show: false });
w.setAlwaysOnTop(true, 'screen-saver');
w.showInactive();
await setTimeout(1000);
expect(w.isAlwaysOnTop()).to.be.true('is not alwaysOnTop');
});
});
describe('preconnect feature', () => {

View File

@@ -926,6 +926,20 @@ describe('Menu module', function () {
});
w.show();
});
it('does not crash when rendering menu item with Super or meta accelerator', async () => {
const menu = Menu.buildFromTemplate([{
label: 'Test Super',
accelerator: 'Super+Ctrl+T'
}, {
label: 'Test Meta',
accelerator: 'Meta+Ctrl+T'
}]);
const menuWillClose = once(menu, 'menu-will-close');
menu.popup({ window: w });
menu.closePopup();
await menuWillClose;
});
});
describe('Menu.setApplicationMenu', () => {

View File

@@ -58,10 +58,20 @@ describe('utilityProcess module', () => {
await once(child, 'spawn');
});
it('emits \'exit\' when child process exits gracefully', async () => {
it('emits \'exit\' when child process exits gracefully', (done) => {
const child = utilityProcess.fork(path.join(fixturesPath, 'empty.js'));
const [code] = await once(child, 'exit');
expect(code).to.equal(0);
child.on('exit', (code) => {
expect(code).to.equal(0);
done();
});
});
it('emits \'exit\' when the child process file does not exist', (done) => {
const child = utilityProcess.fork('nonexistent');
child.on('exit', (code) => {
expect(code).to.equal(1);
done();
});
});
ifit(!isWindows32Bit)('emits the correct error code when child process exits nonzero', async () => {

View File

@@ -15,7 +15,7 @@ import * as path from 'node:path';
import { setTimeout } from 'node:timers/promises';
import * as url from 'node:url';
import { ifit, ifdescribe, defer, itremote, listen } from './lib/spec-helpers';
import { ifit, ifdescribe, defer, itremote, listen, startRemoteControlApp } from './lib/spec-helpers';
import { closeAllWindows } from './lib/window-helpers';
import { PipeTransport } from './pipe-transport';
@@ -556,6 +556,36 @@ describe('command line switches', () => {
});
});
});
describe('--trace-startup switch', () => {
const outputFilePath = path.join(app.getPath('temp'), 'trace.json');
afterEach(() => {
if (fs.existsSync(outputFilePath)) {
fs.unlinkSync(outputFilePath);
}
});
it('creates startup trace', async () => {
const rc = await startRemoteControlApp(['--trace-startup=*', `--trace-startup-file=${outputFilePath}`, '--trace-startup-duration=1', '--enable-logging']);
const stderrComplete = new Promise<string>(resolve => {
let stderr = '';
rc.process.stderr!.on('data', (chunk) => {
stderr += chunk.toString('utf8');
});
rc.process.on('close', () => { resolve(stderr); });
});
rc.remotely(() => {
global.setTimeout(() => {
require('electron').app.quit();
}, 5000);
});
const stderr = await stderrComplete;
expect(stderr).to.match(/Completed startup tracing to/);
expect(fs.existsSync(outputFilePath)).to.be.true('output exists');
expect(fs.statSync(outputFilePath).size).to.be.above(0,
`the trace output file is empty, check "${outputFilePath}"`);
});
});
});
describe('chromium features', () => {