From b93642678cfad613774328d0fc76544e248bf571 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 16:32:10 -0500 Subject: [PATCH] chore: bump chromium to 149.0.7798.0 (main) (#50814) * chore: bump chromium in DEPS to 149.0.7779.0 * chore: bump chromium in DEPS to 149.0.7781.0 * 7726883: Add secondary label support to SimpleMenuModel and update views_examples Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7726883 Co-Authored-By: Claude * chore: update patches (trivial only) Co-Authored-By: Claude * fix: IWYU for base/logging.h Upstream is removing transitive includes of base/logging.h as part of crbug.com/499476145. Several CLs landed in this roll that required adding explicit includes across Electron source and patches. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7732103 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7735571 Co-Authored-By: Claude Opus 4.6 (1M context) * 7732482: [bedrock] Create BrowserProcess setters for system tray icons Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7732482 Co-Authored-By: Claude * chore: update patches (trivial only) Co-Authored-By: Claude * 7739543: Add RenderWidgetHostView::HasSavedFrame Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7739543 Co-Authored-By: Claude * chore: bump chromium in DEPS to 149.0.7783.0 * chore: bump chromium in DEPS to 149.0.7789.0 * chore: update patches (trivial only) * 7703728: DedicatedWorker: Enforce same-origin check for main script fetch. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7703728 Co-Authored-By: Claude Opus 4.6 (1M context) * 7720140: Remove GetPrefServiceForContext from ExtensionsBrowserClient Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7720140 Co-Authored-By: Claude Opus 4.6 (1M context) * chore: update patches (trivial only) * 7728375: Disable reentrancy by default except for Android and iOS Upstream changed the default ObserverList reentrancy policy from kAllowReentrancy to kDisallowReentrancy. Electron's observer lists are re-entered when macOS AppKit delivers synchronous window notifications (e.g. windowDidResignMain: during windowDidChangeOcclusionState:) because JS event handlers can trigger window state changes mid-iteration. Explicitly opt into kAllowReentrancy for now. A follow-up should convert synchronous Emit calls in window observer callbacks to EmitEventSoon to eliminate the reentrancy. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7728375 Co-Authored-By: Claude Opus 4.6 (1M context) * chore: bump chromium in DEPS to 149.0.7791.1 * chore: update patches (trivial only) * 7696481: [pdf] Rename PdfViewerStreamManager to MimeHandlerStreamManager Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7696481 Co-Authored-By: Claude Opus 4.6 (1M context) * 7745796: Printing: Remove parameter from ShowScriptedPrintPreview() interface Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7745796 Co-Authored-By: Claude Opus 4.6 (1M context) * 7688714: [Lens / Cookies] Grant secure cookie exemptions for Lens side panel Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7688714 Co-Authored-By: Claude Opus 4.6 (1M context) * 7752609: don't show glic button for non-normal BWIs. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7752609 Co-Authored-By: Claude Opus 4.6 (1M context) * 7749860: [media] Remove VideoFrame::WrapSharedImage with coded_size Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7749860 Co-Authored-By: Claude Opus 4.6 (1M context) * chore: bump chromium in DEPS to 149.0.7793.0 * chore: bump chromium in DEPS to 149.0.7795.0 * chore: bump chromium in DEPS to 149.0.7797.0 * chore: update patches * chore: remove upstreamed patches - fix_pass_trigger_for_global_shortcuts_on_wayland.patch: https://chromium-review.googlesource.com/c/chromium/src/+/7620219 - gin_mark_argumentholder_as_cppgc_stack_allocated.patch: https://chromium-review.googlesource.com/c/chromium/src/+/7728865 Co-Authored-By: Claude Opus 4.7 (1M context) * chore: bump chromium in DEPS to 149.0.7798.0 * chore: update filenames.libcxx.gni * 7760061: Reland Reland Add a client-side decorated frame view for non-browser widgets on Linux Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7760061 Co-Authored-By: Claude Opus 4.7 (1M context) * 7760945: Rename WebString::UTF8ConversionMode to Utf8ConversionMode Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7760945 Co-Authored-By: Claude Opus 4.7 (1M context) * chore: update patches * chore: remove upstreamed patches - patches/devtools_frontend/fix_context_selector_not_showing_execution_contexts.patch: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7761316 Co-Authored-By: Claude Opus 4.7 (1M context) * 7719004: [extensions] Gate dict-format mime_types_handler parsing Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7719004 Co-Authored-By: Claude Opus 4.7 (1M context) * 7716681: [pdf] Introduce MimeHandlerStreamDelegate and plumb ownership Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7716681 Co-Authored-By: Claude Opus 4.7 (1M context) * 7725342: Rename WebString::FromUTF8 to FromUtf8 in Blink Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7725342 Co-Authored-By: Claude Opus 4.7 (1M context) * 7615475: Add a native frame view for non-browser widgets on Linux Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7615475 Co-Authored-By: Claude Opus 4.7 (1M context) * 7735248: Move ManifestV2ExperimentManager to //extensions Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7735248 Co-Authored-By: Claude Opus 4.7 (1M context) * 7725187: linux: set env FC_FONTATIONS and EGL_PLATFORM early Move Ozone pre-init from ElectronBrowserMainParts::PreEarlyInitialization() to ElectronMainDelegate::PreSandboxStartup() to match upstream's rename and relocation. The call has to run before threads are created. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7725187 Co-Authored-By: Claude Opus 4.7 (1M context) * 7743280: Introduce client ID for network throttling conditions. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7743280 Co-Authored-By: Claude Opus 4.7 (1M context) * chore: disable ml-kem node test incompatible with BoringSSL test-crypto-pqc-key-objects-ml-kem: BoringSSL's ML-KEM support is inconsistent with the test's OpenSSL-version-based assumptions. Co-Authored-By: Claude Opus 4.7 (1M context) * test: update V8 serialization wire format version to 16 V8 14.9 (Chromium 149) bumped the serialization wire format from version 15 to 16. Update the hardcoded expected bytes in the test-v8-serdes.js test. Remove this patch once upstream Node.js catches up via its next V8 roll. Co-Authored-By: Claude Opus 4.7 (1M context) --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock Co-authored-by: Claude Co-authored-by: Claude Opus 4.6 (1M context) Co-authored-by: clavin --- DEPS | 2 +- chromium_src/BUILD.gn | 15 +- filenames.libcxx.gni | 1 + patches/chromium/.patches | 3 +- .../add_didinstallconditionalfeatures.patch | 24 +- ...lectron_deps_to_license_credits_file.patch | 2 +- ..._scheduler_throttling_per_renderview.patch | 22 +- ...o_depend_on_components_os_crypt_sync.patch | 4 +- ..._windows_to_have_different_web_prefs.patch | 20 +- ..._secondary_label_via_simplemenumodel.patch | 54 +--- patches/chromium/blink_local_frame.patch | 6 +- patches/chromium/boringssl_build_gn.patch | 2 +- .../build_add_electron_tracing_category.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 10 +- patches/chromium/build_gn.patch | 2 +- .../build_libc_as_static_library.patch | 4 +- patches/chromium/can_create_window.patch | 40 +-- ...ameter_in_script_lifecycle_observers.patch | 32 +-- ...ther_in_electron_views_and_delegates.patch | 8 +- .../chromium/chore_partial_revert_of.patch | 4 +- ...tition_attribute_dcheck_for_webviews.patch | 2 +- .../chore_patch_out_profile_methods.patch | 22 +- ...screationoverridden_with_full_params.patch | 239 +++++++++++++++++- ...e_as_a_dynamic_trace_category_prefix.patch | 2 +- ...e_reference_to_chrome_browser_themes.patch | 4 +- ...me_deprecated_wrapper_utility_in_gin.patch | 4 +- patches/chromium/command-ismediakey.patch | 8 +- ...e_browser_v8_snapshot_file_name_fuse.patch | 8 +- .../disable_compositor_recycling.patch | 4 +- patches/chromium/disable_hidden.patch | 6 +- .../expose_gtk_ui_platform_field.patch | 2 +- ...xpose_setuseragent_on_networkcontext.patch | 22 +- .../extend_apply_webpreferences.patch | 4 +- ...d_data_parameter_to_processsingleton.patch | 16 +- ...dd_set_theme_source_to_allow_apps_to.patch | 8 +- ..._registry_to_multibuffer_data_source.patch | 10 +- ...ort_for_embedder_snapshot_validation.patch | 2 +- ...g_the_base_spellchecker_download_url.patch | 2 +- ...bling_extensions_on_custom_protocols.patch | 4 +- ...sharingpicker_on_supported_platforms.patch | 2 +- ...e_launch_options_for_service_process.patch | 2 +- ...moothing_css_rule_and_blink_painting.patch | 26 +- ...screen_rendering_with_viz_compositor.patch | 27 +- ..._raw_response_headers_from_urlloader.patch | 26 +- ...allback_for_sync_and_async_clipboard.patch | 4 +- ..._exclusive_access_for_electron_needs.patch | 16 +- ...dless_mode_handling_in_native_widget.patch | 18 +- ...on_downloadmanagerimpl_observer_list.patch | 27 ++ ..._file_existence_before_setting_mtime.patch | 2 +- ...ding_non-standard_schemes_in_iframes.patch | 10 +- ..._background_throttling_in_compositor.patch | 6 +- ...t_for_dynamically_created_aria_menus.patch | 2 +- patches/chromium/fix_linux_tray_id.patch | 4 +- ...ingshelper_behind_branding_buildflag.patch | 20 +- ...king_and_message_bubbling_on_windows.patch | 6 +- ...board_hides_on_input_blur_in_webview.patch | 12 +- ...gger_for_global_shortcuts_on_wayland.patch | 140 ---------- ...fix_pulseaudio_stream_and_icon_names.patch | 10 +- ...original_resize_performance_on_macos.patch | 4 +- ...from_localframe_requestexecutescript.patch | 20 +- ...r_onendworkitemimpl_after_didruntask.patch | 4 +- patches/chromium/frame_host_manager.patch | 8 +- .../gin_enable_disable_v8_platform.patch | 2 +- ...umentholder_as_cppgc_stack_allocated.patch | 48 ---- .../chromium/gritsettings_resource_ids.patch | 4 +- patches/chromium/gtk_visibility.patch | 2 +- ...nse_interceptor_to_point_to_electron.patch | 6 +- ...reate_a_console_if_logging_to_stderr.patch | 4 +- ..._avoid_private_macos_api_usage.patch.patch | 114 ++++----- ...emote_certificate_verification_logic.patch | 18 +- .../chromium/notification_provenance.patch | 10 +- ...xture_remove_keyed_mutex_on_win_dxgi.patch | 2 +- patches/chromium/picture-in-picture.patch | 43 ++-- ...utofill_colors_to_the_color_pipeline.patch | 12 +- patches/chromium/printing.patch | 50 ++-- patches/chromium/process_singleton.patch | 12 +- ...r_changes_to_the_webcontentsobserver.patch | 18 +- ..._expose_file_system_access_blocklist.patch | 78 +++++- ...pose_hostimportmoduledynamically_and.patch | 12 +- ..._electron_permissiontypes_into_blink.patch | 4 +- ...efactor_unfilter_unresponsive_events.patch | 4 +- patches/chromium/resource_file_conflict.patch | 6 +- ...al_remove_unused_prehandlemouseevent.patch | 20 +- patches/chromium/scroll_bounce_flag.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 4 +- patches/chromium/web_contents.patch | 13 +- patches/chromium/webview_fullscreen.patch | 8 +- .../worker_context_will_destroy.patch | 8 +- ...feat_add_hook_to_notify_script_ready.patch | 8 +- patches/devtools_frontend/.patches | 1 - ...i_to_allow_electron_to_set_dock_side.patch | 4 +- ...ector_not_showing_execution_contexts.patch | 25 -- patches/node/.patches | 1 + ...ialization_wire_format_version_to_16.patch | 24 ++ ...bort_on_builtin_pgo_profile_mismatch.patch | 4 +- ...pturer_initialization_and_management.patch | 4 +- script/node-disabled-tests.json | 1 + shell/app/electron_main_delegate.cc | 14 + shell/browser/api/electron_api_printing.cc | 1 + shell/browser/api/electron_api_session.cc | 3 + shell/browser/api/electron_api_session.h | 6 +- .../electron_api_system_preferences_win.cc | 1 + shell/browser/api/electron_api_web_contents.h | 5 +- shell/browser/browser.h | 5 +- shell/browser/browser_linux.cc | 1 + shell/browser/browser_process_impl.cc | 8 + shell/browser/browser_process_impl.h | 4 + shell/browser/electron_browser_client.cc | 12 +- shell/browser/electron_browser_client.h | 5 +- shell/browser/electron_browser_main_parts.cc | 8 - .../electron_browser_main_parts_posix.cc | 1 + .../electron_pdf_document_helper_client.cc | 10 +- .../extension_action/extension_action_api.cc | 1 + .../pdf_viewer_private_api.cc | 10 +- .../resources_private_api.cc | 2 +- .../runtime/electron_runtime_api_delegate.cc | 1 + .../streams_private/streams_private_api.cc | 19 +- .../api/streams_private/streams_private_api.h | 3 +- .../extensions/electron_extension_system.cc | 1 + .../electron_extensions_browser_client.cc | 11 +- .../electron_extensions_browser_client.h | 6 +- shell/browser/native_window.h | 5 +- .../osr/osr_render_widget_host_view.cc | 4 + .../browser/osr/osr_render_widget_host_view.h | 1 + shell/browser/plugins/plugin_utils.cc | 2 +- .../printing/print_view_manager_electron.cc | 4 +- .../printing/print_view_manager_electron.h | 2 +- .../ui/devtools_ui_bundle_data_source.cc | 1 + .../ui/devtools_ui_theme_data_source.cc | 1 + .../electron_desktop_window_tree_host_linux.h | 1 - shell/browser/ui/file_dialog_linux.cc | 1 + shell/browser/ui/message_box_mac.mm | 1 + shell/browser/ui/message_box_win.cc | 1 + .../ui/views/client_frame_view_linux.cc | 4 +- shell/browser/ui/views/linux_frame_layout.cc | 8 +- shell/browser/ui/views/opaque_frame_view.cc | 8 +- .../common/api/electron_api_shared_texture.cc | 2 +- shell/common/keyboard_util.cc | 1 + shell/renderer/api/electron_api_web_frame.cc | 16 +- shell/renderer/electron_ipc_native.cc | 1 + .../electron_render_frame_observer.cc | 2 +- shell/renderer/renderer_client_base.cc | 6 +- 142 files changed, 973 insertions(+), 837 deletions(-) create mode 100644 patches/chromium/fix_allow_reentrancy_on_downloadmanagerimpl_observer_list.patch delete mode 100644 patches/chromium/fix_pass_trigger_for_global_shortcuts_on_wayland.patch delete mode 100644 patches/chromium/gin_mark_argumentholder_as_cppgc_stack_allocated.patch delete mode 100644 patches/devtools_frontend/fix_context_selector_not_showing_execution_contexts.patch create mode 100644 patches/node/test_update_v8_serialization_wire_format_version_to_16.patch diff --git a/DEPS b/DEPS index f4d03fd425..210bd075d5 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '148.0.7778.0', + '149.0.7798.0', 'node_version': 'v24.15.0', 'nan_version': diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index 09df151e74..f152c56da0 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -21,6 +21,8 @@ static_library("chrome") { "//chrome/browser/browser_features.h", "//chrome/browser/browser_process.cc", "//chrome/browser/browser_process.h", + "//chrome/browser/device_notifications/device_connection_tracker.h", + "//chrome/browser/device_notifications/device_system_tray_icon.h", "//chrome/browser/devtools/devtools_contents_resizing_strategy.cc", "//chrome/browser/devtools/devtools_contents_resizing_strategy.h", "//chrome/browser/devtools/devtools_dispatch_http_request_params.cc", @@ -38,6 +40,7 @@ static_library("chrome") { "//chrome/browser/devtools/visual_logging.h", "//chrome/browser/file_system_access/file_system_access_features.cc", "//chrome/browser/file_system_access/file_system_access_features.h", + "//chrome/browser/hid/hid_system_tray_icon.h", "//chrome/browser/icon_loader.cc", "//chrome/browser/icon_loader.h", "//chrome/browser/icon_manager.cc", @@ -156,6 +159,7 @@ static_library("chrome") { "//chrome/browser/ui/webui/accessibility/accessibility_ui.h", "//chrome/browser/usb/usb_blocklist.cc", "//chrome/browser/usb/usb_blocklist.h", + "//chrome/browser/usb/usb_system_tray_icon.h", "//extensions/browser/app_window/size_constraints.cc", "//extensions/browser/app_window/size_constraints.h", "//ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.cc", @@ -247,10 +251,6 @@ static_library("chrome") { "//chrome/browser/ui/views/dark_mode_manager_linux.cc", "//chrome/browser/ui/views/dark_mode_manager_linux.h", ] - sources += [ - "//chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.cc", - "//chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h", - ] public_deps += [ "//components/dbus" ] } @@ -387,18 +387,21 @@ static_library("chrome") { sources += [ "//chrome/browser/pdf/chrome_pdf_stream_delegate.cc", "//chrome/browser/pdf/chrome_pdf_stream_delegate.h", + "//chrome/browser/pdf/mime_handler_stream_manager.cc", + "//chrome/browser/pdf/mime_handler_stream_manager.h", "//chrome/browser/pdf/pdf_extension_util.cc", "//chrome/browser/pdf/pdf_extension_util.h", + "//chrome/browser/pdf/pdf_handler_stream_delegate.cc", + "//chrome/browser/pdf/pdf_handler_stream_delegate.h", "//chrome/browser/pdf/pdf_help_bubble_handler_factory.cc", "//chrome/browser/pdf/pdf_help_bubble_handler_factory.h", - "//chrome/browser/pdf/pdf_viewer_stream_manager.cc", - "//chrome/browser/pdf/pdf_viewer_stream_manager.h", "//chrome/browser/plugins/pdf_iframe_navigation_throttle.cc", "//chrome/browser/plugins/pdf_iframe_navigation_throttle.h", ] deps += [ "//components/pdf/browser", "//components/pdf/renderer", + "//components/zoom", "//ui/base/interaction", "//ui/webui/resources/cr_components/help_bubble:mojo_bindings", ] diff --git a/filenames.libcxx.gni b/filenames.libcxx.gni index fe74f91c41..f66bf45cc9 100644 --- a/filenames.libcxx.gni +++ b/filenames.libcxx.gni @@ -215,6 +215,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__atomic/atomic_lock_free.h", "//third_party/libc++/src/include/__atomic/atomic_ref.h", "//third_party/libc++/src/include/__atomic/atomic_sync.h", + "//third_party/libc++/src/include/__atomic/atomic_waitable_traits.h", "//third_party/libc++/src/include/__atomic/check_memory_order.h", "//third_party/libc++/src/include/__atomic/contention_t.h", "//third_party/libc++/src/include/__atomic/fence.h", diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 5ab2d36b49..104c1f0bd9 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -140,7 +140,6 @@ patch_osr_control_screen_info.patch refactor_allow_customizing_config_in_freedesktopsecretkeyprovider.patch fix_wayland_test_crash_on_teardown.patch fix_set_correct_app_id_on_linux.patch -fix_pass_trigger_for_global_shortcuts_on_wayland.patch feat_plumb_node_integration_in_worker_through_workersettings.patch fix_restore_sdk_inputs_cross-toolchain_deps_for_macos.patch fix_use_fresh_lazynow_for_onendworkitemimpl_after_didruntask.patch @@ -149,4 +148,4 @@ fix_fire_menu_popup_start_for_dynamically_created_aria_menus.patch feat_allow_enabling_extensions_on_custom_protocols.patch fix_initialize_com_on_desktopmedialistcapturethread_on_windows.patch chore_register_node_as_a_dynamic_trace_category_prefix.patch -gin_mark_argumentholder_as_cppgc_stack_allocated.patch +fix_allow_reentrancy_on_downloadmanagerimpl_observer_list.patch diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index c477bb8bb8..d3b797ed0a 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index 3f8cf4edc7448e6b584adae8fcbb872d27377126..1d03dc809d4c18f24314d94811e0bf52 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index ab959e66f8841d7367863bb13d6c7a0854d0df23..5279ba15f45bd7634b5f24553ad64c0069318cc0 100644 +index c4b96acb38679d5c860b312f3e3130377dff6e40..0107e6c35bbb077a0ce0a36489db4b3f207b7278 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4733,6 +4733,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4732,6 +4732,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index ab959e66f8841d7367863bb13d6c7a0854d0df23..5279ba15f45bd7634b5f24553ad64c00 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 1733f28e69b331b33f36084391f1d3ddb47c8e14..2ce05bce0a02338aba018c18f0a808a4eb392ff4 100644 +index c5c0c4fe09168b51ddb6b08a19ce269b97bcb2f5..4fa41ab51e326b10c661353cd6b209c25270d6d2 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -607,6 +607,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -606,6 +606,8 @@ class CONTENT_EXPORT RenderFrameImpl void DidObserveLayoutShift(double score, bool after_input_or_scroll) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -53,10 +53,10 @@ index 1733f28e69b331b33f36084391f1d3ddb47c8e14..2ce05bce0a02338aba018c18f0a808a4 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 0f218d3f96f0c3a3a5773937e50ba9e8d7df0498..27b21f02d2dbfd60cb64f09be393b0e50928756f 100644 +index d406a2d931bf96863662a0b96b13f8eed8776395..9fd34fac309228c7700372f792d375debf36d097 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -675,6 +675,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -674,6 +674,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -79,10 +79,10 @@ index d293c49e6774de889fa9959234c82b41a4b1efe1..0787bc8a602c60e5b42933813baa6b9d 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 a68832975b5d359f7eddaf2326bd47ff1e7e18df..ae565a4d3fdc2d02e2c7a27312d8296bbdf61e0b 100644 +index 8497afc3eccd6270839a0ab8b7e8441b4ce09ee3..bc8850ea6d8b18d7cbf33bdfda66530cf6a5d1b2 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -310,6 +310,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -311,6 +311,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -92,7 +92,7 @@ index a68832975b5d359f7eddaf2326bd47ff1e7e18df..ae565a4d3fdc2d02e2c7a27312d8296b int32_t world_id) = 0; virtual bool AllowScriptExtensions() = 0; diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc -index 5e5e43e204f006989a859a6077dcb56c81a08e60..aaf03855e53d5529bb51d70cd9b4355d68fed48c 100644 +index 1b187caed0e2a2e17c78a995d798e7239808d74d..48eb6eb0d45e53b86be00cf5cf2f150a15b7ec11 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( @@ -110,7 +110,7 @@ index 5e5e43e204f006989a859a6077dcb56c81a08e60..aaf03855e53d5529bb51d70cd9b4355d 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 b00211cf215fb820b3fe49139b8ef95be6a10d21..cc593168947e469b599794260692e1deb9b5f1a5 100644 +index f973eed373f2389d612a942c7105fc19c604201b..6e8ed6dbcba735235cda808a430f13a09aea256e 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 { @@ -123,10 +123,10 @@ index b00211cf215fb820b3fe49139b8ef95be6a10d21..cc593168947e469b599794260692e1de 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 bcdcc5f04edaf06d89375b05eb2d5f6bfa3d3237..5a0f42b4b7e5eb67d476c948caa201ee6fc7b3ca 100644 +index 86172d090065051f4d3a640fa6cb9f182f4972e6..24b317ef1f5df5999e6c2f4e456ba3ab81c5b3c6 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -425,6 +425,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -426,6 +426,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/add_electron_deps_to_license_credits_file.patch b/patches/chromium/add_electron_deps_to_license_credits_file.patch index 128e84ab37..dc2d989d0c 100644 --- a/patches/chromium/add_electron_deps_to_license_credits_file.patch +++ b/patches/chromium/add_electron_deps_to_license_credits_file.patch @@ -7,7 +7,7 @@ Ensure that licenses for the dependencies introduced by Electron are included in `LICENSES.chromium.html` diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py -index 4272e2ab96c64b1970e1cf035a3385893b1f2f0c..387fa19ca4ea8aace08bfef67d4b7c0870ad1d23 100755 +index 5cd3128beeac4072723d99d75cae7435a3511f97..19f535f2e7975cd45a535d7032e416435df790c6 100755 --- a/tools/licenses/licenses.py +++ b/tools/licenses/licenses.py @@ -354,6 +354,31 @@ SPECIAL_CASES = { 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 1ce221dab6..8479cdb9df 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 f5a6ffc61f6cdff3897a97003b74838aac27e2a1..9b10aeb457a010db0ab89211610ea97b1a364453 100644 +index 913c92c8b224dc749c25864311d401b51b41d9b9..5c9772ede144b35792c59c4173935813cad7d0dd 100644 --- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc +++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc @@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast { @@ -23,10 +23,10 @@ index f5a6ffc61f6cdff3897a97003b74838aac27e2a1..9b10aeb457a010db0ab89211610ea97b 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 6b881f610932eacd5412accd61431e6a59124e71..999022342a06592cc1bc7838b49afddaed1f9995 100644 +index d663fead3e1e2085a02ecbeb7a901c5d7311d55e..4f64c067c8598c3a3e36ee04467fc485039ed585 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -761,6 +761,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -753,6 +753,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -39,7 +39,7 @@ index 6b881f610932eacd5412accd61431e6a59124e71..999022342a06592cc1bc7838b49afdda return is_active(); } diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h -index 89fed16c112d55c13a9f23695e2898d630f7d815..b7f486337f46daac015644525c9870f54e03bb46 100644 +index 55277d9fd7b4e3d09805615eba262f4b8c8a8685..39d3a3e107799d656d12150577eb457ad658790a 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h @@ -134,6 +134,7 @@ class CONTENT_EXPORT RenderViewHostImpl @@ -51,7 +51,7 @@ index 89fed16c112d55c13a9f23695e2898d630f7d815..b7f486337f46daac015644525c9870f5 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 53ec5cd693539d74424c683f78e953e85c13c098..ccfe78580c2acb9a3afa43d246e1a83cc0e28598 100644 +index 74f987e8aa28a78dc5f67999e940b1ee5ce49da7..ff9ad46805b722fb9c93c901a56096e9c4bf8c99 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -655,8 +655,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) { @@ -116,10 +116,10 @@ index 932658273154ef2e022358e493a8e7c00c86e732..57bbfb5cde62c9496c351c861880a189 // 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 b5a7e1b177f031837f670c26bff7394315eb6ea5..ed63aa041733e2fb09d77a219c93c322985cc81e 100644 +index 3983af35519f465c07e63062270e7345d4be64a7..38119a4ce8d8c84657bb83d808ed5f10ae7ca252 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -2471,6 +2471,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( +@@ -2474,6 +2474,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal", "old_state", old_state, "new_state", new_state); @@ -130,7 +130,7 @@ index b5a7e1b177f031837f670c26bff7394315eb6ea5..ed63aa041733e2fb09d77a219c93c322 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 && -@@ -4170,10 +4174,23 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -4160,10 +4164,23 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -155,10 +155,10 @@ index b5a7e1b177f031837f670c26bff7394315eb6ea5..ed63aa041733e2fb09d77a219c93c322 // Do not throttle if the page should be painting. bool is_visible = diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h -index b2ad789e53146b06e0e416f2dcf384cf7e9c17ae..838c67ac5b02c427858febbfbddf25fb03632b37 100644 +index 2976ba4bf9aec6f719a4b491bad8f28fa5895d0d..877e2315a76e6f71eea6e67966e03f784830dbcc 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -446,6 +446,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -437,6 +437,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -166,7 +166,7 @@ index b2ad789e53146b06e0e416f2dcf384cf7e9c17ae..838c67ac5b02c427858febbfbddf25fb void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -957,6 +958,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -948,6 +949,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, // If true, we send IPC messages when |preferred_size_| changes. bool send_preferred_size_changes_ = false; diff --git a/patches/chromium/allow_electron_to_depend_on_components_os_crypt_sync.patch b/patches/chromium/allow_electron_to_depend_on_components_os_crypt_sync.patch index b6507a9aa3..91f5839883 100644 --- a/patches/chromium/allow_electron_to_depend_on_components_os_crypt_sync.patch +++ b/patches/chromium/allow_electron_to_depend_on_components_os_crypt_sync.patch @@ -10,7 +10,7 @@ so we can remove this patch once we migrate our code to use os_crypt async. diff --git a/components/os_crypt/sync/BUILD.gn b/components/os_crypt/sync/BUILD.gn -index 3b1c34e213b0990b8f0823228a1a02c5bf0c7198..ea48241edef8eaf7bfc8285d7cbbea567d3a7cbb 100644 +index e90e275b33bb88c6b1e8a7044ca6eb382460b467..6a2266a01a6283bf239001dbd21e638bf62e10d5 100644 --- a/components/os_crypt/sync/BUILD.gn +++ b/components/os_crypt/sync/BUILD.gn @@ -10,6 +10,7 @@ import("//components/os_crypt/sync/features.gni") @@ -19,5 +19,5 @@ index 3b1c34e213b0990b8f0823228a1a02c5bf0c7198..ea48241edef8eaf7bfc8285d7cbbea56 visibility = [ + "//electron:*", "//chrome/browser", + "//chrome/browser/net:impl", "//chrome/test:test_support", - "//components/os_crypt/async/browser:dpapi_key_provider", 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 be32478df2..66df1282c7 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 9ab1b47509c8b72b7844e83f1d69499d13e26837..8fe07713a01123cc21d2649f8a3e9347a49a2bb8 100644 +index 6f8c4ba8b32b5c9fb9bca783ef720e0102c827e6..430d6bab3fb20866af6bf5af8515c3900a0d7ede 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 -@@ -149,6 +149,19 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); out->stylus_handwriting_enabled = data.stylus_handwriting_enabled(); @@ -32,7 +32,7 @@ index 9ab1b47509c8b72b7844e83f1d69499d13e26837..8fe07713a01123cc21d2649f8a3e9347 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 efcb7d9457045c2d58ecec4b68d7c4547cb5d08a..e37fa2e8cb0896e61ef11259df13d97b8fbff548 100644 +index dbff6419e64087a39a906f6cb7df63e2d56c099f..2e03035a0533b39caaa1f50b7605b59b2ae325de 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h @@ -10,6 +10,7 @@ @@ -43,9 +43,9 @@ index efcb7d9457045c2d58ecec4b68d7c4547cb5d08a..e37fa2e8cb0896e61ef11259df13d97b #include "build/build_config.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -481,6 +482,19 @@ struct BLINK_COMMON_EXPORT WebPreferences { - bool should_screenshot_on_mainframe_same_doc_navigation = true; - #endif // BUILDFLAG(IS_ANDROID) +@@ -492,6 +493,19 @@ struct BLINK_COMMON_EXPORT WebPreferences { + // Consumed only in chrome/renderer/ (not by Blink). + bool is_indigo_onboarding = false; + // Begin Electron-specific WebPreferences. + bool context_isolation = false; @@ -64,7 +64,7 @@ index efcb7d9457045c2d58ecec4b68d7c4547cb5d08a..e37fa2e8cb0896e61ef11259df13d97b // 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 fade1dd1310d8339fff45b9ae74ebff4673eec37..ea3f8f3e30f76ebf71ed470f43e4f61995829932 100644 +index 2b8ad78d33a3cfc810e280db7a8f1b5aa1e1cc83..4f9793d751ba3d7796111a641411c74a797797d7 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h +++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h @@ -8,6 +8,7 @@ @@ -75,7 +75,7 @@ index fade1dd1310d8339fff45b9ae74ebff4673eec37..ea3f8f3e30f76ebf71ed470f43e4f619 #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -440,6 +441,52 @@ struct BLINK_COMMON_EXPORT StructTraitsGetSecondaryLabelForCommandId(GetCommandIdAt(index)); -+ return items_[ValidateItemIndex(index)].secondary_label; -+} -+ - std::u16string SimpleMenuModel::GetMinorTextAt(size_t index) const { - return items_[ValidateItemIndex(index)].minor_text; + return items_[ValidateItemIndex(index)].secondary_label; } + diff --git a/ui/menus/simple_menu_model.h b/ui/menus/simple_menu_model.h -index 78e2be4c0146c09eccb23edecc304119095c4761..17fe4df6737f0d7b59ef955c27854c3a08a18a59 100644 +index cd41d9ef6d306332dbe09f7821ea8e7bdd401ba4..77c616d267759f707e917e8efe61a239154f03f8 100644 --- a/ui/menus/simple_menu_model.h +++ b/ui/menus/simple_menu_model.h @@ -99,6 +99,7 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel { @@ -58,29 +42,3 @@ index 78e2be4c0146c09eccb23edecc304119095c4761..17fe4df6737f0d7b59ef955c27854c3a // Gets the icon for the item with the specified id. virtual ImageModel GetIconForCommandId(int command_id) const; -@@ -224,6 +225,9 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel { - // former is set). - void SetAcceleratorAt(size_t index, const ui::Accelerator& accelerator); - -+ // Sets the secondary_label for the item at |index|. -+ void SetSecondaryLabel(size_t index, const std::u16string& secondary_label); -+ - // Sets the minor text for the item at |index|. - void SetMinorText(size_t index, const std::u16string& minor_text); - -@@ -279,6 +283,7 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel { - ui::MenuSeparatorType GetSeparatorTypeAt(size_t index) const override; - int GetCommandIdAt(size_t index) const override; - std::u16string GetLabelAt(size_t index) const override; -+ std::u16string GetSecondaryLabelAt(size_t index) const override; - std::u16string GetMinorTextAt(size_t index) const override; - bool GetMinorTextIsUrlAt(size_t index) const override; - -@@ -329,6 +334,7 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel { - ItemType type = TYPE_COMMAND; - std::u16string label; - ui::Accelerator accelerator; -+ std::u16string secondary_label; - std::u16string minor_text; - bool minor_text_is_url = false; - ImageModel minor_icon; diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 87c2c5be89..526455eae7 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -49,10 +49,10 @@ index 9827a89c56141596fde57b78f9c9894f273db83e..cedb4bd8217a0ad3ab07d85421e1850b // its owning reference back to our owning LocalFrame. client_->Detached(type); diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 4c38cd881b5a81b7939f61688f05949be799f008..8970537416e171d513bc9c015706fb18a574eab6 100644 +index b1bf68e596e7a5e391044951f30e2eceb581ec44..da1877213a345c012bb1fb2d30e6e659cac6e549 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -758,10 +758,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -756,10 +756,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index 4c38cd881b5a81b7939f61688f05949be799f008..8970537416e171d513bc9c015706fb18 if (!Client()) return false; -@@ -817,6 +813,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -814,6 +810,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/boringssl_build_gn.patch b/patches/chromium/boringssl_build_gn.patch index bccf90eb56..bddb8f8291 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 708bb2066269b57ff54649638938a1719d657b6a..7485078ed7a4cfdc8bfecf2d3a4a009e10ca4893 100644 +index 30aa77bdf5d5f9a30404290cd94eee88275e3c96..25be8463ba34227e269ce40d38cd0105b8aef5b3 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_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index c055ad77dd..35873e0182 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us to introduce a new Electron category for Electron-specific tracing. diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index 440349df6c5767fe3f93b51f78b33bf9d3bb5c1a..85c6f973788938b6a48a7a89e9fa803dc1030580 100644 +index 8bc03cb77ebdfe991e0ebe05aa187dfdea8c2764..976221d0303036ecae500b7861931ff96e9ea0c1 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -133,6 +133,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS( diff --git a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch index c7929b3366..ab40312500 100644 --- a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch +++ b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch @@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this patch. diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index 0af4d4b75d0519fabcb5d48bd9d5bd465bc80e92..eb6b23655afaa268f25d99301a0853aaecd23652 100644 +index 04e423aed6a182448e06d3366c8157cddada4bee..2b6e3bbefd1034882d1c2a6671a64576874c415c 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -201,6 +201,12 @@ if (!is_android && !is_mac) { @@ -28,10 +28,10 @@ index 0af4d4b75d0519fabcb5d48bd9d5bd465bc80e92..eb6b23655afaa268f25d99301a0853aa ":chrome_dll", ":chrome_exe_version", diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index e91f97276866bd500720962c74acaca2c22fff7c..22867153821d2b1e83feb1a2a7a6b8c26ba776eb 100644 +index 73dbb0a403b2cc825cbe4f7d7c98e37d656937be..2e5f0827511e69b5d3ed0b150410be94195f1b7f 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -7737,6 +7737,10 @@ test("unit_tests") { +@@ -7706,6 +7706,10 @@ test("unit_tests") { "//chrome/notification_helper", ] @@ -42,7 +42,7 @@ index e91f97276866bd500720962c74acaca2c22fff7c..22867153821d2b1e83feb1a2a7a6b8c2 deps += [ "//chrome:other_version", "//chrome//services/util_win:unit_tests", -@@ -8711,6 +8715,10 @@ test("unit_tests") { +@@ -8657,6 +8661,10 @@ test("unit_tests") { "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc", ] @@ -53,7 +53,7 @@ index e91f97276866bd500720962c74acaca2c22fff7c..22867153821d2b1e83feb1a2a7a6b8c2 sources += [ # The importer code is not used on Android. "../common/importer/firefox_importer_utils_unittest.cc", -@@ -8767,7 +8775,7 @@ test("unit_tests") { +@@ -8713,7 +8721,7 @@ test("unit_tests") { # TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above? deps += [ "../browser/screen_ai:screen_ai_install_state", diff --git a/patches/chromium/build_gn.patch b/patches/chromium/build_gn.patch index 2e2b5041ab..939533dcb2 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 cc00f84630e063fee2b1897eced42c6a53a3a79e..5d4a82783dbe86636bbef47f2fb26ff9147ea57b 100644 +index e403e0cab5704998f2883a2381f6511782b7cbcc..b0807ca5aa3d8e03015a24fa0e0a89513644db4f 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 f83346d547..2bfb92047a 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 49bd8af6f4e5762c6059c2f8d2663683f350e386..f386b473b73ba83b383adbb90acb98709f5a3bf1 100644 +index 8c6182787553b21868fdb7559df8cf8f511d5761..ded7d82fe6f83a4ebbf4a1c2f78dbaf711b5ec1f 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn -@@ -480,6 +480,7 @@ target(libcxx_target_type, "libc++") { +@@ -475,6 +475,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 9dc90564ad..0b8803427e 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -9,10 +9,10 @@ potentially prevent a window from being created. TODO(loc): this patch is currently broken. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index ac474e220d411dec278c40448f038b25e6788d2a..e4ff8f11bed9e53f3134068492ac94b4c9bb4df2 100644 +index 3ae1b7bdc9204642c63c781f479c9f29e4b9f7bb..e2034a05bd6eea7620b3ec827b17e5a5efe4c530 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -10228,6 +10228,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -10273,6 +10273,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -21,10 +21,10 @@ index ac474e220d411dec278c40448f038b25e6788d2a..e4ff8f11bed9e53f3134068492ac94b4 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 3e0c8bd308d8a947a2bd295a2d83e385e53853fb..4e91b3aeb5630476c660e8814e2fd9d92c5a9ca1 100644 +index 5f4652bfe7c5a42347bbb234b877d93835bc23a1..f4c7cd7d7e84c81af0f112afe3cebd24ef0ddf31 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5501,6 +5501,10 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5473,6 +5473,10 @@ FrameTree* WebContentsImpl::CreateNewWindow( create_params.initially_hidden = renderer_started_hidden; create_params.initial_popup_url = params.target_url; @@ -35,7 +35,7 @@ index 3e0c8bd308d8a947a2bd295a2d83e385e53853fb..4e91b3aeb5630476c660e8814e2fd9d9 // 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, -@@ -5555,6 +5559,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5527,6 +5531,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( // Sets the newly created WebContents WindowOpenDisposition. new_contents_impl->original_window_open_disposition_ = params.disposition; @@ -48,7 +48,7 @@ index 3e0c8bd308d8a947a2bd295a2d83e385e53853fb..4e91b3aeb5630476c660e8814e2fd9d9 // 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 -@@ -5596,12 +5606,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5568,12 +5578,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -62,7 +62,7 @@ index 3e0c8bd308d8a947a2bd295a2d83e385e53853fb..4e91b3aeb5630476c660e8814e2fd9d9 new_contents_impl, opener, params.target_url, params.referrer.To(), params.disposition, diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index 444fa7009d0db33470cac9ab9cfdc23ceacec942..ab9aeb852e5ea89583284386d9a78a3e3e17a310 100644 +index a2566982ff81db5166e41243232e23af94dc3c05..ff5c410e78fb171963122f8a24802b7bf89a2b67 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom @@ -617,6 +617,10 @@ struct CreateNewWindowParams { @@ -77,10 +77,10 @@ index 444fa7009d0db33470cac9ab9cfdc23ceacec942..ab9aeb852e5ea89583284386d9a78a3e // Operation result when the renderer asks the browser to create a new window. diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index e806de04ca92cb8351e9a242a5241c0d4286da97..d0b3e4bc348921df7e6446dbc1f14860b8a84d87 100644 +index ff778a5f8b3373014df8b82e04067eabcb6b4fc0..b04076fa0d0f0673b56f45c650310a13cfd80a31 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -854,6 +854,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -853,6 +853,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -90,10 +90,10 @@ index e806de04ca92cb8351e9a242a5241c0d4286da97..d0b3e4bc348921df7e6446dbc1f14860 bool opener_suppressed, bool* no_javascript_access) { diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 70588ccd619ac7969918771bccf5c054320e4f6f..eb684232648424fab4ba73b1fc813b0b3f8b809b 100644 +index c4bcd75a4481d983e2132eaf7e7c1f704c568aa3..b199cb3d3297c7dc22c066f0d876fa67d8b8f31f 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -205,6 +205,7 @@ class NetworkService; +@@ -204,6 +204,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -101,7 +101,7 @@ index 70588ccd619ac7969918771bccf5c054320e4f6f..eb684232648424fab4ba73b1fc813b0b } // namespace network namespace sandbox { -@@ -1406,6 +1407,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1402,6 +1403,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -133,7 +133,7 @@ index 0c0672e0a2d05d5dff31ae171f1a3af1d20b3019..51be0b86d083318f01a9ebe76fb7d1fb WebContents* source, const OpenURLParams& params, diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 0650197909d484b8a0f48ab61b22471c71bce0e8..29c380d7845aab1a7b3417e0d3940ea00460260b 100644 +index b620b9f03f065cdb8e99b58aa865f5efb2352f17..877700b127fa6d5d7962fb4629ef1d30b015c2cf 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -18,6 +18,7 @@ @@ -144,7 +144,7 @@ index 0650197909d484b8a0f48ab61b22471c71bce0e8..29c380d7845aab1a7b3417e0d3940ea0 #include "content/public/browser/eye_dropper.h" #include "content/public/browser/fullscreen_types.h" #include "content/public/browser/invalidate_type.h" -@@ -29,6 +30,7 @@ +@@ -28,6 +29,7 @@ #include "content/public/browser/select_audio_output_request.h" #include "content/public/browser/serial_chooser.h" #include "content/public/browser/storage_partition_config.h" @@ -152,7 +152,7 @@ index 0650197909d484b8a0f48ab61b22471c71bce0e8..29c380d7845aab1a7b3417e0d3940ea0 #include "content/public/common/window_container_type.mojom-forward.h" #include "third_party/blink/public/common/input/web_mouse_event.h" #include "third_party/blink/public/common/page/drag_operation.h" -@@ -402,6 +404,16 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -401,6 +403,16 @@ class CONTENT_EXPORT WebContentsDelegate { const StoragePartitionConfig& partition_config, SessionStorageNamespace* session_storage_namespace); @@ -170,15 +170,15 @@ index 0650197909d484b8a0f48ab61b22471c71bce0e8..29c380d7845aab1a7b3417e0d3940ea0 // 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 5936c5eaa081abde7f7c26cc990a122622e46908..ab959e66f8841d7367863bb13d6c7a0854d0df23 100644 +index 1a65c454dd203f414520166f14d912e094498e2f..c4b96acb38679d5c860b312f3e3130377dff6e40 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -6845,6 +6845,10 @@ WebView* RenderFrameImpl::CreateNewWindow( +@@ -6851,6 +6851,10 @@ WebView* RenderFrameImpl::CreateNewWindow( params->started_by_ad = GetWebFrame()->IsAdFrame() || GetWebFrame()->IsAdScriptInStack(); + params->raw_features = features.raw_features.Utf8( -+ WebString::UTF8ConversionMode::kStrictReplacingErrorsWithFFFD); ++ WebString::Utf8ConversionMode::kStrictReplacingErrors); + params->body = GetRequestBodyForWebURLRequest(request); + // We preserve this information before sending the message since |params| is @@ -224,10 +224,10 @@ index d92bab531c12c62a5321a23f4a0cb89691668127..2060e04795ba8e7a923fd0fe3485b8c5 } // namespace blink diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc -index 51f03729c2d40a225dbcfc42091d44f78f77d971..780ee21199701b01a97932cd4a59aeb5db98017b 100644 +index 924dbc4d1f6a6e8a1da923ad281bf07c872e1a61..1571634e75fdc324b728648aeaac2383bbb06265 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2342,6 +2342,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2327,6 +2327,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, entered_window); 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 4f05a9fbc6..1b6c6d2abf 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 d64fef6bfc37264dcdc1bbea22eb5c4e099553dd..41d40326505c4ced9837df7f03b791c9435124bf 100644 +index cde924d79c67e9312f393c54c45bd6fc92509d0f..72c4d2f042afd428f2bf945bf54de873f256ca21 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -382,6 +382,7 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -381,6 +381,7 @@ class CONTENT_EXPORT ContentRendererClient { // WillDestroyServiceWorkerContextOnWorkerThread() is called. virtual void WillEvaluateServiceWorkerOnWorkerThread( blink::WebServiceWorkerContextProxy* context_proxy, @@ -34,10 +34,10 @@ index 1d03dc809d4c18f24314d94811e0bf527aa7b5b4..16030bcecb2e39b8870144ce7c3d11dd virtual void DidClearWindowObject() {} virtual void DidChangeScrollOffset() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 5279ba15f45bd7634b5f24553ad64c0069318cc0..2840f22e2b8b4aae09a06774a70f2ec7340536d9 100644 +index 0107e6c35bbb077a0ce0a36489db4b3f207b7278..d24916aaeb18e08e06ec4fc92aa0d81e6fa56659 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4739,10 +4739,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures( +@@ -4738,10 +4738,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures( observer.DidInstallConditionalFeatures(context, world_id); } @@ -52,10 +52,10 @@ index 5279ba15f45bd7634b5f24553ad64c0069318cc0..2840f22e2b8b4aae09a06774a70f2ec7 void RenderFrameImpl::DidChangeScrollOffset() { diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 2ce05bce0a02338aba018c18f0a808a4eb392ff4..2736b65de7f0a6e4cd2d56970d35687da8fcab6b 100644 +index 4fa41ab51e326b10c661353cd6b209c25270d6d2..25c4148acc0486c2c7d829f3bf720c78dcf182f7 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -609,7 +609,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -608,7 +608,8 @@ class CONTENT_EXPORT RenderFrameImpl int world_id) override; void DidInstallConditionalFeatures(v8::Local context, int world_id) override; @@ -103,7 +103,7 @@ index 8482d7fab12634e6b9a8d5f9bab6c7e428bb99ee..4f131fbfc9350352bce4430f92b9f2cf void WillInitializeWorkerContext() override; void WillDestroyWorkerContext(v8::Local context) override; diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc -index fd3960fce4c61c5c530c817bd12e1ba1698b8db6..48a159d7d5ea57b4533fdaf38fe79a74c490207a 100644 +index aa301fd0551de27ff23be8cdaa0f4ffadca21b61..8da3d8996c3044810a9fcd49a991553728cba151 100644 --- a/extensions/renderer/dispatcher.cc +++ b/extensions/renderer/dispatcher.cc @@ -530,6 +530,7 @@ void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( @@ -127,7 +127,7 @@ index c2a6eb257469647183167dad78f1ea42fa3922bb..3423e3a8315c5fc5958ec75adf3a844f int64_t service_worker_version_id, const GURL& service_worker_scope, diff --git a/extensions/renderer/extension_frame_helper.cc b/extensions/renderer/extension_frame_helper.cc -index 1ab0e8afc84b8e14f3a7f241f8d24ceac0abf188..2d1dbc6f57a0c6ba91194dde5da4de9d0bd5d383 100644 +index 5273756a5fca9337b2bffa61e09b988fe7ba3f1b..1e26053159afd86852b10ee11ac76ac5e858fc54 100644 --- a/extensions/renderer/extension_frame_helper.cc +++ b/extensions/renderer/extension_frame_helper.cc @@ -449,6 +449,7 @@ void ExtensionFrameHelper::DidCreateScriptContext( @@ -167,10 +167,10 @@ index f96781a047056876b030581b539be0507acc3a1c..cd9be80be2500a001b1895c81ee597dd // 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 27b21f02d2dbfd60cb64f09be393b0e50928756f..c8da817ffab883573ae2dcfb6fb02d2baf8bcdaf 100644 +index 9fd34fac309228c7700372f792d375debf36d097..25267a02bbf7c751c55f773c671343622dec27df 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -679,7 +679,8 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -678,7 +678,8 @@ class BLINK_EXPORT WebLocalFrameClient { int32_t world_id) {} // WebKit is about to release its reference to a v8 context for a frame. @@ -200,10 +200,10 @@ index 0787bc8a602c60e5b42933813baa6b9d923c9823..c4adcc6083e09e56416587fbcde10c90 ->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 ae565a4d3fdc2d02e2c7a27312d8296bbdf61e0b..f54cc6c10a957a2218258f72de2b92a2ba96f9ea 100644 +index bc8850ea6d8b18d7cbf33bdfda66530cf6a5d1b2..13a406e3e7eaa557f833d621a225f0348f9e2e5d 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -312,7 +312,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -313,7 +313,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 ae565a4d3fdc2d02e2c7a27312d8296bbdf61e0b..f54cc6c10a957a2218258f72de2b92a2 virtual bool AllowScriptExtensions() = 0; diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc -index aaf03855e53d5529bb51d70cd9b4355d68fed48c..a889202f30bc4a3b6bc7dc3fc7b4fc5058684bcb 100644 +index 48eb6eb0d45e53b86be00cf5cf2f150a15b7ec11..8a0d1ef7ad22e85d964ef49df5a10ea0be7d4f91 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,7 +231,7 @@ index aaf03855e53d5529bb51d70cd9b4355d68fed48c..a889202f30bc4a3b6bc7dc3fc7b4fc50 } 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 cc593168947e469b599794260692e1deb9b5f1a5..6b360ad1c123f5e6fef9b127ae55968456172776 100644 +index 6e8ed6dbcba735235cda808a430f13a09aea256e..8615853dad8e0b19847000c087d7f4fc506e4396 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 { @@ -245,10 +245,10 @@ index cc593168947e469b599794260692e1deb9b5f1a5..6b360ad1c123f5e6fef9b127ae559684 // Returns true if we should allow register V8 extensions to be added. diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h -index 5a0f42b4b7e5eb67d476c948caa201ee6fc7b3ca..1a0562ad9ccfd414d6295b597b9d8094df384ff5 100644 +index 24b317ef1f5df5999e6c2f4e456ba3ab81c5b3c6..229dd5ae1fb264f3a8819030fd9ce2450053cf05 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -427,7 +427,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -428,7 +428,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_grandfather_in_electron_views_and_delegates.patch b/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch index c3704f99e4..667081d995 100644 --- a/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch +++ b/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch @@ -10,11 +10,11 @@ Subject: chore: "grandfather in" Electron Views and Delegates 6448510: Lock further access to View::set_owned_by_client(). | https://chromium-review.googlesource.com/c/chromium/src/+/6448510 diff --git a/ui/views/view.h b/ui/views/view.h -index ea27a73076554aa286c67a506fe5e0f60986d733..ec39e28eaa08e22ad87adce8f4def74d34505a7d 100644 +index bb8a2fd34d73891252505d4fd195240ddbafe122..6847aa64bb72b5af7cea39e567bd8ffd8b545f2d 100644 --- a/ui/views/view.h +++ b/ui/views/view.h -@@ -77,6 +77,19 @@ class ArcNotificationContentView; - class WideFrameView; +@@ -75,6 +75,19 @@ namespace ash { + class ArcNotificationContentView; } // namespace ash +namespace electron { @@ -33,7 +33,7 @@ index ea27a73076554aa286c67a506fe5e0f60986d733..ec39e28eaa08e22ad87adce8f4def74d namespace exo { class ShellSurfaceBase; } -@@ -308,6 +321,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, +@@ -306,6 +319,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, public: class OwnedByClientPassKey { private: diff --git a/patches/chromium/chore_partial_revert_of.patch b/patches/chromium/chore_partial_revert_of.patch index 107c8c7868..9bf9647d98 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 aaa2b2229dac8c5e8cf590300b436082f6c3773b..e12758010f5c243d2fb9c733b74bcb0eea89f5da 100644 +index f8dde06464e3be786306a8e3c2606259a6d5edb4..9e9ec7366ecf4aad7ddce0c234cddd36cd07c12f 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5472,7 +5472,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5444,7 +5444,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_partition_attribute_dcheck_for_webviews.patch b/patches/chromium/chore_patch_out_partition_attribute_dcheck_for_webviews.patch index 384c94eecd..c66e0a4e01 100644 --- a/patches/chromium/chore_patch_out_partition_attribute_dcheck_for_webviews.patch +++ b/patches/chromium/chore_patch_out_partition_attribute_dcheck_for_webviews.patch @@ -14,7 +14,7 @@ This change patches it out to prevent the DCHECK. It can be removed once/if we see a better solution to the problem. diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc -index 9392365ed456aaa94806cef60a935df1c77617d2..31b7a42424fb0935df44747169b4a2d9336170a2 100644 +index 0eaabdc1cefb0b7f35fc007c6b2f0342fbf965f1..9a7022f4e2d0f4ede6c703cf7c484ac1482f4a08 100644 --- a/content/browser/site_instance_impl.cc +++ b/content/browser/site_instance_impl.cc @@ -224,7 +224,7 @@ scoped_refptr SiteInstanceImpl::CreateForGuest( diff --git a/patches/chromium/chore_patch_out_profile_methods.patch b/patches/chromium/chore_patch_out_profile_methods.patch index 26768cafce..95df57f7e5 100644 --- a/patches/chromium/chore_patch_out_profile_methods.patch +++ b/patches/chromium/chore_patch_out_profile_methods.patch @@ -7,7 +7,7 @@ Electron does not support Profiles, so we need to patch it out of any code that we use. diff --git a/chrome/browser/pdf/chrome_pdf_stream_delegate.cc b/chrome/browser/pdf/chrome_pdf_stream_delegate.cc -index 9ee981bbb9b7bd10a33e619b5ac7ff35373bbc53..f31e633db609fb211f3db25e563f357166ca510e 100644 +index 4386b371b128803efe96058360b18b8d0288200b..cada87f1676dd7d7671df486dc609b875f0e53b4 100644 --- a/chrome/browser/pdf/chrome_pdf_stream_delegate.cc +++ b/chrome/browser/pdf/chrome_pdf_stream_delegate.cc @@ -46,6 +46,7 @@ namespace { @@ -43,10 +43,10 @@ index 9ee981bbb9b7bd10a33e619b5ac7ff35373bbc53..f31e633db609fb211f3db25e563f3571 // 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 41ebdb0c0af1ab94d3376a51e66c44cd26b6ed3f..274d3432576c36262885ec8fdf6c8f75c919dbe9 100644 +index 1e64b0b97f01a8ef720e6dae1124eae74b63eb34..73a343fd794d2bfa784c372098624f2b0d3eca8d 100644 --- a/chrome/browser/pdf/pdf_extension_util.cc +++ b/chrome/browser/pdf/pdf_extension_util.cc -@@ -257,10 +257,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) { +@@ -258,10 +258,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) { #if BUILDFLAG(ENABLE_PDF_INK2) bool IsPdfAnnotationsEnabledByPolicy(content::BrowserContext* context) { @@ -60,15 +60,15 @@ index 41ebdb0c0af1ab94d3376a51e66c44cd26b6ed3f..274d3432576c36262885ec8fdf6c8f75 } bool IsPdfInk2AnnotationsEnabled(content::BrowserContext* context) { -@@ -453,6 +456,7 @@ void DispatchShouldUpdateViewportEvent(content::RenderFrameHost* embedder_host, - } - - bool ShouldShowGlicSummarizeButton(content::BrowserContext* context) { -+#if 0 - Profile* profile = Profile::FromBrowserContext(context); - if (!glic::GlicEnabling::IsEnabledForProfile(profile)) { +@@ -460,6 +463,7 @@ bool ShouldShowGlicSummarizeButton(content::WebContents* web_contents) { return false; -@@ -469,7 +473,7 @@ bool ShouldShowGlicSummarizeButton(content::BrowserContext* context) { + } + ++#if 0 + Profile* profile = + Profile::FromBrowserContext(web_contents->GetBrowserContext()); + if (!glic::GlicEnabling::IsEnabledForProfile(profile)) { +@@ -482,7 +486,7 @@ bool ShouldShowGlicSummarizeButton(content::WebContents* web_contents) { if (glic::GlicEnabling::IsTrustFirstOnboardingEnabledForProfile(profile)) { return true; } diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 36e5dee236..afd9fef1d2 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -6,11 +6,84 @@ Subject: chore: provide IsWebContentsCreationOverridden with full params Pending upstream patch, this gives us fuller access to the window.open params so that we will be able to decide whether to cancel it or not. +diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc +index 047f1258f951f763df2ca0ba355b19d19337826b..9fc7114312212fbe38ddec740b4aebbcd72cb0f8 100644 +--- a/chrome/browser/media/offscreen_tab.cc ++++ b/chrome/browser/media/offscreen_tab.cc +@@ -285,8 +285,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden( + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) { ++ const content::mojom::CreateNewWindowParams& params) { + // Disallow creating separate WebContentses. The WebContents implementation + // uses this to spawn new windows/tabs, which is also not allowed for + // offscreen tabs. +diff --git a/chrome/browser/media/offscreen_tab.h b/chrome/browser/media/offscreen_tab.h +index 231e3595f218aeebe28d0b13ce6182e7a4d6f4e1..609bd205d1cd0404cab3471765bef8b0e053d061 100644 +--- a/chrome/browser/media/offscreen_tab.h ++++ b/chrome/browser/media/offscreen_tab.h +@@ -108,8 +108,7 @@ class OffscreenTab final : public ProfileObserver, + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) final; ++ const content::mojom::CreateNewWindowParams& params) override; + void EnterFullscreenModeForTab( + content::RenderFrameHost* requesting_frame, + const blink::mojom::FullscreenOptions& options) final; +diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc +index 33edb0a90d886dd44956046e03fcc182a0f6bc8e..5b5edd3da3d9f7a248ea3affd195c36bfd64a38e 100644 +--- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc ++++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc +@@ -80,8 +80,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate, + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) override { ++ const content::mojom::CreateNewWindowParams& params) override { + return true; + } + +diff --git a/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc b/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc +index e4e42249c476ccae58f0ba42e7dbae299f1e36bd..670c30ed4b7f1a07eb4b8abaa95e5a8a9d94bd8d 100644 +--- a/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc ++++ b/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc +@@ -121,10 +121,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden( + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) { ++ const content::mojom::CreateNewWindowParams& params) { + if (params_.suppress_navigation) { +- NotifyDidSuppressNavigation(target_url, ++ NotifyDidSuppressNavigation(params.target_url, + WindowOpenDisposition::NEW_FOREGROUND_TAB, + /*from_user_gesture=*/true); + return true; +diff --git a/chrome/browser/ui/ash/web_view/ash_web_view_impl.h b/chrome/browser/ui/ash/web_view/ash_web_view_impl.h +index 39fa45f0a0f9076bd7ac0be6f455dd540a276512..3d0381d463eed73470b28085830f2a23751659a7 100644 +--- a/chrome/browser/ui/ash/web_view/ash_web_view_impl.h ++++ b/chrome/browser/ui/ash/web_view/ash_web_view_impl.h +@@ -60,8 +60,7 @@ class AshWebViewImpl : public ash::AshWebView, + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) override; ++ const content::mojom::CreateNewWindowParams& params) override; + content::WebContents* OpenURLFromTab( + content::WebContents* source, + const content::OpenURLParams& params, diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 8f8852b2af1acfa4ec985fd1c8b50563b991b12a..c2f2903545b191c5ab13462bf330efce37d7d08c 100644 +index a54b836a3d979d868e80e1ec3bbfba26c75e775d..6b6f080917774059688a2b8ab1e76b91b0db1059 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -2310,7 +2310,8 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -2325,7 +2325,8 @@ bool Browser::IsWebContentsCreationOverridden( content::mojom::WindowContainerType window_container_type, const GURL& opener_url, const std::string& frame_name, @@ -20,7 +93,7 @@ index 8f8852b2af1acfa4ec985fd1c8b50563b991b12a..c2f2903545b191c5ab13462bf330efce if (HasActorTaskPreventingNewWebContents(profile(), opener)) { // If an ExecutionEngine is acting on the opener, prevent it from creating a // new WebContents. We'll instead force the navigation to happen in the same -@@ -2323,7 +2324,7 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -2338,7 +2339,7 @@ bool Browser::IsWebContentsCreationOverridden( return (window_container_type == content::mojom::WindowContainerType::BACKGROUND && ShouldCreateBackgroundContents(source_site_instance, opener_url, @@ -30,10 +103,10 @@ index 8f8852b2af1acfa4ec985fd1c8b50563b991b12a..c2f2903545b191c5ab13462bf330efce WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index acdb28d61badaf549c47e107f4795e1e2adc37c9..b6aca0bf802f2146d09d2a872ff9e091e659f95f 100644 +index 7774f47ddf65827b3e4e4f904218c2ba1336baa3..4e1cc004d67be76de449fc2475d86167d2fb56e1 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -915,8 +915,7 @@ class Browser : public TabStripModelObserver, +@@ -905,8 +905,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -43,11 +116,117 @@ index acdb28d61badaf549c47e107f4795e1e2adc37c9..b6aca0bf802f2146d09d2a872ff9e091 content::WebContents* CreateCustomWebContents( content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, +diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc +index a05510eadf5c9ff24bb7999aa76229946319280f..a80ecc46f8a6b84de83d608257d45ae61ccc2170 100644 +--- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc ++++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc +@@ -206,8 +206,7 @@ bool PresentationReceiverWindowController::IsWebContentsCreationOverridden( + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) { ++ const content::mojom::CreateNewWindowParams& params) { + // Disallow creating separate WebContentses. The WebContents implementation + // uses this to spawn new windows/tabs, which is also not allowed for + // local presentations. +diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h +index 3fc06be01f20e8cd314d95d73a3f58c2f0742fe9..c07910ae59a185442f37ea6e7b96fdf3a33aba82 100644 +--- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h ++++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h +@@ -106,8 +106,7 @@ class PresentationReceiverWindowController final + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) override; ++ const content::mojom::CreateNewWindowParams& params) override; + + // The profile used for the presentation. + raw_ptr otr_profile_; +diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc +index bb71e8cb4d09cd53c0377ed34f8a94f979ee5804..9650bd7c7f587d0f57b3c4fc1f131f7d43c98e10 100644 +--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc ++++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc +@@ -117,8 +117,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView { + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) override { ++ const content::mojom::CreateNewWindowParams& params) override { + return true; + } + content::WebContents* CreateCustomWebContents( +diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc +index a82c39208a2709d9e292dac5c89bd2c9bf529a98..d578299501e15815ac615528610889d270aaf6ad 100644 +--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc ++++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc +@@ -214,15 +214,14 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden( + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) { ++ const content::mojom::CreateNewWindowParams& params) { + JNIEnv* env = AttachCurrentThread(); + ScopedJavaLocalRef obj = GetJavaDelegate(env); + if (obj.is_null()) { + return false; + } + ScopedJavaLocalRef java_gurl = +- url::GURLAndroid::FromNativeGURL(env, target_url); ++ url::GURLAndroid::FromNativeGURL(env, params.target_url.spec()); + return !Java_WebContentsDelegateAndroid_shouldCreateWebContents(env, obj, + java_gurl); + } +diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h +index 5754a774852d53a99d34568d0b98aa19171add2a..a75d85c97a75fffa5dba6ac427d7608e345c02ef 100644 +--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h ++++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h +@@ -82,8 +82,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate { + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) override; ++ const content::mojom::CreateNewWindowParams& params) override; + void CloseContents(content::WebContents* source) override; + bool DidAddMessageToConsole(content::WebContents* source, + blink::mojom::ConsoleMessageLevel log_level, +diff --git a/components/offline_pages/content/background_loader/background_loader_contents.cc b/components/offline_pages/content/background_loader/background_loader_contents.cc +index 12b38ddee62e3af915083830703a4c2e8e249f00..bf4e8dcbdecd46712c48107cfee554b7bb1e0277 100644 +--- a/components/offline_pages/content/background_loader/background_loader_contents.cc ++++ b/components/offline_pages/content/background_loader/background_loader_contents.cc +@@ -85,8 +85,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden( + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) { ++ const content::mojom::CreateNewWindowParams& params) { + // Background pages should not create other webcontents/tabs. + return true; + } +diff --git a/components/offline_pages/content/background_loader/background_loader_contents.h b/components/offline_pages/content/background_loader/background_loader_contents.h +index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c58df53573 100644 +--- a/components/offline_pages/content/background_loader/background_loader_contents.h ++++ b/components/offline_pages/content/background_loader/background_loader_contents.h +@@ -66,8 +66,7 @@ class BackgroundLoaderContents : public content::WebContentsDelegate { + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) override; ++ const content::mojom::CreateNewWindowParams& params) override; + + content::WebContents* AddNewContents( + content::WebContents* source, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index d43e75c20aca09080f4223d339c88381f030c504..8cd59445bae73ff0193e4512d7c36740cbad847f 100644 +index 9b9a48d951bdd58abd7f6d10e621ef4ba7c2dfff..c849896dade807c8bc63150f6ed7f0b19e7f2909 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5436,8 +5436,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5408,8 +5408,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( opener, source_site_instance, params.window_container_type, @@ -72,10 +251,10 @@ index 51be0b86d083318f01a9ebe76fb7d1fb60cd72fd..02ec57eeb67dd5e5e0ff250853599c88 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 29c380d7845aab1a7b3417e0d3940ea00460260b..234d6d89d1c8c7f333b96f35dacb73daeecf7b17 100644 +index 877700b127fa6d5d7962fb4629ef1d30b015c2cf..f2eee309975a0aa82b89cd52344288a1d8764e98 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h -@@ -380,8 +380,7 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -379,8 +379,7 @@ class CONTENT_EXPORT WebContentsDelegate { SiteInstance* source_site_instance, mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -177,6 +356,48 @@ index f459dddeb3f8f3a33ffead0e96fba791d18a0108..f7a229b186774ca3a01f2d747eab139a content::WebContents* CreateCustomWebContents( content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, +diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc +index 9c1fb0b2ed4f013ef6108a9844b22f6bfe697621..ef4991adc766d53b03d280395630b83ced38c2e8 100644 +--- a/fuchsia_web/webengine/browser/frame_impl.cc ++++ b/fuchsia_web/webengine/browser/frame_impl.cc +@@ -585,8 +585,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) { ++ const content::mojom::CreateNewWindowParams& params) { + // Specify a generous upper bound for unacknowledged popup windows, so that we + // can catch bad client behavior while not interfering with normal operation. + constexpr size_t kMaxPendingWebContentsCount = 10; +diff --git a/fuchsia_web/webengine/browser/frame_impl.h b/fuchsia_web/webengine/browser/frame_impl.h +index 756d4192271d6a65cfe8e1511737c565b543cb1f..5688f6f745056565c3c01947f741c4d13e27b6ae 100644 +--- a/fuchsia_web/webengine/browser/frame_impl.h ++++ b/fuchsia_web/webengine/browser/frame_impl.h +@@ -308,8 +308,7 @@ class WEB_ENGINE_EXPORT FrameImpl : public fuchsia::web::Frame, + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) override; ++ const content::mojom::CreateNewWindowParams& params) override; + void WebContentsCreated(content::WebContents* source_contents, + int opener_render_process_id, + int opener_render_frame_id, +diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc +index ae616fa9c352413e23fb509b3e12e0e4fab5a094..0efa65f7d4346cfe78d2f27ba55a0526202315ff 100644 +--- a/headless/lib/browser/headless_web_contents_impl.cc ++++ b/headless/lib/browser/headless_web_contents_impl.cc +@@ -232,8 +232,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) override { ++ const content::mojom::CreateNewWindowParams& params) override { + return headless_web_contents_->browser_context() + ->options() + ->block_new_web_contents(); diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc index a7d370220136f2c31afd70644ada26f1768b2e0d..e08dd61b20c68398b0532f5ae74e0ffd5968c19b 100644 --- a/ui/views/controls/webview/web_dialog_view.cc diff --git a/patches/chromium/chore_register_node_as_a_dynamic_trace_category_prefix.patch b/patches/chromium/chore_register_node_as_a_dynamic_trace_category_prefix.patch index b2ef009139..eb5d1e8da6 100644 --- a/patches/chromium/chore_register_node_as_a_dynamic_trace_category_prefix.patch +++ b/patches/chromium/chore_register_node_as_a_dynamic_trace_category_prefix.patch @@ -14,7 +14,7 @@ target. Given neither the static nor the dynamic registration can be upstreamed, the minimal of the two changes is chosen here. diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index 85c6f973788938b6a48a7a89e9fa803dc1030580..ae25a8188d57ff4c15e9a20e91629d585314db87 100644 +index 976221d0303036ecae500b7861931ff96e9ea0c1..5b5582aab913fc7106d9a4133c9fa03fd1a3d5f7 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -14,6 +14,7 @@ PERFETTO_DEFINE_TEST_CATEGORY_PREFIXES("cat", diff --git a/patches/chromium/chore_remove_reference_to_chrome_browser_themes.patch b/patches/chromium/chore_remove_reference_to_chrome_browser_themes.patch index 26cae3b6af..83048763b4 100644 --- a/patches/chromium/chore_remove_reference_to_chrome_browser_themes.patch +++ b/patches/chromium/chore_remove_reference_to_chrome_browser_themes.patch @@ -11,10 +11,10 @@ not need this dependency. refs https://chromium-review.googlesource.com/c/chromium/src/+/5573603 diff --git a/chrome/browser/ui/color/BUILD.gn b/chrome/browser/ui/color/BUILD.gn -index 6fff64b1b670e44f9222e26643d1a3ebfed67344..2d7e0ef167f47cf032dbad8cff5d6be72e130be0 100644 +index 1cf56251482cb801ff6b995962260a363cfd6ca8..9282bab312929a70853b23ec6839963bf3bbe565 100644 --- a/chrome/browser/ui/color/BUILD.gn +++ b/chrome/browser/ui/color/BUILD.gn -@@ -89,9 +89,6 @@ source_set("mixers") { +@@ -90,9 +90,6 @@ source_set("mixers") { ] } diff --git a/patches/chromium/chore_restore_some_deprecated_wrapper_utility_in_gin.patch b/patches/chromium/chore_restore_some_deprecated_wrapper_utility_in_gin.patch index 697750da7d..3a01222ca4 100644 --- a/patches/chromium/chore_restore_some_deprecated_wrapper_utility_in_gin.patch +++ b/patches/chromium/chore_restore_some_deprecated_wrapper_utility_in_gin.patch @@ -9,10 +9,10 @@ Patch can be removed once cppgc migration is complete https://github.com/electron/electron/issues/47922 diff --git a/gin/function_template.h b/gin/function_template.h -index c80020b2bda2af39b38295dad3c6208cb8294b88..873015289db9709c00c32080e5387d9cdfea1f69 100644 +index 8b649c04abccf1e6ade18e315095a3960d407e7b..70c882dfa6f0493164f8706090fb215139b7f258 100644 --- a/gin/function_template.h +++ b/gin/function_template.h -@@ -79,6 +79,7 @@ class GIN_EXPORT CallbackHolderBase { +@@ -90,6 +90,7 @@ class GIN_EXPORT CallbackHolderBase { CallbackHolderBase* holder); ~DisposeObserver() override; void OnBeforeDispose(v8::Isolate* isolate) override; diff --git a/patches/chromium/command-ismediakey.patch b/patches/chromium/command-ismediakey.patch index 82016cf540..bb900a0938 100644 --- a/patches/chromium/command-ismediakey.patch +++ b/patches/chromium/command-ismediakey.patch @@ -39,10 +39,10 @@ index e87c180342b967756efeb701c73207fcee8754f1..42e37564e585987d367921568f0f1d2b NOTREACHED(); } diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc -index 0e85d30f7015b48a92fe33cea2bb4ec0fe7e6b19..0c9978710079bbdbf55f89bf7966f3ad4c1c4845 100644 +index ade7a735b527dd6405071c2d31a1dbb7842d1846..23a7719e40dbadfa786454e29b1963247149abe4 100644 --- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc +++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc -@@ -128,7 +128,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator( +@@ -133,7 +133,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator( const bool registered = platform_global_shortcut_listener_->RegisterAccelerator( accelerator.key_code(), accelerator.IsAltDown(), @@ -52,7 +52,7 @@ index 0e85d30f7015b48a92fe33cea2bb4ec0fe7e6b19..0c9978710079bbdbf55f89bf7966f3ad if (registered) { registered_hot_keys_.insert(accelerator); } -@@ -143,14 +144,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator( +@@ -148,14 +149,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator( platform_global_shortcut_listener_->UnregisterAccelerator( accelerator.key_code(), accelerator.IsAltDown(), accelerator.IsCtrlDown(), @@ -70,7 +70,7 @@ index 0e85d30f7015b48a92fe33cea2bb4ec0fe7e6b19..0c9978710079bbdbf55f89bf7966f3ad int modifiers = 0; if (is_alt_down) { modifiers |= ui::EF_ALT_DOWN; -@@ -161,6 +163,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code, +@@ -166,6 +168,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code, if (is_shift_down) { modifiers |= ui::EF_SHIFT_DOWN; } diff --git a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch index 98fcb82ce8..c909ac0141 100644 --- a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch +++ b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch @@ -7,10 +7,10 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index e795339c000cf695ca05c6d3c736678fa47df21e..bbcad80a8efdac88c26ececeaf4023152631b662 100644 +index e121bd64a30b8ce1892f04cfae077547f7df4f42..a024d438505c11f534b2217118c327f240864c07 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -261,8 +261,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) { +@@ -262,8 +262,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) { #endif @@ -25,7 +25,7 @@ index e795339c000cf695ca05c6d3c736678fa47df21e..bbcad80a8efdac88c26ececeaf402315 #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) base::FileDescriptorStore& file_descriptor_store = base::FileDescriptorStore::GetInstance(); -@@ -959,7 +964,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { +@@ -960,7 +965,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { #if defined(V8_USE_EXTERNAL_STARTUP_DATA) if (delegate_->ShouldLoadV8Snapshot(process_type)) { @@ -79,7 +79,7 @@ index 8c318a31454c57b0e8db3770a36c45be427f053c..6f809c9672448ed9797e3c9da492ad2c friend class ContentClientCreator; friend class ContentClientInitializer; diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index cd1f308815685d28c506b5c9eb87b24107fa220b..58b708b0f7716f0d12ad1135ba65125cab1303a4 100644 +index 1b9a620d1f125cf86b8910e6e35b9915f8b148bc..fdc3c1237b132cd134f884c641f3ecb38a9f2dc0 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc @@ -630,8 +630,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out, diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 84c73880d1..a9cb92ac8d 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 886b3e87e9041931d3cb59ef775b5012e8e2f908..9287bde2d8c0eaa00c29fca974111b3f32b6e813 100644 +index 6e5c03522683f1c19d4b9c9e65c1f4716b9c3f49..7900ba3ef4c4db5dbe871431107fbb44fa25ad45 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -597,7 +597,11 @@ +@@ -593,7 +593,11 @@ } host()->WasHidden(); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 3303d0192d..9932c559a8 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,10 +6,10 @@ Subject: disable_hidden.patch Electron uses this to disable background throttling for hidden windows. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index fe46ebe4e5bcda2eff543aa5b5a2310628a3ea5a..8df679251dc314a94079fcc9d4edd7fab12873d4 100644 +index a97558e7e0e4dcedc96a2acc226daeca364962dc..a367b262935a06fcb9911944c061d1fa7fbb980d 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -818,6 +818,10 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -819,6 +819,10 @@ void RenderWidgetHostImpl::WasHidden() { return; } @@ -34,7 +34,7 @@ index 37b2ca1000ead76ec7e403bf1e2dc647bcee74ce..1312c87909729ac59ea661321c10862f // |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 550a2090d11ea151d8003610cb39a8035c5d299c..53ec5cd693539d74424c683f78e953e85c13c098 100644 +index b6f9361437688eb355aecf3fe9ab13eb434b940a..74f987e8aa28a78dc5f67999e940b1ee5ce49da7 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -712,7 +712,7 @@ void RenderWidgetHostViewAura::HideImpl() { diff --git a/patches/chromium/expose_gtk_ui_platform_field.patch b/patches/chromium/expose_gtk_ui_platform_field.patch index f76f1a99cf..bba1a67b7c 100644 --- a/patches/chromium/expose_gtk_ui_platform_field.patch +++ b/patches/chromium/expose_gtk_ui_platform_field.patch @@ -22,7 +22,7 @@ index ce94c80f7293ccc34994d79ab11cd09b479331b8..98defaaf3a8dc39f41df7f437073f3fb #include "base/memory/raw_ptr.h" #include "base/metrics/histogram_macros.h" diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h -index 40caafa5ce58104da7d5e96eb1efad1c99a77664..b388fc462e0c320170e5b35550e48b6b19079f40 100644 +index ecc60166a20e4513b3a0cb16032acadaf4a1772a..825c1afd2de17702c76d7fd254ee783d30e4f956 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 33f8d8f926..27a1fa4001 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 cf1001557f2f59747ceb394ab2c93b4bf379dafb..2e16a8d19e1ccfbfc838ed33ecac3375f1e81b17 100644 +index b074742f7b0e8c151a6a00354688f90039646ba6..6bf4e553755e76a5deb9b5e9d97b8e0d5713905c 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1994,6 +1994,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1993,6 +1993,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,23 +51,23 @@ index cf1001557f2f59747ceb394ab2c93b4bf379dafb..2e16a8d19e1ccfbfc838ed33ecac3375 // 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 04e6e884dccbb680a39f2b9c8a54de162e056a30..672dd48040586190b761e2db554ba0767d254f62 100644 +index 7701ace7017b6add531054062eec4d9370d281db..310fd2bd81c1cdfce22eadc0b0c128cc5db75885 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -332,6 +332,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext - void SetNetworkConditions( +@@ -333,6 +333,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext const base::UnguessableToken& throttling_profile_id, + const base::UnguessableToken& throttling_client_id, std::vector conditions) override; + void SetUserAgent(const std::string& new_user_agent) override; void SetAcceptLanguage(const std::string& new_accept_language) override; void SetEnableReferrers(bool enable_referrers) override; #if BUILDFLAG(IS_CT_SUPPORTED) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 6c43c2985123525793dd6b60c9d7d7c1db7fdf04..7493bd8dd37b36a3e7a96b1373619fee0b6a9d8e 100644 +index 38a9c1acc1559e88e8abb37332e03fd53844d579..fef5ad16fcb77b8e9695fed755871c4c3350eaa2 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1299,6 +1299,9 @@ interface NetworkContext { - SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, +@@ -1305,6 +1305,9 @@ interface NetworkContext { + mojo_base.mojom.UnguessableToken throttling_client_id, array conditions); + // Updates the user agent to be used for requests. @@ -77,12 +77,12 @@ index 6c43c2985123525793dd6b60c9d7d7c1db7fdf04..7493bd8dd37b36a3e7a96b1373619fee SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index b472be0acdc0cd4971e6e0a9e623bc1c84d07a02..f328a3aa2df9f5c6163a5023a5df157350d3707f 100644 +index 897aa084556967b8b8212ae268886f781284f684..f1f6e2e452a1f8717465b73c7595c591ab5ddc0d 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -156,6 +156,7 @@ class TestNetworkContext : public mojom::NetworkContext { - void SetNetworkConditions( +@@ -157,6 +157,7 @@ class TestNetworkContext : public mojom::NetworkContext { const base::UnguessableToken& throttling_profile_id, + const base::UnguessableToken& throttling_client_id, std::vector) override {} + void SetUserAgent(const std::string& new_user_agent) override {} void SetAcceptLanguage(const std::string& new_accept_language) override {} diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 3fefab7f5d..60d6cce744 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -15,10 +15,10 @@ Ideally we could add an embedder observer pattern here but that can be done in future work. diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index ed63aa041733e2fb09d77a219c93c322985cc81e..ea23d47128d4e974353ea5a976a72d4fa0600e2b 100644 +index 38119a4ce8d8c84657bb83d808ed5f10ae7ca252..85815957b321c99bb1b6906ea5011f27f8b46e26 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -1855,6 +1855,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1854,6 +1854,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); diff --git a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch index 9d05f5b037..1c42279f9c 100644 --- a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch +++ b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch @@ -65,10 +65,10 @@ index f076d0f783e2c0f6b5444002f756001adf2729bd..a03d99f929e2d354cdba969567d78156 #if BUILDFLAG(IS_WIN) bool EscapeVirtualization(const base::FilePath& user_data_dir); diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b3092079464a4d5430 100644 +index 579d74ba3491a95db714598749030983ca3c38bb..1a43b43393b1bcfd3659b25c93337445c3ff29a6 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc -@@ -619,6 +619,7 @@ class ProcessSingleton::LinuxWatcher +@@ -621,6 +621,7 @@ class ProcessSingleton::LinuxWatcher // |reader| is for sending back ACK message. void HandleMessage(const std::string& current_dir, const std::vector& argv, @@ -76,7 +76,7 @@ index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b309207946 SocketReader* reader); // Called when the ProcessSingleton that owns this class is about to be -@@ -678,13 +679,17 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { +@@ -680,13 +681,17 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { } void ProcessSingleton::LinuxWatcher::HandleMessage( @@ -96,7 +96,7 @@ index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b309207946 // Send back "ACK" message to prevent the client process from starting up. reader->FinishWithACK(kACKToken); } else { -@@ -714,7 +719,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -716,7 +721,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: bytes_read_ += ReadFromSocketWithTimeout( fd_, base::span(buf_).subspan(bytes_read_), base::Seconds(0)); @@ -106,7 +106,7 @@ index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b309207946 const size_t kMinMessageLength = kStartToken.length() + 4; if (bytes_read_ < kMinMessageLength) { buf_[bytes_read_] = 0; -@@ -745,10 +751,45 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -747,10 +753,45 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: tokens.erase(tokens.begin()); tokens.erase(tokens.begin()); @@ -153,7 +153,7 @@ index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b309207946 fd_watch_controller_.reset(); // LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader -@@ -777,8 +818,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( +@@ -779,8 +820,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( // ProcessSingleton::ProcessSingleton( const base::FilePath& user_data_dir, @@ -164,7 +164,7 @@ index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b309207946 current_pid_(base::GetCurrentProcId()) { socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename); lock_path_ = user_data_dir.Append(chrome::kSingletonLockFilename); -@@ -899,7 +942,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -901,7 +944,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( sizeof(socket_timeout)); // Found another process, prepare our command line @@ -174,7 +174,7 @@ index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b309207946 std::string to_send(kStartToken); to_send.push_back(kTokenDelimiter); -@@ -909,11 +953,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -911,11 +955,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( to_send.append(current_dir.value()); const std::vector& argv = cmd_line.argv(); 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 8473abe9d9..96e99d34db 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 0e47893681f9cb55b29564288842613c08ec9159..926daa45671d98344cdbfe592f7233683cc09adc 100644 +index 309670548557055c2cccdc424bf3ac91330d541a..2d65244032a0ac04158facb00afc311642664660 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -503,6 +503,8 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { +@@ -505,6 +505,8 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { } PreferredColorScheme preferred_color_scheme() const { @@ -25,7 +25,7 @@ index 0e47893681f9cb55b29564288842613c08ec9159..926daa45671d98344cdbfe592f723368 return preferred_color_scheme_; } void set_preferred_color_scheme(PreferredColorScheme preferred_color_scheme) { -@@ -534,6 +536,24 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { +@@ -536,6 +538,24 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { caret_blink_interval_ = caret_blink_interval; } @@ -50,7 +50,7 @@ index 0e47893681f9cb55b29564288842613c08ec9159..926daa45671d98344cdbfe592f723368 protected: explicit NativeTheme(SystemTheme system_theme = SystemTheme::kDefault); virtual ~NativeTheme(); -@@ -612,6 +632,7 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { +@@ -614,6 +634,7 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme { ColorProviderKey::UserColorSource preferred_color_source_ = ColorProviderKey::UserColorSource::kAccent; base::TimeDelta caret_blink_interval_; diff --git a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch index 63a121958f..971b038b18 100644 --- a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch +++ b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch @@ -17,7 +17,7 @@ which removed range-requests-supported on non-http protocols. See https://issues for more information. diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -index 0af2ad19954bd868f6b92616da869b350f088103..efc53247962f166f2b441f76c7a2c94d8ceb979a 100644 +index ea0a0599154eb9371ecfc8a764e54812b2b9616d..cf3f5bfaf0ce44fa9017dee234bae07863e84c1b 100644 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc @@ -12,8 +12,10 @@ @@ -74,7 +74,7 @@ index 0af2ad19954bd868f6b92616da869b350f088103..efc53247962f166f2b441f76c7a2c94d void MultiBufferDataSource::SetReader( diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h -index 470b6015dad4063375175324f49afb3548cdf0dd..61b633d65eaa76f98fd0d858d490b12077646ad2 100644 +index b4a05b9a4ba4522a4f0fd0d6f0470d54d2c6d974..4c70cf26872c40dfe9d0cad3aff4215f19514a32 100644 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h @@ -19,6 +19,7 @@ @@ -94,7 +94,7 @@ index 470b6015dad4063375175324f49afb3548cdf0dd..61b633d65eaa76f98fd0d858d490b120 // A data source capable of loading URLs and buffering the data using an // in-memory sliding window. // -@@ -94,6 +97,8 @@ class PLATFORM_EXPORT MultiBufferDataSource +@@ -106,6 +109,8 @@ class PLATFORM_EXPORT MultiBufferDataSource return url_data_->mime_type(); } @@ -104,7 +104,7 @@ index 470b6015dad4063375175324f49afb3548cdf0dd..61b633d65eaa76f98fd0d858d490b120 using InitializeCB = base::OnceCallback; void Initialize(InitializeCB init_cb) override; diff --git a/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc b/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc -index 61b798d0b37588dbdaaced0cd88f6ed36fbaffa5..95cc5bde18ed79f2a4e6fc1d0d1138b0c41bd5d5 100644 +index 5af370831c84569e450f144659ba9a9d963b0883..c2ba83b8b39ea912d3497edaacdccc1f9288cfaa 100644 --- a/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc +++ b/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc @@ -8,6 +8,7 @@ @@ -123,7 +123,7 @@ index 61b798d0b37588dbdaaced0cd88f6ed36fbaffa5..95cc5bde18ed79f2a4e6fc1d0d1138b0 #include "third_party/blink/renderer/platform/media/resource_fetch_context.h" #include "third_party/blink/renderer/platform/media/url_index.h" #include "third_party/blink/renderer/platform/weborigin/security_origin.h" -@@ -313,6 +315,16 @@ void ResourceMultiBufferDataProvider::DidReceiveResponse( +@@ -314,6 +316,16 @@ void ResourceMultiBufferDataProvider::DidReceiveResponse( do_fail = true; } } else { diff --git a/patches/chromium/feat_add_support_for_embedder_snapshot_validation.patch b/patches/chromium/feat_add_support_for_embedder_snapshot_validation.patch index a4c5f46c7d..bbbedb65e4 100644 --- a/patches/chromium/feat_add_support_for_embedder_snapshot_validation.patch +++ b/patches/chromium/feat_add_support_for_embedder_snapshot_validation.patch @@ -6,7 +6,7 @@ Subject: feat: add support for embedder snapshot validation IsValid is not exposed despite being commented as for embedders, this exposes something that works for us. diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index 58b708b0f7716f0d12ad1135ba65125cab1303a4..eefaec3dac8de00ec89f4310cbc3fc91e84b3961 100644 +index fdc3c1237b132cd134f884c641f3ecb38a9f2dc0..8828b4f5a7f1e29495ea46d39b8e6946eef11ed5 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc @@ -75,11 +75,23 @@ bool GenerateEntropy(unsigned char* buffer, size_t amount) { diff --git a/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch b/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch index 8f94a7c819..e3111419e3 100644 --- a/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch +++ b/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch @@ -9,7 +9,7 @@ production use cases. This is unlikely to be upstreamed as the change is entirely in //chrome. diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc -index cf981e70ee4c43fd4f9a195c7839c9e3cb7fc956..c00068a963d66a07a726ec562e5f8327b2c3faeb 100644 +index f2a10504550ef67a73d1dc863a61352ba9cd2142..b0b386411dd32f5b7d2c11bee0b8abf4f0ff6add 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc @@ -55,6 +55,8 @@ GURL& GetDownloadUrlForTesting() { diff --git a/patches/chromium/feat_allow_enabling_extensions_on_custom_protocols.patch b/patches/chromium/feat_allow_enabling_extensions_on_custom_protocols.patch index 456e13659a..f0b66c2c4a 100644 --- a/patches/chromium/feat_allow_enabling_extensions_on_custom_protocols.patch +++ b/patches/chromium/feat_allow_enabling_extensions_on_custom_protocols.patch @@ -44,10 +44,10 @@ index 57ed3cf54b2921df09ad84906b3da7527c6080bb..ffe3a0894c612adaa429a783827c8503 class WebRequestEventRouter : public KeyedService { public: diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc -index 542bc99fbaace39351a6f991a7702d0c77c891eb..9fef3d7fe3108cca843100967489f1cc1b6b4589 100644 +index 8a8ab0a0e2c6e4f599651a3691d2d4749914d0f0..9ac2eda61dbab1aa489d7b5d3882f81be87e5563 100644 --- a/extensions/common/extension.cc +++ b/extensions/common/extension.cc -@@ -223,7 +223,8 @@ const int Extension::kValidHostPermissionSchemes = +@@ -225,7 +225,8 @@ const int Extension::kValidHostPermissionSchemes = URLPattern::SCHEME_CHROMEUI | URLPattern::SCHEME_HTTP | URLPattern::SCHEME_HTTPS | URLPattern::SCHEME_FILE | URLPattern::SCHEME_FTP | URLPattern::SCHEME_WS | URLPattern::SCHEME_WSS | 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 5e7d1e903a..60c162a6c4 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 @@ -20,7 +20,7 @@ index 120590a93bbc5a47e73c5d5515b7ad07b2364eb6..50a8b0dfe5400d1ab9da2893088583e4 requested_format_.pixel_format = media::PIXEL_FORMAT_NV12; DCHECK_GT(requested_format_.frame_size.GetArea(), 0); diff --git a/content/browser/media/capture/io_surface_capture_device_base_mac.cc b/content/browser/media/capture/io_surface_capture_device_base_mac.cc -index 7a76550922d97a835dae15be6a951c91a9b351b0..ce3e22e437fa208652326798e12952c40372197a 100644 +index 28393355d80c3cc25014fec1615b0c2e057ddce7..813c6cd4e99c38f9a840fd6c659cc262ce7c8211 100644 --- a/content/browser/media/capture/io_surface_capture_device_base_mac.cc +++ b/content/browser/media/capture/io_surface_capture_device_base_mac.cc @@ -20,7 +20,7 @@ void IOSurfaceCaptureDeviceBase::AllocateAndStart( 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 781b7850ef..5d9daa978a 100644 --- a/patches/chromium/feat_configure_launch_options_for_service_process.patch +++ b/patches/chromium/feat_configure_launch_options_for_service_process.patch @@ -745,7 +745,7 @@ index ea68aa0d16c46ad53b63e10027e81503610051d9..ac1ffa290b59d964931a312a911efbec // 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 5c92eec064e36fa4be5a57a769a4091a18e3396d..b705450708560c0ae8b386d7efdb5c526964c629 100644 +index 8b470b9554d23a951c98c8cba644ae1ae4246004..a30fe3e814bb688be015956a195e0e8efe5662ca 100644 --- a/sandbox/policy/win/sandbox_win.cc +++ b/sandbox/policy/win/sandbox_win.cc @@ -616,11 +616,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() { 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 226799fb61..e9836184eb 100644 --- a/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch +++ b/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch @@ -20,7 +20,7 @@ making three primary changes to Blink: * Controls whether the CSS rule is available. diff --git a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom -index 617af0ab9475d0f5c4ec68f9ae502aa7134414cc..d495fb33a73544c069e9835334fa13ed9581ec0c 100644 +index 83b159866a0735c206c271c2be5e9896623b63db..28faaa32aec7509360c1cdf8453c95cbcfbe3292 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 @@ -50,7 +50,7 @@ enum CSSSampleId { @@ -33,7 +33,7 @@ index 617af0ab9475d0f5c4ec68f9ae502aa7134414cc..d495fb33a73544c069e9835334fa13ed // 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 6e60de1319c5506d7180719fa230ab9cf537b832..e570e335fbd413340ddedeee423eca71275b4c1c 100755 +index 1c01e4d6699da8760e074a5825784e139ed58fd4..c678a3df0b9e5a8c9e0bd99c1aa540b2e54534d8 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): @@ -46,10 +46,10 @@ index 6e60de1319c5506d7180719fa230ab9cf537b832..e570e335fbd413340ddedeee423eca71 '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 f46a4e31e0ea81f362be1c06bc23f6e6cb15d967..1a7874271e123d4fadd8ae694394061fc0c73cfe 100644 +index 5c70b0bace55711c68a1e82c712d446083e4ae2e..0460887d418362fadbba59d6fa0ed66e7f8b193a 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5 -@@ -9643,6 +9643,27 @@ +@@ -9766,6 +9766,27 @@ property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"], }, @@ -78,7 +78,7 @@ index f46a4e31e0ea81f362be1c06bc23f6e6cb15d967..1a7874271e123d4fadd8ae694394061f { 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 2afe18e9e4a5404ed184aeedc1c02a313853f463..7c3b0c2da6ded539764ce59bc43f49e9ffe71b5e 100644 +index 31784744a8a6d3c9632254465ca9516c3fe0a71f..677608014a0a42e064b091ae571040b1363b48b5 100644 --- a/third_party/blink/renderer/core/css/css_property_equality.cc +++ b/third_party/blink/renderer/core/css/css_property_equality.cc @@ -421,6 +421,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property, @@ -91,10 +91,10 @@ index 2afe18e9e4a5404ed184aeedc1c02a313853f463..7c3b0c2da6ded539764ce59bc43f49e9 return a.EmptyCells() == b.EmptyCells(); case CSSPropertyID::kFill: diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc -index 65c9b1f3a73d3822371f09b0cb764c63aaeb8a31..6e3737cf147252c6999ddcb887309682a91787d6 100644 +index d213eb4d327485143d2fdac1d8074b30d31649b0..cb0ecc3d28ff5e9467b92f90a5a2738adae29680 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 -@@ -13328,5 +13328,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue( +@@ -12364,5 +12364,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue( CSSValueID::kNone>(stream); } @@ -132,10 +132,10 @@ index 65c9b1f3a73d3822371f09b0cb764c63aaeb8a31..6e3737cf147252c6999ddcb887309682 } // 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 d972b308bb42044932f5266da7a81ce39211807a..15cbe6494e093ba2bf44706802b62072413a1027 100644 +index 943b4fce4fd903d77a96cda68f2bb1f81813efa7..ec74565d9adb70ff46f0ddf2449ba022e3f0ecb9 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 -@@ -4207,6 +4207,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback( +@@ -4201,6 +4201,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback( return PositionTryFallback(scoped_name, tactic_list); } @@ -152,7 +152,7 @@ index d972b308bb42044932f5266da7a81ce39211807a..15cbe6494e093ba2bf44706802b62072 const CSSValue& value) { const auto& list = To(value); diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h -index 6838abb0a5551e24b7b2a55d493120178ffdeb7d..681d88ba70216111363aa7c2af2447263a94c7b6 100644 +index b21cc0c587a3b8beb437ed7a36f4c527e56d8845..d5339a043ae38c66f0ce52a0f7b4a818ed4d1c87 100644 --- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h +++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h @@ -461,6 +461,7 @@ class StyleBuilderConverter { @@ -203,10 +203,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 87f64f5c2cfd4bdc8aca697f6115effed091b86e..a11c5cb976077e53a6c3d456d2583f16fb58e415 100644 +index 71420d495390d90fdaf17dd3118d60cf7baa9163..10e359db3615dc0a5c33338a1f4f861246daa707 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -1675,6 +1675,8 @@ component("platform") { +@@ -1677,6 +1677,8 @@ component("platform") { "widget/widget_base.h", "widget/widget_base_client.h", "windows_keyboard_codes.h", @@ -314,7 +314,7 @@ index 18f283e625101318ee14b50e6e765dfd1c9a1a44..44a3a55974c9e4b9e715574075f25661 auto DrawAsSinglePath = [&]() { diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -index 89301f737c6a1f4043a47366db604967159b7cb6..0f6417f6933f3f71f39b4a06ac229efd3ac7634b 100644 +index 0c8b952721cfd4fad4c43505208485f0f5df120b..0c2dac1001e3b44e0242d81bea0e9c245c7f8d11 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_enable_offscreen_rendering_with_viz_compositor.patch b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch index 051affa5dc..7ce083bd47 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 3f9d9afc88b7622c28ba2167c305e2a54affb8d3..2c281a88630706c28ccf71e74851fcbae91ccdcb 100644 +index 1cb64b8a359f2761e75e7b43391734bde0d40054..2191e75e833c10937ba464a55d5449ad4730606e 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -176,6 +176,8 @@ viz_component("service") { @@ -117,10 +117,10 @@ index 7fbb05e606fc26364c674c6330b8a5eb9c016fb3..a190a42c2127011ab54aae937a3cab36 virtual gpu::SharedImageManager* GetSharedImageManager() = 0; virtual gpu::SyncPointManager* GetSyncPointManager() = 0; diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc -index 07502f4ff2afd53a43d8f0ab68d4c4c39f6c0737..20d51f86d5084edf0b05ce0ab11fcd1279ef8fa6 100644 +index 0a1c0ebd232fc7a3906cf4a98d568a36ec14a67e..f2e299992a1de56719d9843483de291b85e1dc87 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc -@@ -23,6 +23,7 @@ +@@ -24,6 +24,7 @@ #include "components/viz/service/display/display_compositor_memory_and_task_controller.h" #include "components/viz/service/display_embedder/skia_output_surface_dependency_impl.h" #include "components/viz/service/display_embedder/skia_output_surface_impl.h" @@ -128,7 +128,7 @@ index 07502f4ff2afd53a43d8f0ab68d4c4c39f6c0737..20d51f86d5084edf0b05ce0ab11fcd12 #include "components/viz/service/display_embedder/software_output_surface.h" #include "components/viz/service/gl/gpu_service_impl.h" #include "gpu/command_buffer/client/shared_memory_limits.h" -@@ -30,6 +31,7 @@ +@@ -31,6 +32,7 @@ #include "gpu/command_buffer/service/scheduler_sequence.h" #include "gpu/config/gpu_finch_features.h" #include "gpu/ipc/common/surface_handle.h" @@ -136,7 +136,7 @@ index 07502f4ff2afd53a43d8f0ab68d4c4c39f6c0737..20d51f86d5084edf0b05ce0ab11fcd12 #include "ui/base/ui_base_switches.h" #if BUILDFLAG(IS_WIN) -@@ -93,7 +95,8 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -94,7 +96,8 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( mojom::DisplayClient* display_client, DisplayCompositorMemoryAndTaskController* gpu_dependency, const RendererSettings& renderer_settings, @@ -146,7 +146,7 @@ index 07502f4ff2afd53a43d8f0ab68d4c4c39f6c0737..20d51f86d5084edf0b05ce0ab11fcd12 #if BUILDFLAG(IS_CHROMEOS) if (surface_handle == gpu::kNullSurfaceHandle) return std::make_unique(); -@@ -101,7 +104,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -102,7 +105,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( if (!gpu_compositing) { return std::make_unique( @@ -155,7 +155,7 @@ index 07502f4ff2afd53a43d8f0ab68d4c4c39f6c0737..20d51f86d5084edf0b05ce0ab11fcd12 } else { DCHECK(gpu_dependency); -@@ -140,10 +143,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -141,10 +144,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( std::unique_ptr OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( gpu::SurfaceHandle surface_handle, @@ -238,16 +238,17 @@ index 67d5ff67d74c107a867b39b306c6528425b87e05..5fd12a25c9e319e8e675955926271c9d diff --git a/components/viz/service/display_embedder/software_output_device_proxy.cc b/components/viz/service/display_embedder/software_output_device_proxy.cc new file mode 100644 -index 0000000000000000000000000000000000000000..601e646c293ac18e692663642f540577168924d6 +index 0000000000000000000000000000000000000000..c5f45c564f015d209aee39b4b8f0fd95ce187907 --- /dev/null +++ b/components/viz/service/display_embedder/software_output_device_proxy.cc -@@ -0,0 +1,161 @@ +@@ -0,0 +1,162 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/viz/service/display_embedder/software_output_device_proxy.h" + ++#include "base/logging.h" +#include "base/memory/unsafe_shared_memory_region.h" +#include "base/threading/thread_checker.h" +#include "base/trace_event/trace_event.h" @@ -563,10 +564,10 @@ index 399fba1a3d4e601dc2cdd5f1f4def8b7fd7a3011..8bcbe0d26c80323155d536c0d3a177a1 gpu::SyncPointManager* GetSyncPointManager() override; gpu::Scheduler* GetGpuScheduler() override; diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc -index 59a7d48453bc4d317c5760f57ad3bf84d5a81106..6b03be074cfd1ef113394debbfeeb6463b96dc2e 100644 +index 3b6170d5db3268c9fea8c47e93cea30304904cd8..f01d8239f6b7a6c49607b8c13c91f3f4dca2910a 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc -@@ -406,8 +406,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( +@@ -405,8 +405,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( mojo::AssociatedRemote display_private; root_params->display_private = display_private.BindNewEndpointAndPassReceiver(); @@ -619,7 +620,7 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 97f26777528c3b21255b74ccf411ff2d3b243215..d45839ebc7b07ade2ca382e15b1d48dcf7d29106 100644 +index fbe5a8e6458970652723f91a426541220b394a18..c2e748b92103c582802af9b973ebe0c3770ba44d 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -89,6 +89,7 @@ class DisplayPrivate; @@ -656,7 +657,7 @@ index 97f26777528c3b21255b74ccf411ff2d3b243215..d45839ebc7b07ade2ca382e15b1d48dc // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -632,6 +645,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -631,6 +644,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, simple_begin_frame_observers_; std::unique_ptr host_begin_frame_observer_; 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 78e51984b8..60d3cc110c 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -37,10 +37,10 @@ index a3f0786ceecfdcb80f9c8c4eef22daba4572cd29..0d8f16c92a8f9d05fcf7e2fd1f54c184 allow_cookies_from_browser == other.allow_cookies_from_browser && include_request_cookies_with_response == diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h -index 31fb318fc098a2ac4f3b4ea89caced757d520210..34545e9f2c2fc383344710e78c5904119572e2e6 100644 +index 304c11db09433c24484f49d4f5555115eae664fb..29b81dbb37c160500a7b2d032cd05e404bede039 100644 --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h -@@ -116,6 +116,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { +@@ -117,6 +117,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { bool has_user_activation = false; bool allow_cookies_from_browser = false; bool include_request_cookies_with_response = false; @@ -76,10 +76,10 @@ index 35321e7d628e7db05a57d2a86775a313d8daedb0..845f7fe44a135fd98dec47e357365889 network::ResourceRequest::TrustedParams::EnabledClientHints>& enabled_client_hints( diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom -index 0f3f9aa4328ac025c4627e550b8652004b4617e9..767bb928e64f06bad713163b004a977baf22c3cd 100644 +index a4ab9d9b32a1ea5f9d177c32ad6d416e65f5771e..702fdb05aa48e25fa15ecfbcc8d49468e98c3ebf 100644 --- a/services/network/public/mojom/url_request.mojom +++ b/services/network/public/mojom/url_request.mojom -@@ -111,6 +111,9 @@ struct TrustedUrlRequestParams { +@@ -112,6 +112,9 @@ struct TrustedUrlRequestParams { // client which should not be able to see them. bool include_request_cookies_with_response = false; @@ -90,20 +90,20 @@ index 0f3f9aa4328ac025c4627e550b8652004b4617e9..767bb928e64f06bad713163b004a977b // when it receives the AcceptCHFrame. EnabledClientHints? enabled_client_hints; diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom -index 0d3aa45778e02c4a5bcdea6e8b0f5ab722e86aa3..fbe4f3d2931cdd9893a3c96667015d4091aed479 100644 +index df038b9d2a798185d3ea49c4e705e0963262f580..c108e5b7cc32c512326a3e70d32f63139aea6555 100644 --- a/services/network/public/mojom/url_response_head.mojom +++ b/services/network/public/mojom/url_response_head.mojom -@@ -14,6 +14,7 @@ import "services/network/public/mojom/encoded_body_length.mojom"; - import "services/network/public/mojom/fetch_api.mojom"; +@@ -16,6 +16,7 @@ import "services/network/public/mojom/fetch_api.mojom"; import "services/network/public/mojom/http_request_headers.mojom"; + import "services/network/public/mojom/http_response_headers.mojom"; import "services/network/public/mojom/ip_address_space.mojom"; +import "services/network/public/mojom/http_raw_headers.mojom"; import "services/network/public/mojom/ip_endpoint.mojom"; import "services/network/public/mojom/load_timing_info.mojom"; import "services/network/public/mojom/load_timing_internal_info.mojom"; -@@ -53,6 +54,9 @@ struct URLResponseHead { +@@ -56,6 +57,9 @@ struct URLResponseHead { // The response headers or NULL if the URL type does not support headers. - HttpResponseHeaders headers; + HttpResponseHeaders? headers; + // Actual response headers, as obtained from the network stack. + array raw_response_headers; @@ -112,10 +112,10 @@ index 0d3aa45778e02c4a5bcdea6e8b0f5ab722e86aa3..fbe4f3d2931cdd9893a3c96667015d40 string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index a00c53ceba992e21bcde64f8ad8a587d4fe0fa93..a3177b41d121368af205512c1cf3782e40e28317 100644 +index 1a3c5a22c25401d4704ed7e8dc288df3b9420d51..2b2bdbc5c269c908b2e2c97467d2cd5d214cd4c8 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -371,6 +371,9 @@ URLLoader::URLLoader( +@@ -372,6 +372,9 @@ URLLoader::URLLoader( mojo::SimpleWatcher::ArmingPolicy::MANUAL, TaskRunner(request.priority)), per_factory_orb_state_(context.GetMutableOrbState()), @@ -125,7 +125,7 @@ index a00c53ceba992e21bcde64f8ad8a587d4fe0fa93..a3177b41d121368af205512c1cf3782e devtools_request_id_(request.devtools_request_id), options_(PopulateOptions(options, factory_params_->is_orb_enabled, -@@ -568,7 +571,7 @@ void URLLoader::SetUpUrlRequestCallbacks( +@@ -569,7 +572,7 @@ void URLLoader::SetUpUrlRequestCallbacks( &URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this))); } @@ -134,7 +134,7 @@ index a00c53ceba992e21bcde64f8ad8a587d4fe0fa93..a3177b41d121368af205512c1cf3782e url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1174,6 +1177,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1175,6 +1178,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 cda89b433b..f81d6e19b6 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 @@ -152,10 +152,10 @@ index 8fded9303e74737d82ca6d54e00807ebabf6c1ac..c0b66eb9a62f8f75e3c4de43f467ddd0 bool ClipboardCommands::ExecuteCopy(LocalFrame& frame, diff --git a/third_party/blink/renderer/modules/permissions/permission_utils.cc b/third_party/blink/renderer/modules/permissions/permission_utils.cc -index 27cdc852f5974951f0a10157a0473e67791f6688..e9b7dcb070567580e8c6ad11b2bb943083e804f6 100644 +index f8c8a7e80d27a1c22b2c8ecea2d27379762b0934..58bac9b83b30f9c20f1b527657f02e09a8468707 100644 --- a/third_party/blink/renderer/modules/permissions/permission_utils.cc +++ b/third_party/blink/renderer/modules/permissions/permission_utils.cc -@@ -151,6 +151,8 @@ String PermissionNameToString(PermissionName name) { +@@ -164,6 +164,8 @@ String PermissionNameToString(PermissionName name) { return "web-printing"; case PermissionName::SMART_CARD: return "smart-card"; 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 71f15805e3..07a182f47e 100644 --- a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch +++ b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch @@ -16,7 +16,7 @@ Linux or Windows to un-fullscreen in some circumstances without this change. diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2da71ba6b 100644 +index 0099f0138baa49bee20d3cedf4d456c8a1578408..88c9218e595a886df0a39d4824f786094ab28862 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -47,7 +47,7 @@ @@ -52,7 +52,7 @@ index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2 } #endif // !BUILDFLAG(IS_ANDROID) -@@ -418,8 +420,7 @@ void FullscreenController::FullscreenTransitionCompleted() { +@@ -416,8 +418,7 @@ void FullscreenController::WindowFullscreenStateChanged() { #endif // DCHECK_IS_ON() tab_fullscreen_target_display_id_ = display::kInvalidDisplayId; started_fullscreen_transition_ = false; @@ -62,7 +62,7 @@ index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2 if (!IsTabFullscreen()) { // Activate any popup windows created while content fullscreen, after exit. popunder_preventer_.reset(); -@@ -564,9 +565,12 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -562,9 +563,12 @@ void FullscreenController::EnterFullscreenModeInternal( fullscreen_parameters_ = fullscreen_tab_params; started_fullscreen_transition_ = true; toggled_into_fullscreen_ = true; @@ -75,7 +75,7 @@ index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2 if (option == FullscreenInternalOption::kTab) { origin = GetRequestingOrigin(); tab_fullscreen_ = true; -@@ -604,6 +608,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -602,6 +606,7 @@ void FullscreenController::EnterFullscreenModeInternal( origin = url::Origin::Create(extension_url_.value()); } } @@ -83,7 +83,7 @@ index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2 fullscreen_start_time_ = base::TimeTicks::Now(); if (option == FullscreenInternalOption::kBrowser) { -@@ -625,6 +630,7 @@ void FullscreenController::ExitFullscreenModeInternal() { +@@ -623,6 +628,7 @@ void FullscreenController::ExitFullscreenModeInternal() { return; } @@ -91,7 +91,7 @@ index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2 // `fullscreen_start_time_` is null if a fullscreen tab moves to a new window. if (fullscreen_start_time_ && exclusive_access_tab()) { ukm::SourceId source_id = -@@ -636,19 +642,20 @@ void FullscreenController::ExitFullscreenModeInternal() { +@@ -634,19 +640,20 @@ void FullscreenController::ExitFullscreenModeInternal() { .Record(ukm::UkmRecorder::Get()); fullscreen_start_time_.reset(); } @@ -116,10 +116,10 @@ index a634a526a3042ac09dbc436c4905a6c6e28949d9..275eca5fe7d18d802fc032006c9995a2 extension_url_.reset(); exclusive_access_manager()->UpdateBubble(base::NullCallback()); diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h -index e477ff115410940ed8ba96c3572f4f48ccea8a9d..7a3495c6d26667508271fe2cc77fafaae9d39204 100644 +index 0b215f8470adc7798fc12f5185072f9be5b554d9..64303ff5cec6a80b9007f76dd32145364389df3b 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h -@@ -270,7 +270,7 @@ class FullscreenController : public ExclusiveAccessControllerBase { +@@ -267,7 +267,7 @@ class FullscreenController : public ExclusiveAccessControllerBase { // Set of parameters used to enter fullscreen std::optional fullscreen_parameters_; 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 6900f2578b..87a37c1d48 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 b4554165e3c5344c7ff0b21ccc3986c3e5edf593..4a9e866b57333cbaf8f8e9b415572e9da953e9a8 100644 +index f200710faa973822367f5e12037126fef31cac85..f57b9fc71cd803737d76a157e2a573e7ef61520d 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -@@ -251,6 +251,7 @@ @implementation NativeWidgetMacNSWindow { +@@ -235,6 +235,7 @@ @implementation NativeWidgetMacNSWindow { BOOL _isEnforcingNeverMadeVisible; BOOL _activationIndependence; BOOL _isTooltip; @@ -34,7 +34,7 @@ index b4554165e3c5344c7ff0b21ccc3986c3e5edf593..4a9e866b57333cbaf8f8e9b415572e9d BOOL _isShufflingForOrdering; BOOL _miniaturizationInProgress; std::unique_ptr _headless_info; -@@ -258,6 +259,7 @@ @implementation NativeWidgetMacNSWindow { +@@ -242,6 +243,7 @@ @implementation NativeWidgetMacNSWindow { @synthesize bridgedNativeWidgetId = _bridgedNativeWidgetId; @synthesize bridge = _bridge; @synthesize isTooltip = _isTooltip; @@ -42,7 +42,7 @@ index b4554165e3c5344c7ff0b21ccc3986c3e5edf593..4a9e866b57333cbaf8f8e9b415572e9d @synthesize isShufflingForOrdering = _isShufflingForOrdering; @synthesize preventKeyWindow = _preventKeyWindow; @synthesize childWindowAddedHandler = _childWindowAddedHandler; -@@ -279,23 +281,6 @@ - (instancetype)initWithContentRect:(NSRect)contentRect +@@ -263,23 +265,6 @@ - (instancetype)initWithContentRect:(NSRect)contentRect return self; } @@ -80,7 +80,7 @@ index 94ee727830545ff1576685722c0fd0dd215131cf..ba70aca429e33c12215dfd67d3855245 } diff --git a/components/remote_cocoa/common/native_widget_ns_window.mojom b/components/remote_cocoa/common/native_widget_ns_window.mojom -index a1cdcdd45fc05c8e1456bf7c33f94bf0aa9dcf1b..9aab9244b6387c1d49c2ff6d7c1d3dd2b3737d05 100644 +index a41254c1f31654c1326b4bf1f29237bdf44bbe5a..8ca5673a225b69b5630383ed9673653ba03a0e97 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 { @@ -139,7 +139,7 @@ index a258b94a8122c74b6f98f4b88b710371291fcfe4..2bcee4b775a2a39fbbe3c070a5db6081 // 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 75a82bc82ebe8e7b5b51b760cf4258cfd65a2df5..4b29c955c3347e2907c0d064834d917cc95ac546 100644 +index 5c01e07d7d605e2d5291b637f461296c859e18a5..fdba3c24ab72b44cdf94e722623b6f64a592e634 100644 --- a/ui/views/widget/widget.cc +++ b/ui/views/widget/widget.cc @@ -238,6 +238,18 @@ ui::ZOrderLevel Widget::InitParams::EffectiveZOrderLevel() const { @@ -170,7 +170,7 @@ index 75a82bc82ebe8e7b5b51b760cf4258cfd65a2df5..4b29c955c3347e2907c0d064834d917c if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred && diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h -index 93a47570d4854a3136fc4ac7f46d2f3d5c55db6c..78b720d556fb4f3f316baedaa70e56b1a171ab6a 100644 +index 45f97088b254c82c8d5c043ce23942f8c81b46d8..3738a5170fba4f544a750047ee1d1a5d11e5eff3 100644 --- a/ui/views/widget/widget.h +++ b/ui/views/widget/widget.h @@ -324,6 +324,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -195,7 +195,7 @@ index 93a47570d4854a3136fc4ac7f46d2f3d5c55db6c..78b720d556fb4f3f316baedaa70e56b1 // If set, the window size will follow the content preferred size. bool autosize = false; -@@ -1285,6 +1293,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -1289,6 +1297,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 93a47570d4854a3136fc4ac7f46d2f3d5c55db6c..78b720d556fb4f3f316baedaa70e56b1 // True if the window size will follow the content preferred size. bool is_autosized() const { return is_autosized_; } -@@ -1730,6 +1743,9 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -1734,6 +1747,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_reentrancy_on_downloadmanagerimpl_observer_list.patch b/patches/chromium/fix_allow_reentrancy_on_downloadmanagerimpl_observer_list.patch new file mode 100644 index 0000000000..866fa9192f --- /dev/null +++ b/patches/chromium/fix_allow_reentrancy_on_downloadmanagerimpl_observer_list.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Calvin Watford +Date: Tue, 21 Apr 2026 12:35:28 -0700 +Subject: fix: allow reentrancy on DownloadManagerImpl observer list + +Session::CreateInterruptedDownload triggers reentrant iteration of +DownloadManagerImpl::observers_ (via GetNextId -> DownloadIdCallback +-> CreateDownloadItem -> OnDownloadCreated) which hits the +kDisallowReentrancy CHECK after upstream changed the ObserverList +default policy. + +Opt the observers_ list into kAllowReentrancy via ReentrantObserverList, +matching the pattern upstream adopted for SequenceManager::task_observers. + +diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h +index 26a8e44bd41b3d4eb90e8d641e17b4d5e3eb6d70..ae3d1179a8fa81ea86fb758121e776ecf972a9a1 100644 +--- a/content/browser/download/download_manager_impl.h ++++ b/content/browser/download/download_manager_impl.h +@@ -357,7 +357,7 @@ class CONTENT_EXPORT DownloadManagerImpl + bool in_progress_cache_initialized_; + + // Observers that want to be notified of changes to the set of downloads. +- base::ObserverList::Unchecked observers_; ++ base::ReentrantObserverList::Unchecked observers_; + + // Stores information about in-progress download items. + std::unique_ptr 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 0b87c9c9ab..176ef13ad4 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 5bce95d5ea98c9a6522905f5c237fc5934fe2800..761df90191dd6444d64caf30e2a14c54c8ab536f 100755 +index a4b80bfd20a556dd341387d3386a8a582a42742c..9cfed7dedb1d4af8f6cef618dd245524014255cc 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -201,10 +201,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 3e38236dc2..fea1a6ac10 100644 --- a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch +++ b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch @@ -28,10 +28,10 @@ The patch should be removed in favor of either: Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index 7532fbb742624d86c342df29a7621867fa99180b..45cbb6bcaf16307a6949473ddb62a2be95031199 100644 +index f750386ac53747186bbc2099292595636515eea6..6831e7595347848ae93fb6af0594b565a1d0a15c 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -11915,6 +11915,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() { +@@ -11961,6 +11961,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() { target_rph_id); } @@ -44,10 +44,10 @@ index 7532fbb742624d86c342df29a7621867fa99180b..45cbb6bcaf16307a6949473ddb62a2be // origin of |common_params.url| and/or |common_params.initiator_origin|. url::Origin resolved_origin = url::Origin::Resolve( diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc -index 1fd466b975fc5347e01bf5f6368e0b4fe89f7c5f..b77eb4ae99103d84ac6f1cb53fd1fe94814c7d05 100644 +index e0c3801d2ebbfe30c85b2eeb7b35bda4aa6fd4ae..2344e1d62f4a2d7fdf139b64b6c71ede1e3094ce 100644 --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc -@@ -2357,6 +2357,7 @@ Frame* DocumentLoader::CalculateOwnerFrame() { +@@ -2354,6 +2354,7 @@ Frame* DocumentLoader::CalculateOwnerFrame() { scoped_refptr DocumentLoader::CalculateOrigin( Document* owner_document) { scoped_refptr origin; @@ -55,7 +55,7 @@ index 1fd466b975fc5347e01bf5f6368e0b4fe89f7c5f..b77eb4ae99103d84ac6f1cb53fd1fe94 // Whether the origin is newly created within this call, instead of copied // from an existing document's origin or from `origin_to_commit_`. If this is // true, we won't try to compare the nonce of this origin (if it's opaque) to -@@ -2393,6 +2394,9 @@ scoped_refptr DocumentLoader::CalculateOrigin( +@@ -2390,6 +2391,9 @@ scoped_refptr DocumentLoader::CalculateOrigin( // non-renderer only origin bits will be the same, which will be asserted at // the end of this function. origin = origin_to_commit_; diff --git a/patches/chromium/fix_disabling_background_throttling_in_compositor.patch b/patches/chromium/fix_disabling_background_throttling_in_compositor.patch index 985bbbbac1..22cdaa1f92 100644 --- a/patches/chromium/fix_disabling_background_throttling_in_compositor.patch +++ b/patches/chromium/fix_disabling_background_throttling_in_compositor.patch @@ -53,10 +53,10 @@ index 3aec78e17de2012689c813145f78226867ac879a..5cb8f51c9ef6ac098629970d195eb593 void Compositor::SetSeamlessRefreshRates( const std::vector& seamless_refresh_rates) { diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index d45839ebc7b07ade2ca382e15b1d48dcf7d29106..2c24993f1a509856966bb4a1302db97d976ad4ba 100644 +index c2e748b92103c582802af9b973ebe0c3770ba44d..b36dfec6bec2009b7761ec4ce3739a7f50f1196b 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h -@@ -516,6 +516,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -515,6 +515,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, const cc::LayerTreeSettings& GetLayerTreeSettings() const; @@ -67,7 +67,7 @@ index d45839ebc7b07ade2ca382e15b1d48dcf7d29106..2c24993f1a509856966bb4a1302db97d size_t saved_events_metrics_count_for_testing() const { return host_->saved_events_metrics_count_for_testing(); } -@@ -732,6 +736,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -731,6 +735,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, // See go/report-ux-metrics-at-painting for details. bool animation_started_ = false; diff --git a/patches/chromium/fix_fire_menu_popup_start_for_dynamically_created_aria_menus.patch b/patches/chromium/fix_fire_menu_popup_start_for_dynamically_created_aria_menus.patch index 73f9d9c20c..679a325c3f 100644 --- a/patches/chromium/fix_fire_menu_popup_start_for_dynamically_created_aria_menus.patch +++ b/patches/chromium/fix_fire_menu_popup_start_for_dynamically_created_aria_menus.patch @@ -34,7 +34,7 @@ into Chromium. Bug: 40794596 diff --git a/ui/accessibility/ax_event_generator.cc b/ui/accessibility/ax_event_generator.cc -index 8fe1cacc274c543e6a5f13bb9b3712639f8bbda5..c87c47f34a5f47e9cb7cec04d703335a57f250cd 100644 +index ce044723936adebaee970da8c457b3e4a0f58b15..f4194de88891a3374abe4c5a6c67b01217b26ecf 100644 --- a/ui/accessibility/ax_event_generator.cc +++ b/ui/accessibility/ax_event_generator.cc @@ -4,6 +4,7 @@ diff --git a/patches/chromium/fix_linux_tray_id.patch b/patches/chromium/fix_linux_tray_id.patch index 5e2da04b95..60c3b0437a 100644 --- a/patches/chromium/fix_linux_tray_id.patch +++ b/patches/chromium/fix_linux_tray_id.patch @@ -55,7 +55,7 @@ index 72a61f80eb5dfafe2609ec9e3f8f34c7c84f7abe..af68cc7486c450f9b9765f562fab7185 kPropertyOverlayIconName, "", false); properties_->SetProperty<"s">(kInterfaceStatusNotifierItem, kPropertyStatus, 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 5457f98158a094a5b8768352d2868e3005afd395..13ac4e51019ea68fdccd17aac8a4855bde50964b 100644 +index 83e84d3b07fcf58e21bbbd33eac1f79afb7ab7a5..5a29678f5d69087c06e4449f565eb9c3002889a7 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 @@ -37,7 +37,7 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux, @@ -67,7 +67,7 @@ index 5457f98158a094a5b8768352d2868e3005afd395..13ac4e51019ea68fdccd17aac8a4855b StatusIconLinuxDbus(const StatusIconLinuxDbus&) = delete; StatusIconLinuxDbus& operator=(const StatusIconLinuxDbus&) = delete; -@@ -135,6 +135,8 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux, +@@ -137,6 +137,8 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux, size_t icon_file_id_ = 0; base::FilePath icon_file_; diff --git a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch index 166fe221ca..a271ba7438 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 cccf164d978761dac8148d11fbddfbeb9ecfb048..295a16cd4f1e369c78d34b4da24ea3c830ce20e4 100644 +index cff0f6e772bac73b3f8c2a5b93ab3f8b9caee8d8..5cc6c65ce29579bdcbeee3f3a4edc2ae5f80dbb0 100644 --- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc +++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc @@ -6,6 +6,7 @@ @@ -20,7 +20,7 @@ index cccf164d978761dac8148d11fbddfbeb9ecfb048..295a16cd4f1e369c78d34b4da24ea3c8 #include "chrome/browser/picture_in_picture/picture_in_picture_bounds_cache.h" #include "chrome/browser/ui/browser_navigator_params.h" #include "content/public/browser/document_picture_in_picture_window_controller.h" -@@ -31,8 +32,10 @@ +@@ -32,8 +33,10 @@ #include "base/task/sequenced_task_runner.h" // TODO(crbug.com/421608904): include auto_picture_in_picture_tab_helper for // Android when supporting document PiP. @@ -31,7 +31,7 @@ index cccf164d978761dac8148d11fbddfbeb9ecfb048..295a16cd4f1e369c78d34b4da24ea3c8 #include "chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker.h" #include "chrome/browser/picture_in_picture/picture_in_picture_window.h" #include "media/base/media_switches.h" -@@ -71,6 +74,7 @@ constexpr double kMaxWindowSizeRatio = 0.8; +@@ -72,6 +75,7 @@ constexpr double kMaxWindowSizeRatio = 0.8; // `kMaxWindowSizeRatio`. constexpr double kMaxSiteRequestedWindowSizeRatio = 0.25; @@ -39,7 +39,7 @@ index cccf164d978761dac8148d11fbddfbeb9ecfb048..295a16cd4f1e369c78d34b4da24ea3c8 // Returns true if a document picture-in-picture window should be focused upon // opening it. bool ShouldFocusPictureInPictureWindow(const NavigateParams& params) { -@@ -87,6 +91,7 @@ bool ShouldFocusPictureInPictureWindow(const NavigateParams& params) { +@@ -88,6 +92,7 @@ bool ShouldFocusPictureInPictureWindow(const NavigateParams& params) { // AutoPictureInPictureTabHelper. return !auto_picture_in_picture_tab_helper->IsInAutoPictureInPicture(); } @@ -47,7 +47,7 @@ index cccf164d978761dac8148d11fbddfbeb9ecfb048..295a16cd4f1e369c78d34b4da24ea3c8 // Returns the maximum area in pixels that the site can request a // picture-in-picture window to be. -@@ -220,7 +225,7 @@ bool PictureInPictureWindowManager::ExitPictureInPictureViaWindowUi( +@@ -221,7 +226,7 @@ bool PictureInPictureWindowManager::ExitPictureInPictureViaWindowUi( return false; } @@ -56,7 +56,7 @@ index cccf164d978761dac8148d11fbddfbeb9ecfb048..295a16cd4f1e369c78d34b4da24ea3c8 // 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( -@@ -572,7 +577,7 @@ gfx::Size PictureInPictureWindowManager::GetMaximumWindowSize( +@@ -573,7 +578,7 @@ gfx::Size PictureInPictureWindowManager::GetMaximumWindowSize( // static void PictureInPictureWindowManager::SetWindowParams(NavigateParams& params) { @@ -65,7 +65,7 @@ index cccf164d978761dac8148d11fbddfbeb9ecfb048..295a16cd4f1e369c78d34b4da24ea3c8 // Always show document picture-in-picture in a new window. When this is // not opened via the AutoPictureInPictureTabHelper, focus the window. params.window_action = -@@ -681,6 +686,7 @@ PictureInPictureWindowManager::GetOverlayView( +@@ -682,6 +687,7 @@ PictureInPictureWindowManager::GetOverlayView( return nullptr; } @@ -73,7 +73,7 @@ index cccf164d978761dac8148d11fbddfbeb9ecfb048..295a16cd4f1e369c78d34b4da24ea3c8 // It would be nice to create this in `EnterPictureInPicture*`, but detecting // auto-pip while pip is in the process of opening doesn't work. // -@@ -719,6 +725,8 @@ PictureInPictureWindowManager::GetOverlayView( +@@ -720,6 +726,8 @@ PictureInPictureWindowManager::GetOverlayView( } return overlay_view; @@ -83,10 +83,10 @@ index cccf164d978761dac8148d11fbddfbeb9ecfb048..295a16cd4f1e369c78d34b4da24ea3c8 PictureInPictureOcclusionTracker* diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -index 2efbb38c338884cd47de75b3e4411e87137f31f1..ff0acc5b26b0df07002a4508bc5b51fa86bd5bde 100644 +index a74fa27a7775b64e9bdebde189b11bd5082cfa3e..7249681cf525bb401761ca001ec58f81528f0670 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -@@ -444,11 +444,13 @@ std::unique_ptr VideoOverlayWindowViews::Create( +@@ -447,11 +447,13 @@ std::unique_ptr VideoOverlayWindowViews::Create( #endif // BUILDFLAG(IS_WIN) diff --git a/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch b/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch index b94cfc8455..d90e4b055b 100644 --- a/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch +++ b/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch @@ -13,10 +13,10 @@ messages in the legacy window handle layer. These conditions are regularly hit with WCO-enabled windows on Windows. diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc -index c7794d6a969b407281db12acc027a933a4a82921..382d01ab2f0ad774f7c0d1dc214dd45b6998549a 100644 +index 0ae2e3d4eead8831e8c78ca2cb4d84dbe374f586..af690519ba1e0bffe271e8ff6418907a267ffbba 100644 --- a/content/browser/renderer_host/legacy_render_widget_host_win.cc +++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc -@@ -377,12 +377,12 @@ LRESULT LegacyRenderWidgetHostHWND::OnKeyboardRange(UINT message, +@@ -387,12 +387,12 @@ LRESULT LegacyRenderWidgetHostHWND::OnKeyboardRange(UINT message, LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) { @@ -31,7 +31,7 @@ index c7794d6a969b407281db12acc027a933a4a82921..382d01ab2f0ad774f7c0d1dc214dd45b tme.hwndTrack = hwnd(); tme.dwHoverTime = 0; TrackMouseEvent(&tme); -@@ -421,7 +421,10 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, +@@ -431,7 +431,10 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, // the picture. if (!msg_handled && (message >= WM_NCMOUSEMOVE && message <= WM_NCXBUTTONDBLCLK)) { diff --git a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch index e250b2d552..55d6649e57 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 ccfe78580c2acb9a3afa43d246e1a83cc0e28598..30218b43ce1d57e45e9c265de4edcdce496cda79 100644 +index ff9ad46805b722fb9c93c901a56096e9c4bf8c99..8f1d6cd7ffb1fa59c85609bb61f920d1dfe10ec9 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -3403,6 +3403,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged( +@@ -3405,6 +3405,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged( } } @@ -26,10 +26,10 @@ index ccfe78580c2acb9a3afa43d246e1a83cc0e28598..30218b43ce1d57e45e9c265de4edcdce 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 448104cb33edbf6f2c046c4adbac3185eb4c9cb1..47b2677d2878cb9d5544798ddc49b54d270e1688 100644 +index fd5b673251eec92a16bce809bdee29fa048fd7c9..3717474a5b9094262e420fe68a2ceeeea2d76be5 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h -@@ -662,6 +662,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura +@@ -663,6 +663,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura RenderWidgetHostViewBase* updated_view) override; void OnTextSelectionChanged(TextInputManager* text_input_mangager, RenderWidgetHostViewBase* updated_view) override; @@ -87,10 +87,10 @@ index a4768b51dae6817c9e9a467e9b16e827e0bfebda..83c42b5062aa8193fe2f56e407abe67d // 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 e039e2c82ad75ca4b95763414f7aafb6d3a3dbf2..aaa2b2229dac8c5e8cf590300b436082f6c3773b 100644 +index 68d403eb4242f4380ee048d339e580ec3b2b058c..f8dde06464e3be786306a8e3c2606259a6d5edb4 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -10437,7 +10437,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( +@@ -10435,7 +10435,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( "WebContentsImpl::OnFocusedElementChangedInFrame", "render_frame_host", frame); RenderWidgetHostViewBase* root_view = diff --git a/patches/chromium/fix_pass_trigger_for_global_shortcuts_on_wayland.patch b/patches/chromium/fix_pass_trigger_for_global_shortcuts_on_wayland.patch deleted file mode 100644 index 52ddb31a71..0000000000 --- a/patches/chromium/fix_pass_trigger_for_global_shortcuts_on_wayland.patch +++ /dev/null @@ -1,140 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Mitchell Cohen -Date: Sun, 1 Mar 2026 16:25:13 -0500 -Subject: fix: pass trigger for global shortcuts on Wayland - -Allows the global shortcut portal on Wayland to accept the trigger -values requested by Electron apps, instead of requiring user input. - -This patch should be submitted upstream. - -diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_linux.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_linux.cc -index 37faffac6fbb00d356c7cc4e685441f7c4d32481..31bd60c4638e48e91c95b5df8c943ca13c3bc134 100644 ---- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_linux.cc -+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_linux.cc -@@ -15,6 +15,7 @@ - #include "base/logging.h" - #include "base/nix/xdg_util.h" - #include "base/strings/string_number_conversions.h" -+#include "base/strings/string_util.h" - #include "base/strings/utf_string_conversions.h" - #include "components/dbus/thread_linux/dbus_thread_linux.h" - #include "components/dbus/xdg/portal.h" -@@ -49,6 +50,91 @@ std::string GetShortcutPrefix(const std::string& accelerator_group_id, - .substr(0, 32); - } - -+// Converts a ui::Accelerator to an XDG shortcut string: -+// https://specifications.freedesktop.org/shortcuts-spec/latest/. -+std::string AcceleratorToXdgTrigger(const ui::Accelerator& accelerator) { -+ std::string trigger; -+ -+ if (accelerator.IsCtrlDown()) { -+ trigger += "CTRL+"; -+ } -+ if (accelerator.IsAltDown()) { -+ trigger += "ALT+"; -+ } -+ if (accelerator.IsShiftDown()) { -+ trigger += "SHIFT+"; -+ } -+ if (accelerator.IsCmdDown()) { -+ trigger += "LOGO+"; -+ } -+ -+ ui::KeyboardCode key = accelerator.key_code(); -+ if (key >= ui::VKEY_A && key <= ui::VKEY_Z) { -+ trigger += base::ToLowerASCII(static_cast(key)); -+ } else if (key >= ui::VKEY_0 && key <= ui::VKEY_9) { -+ trigger += static_cast(key); -+ } else if (key >= ui::VKEY_F1 && key <= ui::VKEY_F24) { -+ trigger += "F" + base::NumberToString(1 + (key - ui::VKEY_F1)); -+ } else { -+ switch (key) { -+ case ui::VKEY_SPACE: -+ trigger += "space"; -+ break; -+ case ui::VKEY_RETURN: -+ trigger += "Return"; -+ break; -+ case ui::VKEY_TAB: -+ trigger += "Tab"; -+ break; -+ case ui::VKEY_ESCAPE: -+ trigger += "Escape"; -+ break; -+ case ui::VKEY_BACK: -+ trigger += "BackSpace"; -+ break; -+ case ui::VKEY_DELETE: -+ trigger += "Delete"; -+ break; -+ case ui::VKEY_INSERT: -+ trigger += "Insert"; -+ break; -+ case ui::VKEY_HOME: -+ trigger += "Home"; -+ break; -+ case ui::VKEY_END: -+ trigger += "End"; -+ break; -+ case ui::VKEY_PRIOR: -+ trigger += "Page_Up"; -+ break; -+ case ui::VKEY_NEXT: -+ trigger += "Page_Down"; -+ break; -+ case ui::VKEY_UP: -+ trigger += "Up"; -+ break; -+ case ui::VKEY_DOWN: -+ trigger += "Down"; -+ break; -+ case ui::VKEY_LEFT: -+ trigger += "Left"; -+ break; -+ case ui::VKEY_RIGHT: -+ trigger += "Right"; -+ break; -+ case ui::VKEY_OEM_COMMA: -+ trigger += "comma"; -+ break; -+ case ui::VKEY_OEM_PERIOD: -+ trigger += "period"; -+ break; -+ default: -+ return ""; -+ } -+ } -+ return trigger; -+} -+ - } // namespace - - GlobalAcceleratorListenerLinux::BoundCommand::BoundCommand() = default; -@@ -292,6 +378,12 @@ void GlobalAcceleratorListenerLinux::BindShortcuts(DbusShortcuts old_shortcuts, - new_props["description"] = - dbus_utils::Variant::Wrap<"s">(std::move(*description)); - } -+ auto preferred_trigger = -+ TakeFromDict(properties, "preferred_trigger"); -+ if (preferred_trigger) { -+ new_props["preferred_trigger"] = -+ dbus_utils::Variant::Wrap<"s">(std::move(*preferred_trigger)); -+ } - shortcuts.emplace_back(id, std::move(new_props)); - } - -@@ -299,6 +391,12 @@ void GlobalAcceleratorListenerLinux::BindShortcuts(DbusShortcuts old_shortcuts, - dbus_xdg::Dictionary props; - props["description"] = dbus_utils::Variant::Wrap<"s">( - base::UTF16ToUTF8(bound_cmd.command.description())); -+ std::string trigger = -+ AcceleratorToXdgTrigger(bound_cmd.command.accelerator()); -+ if (!trigger.empty()) { -+ props["preferred_trigger"] = -+ dbus_utils::Variant::Wrap<"s">(std::move(trigger)); -+ } - shortcuts.emplace_back(modified_id, std::move(props)); - } - diff --git a/patches/chromium/fix_pulseaudio_stream_and_icon_names.patch b/patches/chromium/fix_pulseaudio_stream_and_icon_names.patch index c887d31d46..1387aecb66 100644 --- a/patches/chromium/fix_pulseaudio_stream_and_icon_names.patch +++ b/patches/chromium/fix_pulseaudio_stream_and_icon_names.patch @@ -44,7 +44,7 @@ index 70615782c50d18606c3baa42a223e54f8619bc07..fb67e69f9ff46b432236b46913a1b10d // On Mac, the audio service requires a CFRunLoop provided by a // UI MessageLoop type, to run AVFoundation and CoreAudio code. diff --git a/media/audio/pulse/pulse_util.cc b/media/audio/pulse/pulse_util.cc -index a08e42a464a3894cbf2b8e3cf8a320a33423b719..e5d69506e1585710a2540c91ca51cba7a4692575 100644 +index beaf50810e7071e8b7d95ed204e196a578f87f54..400e8f07417972a241d1152599796afe92e049cc 100644 --- a/media/audio/pulse/pulse_util.cc +++ b/media/audio/pulse/pulse_util.cc @@ -10,6 +10,7 @@ @@ -74,7 +74,7 @@ index a08e42a464a3894cbf2b8e3cf8a320a33423b719..e5d69506e1585710a2540c91ca51cba7 #define PRODUCT_STRING "Chromium" #endif -@@ -236,7 +236,7 @@ bool InitPulse(pa_threaded_mainloop** mainloop, pa_context** context) { +@@ -250,7 +250,7 @@ bool InitPulse(pa_threaded_mainloop** mainloop, pa_context** context) { pa_mainloop_api* pa_mainloop_api = pa_threaded_mainloop_get_api(pa_mainloop); pa_context* pa_context = @@ -83,7 +83,7 @@ index a08e42a464a3894cbf2b8e3cf8a320a33423b719..e5d69506e1585710a2540c91ca51cba7 if (!pa_context) { pa_threaded_mainloop_free(pa_mainloop); return false; -@@ -464,8 +464,11 @@ bool CreateInputStream(pa_threaded_mainloop* mainloop, +@@ -478,8 +478,11 @@ bool CreateInputStream(pa_threaded_mainloop* mainloop, // Create a new recording stream and // tells PulseAudio what the stream icon should be. ScopedPropertyList property_list; @@ -96,7 +96,7 @@ index a08e42a464a3894cbf2b8e3cf8a320a33423b719..e5d69506e1585710a2540c91ca51cba7 *stream = pa_stream_new_with_proplist(context, "RecordStream", &sample_specifications, map, property_list.get()); -@@ -526,7 +529,7 @@ bool CreateOutputStream(raw_ptr* mainloop, +@@ -540,7 +543,7 @@ bool CreateOutputStream(raw_ptr* mainloop, pa_mainloop_api* pa_mainloop_api = pa_threaded_mainloop_get_api(*mainloop); *context = pa_context_new( @@ -105,7 +105,7 @@ index a08e42a464a3894cbf2b8e3cf8a320a33423b719..e5d69506e1585710a2540c91ca51cba7 RETURN_ON_FAILURE(*context, "Failed to create PulseAudio context."); // A state callback must be set before calling pa_threaded_mainloop_lock() or -@@ -574,8 +577,11 @@ bool CreateOutputStream(raw_ptr* mainloop, +@@ -588,8 +591,11 @@ bool CreateOutputStream(raw_ptr* mainloop, // Open playback stream and // tell PulseAudio what the stream icon should be. ScopedPropertyList property_list; diff --git a/patches/chromium/fix_restore_original_resize_performance_on_macos.patch b/patches/chromium/fix_restore_original_resize_performance_on_macos.patch index c32d4b5ca1..9dc522b09c 100644 --- a/patches/chromium/fix_restore_original_resize_performance_on_macos.patch +++ b/patches/chromium/fix_restore_original_resize_performance_on_macos.patch @@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop vs mobile runtimes. i.e. restore the old logic only on desktop platforms diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 06599737a290ba4c52a7d36725aef565d49800bd..fe26e2aeba6fc03201373693d4afa2b78c89e54a 100644 +index 78d0adb9d6db7efa188fd9ecfe3d5a51af451e8f..51de31af6c1961cc8838df122b50e5b8aabcfc67 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2155,9 +2155,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() { +@@ -2156,9 +2156,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() { void RenderWidgetHostImpl::NotifyScreenInfoChanged() { // The resize message (which may not happen immediately) will carry with it // the screen info as well as the new size (if the screen has changed scale 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 037a037557..8b61a9046c 100644 --- a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -59,10 +59,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..a54f1b3351efd2d8f324436f7f35cd43 #endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 8970537416e171d513bc9c015706fb18a574eab6..5bb9fb14dc617edbbf9390ef53c6a8553692539b 100644 +index da1877213a345c012bb1fb2d30e6e659cac6e549..2a7b983f9367f1972a0cac46f3c731415ce3a6fe 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -3207,6 +3207,7 @@ void LocalFrame::RequestExecuteScript( +@@ -3190,6 +3190,7 @@ void LocalFrame::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -70,7 +70,7 @@ index 8970537416e171d513bc9c015706fb18a574eab6..5bb9fb14dc617edbbf9390ef53c6a855 BackForwardCacheAware back_forward_cache_aware, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_behavior) { -@@ -3264,7 +3265,7 @@ void LocalFrame::RequestExecuteScript( +@@ -3247,7 +3248,7 @@ void LocalFrame::RequestExecuteScript( PausableScriptExecutor::CreateAndRun( script_state, std::move(script_sources), execute_script_policy, user_gesture, evaluation_timing, blocking_option, want_result_option, @@ -80,10 +80,10 @@ index 8970537416e171d513bc9c015706fb18a574eab6..5bb9fb14dc617edbbf9390ef53c6a855 void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() { diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h -index 0f119c1170f3379754b03ff38358ed6f191fb578..64024aaa3630bacbaf13b7491ff4ed5453f2abfd 100644 +index dffb6f5850bf0f29eb1aaa3e7d24782dea8e4bdd..70493394ff5e262f975535fc293b1d26d25deca7 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h -@@ -832,6 +832,7 @@ class CORE_EXPORT LocalFrame final +@@ -828,6 +828,7 @@ class CORE_EXPORT LocalFrame final mojom::blink::EvaluationTiming, mojom::blink::LoadEventBlockingOption, WebScriptExecutionCallback, @@ -92,10 +92,10 @@ index 0f119c1170f3379754b03ff38358ed6f191fb578..64024aaa3630bacbaf13b7491ff4ed54 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 fa8b198a3da2a20bf8f63aabf53bbc10266a6f62..20b32c92cd82d1c64e4afac07c7c4f26691859df 100644 +index 72a0bd2cff84fabe6d898f283d803ab03d5dc53c..ba3f447ab19ca1a2f16d406d09d11317bb25d85a 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 -@@ -988,6 +988,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( +@@ -978,6 +978,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( std::move(callback).Run(value ? std::move(*value) : base::Value()); }, std::move(callback)), @@ -211,7 +211,7 @@ index f2c94689450f0333a144ccf82cf147c194896e6b..1c2e9fe36c297f7d614d9ca290e4d13c const mojom::blink::UserActivationOption user_activation_option_; const mojom::blink::LoadEventBlockingOption blocking_option_; diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc -index 7d4039de028e6c7ef87e93792961c338032b261d..41d0a336dc4c91c74c57383f9203f7bca7675b66 100644 +index 8b27e705ead8bf3c25e33646c5f5bb3bc388427b..449affab6b0a587918ea7f4feacf358406439c98 100644 --- a/third_party/blink/renderer/core/frame/web_frame_test.cc +++ b/third_party/blink/renderer/core/frame/web_frame_test.cc @@ -300,6 +300,7 @@ void ExecuteScriptsInMainWorld( @@ -223,10 +223,10 @@ index 7d4039de028e6c7ef87e93792961c338032b261d..41d0a336dc4c91c74c57383f9203f7bc mojom::blink::WantResultOption::kWantResult, wait_for_promise); } diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -index d2b005438958f685e2187d8853926a94211427ad..e3446c84a068a954dfaa809580e8945f359f9e3c 100644 +index f7ef25e72f9e81b048773fcc3e185e90802577e1..6b49d9d264427e6dd3f3be25b421deb69755bf3f 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -@@ -1128,14 +1128,15 @@ void WebLocalFrameImpl::RequestExecuteScript( +@@ -1129,14 +1129,15 @@ void WebLocalFrameImpl::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, diff --git a/patches/chromium/fix_use_fresh_lazynow_for_onendworkitemimpl_after_didruntask.patch b/patches/chromium/fix_use_fresh_lazynow_for_onendworkitemimpl_after_didruntask.patch index a18386d950..3f0614f8c2 100644 --- a/patches/chromium/fix_use_fresh_lazynow_for_onendworkitemimpl_after_didruntask.patch +++ b/patches/chromium/fix_use_fresh_lazynow_for_onendworkitemimpl_after_didruntask.patch @@ -18,10 +18,10 @@ This is upstreamable: the bug exists whenever any TaskObserver::DidProcessTask triggers nested pump activity, which is not forbidden by the contract. diff --git a/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc b/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc -index bb09c99ea0b37a139440d0fe98c7f2f5e9c147e0..d27c34f8090ff54d20d8339c0ad56d37d6d61ab2 100644 +index dc57c725c58fe9f40b25918040cea3d0b76c2597..eab016525a171c8cb8b2554680eaceb75198d049 100644 --- a/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc +++ b/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc -@@ -481,15 +481,22 @@ std::optional ThreadControllerWithMessagePumpImpl::DoWorkImpl( +@@ -477,15 +477,22 @@ std::optional ThreadControllerWithMessagePumpImpl::DoWorkImpl( // `PendingTask` reference dangling. selected_task.reset(); diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index b44ac58e16..96f39c43aa 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 f9179c9f42b16b5c73b7102700410f2d1b83aeab..abce85bb4fb63d1662bbc9ad28a1047f97c6d3c4 100644 +index 7c28694347a1b69b13863b61d2da425e3f5cb44e..4b459cfbcf8e8141adc9c7e85a1f7a9d8cc84d76 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -4913,6 +4913,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -5002,6 +5002,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index f9179c9f42b16b5c73b7102700410f2d1b83aeab..abce85bb4fb63d1662bbc9ad28a1047f } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index eb684232648424fab4ba73b1fc813b0b3f8b809b..42b6fe4eb2c1db7afd6379ae07c1062856ed958e 100644 +index b199cb3d3297c7dc22c066f0d876fa67d8b8f31f..476521b6446c987254dc059232df8b70771aad45 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -350,6 +350,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -349,6 +349,11 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ~ContentBrowserClient() = default; diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index 302a39fa98..65d76263f0 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -41,7 +41,7 @@ index 3909e70dc1425c2cb02624f4b3017784a2ae6c9d..a57b92f02085d6392e6d9d0cc037df6b // Returns whether `Initialize` has already been invoked in the process. // Initialization is a one-way operation (i.e., this method cannot return diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index f32f4077d56ff38e96ff825633fd908242b2ab7a..cd1f308815685d28c506b5c9eb87b24107fa220b 100644 +index 028b9b0a10dc2e315295413c0c7459166ba492ca..1b9a620d1f125cf86b8910e6e35b9915f8b148bc 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc @@ -525,7 +525,8 @@ void SetFeatureFlags() { diff --git a/patches/chromium/gin_mark_argumentholder_as_cppgc_stack_allocated.patch b/patches/chromium/gin_mark_argumentholder_as_cppgc_stack_allocated.patch deleted file mode 100644 index f098e2681f..0000000000 --- a/patches/chromium/gin_mark_argumentholder_as_cppgc_stack_allocated.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: deepak1556 -Date: Tue, 7 Apr 2026 02:34:49 +0900 -Subject: [gin] Mark ArgumentHolder as CPPGC_STACK_ALLOCATED - -ArgumentHolder is always stack-allocated from Invoker. -When ArgType is a pointer to a cppgc-managed type, the blink-gc plugin -reports an error for the raw pointer `value` field: - - [blink-gc] Class 'ArgumentHolder<0, T*>' contains invalid fields. - [blink-gc] Raw pointer field 'value' to a GC managed class. - -Disallow any heap allocations and make the lifetime explicit. - -Backports https://chromium-review.googlesource.com/c/chromium/src/+/7728865 - -diff --git a/gin/function_template.h b/gin/function_template.h -index 873015289db9709c00c32080e5387d9cdfea1f69..bc84040952b79f02df783833005cc9583f3378a5 100644 ---- a/gin/function_template.h -+++ b/gin/function_template.h -@@ -20,6 +20,7 @@ - #include "gin/gin_export.h" - #include "gin/per_isolate_data.h" - #include "gin/public/gin_embedders.h" -+#include "v8/include/cppgc/macros.h" - #include "v8/include/v8-external.h" - #include "v8/include/v8-forward.h" - #include "v8/include/v8-persistent-handle.h" -@@ -162,6 +163,9 @@ GIN_EXPORT void ThrowConversionError(Arguments* args, - // at position |index|. - template - struct ArgumentHolder { -+ CPPGC_STACK_ALLOCATED(); -+ -+ public: - using ArgLocalType = typename CallbackParamTraits::LocalType; - - ArgLocalType value; -@@ -184,6 +188,9 @@ template - std::is_constructible_v::LocalType, - v8::Isolate*>) - struct ArgumentHolder { -+ CPPGC_STACK_ALLOCATED(); -+ -+ public: - using ArgLocalType = typename CallbackParamTraits::LocalType; - - ArgLocalType value; diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index e4cdd66bae..873f8af2f7 100644 --- a/patches/chromium/gritsettings_resource_ids.patch +++ b/patches/chromium/gritsettings_resource_ids.patch @@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch Add electron resources file to the list of resource ids generation. diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec -index ffd47250ce5a6a75471bb65aaf3d65b550be3586..e75f89f05ba0e3cc29d857f76244d777efdf1b84 100644 +index abb2385068a96e0414b1d9cab0ad396840cdfe52..49530c4466e03ce646421d0747f57c347904e405 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -1678,6 +1678,11 @@ +@@ -1691,6 +1691,11 @@ "includes": [12000], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index 0098a6b3bf..c7a56405f9 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -18,7 +18,7 @@ index fdc3442590bddda969681d49c451d32f086bd5d1..b6fd63c0c845e5d7648e8693f1639b1f # on GTK. "//examples:peerconnection_client", diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn -index 75a94f4deaec7b71fc54911e7dec6c90e42670db..a77cdc899faaf31ae403c0566f821b965e08b010 100644 +index 517852620cb389b3946a85698ddad7206a3ae116..7e05f950855e0aba4f5d9e4042bcb3531a587426 100644 --- a/ui/ozone/platform/x11/BUILD.gn +++ b/ui/ozone/platform/x11/BUILD.gn @@ -6,7 +6,7 @@ import("//build/config/chromeos/ui_mode.gni") diff --git a/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch b/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch index f69d3eea68..c1813d9c0a 100644 --- a/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch +++ b/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch @@ -8,7 +8,7 @@ require a largeish patch to get working, so just redirect it to our implementation instead. diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc -index 50e5ac31c57cab1476df494da879615b305a93f3..4e600c23a554dfa63acbe6805ee8374156191377 100644 +index 4b5e891fc35806a4b42f5737a4b9669f5469cc06..74acb8a8d14930b2fe8781670ceefafba9ae06cd 100644 --- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc +++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc @@ -12,8 +12,8 @@ @@ -29,5 +29,5 @@ index 50e5ac31c57cab1476df494da879615b305a93f3..4e600c23a554dfa63acbe6805ee83741 - &extensions::mime_handlers::SendExecuteMimeTypeHandlerEvent, + &extensions::StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent, extension_id, stream_id, embedded, frame_tree_node_id_, - std::move(transferrable_loader), response_url, internal_id)); - + std::move(transferrable_loader), response_url, internal_id, + response_head->mime_type)); diff --git a/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch index b65397cfb3..34b018a6dd 100644 --- a/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch +++ b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch @@ -9,10 +9,10 @@ be created for each child process, despite logs being redirected to a file. diff --git a/content/app/content_main.cc b/content/app/content_main.cc -index f2b1cdff827eae3726febe590f2f30b5f6d89046..dcce405488dd4c61c218a6b6c356d5932de99fb2 100644 +index 453e967652ec2bcc496880aeb25f3df922c3a65e..e19921c129ca1d4d1abfec71d99c0570ef46cfab 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc -@@ -337,16 +337,14 @@ NO_STACK_PROTECTOR int RunContentProcess( +@@ -335,16 +335,14 @@ NO_STACK_PROTECTOR int RunContentProcess( #if BUILDFLAG(IS_WIN) base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 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 0f50f92266..e2f15c1008 100644 --- a/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch +++ b/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch @@ -50,10 +50,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to system priority. diff --git a/base/BUILD.gn b/base/BUILD.gn -index aad39d792791fb1e17d7a529eb234f74fdb65b09..95262f1cb611bfa9ac61321312b0aa5a979900cd 100644 +index 1662010d02bd17c20bd9f3d240053e9942b16ba4..87824c787f6c4eea0f1772d515d3093edd469baf 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1086,6 +1086,7 @@ component("base") { +@@ -1083,6 +1083,7 @@ component("base") { "//build:ios_buildflags", "//build/config/compiler:compiler_buildflags", "//third_party/modp_b64", @@ -62,10 +62,10 @@ index aad39d792791fb1e17d7a529eb234f74fdb65b09..95262f1cb611bfa9ac61321312b0aa5a # Used by metrics/crc32 diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn -index 2cc49d83a83c6c64780da3f2caa009908a36dd7c..e2941ac5177d3ca59859482b668b716f58d6f5d4 100644 +index f2e33bd815cb93747e20d6591068dc7d1e1789a8..51a4eb83881d83122408787a4f002a4c114ccaec 100644 --- a/base/allocator/BUILD.gn +++ b/base/allocator/BUILD.gn -@@ -28,6 +28,7 @@ if (is_apple) { +@@ -29,6 +29,7 @@ if (is_apple) { deps = [ ":buildflags", "//base/allocator/partition_allocator:buildflags", @@ -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 51a9d1fef7b2dbfef69f8474d74d45b69f16219d..cd61d8ae6ac772f8b8c28157e21b439cdb87dcca 100644 +index a47be61b7d570370aa9427facbe0c85abfbe0810..b3953175756c0b99eb2a9d62704b94179d2e4da7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn +++ b/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn -@@ -978,6 +978,7 @@ if (is_clang_or_gcc) { +@@ -980,6 +980,7 @@ if (is_clang_or_gcc) { ":allocator_base", ":allocator_core", ":buildflags", @@ -388,10 +388,10 @@ index f240dc22ee391c98c8768af7141b7447b6507cc6..69bfbbf0f58ca3b05a601bea87b14dcf using crypto::apple::KeychainV2; diff --git a/components/os_crypt/sync/BUILD.gn b/components/os_crypt/sync/BUILD.gn -index 2ee822cd0c8293c7a742ef4a07499043643f7ac0..3b1c34e213b0990b8f0823228a1a02c5bf0c7198 100644 +index f75238dedb47ff7927c715f21befede9cdc97615..e90e275b33bb88c6b1e8a7044ca6eb382460b467 100644 --- a/components/os_crypt/sync/BUILD.gn +++ b/components/os_crypt/sync/BUILD.gn -@@ -58,6 +58,7 @@ component("sync") { +@@ -52,6 +52,7 @@ component("sync") { deps += [ "//components/os_crypt/common:keychain_password_mac", "//crypto:mock_apple_keychain", @@ -640,10 +640,10 @@ 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 a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3e5edf593 100644 +index 7b9d0983563148493a32b60fe2154b6d6fa6100c..f200710faa973822367f5e12037126fef31cac85 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 @@ +@@ -23,6 +23,7 @@ #import "components/remote_cocoa/app_shim/views_nswindow_delegate.h" #import "components/remote_cocoa/app_shim/window_touch_bar_delegate.h" #include "components/remote_cocoa/common/native_widget_ns_window_host.mojom.h" @@ -651,7 +651,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 #include "ui/accessibility/platform/ax_platform_node.h" #import "ui/base/cocoa/user_interface_item_command_handler.h" #import "ui/base/cocoa/window_size_constants.h" -@@ -109,20 +110,24 @@ void OrderChildWindow(NSWindow* child_window, +@@ -110,20 +111,24 @@ void OrderChildWindow(NSWindow* child_window, } // namespace @@ -677,7 +677,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 @end struct NSEdgeAndCornerThicknesses { -@@ -159,13 +164,50 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event; +@@ -163,13 +168,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 { @@ -688,33 +688,13 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 +#else + // For MAS builds, approximate the resize direction check. + if (self.window.styleMask & NSWindowStyleMaskResizable) { -+ // Match Electron's frameless resize affordances: -+ // - 5pt resize handles along edges -+ // - 16pt resize hot-zone at corners -+ // -+ // If we misclassify a resize as a drag, we can end up with a window that -+ // moves while it is being resized (most noticeable near corners). -+ constexpr CGFloat kResizeInsideBoundsSize = 5.0; -+ constexpr CGFloat kResizeAreaCornerSize = 16.0; ++ constexpr CGFloat kResizeThreshold = 5.0; + NSPoint location = event.locationInWindow; + NSRect frame = self.window.frame; + CGFloat width = NSWidth(frame); + CGFloat height = NSHeight(frame); -+ -+ const bool in_left_edge = location.x < kResizeInsideBoundsSize; -+ const bool in_right_edge = location.x > width - kResizeInsideBoundsSize; -+ const bool in_bottom_edge = location.y < kResizeInsideBoundsSize; -+ const bool in_top_edge = location.y > height - kResizeInsideBoundsSize; -+ -+ const bool in_left_corner_zone = location.x < kResizeAreaCornerSize; -+ const bool in_right_corner_zone = location.x > width - kResizeAreaCornerSize; -+ const bool in_bottom_corner_zone = location.y < kResizeAreaCornerSize; -+ const bool in_top_corner_zone = location.y > height - kResizeAreaCornerSize; -+ const bool in_corner = (in_left_corner_zone || in_right_corner_zone) && -+ (in_bottom_corner_zone || in_top_corner_zone); -+ -+ if (in_left_edge || in_right_edge || in_bottom_edge || in_top_edge || -+ in_corner) { ++ if (location.x < kResizeThreshold || location.x > width - kResizeThreshold || ++ location.y < kResizeThreshold || location.y > height - kResizeThreshold) { + return; + } + } @@ -728,7 +708,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 @implementation NativeWidgetMacNSWindowTitledFrame - (void)mouseDown:(NSEvent*)event { if (self.window.isMovable) -@@ -193,6 +235,8 @@ - (BOOL)usesCustomDrawing { +@@ -197,6 +219,8 @@ - (BOOL)usesCustomDrawing { } @end @@ -737,7 +717,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 @implementation NativeWidgetMacNSWindow { @private CommandDispatcher* __strong _commandDispatcher; -@@ -268,6 +312,7 @@ - (BOOL)invokeOriginalIsVisibleForTesting { +@@ -272,6 +296,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. @@ -745,7 +725,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 - (void)_zoomToScreenEdge:(NSUInteger)edge { if (self.parentWindow) { [self.parentWindow _zoomToScreenEdge:edge]; -@@ -275,6 +320,7 @@ - (void)_zoomToScreenEdge:(NSUInteger)edge { +@@ -279,6 +304,7 @@ - (void)_zoomToScreenEdge:(NSUInteger)edge { [super _zoomToScreenEdge:edge]; } } @@ -753,7 +733,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 // This override helps diagnose lifetime issues in crash stacktraces by // inserting a symbol on NativeWidgetMacNSWindow and should be kept even if it -@@ -407,6 +453,8 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -411,6 +437,8 @@ - (NSAccessibilityRole)accessibilityRole { // NSWindow overrides. @@ -762,7 +742,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { if (windowStyle & NSWindowStyleMaskTitled) { if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class]) -@@ -418,6 +466,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { +@@ -422,6 +450,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { return [super frameViewClassForStyleMask:windowStyle]; } @@ -771,7 +751,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen { if (self.isHeadless || self.parentWindow) { // AppKit's default implementation moves child windows down to avoid -@@ -455,12 +505,14 @@ - (BOOL)_usesCustomDrawing { +@@ -478,12 +508,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 +766,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 + (void)_getExteriorResizeEdgeThicknesses: (NSEdgeAndCornerThicknesses*)outThicknesses -@@ -714,9 +766,11 @@ - (id)archiver:(NSKeyedArchiver*)archiver willEncodeObject:(id)object { +@@ -763,9 +795,11 @@ - (id)archiver:(NSKeyedArchiver*)archiver willEncodeObject:(id)object { } - (void)saveRestorableState { @@ -798,7 +778,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 // Certain conditions, such as in the Speedometer 3 benchmark, can trigger a // rapid succession of calls to saveRestorableState. If there's no pending -@@ -783,6 +837,7 @@ - (void)reallySaveRestorableState { +@@ -832,6 +866,7 @@ - (void)reallySaveRestorableState { // affects its restorable state changes. - (void)invalidateRestorableState { [super invalidateRestorableState]; @@ -806,7 +786,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 if ([self _isConsideredOpenForPersistentState]) { if (_willUpdateRestorableState) return; -@@ -795,6 +850,7 @@ - (void)invalidateRestorableState { +@@ -844,6 +879,7 @@ - (void)invalidateRestorableState { _willUpdateRestorableState = NO; [NSObject cancelPreviousPerformRequestsWithTarget:self]; } @@ -814,7 +794,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 } // On newer SDKs, _canMiniaturize respects NSWindowStyleMaskMiniaturizable in -@@ -971,6 +1027,7 @@ - (void)maybeRemoveTreeFromOrderingGroups { +@@ -1020,6 +1056,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 +802,7 @@ index a5fc9193711a7cc2eee45171178c070321177ca2..b4554165e3c5344c7ff0b21ccc3986c3 if (![NSWindow instancesRespondToSelector:@selector(_removeFromGroups:)]) { base::debug::DumpWithoutCrashing(); return; -@@ -988,6 +1045,7 @@ - (void)maybeRemoveTreeFromOrderingGroups { +@@ -1037,6 +1074,7 @@ - (void)maybeRemoveTreeFromOrderingGroups { [currentWindow _removeFromGroups:child]; } } @@ -889,7 +869,7 @@ index d58c5eff9f8fbca96d0912ab9a19d06974fd8016..94ee727830545ff1576685722c0fd0dd void NativeWidgetNSWindowBridge::SetColorMode( diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 42a96534b0d6ec220626b888bfc97f382dfc1210..3f9d9afc88b7622c28ba2167c305e2a54affb8d3 100644 +index 668242b6712cbf11a2eb665956186baadd03cd5e..1cb64b8a359f2761e75e7b43391734bde0d40054 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -390,6 +390,7 @@ viz_component("service") { @@ -994,10 +974,10 @@ index 664e12c07204feeb5be16581fe51e8adc4b898dd..38159d146cdf71f84611d58e2983418a return kAttributes; } diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 718b28f411f7c32af45dc1e1cf4b4deeba78b06b..3a2189e97b99b2b2cf0308feeeddb9a249b3edb5 100644 +index 48bcbfdb8f181a2a1d6b09748e497de17e4b0aa6..32e13200ef540b470f8cc1a51cd5a40f1a79d3bf 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -363,6 +363,7 @@ source_set("browser") { +@@ -361,6 +361,7 @@ source_set("browser") { "//ui/webui/resources", "//v8", "//v8:v8_version", @@ -1006,7 +986,7 @@ index 718b28f411f7c32af45dc1e1cf4b4deeba78b06b..3a2189e97b99b2b2cf0308feeeddb9a2 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 d4320df856533ef75f943deeac82119c746f5e20..c6e9cc8fd3b3e152493086a6f401d1c6ce318725 100644 +index 4cecf7a28fbf85f6e4ed2290b872b5d3e8e0c008..d49abe8b6a867407ef5442a4e45efc18e75cd7ce 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h @@ -25,6 +25,7 @@ @@ -1027,7 +1007,7 @@ index d4320df856533ef75f943deeac82119c746f5e20..c6e9cc8fd3b3e152493086a6f401d1c6 @class RenderWidgetHostViewCocoa; namespace content { -@@ -680,9 +683,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac +@@ -681,9 +684,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac // EnsureSurfaceSynchronizedForWebTest(). uint32_t latest_capture_sequence_number_ = 0u; @@ -1040,7 +1020,7 @@ index d4320df856533ef75f943deeac82119c746f5e20..c6e9cc8fd3b3e152493086a6f401d1c6 // Used to force the NSApplication's focused accessibility element to be the // content::BrowserAccessibilityCocoa accessibility tree when the NSView for diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 63041c4311293c53d370522646012cde803e0a99..886b3e87e9041931d3cb59ef775b5012e8e2f908 100644 +index 6eab22fa2589038c402fe4bf0a54e42fda5eb1dd..6e5c03522683f1c19d4b9c9e65c1f4716b9c3f49 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -53,6 +53,7 @@ @@ -1062,7 +1042,7 @@ index 63041c4311293c53d370522646012cde803e0a99..886b3e87e9041931d3cb59ef775b5012 // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling // pointers. `ns_view_` gets reinitialized later in this method. -@@ -1720,10 +1723,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1721,10 +1724,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -1075,7 +1055,7 @@ index 63041c4311293c53d370522646012cde803e0a99..886b3e87e9041931d3cb59ef775b5012 return gfx::NativeViewAccessible([GetInProcessNSView() window]); } -@@ -1775,9 +1780,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1776,9 +1781,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -1087,7 +1067,7 @@ index 63041c4311293c53d370522646012cde803e0a99..886b3e87e9041931d3cb59ef775b5012 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2307,20 +2314,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2308,20 +2315,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken( GetRenderWidgetAccessibilityTokenCallback callback) { base::ProcessId pid = getpid(); @@ -1209,7 +1189,7 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe } // namespace content diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn -index ec792aa7e050550721cd221bfe8ff335e22e90ef..4521cc9e247c44248627c12b9eda0961f837d744 100644 +index 9f3616bd82b939838249654ce6530e0f624cc03d..becc1ecfe9187121d84f4001671c4ff4a095f677 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn @@ -701,6 +701,7 @@ static_library("test_support") { @@ -1229,7 +1209,7 @@ index ec792aa7e050550721cd221bfe8ff335e22e90ef..4521cc9e247c44248627c12b9eda0961 } mojom("content_test_mojo_bindings") { -@@ -2078,6 +2081,7 @@ test("content_browsertests") { +@@ -2073,6 +2076,7 @@ test("content_browsertests") { "//ui/shell_dialogs", "//ui/snapshot", "//ui/webui:test_support", @@ -1237,7 +1217,7 @@ index ec792aa7e050550721cd221bfe8ff335e22e90ef..4521cc9e247c44248627c12b9eda0961 ] if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) { -@@ -3446,6 +3450,7 @@ test("content_unittests") { +@@ -3450,6 +3454,7 @@ test("content_unittests") { "//ui/shell_dialogs", "//ui/webui:test_support", "//url", @@ -1398,10 +1378,10 @@ index 75178516b53665c82195f795c5e4498c588e51c9..10e453a18813d3078dc4f01ab040acc6 } // namespace #endif diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn -index fe250ad7f81a503f2db084e6b55dafc06e35e2fb..23ae43042df5cd5bf08db5d1c736be6daee96e06 100644 +index 9fc0b476389adfedac91066935ed8a33e80b9e7e..bde6df33160fc8a895722d65bbddb4577c515d89 100644 --- a/net/dns/BUILD.gn +++ b/net/dns/BUILD.gn -@@ -223,6 +223,8 @@ source_set("dns") { +@@ -222,6 +222,8 @@ source_set("dns") { ":host_resolver_manager", ":mdns_client", ] @@ -2066,10 +2046,10 @@ index dcf493d62990018040a3f84b6f875af737bd2214..3d1c4dcc9ee0bbfdac15f40d9c74e9f3 void DisplayCALayerTree::GotIOSurfaceFrame( diff --git a/ui/accessibility/platform/BUILD.gn b/ui/accessibility/platform/BUILD.gn -index 54d483d6b3f1a56573e21b1f873b8dee8fc25a0f..33bc8c9ef097a907060ed347dca2ad46b6d081f5 100644 +index 2482c9e1903dd7054783248879c182b018dae574..919720086b8c4f839ce0e4e6546f9c2299a79031 100644 --- a/ui/accessibility/platform/BUILD.gn +++ b/ui/accessibility/platform/BUILD.gn -@@ -299,6 +299,7 @@ component("platform") { +@@ -301,6 +301,7 @@ component("platform") { "AppKit.framework", "Foundation.framework", ] @@ -2160,7 +2140,7 @@ index ef031ba14e4c649f6f3a5718ac521e6b424d64cb..38e528450196b4dbd5fa6a25b96baa10 // Accessible object if (AXElementWrapper::IsValidElement(value)) { diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index e4b9053c9333598ec0347ec84a4d898d8eedca6a..f08d8343a6bb665be57c9e6766476c71efa47143 100644 +index de7a87a6e4540b38cd5c60817f68332be45b87b8..00689ea1b52a425f07a6b0fb9c5858d339e079ba 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -355,6 +355,13 @@ component("base") { @@ -2177,7 +2157,7 @@ index e4b9053c9333598ec0347ec84a4d898d8eedca6a..f08d8343a6bb665be57c9e6766476c71 if (is_ios) { sources += [ "device_form_factor_ios.mm", -@@ -503,6 +510,12 @@ component("base") { +@@ -510,6 +517,12 @@ component("base") { "//url", ] @@ -2379,10 +2359,10 @@ index bbe355cf69f160866188216cc274d75bd35603db..06ee100d7ea2e892dbf3c0b1adc96c50 // enough. return PlatformFontMac::SystemFontType::kGeneral; diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn -index 9a160c5209cb4e4640aa130b9cb2747cf6338f77..d42a2979c1957cbd51f894682f0ca98c9cf4eed0 100644 +index 1bd7242e935915d201aef63abe41a101c5b51fe9..c6ea05641c994b4bfe7f2eb839071e5a16f8f229 100644 --- a/ui/views/BUILD.gn +++ b/ui/views/BUILD.gn -@@ -734,6 +734,8 @@ component("views") { +@@ -747,6 +747,8 @@ component("views") { "IOSurface.framework", "QuartzCore.framework", ] @@ -2391,7 +2371,7 @@ index 9a160c5209cb4e4640aa130b9cb2747cf6338f77..d42a2979c1957cbd51f894682f0ca98c } if (is_win) { -@@ -1150,6 +1152,8 @@ source_set("test_support") { +@@ -1163,6 +1165,8 @@ source_set("test_support") { "//ui/base/mojom:ui_base_types", ] 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 c3e2fa0500..9ebc60d1b2 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 68b3acc5a4e67fee975fd982f252cbf46c28ccac..cf1001557f2f59747ceb394ab2c93b4bf379dafb 100644 +index eec7048a2f29818318f4150db86541817ea5ff97..b074742f7b0e8c151a6a00354688f90039646ba6 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -173,6 +173,11 @@ @@ -134,7 +134,7 @@ index 68b3acc5a4e67fee975fd982f252cbf46c28ccac..cf1001557f2f59747ceb394ab2c93b4b constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::NetworkContextHttpAuthPreferences:: -@@ -1081,6 +1191,13 @@ void NetworkContext::SetClient( +@@ -1079,6 +1189,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -148,7 +148,7 @@ index 68b3acc5a4e67fee975fd982f252cbf46c28ccac..cf1001557f2f59747ceb394ab2c93b4b void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2800,6 +2917,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2799,6 +2916,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( cert_verifier = std::make_unique( std::make_unique( std::move(cert_verifier))); @@ -160,7 +160,7 @@ index 68b3acc5a4e67fee975fd982f252cbf46c28ccac..cf1001557f2f59747ceb394ab2c93b4b builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 54a5feca1fbec658039826304f27283bd9d9c15a..04e6e884dccbb680a39f2b9c8a54de162e056a30 100644 +index 1fc4eb85469af5b86a5eb91eb95b87a2112b7ccc..7701ace7017b6add531054062eec4d9370d281db 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -122,6 +122,7 @@ class SimpleUrlPatternMatcher; @@ -180,7 +180,7 @@ index 54a5feca1fbec658039826304f27283bd9d9c15a..04e6e884dccbb680a39f2b9c8a54de16 void ResetURLLoaderFactories() override; void GetViaObliviousHttp( mojom::ObliviousHttpRequestPtr request, -@@ -1002,6 +1005,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -1005,6 +1008,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -190,10 +190,10 @@ index 54a5feca1fbec658039826304f27283bd9d9c15a..04e6e884dccbb680a39f2b9c8a54de16 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 152bffb4e6565437e867b79364c594305350047f..6c43c2985123525793dd6b60c9d7d7c1db7fdf04 100644 +index 3089cd0ef20a1869d388618ec6b2d9910da5ad1e..38a9c1acc1559e88e8abb37332e03fd53844d579 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -325,6 +325,17 @@ struct SocketBrokerRemotes { +@@ -330,6 +330,17 @@ struct SocketBrokerRemotes { pending_remote server; }; @@ -211,7 +211,7 @@ index 152bffb4e6565437e867b79364c594305350047f..6c43c2985123525793dd6b60c9d7d7c1 // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -981,6 +992,9 @@ interface NetworkContext { +@@ -986,6 +997,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); @@ -222,7 +222,7 @@ index 152bffb4e6565437e867b79364c594305350047f..6c43c2985123525793dd6b60c9d7d7c1 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 8b419ec4a949551557eba8c84589a18147b78c5d..b472be0acdc0cd4971e6e0a9e623bc1c84d07a02 100644 +index 62a87aeb50e47340bb9306496c105610f6d3487e..897aa084556967b8b8212ae268886f781284f684 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h @@ -63,6 +63,8 @@ class TestNetworkContext : public mojom::NetworkContext { diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index ff97379ca7..5088ea2398 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -7,10 +7,10 @@ Pass RenderFrameHost through to PlatformNotificationService so Electron can identify which renderer a notification came from. diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc -index 9e1af7cab8052f02a65ca212c3777b1b1773b8ab..5a421620a971f87dd5e86cd4252de5ea5c4bd309 100644 +index 16ef14e1fba28b43fe23214fb299eee3b152673d..5127f296bcf5f65c83b91defb1133de281a3ac19 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc -@@ -266,6 +266,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( +@@ -265,6 +265,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( // TODO(awdf): Rename to DisplayNonPersistentNotification (Similar for Close) void PlatformNotificationServiceImpl::DisplayNotification( @@ -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 bdf3d9ca4192818a33438dde4dd23ba40996bf00..3d7ccd3becf0ff3cc7003b9159dec7765d5f82c6 100644 +index f2667048586d0376248dfb8a71678a3c1f11d55e..1b5b8660a7c4f6d813bca5b2ea3c4925472e594f 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2385,7 +2385,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2441,7 +2441,7 @@ void RenderProcessHostImpl::CreateNotificationService( case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker: case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -145,7 +145,7 @@ index bdf3d9ca4192818a33438dde4dd23ba40996bf00..3d7ccd3becf0ff3cc7003b9159dec776 creator_type, std::move(receiver)); break; } -@@ -2393,7 +2393,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2449,7 +2449,7 @@ void RenderProcessHostImpl::CreateNotificationService( CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch b/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch index b1a8720c8b..f1362a5b37 100644 --- a/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch +++ b/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch @@ -36,7 +36,7 @@ index 187335d304774643bdec345e7b52be3fe0b105f9..207a161b30f1a52458aced03f9f777a4 Microsoft::WRL::ComPtr d3d11_texture; diff --git a/media/video/renderable_mappable_shared_image_video_frame_pool.cc b/media/video/renderable_mappable_shared_image_video_frame_pool.cc -index 6b1abdebe1fb0043f535e731d0bd14a6d3e3c083..cde2239a516133fedb46dc4bd06b791a1a4d12aa 100644 +index 7354aa4925d0ac07aa61858c63fae72c3fd7327d..89ec632cd0a118f27185a5cbc41408258b3d7927 100644 --- a/media/video/renderable_mappable_shared_image_video_frame_pool.cc +++ b/media/video/renderable_mappable_shared_image_video_frame_pool.cc @@ -212,6 +212,24 @@ bool FrameResources::Initialize(VideoPixelFormat format, diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index b3d5378677..7ce5cb6ee5 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -38,10 +38,10 @@ index a7a637438116a1c7846194dea4412100a45c9331..bb3877d546bfea141d3d6ebb396b88fa ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground, kCloseButtonIconSize)); diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87137f31f1 100644 +index 586b8fca47042e29531246c2e819b0a9b251372a..a74fa27a7775b64e9bdebde189b11bd5082cfa3e 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -@@ -17,12 +17,16 @@ +@@ -17,13 +17,17 @@ #include "base/time/time.h" #include "base/timer/timer.h" #include "build/build_config.h" @@ -54,11 +54,12 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" + #include "chrome/browser/ui/browser_window/public/browser_window_interface.h" +#endif #include "chrome/browser/ui/color/chrome_color_id.h" #include "chrome/browser/ui/views/overlay/back_to_tab_button.h" #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h" -@@ -31,8 +35,10 @@ +@@ -32,8 +36,10 @@ #include "chrome/browser/ui/views/overlay/hang_up_button.h" #include "chrome/browser/ui/views/overlay/minimize_button.h" #include "chrome/browser/ui/views/overlay/overlay_controls_fade_animation.h" @@ -69,7 +70,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 #include "chrome/browser/ui/views/overlay/playback_image_button.h" #include "chrome/browser/ui/views/overlay/resize_handle_button.h" #include "chrome/browser/ui/views/overlay/simple_overlay_window_image_button.h" -@@ -80,7 +86,7 @@ +@@ -81,7 +87,7 @@ #include "ui/aura/window.h" #endif @@ -78,16 +79,16 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 #include "chrome/browser/shell_integration_win.h" #include "content/public/browser/render_widget_host_view.h" #include "ui/aura/window.h" -@@ -402,7 +408,7 @@ std::unique_ptr VideoOverlayWindowViews::Create( +@@ -403,7 +409,7 @@ std::unique_ptr VideoOverlayWindowViews::Create( overlay_window->Init(std::move(params)); overlay_window->OnRootViewReady(); -#if BUILDFLAG(IS_WIN) +#if 0 std::wstring app_user_model_id; - Browser* browser = chrome::FindBrowserWithTab(controller->GetWebContents()); - if (browser) { -@@ -704,6 +710,7 @@ void VideoOverlayWindowViews::OnMouseEvent(ui::MouseEvent* event) { + BrowserWindowInterface* browser = + chrome::FindBrowserWithTab(controller->GetWebContents()); +@@ -707,6 +713,7 @@ void VideoOverlayWindowViews::OnMouseEvent(ui::MouseEvent* event) { } case ui::EventType::kMousePressed: @@ -95,7 +96,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 // Hide the live caption dialog if it's visible and the user clicks // outside of it. if (live_caption_dialog_ && live_caption_dialog_->GetVisible() && -@@ -712,6 +719,7 @@ void VideoOverlayWindowViews::OnMouseEvent(ui::MouseEvent* event) { +@@ -715,6 +722,7 @@ void VideoOverlayWindowViews::OnMouseEvent(ui::MouseEvent* event) { SetLiveCaptionDialogVisibility(false); return; } @@ -103,7 +104,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 break; default: -@@ -747,11 +755,11 @@ bool VideoOverlayWindowViews::HideLiveCaptionDialogForGestureIfNecessary( +@@ -750,11 +758,11 @@ bool VideoOverlayWindowViews::HideLiveCaptionDialogForGestureIfNecessary( if (event->type() != ui::EventType::kGestureTap) { return false; } @@ -117,7 +118,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 if (!GetLiveCaptionDialogBounds().Contains(event->location())) { SetLiveCaptionDialogVisibility(false); event->SetHandled(); -@@ -1238,6 +1246,7 @@ void VideoOverlayWindowViews::SetUpViews() { +@@ -1241,6 +1249,7 @@ void VideoOverlayWindowViews::SetUpViews() { timestamp->SetBackgroundColor(SK_ColorTRANSPARENT); timestamp->SetHorizontalAlignment(gfx::ALIGN_LEFT); @@ -125,7 +126,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 auto live_status = std::make_unique( l10n_util::GetStringUTF16(IDS_PICTURE_IN_PICTURE_LIVE_STATUS_TEXT), views::style::CONTEXT_LABEL, views::style::STYLE_CAPTION_BOLD); -@@ -1257,6 +1266,7 @@ void VideoOverlayWindowViews::SetUpViews() { +@@ -1260,6 +1269,7 @@ void VideoOverlayWindowViews::SetUpViews() { Profile::FromBrowserContext( controller_->GetWebContents()->GetBrowserContext())); live_caption_dialog->SetVisible(false); @@ -133,7 +134,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 auto toggle_microphone_button = std::make_unique(base::BindRepeating( -@@ -1390,13 +1400,15 @@ void VideoOverlayWindowViews::SetUpViews() { +@@ -1393,13 +1403,15 @@ void VideoOverlayWindowViews::SetUpViews() { timestamp_ = playback_controls_container_view_->AddChildView(std::move(timestamp)); @@ -150,7 +151,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 toggle_camera_button_ = vc_controls_container_view_->AddChildView( std::move(toggle_camera_button)); -@@ -1680,6 +1692,7 @@ void VideoOverlayWindowViews::OnUpdateControlsBounds() { +@@ -1683,6 +1695,7 @@ void VideoOverlayWindowViews::OnUpdateControlsBounds() { timestamp_->SetSize({max_timestamp_width, kTimestampHeight}); timestamp_->SetVisible(!is_live_); @@ -158,7 +159,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 live_status_->SetPosition(timestamp_position); live_status_->SetMaximumWidthSingleLine(max_timestamp_width); live_status_->SetSize( -@@ -1687,7 +1700,6 @@ void VideoOverlayWindowViews::OnUpdateControlsBounds() { +@@ -1690,7 +1703,6 @@ void VideoOverlayWindowViews::OnUpdateControlsBounds() { .width(), kTimestampHeight}); live_status_->SetVisible(is_live_); @@ -166,7 +167,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 gfx::Rect live_caption_button_bounds( bottom_controls_bounds.right() - kBottomControlsHorizontalMargin - kActionButtonSize.width(), -@@ -1706,7 +1718,7 @@ void VideoOverlayWindowViews::OnUpdateControlsBounds() { +@@ -1709,7 +1721,7 @@ void VideoOverlayWindowViews::OnUpdateControlsBounds() { live_caption_dialog_->SetPosition( {live_caption_button_bounds.right() - live_caption_dialog_->width(), live_caption_button_bounds.y() - live_caption_dialog_->height()}); @@ -175,7 +176,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 // The play/pause button and replay/forward 10 seconds buttons should not be // visible while dragging the progress bar or for live media. const bool is_dragging_progress_bar = -@@ -2130,14 +2142,20 @@ gfx::Rect VideoOverlayWindowViews::GetProgressViewBounds() { +@@ -2133,14 +2145,20 @@ gfx::Rect VideoOverlayWindowViews::GetProgressViewBounds() { } gfx::Rect VideoOverlayWindowViews::GetLiveCaptionButtonBounds() { @@ -196,7 +197,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 } gfx::Rect VideoOverlayWindowViews::GetToggleMuteButtonBounds() { -@@ -2149,6 +2167,7 @@ gfx::Rect VideoOverlayWindowViews::GetToggleMuteButtonBounds() { +@@ -2152,6 +2170,7 @@ gfx::Rect VideoOverlayWindowViews::GetToggleMuteButtonBounds() { bool VideoOverlayWindowViews::HasHighMediaEngagement( const url::Origin& origin) const { @@ -204,7 +205,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 MediaEngagementService* service = MediaEngagementService::Get(Profile::FromBrowserContext( GetController()->GetWebContents()->GetBrowserContext())); -@@ -2157,6 +2176,8 @@ bool VideoOverlayWindowViews::HasHighMediaEngagement( +@@ -2160,6 +2179,8 @@ bool VideoOverlayWindowViews::HasHighMediaEngagement( } return service->HasHighEngagement(origin); @@ -213,7 +214,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 } bool VideoOverlayWindowViews::IsTrustedForMediaPlayback() const { -@@ -2423,11 +2444,14 @@ void VideoOverlayWindowViews::UpdateTimestampLabel(base::TimeDelta current_time, +@@ -2426,11 +2447,14 @@ void VideoOverlayWindowViews::UpdateTimestampLabel(base::TimeDelta current_time, } void VideoOverlayWindowViews::OnLiveCaptionButtonPressed() { @@ -228,7 +229,7 @@ index 4fb1404d16398793a1658fcf0c3efebffafced13..2efbb38c338884cd47de75b3e4411e87 if (wanted_visibility == live_caption_dialog_->GetVisible()) { return; } -@@ -2455,6 +2479,7 @@ void VideoOverlayWindowViews::SetLiveCaptionDialogVisibility( +@@ -2458,6 +2482,7 @@ void VideoOverlayWindowViews::SetLiveCaptionDialogVisibility( if (toggle_mute_button_) { toggle_mute_button_->SetEnabled(!wanted_visibility); } diff --git a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch index 534134488a..3f36b710b1 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index 10067d16998f5772dd0431d47909cfb656de360d..2fb1c5344086227d47467f87d980b2c8f5112cad 100644 +index 4f29229d0aff379b117ec43c0b263d78ec06882c..4be6531e6f2b4b6228cee47472397151d9307e20 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h -@@ -441,6 +441,10 @@ +@@ -443,6 +443,10 @@ E_CPONLY(kColorRadioButtonForegroundUnchecked) \ E_CPONLY(kColorRadioButtonForegroundDisabled) \ E_CPONLY(kColorRadioButtonForegroundChecked) \ @@ -22,7 +22,7 @@ index 10067d16998f5772dd0431d47909cfb656de360d..2fb1c5344086227d47467f87d980b2c8 E_CPONLY(kColorSegmentedButtonBorder) \ E_CPONLY(kColorSegmentedButtonFocus) \ E_CPONLY(kColorSegmentedButtonForegroundChecked) \ -@@ -549,6 +553,7 @@ +@@ -551,6 +555,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ @@ -31,10 +31,10 @@ index 10067d16998f5772dd0431d47909cfb656de360d..2fb1c5344086227d47467f87d980b2c8 /* ui::NativeThemeBase::ControlColorId. */ \ E_CPONLY(kColorWebNativeControlAccent) \ diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc -index c0696d530d282dcc2d8d95c518faa6326a354e8e..5a967fd5697a92d2acea2ea81b6c1115d41c2a48 100644 +index 00a8789f591a9ccb9c98033121ed580777281a15..a8578979c8438961f6354d4ba823bcb520086afa 100644 --- a/ui/color/ui_color_mixer.cc +++ b/ui/color/ui_color_mixer.cc -@@ -182,6 +182,17 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) { +@@ -186,6 +186,17 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) { mixer[kColorProgressBarPaused] = {kColorDisabledForeground}; mixer[kColorRadioButtonForegroundChecked] = {kColorButtonForeground}; mixer[kColorRadioButtonForegroundUnchecked] = {kColorSecondaryForeground}; @@ -52,7 +52,7 @@ index c0696d530d282dcc2d8d95c518faa6326a354e8e..5a967fd5697a92d2acea2ea81b6c1115 mixer[kColorSeparator] = {kColorMidground}; mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800}; mixer[kColorShadowValueAmbientShadowElevationThree] = -@@ -278,6 +289,7 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) { +@@ -282,6 +293,7 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) { mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground}; mixer[kColorTreeNodeForegroundSelectedUnfocused] = { kColorTreeNodeForegroundSelectedFocused}; diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 088adff15b..3060691509 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -68,7 +68,7 @@ index f91857eb0b6ad385721b8224100de26dfdd7dd8d..45e8766fcb8d46d8edc3bf8d21d3f826 : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e96990d04 100644 +index d90ef46f80b5cc799bd59db55b9084a8c2b279f8..ec447f9028760622dbcca95172c5a60034b571e0 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -80,6 +80,20 @@ namespace printing { @@ -230,7 +230,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e // Populating `content_analysis_before_printing_document_` if needed should be // done first in this function's workflow, this way other code can check if // content analysis is going to happen and delay starting `print_job_` to -@@ -640,7 +668,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings( +@@ -643,7 +671,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings( #if BUILDFLAG(ENABLE_OOP_PRINTING) if (ShouldPrintJobOop() && @@ -239,7 +239,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e !analyzing_content_ && #endif !query_with_ui_client_id().has_value()) { -@@ -668,7 +696,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings( +@@ -671,7 +699,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings( // Sometimes it is desired to get the PDF settings as opposed to the settings // of the default system print driver. @@ -248,7 +248,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e bool want_pdf_settings = analyzing_content_; #else bool want_pdf_settings = false; -@@ -712,10 +740,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -715,10 +743,7 @@ void PrintViewManagerBase::UpdatePrintSettings( // `job_settings` does not yet contain the rasterized PDF dpi, so if the user // has the print preference set, fetch it for use in // `PrintSettingsFromJobSettings()`. @@ -260,7 +260,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e if (prefs && prefs->HasPrefPath(prefs::kPrintRasterizePdfDpi)) { int value = prefs->GetInteger(prefs::kPrintRasterizePdfDpi); if (value > 0) -@@ -740,8 +765,28 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -743,8 +768,28 @@ void PrintViewManagerBase::UpdatePrintSettings( } } @@ -291,7 +291,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e // fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()` // for in-browser queries. if (printer_type == mojom::PrinterType::kLocal) { -@@ -762,8 +807,6 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -765,8 +810,6 @@ void PrintViewManagerBase::UpdatePrintSettings( } #endif @@ -300,7 +300,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e } void PrintViewManagerBase::SetAccessibilityTree( -@@ -779,7 +822,7 @@ void PrintViewManagerBase::SetAccessibilityTree( +@@ -782,7 +825,7 @@ void PrintViewManagerBase::SetAccessibilityTree( void PrintViewManagerBase::IsPrintingEnabled( IsPrintingEnabledCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -309,7 +309,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e } void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, -@@ -805,7 +848,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -808,7 +851,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, return; } #endif @@ -318,7 +318,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e std::optional scanning_data = enterprise_data_protection::GetPrintAnalysisData( web_contents(), enterprise_data_protection::PrintScanningContext:: -@@ -835,11 +878,9 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, +@@ -838,11 +881,9 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, // destroyed. In such cases the error notification to the user will // have already been displayed, and a second message should not be // shown. @@ -332,7 +332,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e ReleasePrinterQuery(); } -@@ -851,15 +892,33 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) { +@@ -854,15 +895,33 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) { test_observers_.RemoveObserver(&observer); } @@ -366,7 +366,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e } void PrintViewManagerBase::RenderFrameDeleted( -@@ -901,13 +960,14 @@ void PrintViewManagerBase::SystemDialogCancelled() { +@@ -904,13 +963,14 @@ void PrintViewManagerBase::SystemDialogCancelled() { // System dialog was cancelled. Clean up the print job and notify the // BackgroundPrintingManager. DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -382,7 +382,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e } void PrintViewManagerBase::OnDocDone(int job_id, PrintedDocument* document) { -@@ -921,18 +981,26 @@ void PrintViewManagerBase::OnJobDone() { +@@ -924,18 +984,26 @@ void PrintViewManagerBase::OnJobDone() { // Printing is done, we don't need it anymore. // print_job_->is_job_pending() may still be true, depending on the order // of object registration. @@ -411,7 +411,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e TerminatePrintJob(true); } -@@ -942,7 +1010,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { +@@ -945,7 +1013,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { // Is the document already complete? if (print_job_->document() && print_job_->document()->IsComplete()) { @@ -420,7 +420,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e return true; } -@@ -995,7 +1063,10 @@ bool PrintViewManagerBase::SetupNewPrintJob( +@@ -998,7 +1066,10 @@ bool PrintViewManagerBase::SetupNewPrintJob( // Disconnect the current `print_job_`. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -432,7 +432,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e if (!weak_this) return false; -@@ -1015,7 +1086,7 @@ bool PrintViewManagerBase::SetupNewPrintJob( +@@ -1018,7 +1089,7 @@ bool PrintViewManagerBase::SetupNewPrintJob( #endif print_job_->AddObserver(*this); @@ -441,7 +441,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e return true; } -@@ -1073,7 +1144,7 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -1076,7 +1147,7 @@ void PrintViewManagerBase::ReleasePrintJob() { // Ensure that any residual registration of printing client is released. // This might be necessary in some abnormal cases, such as the associated // render process having terminated. @@ -450,7 +450,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e if (!analyzing_content_) { UnregisterSystemPrintClient(); } -@@ -1083,6 +1154,11 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -1086,6 +1157,11 @@ void PrintViewManagerBase::ReleasePrintJob() { } #endif @@ -462,7 +462,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e if (!print_job_) return; -@@ -1090,7 +1166,7 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -1093,7 +1169,7 @@ void PrintViewManagerBase::ReleasePrintJob() { // printing_rfh_ should only ever point to a RenderFrameHost with a live // RenderFrame. DCHECK(rfh->IsRenderFrameLive()); @@ -471,7 +471,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e } print_job_->RemoveObserver(*this); -@@ -1132,7 +1208,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -1135,7 +1211,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -480,7 +480,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e return true; if (!cookie) { -@@ -1155,7 +1231,7 @@ bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { +@@ -1158,7 +1234,7 @@ bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { return false; } @@ -489,7 +489,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e // Don't start printing if enterprise checks are being performed to check if // printing is allowed, or if content analysis is going to take place right // before starting `print_job_`. -@@ -1286,6 +1362,8 @@ void PrintViewManagerBase::CompleteScriptedPrint( +@@ -1289,6 +1365,8 @@ void PrintViewManagerBase::CompleteScriptedPrint( auto callback_wrapper = base::BindOnce( &PrintViewManagerBase::ScriptedPrintReply, weak_ptr_factory_.GetWeakPtr(), std::move(callback), render_process_host->GetDeprecatedID()); @@ -498,7 +498,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e std::unique_ptr printer_query = queue()->PopPrinterQuery(params->cookie); if (!printer_query) -@@ -1296,10 +1374,10 @@ void PrintViewManagerBase::CompleteScriptedPrint( +@@ -1299,10 +1377,10 @@ void PrintViewManagerBase::CompleteScriptedPrint( params->expected_pages_count, params->has_selection, params->margin_type, params->is_scripted, !render_process_host->IsPdf(), base::BindOnce(&OnDidScriptedPrint, queue_, std::move(printer_query), @@ -512,7 +512,7 @@ index aa79c324af2cec50019bca3bccff5d420fb30ffd..0b85598f87673537eccdd0b310e8462e scoped_refptr print_data, const gfx::Size& page_size, diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index b6bbf0f1829a6759f65535679aafb8e407242166..f355b8981e8fc672b1ad165b3b770d3f17b3e13c 100644 +index f3011c2c76c2176967b3931e3054c352d2dcfab6..c24703f8d8de3085690f7a3a3eefdd03bbd793c8 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h @@ -48,6 +48,8 @@ namespace printing { @@ -687,7 +687,7 @@ index ca71560874a0189068dd11fbc039f5673bf6bd96..a8551d95e64da2afbc1685b2df8f1fc3 mojom::PrintFailureReason reason) override; diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index ac2f719be566020d9f41364560c12e6d6d0fe3d8..16d758a6936f66148a196761cfb875f68c1818d7 100644 +index 322b05494aef956443a55cb0533dbb19f683470c..2cf9ef41cbd31e43bdbbd776f3af00581731f4bc 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom @@ -299,7 +299,7 @@ enum PrintFailureReason { @@ -710,7 +710,7 @@ index ac2f719be566020d9f41364560c12e6d6d0fe3d8..16d758a6936f66148a196761cfb875f6 PrintingFailed(int32 cookie, PrintFailureReason reason); diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index aa6e60f15502767c592f5ebf870de974b7d72fa9..52c3b27aec427c01fca145788427856591afe852 100644 +index 7c63f29d4b6a53aabf56a8d6e97f335de718a98f..6cb155ae94ec8491a94640ef3bebfdd9f9489f29 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -54,6 +54,7 @@ diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index bcfcc797ee..6ae7964ef7 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -51,7 +51,7 @@ index e11ccd361a0837eef71869b65f510830171c3a29..f076d0f783e2c0f6b5444002f756001a base::win::MessageWindow window_; // The message-only window. bool is_virtualized_; // Stuck inside Microsoft Softricity VM environment. diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index f36983753ab7bdf2ecd332408f1f3d9c01f87a62..5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e 100644 +index c3e2c8d2064ff4a93f8cc8c1de0f5996973f540d..579d74ba3491a95db714598749030983ca3c38bb 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -55,6 +55,7 @@ @@ -79,7 +79,7 @@ index f36983753ab7bdf2ecd332408f1f3d9c01f87a62..5a88dfda5eb2c4bf5b547a76eef81b53 #include "chrome/browser/ui/process_singleton_dialog_linux.h" #endif -@@ -353,6 +355,8 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { +@@ -355,6 +357,8 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { bool DisplayProfileInUseError(const base::FilePath& lock_path, const std::string& hostname, int pid) { @@ -88,7 +88,7 @@ index f36983753ab7bdf2ecd332408f1f3d9c01f87a62..5a88dfda5eb2c4bf5b547a76eef81b53 // Ensure there is an instance of ResourceBundle that is initialized for // localized string resource accesses. ui::ScopedStartupResourceBundle ensure_startup_resource_bundle; -@@ -375,6 +379,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, +@@ -377,6 +381,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, #else NOTREACHED(); #endif @@ -96,7 +96,7 @@ index f36983753ab7bdf2ecd332408f1f3d9c01f87a62..5a88dfda5eb2c4bf5b547a76eef81b53 } bool IsChromeProcess(pid_t pid) { -@@ -387,6 +392,21 @@ bool IsChromeProcess(pid_t pid) { +@@ -389,6 +394,21 @@ bool IsChromeProcess(pid_t pid) { base::FilePath(chrome::kBrowserProcessExecutableName)); } @@ -118,7 +118,7 @@ index f36983753ab7bdf2ecd332408f1f3d9c01f87a62..5a88dfda5eb2c4bf5b547a76eef81b53 // A helper class to hold onto a socket. class ScopedSocket { public: -@@ -773,6 +793,10 @@ ProcessSingleton::~ProcessSingleton() { +@@ -775,6 +795,10 @@ ProcessSingleton::~ProcessSingleton() { if (watcher_) { watcher_->OnEminentProcessSingletonDestruction(); } @@ -129,7 +129,7 @@ index f36983753ab7bdf2ecd332408f1f3d9c01f87a62..5a88dfda5eb2c4bf5b547a76eef81b53 } ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { -@@ -1045,11 +1069,32 @@ bool ProcessSingleton::Create() { +@@ -1047,11 +1071,32 @@ bool ProcessSingleton::Create() { // Create the socket file somewhere in /tmp which is usually mounted as a // normal filesystem. Some network filesystems (notably AFS) are screwy and // do not support Unix domain sockets. 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 0e2dea1ae0..dc509a860c 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -8,10 +8,10 @@ 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 4dad6bbade99a00b5ae0f45d4de34d866918545c..6c7ec195fa64e3a1a718811192c9f6fdbf9463c6 100644 +index e4c41fea3a129bcd33a096cf187a94e848a7845b..26e6b534768615579dbaa7958527f01c8ed528ca 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h -@@ -26,6 +26,7 @@ +@@ -25,6 +25,7 @@ #include "third_party/blink/public/mojom/manifest/display_mode.mojom.h" #include "ui/base/mojom/window_show_state.mojom-forward.h" #include "ui/base/ui_base_types.h" @@ -30,10 +30,10 @@ index 4dad6bbade99a00b5ae0f45d4de34d866918545c..6c7ec195fa64e3a1a718811192c9f6fd // 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 8df679251dc314a94079fcc9d4edd7fab12873d4..06599737a290ba4c52a7d36725aef565d49800bd 100644 +index a367b262935a06fcb9911944c061d1fa7fbb980d..78d0adb9d6db7efa188fd9ecfe3d5a51af451e8f 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2066,6 +2066,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { +@@ -2067,6 +2067,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { if (view_) { view_->UpdateCursor(cursor); } @@ -44,10 +44,10 @@ index 8df679251dc314a94079fcc9d4edd7fab12873d4..06599737a290ba4c52a7d36725aef565 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 4e91b3aeb5630476c660e8814e2fd9d92c5a9ca1..d43e75c20aca09080f4223d339c88381f030c504 100644 +index f4c7cd7d7e84c81af0f112afe3cebd24ef0ddf31..9b9a48d951bdd58abd7f6d10e621ef4ba7c2dfff 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -6342,6 +6342,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -6312,6 +6312,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -60,10 +60,10 @@ index 4e91b3aeb5630476c660e8814e2fd9d92c5a9ca1..d43e75c20aca09080f4223d339c88381 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 882e90f435780d0e298e3a778d4f029115de8980..48cbaff6b6adf2b0ead49e2a85302165291f4182 100644 +index eda33c85831029c6744f9fe2bc8d077d4f241de3..3f454f1d647da4b33cc66f84547021d699776b00 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1205,6 +1205,7 @@ class CONTENT_EXPORT WebContentsImpl +@@ -1202,6 +1202,7 @@ class CONTENT_EXPORT WebContentsImpl void SendScreenRects() override; void SendActiveState(bool active) override; TextInputManager* GetTextInputManager() override; @@ -72,7 +72,7 @@ index 882e90f435780d0e298e3a778d4f029115de8980..48cbaff6b6adf2b0ead49e2a85302165 RenderWidgetHostImpl* render_widget_host) override; bool IsShowingContextMenuOnPage() const override; diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h -index f1ec6796b2e987ab1e6c0e62e9edc075ceff1214..722e19b8fec5977bfc9a197c1ea3f8d6ba5615ae 100644 +index 3f7f7a8659715c5db22b6d4507e2a492ecfdf1b7..882eb3babb1970071c362cc036adf444ba445ef0 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -33,6 +33,7 @@ diff --git a/patches/chromium/refactor_expose_file_system_access_blocklist.patch b/patches/chromium/refactor_expose_file_system_access_blocklist.patch index e091009f4a..779fd55b6f 100644 --- a/patches/chromium/refactor_expose_file_system_access_blocklist.patch +++ b/patches/chromium/refactor_expose_file_system_access_blocklist.patch @@ -8,10 +8,24 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w to upstream this change to Chrome. diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -index fc75611edcaffa0501d5ad171e82e42a9d48002b..057ef82bd6c6f9c01a2a82d0ce429efb22487d8b 100644 +index 0e6c16c814e9ff1196c2f78dc08a3fa753d5a1b8..a100d50e91256b8efa91034843a6c667aefcc2cf 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -287,214 +287,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) { +@@ -84,11 +84,13 @@ + #include "chrome/browser/ui/browser_window/public/browser_window_interface_iterator.h" // nogncheck crbug.com/40147906 + #include "chrome/browser/ui/tabs/public/tab_features.h" + #include "chrome/browser/ui/views/file_system_access/file_system_access_page_action_controller.h" ++#if 0 + #include "chrome/browser/web_applications/proto/web_app_install_state.pb.h" + #include "chrome/browser/web_applications/web_app_install_manager.h" + #include "chrome/browser/web_applications/web_app_install_manager_observer.h" + #include "chrome/browser/web_applications/web_app_provider.h" + #include "chrome/browser/web_applications/web_app_registrar.h" ++#endif + #include "components/tabs/public/tab_interface.h" + #if BUILDFLAG(ENABLE_PLATFORM_APPS) + #include "extensions/browser/extension_registry.h" // nogncheck +@@ -288,214 +290,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) { } #endif @@ -230,8 +244,64 @@ index fc75611edcaffa0501d5ad171e82e42a9d48002b..057ef82bd6c6f9c01a2a82d0ce429efb // Checks if `path` should be blocked by the `rules`. // The BlockType of the nearest ancestor of a path to check is what +@@ -1475,16 +1273,6 @@ struct ChromeFileSystemAccessPermissionContext::OriginState { + std::unique_ptr cleanup_timer; + }; + +-ChromeFileSystemAccessPermissionContext::BlockPathRules::BlockPathRules() = +- default; +-ChromeFileSystemAccessPermissionContext::BlockPathRules::~BlockPathRules() = +- default; +-ChromeFileSystemAccessPermissionContext::BlockPathRules::BlockPathRules( +- const BlockPathRules& other) = default; +-ChromeFileSystemAccessPermissionContext::BlockPathRules& +-ChromeFileSystemAccessPermissionContext::BlockPathRules::operator=( +- const BlockPathRules& other) = default; +- + ChromeFileSystemAccessPermissionContext:: + ChromeFileSystemAccessPermissionContext(content::BrowserContext* context, + const base::Clock* clock) +@@ -1503,7 +1291,7 @@ ChromeFileSystemAccessPermissionContext:: + #if BUILDFLAG(IS_ANDROID) + one_time_permissions_tracker_.Observe( + OneTimePermissionsTrackerFactory::GetForBrowserContext(context)); +-#else ++#elif 0 + auto* provider = web_app::WebAppProvider::GetForWebApps( + Profile::FromBrowserContext(profile_)); + if (provider) { +@@ -2909,7 +2697,7 @@ void ChromeFileSystemAccessPermissionContext::OnShutdown() { + one_time_permissions_tracker_.Reset(); + } + +-#if !BUILDFLAG(IS_ANDROID) ++#if 0 + void ChromeFileSystemAccessPermissionContext::OnWebAppInstalled( + const webapps::AppId& app_id) { + if (!base::FeatureList::IsEnabled( +@@ -3267,11 +3055,7 @@ bool ChromeFileSystemAccessPermissionContext:: + HandleType handle_type, + UserAction user_action, + GrantType grant_type) { +-#if BUILDFLAG(IS_ANDROID) +- // TODO(crbug.com/40101963): Enable when android persisted permissions are +- // implemented. +- return false; +-#else ++#elif 0 + if (!base::FeatureList::IsEnabled( + features::kFileSystemAccessPersistentPermissions)) { + return false; +@@ -3322,6 +3106,7 @@ bool ChromeFileSystemAccessPermissionContext:: + + return false; + #endif // BUILDFLAG(IS_ANDROID) ++ return false; + } + + std::vector ChromeFileSystemAccessPermissionContext:: diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h -index ae026d5321cd513c188297e53fe65aaaa77d6f34..184fda7f5851a5d22957b3ebd9d47a4f635a1aff 100644 +index 4111e2c0098402e8befe192d35458b5124639713..dc5988381cead59b704e7ca2b7629a18738d7437 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h @@ -10,10 +10,13 @@ @@ -258,7 +328,7 @@ index ae026d5321cd513c188297e53fe65aaaa77d6f34..184fda7f5851a5d22957b3ebd9d47a4f #include "components/permissions/object_permission_context_base.h" @@ -471,6 +475,219 @@ class ChromeFileSystemAccessPermissionContext bool IsPathInDowngradedReadPathsForTesting(const url::Origin& origin, - const base::FilePath& path); + const base::FilePath& path) const; + // Sentinel used to indicate that no PathService key is specified for a path in + // the struct below. diff --git a/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch b/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch index 6dc7e5f320..bfc6e41763 100644 --- a/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch +++ b/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch @@ -7,10 +7,10 @@ Subject: refactor: expose HostImportModuleDynamically and This is so that Electron can blend Blink's and Node's implementations of these isolate handlers. diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -index d2925a10c6242bff1de59fc681f549d3b0aa267e..97a49dd4904b7965ff716648d654e3464e2ebc58 100644 +index 5fd388fba60b28ed833dbbffc47c285912a33809..7affef58358092094f1b3848bb75881c556dc32d 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -@@ -738,8 +738,9 @@ bool WasmCustomDescriptorsEnabledCallback(v8::Local context) { +@@ -737,8 +737,9 @@ bool WasmCustomDescriptorsEnabledCallback(v8::Local context) { return RuntimeEnabledFeatures::WebAssemblyCustomDescriptorsEnabled( execution_context); } @@ -21,7 +21,7 @@ index d2925a10c6242bff1de59fc681f549d3b0aa267e..97a49dd4904b7965ff716648d654e346 v8::Local context, v8::Local v8_host_defined_options, v8::Local v8_referrer_resource_url, -@@ -817,20 +818,23 @@ v8::MaybeLocal HostImportModuleWithPhaseDynamically( +@@ -816,20 +817,23 @@ v8::MaybeLocal HostImportModuleWithPhaseDynamically( return resolver->Promise().V8Promise(); } @@ -47,7 +47,7 @@ index d2925a10c6242bff1de59fc681f549d3b0aa267e..97a49dd4904b7965ff716648d654e346 v8::Local module, v8::Local meta) { v8::Isolate* isolate = v8::Isolate::GetCurrent(); -@@ -857,6 +861,7 @@ void HostGetImportMetaProperties(v8::Local context, +@@ -856,6 +860,7 @@ void HostGetImportMetaProperties(v8::Local context, meta->CreateDataProperty(context, resolve_key, resolve_value).ToChecked(); } @@ -55,7 +55,7 @@ index d2925a10c6242bff1de59fc681f549d3b0aa267e..97a49dd4904b7965ff716648d654e346 bool IsDOMExceptionWrapper(v8::Isolate* isolate, v8::Local object) { return V8DOMException::HasInstance(isolate, object); } -@@ -887,7 +892,6 @@ void EmitDevToolsEvent(v8::Isolate* isolate) { +@@ -886,7 +891,6 @@ void EmitDevToolsEvent(v8::Isolate* isolate) { } // namespace @@ -63,7 +63,7 @@ index d2925a10c6242bff1de59fc681f549d3b0aa267e..97a49dd4904b7965ff716648d654e346 void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { // Set up garbage collection before setting up anything else as V8 may trigger // GCs during Blink setup. -@@ -903,9 +907,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { +@@ -902,9 +906,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { SharedArrayBufferConstructorEnabledCallback); isolate->SetHostImportModuleDynamicallyCallback(HostImportModuleDynamically); isolate->SetHostImportModuleWithPhaseDynamicallyCallback( diff --git a/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch b/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch index 4f8568bc1b..3d37b4c8be 100644 --- a/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch +++ b/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch @@ -204,10 +204,10 @@ index 507eaa61fb8e83727807e6917ba0c9a3e23f9d31..f2603172991ba2c29092c95e3c92905e bool sysex; }; diff --git a/third_party/blink/renderer/modules/permissions/permission_utils.cc b/third_party/blink/renderer/modules/permissions/permission_utils.cc -index e9b7dcb070567580e8c6ad11b2bb943083e804f6..898efc336171ba6e33788dc754afaa47e3928f9e 100644 +index 58bac9b83b30f9c20f1b527657f02e09a8468707..7d8af4ee0c47e6dd5fbe03418002751db0d75f30 100644 --- a/third_party/blink/renderer/modules/permissions/permission_utils.cc +++ b/third_party/blink/renderer/modules/permissions/permission_utils.cc -@@ -151,8 +151,22 @@ String PermissionNameToString(PermissionName name) { +@@ -164,8 +164,22 @@ String PermissionNameToString(PermissionName name) { return "web-printing"; case PermissionName::SMART_CARD: return "smart-card"; diff --git a/patches/chromium/refactor_unfilter_unresponsive_events.patch b/patches/chromium/refactor_unfilter_unresponsive_events.patch index f53e5e05a5..e1b38d80cb 100644 --- a/patches/chromium/refactor_unfilter_unresponsive_events.patch +++ b/patches/chromium/refactor_unfilter_unresponsive_events.patch @@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be accessed from our JS event. The filtering is moved into Electron's code. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index e12758010f5c243d2fb9c733b74bcb0eea89f5da..6910e1e54995027933abc5724afac9129df7519c 100644 +index 9e9ec7366ecf4aad7ddce0c234cddd36cd07c12f..8205540a9a0c9d3533b4afda04049afbb496fbcb 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -10589,25 +10589,13 @@ void WebContentsImpl::RendererUnresponsive( +@@ -10587,25 +10587,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/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 9014788da8..8416a4e5f5 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 cc98a1463c539e6228c7fc614cce4736dd173dbe..0af4d4b75d0519fabcb5d48bd9d5bd465bc80e92 100644 +index fc068da4cc6431f0a649be19a877e3e7b8267ee8..04e423aed6a182448e06d3366c8157cddada4bee 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1549,7 +1549,7 @@ if (is_chrome_branded && !is_android) { +@@ -1563,7 +1563,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index cc98a1463c539e6228c7fc614cce4736dd173dbe..0af4d4b75d0519fabcb5d48bd9d5bd46 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1577,6 +1577,12 @@ repack("browser_tests_pak") { +@@ -1591,6 +1591,12 @@ repack("browser_tests_pak") { deps = [ "//chrome/test/data/webui:resources" ] } diff --git a/patches/chromium/revert_partial_remove_unused_prehandlemouseevent.patch b/patches/chromium/revert_partial_remove_unused_prehandlemouseevent.patch index de41c8ee25..4ac38ec580 100644 --- a/patches/chromium/revert_partial_remove_unused_prehandlemouseevent.patch +++ b/patches/chromium/revert_partial_remove_unused_prehandlemouseevent.patch @@ -6,7 +6,7 @@ Subject: Revert: partial "Remove unused PreHandleMouseEvent" Refs https://chromium-review.googlesource.com/c/chromium/src/+/6880411 diff --git a/content/browser/renderer_host/render_widget_host_delegate.cc b/content/browser/renderer_host/render_widget_host_delegate.cc -index 0311764d146eb7306b52e02432609f3caa272a62..8f9f471a8d207a88ae59c069977ecaac70a09bb4 100644 +index f180bddd6d6bd9074c658b2a02437195456ed2a3..2762f6ad129ebc143a87acf8fb7634553df51537 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.cc +++ b/content/browser/renderer_host/render_widget_host_delegate.cc @@ -13,6 +13,11 @@ @@ -22,7 +22,7 @@ index 0311764d146eb7306b52e02432609f3caa272a62..8f9f471a8d207a88ae59c069977ecaac const input::NativeWebKeyboardEvent& event) { return KeyboardEventProcessingResult::NOT_HANDLED; diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h -index 6c7ec195fa64e3a1a718811192c9f6fdbf9463c6..c11744d2246c3df138cdb91f1d4459c65367872c 100644 +index 26e6b534768615579dbaa7958527f01c8ed528ca..0461d27686a09940482aa212908359fdef4356e8 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h @@ -104,6 +104,12 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { @@ -39,10 +39,10 @@ index 6c7ec195fa64e3a1a718811192c9f6fdbf9463c6..c11744d2246c3df138cdb91f1d4459c6 // event before sending it to the renderer. See enum for details on return // value. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index fe26e2aeba6fc03201373693d4afa2b78c89e54a..ab880a04a9638b348192a4c85785bc769e7dd83b 100644 +index 51de31af6c1961cc8838df122b50e5b8aabcfc67..c07b50f06930e7d20bef4f8ea8cfa33d55eb4bc8 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -1562,6 +1562,10 @@ void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo( +@@ -1563,6 +1563,10 @@ void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo( CHECK_GE(mouse_event.GetType(), WebInputEvent::Type::kMouseTypeFirst); CHECK_LE(mouse_event.GetType(), WebInputEvent::Type::kMouseTypeLast); @@ -54,10 +54,10 @@ index fe26e2aeba6fc03201373693d4afa2b78c89e54a..ab880a04a9638b348192a4c85785bc76 if (mouse_event_callback.Run(mouse_event)) { return; diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 6910e1e54995027933abc5724afac9129df7519c..8011e752e23f62162cb2fff2461dfe5948af6dad 100644 +index 8205540a9a0c9d3533b4afda04049afbb496fbcb..cf43ec59a26a59d2431d277e840f26decd029ee3 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4586,6 +4586,12 @@ void WebContentsImpl::RenderWidgetWasResized( +@@ -4561,6 +4561,12 @@ void WebContentsImpl::RenderWidgetWasResized( width_changed); } @@ -71,10 +71,10 @@ index 6910e1e54995027933abc5724afac9129df7519c..8011e752e23f62162cb2fff2461dfe59 const gfx::PointF& client_pt) { if (delegate_) { diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 48cbaff6b6adf2b0ead49e2a85302165291f4182..d8c33a304eaed2d3669284c1a7a5e6e631d65b5e 100644 +index 3f454f1d647da4b33cc66f84547021d699776b00..196e07fc0d2f874b68eced73f89ce3d9eb0c3ea4 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1133,6 +1133,7 @@ class CONTENT_EXPORT WebContentsImpl +@@ -1130,6 +1130,7 @@ class CONTENT_EXPORT WebContentsImpl double GetPendingZoomLevel(RenderWidgetHostImpl* rwh) override; @@ -100,10 +100,10 @@ index 02ec57eeb67dd5e5e0ff250853599c88c2a75ed0..5f104dccc8a4b6d50d10aac01b3fe73b WebContents* source, const input::NativeWebKeyboardEvent& event) { diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 234d6d89d1c8c7f333b96f35dacb73daeecf7b17..2bb0499064346697fc19d012740fcacdda40f722 100644 +index f2eee309975a0aa82b89cd52344288a1d8764e98..6e94031dd67917dde3d58ac7495e1eb5dba401ba 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h -@@ -326,6 +326,13 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -325,6 +325,13 @@ class CONTENT_EXPORT WebContentsDelegate { virtual bool HandleContextMenu(RenderFrameHost& render_frame_host, const ContextMenuParams& params); diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index ae1cfb7fc0..e91ecf1dd1 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 11b31e6dd0812993348887ef6b5300e7ea9f348d..74e671775e2ae643aa43b9dc1efc93c0762e3bdb 100644 +index 8d193858877a410e00551622c37d0e10db98bf6c..15fca2fafa11588af102cdbe03af761c383a9e21 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1167,11 +1167,11 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1145,11 +1145,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 eedce664ea..34ff1310c3 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 3d7ccd3becf0ff3cc7003b9159dec7765d5f82c6..5cf51c7984697b1a79048338516e1d7e1cc9dc4b 100644 +index 1b5b8660a7c4f6d813bca5b2ea3c4925472e594f..74018cccac470b4ae4247ffb2bf1fc2a64746dcc 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1955,6 +1955,10 @@ bool RenderProcessHostImpl::Init() { +@@ -2009,6 +2009,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 a099cc7723..5244bc4805 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 8cd59445bae73ff0193e4512d7c36740cbad847f..ba7c3966f2c079bcec329f8f4a724c561969f33f 100644 +index c849896dade807c8bc63150f6ed7f0b19e7f2909..bf39ada9715bfa3559603f24ca68fba254f012e0 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4305,6 +4305,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -4280,6 +4280,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 8cd59445bae73ff0193e4512d7c36740cbad847f..ba7c3966f2c079bcec329f8f4a724c56 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -4315,6 +4322,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -4290,6 +4297,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -35,10 +35,10 @@ index 8cd59445bae73ff0193e4512d7c36740cbad847f..ba7c3966f2c079bcec329f8f4a724c56 CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index f2f2ca4ec75b7a33d2f32c79cdc7394e5a296938..28cfb4e91d660ac8a00604379cc48a59fcab7bed 100644 +index ab767684f04602f2a17163c8970b0ffd75736b64..78aaa3e4af4873b4a7ce713eddfb0541b244922c 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -130,11 +130,14 @@ class PrerenderHandle; +@@ -129,12 +129,15 @@ class PrerenderHandle; class RenderFrameHost; class RenderViewHost; class RenderWidgetHost; @@ -47,13 +47,14 @@ index f2f2ca4ec75b7a33d2f32c79cdc7394e5a296938..28cfb4e91d660ac8a00604379cc48a59 +class RenderWidgetHostViewBase; class ScreenOrientationDelegate; class SiteInstance; + class SurfaceEmbedConnector; class UnownedInnerWebContentsClient; class WebContentsDelegate; +class WebContentsView; class WebUI; struct DropData; struct GlobalRenderFrameHostId; -@@ -296,6 +299,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData { +@@ -292,6 +295,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData { network::mojom::WebSandboxFlags starting_sandbox_flags = network::mojom::WebSandboxFlags::kNone; diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 853bf3ada0..1ff747daac 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 e4ff8f11bed9e53f3134068492ac94b4c9bb4df2..17c3b5c78c3ef08e0b901f3ace8bb07ee78e4cab 100644 +index e2034a05bd6eea7620b3ec827b17e5a5efe4c530..83aee0a0cdc454b1e117e48a3dd11eab225aee9a 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -9260,6 +9260,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -9304,6 +9304,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } @@ -37,10 +37,10 @@ index e4ff8f11bed9e53f3134068492ac94b4c9bb4df2..17c3b5c78c3ef08e0b901f3ace8bb07e 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 ba7c3966f2c079bcec329f8f4a724c561969f33f..e039e2c82ad75ca4b95763414f7aafb6d3a3dbf2 100644 +index bf39ada9715bfa3559603f24ca68fba254f012e0..68d403eb4242f4380ee048d339e580ec3b2b058c 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4603,21 +4603,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( +@@ -4578,21 +4578,25 @@ 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 0413e3d012..8732a6546a 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 1f6c015c361b3146db760643e3670a110634d75b..d4d9c10d3420a5ff998aeb593ea6a25556d1215e 100644 +index 47dec1364f17eee55756f40f63ee2cdc3b33ed8b..b5c28e5502debe2a4458c74deff5516cba69d3f3 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -414,6 +414,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -413,6 +413,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,10 +26,10 @@ index 1f6c015c361b3146db760643e3670a110634d75b..d4d9c10d3420a5ff998aeb593ea6a255 // 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 416d53d0cce178de992074b0c0371bca2e4ed900..cd0e4d7ea77ffe9fd09982ef2d9f5d57df8e2995 100644 +index 7ddc2ef65a72c0c0ee2e16fbdf5ae8a8469df466..232dff7c0e673dc668ea3433cc9e21b85ad987cc 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -935,6 +935,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -933,6 +933,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } 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 97ca2166cc..d241299c81 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 d4d9c10d3420a5ff998aeb593ea6a25556d1215e..d64fef6bfc37264dcdc1bbea22eb5c4e099553dd 100644 +index b5c28e5502debe2a4458c74deff5516cba69d3f3..cde924d79c67e9312f393c54c45bd6fc92509d0f 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -414,6 +414,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -413,6 +413,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -35,10 +35,10 @@ index d4d9c10d3420a5ff998aeb593ea6a25556d1215e..d64fef6bfc37264dcdc1bbea22eb5c4e // 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 cd0e4d7ea77ffe9fd09982ef2d9f5d57df8e2995..3a96f5f084061c30344552a01b3d3a7260dad65e 100644 +index 232dff7c0e673dc668ea3433cc9e21b85ad987cc..29fc81cec1ed39991f73697c7744f84adf30a43c 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -947,6 +947,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -945,6 +945,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } diff --git a/patches/devtools_frontend/.patches b/patches/devtools_frontend/.patches index c4713870c7..32cd70838d 100644 --- a/patches/devtools_frontend/.patches +++ b/patches/devtools_frontend/.patches @@ -1,3 +1,2 @@ chore_expose_ui_to_allow_electron_to_set_dock_side.patch feat_allow_enabling_extension_panels_on_custom_protocols.patch -fix_context_selector_not_showing_execution_contexts.patch diff --git a/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch b/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch index c9002e1b43..b605db3a2f 100644 --- a/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch +++ b/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch @@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer patching legacy devtools code. diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts -index 5b82adb6600fd4ec3df1976cd6d23880c57f114c..d70f30fa82578365434d4338fb49f654858ac012 100644 +index a61477264e24134f5381e721e7133007b923f633..ee5b77337b77977fc8baa813fccc263cd8a0b575 100644 --- a/front_end/entrypoints/main/MainImpl.ts +++ b/front_end/entrypoints/main/MainImpl.ts -@@ -779,6 +779,8 @@ export class MainImpl { +@@ -773,6 +773,8 @@ export class MainImpl { globalThis.Main = globalThis.Main || {}; // @ts-expect-error Exported for Tests.js globalThis.Main.Main = MainImpl; diff --git a/patches/devtools_frontend/fix_context_selector_not_showing_execution_contexts.patch b/patches/devtools_frontend/fix_context_selector_not_showing_execution_contexts.patch deleted file mode 100644 index 90e3b5f5b2..0000000000 --- a/patches/devtools_frontend/fix_context_selector_not_showing_execution_contexts.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Fedor Indutny -Date: Tue, 14 Apr 2026 19:33:23 -0700 -Subject: Fix context selector not showing execution contexts - -When execution context's origin is `file://` - the `url.domain()` is an -empty string and the item's subtitle becomes falsy. Since we predicated -rendering of an item on presence of both title and subtitle - the items -were not rendered while still taking space in the dropdown. - -Pending CL: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7761316 - -diff --git a/front_end/panels/console/ConsoleContextSelector.ts b/front_end/panels/console/ConsoleContextSelector.ts -index f933dbd6dbdfadd2ea8b78e473d9506350825037..d8aa3f9811f1857a9b30231ed8ff59e709e3383c 100644 ---- a/front_end/panels/console/ConsoleContextSelector.ts -+++ b/front_end/panels/console/ConsoleContextSelector.ts -@@ -303,7 +303,7 @@ interface ViewInput { - type View = (input: ViewInput, output: undefined, target: HTMLElement) => void; - - const DEFAULT_VIEW: View = (input, _output, target): void => { -- if (!input.title || !input.subtitle) { -+ if (!input.title) { - render(nothing, target); - return; - } diff --git a/patches/node/.patches b/patches/node/.patches index be1399867b..de04c48065 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -45,3 +45,4 @@ src_refactor_wasmstreaming_finish_to_accept_a_callback.patch src_stop_using_v8_propertycallbackinfo_t_this.patch build_restore_macos_deployment_target_to_12_0.patch fix_add_externalpointertypetag_to_v8_external_api_calls.patch +test_update_v8_serialization_wire_format_version_to_16.patch diff --git a/patches/node/test_update_v8_serialization_wire_format_version_to_16.patch b/patches/node/test_update_v8_serialization_wire_format_version_to_16.patch new file mode 100644 index 0000000000..b9410f96d9 --- /dev/null +++ b/patches/node/test_update_v8_serialization_wire_format_version_to_16.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Calvin Watford +Date: Tue, 21 Apr 2026 19:36:27 -0700 +Subject: test: update V8 serialization wire format version to 16 + +V8 14.9 (Chromium 149) bumped the serialization wire format from +version 15 to 16. Update the hardcoded expected bytes in the test. + +Upstream Node will catch up on its next V8 roll; this patch can be +removed then. + +diff --git a/test/parallel/test-v8-serdes.js b/test/parallel/test-v8-serdes.js +index 223c0fd550cd2a51692ed64164a5ea12df75750c..2c7a20b24f96e7bb6b93a5965ba49e32e97ce231 100644 +--- a/test/parallel/test-v8-serdes.js ++++ b/test/parallel/test-v8-serdes.js +@@ -184,7 +184,7 @@ const hostObject = new (internalBinding('js_stream').JSStream)(); + Consider opening an issue as a heads up at https://github.com/nodejs/node/issues/new + `; + +- const desStr = 'ff0f6f2203666f6f5e007b01'; ++ const desStr = 'ff106f2203666f6f5e007b01'; + + const desBuf = Buffer.from(desStr, 'hex'); + const des = new v8.DefaultDeserializer(desBuf); 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 541f45017e..aef4c115df 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 382c7d3ed44eab5df1f33082d0d0ef85121bc47c..7b6a68379b81f317b3e2da868e9665239c60ffbe 100644 +index db9d6335f43c12831ae97a040a2ec44c702781cf..22774c86a614a2825f8f4de1445819cd689b9963 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -2821,9 +2821,11 @@ template("run_mksnapshot") { +@@ -2812,9 +2812,11 @@ template("run_mksnapshot") { "--turbo-profiling-input", rebase_path(v8_builtins_profiling_log_file, root_build_dir), diff --git a/patches/webrtc/fix_handle_pipewire_capturer_initialization_and_management.patch b/patches/webrtc/fix_handle_pipewire_capturer_initialization_and_management.patch index ccd5e86a81..23039665da 100644 --- a/patches/webrtc/fix_handle_pipewire_capturer_initialization_and_management.patch +++ b/patches/webrtc/fix_handle_pipewire_capturer_initialization_and_management.patch @@ -49,10 +49,10 @@ index 243919ba101c637887b2a964e45be0096798873b..c1597ee84a3a84a1c5e556eb31c4d3e1 options, CaptureType::kAnyScreenContent); } diff --git a/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc b/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc -index 6cb394f9430f88c5036d19587e4655b8d0760c76..613c3fa6380828dd6537e20c87aac764bfdcd6c8 100644 +index 45537dce07d8ca8548795210b7d513d25ff23e4e..557115dc6da2ddba04c78e3764d0e95ca5546010 100644 --- a/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc +++ b/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc -@@ -126,6 +126,7 @@ void BaseCapturerPipeWire::OnScreenCastRequestResult(RequestResponse result, +@@ -130,6 +130,7 @@ void BaseCapturerPipeWire::OnScreenCastRequestResult(RequestResponse result, void BaseCapturerPipeWire::OnScreenCastSessionClosed() { if (!capturer_failed_) { options_.screencast_stream()->StopScreenCastStream(); diff --git a/script/node-disabled-tests.json b/script/node-disabled-tests.json index 8dcc7008bf..9e37f49cc9 100644 --- a/script/node-disabled-tests.json +++ b/script/node-disabled-tests.json @@ -11,6 +11,7 @@ "parallel/test-crypto-dh-stateless", "parallel/test-crypto-fips", "parallel/test-crypto-keygen", + "parallel/test-crypto-pqc-key-objects-ml-kem", "parallel/test-crypto-secure-heap", "parallel/test-domain-error-types", "parallel/test-fs-utimes-y2K38", diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index 314518d5ff..e964840b34 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -69,10 +69,15 @@ #if BUILDFLAG(IS_LINUX) #include "base/nix/xdg_util.h" +#include "ui/linux/display_server_utils.h" #include "v8/include/v8-wasm-trap-handler-posix.h" #include "v8/include/v8.h" #endif +#if BUILDFLAG(IS_OZONE) +#include "ui/ozone/public/ozone_platform.h" +#endif // BUILDFLAG(IS_OZONE) + #if !IS_MAS_BUILD() #include "components/crash/core/app/crash_switches.h" // nogncheck #include "components/crash/core/app/crashpad.h" // nogncheck @@ -313,6 +318,15 @@ void ElectronMainDelegate::PreSandboxStartup() { // Enable AVFoundation. command_line->AppendSwitch("enable-avfoundation"); #endif + +#if BUILDFLAG(IS_OZONE) + // Initialize Ozone platform and add required feature flags as per + // platform's properties. +#if BUILDFLAG(IS_LINUX) + ui::SetOzonePlatformForLinuxIfNeeded(*command_line); +#endif + ui::OzonePlatform::PreSandboxStartup(); +#endif // BUILDFLAG(IS_OZONE) } } diff --git a/shell/browser/api/electron_api_printing.cc b/shell/browser/api/electron_api_printing.cc index 5a41d28c03..544f28faf1 100644 --- a/shell/browser/api/electron_api_printing.cc +++ b/shell/browser/api/electron_api_printing.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. +#include "base/logging.h" #include "chrome/browser/browser_process.h" #include "gin/converter.h" #include "printing/buildflags/buildflags.h" diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index f49cce3775..5f58569d1f 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -552,6 +552,7 @@ gin::WrapperInfo Session::kWrapperInfo = Session::Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context) : isolate_(isolate), network_emulation_token_(base::UnguessableToken::Create()), + network_emulation_client_id_(base::UnguessableToken::Create()), browser_context_{browser_context} { gin::PerIsolateData* data = gin::PerIsolateData::From(isolate); data->AddDisposeObserver(this); @@ -826,6 +827,7 @@ void Session::EnableNetworkEmulation(const gin_helper::Dictionary& options) { auto* network_context = browser_context_->GetDefaultStoragePartition()->GetNetworkContext(); network_context->SetNetworkConditions(network_emulation_token_, + network_emulation_client_id_, std::move(matched_conditions)); } @@ -834,6 +836,7 @@ void Session::DisableNetworkEmulation() { browser_context_->GetDefaultStoragePartition()->GetNetworkContext(); std::vector network_conditions; network_context->SetNetworkConditions(network_emulation_token_, + network_emulation_client_id_, std::move(network_conditions)); } diff --git a/shell/browser/api/electron_api_session.h b/shell/browser/api/electron_api_session.h index b077d2c5cd..dd9bddb185 100644 --- a/shell/browser/api/electron_api_session.h +++ b/shell/browser/api/electron_api_session.h @@ -217,9 +217,13 @@ class Session final : public gin::Wrappable, raw_ptr isolate_; - // The client id to enable the network throttler. + // The profile id to enable the network throttler. base::UnguessableToken network_emulation_token_; + // The client id for the network throttler, identifying this Session as + // the throttling client. + base::UnguessableToken network_emulation_client_id_; + raw_ptr browser_context_; gin::WeakCellFactory weak_factory_{this}; diff --git a/shell/browser/api/electron_api_system_preferences_win.cc b/shell/browser/api/electron_api_system_preferences_win.cc index 213666d120..b5da275393 100644 --- a/shell/browser/api/electron_api_system_preferences_win.cc +++ b/shell/browser/api/electron_api_system_preferences_win.cc @@ -11,6 +11,7 @@ #include "shell/browser/api/electron_api_system_preferences.h" #include "base/containers/fixed_flat_map.h" +#include "base/logging.h" #include "base/win/core_winrt_util.h" #include "base/win/windows_types.h" #include "base/win/wrapped_window_proc.h" diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index c2d007fdd0..187d766d04 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -822,7 +822,10 @@ class WebContents final : public ExclusiveAccessContext, bool enable_devtools_ = true; // Observers of this WebContents. - base::ObserverList observers_; + base::ObserverList + observers_; v8::Global pending_child_web_preferences_; diff --git a/shell/browser/browser.h b/shell/browser/browser.h index 4baabb1fa2..7ff31cfdab 100644 --- a/shell/browser/browser.h +++ b/shell/browser/browser.h @@ -368,7 +368,10 @@ class Browser : private WindowListObserver { void OnWindowAllClosed() override; // Observers of the browser. - base::ObserverList observers_; + base::ObserverList + observers_; // Tracks tasks requesting file icons. base::CancelableTaskTracker cancelable_task_tracker_; diff --git a/shell/browser/browser_linux.cc b/shell/browser/browser_linux.cc index 80f9b527f8..c546b482bb 100644 --- a/shell/browser/browser_linux.cc +++ b/shell/browser/browser_linux.cc @@ -14,6 +14,7 @@ #include "base/command_line.h" #include "base/environment.h" +#include "base/logging.h" #include "base/process/launch.h" #include "base/strings/strcat.h" #include "base/strings/utf_string_conversions.h" diff --git a/shell/browser/browser_process_impl.cc b/shell/browser/browser_process_impl.cc index 5eaaa2c8b2..cc3b65d308 100644 --- a/shell/browser/browser_process_impl.cc +++ b/shell/browser/browser_process_impl.cc @@ -15,6 +15,8 @@ #include "base/notimplemented.h" #include "base/path_service.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/hid/hid_system_tray_icon.h" +#include "chrome/browser/usb/usb_system_tray_icon.h" #include "chrome/common/chrome_switches.h" #include "components/os_crypt/async/browser/key_provider.h" #include "components/os_crypt/async/browser/os_crypt_async.h" @@ -368,10 +370,16 @@ HidSystemTrayIcon* BrowserProcessImpl::hid_system_tray_icon() { return nullptr; } +void BrowserProcessImpl::set_hid_system_tray_icon_for_test( + std::unique_ptr icon) {} + UsbSystemTrayIcon* BrowserProcessImpl::usb_system_tray_icon() { return nullptr; } +void BrowserProcessImpl::set_usb_system_tray_icon_for_test( + std::unique_ptr icon) {} + os_crypt_async::OSCryptAsync* BrowserProcessImpl::os_crypt_async() { return os_crypt_async_.get(); } diff --git a/shell/browser/browser_process_impl.h b/shell/browser/browser_process_impl.h index fe367f7deb..56bc7e6eb2 100644 --- a/shell/browser/browser_process_impl.h +++ b/shell/browser/browser_process_impl.h @@ -125,7 +125,11 @@ class BrowserProcessImpl : public BrowserProcess { resource_coordinator::TabManager* GetTabManager() override; SerialPolicyAllowedPorts* serial_policy_allowed_ports() override; HidSystemTrayIcon* hid_system_tray_icon() override; + void set_hid_system_tray_icon_for_test( + std::unique_ptr icon) override; UsbSystemTrayIcon* usb_system_tray_icon() override; + void set_usb_system_tray_icon_for_test( + std::unique_ptr icon) override; os_crypt_async::OSCryptAsync* os_crypt_async() override; void set_additional_os_crypt_async_provider_for_test( size_t precedence, diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index cd2e7ab30f..9838df0497 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1126,6 +1126,7 @@ ElectronBrowserClient::CreateNonNetworkNavigationURLLoaderFactory( void ElectronBrowserClient:: RegisterNonNetworkWorkerMainResourceURLLoaderFactories( content::BrowserContext* browser_context, + const std::optional& request_initiator, NonNetworkURLLoaderFactoryMap* factories) { auto* protocol_registry = ProtocolRegistry::FromBrowserContext(browser_context); @@ -1137,7 +1138,7 @@ void ElectronBrowserClient:: factories->emplace( extensions::kExtensionScheme, extensions::CreateExtensionWorkerMainResourceURLLoaderFactory( - browser_context)); + browser_context, request_initiator)); #endif } @@ -1294,13 +1295,14 @@ void ElectronBrowserClient:: #endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) } -bool ElectronBrowserClient::ShouldTreatURLSchemeAsFirstPartyWhenTopLevel( - std::string_view scheme, +bool ElectronBrowserClient::ShouldTreatAsFirstPartyWhenTopLevel( + const url::Origin& top_frame_origin, bool is_embedded_origin_secure) { - if (is_embedded_origin_secure && scheme == content::kChromeUIScheme) + if (is_embedded_origin_secure && + top_frame_origin.scheme() == content::kChromeUIScheme) return true; #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) - return scheme == extensions::kExtensionScheme; + return top_frame_origin.scheme() == extensions::kExtensionScheme; #else return false; #endif diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index adbae52f39..f3592013ed 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -225,6 +225,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient, content::FrameTreeNodeId frame_tree_node_id) override; void RegisterNonNetworkWorkerMainResourceURLLoaderFactories( content::BrowserContext* browser_context, + const std::optional& request_initiator, NonNetworkURLLoaderFactoryMap* factories) override; void RegisterNonNetworkSubresourceURLLoaderFactories( int render_process_id, @@ -268,8 +269,8 @@ class ElectronBrowserClient : public content::ContentBrowserClient, bool force_no_https_upgrade, scoped_refptr navigation_response_task_runner) override; - bool ShouldTreatURLSchemeAsFirstPartyWhenTopLevel( - std::string_view scheme, + bool ShouldTreatAsFirstPartyWhenTopLevel( + const url::Origin& top_frame_origin, bool is_embedded_origin_secure) override; void OverrideURLLoaderFactoryParams( content::BrowserContext* browser_context, diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 29adb56bd5..a957d37dab 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -214,14 +214,6 @@ int ElectronBrowserMainParts::PreEarlyInitialization() { #if BUILDFLAG(IS_POSIX) HandleSIGCHLD(); #endif -#if BUILDFLAG(IS_OZONE) - // Initialize Ozone platform and add required feature flags as per platform's - // properties. -#if BUILDFLAG(IS_LINUX) - ui::SetOzonePlatformForLinuxIfNeeded(*base::CommandLine::ForCurrentProcess()); -#endif - ui::OzonePlatform::PreEarlyInitialization(); -#endif // BUILDFLAG(IS_OZONE) #if BUILDFLAG(IS_MAC) screen_ = std::make_unique(); #endif diff --git a/shell/browser/electron_browser_main_parts_posix.cc b/shell/browser/electron_browser_main_parts_posix.cc index d62d8d80c4..e25db80c80 100644 --- a/shell/browser/electron_browser_main_parts_posix.cc +++ b/shell/browser/electron_browser_main_parts_posix.cc @@ -16,6 +16,7 @@ #include "base/compiler_specific.h" #include "base/debug/leak_annotations.h" +#include "base/logging.h" #include "base/posix/eintr_wrapper.h" #include "base/threading/platform_thread.h" #include "content/public/browser/browser_task_traits.h" diff --git a/shell/browser/electron_pdf_document_helper_client.cc b/shell/browser/electron_pdf_document_helper_client.cc index cca0490d21..7aaf982aad 100644 --- a/shell/browser/electron_pdf_document_helper_client.cc +++ b/shell/browser/electron_pdf_document_helper_client.cc @@ -4,7 +4,7 @@ #include "shell/browser/electron_pdf_document_helper_client.h" -#include "chrome/browser/pdf/pdf_viewer_stream_manager.h" +#include "chrome/browser/pdf/mime_handler_stream_manager.h" #include "chrome/common/content_restriction.h" #include "components/pdf/browser/pdf_frame_util.h" #include "content/public/browser/render_frame_host.h" @@ -50,10 +50,10 @@ void ElectronPDFDocumentHelperClient::SetPluginCanSave( content::RenderFrameHost* render_frame_host, bool can_save) { if (chrome_pdf::features::IsOopifPdfEnabled()) { - auto* pdf_viewer_stream_manager = - pdf::PdfViewerStreamManager::FromWebContents( + auto* mime_handler_stream_manager = + pdf::MimeHandlerStreamManager::FromWebContents( content::WebContents::FromRenderFrameHost(render_frame_host)); - if (!pdf_viewer_stream_manager) { + if (!mime_handler_stream_manager) { return; } @@ -61,7 +61,7 @@ void ElectronPDFDocumentHelperClient::SetPluginCanSave( pdf_frame_util::GetEmbedderHost(render_frame_host); CHECK(embedder_host); - pdf_viewer_stream_manager->SetPluginCanSave(embedder_host, can_save); + mime_handler_stream_manager->SetPluginCanSave(embedder_host, can_save); return; } diff --git a/shell/browser/extensions/api/extension_action/extension_action_api.cc b/shell/browser/extensions/api/extension_action/extension_action_api.cc index 16ec00cfcf..d0d494b094 100644 --- a/shell/browser/extensions/api/extension_action/extension_action_api.cc +++ b/shell/browser/extensions/api/extension_action/extension_action_api.cc @@ -8,6 +8,7 @@ #include +#include "base/logging.h" #include "base/no_destructor.h" #include "extensions/browser/event_router.h" #include "extensions/browser/extension_prefs.h" diff --git a/shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc b/shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc index f10dfbb674..edff798807 100644 --- a/shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc +++ b/shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc @@ -12,8 +12,8 @@ #include "base/numerics/safe_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" +#include "chrome/browser/pdf/mime_handler_stream_manager.h" #include "chrome/browser/pdf/pdf_pref_names.h" // nogncheck -#include "chrome/browser/pdf/pdf_viewer_stream_manager.h" #include "chrome/common/extensions/api/pdf_viewer_private.h" #include "chrome/common/pref_names.h" #include "components/pdf/common/constants.h" @@ -72,13 +72,13 @@ base::WeakPtr GetStreamContainer( return nullptr; } - auto* pdf_viewer_stream_manager = - pdf::PdfViewerStreamManager::FromRenderFrameHost(embedder_host); - if (!pdf_viewer_stream_manager) { + auto* mime_handler_stream_manager = + pdf::MimeHandlerStreamManager::FromRenderFrameHost(embedder_host); + if (!mime_handler_stream_manager) { return nullptr; } - return pdf_viewer_stream_manager->GetStreamContainer(embedder_host); + return mime_handler_stream_manager->GetStreamContainer(embedder_host); } #if BUILDFLAG(ENABLE_PDF_SAVE_TO_DRIVE) diff --git a/shell/browser/extensions/api/resources_private/resources_private_api.cc b/shell/browser/extensions/api/resources_private/resources_private_api.cc index 977354f25e..55a677bf89 100644 --- a/shell/browser/extensions/api/resources_private/resources_private_api.cc +++ b/shell/browser/extensions/api/resources_private/resources_private_api.cc @@ -47,7 +47,7 @@ ExtensionFunction::ResponseAction ResourcesPrivateGetStringsFunction::Run() { #if BUILDFLAG(ENABLE_PDF_VIEWER) dict = pdf_extension_util::GetStrings( pdf_extension_util::PdfViewerContext::kAll); - dict.Merge(pdf_extension_util::GetAdditionalData(browser_context())); + dict.Merge(pdf_extension_util::GetAdditionalData(GetSenderWebContents())); #endif break; case api::resources_private::Component::kIdentity: diff --git a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc index 1415677f52..696638e9d1 100644 --- a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc +++ b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc @@ -7,6 +7,7 @@ #include #include +#include "base/logging.h" #include "components/update_client/update_query_params.h" #include "extensions/common/api/runtime.h" #include "shell/browser/extensions/electron_extension_system.h" diff --git a/shell/browser/extensions/api/streams_private/streams_private_api.cc b/shell/browser/extensions/api/streams_private/streams_private_api.cc index df8c479742..bb51e1e8ad 100644 --- a/shell/browser/extensions/api/streams_private/streams_private_api.cc +++ b/shell/browser/extensions/api/streams_private/streams_private_api.cc @@ -20,7 +20,8 @@ #if BUILDFLAG(ENABLE_PDF_VIEWER) #include "base/feature_list.h" -#include "chrome/browser/pdf/pdf_viewer_stream_manager.h" +#include "chrome/browser/pdf/mime_handler_stream_manager.h" +#include "chrome/browser/pdf/pdf_handler_stream_delegate.h" #include "extensions/common/constants.h" #include "pdf/pdf_features.h" #endif // BUILDFLAG(ENABLE_PDF_VIEWER) @@ -34,7 +35,8 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( content::FrameTreeNodeId frame_tree_node_id, blink::mojom::TransferrableURLLoaderPtr transferrable_loader, const GURL& original_url, - const std::string& internal_id) { + const std::string& internal_id, + const std::string& mime_type) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); content::WebContents* web_contents = @@ -57,9 +59,9 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( // If the mime handler uses MimeHandlerViewGuest, the MimeHandlerViewGuest // will take ownership of the stream. - GURL handler_url( - extensions::Extension::GetBaseURLFromExtensionId(extension_id).spec() + - handler->handler_url()); + GURL handler_url = handler->GetHandlerUrl(mime_type); + if (!handler_url.is_valid()) + return; int tab_id = -1; auto* api_contents = electron::api::WebContents::From(web_contents); @@ -73,10 +75,11 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( #if BUILDFLAG(ENABLE_PDF_VIEWER) if (chrome_pdf::features::IsOopifPdfEnabled() && extension_id == extension_misc::kPdfExtensionId) { - pdf::PdfViewerStreamManager::Create(web_contents); - pdf::PdfViewerStreamManager::FromWebContents(web_contents) + pdf::MimeHandlerStreamManager::Create(web_contents); + pdf::MimeHandlerStreamManager::FromWebContents(web_contents) ->AddStreamContainer(frame_tree_node_id, internal_id, - std::move(stream_container)); + std::move(stream_container), + std::make_unique()); return; } #endif // BUILDFLAG(ENABLE_PDF_VIEWER) diff --git a/shell/browser/extensions/api/streams_private/streams_private_api.h b/shell/browser/extensions/api/streams_private/streams_private_api.h index a0fe7d542e..70d08564e8 100644 --- a/shell/browser/extensions/api/streams_private/streams_private_api.h +++ b/shell/browser/extensions/api/streams_private/streams_private_api.h @@ -30,7 +30,8 @@ class StreamsPrivateAPI { content::FrameTreeNodeId frame_tree_node_id, blink::mojom::TransferrableURLLoaderPtr transferrable_loader, const GURL& original_url, - const std::string& internal_id); + const std::string& internal_id, + const std::string& mime_type); }; } // namespace extensions diff --git a/shell/browser/extensions/electron_extension_system.cc b/shell/browser/extensions/electron_extension_system.cc index c1fdc9b287..207290e964 100644 --- a/shell/browser/extensions/electron_extension_system.cc +++ b/shell/browser/extensions/electron_extension_system.cc @@ -11,6 +11,7 @@ #include "base/files/file_path.h" #include "base/json/json_string_value_serializer.h" +#include "base/logging.h" #include "base/path_service.h" #include "base/values.h" #include "chrome/common/chrome_paths.h" diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index 8b1308eb0b..b786b7fe47 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/shell/browser/extensions/electron_extensions_browser_client.cc @@ -125,6 +125,12 @@ ElectronExtensionsBrowserClient::GetContextRedirectedToOriginal( return GetOriginalContext(context); } +content::BrowserContext* ElectronExtensionsBrowserClient:: + GetContextRedirectedToOriginalWithoutAshInternals( + content::BrowserContext* context) { + return GetOriginalContext(context); +} + content::BrowserContext* ElectronExtensionsBrowserClient::GetContextOwnInstance( content::BrowserContext* context) { return context; @@ -252,11 +258,6 @@ bool ElectronExtensionsBrowserClient::AllowCrossRendererResourceLoad( return false; } -PrefService* ElectronExtensionsBrowserClient::GetPrefServiceForContext( - BrowserContext* context) { - return static_cast(context)->prefs(); -} - void ElectronExtensionsBrowserClient::GetEarlyExtensionPrefsObservers( content::BrowserContext* context, std::vector* observers) const {} diff --git a/shell/browser/extensions/electron_extensions_browser_client.h b/shell/browser/extensions/electron_extensions_browser_client.h index 17012d6fa7..12ee7bede6 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.h +++ b/shell/browser/extensions/electron_extensions_browser_client.h @@ -17,8 +17,6 @@ #include "services/network/public/mojom/fetch_api.mojom.h" #include "url/origin.h" -class PrefService; - namespace extensions { class ExtensionsAPIClient; class KioskDelegate; @@ -67,6 +65,8 @@ class ElectronExtensionsBrowserClient content::BrowserContext* context) override; content::BrowserContext* GetContextRedirectedToOriginal( content::BrowserContext* context) override; + content::BrowserContext* GetContextRedirectedToOriginalWithoutAshInternals( + content::BrowserContext* context) override; content::BrowserContext* GetContextOwnInstance( content::BrowserContext* context) override; content::BrowserContext* GetContextForOriginalOnly( @@ -101,8 +101,6 @@ class ElectronExtensionsBrowserClient const extensions::ExtensionSet& extensions, const extensions::ProcessMap& process_map, const GURL& upstream_url) override; - PrefService* GetPrefServiceForContext( - content::BrowserContext* context) override; void GetEarlyExtensionPrefsObservers( content::BrowserContext* context, std::vector* observers) diff --git a/shell/browser/native_window.h b/shell/browser/native_window.h index 02a34be972..87c830fc55 100644 --- a/shell/browser/native_window.h +++ b/shell/browser/native_window.h @@ -543,7 +543,10 @@ class NativeWindow : public views::WidgetDelegate { std::list draggable_region_providers_; // Observers of this window. - base::ObserverList observers_; + base::ObserverList + observers_; absl::flat_hash_set background_throttling_sources_; diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index 779316c9e3..78c14db7c2 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -506,6 +506,10 @@ viz::SurfaceId OffScreenRenderWidgetHostView::GetCurrentSurfaceId() const { : viz::SurfaceId(); } +bool OffScreenRenderWidgetHostView::HasSavedCompositorFrame() const { + return delegated_frame_host() && delegated_frame_host()->HasSavedFrame(); +} + std::unique_ptr OffScreenRenderWidgetHostView::CreateSyntheticGestureTarget() { NOTIMPLEMENTED(); diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 0db4281789..8d6e04294b 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -165,6 +165,7 @@ class OffScreenRenderWidgetHostView blink::RecordContentToVisibleTimeRequest visible_time_request) final; void CancelSuccessfulPresentationTimeRequestForHostAndDelegate() final; viz::SurfaceId GetCurrentSurfaceId() const override; + bool HasSavedCompositorFrame() const override; std::unique_ptr CreateSyntheticGestureTarget() override; void ImeCompositionRangeChanged( diff --git a/shell/browser/plugins/plugin_utils.cc b/shell/browser/plugins/plugin_utils.cc index b3f36a8b3d..423331597f 100644 --- a/shell/browser/plugins/plugin_utils.cc +++ b/shell/browser/plugins/plugin_utils.cc @@ -51,7 +51,7 @@ PluginUtils::GetMimeTypeToExtensionIdMap( if (const MimeTypesHandler* handler = MimeTypesHandler::GetHandler(extension)) { - for (const std::string& mime_type : handler->mime_type_set()) { + for (const std::string& mime_type : handler->GetSupportedMimeTypes()) { const auto [_, inserted] = mime_type_to_extension_id_map.insert_or_assign(mime_type, id); DCHECK(inserted); diff --git a/shell/browser/printing/print_view_manager_electron.cc b/shell/browser/printing/print_view_manager_electron.cc index 6b0ec41a4b..5d8318faf5 100644 --- a/shell/browser/printing/print_view_manager_electron.cc +++ b/shell/browser/printing/print_view_manager_electron.cc @@ -8,6 +8,7 @@ #include #include "base/functional/bind.h" +#include "base/logging.h" #include "components/printing/browser/print_to_pdf/pdf_print_utils.h" #include "printing/mojom/print.mojom.h" #include "printing/page_range.h" @@ -115,8 +116,7 @@ void PrintViewManagerElectron::SetupScriptedPrintPreview( mojo::ReportBadMessage(kInvalidSetupScriptedPrintPreviewCall); } -void PrintViewManagerElectron::ShowScriptedPrintPreview( - bool source_is_modifiable) { +void PrintViewManagerElectron::ShowScriptedPrintPreview() { mojo::ReportBadMessage(kInvalidShowScriptedPrintPreviewCall); } diff --git a/shell/browser/printing/print_view_manager_electron.h b/shell/browser/printing/print_view_manager_electron.h index 4206d42727..f347956383 100644 --- a/shell/browser/printing/print_view_manager_electron.h +++ b/shell/browser/printing/print_view_manager_electron.h @@ -59,7 +59,7 @@ class PrintViewManagerElectron #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void SetupScriptedPrintPreview( SetupScriptedPrintPreviewCallback callback) override; - void ShowScriptedPrintPreview(bool source_is_modifiable) override; + void ShowScriptedPrintPreview() override; void RequestPrintPreview( printing::mojom::RequestPrintPreviewParamsPtr params) override; void CheckForCancel(int32_t preview_ui_id, diff --git a/shell/browser/ui/devtools_ui_bundle_data_source.cc b/shell/browser/ui/devtools_ui_bundle_data_source.cc index 5733a7d8a1..8ed3ac0684 100644 --- a/shell/browser/ui/devtools_ui_bundle_data_source.cc +++ b/shell/browser/ui/devtools_ui_bundle_data_source.cc @@ -7,6 +7,7 @@ #include #include +#include "base/logging.h" #include "base/memory/ref_counted_memory.h" #include "base/metrics/histogram_functions.h" #include "base/strings/strcat.h" diff --git a/shell/browser/ui/devtools_ui_theme_data_source.cc b/shell/browser/ui/devtools_ui_theme_data_source.cc index 68dcc7b5a3..df7dd36d1b 100644 --- a/shell/browser/ui/devtools_ui_theme_data_source.cc +++ b/shell/browser/ui/devtools_ui_theme_data_source.cc @@ -8,6 +8,7 @@ #include #include +#include "base/logging.h" #include "base/memory/ref_counted_memory.h" #include "base/metrics/histogram_functions.h" #include "base/strings/strcat.h" diff --git a/shell/browser/ui/electron_desktop_window_tree_host_linux.h b/shell/browser/ui/electron_desktop_window_tree_host_linux.h index e8091e18ae..ff359b6e71 100644 --- a/shell/browser/ui/electron_desktop_window_tree_host_linux.h +++ b/shell/browser/ui/electron_desktop_window_tree_host_linux.h @@ -26,7 +26,6 @@ class NativeWindowViews; class ElectronDesktopWindowTreeHostLinux : public views::DesktopWindowTreeHostLinux, - private ui::NativeThemeObserver, private ui::DeviceScaleFactorObserver { public: ElectronDesktopWindowTreeHostLinux( diff --git a/shell/browser/ui/file_dialog_linux.cc b/shell/browser/ui/file_dialog_linux.cc index f130385c2a..76eb2484c6 100644 --- a/shell/browser/ui/file_dialog_linux.cc +++ b/shell/browser/ui/file_dialog_linux.cc @@ -8,6 +8,7 @@ #include "base/files/file_util.h" #include "base/functional/bind.h" #include "base/functional/callback.h" +#include "base/logging.h" #include "base/run_loop.h" #include "base/strings/utf_string_conversions.h" #include "shell/browser/javascript_environment.h" diff --git a/shell/browser/ui/message_box_mac.mm b/shell/browser/ui/message_box_mac.mm index 7d232b6b1f..b6be293218 100644 --- a/shell/browser/ui/message_box_mac.mm +++ b/shell/browser/ui/message_box_mac.mm @@ -9,6 +9,7 @@ #import #include "base/containers/flat_map.h" +#include "base/logging.h" #include "base/mac/mac_util.h" #include "base/no_destructor.h" #include "base/strings/sys_string_conversions.h" diff --git a/shell/browser/ui/message_box_win.cc b/shell/browser/ui/message_box_win.cc index 18a4492080..c5dfcf37a9 100644 --- a/shell/browser/ui/message_box_win.cc +++ b/shell/browser/ui/message_box_win.cc @@ -11,6 +11,7 @@ #include #include "base/containers/flat_map.h" +#include "base/logging.h" #include "base/no_destructor.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/shell/browser/ui/views/client_frame_view_linux.cc b/shell/browser/ui/views/client_frame_view_linux.cc index 4b2341b2de..19b061f767 100644 --- a/shell/browser/ui/views/client_frame_view_linux.cc +++ b/shell/browser/ui/views/client_frame_view_linux.cc @@ -16,6 +16,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" +#include "ui/base/ui_base_types.h" #include "ui/gfx/canvas.h" #include "ui/gfx/font_list.h" #include "ui/gfx/geometry/insets.h" @@ -63,7 +64,8 @@ ClientFrameViewLinux::ClientFrameViewLinux(NativeWindowViews* window, : FramelessView{window, frame}, theme_{ui::NativeTheme::GetInstanceForNativeUi()}, nav_button_provider_( - ui::LinuxUiTheme::GetForProfile(nullptr)->CreateNavButtonProvider()), + ui::LinuxUiTheme::GetForProfile(nullptr)->CreateNavButtonProvider( + ui::FrameType::kDefault)), nav_buttons_{ NavButton{ui::NavButtonProvider::FrameButtonDisplayType::kClose, views::FrameButton::kClose, &views::Widget::Close, diff --git a/shell/browser/ui/views/linux_frame_layout.cc b/shell/browser/ui/views/linux_frame_layout.cc index 8087aa4c2b..9be78bd83e 100644 --- a/shell/browser/ui/views/linux_frame_layout.cc +++ b/shell/browser/ui/views/linux_frame_layout.cc @@ -8,17 +8,18 @@ #include #include "base/i18n/rtl.h" -#include "chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h" // nogncheck #include "shell/browser/linux/x11_util.h" #include "shell/browser/native_window_views.h" #include "shell/browser/ui/electron_desktop_window_tree_host_linux.h" #include "third_party/skia/include/core/SkRRect.h" +#include "ui/base/ui_base_types.h" #include "ui/gfx/geometry/insets.h" #include "ui/gfx/geometry/skia_conversions.h" #include "ui/linux/linux_ui.h" #include "ui/linux/window_frame_provider.h" #include "ui/views/layout/layout_provider.h" #include "ui/views/widget/widget.h" +#include "ui/views/window/frame_view_utils_linux.h" namespace electron { @@ -171,7 +172,8 @@ float LinuxCSDNativeFrameLayout::GetTopCornerRadiusDip() const { ui::WindowFrameProvider* LinuxCSDNativeFrameLayout::GetFrameProvider() const { return ui::LinuxUiTheme::GetForProfile(nullptr)->GetWindowFrameProvider( - !host_supports_client_frame_shadow_, tiled(), window_->IsMaximized()); + ui::FrameType::kDefault, !host_supports_client_frame_shadow_, tiled(), + window_->IsMaximized()); } // Used for Chromium-like custom CSD @@ -188,7 +190,7 @@ gfx::Insets LinuxCSDCustomFrameLayout::RestoredFrameBorderInsets() const { const auto shadow_values = (showing_shadow && !tiled()) ? GetFrameShadowValuesLinux(/*active=*/true) : gfx::ShadowValues(); - const gfx::Insets frame_insets = GetRestoredFrameBorderInsetsLinux( + const gfx::Insets frame_insets = views::GetRestoredFrameBorderInsetsLinux( showing_shadow, kDefaultCustomFrameBorder, shadow_values, input_insets); return NormalizeBorderInsets(frame_insets, input_insets); } diff --git a/shell/browser/ui/views/opaque_frame_view.cc b/shell/browser/ui/views/opaque_frame_view.cc index d0ee48952f..b06e597e02 100644 --- a/shell/browser/ui/views/opaque_frame_view.cc +++ b/shell/browser/ui/views/opaque_frame_view.cc @@ -5,7 +5,6 @@ #include "shell/browser/ui/views/opaque_frame_view.h" #include "base/containers/adapters.h" -#include "chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h" // nogncheck #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h" // nogncheck #include "chrome/grit/generated_resources.h" #include "components/strings/grit/components_strings.h" @@ -24,6 +23,7 @@ #include "ui/views/widget/widget.h" #include "ui/views/window/frame_background.h" #include "ui/views/window/frame_caption_button.h" +#include "ui/views/window/frame_view_utils_linux.h" #include "ui/views/window/vector_icons/vector_icons.h" namespace electron { @@ -230,9 +230,9 @@ void OpaqueFrameView::OnPaint(gfx::Canvas* canvas) { const bool draw_shadow = showing_shadow && !linux_frame_layout_->tiled(); auto shadow_values = draw_shadow ? GetFrameShadowValuesLinux(active) : gfx::ShadowValues(); - ::PaintRestoredFrameBorderLinux(*canvas, *this, frame_background_.get(), clip, - showing_shadow, active, border, shadow_values, - linux_frame_layout_->tiled()); + views::PaintRestoredFrameBorderLinux( + *canvas, *this, frame_background_.get(), clip, showing_shadow, active, + border, shadow_values, linux_frame_layout_->tiled()); } void OpaqueFrameView::PaintAsActiveChanged() { diff --git a/shell/common/api/electron_api_shared_texture.cc b/shell/common/api/electron_api_shared_texture.cc index e3035bdceb..c5e4686b20 100644 --- a/shell/common/api/electron_api_shared_texture.cc +++ b/shell/common/api/electron_api_shared_texture.cc @@ -237,7 +237,7 @@ v8::Local ImportedSharedTextureWrapper::CreateVideoFrame( scoped_refptr raw_frame = media::VideoFrame::WrapSharedImage( ist->pixel_format, si, ist->frame_creation_sync_token, std::move(cb), - ist->coded_size, ist->visible_rect, ist->coded_size, + ist->visible_rect, ist->coded_size, base::Microseconds(ist->timestamp)); raw_frame->set_color_space(si->color_space()); diff --git a/shell/common/keyboard_util.cc b/shell/common/keyboard_util.cc index a358995552..9e2e8c6795 100644 --- a/shell/common/keyboard_util.cc +++ b/shell/common/keyboard_util.cc @@ -5,6 +5,7 @@ #include #include "base/containers/fixed_flat_map.h" +#include "base/logging.h" #include "base/strings/string_util.h" #include "shell/common/keyboard_util.h" #include "third_party/blink/public/common/input/web_input_event.h" diff --git a/shell/renderer/api/electron_api_web_frame.cc b/shell/renderer/api/electron_api_web_frame.cc index b50342c5a2..6b75614a87 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -454,7 +454,7 @@ class WebFrameRenderer final if (!MaybeGetRenderFrame(isolate, "setName", &render_frame)) return; - render_frame->GetWebFrame()->SetName(blink::WebString::FromUTF8(name)); + render_frame->GetWebFrame()->SetName(blink::WebString::FromUtf8(name)); } void SetZoomLevel(v8::Isolate* isolate, double level) { @@ -587,7 +587,7 @@ class WebFrameRenderer final web_frame->ToWebLocalFrame() ->FrameWidget() ->GetActiveWebInputMethodController() - ->CommitText(blink::WebString::FromUTF8(text), + ->CommitText(blink::WebString::FromUtf8(text), std::vector(), blink::WebRange(), 0); } } @@ -609,7 +609,7 @@ class WebFrameRenderer final if (web_frame->IsWebLocalFrame()) { return web_frame->ToWebLocalFrame() ->GetDocument() - .InsertStyleSheet(blink::WebString::FromUTF8(css), nullptr, + .InsertStyleSheet(blink::WebString::FromUtf8(css), nullptr, css_origin) .Utf16(); } @@ -775,9 +775,9 @@ class WebFrameRenderer final blink::WebIsolatedWorldInfo info; info.security_origin = blink::WebSecurityOrigin::CreateFromString( - blink::WebString::FromUTF8(origin_url)); - info.content_security_policy = blink::WebString::FromUTF8(security_policy); - info.human_readable_name = blink::WebString::FromUTF8(name); + blink::WebString::FromUtf8(origin_url)); + info.content_security_policy = blink::WebString::FromUtf8(security_policy); + info.human_readable_name = blink::WebString::FromUtf8(name); blink::SetIsolatedWorldInfo(world_id, info); } @@ -920,7 +920,7 @@ class WebFrameRenderer final blink::WebElement element = render_frame->GetWebFrame()->GetDocument().QuerySelector( - blink::WebString::FromUTF8(selector)); + blink::WebString::FromUtf8(selector)); if (element.IsNull()) // not found return v8::Null(isolate); @@ -935,7 +935,7 @@ class WebFrameRenderer final return v8::Null(isolate); blink::WebFrame* frame = render_frame->GetWebFrame()->FindFrameByName( - blink::WebString::FromUTF8(name)); + blink::WebString::FromUtf8(name)); return CreateWebFrameRenderer(isolate, frame); } }; diff --git a/shell/renderer/electron_ipc_native.cc b/shell/renderer/electron_ipc_native.cc index 7fac851f9e..2079fe3bee 100644 --- a/shell/renderer/electron_ipc_native.cc +++ b/shell/renderer/electron_ipc_native.cc @@ -6,6 +6,7 @@ #include +#include "base/logging.h" #include "base/trace_event/trace_event.h" #include "shell/common/gin_converters/blink_converter.h" #include "shell/common/gin_converters/value_converter.h" diff --git a/shell/renderer/electron_render_frame_observer.cc b/shell/renderer/electron_render_frame_observer.cc index a9d08b836f..e2cbd02a1a 100644 --- a/shell/renderer/electron_render_frame_observer.cc +++ b/shell/renderer/electron_render_frame_observer.cc @@ -170,7 +170,7 @@ void ElectronRenderFrameObserver::CreateIsolatedWorldContext() { // This maps to the name shown in the context combo box in the Console tab // of the dev tools. info.human_readable_name = - blink::WebString::FromUTF8("Electron Isolated Context"); + blink::WebString::FromUtf8("Electron Isolated Context"); // Setup document's origin policy in isolated world info.security_origin = frame->GetDocument().GetSecurityOrigin(); blink::SetIsolatedWorldInfo(WorldIDs::ISOLATED_WORLD_ID, info); diff --git a/shell/renderer/renderer_client_base.cc b/shell/renderer/renderer_client_base.cc index c300f7fd22..132aec2b8f 100644 --- a/shell/renderer/renderer_client_base.cc +++ b/shell/renderer/renderer_client_base.cc @@ -265,14 +265,14 @@ void RendererClientBase::RenderThreadStarted() { ParseSchemesCLISwitch(command_line, switches::kFetchSchemes); for (const std::string& scheme : fetch_enabled_schemes) { blink::WebSecurityPolicy::RegisterURLSchemeAsSupportingFetchAPI( - blink::WebString::FromUTF8(scheme)); + blink::WebString::FromUtf8(scheme)); } std::vector service_worker_schemes = ParseSchemesCLISwitch(command_line, switches::kServiceWorkerSchemes); for (const std::string& scheme : service_worker_schemes) blink::WebSecurityPolicy::RegisterURLSchemeAsAllowingServiceWorkers( - blink::WebString::FromUTF8(scheme)); + blink::WebString::FromUtf8(scheme)); std::vector csp_bypassing_schemes = ParseSchemesCLISwitch(command_line, switches::kBypassCSPSchemes); @@ -284,7 +284,7 @@ void RendererClientBase::RenderThreadStarted() { ParseSchemesCLISwitch(command_line, switches::kCodeCacheSchemes); for (const auto& scheme : code_cache_schemes_list) { blink::WebSecurityPolicy::RegisterURLSchemeAsCodeCacheWithHashing( - blink::WebString::FromUTF8(scheme)); + blink::WebString::FromUtf8(scheme)); } // Allow file scheme to handle service worker by default.