diff --git a/.github/actions/free-space-macos/action.yml b/.github/actions/free-space-macos/action.yml index efdea79f1ed5..d0251e6802bd 100644 --- a/.github/actions/free-space-macos/action.yml +++ b/.github/actions/free-space-macos/action.yml @@ -17,28 +17,30 @@ runs: } strip_universal_deep() { - opwd=$(pwd) - cd $1 - f=$(find . -perm +111 -type f) - for fp in $f - do - if [[ $(file "$fp") == *"universal binary"* ]]; then - if [ "`arch`" == "arm64" ]; then - if [[ $(file "$fp") == *"x86_64"* ]]; then - sudo lipo -remove x86_64 "$fp" -o "$fp" || true - fi - else - if [[ $(file "$fp") == *"arm64e)"* ]]; then - sudo lipo -remove arm64e "$fp" -o "$fp" || true - fi - if [[ $(file "$fp") == *"arm64)"* ]]; then - sudo lipo -remove arm64 "$fp" -o "$fp" || true + if [ -d "$1" ]; then + opwd=$(pwd) + cd $1 + f=$(find . -perm +111 -type f) + for fp in $f + do + if [[ $(file "$fp") == *"universal binary"* ]]; then + if [ "`arch`" == "arm64" ]; then + if [[ $(file "$fp") == *"x86_64"* ]]; then + sudo lipo -remove x86_64 "$fp" -o "$fp" || true + fi + else + if [[ $(file "$fp") == *"arm64e)"* ]]; then + sudo lipo -remove arm64e "$fp" -o "$fp" || true + fi + if [[ $(file "$fp") == *"arm64)"* ]]; then + sudo lipo -remove arm64 "$fp" -o "$fp" || true + fi fi fi - fi - done + done - cd $opwd + cd $opwd + fi } tmpify /Library/Developer/CoreSimulator @@ -60,10 +62,9 @@ runs: sudo rm -rf /Applications/Safari.app sudo rm -rf /Applications/Xcode_16.1.app - sudo rm -rf /Applications/Xcode_16.3.app sudo rm -rf /Applications/Xcode_16.2.app + sudo rm -rf /Applications/Xcode_16.3.app sudo rm -rf /Applications/Google Chrome.app - sudo rm -rf /Applications/Xcode_16.4.app sudo rm -rf /Applications/Google Chrome for Testing.app sudo rm -rf /Applications/Firefox.app sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data diff --git a/.github/actions/install-build-tools/action.yml b/.github/actions/install-build-tools/action.yml index 868cdc63a44b..2dc60d1f0ba5 100644 --- a/.github/actions/install-build-tools/action.yml +++ b/.github/actions/install-build-tools/action.yml @@ -15,7 +15,7 @@ runs: git config --global core.preloadindex true git config --global core.longpaths true fi - export BUILD_TOOLS_SHA=706147b2376f55078f718576b28129a0457f1795 + export BUILD_TOOLS_SHA=a5d9f9052dcc36ee88bef5c8b13acbefd87b7d8d npm i -g @electron/build-tools # Update depot_tools to ensure python e d update_depot_tools diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7dec7e0a490c..17cc18a1d977 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -189,7 +189,7 @@ jobs: with: target-platform: macos target-archs: x64 arm64 - check-runs-on: macos-14 + check-runs-on: macos-15 gn-build-type: testing secrets: inherit @@ -225,7 +225,7 @@ jobs: uses: ./.github/workflows/pipeline-electron-build-and-test.yml needs: checkout-macos with: - build-runs-on: macos-14-xlarge + build-runs-on: macos-15-xlarge test-runs-on: macos-15-large target-platform: macos target-arch: x64 @@ -244,7 +244,7 @@ jobs: uses: ./.github/workflows/pipeline-electron-build-and-test.yml needs: checkout-macos with: - build-runs-on: macos-14-xlarge + build-runs-on: macos-15-xlarge test-runs-on: macos-15 target-platform: macos target-arch: arm64 diff --git a/BUILD.gn b/BUILD.gn index 2a6ee90e5faa..2347766ae994 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -586,6 +586,11 @@ source_set("electron_lib") { } if (is_mac) { + # Disable C++ modules to resolve linking error when including MacOS SDK + # headers from third_party/electron_node/deps/uv/include/uv/darwin.h + # TODO(samuelmaddock): consider revisiting this in the future + use_libcxx_modules = false + deps += [ "//components/remote_cocoa/app_shim", "//components/remote_cocoa/browser", diff --git a/DEPS b/DEPS index 90c9be2a6840..ce20c4e3171e 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '142.0.7417.0', + '142.0.7444.23', 'node_version': 'v22.20.0', 'nan_version': diff --git a/docs/api/app.md b/docs/api/app.md index 9dcb4835aade..3e0da669086b 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -421,6 +421,7 @@ Returns: * `oom` - Process ran out of memory * `launch-failed` - Process never successfully launched * `integrity-failure` - Windows code integrity checks failed + * `memory-eviction` - Process proactively terminated to prevent a future out-of-memory (OOM) situation * `exitCode` number - The exit code for the process (e.g. status from waitpid if on POSIX, from GetExitCodeProcess on Windows). * `serviceName` string (optional) - The non-localized name of the process. diff --git a/docs/api/structures/render-process-gone-details.md b/docs/api/structures/render-process-gone-details.md index e48800a5b87d..633d9bbc9ddb 100644 --- a/docs/api/structures/render-process-gone-details.md +++ b/docs/api/structures/render-process-gone-details.md @@ -8,6 +8,7 @@ * `oom` - Process ran out of memory * `launch-failed` - Process never successfully launched * `integrity-failure` - Windows code integrity checks failed + * `memory-eviction` - Process proactively terminated to prevent a future out-of-memory (OOM) situation * `exitCode` Integer - The exit code of the process, unless `reason` is `launch-failed`, in which case `exitCode` will be a platform-specific launch failure error code. diff --git a/filenames.libcxx.gni b/filenames.libcxx.gni index 3142c0376f79..f7aa6a7bdb25 100644 --- a/filenames.libcxx.gni +++ b/filenames.libcxx.gni @@ -217,6 +217,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__atomic/check_memory_order.h", "//third_party/libc++/src/include/__atomic/contention_t.h", "//third_party/libc++/src/include/__atomic/fence.h", + "//third_party/libc++/src/include/__atomic/floating_point_helper.h", "//third_party/libc++/src/include/__atomic/is_always_lock_free.h", "//third_party/libc++/src/include/__atomic/kill_dependency.h", "//third_party/libc++/src/include/__atomic/memory_order.h", diff --git a/patches/angle/.patches b/patches/angle/.patches deleted file mode 100644 index 30503ef3561d..000000000000 --- a/patches/angle/.patches +++ /dev/null @@ -1 +0,0 @@ -cherry-pick-2f564f1ca07b.patch diff --git a/patches/angle/cherry-pick-2f564f1ca07b.patch b/patches/angle/cherry-pick-2f564f1ca07b.patch deleted file mode 100644 index 06060e5968f3..000000000000 --- a/patches/angle/cherry-pick-2f564f1ca07b.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Mark Mentovai -Date: Tue, 16 Sep 2025 16:46:36 -0400 -Subject: mac: handle Metal toolchain being unbundled from Xcode 26 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The Metal toolchain was formerly part of Xcode, but in Xcode 26, it has -been unbundled and is now a separate install. Attempting to use the -Metal toolchain without installing it results in a build error, such as: - -error: error: cannot execute tool 'metal' due to missing Metal -Toolchain; use: xcodebuild -downloadComponent MetalToolchain - -By running the suggested command, the Metal toolchain can be installed, -but the existing angle build does not know how to find it correctly. - -For system Xcode installations, tools from the Metal toolchain (`metal` -and `metallib`) can be run via `xcrun`. This construct should work -equally well for older Xcode versions, for situations where it’s still -in use. - -For the hermetic toolchain, we’ll continue splicing the Metal toolchain -into the location it had previously been avialable (see -https://chromium-review.googlesource.com/c/6950738), although this is -subject to change in the future. - -Bug: chromium:423933062, chromium:445400016 -Change-Id: I139eca51938f7cecfec9b90fd488947160ef4ec9 -Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6955000 -Auto-Submit: Mark Mentovai -Commit-Queue: Mark Mentovai -Reviewed-by: Geoff Lang - -diff --git a/src/libANGLE/renderer/metal/BUILD.gn b/src/libANGLE/renderer/metal/BUILD.gn -index 96e9ee8420810f6a3ca9a0c290d4a654200eb7b9..50ac42a5b9a0f7c8b3b161af40c598cb34ff132a 100644 ---- a/src/libANGLE/renderer/metal/BUILD.gn -+++ b/src/libANGLE/renderer/metal/BUILD.gn -@@ -24,20 +24,56 @@ config("angle_metal_backend_config") { - } - - if (metal_internal_shader_compilation_supported) { -+ template("run_metal_tool") { -+ action(target_name) { -+ forward_variables_from(invoker, -+ [ -+ "deps", -+ "sources", -+ "outputs", -+ "metal_tool", -+ ]) -+ script = "shaders/metal_wrapper.py" -+ if (use_system_xcode) { -+ # System Xcode: run metal and metallib via xcrun. Since Xcode 26.0, the -+ # Metal toolchain has been unbundled from Xcode, and must be installed -+ # separately by running `xcodebuild -downloadComponent MetalToolchain`. -+ # There is a vestigial metal executable in mac_bin_path, but it’s -+ # incapable of running successfuly without the -+ # rest of the Metal toolchain surrounding it. `xcrun` is able to find -+ # and run the correct Metal toolchain when properly installed. -+ # -+ # If you’re using system Xcode and your build fails with this message: -+ # error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain -+ # then do what the error message suggests, and then retry your build. -+ args = [ -+ "xcrun", -+ metal_tool, -+ ] -+ } else { -+ # Hermetic Xcode: at least for now, the Metal toolchain is -+ # “spliced” into the location in the hermetic toolchain where it lived -+ # before Xcode 26.0, so it can be run directly from there. -+ args = [ mac_bin_path + metal_tool ] -+ } -+ -+ args += invoker.args -+ } -+ } -+ - _metal_internal_shaders_air_file = - "$root_gen_dir/angle/mtl_internal_shaders_autogen.air" - -- action("angle_metal_internal_shaders_to_air") { -- script = "shaders/metal_wrapper.py" -- -- outputs = [ _metal_internal_shaders_air_file ] -- -+ run_metal_tool("angle_metal_internal_shaders_to_air") { - _metal_internal_shaders_metal_source = - "shaders/mtl_internal_shaders_autogen.metal" - sources = [ _metal_internal_shaders_metal_source ] - -+ outputs = [ _metal_internal_shaders_air_file ] -+ -+ metal_tool = "metal" -+ - args = [ -- mac_bin_path + "metal", - "-c", - rebase_path(_metal_internal_shaders_metal_source, root_build_dir), - "-o", -@@ -60,17 +96,16 @@ if (metal_internal_shader_compilation_supported) { - _metal_internal_shaders_metallib_file = - "$root_gen_dir/angle/mtl_internal_shaders_autogen.metallib" - -- action("angle_metal_internal_shaders_to_mtllib") { -- script = "shaders/metal_wrapper.py" -- -- outputs = [ _metal_internal_shaders_metallib_file ] -+ run_metal_tool("angle_metal_internal_shaders_to_mtllib") { -+ deps = [ ":angle_metal_internal_shaders_to_air" ] - - sources = [ _metal_internal_shaders_air_file ] - -- deps = [ ":angle_metal_internal_shaders_to_air" ] -+ outputs = [ _metal_internal_shaders_metallib_file ] -+ -+ metal_tool = "metallib" - - args = [ -- mac_bin_path + "metallib", - rebase_path(_metal_internal_shaders_air_file, root_build_dir), - "-o", - rebase_path(_metal_internal_shaders_metallib_file, root_build_dir), diff --git a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch index 503305951370..20d3059e4981 100644 --- a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch +++ b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch @@ -20,7 +20,7 @@ index 2cdcbc346175eeee69402ecee7f169e61c655199..f7226fe711e4214b216ea2c5173a0212 case ssl_open_record_error: diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc -index 2e0db357135d54bc416bc94f4e3849267932c3b4..35f0430b5d1c1ed1676ea7a9e7e94e820126607b 100644 +index 532744f942301dfd124fa1c2c6fd547fffb7d9c5..0e1d89439fce44077cd6f224742e67ec4b891cad 100644 --- a/ssl/ssl_lib.cc +++ b/ssl/ssl_lib.cc @@ -1211,7 +1211,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) { @@ -32,7 +32,7 @@ index 2e0db357135d54bc416bc94f4e3849267932c3b4..35f0430b5d1c1ed1676ea7a9e7e94e82 return SSL_ERROR_ZERO_RETURN; } // An EOF was observed which violates the protocol, and the underlying -@@ -2602,13 +2602,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) { +@@ -2662,13 +2662,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) { return CRYPTO_get_ex_data(&ctx->ex_data, idx); } diff --git a/patches/chromium/.patches b/patches/chromium/.patches index dc8596805193..fab137a0c430 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -110,7 +110,6 @@ fix_getcursorscreenpoint_wrongly_returns_0_0.patch fix_add_support_for_skipping_first_2_no-op_refreshes_in_thumb_cap.patch refactor_expose_file_system_access_blocklist.patch feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch -fix_font_face_resolution_when_renderer_is_blocked.patch feat_enable_passing_exit_code_on_service_process_crash.patch chore_remove_reference_to_chrome_browser_themes.patch feat_enable_customizing_symbol_color_in_framecaptionbutton.patch @@ -141,5 +140,4 @@ chore_add_electron_objects_to_wrappablepointertag.patch chore_expose_isolate_parameter_in_script_lifecycle_observers.patch revert_partial_remove_unused_prehandlemouseevent.patch allow_electron_to_depend_on_components_os_crypt_sync.patch -disable_nsautofillheuristiccontroller_on_macos_26.patch -inspectorpageagent_provisional_frame_speculative_fix.patch +chore_disable_protocol_handler_dcheck.patch diff --git a/patches/chromium/accelerator.patch b/patches/chromium/accelerator.patch index 65aea0d48e53..5047403f3ae3 100644 --- a/patches/chromium/accelerator.patch +++ b/patches/chromium/accelerator.patch @@ -53,7 +53,7 @@ index 5ad9332dd27ceda7d67cd3f571b12218a4415a40..ffe083836c39fb60b4bff1f9fbdd6ceb } diff --git a/ui/base/accelerators/accelerator.h b/ui/base/accelerators/accelerator.h -index e7d5adfac920c97df8bab9bf4ed69a835ee314a9..9aeea7cb4c48d1ccc27304fa99238151b2811c87 100644 +index 666ecbc118bec6d51465644ae4e573846c33610b..30b3ae49265eb263edda23c68587b46fab72a3ba 100644 --- a/ui/base/accelerators/accelerator.h +++ b/ui/base/accelerators/accelerator.h @@ -18,6 +18,7 @@ @@ -64,8 +64,8 @@ index e7d5adfac920c97df8bab9bf4ed69a835ee314a9..9aeea7cb4c48d1ccc27304fa99238151 #include "base/time/time.h" #include "build/blink_buildflags.h" #include "build/build_config.h" -@@ -189,6 +190,8 @@ class COMPONENT_EXPORT(UI_BASE) Accelerator { - return interrupted_by_mouse_event_; +@@ -199,6 +200,8 @@ class COMPONENT_EXPORT(UI_BASE) Accelerator { + << 18); // masked to 6 bits } + absl::optional shifted_char; diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 0644ba85b182..cc67817d07f8 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set. This should be upstreamed. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index a827f072e72d76dd52378cca4368932a4b2f4f3d..cc1b6cca3009e876f84f48df942df02fddd91e80 100644 +index 30cc1d4a179f9da59824cb98415baed8493fc843..2272eaa7e0e3306201e5e32226a0115f6f6636e5 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -273,6 +273,10 @@ int GpuMain(MainFunctionParams parameters) { +@@ -272,6 +272,10 @@ int GpuMain(MainFunctionParams parameters) { // to the GpuProcessHost once the GpuServiceImpl has started. viz::GpuLogMessageManager::GetInstance()->InstallPreInitializeLogHandler(); @@ -24,7 +24,7 @@ index a827f072e72d76dd52378cca4368932a4b2f4f3d..cc1b6cca3009e876f84f48df942df02f // We are experiencing what appear to be memory-stomp issues in the GPU // process. These issues seem to be impacting the task executor and listeners // registered to it. Create the task executor on the heap to guard against -@@ -382,7 +386,6 @@ int GpuMain(MainFunctionParams parameters) { +@@ -381,7 +385,6 @@ int GpuMain(MainFunctionParams parameters) { #endif const bool dead_on_arrival = !init_success; diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 84e4c8916280..b86762f31684 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the context, which can cause some preload scripts to trip. diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h -index 284da783658bec333be748941784d43b13f6f244..18714ce8fc27c8d56c5deac27ba335078c452d0a 100644 +index 88a4c3167e2935a11fc50f4c147fef6b2253abc5..e9e88619c349d018abbf183b16339339c7fb29b6 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h @@ -139,6 +139,8 @@ class CONTENT_EXPORT RenderFrameObserver { @@ -23,10 +23,10 @@ index 284da783658bec333be748941784d43b13f6f244..18714ce8fc27c8d56c5deac27ba33507 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index a0aa3ec64b54b99508d1ba9cd52e2fe0e53ed56c..f337d61906651359eeb5228c112ad948f4f7a752 100644 +index 8603f912e83db5211f21701b2f08db07790ea4ba..4816cb344ee9474a663863a5c2668a112c299919 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4678,6 +4678,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4700,6 +4700,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,7 +40,7 @@ index a0aa3ec64b54b99508d1ba9cd52e2fe0e53ed56c..f337d61906651359eeb5228c112ad948 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 2950a6f600aab24226ef59acabddc74c9b67cac8..f0f4335aa815ea50dbf9b720b41e4eb31f27fb90 100644 +index 29c0e1703bb7e8e7bf53440a7f0cb7a6ceb4381b..155d2c3d9ce02fa02a655abf8bf7dbb1f83553f3 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -602,6 +602,8 @@ class CONTENT_EXPORT RenderFrameImpl diff --git a/patches/chromium/add_electron_deps_to_license_credits_file.patch b/patches/chromium/add_electron_deps_to_license_credits_file.patch index 68f3913a888b..eaf00146856d 100644 --- a/patches/chromium/add_electron_deps_to_license_credits_file.patch +++ b/patches/chromium/add_electron_deps_to_license_credits_file.patch @@ -7,10 +7,10 @@ Ensure that licenses for the dependencies introduced by Electron are included in `LICENSES.chromium.html` diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py -index b0807ee3d8ebcf34f0d740362aa46c8631562d38..118d200b74953c0068ad59300ccc0e3041d77a10 100755 +index a8afd4c9a95ad62fa0c8adb6fd53c2783d6eee96..ef8ab7dd5368d79c4bcf1e22fb539029956d4c67 100755 --- a/tools/licenses/licenses.py +++ b/tools/licenses/licenses.py -@@ -337,6 +337,31 @@ SPECIAL_CASES = { +@@ -342,6 +342,31 @@ SPECIAL_CASES = { "License": "Apache 2.0", "License File": ["//third_party/dawn/third_party/khronos/LICENSE"], }, diff --git a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch index 2c316f73b7d1..a7f762497c0c 100644 --- a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch +++ b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch @@ -8,10 +8,10 @@ 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 2d612b3a8ceb61f02fbd96023140bc2c702db589..bb5b17fc884b78aa65c3885e11309a9c50f8e786 100644 +index e104f4d7814b6f6a0e1f5cf49ae24d5571e30fb1..cc7e9064b21f8f2c45690454805901c0c56e2aa1 100644 --- a/ui/base/clipboard/scoped_clipboard_writer.cc +++ b/ui/base/clipboard/scoped_clipboard_writer.cc -@@ -246,6 +246,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format, +@@ -244,6 +244,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format, } } diff --git a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch index 00d2c96c9ef4..34037fa50780 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc -index 318031e17f212b0e9a651dcc0e86e16af957ed8e..e68dcdc8039217ec59a60ef02c27b4f80f661d2a 100644 +index 94a67b61edb0bc2f3faa5db44e99d1493f38d5a0..e4a953c199f8c1e5d68e552f73c593d308946957 100644 --- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc +++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc @@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast { @@ -51,7 +51,7 @@ index 7944fe64e0da112fc670358b75506bb199bb5e4a..0e3c16c6af2a078943e9f39808134ab2 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 e95a313945397c6eff5514932ce15c5d4b6a8e1f..edb2638deb85dfd37651a00d4c370e51d94fcc6a 100644 +index e8a0554c4d84a16fc2122cb3e48199b4f43ecf88..34fca79b7c87b2fd098271fb5a4f83c015eeb2bc 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -578,8 +578,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) { @@ -116,10 +116,10 @@ index 9c0fe6ad62872f05cfb1179b4b979139008976d2..6aca43e61ef7f1caea74c30e5c3ce449 // Visibility ----------------------------------------------------------- diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index cd57d63a452cb4444d5d0b11b06c65c5bc11f5f1..68a102327e22302587f7cc402cb26ef2f02b261e 100644 +index c542810213430164308d8cde71130b0b337996b4..bd09aa1967d04e0be240de38aabdaa9d74f60336 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -2504,6 +2504,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( +@@ -2507,6 +2507,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal", "old_state", old_state, "new_state", new_state); @@ -130,7 +130,7 @@ index cd57d63a452cb4444d5d0b11b06c65c5bc11f5f1..68a102327e22302587f7cc402cb26ef2 bool storing_in_bfcache = new_state->is_in_back_forward_cache && !old_state->is_in_back_forward_cache; bool restoring_from_bfcache = !new_state->is_in_back_forward_cache && -@@ -4012,10 +4016,23 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -4019,10 +4023,23 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -155,10 +155,10 @@ index cd57d63a452cb4444d5d0b11b06c65c5bc11f5f1..68a102327e22302587f7cc402cb26ef2 // 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 7879bd064e9ef324e12b5c2f522f9c8a4fa29ad5..950df20815a607b678e0e67a19d22d37b579b85d 100644 +index 83e4be6692496d1d05dcd4110009c68763683128..f8deed2f22387c5dcc35d93c7b45ba54a77625e5 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -450,6 +450,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -452,6 +452,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -166,7 +166,7 @@ index 7879bd064e9ef324e12b5c2f522f9c8a4fa29ad5..950df20815a607b678e0e67a19d22d37 void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -943,6 +944,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -945,6 +946,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, // If true, we send IPC messages when |preferred_size_| changes. bool send_preferred_size_changes_ = false; diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 441d2bee5cec..308263813719 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -49,10 +49,10 @@ index cdb5b9246087b5678cf6a0f2713f6238dafc13de..7efbe7524c5ddd3785fff0e2d8901f93 // 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 72f642cb098bb6bbb445b49823663a7deb316842..902f472c8c52dd4fe52f46fbb97034b041153f65 100644 +index dc1464afab92e4148d8c61f2098d5172e236651b..e96fca375fc3eb2504dd6f82e5be2c025d23089e 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -751,10 +751,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -746,10 +746,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index 72f642cb098bb6bbb445b49823663a7deb316842..902f472c8c52dd4fe52f46fbb97034b0 if (!Client()) return false; -@@ -808,6 +804,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -803,6 +799,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index 3a5d014862c1..b8d523a1f997 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -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 67b5911d7815b47aafe1df1030c96a903e495df1..4813b0dc361219ad30a7e745a7906fa396c3950c 100644 +index 192eee833064a9aafeb9411a2a797d988484ce34..96abc3617810426a6a4c4ac9511a329fc276dca2 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -128,6 +128,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS( diff --git a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch index 87522628ff21..eba81d100407 100644 --- a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch +++ b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch @@ -11,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this patch. diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index e648bb4ed2ff72441faa8773e449e0b6174f5af5..fd2c1d3ac575d10de7d5c09e4418d17217a43b77 100644 +index 9bffa9c8272a81059eb05fa79107bb326029402c..d286e9ab4edf86570418d4b3699c8f2d720597e5 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -195,11 +195,16 @@ if (!is_android && !is_mac) { +@@ -197,11 +197,16 @@ if (!is_android && !is_mac) { "common/crash_keys.h", ] @@ -33,10 +33,10 @@ index e648bb4ed2ff72441faa8773e449e0b6174f5af5..fd2c1d3ac575d10de7d5c09e4418d172 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 790764062094479f25b33a0dfa3e143472e0a077..a9997872138b2d58d279103e4cac3c92f2091f0a 100644 +index 90c8ec37ad4c4640ef93ed1df513f059e846aa3e..a97aaa45f6715c9a6fc1dc4d68db95b920527ef4 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4807,7 +4807,7 @@ static_library("browser") { +@@ -4820,7 +4820,7 @@ static_library("browser") { ] } @@ -46,10 +46,10 @@ index 790764062094479f25b33a0dfa3e143472e0a077..a9997872138b2d58d279103e4cac3c92 # than here in :chrome_dll. deps += [ "//chrome:packed_resources_integrity_header" ] diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 8bcc85cfd507f23c9651ea0a006fd6464ecd134f..92e88e0c8f764a779d7c899b423b589a0302b4bd 100644 +index f057d3c3a49191df147469145edf323ba41f2e27..8619391bf1b25a8f93cfc339019b228720b4c106 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -7516,9 +7516,12 @@ test("unit_tests") { +@@ -7571,9 +7571,12 @@ test("unit_tests") { "//chrome/notification_helper", ] @@ -63,7 +63,7 @@ index 8bcc85cfd507f23c9651ea0a006fd6464ecd134f..92e88e0c8f764a779d7c899b423b589a "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/app:win_unit_tests", -@@ -8430,6 +8433,10 @@ test("unit_tests") { +@@ -8497,6 +8500,10 @@ test("unit_tests") { "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc", ] @@ -74,7 +74,7 @@ index 8bcc85cfd507f23c9651ea0a006fd6464ecd134f..92e88e0c8f764a779d7c899b423b589a sources += [ # The importer code is not used on Android. "../common/importer/firefox_importer_utils_unittest.cc", -@@ -8486,7 +8493,6 @@ test("unit_tests") { +@@ -8553,7 +8560,6 @@ test("unit_tests") { # TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above? deps += [ "../browser/screen_ai:screen_ai_install_state", diff --git a/patches/chromium/build_libc_as_static_library.patch b/patches/chromium/build_libc_as_static_library.patch index ea4ccf914b46..3a76bbc17179 100644 --- a/patches/chromium/build_libc_as_static_library.patch +++ b/patches/chromium/build_libc_as_static_library.patch @@ -7,10 +7,10 @@ Build libc++ as static library to compile and pass nan tests diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn -index 7dcefd2bceb209c6e74445259fac00e3e2280ff7..3a233d2e9dafc2093ead8f9c9104d06fe6176252 100644 +index c0c6cfb94338c6a75010e1b5de4cb6323b5afd12..903a5a0d9f7b7a7f9f4c44ef69e85eb922569365 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn -@@ -841,6 +841,7 @@ target(libcxx_target_type, "libc++") { +@@ -481,6 +481,7 @@ target(libcxx_target_type, "libc++") { # need to explicitly depend on libc++. visibility = [ "//build/config:common_deps", diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 50b6f011f1f4..7153c9aefeae 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -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 25bc5fd2f2158b95a7d6dff6a9a30c967c052149..ff0406154e44a3b12ec732e836fc1e65dadfd326 100644 +index 513162c135fe5ae14e1e23ca7b976b9692ff1d19..f61bb2d66214ba1dee2d386c7d498d045c7c2708 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -9826,6 +9826,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -9857,6 +9857,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -21,10 +21,10 @@ index 25bc5fd2f2158b95a7d6dff6a9a30c967c052149..ff0406154e44a3b12ec732e836fc1e65 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 29597a3a6f01fcff65de5624e583b03a1e34dd6f..6c067803c35a4e98ec99df6e28015f3b36e67e4f 100644 +index b014cd48c9997303e15fc99f2c8370ea044f413c..5d464141ea2e0ef23f37fe262f288b3678501330 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5319,6 +5319,10 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5323,6 +5323,10 @@ FrameTree* WebContentsImpl::CreateNewWindow( create_params.initially_hidden = renderer_started_hidden; create_params.initial_popup_url = params.target_url; @@ -35,7 +35,7 @@ index 29597a3a6f01fcff65de5624e583b03a1e34dd6f..6c067803c35a4e98ec99df6e28015f3b // Even though all codepaths leading here are in response to a renderer // trying to open a new window, if the new window ends up in a different // browsing instance, then the RenderViewHost, RenderWidgetHost, -@@ -5373,6 +5377,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5377,6 +5381,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( // Sets the newly created WebContents WindowOpenDisposition. new_contents_impl->original_window_open_disposition_ = params.disposition; @@ -48,7 +48,7 @@ index 29597a3a6f01fcff65de5624e583b03a1e34dd6f..6c067803c35a4e98ec99df6e28015f3b // If the new frame has a name, make sure any SiteInstances that can find // this named frame have proxies for it. Must be called after // SetSessionStorageNamespace, since this calls CreateRenderView, which uses -@@ -5414,12 +5424,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5418,12 +5428,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -77,10 +77,10 @@ index 15a83f61ed4e31ba34cbc19995cd9d68b1599f1d..9cf9fefad46a6c2ead4085adc76e0c07 // 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 9d950e48dca63c6ec6899674cdfa98b1b4847542..fd15151cbe0c67164f07a730668f9b5ad0af2f40 100644 +index 68bafbcd65301fd26f18e433057d69ae9d63a078..8a199da3b79672d900efa3ae2a721ef74481d7fc 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -885,6 +885,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -875,6 +875,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -90,10 +90,10 @@ index 9d950e48dca63c6ec6899674cdfa98b1b4847542..fd15151cbe0c67164f07a730668f9b5a 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 6dbfa4f14a5a610b49e58193f50d7337c998e7e1..f93858d6cb4cb89075e9ed7ee50f4e86df37c279 100644 +index 7658c8045ad4687ffc2923061ee8310bf76c1190..22b1bcac984a5f0e7140693a9c8ff586f12afe24 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -201,6 +201,7 @@ class NetworkService; +@@ -196,6 +196,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -101,7 +101,7 @@ index 6dbfa4f14a5a610b49e58193f50d7337c998e7e1..f93858d6cb4cb89075e9ed7ee50f4e86 } // namespace network namespace sandbox { -@@ -1458,6 +1459,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1448,6 +1449,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -133,7 +133,7 @@ index 87e310a5473bec20b1326f3202cf2bf603227c04..968cddc769e2bf0bb56359b36bc03cbc WebContents* source, const OpenURLParams& params, diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 16ce42f605513b641cc2ac07e34bfe3a017c5a7a..23b9c84175fd44f0da2ef398c8bf68cf6e3d3ef8 100644 +index 9af778e87c14920ae146f115740c9a5400c7879a..bf5169e7a79e74309ff592252914ec012e4178c5 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -18,6 +18,7 @@ @@ -170,10 +170,10 @@ index 16ce42f605513b641cc2ac07e34bfe3a017c5a7a..23b9c84175fd44f0da2ef398c8bf68cf // 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 12047149fcd73050b5ee6645fa269153daf1836f..a0aa3ec64b54b99508d1ba9cd52e2fe0e53ed56c 100644 +index 2aa5e359e44588948ce59c417686170328628df6..8603f912e83db5211f21701b2f08db07790ea4ba 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -6776,6 +6776,10 @@ WebView* RenderFrameImpl::CreateNewWindow( +@@ -6799,6 +6799,10 @@ WebView* RenderFrameImpl::CreateNewWindow( request.HasUserGesture(), GetWebFrame()->IsAdFrame(), GetWebFrame()->IsAdScriptInStack()); @@ -232,10 +232,10 @@ index 82e9d3dfb5f7da76d89fe15ae61d379fa46e177d..fd035512099a54dff6cc951a2226c23a } // namespace blink diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc -index 68ab3d483fe60671de50ec8952a0f71f103e4ad3..7ea5e45c08d7af439cf3eec041391ed7902ec865 100644 +index 0dcd971d7176e45ae24112f015e69868fc2cd247..2f757adca556d6a038cba0c1f13265eaf1a41ec4 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2333,6 +2333,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2363,6 +2363,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, entered_window); diff --git a/patches/chromium/chore_add_electron_deps_to_gitignores.patch b/patches/chromium/chore_add_electron_deps_to_gitignores.patch index 95dcb3362ded..0989313d3805 100644 --- a/patches/chromium/chore_add_electron_deps_to_gitignores.patch +++ b/patches/chromium/chore_add_electron_deps_to_gitignores.patch @@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores Makes things like "git status" quicker when developing electron locally diff --git a/.gitignore b/.gitignore -index 5eb6e4d1815a7a56c7fff1d6f095e6c7e8127b84..808d897ba80abb9cced32a02cb7026305afe0dd2 100644 +index 22985d0edf211adc576c14ddb0fb21192a636d99..210132f7864c04ac7ffab70875b1c8905bd00e62 100644 --- a/.gitignore +++ b/.gitignore -@@ -226,6 +226,7 @@ vs-chromium-project.txt +@@ -228,6 +228,7 @@ vs-chromium-project.txt /data /delegate_execute /device/serial/device_serial_mojo.xml @@ -18,7 +18,7 @@ index 5eb6e4d1815a7a56c7fff1d6f095e6c7e8127b84..808d897ba80abb9cced32a02cb702630 /google_apis/gcm/gcm.xml /googleurl diff --git a/third_party/.gitignore b/third_party/.gitignore -index 21adf9c5bd1887e765659a81192338de49028c71..1e64aca78c8609dd9de22d023622f14f58489364 100644 +index 6be9e9e6feeedd0d1f566758e8da75870bc1d9c7..a0bacf9e5c4809d76093c449065d7f4f5bb47b02 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore @@ -45,7 +45,9 @@ @@ -31,7 +31,7 @@ index 21adf9c5bd1887e765659a81192338de49028c71..1e64aca78c8609dd9de22d023622f14f /espresso/lib/ /eyesfree/src /fast_float/src -@@ -93,6 +95,7 @@ +@@ -94,6 +96,7 @@ /mocha /mockito/src /nacl_sdk_binaries/ @@ -39,7 +39,7 @@ index 21adf9c5bd1887e765659a81192338de49028c71..1e64aca78c8609dd9de22d023622f14f /ninja /node/*.tar.gz /node/linux/ -@@ -138,7 +141,7 @@ +@@ -139,7 +142,7 @@ /spirv-cross/src /spirv-headers/src /spirv-tools/src diff --git a/patches/chromium/chore_add_electron_objects_to_wrappablepointertag.patch b/patches/chromium/chore_add_electron_objects_to_wrappablepointertag.patch index 4f63db071966..bea10d390c00 100644 --- a/patches/chromium/chore_add_electron_objects_to_wrappablepointertag.patch +++ b/patches/chromium/chore_add_electron_objects_to_wrappablepointertag.patch @@ -8,13 +8,13 @@ electron objects that extend gin::Wrappable and gets allocated on the cpp heap diff --git a/gin/public/wrappable_pointer_tags.h b/gin/public/wrappable_pointer_tags.h -index 80ec409efe1635390887d1324be661643818abff..112a23f81680f5fcc2b016d8f5362e3a03507c8a 100644 +index a507d1d837ab3ec2b2d3ae7978d9d410ab2ec2d1..701b2de3c1a64dea94b752045c145aeda6dde3d7 100644 --- a/gin/public/wrappable_pointer_tags.h +++ b/gin/public/wrappable_pointer_tags.h -@@ -66,7 +66,10 @@ enum WrappablePointerTag : uint16_t { - kTextInputControllerBindings, // content::TextInputControllerBindings - kWebAXObjectProxy, // content::WebAXObjectProxy - kWrappedExceptionHandler, // extensions::WrappedExceptionHandler +@@ -72,7 +72,10 @@ enum WrappablePointerTag : uint16_t { + kTextInputControllerBindings, // content::TextInputControllerBindings + kWebAXObjectProxy, // content::WebAXObjectProxy + kWrappedExceptionHandler, // extensions::WrappedExceptionHandler - kLastPointerTag = kWrappedExceptionHandler, + kElectronApp, // electron::api::App + kElectronSession, // electron::api::Session diff --git a/patches/chromium/chore_disable_protocol_handler_dcheck.patch b/patches/chromium/chore_disable_protocol_handler_dcheck.patch new file mode 100644 index 000000000000..98a7fa401947 --- /dev/null +++ b/patches/chromium/chore_disable_protocol_handler_dcheck.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Maddock +Date: Thu, 9 Oct 2025 22:07:38 -0400 +Subject: chore: disable protocol handler dcheck + +https://chromium-review.googlesource.com/c/chromium/src/+/6727594 + +The above CL introduces a new extensions API to register custom protocol +handlers. A DCHECK causes Electron to crash until we provide our own +registry. This patch disables the check until we support this. + +diff --git a/extensions/browser/api/protocol_handlers/protocol_handlers_manager.cc b/extensions/browser/api/protocol_handlers/protocol_handlers_manager.cc +index 902cf488c7d84923365c4197a70b06e61e3af038..dce80684853f89a68a2d21997102f48feb3df8f8 100644 +--- a/extensions/browser/api/protocol_handlers/protocol_handlers_manager.cc ++++ b/extensions/browser/api/protocol_handlers/protocol_handlers_manager.cc +@@ -129,7 +129,12 @@ void ProtocolHandlersManager::ProtocolHandlersSanityCheck() { + auto* ph_registry = + ExtensionsBrowserClient::Get()->GetProtocolHandlerRegistry( + browser_context_); +- DCHECK(ph_registry); ++ ++ // TODO(samuelmaddock): Add support for extensions protocol handler. For now, ++ // let's ignore this. ++ if (!ph_registry) ++ return; ++ + for (const auto& handler : ph_registry->GetExtensionProtocolHandlers()) { + DCHECK(handler.extension_id()); + if (!enabled_ids.contains(*handler.extension_id())) { diff --git a/patches/chromium/chore_expose_isolate_parameter_in_script_lifecycle_observers.patch b/patches/chromium/chore_expose_isolate_parameter_in_script_lifecycle_observers.patch index 542b72f1693f..a8b9b95ef38a 100644 --- a/patches/chromium/chore_expose_isolate_parameter_in_script_lifecycle_observers.patch +++ b/patches/chromium/chore_expose_isolate_parameter_in_script_lifecycle_observers.patch @@ -20,7 +20,7 @@ index 79d59c3f4d3d2d5ff39bd65ded489183247656a8..20b49742578ccf363738ee032228f30a int64_t service_worker_version_id, const GURL& service_worker_scope, diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h -index 18714ce8fc27c8d56c5deac27ba335078c452d0a..263405c605a0477b7a39bc274d7ee03be0b9cac5 100644 +index e9e88619c349d018abbf183b16339339c7fb29b6..e41d285960cb624127509349197f3bbdf8c92878 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h @@ -141,7 +141,8 @@ class CONTENT_EXPORT RenderFrameObserver { @@ -34,10 +34,10 @@ index 18714ce8fc27c8d56c5deac27ba335078c452d0a..263405c605a0477b7a39bc274d7ee03b virtual void DidClearWindowObject() {} virtual void DidChangeScrollOffset() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index f337d61906651359eeb5228c112ad948f4f7a752..82cbd10f0817a85d1275519a3f93c687c0314aaa 100644 +index 4816cb344ee9474a663863a5c2668a112c299919..1cb892f37b0e3a626c84723120a408fe3ec5f4dd 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4684,10 +4684,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures( +@@ -4706,10 +4706,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures( observer.DidInstallConditionalFeatures(context, world_id); } @@ -52,7 +52,7 @@ index f337d61906651359eeb5228c112ad948f4f7a752..82cbd10f0817a85d1275519a3f93c687 void RenderFrameImpl::DidChangeScrollOffset() { diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index f0f4335aa815ea50dbf9b720b41e4eb31f27fb90..319f222565e4ef25206cc44d33ec5e291b8ea089 100644 +index 155d2c3d9ce02fa02a655abf8bf7dbb1f83553f3..e8b599dbc09b6c1913e361363856b3e0d7955945 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -604,7 +604,8 @@ class CONTENT_EXPORT RenderFrameImpl @@ -103,7 +103,7 @@ index 1f5e24bc38d6ced52e4773236522e9520efc6f6d..a22ca5968fce5e6a0c436ec9b40f0e2f void WillInitializeWorkerContext() override; void WillDestroyWorkerContext(v8::Local context) override; diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc -index 22fdb490c7803f3bf864d9e0e6dc618e4d83480b..3f3367b5039e28b07acd1b326724958d764171c2 100644 +index 1f656b2b9137c9337c92a53a124ac412b5dedd67..7d919740b36175891e540af2e44b86e3189dbef7 100644 --- a/extensions/renderer/dispatcher.cc +++ b/extensions/renderer/dispatcher.cc @@ -615,6 +615,7 @@ void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( diff --git a/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch b/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch index 85ceeb934401..8029c1c7606c 100644 --- a/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch +++ b/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch @@ -49,7 +49,7 @@ index 7f70b4f6062e369e2198fc12ff507786283a13c7..22cae8f202357d848bd57aff1ee22abf // These existing cases are "grandfathered in", but there shouldn't be more. // See comments atop class. diff --git a/ui/views/widget/widget_delegate.h b/ui/views/widget/widget_delegate.h -index ff9c5abfdb02d9798b1491e2bbc296f2c7c74398..47d8a897d58b0d3829734105e81b887684dd009b 100644 +index 1f9c24adbdbe5d2bbd72099d234569c9fdbf863d..b437dd07f15f99cfaa35874f69fd4f19a1b343ba 100644 --- a/ui/views/widget/widget_delegate.h +++ b/ui/views/widget/widget_delegate.h @@ -168,6 +168,12 @@ namespace crostini { @@ -81,7 +81,7 @@ index ff9c5abfdb02d9798b1491e2bbc296f2c7c74398..47d8a897d58b0d3829734105e81b8876 // DO NOT ADD TO THIS LIST! // These existing cases are "grandfathered in", but there shouldn't be more. // See comments atop `RegisterDeleteDelegateCallback()`. -@@ -921,6 +929,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View { +@@ -920,6 +928,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View { View* GetContentsView() override; private: diff --git a/patches/chromium/chore_modify_chromium_handling_of_mouse_events.patch b/patches/chromium/chore_modify_chromium_handling_of_mouse_events.patch index b5342d88212d..124a50731be2 100644 --- a/patches/chromium/chore_modify_chromium_handling_of_mouse_events.patch +++ b/patches/chromium/chore_modify_chromium_handling_of_mouse_events.patch @@ -34,10 +34,10 @@ index 2dc44d4787d5198cff7be2cf98ad5acf2d3a9a0b..27a0335aac2bd4239616cf71f5d015c9 class ScrollEvent; diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index c60e51f4e1a789caf5ad9c54e496f3e72a327b51..f4fa30c1621e2eb78913ea97a993eb0a3528f36c 100644 +index d2651f4fcbb7991e9ec8f164e5bee51dab405c5a..d58b59288d881a2d74ea357f1e9e27870d24ac72 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -1363,6 +1363,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() { +@@ -1378,6 +1378,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() { return background_paint_brush_; } @@ -49,10 +49,10 @@ index c60e51f4e1a789caf5ad9c54e496f3e72a327b51..f4fa30c1621e2eb78913ea97a993eb0a DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() { return new DesktopNativeCursorManagerWin(); diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -index baee602a2ce7207ba937c4e46ad8b896bec7ca92..cef7afbf408e38798c398c23dc3e964bd1d95d17 100644 +index b65ced55f997d5064b9d9338190567f8c264fce8..e8acd2828ed05deefa335ce2bb461f0c3be8d7b7 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -@@ -272,6 +272,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin +@@ -273,6 +273,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin void HandleWindowScaleFactorChanged(float window_scale_factor) override; void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) override; HBRUSH GetBackgroundPaintBrush() override; @@ -61,10 +61,10 @@ index baee602a2ce7207ba937c4e46ad8b896bec7ca92..cef7afbf408e38798c398c23dc3e964b 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 8c70c5ecef8c352e7cd5b9a986bd45d670760069..b06c3ac425bb1f20b890447ed3315127195ed253 100644 +index 5376a8278a4cc784ad69cda6594c5055847c1f22..1005d553d39909bdf7c2c7b1b714c58861ba747d 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3244,15 +3244,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3240,15 +3240,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, } // We must let Windows handle the caption buttons if it's drawing them, or // they won't work. @@ -86,7 +86,7 @@ index 8c70c5ecef8c352e7cd5b9a986bd45d670760069..b06c3ac425bb1f20b890447ed3315127 return 0; } } -@@ -3275,6 +3279,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3271,6 +3275,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, // handle alt-space, or in the frame itself. is_right_mouse_pressed_on_caption_ = false; ReleaseCapture(); @@ -94,7 +94,7 @@ index 8c70c5ecef8c352e7cd5b9a986bd45d670760069..b06c3ac425bb1f20b890447ed3315127 // |point| is in window coordinates, but WM_NCHITTEST and TrackPopupMenu() // expect screen coordinates. POINT screen_point = CR_POINT_INITIALIZER_FROM_LPARAM(l_param); -@@ -3282,7 +3287,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3278,7 +3283,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, w_param = static_cast(SendMessage( hwnd(), WM_NCHITTEST, 0, MAKELPARAM(screen_point.x, screen_point.y))); if (w_param == HTCAPTION || w_param == HTSYSMENU) { @@ -114,10 +114,10 @@ index 8c70c5ecef8c352e7cd5b9a986bd45d670760069..b06c3ac425bb1f20b890447ed3315127 } } else if (message == WM_NCLBUTTONDOWN && diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h -index 5e075296a09099e419fcbf7af2772767592edcd8..459339a4c0f0534f4c0ca8ddcb087fc75465beca 100644 +index 20cfb50af8d5131ca87d1fafce6f2ab43771f67b..eee40a56bebe52187a35daacfc788bf2f1f27e29 100644 --- a/ui/views/win/hwnd_message_handler_delegate.h +++ b/ui/views/win/hwnd_message_handler_delegate.h -@@ -256,6 +256,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate { +@@ -260,6 +260,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate { // if the default should be used. virtual HBRUSH GetBackgroundPaintBrush() = 0; diff --git a/patches/chromium/chore_partial_revert_of.patch b/patches/chromium/chore_partial_revert_of.patch index 1dfc25fe4625..e41c130918f4 100644 --- a/patches/chromium/chore_partial_revert_of.patch +++ b/patches/chromium/chore_partial_revert_of.patch @@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it by changing something in Electron. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index d30a9d94cfc30035b39d510ded65f271c9c51bb1..705e848acfc76a6b2e3a4dffb9e8ae8f86d54cbc 100644 +index cef686451711a79134486e447bcaa195e08f01e0..cd4681a60d49325c57d3fb961d2909650b4a6ace 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5290,7 +5290,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5294,7 +5294,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( : IsGuest(); // While some guest types do not have a guest SiteInstance, the ones that // don't all override WebContents creation above. diff --git a/patches/chromium/chore_patch_out_profile_methods.patch b/patches/chromium/chore_patch_out_profile_methods.patch index 0ac846aec6f2..4d621e36bc7d 100644 --- a/patches/chromium/chore_patch_out_profile_methods.patch +++ b/patches/chromium/chore_patch_out_profile_methods.patch @@ -27,10 +27,10 @@ index c390a83277f564f1a67a7dcffa36b9d77a35bc0b..b13273a4b194ad5e8ca2d1639ebca831 // When the enterprise policy is not set, use finch/feature flag choice. return base::FeatureList::IsEnabled( diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc -index 8f124aa7a67717f3efc52d22dfcef0776ff4cad3..d21e5b49f3a06c5f78e38b45e8be89530fdfd435 100644 +index 8d881dc81d30babc5eed5bf512ad6b23858bab30..5ce3bea323d14d3d4a7b09ea08a477ae23439b53 100644 --- a/chrome/browser/pdf/pdf_extension_util.cc +++ b/chrome/browser/pdf/pdf_extension_util.cc -@@ -245,10 +245,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) { +@@ -248,10 +248,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) { #if BUILDFLAG(ENABLE_PDF_INK2) bool IsPdfAnnotationsEnabledByPolicy(content::BrowserContext* context) { diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index a2e92157eb6f..0b6eb735dcce 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -49,7 +49,7 @@ index a17c406b59530a8f57f6cb48905a697dd208a41f..0e22e90c1d570eb4c86ac1f24c5a6e91 } diff --git a/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc b/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc -index 08c84ca91f7e477e4e8d6370513d90d2fb9801f1..41e04444274f40fdedbf8d97bfd149f2ac682e53 100644 +index e4e42249c476ccae58f0ba42e7dbae299f1e36bd..670c30ed4b7f1a07eb4b8abaa95e5a8a9d94bd8d 100644 --- a/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc +++ b/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc @@ -121,10 +121,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden( @@ -66,7 +66,7 @@ index 08c84ca91f7e477e4e8d6370513d90d2fb9801f1..41e04444274f40fdedbf8d97bfd149f2 /*from_user_gesture=*/true); return true; diff --git a/chrome/browser/ui/ash/web_view/ash_web_view_impl.h b/chrome/browser/ui/ash/web_view/ash_web_view_impl.h -index b6582b4013d9682d32bd524b4053b443a4df00f8..afcbce72e0f247b4d5a637b27c9f25d913cfa14b 100644 +index 39fa45f0a0f9076bd7ac0be6f455dd540a276512..3d0381d463eed73470b28085830f2a23751659a7 100644 --- a/chrome/browser/ui/ash/web_view/ash_web_view_impl.h +++ b/chrome/browser/ui/ash/web_view/ash_web_view_impl.h @@ -60,8 +60,7 @@ class AshWebViewImpl : public ash::AshWebView, @@ -80,20 +80,20 @@ index b6582b4013d9682d32bd524b4053b443a4df00f8..afcbce72e0f247b4d5a637b27c9f25d9 content::WebContents* source, const content::OpenURLParams& params, diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 2b9d9a80fb34b5083b6b038ff12714ad6bd363d7..85197b1500bbcdfbd2286b32a0188c0ca2436e07 100644 +index 56dd79709e5b9cb13b5b48ccd312c3c97710eb6c..d22c3f134573a9ba91cedf24aa4dafc48332914f 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -2386,7 +2386,8 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -2416,7 +2416,8 @@ bool Browser::IsWebContentsCreationOverridden( content::mojom::WindowContainerType window_container_type, const GURL& opener_url, const std::string& frame_name, - const GURL& target_url) { + const GURL& target_url, + const content::mojom::CreateNewWindowParams& params) { - if (actor::IsActorOperatingOnWebContents( - profile(), content::WebContents::FromRenderFrameHost(opener))) { - // If an ExecutionEngine is acting on the opener, prevent it from creating -@@ -2398,7 +2399,7 @@ bool Browser::IsWebContentsCreationOverridden( + if (HasActorTask(profile(), opener)) { + // If an ExecutionEngine is acting on the opener, prevent it from creating a + // new WebContents. We'll instead force the navigation to happen in the same +@@ -2429,7 +2430,7 @@ bool Browser::IsWebContentsCreationOverridden( return (window_container_type == content::mojom::WindowContainerType::BACKGROUND && ShouldCreateBackgroundContents(source_site_instance, opener_url, @@ -103,7 +103,7 @@ index 2b9d9a80fb34b5083b6b038ff12714ad6bd363d7..85197b1500bbcdfbd2286b32a0188c0c WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index b4ed72663324d359109813a5b22b6796568097f5..86153748bc72142aafc0b0b53d922e2d22d4d372 100644 +index 81a247cded1dd321f1003221f02a5c3a0c5a3312..037f5ecdf3a4437c935b90c45ef29536e0bfa2e3 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -954,8 +954,7 @@ class Browser : public TabStripModelObserver, @@ -145,10 +145,10 @@ index 3fc06be01f20e8cd314d95d73a3f58c2f0742fe9..c07910ae59a185442f37ea6e7b96fdf3 // The profile used for the presentation. raw_ptr 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 46382dbe43df6abb75ca7825de116d7ed2d1cea6..b07cfad74ec54ad251012dca57c8f44760ba13c1 100644 +index 96236cd9bdd3f03ebb7e5428e809f8dff2654e60..d17758e94043afcbd3b45884fac127e0ad82daf5 100644 --- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc +++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc -@@ -103,8 +103,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView { +@@ -104,8 +104,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView { content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -159,7 +159,7 @@ index 46382dbe43df6abb75ca7825de116d7ed2d1cea6..b07cfad74ec54ad251012dca57c8f447 } content::WebContents* CreateCustomWebContents( diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc -index 73008c08f2b4fd31636b0df232fc7cd66a69fcaf..a09bfe9af4cb4cd7e1e70b4df4900901a8336894 100644 +index 19d64c899ff85565b7c000d27f60dccd71c43e9d..1f0839b02c39d46fd54e7c780d9c79c3e1fad516 100644 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc @@ -205,14 +205,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden( @@ -180,10 +180,10 @@ index 73008c08f2b4fd31636b0df232fc7cd66a69fcaf..a09bfe9af4cb4cd7e1e70b4df4900901 java_gurl); } diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h -index fb21bd2cd47618838fb449df5fcf63ee28206146..b0faf6ee23fdc3b104e780e445202350fa155946 100644 +index 58bf1a6fc5e42050304d9d16e3414e8f7549c47d..042d2ee5e2c3d77488e7cffb84db548314b64b95 100644 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.h +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h -@@ -84,8 +84,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate { +@@ -78,8 +78,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate { content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -222,10 +222,10 @@ index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c5 content::WebContents* AddNewContents( content::WebContents* source, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index d7cf36715b036c29d881c84a07c0d3b7f73d609f..11c0124b6f3f1599b5a56ba7817e946a871316cc 100644 +index 9d45b18fca8aeac046f01bcc6076ba9e9e550241..b9a6e3c8002a0a85e4d6a4ad1076a497d9ead0cf 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5253,8 +5253,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5257,8 +5257,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( opener, source_site_instance, params.window_container_type, @@ -250,7 +250,7 @@ index 968cddc769e2bf0bb56359b36bc03cbce6539da1..08c983ac6a8e5733431ba00e1288f6d6 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 23b9c84175fd44f0da2ef398c8bf68cf6e3d3ef8..2e8e60c8ebe837fc68318bd5c13dbd0c873c4292 100644 +index bf5169e7a79e74309ff592252914ec012e4178c5..466f78504376c1fb8684faa08aacabba1987ec7a 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -368,8 +368,7 @@ class CONTENT_EXPORT WebContentsDelegate { @@ -398,10 +398,10 @@ index 64ecdeb50b861825c9b55a930ff18c36818cad0b..e037d5607f8e1f3acb4ed018080de1b3 ->options() ->block_new_web_contents(); diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc -index 0e0f67908ca8c97bd0dfe4c4a8e008c74010c623..27ecb428739e2548a42f1485f8b7279a84f7190c 100644 +index f56882565de72fa9ab660b4a8d86f08c7392becd..439586a03288822bab8f5f21d0c38b678ed52fb6 100644 --- a/ui/views/controls/webview/web_dialog_view.cc +++ b/ui/views/controls/webview/web_dialog_view.cc -@@ -490,8 +490,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( +@@ -489,8 +489,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -412,10 +412,10 @@ index 0e0f67908ca8c97bd0dfe4c4a8e008c74010c623..27ecb428739e2548a42f1485f8b7279a return delegate_->HandleShouldOverrideWebContentsCreation(); } diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h -index 0fa7e807d22f6f04b84f2d949fbdf892b94996bf..b0490ae36c9999a766bbf346e35807740f4f9af6 100644 +index 720611a58300a0252d5dd66e1e7c98282dc82646..eb0abf978651266fe7e4d6a8e9af30024fceb7d1 100644 --- a/ui/views/controls/webview/web_dialog_view.h +++ b/ui/views/controls/webview/web_dialog_view.h -@@ -168,8 +168,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView, +@@ -167,8 +167,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, diff --git a/patches/chromium/command-ismediakey.patch b/patches/chromium/command-ismediakey.patch index d4a2145be0e6..cbf51b64bf9d 100644 --- a/patches/chromium/command-ismediakey.patch +++ b/patches/chromium/command-ismediakey.patch @@ -39,10 +39,10 @@ index e87c180342b967756efeb701c73207fcee8754f1..42e37564e585987d367921568f0f1d2b NOTREACHED(); } diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc -index ac62aeecad617ce559d3248a61f3e19220d2e6bc..9e6b5b1c84ee1289fd3978fc7430f86b03165521 100644 +index ce768e551dd96678c04035503a481d375f5887bd..0cec5e73e4ae4441262461ba3c8446cdd8dc04a0 100644 --- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc +++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc -@@ -145,7 +145,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator( +@@ -153,7 +153,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator( const bool registered = platform_global_shortcut_listener_->RegisterAccelerator( accelerator.key_code(), accelerator.IsAltDown(), @@ -52,7 +52,7 @@ index ac62aeecad617ce559d3248a61f3e19220d2e6bc..9e6b5b1c84ee1289fd3978fc7430f86b if (registered) { registered_hot_keys_.insert(accelerator); } -@@ -160,14 +161,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator( +@@ -168,14 +169,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator( platform_global_shortcut_listener_->UnregisterAccelerator( accelerator.key_code(), accelerator.IsAltDown(), accelerator.IsCtrlDown(), @@ -70,7 +70,7 @@ index ac62aeecad617ce559d3248a61f3e19220d2e6bc..9e6b5b1c84ee1289fd3978fc7430f86b int modifiers = 0; if (is_alt_down) { modifiers |= ui::EF_ALT_DOWN; -@@ -178,6 +180,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code, +@@ -186,6 +188,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code, if (is_shift_down) { modifiers |= ui::EF_SHIFT_DOWN; } diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index 78b4b39481f6..127611ad91a4 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -63,10 +63,10 @@ index 7c890b331be4aaaf20c7efe8a4bcc2f6e9012b7a..c573524d05c07ec67d35046bc8548cc1 // Used by WebView to sample crashes without generating the unwanted dumps. If // the returned value is less than 100, crash dumping will be sampled to that diff --git a/components/crash/core/app/crashpad_linux.cc b/components/crash/core/app/crashpad_linux.cc -index 5d9b3bd5386ecbdb74cc470dbe65308c3afa0a61..dc29a4bedc0533e27affb26367cfcc2c3f9544f3 100644 +index d4d3555891b19d61676465c856055fb04e0168bc..3228888f5449df723f4385a0f2c9b456caa472f0 100644 --- a/components/crash/core/app/crashpad_linux.cc +++ b/components/crash/core/app/crashpad_linux.cc -@@ -218,6 +218,7 @@ bool PlatformCrashpadInitialization( +@@ -219,6 +219,7 @@ bool PlatformCrashpadInitialization( // where crash_reporter provides it's own values for lsb-release. annotations["lsb-release"] = base::GetLinuxDistro(); #endif @@ -74,7 +74,7 @@ index 5d9b3bd5386ecbdb74cc470dbe65308c3afa0a61..dc29a4bedc0533e27affb26367cfcc2c std::vector arguments; if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) { -@@ -239,6 +240,13 @@ bool PlatformCrashpadInitialization( +@@ -240,6 +241,13 @@ bool PlatformCrashpadInitialization( } #endif @@ -86,10 +86,10 @@ index 5d9b3bd5386ecbdb74cc470dbe65308c3afa0a61..dc29a4bedc0533e27affb26367cfcc2c + } + CHECK(client.StartHandler(handler_path, *database_path, metrics_path, url, - annotations, arguments, false, false)); - } else { + annotations, arguments, false, false, + attachments)); diff --git a/components/crash/core/app/crashpad_mac.mm b/components/crash/core/app/crashpad_mac.mm -index 42fe73aefe44f218d6a5e8cb1550ff48859c4b70..a1235f0c7ad44ae9c9fdc805af5b9dc5669f5aad 100644 +index 3b131e1fc804a55c80b3b2704686270211fcf9fb..f14ab66f240a236bd90ff4240089a0036ce7d460 100644 --- a/components/crash/core/app/crashpad_mac.mm +++ b/components/crash/core/app/crashpad_mac.mm @@ -86,6 +86,8 @@ @@ -101,7 +101,7 @@ index 42fe73aefe44f218d6a5e8cb1550ff48859c4b70..a1235f0c7ad44ae9c9fdc805af5b9dc5 return annotations; } -@@ -156,6 +158,13 @@ bool PlatformCrashpadInitialization( +@@ -159,6 +161,13 @@ bool PlatformCrashpadInitialization( std::vector arguments; @@ -116,10 +116,10 @@ index 42fe73aefe44f218d6a5e8cb1550ff48859c4b70..a1235f0c7ad44ae9c9fdc805af5b9dc5 arguments.push_back("--monitor-self"); } diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc -index 5b811cbbc51544cbff7c2e99c3a7ced824990002..f2376d74fbd2c8196184035fc0fb24a0a8ebfe0e 100644 +index a7af39181e259b4c793fa9a39cb95e4f86ac47d1..6101018813315074a1e06bea318ecf3f91188415 100644 --- a/components/crash/core/app/crashpad_win.cc +++ b/components/crash/core/app/crashpad_win.cc -@@ -93,6 +93,7 @@ bool PlatformCrashpadInitialization( +@@ -94,6 +94,7 @@ bool PlatformCrashpadInitialization( std::map process_annotations; GetPlatformCrashpadAnnotations(&process_annotations); @@ -127,7 +127,7 @@ index 5b811cbbc51544cbff7c2e99c3a7ced824990002..f2376d74fbd2c8196184035fc0fb24a0 std::string url = crash_reporter_client->GetUploadUrl(); -@@ -133,6 +134,13 @@ bool PlatformCrashpadInitialization( +@@ -134,6 +135,13 @@ bool PlatformCrashpadInitialization( std::vector arguments(start_arguments); diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 97a8dbdc8a47..cfa9f056410f 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -82,7 +82,7 @@ index 786c526588d81b8b5b1b5dd3760719a53e005995..f66b7d0b4dfcbb8ed3dde5a9ff463ae2 const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index 1f5672f1aae610f2511a5a40885750f987871c8c..199a69a9c45e066a50f48298dae2dbcd06560d5b 100644 +index 3be638f1032815d39634b5725031d7f3124e1ad2..fce3e30bc736ac72a42d24956d4abf9f49c8fc41 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc @@ -216,9 +216,13 @@ content::DesktopMediaID::Id GetUpdatedWindowId( diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index b0cdd8d495be..c32fc9eda8f6 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -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 3798a24ce4aedb6aa2954d8f99b603bf08f1179d..3f466acfb286b44a8d1ecc7ffd4faf4635a66643 100644 +index 6f1214fc18a2089a6f711bd03bd083fd318e2792..429e567e6f3cacac081cd6fb9b35eeafe965376a 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -558,7 +558,11 @@ diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 2305c35b534e..3297895a8eb9 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -34,7 +34,7 @@ index 636f09a8ac86e7c3f7b8dcdc285792f18f5c5989..276852573eade86f1bc9690e3c78a627 // |routing_id| must not be IPC::mojom::kRoutingIdNone. // 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 7b6b19812f5f1989e39d9c33b387159380beb544..e95a313945397c6eff5514932ce15c5d4b6a8e1f 100644 +index b8f74e321a8bd8bd65e89cf9d794651c9f6f8705..e8a0554c4d84a16fc2122cb3e48199b4f43ecf88 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -642,7 +642,7 @@ void RenderWidgetHostViewAura::HideImpl() { diff --git a/patches/chromium/disable_nsautofillheuristiccontroller_on_macos_26.patch b/patches/chromium/disable_nsautofillheuristiccontroller_on_macos_26.patch deleted file mode 100644 index e8f0f5b6153e..000000000000 --- a/patches/chromium/disable_nsautofillheuristiccontroller_on_macos_26.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Perry -Date: Wed, 24 Sep 2025 09:56:23 -0700 -Subject: Disable NSAutoFillHeuristicController on macOS 26 - -The reason for this issue is that NSAutoFillHeuristicController is -enabled by default on macOS 26. In pages with tags, browser -process sends synchronized IPC messages to renderer process. At this -point, if the renderer process also sends synchronized IPC messages to -the browser process, it will cause a deadlock. - -This bug can be reproduced on many websites. From the perspective of -user experience, we should first disable this feature on macOS 26. - -Bug: 446070423, 446481994 -Change-Id: I2d3855648980a22678548e373756fc156e28ecd7 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6965487 -Reviewed-by: Mark Mentovai -Commit-Queue: Mark Mentovai -Cr-Commit-Position: refs/heads/main@{#1520058} - -diff --git a/content/app/mac_init.mm b/content/app/mac_init.mm -index 603c25a1bd4a11b9dbe57ac6add81647302e63be..963f45a8936850b59013390faf7890bc4215f2d9 100644 ---- a/content/app/mac_init.mm -+++ b/content/app/mac_init.mm -@@ -6,6 +6,7 @@ - - #import - -+#include "base/mac/mac_util.h" - #include "content/common/mac/system_policy.h" - - namespace content { -@@ -29,6 +30,19 @@ void InitializeMac() { - @"NSAppSleepDisabled" : @YES, - }]; - -+ if (base::mac::MacOSVersion() >= 26'00'00) { -+ [NSUserDefaults.standardUserDefaults registerDefaults:@{ -+ // Disable NSAutoFillHeuristicController on macOS 26. On macOS 26, the -+ // browser process sends synchronized IPC messages to the renderer process -+ // on pages with tags. At this point, if the renderer process -+ // sends a synchronized IPC message to the browser process, it will cause -+ // a deadlock. -+ // https://crbug.com/446070423 -+ // https://crbug.com/446481994 -+ @"NSAutoFillHeuristicControllerEnabled" : @NO, -+ }]; -+ } -+ - SetSystemPolicyCrashKeys(); - } - diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index 9e002370e785..7acc972e7488 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0 Make SetAspectRatio accept 0 as valid input, which would reset to null. diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index 86592f9197fa84cbce782ed237cdac74f60e77e1..c60e51f4e1a789caf5ad9c54e496f3e72a327b51 100644 +index 35469ecb01a680315b2f92e2599a3b56b5fc7549..d2651f4fcbb7991e9ec8f164e5bee51dab405c5a 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -615,7 +615,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { +@@ -614,7 +614,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { void DesktopWindowTreeHostWin::SetAspectRatio( const gfx::SizeF& aspect_ratio, const gfx::Size& excluded_margin) { @@ -19,10 +19,10 @@ index 86592f9197fa84cbce782ed237cdac74f60e77e1..c60e51f4e1a789caf5ad9c54e496f3e7 excluded_margin); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 0477bf1b33e5cd17e6d16ccd63f4bc53e303042f..f3f42f2c3ae4b185b0647902a2409bc9b25a152f 100644 +index 5246e5bb427f09bccdf53ee4de79bcf7c1c6a702..41b5219bdba3eba8bde935992fe60fc14898f68d 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1049,8 +1049,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen, +@@ -1050,8 +1050,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen, void HWNDMessageHandler::SetAspectRatio(float aspect_ratio, const gfx::Size& excluded_margin) { @@ -35,4 +35,4 @@ index 0477bf1b33e5cd17e6d16ccd63f4bc53e303042f..f3f42f2c3ae4b185b0647902a2409bc9 + } aspect_ratio_ = aspect_ratio; - + excluded_margin_dip_ = excluded_margin; diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index ab63a0a553d8..c12e7fa52b90 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4 } // namespace net diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 95822f635b61da7c63b5a1babf93bb61cb786293..892fa1d8d340906d359685894da6553377cda73b 100644 +index 985de2b44ed5b2d567a080a1834bbfd8aa7a82a0..b2faaaefe1fd5bde36ca33b759367e648245f1ae 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1907,6 +1907,13 @@ void NetworkContext::EnableDurableMessageCollector( +@@ -1910,6 +1910,13 @@ void NetworkContext::EnableDurableMessageCollector( it->second->AddReceiver(std::move(receiver)); } @@ -51,10 +51,10 @@ index 95822f635b61da7c63b5a1babf93bb61cb786293..892fa1d8d340906d359685894da65533 // 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 56f1eec94a33c2c9a6289b12ac20323b4bef13d9..1b99211c9c96efba0713e953e708712d6c3714a6 100644 +index df0e1e7ebf4a127e0cc8d8617f293c94862f9783..a014b219a3793b53dc2670d55d6c3f12f23a8a77 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -335,6 +335,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -336,6 +336,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext const base::UnguessableToken& throttling_profile_id, mojo::PendingReceiver receiver) override; @@ -63,10 +63,10 @@ index 56f1eec94a33c2c9a6289b12ac20323b4bef13d9..1b99211c9c96efba0713e953e708712d 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 840eff6ece73983a3b98673adbbb3cfd825565fe..5159d804c493bf2ae08d2786187c614efc96cf23 100644 +index 71aec1f17c274cdc1151fb81e6ff718abc7f310c..67f177d3d4e5ed852f5dd85ade822d5c62b9a8ea 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1337,6 +1337,9 @@ interface NetworkContext { +@@ -1355,6 +1355,9 @@ interface NetworkContext { mojo_base.mojom.UnguessableToken throttling_profile_id, pending_receiver receiver); @@ -77,13 +77,13 @@ index 840eff6ece73983a3b98673adbbb3cfd825565fe..5159d804c493bf2ae08d2786187c614e SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index 6f0fe6423e8be903d4e38b783d31443c6ce89db5..9a5d7ad5d6e84e8b824c1614ee006c4984817929 100644 +index 6a8d13ed773378b4d5b2c94c78399859dfbeb700..01d07d1d8882a57ecbed85f42f2029db84c25769 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -161,6 +161,7 @@ class TestNetworkContext : public mojom::NetworkContext { - void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {} - void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, - mojom::NetworkConditionsPtr conditions) override {} +@@ -162,6 +162,7 @@ class TestNetworkContext : public mojom::NetworkContext { + void SetNetworkConditions( + const base::UnguessableToken& throttling_profile_id, + std::vector) override {} + void SetUserAgent(const std::string& new_user_agent) override {} void SetAcceptLanguage(const std::string& new_accept_language) override {} void SetEnableReferrers(bool enable_referrers) override {} diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 90b0ae010810..c47229634431 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -15,10 +15,10 @@ Ideally we could add an embedder observer pattern here but that can be done in future work. diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index 68a102327e22302587f7cc402cb26ef2f02b261e..ccdbf101d07b9f8baa043894ea7f48a56e7d3ecb 100644 +index bd09aa1967d04e0be240de38aabdaa9d74f60336..c0eb61791d2c60c6dc54d8b73aed347063e0685f 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -1900,6 +1900,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1903,6 +1903,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); diff --git a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch index 247d46d373d8..62b53c9aef8d 100644 --- a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch +++ b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch @@ -13,11 +13,11 @@ 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.h b/ui/native_theme/native_theme.h -index 8391cd1469516e83b2cc1466e121bfeed5497c8e..6bed02855d0917805a43fab111d41702af94368e 100644 +index d8c168edc6c92c8094bb37e4ac1eb703d9d1dc85..f103f2a095724f552b1917546a771168f64c53df 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -493,6 +493,8 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { - void set_page_colors(PageColors page_colors) { page_colors_ = page_colors; } +@@ -500,6 +500,8 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { + } PreferredColorScheme preferred_color_scheme() const { + if (theme_source() == ThemeSource::kForcedLight) return PreferredColorScheme::kLight; @@ -25,9 +25,9 @@ index 8391cd1469516e83b2cc1466e121bfeed5497c8e..6bed02855d0917805a43fab111d41702 return preferred_color_scheme_; } void set_preferred_color_scheme(PreferredColorScheme preferred_color_scheme) { -@@ -536,6 +538,24 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { - // Whether dark mode is forced via command-line flag. - static bool IsForcedDarkMode(); +@@ -531,6 +533,24 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { + caret_blink_interval_ = caret_blink_interval; + } + enum ThemeSource { + kSystem, @@ -48,11 +48,11 @@ index 8391cd1469516e83b2cc1466e121bfeed5497c8e..6bed02855d0917805a43fab111d41702 + } + protected: - explicit NativeTheme( - ui::SystemTheme system_theme = ui::SystemTheme::kDefault); -@@ -590,6 +610,7 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { - std::optional scheme_variant_; - bool should_use_system_accent_color_ = true; + explicit NativeTheme(SystemTheme system_theme = SystemTheme::kDefault); + virtual ~NativeTheme(); +@@ -604,6 +624,7 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { + ColorProviderKey::UserColorSource preferred_color_source_ = + ColorProviderKey::UserColorSource::kAccent; base::TimeDelta caret_blink_interval_; + ThemeSource theme_source_ = ThemeSource::kSystem; diff --git a/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch b/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch index 303ecee624a8..5a2928099b30 100644 --- a/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch +++ b/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch @@ -133,7 +133,7 @@ index a01f0d96ef33ce9460a851b072b7ceed5227dee3..f7e39b28cc0ba2251123925c01083a79 // JavaScript from chrome and chrome-untrusted pages. The resource URLs are diff --git a/content/browser/code_cache/generated_code_cache_browsertest.cc b/content/browser/code_cache/generated_code_cache_browsertest.cc -index 28556e56f2fd591c46ce6f48d39eb907876a499d..f5737ba60fb9e182459066ffa62c7c589f379954 100644 +index 659501d6a0ab4573ede8e91050bef88710e401d7..92cb39b7140fb815b1c56aca3be0db032c5699eb 100644 --- a/content/browser/code_cache/generated_code_cache_browsertest.cc +++ b/content/browser/code_cache/generated_code_cache_browsertest.cc @@ -16,17 +16,22 @@ @@ -159,7 +159,7 @@ index 28556e56f2fd591c46ce6f48d39eb907876a499d..f5737ba60fb9e182459066ffa62c7c58 #include "net/base/features.h" #include "net/dns/mock_host_resolver.h" #include "third_party/blink/public/common/features.h" -@@ -37,6 +42,8 @@ namespace content { +@@ -38,6 +43,8 @@ namespace content { namespace { @@ -168,7 +168,7 @@ index 28556e56f2fd591c46ce6f48d39eb907876a499d..f5737ba60fb9e182459066ffa62c7c58 bool SupportsSharedWorker() { return base::FeatureList::IsEnabled(blink::features::kSharedWorker); } -@@ -1044,4 +1051,82 @@ IN_PROC_BROWSER_TEST_F(LocalCompileHintsBrowserTest, LocalCompileHints) { +@@ -1063,4 +1070,82 @@ IN_PROC_BROWSER_TEST_F(LocalCompileHintsBrowserTest, LocalCompileHints) { } } @@ -252,10 +252,10 @@ index 28556e56f2fd591c46ce6f48d39eb907876a499d..f5737ba60fb9e182459066ffa62c7c58 + } // namespace content diff --git a/content/browser/renderer_host/code_cache_host_impl.cc b/content/browser/renderer_host/code_cache_host_impl.cc -index 7b4408f3480bd062ab9221f524633c177a212790..8d283d84b0817a937845b221bb13c6ed12bfade6 100644 +index 863c06383209bde7945bcce487161a64408bfcb0..5e0a0583c937d3eb4e993f51bdcd4351e1f3dfeb 100644 --- a/content/browser/renderer_host/code_cache_host_impl.cc +++ b/content/browser/renderer_host/code_cache_host_impl.cc -@@ -7,6 +7,7 @@ +@@ -8,6 +8,7 @@ #include #include @@ -263,7 +263,7 @@ index 7b4408f3480bd062ab9221f524633c177a212790..8d283d84b0817a937845b221bb13c6ed #include "base/feature_list.h" #include "base/functional/bind.h" #include "base/functional/callback_helpers.h" -@@ -36,6 +37,7 @@ +@@ -38,6 +39,7 @@ #include "third_party/blink/public/mojom/loader/code_cache.mojom-data-view.h" #include "url/gurl.h" #include "url/origin.h" @@ -271,8 +271,8 @@ index 7b4408f3480bd062ab9221f524633c177a212790..8d283d84b0817a937845b221bb13c6ed using blink::mojom::CacheStorageError; -@@ -55,6 +57,11 @@ GeneratedCodeCache::CodeCacheType MojoCacheTypeToCodeCacheType( - } +@@ -112,6 +114,11 @@ std::optional GetContextKeyForPersistentCacheCollection( + return context_key; } +bool ProcessLockURLIsCodeCacheScheme(const ProcessLock& process_lock) { @@ -283,7 +283,7 @@ index 7b4408f3480bd062ab9221f524633c177a212790..8d283d84b0817a937845b221bb13c6ed bool CheckSecurityForAccessingCodeCacheData( const GURL& resource_url, int render_process_id, -@@ -65,39 +72,56 @@ bool CheckSecurityForAccessingCodeCacheData( +@@ -122,39 +129,56 @@ bool CheckSecurityForAccessingCodeCacheData( // Code caching is only allowed for http(s) and chrome/chrome-untrusted // scripts. Furthermore, there is no way for http(s) pages to load chrome or @@ -361,7 +361,7 @@ index 7b4408f3480bd062ab9221f524633c177a212790..8d283d84b0817a937845b221bb13c6ed } if (operation == CodeCacheHostImpl::Operation::kWrite) { -@@ -530,6 +554,7 @@ std::optional CodeCacheHostImpl::GetSecondaryKeyForCodeCache( +@@ -589,6 +613,7 @@ std::optional CodeCacheHostImpl::GetSecondaryKeyForCodeCache( process_lock.MatchesScheme(url::kHttpsScheme) || process_lock.MatchesScheme(content::kChromeUIScheme) || process_lock.MatchesScheme(content::kChromeUIUntrustedScheme) || diff --git a/patches/chromium/feat_allow_passing_of_objecttemplate_to_objecttemplatebuilder.patch b/patches/chromium/feat_allow_passing_of_objecttemplate_to_objecttemplatebuilder.patch index b3f38261de48..8f27c6081103 100644 --- a/patches/chromium/feat_allow_passing_of_objecttemplate_to_objecttemplatebuilder.patch +++ b/patches/chromium/feat_allow_passing_of_objecttemplate_to_objecttemplatebuilder.patch @@ -10,10 +10,10 @@ Electron needs this constructor, namely for gin_helper::Constructible objects. diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc -index a694f7dc4da4f1bba579ab8c032eea21d8459995..8aaaba327166b1d3b884fe390a389c0c50890af9 100644 +index 90966dc917099ae749118f3e740b76ff477cf92d..b84f5fd336bc4b61b2cd0b2fc92382b00e928701 100644 --- a/gin/object_template_builder.cc +++ b/gin/object_template_builder.cc -@@ -146,6 +146,13 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate, +@@ -144,6 +144,13 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate, template_->SetInternalFieldCount(kNumberOfInternalFields); } @@ -28,10 +28,10 @@ index a694f7dc4da4f1bba579ab8c032eea21d8459995..8aaaba327166b1d3b884fe390a389c0c const ObjectTemplateBuilder& other) = default; diff --git a/gin/object_template_builder.h b/gin/object_template_builder.h -index 9d8f6e5de793ea419875d99a0b46898f2e40ead5..c803363b8050f4084c9250fce9b5b8b171082703 100644 +index cf4f1ae6598fdede655d33baccda254965566ea5..a4c16dc0ec3ff16413fc2a04225a2401989a084b 100644 --- a/gin/object_template_builder.h +++ b/gin/object_template_builder.h -@@ -46,6 +46,9 @@ class GIN_EXPORT ObjectTemplateBuilder { +@@ -48,6 +48,9 @@ class GIN_EXPORT ObjectTemplateBuilder { public: explicit ObjectTemplateBuilder(v8::Isolate* isolate); ObjectTemplateBuilder(v8::Isolate* isolate, const char* type_name); diff --git a/patches/chromium/feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch b/patches/chromium/feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch index 22584e3475f9..4920a766f9df 100644 --- a/patches/chromium/feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch +++ b/patches/chromium/feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch @@ -311,10 +311,10 @@ index c2d8bbafa39c05f25641f2fd3491ef7f84f4f6a1..5506583824e10d664f32c71d63fda1aa // 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 77f6994c9963b57f7e9334bce6fefabdc6ee63e7..a02ca47ea5dea272640737cfffedc8529087c12e 100644 +index c07b61c6736798b3b8efd79a27fb6546dde24cc2..889c0876394bc973f86cc6f5f2d3ce3902103b41 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 -@@ -321,8 +321,16 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync( +@@ -310,8 +310,16 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync( break; } @@ -332,7 +332,7 @@ index 77f6994c9963b57f7e9334bce6fefabdc6ee63e7..a02ca47ea5dea272640737cfffedc852 // For the other capturers, when a bug reports the type of capture it's // easy enough to determine which capturer was used, but it's a little // fuzzier with window capture. -@@ -338,13 +346,15 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync( +@@ -327,13 +335,15 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync( } #endif // defined(USE_AURA) || BUILDFLAG(IS_MAC) @@ -363,10 +363,10 @@ index b90a88a115247bd0c62abb18771220e37a441d2f..f908a95727633e903bd56d2bc8608bba #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 949af1a45ab1b0180a767d89f8837df531041dfe..81d0550107f1d5f38b5ef7d658099ea2ca35d3a6 100644 +index 092bd4524b81734d1b428ab0b201887d411f8277..d0300a4b1a2265d1db977b9bf0ffdd6d0a9d9d37 100644 --- a/media/capture/video_capture_types.h +++ b/media/capture/video_capture_types.h -@@ -364,6 +364,8 @@ struct CAPTURE_EXPORT VideoCaptureParams { +@@ -365,6 +365,8 @@ struct CAPTURE_EXPORT VideoCaptureParams { // of the capture is dynamically changed, as for example when using // share-this-tab-instead. uint32_t capture_version_source = 0; diff --git a/patches/chromium/feat_configure_launch_options_for_service_process.patch b/patches/chromium/feat_configure_launch_options_for_service_process.patch index c560798b2a4c..5fb3cd0ad9ee 100644 --- a/patches/chromium/feat_configure_launch_options_for_service_process.patch +++ b/patches/chromium/feat_configure_launch_options_for_service_process.patch @@ -19,7 +19,7 @@ to STDOUT_FILENO/STD_OUTPUT_HANDLE and STDERR_FILENO/STD_ERROR_HANDLE allowing t parent process to read from the pipe. diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h -index 4490b007072cbdb5d5d42bc74ad1eb3c183e86ed..0f365510982d897bc089ab3c97643109a4fcc8af 100644 +index 969cd3df9ae2b0db46d432c5489709f981c77f4e..3c16b8dbd68b6be49fc9df52cfab24ef76859282 100644 --- a/content/browser/child_process_launcher.h +++ b/content/browser/child_process_launcher.h @@ -33,6 +33,7 @@ @@ -707,10 +707,10 @@ index c5fee4ad8b246bc1113a383794c6101bade24df3..61f0a0f62795b30105c42da363205284 #if BUILDFLAG(IS_MAC) // Whether or not to disclaim TCC responsibility for the process, defaults to diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc -index 23b090edef2457e0dbe96a58b392d03bde05f5c1..545805a97fa4c7fa9318f243588da6a59a58a837 100644 +index 6cc21567af6e65261d5cbbba067d23bd5514692c..a8d3199eae58a4427f1de4a32504187e36a507a6 100644 --- a/sandbox/policy/win/sandbox_win.cc +++ b/sandbox/policy/win/sandbox_win.cc -@@ -592,11 +592,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() { +@@ -605,11 +605,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() { // command line flag. ResultCode LaunchWithoutSandbox( const base::CommandLine& cmd_line, @@ -723,7 +723,7 @@ index 23b090edef2457e0dbe96a58b392d03bde05f5c1..545805a97fa4c7fa9318f243588da6a5 options.feedback_cursor_off = true; // Network process runs in a job even when unsandboxed. This is to ensure it // does not outlive the browser, which could happen if there is a lot of I/O -@@ -899,7 +897,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) { +@@ -914,7 +912,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) { // static ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( const base::CommandLine& cmd_line, @@ -732,7 +732,7 @@ index 23b090edef2457e0dbe96a58b392d03bde05f5c1..545805a97fa4c7fa9318f243588da6a5 SandboxDelegate* delegate, TargetPolicy* policy) { const base::CommandLine& launcher_process_command_line = -@@ -913,7 +911,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -928,7 +926,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( } // Add any handles to be inherited to the policy. @@ -741,7 +741,7 @@ index 23b090edef2457e0dbe96a58b392d03bde05f5c1..545805a97fa4c7fa9318f243588da6a5 policy->AddHandleToShare(handle); if (!policy->GetConfig()->IsConfigured()) { -@@ -928,6 +926,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -943,6 +941,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( // have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS. policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE)); policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE)); @@ -755,7 +755,7 @@ index 23b090edef2457e0dbe96a58b392d03bde05f5c1..545805a97fa4c7fa9318f243588da6a5 #endif if (!delegate->PreSpawnTarget(policy)) -@@ -939,7 +944,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -954,7 +959,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( // static ResultCode SandboxWin::StartSandboxedProcess( const base::CommandLine& cmd_line, @@ -764,7 +764,7 @@ index 23b090edef2457e0dbe96a58b392d03bde05f5c1..545805a97fa4c7fa9318f243588da6a5 SandboxDelegate* delegate, StartSandboxedProcessCallback result_callback) { SandboxLaunchTimer timer; -@@ -949,7 +954,7 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -964,7 +969,7 @@ ResultCode SandboxWin::StartSandboxedProcess( *base::CommandLine::ForCurrentProcess())) { base::Process process; ResultCode result = @@ -773,7 +773,7 @@ index 23b090edef2457e0dbe96a58b392d03bde05f5c1..545805a97fa4c7fa9318f243588da6a5 DWORD last_error = GetLastError(); std::move(result_callback).Run(std::move(process), last_error, result); return SBOX_ALL_OK; -@@ -959,7 +964,7 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -974,7 +979,7 @@ ResultCode SandboxWin::StartSandboxedProcess( timer.OnPolicyCreated(); ResultCode result = GeneratePolicyForSandboxedProcess( diff --git a/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch b/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch index 3823a5d079d6..7a58baf7c43b 100644 --- a/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch +++ b/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch @@ -20,7 +20,7 @@ making three primary changes to Blink: * Controls whether the CSS rule is available. diff --git a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom -index 55b9d698a53e8cc7bc4422b0dbe8a5df71e23e11..b0ce80b13c8f214db027765048170bd40851f68a 100644 +index 880e5f9800b7b32ced2e1ae8e60f1115ccd1b038..aea957c186de970c71c97da1efd5228967566741 100644 --- a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom +++ b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom @@ -48,6 +48,7 @@ enum CSSSampleId { @@ -45,10 +45,10 @@ index e189d584f05f2ce6354c03a9b19f56985df8a15e..41b430e8f2416be098494f5c49fb97ca 'internal-forced-visited-'): internal_visited_order = 0 diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 -index 2df4e7b0d00dacfe0b31640da59f4d4a4aa951bd..446853fbb199c1dbe321f0a3652c57e609aed11f 100644 +index e1e6a90d3035e1aaedafbf129d2154e84777bd3f..d9fc85153bd0bd980ae2383acda99d79f00b3e2a 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5 -@@ -9010,6 +9010,26 @@ +@@ -9032,6 +9032,26 @@ property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"], }, @@ -76,7 +76,7 @@ index 2df4e7b0d00dacfe0b31640da59f4d4a4aa951bd..446853fbb199c1dbe321f0a3652c57e6 { name: "-internal-visited-color", diff --git a/third_party/blink/renderer/core/css/css_property_equality.cc b/third_party/blink/renderer/core/css/css_property_equality.cc -index 4f2eff535fe0a74f612fa67ba0c88442350a0473..b4c8bfe3cf2652b4f9b79ff7b13bf22c1a5880db 100644 +index 362c4d558ad0c1af4f905bee759096c7afdf5e6b..7b764dc1988f8992d2b88e9d4d68d8b13c595f8b 100644 --- a/third_party/blink/renderer/core/css/css_property_equality.cc +++ b/third_party/blink/renderer/core/css/css_property_equality.cc @@ -354,6 +354,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property, @@ -89,10 +89,10 @@ index 4f2eff535fe0a74f612fa67ba0c88442350a0473..b4c8bfe3cf2652b4f9b79ff7b13bf22c return a.EmptyCells() == b.EmptyCells(); case CSSPropertyID::kFill: diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc -index ca097bf7d6334fe281f0af2015701b0af7036194..9c5bca32a5ebbfc666e1f941ac99b25fb59fa0c3 100644 +index 77350eb608ab3af30f9eac3bb0f16ba57b79d049..bea246503fc77eb3c9f2a5dbc67094ccda0f36c0 100644 --- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc +++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc -@@ -12367,5 +12367,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue( +@@ -12447,5 +12447,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue( CSSValueID::kNone>(stream); } @@ -130,10 +130,10 @@ index ca097bf7d6334fe281f0af2015701b0af7036194..9c5bca32a5ebbfc666e1f941ac99b25f } // namespace css_longhand } // namespace blink diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc -index b6968dd7370614c4a32e015da09b22db55b4143b..53ddeac758bfb89b4a77039a5e2d583e5d600f73 100644 +index aaf3b23f63e6bd5d5c8259feeff9f6202ea07f17..64772649927c94949cae132e502ef882c92d8f14 100644 --- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc +++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc -@@ -4049,6 +4049,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback( +@@ -4080,6 +4080,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback( return PositionTryFallback(scoped_name, tactic_list); } @@ -150,13 +150,13 @@ index b6968dd7370614c4a32e015da09b22db55b4143b..53ddeac758bfb89b4a77039a5e2d583e const CSSValue& value) { const auto& list = To(value); diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h -index 1f98f1086257c02f653f7e6acafc32a165668f52..9a1a436607a3d8c91a49e99d3eabef971e2fea9f 100644 +index 4b08af59fc8e4b2721e343d0dbf3270c0df24326..052435ac938069a734f5bbb984006c5d6b9b19b2 100644 --- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h +++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h -@@ -441,6 +441,7 @@ class StyleBuilderConverter { - static PositionTryFallback ConvertSinglePositionTryFallback( +@@ -448,6 +448,7 @@ class StyleBuilderConverter { StyleResolverState&, - const CSSValue&); + const CSSValue&, + bool allow_any_keyword_in_position_area = false); + static Length ConvertCornerSmoothing(StyleResolverState&, const CSSValue&); static FitText ConvertFitText(StyleResolverState&, const CSSValue&); static TextOverflowData ConvertTextOverflow(StyleResolverState&, @@ -201,10 +201,10 @@ index 0802c73aa4aaf4e1fb5efd367758f19c36691f71..5f06c0af277a7c937e694470beac707a return result; } diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn -index 09065ad3e03dddb25863ad7ef2e0e8e51af56a9d..08853e8624545824bade5061f6b8394f6309ecb7 100644 +index 589dd18b99174dcd89977a53eb350432002ba65c..5edfea22ffd82b797662a9f9104ff7db01db38ad 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -1673,6 +1673,8 @@ component("platform") { +@@ -1672,6 +1672,8 @@ component("platform") { "widget/widget_base.h", "widget/widget_base_client.h", "windows_keyboard_codes.h", @@ -312,7 +312,7 @@ index 7e3d46902fbf736b4240eb3fcb89975a7b222197..57fdc89fc265ad70cb0bff8443cc1026 auto DrawAsSinglePath = [&]() { diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -index 9ecc66cab0d9640835b1075ead0f4ae12bb92937..3cbdebcfcb0b6b30a1cd55e45121d77f8c32220f 100644 +index b42afe2dc4ab5fe2b3e379fbd686bfe9dc8425a5..67db21e5041b7e8accce6d3415ec0fe4df8caf78 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 @@ -214,6 +214,10 @@ diff --git a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch index 2bc014ec1e31..706e117f5460 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -62,7 +62,7 @@ index 07fe1ea0e8e5f28428a164eedc28d4e5150ab13b..1a20c4b5765ce504c64c0dabfe3080fb #endif diff --git a/components/viz/host/layered_window_updater_impl.cc b/components/viz/host/layered_window_updater_impl.cc -index 8f726bde2cb5da6acfe630006af0fc3a09811d6c..45d8cae3ba0fca9a1514f83032a10c8820b3126d 100644 +index 36b9e09ca63aeec83c381918be2dbc933611e6ee..e58cb70d07cc61478bbd4e9a0233a11af6148c20 100644 --- a/components/viz/host/layered_window_updater_impl.cc +++ b/components/viz/host/layered_window_updater_impl.cc @@ -46,7 +46,9 @@ void LayeredWindowUpdaterImpl::OnAllocatedSharedMemory( @@ -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 88b4d3e2d965ee6930b4d5dd49c75af079c1bcff..17846f135a333b0f0a2755ad55d2492a4fd33693 100644 +index 89f08e2693d9101e89dd007df80881ff726195ad..1becf5ba595e60d1fb270ca2596b474c24682952 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -176,6 +176,8 @@ viz_component("service") { @@ -509,10 +509,10 @@ index 0000000000000000000000000000000000000000..e1a22ee881c0fd679ac2d2d4d11a3c93 + +#endif // COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_PROXY_H_ diff --git a/components/viz/service/display_embedder/software_output_device_win.cc b/components/viz/service/display_embedder/software_output_device_win.cc -index 9119e302ad073a3b22ba47f800e7214b580e122b..0d5b95a424a62a77785088dbd759af4f977b010e 100644 +index 838031388c4c20bbcf068210559cb2018a661cd6..ec12dcfdc34891ecd107facc93c8f650c46f11d7 100644 --- a/components/viz/service/display_embedder/software_output_device_win.cc +++ b/components/viz/service/display_embedder/software_output_device_win.cc -@@ -157,7 +157,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( +@@ -156,7 +156,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( if (!canvas_) return; @@ -522,10 +522,10 @@ index 9119e302ad073a3b22ba47f800e7214b580e122b..0d5b95a424a62a77785088dbd759af4f 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 346e41638ffefe5e5945aa3cfe0ec38887041a0b..38ed2eb97132201eb0adfd8b855c1611eab777f0 100644 +index 03f18d799eb8887f8435624eb7da4547e85aef08..744700c84b7ef79091a7ad590e086564f2109720 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 -@@ -131,7 +131,8 @@ RootCompositorFrameSinkImpl::Create( +@@ -130,7 +130,8 @@ RootCompositorFrameSinkImpl::Create( params->gpu_compositing, params->widget); auto output_surface = output_surface_provider->CreateOutputSurface( params->widget, params->gpu_compositing, display_client.get(), diff --git a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch index 60ff89c4a1c6..a7c8ccd8e15e 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -112,10 +112,10 @@ index 3a5fbaea905e7c01caee3659ff3be06e8def5615..89da9461e8290b8099456e5222f27877 string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 9c6f41c82539ec428defa5e093b8a2d780f6e0ee..5214e695c71ccdaf995bc21f30bf1a16d4f5082c 100644 +index 7834c23474416f7af4db75d24fc613c3913eee77..3d32e5d540deea75a453f603a2902c44a1b82287 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -403,6 +403,9 @@ URLLoader::URLLoader( +@@ -406,6 +406,9 @@ URLLoader::URLLoader( mojo::SimpleWatcher::ArmingPolicy::MANUAL, TaskRunner(request.priority)), per_factory_orb_state_(context.GetMutableOrbState()), @@ -125,7 +125,7 @@ index 9c6f41c82539ec428defa5e093b8a2d780f6e0ee..5214e695c71ccdaf995bc21f30bf1a16 devtools_request_id_(request.devtools_request_id), options_(PopulateOptions(options, factory_params_->is_orb_enabled, -@@ -542,7 +545,7 @@ void URLLoader::SetUpUrlRequestCallbacks( +@@ -545,7 +548,7 @@ void URLLoader::SetUpUrlRequestCallbacks( &URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this))); } @@ -134,7 +134,7 @@ index 9c6f41c82539ec428defa5e093b8a2d780f6e0ee..5214e695c71ccdaf995bc21f30bf1a16 url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1161,6 +1164,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1164,6 +1167,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); diff --git a/patches/chromium/feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch b/patches/chromium/feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch index 28fe09fe3784..cd6a5921b8ec 100644 --- a/patches/chromium/feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch +++ b/patches/chromium/feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch @@ -32,10 +32,10 @@ index a82088f96079c3d5ddfbd35df98b2ebb2c0e62a4..668012a5e422059f52815fadf3c7d1d9 break; } diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc -index 17a10ffc53c5700bb907f68142a6d6f403415099..dda07e1d45bf49b1fc3970a34a17bf65abc79e60 100644 +index f6c3e8d9139ca22e885979d7fa72edbccac182e1..0a72093709ae8f56cc7b8d1649efe23050423054 100644 --- a/content/browser/permissions/permission_controller_impl.cc +++ b/content/browser/permissions/permission_controller_impl.cc -@@ -89,6 +89,7 @@ PermissionToSchedulingFeature(PermissionType permission_name) { +@@ -94,6 +94,7 @@ PermissionToSchedulingFeature(PermissionType permission_name) { case PermissionType::AUTOMATIC_FULLSCREEN: case PermissionType::WEB_APP_INSTALLATION: case PermissionType::LOCAL_NETWORK_ACCESS: @@ -91,7 +91,7 @@ index 5c82a641538802bc459782ea422a1186045b054a..c286d87043ec4cb2e51ec9d82d08e4c8 // Always keep this at the end. NUM, diff --git a/third_party/blink/public/mojom/permissions/permission.mojom b/third_party/blink/public/mojom/permissions/permission.mojom -index 1591cba375920ef3bdaa5698658ac386cbed248c..6fc349a2f4633d1338fbfcf8d0d0fb6fa3180b0d 100644 +index 411412e3e9c08afad09321d8105dd4d628fe508a..549f9079c004ce8427ab2be0dba2e5b24471a8c9 100644 --- a/third_party/blink/public/mojom/permissions/permission.mojom +++ b/third_party/blink/public/mojom/permissions/permission.mojom @@ -43,7 +43,8 @@ enum PermissionName { diff --git a/patches/chromium/fix_adjust_headless_mode_handling_in_native_widget.patch b/patches/chromium/fix_adjust_headless_mode_handling_in_native_widget.patch index d5be2ad82381..530f30553f9f 100644 --- a/patches/chromium/fix_adjust_headless_mode_handling_in_native_widget.patch +++ b/patches/chromium/fix_adjust_headless_mode_handling_in_native_widget.patch @@ -18,33 +18,79 @@ Additionally, this patch reverts https://chromium-review.googlesource.com/c/chromium/src/+/6936895 as we depend on the removed functionality in this patch. +diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +index f651286bc85f3640ec072b05eb2f0d118e02417a..94ee607bc9de2bf388a736c438613b51de1a5ac2 100644 +--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm ++++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +@@ -522,7 +522,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { + is_translucent_window_ = params->is_translucent; + pending_restoration_data_ = params->state_restoration_data; + +- if (display::Screen::Get()->IsHeadless()) { ++ if (params->is_headless_mode_window) { + headless_mode_window_ = std::make_optional(); + } + +diff --git a/components/remote_cocoa/common/native_widget_ns_window.mojom b/components/remote_cocoa/common/native_widget_ns_window.mojom +index 11954a3adfb6d517b6dc8e780a4a9aba8a0bf98a..1ddc1f34055c8b42177703ccc2f0d006294430da 100644 +--- a/components/remote_cocoa/common/native_widget_ns_window.mojom ++++ b/components/remote_cocoa/common/native_widget_ns_window.mojom +@@ -81,6 +81,8 @@ struct NativeWidgetNSWindowInitParams { + // NSWindowCollectionBehaviorParticipatesInCycle (this is not the + // default for NSWindows with NSWindowStyleMaskBorderless). + bool force_into_collection_cycle; ++ // If true, the window was created in headless mode. ++ bool is_headless_mode_window; + // An opaque blob of AppKit data which includes, among other things, a + // window's workspace and fullscreen state, and can be retrieved from or + // applied to a window. +diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h +index e523151fb670af28cf2c54548c5009825fdbed92..66d5724f848b328a19362a3c0f6346704ddb50ac 100644 +--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h ++++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h +@@ -554,6 +554,7 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost + bool is_miniaturized_ = false; + bool is_window_key_ = false; + bool is_mouse_capture_active_ = false; ++ bool is_headless_mode_window_ = false; + bool is_zoomed_ = false; + gfx::Rect window_bounds_before_fullscreen_; + diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -index 7befaf18ae9c922ccd8d36a006b9105cb55b1a32..953a683a7057e3be8181be197486709a55d04e9a 100644 +index e1a1cdb2ec192d2ee5a555ecccf041f757336f79..68a210eaf34d6d410a14478ad5bf0c78faa30388 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -464,7 +464,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -465,6 +465,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, if (!is_tooltip) { tooltip_manager_ = std::make_unique(GetNSWindowMojo()); } -- is_headless_mode_window_ = display::Screen::Get()->IsHeadless(); + is_headless_mode_window_ = params.ShouldInitAsHeadless(); if (params.workspace.length()) { std::string restoration_data; -@@ -664,9 +664,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -482,6 +483,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, + window_params->modal_type = widget->widget_delegate()->GetModalType(); + window_params->is_translucent = + params.opacity == Widget::InitParams::WindowOpacity::kTranslucent; ++ window_params->is_headless_mode_window = is_headless_mode_window_; + window_params->is_tooltip = is_tooltip; + + // macOS likes to put shadows on most things. However, frameless windows +@@ -663,9 +665,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator, // case it will never become visible but we want its compositor to produce // frames for screenshooting and screencasting. UpdateCompositorProperties(); - layer()->SetVisible(is_visible_); +- if (is_visible_ || display::Screen::Get()->IsHeadless()) { + layer()->SetVisible(is_visible_ || is_headless_mode_window_); - if (is_visible_ || is_headless_mode_window_) { ++ if (is_visible_ || is_headless_mode_window_) { compositor_->Unsuspend(); + layer()->SchedulePaint(layer()->bounds()); } // Register the CGWindowID (used to identify this window for video capture) diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc -index d24b78b50700f9f627c12cd5f339c7dcc0c173e5..77fd8b2f409e8f9151eb81c6a0da786babcdee6b 100644 +index 7e1bfe1f3754562a77615ab7ba83c23f719050b7..8a84abb915d3d0123f996eb027b357c953233a9c 100644 --- a/ui/views/widget/widget.cc +++ b/ui/views/widget/widget.cc @@ -222,6 +222,18 @@ ui::ZOrderLevel Widget::InitParams::EffectiveZOrderLevel() const { @@ -75,7 +121,7 @@ index d24b78b50700f9f627c12cd5f339c7dcc0c173e5..77fd8b2f409e8f9151eb81c6a0da786b if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred && diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h -index 89e00e8d2a456634beee8c72fcb753ab67e16c9e..473240be0c9168dc7a5fe771f1d473d9e2a9d978 100644 +index ce34d038564570f4edc8e36fd29524bd93c0b462..808abf2ce1c797591304a8ece9e8a169f034273e 100644 --- a/ui/views/widget/widget.h +++ b/ui/views/widget/widget.h @@ -324,6 +324,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -112,7 +158,7 @@ index 89e00e8d2a456634beee8c72fcb753ab67e16c9e..473240be0c9168dc7a5fe771f1d473d9 // True if the window size will follow the content preferred size. bool is_autosized() const { return is_autosized_; } -@@ -1718,6 +1731,9 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -1715,6 +1728,9 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // If true, the mouse is currently down. bool is_mouse_button_pressed_ = false; diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index 1b2e61f538ce..2589b601380a 100644 --- a/patches/chromium/fix_aspect_ratio_with_max_size.patch +++ b/patches/chromium/fix_aspect_ratio_with_max_size.patch @@ -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 f3f42f2c3ae4b185b0647902a2409bc9b25a152f..8c70c5ecef8c352e7cd5b9a986bd45d670760069 100644 +index 41b5219bdba3eba8bde935992fe60fc14898f68d..5376a8278a4cc784ad69cda6594c5055847c1f22 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3848,15 +3848,30 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3844,17 +3844,30 @@ 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); @@ -39,10 +39,12 @@ index f3f42f2c3ae4b185b0647902a2409bc9b25a152f..8c70c5ecef8c352e7cd5b9a986bd45d6 max_size_param = max_window_size; } +- gfx::Size excluded_margin = delegate_->DIPToScreenSize(excluded_margin_dip_); +- - gfx::SizeRectToAspectRatioWithExcludedMargin( + gfx::SizeRectToAspectRatio( GetWindowResizeEdge(param), aspect_ratio_.value(), min_window_size, -- max_size_param, excluded_margin_, *window_rect); +- max_size_param, excluded_margin, *window_rect); + max_size_param, window_rect); } diff --git a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch index 0d456b670220..293d618257cf 100644 --- a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch +++ b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch @@ -28,10 +28,10 @@ The patch should be removed in favor of either: Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index 9dd046c064cf127846913deb0ce4582b291ffde9..d9dbaa5819e35a9fde95449ad2968fb2d940a015 100644 +index c4fb8d694c7b78aa1438eb53af913e7f6c6a7dfa..ded5360ccf2ae4c4f3f9eff9f5c409780e7516ed 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -11354,6 +11354,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() { +@@ -11395,6 +11395,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() { target_rph_id); } @@ -44,7 +44,7 @@ index 9dd046c064cf127846913deb0ce4582b291ffde9..d9dbaa5819e35a9fde95449ad2968fb2 // 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 061d87450ce7a157dff622eda112df7fd94fd9a4..e4b12b1327da816c3015d98ec93c6922417d5d1a 100644 +index fea6a1fc0ea335882fca51825aed0b62cb03acae..01c8f81009bb0e000b038d7d48c9a441536d9c9e 100644 --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc @@ -2337,6 +2337,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() { diff --git a/patches/chromium/fix_font_face_resolution_when_renderer_is_blocked.patch b/patches/chromium/fix_font_face_resolution_when_renderer_is_blocked.patch deleted file mode 100644 index 714b48a48bfa..000000000000 --- a/patches/chromium/fix_font_face_resolution_when_renderer_is_blocked.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Tue, 4 Jun 2024 15:29:10 +0200 -Subject: Fix font face resolution when renderer is blocked - -Backports https://chromium-review.googlesource.com/c/chromium/src/+/5584820 - -As a result of https://chromium-review.googlesource.com/c/chromium/src/+/5290838, -the FontFaceSet promise in e.g. contentWindow.document.fonts.ready will never resolve -while the renderer is blocked. This Cl takes an approach similar to that taken in -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 79d15ae4d9de6350429b9b907d5136266d02c579..7e26808b3ef4437940ee6745d2651037c1bba9a2 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 @@ - - #include "base/metrics/histogram_functions.h" - #include "third_party/blink/public/common/features.h" -+#include "third_party/blink/public/common/metrics/document_update_reason.h" - #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" -@@ -141,21 +142,27 @@ FontFaceSetDocument::CSSConnectedFontFaceList() const { - } - - void FontFaceSetDocument::FireDoneEventIfPossible() { -- if (should_fire_loading_event_) { -+ Document* d = GetDocument(); -+ if (!d || !d->View()) { - return; - } -+ - if (!ShouldSignalReady()) { - return; - } -- Document* d = GetDocument(); -- if (!d) { -+ -+ // FireDoneEventIfPossible gets scheduled via PostTask at the end of a -+ // successful style+layout update. An invalidation may have occurred in -+ // the interim, so update style and layout synchronously here. -+ d->UpdateStyleAndLayout(DocumentUpdateReason::kUnknown); -+ -+ // These values can change during style+layout update, so check them -+ // *after* the call to UpdateStyleAndLayout. -+ if (should_fire_loading_event_) { - return; - } - -- // If the layout was invalidated in between when we thought layout -- // was updated and when we're ready to fire the event, just wait -- // until after the next layout before firing events. -- if (!d->View() || d->View()->NeedsLayout()) { -+ if (!ShouldSignalReady()) { - return; - } - diff --git a/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch b/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch index 9fc80aaa197b..f35083f211af 100644 --- a/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch +++ b/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch @@ -40,7 +40,7 @@ accessing uninitialized lower indexes can return garbage values that cannot be n Refer to v8::EmbedderDataSlot::store_aligned_pointer for context. diff --git a/gin/public/gin_embedders.h b/gin/public/gin_embedders.h -index 8d7c5631fd8f1499c67384286f0e3c4037673b32..2b7bdfbac06a42e6bc51eb65e023c3673e6eb885 100644 +index 6d11f4401d50476802e514392615d287fa54522e..262aca59159985b4f6359f7f9d6763353124515b 100644 --- a/gin/public/gin_embedders.h +++ b/gin/public/gin_embedders.h @@ -20,6 +20,8 @@ enum GinEmbedder : uint16_t { @@ -51,9 +51,9 @@ index 8d7c5631fd8f1499c67384286f0e3c4037673b32..2b7bdfbac06a42e6bc51eb65e023c367 + kEmbedderBlinkTag, }; - } // namespace gin + enum EmbedderDataTag : uint16_t { diff --git a/third_party/blink/renderer/platform/bindings/script_state.cc b/third_party/blink/renderer/platform/bindings/script_state.cc -index 2d5df763b6ebb2333ae4aef909865213fb9ad4df..2370f00a3f5ee70604c93a0999ea5cee3c9898f9 100644 +index c7e892691cbec1c2e8e97f6972c2b8374a166167..332c7a78860776d7a0e3ed911ca50e1c664f18dc 100644 --- a/third_party/blink/renderer/platform/bindings/script_state.cc +++ b/third_party/blink/renderer/platform/bindings/script_state.cc @@ -13,6 +13,10 @@ namespace blink { @@ -67,26 +67,26 @@ index 2d5df763b6ebb2333ae4aef909865213fb9ad4df..2370f00a3f5ee70604c93a0999ea5cee // static void ScriptState::SetCreateCallback(CreateCallback create_callback) { DCHECK(create_callback); -@@ -37,6 +41,8 @@ ScriptState::ScriptState(v8::Local context, - DCHECK(world_); +@@ -38,6 +42,8 @@ ScriptState::ScriptState(v8::Local context, context_.SetWeak(this, &OnV8ContextCollectedCallback); - context->SetAlignedPointerInEmbedderData(kV8ContextPerContextDataIndex, this); + context->SetAlignedPointerInEmbedderData(kV8ContextPerContextDataIndex, this, + gin::kBlinkScriptState); + context->SetAlignedPointerInEmbedderData( + kV8ContextPerContextDataTagIndex, ScriptState::kScriptStateTagPtr); RendererResourceCoordinator::Get()->OnScriptStateCreated(this, execution_context); } -@@ -80,6 +86,8 @@ void ScriptState::DissociateContext() { +@@ -81,6 +87,8 @@ void ScriptState::DissociateContext() { // Cut the reference from V8 context to ScriptState. - GetContext()->SetAlignedPointerInEmbedderData(kV8ContextPerContextDataIndex, - nullptr); + GetContext()->SetAlignedPointerInEmbedderData( + kV8ContextPerContextDataIndex, nullptr, gin::kBlinkScriptState); + GetContext()->SetAlignedPointerInEmbedderData( + kV8ContextPerContextDataTagIndex, nullptr); reference_from_v8_context_.Clear(); // Cut the reference from ScriptState to V8 context. diff --git a/third_party/blink/renderer/platform/bindings/script_state.h b/third_party/blink/renderer/platform/bindings/script_state.h -index b3cc8d819b06108386aed9465cab4f27a28b675f..9c8818f10de59fdd2a3fd44d9cd23d40a93b53a7 100644 +index f06885f429a395b5c2eb55c89803837b550d765c..3340e4ec8d1ea20ea8310f288428b5869e85392a 100644 --- a/third_party/blink/renderer/platform/bindings/script_state.h +++ b/third_party/blink/renderer/platform/bindings/script_state.h @@ -185,7 +185,12 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected { diff --git a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch index ac2379859e70..099657087834 100644 --- a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch +++ b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch @@ -9,7 +9,7 @@ to support content settings UI. The support pulls in chrome content settings and UI code which are not valid in the scope of Electron. diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc -index 387a75ac7b0c7be1e38c3ba2b357f729f1e09229..fecf72a6d434f7c22159420c1cbbf34a285838c8 100644 +index 4dab35616234dcf0c55e21919633cf25217bfddb..889ab95b8d335c2ab938314f402474403e217ac3 100644 --- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc +++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc @@ -6,6 +6,7 @@ @@ -20,7 +20,7 @@ index 387a75ac7b0c7be1e38c3ba2b357f729f1e09229..fecf72a6d434f7c22159420c1cbbf34a #include "chrome/browser/picture_in_picture/picture_in_picture_bounds_cache.h" #include "chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker.h" #include "chrome/browser/ui/browser_navigator_params.h" -@@ -28,8 +29,10 @@ +@@ -32,8 +33,10 @@ #include "base/task/sequenced_task_runner.h" // TODO(crbug.com/421608904): include auto_picture_in_picture_tab_helper for // Android when supporting document PiP. @@ -31,7 +31,7 @@ index 387a75ac7b0c7be1e38c3ba2b357f729f1e09229..fecf72a6d434f7c22159420c1cbbf34a #include "chrome/browser/picture_in_picture/picture_in_picture_window.h" #include "media/base/media_switches.h" #include "net/base/url_util.h" -@@ -64,6 +67,7 @@ constexpr double kMaxWindowSizeRatio = 0.8; +@@ -68,6 +71,7 @@ constexpr double kMaxWindowSizeRatio = 0.8; // `kMaxWindowSizeRatio`. constexpr double kMaxSiteRequestedWindowSizeRatio = 0.25; @@ -39,7 +39,7 @@ index 387a75ac7b0c7be1e38c3ba2b357f729f1e09229..fecf72a6d434f7c22159420c1cbbf34a // Returns true if a document picture-in-picture window should be focused upon // opening it. bool ShouldFocusPictureInPictureWindow(const NavigateParams& params) { -@@ -80,6 +84,7 @@ bool ShouldFocusPictureInPictureWindow(const NavigateParams& params) { +@@ -84,6 +88,7 @@ bool ShouldFocusPictureInPictureWindow(const NavigateParams& params) { // AutoPictureInPictureTabHelper. return !auto_picture_in_picture_tab_helper->IsInAutoPictureInPicture(); } @@ -47,7 +47,7 @@ index 387a75ac7b0c7be1e38c3ba2b357f729f1e09229..fecf72a6d434f7c22159420c1cbbf34a // Returns the maximum area in pixels that the site can request a // picture-in-picture window to be. -@@ -217,7 +222,7 @@ bool PictureInPictureWindowManager::ExitPictureInPictureViaWindowUi( +@@ -221,7 +226,7 @@ bool PictureInPictureWindowManager::ExitPictureInPictureViaWindowUi( return false; } @@ -56,7 +56,7 @@ index 387a75ac7b0c7be1e38c3ba2b357f729f1e09229..fecf72a6d434f7c22159420c1cbbf34a // The user manually closed the pip window, so let the tab helper know in case // the auto-pip permission dialog was visible. if (auto* tab_helper = AutoPictureInPictureTabHelper::FromWebContents( -@@ -556,7 +561,7 @@ gfx::Size PictureInPictureWindowManager::GetMaximumWindowSize( +@@ -572,7 +577,7 @@ gfx::Size PictureInPictureWindowManager::GetMaximumWindowSize( // static void PictureInPictureWindowManager::SetWindowParams(NavigateParams& params) { @@ -65,7 +65,7 @@ index 387a75ac7b0c7be1e38c3ba2b357f729f1e09229..fecf72a6d434f7c22159420c1cbbf34a // Always show document picture-in-picture in a new window. When this is // not opened via the AutoPictureInPictureTabHelper, focus the window. params.window_action = ShouldFocusPictureInPictureWindow(params) -@@ -657,6 +662,7 @@ PictureInPictureWindowManager::GetOverlayView( +@@ -676,6 +681,7 @@ PictureInPictureWindowManager::GetOverlayView( return nullptr; } @@ -73,7 +73,7 @@ index 387a75ac7b0c7be1e38c3ba2b357f729f1e09229..fecf72a6d434f7c22159420c1cbbf34a // It would be nice to create this in `EnterPictureInPicture*`, but detecting // auto-pip while pip is in the process of opening doesn't work. // -@@ -695,6 +701,8 @@ PictureInPictureWindowManager::GetOverlayView( +@@ -714,6 +720,8 @@ PictureInPictureWindowManager::GetOverlayView( } return overlay_view; @@ -83,7 +83,7 @@ index 387a75ac7b0c7be1e38c3ba2b357f729f1e09229..fecf72a6d434f7c22159420c1cbbf34a PictureInPictureOcclusionTracker* diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -index c5552aa0dedf6adbe10409f32c6eeca28f11c0b6..be2b51295d08f468b416aa5755e6498942878de8 100644 +index 117b6b94f54f7629b5233cfdf988608476e7321c..8ac7f669984b47d4ec831ae9e2617eb2ea4ae36a 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc @@ -471,11 +471,13 @@ std::unique_ptr VideoOverlayWindowViews::Create( diff --git a/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch b/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch index 6ae3218c31b0..5ee738cfe276 100644 --- a/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch +++ b/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch @@ -13,10 +13,10 @@ messages in the legacy window handle layer. These conditions are regularly hit with WCO-enabled windows on Windows. diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc -index adf8545f5690223df73d61918dc3022fe63b6b8f..35ad59782691d2d254907df1d4f07788c927a37a 100644 +index 4723dee0cc086daac1419396b381a7298f97cebc..f76eac469e3966894430080085b2ba63740fa098 100644 --- a/content/browser/renderer_host/legacy_render_widget_host_win.cc +++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc -@@ -376,12 +376,12 @@ LRESULT LegacyRenderWidgetHostHWND::OnKeyboardRange(UINT message, +@@ -368,12 +368,12 @@ LRESULT LegacyRenderWidgetHostHWND::OnKeyboardRange(UINT message, LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) { @@ -31,7 +31,7 @@ index adf8545f5690223df73d61918dc3022fe63b6b8f..35ad59782691d2d254907df1d4f07788 tme.hwndTrack = hwnd(); tme.dwHoverTime = 0; TrackMouseEvent(&tme); -@@ -414,7 +414,10 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, +@@ -406,7 +406,10 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, // the picture. if (!msg_handled && (message >= WM_NCMOUSEMOVE && message <= WM_NCXBUTTONDBLCLK)) { diff --git a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch index 9c75b688323b..7af7c4a80a0f 100644 --- a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch +++ b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch @@ -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 edb2638deb85dfd37651a00d4c370e51d94fcc6a..224694b638df5fa4c1498c7d010b4613459f0a40 100644 +index 34fca79b7c87b2fd098271fb5a4f83c015eeb2bc..12363555481b504ea69f822319aadadee5b03a2f 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -3247,6 +3247,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged( +@@ -3245,6 +3245,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged( } } @@ -87,10 +87,10 @@ index 75df43e3cd2721a92c90c18154d53d5c203e2465..ce42c75c8face36d21f53f44c0201ac4 // The view with active text input state, i.e., a focused element. // It will be nullptr if no such view exists. Note that the active view diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index b97e039449bc43233c0388f9ae277341d6fde967..d30a9d94cfc30035b39d510ded65f271c9c51bb1 100644 +index 12341b55128f462f9d649161b069125b9548e09e..cef686451711a79134486e447bcaa195e08f01e0 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -10115,7 +10115,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( +@@ -10119,7 +10119,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( "WebContentsImpl::OnFocusedElementChangedInFrame", "render_frame_host", frame); RenderWidgetHostViewBase* root_view = diff --git a/patches/chromium/fix_remove_caption-removing_style_call.patch b/patches/chromium/fix_remove_caption-removing_style_call.patch index f85c6bd3618e..4cf483cb96e6 100644 --- a/patches/chromium/fix_remove_caption-removing_style_call.patch +++ b/patches/chromium/fix_remove_caption-removing_style_call.patch @@ -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 b06c3ac425bb1f20b890447ed3315127195ed253..efbc967ef5f7501e3cccfbc084b60b3fd73dfc8e 100644 +index 1005d553d39909bdf7c2c7b1b714c58861ba747d..74ae0fa48721fbf19631294d92ae9326ad902c99 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1856,7 +1856,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) { +@@ -1857,7 +1857,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) { SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS), 0); diff --git a/patches/chromium/fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch b/patches/chromium/fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch index 82e84992d8e1..189147d9e533 100644 --- a/patches/chromium/fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch +++ b/patches/chromium/fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch @@ -8,7 +8,7 @@ such as the background turning black when maximizing the window and dynamic background material settings not taking effect. diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index f142ce65c5c0e22b968c98082d11d9922e3a0cfa..52f39a8ecb21a10aff991cc9072756d11472d55f 100644 +index 956dc87cb07559038a63cec0b5174cec09619bdb..68635b0c0153c3464ab6c7d317177098a7ec644c 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -183,6 +183,10 @@ void DesktopWindowTreeHostWin::FinishTouchDrag(gfx::Point screen_point) { @@ -23,7 +23,7 @@ index f142ce65c5c0e22b968c98082d11d9922e3a0cfa..52f39a8ecb21a10aff991cc9072756d1 void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -index 74f0f6e485f4cc6be2c292f4b364d9796d9ce20b..f02c82befc140bda5b5c54f6577472190cbaae15 100644 +index 0cd07fd5fb55dcc0d972de4c027fcb895d156592..0f4d335e1d54b5e92fc217080d86513db94d4122 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h @@ -93,6 +93,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin @@ -36,10 +36,10 @@ index 74f0f6e485f4cc6be2c292f4b364d9796d9ce20b..f02c82befc140bda5b5c54f657747219 // Overridden from DesktopWindowTreeHost: void Init(const Widget::InitParams& params) override; diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index efbc967ef5f7501e3cccfbc084b60b3fd73dfc8e..55ba3b459ac57a453464f0dbb4681f4afb51eefe 100644 +index 74ae0fa48721fbf19631294d92ae9326ad902c99..1a26051de18f336db1ef7b1a4a60db9052e97b5e 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -993,13 +993,13 @@ void HWNDMessageHandler::FrameTypeChanged() { +@@ -994,13 +994,13 @@ void HWNDMessageHandler::FrameTypeChanged() { void HWNDMessageHandler::PaintAsActiveChanged() { if (!delegate_->HasNonClientView() || !delegate_->CanActivate() || @@ -55,7 +55,7 @@ index efbc967ef5f7501e3cccfbc084b60b3fd73dfc8e..55ba3b459ac57a453464f0dbb4681f4a } void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon, -@@ -1083,7 +1083,14 @@ void HWNDMessageHandler::SizeConstraintsChanged() { +@@ -1081,7 +1081,14 @@ void HWNDMessageHandler::SizeConstraintsChanged() { // allowing ui::GetResizableFrameThickness() to be used consistently when // removing the visible system frame. const bool had_caption_on_init = window_style() & WS_CAPTION; @@ -71,7 +71,7 @@ index efbc967ef5f7501e3cccfbc084b60b3fd73dfc8e..55ba3b459ac57a453464f0dbb4681f4a const bool can_maximize = can_resize && delegate_->CanMaximize(); auto set_style_func = [&style](LONG bit, bool should_set) { -@@ -1678,11 +1685,16 @@ void HWNDMessageHandler::ResetWindowRegion(bool force, bool redraw) { +@@ -1679,11 +1686,16 @@ void HWNDMessageHandler::ResetWindowRegion(bool force, bool redraw) { // through, but that isn't the case when using Direct3D to draw transparent // windows. So we route translucent windows throught to the delegate to // allow for a custom hit mask. @@ -89,7 +89,7 @@ index efbc967ef5f7501e3cccfbc084b60b3fd73dfc8e..55ba3b459ac57a453464f0dbb4681f4a return; } -@@ -2420,17 +2432,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message, +@@ -2416,17 +2428,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message, delegate_->SchedulePaint(); } diff --git a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch index 2c95ae9b4c4e..09f7374245df 100644 --- a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -59,10 +59,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..a54f1b3351efd2d8f324436f7f35cd43 #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 902f472c8c52dd4fe52f46fbb97034b041153f65..bebd52c6868b78588ded811b621e9c30b0152ad2 100644 +index e96fca375fc3eb2504dd6f82e5be2c025d23089e..62615df61435da20f7c93adf71a98c91ae151d5d 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -3194,6 +3194,7 @@ void LocalFrame::RequestExecuteScript( +@@ -3185,6 +3185,7 @@ void LocalFrame::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -70,7 +70,7 @@ index 902f472c8c52dd4fe52f46fbb97034b041153f65..bebd52c6868b78588ded811b621e9c30 BackForwardCacheAware back_forward_cache_aware, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_behavior) { -@@ -3251,7 +3252,7 @@ void LocalFrame::RequestExecuteScript( +@@ -3242,7 +3243,7 @@ void LocalFrame::RequestExecuteScript( PausableScriptExecutor::CreateAndRun( script_state, std::move(script_sources), execute_script_policy, user_gesture, evaluation_timing, blocking_option, want_result_option, @@ -80,10 +80,10 @@ index 902f472c8c52dd4fe52f46fbb97034b041153f65..bebd52c6868b78588ded811b621e9c30 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 27a48a7ccdee3a15bd42e7ebb01cf109ec80fbf3..fc0dc28d97dc7e73ec0b86ed221179b1f538de9d 100644 +index 71eb863235ef37ef3a9671a825ef25c1b444bae4..e8870377d3c822a341fb9bec98c7cd67c184f20d 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h -@@ -831,6 +831,7 @@ class CORE_EXPORT LocalFrame final +@@ -826,6 +826,7 @@ class CORE_EXPORT LocalFrame final mojom::blink::EvaluationTiming, mojom::blink::LoadEventBlockingOption, WebScriptExecutionCallback, @@ -92,10 +92,10 @@ index 27a48a7ccdee3a15bd42e7ebb01cf109ec80fbf3..fc0dc28d97dc7e73ec0b86ed221179b1 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 6516d0bc1a2a1891e59268bc29ca20bf27ec4789..c2d7ac40b253135c5d0342863e88a60d721afd00 100644 +index 3a1da2ef67d9b551cb162ba7eee62383107f651a..71a45aa41b6fe475f9e265857b990fdaa875b72a 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( +@@ -998,6 +998,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( std::move(callback).Run(value ? std::move(*value) : base::Value()); }, std::move(callback)), @@ -203,7 +203,7 @@ index fa65331f40b90d812b71a489fd560e9359152d2b..390714d631dc88ef92d59ef9618a5706 const mojom::blink::UserActivationOption user_activation_option_; const mojom::blink::LoadEventBlockingOption blocking_option_; diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc -index afee60b061eb816286f34323f6dad8cb81d8f203..0d81f7e997225f25c17f3ec2c16962ab5ecfe465 100644 +index 3af13895e6538c7f27a0475244708818fb36af91..b6ccb9686bfff3caf8620c3c20e8f1ef6cafad52 100644 --- a/third_party/blink/renderer/core/frame/web_frame_test.cc +++ b/third_party/blink/renderer/core/frame/web_frame_test.cc @@ -295,6 +295,7 @@ void ExecuteScriptsInMainWorld( @@ -215,10 +215,10 @@ index afee60b061eb816286f34323f6dad8cb81d8f203..0d81f7e997225f25c17f3ec2c16962ab mojom::blink::WantResultOption::kWantResult, wait_for_promise); } diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -index 8035d2ee0dbef988f87de48a6aa5371b74377637..30e3a7613bc7c951faccc44b5989d2840a6ce6ad 100644 +index 6f5745a56ad0a64649c726355808095e96567915..0cc0203f0bf1016c29ca508a7fc23f21f5c85234 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -@@ -1122,14 +1122,15 @@ void WebLocalFrameImpl::RequestExecuteScript( +@@ -1123,14 +1123,15 @@ void WebLocalFrameImpl::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, diff --git a/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch b/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch index c3f5a46ed96c..af9b9d1036a5 100644 --- a/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch +++ b/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch @@ -6,7 +6,7 @@ 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 6228ee44dfceacdbe2b176bd28fb8e89d4acdd41..9679a94d76dd0d6dd820268a210fe20bf47bb12d 100644 +index 9bb09e12baa7fc8f6ae71f2e64af05dc8236d803..d76282aed81e51f4301222db55c97dd0a705fe8b 100644 --- a/ui/views/controls/menu/menu_controller.cc +++ b/ui/views/controls/menu/menu_controller.cc @@ -740,6 +740,16 @@ void MenuController::Run(Widget* parent, @@ -26,7 +26,7 @@ index 6228ee44dfceacdbe2b176bd28fb8e89d4acdd41..9679a94d76dd0d6dd820268a210fe20b if (button_controller) { pressed_lock_ = button_controller->TakeLock( false, ui::LocatedEvent::FromIfValid(event)); -@@ -2482,18 +2492,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { +@@ -2496,18 +2506,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { } item->GetSubmenu()->ShowAt(params); diff --git a/patches/chromium/fix_use_delegated_generic_capturer_when_available.patch b/patches/chromium/fix_use_delegated_generic_capturer_when_available.patch index 553812f7e4a5..46ff55b3f1a6 100644 --- a/patches/chromium/fix_use_delegated_generic_capturer_when_available.patch +++ b/patches/chromium/fix_use_delegated_generic_capturer_when_available.patch @@ -15,7 +15,7 @@ capturer was window or screen-specific, as the IDs remain valid for generic capturer as well. diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc -index 963110fef8f60e23cd5b6b13fd39b1e10dd7e854..05e366456689e7d3c43df96fdf40d913bb770fe9 100644 +index 04b02dcc7974e360a6301e2a94bbe4e6383a1b3d..823be5f1ddf048284d9912c806bca3372403d5b8 100644 --- a/content/browser/media/capture/desktop_capture_device.cc +++ b/content/browser/media/capture/desktop_capture_device.cc @@ -954,9 +954,16 @@ std::unique_ptr DesktopCaptureDevice::Create( diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index d420fb407725..949243798873 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -20,10 +20,10 @@ index 376fa172533f3d421aced54df992e1e60a5fa317..b51214da88e8c7c046abfe8d251b411b } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index f93858d6cb4cb89075e9ed7ee50f4e86df37c279..d996356ed060e2762c8008c2376a00bdc88481ba 100644 +index 22b1bcac984a5f0e7140693a9c8ff586f12afe24..86cea3713135261fdc3e68ce3396f89682e22e6f 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -339,6 +339,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -334,6 +334,11 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ~ContentBrowserClient() = default; diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 95de66eab6b3..e864d9f53d29 100644 --- a/patches/chromium/gritsettings_resource_ids.patch +++ b/patches/chromium/gritsettings_resource_ids.patch @@ -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 36f9760734818c6769d20d97c01f7058617bc7d0..2d7b422c31b0d849e2c07c62d186a71d393ea9f2 100644 +index dd44a6f6850fe36d9a159e98cd1ffb23df10876d..9850329b7dfdabb00463a570932ff50911556011 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -1575,6 +1575,11 @@ +@@ -1585,6 +1585,11 @@ "messages": [10120], }, diff --git a/patches/chromium/inspectorpageagent_provisional_frame_speculative_fix.patch b/patches/chromium/inspectorpageagent_provisional_frame_speculative_fix.patch deleted file mode 100644 index aaa26e9b1ee5..000000000000 --- a/patches/chromium/inspectorpageagent_provisional_frame_speculative_fix.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Joey Arhar -Date: Wed, 1 Oct 2025 02:03:37 -0700 -Subject: InspectorPageAgent provisional frame speculative fix - -According to crash reports, addScriptToEvaluateOnNewDocument is running -on provisional frames. - -Fixed: 390710982 -Change-Id: I5cecf63c9517d0b28fff40361c607b0aa54e68cf -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6216479 -Reviewed-by: Alex Rudenko -Commit-Queue: Alex Rudenko -Auto-Submit: Joey Arhar -Cr-Commit-Position: refs/heads/main@{#1523418} - -diff --git a/third_party/blink/renderer/core/inspector/inspector_page_agent.cc b/third_party/blink/renderer/core/inspector/inspector_page_agent.cc -index 386df6dc728e5a1b1aac9865c1687db03f48d9ee..77bcd0f9f8155d1c9ddc167f594791abf48fcfb9 100644 ---- a/third_party/blink/renderer/core/inspector/inspector_page_agent.cc -+++ b/third_party/blink/renderer/core/inspector/inspector_page_agent.cc -@@ -603,7 +603,11 @@ protocol::Response InspectorPageAgent::addScriptToEvaluateOnNewDocument( - // Runtime.enable that forces main context creation. In this case, we would - // not normally evaluate the script, but we should. - for (LocalFrame* frame : *inspected_frames_) { -- EvaluateScriptOnNewDocument(*frame, *identifier); -+ // Don't evaluate scripts on provisional frames: -+ // https://crbug.com/390710982 -+ if (!frame->IsProvisional()) { -+ EvaluateScriptOnNewDocument(*frame, *identifier); -+ } - } - } - -diff --git a/third_party/blink/web_tests/FlagExpectations/disable-site-isolation-trials b/third_party/blink/web_tests/FlagExpectations/disable-site-isolation-trials -index 8df5aa4252464bd4bf06d04b1b4f100453954082..a58b683bd7f2bea8b059f096b48e61d9cd9302d7 100644 ---- a/third_party/blink/web_tests/FlagExpectations/disable-site-isolation-trials -+++ b/third_party/blink/web_tests/FlagExpectations/disable-site-isolation-trials -@@ -63,6 +63,7 @@ http/tests/inspector-protocol/target/target-filter.js [ Skip ] - virtual/fenced-frame-mparch/http/tests/inspector-protocol/fenced-frame/fenced-frame-in-oopif-auto-attach.js [ Skip ] - http/tests/inspector-protocol/target/target-info-changed-auto-attach.js [ Skip ] - http/tests/inspector-protocol/page/frame-detached-oopif.js [ Skip ] -+http/tests/inspector-protocol/page/addScriptToEvaluateOnNewDocument-reload.js [ Skip ] - - # Rely on OOPIF for an iframe to be a separate devtools target - http/tests/inspector-protocol/timeline/auction-worklet-frame.js [ Skip ] -diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/page/addScriptToEvaluateOnNewDocument-reload-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/page/addScriptToEvaluateOnNewDocument-reload-expected.txt -new file mode 100644 -index 0000000000000000000000000000000000000000..0131df6c227e1803741e654d42b15f589275061a ---- /dev/null -+++ b/third_party/blink/web_tests/http/tests/inspector-protocol/page/addScriptToEvaluateOnNewDocument-reload-expected.txt -@@ -0,0 +1,28 @@ -+Tests that Page.addScriptToEvaluateOnNewDocument on auto-attach with runImmediately=true. -+Regression test for crbug.com/390710982. -+console called: { -+ method : Runtime.consoleAPICalled -+ params : { -+ args : [ -+ [0] : { -+ type : string -+ value : evaluated -+ } -+ ] -+ executionContextId : -+ stackTrace : { -+ callFrames : [ -+ [0] : { -+ columnNumber : 8 -+ functionName : -+ lineNumber : 0 -+ scriptId : -+ url : -+ } -+ ] -+ } -+ timestamp : -+ type : log -+ } -+ sessionId : -+} -diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/page/addScriptToEvaluateOnNewDocument-reload.js b/third_party/blink/web_tests/http/tests/inspector-protocol/page/addScriptToEvaluateOnNewDocument-reload.js -new file mode 100644 -index 0000000000000000000000000000000000000000..52ebe845c323c6d692147052f3458777dcd7f966 ---- /dev/null -+++ b/third_party/blink/web_tests/http/tests/inspector-protocol/page/addScriptToEvaluateOnNewDocument-reload.js -@@ -0,0 +1,31 @@ -+(async function(/** @type {import('test_runner').TestRunner} */ testRunner) { -+ const { session, dp } = await testRunner.startBlank( -+ `Tests that Page.addScriptToEvaluateOnNewDocument on auto-attach with runImmediately=true. -+Regression test for crbug.com/390710982.`); -+ -+ await dp.Page.enable(); -+ await dp.Target.enable(); -+ await dp.Target.setAutoAttach({ flatten: true, autoAttach: true, waitForDebuggerOnStart: true }); -+ -+ dp.Target.onAttachedToTarget(async event => { -+ const dp2 = session.createChild(event.params.sessionId).protocol; -+ dp2.Page.enable(); -+ dp2.Runtime.enable(); -+ dp2.Runtime.onConsoleAPICalled(event => { -+ testRunner.log(event, 'console called: '); -+ }); -+ dp2.Page.addScriptToEvaluateOnNewDocument({ -+ source: 'console.log("evaluated")', -+ runImmediately: true, -+ }); -+ await dp2.Runtime.runIfWaitingForDebugger(); -+ }); -+ -+ const loaded = dp.Page.onceLoadEventFired(); -+ await dp.Page.navigate({ -+ url: testRunner.url('resources/iframe-src.html') -+ }); -+ await loaded; -+ -+ testRunner.completeTest(); -+}); diff --git a/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch b/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch index bfa1c7449247..bced6a625718 100644 --- a/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch +++ b/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch @@ -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 7f98c195c12b141a792913b3e9888d8eeabc74ed..901119f3fdc81800592b6f5a987054c3c62374c6 100644 +index 931a8e3e0362b6de6f9dee5b1cc8e0fcd41e4e78..5cffc3297ea7be7638315a731504df16935fc804 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1059,6 +1059,7 @@ component("base") { +@@ -1060,6 +1060,7 @@ component("base") { "//build:ios_buildflags", "//build/config/compiler:compiler_buildflags", "//third_party/modp_b64", @@ -452,7 +452,7 @@ index 433f12928857e288b6b0d4f4dd3d1f29da08cf6c..bb95aabec2e0d5c7b3a5d315c9a3f8cb bool shouldShowWindowTitle = YES; if (_bridge) diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -index e90c5a7cbb852ba33df47209cfb7890472f1fbb1..53881e0efdf8f868245dbca7040cd6aac899d50c 100644 +index f9f453e713b1beff8fda2fcd2a21907640c19817..f651286bc85f3640ec072b05eb2f0d118e02417a 100644 --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm @@ -42,6 +42,7 @@ @@ -463,7 +463,7 @@ index e90c5a7cbb852ba33df47209cfb7890472f1fbb1..53881e0efdf8f868245dbca7040cd6aa #include "mojo/public/cpp/bindings/self_owned_receiver.h" #include "net/cert/x509_util_apple.h" #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" -@@ -691,10 +692,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -692,10 +693,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -477,10 +477,10 @@ index e90c5a7cbb852ba33df47209cfb7890472f1fbb1..53881e0efdf8f868245dbca7040cd6aa // 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 9f487674f174e69c749c93e030de66e954947a73..88b4d3e2d965ee6930b4d5dd49c75af079c1bcff 100644 +index 40718df4d3d7092309ea7027ae6c59a7963fd03c..89f08e2693d9101e89dd007df80881ff726195ad 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -385,6 +385,7 @@ viz_component("service") { +@@ -387,6 +387,7 @@ viz_component("service") { "frame_sinks/external_begin_frame_source_mac.h", ] } @@ -488,7 +488,7 @@ index 9f487674f174e69c749c93e030de66e954947a73..88b4d3e2d965ee6930b4d5dd49c75af0 } if (is_ios) { -@@ -708,6 +709,7 @@ viz_source_set("unit_tests") { +@@ -710,6 +711,7 @@ viz_source_set("unit_tests") { "display_embedder/software_output_device_mac_unittest.mm", ] frameworks = [ "IOSurface.framework" ] @@ -548,7 +548,7 @@ index 010c713090e5038dc90db131c8f621422d30c03b..20c35e887a0496ee609c077e3b0494bd void ForwardKeyboardEvent(const input::NativeWebKeyboardEvent& key_event, diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index d3f833904a7a056235d4bd4b3e7c5297a60861f5..8986ec2405541a43ca34d47f9ac0ffbf875ae63a 100644 +index e2b316223ee5cbd99cb5f9f69c5454600cb8f74f..3d5cf1f31281e8412e6cdb441e6aa7954ad2d601 100644 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm @@ -34,6 +34,7 @@ @@ -559,7 +559,7 @@ index d3f833904a7a056235d4bd4b3e7c5297a60861f5..8986ec2405541a43ca34d47f9ac0ffbf #include "skia/ext/skia_utils_mac.h" #include "third_party/blink/public/common/features.h" #include "third_party/blink/public/mojom/input/input_handler.mojom.h" -@@ -2095,15 +2096,21 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -2085,15 +2086,21 @@ - (NSAccessibilityRole)accessibilityRole { // Since this implementation doesn't have to wait any IPC calls, this doesn't // make any key-typing jank. --hbono 7/23/09 // @@ -582,7 +582,7 @@ index d3f833904a7a056235d4bd4b3e7c5297a60861f5..8986ec2405541a43ca34d47f9ac0ffbf return kAttributes; } diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index bb12a1600ddda11abb6485f685564e2d5a7a5837..a1bcbbaca764ae901dad961c94a8a33432a92bd2 100644 +index 5a1b57da76eb52af8c36784afa6c793892d7534f..0238d417dd79e4d6a35d68426d668f1c98616cce 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -347,6 +347,7 @@ source_set("browser") { @@ -628,7 +628,7 @@ index 319e58e5c3cad4ec47fca2c7cb0d59d4c5fd460c..d17bdb51081cee80f6f43199057de557 // 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 8b53385eacb73bbafa1a095bd2db833ecfd930bb..3798a24ce4aedb6aa2954d8f99b603bf08f1179d 100644 +index cfa84b0b3a2c27f6be155fa7c578ca6358f3fa41..6f1214fc18a2089a6f711bd03bd083fd318e2792 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -52,6 +52,7 @@ @@ -650,7 +650,7 @@ index 8b53385eacb73bbafa1a095bd2db833ecfd930bb..3798a24ce4aedb6aa2954d8f99b603bf // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling // pointers. `ns_view_` gets reinitialized later in this method. -@@ -1638,10 +1641,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1652,10 +1655,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -663,7 +663,7 @@ index 8b53385eacb73bbafa1a095bd2db833ecfd930bb..3798a24ce4aedb6aa2954d8f99b603bf return gfx::NativeViewAccessible([GetInProcessNSView() window]); } -@@ -1693,9 +1698,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1707,9 +1712,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -675,7 +675,7 @@ index 8b53385eacb73bbafa1a095bd2db833ecfd930bb..3798a24ce4aedb6aa2954d8f99b603bf } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2198,20 +2205,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2212,20 +2219,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken( GetRenderWidgetAccessibilityTokenCallback callback) { base::ProcessId pid = getpid(); @@ -715,7 +715,7 @@ index 8c293f5bb0e859f438a7ab50b70b4d5449dc1358..d58c73427935127fdec173224bcb9709 defines = [] diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn -index b31aef089e03d530831df59327936785f026a300..457f5c907169da132cfd6304241dcecae779fc69 100644 +index 1cad7f1d08d622e35adee2ef22a4b0bb992728aa..49a6e77a4e9516a301fa1e73887c3e100b7f8740 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn @@ -320,6 +320,7 @@ target(link_target_type, "renderer") { @@ -797,10 +797,10 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe } // namespace content diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn -index 6232ce7ac3676b0b7e15e5a3f41e2e44c4dab787..21d29e74a9c3a5d085bf451b2b5ae2fdae165c50 100644 +index 0cb62bf470099d1f9b324c9ce4bdb403f710edf0..b1c219d8e905cbaee8b280d62e625705759151a1 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn -@@ -673,6 +673,7 @@ static_library("test_support") { +@@ -703,6 +703,7 @@ static_library("test_support") { "//url", "//url/mojom:url_mojom_gurl", "//v8", @@ -808,7 +808,7 @@ index 6232ce7ac3676b0b7e15e5a3f41e2e44c4dab787..21d29e74a9c3a5d085bf451b2b5ae2fd ] data_deps = [ -@@ -1143,6 +1144,8 @@ static_library("browsertest_support") { +@@ -1175,6 +1176,8 @@ static_library("browsertest_support") { # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and # enable the diagnostic by removing this line. configs += [ "//build/config/compiler:no_exit_time_destructors" ] @@ -817,7 +817,7 @@ index 6232ce7ac3676b0b7e15e5a3f41e2e44c4dab787..21d29e74a9c3a5d085bf451b2b5ae2fd } mojom("content_test_mojo_bindings") { -@@ -2030,6 +2033,7 @@ test("content_browsertests") { +@@ -2064,6 +2067,7 @@ test("content_browsertests") { "//ui/shell_dialogs", "//ui/snapshot", "//ui/webui:test_support", @@ -825,7 +825,7 @@ index 6232ce7ac3676b0b7e15e5a3f41e2e44c4dab787..21d29e74a9c3a5d085bf451b2b5ae2fd ] if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) { -@@ -3356,6 +3360,7 @@ test("content_unittests") { +@@ -3393,6 +3397,7 @@ test("content_unittests") { "//ui/shell_dialogs", "//ui/webui:test_support", "//url", @@ -846,10 +846,10 @@ index ab961bccc3e4f0f5a40ac74df97447118b256c68..43f00bf0879809e986308a2cb26145c4 if (is_mac) { diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn -index fdb2993ab0879c5693008fdabc10566d11e471aa..2af4bf9975385ea8080cd9bd2b55f24e3ab7a2f1 100644 +index 3504d7197bd3225b6b83d7e057f389d8327b9ff7..92547d8bc700f3139f4bbc77d621152e0bc2a81c 100644 --- a/device/bluetooth/BUILD.gn +++ b/device/bluetooth/BUILD.gn -@@ -256,6 +256,7 @@ component("bluetooth") { +@@ -257,6 +257,7 @@ component("bluetooth") { "CoreBluetooth.framework", "Foundation.framework", ] @@ -904,10 +904,10 @@ index f300e8d331057e894b43b74944e5052c39206844..4ff5277d550485cd79c5b5316d89c730 base::WeakPtr diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn -index 1e35afb74f7a149fb01ec2a2c62547a8aa6f1de1..05f4628930e74ea668a85968f74c678e57a6429d 100644 +index 97e32dddd06ce6e6d3e5c13cc8ae4386ed216818..2e4684f6bf4a2729c0b4a5fcceeca503555ce7c3 100644 --- a/gpu/ipc/service/BUILD.gn +++ b/gpu/ipc/service/BUILD.gn -@@ -128,6 +128,7 @@ component("service") { +@@ -122,6 +122,7 @@ component("service") { "QuartzCore.framework", ] defines += [ "GL_SILENCE_DEPRECATION" ] @@ -1396,10 +1396,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 96b487da179dd60e325194335cb091b36ec08d35..33efac95559d5ae91a377077b8df357dfa5b7edc 100644 +index 267e8ddfe2905f169a7cf9a819a4baa82b47770e..3a9fe67e684df903c256b396ce024c0c6f7c92a7 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn -@@ -428,6 +428,7 @@ component("core") { +@@ -427,6 +427,7 @@ component("core") { "//ui/gfx/geometry", "//ui/gfx/geometry:geometry_skia", "//ui/strings", @@ -1556,7 +1556,7 @@ index 54d483d6b3f1a56573e21b1f873b8dee8fc25a0f..33bc8c9ef097a907060ed347dca2ad46 if (is_ios) { diff --git a/ui/accessibility/platform/browser_accessibility_manager_mac.mm b/ui/accessibility/platform/browser_accessibility_manager_mac.mm -index 8ef5c8c7ac9a555fe41e6146997833ae43164951..4c17f1d29dac780195e07bcdb7e12a8fdd3f2130 100644 +index 3e6426f895b55168834809ed6b91916f447d7ea3..33ec3f6ce4e5a69760779d28a3ae2b07a183afa4 100644 --- a/ui/accessibility/platform/browser_accessibility_manager_mac.mm +++ b/ui/accessibility/platform/browser_accessibility_manager_mac.mm @@ -14,6 +14,7 @@ @@ -1806,7 +1806,7 @@ index a76d09dd2a2a71d0b8397f4abe30fe7bbb6e513d..eba69f4c6e72b36e799ce902cdffd2dd // Query the display's refresh rate. double refresh_rate = 1.0 / screen.minimumRefreshInterval; diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn -index 300079ed71ff990396d419ed55755f128dda6695..464682fd86764adbef54faaa5894a55be87ee5cf 100644 +index f6a40abfe998cbc9bce0672222f1d6ee6d844a8d..2161cf483eb76508bda48f541c0665bf6e43733f 100644 --- a/ui/gfx/BUILD.gn +++ b/ui/gfx/BUILD.gn @@ -335,6 +335,12 @@ component("gfx") { @@ -1861,10 +1861,10 @@ index bbe355cf69f160866188216cc274d75bd35603db..06ee100d7ea2e892dbf3c0b1adc96c50 // enough. return PlatformFontMac::SystemFontType::kGeneral; diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn -index f4651d57e9f1ac76c0e93ce3859f4169cd689200..d07439f78ac914d6daeb54dbc5beea80f1fb11bd 100644 +index 95a2d5d04ac69b48f59fa4c8c940b1075436bca7..1af7790524bd0c25f6384f7fb55f3df0fe03cfc1 100644 --- a/ui/views/BUILD.gn +++ b/ui/views/BUILD.gn -@@ -720,6 +720,8 @@ component("views") { +@@ -722,6 +722,8 @@ component("views") { "IOSurface.framework", "QuartzCore.framework", ] @@ -1873,7 +1873,7 @@ index f4651d57e9f1ac76c0e93ce3859f4169cd689200..d07439f78ac914d6daeb54dbc5beea80 } if (is_win) { -@@ -1150,6 +1152,8 @@ source_set("test_support") { +@@ -1152,6 +1154,8 @@ source_set("test_support") { "//ui/base/mojom:ui_base_types", ] @@ -1883,7 +1883,7 @@ index f4651d57e9f1ac76c0e93ce3859f4169cd689200..d07439f78ac914d6daeb54dbc5beea80 sources += [ "test/desktop_window_tree_host_win_test_api.cc", diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h -index 4cc9db3ae1ef2443b1ecf923c9c572b7d0e85662..f7bf6a6bb63f9c38cc21c03da1c884d6bee8ab9a 100644 +index e855d05f466059f20a31022a1a2810eeadeb4fff..e523151fb670af28cf2c54548c5009825fdbed92 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h @@ -19,6 +19,7 @@ @@ -1904,7 +1904,7 @@ index 4cc9db3ae1ef2443b1ecf923c9c572b7d0e85662..f7bf6a6bb63f9c38cc21c03da1c884d6 @class NSView; namespace remote_cocoa { -@@ -502,10 +505,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost +@@ -504,10 +507,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost mojo::AssociatedRemote remote_ns_window_remote_; @@ -1918,7 +1918,7 @@ index 4cc9db3ae1ef2443b1ecf923c9c572b7d0e85662..f7bf6a6bb63f9c38cc21c03da1c884d6 // Used to force the NSApplication's focused accessibility element to be the // views::Views accessibility tree when the NSView for this is focused. diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -index 5fc62f87b842f6aca7082b3957f2adb9f44e2114..7befaf18ae9c922ccd8d36a006b9105cb55b1a32 100644 +index ac4257215c61f3cb388e14f4439e23ac29f1307d..e1a1cdb2ec192d2ee5a555ecccf041f757336f79 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm @@ -21,6 +21,7 @@ @@ -1929,7 +1929,7 @@ index 5fc62f87b842f6aca7082b3957f2adb9f44e2114..7befaf18ae9c922ccd8d36a006b9105c #include "mojo/public/cpp/bindings/self_owned_associated_receiver.h" #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" #include "ui/accessibility/accessibility_features.h" -@@ -359,8 +360,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -360,8 +361,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator, if (in_process_ns_window_bridge_) { return gfx::NativeViewAccessible(in_process_ns_window_bridge_->ns_view()); } @@ -1942,7 +1942,7 @@ index 5fc62f87b842f6aca7082b3957f2adb9f44e2114..7befaf18ae9c922ccd8d36a006b9105c } gfx::NativeViewAccessible -@@ -376,8 +381,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -377,8 +382,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator, [in_process_ns_window_bridge_->ns_view() window]); } @@ -1955,7 +1955,7 @@ index 5fc62f87b842f6aca7082b3957f2adb9f44e2114..7befaf18ae9c922ccd8d36a006b9105c } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1439,9 +1448,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1445,9 +1454,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, // for PWAs. However this breaks accessibility on in-process windows, // so set it back to NO when a local window gains focus. See // https://crbug.com/41485830. @@ -1967,7 +1967,7 @@ index 5fc62f87b842f6aca7082b3957f2adb9f44e2114..7befaf18ae9c922ccd8d36a006b9105c // Explicitly set the keyboard accessibility state on regaining key // window status. if (is_key && is_content_first_responder) { -@@ -1582,17 +1593,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1588,17 +1599,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -1988,7 +1988,7 @@ index 5fc62f87b842f6aca7082b3957f2adb9f44e2114..7befaf18ae9c922ccd8d36a006b9105c *pid = getpid(); id element_id = GetNativeViewAccessible(); -@@ -1605,6 +1619,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1611,6 +1625,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, } *token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id); diff --git a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch index 91b9908b2bb4..25a6a54cf9d9 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index c2f19cf408ebcd0bc5311cf221acde09ab558ed4..95822f635b61da7c63b5a1babf93bb61cb786293 100644 +index ec828e8fe98bcaf000ca3ae46656b731a8c2f014..985de2b44ed5b2d567a080a1834bbfd8aa7a82a0 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -166,6 +166,11 @@ @@ -148,7 +148,7 @@ index c2f19cf408ebcd0bc5311cf221acde09ab558ed4..95822f635b61da7c63b5a1babf93bb61 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2679,6 +2796,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2682,6 +2799,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( cert_verifier = std::make_unique( std::make_unique( std::move(cert_verifier))); @@ -160,7 +160,7 @@ index c2f19cf408ebcd0bc5311cf221acde09ab558ed4..95822f635b61da7c63b5a1babf93bb61 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 5998b6a64a0bbfa22723d57a9fe1f31afd6e7435..56f1eec94a33c2c9a6289b12ac20323b4bef13d9 100644 +index 82617365bd5ef540e43c7dda07563c068b9e613f..df0e1e7ebf4a127e0cc8d8617f293c94862f9783 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -117,6 +117,7 @@ class URLMatcher; @@ -180,7 +180,7 @@ index 5998b6a64a0bbfa22723d57a9fe1f31afd6e7435..56f1eec94a33c2c9a6289b12ac20323b void ResetURLLoaderFactories() override; void GetViaObliviousHttp( mojom::ObliviousHttpRequestPtr request, -@@ -988,6 +991,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -989,6 +992,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -190,7 +190,7 @@ index 5998b6a64a0bbfa22723d57a9fe1f31afd6e7435..56f1eec94a33c2c9a6289b12ac20323b std::unique_ptr internal_host_resolver_; std::set, base::UniquePtrComparator> diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 422024e12926ea70450b43253fbb60c2ce217c11..840eff6ece73983a3b98673adbbb3cfd825565fe 100644 +index be0062591b94a77de5afbe8a776bfd366c3dd7a9..71aec1f17c274cdc1151fb81e6ff718abc7f310c 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -317,6 +317,17 @@ struct SocketBrokerRemotes { @@ -211,7 +211,7 @@ index 422024e12926ea70450b43253fbb60c2ce217c11..840eff6ece73983a3b98673adbbb3cfd // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -992,6 +1003,9 @@ interface NetworkContext { +@@ -1011,6 +1022,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); @@ -222,7 +222,7 @@ index 422024e12926ea70450b43253fbb60c2ce217c11..840eff6ece73983a3b98673adbbb3cfd CreateURLLoaderFactory( pending_receiver url_loader_factory, diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index 9139ca8b0139b19804bc2efe866f2019e8ef5652..6f0fe6423e8be903d4e38b783d31443c6ce89db5 100644 +index 002fac81e968d0f71c6ed31e274bf3d006a0ff4c..6a8d13ed773378b4d5b2c94c78399859dfbeb700 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h @@ -63,6 +63,8 @@ class TestNetworkContext : public mojom::NetworkContext { diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 171caa456232..e18826dfa0fd 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -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 03d15ec6e6f4adb6339501472de27b7bec5f50e3..364c95a765a0cbf568f14ebd4dce347e3c54f70d 100644 +index 674f6e77c376fc6107c648e1195e6022743a44da..5d82b4ff652ee2f31ad3e2a3996d5b2ac464819b 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc @@ -252,6 +252,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( @@ -19,7 +19,7 @@ index 03d15ec6e6f4adb6339501472de27b7bec5f50e3..364c95a765a0cbf568f14ebd4dce347e const GURL& origin, const GURL& document_url, diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h -index ec5ca87810d590fc95eda2006b8653bb12711b8e..203cd9645523c4f0adf90e78fa3d8f3d0aad54dc 100644 +index e94fccc1b564c349eb2d2c9acd0574c3589a2eaf..a75a55b6c54f5aacc915a27d2aa99395a44da34e 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.h +++ b/chrome/browser/notifications/platform_notification_service_impl.h @@ -57,6 +57,7 @@ class PlatformNotificationServiceImpl @@ -133,10 +133,10 @@ index 5be62a3fb27e37f3c1db6b811172f6dfebe18f61..34349f9832fe4b9a3d48db613a789afb 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 0496f406bf0083fc75cf4d9cc3560a30155ea2e0..a76db23484dabda64b7eaf2e8b6c6f22faf2719f 100644 +index 512feca6faaa4741d8df19f5499deadf0df4f6f5..10c3175d756b65419d62a37d042c965f3faff7f8 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2267,7 +2267,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2298,7 +2298,7 @@ void RenderProcessHostImpl::CreateNotificationService( case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker: case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -145,7 +145,7 @@ index 0496f406bf0083fc75cf4d9cc3560a30155ea2e0..a76db23484dabda64b7eaf2e8b6c6f22 creator_type, std::move(receiver)); break; } -@@ -2275,7 +2275,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2306,7 +2306,7 @@ void RenderProcessHostImpl::CreateNotificationService( CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch b/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch index 6174775d5d0f..5552e18cc247 100644 --- a/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch +++ b/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch @@ -10,11 +10,11 @@ The keyed mutex introduce extra performance cost and spikes. However, at offscre For resolving complex conflict please pin @reitowo For more reason please see: https://crrev.com/c/5465148 -diff --git a/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc b/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc -index bb33e469e2d38ee4a23b19acfa52f962a5e9c854..6e83c65334f1ce0134dc4efc1dc40eb7ffed028d 100644 ---- a/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc -+++ b/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc -@@ -152,7 +152,8 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateNativeGmbHandle( +diff --git a/gpu/command_buffer/service/shared_image/gpu_memory_buffer_factory_dxgi.cc b/gpu/command_buffer/service/shared_image/gpu_memory_buffer_factory_dxgi.cc +index d000749c9ca25c4b668afd399cd2fb30cef2c66f..6623a8cb23f09d2485173e3a20e3cd3ce7a39e01 100644 +--- a/gpu/command_buffer/service/shared_image/gpu_memory_buffer_factory_dxgi.cc ++++ b/gpu/command_buffer/service/shared_image/gpu_memory_buffer_factory_dxgi.cc +@@ -170,7 +170,8 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateNativeGmbHandle( // so make sure that the usage is one that we support. DCHECK(usage == gfx::BufferUsage::GPU_READ || usage == gfx::BufferUsage::SCANOUT || @@ -24,7 +24,7 @@ index bb33e469e2d38ee4a23b19acfa52f962a5e9c854..6e83c65334f1ce0134dc4efc1dc40eb7 << "Incorrect usage, usage=" << gfx::BufferUsageToString(usage); D3D11_TEXTURE2D_DESC desc = { -@@ -166,7 +167,9 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateNativeGmbHandle( +@@ -184,7 +185,9 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateNativeGmbHandle( D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET, 0, D3D11_RESOURCE_MISC_SHARED_NTHANDLE | diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 3010b6c0107e..486aa601d40e 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -38,7 +38,7 @@ index 85df555841ac0d32d2f097547c9991cecf0f4b1a..7a108339448fad3105e87c9d9af678c2 ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground, kCloseButtonIconSize)); diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -index 5c978e3dcc862456d129e85e82236d899dbb5504..c5552aa0dedf6adbe10409f32c6eeca28f11c0b6 100644 +index d54cc1a443e3b2d869dc148f532b3138a6d02d29..117b6b94f54f7629b5233cfdf988608476e7321c 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc @@ -18,12 +18,16 @@ diff --git a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch index 2f7af1c5ad11..e1decb2820d5 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,7 +8,7 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index b6fe461a04dfabab9b114b4a0c0c6cc08718cdaf..e57d928023a2defe5c2586aa6bd8385be6687f99 100644 +index e340ccdfb4c364774679c1b68df4b1340286d41a..72ebf04033e4ec67acb26780d4f252fc0b1d9917 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h @@ -431,6 +431,10 @@ diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 4089e87653a5..ec969a5a4a3b 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -577,7 +577,7 @@ index 824d6d8a9242302c2ab0c0c517d0cc329e607100..d3b25c90c90fe860990789aa96c872b4 // Indication that the job is getting canceled. bool canceling_job_ = false; diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc -index 4b1775f4a882fbabfe65df7784baebe6d8bee788..5a3e71dc3894fa96ac7a6b93b3552a90f36fe7a2 100644 +index 20bbbeddd18ef26b68defcdbd4a7c62706c43d0b..7b0071c169556a080ecbf5e8a6a3b878675f6bf7 100644 --- a/chrome/browser/printing/printer_query.cc +++ b/chrome/browser/printing/printer_query.cc @@ -356,17 +356,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings, @@ -899,7 +899,7 @@ index 746a056e1c7980803323739c51cedb930c62de25..34a9e45a3407612d6960a7cad798cf30 std::unique_ptr settings = PrintSettingsFromJobSettings(job_settings); diff --git a/printing/printing_context.h b/printing/printing_context.h -index 3a98838e27621e34ab050a0f5dce7110f0d88641..3cce0abe2a2893f1ad5ee747008b66c74e2c2434 100644 +index 2f34f45aaf89e6f4600be1d2b8444c636b0cc83f..5bfd45c5efbf300a36e016af80e18fb9ad376d41 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h @@ -208,6 +208,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { diff --git a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch index 1b6bb761fc82..00c25db2bfd8 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -44,10 +44,10 @@ index 0bae000a3491e03196bbba033621d389c6150225..a6abe25611c82da8c55998f74c982274 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 6c067803c35a4e98ec99df6e28015f3b36e67e4f..d7cf36715b036c29d881c84a07c0d3b7f73d609f 100644 +index 5d464141ea2e0ef23f37fe262f288b3678501330..9d45b18fca8aeac046f01bcc6076ba9e9e550241 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -6130,6 +6130,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -6134,6 +6134,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -72,7 +72,7 @@ index 342a5f984838eba5aef7a535c3758bb96c0f89a3..034797826196560ab6b71f885d52c8e1 RenderWidgetHostImpl* render_widget_host) override; bool IsShowingContextMenuOnPage() const override; diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h -index c6af2619bf13c2a6982834c6b888ad15da275627..5ed2521d5cb21341cc4056cb1f1a69c9129967f5 100644 +index 739d376705cb15333039578a103e0705a8af79fc..4d585f34b02c09a236949a6f4e1812a993b5d33d 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -35,6 +35,7 @@ diff --git a/patches/chromium/refactor_expose_file_system_access_blocklist.patch b/patches/chromium/refactor_expose_file_system_access_blocklist.patch index 89779bc57344..332017349046 100644 --- a/patches/chromium/refactor_expose_file_system_access_blocklist.patch +++ b/patches/chromium/refactor_expose_file_system_access_blocklist.patch @@ -8,7 +8,7 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w to upstream this change to Chrome. diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -index 570d768d017bdf235c31d919a9308e3c0e7390f0..7c930cf3b149410e2a5f9a93e666cf765e0fabc6 100644 +index 0c6a0751119ac303f85327f0ccb0e32b957b837a..150147638f7c6f1e87e9a7379af9ecf65ed4c4dc 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 @@ -84,11 +84,13 @@ @@ -25,7 +25,7 @@ index 570d768d017bdf235c31d919a9308e3c0e7390f0..7c930cf3b149410e2a5f9a93e666cf76 #include "components/tabs/public/tab_interface.h" #if BUILDFLAG(ENABLE_PLATFORM_APPS) #include "extensions/browser/extension_registry.h" // nogncheck -@@ -264,190 +266,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) { +@@ -265,190 +267,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) { } #endif @@ -220,7 +220,7 @@ index 570d768d017bdf235c31d919a9308e3c0e7390f0..7c930cf3b149410e2a5f9a93e666cf76 // Checks if `path` should be blocked by the `rules`. // The BlockType of the nearest ancestor of a path to check is what -@@ -1362,16 +1184,6 @@ struct ChromeFileSystemAccessPermissionContext::OriginState { +@@ -1363,16 +1185,6 @@ struct ChromeFileSystemAccessPermissionContext::OriginState { std::unique_ptr cleanup_timer; }; @@ -237,7 +237,7 @@ index 570d768d017bdf235c31d919a9308e3c0e7390f0..7c930cf3b149410e2a5f9a93e666cf76 ChromeFileSystemAccessPermissionContext:: ChromeFileSystemAccessPermissionContext(content::BrowserContext* context, const base::Clock* clock) -@@ -1390,7 +1202,7 @@ ChromeFileSystemAccessPermissionContext:: +@@ -1391,7 +1203,7 @@ ChromeFileSystemAccessPermissionContext:: #if BUILDFLAG(IS_ANDROID) one_time_permissions_tracker_.Observe( OneTimePermissionsTrackerFactory::GetForBrowserContext(context)); @@ -246,7 +246,7 @@ index 570d768d017bdf235c31d919a9308e3c0e7390f0..7c930cf3b149410e2a5f9a93e666cf76 auto* provider = web_app::WebAppProvider::GetForWebApps( Profile::FromBrowserContext(profile_)); if (provider) { -@@ -2775,7 +2587,7 @@ void ChromeFileSystemAccessPermissionContext::OnShutdown() { +@@ -2776,7 +2588,7 @@ void ChromeFileSystemAccessPermissionContext::OnShutdown() { one_time_permissions_tracker_.Reset(); } @@ -255,7 +255,7 @@ index 570d768d017bdf235c31d919a9308e3c0e7390f0..7c930cf3b149410e2a5f9a93e666cf76 void ChromeFileSystemAccessPermissionContext::OnWebAppInstalled( const webapps::AppId& app_id) { if (!base::FeatureList::IsEnabled( -@@ -3110,11 +2922,7 @@ bool ChromeFileSystemAccessPermissionContext:: +@@ -3111,11 +2923,7 @@ bool ChromeFileSystemAccessPermissionContext:: HandleType handle_type, UserAction user_action, GrantType grant_type) { @@ -268,7 +268,7 @@ index 570d768d017bdf235c31d919a9308e3c0e7390f0..7c930cf3b149410e2a5f9a93e666cf76 if (!base::FeatureList::IsEnabled( features::kFileSystemAccessPersistentPermissions)) { return false; -@@ -3165,6 +2973,7 @@ bool ChromeFileSystemAccessPermissionContext:: +@@ -3166,6 +2974,7 @@ bool ChromeFileSystemAccessPermissionContext:: return false; #endif // BUILDFLAG(IS_ANDROID) diff --git a/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch b/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch index 4997ec510e33..2e5ee4547643 100644 --- a/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch +++ b/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch @@ -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 bab63bdebc0c52a45adbeb86b391898f944703a5..cd2cb4bb15349273719c366795fc4d9a1c6e9e89 100644 +index 31500795700bc257b1a05515a8d557b32b0a370d..54ec914fbff24421437a89c2e05e052b1385c633 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -@@ -635,8 +635,9 @@ bool WasmCustomDescriptorsEnabledCallback(v8::Local context) { +@@ -645,8 +645,9 @@ bool WasmCustomDescriptorsEnabledCallback(v8::Local context) { return RuntimeEnabledFeatures::WebAssemblyCustomDescriptorsEnabled( execution_context); } @@ -21,7 +21,7 @@ index bab63bdebc0c52a45adbeb86b391898f944703a5..cd2cb4bb15349273719c366795fc4d9a v8::Local context, v8::Local v8_host_defined_options, v8::Local v8_referrer_resource_url, -@@ -714,20 +715,23 @@ v8::MaybeLocal HostImportModuleWithPhaseDynamically( +@@ -724,20 +725,23 @@ v8::MaybeLocal HostImportModuleWithPhaseDynamically( return resolver->Promise().V8Promise(); } @@ -47,7 +47,7 @@ index bab63bdebc0c52a45adbeb86b391898f944703a5..cd2cb4bb15349273719c366795fc4d9a v8::Local module, v8::Local meta) { v8::Isolate* isolate = v8::Isolate::GetCurrent(); -@@ -754,6 +758,7 @@ void HostGetImportMetaProperties(v8::Local context, +@@ -764,6 +768,7 @@ void HostGetImportMetaProperties(v8::Local context, meta->CreateDataProperty(context, resolve_key, resolve_value).ToChecked(); } @@ -55,7 +55,7 @@ index bab63bdebc0c52a45adbeb86b391898f944703a5..cd2cb4bb15349273719c366795fc4d9a bool IsDOMExceptionWrapper(v8::Isolate* isolate, v8::Local object) { return V8DOMException::HasInstance(isolate, object); } -@@ -784,7 +789,6 @@ void EmitDevToolsEvent(v8::Isolate* isolate) { +@@ -794,7 +799,6 @@ void EmitDevToolsEvent(v8::Isolate* isolate) { } // namespace @@ -63,7 +63,7 @@ index bab63bdebc0c52a45adbeb86b391898f944703a5..cd2cb4bb15349273719c366795fc4d9a void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { // Set up garbage collection before setting up anything else as V8 may trigger // GCs during Blink setup. -@@ -800,9 +804,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { +@@ -810,9 +814,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { SharedArrayBufferConstructorEnabledCallback); isolate->SetHostImportModuleDynamicallyCallback(HostImportModuleDynamically); isolate->SetHostImportModuleWithPhaseDynamicallyCallback( diff --git a/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch b/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch index 0382a646ed3c..faa6885b1fb9 100644 --- a/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch +++ b/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch @@ -28,10 +28,10 @@ index 668012a5e422059f52815fadf3c7d1d99af55032..753e519eb3ca094205b3e280b381960d break; } diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc -index dda07e1d45bf49b1fc3970a34a17bf65abc79e60..0e75eff7a65fc4eb921d41d0c4689b0157308ff6 100644 +index 0a72093709ae8f56cc7b8d1649efe23050423054..0d7ad32add07e4c8f61d8df08de9e1c176bba6d6 100644 --- a/content/browser/permissions/permission_controller_impl.cc +++ b/content/browser/permissions/permission_controller_impl.cc -@@ -89,7 +89,15 @@ PermissionToSchedulingFeature(PermissionType permission_name) { +@@ -94,7 +94,15 @@ PermissionToSchedulingFeature(PermissionType permission_name) { case PermissionType::AUTOMATIC_FULLSCREEN: case PermissionType::WEB_APP_INSTALLATION: case PermissionType::LOCAL_NETWORK_ACCESS: @@ -164,7 +164,7 @@ index c286d87043ec4cb2e51ec9d82d08e4c84f5a270c..164a2a446947dae687922363d324a6d3 // Always keep this at the end. NUM, diff --git a/third_party/blink/public/mojom/permissions/permission.mojom b/third_party/blink/public/mojom/permissions/permission.mojom -index 6fc349a2f4633d1338fbfcf8d0d0fb6fa3180b0d..ebb5d84848cee735990f06f6add2b38ebd8734ef 100644 +index 549f9079c004ce8427ab2be0dba2e5b24471a8c9..e7276b12b22035730fda18103dad604e87fff4a9 100644 --- a/third_party/blink/public/mojom/permissions/permission.mojom +++ b/third_party/blink/public/mojom/permissions/permission.mojom @@ -44,7 +44,15 @@ enum PermissionName { diff --git a/patches/chromium/refactor_unfilter_unresponsive_events.patch b/patches/chromium/refactor_unfilter_unresponsive_events.patch index c79917f3d831..dea2beecc1bc 100644 --- a/patches/chromium/refactor_unfilter_unresponsive_events.patch +++ b/patches/chromium/refactor_unfilter_unresponsive_events.patch @@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be accessed from our JS event. The filtering is moved into Electron's code. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 705e848acfc76a6b2e3a4dffb9e8ae8f86d54cbc..87a3fc1ff0fdd3e25595b539b7f09b5b3e403beb 100644 +index cd4681a60d49325c57d3fb961d2909650b4a6ace..f858782d248c0385b475418b347d12fc9083b63e 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -10252,25 +10252,13 @@ void WebContentsImpl::RendererUnresponsive( +@@ -10257,25 +10257,13 @@ void WebContentsImpl::RendererUnresponsive( base::RepeatingClosure hang_monitor_restarter) { OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive", "render_widget_host", render_widget_host); diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index b22966a9e9fa..02d22d12db05 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -8,7 +8,7 @@ respond to the first mouse click in their window, which is desirable for some kinds of utility windows. Similarly for `disableAutoHideCursor`. diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index 2bf102472783b7d41419f2de301af048955c691c..d3f833904a7a056235d4bd4b3e7c5297a60861f5 100644 +index c2aeece6d8804b532808c614340577640f904e2b..e2b316223ee5cbd99cb5f9f69c5454600cb8f74f 100644 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm @@ -167,6 +167,15 @@ void ExtractUnderlines(NSAttributedString* string, @@ -35,10 +35,10 @@ index 2bf102472783b7d41419f2de301af048955c691c..d3f833904a7a056235d4bd4b3e7c5297 + [self.window acceptsFirstMouse]) + return YES; + - switch ([self acceptsMouseEventsOption]) { - case AcceptMouseEvents::kWhenInActiveWindow: - // It is important to accept clicks when this window is the main window. -@@ -943,6 +956,8 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { + // Enable "click-through" if mouse clicks are accepted in inactive windows. + return + [self acceptsMouseEventsOption] > AcceptMouseEvents::kWhenInActiveWindow; +@@ -933,6 +946,8 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { // its parent view. BOOL hitSelf = NO; while (view) { @@ -47,7 +47,7 @@ index 2bf102472783b7d41419f2de301af048955c691c..d3f833904a7a056235d4bd4b3e7c5297 if (view == self) hitSelf = YES; if ([view isKindOfClass:[self class]] && ![view isEqual:self] && -@@ -1277,6 +1292,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -1267,6 +1282,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { eventType == NSEventTypeKeyDown && !(modifierFlags & NSEventModifierFlagCommand); diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 6d13b85c3a3f..1525b4328a7a 100644 --- a/patches/chromium/resource_file_conflict.patch +++ b/patches/chromium/resource_file_conflict.patch @@ -52,10 +52,10 @@ Some alternatives to this patch: None of these options seems like a substantial maintainability win over this patch to me (@nornagon). diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index 9fd2e83b2a7bc7e8dae09e45bec64ad41e06ee6a..e648bb4ed2ff72441faa8773e449e0b6174f5af5 100644 +index 0753724487493487c32955962105a8560892718b..9bffa9c8272a81059eb05fa79107bb326029402c 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1538,7 +1538,7 @@ if (is_chrome_branded && !is_android) { +@@ -1542,7 +1542,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 9fd2e83b2a7bc7e8dae09e45bec64ad41e06ee6a..e648bb4ed2ff72441faa8773e449e0b6 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1584,6 +1584,12 @@ repack("browser_tests_pak") { +@@ -1588,6 +1588,12 @@ repack("browser_tests_pak") { deps = [ "//chrome/test/data/webui:resources" ] } diff --git a/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch b/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch index ace4468e5e33..d46f3d8a239e 100644 --- a/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch +++ b/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch @@ -233,10 +233,10 @@ index d8167e854a3264b19a07544039fd01aba45e27a1..2e5a4ae715529e3b7b5c8fbb7195c7ce } diff --git a/content/common/features.cc b/content/common/features.cc -index 97f8f8088a149a6c20ea5cf0193cb48034a4d7fb..3e5ed6c1e9df1f6e56076b80c8be2b016f242635 100644 +index 7d26014a7347813f617975fd1501eceec20d92a9..946bca171d19b7357b90897c7b3093b879b349e9 100644 --- a/content/common/features.cc +++ b/content/common/features.cc -@@ -276,6 +276,14 @@ BASE_FEATURE(kInterestGroupUpdateIfOlderThan, base::FEATURE_ENABLED_BY_DEFAULT); +@@ -299,6 +299,14 @@ BASE_FEATURE(kInterestGroupUpdateIfOlderThan, base::FEATURE_ENABLED_BY_DEFAULT); BASE_FEATURE(kIOSurfaceCapturer, base::FEATURE_ENABLED_BY_DEFAULT); #endif @@ -252,10 +252,10 @@ index 97f8f8088a149a6c20ea5cf0193cb48034a4d7fb..3e5ed6c1e9df1f6e56076b80c8be2b01 BASE_FEATURE(kKeepChildProcessAfterIPCReset, base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/content/common/features.h b/content/common/features.h -index 933536411d1f1c2f2b7dec6dacd75a1c940a68aa..797937ce2d58d95a8aa5003323b5af8bd714ff01 100644 +index a6861ae975826d88d883edf8bd80c461231e70eb..0085fdb49637c160aa206a5b8040ba7a6b2c07b9 100644 --- a/content/common/features.h +++ b/content/common/features.h -@@ -103,6 +103,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan); +@@ -106,6 +106,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan); #if BUILDFLAG(IS_MAC) CONTENT_EXPORT BASE_DECLARE_FEATURE(kIOSurfaceCapturer); #endif diff --git a/patches/chromium/revert_partial_remove_unused_prehandlemouseevent.patch b/patches/chromium/revert_partial_remove_unused_prehandlemouseevent.patch index b4bae7da6c9c..8573a4b8b77b 100644 --- a/patches/chromium/revert_partial_remove_unused_prehandlemouseevent.patch +++ b/patches/chromium/revert_partial_remove_unused_prehandlemouseevent.patch @@ -54,10 +54,10 @@ index d211d8dc92c16e8ad2e9b1b37cb25dd05bf7e3e1..1756d5e81e9bf5ba20fc596901bb3cfe if (mouse_event_callback.Run(mouse_event)) { return; diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 87a3fc1ff0fdd3e25595b539b7f09b5b3e403beb..20112cfa786e487811453947d0e2c797962484cb 100644 +index f858782d248c0385b475418b347d12fc9083b63e..5b9daf8e31da1ebef7d154cb2a970f7d68566a12 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4447,6 +4447,12 @@ void WebContentsImpl::RenderWidgetWasResized( +@@ -4451,6 +4451,12 @@ void WebContentsImpl::RenderWidgetWasResized( width_changed); } @@ -100,7 +100,7 @@ index 08c983ac6a8e5733431ba00e1288f6d6b087eee6..3e2a9fb6a768c57ddb813c5c7a1df8bb WebContents* source, const input::NativeWebKeyboardEvent& event) { diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 2e8e60c8ebe837fc68318bd5c13dbd0c873c4292..7bd26bc9460a11d717deb596722942ba55830c5d 100644 +index 466f78504376c1fb8684faa08aacabba1987ec7a..543c1f5a0dc04fdaaf7a332ec9869d286f736763 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -313,6 +313,13 @@ class CONTENT_EXPORT WebContentsDelegate { diff --git a/patches/chromium/revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch b/patches/chromium/revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch index 167e865b0351..d563feadc102 100644 --- a/patches/chromium/revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch +++ b/patches/chromium/revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch @@ -10,10 +10,10 @@ on Windows. We should refactor our code so that this patch isn't necessary. diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json -index 051104ddca1a1dbc89199a74d08b94b1134a6e60..378056aaa1e84125d8a2a8b464e2bdf226655722 100644 +index 4ad6dae3baa52833292afa3cd86aac5d5a59c393..9b9c4935ccabfeae5affbc4f3db03c40be89086d 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json -@@ -25209,6 +25209,21 @@ +@@ -25269,6 +25269,21 @@ ] } ], @@ -67,7 +67,7 @@ index 58063f2452dc484a97c79b382067d9b34875e344..d586436498263c595a17454f54644d2d } // namespace views::features diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index f4fa30c1621e2eb78913ea97a993eb0a3528f36c..f142ce65c5c0e22b968c98082d11d9922e3a0cfa 100644 +index d58b59288d881a2d74ea357f1e9e27870d24ac72..956dc87cb07559038a63cec0b5174cec09619bdb 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -84,6 +84,23 @@ namespace { @@ -154,7 +154,7 @@ index f4fa30c1621e2eb78913ea97a993eb0a3528f36c..f142ce65c5c0e22b968c98082d11d992 return display::win::GetScreenWin()->ScreenToDIPRect(GetHWND(), pixel_bounds); } -@@ -678,37 +710,44 @@ void DesktopWindowTreeHostWin::HideImpl() { +@@ -677,37 +709,44 @@ void DesktopWindowTreeHostWin::HideImpl() { // other get/set methods work in DIP. gfx::Rect DesktopWindowTreeHostWin::GetBoundsInPixels() const { @@ -219,7 +219,7 @@ index f4fa30c1621e2eb78913ea97a993eb0a3528f36c..f142ce65c5c0e22b968c98082d11d992 } gfx::Rect -@@ -918,21 +957,29 @@ int DesktopWindowTreeHostWin::GetNonClientComponent( +@@ -917,21 +956,29 @@ int DesktopWindowTreeHostWin::GetNonClientComponent( void DesktopWindowTreeHostWin::GetWindowMask(const gfx::Size& size_px, SkPath* path) { @@ -264,7 +264,7 @@ index f4fa30c1621e2eb78913ea97a993eb0a3528f36c..f142ce65c5c0e22b968c98082d11d992 } diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -index cef7afbf408e38798c398c23dc3e964bd1d95d17..74f0f6e485f4cc6be2c292f4b364d9796d9ce20b 100644 +index e8acd2828ed05deefa335ce2bb461f0c3be8d7b7..0cd07fd5fb55dcc0d972de4c027fcb895d156592 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h @@ -175,7 +175,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin @@ -276,7 +276,7 @@ index cef7afbf408e38798c398c23dc3e964bd1d95d17..74f0f6e485f4cc6be2c292f4b364d979 gfx::Rect GetBoundsInAcceleratedWidgetPixelCoordinates() override; gfx::Point GetLocationOnScreenInPixels() const override; void SetCapture() override; -@@ -327,6 +327,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin +@@ -328,6 +328,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin gfx::Vector2d window_expansion_top_left_delta_; gfx::Vector2d window_expansion_bottom_right_delta_; diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 62c7e5849b53..551e61e45a1b 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,10 +22,10 @@ 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 a76db23484dabda64b7eaf2e8b6c6f22faf2719f..004bfd9456a1b235fd6d6abcd5d2a7ca5e070807 100644 +index 10c3175d756b65419d62a37d042c965f3faff7f8..ae87e4648feb8dc2ec7d8e808681fa380cb3c1f9 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1870,6 +1870,10 @@ bool RenderProcessHostImpl::Init() { +@@ -1889,6 +1889,10 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( *cmd_line, IsPdf(), IsJitDisabled()); @@ -37,7 +37,7 @@ index a76db23484dabda64b7eaf2e8b6c6f22faf2719f..004bfd9456a1b235fd6d6abcd5d2a7ca std::unique_ptr sandbox_delegate = std::make_unique(); diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc -index 33c2fb1dde3cc92383c085fc1277c71ccfffedc0..033a3692e59e9a220a635462542f4f34e7a14f26 100644 +index 0936beb23188f0d07cd5750f3a2e56dc560fdef2..996eab5dae4ffa6b7898cc070de8162ad2130d70 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc @@ -35,6 +35,9 @@ namespace content { @@ -50,7 +50,7 @@ index 33c2fb1dde3cc92383c085fc1277c71ccfffedc0..033a3692e59e9a220a635462542f4f34 const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); base::CommandLine::StringType renderer_prefix = -@@ -73,6 +76,9 @@ RendererSandboxedProcessLauncherDelegateWin:: +@@ -71,6 +74,9 @@ RendererSandboxedProcessLauncherDelegateWin:: ->ShouldRestrictCoreSharingOnRenderer()) { // PDF renderers must be jitless. CHECK(!is_pdf_renderer || is_jit_disabled); @@ -61,7 +61,7 @@ index 33c2fb1dde3cc92383c085fc1277c71ccfffedc0..033a3692e59e9a220a635462542f4f34 dynamic_code_can_be_disabled_ = true; return; diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h -index 85e9366a5bb28da302e475c99feb59863890ca09..ce29836e57dc72e0719998e1fa8734fd256e5633 100644 +index b98b23a95003c3e3dd7b2da6a48b956cdbeb5251..0597eca8efa2bea2cb800c6919b59dfb64c87083 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h @@ -18,6 +18,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index d9e705f7860e..03166935301c 100644 --- a/patches/chromium/web_contents.patch +++ b/patches/chromium/web_contents.patch @@ -9,10 +9,10 @@ is needed for OSR. Originally landed in https://github.com/electron/libchromiumcontent/pull/226. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 11c0124b6f3f1599b5a56ba7817e946a871316cc..b45610acc74a069c12cec3d0e9e737923ba059b2 100644 +index b9a6e3c8002a0a85e4d6a4ad1076a497d9ead0cf..f2cb25b71cc88df1de5e54723d09ba0b4841791f 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4181,6 +4181,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -4182,6 +4182,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, params.main_frame_name, GetOpener(), primary_main_frame_policy, base::UnguessableToken::Create()); @@ -26,7 +26,7 @@ index 11c0124b6f3f1599b5a56ba7817e946a871316cc..b45610acc74a069c12cec3d0e9e73792 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -4191,6 +4198,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -4192,6 +4199,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 95e2cd758ccb..530ffbd2cbf7 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -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 ff0406154e44a3b12ec732e836fc1e65dadfd326..8694b6dc3d3afe018830427ce07fe740f0d08e51 100644 +index f61bb2d66214ba1dee2d386c7d498d045c7c2708..83b96c1da1beb61aaace0c94f30a571af7b5e4db 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -8932,6 +8932,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -8963,6 +8963,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } @@ -37,10 +37,10 @@ index ff0406154e44a3b12ec732e836fc1e65dadfd326..8694b6dc3d3afe018830427ce07fe740 if (had_fullscreen_token && !GetView()->HasFocus()) GetView()->Focus(); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index b45610acc74a069c12cec3d0e9e737923ba059b2..b97e039449bc43233c0388f9ae277341d6fde967 100644 +index f2cb25b71cc88df1de5e54723d09ba0b4841791f..12341b55128f462f9d649161b069125b9548e09e 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4464,21 +4464,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( +@@ -4468,21 +4468,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( const input::NativeWebKeyboardEvent& event) { OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"), "WebContentsImpl::PreHandleKeyboardEvent"); @@ -80,7 +80,7 @@ index b45610acc74a069c12cec3d0e9e737923ba059b2..b97e039449bc43233c0388f9ae277341 } bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { -@@ -4637,7 +4641,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -4641,7 +4645,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame)); DCHECK(requesting_frame->IsActive()); @@ -90,7 +90,7 @@ index b45610acc74a069c12cec3d0e9e737923ba059b2..b97e039449bc43233c0388f9ae277341 // inactive when sites request fullscreen via capability delegation, consume // transient activation from a gesture made before another window was focused, diff --git a/third_party/blink/renderer/core/fullscreen/fullscreen.cc b/third_party/blink/renderer/core/fullscreen/fullscreen.cc -index 951bbda2e7b4845606899e123a3b12fed80cbb3d..5e3aea39804bd519a26ad9dddfe3a209a2955631 100644 +index c533c80eb4eea180a2ef89a225d7c75390d40225..4c81dea15346b35a9a43c92fb3b778367888a6ca 100644 --- a/third_party/blink/renderer/core/fullscreen/fullscreen.cc +++ b/third_party/blink/renderer/core/fullscreen/fullscreen.cc @@ -105,7 +105,6 @@ void FullscreenElementChanged(Document& document, diff --git a/patches/config.json b/patches/config.json index 37f4600e246f..8d297c0fd3e6 100644 --- a/patches/config.json +++ b/patches/config.json @@ -12,6 +12,5 @@ { "patch_dir": "src/electron/patches/ReactiveObjC", "repo": "src/third_party/squirrel.mac/vendor/ReactiveObjC" }, { "patch_dir": "src/electron/patches/webrtc", "repo": "src/third_party/webrtc" }, { "patch_dir": "src/electron/patches/reclient-configs", "repo": "src/third_party/engflow-reclient-configs" }, - { "patch_dir": "src/electron/patches/sqlite", "repo": "src/third_party/sqlite/src" }, - { "patch_dir": "src/electron/patches/angle", "repo": "src/third_party/angle" } + { "patch_dir": "src/electron/patches/sqlite", "repo": "src/third_party/sqlite/src" } ] diff --git a/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch b/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch index 8b96f3e551e0..92261057b0a9 100644 --- a/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch +++ b/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch @@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer patching legacy devtools code. diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts -index a8fc444e89afc0ecc169e055ccab117c140d86a1..9fde1c092ff80ce2719ad920e4e885459f7b2e6c 100644 +index df4b9c09f80901a404b32011a052179d0cf87560..a29ed6b2221593db51eb3200bb6d08d6d32f286b 100644 --- a/front_end/entrypoints/main/MainImpl.ts +++ b/front_end/entrypoints/main/MainImpl.ts -@@ -740,6 +740,8 @@ export class MainImpl { +@@ -752,6 +752,8 @@ export class MainImpl { globalThis.Main = globalThis.Main || {}; // @ts-expect-error Exported for Tests.js globalThis.Main.Main = MainImpl; diff --git a/patches/nan/.patches b/patches/nan/.patches index 0b1553be338c..a8b0cedecdd7 100644 --- a/patches/nan/.patches +++ b/patches/nan/.patches @@ -6,3 +6,4 @@ apply_allcan_read_write.patch fix_support_new_variant_of_namedpropertyhandlerconfiguration_and.patch fix_correct_usages_of_v8_returnvalue_void_set_nonempty_for_new.patch chore_remove_deprecated_functioncallbackinfo_holder.patch +fix_replace_deprecated_get_setprototype.patch diff --git a/patches/nan/fix_replace_deprecated_get_setprototype.patch b/patches/nan/fix_replace_deprecated_get_setprototype.patch new file mode 100644 index 000000000000..e1dc28af2e2c --- /dev/null +++ b/patches/nan/fix_replace_deprecated_get_setprototype.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Maddock +Date: Thu, 9 Oct 2025 23:25:59 -0400 +Subject: fix: replace deprecated Get/SetPrototype + +https://chromium-review.googlesource.com/c/v8/v8/+/6983465 + +Replaces the deprecated usage of SetPrototype. + +diff --git a/nan_maybe_43_inl.h b/nan_maybe_43_inl.h +index c04ce30d2fa3bfb555c96754d93de64e8a83e36b..aa06dbad2f0b3d564917dbcd29ac608ad468327b 100644 +--- a/nan_maybe_43_inl.h ++++ b/nan_maybe_43_inl.h +@@ -207,7 +207,7 @@ inline Maybe SetPrototype( + , v8::Local prototype) { + v8::Isolate *isolate = v8::Isolate::GetCurrent(); + v8::HandleScope scope(isolate); +- return obj->SetPrototype(isolate->GetCurrentContext(), prototype); ++ return obj->SetPrototypeV2(isolate->GetCurrentContext(), prototype); + } + + inline MaybeLocal ObjectProtoToString( +diff --git a/nan_maybe_pre_43_inl.h b/nan_maybe_pre_43_inl.h +index 83325ae0897f95f2fe5354e9ab720796a7cefd7c..c309ace8c69feb6d01f136d4c0a33443886c467a 100644 +--- a/nan_maybe_pre_43_inl.h ++++ b/nan_maybe_pre_43_inl.h +@@ -174,7 +174,7 @@ MaybeLocal GetOwnPropertyNames(v8::Handle obj) { + inline Maybe SetPrototype( + v8::Handle obj + , v8::Handle prototype) { +- return Just(obj->SetPrototype(prototype)); ++ return Just(obj->SetPrototypeV2(prototype)); + } + + inline MaybeLocal ObjectProtoToString( diff --git a/patches/node/.patches b/patches/node/.patches index 925963526a7e..301adc7c4843 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -50,3 +50,6 @@ chore_add_missing_include_of_iterator.patch test_accomodate_v8_thenable_stack_trace_change_in_snapshot.patch chore_exclude_electron_node_folder_from_exit-time-destructors.patch api_remove_deprecated_getisolate.patch +src_switch_from_get_setprototype_to_get_setprototypev2.patch +fix_replace_deprecated_setprototype.patch +fix_redefined_macos_sdk_header_symbols.patch diff --git a/patches/node/cli_move_--trace-atomics-wait_to_eol.patch b/patches/node/cli_move_--trace-atomics-wait_to_eol.patch index 394ae7770d0c..583bc635f215 100644 --- a/patches/node/cli_move_--trace-atomics-wait_to_eol.patch +++ b/patches/node/cli_move_--trace-atomics-wait_to_eol.patch @@ -83,7 +83,7 @@ index e3b2c45af01b2e9b9522964da2572988edd2b9e9..64e975546285a1042dda6fdb54fdd502 Print stack traces for deprecations. . diff --git a/src/node.cc b/src/node.cc -index f0c0b6229048a2e9bc05684fab44ab09bc34e1f6..9027df9a321f7db76edd1218c194df519017dfaf 100644 +index 2dfdaec589e9b88af73ba388ea3c059ef27d243b..67d9a87f5ed97a10d29378f9067c8203941f62e2 100644 --- a/src/node.cc +++ b/src/node.cc @@ -232,44 +232,6 @@ void Environment::WaitForInspectorFrontendByOptions() { diff --git a/patches/node/fix_cppgc_initializing_twice.patch b/patches/node/fix_cppgc_initializing_twice.patch index d33ea35c6694..48b1b463d446 100644 --- a/patches/node/fix_cppgc_initializing_twice.patch +++ b/patches/node/fix_cppgc_initializing_twice.patch @@ -12,7 +12,7 @@ This can be removed/refactored once Node.js upgrades to a version of V8 containing the above CL. diff --git a/src/node.cc b/src/node.cc -index 9027df9a321f7db76edd1218c194df519017dfaf..cc1c35da5601fffc3c53985c5d95cc466662649d 100644 +index 67d9a87f5ed97a10d29378f9067c8203941f62e2..591af411272e50a0c26b9b11bedf6bcfe76784db 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1246,7 +1246,7 @@ InitializeOncePerProcessInternal(const std::vector& args, diff --git a/patches/node/fix_redefined_macos_sdk_header_symbols.patch b/patches/node/fix_redefined_macos_sdk_header_symbols.patch new file mode 100644 index 000000000000..4e39d97cb8ae --- /dev/null +++ b/patches/node/fix_redefined_macos_sdk_header_symbols.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Maddock +Date: Wed, 8 Oct 2025 10:50:03 -0400 +Subject: fix: redefined macos sdk header symbols + +https://chromium-review.googlesource.com/c/chromium/src/+/6950738 + +Chromium has set the minimum MacOS SDK version to 26. With this +change, it seems to introduce an incompatibility when compiling +using clang modules. Disabling them resolves the issue. + +diff --git a/unofficial.gni b/unofficial.gni +index a64d2e4ac475abc049fff7ea62ec76de565a747d..ab456452d102088005fc4bfcb394d2de5ec44889 100644 +--- a/unofficial.gni ++++ b/unofficial.gni +@@ -195,6 +195,10 @@ template("node_gn_build") { + "CoreFoundation.framework", + "Security.framework", + ] ++ ++ # Fix for MacOSX26 SDK headers included twice due to usage of clang ++ # modules. Included once as a C header and again as C++. ++ use_libcxx_modules = false + } + if (is_posix) { + configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] +@@ -350,6 +354,12 @@ template("node_gn_build") { + include_dirs = [ "src", "tools" ] + configs += [ "//build/config/compiler:no_exit_time_destructors" ] + ++ # Fix for MacOSX26 SDK headers included twice due to usage of clang modules. ++ # Included once as a C header and again as C++. ++ if (is_mac) { ++ use_libcxx_modules = false ++ } ++ + if (!is_win) { + defines += [ "NODE_JS2C_USE_STRING_LITERALS" ] + } diff --git a/patches/node/fix_remove_outdated_v8_flags_from_node_cc.patch b/patches/node/fix_remove_outdated_v8_flags_from_node_cc.patch index 8eba2bbcbb47..afa8e2da4e73 100644 --- a/patches/node/fix_remove_outdated_v8_flags_from_node_cc.patch +++ b/patches/node/fix_remove_outdated_v8_flags_from_node_cc.patch @@ -5,15 +5,17 @@ Subject: fix: remove outdated V8 flags from node.cc Refs https://chromium-review.googlesource.com/c/v8/v8/+/5507047 Refs https://chromium-review.googlesource.com/c/v8/v8/+/6249026 +Refs https://chromium-review.googlesource.com/c/v8/v8/+/6948286 -The above CL removes the `--harmony-import-assertions` and ---experimental-wasm-memory64 flags from V8. +The above CL removes the `--harmony-import-assertions`, +`--experimental-wasm-imported-strings`, and +`--experimental-wasm-memory64` flags from V8. This patch can be removed when we upgrade to a V8 version that contains the above CLs. diff --git a/src/node.cc b/src/node.cc -index 07684482f855363e26c3d7299a585a8a5654015e..627337efae49319e2a77b4686176ce92a8493024 100644 +index 07684482f855363e26c3d7299a585a8a5654015e..ed8e0d1aec60bf22c13c73628f145312caf5d841 100644 --- a/src/node.cc +++ b/src/node.cc @@ -816,7 +816,7 @@ static ExitCode ProcessGlobalArgsInternal(std::vector* args, @@ -25,11 +27,13 @@ index 07684482f855363e26c3d7299a585a8a5654015e..627337efae49319e2a77b4686176ce92 auto env_opts = per_process::cli_options->per_isolate->per_env; if (std::find(v8_args.begin(), v8_args.end(), -@@ -828,7 +828,7 @@ static ExitCode ProcessGlobalArgsInternal(std::vector* args, +@@ -827,8 +827,8 @@ static ExitCode ProcessGlobalArgsInternal(std::vector* args, + } // Support stable Phase 5 WebAssembly proposals - v8_args.emplace_back("--experimental-wasm-imported-strings"); +- v8_args.emplace_back("--experimental-wasm-imported-strings"); - v8_args.emplace_back("--experimental-wasm-memory64"); ++ //v8_args.emplace_back("--experimental-wasm-imported-strings"); + // v8_args.emplace_back("--experimental-wasm-memory64"); v8_args.emplace_back("--experimental-wasm-exnref"); diff --git a/patches/node/fix_replace_deprecated_setprototype.patch b/patches/node/fix_replace_deprecated_setprototype.patch new file mode 100644 index 000000000000..9ff6e62ccb77 --- /dev/null +++ b/patches/node/fix_replace_deprecated_setprototype.patch @@ -0,0 +1,58 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Maddock +Date: Mon, 6 Oct 2025 16:34:43 -0400 +Subject: fix: replace deprecated SetPrototype + +https://chromium-review.googlesource.com/c/v8/v8/+/6983465 + +This is already applied in newer versions of Node so we can drop +this patch once we upgrade to v23. + +diff --git a/src/api/environment.cc b/src/api/environment.cc +index 0a358735c331767e8eb563a80e9aaccfb544c27b..d7d18d5fcbf008ac131db189a141315af4f6410b 100644 +--- a/src/api/environment.cc ++++ b/src/api/environment.cc +@@ -835,7 +835,7 @@ MaybeLocal InitializePrivateSymbols(Local context, + + Local private_symbols_object; + if (!private_symbols->NewInstance(context).ToLocal(&private_symbols_object) || +- private_symbols_object->SetPrototype(context, Null(isolate)) ++ private_symbols_object->SetPrototypeV2(context, Null(isolate)) + .IsNothing()) { + return MaybeLocal(); + } +@@ -861,7 +861,7 @@ MaybeLocal InitializePerIsolateSymbols(Local context, + Local per_isolate_symbols_object; + if (!per_isolate_symbols->NewInstance(context).ToLocal( + &per_isolate_symbols_object) || +- per_isolate_symbols_object->SetPrototype(context, Null(isolate)) ++ per_isolate_symbols_object->SetPrototypeV2(context, Null(isolate)) + .IsNothing()) { + return MaybeLocal(); + } +diff --git a/src/node_constants.cc b/src/node_constants.cc +index 2f23cc63f148a792f1302e1d2d88822730abaa33..42678e5d11e5ff9543bf12ec02fee7d3263d7629 100644 +--- a/src/node_constants.cc ++++ b/src/node_constants.cc +@@ -1307,7 +1307,7 @@ void CreatePerContextProperties(Local target, + .FromJust()); + + Local internal_constants = Object::New(isolate); +- CHECK(internal_constants->SetPrototype(env->context(), ++ CHECK(internal_constants->SetPrototypeV2(env->context(), + Null(env->isolate())).FromJust()); + + DefineErrnoConstants(err_constants); +diff --git a/src/node_sqlite.cc b/src/node_sqlite.cc +index 96101167016573e80fff520256ebb78c71d83302..cdc50b7e9abc2b5944ffd9c5ea1882f4fb9e1421 100644 +--- a/src/node_sqlite.cc ++++ b/src/node_sqlite.cc +@@ -2108,7 +2108,7 @@ void StatementSync::Iterate(const FunctionCallbackInfo& args) { + if (iter->object() + ->GetPrototype() + .As() +- ->SetPrototype(context, js_iterator_prototype) ++ ->SetPrototypeV2(context, js_iterator_prototype) + .IsNothing()) { + return; + } diff --git a/patches/node/refactor_attach_cppgc_heap_on_v8_isolate_creation.patch b/patches/node/refactor_attach_cppgc_heap_on_v8_isolate_creation.patch index 991b0cfe3154..1c367d9b877a 100644 --- a/patches/node/refactor_attach_cppgc_heap_on_v8_isolate_creation.patch +++ b/patches/node/refactor_attach_cppgc_heap_on_v8_isolate_creation.patch @@ -102,7 +102,7 @@ index 2d5fa8dbd75851bca30453548f6cbe0159509f26..c346e3a9c827993036438685d758a734 worker::Worker* worker_context_ = nullptr; PerIsolateWrapperData* wrapper_data_; diff --git a/src/node.cc b/src/node.cc -index 627337efae49319e2a77b4686176ce92a8493024..f0c0b6229048a2e9bc05684fab44ab09bc34e1f6 100644 +index ed8e0d1aec60bf22c13c73628f145312caf5d841..2dfdaec589e9b88af73ba388ea3c059ef27d243b 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1295,6 +1295,14 @@ InitializeOncePerProcessInternal(const std::vector& args, diff --git a/patches/node/src_switch_from_get_setprototype_to_get_setprototypev2.patch b/patches/node/src_switch_from_get_setprototype_to_get_setprototypev2.patch new file mode 100644 index 000000000000..79190df99fd4 --- /dev/null +++ b/patches/node/src_switch_from_get_setprototype_to_get_setprototypev2.patch @@ -0,0 +1,173 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aviv Keller +Date: Tue, 22 Oct 2024 01:05:19 -0400 +Subject: src: switch from `Get/SetPrototype` to `Get/SetPrototypeV2` + +PR-URL: https://github.com/nodejs/node/pull/55453 +Reviewed-By: Vladimir Morozov +Reviewed-By: Yagiz Nizipli +Reviewed-By: Moshe Atlow +Reviewed-By: James M Snell + +diff --git a/src/api/environment.cc b/src/api/environment.cc +index 82f53bba29613de212f64be440ca20d7c630fddf..0a358735c331767e8eb563a80e9aaccfb544c27b 100644 +--- a/src/api/environment.cc ++++ b/src/api/environment.cc +@@ -886,7 +886,7 @@ Maybe InitializePrimordials(Local context, + CHECK(!exports->Has(context, primordials_string).FromJust()); + + Local primordials = Object::New(isolate); +- if (primordials->SetPrototype(context, Null(isolate)).IsNothing() || ++ if (primordials->SetPrototypeV2(context, Null(isolate)).IsNothing() || + exports->Set(context, primordials_string, primordials).IsNothing()) { + return Nothing(); + } +diff --git a/src/internal_only_v8.cc b/src/internal_only_v8.cc +index 487b8b7adfd35646d20fdb15be5fd6f2bee9315b..6a3c4e6952a8f3250bf1b57652a1622e9f63ec52 100644 +--- a/src/internal_only_v8.cc ++++ b/src/internal_only_v8.cc +@@ -33,8 +33,8 @@ class PrototypeChainHas : public v8::QueryObjectPredicate { + if (creation_context != context_) { + return false; + } +- for (Local proto = object->GetPrototype(); proto->IsObject(); +- proto = proto.As()->GetPrototype()) { ++ for (Local proto = object->GetPrototypeV2(); proto->IsObject(); ++ proto = proto.As()->GetPrototypeV2()) { + if (search_ == proto) return true; + } + return false; +diff --git a/src/js_native_api_v8.cc b/src/js_native_api_v8.cc +index de3d1f2f1832740b24480267f8c573794179859c..6e1680a74e21240ab99be86dcf23e60a05174888 100644 +--- a/src/js_native_api_v8.cc ++++ b/src/js_native_api_v8.cc +@@ -1577,7 +1577,7 @@ napi_status NAPI_CDECL napi_get_prototype(napi_env env, + CHECK_TO_OBJECT(env, context, obj, object); + + // This doesn't invokes Proxy's [[GetPrototypeOf]] handler. +- v8::Local val = obj->GetPrototype(); ++ v8::Local val = obj->GetPrototypeV2(); + *result = v8impl::JsValueFromV8LocalValue(val); + return GET_RETURN_STATUS(env); + } +diff --git a/src/node_buffer.cc b/src/node_buffer.cc +index c94b14741c827a81d69a6f036426a344e563ad72..15129e4455fdc8792f21511a04d534ba3a4ebb5f 100644 +--- a/src/node_buffer.cc ++++ b/src/node_buffer.cc +@@ -284,8 +284,9 @@ MaybeLocal New(Environment* env, + size_t length) { + CHECK(!env->buffer_prototype_object().IsEmpty()); + Local ui = Uint8Array::New(ab, byte_offset, length); +- if (ui->SetPrototype(env->context(), env->buffer_prototype_object()) +- .IsNothing()) { ++ Maybe mb = ++ ui->SetPrototypeV2(env->context(), env->buffer_prototype_object()); ++ if (mb.IsNothing()) { + return MaybeLocal(); + } + return ui; +diff --git a/src/node_constants.cc b/src/node_constants.cc +index b1ee513fc0873a51b4885f612dbf7b950b5cf2ca..2f23cc63f148a792f1302e1d2d88822730abaa33 100644 +--- a/src/node_constants.cc ++++ b/src/node_constants.cc +@@ -1267,43 +1267,44 @@ void CreatePerContextProperties(Local target, + Isolate* isolate = Isolate::GetCurrent(); + Environment* env = Environment::GetCurrent(context); + +- CHECK(target->SetPrototype(env->context(), Null(env->isolate())).FromJust()); ++ CHECK( ++ target->SetPrototypeV2(env->context(), Null(env->isolate())).FromJust()); + + Local os_constants = Object::New(isolate); +- CHECK(os_constants->SetPrototype(env->context(), +- Null(env->isolate())).FromJust()); ++ CHECK(os_constants->SetPrototypeV2(env->context(), Null(env->isolate())) ++ .FromJust()); + + Local err_constants = Object::New(isolate); +- CHECK(err_constants->SetPrototype(env->context(), +- Null(env->isolate())).FromJust()); ++ CHECK(err_constants->SetPrototypeV2(env->context(), Null(env->isolate())) ++ .FromJust()); + + Local sig_constants = Object::New(isolate); +- CHECK(sig_constants->SetPrototype(env->context(), +- Null(env->isolate())).FromJust()); ++ CHECK(sig_constants->SetPrototypeV2(env->context(), Null(env->isolate())) ++ .FromJust()); + + Local priority_constants = Object::New(isolate); +- CHECK(priority_constants->SetPrototype(env->context(), +- Null(env->isolate())).FromJust()); ++ CHECK(priority_constants->SetPrototypeV2(env->context(), Null(env->isolate())) ++ .FromJust()); + + Local fs_constants = Object::New(isolate); +- CHECK(fs_constants->SetPrototype(env->context(), +- Null(env->isolate())).FromJust()); ++ CHECK(fs_constants->SetPrototypeV2(env->context(), Null(env->isolate())) ++ .FromJust()); + + Local crypto_constants = Object::New(isolate); +- CHECK(crypto_constants->SetPrototype(env->context(), +- Null(env->isolate())).FromJust()); ++ CHECK(crypto_constants->SetPrototypeV2(env->context(), Null(env->isolate())) ++ .FromJust()); + + Local zlib_constants = Object::New(isolate); +- CHECK(zlib_constants->SetPrototype(env->context(), +- Null(env->isolate())).FromJust()); ++ CHECK(zlib_constants->SetPrototypeV2(env->context(), Null(env->isolate())) ++ .FromJust()); + + Local dlopen_constants = Object::New(isolate); +- CHECK(dlopen_constants->SetPrototype(env->context(), +- Null(env->isolate())).FromJust()); ++ CHECK(dlopen_constants->SetPrototypeV2(env->context(), Null(env->isolate())) ++ .FromJust()); + + Local trace_constants = Object::New(isolate); +- CHECK(trace_constants->SetPrototype(env->context(), +- Null(env->isolate())).FromJust()); ++ CHECK(trace_constants->SetPrototypeV2(env->context(), Null(env->isolate())) ++ .FromJust()); + + Local internal_constants = Object::New(isolate); + CHECK(internal_constants->SetPrototype(env->context(), +diff --git a/src/node_options.cc b/src/node_options.cc +index 556776b79282d953fdc371d1901f21ca301bec1a..b33193c4d017b35aec5e73c1ead04cfb3ba50d55 100644 +--- a/src/node_options.cc ++++ b/src/node_options.cc +@@ -1493,7 +1493,8 @@ void GetCLIOptionsInfo(const FunctionCallbackInfo& args) { + + Local options = Map::New(isolate); + if (options +- ->SetPrototype(context, env->primordials_safe_map_prototype_object()) ++ ->SetPrototypeV2(context, ++ env->primordials_safe_map_prototype_object()) + .IsNothing()) { + return; + } +@@ -1533,7 +1534,8 @@ void GetCLIOptionsInfo(const FunctionCallbackInfo& args) { + if (!ToV8Value(context, _ppop_instance.aliases_).ToLocal(&aliases)) return; + + if (aliases.As() +- ->SetPrototype(context, env->primordials_safe_map_prototype_object()) ++ ->SetPrototypeV2(context, ++ env->primordials_safe_map_prototype_object()) + .IsNothing()) { + return; + } +diff --git a/src/node_webstorage.cc b/src/node_webstorage.cc +index 1705e430099c5a363e02010f83d729b0aa54f8e5..0577777723747327dc57830ace316aebc0cfd891 100644 +--- a/src/node_webstorage.cc ++++ b/src/node_webstorage.cc +@@ -532,7 +532,7 @@ template + static bool ShouldIntercept(Local property, + const PropertyCallbackInfo& info) { + Environment* env = Environment::GetCurrent(info); +- Local proto = info.This()->GetPrototype(); ++ Local proto = info.This()->GetPrototypeV2(); + + if (proto->IsObject()) { + bool has_prop; diff --git a/patches/v8/.patches b/patches/v8/.patches index 19408f804516..dc98544242e8 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -1,2 +1 @@ chore_allow_customizing_microtask_policy_per_context.patch -cherry-pick-ec6c18478382.patch diff --git a/patches/v8/cherry-pick-ec6c18478382.patch b/patches/v8/cherry-pick-ec6c18478382.patch deleted file mode 100644 index 453f6d61945e..000000000000 --- a/patches/v8/cherry-pick-ec6c18478382.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Darius Mercadier -Date: Tue, 16 Sep 2025 16:40:24 +0200 -Subject: Don't assume that upper 32-bit of Int32MulOvfCheck are 0 - -Because Arm64 doesn't have a flag-setting 32-bit multiplication, -which means that instead with use a 64-bit multiplication, and compare -result.X() and result.W() to check if an overflow happened. But this -leads to the upper 32-bit not being zeroed. - -Fixed: 445380761 -Change-Id: I31287faf37dc615695047021324e9d1d802cbec2 -Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6954290 -Auto-Submit: Darius Mercadier -Commit-Queue: Leszek Swirski -Reviewed-by: Leszek Swirski -Cr-Commit-Position: refs/heads/main@{#102530} - -diff --git a/src/compiler/backend/arm64/instruction-selector-arm64.cc b/src/compiler/backend/arm64/instruction-selector-arm64.cc -index 541b81352fb302dcac812df4da42a3c4ce3a0fb9..eed3ee9764e78fa6b0402a1b86165bd7a61edee9 100644 ---- a/src/compiler/backend/arm64/instruction-selector-arm64.cc -+++ b/src/compiler/backend/arm64/instruction-selector-arm64.cc -@@ -2966,9 +2966,19 @@ bool InstructionSelector::ZeroExtendsWord32ToWord64NoPhis(OpIndex node) { - return op.Cast().rep == WordRepresentation::Word32(); - case Opcode::kComparison: - return op.Cast().rep == RegisterRepresentation::Word32(); -- case Opcode::kOverflowCheckedBinop: -- return op.Cast().rep == -- WordRepresentation::Word32(); -+ case Opcode::kOverflowCheckedBinop: { -+ const OverflowCheckedBinopOp& binop = op.Cast(); -+ if (binop.rep != WordRepresentation::Word32()) return false; -+ switch (binop.kind) { -+ case OverflowCheckedBinopOp::Kind::kSignedAdd: -+ case OverflowCheckedBinopOp::Kind::kSignedSub: -+ return true; -+ case OverflowCheckedBinopOp::Kind::kSignedMul: -+ // EmitInt32MulWithOverflow doesn't zero-extend because Arm64 doesn't -+ // have a flag-setting int32 multiplication. -+ return false; -+ } -+ } - case Opcode::kProjection: - return ZeroExtendsWord32ToWord64NoPhis(op.Cast().input()); - case Opcode::kLoad: { diff --git a/shell/browser/api/electron_api_base_window.cc b/shell/browser/api/electron_api_base_window.cc index b362c47a221c..f39eab9bd4f1 100644 --- a/shell/browser/api/electron_api_base_window.cc +++ b/shell/browser/api/electron_api_base_window.cc @@ -33,6 +33,7 @@ #include "shell/common/node_includes.h" #include "shell/common/node_util.h" #include "shell/common/options_switches.h" +#include "ui/gfx/image/image_skia.h" #if defined(TOOLKIT_VIEWS) #include "shell/browser/native_window_views.h" diff --git a/shell/browser/api/electron_api_native_theme.cc b/shell/browser/api/electron_api_native_theme.cc index eaf0d6e228ad..fa7f9fbbeff9 100644 --- a/shell/browser/api/electron_api_native_theme.cc +++ b/shell/browser/api/electron_api_native_theme.cc @@ -93,7 +93,8 @@ bool NativeTheme::ShouldUseDarkColorsForSystemIntegratedUI() { } bool NativeTheme::InForcedColorsMode() { - return ui_theme_->forced_colors(); + return ui_theme_->forced_colors() != + ui::ColorProviderKey::ForcedColors::kNone; } bool NativeTheme::GetPrefersReducedTransparency() { @@ -116,7 +117,8 @@ bool NativeTheme::ShouldUseInvertedColorScheme() { return false; return is_inverted; #else - return ui_theme_->forced_colors() && + return ui_theme_->forced_colors() != + ui::ColorProviderKey::ForcedColors::kNone && ui_theme_->preferred_color_scheme() == ui::NativeTheme::PreferredColorScheme::kDark; #endif diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index 4bc89421dd7b..a4242bcf1a2e 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -815,27 +815,33 @@ void Session::SetDownloadPath(const base::FilePath& path) { } void Session::EnableNetworkEmulation(const gin_helper::Dictionary& options) { - auto conditions = network::mojom::NetworkConditions::New(); - - options.Get("offline", &conditions->offline); - options.Get("downloadThroughput", &conditions->download_throughput); - options.Get("uploadThroughput", &conditions->upload_throughput); + std::vector matched_conditions; + network::mojom::MatchedNetworkConditionsPtr network_conditions = + network::mojom::MatchedNetworkConditions::New(); + network_conditions->conditions = network::mojom::NetworkConditions::New(); + options.Get("offline", &network_conditions->conditions->offline); + options.Get("downloadThroughput", + &network_conditions->conditions->download_throughput); + options.Get("uploadThroughput", + &network_conditions->conditions->upload_throughput); double latency = 0.0; if (options.Get("latency", &latency) && latency) { - conditions->latency = base::Milliseconds(latency); + network_conditions->conditions->latency = base::Milliseconds(latency); } + matched_conditions.emplace_back(std::move(network_conditions)); auto* network_context = browser_context_->GetDefaultStoragePartition()->GetNetworkContext(); network_context->SetNetworkConditions(network_emulation_token_, - std::move(conditions)); + std::move(matched_conditions)); } void Session::DisableNetworkEmulation() { auto* network_context = browser_context_->GetDefaultStoragePartition()->GetNetworkContext(); - network_context->SetNetworkConditions( - network_emulation_token_, network::mojom::NetworkConditions::New()); + std::vector network_conditions; + network_context->SetNetworkConditions(network_emulation_token_, + std::move(network_conditions)); } void Session::SetCertVerifyProc(v8::Local val, diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index f4b27971a5a9..cb0eb497b36d 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -2835,7 +2835,8 @@ void WebContents::EnableDeviceEmulation( frame_host->GetView()->GetRenderWidgetHost()); if (widget_host_impl) { auto& frame_widget = widget_host_impl->GetAssociatedFrameWidget(); - frame_widget->EnableDeviceEmulation(params); + frame_widget->EnableDeviceEmulation( + params, blink::mojom::DeviceEmulationCacheBehavior::kClearCache); } } } diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index ea0db0c3091b..fd3efa0df7e7 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -427,7 +427,8 @@ void ElectronBrowserClient::OverrideWebPreferences( renderer_prefs->can_accept_load_drops = false; ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi(); - prefs->in_forced_colors = native_theme->forced_colors(); + prefs->in_forced_colors = native_theme->forced_colors() != + ui::ColorProviderKey::ForcedColors::kNone; prefs->preferred_color_scheme = native_theme->preferred_color_scheme() == ui::NativeTheme::PreferredColorScheme::kDark @@ -447,7 +448,8 @@ bool ElectronBrowserClient::WebPreferencesNeedUpdateForColorRelatedStateChanges( const content::SiteInstance& main_frame_site) const { const auto& prefs = web_contents.GetOrCreateWebPreferences(); ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi(); - bool in_forced_colors = native_theme->forced_colors(); + bool in_forced_colors = native_theme->forced_colors() != + ui::ColorProviderKey::ForcedColors::kNone; blink::mojom::PreferredColorScheme preferred_color_scheme = native_theme->preferred_color_scheme() == ui::NativeTheme::PreferredColorScheme::kDark diff --git a/shell/browser/extensions/electron_messaging_delegate.cc b/shell/browser/extensions/electron_messaging_delegate.cc index 0ec714a4825d..a76c85f2b2bb 100644 --- a/shell/browser/extensions/electron_messaging_delegate.cc +++ b/shell/browser/extensions/electron_messaging_delegate.cc @@ -22,7 +22,7 @@ #include "extensions/common/api/messaging/port_id.h" #include "extensions/common/extension.h" #include "shell/browser/api/electron_api_web_contents.h" -#include "ui/gfx/native_widget_types.h" +#include "ui/gfx/native_ui_types.h" #include "url/gurl.h" namespace extensions { diff --git a/shell/browser/native_window_mac.h b/shell/browser/native_window_mac.h index 2a0192aa9e6b..66b647ff10e2 100644 --- a/shell/browser/native_window_mac.h +++ b/shell/browser/native_window_mac.h @@ -225,7 +225,7 @@ class NativeWindowMac : public NativeWindow, // views::WidgetDelegate: views::View* GetContentsView() override; bool CanMaximize() const override; - std::unique_ptr CreateNonClientFrameView( + std::unique_ptr CreateFrameView( views::Widget* widget) override; void OnWidgetInitialized() override; diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 8ddc2aa996fe..30e0490bc3cf 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -1718,8 +1718,8 @@ class NativeAppWindowFrameViewMacClient const raw_ptr native_app_window_; }; -std::unique_ptr -NativeWindowMac::CreateNonClientFrameView(views::Widget* widget) { +std::unique_ptr NativeWindowMac::CreateFrameView( + views::Widget* widget) { CHECK(!frame_view_client_); frame_view_client_ = std::make_unique(widget, this); diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index cea10c93d318..ba1bff68d90c 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -43,7 +43,7 @@ #include "ui/compositor/compositor.h" #include "ui/display/screen.h" #include "ui/gfx/image/image.h" -#include "ui/gfx/native_widget_types.h" +#include "ui/gfx/native_ui_types.h" #include "ui/ozone/public/ozone_platform.h" #include "ui/views/background.h" #include "ui/views/controls/webview/webview.h" @@ -1846,8 +1846,8 @@ views::ClientView* NativeWindowViews::CreateClientView(views::Widget* widget) { return new NativeWindowClientView{widget, &root_view_, this}; } -std::unique_ptr -NativeWindowViews::CreateNonClientFrameView(views::Widget* widget) { +std::unique_ptr NativeWindowViews::CreateFrameView( + views::Widget* widget) { #if BUILDFLAG(IS_WIN) auto frame_view = std::make_unique(); frame_view->Init(this, widget); @@ -1874,7 +1874,7 @@ electron::ClientFrameViewLinux* NativeWindowViews::GetClientFrameViewLinux() { // Check to make sure this window's non-client frame view is a // ClientFrameViewLinux. If either has_frame() or has_client_frame() // are false, it will be an OpaqueFrameView or NativeFrameView instead. - // See NativeWindowViews::CreateNonClientFrameView. + // See NativeWindowViews::CreateFrameView. if (!has_frame() || !has_client_frame()) return {}; return static_cast( diff --git a/shell/browser/native_window_views.h b/shell/browser/native_window_views.h index 052467120fe2..f01c7b557d6a 100644 --- a/shell/browser/native_window_views.h +++ b/shell/browser/native_window_views.h @@ -191,7 +191,7 @@ class NativeWindowViews : public NativeWindow, SkColor overlay_symbol_color() const { return overlay_symbol_color_; } #if BUILDFLAG(IS_LINUX) - // returns the ClientFrameViewLinux iff that is our NonClientFrameView type, + // returns the ClientFrameViewLinux iff that is our FrameView type, // nullptr otherwise. ClientFrameViewLinux* GetClientFrameViewLinux(); #endif @@ -220,7 +220,7 @@ class NativeWindowViews : public NativeWindow, gfx::NativeView child, const gfx::Point& location) override; views::ClientView* CreateClientView(views::Widget* widget) override; - std::unique_ptr CreateNonClientFrameView( + std::unique_ptr CreateFrameView( views::Widget* widget) override; void OnWidgetMove() override; #if BUILDFLAG(IS_WIN) diff --git a/shell/browser/osr/osr_host_display_client.h b/shell/browser/osr/osr_host_display_client.h index e95eb43bd1ef..fc914b52fd35 100644 --- a/shell/browser/osr/osr_host_display_client.h +++ b/shell/browser/osr/osr_host_display_client.h @@ -14,7 +14,7 @@ #include "shell/browser/osr/osr_paint_event.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkCanvas.h" -#include "ui/gfx/native_widget_types.h" +#include "ui/gfx/native_ui_types.h" class SkBitmap; class SkCanvas; diff --git a/shell/browser/osr/osr_paint_event.h b/shell/browser/osr/osr_paint_event.h index cd8f8710c670..b3e37a6a1685 100644 --- a/shell/browser/osr/osr_paint_event.h +++ b/shell/browser/osr/osr_paint_event.h @@ -13,7 +13,7 @@ #include "services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom.h" #include "third_party/skia/include/core/SkCanvas.h" #include "ui/gfx/canvas.h" -#include "ui/gfx/native_widget_types.h" +#include "ui/gfx/native_ui_types.h" #include diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index 81e4606e3fb8..4e27671d2366 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -45,7 +45,7 @@ #include "ui/gfx/geometry/dip_util.h" #include "ui/gfx/geometry/size_conversions.h" #include "ui/gfx/image/image_skia.h" -#include "ui/gfx/native_widget_types.h" +#include "ui/gfx/native_ui_types.h" #include "ui/gfx/skbitmap_operations.h" #include "ui/latency/latency_info.h" diff --git a/shell/browser/ui/drag_util.h b/shell/browser/ui/drag_util.h index 55fed34ca0d6..fb4120c4476c 100644 --- a/shell/browser/ui/drag_util.h +++ b/shell/browser/ui/drag_util.h @@ -9,7 +9,7 @@ #include #include "third_party/blink/public/mojom/page/draggable_region.mojom-forward.h" -#include "ui/gfx/native_widget_types.h" +#include "ui/gfx/native_ui_types.h" class SkRegion; diff --git a/shell/browser/ui/drag_util_views.cc b/shell/browser/ui/drag_util_views.cc index ccd0ea6bffe5..4e4aa8870eeb 100644 --- a/shell/browser/ui/drag_util_views.cc +++ b/shell/browser/ui/drag_util_views.cc @@ -12,6 +12,7 @@ #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/display/screen.h" #include "ui/gfx/geometry/point.h" +#include "ui/gfx/image/image_skia.h" #include "ui/views/button_drag_utils.h" #include "ui/views/widget/widget.h" #include "url/gurl.h" diff --git a/shell/browser/ui/inspectable_web_contents_view.h b/shell/browser/ui/inspectable_web_contents_view.h index 282d3bf805a9..30c2fef8e898 100644 --- a/shell/browser/ui/inspectable_web_contents_view.h +++ b/shell/browser/ui/inspectable_web_contents_view.h @@ -10,7 +10,7 @@ #include "base/memory/raw_ptr.h" #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h" -#include "ui/gfx/native_widget_types.h" +#include "ui/gfx/native_ui_types.h" #include "ui/views/view.h" class DevToolsContentsResizingStrategy; diff --git a/shell/browser/ui/tray_icon_linux.h b/shell/browser/ui/tray_icon_linux.h index baff7a625a4d..d8cd0ef1e54e 100644 --- a/shell/browser/ui/tray_icon_linux.h +++ b/shell/browser/ui/tray_icon_linux.h @@ -9,6 +9,7 @@ #include #include "shell/browser/ui/tray_icon.h" +#include "ui/gfx/image/image_skia.h" #include "ui/linux/status_icon_linux.h" class StatusIconLinuxDbus; diff --git a/shell/browser/ui/views/client_frame_view_linux.cc b/shell/browser/ui/views/client_frame_view_linux.cc index 316752492b4f..c03a1b51f74e 100644 --- a/shell/browser/ui/views/client_frame_view_linux.cc +++ b/shell/browser/ui/views/client_frame_view_linux.cc @@ -495,7 +495,7 @@ gfx::Size ClientFrameViewLinux::SizeWithDecorations(gfx::Size size) const { views::View* ClientFrameViewLinux::TargetForRect(views::View* root, const gfx::Rect& rect) { - return views::NonClientFrameView::TargetForRect(root, rect); + return views::FrameView::TargetForRect(root, rect); } int ClientFrameViewLinux::GetTranslucentTopAreaHeight() const { diff --git a/shell/browser/ui/views/client_frame_view_linux.h b/shell/browser/ui/views/client_frame_view_linux.h index 0d8f4050b950..54cbc9a1c35e 100644 --- a/shell/browser/ui/views/client_frame_view_linux.h +++ b/shell/browser/ui/views/client_frame_view_linux.h @@ -64,7 +64,7 @@ class ClientFrameViewLinux : public FramelessView, // Overridden from FramelessView: int ResizingBorderHitTest(const gfx::Point& point) override; - // Overridden from views::NonClientFrameView: + // Overridden from views::FrameView: gfx::Rect GetBoundsForClientView() const override; gfx::Rect GetWindowBoundsForClientBounds( const gfx::Rect& client_bounds) const override; diff --git a/shell/browser/ui/views/electron_views_delegate.cc b/shell/browser/ui/views/electron_views_delegate.cc index eff63f089db7..447951f42dbb 100644 --- a/shell/browser/ui/views/electron_views_delegate.cc +++ b/shell/browser/ui/views/electron_views_delegate.cc @@ -60,8 +60,8 @@ gfx::ImageSkia* ViewsDelegate::GetDefaultWindowIcon() const { } #endif -std::unique_ptr -ViewsDelegate::CreateDefaultNonClientFrameView(views::Widget* widget) { +std::unique_ptr ViewsDelegate::CreateDefaultFrameView( + views::Widget* widget) { return nullptr; } diff --git a/shell/browser/ui/views/electron_views_delegate.h b/shell/browser/ui/views/electron_views_delegate.h index 62298e240de5..2b97b0906fff 100644 --- a/shell/browser/ui/views/electron_views_delegate.h +++ b/shell/browser/ui/views/electron_views_delegate.h @@ -47,7 +47,7 @@ class ViewsDelegate : public views::ViewsDelegate { #elif BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) gfx::ImageSkia* GetDefaultWindowIcon() const override; #endif - std::unique_ptr CreateDefaultNonClientFrameView( + std::unique_ptr CreateDefaultFrameView( views::Widget* widget) override; void AddRef() override {} void ReleaseRef() override {} diff --git a/shell/browser/ui/views/frameless_view.cc b/shell/browser/ui/views/frameless_view.cc index dcfed5ef695f..420a825f2757 100644 --- a/shell/browser/ui/views/frameless_view.cc +++ b/shell/browser/ui/views/frameless_view.cc @@ -96,7 +96,7 @@ views::View* FramelessView::TargetForRect(views::View* root, if (NonClientHitTest(rect.origin()) != HTCLIENT) return this; - return NonClientFrameView::TargetForRect(root, rect); + return FrameView::TargetForRect(root, rect); } gfx::Size FramelessView::CalculatePreferredSize( diff --git a/shell/browser/ui/views/frameless_view.h b/shell/browser/ui/views/frameless_view.h index bea0ba58482a..e391cb9bd7c2 100644 --- a/shell/browser/ui/views/frameless_view.h +++ b/shell/browser/ui/views/frameless_view.h @@ -17,8 +17,8 @@ namespace electron { class NativeWindowViews; -class FramelessView : public views::NonClientFrameView { - METADATA_HEADER(FramelessView, views::NonClientFrameView) +class FramelessView : public views::FrameView { + METADATA_HEADER(FramelessView, views::FrameView) public: FramelessView(); @@ -46,7 +46,7 @@ class FramelessView : public views::NonClientFrameView { int ResizingBorderHitTestImpl(const gfx::Point& point, const gfx::Insets& resize_border); - // views::NonClientFrameView: + // views::FrameView: gfx::Rect GetBoundsForClientView() const override; gfx::Rect GetWindowBoundsForClientBounds( const gfx::Rect& client_bounds) const override; diff --git a/shell/browser/ui/views/global_menu_bar_x11.h b/shell/browser/ui/views/global_menu_bar_x11.h index 0851822fc3f1..e086273dd6fe 100644 --- a/shell/browser/ui/views/global_menu_bar_x11.h +++ b/shell/browser/ui/views/global_menu_bar_x11.h @@ -10,7 +10,7 @@ #include "base/memory/raw_ptr.h" #include "shell/browser/ui/electron_menu_model.h" #include "ui/base/glib/scoped_gsignal.h" -#include "ui/gfx/native_widget_types.h" +#include "ui/gfx/native_ui_types.h" #include "ui/gfx/x/xproto.h" typedef struct _DbusmenuMenuitem DbusmenuMenuitem; diff --git a/shell/browser/ui/views/opaque_frame_view.cc b/shell/browser/ui/views/opaque_frame_view.cc index 43ce17250491..e80535a973d7 100644 --- a/shell/browser/ui/views/opaque_frame_view.cc +++ b/shell/browser/ui/views/opaque_frame_view.cc @@ -160,7 +160,7 @@ int OpaqueFrameView::NonClientHitTest(const gfx::Point& point) { } void OpaqueFrameView::ResetWindowControls() { - NonClientFrameView::ResetWindowControls(); + FrameView::ResetWindowControls(); if (restore_button_) restore_button_->SetState(views::Button::STATE_NORMAL); @@ -173,7 +173,7 @@ void OpaqueFrameView::ResetWindowControls() { views::View* OpaqueFrameView::TargetForRect(views::View* root, const gfx::Rect& rect) { - return views::NonClientFrameView::TargetForRect(root, rect); + return views::FrameView::TargetForRect(root, rect); } void OpaqueFrameView::Layout(PassKey) { diff --git a/shell/browser/ui/views/opaque_frame_view.h b/shell/browser/ui/views/opaque_frame_view.h index dae79d03f493..94da7e876613 100644 --- a/shell/browser/ui/views/opaque_frame_view.h +++ b/shell/browser/ui/views/opaque_frame_view.h @@ -40,7 +40,7 @@ class OpaqueFrameView : public FramelessView { int ResizingBorderHitTest(const gfx::Point& point) override; void InvalidateCaptionButtons() override; - // views::NonClientFrameView: + // views::FrameView: gfx::Rect GetBoundsForClientView() const override; gfx::Rect GetWindowBoundsForClientBounds( const gfx::Rect& client_bounds) const override; diff --git a/shell/browser/ui/views/win_frame_view.cc b/shell/browser/ui/views/win_frame_view.cc index 88a18703a00a..1c158529db0c 100644 --- a/shell/browser/ui/views/win_frame_view.cc +++ b/shell/browser/ui/views/win_frame_view.cc @@ -89,7 +89,7 @@ views::View* WinFrameView::TargetForRect(views::View* root, return this; } - return NonClientFrameView::TargetForRect(root, rect); + return FrameView::TargetForRect(root, rect); } int WinFrameView::NonClientHitTest(const gfx::Point& point) { @@ -170,7 +170,7 @@ void WinFrameView::Layout(PassKey) { if (window()->IsWindowControlsOverlayEnabled()) { LayoutWindowControlsOverlay(); } - LayoutSuperclass(this); + LayoutSuperclass(this); } int WinFrameView::FrameTopBorderThickness(bool restored) const { diff --git a/shell/browser/ui/views/win_frame_view.h b/shell/browser/ui/views/win_frame_view.h index 203b4055bddf..679e24ba272b 100644 --- a/shell/browser/ui/views/win_frame_view.h +++ b/shell/browser/ui/views/win_frame_view.h @@ -31,7 +31,7 @@ class WinFrameView : public FramelessView { SkColor GetReadableFeatureColor(SkColor background_color); - // views::NonClientFrameView: + // views::FrameView: gfx::Rect GetWindowBoundsForClientBounds( const gfx::Rect& client_bounds) const override; int NonClientHitTest(const gfx::Point& point) override; diff --git a/shell/common/gin_converters/base_converter.h b/shell/common/gin_converters/base_converter.h index 56c420d77d81..37aa2bd34ddf 100644 --- a/shell/common/gin_converters/base_converter.h +++ b/shell/common/gin_converters/base_converter.h @@ -35,6 +35,8 @@ struct Converter { case base::TERMINATION_STATUS_INTEGRITY_FAILURE: return gin::ConvertToV8(isolate, "integrity-failure"); #endif + case base::TERMINATION_STATUS_EVICTED_FOR_MEMORY: + return gin::ConvertToV8(isolate, "memory-eviction"); case base::TERMINATION_STATUS_MAX_ENUM: NOTREACHED(); }