From 1c36d90659266988fb4fb8814b30489ca8d02e60 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Thu, 24 Sep 2026 17:18:49 -0400 Subject: [PATCH] chore: bump chromium to 155.0.8059.0 (main) (#53936) * chore: bump chromium in DEPS to 155.0.8058.0 * 8373722: [macOS] Disclaim TCC responsibility for GPU process Upstream added IsCurrentProcessSelfResponsible() and a shared ResponsiblePidIfNotSelf() helper that call the private responsibility_get_pid_responsible_for_pid() API. Guard them for MAS builds too, where IsCurrentProcessSelfResponsible() reports true so the GPU process never tries to disclaim TCC responsibility. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8373722 Co-Authored-By: Claude Fable 5.1 * 8372283: [OSCrypt] Remove OSCrypt.Mac.SuccessAfterPreviousError histogram and code Upstream inlined GetPasswordImpl() into KeychainPassword::GetPassword(); move the suffixed-account lookup and legacy-account migration there. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8372283 Co-Authored-By: Claude Fable 5.1 * 8364168: [crash] Add CrashReporterClient hooks for upload options, annotations Upstream added ShouldRateLimitUploads(), ShouldCompressUploads() and GetExtraProcessAnnotations(), which replace the hooks that crash_allow_setting_more_options.patch added. Remove the patch and override the upstream virtuals in ElectronCrashReporterClient instead. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8364168 Co-Authored-By: Claude Fable 5.1 * 8364227: [usb] Defer UsbServiceImpl::GetDevices() until the first enumeration Removes chore_defer_usb_service_getdevices_request_until_usb_service_is.patch, which is now upstream. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8364227 Co-Authored-By: Claude Fable 5.1 * 8364646: [views] Let FrameCaptionButton take an explicit icon color Upstream added FrameCaptionButton::SetIconColor(ui::ColorVariant), which replaces the SetButtonColor() that feat_enable_customizing_symbol_color_in_framecaptionbutton.patch added, and GetButtonColor() stays static. Remove the patch. Set the frame color first and then the explicit symbol color, since the icon color comes from whichever setter ran last. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8364646 Co-Authored-By: Claude Fable 5.1 * 8360632: [input] Keep a hidden hung renderer marked unresponsive Drop the RenderInputRouter and RenderWidgetHostImpl hunks from refactor_unfilter_unresponsive_events.patch now that this change is upstream; only the WebContentsImpl::RendererUnresponsive() filtering change remains. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8360632 Co-Authored-By: Claude Fable 5.1 * 8363583: Static-assert that CSSPropertyEquality does not compare pointers with == Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8363583 Co-Authored-By: Claude Fable 5.1 * 8364228: [ozone/wayland] Tolerate a missing wl_seat in UpdateCursor() Removes fix_wayland_test_crash_on_teardown.patch, which is now upstream. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8364228 Co-Authored-By: Claude Fable 5.1 * 8364745: [base] Report MoveFile()'s own error from ReplaceFile() on Windows Removes fix_don_t_read_a_stale_last-error_in_replacefile_on_windows.patch, which is now upstream. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8364745 Co-Authored-By: Claude Fable 5.1 * 8364645: [ozone/wayland] Fix a window stuck maximized after an early Maximize() Removes fix_wayland_window_stuck_maximized_after_early_maximize.patch. Upstream fixes the root cause (previously_maximized_ latching on a stateless configure), so the patch's Restore() workaround is no longer needed. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8364645 Co-Authored-By: Claude Fable 5.1 * 8337991: [StatusIconLinuxDbus] Use unique D-Bus connection name instead of well-known name Upstream now registers every status icon under its connection's unique name, which fixes the missing Flatpak and Snap tray icon that fix_register_status_icon_with_unique_d-bus_name_when_owning_one.patch worked around. StatusNotifierWatcher implementations only drop an item once that name leaves the bus, so an icon created on the shared session bus would now linger after it is destroyed. Keep a reduced patch, fix_use_a_private_d-bus_connection_for_each_status_icon.patch, that always gives each status icon a private connection instead. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8337991 Co-Authored-By: Claude Fable 5.1 * 8361192: [cppgc] Use _AddressOfReturnAddress() for StackStartMarker under MSVC Removes v8/cppgc_support_stackstartmarker_on_msvc.patch, which is now upstream. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8361192 Co-Authored-By: Claude Fable 5.1 * 8381377: Roll Perfetto from 8665a1fa48ac to ced94af64d7e (2 revisions) The roll includes perfetto commit 5d6dd85f03 ("base: use intptr_t for ssize_t on Windows", https://github.com/google/perfetto/pull/7136), which upstreams define_ssize_t_to_be_intptr_t_to_match_libuv.patch. Remove the patch, keeping the perfetto target with an empty .patches so a later patch need not touch patches/config.json. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8381377 Co-Authored-By: Claude Fable 5.1 Co-Authored-By: Claude Opus 5.5 * chore: update siso revision * chore: update patches * 8379633: Standardize mojom arguments for which bindings are generated Blink bindings are now opt-in via generate_blink, and disable_variants no longer exists, so drop it from our mojom() targets. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8379633 Co-Authored-By: Claude Fable 5.1 * 8362279: Reland "[sandbox] Store CppHeapPointerHandles in EmbedderDataArray" JSObject embedder data slots now hold CppHeapPointerHandles and are visited through Serializer::ObjectSerializer::VisitCppHeapPointer(), whose DCHECK only expects API wrapper objects. JSPromise has an embedder slot too since Node.js and Electron build V8 with v8_promise_internal_field_count = 1, so node_mksnapshot hit the DCHECK while serializing the Node.js startup snapshot. Add a V8 patch that accepts every map that may have embedder fields. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8362279 Co-Authored-By: Claude Fable 5.1 * 8355366: Remove base::Process from content::ChildProcessData BrowserChildProcessLaunchedAndConnected() now receives the process separately, and BrowserChildProcessHostIterator exposes it directly. UtilityProcessWrapper can no longer match BrowserChildProcessCrashed() and BrowserChildProcessKilled() on the pid, so it looks up its child process id when the process launches and matches on that instead. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8355366 Co-Authored-By: Claude Fable 5.1 * 8263457: Add support for isolated browser restart Upstream removed BrowserMainLoop::SetResultCode(), which app.exit(code) used to make the browser process exit with an arbitrary code. Use its replacement, BrowserMainRunner::SetOverrideResultCode(), and patch out that method's check that codes are at or above content::RESULT_CODE_LAST_CODE, since app.exit() codes are chosen by the app. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8263457 Co-Authored-By: Claude Fable 5.1 Co-Authored-By: Claude Opus 5.5 * chore: bump chromium in DEPS to 155.0.8059.0 * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> * 7957800: Harden RenderWidgetHostViewBase Teardown Upstream replaced the virtual RenderWidgetHostViewBase::Destroy() with a non-virtual DestroyOrDefer() that disconnects the view from its host and then calls the new pure-virtual DestroyImpl(), possibly deferred while input dispatch pins the view. Subclasses must also implement the new pure-virtual CleanUpHostObservers(). OffScreenRenderWidgetHostView now overrides DestroyImpl() and CleanUpHostObservers(). The latter removes the render frame metadata observer, calls ViewDestroyed() on the host, and drops the cached host pointer since the host may be deleted before a deferred DestroyImpl() runs. The DelegatedFrameHostClient callbacks are null-guarded accordingly, mirroring DelegatedFrameHostClientAura. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7957800 Co-Authored-By: Claude Fable 5.1 * 8340933: Optimize FlexLayout and ProposedLayout allocation churn during resize Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8340933 Co-Authored-By: Claude Fable 5.1 * chore: update patches Co-Authored-By: Claude Opus 5 * 8365609: [metagen] Enable metagen instance types V8 now runs metagen by default, which loads the llvm-libclang package into the build's own Python. The Windows src cache is synced with host_os=linux, so Windows builders get no package at all. Have fix-sync re-fetch just that dep with a one-dep gclient sync, so gclient selects and extracts the object for the Windows host itself. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8365609 Co-Authored-By: Claude Opus 5.5 * 8354793: Remove dxil.dll from Windows builds and installer Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8354793 Co-Authored-By: Claude Opus 5.5 * chore: update patches Co-Authored-By: Claude Opus 5.5 * fixup! 8365609: [metagen] Enable metagen instance types * chore: update patches Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: clavin --- .github/actions/fix-sync/action.yml | 21 +++ DEPS | 2 +- build/siso_revision | 2 +- patches/chromium/.patches | 9 +- .../add_didinstallconditionalfeatures.patch | 24 +-- ..._scheduler_throttling_per_renderview.patch | 14 +- ..._windows_to_have_different_web_prefs.patch | 16 +- patches/chromium/blink_local_frame.patch | 4 +- patches/chromium/boringssl_build_gn.patch | 2 +- ..._mojom_interfaces_to_depend_on_blink.patch | 4 +- ...ld_allow_electron_to_use_exec_script.patch | 4 +- ...wlist_generation_for_linux_and_macos.patch | 2 +- patches/chromium/build_gn.patch | 2 +- .../build_libc_as_static_library.patch | 4 +- patches/chromium/can_create_window.patch | 18 +- .../chromium/cherry-pick-0728ae248ac5.patch | 14 +- ...devices_request_until_usb_service_is.patch | 23 --- ...ameter_in_script_lifecycle_observers.patch | 28 ++-- ..._introduce_blocking_api_for_electron.patch | 8 +- ...fy_chromium_handling_of_mouse_events.patch | 6 +- .../chromium/chore_partial_revert_of.patch | 4 +- .../chore_patch_out_profile_methods.patch | 10 +- .../crash_allow_setting_more_options.patch | 143 ---------------- .../disable_compositor_recycling.patch | 4 +- patches/chromium/disable_hidden.patch | 14 +- .../chromium/enable_reset_aspect_ratio.patch | 4 +- .../expose_gtk_ui_platform_field.patch | 2 +- ...xpose_setuseragent_on_networkcontext.patch | 12 +- ...d_data_parameter_to_processsingleton.patch | 2 +- ...dd_set_theme_source_to_allow_apps_to.patch | 8 +- ...to_add_observers_on_created_hunspell.patch | 6 +- ...sharingpicker_on_supported_platforms.patch | 4 +- ...startup_data_in_createnewwindowreply.patch | 10 +- ...e_launch_options_for_service_process.patch | 8 +- ...moothing_css_rule_and_blink_painting.patch | 45 ++--- ...d_data_via_embeddedworkerstartparams.patch | 12 +- ...g_symbol_color_in_framecaptionbutton.patch | 80 --------- ...screen_rendering_with_viz_compositor.patch | 2 +- ...same_application_can_use_safestorage.patch | 33 ++-- ..._raw_response_headers_from_urlloader.patch | 8 +- ...allback_for_sync_and_async_clipboard.patch | 6 +- ..._exclusive_access_for_electron_needs.patch | 4 +- ...itializegeneratedcodecachecontext_to.patch | 6 +- ...dless_mode_handling_in_native_widget.patch | 38 ++--- ...wsermainrunner_setoverrideresultcode.patch | 26 +++ ..._file_existence_before_setting_mtime.patch | 2 +- ...ding_non-standard_schemes_in_iframes.patch | 4 +- ..._background_throttling_in_compositor.patch | 8 +- ...last-error_in_replacefile_on_windows.patch | 56 ------- patches/chromium/fix_linux_tray_id.patch | 8 +- ..._replacement_work_on_contenteditable.patch | 4 +- ...ingshelper_behind_branding_buildflag.patch | 28 ++-- ...board_hides_on_input_blur_in_webview.patch | 12 +- ...th_unique_d-bus_name_when_owning_one.patch | 106 ------------ ..._material_update_issue_on_windows_11.patch | 6 +- ...snap-compatible_dbusmenu_object_path.patch | 4 +- ...from_localframe_requestexecutescript.patch | 12 +- ...t_menu_item_when_opened_via_keyboard.patch | 4 +- ...-bus_connection_for_each_status_icon.patch | 78 +++++++++ .../fix_wayland_test_crash_on_teardown.patch | 20 --- ...stuck_maximized_after_early_maximize.patch | 84 ---------- patches/chromium/frame_host_manager.patch | 4 +- .../chromium/gritsettings_resource_ids.patch | 2 +- ..._avoid_private_macos_api_usage.patch.patch | 156 ++++++++++-------- ...emote_certificate_verification_logic.patch | 18 +- .../chromium/notification_provenance.patch | 6 +- .../patch_osr_control_screen_info.patch | 4 +- patches/chromium/printing.patch | 36 ++-- patches/chromium/process_singleton.patch | 8 +- ...r_changes_to_the_webcontentsobserver.patch | 14 +- ...efactor_unfilter_unresponsive_events.patch | 66 +------- .../render_widget_host_view_mac.patch | 6 +- patches/chromium/resource_file_conflict.patch | 6 +- ...der_in_gpu_sandbox_init_when_allowed.patch | 2 +- patches/chromium/scroll_bounce_flag.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 4 +- patches/chromium/web_contents.patch | 8 +- ...ces_on_the_requesting_frame_s_origin.patch | 4 +- ..._frame_to_canrequestdevicepermission.patch | 8 +- patches/chromium/webview_fullscreen.patch | 8 +- .../worker_context_will_destroy.patch | 14 +- ...feat_add_hook_to_notify_script_ready.patch | 14 +- patches/perfetto/.patches | 1 - ...size_t_to_be_intptr_t_to_match_libuv.patch | 26 --- patches/v8/.patches | 2 +- ...bort_on_builtin_pgo_profile_mismatch.patch | 4 +- ...pgc_support_stackstartmarker_on_msvc.patch | 35 ---- ..._the_patch_set_and_the_embedded_blob.patch | 4 +- ...slots_of_non-api_objects_in_snapshot.patch | 41 +++++ .../chromedriver_zip.win.arm64.manifest | 1 - .../chromedriver_zip.win.x64.manifest | 1 - .../zip_manifests/dist_zip.win.arm64.manifest | 1 - .../zip_manifests/dist_zip.win.x64.manifest | 1 - shell/app/electron_crash_reporter_client.cc | 17 +- shell/app/electron_crash_reporter_client.h | 7 +- shell/browser/api/electron_api_app.cc | 11 +- shell/browser/api/electron_api_app.h | 3 +- .../api/electron_api_utility_process.cc | 17 +- .../api/electron_api_utility_process.h | 4 + shell/browser/api/electron_api_view.cc | 4 +- shell/browser/electron_browser_main_parts.cc | 6 +- .../osr/osr_render_widget_host_view.cc | 32 +++- .../browser/osr/osr_render_widget_host_view.h | 5 +- .../ui/views/electron_frame_view_linux.cc | 8 +- .../views/freedesktop_nav_button_provider.cc | 7 +- shell/common/BUILD.gn | 6 - 106 files changed, 670 insertions(+), 1100 deletions(-) delete mode 100644 patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch delete mode 100644 patches/chromium/crash_allow_setting_more_options.patch delete mode 100644 patches/chromium/feat_enable_customizing_symbol_color_in_framecaptionbutton.patch create mode 100644 patches/chromium/fix_allow_any_exit_code_in_browsermainrunner_setoverrideresultcode.patch delete mode 100644 patches/chromium/fix_don_t_read_a_stale_last-error_in_replacefile_on_windows.patch delete mode 100644 patches/chromium/fix_register_status_icon_with_unique_d-bus_name_when_owning_one.patch create mode 100644 patches/chromium/fix_use_a_private_d-bus_connection_for_each_status_icon.patch delete mode 100644 patches/chromium/fix_wayland_test_crash_on_teardown.patch delete mode 100644 patches/chromium/fix_wayland_window_stuck_maximized_after_early_maximize.patch delete mode 100644 patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch delete mode 100644 patches/v8/cppgc_support_stackstartmarker_on_msvc.patch create mode 100644 patches/v8/fix_allow_embedder_slots_of_non-api_objects_in_snapshot.patch diff --git a/.github/actions/fix-sync/action.yml b/.github/actions/fix-sync/action.yml index 83f87b004e..a4e96c2459 100644 --- a/.github/actions/fix-sync/action.yml +++ b/.github/actions/fix-sync/action.yml @@ -13,6 +13,7 @@ description: 'Ensures proper binaries are in place' # 9. Fix rc binary on Windows # 10. Fix clang-format binary on Windows # 11. Fixing the hermetic host Python binary +# 12. Fixing libclang on Windows (missing library) # # The macOS src cache is synced with host_os=mac and host_cpu=arm64, so every # dep and hook that DEPS selects by host vars (clang, rust, dsymutil, @@ -154,6 +155,26 @@ runs: if: ${{ inputs.target-platform == 'win' }} shell: powershell run: e d vpython3 src\build\vs_toolchain.py update --force + # V8's metagen loads libclang into the build's own Python, so it must be the + # package for this machine. The Windows cache is synced with host_os=linux, + # which leaves no Windows package at all. Re-fetch just this dep: a one-dep + # DEPS fed to gclient makes it select, verify and extract the object for the + # host it is actually running on. + - name: Fix libclang (Windows) + if: ${{ inputs.target-platform == 'win' }} + shell: bash + run: | + DEP=src/third_party/llvm-libclang + OBJECTS=$(e d gclient getdep --deps-file=src/DEPS -r "$DEP" | tail -1) + cat > libclang.DEPS < context, +@@ -4996,6 +4996,13 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, } } @@ -41,10 +41,10 @@ index 0b7b0d1842fde0cf1411ac9fc64e7206ee822c70..ed95a1e16f5867fc34ecd245c511c8d1 int world_id) { for (auto& observer : observers_) { diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 05c886fdd0f743bbfe415dad492e4e9c864b0d66..1a21a8c208502506abce44e1f96aaf64a69f8838 100644 +index eb45d9e75228e0654fc25cfcd613ed375b869375..3656e49a2f104c87426921cafcace855ad4417df 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -622,6 +622,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -621,6 +621,8 @@ class CONTENT_EXPORT RenderFrameImpl uint64_t performance_timeline_navigation_id) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -54,7 +54,7 @@ index 05c886fdd0f743bbfe415dad492e4e9c864b0d66..1a21a8c208502506abce44e1f96aaf64 int world_id) override; void DidChangeScrollOffset() override; diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h -index a0c709c211d8c3bafcaff90b67c5e5ce717ddd83..102ce094daa1d1c1a2f9f1a5a2ac9439f7c010c2 100644 +index 93ad527f7248a9cffe103331ebf12b90fa083a90..a630c7afb5e3cc04f9fd758a422f58dbd6b68fab 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h @@ -681,6 +681,9 @@ class BLINK_EXPORT WebLocalFrameClient { @@ -80,10 +80,10 @@ index 57c48e2ca9a775ebb17b236dc7757efd2b0f460c..27586bd03af05294eb977a72052f2334 if (World().IsMainWorld()) { probe::DidCreateMainWorldContext(GetFrame()); diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h -index 60fcdf5d03dc77820f87ec784ff0efcd174c433c..ede36b1e7ec2e2f0e5fd555e694fcf50cfbab214 100644 +index 5052635a9323a3be269a9c2112de2535a128f268..d9bfa8aa0aaa66f74a300320fd41856186354a94 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -322,6 +322,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -323,6 +323,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -93,7 +93,7 @@ index 60fcdf5d03dc77820f87ec784ff0efcd174c433c..ede36b1e7ec2e2f0e5fd555e694fcf50 int32_t world_id) = 0; diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc -index d1d93748a897dee817ea74480a10312302d27942..3f691a90d96ced3a3a5a3c96381e634f2ae6841b 100644 +index 51e6a9d5dc7ace8a145318fd3c76512714571485..d2eaf65761d4253501f045bca87c11e66ca05997 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc @@ -301,6 +301,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( @@ -111,10 +111,10 @@ index d1d93748a897dee817ea74480a10312302d27942..3f691a90d96ced3a3a5a3c96381e634f v8::Local context, int32_t world_id) { diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h -index 7c185f8266f6ef86dd54cb1137478cf84c9a9aef..a2e96f69f288ebe729ca8636fe646a14e4c9b4f8 100644 +index 10d76a20c20338ff919cb2a7817166f771ab1e37..adaf5cc9876a52c315bcae5b07bf301a21b339b9 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h -@@ -78,6 +78,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { +@@ -77,6 +77,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override; @@ -124,10 +124,10 @@ index 7c185f8266f6ef86dd54cb1137478cf84c9a9aef..a2e96f69f288ebe729ca8636fe646a14 int32_t world_id) override; diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h -index 52050874a7e4e820836f2ee8d94ccb9a540cb0dc..784b6d9284ff8460dd047bc79840c838b238e12f 100644 +index 3cb67eb8ef2df1cde837d7ec26bb5b8bf63b125a..27de8ade53f6562d0276af06efe835532482992b 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -432,6 +432,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -433,6 +433,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} 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 febec421d1..ec8f572299 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 1d8cc0946975848a4028cc2b7b3b9d81c2cac188..b9be5f9d3ef35f117fbe107dd7b2d188fe9ca79c 100644 +index 87e7b21279bbc1b7a657540909a1025774a34539..6e47586ad0fb7019f6c170fcc5f42bc3779fcd99 100644 --- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc +++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc @@ -167,6 +167,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast { @@ -23,7 +23,7 @@ index 1d8cc0946975848a4028cc2b7b3b9d81c2cac188..b9be5f9d3ef35f117fbe107dd7b2d188 return receiver_.BindNewEndpointAndPassDedicatedRemote(); } diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 0e0e90ead458de6ffcc4880537431036b4058c51..fd3a52c19a40281e1b3af8db9771e2953751d883 100644 +index 2f8d8aaa44f7029185518d50ca3c948843adac75..37500fe9ed3a335005eda8b4cff6fc7f9d57f804 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc @@ -758,6 +758,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { @@ -51,10 +51,10 @@ index d98b5dda96208e3f923aa8a9c6e6eb988004904b..7c91ed2d7a397ad9e36cbecfc13de7bd 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 32ff9ab3b9066f601b9e84984240398dd07505a4..1f35ed7cf09d770dce652ed13e1453133834379d 100644 +index 48007afd8077f14ef40a874ee94009a99f843463..ec6f948eca52307c47e7972a70736e38d07e910c 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -692,8 +692,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) { +@@ -694,8 +694,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) { // OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown, // which updates `visibility_`, unless the host is hidden. Make sure no update // is needed. @@ -116,10 +116,10 @@ index 0d1d81ec7d6b27891a5135961f4c630df82819df..325d2691357372b31df78781b6e453e2 // 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 ed4ec7ddad3162df9655eeb337366b57b05b1ce7..8a5339f9b679aaba0ef5eeaf8558754959174447 100644 +index 40f302d34f6683b150f1cfb910990bd31e4d9122..aaca59ceb75089353a23ed045a32cfe74aba9e9e 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -2571,6 +2571,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( +@@ -2572,6 +2572,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal", "old_state", old_state, "new_state", new_state); @@ -130,7 +130,7 @@ index ed4ec7ddad3162df9655eeb337366b57b05b1ce7..8a5339f9b679aaba0ef5eeaf85587549 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 && -@@ -4305,10 +4309,23 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -4306,10 +4310,23 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } diff --git a/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch index 21b504502f..996453f109 100644 --- a/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch +++ b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch @@ -8,10 +8,10 @@ WebPreferences of in-process child windows, rather than relying on process-level command line switches, as before. diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc -index 53f439064763c525e7e6eda49202564a9bcd4eeb..e4877bbeca65968717d6d5f7e842c56cd2e1620c 100644 +index 465c893fd39383876ecefc2b7836f9ad15a4d355..495c2f90d253e376dafdb7702180cb61373e3731 100644 --- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc +++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc -@@ -150,6 +150,17 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); out->stylus_handwriting_enabled = data.stylus_handwriting_enabled(); @@ -30,10 +30,10 @@ index 53f439064763c525e7e6eda49202564a9bcd4eeb..e4877bbeca65968717d6d5f7e842c56c out->accelerated_video_decode_enabled = data.accelerated_video_decode_enabled(); diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h -index ddc511a2f751327897efcce56af241c9c3a71315..8b5a617d1d5bf63fd2681675bed829b5e1020c6f 100644 +index eaba96dcf96be89343c7921b068c71103bdd86cb..5c45a71dbb36313edffccb081512c4332558df35 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h -@@ -483,6 +483,17 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -484,6 +484,17 @@ struct BLINK_COMMON_EXPORT WebPreferences { // Consumed only in chrome/renderer/ (not by Blink). bool is_indigo_onboarding = false; @@ -52,10 +52,10 @@ index ddc511a2f751327897efcce56af241c9c3a71315..8b5a617d1d5bf63fd2681675bed829b5 // chrome, except for the cases where it would require lots of extra work for // the embedder to use the same default value. diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h -index 1397836815da203d5149653b542401029279e38c..228ef6eff3c142c3df08b4baa2ea2ce34055311d 100644 +index 724596e7f5c9d95a8d2a82ddf982c55d5139113e..b00d149ede18ad2525ae0aafd66519d2055ead40 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h +++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h -@@ -447,6 +447,44 @@ struct BLINK_COMMON_EXPORT StructTraitsDetached(type); diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 23536986534dea6b733e40d00bcb53874794f16c..ce332f97dd089cb155f9977158a2c6ed6544b923 100644 +index 3960cc4f1fcb54919bd67a308f51beac899b9aaa..698ce38902d416963197f327b7979c79aee766d8 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc @@ -793,10 +793,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { diff --git a/patches/chromium/boringssl_build_gn.patch b/patches/chromium/boringssl_build_gn.patch index 69e01f2678..a2311ba01e 100644 --- a/patches/chromium/boringssl_build_gn.patch +++ b/patches/chromium/boringssl_build_gn.patch @@ -6,7 +6,7 @@ Subject: boringssl BUILD.gn Build BoringSSL with some extra functions that nodejs needs. diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index c77dc4129793fedbf9f88d96588917800aba4249..2a70901f6d000fcea4e506e06516e799fa962661 100644 +index b8792d3c17730a2a5be72fd39a7cf377c3639f90..d3d1b62811b612cbe15e33643a8e67cfc9b46c3a 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn @@ -48,6 +48,21 @@ all_sources = bcm_internal_headers + bcm_sources + crypto_internal_headers + diff --git a/patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch b/patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch index edbd33005d..ceb2cb9996 100644 --- a/patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch +++ b/patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch @@ -10,10 +10,10 @@ Needed for: 2) //electron/shell/common:web_contents_utility diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn -index a08aa58169bcf6bdb8537db1eab3834b8c6046fa..688f5b9893de4e326ec9d191aecc11e5e10fb2bf 100644 +index 1653632cdc2d7e2e61422d52cb41b5835b340837..ae0f063a3dd47a38f45396ece1e1e5d45ed1f6d5 100644 --- a/content/public/common/BUILD.gn +++ b/content/public/common/BUILD.gn -@@ -367,6 +367,8 @@ mojom("interfaces") { +@@ -365,6 +365,8 @@ mojom("interfaces") { "//content/common/*", "//extensions/common:mojom", "//extensions/common:mojom_blink", diff --git a/patches/chromium/build_allow_electron_to_use_exec_script.patch b/patches/chromium/build_allow_electron_to_use_exec_script.patch index 84a6cda258..d4284b59b5 100644 --- a/patches/chromium/build_allow_electron_to_use_exec_script.patch +++ b/patches/chromium/build_allow_electron_to_use_exec_script.patch @@ -9,10 +9,10 @@ This is similar to the //build usecase so we're OK adding ourselves here. code-cache salt from patches/v8 at gen time. diff --git a/.gn b/.gn -index 488189e60c708880693387b6db385611c44f5fd5..7d8770211f964ab651699ccd749172abcf4ea666 100644 +index 239ebaa8e8fb95dff782e78c7b1343fbbcefaf48..18bfa6995bbe91340e083c0dae3d950dc73f3ba7 100644 --- a/.gn +++ b/.gn -@@ -175,6 +175,31 @@ exec_script_allowlist = +@@ -460,6 +460,31 @@ exec_script_allowlist = # script. exec_script only happens when the checkout_mesa gclient arg is # set. If/when a 'proper' GN build for Mesa exists, this can be removed. "//third_party/dawn/third_party/meson/meson_target.gni", diff --git a/patches/chromium/build_allow_resource_allowlist_generation_for_linux_and_macos.patch b/patches/chromium/build_allow_resource_allowlist_generation_for_linux_and_macos.patch index e6da2b94d7..dc69c9916f 100644 --- a/patches/chromium/build_allow_resource_allowlist_generation_for_linux_and_macos.patch +++ b/patches/chromium/build_allow_resource_allowlist_generation_for_linux_and_macos.patch @@ -13,7 +13,7 @@ arg that turns grit's markers on) only permits android and win. The Linux half is https://chromium-review.googlesource.com/c/chromium/src/+/8360559. diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni -index ac7a5b84e93fd0bdf9eed224b2dd391621259636..78c1d0fcfd80b137d770a0064c4ffdf241f7a950 100644 +index 482f7c9e9030e86a35ba18cd8dc33070d9528723..3dba2acb87698c631022c30b4acb92715ff02e9e 100644 --- a/build/toolchain/gcc_toolchain.gni +++ b/build/toolchain/gcc_toolchain.gni @@ -42,7 +42,8 @@ if (enable_resource_allowlist_generation) { diff --git a/patches/chromium/build_gn.patch b/patches/chromium/build_gn.patch index d66ad5ddf8..8048557d85 100644 --- a/patches/chromium/build_gn.patch +++ b/patches/chromium/build_gn.patch @@ -7,7 +7,7 @@ These are variables we add to the root BUILDCONFIG so that they're available everywhere, without having to import("//electron/.../flags.gni"). diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index 8e6c2d5e093105f436a0dda8953177a6f821b79d..57836816037002cee8618d38a786374eaccaedcb 100644 +index bc4236a4e7080b005e18bacea92fe1d5d71b5cb1..f5c0cc067070bd96caf9dff958bf4f88a10cb91a 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -123,6 +123,9 @@ if (current_os == "") { diff --git a/patches/chromium/build_libc_as_static_library.patch b/patches/chromium/build_libc_as_static_library.patch index 50ad5b7652..f038d8bbee 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 f141b74375e1c0b02462d9eb0406539616e4566c..ee6a656382365869489e8c5f95c112ef96baae2b 100644 +index e459bcb42f4decfad69ea7e8ffb96db5e8395348..1ee42af44d0e2f0095a4fd6aba4001cc31a766e4 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn -@@ -403,6 +403,7 @@ target(libcxx_target_type, "libc++") { +@@ -422,6 +422,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 2272c88fe4..2cf3b10f39 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -12,10 +12,10 @@ that the new window is created in its own BrowsingInstance (and process). 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 03f6ac683fea3ee35e90476ff2b860d85c08acbc..6950b4bfa78399ec481f17c0f82dd83f36acf9b5 100644 +index 13a2167bd88bc453677381d55ca252758aa7a235..a7d38b913ddf1666f79e58a4680a5b1f81637837 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -10659,6 +10659,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -10627,6 +10627,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -23,7 +23,7 @@ index 03f6ac683fea3ee35e90476ff2b860d85c08acbc..6950b4bfa78399ec481f17c0f82dd83f effective_transient_activation_state, params->opener_suppressed, &no_javascript_access); -@@ -10669,6 +10670,11 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -10637,6 +10638,11 @@ void RenderFrameHostImpl::CreateNewWindow( return; } @@ -36,10 +36,10 @@ index 03f6ac683fea3ee35e90476ff2b860d85c08acbc..6950b4bfa78399ec481f17c0f82dd83f // important to do this before we return from the |opener_suppressed| case // below. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index aa808c95f33ed712f42dd6f6ac765b703a282604..6975ee5b7ea90af6178b9519ba7366c3fa80cd44 100644 +index 649c13a5fa6c8c7b3dccd355d58f5465406e1faa..befce87fbad6daabfd3d765634b4e81355cc06ad 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5707,6 +5707,10 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5719,6 +5719,10 @@ FrameTree* WebContentsImpl::CreateNewWindow( create_params.initially_hidden = renderer_started_hidden; create_params.initial_popup_url = params.target_url; @@ -50,7 +50,7 @@ index aa808c95f33ed712f42dd6f6ac765b703a282604..6975ee5b7ea90af6178b9519ba7366c3 // 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, -@@ -5761,6 +5765,13 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5773,6 +5777,13 @@ FrameTree* WebContentsImpl::CreateNewWindow( // Sets the newly created WebContents WindowOpenDisposition. new_contents_impl->original_window_open_disposition_ = params.disposition; @@ -64,7 +64,7 @@ index aa808c95f33ed712f42dd6f6ac765b703a282604..6975ee5b7ea90af6178b9519ba7366c3 // 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 -@@ -5802,13 +5813,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5814,13 +5825,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -188,10 +188,10 @@ index 5c742e16bccee876a8d2fece35276cdb3e7b912c..6e0b5ea45c6589231b3f7488f5bc918a // 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 41e0154e5dbe1fe711fc5fed7cb730f62f1a825f..0b7b0d1842fde0cf1411ac9fc64e7206ee822c70 100644 +index b844982e7506b3ae26a6b18f17845ef8a587a372..4dc83601584c056ee3f1ef4500e86f6307bb85c3 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -7151,6 +7151,10 @@ WebView* RenderFrameImpl::CreateNewWindow( +@@ -7155,6 +7155,10 @@ WebView* RenderFrameImpl::CreateNewWindow( params->started_by_ad = GetWebFrame()->IsAdFrame() || GetWebFrame()->IsAdScriptInStack(); diff --git a/patches/chromium/cherry-pick-0728ae248ac5.patch b/patches/chromium/cherry-pick-0728ae248ac5.patch index ec870a32e2..91a93fc5e8 100644 --- a/patches/chromium/cherry-pick-0728ae248ac5.patch +++ b/patches/chromium/cherry-pick-0728ae248ac5.patch @@ -30,10 +30,10 @@ Reviewed-by: Stefan Zager Cr-Commit-Position: refs/heads/main@{#1703748} diff --git a/third_party/blink/renderer/core/frame/local_frame_view.cc b/third_party/blink/renderer/core/frame/local_frame_view.cc -index 17101ff15f934515e74a0d51b3400f3314dddcce..0ae3e7850b1c91808061c7dc9a150c03efb8ab21 100644 +index 0e1184ea8b3da24d3d9113c95f7c5361d7c75be3..84dfdbdab8e10718bf1e9b49a5f8f77277ae1168 100644 --- a/third_party/blink/renderer/core/frame/local_frame_view.cc +++ b/third_party/blink/renderer/core/frame/local_frame_view.cc -@@ -2296,42 +2296,46 @@ void LocalFrameView::ScheduleVisualUpdateForPaintInvalidationIfNeeded() { +@@ -2301,42 +2301,46 @@ void LocalFrameView::ScheduleVisualUpdateForPaintInvalidationIfNeeded() { } bool LocalFrameView::NotifyResizeObservers() { @@ -93,7 +93,7 @@ index 17101ff15f934515e74a0d51b3400f3314dddcce..0ae3e7850b1c91808061c7dc9a150c03 } bool LocalFrameView::LocalFrameTreeAllowsThrottling() const { -@@ -2523,14 +2527,11 @@ void LocalFrameView::UpdateLifecyclePhasesInternal( +@@ -2528,14 +2532,11 @@ void LocalFrameView::UpdateLifecyclePhasesInternal( auto old_force_commit_criteria = ForceCommitCriteria(); @@ -113,7 +113,7 @@ index 17101ff15f934515e74a0d51b3400f3314dddcce..0ae3e7850b1c91808061c7dc9a150c03 // A LocalFrameView can be unthrottled at this point, but become throttled as // it advances through lifecycle stages. If that happens, it will prevent -@@ -2545,8 +2546,8 @@ void LocalFrameView::UpdateLifecyclePhasesInternal( +@@ -2550,8 +2551,8 @@ void LocalFrameView::UpdateLifecyclePhasesInternal( while (true) { for (LocalFrameView* frame_view : unthrottled_frame_views) { @@ -124,7 +124,7 @@ index 17101ff15f934515e74a0d51b3400f3314dddcce..0ae3e7850b1c91808061c7dc9a150c03 if (frame_view->GetFrame().IsAttached()) { frame_view->Lifecycle().EnsureStateAtMost( DocumentLifecycle::kVisualUpdatePending); -@@ -2621,8 +2622,11 @@ void LocalFrameView::UpdateLifecyclePhasesInternal( +@@ -2626,8 +2627,11 @@ void LocalFrameView::UpdateLifecyclePhasesInternal( bool needs_to_repeat_lifecycle = false; // ResizeObserver and post-layout IntersectionObserver observation @@ -139,10 +139,10 @@ index 17101ff15f934515e74a0d51b3400f3314dddcce..0ae3e7850b1c91808061c7dc9a150c03 // observations led to content-visibility intersection changing visibility // state synchronously (which happens on the first intersection diff --git a/third_party/blink/renderer/core/frame/local_frame_view_test.cc b/third_party/blink/renderer/core/frame/local_frame_view_test.cc -index 150974f6b09d1d5a4b3f88f5587b8b432aeb5b64..21b33f295c085e473d88037f11c65e4f2268cc0c 100644 +index c9db5ae4245f91ee7aa8b839d028d8648dbda881..172b32168729792604fe9c5c55e8248f8aad1af3 100644 --- a/third_party/blink/renderer/core/frame/local_frame_view_test.cc +++ b/third_party/blink/renderer/core/frame/local_frame_view_test.cc -@@ -1155,5 +1155,75 @@ TEST_F(LocalFrameViewPresentationTimeTest, +@@ -1250,5 +1250,75 @@ TEST_F(LocalFrameViewPresentationTimeTest, histogram_tester.ExpectTotalCount(kHistogramName, 2); } diff --git a/patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch b/patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch deleted file mode 100644 index 6f6ba3d29d..0000000000 --- a/patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: John Kleinschmidt -Date: Thu, 2 Mar 2023 15:26:46 -0500 -Subject: chore: defer USB service GetDevices request until USB service is - ready. - -On macOS we need to wait until the USB service is ready before the list of -devices is available. This should no longer be necessary if/when -https://crbug.com/1096743 is completed. - -diff --git a/services/device/usb/usb_service_impl.cc b/services/device/usb/usb_service_impl.cc -index 9749b2a4e0c36426dc57971676d90f047c83a297..6ebe605282cd2e947aa03d67ba98a3c63ceffabd 100644 ---- a/services/device/usb/usb_service_impl.cc -+++ b/services/device/usb/usb_service_impl.cc -@@ -206,7 +206,7 @@ void UsbServiceImpl::GetDevices(GetDevicesCallback callback) { - return; - } - -- if (enumeration_in_progress_) { -+ if (enumeration_in_progress_ || !enumeration_ready_) { - pending_enumeration_callbacks_.push_back(std::move(callback)); - return; - } 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 d47451505c..5a30356942 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 @@ -8,10 +8,10 @@ where callsites that deal with multiple contexts need to distinguish the current isolate. diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 3677204303736ba0f00c87dbe0dd4025ab957193..51d460f9982489575e94ad3726a44f77800a44ba 100644 +index 46720054d0da7e49a3e9570a6eb2ab658b3ae603..cb080c7a10ce83be484a44c9e6142755e2325807 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -376,6 +376,7 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -379,6 +379,7 @@ class CONTENT_EXPORT ContentRendererClient { // WillDestroyServiceWorkerContextOnWorkerThread() is called. virtual void WillEvaluateServiceWorkerOnWorkerThread( blink::WebServiceWorkerContextProxy* context_proxy, @@ -34,10 +34,10 @@ index f6771b8b6c1db5f00cde78877a3c2bdf5a38d61a..800eb200f8a9e4b7b44a4d22c0cf169c virtual void DidClearWindowObject() {} virtual void DidChangeScrollOffset() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index ed95a1e16f5867fc34ecd245c511c8d18ed43a61..21ef039de4994a6e2327a8c8c80b52d920f8cbb5 100644 +index fddf393e649f06a7c50600fbc68a6b5586adbf35..0b83e64c9d47f75f116a59ddc8fa3adc770b54fb 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4999,10 +4999,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures( +@@ -5003,10 +5003,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures( } } @@ -52,10 +52,10 @@ index ed95a1e16f5867fc34ecd245c511c8d18ed43a61..21ef039de4994a6e2327a8c8c80b52d9 } diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 1a21a8c208502506abce44e1f96aaf64a69f8838..9d851db7aa1a957ae83843a298fafaaabdc2cf51 100644 +index 3656e49a2f104c87426921cafcace855ad4417df..23ff98e4c77f36ecb86fdea26f108313a3d96e4b 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -624,7 +624,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -623,7 +623,8 @@ class CONTENT_EXPORT RenderFrameImpl int world_id) override; void DidInstallConditionalFeatures(v8::Local context, int world_id) override; @@ -167,7 +167,7 @@ index 0a3ea97d48c4d0d4c234dc88b321480a55df85c8..150ba24a544a88ab99d51b8a30af545a // Called when initial script evaluation finished for the main script. // |success| is true if the evaluation completed with no uncaught exception. diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h -index 102ce094daa1d1c1a2f9f1a5a2ac9439f7c010c2..7061890c4909bad311ffffc0a97203bfb915eab1 100644 +index a630c7afb5e3cc04f9fd758a422f58dbd6b68fab..c2759125a6e9a61e5e07d8a31771aa4530ade048 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h @@ -685,7 +685,8 @@ class BLINK_EXPORT WebLocalFrameClient { @@ -200,10 +200,10 @@ index 27586bd03af05294eb977a72052f2334c3d1aa61..fdceecae58237c48777b800ca218b2ad ->ContextWillBeDestroyed(script_state_); if (next_status == Lifecycle::kV8MemoryIsForciblyPurged || diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h -index ede36b1e7ec2e2f0e5fd555e694fcf50cfbab214..6d2d475e34c299008534f76cb495a58dc87e1a58 100644 +index d9bfa8aa0aaa66f74a300320fd41856186354a94..727c3551b4196548338bdb43db3e8a68de441a64 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -324,7 +324,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -325,7 +325,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { int32_t world_id) = 0; virtual void DidInstallConditionalFeatures(v8::Local, int32_t world_id) = 0; @@ -214,7 +214,7 @@ index ede36b1e7ec2e2f0e5fd555e694fcf50cfbab214..6d2d475e34c299008534f76cb495a58d virtual void DidChangeScrollOffset() {} diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc -index 3f691a90d96ced3a3a5a3c96381e634f2ae6841b..cd53a23b7d3a489b516a89b3bd9a8ba7fadb7868 100644 +index d2eaf65761d4253501f045bca87c11e66ca05997..23f963e48bab047b034d49f5b91aebec63443e1d 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc @@ -309,10 +309,11 @@ void LocalFrameClientImpl::DidInstallConditionalFeatures( @@ -231,10 +231,10 @@ index 3f691a90d96ced3a3a5a3c96381e634f2ae6841b..cd53a23b7d3a489b516a89b3bd9a8ba7 } diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h -index a2e96f69f288ebe729ca8636fe646a14e4c9b4f8..e98e933d5dc9eb15a8bf828110ee0fb1ccaec14d 100644 +index adaf5cc9876a52c315bcae5b07bf301a21b339b9..492cbe203e18c08c7f4bea750830e23209f2885e 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h -@@ -80,7 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { +@@ -79,7 +79,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { int32_t world_id) override; void DidInstallConditionalFeatures(v8::Local, int32_t world_id) override; @@ -245,10 +245,10 @@ index a2e96f69f288ebe729ca8636fe646a14e4c9b4f8..e98e933d5dc9eb15a8bf828110ee0fb1 bool HasWebView() const override; diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h -index 784b6d9284ff8460dd047bc79840c838b238e12f..d5af905cbe4eb4baac6bd729677a379df08537d7 100644 +index 27de8ade53f6562d0276af06efe835532482992b..15f78de0bae8e593d040376bffe937d823e62404 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -434,7 +434,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -435,7 +435,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { int32_t world_id) override {} void DidInstallConditionalFeatures(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/chore_introduce_blocking_api_for_electron.patch b/patches/chromium/chore_introduce_blocking_api_for_electron.patch index 7718e7f213..a3294063f7 100644 --- a/patches/chromium/chore_introduce_blocking_api_for_electron.patch +++ b/patches/chromium/chore_introduce_blocking_api_for_electron.patch @@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor of explicitly adding ScopedAllowBlocking calls as friends. diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h -index b901cc0ee206532a53b63e34fa8512ce878e24b8..b97a7fc362dd9aed3bb10fdf4902b5e0f856713e 100644 +index db88f6ab7629f41a1c51945c570a82c35e9ef723..dac83f37196aaee9c6be7021afa738ce3fb31444 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h @@ -133,6 +133,7 @@ class KeyStorageLinux; @@ -18,7 +18,7 @@ index b901cc0ee206532a53b63e34fa8512ce878e24b8..b97a7fc362dd9aed3bb10fdf4902b5e0 class Profile; class ProfileImpl; class ScopedAllowBlockingForProfile; -@@ -285,6 +286,9 @@ class BackendImpl; +@@ -288,6 +289,9 @@ class BackendImpl; class InFlightIO; bool CleanupDirectorySync(const base::FilePath&); } // namespace disk_cache @@ -28,7 +28,7 @@ index b901cc0ee206532a53b63e34fa8512ce878e24b8..b97a7fc362dd9aed3bb10fdf4902b5e0 namespace enterprise_connectors { class LinuxKeyRotationCommand; } // namespace enterprise_connectors -@@ -589,6 +593,7 @@ class BASE_EXPORT ScopedAllowBlocking { +@@ -592,6 +596,7 @@ class BASE_EXPORT ScopedAllowBlocking { friend class ::DesktopNotificationBalloon; friend class ::FirefoxProfileLock; friend class ::GaiaConfig; @@ -36,7 +36,7 @@ index b901cc0ee206532a53b63e34fa8512ce878e24b8..b97a7fc362dd9aed3bb10fdf4902b5e0 friend class ::ProfileImpl; friend class ::ScopedAllowBlockingForProfile; #if BUILDFLAG(IS_WIN) -@@ -635,6 +640,7 @@ class BASE_EXPORT ScopedAllowBlocking { +@@ -638,6 +643,7 @@ class BASE_EXPORT ScopedAllowBlocking { friend class cronet::CronetPrefsManager; friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847 friend class drive::FakeDriveService; 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 98c20411f2..f24a6942a0 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 cc3f9bc9383f8272a5cd95b1f2ac56529d86e493..5ca29b84cdaf42ef516ef819ae32b230 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 46c29b5ab60704b816c6c580b72f7a3498bf18c4..50f5557384eb36618f983229617098e938c37bc7 100644 +index 654d04d759b0653565d37920e32a3b85da1032af..3607f9a5ddddc11042919465cd4bfe076beadbf1 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 -@@ -1523,6 +1523,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() { +@@ -1536,6 +1536,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() { return background_paint_brush_; } @@ -49,7 +49,7 @@ index 46c29b5ab60704b816c6c580b72f7a3498bf18c4..50f5557384eb36618f983229617098e9 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 15a86085de29b9f70d78e85825a592a4bdffd9e3..12edd2db9b88af65892cd5c183271258eaccf63d 100644 +index 747de87378f7b6087f9be8a271c1c086b5421b49..03e1bbb251f6464c5d4ee85b205b5ab99e695334 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 @@ -279,6 +279,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin diff --git a/patches/chromium/chore_partial_revert_of.patch b/patches/chromium/chore_partial_revert_of.patch index 1237de4ec9..24e20053aa 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 2a4c28acaae718c9b5c496e9078699b3c6708f7b..a66d103c06de4dca6317c6e167cd1ec14a429b26 100644 +index 4624fb68f6b6998cf75cd77b4de5a03ba2fad8c8..30bc2b872f917209c72e2995024d4cc0cde230d0 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5682,7 +5682,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5694,7 +5694,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 b2dbb8f8d0..519faa005a 100644 --- a/patches/chromium/chore_patch_out_profile_methods.patch +++ b/patches/chromium/chore_patch_out_profile_methods.patch @@ -43,7 +43,7 @@ index dd48ee2a99aeeddad66c95e7c61b17580bb523e5..1d7fa6c4a7956b9a356e4203e8c61eb7 // When the enterprise policy is not set, use finch/feature flag choice. return base::FeatureList::IsEnabled(chrome_pdf::features::kPdfXfaSupport); diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc -index 578e8975738e0da7719548bb47d13f7660c82215..a0427ca11c7a23ecce8cfb905053b5bc08485ea4 100644 +index 5dd1c5c85fe0785ea05ead8e2388c76f5503b9ae..c2ca9ca4ba2380a90e4a99912cd038cdd6db9c4c 100644 --- a/chrome/browser/pdf/pdf_extension_util.cc +++ b/chrome/browser/pdf/pdf_extension_util.cc @@ -16,7 +16,6 @@ @@ -54,7 +54,7 @@ index 578e8975738e0da7719548bb47d13f7660c82215..a0427ca11c7a23ecce8cfb905053b5bc #include "chrome/common/chrome_features.h" #include "chrome/common/extensions/api/pdf_viewer_private.h" #include "chrome/common/url_constants.h" -@@ -285,10 +284,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) { +@@ -286,10 +285,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) { #if BUILDFLAG(ENABLE_PDF_INK2) bool IsPdfAnnotationsEnabledByPolicy(content::BrowserContext* context) { @@ -68,7 +68,7 @@ index 578e8975738e0da7719548bb47d13f7660c82215..a0427ca11c7a23ecce8cfb905053b5bc } bool IsPdfInk2AnnotationsEnabled(content::BrowserContext* context) { -@@ -506,11 +508,13 @@ bool ShouldShowGlicSummarizeButton(content::WebContents* web_contents) { +@@ -507,11 +509,13 @@ bool ShouldShowGlicSummarizeButton(content::WebContents* web_contents) { } } @@ -83,7 +83,7 @@ index 578e8975738e0da7719548bb47d13f7660c82215..a0427ca11c7a23ecce8cfb905053b5bc auto* tab_interface = tabs::TabInterface::MaybeGetFromContents(web_contents); if (tab_interface && !tab_interface->IsInNormalWindow()) { diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc -index e7a09d34f33a184099dfa52738978119fa70b15e..f0f29926c1c6d5c13a510c11b9f16171147498c2 100644 +index d2185014bf3a11a4e05f32ad71953e6cd59ec5cb..d31f90a2caa78a615b19290f8091f5404d827fa1 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc @@ -25,8 +25,10 @@ @@ -108,7 +108,7 @@ index e7a09d34f33a184099dfa52738978119fa70b15e..f0f29926c1c6d5c13a510c11b9f16171 } } // namespace -@@ -507,11 +512,13 @@ void SpellcheckService::InitForRenderer(content::RenderProcessHost* host) { +@@ -504,11 +509,13 @@ void SpellcheckService::InitForRenderer(content::RenderProcessHost* host) { features::kInitialWebUIWithoutSpellCheck.Get()) { return; } diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch deleted file mode 100644 index c361cfa97d..0000000000 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Apthorp -Date: Thu, 30 Apr 2020 10:08:06 -0700 -Subject: crash: allow setting more options - -This allows the client of //components/crash to set upload url, -rate-limiting, compression and global annotations. - -This should be upstreamed. - -diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc -index 652e9e22e0de52565d5bbd26c3b4e2e297158e06..1e7962f09bae456fa81e4eb32ed62de207e62012 100644 ---- a/components/crash/core/app/crash_reporter_client.cc -+++ b/components/crash/core/app/crash_reporter_client.cc -@@ -114,6 +114,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) { - return false; - } - -+bool CrashReporterClient::GetShouldRateLimit() { -+ return true; -+} -+ -+bool CrashReporterClient::GetShouldCompressUploads() { -+ return true; -+} -+ -+void CrashReporterClient::GetProcessSimpleAnnotations(std::map* annotations) { -+} -+ - #if BUILDFLAG(IS_ANDROID) - unsigned int CrashReporterClient::GetCrashDumpPercentage() { - return 100; -diff --git a/components/crash/core/app/crash_reporter_client.h b/components/crash/core/app/crash_reporter_client.h -index 2b5dc2f17ecc4d3d8a7cd5e427221592d2cb1810..54e79beea2507434cc1d53d2e3dcf5fb0eb491ab 100644 ---- a/components/crash/core/app/crash_reporter_client.h -+++ b/components/crash/core/app/crash_reporter_client.h -@@ -7,6 +7,7 @@ - - #include - -+#include - #include - #include - #include -@@ -162,6 +163,19 @@ class CrashReporterClient { - // that case, |breakpad_enabled| is set to the value enforced by policies. - virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled); - -+ // Returns true if crash uploads should be rate limited. If false, no -+ // throttling will be applied for uploads. -+ virtual bool GetShouldRateLimit(); -+ -+ // Returns true if crash uploads should be compressed with gzip. If false, -+ // reports will be uploaded uncompressed. -+ virtual bool GetShouldCompressUploads(); -+ -+ // Allows the client to add or edit global annotations passed to the crashpad -+ // handler. -+ virtual void GetProcessSimpleAnnotations( -+ std::map* annotations); -+ - #if BUILDFLAG(IS_ANDROID) - // 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 ce5c8a721fb1e4f10a5ffaa8cfdddb74ed60da86..317a6887d5b3a6f74a1ff49477b615627207c460 100644 ---- a/components/crash/core/app/crashpad_linux.cc -+++ b/components/crash/core/app/crashpad_linux.cc -@@ -221,6 +221,7 @@ bool PlatformCrashpadInitialization( - // where crash_reporter provides it's own values for lsb-release. - annotations["lsb-release"] = base::GetLinuxDistro(); - #endif -+ crash_reporter_client->GetProcessSimpleAnnotations(&annotations); - - std::vector arguments; - if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) { -@@ -242,6 +243,13 @@ bool PlatformCrashpadInitialization( - } - #endif - -+ if (!crash_reporter_client->GetShouldRateLimit()) { -+ arguments.push_back("--no-rate-limit"); -+ } -+ if (!crash_reporter_client->GetShouldCompressUploads()) { -+ arguments.push_back("--no-upload-gzip"); -+ } -+ - CHECK(client.StartHandler(handler_path, *database_path, metrics_path, url, - annotations, arguments, false, false, - attachments)); -diff --git a/components/crash/core/app/crashpad_mac.mm b/components/crash/core/app/crashpad_mac.mm -index 3b131e1fc804a55c80b3b2704686270211fcf9fb..f14ab66f240a236bd90ff4240089a0036ce7d460 100644 ---- a/components/crash/core/app/crashpad_mac.mm -+++ b/components/crash/core/app/crashpad_mac.mm -@@ -86,6 +86,8 @@ - } // @autoreleasepool - return process_annotations; - }(); -+ CrashReporterClient* crash_reporter_client = GetCrashReporterClient(); -+ crash_reporter_client->GetProcessSimpleAnnotations(&annotations); - return annotations; - } - -@@ -159,6 +161,13 @@ bool PlatformCrashpadInitialization( - - std::vector arguments; - -+ if (!crash_reporter_client->GetShouldRateLimit()) { -+ arguments.push_back("--no-rate-limit"); -+ } -+ if (!crash_reporter_client->GetShouldCompressUploads()) { -+ arguments.push_back("--no-upload-gzip"); -+ } -+ - if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) { - arguments.push_back("--monitor-self"); - } -diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc -index a7af39181e259b4c793fa9a39cb95e4f86ac47d1..6101018813315074a1e06bea318ecf3f91188415 100644 ---- a/components/crash/core/app/crashpad_win.cc -+++ b/components/crash/core/app/crashpad_win.cc -@@ -94,6 +94,7 @@ bool PlatformCrashpadInitialization( - - std::map process_annotations; - GetPlatformCrashpadAnnotations(&process_annotations); -+ crash_reporter_client->GetProcessSimpleAnnotations(&process_annotations); - - std::string url = crash_reporter_client->GetUploadUrl(); - -@@ -134,6 +135,13 @@ bool PlatformCrashpadInitialization( - - std::vector arguments(start_arguments); - -+ if (!crash_reporter_client->GetShouldRateLimit()) { -+ arguments.push_back("--no-rate-limit"); -+ } -+ if (!crash_reporter_client->GetShouldCompressUploads()) { -+ arguments.push_back("--no-upload-gzip"); -+ } -+ - if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) { - arguments.push_back("--monitor-self"); - for (const std::string& start_argument : start_arguments) { diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 95bf5745d7..2cd290b06b 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index c6d6b4f72482dfce812e6f9130365f80ec102b04..97b9ba9a80917a452dd1e7543e8795275fbce52c 100644 +index 7611d6e3d0d172fcd417571a5f4bcd8f2dc6c7a2..264871ad52785056c97b50423a47cedc2dad75db 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -673,7 +673,11 @@ void SendVisibleTimeRequestToDelegatedFrameHost( +@@ -624,7 +624,11 @@ void SendVisibleTimeRequestToDelegatedFrameHost( } host()->WasHidden(); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index ffab01b015..34c9c8345e 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -15,10 +15,10 @@ makes it defer main frames until the view is eventually shown. Key the decision off the host's visibility, as RenderWidgetHostViewMac does. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index ee16374591d6e40165d909c61b7db7e586b159e0..e0307e278c7ca4314ebb87b0fbdeb110a3457ca3 100644 +index f5eb880a54790b5c6e511f2f433ed0871742744f..7593b7f1b2f08b04e8d61efb6e34920e9b69fad4 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -873,6 +873,10 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -874,6 +874,10 @@ void RenderWidgetHostImpl::WasHidden() { return; } @@ -30,10 +30,10 @@ index ee16374591d6e40165d909c61b7db7e586b159e0..e0307e278c7ca4314ebb87b0fbdeb110 // Prompts should remain open and functional across tab switches. if (!delegate_ || !delegate_->IsWaitingForPointerLockPrompt(this)) { diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h -index 368e761bb19770f20dc46dae14c68054072e768e..baa4893b429efe3ab7515059d022aa6eb10ea454 100644 +index 89fe0145c0824c6f458b69bd208ab5bd6fce4b29..5b2441bd2c23189c7759d36b896a0a7be960178b 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -1099,6 +1099,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -1102,6 +1102,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl base::TimeDelta GetHungRendererDelayForTesting(); @@ -43,10 +43,10 @@ index 368e761bb19770f20dc46dae14c68054072e768e..baa4893b429efe3ab7515059d022aa6e // |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 277febb199dac5fdb40b3f1fada416694808b137..32ff9ab3b9066f601b9e84984240398dd07505a4 100644 +index 0bca4235e9d9f1885e8ed5a1b17de78772937d3b..48007afd8077f14ef40a874ee94009a99f843463 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -751,7 +751,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -753,7 +753,7 @@ void RenderWidgetHostViewAura::HideImpl() { CHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); @@ -55,7 +55,7 @@ index 277febb199dac5fdb40b3f1fada416694808b137..32ff9ab3b9066f601b9e84984240398d host()->WasHidden(); aura::WindowTreeHost* host = window_->GetHost(); aura::Window* parent = window_->parent(); -@@ -3674,7 +3674,12 @@ RenderWidgetHostViewAura::DidUpdateVisualProperties( +@@ -3815,7 +3815,12 @@ RenderWidgetHostViewAura::DidUpdateVisualProperties( void RenderWidgetHostViewAura::DidNavigate() { CHECK(delegated_frame_host_) << "Cannot be invoked during destruction."; diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index 4aff453ea3..3f2ed567dd 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 634640338e2951d852d9f5df5f7f0e48d97d00e8..46c29b5ab60704b816c6c580b72f7a3498bf18c4 100644 +index e2bba0c4a635e33643fcab3852dbf36499441489..654d04d759b0653565d37920e32a3b85da1032af 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 -@@ -726,7 +726,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { +@@ -727,7 +727,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { void DesktopWindowTreeHostWin::SetAspectRatio( const gfx::SizeF& aspect_ratio, const gfx::Size& excluded_margin) { diff --git a/patches/chromium/expose_gtk_ui_platform_field.patch b/patches/chromium/expose_gtk_ui_platform_field.patch index ee5898d9c3..91e69a1477 100644 --- a/patches/chromium/expose_gtk_ui_platform_field.patch +++ b/patches/chromium/expose_gtk_ui_platform_field.patch @@ -10,7 +10,7 @@ This patch should be proposed upstream. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7237910 "7237910: Remove g_gtk_ui global" diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h -index 244a677e4c70df162bf21885065bc9b0b134063d..2503cd5898cb8ba1c5b48474a868961f4811ca74 100644 +index ce4f115063bf6967dbca64b6098fbeeef4b37561..95092d2c1d57ef872590138b78908c2ff53bbe1f 100644 --- a/ui/gtk/gtk_ui.h +++ b/ui/gtk/gtk_ui.h @@ -53,6 +53,8 @@ class GtkUi : public ui::LinuxUiAndTheme { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 4a09d7bcac..c2a2785ebc 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 5913c18fcfb3f470746d3e82c56cc5345ab8227c..8a4ec18e17a506cf9650a2e504f83925bbf65628 100644 +index 658c6e806f19f9188d357ccfbd3f745c975634b5..53170b69ae67b0b4e962f5339da556a2add74405 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -2081,6 +2081,13 @@ void NetworkContext::SetNetworkConditions( +@@ -2092,6 +2092,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,7 +51,7 @@ index 5913c18fcfb3f470746d3e82c56cc5345ab8227c..8a4ec18e17a506cf9650a2e504f83925 // 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 51d94c9b0d08d986ae793ce702ee94d8366452bb..6c4c47309f56986d0f5f8603da5454174a5f1a7c 100644 +index 56a666835b0bce0b27c9734b3bfe29f89bdf2ddf..3b436759438817cc0b8c46ffb9cf2f08d17654ba 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -358,6 +358,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext @@ -63,10 +63,10 @@ index 51d94c9b0d08d986ae793ce702ee94d8366452bb..6c4c47309f56986d0f5f8603da545417 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 b9c65d72932777d5b91d15d2ab11d44db102473e..4a54145b491b34097f331a591f816552a0dc45e9 100644 +index 16bd459f37d76870e36001041bc60f46dba98c09..95c1a30463835b0d0dec395eca15df8393dba63d 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1400,6 +1400,9 @@ interface NetworkContext { +@@ -1408,6 +1408,9 @@ interface NetworkContext { mojo_base.mojom.UnguessableToken throttling_client_id, array conditions); @@ -77,7 +77,7 @@ index b9c65d72932777d5b91d15d2ab11d44db102473e..4a54145b491b34097f331a591f816552 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index 1de838388236275f93bb05306065789d8380a437..3e13e542ed7dd0f73a54363faa867a5b3712ccb9 100644 +index 1697904d7b356a611cbf2651b333a57953fa3e38..961f66dce02604184a48461e6663a82631fc19ae 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h @@ -169,6 +169,7 @@ class TestNetworkContext : public mojom::NetworkContext { diff --git a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch index df12e2db95..e0a7593b35 100644 --- a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch +++ b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch @@ -360,7 +360,7 @@ index 5e7a66aafbbe6c388ac0ec780ef1eb0994bb3976..f1ac6b53fdabbcb5df53589be32c5a7f if (!kill_unresponsive || !KillProcessByLockPath(true)) return PROFILE_IN_USE; diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 53fdcaf36552091e0b03297ee0d524b729cf8324..59dd345b19c7c812919c211b76aceec1bf067f8e 100644 +index 03c73912d8731bdb0f435b83bb9e496e6c605b76..7118b8d13c970ce0a801b36e66193a3f87e9b121 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -9,6 +9,7 @@ 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 08fb79e746..f7f20b6999 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,10 +13,10 @@ uses internally for things like menus and devtools. We can remove this patch once it has in some shape been upstreamed. diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index e131113a7d5eeea02929ff037d898f1c2f281a43..1c5bc9402b148916353216d76dfbd68b9acb5c5d 100644 +index 64dc19f32a6824a251c167e1bac161d06a78d076..9e755118eb3933d849515676151147c96af4aeb0 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -505,6 +505,8 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { +@@ -514,6 +514,8 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { } PreferredColorScheme preferred_color_scheme() const { @@ -25,7 +25,7 @@ index e131113a7d5eeea02929ff037d898f1c2f281a43..1c5bc9402b148916353216d76dfbd68b return preferred_color_scheme_; } void set_preferred_color_scheme(PreferredColorScheme preferred_color_scheme) { -@@ -539,6 +541,24 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { +@@ -548,6 +550,24 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { size_t system_color_version() const { return system_color_version_; } void IncrementSystemColorVersion() { ++system_color_version_; } @@ -50,7 +50,7 @@ index e131113a7d5eeea02929ff037d898f1c2f281a43..1c5bc9402b148916353216d76dfbd68b protected: explicit NativeTheme(SystemTheme system_theme = SystemTheme::kDefault); virtual ~NativeTheme(); -@@ -619,6 +639,7 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { +@@ -626,6 +646,7 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { ColorProviderKey::UserColorSource::kAccent; base::TimeDelta caret_blink_interval_; size_t system_color_version_ = 0; diff --git a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch index 2fcf36e5a5..51e50bbb45 100644 --- a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch +++ b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch @@ -7,10 +7,10 @@ Subject: feat: allow embedders to add observers on created hunspell This patch is used by Electron to implement spellchecker events. diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc -index e253982b1c934b12539606a3e784a7b7b769f267..e7a09d34f33a184099dfa52738978119fa70b15e 100644 +index ddf5dfe390b99967e33a83d2bb14130e20e3de78..d2185014bf3a11a4e05f32ad71953e6cd59ec5cb 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc -@@ -602,6 +602,8 @@ void SpellcheckService::LoadDictionaries() { +@@ -599,6 +599,8 @@ void SpellcheckService::LoadDictionaries() { std::make_unique( dictionary, platform_spellcheck_language, context_, this)); hunspell_dictionaries_.back()->AddObserver(this); @@ -19,7 +19,7 @@ index e253982b1c934b12539606a3e784a7b7b769f267..e7a09d34f33a184099dfa52738978119 hunspell_dictionaries_.back()->Load(); } -@@ -652,6 +654,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { +@@ -649,6 +651,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { (!hunspell_dictionaries_.empty() || enable_if_uninitialized); } 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 c96bed3fcb..7b1ea81b04 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 @@ -379,10 +379,10 @@ index ef33761a5794ac1bd157d1bff0d579735282edef..42effd7b5454284914ca86d48397e08d #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 53cf800e669c3b754036a681d3084fc35a4b1207..7527048c487af5840608cf23f6ab4103655c46e6 100644 +index 980690b69635fbc25093cc86a9ebdd5e8462665e..ee4a59f1c22f1d71ce03859455d47bee842d7faa 100644 --- a/media/capture/video_capture_types.h +++ b/media/capture/video_capture_types.h -@@ -376,6 +376,8 @@ struct CAPTURE_EXPORT VideoCaptureParams { +@@ -377,6 +377,8 @@ struct CAPTURE_EXPORT VideoCaptureParams { // The request type of the capture source. CaptureSourceRequestType request_type = CaptureSourceRequestType::kUnknown; diff --git a/patches/chromium/feat_carry_embedder_startup_data_in_createnewwindowreply.patch b/patches/chromium/feat_carry_embedder_startup_data_in_createnewwindowreply.patch index 195ae2f4b5..67ca075c6b 100644 --- a/patches/chromium/feat_carry_embedder_startup_data_in_createnewwindowreply.patch +++ b/patches/chromium/feat_carry_embedder_startup_data_in_createnewwindowreply.patch @@ -26,10 +26,10 @@ hook called before the new RenderFrame is created so it can be picked up by RenderFrameCreated() on the same call stack. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index cedd00e054a2bac7a148b4b5c1ecf2f45ca10c25..e6ae90c29b82a8353aa52dbd5407946a1167d5d7 100644 +index a8ee55c9d08fa2a1ff4fcfb7c3a0ea2c470bd051..6d908de253338039fcc0b6618b6e0c18aacca2b2 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -10863,7 +10863,12 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -10831,7 +10831,12 @@ void RenderFrameHostImpl::CreateNewWindow( new_main_rfh->GetSiteInstance()->browsing_instance_token(), delegate_->GetColorProviderColorMaps(), /*widget_screen_rect=*/std::nullopt, @@ -119,7 +119,7 @@ index 168144985c9701e9e2c7bea7f638d6332b51aa16..b74d4266d7ed51c93297d70f83c444e7 // The delegate will be owned by the manager. It's valid to return nullptr. virtual SpeechRecognitionManagerDelegate* diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 51d460f9982489575e94ad3726a44f77800a44ba..84fb8167a48f033fd941cfcb6feabbc38aaedd19 100644 +index cb080c7a10ce83be484a44c9e6142755e2325807..36a86369aee3fc836fa2b7053c99f5a7e5204e09 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h @@ -24,6 +24,7 @@ @@ -148,10 +148,10 @@ index 51d460f9982489575e94ad3726a44f77800a44ba..84fb8167a48f033fd941cfcb6feabbc3 // `outermost_origin` is only set if it is an extension scheme, otherwise // it will be null. It is null to avoid leaking unnecessary information into diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 21ef039de4994a6e2327a8c8c80b52d920f8cbb5..4affacaba0bd8043a6afbeed82008d809b3ce205 100644 +index 0b83e64c9d47f75f116a59ddc8fa3adc770b54fb..c4a2b362d685cd9e3b44e70c4d77e9b191e5f493 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -7208,6 +7208,14 @@ WebView* RenderFrameImpl::CreateNewWindow( +@@ -7212,6 +7212,14 @@ WebView* RenderFrameImpl::CreateNewWindow( return nullptr; } 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 eb1644f6ab..c77bc2ff72 100644 --- a/patches/chromium/feat_configure_launch_options_for_service_process.patch +++ b/patches/chromium/feat_configure_launch_options_for_service_process.patch @@ -441,7 +441,7 @@ index 18a070048449b2fb56996241c9cebc565f59dee9..9f77589c95ceb47b98fa9b8068c43aad // Whether or not to bind viz::mojom::Gpu to the utility process. bool allowed_gpu_; diff --git a/content/browser/service_host/utility_sandbox_delegate.cc b/content/browser/service_host/utility_sandbox_delegate.cc -index 0b7288746d4a625d96983233bcde1d9fced36461..2899b548ee683fe5195123e84b1bfc96b975a2d1 100644 +index f0828d57970eb80db65b357fdcad228616029220..7ea2516ddcdcc21656e4aeefaf534bd07f73f8c8 100644 --- a/content/browser/service_host/utility_sandbox_delegate.cc +++ b/content/browser/service_host/utility_sandbox_delegate.cc @@ -39,17 +39,19 @@ UtilitySandboxedProcessLauncherDelegate:: @@ -499,7 +499,7 @@ index 0b7288746d4a625d96983233bcde1d9fced36461..2899b548ee683fe5195123e84b1bfc96 #if BUILDFLAG(USE_ZYGOTE) ZygoteCommunication* UtilitySandboxedProcessLauncherDelegate::GetZygote() { -@@ -192,6 +211,15 @@ UtilitySandboxedProcessLauncherDelegate::GetProcessRequirement() { +@@ -194,6 +213,15 @@ UtilitySandboxedProcessLauncherDelegate::GetProcessRequirement() { return std::nullopt; } @@ -746,7 +746,7 @@ index 421e7f2baa1ca05ac3db1a2499273de740a98724..10751e2aabadd53b2213178d65357fac // An interface which can be implemented and used with diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc -index 0bcb43d58cfc3ae867824264766ecdd1b0f99360..6cad7a39333415d3fb1aed559b108a222466e6bf 100644 +index 19952265286a9ad3db226c4c508b2a7bacdfa78b..8ccdca6bf1853556eaa97b4ff5177023708a4f03 100644 --- a/sandbox/policy/win/sandbox_win.cc +++ b/sandbox/policy/win/sandbox_win.cc @@ -631,11 +631,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() { @@ -822,7 +822,7 @@ index 0bcb43d58cfc3ae867824264766ecdd1b0f99360..6cad7a39333415d3fb1aed559b108a22 DWORD last_error = GetLastError(); std::move(result_callback).Run(base::Process(), last_error, result); diff --git a/sandbox/policy/win/sandbox_win.h b/sandbox/policy/win/sandbox_win.h -index 7bcbec87df27830a997115e00480a60b223ff87c..63a9d7c195c248be46f5282d34952ba4965b2b1b 100644 +index 2e8a3a6e5546b125ab111f9f4f4c75975f6fba58..fa63cac620595921da993c531b9ca263595b9600 100644 --- a/sandbox/policy/win/sandbox_win.h +++ b/sandbox/policy/win/sandbox_win.h @@ -94,7 +94,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin { 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 3b1a0928d2..97e6c91515 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,10 +20,10 @@ 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 78a23d7feb5980c4f27d54c83e014119ba2e711c..2b0610dc6e3d960436c94a9e303629bd7bb28617 100644 +index 4ef3f7eb6917b5e3192e96fc8acdcda902ffb8d9..b89174cbf083b62676826fc399081ca8b392d1b9 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 -@@ -51,7 +51,7 @@ enum CSSSampleId { +@@ -54,7 +54,7 @@ enum CSSSampleId { kInternalOverscrollContainer = 0, kInternalOverscrollPosition = 0, kInternalUnbounded = 0, @@ -33,10 +33,10 @@ index 78a23d7feb5980c4f27d54c83e014119ba2e711c..2b0610dc6e3d960436c94a9e303629bd // per page visit for each CSS histogram being logged on the blink side and the // browser side. diff --git a/third_party/blink/renderer/build/scripts/core/css/css_properties.py b/third_party/blink/renderer/build/scripts/core/css/css_properties.py -index 1c01e4d6699da8760e074a5825784e139ed58fd4..c678a3df0b9e5a8c9e0bd99c1aa540b2e54534d8 100755 +index 7c8fb238bcd489ee3f7707c19411e15b5c43c557..3c68c0aae79d07244adb31c00ddc9d8715e8d3a4 100755 --- a/third_party/blink/renderer/build/scripts/core/css/css_properties.py +++ b/third_party/blink/renderer/build/scripts/core/css/css_properties.py -@@ -346,7 +346,7 @@ class CSSProperties(object): +@@ -348,7 +348,7 @@ class CSSProperties(object): name_without_leading_dash = name_without_leading_dash[1:] internal_visited_order = 1 if name_without_leading_dash.startswith( @@ -46,10 +46,10 @@ index 1c01e4d6699da8760e074a5825784e139ed58fd4..c678a3df0b9e5a8c9e0bd99c1aa540b2 '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 65aa6abf12b668826fef6308976906c6cb37bfb1..b261f61b048888b547445fe8c0446a8b1d7746de 100644 +index 0667b778d5515cc52d2d2fbe6f597043cff038e4..2b455208370358312c815af31f62eadb8a47a442 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5 -@@ -10293,6 +10293,27 @@ +@@ -10306,6 +10306,27 @@ property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"], }, @@ -78,23 +78,24 @@ index 65aa6abf12b668826fef6308976906c6cb37bfb1..b261f61b048888b547445fe8c0446a8b { 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 d9983abcd27cb91c62c1a45689813bd01328b245..8bd8885d7d9c59d4059a3c33b6d3d6df3685f52d 100644 +index 8c873fd63d931fd965f3107e506c0927a1d348d6..e5b8678656e4b0fa4f32e3df1fbfc1005dcbb52a 100644 --- a/third_party/blink/renderer/core/css/css_property_equality.cc +++ b/third_party/blink/renderer/core/css/css_property_equality.cc -@@ -404,6 +404,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property, - return a.DominantBaseline() == b.DominantBaseline(); +@@ -443,6 +443,9 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property, + return ValueEquals(a.DominantBaseline(), b.DominantBaseline()); case CSSPropertyID::kDynamicRangeLimit: - return a.GetDynamicRangeLimit() == b.GetDynamicRangeLimit(); + return ValueEquals(a.GetDynamicRangeLimit(), b.GetDynamicRangeLimit()); + case CSSPropertyID::kElectronCornerSmoothing: -+ return a.ElectronCornerSmoothing() == b.ElectronCornerSmoothing(); ++ return ValueEquals(a.ElectronCornerSmoothing(), ++ b.ElectronCornerSmoothing()); case CSSPropertyID::kEmptyCells: - return a.EmptyCells() == b.EmptyCells(); + return ValueEquals(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 32981e98155ada661acf5d3441f94d101dff7e53..c477414fe5b9ca954fb92acbcfbac2b2863d0631 100644 +index 6f3edfc6f028ff77ef1adbe06cd4d02a7f3bbc1d..32da620be863bcb6e0efb4cd00c1183b7d6d54e3 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 -@@ -12774,5 +12774,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue( +@@ -12836,5 +12836,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue( CSSValueID::kNone>(stream); } @@ -132,10 +133,10 @@ index 32981e98155ada661acf5d3441f94d101dff7e53..c477414fe5b9ca954fb92acbcfbac2b2 } // 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 0966ccb7ebc730915fb5655e9c7824700b0a1710..b4fad19ea344f2a9442fd8b3f0bfcb70e58f321c 100644 +index ab10dab4d319c334d30ba94d9fc3ad306ae8dda5..89575a4e46d0f0a1db89d31c3ae084395105216c 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 -@@ -4231,6 +4231,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback( +@@ -4232,6 +4232,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback( return PositionTryFallback(scoped_name, tactic_list); } @@ -164,10 +165,10 @@ index fa5c8716759cc482f6d68ba90a5fadbb51a1bb46..0f02a1cc9c5cbed510fd2ce8335cda7b static TextOverflowData ConvertTextOverflow(StyleResolverState&, const CSSValue&); diff --git a/third_party/blink/renderer/core/paint/contoured_border_geometry.cc b/third_party/blink/renderer/core/paint/contoured_border_geometry.cc -index 19cda703154dab9397827ab6ea66c2ca446c644d..dd5943c511886f4e39b2e7f10e67e60fa9a67290 100644 +index b721dd3809c0b6c89574a515bac32d397a1bfb09..750a3603bd18680228220b831709d3271e96afa8 100644 --- a/third_party/blink/renderer/core/paint/contoured_border_geometry.cc +++ b/third_party/blink/renderer/core/paint/contoured_border_geometry.cc -@@ -51,6 +51,24 @@ float EffectiveCurvature(Superellipse superellipse, const gfx::SizeF& radius) { +@@ -53,6 +53,24 @@ float EffectiveCurvature(Superellipse superellipse, const gfx::SizeF& radius) { : superellipse.Exponent(); } @@ -192,7 +193,7 @@ index 19cda703154dab9397827ab6ea66c2ca446c644d..dd5943c511886f4e39b2e7f10e67e60f gfx::QuadF ComputeHullQuad(const ContouredRect::Corner& corner) { const gfx::PointF half_corner = corner.HalfCorner(); const gfx::PointF perpendicular_line = -@@ -150,7 +168,8 @@ ContouredRect ComputeContouredBorderFromStyle( +@@ -164,7 +182,8 @@ ContouredRect ComputeContouredBorderFromStyle( EffectiveCurvature(style.CornerTopLeftShape(), radii.TopLeft()), EffectiveCurvature(style.CornerTopRightShape(), radii.TopRight()), EffectiveCurvature(style.CornerBottomRightShape(), radii.BottomRight()), @@ -203,10 +204,10 @@ index 19cda703154dab9397827ab6ea66c2ca446c644d..dd5943c511886f4e39b2e7f10e67e60f return result; } diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn -index bf84feaba300ebc1075fe0d838cd3aee697b5db6..ae41f4faedddca48137ef3d0da5c09119bb606b1 100644 +index dad3cad0e035ce8b3af46a5663200674496c4406..123f27f58f6541cee757f855e0f697214b2f19bc 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -1689,6 +1689,8 @@ component("platform") { +@@ -1690,6 +1690,8 @@ component("platform") { "widget/widget_base.h", "widget/widget_base_client.h", "windows_keyboard_codes.h", @@ -314,7 +315,7 @@ index 3602b0cc807dde1b6934ab0b1937f1d8debd4614..f2ab915c96f6a53f6d032f4c01fd6f05 auto draw_as_single_path = [&]() { diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -index 0956311d1d9cd79ba60f65c8fcc6377a2326b679..1165042ad0e918678409c42c1825a3ff4bf0abba 100644 +index 5282f5f3e481a4c72ce33cc877e99335bc72f79f..55272bc74add2d4900efd1810439e3f279653b4c 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 @@ -215,6 +215,10 @@ diff --git a/patches/chromium/feat_deliver_service_worker_preload_data_via_embeddedworkerstartparams.patch b/patches/chromium/feat_deliver_service_worker_preload_data_via_embeddedworkerstartparams.patch index 5006d52b67..2811c4fb61 100644 --- a/patches/chromium/feat_deliver_service_worker_preload_data_via_embeddedworkerstartparams.patch +++ b/patches/chromium/feat_deliver_service_worker_preload_data_via_embeddedworkerstartparams.patch @@ -16,10 +16,10 @@ WebServiceWorkerContextProxy::ElectronPreloadData() getter backed by WorkerGlobalScope. diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc -index ef0bdca126875e5763b5bb01f4e733d322d0ab6c..2bbc9dae9e88cc533fb23c2fa375422b0ee1f0a1 100644 +index f1305b444c578b9d3f67470ddac1258c8a3cd903..67efc8609de5ff6316ef4348a474f09c334b8e7b 100644 --- a/content/browser/service_worker/service_worker_version.cc +++ b/content/browser/service_worker/service_worker_version.cc -@@ -2840,6 +2840,12 @@ void ServiceWorkerVersion::StartWorkerInternal() { +@@ -2837,6 +2837,12 @@ void ServiceWorkerVersion::StartWorkerInternal() { params->ukm_source_id = ukm_source_id_; params->storage_key = key_; @@ -169,7 +169,7 @@ index a3bfdd9c15d3cfc5053c2a36767ea7964f2740fd..d9d608ea5b01cff08654b11e455fd7af WebFetchClientSettingsObject outside_fetch_client_settings_object) : wait_for_debugger_mode(kDontWaitForDebugger), diff --git a/third_party/blink/renderer/core/workers/global_scope_creation_params.h b/third_party/blink/renderer/core/workers/global_scope_creation_params.h -index 397909953a19cf840f657d4ee8489b0d0e62059f..59c7806e1937fd681bc206ff3bbd7a8f17fe78c0 100644 +index d5a652b33a00868054695da48cbeb0cca057faa1..d971a3437d35cc9cf45c3b5eb8f3646e9649a5c7 100644 --- a/third_party/blink/renderer/core/workers/global_scope_creation_params.h +++ b/third_party/blink/renderer/core/workers/global_scope_creation_params.h @@ -11,6 +11,7 @@ @@ -180,9 +180,9 @@ index 397909953a19cf840f657d4ee8489b0d0e62059f..59c7806e1937fd681bc206ff3bbd7a8f #include "mojo/public/cpp/bindings/pending_remote.h" #include "net/storage_access_api/status.h" #include "services/metrics/public/cpp/ukm_source_id.h" -@@ -268,6 +269,11 @@ struct CORE_EXPORT GlobalScopeCreationParams final { - // i.e. when DedicatedWorkerStart() was called. - std::optional dedicated_worker_start_time; +@@ -272,6 +273,11 @@ struct CORE_EXPORT GlobalScopeCreationParams final { + // Shared and service worker scripts have no ResourceTiming entry. + KURL dedicated_worker_script_initiator_url; + // Added by Electron. Opaque embedder preload blob, moved onto the worker + // global scope on the worker thread. Settable post-construction (like diff --git a/patches/chromium/feat_enable_customizing_symbol_color_in_framecaptionbutton.patch b/patches/chromium/feat_enable_customizing_symbol_color_in_framecaptionbutton.patch deleted file mode 100644 index 5839b80c00..0000000000 --- a/patches/chromium/feat_enable_customizing_symbol_color_in_framecaptionbutton.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Fri, 5 Apr 2024 11:07:22 +0200 -Subject: feat: enable customizing symbol color in FrameCaptionButton - -This enables customizing the symbol color on a given FrameCaptionButton -for the Window Controls Overlay API on Linux. By default, the symbol color -is dynamically calculated based on the background color of the button to -ensure it has minimum contrast required to be accessible. - -This should be upstreamed to Chromium if possible. - -diff --git a/ui/views/window/frame_caption_button.cc b/ui/views/window/frame_caption_button.cc -index ef7ee45c84b4774899b1023af0fe0928712860af..9123b31222084e16187334e9af20afc598f1f4a8 100644 ---- a/ui/views/window/frame_caption_button.cc -+++ b/ui/views/window/frame_caption_button.cc -@@ -109,7 +109,7 @@ FrameCaptionButton::FrameCaptionButton(PressedCallback callback, - FrameCaptionButton::~FrameCaptionButton() = default; - - // static --SkColor FrameCaptionButton::GetButtonColor(SkColor background_color) { -+SkColor FrameCaptionButton::GetAccessibleButtonColor(SkColor background_color) { - // Use IsDark() to change target colors instead of PickContrastingColor(), so - // that DefaultFrameHeader::GetTitleColor() (which uses different target - // colors) can change between light/dark targets at the same time. It looks -@@ -126,6 +126,22 @@ SkColor FrameCaptionButton::GetButtonColor(SkColor background_color) { - .color; - } - -+SkColor FrameCaptionButton::GetButtonColor(SkColor background_color) { -+ // If the button color has been overridden, return that. -+ if (button_color_ != SkColor()) -+ return button_color_; -+ -+ return GetAccessibleButtonColor(background_color); -+} -+ -+void FrameCaptionButton::SetButtonColor(SkColor button_color) { -+ if (button_color_ == button_color) -+ return; -+ -+ button_color_ = button_color; -+ MaybeRefreshIconAndInkdropBaseColor(); -+} -+ - // static - float FrameCaptionButton::GetInactiveButtonColorAlphaRatio() { - return 0.38f; -diff --git a/ui/views/window/frame_caption_button.h b/ui/views/window/frame_caption_button.h -index 770575ef2fcd34aa54e15787ea2cdcb765c1fabe..1c02018257075bc26bdf3e68446ff8f6c077786f 100644 ---- a/ui/views/window/frame_caption_button.h -+++ b/ui/views/window/frame_caption_button.h -@@ -45,8 +45,18 @@ class VIEWS_EXPORT FrameCaptionButton : public Button { - FrameCaptionButton& operator=(const FrameCaptionButton&) = delete; - ~FrameCaptionButton() override; - -+ // Gets the color to use for a frame caption button with accessible contrast -+ // to the given background color. -+ static SkColor GetAccessibleButtonColor(SkColor background_color); -+ - // Gets the color to use for a frame caption button. -- static SkColor GetButtonColor(SkColor background_color); -+ SkColor GetButtonColor(SkColor background_color); -+ -+ // Sets the color to use for a frame caption button. -+ // The color is by default calculated to be an accessible contrast -+ // to the background color, so you should keep that in mind when -+ // overriding that behavior. -+ void SetButtonColor(SkColor button_color); - - // Gets the alpha ratio for the colors of inactive frame caption buttons. - static float GetInactiveButtonColorAlphaRatio(); -@@ -137,6 +147,7 @@ class VIEWS_EXPORT FrameCaptionButton : public Button { - // TODO(b/292154873): Store the foreground color instead of the background - // color for the SkColor type. - std::variant color_ = gfx::kPlaceholderColor; -+ SkColor button_color_ = SkColor(); - - // Whether the button should be painted as active. - bool paint_as_active_ = false; 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 00e1dca54a..dd9e4c1600 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -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 9660bf70de66562eac16aa318e303fa66c6bfdf7..20acf7d67f5cbec632e255c798ab60a79eaf9bbc 100644 +index 6acbea5d741982ff7c7ec01ac813e0418802bb10..2dff02a63c0b26ee1604efe35b88959d5684d9f5 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -180,6 +180,8 @@ viz_component("service") { diff --git a/patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch b/patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch index 9c598df4e0..0cb1848197 100644 --- a/patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch +++ b/patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch @@ -12,10 +12,10 @@ We attempt to migrate the safe storage key from the old account, if that migrati Existing apps that aren't built for the app store should be unimpacted, there is one edge case where a user uses BOTH an AppStore and a darwin build of the same app only one will keep it's access to the safestorage key as during the migration we delete the old account. This is an acceptable edge case as no one should be actively using two versions of the same app. diff --git a/components/os_crypt/common/keychain_password_mac.mm b/components/os_crypt/common/keychain_password_mac.mm -index 69bfbbf0f58ca3b05a601bea87b14dcf0fb2eecb..d65359cfca82ca8c31922e8856435cf13b40810f 100644 +index 80b417c1a022c287acae948b51d6f7c863f93721..a8ef8d4b14f74d5f57bee80cad377eae8d69bd58 100644 --- a/components/os_crypt/common/keychain_password_mac.mm +++ b/components/os_crypt/common/keychain_password_mac.mm -@@ -32,6 +32,12 @@ +@@ -29,6 +29,12 @@ namespace { @@ -28,14 +28,15 @@ index 69bfbbf0f58ca3b05a601bea87b14dcf0fb2eecb..d65359cfca82ca8c31922e8856435cf1 // These two strings ARE indeed user facing. But they are used to access // the encryption keyword. So as to not lose encrypted data when system // locale changes we DO NOT LOCALIZE. -@@ -88,16 +94,55 @@ +@@ -96,18 +102,56 @@ uma_result); }; -- auto password = keychain.FindGenericPassword(service_name, account_name); -+ const std::string suffixed_account_name = account_name + kAccountNameSuffix; -+ auto password = -+ keychain.FindGenericPassword(service_name, suffixed_account_name); ++ const std::string suffixed_account_name = ++ GetAccountName() + kAccountNameSuffix; + auto password = +- keychain_->FindGenericPassword(GetServiceName(), GetAccountName()); ++ keychain_->FindGenericPassword(GetServiceName(), suffixed_account_name); if (password.has_value()) { uma_result = FindGenericPasswordResult::kPasswordFound; @@ -46,13 +47,14 @@ index 69bfbbf0f58ca3b05a601bea87b14dcf0fb2eecb..d65359cfca82ca8c31922e8856435cf1 + // non-suffixed account exists. If it does we can use that key and migrate it + // to the new account. + if (password.error() == errSecItemNotFound) { -+ password = keychain.FindGenericPassword(service_name, account_name); ++ password = ++ keychain_->FindGenericPassword(GetServiceName(), GetAccountName()); + + if (password.has_value()) { + // If we found the legacy account name we should copy it over to + // the new suffixed account -+ OSStatus error = keychain.AddGenericPassword( -+ service_name, suffixed_account_name, *password); ++ OSStatus error = keychain_->AddGenericPassword( ++ GetServiceName(), suffixed_account_name, *password); + + if (error == noErr) { + // If we successfully made the suffixed account we can delete the old @@ -60,11 +62,10 @@ index 69bfbbf0f58ca3b05a601bea87b14dcf0fb2eecb..d65359cfca82ca8c31922e8856435cf1 + // issues + NSDictionary* delete_query = @{ + (__bridge id)kSecClass : (__bridge id)kSecClassGenericPassword, -+ (__bridge id)kSecAttrService : @(service_name.c_str()), -+ (__bridge id)kSecAttrAccount : @(account_name.c_str()), ++ (__bridge id)kSecAttrService : @(GetServiceName().c_str()), ++ (__bridge id)kSecAttrAccount : @(GetAccountName().c_str()), + }; -+ error = keychain.ItemDelete( -+ (__bridge CFDictionaryRef)delete_query); ++ error = keychain_->ItemDelete((__bridge CFDictionaryRef)delete_query); + if (error != noErr) { + OSSTATUS_DLOG(ERROR, error) + << "Keychain delete for legacy key failed"; @@ -80,8 +81,8 @@ index 69bfbbf0f58ca3b05a601bea87b14dcf0fb2eecb..d65359cfca82ca8c31922e8856435cf1 + if (password.error() == errSecItemNotFound) { uma_result = FindGenericPasswordResult::kPasswordNotFound; -- return AddRandomPasswordToKeychain(keychain, service_name, account_name); -+ return AddRandomPasswordToKeychain(keychain, service_name, + return AddRandomPasswordToKeychain(*keychain_, GetServiceName(), +- GetAccountName()); + suffixed_account_name); } 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 cc498c2b25..f4e10e6621 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 d166641ee2492f3e6afdf23c936ae8738cb3848c..5b444e70af843c2f319264de9ef7f506 string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index cbf7f704ced37efe0bfe302762e789949d9c7ad1..19617b63f0e442011c434480024f6b4c5bbdf784 100644 +index 729337bbde095d2be4ec50b479306054b372076c..5be66910a71c6300e19c2426c9e471922dbe2087 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -372,6 +372,9 @@ URLLoader::URLLoader( +@@ -371,6 +371,9 @@ URLLoader::URLLoader( mojo::SimpleWatcher::ArmingPolicy::MANUAL, TaskRunner(request.priority)), per_factory_orb_state_(context.GetMutableOrbState()), @@ -125,7 +125,7 @@ index cbf7f704ced37efe0bfe302762e789949d9c7ad1..19617b63f0e442011c434480024f6b4c devtools_request_id_(request.devtools_request_id), options_(PopulateOptions(options, factory_params_->is_orb_enabled, -@@ -571,7 +574,7 @@ void URLLoader::SetUpUrlRequestCallbacks( +@@ -570,7 +573,7 @@ void URLLoader::SetUpUrlRequestCallbacks( &URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this))); } @@ -134,7 +134,7 @@ index cbf7f704ced37efe0bfe302762e789949d9c7ad1..19617b63f0e442011c434480024f6b4c url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1166,6 +1169,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1165,6 +1168,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 a1c52d9ecb..9fa8fbb246 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 @@ -130,10 +130,10 @@ index 36410ff29d9c82e59f93fbb82968064bd330dfde..6c3f994e0b184f78bd9442002bb4dfae virtual void PassiveInsecureContentFound(const WebURL&) {} diff --git a/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc b/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc -index bc94b303773d865175a8d4158a9fdb9e161a9c03..7aaa20eb8a8aed93a78af48903ddb7dbfbb5a84f 100644 +index 039fb1d728080500db9e9c462bcd08d6c3f4a7ae..1ca87171fa8274e0a2acbf5f1ae64115ab354484 100644 --- a/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc +++ b/third_party/blink/renderer/core/editing/commands/clipboard_commands.cc -@@ -129,7 +129,7 @@ bool ClipboardCommands::CanReadClipboard(LocalFrame& frame, +@@ -148,7 +148,7 @@ bool ClipboardCommands::CanReadClipboard(LocalFrame& frame, return true; } return frame.GetContentSettingsClient() && @@ -142,7 +142,7 @@ index bc94b303773d865175a8d4158a9fdb9e161a9c03..7aaa20eb8a8aed93a78af48903ddb7db } bool ClipboardCommands::CanWriteClipboard(LocalFrame& frame, -@@ -354,7 +354,7 @@ bool ClipboardCommands::PasteSupported(LocalFrame* frame) { +@@ -373,7 +373,7 @@ bool ClipboardCommands::PasteSupported(LocalFrame* frame) { return true; } return frame->GetContentSettingsClient() && diff --git a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch index 412f385e9e..2811e14bef 100644 --- a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch +++ b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch @@ -154,10 +154,10 @@ index 1e0d6650245c12c2320a7cbc5157d8e24bc45b76..5451864c5768d68d53a6cb23c6de4f3a if (!weak_ptr) { return; diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h -index 902872e60f6bfaf3e81d306ae2ce4d9b606c5b7b..f61a308c2d261f2fd8fdb6db867e9de52a9e7882 100644 +index 35b8dac847f55042ed84c60e112184d9a30c5f40..2e307957e9305f273660bcd61fe993f9f3dae597 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h -@@ -273,7 +273,7 @@ class FullscreenController : public ExclusiveAccessControllerBase { +@@ -277,7 +277,7 @@ class FullscreenController : public ExclusiveAccessControllerBase { // Set of parameters used to enter fullscreen std::optional fullscreen_parameters_; diff --git a/patches/chromium/fix_add_reinitializegeneratedcodecachecontext_to.patch b/patches/chromium/fix_add_reinitializegeneratedcodecachecontext_to.patch index cb694b2116..5c326dc9ae 100644 --- a/patches/chromium/fix_add_reinitializegeneratedcodecachecontext_to.patch +++ b/patches/chromium/fix_add_reinitializegeneratedcodecachecontext_to.patch @@ -14,10 +14,10 @@ This new method properly shuts down the existing context and creates a fresh one, allowing Electron session.setCodeCachePath() to work correctly. diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc -index 4750d110f46c99c767f27778a6acaffbdcb2bc3a..2c22de117b3f41f03a7b876757194636dc4c169d 100644 +index fb25666bd8748c0dc66317ebcce9ec45bb87126a..260fced8f99c7891a4803cdb557525b670fdf9ce 100644 --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc -@@ -1877,6 +1877,22 @@ StoragePartitionImpl::GetGeneratedCodeCacheContext() { +@@ -1879,6 +1879,22 @@ StoragePartitionImpl::GetGeneratedCodeCacheContext() { return generated_code_cache_context_.get(); } @@ -41,7 +41,7 @@ index 4750d110f46c99c767f27778a6acaffbdcb2bc3a..2c22de117b3f41f03a7b876757194636 StoragePartitionImpl::GetDevToolsBackgroundServicesContext() { CHECK(initialized_, base::NotFatalUntil::M159); diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h -index 950e91e164189c4cb051d6a8ccc66e0db615e005..d1e459b227e13cfd15b60416f6a82c170ec20290 100644 +index 5f34e2418631739ad8c7673e7f86c892fad3c820..5579567ab72be026845ead1d8b9eb5fc932f7450 100644 --- a/content/browser/storage_partition_impl.h +++ b/content/browser/storage_partition_impl.h @@ -187,6 +187,8 @@ class CONTENT_EXPORT StoragePartitionImpl 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 406d947592..a78ea28aa3 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 @@ -23,10 +23,10 @@ additional headless changes from breaking macOS window behavior. https://chromium-review.googlesource.com/c/chromium/src/+/7487666 diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -index 4025a23ea2bcb7ee7ba9eabd6a1d23fae80b145b..80f1ff1833e481e81e8e4e1576c486ea31a2dd84 100644 +index 15d59648317174e48993b3fd316f7160d3c4288b..c5c79c4a4dc07bfa1de782cb8d84df0969141627 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -@@ -246,6 +246,7 @@ @implementation NativeWidgetMacNSWindow { +@@ -248,6 +248,7 @@ @implementation NativeWidgetMacNSWindow { BOOL _isEnforcingNeverMadeVisible; BOOL _activationIndependence; BOOL _isTooltip; @@ -34,7 +34,7 @@ index 4025a23ea2bcb7ee7ba9eabd6a1d23fae80b145b..80f1ff1833e481e81e8e4e1576c486ea BOOL _isShufflingForOrdering; BOOL _miniaturizationInProgress; BOOL _inSetFrameFromAdjustment; -@@ -254,6 +255,7 @@ @implementation NativeWidgetMacNSWindow { +@@ -256,6 +257,7 @@ @implementation NativeWidgetMacNSWindow { @synthesize bridgedNativeWidgetId = _bridgedNativeWidgetId; @synthesize bridge = _bridge; @synthesize isTooltip = _isTooltip; @@ -42,7 +42,7 @@ index 4025a23ea2bcb7ee7ba9eabd6a1d23fae80b145b..80f1ff1833e481e81e8e4e1576c486ea @synthesize isShufflingForOrdering = _isShufflingForOrdering; @synthesize preventKeyWindow = _preventKeyWindow; @synthesize childWindowAddedHandler = _childWindowAddedHandler; -@@ -275,23 +277,6 @@ - (instancetype)initWithContentRect:(NSRect)contentRect +@@ -280,23 +282,6 @@ - (instancetype)initWithContentRect:(NSRect)contentRect return self; } @@ -67,11 +67,11 @@ index 4025a23ea2bcb7ee7ba9eabd6a1d23fae80b145b..80f1ff1833e481e81e8e4e1576c486ea return _headless_info.get(); } 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 f7ec5823e1c8e8fbb2672cf5464d35c42200a843..42b51daf6b7bb167474b38c42c95b1a31be4c2be 100644 +index f38643efc0dab7dfc01da57c06c1d9e02128dfe2..15fce60489ef603f02f8769d1d6d76248bb3849e 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 -@@ -603,7 +603,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { - is_translucent_window_ = params->is_translucent; +@@ -604,7 +604,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { + prevent_stale_content_after_hide_ = params->prevent_stale_content_after_hide; pending_restoration_data_ = params->state_restoration_data.Clone(); - if (display::Screen::Get()->IsHeadless()) { @@ -80,7 +80,7 @@ index f7ec5823e1c8e8fbb2672cf5464d35c42200a843..42b51daf6b7bb167474b38c42c95b1a3 } diff --git a/components/remote_cocoa/common/native_widget_ns_window.mojom b/components/remote_cocoa/common/native_widget_ns_window.mojom -index a41254c1f31654c1326b4bf1f29237bdf44bbe5a..8ca5673a225b69b5630383ed9673653ba03a0e97 100644 +index a01010ef19d2b5a3dcc8c04638ab33d07069ec86..2ae6abd30e451558853d1474f9fe27077036405e 100644 --- a/components/remote_cocoa/common/native_widget_ns_window.mojom +++ b/components/remote_cocoa/common/native_widget_ns_window.mojom @@ -98,6 +98,9 @@ struct NativeWidgetNSWindowInitParams { @@ -94,7 +94,7 @@ index a41254c1f31654c1326b4bf1f29237bdf44bbe5a..8ca5673a225b69b5630383ed9673653b StateRestorationData? state_restoration_data; 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 aa8fd9cbb9711e81a8772ff0b3d8a625625e7e4d..65e3e8f5c7f42fdeda3009006bc0a7f7a6dd1275 100644 +index d6592e42e4dcf685a990555eda74cc047f1067ec..b78842076d125c3c67942011099d889a12eea133 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h @@ -574,6 +574,7 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost @@ -106,10 +106,10 @@ index aa8fd9cbb9711e81a8772ff0b3d8a625625e7e4d..65e3e8f5c7f42fdeda3009006bc0a7f7 bool is_visible_on_all_workspaces_ = 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 3f20a28c4f77f0089f690755cc17af21f8c4cb57..4ed5b2b4c7bf3852f8ab34497e3ef711fbd45090 100644 +index e8956065a0ec871a2c29759675f20a2ada3f7237..a05eaf271a9cc81df4f0c0de25edbe4e153aa9dd 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -477,6 +477,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -479,6 +479,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, if (!is_tooltip) { tooltip_manager_ = std::make_unique(GetNSWindowMojo()); } @@ -117,15 +117,15 @@ index 3f20a28c4f77f0089f690755cc17af21f8c4cb57..4ed5b2b4c7bf3852f8ab34497e3ef711 if (params.workspace.length()) { if (std::optional> restoration_data = -@@ -494,6 +495,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -496,6 +497,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 -@@ -685,9 +687,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator, + window_params->prevent_stale_content_after_hide = + params.prevent_stale_content_after_hide; +@@ -689,9 +691,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(); @@ -139,7 +139,7 @@ index 3f20a28c4f77f0089f690755cc17af21f8c4cb57..4ed5b2b4c7bf3852f8ab34497e3ef711 // 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 f36f9a948fc27f891b30c45a6996e47ac06f0694..88d732b40ada46c864407281bb9822e5187bd8c8 100644 +index 8bae166f9d9f6e76c189e1300ad1547c62040edf..cc469a148e1813fcc8b306440f88faae22a7344e 100644 --- a/ui/views/widget/widget.cc +++ b/ui/views/widget/widget.cc @@ -262,6 +262,18 @@ ui::ZOrderLevel Widget::InitParams::EffectiveZOrderLevel() const { @@ -170,7 +170,7 @@ index f36f9a948fc27f891b30c45a6996e47ac06f0694..88d732b40ada46c864407281bb9822e5 if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred && diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h -index 25d992b456b4071894fb69d03db999963fde2b42..4ddf189a1b802571bf3c6eea60d0299d7a3c790e 100644 +index b0896143e16f0fed556672d7c5645800d2c26a4e..f3b8a9b19a7f0af76ec3a4a5d9258fc92ae8caad 100644 --- a/ui/views/widget/widget.h +++ b/ui/views/widget/widget.h @@ -331,6 +331,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -195,7 +195,7 @@ index 25d992b456b4071894fb69d03db999963fde2b42..4ddf189a1b802571bf3c6eea60d0299d // If set, the window size will follow the content preferred size. bool autosize = false; -@@ -1318,6 +1326,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -1328,6 +1336,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // with it. TYPE_CONTROL and TYPE_TOOLTIP is not considered top level. bool is_top_level() const { return is_top_level_; } @@ -207,7 +207,7 @@ index 25d992b456b4071894fb69d03db999963fde2b42..4ddf189a1b802571bf3c6eea60d0299d // True if the window size will follow the content preferred size. bool is_autosized() const { return is_autosized_; } -@@ -1812,6 +1825,9 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -1829,6 +1842,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_allow_any_exit_code_in_browsermainrunner_setoverrideresultcode.patch b/patches/chromium/fix_allow_any_exit_code_in_browsermainrunner_setoverrideresultcode.patch new file mode 100644 index 0000000000..4fda9a8084 --- /dev/null +++ b/patches/chromium/fix_allow_any_exit_code_in_browsermainrunner_setoverrideresultcode.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: clavin +Date: Wed, 23 Sep 2026 23:05:21 -0700 +Subject: fix: allow any exit code in BrowserMainRunner::SetOverrideResultCode + +content only lets an embedder override a normal browser exit with a code +at or above content::RESULT_CODE_LAST_CODE, so that it cannot be mistaken +for one of content's own result codes. Electron's app.exit(code) passes +an app-chosen code straight to the OS, so drop the check. The contract +comment in browser_main_runner.h is left as upstream wrote it. + +This patch can be removed if upstream lets embedders set exit codes +below RESULT_CODE_LAST_CODE. + +diff --git a/content/browser/browser_main_runner_impl.cc b/content/browser/browser_main_runner_impl.cc +index 485e4cb4f764f3bbfa235f8c2edee1a95f311354..dbbcc0b130504bbd11871d12fa21b2f5a3867d5a 100644 +--- a/content/browser/browser_main_runner_impl.cc ++++ b/content/browser/browser_main_runner_impl.cc +@@ -196,7 +196,6 @@ bool BrowserMainRunner::ExitedMainMessageLoop() { + + // static + void BrowserMainRunner::SetOverrideResultCode(int code) { +- CHECK_GE(code, RESULT_CODE_LAST_CODE); + GetProcessResultCode() = code; + } + diff --git a/patches/chromium/fix_check_for_file_existence_before_setting_mtime.patch b/patches/chromium/fix_check_for_file_existence_before_setting_mtime.patch index 0b1eced798..aa0b549867 100644 --- a/patches/chromium/fix_check_for_file_existence_before_setting_mtime.patch +++ b/patches/chromium/fix_check_for_file_existence_before_setting_mtime.patch @@ -8,7 +8,7 @@ Check for broken links by confirming the file exists before setting its utime. This patch should be upstreamed & removed. diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py -index 86b60b51446cad85c2cd340517dd6625450d8395..76ba9b1b6d0d784ecd316ae22d31cbd62a2ea57e 100755 +index 4621284b359dbfc0a290f928469bd769ec328467..342718393082b375a2bac400e965c5357198552a 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -217,10 +217,9 @@ def DownloadAndUnpack(url, output_dir, path_prefixes=None, is_known_zip=False): 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 a2d7e915d3..c41a9e0bb6 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 @@ -30,10 +30,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 9ae317066858fc00ee16c804cd9c5f1374b851a7..071ca31da57247c7181465e459f3983755c2f73d 100644 +index d0a8f2f8528b149f88cea810274ca0d0f24c75a9..032a90d0a74712ed02ca7f3ee525b39e720c601f 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -12729,6 +12729,12 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() { +@@ -12710,6 +12710,12 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() { target_rph_id); } diff --git a/patches/chromium/fix_disabling_background_throttling_in_compositor.patch b/patches/chromium/fix_disabling_background_throttling_in_compositor.patch index 19d18aebd9..06af8f0564 100644 --- a/patches/chromium/fix_disabling_background_throttling_in_compositor.patch +++ b/patches/chromium/fix_disabling_background_throttling_in_compositor.patch @@ -12,10 +12,10 @@ invisible state of the `viz::DisplayScheduler` owned by the `ui::Compositor`. diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc -index 791dd08a8d911e3c8a226804e9645c4ef1554ca0..201f914eaa68ba96f01fd39a2f72bf3442cb7a8d 100644 +index 9679f9ad8f824cd3955a8e8ed0a3038388c8c88d..f8f0fd04a9e2ddd35c6c818e3773f9b49915ef9c 100644 --- a/ui/compositor/compositor.cc +++ b/ui/compositor/compositor.cc -@@ -368,7 +368,8 @@ void Compositor::SetLayerTreeFrameSink( +@@ -367,7 +367,8 @@ void Compositor::SetLayerTreeFrameSink( // to match the Compositor's. if (display_private_) { display_private_->Resize(size()); @@ -25,7 +25,7 @@ index 791dd08a8d911e3c8a226804e9645c4ef1554ca0..201f914eaa68ba96f01fd39a2f72bf34 display_private_->SetDisplayColorSpaces(display_color_spaces_); display_private_->SetDisplayColorMatrix( gfx::SkM44ToTransform(display_color_matrix_)); -@@ -608,7 +609,9 @@ void Compositor::SetVisible(bool visible) { +@@ -607,7 +608,9 @@ void Compositor::SetVisible(bool visible) { // updated then. We need to call this even if the visibility hasn't changed, // for the same reason. if (display_private_) @@ -36,7 +36,7 @@ index 791dd08a8d911e3c8a226804e9645c4ef1554ca0..201f914eaa68ba96f01fd39a2f72bf34 if (changed) { observer_list_.Notify(&CompositorObserver::OnCompositorVisibilityChanged, -@@ -1076,6 +1079,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() { +@@ -1075,6 +1078,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() { host_begin_frame_observer_->GetBoundRemote()); } diff --git a/patches/chromium/fix_don_t_read_a_stale_last-error_in_replacefile_on_windows.patch b/patches/chromium/fix_don_t_read_a_stale_last-error_in_replacefile_on_windows.patch deleted file mode 100644 index 431a16c501..0000000000 --- a/patches/chromium/fix_don_t_read_a_stale_last-error_in_replacefile_on_windows.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: John Kleinschmidt -Date: Thu, 30 Jul 2026 16:26:11 -0400 -Subject: fix: don't read a stale last-error in ReplaceFile on Windows - -When ::ReplaceFile fails with ERROR_FILE_NOT_FOUND, ReplaceFile() falls -back to ::MoveFile and, if that also fails, reports the ::MoveFile -failure via File::GetLastFileError(). However, RecordReplaceFileResult() -runs between the ::MoveFile call and the GetLastError() call. Recording a -histogram touches TLS, locks and (on first use) allocates, any of which -may reset the thread's last-error value to ERROR_SUCCESS. - -When that happens File::OSErrorToFileError() is called with -ERROR_SUCCESS, which trips its "This function should only be called for -errors" DCHECK and crashes debug/DCHECK-enabled builds: - - FATAL:base/files/file_win.cc:386] DCHECK failed: - static_cast(0L) != last_error (0 vs. 0). - -Capture the ::MoveFile error code immediately after the call instead, and -fall back to the original ::ReplaceFile error if no error was recorded. - -diff --git a/base/files/file_util_win.cc b/base/files/file_util_win.cc -index 199470236eadecbc75c08284927ef8976ed8d9bb..f9f25a6522d4ddccd149018072a6699b539a5294 100644 ---- a/base/files/file_util_win.cc -+++ b/base/files/file_util_win.cc -@@ -653,6 +653,7 @@ bool ReplaceFile(const FilePath& from_path, - } - - const DWORD replace_error_code = GetLastError(); -+ DWORD move_error_code = ERROR_SUCCESS; - if (replace_error_code == ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 && - !backup_path.empty()) { - // In the case of ERROR_UNABLE_TO_MOVE_REPLACEMENT_2, the replace operation -@@ -702,6 +703,9 @@ bool ReplaceFile(const FilePath& from_path, - // doesn't already exist. - const bool is_move_success = - ::MoveFile(from_path.value().c_str(), to_path.value().c_str()); -+ // Capture the failure reason immediately: everything below (histogram -+ // recording, DeleteFile, ...) may reset the thread's last-error value. -+ move_error_code = is_move_success ? DWORD{ERROR_SUCCESS} : ::GetLastError(); - RecordReplaceFileResult(/*is_backup_path_valid=*/!backup_path.empty(), - replace_error_code, is_move_success); - -@@ -722,8 +726,9 @@ bool ReplaceFile(const FilePath& from_path, - if (error) { - const File::Error replace_error = - File::OSErrorToFileError(replace_error_code); -- *error = replace_error == File::FILE_ERROR_NOT_FOUND -- ? File::GetLastFileError() -+ *error = (replace_error == File::FILE_ERROR_NOT_FOUND && -+ move_error_code != ERROR_SUCCESS) -+ ? File::OSErrorToFileError(move_error_code) - : replace_error; - } - return false; diff --git a/patches/chromium/fix_linux_tray_id.patch b/patches/chromium/fix_linux_tray_id.patch index 13468eeec3..95bb50984a 100644 --- a/patches/chromium/fix_linux_tray_id.patch +++ b/patches/chromium/fix_linux_tray_id.patch @@ -13,7 +13,7 @@ https://github.com/electron/electron/pull/48675#issuecomment-3452781711 for more info. diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc -index 98f9abe44e4c0c85e69fda3f1c28bc48b5345dce..b6386ecc2eca721cc56a47a16f77c3a5c5eb506a 100644 +index 3f7543580ee1d82a28c6864ef0154aafcb6806f0..110fdb5e1654433ff31a6893ee7a8c830a702d60 100644 --- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc +++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc @@ -138,8 +138,9 @@ int NextServiceId() { @@ -50,7 +50,7 @@ index 98f9abe44e4c0c85e69fda3f1c28bc48b5345dce..b6386ecc2eca721cc56a47a16f77c3a5 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (bus_) { CheckStatusNotifierWatcherHasOwner(); -@@ -476,7 +479,8 @@ void StatusIconLinuxDbus::OnHostRegisteredResponse( +@@ -464,7 +467,8 @@ void StatusIconLinuxDbus::OnHostRegisteredResponse( SetProperty<"s">(kPropertyAttentionIconName, "", false); SetProperty<"s">(kPropertyAttentionMovieName, "", false); SetProperty<"s">(kPropertyCategory, kPropertyValueCategory, false); @@ -61,7 +61,7 @@ index 98f9abe44e4c0c85e69fda3f1c28bc48b5345dce..b6386ecc2eca721cc56a47a16f77c3a5 SetProperty<"s">(kPropertyStatus, kPropertyValueStatus, false); SetProperty<"s">(kPropertyTitle, "", false); diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h -index e45db2d3a657dfacf8042d49113f5a3f2e960ee7..aa5647cdf8b9431b7195c8e6c70ee32dab6e28b2 100644 +index 4fa0a91af74e63a7f78bcbb02623e5f49cb757f4..d12aedd85fadfe0d596da7e3469506507b86ce0d 100644 --- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h +++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h @@ -38,8 +38,9 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux, @@ -76,7 +76,7 @@ index e45db2d3a657dfacf8042d49113f5a3f2e960ee7..aa5647cdf8b9431b7195c8e6c70ee32d StatusIconLinuxDbus(const StatusIconLinuxDbus&) = delete; StatusIconLinuxDbus& operator=(const StatusIconLinuxDbus&) = delete; -@@ -163,6 +164,8 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux, +@@ -162,6 +163,8 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux, size_t icon_file_id_ = 0; base::FilePath icon_file_; diff --git a/patches/chromium/fix_make_macos_text_replacement_work_on_contenteditable.patch b/patches/chromium/fix_make_macos_text_replacement_work_on_contenteditable.patch index 642d2e4eba..8d6475d389 100644 --- a/patches/chromium/fix_make_macos_text_replacement_work_on_contenteditable.patch +++ b/patches/chromium/fix_make_macos_text_replacement_work_on_contenteditable.patch @@ -11,10 +11,10 @@ is currently bugged on these elements. This patch fixes that. 2. Space now adds a space after accepting the replacement. 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 9d19d1aedc2e6334a5c6f7d42fa25838e520d938..4036bdfe43cbfb30eb14b30380553938a41a1907 100644 +index de68ea282607b76a3ba42f22cfb0619da5883c32..9d7dc65d28a9f8c5f87b3980ca81ab3d3dcded8b 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 -@@ -562,6 +562,13 @@ - (void)didAcceptReplacementString:(NSString*)acceptedString +@@ -565,6 +565,13 @@ - (void)didAcceptReplacementString:(NSString*)acceptedString if (acceptedString == nil) return; diff --git a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch index 6be7540f83..5cc772a49b 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 e3122d4555bbb492b3a7f1fd4fd757fdadd88d9e..69c06a04c20b794519c4b588deacba63c060a807 100644 +index b02065efac3316f6493776df979752dd9d749a14..5838047b94e7638cbe29aa3a2d9ca1234baa9cb1 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,10 +20,10 @@ index e3122d4555bbb492b3a7f1fd4fd757fdadd88d9e..69c06a04c20b794519c4b588deacba63 #include "chrome/browser/picture_in_picture/picture_in_picture_bounds_cache.h" #include "chrome/browser/ui/navigator/browser_navigator_params.h" #include "content/public/browser/document_picture_in_picture_window_controller.h" -@@ -34,11 +35,15 @@ +@@ -28,11 +29,15 @@ + #include "base/metrics/histogram_functions.h" + #include "base/numerics/checked_math.h" #include "base/task/sequenced_task_runner.h" - // TODO(crbug.com/421608904): include auto_picture_in_picture_tab_helper for - // Android when supporting document PiP. +#if BUILDFLAG(GOOGLE_CHROME_BRANDING) #include "chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.h" #include "chrome/browser/picture_in_picture/auto_pip_setting_overlay_view.h" @@ -33,10 +33,10 @@ index e3122d4555bbb492b3a7f1fd4fd757fdadd88d9e..69c06a04c20b794519c4b588deacba63 +#if BUILDFLAG(GOOGLE_CHROME_BRANDING) #include "chrome/browser/ui/views/picture_in_picture/document_pip_host.h" +#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) + #include "components/webapps/isolated_web_apps/scheme.h" #include "media/base/media_switches.h" - #include "net/base/url_util.h" #include "ui/views/view.h" -@@ -76,6 +81,7 @@ constexpr double kMaxWindowSizeRatio = 0.8; +@@ -70,6 +75,7 @@ constexpr double kMaxWindowSizeRatio = 0.8; // `kMaxWindowSizeRatio`. constexpr double kMaxSiteRequestedWindowSizeRatio = 0.25; @@ -44,7 +44,7 @@ index e3122d4555bbb492b3a7f1fd4fd757fdadd88d9e..69c06a04c20b794519c4b588deacba63 // Returns true if a document picture-in-picture window should be focused upon // opening it. bool ShouldFocusPictureInPictureWindow(const NavigateParams& params) { -@@ -92,6 +98,7 @@ bool ShouldFocusPictureInPictureWindow(const NavigateParams& params) { +@@ -86,6 +92,7 @@ bool ShouldFocusPictureInPictureWindow(const NavigateParams& params) { // AutoPictureInPictureTabHelper. return !auto_picture_in_picture_tab_helper->IsInAutoPictureInPicture(); } @@ -52,7 +52,7 @@ index e3122d4555bbb492b3a7f1fd4fd757fdadd88d9e..69c06a04c20b794519c4b588deacba63 // Returns the maximum area in pixels that the site can request a // picture-in-picture window to be. -@@ -225,7 +232,7 @@ bool PictureInPictureWindowManager::ExitPictureInPictureViaWindowUi( +@@ -219,7 +226,7 @@ bool PictureInPictureWindowManager::ExitPictureInPictureViaWindowUi( return false; } @@ -61,7 +61,7 @@ index e3122d4555bbb492b3a7f1fd4fd757fdadd88d9e..69c06a04c20b794519c4b588deacba63 // 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( -@@ -588,7 +595,7 @@ gfx::Size PictureInPictureWindowManager::GetMaximumWindowSize( +@@ -582,7 +589,7 @@ gfx::Size PictureInPictureWindowManager::GetMaximumWindowSize( // static void PictureInPictureWindowManager::SetWindowParams(NavigateParams& params) { @@ -70,7 +70,7 @@ index e3122d4555bbb492b3a7f1fd4fd757fdadd88d9e..69c06a04c20b794519c4b588deacba63 // Always show document picture-in-picture in a new window. When this is // not opened via the AutoPictureInPictureTabHelper, focus the window. params.window_action = -@@ -649,14 +656,14 @@ void PictureInPictureWindowManager::CreateWindowInternal( +@@ -643,14 +650,14 @@ void PictureInPictureWindowManager::CreateWindowInternal( void PictureInPictureWindowManager::CloseWindowInternal() { video_web_contents_observer_.reset(); @@ -87,7 +87,7 @@ index e3122d4555bbb492b3a7f1fd4fd757fdadd88d9e..69c06a04c20b794519c4b588deacba63 // Close and reset the picture-in-picture window controller, if it exists. if (pip_window_controller_) { -@@ -699,6 +706,7 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() { +@@ -693,6 +700,7 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() { } #if !BUILDFLAG(IS_ANDROID) @@ -95,7 +95,7 @@ index e3122d4555bbb492b3a7f1fd4fd757fdadd88d9e..69c06a04c20b794519c4b588deacba63 void PictureInPictureWindowManager::EnterStandaloneDocumentPictureInPicture( content::WebContents* parent_web_contents, std::unique_ptr child_web_contents, -@@ -747,6 +755,7 @@ void PictureInPictureWindowManager::EnterStandaloneDocumentPictureInPicture( +@@ -741,6 +749,7 @@ void PictureInPictureWindowManager::EnterStandaloneDocumentPictureInPicture( } document_pip_host_ = host->GetWeakPtr(); } @@ -103,7 +103,7 @@ index e3122d4555bbb492b3a7f1fd4fd757fdadd88d9e..69c06a04c20b794519c4b588deacba63 std::unique_ptr PictureInPictureWindowManager::GetOverlayView( -@@ -757,6 +766,7 @@ PictureInPictureWindowManager::GetOverlayView( +@@ -751,6 +760,7 @@ PictureInPictureWindowManager::GetOverlayView( return nullptr; } @@ -111,7 +111,7 @@ index e3122d4555bbb492b3a7f1fd4fd757fdadd88d9e..69c06a04c20b794519c4b588deacba63 // It would be nice to create this in `EnterPictureInPicture*`, but detecting // auto-pip while pip is in the process of opening doesn't work. // -@@ -795,6 +805,8 @@ PictureInPictureWindowManager::GetOverlayView( +@@ -789,6 +799,8 @@ PictureInPictureWindowManager::GetOverlayView( } return overlay_view; 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 4237470ba8..8e92b2632a 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 1f35ed7cf09d770dce652ed13e1453133834379d..97836d8bb87407c7d6223aff4ad90e630344c0e4 100644 +index ec6f948eca52307c47e7972a70736e38d07e910c..eb75796df5e5b9c25a213ee0a8262a30f5a7384a 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -3641,6 +3641,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged( +@@ -3782,6 +3782,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged( } } @@ -26,10 +26,10 @@ index 1f35ed7cf09d770dce652ed13e1453133834379d..97836d8bb87407c7d6223aff4ad90e63 RenderWidgetHostViewAura* popup_child_host_view) { popup_child_host_view_ = popup_child_host_view; diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h -index 21422e7e2d44aa4766d081da2e42e7ba5ebd82f4..aa91bc70d403d4a687f334d71b8d00d4cd88464c 100644 +index e63a9870c18a90d405bf521f6113eca347e4d2d7..b0e129598c51cc1f37bde6e52498d920eda83b70 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h -@@ -685,6 +685,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura +@@ -686,6 +686,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura RenderWidgetHostViewBase* updated_view) override; void OnTextSelectionChanged(TextInputManager* text_input_mangager, RenderWidgetHostViewBase* updated_view) override; @@ -87,10 +87,10 @@ index 6e07e5ef9d033aa6ac98e3f48966b560b0da115e..ee72a9bf160c10011a2d80f4023d1434 // 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 bff9262c58c18b533f78cabf397d047edd895d4c..2a4c28acaae718c9b5c496e9078699b3c6708f7b 100644 +index 7a1c32f3e778d6336b82ad984bef513dc0f3a082..4624fb68f6b6998cf75cd77b4de5a03ba2fad8c8 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -11086,7 +11086,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( +@@ -11127,7 +11127,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( return; } RenderWidgetHostViewBase* root_view = diff --git a/patches/chromium/fix_register_status_icon_with_unique_d-bus_name_when_owning_one.patch b/patches/chromium/fix_register_status_icon_with_unique_d-bus_name_when_owning_one.patch deleted file mode 100644 index c58f495186..0000000000 --- a/patches/chromium/fix_register_status_icon_with_unique_d-bus_name_when_owning_one.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Keeley Hammond -Date: Sun, 6 Sep 2026 23:30:55 +0000 -Subject: fix: register status icon with unique D-Bus name when owning one - isn't allowed - -Flatpak and Snap don't let apps own arbitrary well-known names on the -session bus, so RequestOwnership for org.freedesktop.StatusNotifierItem-* -fails there and no tray icon is shown. In those sandboxes (and whenever -ownership is refused) register with the connection's unique name instead, -which StatusNotifierWatcher implementations accept, and use a private -connection so the item goes away with the icon. - -Upstream bug: https://issues.chromium.org/issues/554905106 - -diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc -index b6386ecc2eca721cc56a47a16f77c3a5c5eb506a..756f5127309519a8049afadb58db60447bd5dfe8 100644 ---- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc -+++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc -@@ -240,9 +240,18 @@ scoped_refptr CreateSessionBus() { - return base::MakeRefCounted(std::move(options)); - } - -+// Flatpak and Snap sandboxes don't allow owning arbitrary well-known names -+// on the session bus, so there the item is registered under the connection's -+// unique name instead. A private connection is used in that case so that the -+// name disappears (and the watcher drops the item) when the icon is removed. -+bool IsSandboxedWithoutOwnName() { -+ auto env = base::Environment::Create(); -+ return env->HasVar("FLATPAK_SANDBOX_DIR") || env->HasVar("SNAP"); -+} -+ - scoped_refptr GetBusForNewStatusIcon() { - DCHECK_CURRENTLY_ON(content::BrowserThread::UI); -- if (!g_shared_bus_in_use) { -+ if (!g_shared_bus_in_use && !IsSandboxedWithoutOwnName()) { - g_shared_bus_in_use = true; - return dbus_thread_linux::GetSharedSessionBus(); - } -@@ -354,7 +363,7 @@ StatusIconLinuxDbus::~StatusIconLinuxDbus() { - g_shared_bus_in_use = false; - bus_->UnregisterExportedObject(dbus::ObjectPath(kPathStatusNotifierItem)); - bus_->UnregisterExportedObject(dbus::ObjectPath(kPathDbusMenu)); -- if (!service_name_.empty()) { -+ if (owns_service_name_) { - bus_->GetDBusTaskRunner()->PostTask( - FROM_HERE, base::BindOnce( - [](scoped_refptr bus, -@@ -508,6 +517,11 @@ void StatusIconLinuxDbus::OnInitialized(bool success) { - base::BindRepeating(&StatusIconLinuxDbus::OnNameOwnerChangedReceived, - weak_factory_.GetWeakPtr())); - -+ if (IsSandboxedWithoutOwnName()) { -+ RegisterWithUniqueName(); -+ return; -+ } -+ - bus_->RequestOwnership( - service_name_, dbus::Bus::REQUIRE_PRIMARY, - base::BindOnce(&StatusIconLinuxDbus::OnOwnershipAcquired, -@@ -518,10 +532,22 @@ void StatusIconLinuxDbus::OnOwnershipAcquired(const std::string& service_name, - bool success) { - DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - if (!success) { -- delegate_->OnImplInitializationFailed(); -+ // The bus policy may still forbid owning the name outside of the known -+ // sandboxes; the watcher accepts a unique name just as well. -+ RegisterWithUniqueName(); - return; - } - -+ owns_service_name_ = true; -+ RegisterStatusNotifierItem(); -+} -+ -+void StatusIconLinuxDbus::RegisterWithUniqueName() { -+ service_name_ = bus_->GetConnectionName(); -+ if (service_name_.empty()) { -+ delegate_->OnImplInitializationFailed(); -+ return; -+ } - RegisterStatusNotifierItem(); - } - -diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h -index aa5647cdf8b9431b7195c8e6c70ee32dab6e28b2..f0a7f0b029f301dd519a5082cfe2791ec34fdc2d 100644 ---- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h -+++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h -@@ -73,6 +73,7 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux, - - void OnInitialized(bool success); - void OnOwnershipAcquired(const std::string& service_name, bool success); -+ void RegisterWithUniqueName(); - void RegisterStatusNotifierItem(); - - // Step 5: register the StatusNotifierItem with the StatusNotifierWatcher. -@@ -135,6 +136,9 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux, - - int service_id_ = 0; - std::string service_name_; -+ // Whether |service_name_| is a well-known name owned by |bus_| (as opposed -+ // to the connection's unique name). -+ bool owns_service_name_ = false; - raw_ptr watcher_ = nullptr; - raw_ptr item_ = nullptr; - 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 f5c520e2b8..da7ced5d3e 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,10 +8,10 @@ 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 50f5557384eb36618f983229617098e938c37bc7..d967500524dcaf1c962a39c11b917f46d89bbb66 100644 +index 3607f9a5ddddc11042919465cd4bfe076beadbf1..65d6de8923e10c50204f3b7a66940ba0fed92618 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 -@@ -244,6 +244,10 @@ bool DesktopWindowTreeHostWin::IsInNativeMoveResizeLoop() const { +@@ -245,6 +245,10 @@ bool DesktopWindowTreeHostWin::IsInNativeMoveResizeLoop() const { message_handler_->IsInNativeMenuLoop()); } @@ -23,7 +23,7 @@ index 50f5557384eb36618f983229617098e938c37bc7..d967500524dcaf1c962a39c11b917f46 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 12edd2db9b88af65892cd5c183271258eaccf63d..b9ee5824e422b75ad37536c8848ef825a5d1fd6e 100644 +index 03e1bbb251f6464c5d4ee85b205b5ab99e695334..d42f44a9e734265015cb8fde5d0250955b40fc24 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 @@ -96,6 +96,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin diff --git a/patches/chromium/fix_restore_snap-compatible_dbusmenu_object_path.patch b/patches/chromium/fix_restore_snap-compatible_dbusmenu_object_path.patch index 0d45a55b32..5d6cde104c 100644 --- a/patches/chromium/fix_restore_snap-compatible_dbusmenu_object_path.patch +++ b/patches/chromium/fix_restore_snap-compatible_dbusmenu_object_path.patch @@ -29,10 +29,10 @@ adoption time has passed. Upstream snapd bug: https://bugs.launchpad.net/snapd/+bug/2161950 diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc -index 756f5127309519a8049afadb58db60447bd5dfe8..921472e161f7766000e1c1f60ed043258d268e86 100644 +index e6b0edeadb45114ef2c662e6187dcf16aa32353c..8e26bfc2c62265ed7b9137eca7fc98949a76da2f 100644 --- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc +++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc -@@ -72,7 +72,7 @@ const char kInterfaceStatusNotifierWatcher[] = "org.kde.StatusNotifierWatcher"; +@@ -71,7 +71,7 @@ const char kInterfaceStatusNotifierWatcher[] = "org.kde.StatusNotifierWatcher"; // Object paths. const char kPathStatusNotifierItem[] = "/StatusNotifierItem"; const char kPathStatusNotifierWatcher[] = "/StatusNotifierWatcher"; 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 c062a3fdfb..568f46c5ff 100644 --- a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -9,10 +9,10 @@ awaited promise result to that callback instead of dropping it. Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1323953 diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc -index b019a321f1445d92cb433fd9ffe41d3fe0eb8644..ec2efb4d04fe5f76c65418bfc03a5bdb40a09cf9 100644 +index 4c032bed25466e13a829ccbc0cd6637c9dee45d6..f996a314dca741a90063618f3326bde8b6638984 100644 --- a/extensions/renderer/script_injection.cc +++ b/extensions/renderer/script_injection.cc -@@ -9,6 +9,7 @@ +@@ -11,6 +11,7 @@ #include "base/feature_list.h" #include "base/functional/bind.h" @@ -20,7 +20,7 @@ index b019a321f1445d92cb433fd9ffe41d3fe0eb8644..ec2efb4d04fe5f76c65418bfc03a5bdb #include "base/lazy_instance.h" #include "base/memory/raw_ptr.h" #include "base/metrics/histogram_macros.h" -@@ -327,6 +328,7 @@ void ScriptInjection::InjectJs(std::set* executing_scripts, +@@ -365,6 +366,7 @@ void ScriptInjection::InjectJs(std::set* executing_scripts, blink::mojom::LoadEventBlockingOption::kBlock, base::BindOnce(&ScriptInjection::OnJsInjectionCompleted, weak_ptr_factory_.GetWeakPtr()), @@ -73,7 +73,7 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..13284f693f406cea171e450af7784a44 #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 ce332f97dd089cb155f9977158a2c6ed6544b923..c1278956cd2e25acdeaf1f210431225070e6e264 100644 +index 698ce38902d416963197f327b7979c79aee766d8..5bfe4ae008c99f42a53644bc17e014c9ea7664be 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc @@ -3394,6 +3394,7 @@ void LocalFrame::RequestExecuteScript( @@ -107,10 +107,10 @@ index c9f63eadd7bda3d9c5e73cdd856911167b3220ec..febaf3dc37ad4fd5addf187c857ecdaa 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 d0b9b0815dbf3bbf39a4a1fbf9b886b45bac0da9..1a6d94940886b8fc0a1a42e8ab3c299746efb761 100644 +index 948b2c67ccdac3fcdfe0331fe34467b7a7ac52d9..51053b5f26ca428e843a744a19cb1be4a41aeef7 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 -@@ -976,6 +976,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( +@@ -983,6 +983,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( std::move(callback).Run(value ? std::move(*value) : base::Value()); }, std::move(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 12ffd90a47..628cd6b46d 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 @@ -11,7 +11,7 @@ PlatformStyle::kAutoSelectFirstMenuItemFromKeyboard covers the other views platforms. diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc -index c0ac144111219d215580fa48a47f6efd2f08ae59..66ab3bb0d70c445d1044ab9f1c075511d3e017c1 100644 +index cd6301091f88b2811c737e1a6b8977fb1e335769..7fbb6b5adda256a2504f04c4298823f36f7c8f5d 100644 --- a/ui/views/controls/menu/menu_controller.cc +++ b/ui/views/controls/menu/menu_controller.cc @@ -800,6 +800,22 @@ void MenuController::Run(Widget* parent, @@ -37,7 +37,7 @@ index c0ac144111219d215580fa48a47f6efd2f08ae59..66ab3bb0d70c445d1044ab9f1c075511 if (button_controller) { pressed_lock_ = button_controller->TakeLock( false, ui::LocatedEvent::FromIfValid(event)); -@@ -2776,18 +2792,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { +@@ -2774,18 +2790,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { return; } diff --git a/patches/chromium/fix_use_a_private_d-bus_connection_for_each_status_icon.patch b/patches/chromium/fix_use_a_private_d-bus_connection_for_each_status_icon.patch new file mode 100644 index 0000000000..23d3c8a9b9 --- /dev/null +++ b/patches/chromium/fix_use_a_private_d-bus_connection_for_each_status_icon.patch @@ -0,0 +1,78 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Keeley Hammond +Date: Sun, 6 Sep 2026 23:30:55 +0000 +Subject: fix: use a private D-Bus connection for each status icon + +Chromium now registers every StatusNotifierItem with the watcher under +its connection's unique name (https://crrev.com/c/8337991) instead of +owning a well-known org.freedesktop.StatusNotifierItem-* name, which +fixes the missing tray icon in Flatpak and Snap sandboxes that this +patch originally worked around. StatusNotifierWatcher implementations +only drop an item once the name it was registered under leaves the bus, +so an icon created on the shared session bus lingers in the tray after +it is destroyed for as long as that bus stays connected. Always use a +private connection for status icons so the item goes away with the icon, +as this patch already did in sandboxes. + +Upstream bug: https://issues.chromium.org/issues/554905106 + +diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc +index 110fdb5e1654433ff31a6893ee7a8c830a702d60..e6b0edeadb45114ef2c662e6187dcf16aa32353c 100644 +--- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc ++++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc +@@ -29,7 +29,6 @@ + #include "base/task/thread_pool.h" + #include "components/dbus/menu/menu.h" + #include "components/dbus/properties/dbus_properties.h" +-#include "components/dbus/thread_linux/dbus_thread_linux.h" + #include "components/dbus/utils/bind_weak_ptr_for_export_method.h" + #include "components/dbus/utils/call_method.h" + #include "components/dbus/utils/export_method.h" +@@ -228,8 +227,6 @@ base::FilePath WriteIconFile(size_t icon_file_id, + return file_path; + } + +-bool g_shared_bus_in_use = false; +- + scoped_refptr CreateSessionBus() { + dbus::Bus::Options options; + options.bus_type = dbus::Bus::SESSION; +@@ -242,10 +239,11 @@ scoped_refptr CreateSessionBus() { + + scoped_refptr GetBusForNewStatusIcon() { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); +- if (!g_shared_bus_in_use) { +- g_shared_bus_in_use = true; +- return dbus_thread_linux::GetSharedSessionBus(); +- } ++ // The item is registered with the StatusNotifierWatcher under the ++ // connection's unique name, and watchers only drop an item once that name ++ // leaves the bus. Always use a private connection so that the item goes ++ // away with the icon instead of lingering for as long as the shared session ++ // bus stays connected. + return CreateSessionBus(); + } + +@@ -350,17 +348,11 @@ StatusIconLinuxDbus::~StatusIconLinuxDbus() { + watcher_ = nullptr; + + if (bus_) { +- if (bus_ == dbus_thread_linux::GetSharedSessionBus()) { +- g_shared_bus_in_use = false; +- bus_->UnregisterExportedObject(dbus::ObjectPath(kPathStatusNotifierItem)); +- bus_->UnregisterExportedObject(dbus::ObjectPath(kPathDbusMenu)); +- } else { +- bus_->GetDBusTaskRunner()->PostTask( +- FROM_HERE, +- base::BindOnce( +- [](scoped_refptr bus) { bus->ShutdownAndBlock(); }, +- bus_)); +- } ++ bus_->GetDBusTaskRunner()->PostTask( ++ FROM_HERE, ++ base::BindOnce( ++ [](scoped_refptr bus) { bus->ShutdownAndBlock(); }, ++ bus_)); + } + } + diff --git a/patches/chromium/fix_wayland_test_crash_on_teardown.patch b/patches/chromium/fix_wayland_test_crash_on_teardown.patch deleted file mode 100644 index 515ef92183..0000000000 --- a/patches/chromium/fix_wayland_test_crash_on_teardown.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Mitchell Cohen -Date: Sun, 22 Feb 2026 11:38:49 -0500 -Subject: fix: Wayland test crash on teardown - -Allows Wayland test job to teardown the connection without crashing when trying to update the pointer - -diff --git a/ui/ozone/platform/wayland/host/wayland_connection.cc b/ui/ozone/platform/wayland/host/wayland_connection.cc -index 1ab81633d4606c996c785a5fbb409d53de027d51..370889cf1ddd2ce548f1ae0469cfd3494187fa13 100644 ---- a/ui/ozone/platform/wayland/host/wayland_connection.cc -+++ b/ui/ozone/platform/wayland/host/wayland_connection.cc -@@ -430,7 +430,7 @@ std::vector WaylandConnection::CreateTouchscreenDevices() - } - - void WaylandConnection::UpdateCursor() { -- if (auto* pointer = seat_->pointer()) { -+ if (auto* pointer = seat_ ? seat_->pointer() : nullptr) { - cursor_ = std::make_unique(pointer, this); - cursor_->set_listener(listener_); - cursor_position_ = std::make_unique(); diff --git a/patches/chromium/fix_wayland_window_stuck_maximized_after_early_maximize.patch b/patches/chromium/fix_wayland_window_stuck_maximized_after_early_maximize.patch deleted file mode 100644 index 44edd8fb64..0000000000 --- a/patches/chromium/fix_wayland_window_stuck_maximized_after_early_maximize.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Keeley Hammond -Date: Fri, 21 Aug 2026 06:54:03 +0000 -Subject: fix: wayland window stuck maximized after early maximize - -A toplevel that calls Maximize() before the first xdg_toplevel.configure has -been received could get stuck maximized: the compositor's state-less reply -to the initial commit is compared against the optimistically applied -kMaximized state and latches previously_maximized_ = true, after which -Restore() re-requests kMaximized, is deduplicated, and unset_maximized is -never sent. - -Make Restore() honour previously_maximized_ only when leaving the minimized -or fullscreen state, and make TriggerStateChanges() also consult -applied_state() so the unset request is not skipped while older bounds -requests are still in flight. - -This should be upstreamed; the patch can be removed once that lands. - -diff --git a/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc b/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc -index af197b3c29b6b1bc30f06523b6aa51114fdb84b8..816a9a3d2a452ed7ab34e5a6d9e281efb1ca4ceb 100644 ---- a/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc -+++ b/ui/ozone/platform/wayland/host/wayland_toplevel_window.cc -@@ -316,8 +316,19 @@ void WaylandToplevelWindow::Restore() { - xdg_toplevel_->UnSetMaximized(); - } - } else { -- SetWindowState(previously_maximized_ ? PlatformWindowState::kMaximized -- : PlatformWindowState::kNormal); -+ // Restore() takes a maximized (or normal) window back to normal. Only when -+ // leaving the minimized or fullscreen state do we return to the state that -+ // preceded it, which may be maximized. `previously_maximized_` must not be -+ // consulted otherwise: it can legitimately be true while the window is -+ // maximized (e.g. if a state-less configure raced with a client-initiated -+ // maximize), and honouring it here would turn Restore() into a no-op. -+ const PlatformWindowState current_state = applied_state().window_state; -+ const bool restore_to_maximized = -+ previously_maximized_ && -+ (current_state == PlatformWindowState::kMinimized || -+ current_state == PlatformWindowState::kFullScreen); -+ SetWindowState(restore_to_maximized ? PlatformWindowState::kMaximized -+ : PlatformWindowState::kNormal); - } - } - -@@ -895,6 +906,17 @@ void WaylandToplevelWindow::TriggerStateChanges( - CHECK(!base::FeatureList::IsEnabled(features::kAsyncFullscreenWindowState)); - - if (xdg_toplevel_) { -+ // The state the compositor is being asked to leave. Until window state -+ // changes become asynchronous (crbug.com/40276379), a client-initiated -+ // change is force-applied to `applied_state()` right away (see below), -+ // while any in-flight requests keep the window state they were created -+ // with, so `GetLatestRequestedState()` alone can miss a maximize/fullscreen -+ // that has been requested but not yet configured. Consider both so the -+ // matching unset request is always emitted. -+ const auto is_leaving = [&](PlatformWindowState state) { -+ return applied_state().window_state == state || -+ GetLatestRequestedState().window_state == state; -+ }; - // Call UnSetMaximized only if current state is normal. Otherwise, if the - // current state is fullscreen and the previous is maximized, calling - // UnSetMaximized may result in wrong restored window position that clients -@@ -906,17 +928,14 @@ void WaylandToplevelWindow::TriggerStateChanges( - xdg_toplevel_->SetFullscreen( - GetWaylandOutputForDisplayId(fullscreen_display_id)); - } else if (window_state == PlatformWindowState::kMaximized) { -- if (GetLatestRequestedState().window_state == -- PlatformWindowState::kFullScreen) { -+ if (is_leaving(PlatformWindowState::kFullScreen)) { - xdg_toplevel_->UnSetFullscreen(); - } - xdg_toplevel_->SetMaximized(); - } else if (window_state == PlatformWindowState::kNormal) { -- if (GetLatestRequestedState().window_state == -- PlatformWindowState::kFullScreen) { -+ if (is_leaving(PlatformWindowState::kFullScreen)) { - xdg_toplevel_->UnSetFullscreen(); -- } else if (GetLatestRequestedState().window_state == -- PlatformWindowState::kMaximized) { -+ } else if (is_leaving(PlatformWindowState::kMaximized)) { - xdg_toplevel_->UnSetMaximized(); - } - } diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index d669f5043c..97e932d881 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -6,10 +6,10 @@ Subject: frame_host_manager.patch Allows embedder to intercept site instances created by chromium. diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc -index 91aa3d05f7f01c7a858501ed81bc4386ad068562..388642061193e4db52c2c4e7e7ff0c233f522fb2 100644 +index 12153f1bb302341fd3edbbc9a52f5492bbd81c6a..de07798313ffabb366c7a13a6aeb1b441ed84834 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -5043,6 +5043,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -5049,6 +5049,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index f4756045e6..c64a1af396 100644 --- a/patches/chromium/gritsettings_resource_ids.patch +++ b/patches/chromium/gritsettings_resource_ids.patch @@ -6,7 +6,7 @@ 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 24da6b10adf87ba3c5307919d530ea2ca7aa5251..b2381d0edccb3814232c79e12c995500dba6cc15 100644 +index c0f653de3db1ebfc482a248e5b76a008ad992fa5..c0da20a6a4e3f9db917d54e9edc148847b1a5407 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec @@ -1812,6 +1812,11 @@ 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 4d832c2952..20c00a80ca 100644 --- a/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch +++ b/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch @@ -50,7 +50,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to system priority. diff --git a/base/BUILD.gn b/base/BUILD.gn -index c3b1cc739d72682c7d059bf7e09248a633d3d50e..1e09963340c31a7d2bf629ff9716aa75156804c9 100644 +index 44ffb6ee338caf10b3b1ea8d575af433f515d4bc..bb2edb55538327a45edec613f6026998c7279de9 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -1153,6 +1153,7 @@ component("base") { @@ -129,10 +129,10 @@ index 416e541436d201aabca26cdbf7e8477103bd014c..8c5f92b03d67e5f0587b0e9420969061 } diff --git a/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn b/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn -index 2a91343e72431fecc7837850f7ce0228eb68faa1..ecbd5221f7916aba12c5a99c748455a6205f7d17 100644 +index c6a66ad44ee7a0d39b344bf39ebca44e44fbd1f3..133619d1d54e53cd4117c6b2438d44d493fcbe2a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn +++ b/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn -@@ -1044,6 +1044,7 @@ if (is_clang_or_gcc) { +@@ -1045,6 +1045,7 @@ if (is_clang_or_gcc) { ":allocator_base", ":allocator_core", ":buildflags", @@ -326,10 +326,10 @@ index 7e09a9d4a676c7a91b3a68ef6e173c590c384b5a..2f86e619a4441c0d290834da43193121 std::vector argv_cstr; diff --git a/base/process/process_info_mac.mm b/base/process/process_info_mac.mm -index e12c1d078147d956a1d9b1bc498c1b1d6fe7b974..233362259dc4e728ed37435e650417647b45a6af 100644 +index f038c8ae1a2d80dc788e315963f883b5445cbad3..54f2b2c1bb3458f0df677b69e9d2d4a95fd89d1d 100644 --- a/base/process/process_info_mac.mm +++ b/base/process/process_info_mac.mm -@@ -4,15 +4,20 @@ +@@ -4,6 +4,8 @@ #include "base/process/process_info.h" @@ -338,6 +338,10 @@ index e12c1d078147d956a1d9b1bc498c1b1d6fe7b974..233362259dc4e728ed37435e65041764 #import #include +@@ -11,12 +13,15 @@ + + #include "base/check.h" + +#if !IS_MAS_BUILD() extern "C" { pid_t responsibility_get_pid_responsible_for_pid(pid_t); @@ -350,9 +354,9 @@ index e12c1d078147d956a1d9b1bc498c1b1d6fe7b974..233362259dc4e728ed37435e65041764 bool AppContainsBluetoothUsageDescription(NSRunningApplication* app) { NSURL* bundle_url = app.bundleURL; if (!bundle_url) { -@@ -24,12 +29,14 @@ bool AppContainsBluetoothUsageDescription(NSRunningApplication* app) { - [bundle objectForInfoDictionaryKey:@"NSBluetoothAlwaysUsageDescription"]; - return bluetooth_entry != nil; +@@ -35,16 +40,22 @@ bool AppContainsBluetoothUsageDescription(NSRunningApplication* app) { + PCHECK(responsible_pid != -1); + return pid != responsible_pid ? std::optional(responsible_pid) : std::nullopt; } +#endif @@ -360,12 +364,20 @@ index e12c1d078147d956a1d9b1bc498c1b1d6fe7b974..233362259dc4e728ed37435e65041764 namespace base { + bool IsCurrentProcessSelfResponsible() { ++#if !IS_MAS_BUILD() + return ResponsiblePidIfNotSelf() == std::nullopt; ++#else ++ return true; ++#endif + } + bool DoesResponsibleProcessHaveBluetoothMetadata() { +#if !IS_MAS_BUILD() - const pid_t pid = getpid(); - const pid_t responsible_pid = responsibility_get_pid_responsible_for_pid(pid); - // Returns true directly if this is a self-responsible app(e.g. Chrome opens -@@ -46,6 +53,9 @@ bool DoesResponsibleProcessHaveBluetoothMetadata() { + const std::optional responsible_pid = ResponsiblePidIfNotSelf(); + + // Returns true directly if this is a self-responsible app (e.g., Chrome opens +@@ -61,6 +72,9 @@ bool DoesResponsibleProcessHaveBluetoothMetadata() { return AppContainsBluetoothUsageDescription(app); } return false; @@ -388,11 +400,11 @@ index 10db0687101b69542f9dd33592d0655c7343e3c8..a5ad767ff8e1854ee6840f8eb4e83a9e } } diff --git a/components/os_crypt/common/keychain_password_mac.mm b/components/os_crypt/common/keychain_password_mac.mm -index f240dc22ee391c98c8768af7141b7447b6507cc6..69bfbbf0f58ca3b05a601bea87b14dcf0fb2eecb 100644 +index 212b93095214422112afd346e36cd2838891725b..80b417c1a022c287acae948b51d6f7c863f93721 100644 --- a/components/os_crypt/common/keychain_password_mac.mm +++ b/components/os_crypt/common/keychain_password_mac.mm -@@ -19,6 +19,7 @@ - #include "base/types/expected.h" +@@ -16,6 +16,7 @@ + #include "base/strings/string_view_util.h" #include "build/branding_buildflags.h" #include "crypto/apple/keychain_v2.h" +#include "electron/mas.h" @@ -640,7 +652,7 @@ index 48f47bf3eeb8464d1c3925f0f73f62c790cac2f0..b7b2b7c1b7e99927012ce1676cc753b2 // The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that // can only be accomplished by overriding methods. diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fae80b145b 100644 +index 6f02db406326ba00fec8007b19a638b6c3354a55..15d59648317174e48993b3fd316f7160d3c4288b 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm @@ -22,6 +22,7 @@ @@ -649,9 +661,9 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa #include "components/remote_cocoa/common/native_widget_ns_window_host.mojom.h" +#include "electron/mas.h" #include "ui/accessibility/platform/ax_platform_node.h" + #import "ui/base/cocoa/default_command_dispatcher_delegate.h" #import "ui/base/cocoa/user_interface_item_command_handler.h" - #import "ui/base/cocoa/window_size_constants.h" -@@ -110,15 +111,17 @@ void OrderChildWindow(NSWindow* child_window, +@@ -111,15 +112,17 @@ void OrderChildWindow(NSWindow* child_window, } // namespace @@ -670,7 +682,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa - (long long)_resizeDirectionForMouseLocation:(CGPoint)location; - (BOOL)_isConsideredOpenForPersistentState; - (void)_zoomToScreenEdge:(NSUInteger)edge; -@@ -129,6 +132,8 @@ - (void)_setFrame:(NSRect)frameRect +@@ -130,6 +133,8 @@ - (void)_setFrame:(NSRect)frameRect animate:(BOOL)animate; - (void)_setFrameAfterMove:(NSRect)frameRect; - (BOOL)_isNonactivatingPanel; @@ -679,7 +691,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa @end struct NSEdgeAndCornerThicknesses { -@@ -173,13 +178,30 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event; +@@ -174,13 +179,30 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event; @implementation NSView (CRFrameViewAdditions) // If a mouseDown: falls through to the frame view, turn it into a window drag. - (void)cr_mouseDownOnFrameView:(NSEvent*)event { @@ -710,7 +722,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa @implementation NativeWidgetMacNSWindowTitledFrame - (void)mouseDown:(NSEvent*)event { if (self.window.movable) { -@@ -208,6 +230,8 @@ - (BOOL)usesCustomDrawing { +@@ -209,6 +231,8 @@ - (BOOL)usesCustomDrawing { } @end @@ -719,7 +731,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa @implementation NativeWidgetMacNSWindow { @private CommandDispatcher* __strong _commandDispatcher; -@@ -284,6 +308,7 @@ - (BOOL)invokeOriginalIsVisibleForTesting { +@@ -289,6 +313,7 @@ - (BOOL)invokeOriginalIsVisibleForTesting { // bubbles and the find bar, but these should not be movable. // Instead, let's push this up to the parent window which should be // the browser. @@ -727,7 +739,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa - (void)_zoomToScreenEdge:(NSUInteger)edge { if (self.parentWindow) { [self.parentWindow _zoomToScreenEdge:edge]; -@@ -291,6 +316,7 @@ - (void)_zoomToScreenEdge:(NSUInteger)edge { +@@ -296,6 +321,7 @@ - (void)_zoomToScreenEdge:(NSUInteger)edge { [super _zoomToScreenEdge:edge]; } } @@ -735,7 +747,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa // This override helps diagnose lifetime issues in crash stacktraces by // inserting a symbol on NativeWidgetMacNSWindow and should be kept even if it -@@ -423,6 +449,8 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -428,6 +454,8 @@ - (NSAccessibilityRole)accessibilityRole { // NSWindow overrides. @@ -744,7 +756,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { if (windowStyle & NSWindowStyleMaskTitled) { if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class]) -@@ -434,6 +462,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { +@@ -439,6 +467,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { return [super frameViewClassForStyleMask:windowStyle]; } @@ -753,7 +765,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa // Constrains the frame rect during an active window move loop so that the top // of the window does not exceed the menu bar / visible top of the display, // while allowing smooth unrestricted dragging across display boundaries without -@@ -531,6 +561,8 @@ - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen { +@@ -536,6 +566,8 @@ - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen { return [super constrainFrameRect:frameRect toScreen:screen]; } @@ -762,7 +774,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa // AppKit's internal screen layout manager invokes // _setFrame:fromAdjustmentToScreen: and _setFrameAfterMove: asynchronously // during screen layout changes or display boundary transitions to adjust the -@@ -579,6 +611,8 @@ - (void)_setFrameAfterMove:(NSRect)frameRect { +@@ -584,6 +616,8 @@ - (void)_setFrameAfterMove:(NSRect)frameRect { } } @@ -771,7 +783,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa - (NSWindow*)topmostVisibleChildModalWindow { if (!_bridge) { return nil; -@@ -622,12 +656,14 @@ - (BOOL)_usesCustomDrawing { +@@ -627,12 +661,14 @@ - (BOOL)_usesCustomDrawing { // if it were valid to set that style for windows, setting the window style // recalculates and re-caches a bunch of stuff, so a surgical override is the // cleanest approach. @@ -786,7 +798,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa + (void)_getExteriorResizeEdgeThicknesses: (NSEdgeAndCornerThicknesses*)outThicknesses -@@ -941,9 +977,11 @@ - (id)archiver:(NSKeyedArchiver*)archiver willEncodeObject:(id)object { +@@ -946,9 +982,11 @@ - (id)archiver:(NSKeyedArchiver*)archiver willEncodeObject:(id)object { } - (void)saveRestorableState { @@ -798,7 +810,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa // Certain conditions, such as in the Speedometer 3 benchmark, can trigger a // rapid succession of calls to saveRestorableState. If there's no pending -@@ -1010,6 +1048,7 @@ - (void)reallySaveRestorableState { +@@ -1015,6 +1053,7 @@ - (void)reallySaveRestorableState { // affects its restorable state changes. - (void)invalidateRestorableState { [super invalidateRestorableState]; @@ -806,7 +818,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa if ([self _isConsideredOpenForPersistentState]) { if (_willUpdateRestorableState) return; -@@ -1022,6 +1061,7 @@ - (void)invalidateRestorableState { +@@ -1027,6 +1066,7 @@ - (void)invalidateRestorableState { _willUpdateRestorableState = NO; [NSObject cancelPreviousPerformRequestsWithTarget:self]; } @@ -814,7 +826,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa } // On newer SDKs, _canMiniaturize respects NSWindowStyleMaskMiniaturizable in -@@ -1200,6 +1240,7 @@ - (void)maybeRemoveTreeFromOrderingGroups { +@@ -1205,6 +1245,7 @@ - (void)maybeRemoveTreeFromOrderingGroups { // Since _removeFromGroups: is not documented it could go away in newer // versions of macOS. If the selector does not exist, DumpWithoutCrashing() so // we hear about the change. @@ -822,7 +834,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa if (![NSWindow instancesRespondToSelector:@selector(_removeFromGroups:)]) { base::debug::DumpWithoutCrashing(); return; -@@ -1217,6 +1258,7 @@ - (void)maybeRemoveTreeFromOrderingGroups { +@@ -1222,6 +1263,7 @@ - (void)maybeRemoveTreeFromOrderingGroups { [currentWindow _removeFromGroups:child]; } } @@ -831,7 +843,7 @@ index 9de655b17ceae246ecc650e5432103fdd2c0636a..4025a23ea2bcb7ee7ba9eabd6a1d23fa - (NSWindow*)rootWindow { 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 09df8a41e1209922b95de1355acbe732f8a24d01..f7ec5823e1c8e8fbb2672cf5464d35c42200a843 100644 +index 74e0a362059024d683e2db7b86d65947726cac14..f38643efc0dab7dfc01da57c06c1d9e02128dfe2 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 @@ @@ -874,7 +886,7 @@ index 09df8a41e1209922b95de1355acbe732f8a24d01..f7ec5823e1c8e8fbb2672cf5464d35c4 } // Returns the display that the specified window is on. -@@ -816,10 +824,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -817,10 +825,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -888,7 +900,7 @@ index 09df8a41e1209922b95de1355acbe732f8a24d01..f7ec5823e1c8e8fbb2672cf5464d35c4 // 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 a410f1b7b5de6cdb6f954c737a1dfd2b06dc0815..9660bf70de66562eac16aa318e303fa66c6bfdf7 100644 +index 42fc3926fd9e3712d93d8f67e4ba7cfb3f24dbb9..6acbea5d741982ff7c7ec01ac813e0418802bb10 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -397,6 +397,7 @@ viz_component("service") { @@ -899,7 +911,7 @@ index a410f1b7b5de6cdb6f954c737a1dfd2b06dc0815..9660bf70de66562eac16aa318e303fa6 } if (is_ios) { -@@ -756,6 +757,7 @@ viz_source_set("unit_tests") { +@@ -757,6 +758,7 @@ viz_source_set("unit_tests") { "frame_sinks/external_begin_frame_source_mac_unittest.cc", ] frameworks = [ "IOSurface.framework" ] @@ -959,7 +971,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 9dbb76fcc73c3ed2acf58b584fe16f29581aa8ad..9d19d1aedc2e6334a5c6f7d42fa25838e520d938 100644 +index f921a4a7cb2e122f2d439fe6e4c2e67d553b6fb7..de68ea282607b76a3ba42f22cfb0619da5883c32 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 @@ @@ -970,7 +982,7 @@ index 9dbb76fcc73c3ed2acf58b584fe16f29581aa8ad..9d19d1aedc2e6334a5c6f7d42fa25838 #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" -@@ -2426,15 +2427,21 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -2469,15 +2470,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 // @@ -993,10 +1005,10 @@ index 9dbb76fcc73c3ed2acf58b584fe16f29581aa8ad..9d19d1aedc2e6334a5c6f7d42fa25838 return kAttributes; } diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 4c0bdc9b0a9869ef873b1254816be70f29443d46..d84f32b97f737d22486651c03a3c9b06e5064cb0 100644 +index 53dd562d46baea4035051e4760616752dee69be7..46cc7be341407f84e70b602d17c03e74b9d530c4 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -380,6 +380,7 @@ source_set("browser") { +@@ -381,6 +381,7 @@ source_set("browser") { "//ui/webui/resources", "//v8", "//v8:v8_version", @@ -1005,7 +1017,7 @@ index 4c0bdc9b0a9869ef873b1254816be70f29443d46..d84f32b97f737d22486651c03a3c9b06 public_deps = [ diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h -index 2856a74454c33d5ff05303ade39ca1260f444bc6..65ef68b483b9a47c99ad1001c6bacf46895cf2b5 100644 +index 2126c6c61ed8acce6614967052f6acfc306784ee..7ce7293312121047165d894be7a2cba79b98ec32 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h @@ -26,6 +26,7 @@ @@ -1026,7 +1038,7 @@ index 2856a74454c33d5ff05303ade39ca1260f444bc6..65ef68b483b9a47c99ad1001c6bacf46 @class RenderWidgetHostViewCocoa; namespace content { -@@ -724,9 +727,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac +@@ -727,9 +730,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac bool pointer_lock_unadjusted_movement_ = false; @@ -1039,7 +1051,7 @@ index 2856a74454c33d5ff05303ade39ca1260f444bc6..65ef68b483b9a47c99ad1001c6bacf46 ui::AXTreeID parent_ax_tree_id_ = ui::AXTreeIDUnknown(); 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 b037d3411fe36affc60088b8277916394e9b8e20..c6d6b4f72482dfce812e6f9130365f80ec102b04 100644 +index 0e5f95d678d26a5e3cc7e833d74d96cfb4943893..7611d6e3d0d172fcd417571a5f4bcd8f2dc6c7a2 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -58,6 +58,7 @@ @@ -1050,7 +1062,7 @@ index b037d3411fe36affc60088b8277916394e9b8e20..c6d6b4f72482dfce812e6f9130365f80 #include "media/base/media_switches.h" #include "skia/ext/platform_canvas.h" #include "skia/ext/skia_utils_mac.h" -@@ -361,8 +362,10 @@ void SendVisibleTimeRequestToDelegatedFrameHost( +@@ -312,8 +313,10 @@ void SendVisibleTimeRequestToDelegatedFrameHost( void RenderWidgetHostViewMac::MigrateNSViewBridge( remote_cocoa::mojom::Application* remote_cocoa_application, uint64_t parent_ns_view_id) { @@ -1061,7 +1073,7 @@ index b037d3411fe36affc60088b8277916394e9b8e20..c6d6b4f72482dfce812e6f9130365f80 // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling // pointers. `ns_view_` gets reinitialized later in this method. -@@ -1880,10 +1883,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1882,10 +1885,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -1074,7 +1086,7 @@ index b037d3411fe36affc60088b8277916394e9b8e20..c6d6b4f72482dfce812e6f9130365f80 return gfx::NativeViewAccessible([GetInProcessNSView() window]); } -@@ -1958,9 +1963,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1960,9 +1965,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -1086,7 +1098,7 @@ index b037d3411fe36affc60088b8277916394e9b8e20..c6d6b4f72482dfce812e6f9130365f80 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2511,20 +2518,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2532,20 +2539,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken( GetRenderWidgetAccessibilityTokenCallback callback) { base::ProcessId pid = getpid(); @@ -1114,7 +1126,7 @@ index b037d3411fe36affc60088b8277916394e9b8e20..c6d6b4f72482dfce812e6f9130365f80 /////////////////////////////////////////////////////////////////////////////// diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn -index 7af4d8bb3493245297407f662b130e8f581aa14b..2f424ceaae13b01dce075d227b3e68db3050eac5 100644 +index 986ccc4601a39e1963aa654c44013a9a0d540328..41245074d757b31fc437963ef08914cd5e0e6c6d 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn @@ -282,6 +282,7 @@ source_set("common") { @@ -1208,10 +1220,10 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe } // namespace content diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn -index 66f04716217be6eb9bc632f5b4eacb617dbdd8dc..da71c4379e8611543cf7b366db77e8f967290073 100644 +index 830f84198c02fb17c0a743b66cbfc7bd7ac04f07..e9f122a37733e4c2c55b134f42fddb49615d9598 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn -@@ -650,6 +650,7 @@ static_library("test_support") { +@@ -652,6 +652,7 @@ static_library("test_support") { "//url", "//url/mojom:url_mojom_gurl", "//v8", @@ -1219,7 +1231,7 @@ index 66f04716217be6eb9bc632f5b4eacb617dbdd8dc..da71c4379e8611543cf7b366db77e8f9 ] data_deps = [ -@@ -1132,6 +1133,8 @@ static_library("browsertest_support") { +@@ -1135,6 +1136,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" ] @@ -1228,7 +1240,7 @@ index 66f04716217be6eb9bc632f5b4eacb617dbdd8dc..da71c4379e8611543cf7b366db77e8f9 } mojom("content_test_mojo_bindings") { -@@ -2026,6 +2029,7 @@ test("content_browsertests") { +@@ -2033,6 +2036,7 @@ test("content_browsertests") { "//ui/shell_dialogs", "//ui/snapshot", "//ui/webui:test_support", @@ -1236,7 +1248,7 @@ index 66f04716217be6eb9bc632f5b4eacb617dbdd8dc..da71c4379e8611543cf7b366db77e8f9 ] if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) { -@@ -3353,6 +3357,7 @@ test("content_unittests") { +@@ -3368,6 +3372,7 @@ test("content_unittests") { "//ui/shell_dialogs", "//ui/webui:test_support", "//url", @@ -1257,7 +1269,7 @@ index 3899c88b9b44a0a81b018d183bc2cebd89c9b63c..134ec2948f521414fa5cd78f35c5d4a8 if (is_mac) { diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn -index 448f1df3e1c1a2a1a9c1c37549910101c2c092bf..01027720a432e6f1bd9830b71ae7201f87cf946b 100644 +index 4dc9982489d165012c6acc68ceea65e197a9bd79..6876714685aa0a730154523e395f0062da5fbfeb 100644 --- a/device/bluetooth/BUILD.gn +++ b/device/bluetooth/BUILD.gn @@ -257,6 +257,7 @@ component("bluetooth") { @@ -1361,7 +1373,7 @@ index 42f2bcc4ed7bcbb65e7c6e07b8f82b2d8825fd1b..cba135be7f2b4609948c6d52cd067e8c if (is_ios) { diff --git a/media/audio/apple/audio_low_latency_input.cc b/media/audio/apple/audio_low_latency_input.cc -index dae1aa642b8f33f353520707db5b68dd44049e18..5aff4555ef21dbc215084a9db0d9f969f16af45a 100644 +index c09d7c056a8b16bd31b4f8c428d42e2c423efd18..0e2d08cd7f94b50e116085a7fcfd99087b0076ce 100644 --- a/media/audio/apple/audio_low_latency_input.cc +++ b/media/audio/apple/audio_low_latency_input.cc @@ -28,6 +28,7 @@ @@ -1805,7 +1817,7 @@ index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..9921ccb10d3455600eddd85f77f10228 } // namespace sandbox diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn -index f889f600bba46c13849d2375f52eefade92fd3e7..7d1dd3fdb6e15886d68ac83e173876eb376d894e 100644 +index 383115087fb61a1901983b7ebefe32a0c40f7d1a..d12a6fae894c4d0af1f88e41ce0d58146dab4598 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn @@ -444,6 +444,7 @@ component("core") { @@ -2153,10 +2165,10 @@ index 9423a2891552e8df3ea5b05c720ab11795c4b92d..610c479ef03759d3082b42d7a402cbea // Accessible object if (AXElementWrapper::IsValidElement(value)) { diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 905834f159cf0c34282635febf3bf3bfacef2ad9..24156551757a097e3e4c6c0a979d88751c5c9fad 100644 +index da9c5eb5048229b3045e8a1ed6939e8ebf3f081d..e8684c43059129ab2d9c81f37491917233f4f4b6 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -354,6 +354,13 @@ component("base") { +@@ -356,6 +356,13 @@ component("base") { ] } @@ -2170,7 +2182,7 @@ index 905834f159cf0c34282635febf3bf3bfacef2ad9..24156551757a097e3e4c6c0a979d8875 if (is_ios) { sources += [ "device_form_factor_ios.mm", -@@ -509,6 +516,12 @@ component("base") { +@@ -511,6 +518,12 @@ component("base") { "//url", ] @@ -2372,10 +2384,10 @@ index 65ae8170664d15c7884261812400d0ed638a681d..86c937f1e6d03b88803a2ca80abff19c // enough. return PlatformFontMac::SystemFontType::kGeneral; diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn -index 55ae2533513bf0e44adbd5a79d68bb3e8481aebf..e56c57bdb10d4ea0be91ef30f8a8b44adf221c78 100644 +index 4a30d5128fb313cdc436ea9c1ac8cd637dfeb1f9..914ae79d89f332a7cd0f4b039e1438b3f6b78bb6 100644 --- a/ui/views/BUILD.gn +++ b/ui/views/BUILD.gn -@@ -791,6 +791,8 @@ component("views") { +@@ -789,6 +789,8 @@ component("views") { "IOSurface.framework", "QuartzCore.framework", ] @@ -2384,7 +2396,7 @@ index 55ae2533513bf0e44adbd5a79d68bb3e8481aebf..e56c57bdb10d4ea0be91ef30f8a8b44a } if (is_win) { -@@ -1211,6 +1213,8 @@ source_set("test_support") { +@@ -1207,6 +1209,8 @@ source_set("test_support") { "//ui/base/mojom:ui_base_types", ] @@ -2394,7 +2406,7 @@ index 55ae2533513bf0e44adbd5a79d68bb3e8481aebf..e56c57bdb10d4ea0be91ef30f8a8b44a 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 831f54542a6f3db46e954127af5cf59b9ec82720..aa8fd9cbb9711e81a8772ff0b3d8a625625e7e4d 100644 +index e4b543e6ac670e9cb42c13b354dbc68e109925d5..d6592e42e4dcf685a990555eda74cc047f1067ec 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 @@ @@ -2429,10 +2441,10 @@ index 831f54542a6f3db46e954127af5cf59b9ec82720..aa8fd9cbb9711e81a8772ff0b3d8a625 // 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 2a972490a40fd4740d48bd31654ea753609c906a..3f20a28c4f77f0089f690755cc17af21f8c4cb57 100644 +index c3e4177cf9e2a69b4115c9c5a8cc10b83a2d6872..e8956065a0ec871a2c29759675f20a2ada3f7237 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -23,6 +23,7 @@ +@@ -24,6 +24,7 @@ #include "components/remote_cocoa/browser/ns_view_ids.h" #include "components/remote_cocoa/browser/window.h" #include "components/remote_cocoa/common/native_widget_ns_window.mojom.h" @@ -2440,7 +2452,7 @@ index 2a972490a40fd4740d48bd31654ea753609c906a..3f20a28c4f77f0089f690755cc17af21 #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" -@@ -372,8 +373,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -374,8 +375,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator, if (in_process_ns_window_bridge_) { return gfx::NativeViewAccessible(in_process_ns_window_bridge_->ns_view()); } @@ -2453,7 +2465,7 @@ index 2a972490a40fd4740d48bd31654ea753609c906a..3f20a28c4f77f0089f690755cc17af21 } gfx::NativeViewAccessible -@@ -389,8 +394,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -391,8 +396,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator, [in_process_ns_window_bridge_->ns_view() window]); } @@ -2466,19 +2478,19 @@ index 2a972490a40fd4740d48bd31654ea753609c906a..3f20a28c4f77f0089f690755cc17af21 } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1569,9 +1578,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1582,9 +1591,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. +#if !IS_MAS_BUILD() - if (is_key && features::IsAccessibilityRemoteUIAppEnabled()) { + if (is_key && ::features::IsAccessibilityRemoteUIAppEnabled()) { [NSAccessibilityRemoteUIElement setRemoteUIApp:!!application_host_]; } +#endif // Explicitly set the keyboard accessibility state on regaining key // window status. if (is_key && is_content_first_responder) { -@@ -1724,17 +1735,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1737,17 +1748,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -2499,7 +2511,7 @@ index 2a972490a40fd4740d48bd31654ea753609c906a..3f20a28c4f77f0089f690755cc17af21 *pid = getpid(); id element_id = GetNativeViewAccessible(); -@@ -1747,6 +1761,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1760,6 +1774,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 8c07319a91..e8094211f2 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 053a25db4b88e1a4e94a55c96d03babdbc011660..5913c18fcfb3f470746d3e82c56cc5345ab8227c 100644 +index dca726f08256bb5f77ac3dd240b11cc135cb2ca4..658c6e806f19f9188d357ccfbd3f745c975634b5 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -188,6 +188,11 @@ @@ -22,7 +22,7 @@ index 053a25db4b88e1a4e94a55c96d03babdbc011660..5913c18fcfb3f470746d3e82c56cc534 #if BUILDFLAG(IS_CT_SUPPORTED) // gn check does not account for BUILDFLAG(). So, for iOS builds, it will // complain about a missing dependency on the target exposing this header. Add a -@@ -671,6 +676,111 @@ void RemoveInvalidationFilterCallback( +@@ -660,6 +665,111 @@ void RemoveInvalidationFilterCallback( } // namespace @@ -134,7 +134,7 @@ index 053a25db4b88e1a4e94a55c96d03babdbc011660..5913c18fcfb3f470746d3e82c56cc534 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::NetworkContextHttpAuthPreferences:: -@@ -1145,6 +1255,12 @@ void NetworkContext::CreateSocketFactory( +@@ -1134,6 +1244,12 @@ void NetworkContext::CreateSocketFactory( socket_factory_receivers_.Add(socket_factory_.get(), std::move(receiver)); } @@ -147,7 +147,7 @@ index 053a25db4b88e1a4e94a55c96d03babdbc011660..5913c18fcfb3f470746d3e82c56cc534 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2916,6 +3032,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2899,6 +3015,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( cert_verifier = std::make_unique( std::make_unique( std::move(cert_verifier))); @@ -159,7 +159,7 @@ index 053a25db4b88e1a4e94a55c96d03babdbc011660..5913c18fcfb3f470746d3e82c56cc534 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index a9882bb64a2134d927ce50534f016ddaad91b4dd..51d94c9b0d08d986ae793ce702ee94d8366452bb 100644 +index 630cb9dffcefc7c0730d2c4ff8502b23d1df9a34..56a666835b0bce0b27c9734b3bfe29f89bdf2ddf 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -130,6 +130,7 @@ class SimpleUrlPatternMatcher; @@ -179,7 +179,7 @@ index a9882bb64a2134d927ce50534f016ddaad91b4dd..51d94c9b0d08d986ae793ce702ee94d8 void ResetURLLoaderFactories() override; void GetViaObliviousHttp( mojom::ObliviousHttpRequestPtr request, -@@ -1075,6 +1078,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -1083,6 +1086,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -189,7 +189,7 @@ index a9882bb64a2134d927ce50534f016ddaad91b4dd..51d94c9b0d08d986ae793ce702ee94d8 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 b085fd3a05f74bfbf062d78b845b3fbe9322cc8f..b9c65d72932777d5b91d15d2ab11d44db102473e 100644 +index 048a2ac14dd5b89b7fd94cb107a3c92c54a13242..16bd459f37d76870e36001041bc60f46dba98c09 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -347,6 +347,17 @@ struct SocketBrokerRemotes { @@ -210,7 +210,7 @@ index b085fd3a05f74bfbf062d78b845b3fbe9322cc8f..b9c65d72932777d5b91d15d2ab11d44d // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -1037,6 +1048,8 @@ interface NetworkContext { +@@ -1041,6 +1052,8 @@ interface NetworkContext { // `NetworkContext`. CreateSocketFactory(pending_receiver receiver); @@ -220,7 +220,7 @@ index b085fd3a05f74bfbf062d78b845b3fbe9322cc8f..b9c65d72932777d5b91d15d2ab11d44d 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 bfb23a34ad59787d080391a2cfe24b3062f3cb16..1de838388236275f93bb05306065789d8380a437 100644 +index 1deef42a6f76b2bb65d5bd6baad54e452fd0b75a..1697904d7b356a611cbf2651b333a57953fa3e38 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h @@ -67,6 +67,8 @@ class TestNetworkContext : public mojom::NetworkContext { diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index d99feacff0..a074a48cea 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -133,10 +133,10 @@ index 9bf238e64af483294ae3c3f18a4e9aed49a8658d..b9b2a4c8c387b8e8b4eb1f02fc0f891c 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 b2b1bbb62d1e48a001d7d4e486e320bfde419a04..18aa873e4c72024aaa6bca854f49a62e50ccdf0c 100644 +index b8d41ae535d8a8cbfdaf3a252975d612bf7a3df4..9e33c6d805acb7bdafcc7ae0c887dbec1039a36d 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2528,7 +2528,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2523,7 +2523,7 @@ void RenderProcessHostImpl::CreateNotificationService( case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker: case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -145,7 +145,7 @@ index b2b1bbb62d1e48a001d7d4e486e320bfde419a04..18aa873e4c72024aaa6bca854f49a62e creator_type, std::move(receiver)); break; } -@@ -2536,7 +2536,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2531,7 +2531,7 @@ void RenderProcessHostImpl::CreateNotificationService( CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/patch_osr_control_screen_info.patch b/patches/chromium/patch_osr_control_screen_info.patch index 8047da5997..0eddabfe74 100644 --- a/patches/chromium/patch_osr_control_screen_info.patch +++ b/patches/chromium/patch_osr_control_screen_info.patch @@ -8,10 +8,10 @@ is updated correctly, instead of overriding GetScreenInfo which seems not working. diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h -index fbaad741af816c489092915a2fd856dcc5eee91e..7188689167e56d7027a8c64b7e0d873bcc52b925 100644 +index 2e51bf8c3a3384d0b655f36b49429df46cbd792b..13883dfecf90a4d554f602a2ff834f16ffdc7220 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h -@@ -745,7 +745,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -770,7 +770,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // Generates the most current set of ScreenInfos from the current set of // displays in the system for use in UpdateScreenInfo. diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 06ca9a71ea..91a840b12f 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -579,7 +579,7 @@ index 88f0095ed2552640f43a989e4688ec1af0ca32aa..4b5200414ca8ea47389b7825c8df3677 // 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 eeb4f72448319d0c8a498cc41ea7b17289a60424..c4fb52c4c5b99c6c603f6da5c188f963f2dbcb92 100644 +index 2fd63548223b9c2006a5c684e8cb471cca19a007..fbc5fc75fe6c09bcb81521c7885efe616e2666fb 100644 --- a/chrome/browser/printing/printer_query.cc +++ b/chrome/browser/printing/printer_query.cc @@ -360,17 +360,19 @@ void PrinterQuery::UpdatePrintSettings(base::DictValue new_settings, @@ -674,7 +674,7 @@ index 0df0106455726f11fed749e17d3f8b2093fa1111..fe9604fe3e308560ccf6e5a98ec48d5c mojom::PrintFailureReason reason) override; diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index 8335c2b4893952ff2d37f9582d79c05d6383226f..92a916d8cb7015519e9054e8753da41e23354f65 100644 +index 6acf5b006b7e2eafeda1c37dad21c989f9adc534..c6dab044543c5eb0b90aa9230d7bf29bb3e7e3ee 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom @@ -296,7 +296,7 @@ enum PrintFailureReason { @@ -686,7 +686,7 @@ index 8335c2b4893952ff2d37f9582d79c05d6383226f..92a916d8cb7015519e9054e8753da41e // Requests the frame to be printed with specified parameters. This is used // to programmatically produce PDF by request from the browser (e.g. over -@@ -385,6 +385,9 @@ interface PrintManagerHost { +@@ -396,6 +396,9 @@ interface PrintManagerHost { [Sync] ScriptedPrint(ScriptedPrintParams params) => (PrintPagesParams? settings); @@ -696,7 +696,7 @@ index 8335c2b4893952ff2d37f9582d79c05d6383226f..92a916d8cb7015519e9054e8753da41e // Tells the browser printing failed. PrintingFailed(int32 cookie, PrintFailureReason reason); -@@ -393,6 +396,14 @@ interface PrintManagerHost { +@@ -404,6 +407,14 @@ interface PrintManagerHost { [EnableIf=enable_print_preview, Sync] GetPrintPreviewParams() => (PrintPagesParams? current_settings); @@ -712,7 +712,7 @@ index 8335c2b4893952ff2d37f9582d79c05d6383226f..92a916d8cb7015519e9054e8753da41e // runs a nested run loop in the renderer until print preview for // window.print() finishes. diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 53172b32dabe34c4ac5ea9a762f1882d16b71cbb..368116faddcf6216f460d7f92c1704d8abc448a7 100644 +index dc1dd6fe579d0b7517f34f94e960991ab22ee3f7..f7a2a1715f51563d938866fc18b2f967f46ddc84 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -56,6 +56,7 @@ @@ -738,10 +738,10 @@ index 53172b32dabe34c4ac5ea9a762f1882d16b71cbb..368116faddcf6216f460d7f92c1704d8 - Print(web_frame, blink::WebNode(), PrintRequestType::kScripted); + Print(web_frame, blink::WebNode(), PrintRequestType::kScripted, + base::DictValue()); - #endif if (!weak_this) { return; -@@ -1313,12 +1314,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( + } +@@ -1360,12 +1361,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -759,8 +759,8 @@ index 53172b32dabe34c4ac5ea9a762f1882d16b71cbb..368116faddcf6216f460d7f92c1704d8 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) { return; -@@ -1341,9 +1344,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( - +@@ -1394,9 +1397,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( + // Always give the document a chance to load print-only/lazy resources. is_loading_ = frame->WillPrintSoon(); if (is_loading_) { - on_stop_loading_closure_ = base::BindOnce( @@ -773,7 +773,7 @@ index 53172b32dabe34c4ac5ea9a762f1882d16b71cbb..368116faddcf6216f460d7f92c1704d8 SetupOnStopLoadingTimeout(); return; } -@@ -1353,7 +1357,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( +@@ -1406,7 +1410,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -782,7 +782,7 @@ index 53172b32dabe34c4ac5ea9a762f1882d16b71cbb..368116faddcf6216f460d7f92c1704d8 if (render_frame_gone_) { return; -@@ -1532,6 +1536,8 @@ void PrintRenderFrameHelper::PrintPreview(base::DictValue settings) { +@@ -1585,6 +1589,8 @@ void PrintRenderFrameHelper::PrintPreview(base::DictValue settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -791,7 +791,7 @@ index 53172b32dabe34c4ac5ea9a762f1882d16b71cbb..368116faddcf6216f460d7f92c1704d8 print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS) -@@ -2144,17 +2150,25 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2197,17 +2203,25 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -820,7 +820,7 @@ index 53172b32dabe34c4ac5ea9a762f1882d16b71cbb..368116faddcf6216f460d7f92c1704d8 DidFinishPrinting(PrintingResult::kFailPrintInit); return; } -@@ -2175,8 +2189,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2228,8 +2242,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -837,7 +837,7 @@ index 53172b32dabe34c4ac5ea9a762f1882d16b71cbb..368116faddcf6216f460d7f92c1704d8 // Check if `this` is still valid. if (!self) return; -@@ -2446,29 +2467,47 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2499,29 +2520,47 @@ void PrintRenderFrameHelper::IPCProcessed() { } bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame, @@ -895,7 +895,7 @@ index 53172b32dabe34c4ac5ea9a762f1882d16b71cbb..368116faddcf6216f460d7f92c1704d8 } diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index d592a3dde2411c62c595ae3527d188bcb471aa94..233c1956f6b876a8f6d71baa0cd08c3e2533991b 100644 +index d7a37a03d2d4906673ec6d842a8a7b6f32fc2be8..54d572038ab4ce0c441866a22d4d31d153b541c0 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h @@ -258,7 +258,7 @@ class PrintRenderFrameHelper @@ -907,7 +907,7 @@ index d592a3dde2411c62c595ae3527d188bcb471aa94..233c1956f6b876a8f6d71baa0cd08c3e void PrintWithParams(mojom::PrintPagesParamsPtr params, PrintWithParamsCallback callback) override; #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -325,7 +325,8 @@ class PrintRenderFrameHelper +@@ -329,7 +329,8 @@ class PrintRenderFrameHelper // WARNING: |this| may be gone after this method returns. void Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -917,7 +917,7 @@ index d592a3dde2411c62c595ae3527d188bcb471aa94..233c1956f6b876a8f6d71baa0cd08c3e // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); -@@ -335,7 +336,8 @@ class PrintRenderFrameHelper +@@ -339,7 +340,8 @@ class PrintRenderFrameHelper // Initialize print page settings with default settings. // Used only for native printing workflow. bool InitPrintSettings(blink::WebLocalFrame* frame, @@ -927,7 +927,7 @@ index d592a3dde2411c62c595ae3527d188bcb471aa94..233c1956f6b876a8f6d71baa0cd08c3e // Calculate number of pages in source document. uint32_t CalculateNumberOfPages(blink::WebLocalFrame* frame, -@@ -647,7 +649,8 @@ class PrintRenderFrameHelper +@@ -651,7 +653,8 @@ class PrintRenderFrameHelper }; void SetupOnStopLoadingTimeout(); diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index 3634eeb8e2..af4ad37f16 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -165,7 +165,7 @@ index fbbc68caa6b776b17a50a4fbc33044047c8f9e1a..5e7a66aafbbe6c388ac0ec780ef1eb09 int dir_mode = 0; CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) && diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index d479b8d1c03c7416c0da01c3881ac437fd0f170c..53fdcaf36552091e0b03297ee0d524b729cf8324 100644 +index c35bcb658b3ff598cc35f8af770b4a7425e46486..03c73912d8731bdb0f435b83bb9e496e6c605b76 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -30,7 +30,9 @@ @@ -227,7 +227,7 @@ index d479b8d1c03c7416c0da01c3881ac437fd0f170c..53fdcaf36552091e0b03297ee0d524b7 user_data_dir_(user_data_dir), should_kill_remote_process_callback_( base::BindRepeating(&DisplayShouldKillMessageBox)) {} -@@ -446,7 +460,7 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -447,7 +461,7 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { bool ProcessSingleton::Create() { TRACE_EVENT0("startup", "ProcessSingleton::Create"); @@ -236,7 +236,7 @@ index d479b8d1c03c7416c0da01c3881ac437fd0f170c..53fdcaf36552091e0b03297ee0d524b7 remote_window_ = FindRunningChromeWindow(user_data_dir_); if (!remote_window_ && !EscapeVirtualization(user_data_dir_)) { -@@ -455,7 +469,7 @@ bool ProcessSingleton::Create() { +@@ -456,7 +470,7 @@ bool ProcessSingleton::Create() { // access. As documented, it's clearer to NOT request ownership on creation // since it isn't guaranteed we will get it. It is better to create it // without ownership and explicitly get the ownership afterward. @@ -245,7 +245,7 @@ index d479b8d1c03c7416c0da01c3881ac437fd0f170c..53fdcaf36552091e0b03297ee0d524b7 if (!only_me.is_valid()) { DPLOG(FATAL) << "CreateMutex failed"; return false; -@@ -486,6 +500,17 @@ bool ProcessSingleton::Create() { +@@ -487,6 +501,17 @@ bool ProcessSingleton::Create() { window_.CreateNamed(base::BindRepeating(&ProcessLaunchNotification, notification_callback_), user_data_dir_.value()); 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 b28e2ba8c5..79cedb435f 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -8,7 +8,7 @@ Chrome moved the SetCursor IPC message to mojo, which we use to tell OSR about ` Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779 diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h -index 99fc4bb4a7a4571310baed18ad22e0ab430b8084..44b99ecb47eda44247b345951602f60067de08d2 100644 +index 74a2c460900de53aea1794883f66c2dc85e3734f..e857f68897f5dd94d28c690440b6711e5343542f 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h @@ -27,6 +27,7 @@ @@ -30,10 +30,10 @@ index 99fc4bb4a7a4571310baed18ad22e0ab430b8084..44b99ecb47eda44247b345951602f600 // RenderWidgetHost on the primary main frame, and false otherwise. virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*); diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index e0307e278c7ca4314ebb87b0fbdeb110a3457ca3..4f47b7a67327d9ee56f4ca6077e53dba53519d5c 100644 +index 7593b7f1b2f08b04e8d61efb6e34920e9b69fad4..2a016e85d936afb1603a36f39ff993f93c58b2eb 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2192,6 +2192,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { +@@ -2194,6 +2194,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { if (view_) { view_->UpdateCursor(cursor); } @@ -44,10 +44,10 @@ index e0307e278c7ca4314ebb87b0fbdeb110a3457ca3..4f47b7a67327d9ee56f4ca6077e53dba void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 6975ee5b7ea90af6178b9519ba7366c3fa80cd44..b4668743cacc06159ee0711f0e94a863b02b83f7 100644 +index befce87fbad6daabfd3d765634b4e81355cc06ad..4f35297d8f5ccbed6a1e1b73e5fdb1607cc99779 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -6585,6 +6585,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -6617,6 +6617,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -60,10 +60,10 @@ index 6975ee5b7ea90af6178b9519ba7366c3fa80cd44..b4668743cacc06159ee0711f0e94a863 RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 29260987b6d19a738c74d2a83608afb49240f1f9..7e036606685749c2f02c90a5edb689865f98380f 100644 +index 58d38d13ab2f9efc7587fd93d2ae87432d00886b..9e81c01f7b3f3ca5c800f2c8ccba6aabdccd6283 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1253,6 +1253,7 @@ class CONTENT_EXPORT WebContentsImpl +@@ -1256,6 +1256,7 @@ class CONTENT_EXPORT WebContentsImpl void SendScreenRects() override; void SendActiveState(bool active) override; TextInputManager* GetTextInputManager() override; diff --git a/patches/chromium/refactor_unfilter_unresponsive_events.patch b/patches/chromium/refactor_unfilter_unresponsive_events.patch index 7094077d27..3bbd974f67 100644 --- a/patches/chromium/refactor_unfilter_unresponsive_events.patch +++ b/patches/chromium/refactor_unfilter_unresponsive_events.patch @@ -14,73 +14,11 @@ RendererUnresponsive events are filtered out when 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. -It also stops RenderWidgetHostImpl::WasHidden() from declaring a hung -renderer responsive: StopInputEventAckTimeout() calls -RendererIsResponsive(), so hiding a hung widget emitted `responsive` -without any recovery and cleared is_unresponsive_, and the real recovery -then emitted nothing. WasHidden() now uses a PauseInputEventAckTimeout() -that only stops the timer; WasShown() re-arms it and a real input ack -still goes through RendererIsResponsive(). Chrome relies on the old -behavior only to dismiss its hung-page dialog on tab backgrounding, which -Electron does not build. This part is proposed upstream at -https://chromium-review.googlesource.com/c/chromium/src/+/8360632 and -can be dropped from this patch once it rolls in. - -diff --git a/components/input/render_input_router.cc b/components/input/render_input_router.cc -index 461a128e6151b3f61da330c48dcf63dff0fe30e3..2ba1163cfff96afae075d061c7e758bf37af2fc4 100644 ---- a/components/input/render_input_router.cc -+++ b/components/input/render_input_router.cc -@@ -388,9 +388,13 @@ void RenderInputRouter::StartInputEventAckTimeout() { - } - - void RenderInputRouter::StopInputEventAckTimeout() { -+ PauseInputEventAckTimeout(); -+ delegate_->RendererIsResponsive(); -+} -+ -+void RenderInputRouter::PauseInputEventAckTimeout() { - input_event_ack_timeout_.Stop(); - hang_monitor_timer_state_ = HangMonitorTimerState::kStopped; // Reset state -- delegate_->RendererIsResponsive(); - } - - void RenderInputRouter::RestartInputEventAckTimeoutIfNecessary() { -diff --git a/components/input/render_input_router.h b/components/input/render_input_router.h -index 3e47a795e9f4d1e25fab5fefb3addf1ff3911f7c..55e19177b71b7dd157540eda6ce208feac8eda46 100644 ---- a/components/input/render_input_router.h -+++ b/components/input/render_input_router.h -@@ -220,6 +220,9 @@ class COMPONENT_EXPORT(INPUT) RenderInputRouter - // Stops all existing hang monitor timeouts and assumes the renderer is - // responsive. - void StopInputEventAckTimeout(); -+ // Stops the timeout without treating the renderer as responsive; used while -+ // the widget is hidden, when a missing ack says nothing either way. -+ void PauseInputEventAckTimeout(); - void RestartInputEventAckTimeoutIfNecessary(); - - void StartInputEventAckTimeoutForTesting() { StartInputEventAckTimeout(); } -diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 4f47b7a67327d9ee56f4ca6077e53dba53519d5c..4d6f62e3dfd8fb88784e8f39d4b333ad22ef3a78 100644 ---- a/content/browser/renderer_host/render_widget_host_impl.cc -+++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -891,8 +891,10 @@ void RenderWidgetHostImpl::WasHidden() { - // show goes through immediately. - visual_properties_ack_pending_ = false; - -- // Don't bother reporting hung state when we aren't active. -- GetRenderInputRouter()->StopInputEventAckTimeout(); -+ // Don't report hung state when we aren't active, but don't take hiding as -+ // proof of recovery either: a hung widget stays unresponsive until its -+ // input is acked, and WasShown() re-arms the timeout. -+ GetRenderInputRouter()->PauseInputEventAckTimeout(); - - // Show/Hide state is not sent to the renderer when it has requested for us to - // wait until it requests them via Init(). diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index a66d103c06de4dca6317c6e167cd1ec14a429b26..0b41953943aa4bc2ffba13fccb4472073bbd4fe8 100644 +index 30bc2b872f917209c72e2995024d4cc0cde230d0..951fce454a5eeb3cc2245900a3e867dc46cd56aa 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -11241,25 +11241,13 @@ void WebContentsImpl::RendererUnresponsive( +@@ -11282,25 +11282,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 297de8fed6..5427435d51 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 3f8f700a071e262f0e4e3e35c1f3369d7f4e0c98..9dbb76fcc73c3ed2acf58b584fe16f29581aa8ad 100644 +index d55b8386da9f8d56e4428e591a74b0c0088f678d..f921a4a7cb2e122f2d439fe6e4c2e67d553b6fb7 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 @@ -191,6 +191,11 @@ void ExtractUnderlines(NSAttributedString* string, @@ -23,7 +23,7 @@ index 3f8f700a071e262f0e4e3e35c1f3369d7f4e0c98..9dbb76fcc73c3ed2acf58b584fe16f29 // RenderWidgetHostViewCocoa --------------------------------------------------- // Private methods: -@@ -852,6 +857,10 @@ - (AcceptMouseEvents)acceptsMouseEventsOption { +@@ -855,6 +860,10 @@ - (AcceptMouseEvents)acceptsMouseEventsOption { } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -34,7 +34,7 @@ index 3f8f700a071e262f0e4e3e35c1f3369d7f4e0c98..9dbb76fcc73c3ed2acf58b584fe16f29 // Enable "click-through" if mouse clicks are accepted in inactive windows. return [self acceptsMouseEventsOption] > AcceptMouseEvents::kWhenInActiveWindow; -@@ -1494,6 +1503,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -1497,6 +1506,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 d9ea530acc..79babccad8 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 5bc7db95056ba2c5222983e8c19dbc0af04fb3b0..b07eb0544c1f6b3a8131ece752b8554477c6f8a1 100644 +index 8a60d7061bbfbeea1a15992ee0d9f2389b742f6e..6cdf0915ed6e32b71d688407075840d2b89335b4 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1731,7 +1731,7 @@ group("extra_resources") { +@@ -1735,7 +1735,7 @@ group("extra_resources") { ] } @@ -64,7 +64,7 @@ index 5bc7db95056ba2c5222983e8c19dbc0af04fb3b0..b07eb0544c1f6b3a8131ece752b85544 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1755,6 +1755,12 @@ repack("browser_tests_pak") { +@@ -1759,6 +1759,12 @@ repack("browser_tests_pak") { deps = [ "//chrome/test/data/webui:resources" ] } diff --git a/patches/chromium/revert_only_preload_swiftshader_in_gpu_sandbox_init_when_allowed.patch b/patches/chromium/revert_only_preload_swiftshader_in_gpu_sandbox_init_when_allowed.patch index eaa30c0e2e..8d8fd75921 100644 --- a/patches/chromium/revert_only_preload_swiftshader_in_gpu_sandbox_init_when_allowed.patch +++ b/patches/chromium/revert_only_preload_swiftshader_in_gpu_sandbox_init_when_allowed.patch @@ -22,7 +22,7 @@ https://chromium-review.googlesource.com/c/chromium/src/+/8286976; this patch can be dropped once that or an equivalent lands. diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc -index 1a3ee6b9285bb9cea28e2cf157b36d41b3b9cee0..aa5bf8475fdae4e6701c02dec1f0653d7f958066 100644 +index 2bdbe86d65165d0ead9fba47b7062721e3115d7c..69b6f815b3b902cf580f439e1165598dae1d764c 100644 --- a/gpu/ipc/service/gpu_init.cc +++ b/gpu/ipc/service/gpu_init.cc @@ -680,17 +680,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line, diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index bf90419eed..5a5ff5fd2b 100644 --- a/patches/chromium/scroll_bounce_flag.patch +++ b/patches/chromium/scroll_bounce_flag.patch @@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch Patch to make scrollBounce option work. diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc -index c71dfd3567adc5cdd2635f14fecd74288e3d418b..4c1b911d7afe3584843848f3e2ad7cd145f2af6c 100644 +index f5d1a55e2a255519d3fc2e7afa22c73384e1881a..95f410669ce139d15f9832c845cc58832073362c 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1191,11 +1191,11 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1198,11 +1198,11 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabledOnRoot() { diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index d80b20c5f3..b902ee6960 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 18aa873e4c72024aaa6bca854f49a62e50ccdf0c..a7b48e3eb0ee4d24a70a9dcb2ec3d0294a974457 100644 +index 9e33c6d805acb7bdafcc7ae0c887dbec1039a36d..d03d2c2b6199b07e485854ec813456d4612061e2 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2098,6 +2098,10 @@ bool RenderProcessHostImpl::Init() { +@@ -2101,6 +2101,10 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( *cmd_line, IsPdf(), IsJitDisabled()); diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 7962e1cb4f..547385c988 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 b4668743cacc06159ee0711f0e94a863b02b83f7..7f5dbff6f8c822aee3bd1dab0854233edd231687 100644 +index 4f35297d8f5ccbed6a1e1b73e5fdb1607cc99779..1414ae34cafe13662da115a3fc4ea7bf0028f2de 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4440,6 +4440,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -4450,6 +4450,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 b4668743cacc06159ee0711f0e94a863b02b83f7..7f5dbff6f8c822aee3bd1dab0854233e std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -4450,6 +4457,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -4460,6 +4467,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -35,7 +35,7 @@ index b4668743cacc06159ee0711f0e94a863b02b83f7..7f5dbff6f8c822aee3bd1dab0854233e CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index dce1307c7451224e6d23dad62ee4a177e6ef62b5..114ff9f255230670a7d2c246c9d7d623ad982128 100644 +index 286c61111d622b0bf0a4b84769a6d223019bdf63..8df245c07c0a643dfbf7ea3335276af418887f4b 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -138,12 +138,14 @@ class PrerenderHandle; diff --git a/patches/chromium/webhid_webusb_key_document_services_on_the_requesting_frame_s_origin.patch b/patches/chromium/webhid_webusb_key_document_services_on_the_requesting_frame_s_origin.patch index aed935f0dc..c2a8ce6042 100644 --- a/patches/chromium/webhid_webusb_key_document_services_on_the_requesting_frame_s_origin.patch +++ b/patches/chromium/webhid_webusb_key_document_services_on_the_requesting_frame_s_origin.patch @@ -19,10 +19,10 @@ This is specific to Electron's permission model and is not intended for upstream. diff --git a/content/browser/hid/hid_service.cc b/content/browser/hid/hid_service.cc -index 2497764e77ff1413170aefd57729f5829f8f8d4a..7c729656f0494e077049434afacaf1217d03b4a7 100644 +index 3c59d21c9c2545dee2749de88a4978d5465074fe..358d969c308f6f05dc6015ac56ddd21f12e3a2ed 100644 --- a/content/browser/hid/hid_service.cc +++ b/content/browser/hid/hid_service.cc -@@ -122,7 +122,7 @@ HidService::HidService( +@@ -123,7 +123,7 @@ HidService::HidService( HidService::HidService(RenderFrameHostImpl* render_frame_host) : HidService(render_frame_host, /*service_worker_version=*/nullptr, diff --git a/patches/chromium/webhid_webusb_pass_the_frame_to_canrequestdevicepermission.patch b/patches/chromium/webhid_webusb_pass_the_frame_to_canrequestdevicepermission.patch index 41d433e2ff..b9d427583e 100644 --- a/patches/chromium/webhid_webusb_pass_the_frame_to_canrequestdevicepermission.patch +++ b/patches/chromium/webhid_webusb_pass_the_frame_to_canrequestdevicepermission.patch @@ -70,10 +70,10 @@ index 084463d16d596861c0deae55d0eee30af11fc2d7..ffb716c687e3b24a98e70de18609f450 /*browser_context=*/nullptr, /*render_frame_host=*/nullptr, origin, device::mojom::HidDeviceInfo())); diff --git a/chrome/browser/usb/chrome_usb_delegate.cc b/chrome/browser/usb/chrome_usb_delegate.cc -index c34387a5e63299901e6e32e1b5a43e0b08b8d814..f0c2b7398cbec947acb3869b5e8d05e0c921c389 100644 +index 7115fc54ef5c52e5f6bd9f998c146cb29f0e9555..3340d19bb6e448a25467a737f2e847976efc95f6 100644 --- a/chrome/browser/usb/chrome_usb_delegate.cc +++ b/chrome/browser/usb/chrome_usb_delegate.cc -@@ -294,6 +294,7 @@ bool ChromeUsbDelegate::PageMayUseUsb(content::Page& page) { +@@ -295,6 +295,7 @@ bool ChromeUsbDelegate::PageMayUseUsb(content::Page& page) { bool ChromeUsbDelegate::CanRequestDevicePermission( content::BrowserContext* browser_context, @@ -107,10 +107,10 @@ index 9463c12f2ab56c4bf04f80d0dd4ae7c4bad36891..f13ddc2c177b1d2ee90fd298fe169553 /*browser_context=*/nullptr, /*frame=*/nullptr, origin, device::mojom::UsbDeviceInfo())); diff --git a/content/browser/hid/hid_service.cc b/content/browser/hid/hid_service.cc -index 07016ab71eb699b8f637eba8fd7444e4de9e6cc4..2497764e77ff1413170aefd57729f5829f8f8d4a 100644 +index d538b842a30b87b230c4d629b5602dad536d976a..3c59d21c9c2545dee2749de88a4978d5465074fe 100644 --- a/content/browser/hid/hid_service.cc +++ b/content/browser/hid/hid_service.cc -@@ -435,8 +435,8 @@ void HidService::RequestDevice( +@@ -436,8 +436,8 @@ void HidService::RequestDevice( std::vector exclusion_filters, RequestDeviceCallback callback) { HidDelegate* delegate = GetContentClient()->browser()->GetHidDelegate(); diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 652f0a78e1..d8f12a97ac 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 6950b4bfa78399ec481f17c0f82dd83f36acf9b5..cedd00e054a2bac7a148b4b5c1ecf2f45ca10c25 100644 +index a7d38b913ddf1666f79e58a4680a5b1f81637837..a8ee55c9d08fa2a1ff4fcfb7c3a0ea2c470bd051 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -9624,6 +9624,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -9574,6 +9574,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } @@ -37,10 +37,10 @@ index 6950b4bfa78399ec481f17c0f82dd83f36acf9b5..cedd00e054a2bac7a148b4b5c1ecf2f4 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 7f5dbff6f8c822aee3bd1dab0854233edd231687..bff9262c58c18b533f78cabf397d047edd895d4c 100644 +index 1414ae34cafe13662da115a3fc4ea7bf0028f2de..7a1c32f3e778d6336b82ad984bef513dc0f3a082 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4733,21 +4733,28 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( +@@ -4743,21 +4743,28 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( const input::NativeWebKeyboardEvent& event) { OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"), "WebContentsImpl::PreHandleKeyboardEvent"); diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index b6f6e87f8f..7b75a74b5e 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected: https://chromium-review.googlesource.com/c/chromium/src/+/1954347 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 826f7108aa884dcd4d6f24d33e321756121e0f81..e9c00dd10d3a78c285076c930f53aa265aa93bbe 100644 +index 0b9097dd14b59886163f5414a3c1465f32e429e2..c0281cc75b8d94041c86fe31e766d77b0d2b9540 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -408,6 +408,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -411,6 +411,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,10 +26,10 @@ index 826f7108aa884dcd4d6f24d33e321756121e0f81..e9c00dd10d3a78c285076c930f53aa26 // An empty URL is returned if the URL is not overriden. virtual GURL OverrideFlashEmbedWithHTML(const GURL& url); diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index 4341f407c4fb27afd20162eee63157cb92ca6515..3fdfbdf2a3156b84a936febe4b52c49d70126f97 100644 +index 14d16e71d0171d7624752c8a7eefcc0ae9fcd021..b06371ff9ad7898c7e181b62940a18ea338107dc 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -934,6 +934,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -933,6 +933,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,7 +43,7 @@ index 4341f407c4fb27afd20162eee63157cb92ca6515..3fdfbdf2a3156b84a936febe4b52c49d const v8::Local& worker) { GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 2266ee880b69ca9c41bd72029b55852b476772e5..1fff6d5b78fce0e10e3e87dd1b56c4994b7b9ee0 100644 +index 844a10c3a0360a114a302356d8077404dd5309f1..f496feb6770b14cb7357a93bd5fa96312fdbdbc5 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h @@ -216,6 +216,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -55,10 +55,10 @@ index 2266ee880b69ca9c41bd72029b55852b476772e5..1fff6d5b78fce0e10e3e87dd1b56c499 const blink::WebSecurityOrigin& origin) override; bool OriginCanAccessServiceWorkers(const GURL& url) override; diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index 9ef66ec39e8cb8ef9a8753baf7bbddc227768d77..6eef1315ebe70ce614426d847674e1be8c7d9c09 100644 +index 9d775925ca207aade134fcdf8ae60bce2c957c8d..23e77bb0bb05fe4ca1cac66de620e21df46687a5 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -699,6 +699,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -704,6 +704,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch index 5eff624bd8..3b5a097d79 100644 --- a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch +++ b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch @@ -19,10 +19,10 @@ that clearly establishes the worker script is ready for evaluation with the scop initialized. diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index e9c00dd10d3a78c285076c930f53aa265aa93bbe..3677204303736ba0f00c87dbe0dd4025ab957193 100644 +index c0281cc75b8d94041c86fe31e766d77b0d2b9540..46720054d0da7e49a3e9570a6eb2ab658b3ae603 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -408,6 +408,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -411,6 +411,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -35,10 +35,10 @@ index e9c00dd10d3a78c285076c930f53aa265aa93bbe..3677204303736ba0f00c87dbe0dd4025 // from the worker thread. virtual void WillDestroyWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index 3fdfbdf2a3156b84a936febe4b52c49d70126f97..76defb35003dccfdb0cb5632c2e6c0e89f2a78ca 100644 +index b06371ff9ad7898c7e181b62940a18ea338107dc..3950462f2a60c3db30c21caa6e4e963923f9b1ad 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -946,6 +946,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -945,6 +945,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,7 +52,7 @@ index 3fdfbdf2a3156b84a936febe4b52c49d70126f97..76defb35003dccfdb0cb5632c2e6c0e8 RendererBlinkPlatformImpl::GetProtocolHandlerSecurityLevel( const blink::WebSecurityOrigin& origin) { diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 1fff6d5b78fce0e10e3e87dd1b56c4994b7b9ee0..1a21b977500820f1e34eb028c4aaa7addb279c65 100644 +index f496feb6770b14cb7357a93bd5fa96312fdbdbc5..820e7ddb6617f6df58c4ad1e57cefecf606986fa 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h @@ -216,6 +216,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -65,10 +65,10 @@ index 1fff6d5b78fce0e10e3e87dd1b56c4994b7b9ee0..1a21b977500820f1e34eb028c4aaa7ad blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel( const blink::WebSecurityOrigin& origin) override; diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index 6eef1315ebe70ce614426d847674e1be8c7d9c09..d9b25e76c3bff560e5246d1664562a98a7040a7f 100644 +index 23e77bb0bb05fe4ca1cac66de620e21df46687a5..6bc19b99814547b9d05808a5c09c1f8dd5c5f53d 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -699,6 +699,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -704,6 +704,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/perfetto/.patches b/patches/perfetto/.patches index f96cd9f9d7..e69de29bb2 100644 --- a/patches/perfetto/.patches +++ b/patches/perfetto/.patches @@ -1 +0,0 @@ -define_ssize_t_to_be_intptr_t_to_match_libuv.patch diff --git a/patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch b/patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch deleted file mode 100644 index 8f70f5aa40..0000000000 --- a/patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Rose -Date: Fri, 28 Jan 2022 15:07:54 -0800 -Subject: define ssize_t to be intptr_t to match libuv - -This definition conflicts with libuv's: https://github.com/libuv/libuv/blob/bb0b4bb783da45ca995d8fb3d5dec0ed84133446/include/uv/win.h#L26-L31 - -Breaks the build on 32-bit windows. - -diff --git a/include/perfetto/ext/base/sys_types.h b/include/perfetto/ext/base/sys_types.h -index 74cd1b734c162d0f48c653a501ded1522d24c387..a150109ca0dd3795d94c9ae8c976576439a3e3e4 100644 ---- a/include/perfetto/ext/base/sys_types.h -+++ b/include/perfetto/ext/base/sys_types.h -@@ -41,11 +41,7 @@ using gid_t = int; - using pid_t = int; - #endif // !GCC - --#if defined(_WIN64) --using ssize_t = int64_t; --#else --using ssize_t = long; --#endif // _WIN64 -+using ssize_t = intptr_t; - - #endif // __MINGW32__ - diff --git a/patches/v8/.patches b/patches/v8/.patches index c28955ece9..fe10ccbcad 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -1,5 +1,5 @@ chore_allow_customizing_microtask_policy_per_context.patch build_warn_instead_of_abort_on_builtin_pgo_profile_mismatch.patch src_use_legacy_trace_macros_in_perfetto_to_support_all_phases.patch -cppgc_support_stackstartmarker_on_msvc.patch feat_key_code_caches_to_the_patch_set_and_the_embedded_blob.patch +fix_allow_embedder_slots_of_non-api_objects_in_snapshot.patch diff --git a/patches/v8/build_warn_instead_of_abort_on_builtin_pgo_profile_mismatch.patch b/patches/v8/build_warn_instead_of_abort_on_builtin_pgo_profile_mismatch.patch index 88f8480400..1916641314 100644 --- a/patches/v8/build_warn_instead_of_abort_on_builtin_pgo_profile_mismatch.patch +++ b/patches/v8/build_warn_instead_of_abort_on_builtin_pgo_profile_mismatch.patch @@ -15,10 +15,10 @@ Rather than disabling builtins PGO entirely, warn and skip mismatched builtins so all other builtins still benefit from PGO. diff --git a/BUILD.gn b/BUILD.gn -index 2dd3d061321698b35bbb46974e80d510455d8a1b..3698b9b9724ec9425c5e57d395ae9d305841b7aa 100644 +index 4e7facad6ef14cab26805fcdf9e2675cb99d0830..9beb3544470137e4d343c2449603267a61b5d836 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -3102,9 +3102,11 @@ template("run_mksnapshot") { +@@ -3120,9 +3120,11 @@ template("run_mksnapshot") { "--turbo-profiling-input", rebase_path(v8_builtins_profiling_log_file, root_build_dir), diff --git a/patches/v8/cppgc_support_stackstartmarker_on_msvc.patch b/patches/v8/cppgc_support_stackstartmarker_on_msvc.patch deleted file mode 100644 index 5bfac54e99..0000000000 --- a/patches/v8/cppgc_support_stackstartmarker_on_msvc.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: deepak1556 -Date: Tue, 19 May 2026 16:13:03 +0900 -Subject: [cppgc] Support StackStartMarker on MSVC - -Use the `_AddressOfReturnAddress()` intrinsic as the stack address -primitive. - -diff --git a/include/cppgc/heap.h b/include/cppgc/heap.h -index 2968a0af197240f76aaac317444ae072d248ec94..cdba7480b447f9ac6d93013faa40393430dc9aa9 100644 ---- a/include/cppgc/heap.h -+++ b/include/cppgc/heap.h -@@ -15,6 +15,10 @@ - #include "cppgc/platform.h" - #include "v8config.h" // NOLINT(build/include_directory) - -+#if defined(V8_CC_MSVC) -+#include -+#endif -+ - /** - * cppgc - A C++ garbage collection library. - */ -@@ -37,7 +41,11 @@ class Heap; - */ - class V8_EXPORT StackStartMarker { - public: -+#if defined(V8_CC_MSVC) -+ StackStartMarker() : stack_start_(_AddressOfReturnAddress()) {} -+#else - StackStartMarker() : stack_start_(__builtin_frame_address(0)) {} -+#endif - void* stack_start() const { return stack_start_; } - - private: diff --git a/patches/v8/feat_key_code_caches_to_the_patch_set_and_the_embedded_blob.patch b/patches/v8/feat_key_code_caches_to_the_patch_set_and_the_embedded_blob.patch index ded9d18fb9..428c5e2380 100644 --- a/patches/v8/feat_key_code_caches_to_the_patch_set_and_the_embedded_blob.patch +++ b/patches/v8/feat_key_code_caches_to_the_patch_set_and_the_embedded_blob.patch @@ -29,7 +29,7 @@ This adds two things: Both parts are suitable for upstreaming. diff --git a/BUILD.gn b/BUILD.gn -index 3698b9b9724ec9425c5e57d395ae9d305841b7aa..b2d3bad6d186ab0fb57b93d895eda3f30d7ed5bb 100644 +index 9beb3544470137e4d343c2449603267a61b5d836..6a299d99f563a9e3f151174911c11cb87792a87b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -20,6 +20,7 @@ import("//third_party/icu/config.gni") @@ -40,7 +40,7 @@ index 3698b9b9724ec9425c5e57d395ae9d305841b7aa..b2d3bad6d186ab0fb57b93d895eda3f3 if (is_clang) { import("//build/config/clang/clang.gni") -@@ -1299,6 +1300,14 @@ enabled_external_defines = +@@ -1304,6 +1305,14 @@ enabled_external_defines = disabled_external_defines = disabled_external_v8_defines + disabled_external_cppgc_defines diff --git a/patches/v8/fix_allow_embedder_slots_of_non-api_objects_in_snapshot.patch b/patches/v8/fix_allow_embedder_slots_of_non-api_objects_in_snapshot.patch new file mode 100644 index 0000000000..ef62e2c9e7 --- /dev/null +++ b/patches/v8/fix_allow_embedder_slots_of_non-api_objects_in_snapshot.patch @@ -0,0 +1,41 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "electron-claude[bot]" + <279139701+electron-claude[bot]@users.noreply.github.com> +Date: Tue, 15 Sep 2026 06:49:06 +0000 +Subject: fix: allow embedder slots of non-API objects in snapshot + serialization + +https://chromium-review.googlesource.com/c/v8/v8/+/8362279 made JSObject +embedder data slots hold CppHeapPointerHandles, so the serializer now +visits them through VisitCppHeapPointer(). Its DCHECK only expects API +wrapper objects there, but any JSObject with embedder fields reaches it, +notably JSPromise when V8_PROMISE_INTERNAL_FIELD_COUNT > 0 (Node.js and +Electron build with 1), which makes node_mksnapshot fail in DCHECK +builds. Accept every map that may have embedder fields, matching what +IterateJSObjectBodyImpl() visits. + +This should be upstreamed. + +diff --git a/src/snapshot/serializer.cc b/src/snapshot/serializer.cc +index 9c5161c76e8cce7fe36767c31523465ef0c436c4..b5a5b2733f52aa3b4bf150b847bd9cb95c8e03c8 100644 +--- a/src/snapshot/serializer.cc ++++ b/src/snapshot/serializer.cc +@@ -19,6 +19,7 @@ + #include "src/objects/instance-type-checker.h" + #include "src/objects/instance-type.h" + #include "src/objects/js-array-buffer-inl.h" ++#include "src/objects/js-objects-inl.h" + #include "src/objects/map.h" + #include "src/objects/objects-body-descriptors-inl.h" + #include "src/objects/slots-inl.h" +@@ -1142,8 +1143,8 @@ void Serializer::ObjectSerializer::VisitCppHeapPointer( + // We serialize the slot as initialized-but-unused slot. The actual API + // wrapper serialization is implemented in + // `ContextSerializer::SerializeApiWrapperFields()`. +- DCHECK(IsJSApiWrapperObjectMap(object_->map()) || IsNativeContext(*object_) || +- IsCppGCManagedBase(*object_) || ++ DCHECK(JSObject::MayHaveEmbedderFields(object_->map()) || ++ IsNativeContext(*object_) || IsCppGCManagedBase(*object_) || + IsEmbedderDataArray(*object_)); + static_assert(kCppHeapPointerSlotSize % kTaggedSize == 0); + sink_->Put( diff --git a/script/zip_manifests/chromedriver_zip.win.arm64.manifest b/script/zip_manifests/chromedriver_zip.win.arm64.manifest index 1137fb4205..ddcb0e5810 100644 --- a/script/zip_manifests/chromedriver_zip.win.arm64.manifest +++ b/script/zip_manifests/chromedriver_zip.win.arm64.manifest @@ -3,7 +3,6 @@ icudtl.dat ffmpeg.dll d3dcompiler_47.dll dxcompiler.dll -dxil.dll vk_swiftshader.dll vk_swiftshader_icd.json vulkan-1.dll diff --git a/script/zip_manifests/chromedriver_zip.win.x64.manifest b/script/zip_manifests/chromedriver_zip.win.x64.manifest index 1137fb4205..ddcb0e5810 100644 --- a/script/zip_manifests/chromedriver_zip.win.x64.manifest +++ b/script/zip_manifests/chromedriver_zip.win.x64.manifest @@ -3,7 +3,6 @@ icudtl.dat ffmpeg.dll d3dcompiler_47.dll dxcompiler.dll -dxil.dll vk_swiftshader.dll vk_swiftshader_icd.json vulkan-1.dll diff --git a/script/zip_manifests/dist_zip.win.arm64.manifest b/script/zip_manifests/dist_zip.win.arm64.manifest index c08add8542..b412976120 100644 --- a/script/zip_manifests/dist_zip.win.arm64.manifest +++ b/script/zip_manifests/dist_zip.win.arm64.manifest @@ -7,7 +7,6 @@ electron.exe electron_wer.dll ffmpeg.dll icudtl.dat -dxil.dll dxcompiler.dll locales/af.pak locales/am.pak diff --git a/script/zip_manifests/dist_zip.win.x64.manifest b/script/zip_manifests/dist_zip.win.x64.manifest index c08add8542..b412976120 100644 --- a/script/zip_manifests/dist_zip.win.x64.manifest +++ b/script/zip_manifests/dist_zip.win.x64.manifest @@ -7,7 +7,6 @@ electron.exe electron_wer.dll ffmpeg.dll icudtl.dat -dxil.dll dxcompiler.dll locales/af.pak locales/am.pak diff --git a/shell/app/electron_crash_reporter_client.cc b/shell/app/electron_crash_reporter_client.cc index 2bdc62ed01..95727fe438 100644 --- a/shell/app/electron_crash_reporter_client.cc +++ b/shell/app/electron_crash_reporter_client.cc @@ -233,21 +233,20 @@ bool ElectronCrashReporterClient::ReportingIsEnforcedByPolicy( } #endif -bool ElectronCrashReporterClient::GetShouldRateLimit() { +bool ElectronCrashReporterClient::ShouldRateLimitUploads() { return rate_limit_; } -bool ElectronCrashReporterClient::GetShouldCompressUploads() { +bool ElectronCrashReporterClient::ShouldCompressUploads() { return compress_uploads_; } -void ElectronCrashReporterClient::GetProcessSimpleAnnotations( - std::map* annotations) { - for (auto&& pair : global_annotations_) { - (*annotations)[pair.first] = pair.second; - } - (*annotations)["prod"] = ELECTRON_PRODUCT_NAME; - (*annotations)["ver"] = ELECTRON_VERSION_STRING; +std::map +ElectronCrashReporterClient::GetExtraProcessAnnotations() { + std::map annotations = global_annotations_; + annotations["prod"] = ELECTRON_PRODUCT_NAME; + annotations["ver"] = ELECTRON_VERSION_STRING; + return annotations; } #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) diff --git a/shell/app/electron_crash_reporter_client.h b/shell/app/electron_crash_reporter_client.h index 2dc5af58b3..c6e9134b96 100644 --- a/shell/app/electron_crash_reporter_client.h +++ b/shell/app/electron_crash_reporter_client.h @@ -62,11 +62,10 @@ class ElectronCrashReporterClient : public crash_reporter::CrashReporterClient { bool GetCollectStatsConsent() override; - bool GetShouldRateLimit() override; - bool GetShouldCompressUploads() override; + bool ShouldRateLimitUploads() override; + bool ShouldCompressUploads() override; - void GetProcessSimpleAnnotations( - std::map* annotations) override; + std::map GetExtraProcessAnnotations() override; #if BUILDFLAG(IS_MAC) bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled) override; diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index b7a5cb197a..1c1866661b 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -21,6 +21,7 @@ #include "base/functional/callback_helpers.h" #include "base/notimplemented.h" #include "base/path_service.h" +#include "base/process/process.h" #include "base/system/sys_info.h" #include "base/values.h" #include "base/win/windows_version.h" @@ -842,11 +843,11 @@ void App::OnGpuInfoUpdate() { } void App::BrowserChildProcessLaunchedAndConnected( - const content::ChildProcessData& data) { - ChildProcessLaunched(data.process_type, - content::ChildProcessId::FromUnsafeValue(data.id), - data.GetProcess().Handle(), data.metrics_name, - base::UTF16ToUTF8(data.name)); + const content::ChildProcessData& data, + const base::Process& process) { + ChildProcessLaunched( + data.process_type, content::ChildProcessId::FromUnsafeValue(data.id), + process.Handle(), data.metrics_name, base::UTF16ToUTF8(data.name)); } void App::BrowserChildProcessHostDisconnected( diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index 68db6a617f..ebd804540f 100644 --- a/shell/browser/api/electron_api_app.h +++ b/shell/browser/api/electron_api_app.h @@ -172,7 +172,8 @@ class App final : public gin::Wrappable, // content::BrowserChildProcessObserver: void BrowserChildProcessLaunchedAndConnected( - const content::ChildProcessData& data) override; + const content::ChildProcessData& data, + const base::Process& process) override; void BrowserChildProcessHostDisconnected( const content::ChildProcessData& data) override; void BrowserChildProcessCrashed( diff --git a/shell/browser/api/electron_api_utility_process.cc b/shell/browser/api/electron_api_utility_process.cc index 5ea7fd0c4a..b895b25a30 100644 --- a/shell/browser/api/electron_api_utility_process.cc +++ b/shell/browser/api/electron_api_utility_process.cc @@ -17,6 +17,7 @@ #include "base/task/single_thread_task_runner.h" #include "chrome/browser/browser_process.h" #include "content/browser/network_service_instance_impl.h" // nogncheck +#include "content/public/browser/browser_child_process_host_iterator.h" #include "content/public/browser/child_process_data.h" #include "content/public/browser/child_process_host.h" #include "content/public/browser/child_process_termination_info.h" @@ -297,6 +298,17 @@ void UtilityProcessWrapper::OnServiceProcessLaunch( DCHECK(node_service_remote_.is_connected()); pid_ = process.Pid(); GetAllUtilityProcessWrappers().Add(pid_, this); + // Remember the child process id: the process has already gone from the + // ChildProcessData that BrowserChildProcessCrashed/Killed receive. + for (content::BrowserChildProcessHostIterator it( + content::PROCESS_TYPE_UTILITY); + !it.Done(); ++it) { + const base::Process& host_process = it.GetProcess(); + if (host_process.IsValid() && host_process.Pid() == pid_) { + child_process_id_ = it.GetData().GetChildProcessId(); + break; + } + } // JS wraps these in net.Socket and owns them from here on. if (stdout_read_fd_ != -1) EmitWithoutEvent("stdout", std::exchange(stdout_read_fd_, -1)); @@ -319,6 +331,7 @@ void UtilityProcessWrapper::HandleTermination(uint32_t exit_code) { GetAllUtilityProcessWrappers().Remove(pid_); pid_ = base::kNullProcessId; + child_process_id_ = content::ChildProcessId(); content::ServiceProcessHost::RemoveObserver(this); content::BrowserChildProcessObserver::Remove(this); CloseConnectorPort(); @@ -368,10 +381,10 @@ void UtilityProcessWrapper::OnServiceProcessTerminatedNormally( bool UtilityProcessWrapper::IsThisProcess( const content::ChildProcessData& data) const { - return pid_ != base::kNullProcessId && + return !child_process_id_.is_null() && data.process_type == content::PROCESS_TYPE_UTILITY && data.metrics_name == node::mojom::NodeService::Name_ && - data.GetProcess().Pid() == pid_; + data.GetChildProcessId() == child_process_id_; } void UtilityProcessWrapper::BrowserChildProcessCrashed( diff --git a/shell/browser/api/electron_api_utility_process.h b/shell/browser/api/electron_api_utility_process.h index 2064913660..d8f4068a65 100644 --- a/shell/browser/api/electron_api_utility_process.h +++ b/shell/browser/api/electron_api_utility_process.h @@ -14,6 +14,7 @@ #include "base/process/process_handle.h" #include "content/public/browser/browser_child_process_observer.h" #include "content/public/browser/service_process_host.h" +#include "content/public/common/child_process_id.h" #include "electron/buildflags/buildflags.h" #include "gin/weak_cell.h" #include "gin/wrappable.h" @@ -135,6 +136,9 @@ class UtilityProcessWrapper final node::mojom::URLLoaderFactoryParamsPtr CreateURLLoaderFactoryParams(); base::ProcessId pid_ = base::kNullProcessId; + // Identifies the utility process in BrowserChildProcessObserver callbacks, + // whose ChildProcessData no longer carries the process. + content::ChildProcessId child_process_id_; #if BUILDFLAG(IS_WIN) // Non-owning handles, these will be closed when the // corresponding FD are closed via _close. diff --git a/shell/browser/api/electron_api_view.cc b/shell/browser/api/electron_api_view.cc index 68ce50b579..5365b97901 100644 --- a/shell/browser/api/electron_api_view.cc +++ b/shell/browser/api/electron_api_view.cc @@ -64,8 +64,10 @@ struct Converter { return false; if (!dict.Get("size", &out->host_size)) return false; - if (!dict.Get("layouts", &out->child_layouts)) + std::vector layouts; + if (!dict.Get("layouts", &layouts)) return false; + out->child_layouts.assign(layouts.begin(), layouts.end()); return true; } }; diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index c974d1cf29..29da00b4c6 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -23,9 +23,9 @@ #include "chrome/browser/icon_manager.h" #include "chrome/browser/ui/color/chrome_color_mixers.h" #include "chrome/common/chrome_switches.h" -#include "content/browser/browser_main_loop.h" // nogncheck #include "content/public/browser/browser_child_process_host_delegate.h" #include "content/public/browser/browser_child_process_host_iterator.h" +#include "content/public/browser/browser_main_runner.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/child_process_data.h" @@ -264,7 +264,7 @@ bool ElectronBrowserMainParts::SetExitCode(int code) { if (!exit_code_) return false; - content::BrowserMainLoop::GetInstance()->SetResultCode(code); + content::BrowserMainRunner::SetOverrideResultCode(code); *exit_code_ = code; return true; } @@ -710,7 +710,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() { content::PROCESS_TYPE_UTILITY); !it.Done(); ++it) { if (it.GetDelegate()->GetServiceName() == node::mojom::NodeService::Name_) { - auto& process = it.GetData().GetProcess(); + const base::Process& process = it.GetProcess(); if (!process.IsValid()) continue; auto* utility_process_wrapper = diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index 0938cc243a..8316198330 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -117,7 +117,8 @@ class ElectronDelegatedFrameHostClient } [[nodiscard]] SkColor DelegatedFrameHostGetGutterColor() const override { - if (view_->render_widget_host()->delegate() && + if (view_->render_widget_host() && + view_->render_widget_host()->delegate() && view_->render_widget_host()->delegate()->IsFullscreen()) { return SK_ColorWHITE; } @@ -126,7 +127,10 @@ class ElectronDelegatedFrameHostClient void OnFrameTokenChanged(uint32_t frame_token, base::TimeTicks activation_time) override { - view_->render_widget_host()->DidProcessFrame(frame_token, activation_time); + if (view_->render_widget_host()) { + view_->render_widget_host()->DidProcessFrame(frame_token, + activation_time); + } } [[nodiscard]] float GetDeviceScaleFactor() const override { @@ -135,8 +139,10 @@ class ElectronDelegatedFrameHostClient viz::FrameEvictorClient::EvictIds CollectSurfaceIdsForEviction() override { viz::FrameEvictorClient::EvictIds ids; - ids.embedded_ids = - view_->render_widget_host()->CollectSurfaceIdsForEviction(); + if (view_->render_widget_host()) { + ids.embedded_ids = + view_->render_widget_host()->CollectSurfaceIdsForEviction(); + } return ids; } @@ -443,10 +449,22 @@ input::CursorManager* OffScreenRenderWidgetHostView::GetCursorManager() { } void OffScreenRenderWidgetHostView::RenderProcessGone() { - Destroy(); + DestroyOrDefer(); } -void OffScreenRenderWidgetHostView::Destroy() { +void OffScreenRenderWidgetHostView::CleanUpHostObservers() { + if (!render_widget_host_) { + return; + } + render_widget_host_->render_frame_metadata_provider()->RemoveObserver(this); + // Ask the RWH to drop reference to us. + render_widget_host_->ViewDestroyed(); + // The host may be deleted before a deferred DestroyImpl() runs, so drop our + // reference to it here, mirroring RenderWidgetHostViewBase::host_. + render_widget_host_ = nullptr; +} + +void OffScreenRenderWidgetHostView::DestroyImpl() { if (!is_destroyed_) { is_destroyed_ = true; @@ -548,7 +566,7 @@ void OffScreenRenderWidgetHostView::CancelWidget() { if (render_widget_host_ && !is_destroyed_) { is_destroyed_ = true; - // Results in a call to Destroy(). + // Results in a call to DestroyOrDefer(). render_widget_host_->ShutdownAndDestroyWidget(true); } } diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 3dad2fddaa..6e97fa9a09 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -129,7 +129,7 @@ class OffScreenRenderWidgetHostView void ImeCancelComposition() override {} void RenderProcessGone() override; void ShowWithVisibility(content::PageVisibilityState page_visibility) final; - void Destroy() override; + void DestroyImpl() override; void UpdateTooltipUnderCursor(const std::u16string&) override {} void OnUnconfirmedTapConvertedToTap() override {} input::CursorManager* GetCursorManager() override; @@ -253,6 +253,9 @@ class OffScreenRenderWidgetHostView } private: + // content::RenderWidgetHostViewBase: + void CleanUpHostObservers() override; + void ReleaseCompositor(); void SetupFrameRate(bool force); void ResizeRootLayer(bool force); diff --git a/shell/browser/ui/views/electron_frame_view_linux.cc b/shell/browser/ui/views/electron_frame_view_linux.cc index d637d7c5df..269c31ffc1 100644 --- a/shell/browser/ui/views/electron_frame_view_linux.cc +++ b/shell/browser/ui/views/electron_frame_view_linux.cc @@ -275,8 +275,7 @@ void ElectronFrameViewLinux::UpdateButtonColors() { // Apply custom WCO overlay colors if set. const bool active = ShouldPaintAsActive(); - const SkColor symbol_color = - window_->overlay_symbol_color().value_or(SkColor()); + const std::optional symbol_color = window_->overlay_symbol_color(); const std::optional background_color = window_->overlay_button_color(); // Frame color is used for blending, force it to be opaque @@ -292,8 +291,11 @@ void ElectronFrameViewLinux::UpdateButtonColors() { auto* frame_caption_button = static_cast(button); frame_caption_button->SetPaintAsActive(active); - frame_caption_button->SetButtonColor(symbol_color); + // The icon color comes from whichever setter ran last, so set the frame + // color first and let an explicit symbol color override it. frame_caption_button->SetBackgroundColor(frame_color); + if (symbol_color.has_value()) + frame_caption_button->SetIconColor(*symbol_color); } } diff --git a/shell/browser/ui/views/freedesktop_nav_button_provider.cc b/shell/browser/ui/views/freedesktop_nav_button_provider.cc index 8d97e58327..1c58469060 100644 --- a/shell/browser/ui/views/freedesktop_nav_button_provider.cc +++ b/shell/browser/ui/views/freedesktop_nav_button_provider.cc @@ -167,10 +167,9 @@ class FreedesktopButtonImageSource : public gfx::ImageSkiaSource { // color when requested. Otherwise it is derived from the effective titlebar // background with the same contrast logic used by Chromium's vector icons const SkColor base = - symbol_ ? *symbol_ - : background_ - ? views::FrameCaptionButton::GetAccessibleButtonColor(*background_) - : SkColorSetRGB(0x2E, 0x34, 0x36); + symbol_ ? *symbol_ + : background_ ? views::FrameCaptionButton::GetButtonColor(*background_) + : SkColorSetRGB(0x2E, 0x34, 0x36); const SkColor inverse = background_ ? *background_ : color_utils::GetColorWithMaxContrast(base); const SkColor pill = spec_.pill == PillColor::kAccent ? spec_.accent : base; diff --git a/shell/common/BUILD.gn b/shell/common/BUILD.gn index 83e05be171..78016c5695 100644 --- a/shell/common/BUILD.gn +++ b/shell/common/BUILD.gn @@ -48,9 +48,6 @@ mojom("mojo") { } mojom("plugin") { - # We don't want Blink variants of these bindings to be generated. - disable_variants = true - sources = [ "plugin.mojom" ] public_deps = [ @@ -60,9 +57,6 @@ mojom("plugin") { } mojom("web_contents_utility") { - # We don't want Blink variants of these bindings to be generated. - disable_variants = true - sources = [ "web_contents_utility.mojom" ] public_deps = [