From feaf18e371e04c7c14bc6c675e62db43823755fd Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Fri, 10 Mar 2023 10:07:42 -0600 Subject: [PATCH] chore: bump chromium to 113.0.5636.0 (main) (#37130) * chore: bump chromium in DEPS to 112.0.5576.0 * 4211172: Use the Mac ImageTransportSurface on iOS. https://chromium-review.googlesource.com/c/chromium/src/+/4211172 * 4191759: Reuse PrintBackend process from query for printing https://chromium-review.googlesource.com/c/chromium/src/+/4191759 * 4189718: Revert "[code health] Remove NotificationService use by SpellcheckService" https://chromium-review.googlesource.com/c/chromium/src/+/4189718 * 4216074: web_contents_delegate: remove content:: https://chromium-review.googlesource.com/c/chromium/src/+/4216074 * 4192284: ios: Add feature flag for PartitionAlloc. https://chromium-review.googlesource.com/c/chromium/src/+/4192284 * chore: bump chromium in DEPS to 112.0.5578.0 * 4211172: Use the Mac ImageTransportSurface on iOS. https://chromium-review.googlesource.com/c/chromium/src/+/4211172 * 4067682: Define ThirdPartyCookiesUserBypass runtime feature and plumb it through to URLRequest.cookie_setting_overrides. https://chromium-review.googlesource.com/c/chromium/src/+/4067682 * chore: fixup patch indices * 4218354: Disable the use of preserve_most on arm64 Windows https://chromium-review.googlesource.com/c/v8/v8/+/4218354 * chore: fixup patch indices * chore: bump chromium in DEPS to 112.0.5579.0 * chore: update patches * chore: bump chromium in DEPS to 112.0.5581.0 * chore: update patches * refactor: use modern base values in tracing Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4210912 * refactor: remove GetFontLookupTableCacheDir Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4191820 * refactor: base value type DICTIONARY replaced with DICT Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4198081 * chore: add stub impls for WCO routing Refs: https://chromium-review.googlesource.com/c/chromium/src/+/4182690 * refactor: rename latency metrics Refs: https://chromium-review.googlesource.com/c/chromium/src/+/4048262 * refactor: add sanitized context to clipboard write Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4178264 * refactor: s/Rect/WindowFeatures Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4167001 * refacotr: switch mojom::NetworkHintsHandler to use SchemeHostPair instead of URL Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4185417 * chore: remove dead DecodeToken code * refactor: refactoring geolocation manager Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4161603 * chore: iwyu net/cert/cert_verify_result.h * build: use xcode 14 * chore: bump chromium in DEPS to 112.0.5583.0 * chore: update patches * chore: fixup mas patches * refactor: base::span explicit conversion checks Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4219636 * chore: bump chromium in DEPS to 112.0.5591.0 * chore: bump chromium in DEPS to 112.0.5593.0 * chore: bump chromium in DEPS to 112.0.5594.3 * chore: bump chromium in DEPS to 112.0.5597.0 * chore: update chromium patches * 4242507: Move most of GetChromeKeySystems() into components/cdm Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4242507 It seems as though the bug this patch was trying to resolve is now fixed. * chore: update v8 patches * 4240798: Get rid of ShowInvalidPrinterSettingsError() in PrintManagerHost. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4240798 * 4247938: Bump min required GTK version to 3.20 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4247938 * 4173660: Remove unused argument in BeforeUnloadCompleted Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4173660 * 4226656: Add response url to SimpleURLLoader::OnRedirectCallback Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4226656 * fixup!: 4240798: Get rid of ShowInvalidPrinterSettingsError() in PrintManager Host. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4240798 * chore: bump chromium in DEPS to 112.0.5599.0 * chore: update patches * 4251237: [StorageKey Cleanup] (2) Rename CreateFirstParty constructors Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4251237 * 4256866: [Extensions] Replace GetHooksForAPI with a RegisterHooksDelegate Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4256866 * chore: bump chromium in DEPS to 112.0.5601.0 * chore: update patches * chore: bump chromium in DEPS to 112.0.5603.0 * chore: bump chromium in DEPS to 112.0.5605.0 * chore: bump chromium in DEPS to 112.0.5607.0 * update patches * fix mas patch * chore: bump chromium in DEPS to 112.0.5609.0 * chore: update patches * build: update appveyor image 4072083: New toolchain for Windows 11 10.0.22621.755 SDK | https://chromium-review.googlesource.com/c/chromium/src/+/4072083 * chore: bump chromium in DEPS to 112.0.5611.0 * fix patches * chore: update patches * 4261434: Remove browser_watcher (1/3): Move ExitCodeWatcher to chrome/app https://chromium-review.googlesource.com/c/chromium/src/+/4261434 * 4258446: Move network::mojom::ClearDataFilter to its own mojom file https://chromium-review.googlesource.com/c/chromium/src/+/4258446 * 4128591: Enable large pdbs by default https://chromium-review.googlesource.com/c/chromium/src/+/4128591 * move dbgcore/dbghelp to extensions_to_skip * chore: bump chromium in DEPS to 113.0.5624.0 * chore: bump chromium in DEPS to 113.0.5626.0 * chore: bump chromium in DEPS to 113.0.5628.2 * chore: bump chromium in DEPS to 113.0.5630.0 * chore: bump chromium in DEPS to 113.0.5632.0 * chore: bump chromium in DEPS to 113.0.5634.0 * chore: bump chromium in DEPS to 113.0.5636.0 * 4255184: Permit popups from fullscreen-within-tab openers https://chromium-review.googlesource.com/c/chromium/src/+/4255184 * 4297715: [mac] Introduce BluetoothLowEnergyAdapterApple to reuse CoreBluetooth https://chromium-review.googlesource.com/c/chromium/src/+/4297715 * 4301154: Remove GLContextCGL and cleanup relevant code https://chromium-review.googlesource.com/c/chromium/src/+/4301154 * 4278389: CDP: fix Page.addScriptToEvaluateOnNewDocument in iframes https://chromium-review.googlesource.com/c/chromium/src/+/4278389 * 4240798: Get rid of ShowInvalidPrinterSettingsError() in PrintManagerHost. https://chromium-review.googlesource.com/c/chromium/src/+/4240798 * 4291989: Refactor logic determining untrusted mojo invitation flag. https://chromium-review.googlesource.com/c/chromium/src/+/4291989 * 4110189: Add Select option to content touch selection menu. https://chromium-review.googlesource.com/c/chromium/src/+/4110189 * 4309923: [Extensions] Add a unit test for API permissions having features https://chromium-review.googlesource.com/c/chromium/src/+/4309923 * 4282657: Revert "[headless] Route stdio to parent console on Windows." https://chromium-review.googlesource.com/c/chromium/src/+/4282657 * 4306685: [v8] Improve V8 flag configuration to avoid errors https://chromium-review.googlesource.com/c/chromium/src/+/4306685 * 4295455: Add fallback Linux UI for when GTK 3.20 isn't available https://chromium-review.googlesource.com/c/chromium/src/+/4295455 * 4289774: Remove feature for shared sandbox policies https://chromium-review.googlesource.com/c/chromium/src/+/4289774 * 4292705: Rename WebSwapCGLLayer to ANGLESwapCGLLayer outside WebKit. https://chromium-review.googlesource.com/c/angle/angle/+/4292705 * chore: fixup patch indices * fixup! 4297715: [mac] Introduce BluetoothLowEnergyAdapterApple to reuse CoreBluetooth * 4289789: Remove base::JSONReader::ReadDeprecated https://chromium-review.googlesource.com/c/chromium/src/+/4289789 * 4281521: Remove `base::Value::FindKey()` https://chromium-review.googlesource.com/c/chromium/src/+/4281521 * 4276761: Update NAK constructor and GetIsCrossSite https://chromium-review.googlesource.com/c/chromium/src/+/4276761 * 4288119: Let GetUpload work with UploadInfo pointers https://chromium-review.googlesource.com/c/chromium/src/+/4288119 * 4285322: content: Move WebExposedIsolationLevel to its own public header https://chromium-review.googlesource.com/c/chromium/src/+/4285322 * 4251818: [Extensions] Make ExtensionSet moveable. https://chromium-review.googlesource.com/c/chromium/src/+/4251818 * 4299554: [json-schema-compiler] Refactor to Params::Create (14/74) https://chromium-review.googlesource.com/c/chromium/src/+/4299554 * chore: update printing patch indices * chore: update chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4295455 Our patch changes the signature of `LinuxUiTheme::GetWindowFrameProvider()`. Upstream 4295455 added a new subclass (FallbackLinuxUi) so sync its version of GetWindowFrameProvider() to match our changes. * chore: disable node test parallel/test-intl Disabling the test because upstream is still working on this feature. Xref: https://chromium-review.googlesource.com/c/v8/v8/+/4237675 Xref: https://bugs.chromium.org/p/chromium/issues/detail?id=1414292 When upstream churn is done we should re-enable this test and update it as necessary. * win7dep: Remove ResolveCoreWinRTStringDelayload Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4277708 Upstream has removed this since Win7 support is deprecated. This updates our `language_util_win.cc` file using the same approach that 4277708 uses for `base/win/win_util.cc`. * fix: remove use of ResolveCoreWinRTDelayload() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4297979 A followup to prev commit, which removed ResolveCoreWinRTStringDelayload(). This PR follows the 4297979 approach of simply removing the calls, e.g. https://chromium-review.googlesource.com/c/chromium/src/+/4297979/4/chrome/browser/device_reauth/win/authenticator_win.cc * fix: add d3dcompiler_47 to the zip manifest Xref: https://chromium-review.googlesource.com/c/angle/angle/+/4285717 Xref (24-x-y): https://github.com/electron/electron/pull/37510/commits/0fb1def32b406c02f48cd20ae7c3558a53edb418 * This clang roll breaks Linux arm 32-bit Xref (24-x-y): https://github.com/electron/electron/pull/37510/commits/122911449433d98c40575df7af8775e06d1a4fc7 Xref (chromium): https://crbug.com/1410101 * fix: WebUSB on ARM64 macs (#37441) * chore: update patches * chore: fix macOS CI build. Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4278307 That whole dir was previously being removed to save space since we don't use it. We still don't use anything in the file, but gn needs it to exist. * fixup! chore: fix macOS CI build. chore: mkdir --parents does not exist on BSD; use mkdir -p * chore: update chromium/mas_disable_remote_accessibility.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4273450 Upstream added a new block of code using NSAccessibilityRemoteUIElement, so stub it out with `#if !IS_MAS_BUILD()` same as we do everwhere else. * chore: address code review nit :) --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard Co-authored-by: Keeley Hammond Co-authored-by: Jeremy Rose Co-authored-by: Charles Kerr Co-authored-by: John Kleinschmidt --- .circleci/config/base.yml | 11 +- BUILD.gn | 2 +- DEPS | 2 +- appveyor-bake.yml | 5 +- appveyor-woa.yml | 2 +- appveyor.yml | 2 +- build/zip.py | 10 +- patches/angle/.patches | 1 - ...pcgllayer_to_webswapcgllayerchromium.patch | 66 ---- patches/boringssl/expose_aes-cfb.patch | 4 +- patches/boringssl/expose_ripemd160.patch | 2 +- ...ack_ssl_error_zero_return_explicitly.patch | 10 +- patches/chromium/.patches | 2 +- ...client_precreatemessageloop_callback.patch | 6 +- .../add_didinstallconditionalfeatures.patch | 32 +- ...lectron_deps_to_license_credits_file.patch | 4 +- ...er_to_linuxui_getwindowframeprovider.patch | 79 +++-- ...pedcliboardwriter_writeunsaferawdata.patch | 8 +- ..._scheduler_throttling_per_renderview.patch | 16 +- ..._windows_to_have_different_web_prefs.patch | 20 +- ...leges_in_unsandboxed_child_processes.patch | 2 +- patches/chromium/blink_local_frame.patch | 8 +- patches/chromium/boringssl_build_gn.patch | 2 +- .../build_add_electron_tracing_category.patch | 6 +- ...build_disable_partition_alloc_on_mac.patch | 16 +- ..._depend_on_packed_resource_integrity.patch | 37 ++- patches/chromium/build_gn.patch | 2 +- ...bcxx_abi_unstable_false_for_electron.patch | 2 +- ...ld_config_in_the_required_components.patch | 76 ++--- patches/chromium/can_create_window.patch | 40 +-- ...hore_add_electron_deps_to_gitignores.patch | 12 +- ...dle_synthetic_mouse_events_for_touch.patch | 4 +- ..._introduce_blocking_api_for_electron.patch | 6 +- ...tition_attribute_dcheck_for_webviews.patch | 4 +- ...ile_methods_in_profile_selections_cc.patch | 6 +- ...screationoverridden_with_full_params.patch | 48 +-- patches/chromium/chrome_key_systems.patch | 37 --- ...e_browser_v8_snapshot_file_name_fuse.patch | 10 +- .../custom_protocols_plzserviceworker.patch | 8 +- patches/chromium/dcheck.patch | 4 +- patches/chromium/desktop_media_list.patch | 8 +- .../disable_color_correct_rendering.patch | 28 +- .../disable_compositor_recycling.patch | 4 +- ...le_freezing_flags_after_init_in_node.patch | 8 +- patches/chromium/disable_hidden.patch | 6 +- patches/chromium/disable_unload_metrics.patch | 6 +- .../chromium/enable_reset_aspect_ratio.patch | 4 +- ...locator_for_usage_outside_of_the_gin.patch | 8 +- ...xpose_setuseragent_on_networkcontext.patch | 16 +- ...egenerationcheckcallbackinmainthread.patch | 4 +- .../extend_apply_webpreferences.patch | 8 +- ...d_data_parameter_to_processsingleton.patch | 12 +- ..._registry_to_multibuffer_data_source.patch | 2 +- ...g_the_base_spellchecker_download_url.patch | 6 +- ...to_add_observers_on_created_hunspell.patch | 27 +- ...e_launch_options_for_service_process.patch | 70 +++-- ...screen_rendering_with_viz_compositor.patch | 32 +- ..._raw_response_headers_from_urlloader.patch | 28 +- ..._exclusive_access_for_electron_needs.patch | 20 +- ...uest_webcontents_to_enter_fullscreen.patch | 4 +- .../fix_aspect_ratio_with_max_size.patch | 4 +- ...ding_non-standard_schemes_in_iframes.patch | 14 +- ...x_crash_when_saving_edited_pdf_files.patch | 6 +- ...ntcapturercount_in_web_contents_impl.patch | 8 +- ...board_hides_on_input_blur_in_webview.patch | 10 +- ..._properly_honor_printing_page_ranges.patch | 2 +- ...x_remove_caption-removing_style_call.patch | 4 +- ...from_localframe_requestexecutescript.patch | 18 +- .../fix_tray_icon_gone_on_lock_screen.patch | 6 +- patches/chromium/frame_host_manager.patch | 6 +- .../gin_enable_disable_v8_platform.patch | 2 +- ...gpu_notify_when_dxdiag_request_fails.patch | 2 +- .../chromium/gritsettings_resource_ids.patch | 4 +- patches/chromium/gtk_visibility.patch | 2 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- ...tform_electron_can_call_x11_property.patch | 6 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- ...reate_a_console_if_logging_to_stderr.patch | 8 +- ...as_avoid_usage_of_private_macos_apis.patch | 14 +- .../mas_disable_custom_window_frame.patch | 10 +- .../mas_disable_remote_accessibility.patch | 108 +++---- .../chromium/mas_disable_remote_layer.patch | 57 ++-- patches/chromium/mas_no_private_api.patch | 41 +-- ...emote_certificate_verification_logic.patch | 24 +- .../chromium/notification_provenance.patch | 16 +- patches/chromium/picture-in-picture.patch | 2 +- ...utofill_colors_to_the_color_pipeline.patch | 14 +- patches/chromium/printing.patch | 282 ++++++++++-------- patches/chromium/process_singleton.patch | 16 +- ...r_changes_to_the_webcontentsobserver.patch | 20 +- ...f_incognito_apis_in_the_spellchecker.patch | 6 +- .../render_widget_host_view_base.patch | 4 +- .../render_widget_host_view_mac.patch | 14 +- patches/chromium/resource_file_conflict.patch | 6 +- ...st_llvmorg-16-init-17653-g39da55e8-3.patch | 78 +++++ ...h_spell_check_delayed_initialization.patch | 34 +-- patches/chromium/scroll_bounce_flag.patch | 4 +- ...ecks_in_mediastreamdevicescontroller.patch | 12 +- .../support_mixed_sandbox_with_zygote.patch | 16 +- ...andboxed_ppapi_processes_skip_zygote.patch | 6 +- .../upload_list_add_loadsync_method.patch | 8 +- patches/chromium/web_contents.patch | 12 +- patches/chromium/webview_cross_drag.patch | 4 +- patches/chromium/webview_fullscreen.patch | 4 +- .../worker_context_will_destroy.patch | 16 +- ...feat_add_hook_to_notify_script_ready.patch | 12 +- patches/config.json | 2 - patches/ffmpeg/link_with_loader_path.patch | 4 +- patches/v8/.patches | 1 - patches/v8/build_gn.patch | 6 +- patches/v8/dcheck.patch | 4 +- ...se_of_preserve_most_on_arm64_windows.patch | 44 --- ...export_private_v8_symbols_on_windows.patch | 4 +- ...ort_symbols_needed_for_windows_build.patch | 4 +- patches/v8/expose_mksnapshot.patch | 4 +- ...ed_attribute_for_older_msvc_versions.patch | 8 +- ...dcheck_for_node_stream_array_buffers.patch | 2 +- ...workaround_an_undefined_symbol_error.patch | 10 +- script/node-disabled-tests.json | 1 + script/prepare-appveyor.js | 4 +- script/setup-win-for-dev.bat | 11 +- .../zip_manifests/dist_zip.win.arm64.manifest | 1 + shell/app/electron_main_win.cc | 7 +- .../api/electron_api_content_tracing.cc | 3 +- .../api/electron_api_crash_reporter.cc | 11 +- shell/browser/api/electron_api_session.cc | 13 +- shell/browser/api/electron_api_url_loader.cc | 1 + shell/browser/api/electron_api_url_loader.h | 3 +- .../browser/api/electron_api_web_contents.cc | 9 +- shell/browser/api/electron_api_web_contents.h | 3 +- shell/browser/electron_browser_client.cc | 7 - shell/browser/electron_browser_client.h | 1 - .../electron_browser_main_parts_mac.mm | 5 +- .../resources_private_api.cc | 3 +- shell/browser/extensions/api/tabs/tabs_api.cc | 32 +- .../electron_extension_host_delegate.cc | 2 +- .../electron_extension_host_delegate.h | 2 +- shell/browser/hid/hid_chooser_context.cc | 2 +- shell/browser/net/cert_verifier_client.cc | 1 + shell/browser/network_hints_handler_impl.cc | 4 +- shell/browser/network_hints_handler_impl.h | 3 +- .../osr/osr_render_widget_host_view.cc | 7 +- .../browser/osr/osr_render_widget_host_view.h | 4 +- shell/browser/osr/osr_web_contents_view.cc | 3 + shell/browser/osr/osr_web_contents_view.h | 1 + .../browser/serial/serial_chooser_context.cc | 11 - shell/browser/ui/inspectable_web_contents.cc | 16 +- shell/browser/usb/electron_usb_delegate.cc | 6 +- shell/browser/usb/usb_chooser_context.cc | 2 +- shell/browser/web_contents_preferences.cc | 2 +- shell/common/api/electron_api_clipboard.cc | 4 +- shell/common/language_util_win.cc | 4 - shell/renderer/api/electron_api_web_frame.cc | 2 +- ...electron_extensions_dispatcher_delegate.cc | 12 +- 154 files changed, 1051 insertions(+), 1108 deletions(-) delete mode 100644 patches/angle/.patches delete mode 100644 patches/angle/fix_rename_webswapcgllayer_to_webswapcgllayerchromium.patch delete mode 100644 patches/chromium/chrome_key_systems.patch create mode 100644 patches/chromium/revert_roll_clang_rust_llvmorg-16-init-17653-g39da55e8-3.patch delete mode 100644 patches/v8/disable_the_use_of_preserve_most_on_arm64_windows.patch diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index 0515bda3a1782..c309b7e7cd4aa 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -54,7 +54,7 @@ executors: type: enum enum: ["macos.x86.medium.gen2", "large"] macos: - xcode: 13.3.0 + xcode: 14.0.0 resource_class: << parameters.size >> # Electron Runners @@ -434,10 +434,17 @@ step-get-more-space-on-mac: &step-get-more-space-on-mac # sudo rm -rf /System/Library/PreferencePanes # sudo rm -rf /System/Library/AssetsV2/* sudo rm -rf /Applications/Safari.app - sudo rm -rf ~/project/src/build/linux sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data sudo rm -rf ~/project/src/third_party/angle/third_party/VK-GL-CTS + # the contents of build/linux/strip_binary.gni aren't used, but + # https://chromium-review.googlesource.com/c/chromium/src/+/4278307 + # needs the file to exist. + mv ~/project/src/build/linux/strip_binary.gni "${TMPDIR}"/ + sudo rm -rf ~/project/src/build/linux + mkdir -p ~/project/src/build/linux + mv "${TMPDIR}/strip_binary.gni" ~/project/src/build/linux/ + # lipo off some huge binaries arm64 versions to save space strip_arm_deep $(xcode-select -p)/../SharedFrameworks # strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr diff --git a/BUILD.gn b/BUILD.gn index d065e315a0ebc..1c877615ef139 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1277,7 +1277,7 @@ if (is_mac) { ] deps += [ - "//components/browser_watcher:browser_watcher_client", + "//chrome/app:exit_code_watcher", "//components/crash/core/app:run_as_crashpad_handler", ] diff --git a/DEPS b/DEPS index df72f5784473f..1d8a4b82a23ef 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '111.0.5560.0', + '113.0.5636.0', 'node_version': 'v18.14.2', 'nan_version': diff --git a/appveyor-bake.yml b/appveyor-bake.yml index f2f40b86471ec..709c1b70cf5d0 100644 --- a/appveyor-bake.yml +++ b/appveyor-bake.yml @@ -6,7 +6,7 @@ version: 1.0.{build} build_cloud: electronhq-16-core -image: e-111.0.5560.0-node18 +image: e-112.0.5607.0-vs2022 environment: GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache ELECTRON_OUT_DIR: Default @@ -82,7 +82,8 @@ build_script: - ps: Copy-Item -path .\.depshash -destination ..\.depshash - ps: cd ..\.. - gclient sync --with_branch_heads --with_tags --nohooks - - ps: regsvr32 /s "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\DIA SDK\bin\amd64\msdia140.dll" + - ps: regsvr32 /s "C:\Program Files\Microsoft Visual Studio\2022\Community\DIA SDK\bin\amd64\msdia140.dll" + - ps: set vs2022_install="C:\Program Files\Microsoft Visual Studio\2022\Community" # The following lines are needed when baking from a completely new image (eg MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest via image: base-windows-server2019) # # Restart VM diff --git a/appveyor-woa.yml b/appveyor-woa.yml index d62a507d6774b..6066059457c7b 100644 --- a/appveyor-woa.yml +++ b/appveyor-woa.yml @@ -29,7 +29,7 @@ version: 1.0.{build} build_cloud: electronhq-16-core -image: e-111.0.5560.0-2 +image: e-112.0.5607.0-vs2022 environment: GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache ELECTRON_OUT_DIR: Default diff --git a/appveyor.yml b/appveyor.yml index 57a550769cf49..d1ac6aa8f5d4a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,7 +29,7 @@ version: 1.0.{build} build_cloud: electronhq-16-core -image: e-111.0.5560.0-node18 +image: e-112.0.5607.0-vs2022 environment: GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache ELECTRON_OUT_DIR: Default diff --git a/build/zip.py b/build/zip.py index bfaf27c08b24b..048e40ff7f33c 100644 --- a/build/zip.py +++ b/build/zip.py @@ -10,7 +10,13 @@ '.mojom.js', '.mojom-lite.js', '.info', - '.m.js' + '.m.js', + + # These are only needed for Chromium tests we don't run. Listed in + # 'extensions' because the mksnapshot zip has these under a subdirectory, and + # the PATHS_TO_SKIP is checked with |startswith|. + 'dbgcore.dll', + 'dbghelp.dll', ] PATHS_TO_SKIP = [ @@ -34,7 +40,7 @@ # Skip because these are outputs that we don't need. 'resources/inspector', 'gen/third_party/devtools-frontend/src', - 'gen/ui/webui' + 'gen/ui/webui', ] def skip_path(dep, dist_zip, target_cpu): diff --git a/patches/angle/.patches b/patches/angle/.patches deleted file mode 100644 index ca864b58a91d0..0000000000000 --- a/patches/angle/.patches +++ /dev/null @@ -1 +0,0 @@ -fix_rename_webswapcgllayer_to_webswapcgllayerchromium.patch diff --git a/patches/angle/fix_rename_webswapcgllayer_to_webswapcgllayerchromium.patch b/patches/angle/fix_rename_webswapcgllayer_to_webswapcgllayerchromium.patch deleted file mode 100644 index a13e32902ade5..0000000000000 --- a/patches/angle/fix_rename_webswapcgllayer_to_webswapcgllayerchromium.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Milan Burda -Date: Mon, 10 Oct 2022 15:11:08 +0400 -Subject: fix: rename WebSwapCGLLayer to WebSwapCGLLayerChromium - -Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x23c589b50) -and src/out/testing/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib (0x1123f8488). -One of the two will be used. Which one is undefined. - -diff --git a/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h b/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h -index 7101cd271c07e604c6f5241d1a22f59f446c0033..98a89976f87e32a66bd504951698204fad938d57 100644 ---- a/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h -+++ b/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h -@@ -18,7 +18,7 @@ struct __IOSurface; - typedef __IOSurface *IOSurfaceRef; - - // WebKit's build process requires that every Objective-C class name has the prefix "Web". --@class WebSwapCGLLayer; -+@class WebSwapCGLLayerChromium; - - namespace rx - { -@@ -89,7 +89,7 @@ class WindowSurfaceCGL : public SurfaceGL - gl::Framebuffer *framebuffer) override; - - private: -- WebSwapCGLLayer *mSwapLayer; -+ WebSwapCGLLayerChromium *mSwapLayer; - SharedSwapState mSwapState; - uint64_t mCurrentSwapId; - -diff --git a/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm b/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm -index 27990e9c2facbbe0e30f4b275e0778a6474fb9ce..84f9fa9b6d31fb0e85a4c4270dff4d935f855c26 100644 ---- a/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm -+++ b/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm -@@ -24,7 +24,7 @@ - # include "libANGLE/renderer/gl/StateManagerGL.h" - # include "libANGLE/renderer/gl/cgl/DisplayCGL.h" - --@interface WebSwapCGLLayer : CAOpenGLLayer { -+@interface WebSwapCGLLayerChromium : CAOpenGLLayer { - CGLContextObj mDisplayContext; - - bool initialized; -@@ -38,7 +38,7 @@ - (id)initWithSharedState:(rx::SharedSwapState *)swapState - withFunctions:(const rx::FunctionsGL *)functions; - @end - --@implementation WebSwapCGLLayer -+@implementation WebSwapCGLLayerChromium - - (id)initWithSharedState:(rx::SharedSwapState *)swapState - withContext:(CGLContextObj)displayContext - withFunctions:(const rx::FunctionsGL *)functions -@@ -220,9 +220,9 @@ - (void)drawInCGLContext:(CGLContextObj)glContext - mSwapState.lastRendered = &mSwapState.textures[1]; - mSwapState.beingPresented = &mSwapState.textures[2]; - -- mSwapLayer = [[WebSwapCGLLayer alloc] initWithSharedState:&mSwapState -- withContext:mContext -- withFunctions:mFunctions]; -+ mSwapLayer = [[WebSwapCGLLayerChromium alloc] initWithSharedState:&mSwapState -+ withContext:mContext -+ withFunctions:mFunctions]; - [mLayer addSublayer:mSwapLayer]; - [mSwapLayer setContentsScale:[mLayer contentsScale]]; - diff --git a/patches/boringssl/expose_aes-cfb.patch b/patches/boringssl/expose_aes-cfb.patch index 899d5deff90d1..4dd7bf3702303 100644 --- a/patches/boringssl/expose_aes-cfb.patch +++ b/patches/boringssl/expose_aes-cfb.patch @@ -58,10 +58,10 @@ index 852b76bea69988e0b3ac76a17b603128f239dde0..d443f4dc2daea0b7aa86ae75d31d995f callback(EVP_aes_192_ctr(), "aes-192-ctr", NULL, arg); callback(EVP_aes_256_ctr(), "aes-256-ctr", NULL, arg); diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h -index 0e52ac8dc948764d52f196734cfc974e6d740b8e..caaeade2d78f361fd67186e444e3cb6997355d14 100644 +index 310d7c237fd884ba715e3fa97ccf1393b6d04fbb..66e69d487fbb767438b7d0dfdf3770f54e3cf7b2 100644 --- a/include/openssl/cipher.h +++ b/include/openssl/cipher.h -@@ -470,6 +470,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void); +@@ -476,6 +476,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void); // EVP_aes_128_cfb128 is only available in decrepit. OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_128_cfb128(void); diff --git a/patches/boringssl/expose_ripemd160.patch b/patches/boringssl/expose_ripemd160.patch index fede352bb528f..a443b52a1c95f 100644 --- a/patches/boringssl/expose_ripemd160.patch +++ b/patches/boringssl/expose_ripemd160.patch @@ -10,7 +10,7 @@ this patch is required to provide ripemd160 support in the nodejs crypto module. diff --git a/crypto/digest_extra/digest_extra.c b/crypto/digest_extra/digest_extra.c -index 8cbb28e3afde3dbae3887b22e8b607fa7303e89f..32caba196eb9f0823f774dac9e91314035b3ff7f 100644 +index 08ed671a8095566e6c87ea846a95c59efdd7f42b..29797fb8f69c23ac427c041d779a013b4a78c02a 100644 --- a/crypto/digest_extra/digest_extra.c +++ b/crypto/digest_extra/digest_extra.c @@ -85,6 +85,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = { diff --git a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch index 03f362ad6cc96..0fec543b9e5bd 100644 --- a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch +++ b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch @@ -20,7 +20,7 @@ index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57 case ssl_open_record_error: diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc -index 0f0f5b1c32f88ec019fc3eab0977c9bb64c095ed..e25b72ec1e43c52d329d4f396776698526685439 100644 +index 86e8eb33e2f99b9a6173550027cfd0812a39614e..f2aac85c096bef42a015135b02936e3d4e9a4c56 100644 --- a/ssl/ssl_lib.cc +++ b/ssl/ssl_lib.cc @@ -1320,7 +1320,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) { @@ -32,7 +32,7 @@ index 0f0f5b1c32f88ec019fc3eab0977c9bb64c095ed..e25b72ec1e43c52d329d4f3967766985 return SSL_ERROR_ZERO_RETURN; } // An EOF was observed which violates the protocol, and the underlying -@@ -2598,13 +2598,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) { +@@ -2597,13 +2597,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) { return CRYPTO_get_ex_data(&ctx->ex_data, idx); } @@ -48,10 +48,10 @@ index 0f0f5b1c32f88ec019fc3eab0977c9bb64c095ed..e25b72ec1e43c52d329d4f3967766985 void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, RSA *(*cb)(SSL *ssl, int is_export, diff --git a/ssl/ssl_test.cc b/ssl/ssl_test.cc -index 17209298f84bcd248c0367a4cc8fb88074705b5e..fa6d7d22a26c520896ea8b8b1f0e5cf816a52812 100644 +index f51c11efc12209377773204808b85c9cbf5d3bff..d19fd1f9643f99fdd56753a942fccefff08728ac 100644 --- a/ssl/ssl_test.cc +++ b/ssl/ssl_test.cc -@@ -8437,11 +8437,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) { +@@ -8460,11 +8460,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) { EXPECT_EQ(ret, 0); EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_ZERO_RETURN); @@ -63,7 +63,7 @@ index 17209298f84bcd248c0367a4cc8fb88074705b5e..fa6d7d22a26c520896ea8b8b1f0e5cf8 // Although the client has seen close_notify, it should continue to report // |SSL_ERROR_SYSCALL| when its writes fail. ret = SSL_write(client.get(), data, sizeof(data)); -@@ -8449,22 +8444,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) { +@@ -8472,22 +8467,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) { EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_SYSCALL); EXPECT_TRUE(write_failed); write_failed = false; diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 150dacaf66da5..8ce3f3b6cc4dd 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -25,7 +25,6 @@ mas_disable_remote_accessibility.patch mas_disable_custom_window_frame.patch mas_avoid_usage_of_private_macos_apis.patch mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch -chrome_key_systems.patch add_didinstallconditionalfeatures.patch desktop_media_list.patch proxy_config_monitor.patch @@ -127,3 +126,4 @@ expose_v8initializer_codegenerationcheckcallbackinmainthread.patch chore_patch_out_profile_methods_in_profile_selections_cc.patch fix_x11_window_restore_minimized_maximized_window.patch chore_defer_usb_service_getdevices_request_until_usb_service_is.patch +revert_roll_clang_rust_llvmorg-16-init-17653-g39da55e8-3.patch diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 78614d1de6a0e..67c055b31b68c 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set. This should be upstreamed. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index 31f48f482532651052ba63a95884162a2e652509..0076d9f34970488a236ace0274aef31dd20b2dfa 100644 +index 7bf09dd8870040e74cd1a7653665d0806910378c..ec6d1554075ee5454f79e98d0e2e539395499dbe 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -242,6 +242,10 @@ int GpuMain(MainFunctionParams parameters) { +@@ -243,6 +243,10 @@ int GpuMain(MainFunctionParams parameters) { // to the GpuProcessHost once the GpuServiceImpl has started. viz::GpuServiceImpl::InstallPreInitializeLogHandler(); @@ -24,7 +24,7 @@ index 31f48f482532651052ba63a95884162a2e652509..0076d9f34970488a236ace0274aef31d // We are experiencing what appear to be memory-stomp issues in the GPU // process. These issues seem to be impacting the task executor and listeners // registered to it. Create the task executor on the heap to guard against -@@ -326,7 +330,6 @@ int GpuMain(MainFunctionParams parameters) { +@@ -327,7 +331,6 @@ int GpuMain(MainFunctionParams parameters) { const_cast(&command_line), gpu_preferences); const bool dead_on_arrival = !init_success; diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 78f27c94f9eed..73692c95c1241 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the context, which can cause some preload scripts to trip. diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h -index 7eaed5e4ce1f8a46d1e25f8838cf52b3676a7fb5..8f2bd75d29acfc212f2e680caf63c428aedb16b9 100644 +index 6c92a2856e447bdda11c7ed2c64b79b93a0eca26..03dedde2d83e6b09fb7e90be7dfdce246f301d8f 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h @@ -136,6 +136,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, @@ -23,10 +23,10 @@ index 7eaed5e4ce1f8a46d1e25f8838cf52b3676a7fb5..8f2bd75d29acfc212f2e680caf63c428 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index a0123eac7193282dbfba9712f0d88b2b87fccd9f..137c78c4441d58d9e8822aa87a2389126a80e1aa 100644 +index 59a0e2d91f5d497f35324c0cec181baccecd2115..5e73aa32c7bd226bc178c1f66b70bc7f26fc3ce0 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4407,6 +4407,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4378,6 +4378,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index a0123eac7193282dbfba9712f0d88b2b87fccd9f..137c78c4441d58d9e8822aa87a238912 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index c0d24c1715b4714c5f179dbba4f0d91cddef1946..c819e1429630342cb34476847b3c25b140dfc593 100644 +index ff1a05ac05d2df7db3ba3579ddf0d2d329d9782c..72806c4947b7187b54c79a1cd05200183e56d4d1 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -603,6 +603,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -605,6 +605,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 c0d24c1715b4714c5f179dbba4f0d91cddef1946..c819e1429630342cb34476847b3c25b1 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 9fa27d4f1c63599d5cfeb095e74a72a88db1d8a2..0d37864c44495615103f5c1dca623c1e181a6460 100644 +index 246d2ff90ea004102aa2680a60741fb1eedc3d8c..e9358bb7b3808215e27faa58b87045cbd6ab0598 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -592,6 +592,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -599,6 +599,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -67,22 +67,22 @@ index 9fa27d4f1c63599d5cfeb095e74a72a88db1d8a2..0d37864c44495615103f5c1dca623c1e virtual void WillReleaseScriptContext(v8::Local, int32_t world_id) {} diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc -index 9736b31c03a32635fb8fde581321cc10ec11b11a..c9fd2170a25a7970648b8210ebe94e225f4ee3aa 100644 +index e7d4256fa96f5bc8ad71bd13b6b33feef32b443f..0dfeda68a4dbfd6b442f8d8f928c8cb871dd6aa4 100644 --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc -@@ -197,6 +197,7 @@ void LocalWindowProxy::Initialize() { +@@ -198,6 +198,7 @@ void LocalWindowProxy::Initialize() { } InstallConditionalFeatures(); + GetFrame()->Client()->DidInstallConditionalFeatures(context, world_->GetWorldId()); if (World().IsMainWorld()) { - GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld(); + 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 bbcc1a23378d86d716171cf695f641212e64a30a..06b10cdfa96473731958c4a7e6d0839e79714ad3 100644 +index 2e876bbd8687fd99bdfcc4b7f22d23f4a4c9a0ef..1a3e7c682350670baf6e31bd7ef158e56bc25870 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -308,6 +308,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -318,6 +318,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -92,7 +92,7 @@ index bbcc1a23378d86d716171cf695f641212e64a30a..06b10cdfa96473731958c4a7e6d0839e 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 77850c10195719e320b1fdfc4f13c805a802d4ef..98955dd3da64a2f4b7036466d9e1eefd1704727d 100644 +index 3e43e9d70eaf2fbfbe7a7fe4e7326cd2b97df565..e94415f3b87e9eb1d6a9142d35928682ddc0064a 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 @@ -283,6 +283,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( @@ -110,7 +110,7 @@ index 77850c10195719e320b1fdfc4f13c805a802d4ef..98955dd3da64a2f4b7036466d9e1eefd 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 d3f976c53e4ad894bfb808c1184f949871c3df2f..00d95e053dcc274036fc7300ad0b946df969d5fa 100644 +index fc562006952b92d4aabf67f2db172797ca193035..ca2b370309ca8fcc0afbca77514430e9f95d9104 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h @@ -82,6 +82,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -123,10 +123,10 @@ index d3f976c53e4ad894bfb808c1184f949871c3df2f..00d95e053dcc274036fc7300ad0b946d 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 163e228075b5c6a1dcdb33896570258e14f5b5b3..e0ca34b36b2d6b98f9394f4022645f084cae3a58 100644 +index 06f0a9215bd63ae4b2f5df278b656f7b810bf822..7994db250fd41e65d45c1714b03ba554526b1a2d 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -373,6 +373,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -402,6 +402,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 de363687309af..076d301b4ba3b 100644 --- a/patches/chromium/add_electron_deps_to_license_credits_file.patch +++ b/patches/chromium/add_electron_deps_to_license_credits_file.patch @@ -7,10 +7,10 @@ Ensure that licenses for the dependencies introduced by Electron are included in `LICENSES.chromium.html` diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py -index 6f2e1a707767462e7b0e6909149cc16e6b22e62c..20a41de1b22a7403d3d1ddfcbd3454c690d2a50c 100755 +index e56688f7ab2a8b0ee59d0b7389e4c87370c8fad2..0e09b173574d48a3c7388315fef83f3ec74fe71a 100755 --- a/tools/licenses/licenses.py +++ b/tools/licenses/licenses.py -@@ -384,6 +384,31 @@ SPECIAL_CASES = { +@@ -383,6 +383,31 @@ SPECIAL_CASES = { "License": "Apache 2.0", "License File": "/third_party/selenium-atoms/LICENSE.closure", }, diff --git a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch index 2d0100c675008..019572b499a59 100644 --- a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch +++ b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch @@ -8,34 +8,34 @@ decorations in maximized mode where needed, preventing empty space caused by decoration shadows and rounded titlebars around the window while maximized. diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc -index c61bac00076822ae729882c64f3ad89e0d849e91..28cd9fb14783651ee651917f135c68faa0f2059a 100644 +index 99d3dc38ca60dbdc68bcb679067e8fd64e43b06a..7f5c3b103da21d213aa19fe8a4320bec0b7ebeb5 100644 --- a/ui/gtk/gtk_ui.cc +++ b/ui/gtk/gtk_ui.cc -@@ -507,13 +507,15 @@ std::unique_ptr GtkUi::CreateNavButtonProvider() { - return nullptr; +@@ -480,12 +480,13 @@ std::unique_ptr GtkUi::CreateNavButtonProvider() { + return std::make_unique(); } -ui::WindowFrameProvider* GtkUi::GetWindowFrameProvider(bool solid_frame) { +ui::WindowFrameProvider* GtkUi::GetWindowFrameProvider(bool solid_frame, bool maximized) { - if (!GtkCheckVersion(3, 14)) - return nullptr; auto& provider = - solid_frame ? solid_frame_provider_ : transparent_frame_provider_; +- if (!provider) { +- provider = std::make_unique(solid_frame); +- } + maximized + ? (solid_frame ? solid_maximized_frame_provider_ : transparent_maximized_frame_provider_) + : (solid_frame ? solid_frame_provider_ : transparent_frame_provider_); - if (!provider) -- provider = std::make_unique(solid_frame); ++ if (!provider) + provider = std::make_unique(solid_frame, maximized); return provider.get(); } diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h -index ebc31db3dad9ba7904fbd345c6a1ba31ed6fd813..1d2ffc82bb67ed80f508631c8c7d045be76f6761 100644 +index adf91ed69c33c5da4ba8cf55d7cbfc482d0762ba..404fccbbe6957ba9309955ef5e7498cdcd0411f0 100644 --- a/ui/gtk/gtk_ui.h +++ b/ui/gtk/gtk_ui.h @@ -106,7 +106,7 @@ class GtkUi : public ui::LinuxUiAndTheme { - SkColor GetInactiveSelectionFgColor() const override; + void GetInactiveSelectionFgColor(SkColor* color) const override; bool PreferDarkTheme() const override; std::unique_ptr CreateNavButtonProvider() override; - ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame) override; @@ -43,7 +43,7 @@ index ebc31db3dad9ba7904fbd345c6a1ba31ed6fd813..1d2ffc82bb67ed80f508631c8c7d045b private: using TintMap = std::map; -@@ -195,10 +195,13 @@ class GtkUi : public ui::LinuxUiAndTheme { +@@ -195,6 +195,8 @@ class GtkUi : public ui::LinuxUiAndTheme { // while Chrome is running. std::unique_ptr solid_frame_provider_; std::unique_ptr transparent_frame_provider_; @@ -52,13 +52,8 @@ index ebc31db3dad9ba7904fbd345c6a1ba31ed6fd813..1d2ffc82bb67ed80f508631c8c7d045b // Objects to notify when the window frame button order changes. base::ObserverList::Unchecked - window_button_order_observer_list_; -+ - }; - - } // namespace gtk diff --git a/ui/gtk/window_frame_provider_gtk.cc b/ui/gtk/window_frame_provider_gtk.cc -index e866f32a06abd8b9ee70f2972822b37756878259..d55229238fed1fedba65a969495c9b5c9f1b94fa 100644 +index 1925c1a2763b8dd720f5d0a630bc98ec5d16b9a0..a4986477b46aef555d526851cf191650d2972238 100644 --- a/ui/gtk/window_frame_provider_gtk.cc +++ b/ui/gtk/window_frame_provider_gtk.cc @@ -39,16 +39,18 @@ std::string GetThemeName() { @@ -67,7 +62,7 @@ index e866f32a06abd8b9ee70f2972822b37756878259..d55229238fed1fedba65a969495c9b5c -GtkCssContext WindowContext(bool solid_frame, bool focused) { +GtkCssContext WindowContext(bool solid_frame, bool maximized, bool focused) { - std::string selector = "#window.background."; + std::string selector = "window.background."; selector += solid_frame ? "solid-csd" : "csd"; + if (maximized) + selector += ".maximized"; @@ -82,7 +77,7 @@ index e866f32a06abd8b9ee70f2972822b37756878259..d55229238fed1fedba65a969495c9b5c + auto context = WindowContext(solid_frame, maximized, focused); // GTK4 renders the decoration directly on the window. if (!GtkCheckVersion(4)) - context = AppendCssNodeToStyleContext(context, "#decoration"); + context = AppendCssNodeToStyleContext(context, "decoration"); @@ -65,8 +67,8 @@ GtkCssContext DecorationContext(bool solid_frame, bool focused) { return context; } @@ -92,9 +87,9 @@ index e866f32a06abd8b9ee70f2972822b37756878259..d55229238fed1fedba65a969495c9b5c +GtkCssContext HeaderContext(bool solid_frame, bool maximized, bool focused) { + auto context = WindowContext(solid_frame, maximized, focused); context = - AppendCssNodeToStyleContext(context, "#headerbar.header-bar.titlebar"); + AppendCssNodeToStyleContext(context, "headerbar.header-bar.titlebar"); if (!focused) -@@ -111,8 +113,8 @@ int ComputeTopCornerRadius() { +@@ -121,8 +123,8 @@ int ComputeTopCornerRadius() { // need to experimentally determine the corner radius by rendering a sample. // Additionally, in GTK4, the headerbar corners get clipped by the window // rather than the headerbar having its own rounded corners. @@ -105,16 +100,16 @@ index e866f32a06abd8b9ee70f2972822b37756878259..d55229238fed1fedba65a969495c9b5c ApplyCssToContext(context, R"(window, headerbar { background-image: none; background-color: black; -@@ -145,7 +147,7 @@ int ComputeTopCornerRadius() { +@@ -155,7 +157,7 @@ int ComputeTopCornerRadius() { bool HeaderIsTranslucent() { // The arbitrary square size to render a sample header. constexpr int kHeaderSize = 32; - auto context = HeaderContext(false, false); + auto context = HeaderContext(false, false, false); - ApplyCssToContext(context, R"(window, headerbar { - box-shadow: none; - border: none; -@@ -197,8 +199,8 @@ void WindowFrameProviderGtk::Asset::CloneFrom( + double opacity = 1.0f; + GtkStyleContextGet(context, "opacity", &opacity, nullptr); + if (opacity < 1.0f) +@@ -211,8 +213,8 @@ void WindowFrameProviderGtk::Asset::CloneFrom( unfocused_bitmap = src.unfocused_bitmap; } @@ -125,7 +120,7 @@ index e866f32a06abd8b9ee70f2972822b37756878259..d55229238fed1fedba65a969495c9b5c WindowFrameProviderGtk::~WindowFrameProviderGtk() = default; -@@ -305,7 +307,7 @@ void WindowFrameProviderGtk::PaintWindowFrame( +@@ -319,7 +321,7 @@ void WindowFrameProviderGtk::PaintWindowFrame( top_area_height_dip * scale - effective_frame_thickness_px.top(); auto header = PaintHeaderbar({client_bounds_px.width(), top_area_height_px}, @@ -134,7 +129,7 @@ index e866f32a06abd8b9ee70f2972822b37756878259..d55229238fed1fedba65a969495c9b5c image = gfx::ImageSkia::CreateFrom1xBitmap(header); // In GTK4, the headerbar gets clipped by the window. if (GtkCheckVersion(4)) { -@@ -337,7 +339,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) { +@@ -351,7 +353,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) { gfx::Rect frame_bounds_dip(kMaxFrameSizeDip, kMaxFrameSizeDip, 2 * kMaxFrameSizeDip, 2 * kMaxFrameSizeDip); @@ -143,7 +138,7 @@ index e866f32a06abd8b9ee70f2972822b37756878259..d55229238fed1fedba65a969495c9b5c frame_bounds_dip.Inset(-GtkStyleContextGetPadding(focused_context)); frame_bounds_dip.Inset(-GtkStyleContextGetBorder(focused_context)); gfx::Size bitmap_size(BitmapSizePx(asset), BitmapSizePx(asset)); -@@ -345,7 +347,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) { +@@ -359,7 +361,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) { PaintBitmap(bitmap_size, frame_bounds_dip, focused_context, scale); asset.unfocused_bitmap = PaintBitmap(bitmap_size, frame_bounds_dip, @@ -175,8 +170,34 @@ index 32c3d63ae4598339965c58443a8c2d12b99fb89a..91496d957b8291cd37948e237a1cc4bf }; } // namespace gtk +diff --git a/ui/linux/fallback_linux_ui.cc b/ui/linux/fallback_linux_ui.cc +index ee3e7b96eba0ade61e229aea05f5417e7822a5f5..b393cc2fbc039afa062a8b3ab880c7ff9db8b681 100644 +--- a/ui/linux/fallback_linux_ui.cc ++++ b/ui/linux/fallback_linux_ui.cc +@@ -134,7 +134,7 @@ FallbackLinuxUi::CreateNavButtonProvider() { + } + + ui::WindowFrameProvider* FallbackLinuxUi::GetWindowFrameProvider( +- bool solid_frame) { ++ bool solid_frame, bool maximized) { + return nullptr; + } + +diff --git a/ui/linux/fallback_linux_ui.h b/ui/linux/fallback_linux_ui.h +index d5b12df3f4e32aef6d974986ceeb666edecc4e11..e836f661a17f2e9916685d497ee5f487c4000661 100644 +--- a/ui/linux/fallback_linux_ui.h ++++ b/ui/linux/fallback_linux_ui.h +@@ -67,7 +67,7 @@ class FallbackLinuxUi : public LinuxUiAndTheme { + void GetInactiveSelectionFgColor(SkColor* color) const override; + bool PreferDarkTheme() const override; + std::unique_ptr CreateNavButtonProvider() override; +- ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame) override; ++ ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame, bool maximized) override; + + private: + std::string default_font_family_; diff --git a/ui/linux/linux_ui.h b/ui/linux/linux_ui.h -index b5fd57741d2f47bda9499cf10e73cc9b3dd1b4dc..35e5bedb719af699485b575ece4bdb4f90df07df 100644 +index 82d40cb5fa1b9ad54e43502793a7d1d3e94e2ebb..6f6296c4f8334e59e1522abe291d65bb508f9541 100644 --- a/ui/linux/linux_ui.h +++ b/ui/linux/linux_ui.h @@ -273,7 +273,7 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUiTheme { diff --git a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch index fc481a2937412..0b54569894c73 100644 --- a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch +++ b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch @@ -8,10 +8,10 @@ was removed as part of the Raw Clipboard API scrubbing. https://bugs.chromium.org/p/chromium/issues/detail?id=1217643 diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc -index e1f7acfa42b8dd377f67a1fdda0c375f239f1189..50a84d348217a136cac4f63639d45e564baa3afe 100644 +index 069a4481ca6318215dd8a86b71aa7cacfb635173..605c5b8f8a7e50a22c94c6818cbdd95ced14fc15 100644 --- a/ui/base/clipboard/scoped_clipboard_writer.cc +++ b/ui/base/clipboard/scoped_clipboard_writer.cc -@@ -227,6 +227,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting( +@@ -232,6 +232,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting( } #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -29,10 +29,10 @@ index e1f7acfa42b8dd377f67a1fdda0c375f239f1189..50a84d348217a136cac4f63639d45e56 objects_.clear(); platform_representations_.clear(); diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h -index 5ac38344f1221ce402ad2c0e2954c442f3955318..49e22a89d823649f4c62bbae7323a055dcc47934 100644 +index 2a9964f12a3a17103cd473de74a039d01e117041..873cd66831b7cb4d762d3b7abf5fd08623d3d73b 100644 --- a/ui/base/clipboard/scoped_clipboard_writer.h +++ b/ui/base/clipboard/scoped_clipboard_writer.h -@@ -84,6 +84,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter { +@@ -87,6 +87,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter { // This is only used to write custom format data. void WriteData(const std::u16string& format, mojo_base::BigBuffer data); 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 026eb535c5ce5..401f503b9260c 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/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 39bd6ef7be6ecb0f22692ace3c77845d76a59391..d51a7418fe874102f0458d1aedbca26e85669da6 100644 +index 462a6c201f4c79a2654a6717649551f74a57d1c7..0a3fb2966cab309e2a6a8364ed0ddfb011f4a1df 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc @@ -689,6 +689,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { @@ -22,7 +22,7 @@ index 39bd6ef7be6ecb0f22692ace3c77845d76a59391..d51a7418fe874102f0458d1aedbca26e 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 574e1f33f7eb9302fc6b64efca23426676821afc..c8509989003da8ca3bbfd13c802f5bd8b81460e5 100644 +index 180abdc9f983887c83fd9d4a596472222e9ab472..00842717a7570561ee9e3eca11190ab5e1c76fb8 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h @@ -136,6 +136,7 @@ class CONTENT_EXPORT RenderViewHostImpl @@ -48,10 +48,10 @@ index 9979c25ecd57e68331b628a518368635db5c2027..32733bf951af3eff7da5fd5758bbcbaa // This interface should only be implemented inside content. friend class RenderViewHostImpl; diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom -index 5f6a6f538fb8e21279d99b3dbe74a583f1592967..18837dceef7a197d0984b5363595ee1131553c5f 100644 +index d18c66114870de83c7eef21578e9e2b8d5606a8b..e1defb3992289427df85963f44a705e3d9257342 100644 --- a/third_party/blink/public/mojom/page/page.mojom +++ b/third_party/blink/public/mojom/page/page.mojom -@@ -133,4 +133,7 @@ interface PageBroadcast { +@@ -149,4 +149,7 @@ interface PageBroadcast { mojo_base.mojom.UnguessableToken devtools_frame_token, RemoteFrameInterfacesFromBrowser remote_frame_interfaces, RemoteMainFrameInterfaces remote_main_frame_interfaces); @@ -72,10 +72,10 @@ index c8655d9270b812df04f27025ff29a2fb6d2a4066..2f83e5ce40f8217ff5d53f7205299ad7 // 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 2e8500ac411bec392ec85c798b8379140917792b..490a381e1afd0a175cd1ca12926a21278c051712 100644 +index f40d632e9cacb4c5b722aa9163995e52bcb8546e..f299f1103edfd5f53cfc8bafff1dcb907cbd5437 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3827,13 +3827,21 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3889,13 +3889,21 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -99,7 +99,7 @@ index 2e8500ac411bec392ec85c798b8379140917792b..490a381e1afd0a175cd1ca12926a2127 if (!is_initial_state) { for (auto& observer : observers_) 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 ac623b8bd6c06a2a1def5d9761f8d0d3f845fc95..c420285f1fafff4af090a9dbe38debddaea57dfd 100644 +index dcd53ce7503b010c3449b70011d701b069286259..ceb78b07455179ec9a7d59940710858d2991b086 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h @@ -440,6 +440,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -110,7 +110,7 @@ index ac623b8bd6c06a2a1def5d9761f8d0d3f845fc95..c420285f1fafff4af090a9dbe38debdd void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -896,6 +897,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -902,6 +903,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_in-process_windows_to_have_different_web_prefs.patch b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch index 95243a26beed6..7853ac07df1b8 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.cc b/third_party/blink/common/web_preferences/web_preferences.cc -index 86791679979e715308090c5868cac9d54169d812..92d1c191249a2922a9a1196fabfc61461aeda944 100644 +index 98cfc7c9129b3a31b9b3c8694776e6d914500ee7..57772378acc0d8a3c4d13f051714f91281fffa81 100644 --- a/third_party/blink/common/web_preferences/web_preferences.cc +++ b/third_party/blink/common/web_preferences/web_preferences.cc -@@ -142,6 +142,19 @@ WebPreferences::WebPreferences() +@@ -144,6 +144,19 @@ WebPreferences::WebPreferences() v8_cache_options(blink::mojom::V8CacheOptions::kDefault), record_whole_document(false), stylus_handwriting_enabled(false), @@ -32,10 +32,10 @@ index 86791679979e715308090c5868cac9d54169d812..92d1c191249a2922a9a1196fabfc6146 accelerated_video_decode_enabled(false), animation_policy( 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 22220de13b6d7b88cfe0b02367836f7bd5e139b5..4aad04688926066c75d07aea9a6d2a5932e37979 100644 +index 797286d9dfafcf70e3430d5a9e59ef4458566fbc..a735740932bf448454d5b066c712bfeb56313292 100644 --- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc +++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc -@@ -148,6 +148,19 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); out->stylus_handwriting_enabled = data.stylus_handwriting_enabled(); @@ -56,7 +56,7 @@ index 22220de13b6d7b88cfe0b02367836f7bd5e139b5..4aad04688926066c75d07aea9a6d2a59 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 418233a0c46fa0837c9bd11e360d5279c1b1ff6d..b47ba60ec901460db3b1a8a2f81f5b7a9006c647 100644 +index 4d80bf0895028d50a9913543072d848a3537049e..5d940fb52e9ddeb557519c0e2d5098db83d2b449 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 @@ @@ -67,7 +67,7 @@ index 418233a0c46fa0837c9bd11e360d5279c1b1ff6d..b47ba60ec901460db3b1a8a2f81f5b7a #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" #include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h" -@@ -158,6 +159,19 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -159,6 +160,19 @@ struct BLINK_COMMON_EXPORT WebPreferences { // If true, stylus handwriting recognition to text input will be available in // editable input fields which are non-password type. bool stylus_handwriting_enabled; @@ -88,7 +88,7 @@ index 418233a0c46fa0837c9bd11e360d5279c1b1ff6d..b47ba60ec901460db3b1a8a2f81f5b7a // This flags corresponds to a Page's Settings' setCookieEnabled state. It // only controls whether or not the "document.cookie" field is properly 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 625db31846992c54083b30b2990fb359e6a3b3cd..1ccf341ecce1cf2ca17e3d4f7d5c42b8309caf96 100644 +index 3f36eb927cb4860cd4939251fec1cf922978bc71..7b3dee1baa6abfca1f34695adff187b4f2a24dfb 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 @@ -6,6 +6,7 @@ @@ -99,7 +99,7 @@ index 625db31846992c54083b30b2990fb359e6a3b3cd..1ccf341ecce1cf2ca17e3d4f7d5c42b8 #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -434,6 +435,52 @@ struct BLINK_COMMON_EXPORT StructTraitsDetached(type); diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 34cb438b0559cc133c8be67768fec35c4890e946..8ebcae8f67814537a5350f89d163e2a510532f7f 100644 +index a196644a99cbb2ee5245f2ad2b9c23268c256b9f..33476958785586fe146f4d6637355855abb33b1f 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -576,10 +576,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -608,10 +608,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index 34cb438b0559cc133c8be67768fec35c4890e946..8ebcae8f67814537a5350f89d163e2a5 if (!Client()) return false; -@@ -627,6 +623,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -659,6 +655,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 682d4d8af76e3..037c522cdae3f 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 dfd4ff9d338683214566345f1c6a0a3add12094c..6c14f780e7cc1478385da23e843256f101206220 100644 +index 40073723173388015f0c78899214ba155e7cdc53..72978c43a522e5716ba06e8b989710cc99bd8773 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn @@ -44,6 +44,20 @@ config("no_asm_config") { diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index 87c64f6ceddac..2eca05fd547fe 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,14 +8,14 @@ categories in use are known / declared. This patch is required for us to introduce a new Electron category for Electron-specific tracing. diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index 686b0af1442fb43669782e524779dd69814f17cc..1ad2455893384b0330afe0be0c731d7847b57510 100644 +index 0a1d3f0b1912873cb14873aa78269c57080a4b67..8f94caabf26a0c0be606d419eacc228e14ad20b3 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h -@@ -81,6 +81,7 @@ +@@ -80,6 +80,7 @@ X("drmcursor") \ X("dwrite") \ X("DXVA_Decoding") \ + X("electron") \ X("evdev") \ X("event") \ - X("exo") \ + X("event_latency") \ diff --git a/patches/chromium/build_disable_partition_alloc_on_mac.patch b/patches/chromium/build_disable_partition_alloc_on_mac.patch index bcb992fb74a15..4fe7402d61898 100644 --- a/patches/chromium/build_disable_partition_alloc_on_mac.patch +++ b/patches/chromium/build_disable_partition_alloc_on_mac.patch @@ -9,15 +9,15 @@ and can be removed when the crash in fork is resolved. Related issue: https://github.com/electron/electron/issues/32718 diff --git a/build_overrides/partition_alloc.gni b/build_overrides/partition_alloc.gni -index e1fa5fe9f6da68451d364fadbc021239a8c3e19a..4850698ef66776333fad27812a5414a9aa55fe08 100644 +index e90ccba879dc5823c15acf35869cd5bd211b717b..a95d2b46b37e007405cd472bd9f882c1d180d809 100644 --- a/build_overrides/partition_alloc.gni +++ b/build_overrides/partition_alloc.gni -@@ -42,7 +42,7 @@ _disable_partition_alloc_everywhere = is_component_build || (is_win && is_debug) - - # - NaCl: No plans to support it. - # - iOS: not done yet. --_is_partition_alloc_everywhere_platform = !is_nacl && !is_ios -+_is_partition_alloc_everywhere_platform = !is_nacl && !is_ios && !is_mac +@@ -46,7 +46,7 @@ _disable_partition_alloc_everywhere = is_component_build || (is_win && is_debug) + if (is_ios) { + _is_partition_alloc_everywhere_platform = ios_partition_alloc_enabled + } else { +- _is_partition_alloc_everywhere_platform = !is_nacl ++ _is_partition_alloc_everywhere_platform = !is_nacl && !is_mac + } # Under Windows debug build, the allocator shim is not compatible with CRT. - # NaCl in particular does seem to link some binaries statically 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 4139dbb38117e..34071ec4af5fa 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 8f003ac2da1e49bc2bbf3a7cce1a648980e325c1..f216efc553847fe1ce41e41c8a7144d2f6911dee 100644 +index 53363189fe649fa92040811ee9e858e9363f29e7..48883669d54ec7b7421b88fcaf7776e7b3d55bee 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -187,11 +187,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index 8f003ac2da1e49bc2bbf3a7cce1a648980e325c1..f216efc553847fe1ce41e41c8a7144d2 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 6fd94d13f11645f389b0c5cbd185e40c86f11d44..5333a8a16ed62747830083c427a07a9546f0a42d 100644 +index 1e8e5198382e3c31221b9e086beeec1430cc32d8..05d0f2c992a2a41bd7b56e17f02fe18feee74ee9 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4557,7 +4557,7 @@ static_library("browser") { +@@ -4595,7 +4595,7 @@ static_library("browser") { # On Windows, the hashes are embedded in //chrome:chrome_initial rather # than here in :chrome_dll. @@ -46,18 +46,18 @@ index 6fd94d13f11645f389b0c5cbd185e40c86f11d44..5333a8a16ed62747830083c427a07a95 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 18ca933e7a07e73c1dcd7dc60be42c6180653b59..d01b8278141a4f19f3888f895efc24a415fe45b3 100644 +index 2bc82d677d96b0f982b63b3774ae5e972ca7bd39..738ddc22c1bd5f00869ed885f3135a838ead7284 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -6229,7 +6229,6 @@ test("unit_tests") { +@@ -6330,7 +6330,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", - "//chrome:packed_resources_integrity", "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", - "//chrome/app:crash_reporter_client_win_unit_tests", -@@ -6255,6 +6254,10 @@ test("unit_tests") { + "//chrome/app:win_unit_tests", +@@ -6356,6 +6355,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,23 +68,22 @@ index 18ca933e7a07e73c1dcd7dc60be42c6180653b59..d01b8278141a4f19f3888f895efc24a4 ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -7167,7 +7170,7 @@ test("unit_tests") { +@@ -7279,7 +7282,6 @@ test("unit_tests") { } deps += [ - "//chrome:packed_resources_integrity_hash", -+ # "//chrome:packed_resources_integrity_hash", + "//chrome/browser/apps:icon_standardizer", "//chrome/browser/apps/app_service", "//chrome/browser/apps/app_service:test_support", - "//chrome/browser/enterprise/connectors/analysis:features", -@@ -7300,6 +7303,10 @@ test("unit_tests") { - } - } +@@ -7354,6 +7356,10 @@ test("unit_tests") { + "//ui/webui/resources/js/browser_command:mojo_bindings", + ] -+ if (!is_electron_build) { -+ deps += [ "//chrome:packed_resources_integrity_hash" ] -+ } ++ if (!is_electron_build) { ++ deps += [ "//chrome:packed_resources_integrity_hash" ] ++ } + - if (is_chromeos_ash) { - sources -= [ - "../browser/policy/cloud/user_policy_signin_service_unittest.cc", + data += [ "//ash/components/arc/test/data/icons/" ] + + if (include_js_tests) { diff --git a/patches/chromium/build_gn.patch b/patches/chromium/build_gn.patch index d7fc1718ddeb1..b133589aa8ddb 100644 --- a/patches/chromium/build_gn.patch +++ b/patches/chromium/build_gn.patch @@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will rebuild the entire tree. diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index e675e08bee105e475ae7aa784d030d5dbaa12080..5a4570c4699cde1376c21fb50954b6562acd999f 100644 +index 1fa42b1b1b0e0e467dbe6fb6f82da77e4c494f0f..68d467f75faa3fddd385632b536373bd9167d881 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -123,6 +123,9 @@ if (current_os == "") { diff --git a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch index 853eb159917b6..8c9bf240afc0e 100644 --- a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch +++ b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch @@ -6,7 +6,7 @@ Subject: build: make libcxx_abi_unstable false for electron https://nornagon.medium.com/a-libc-odyssey-973e51649063 diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site -index 2df8632ec45777b387988fea1f2932661ed5ff3c..8b9995a6144f77d2772debf0e772b5e6d4063929 100644 +index 4ac81de659b1e70fd64d0a538a48f2e1f1530b5e..135141c8b7f6f20ee5a6df5a3e469f8da5cc837b 100644 --- a/buildtools/third_party/libc++/__config_site +++ b/buildtools/third_party/libc++/__config_site @@ -12,7 +12,6 @@ diff --git a/patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch b/patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch index 46573bd24959e..d6b7a241f7278 100644 --- a/patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch +++ b/patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch @@ -6,10 +6,10 @@ Subject: build: only use the mas build config in the required components Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts diff --git a/base/BUILD.gn b/base/BUILD.gn -index 29344e62d32b50cceef20c5c869c77f992880667..90dbf4ad6f38f6380aa65679d8114fd8cb230444 100644 +index cd62aecd572f867c836aec8580cd54d3fa5fb981..8ccb2179125c045c30e72d9de102fea70bcc9417 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1485,6 +1485,7 @@ component("base") { +@@ -1025,6 +1025,7 @@ component("base") { "//build/config/compiler:prevent_unsafe_narrowing", "//build/config/compiler:wexit_time_destructors", "//build/config/compiler:wglobal_constructors", @@ -18,7 +18,7 @@ index 29344e62d32b50cceef20c5c869c77f992880667..90dbf4ad6f38f6380aa65679d8114fd8 deps = [ diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index 5a4570c4699cde1376c21fb50954b6562acd999f..7172c144eacccf8efce6cc85545599ecf14c5d4a 100644 +index 68d467f75faa3fddd385632b536373bd9167d881..7699ea2310308b1b42e12bf26a6a0ed2e261cbc6 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -355,7 +355,6 @@ default_compiler_configs = [ @@ -43,7 +43,7 @@ index 8448ff2d912ed8664ba1117397a2407c08e9a578..5f6bb1a87615c474e06209fc8034ff36 if (is_win) { diff --git a/components/remote_cocoa/app_shim/BUILD.gn b/components/remote_cocoa/app_shim/BUILD.gn -index 1adfddd0fa65aac18e4bc98a38e52dfd62701ff4..6ac3d77d7259970394537e164097cd8dbefec6b0 100644 +index 0625f07f317de46af619fdb279be78d9ecdc0029..5897820839d6d57ada22a83fe753e3a6b3d752de 100644 --- a/components/remote_cocoa/app_shim/BUILD.gn +++ b/components/remote_cocoa/app_shim/BUILD.gn @@ -16,6 +16,7 @@ component("app_shim") { @@ -55,7 +55,7 @@ index 1adfddd0fa65aac18e4bc98a38e52dfd62701ff4..6ac3d77d7259970394537e164097cd8d "alert.h", "alert.mm", diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index c320ce10cfcd8b62dc516871bae900f6da9600f5..c9347d61c76098c9df5e0142872b5078017e6270 100644 +index 74b30a0d050468ad1f450d86621308c090a699b5..a1f555b07519ad07441c0bca0c20ddd59f921b6e 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -306,6 +306,8 @@ viz_component("service") { @@ -68,10 +68,10 @@ index c320ce10cfcd8b62dc516871bae900f6da9600f5..c9347d61c76098c9df5e0142872b5078 if (is_android || use_ozone) { diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 9ba992e9ce8e107949db8dfc928a478b50fea35a..564467c1dda1210085488aed47d64052c457bd8a 100644 +index 5648b47389a22845d37f4bdbc2287aadc4ecfed7..45bd73e24d2374348040b9ab846d1e362bb67bb8 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -57,6 +57,7 @@ source_set("browser") { +@@ -56,6 +56,7 @@ source_set("browser") { "//content:content_implementation", "//v8:external_startup_data", ] @@ -80,7 +80,7 @@ index 9ba992e9ce8e107949db8dfc928a478b50fea35a..564467c1dda1210085488aed47d64052 libs = [] frameworks = [] diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn -index d01ad9dbeabeef8a5679823d8b1678d0a46c3865..2c4d34bc40aec5de7603ada2777e532be4416fce 100644 +index 9b4c78c06f49ade480d956025e68cb7efac336db..0bf304daf0ea68ba7b086a92dd0e95ab8f377bbd 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn @@ -170,6 +170,7 @@ source_set("common") { @@ -92,10 +92,10 @@ index d01ad9dbeabeef8a5679823d8b1678d0a46c3865..2c4d34bc40aec5de7603ada2777e532b public_deps = [ ":mojo_bindings", diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn -index a1f691c0d3452b440210190c467f96c727b3ec58..2c4808ec4b7018165947c311816d113067e8542c 100644 +index 3ec54c242fb920a53fcaa6d8040f2ec88c2727df..27dee1596183d2ead5290a60c08e47e69e905d21 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn -@@ -220,6 +220,7 @@ target(link_target_type, "renderer") { +@@ -224,6 +224,7 @@ target(link_target_type, "renderer") { } configs += [ "//content:content_implementation" ] @@ -104,10 +104,10 @@ index a1f691c0d3452b440210190c467f96c727b3ec58..2c4808ec4b7018165947c311816d1130 public_deps = [ diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn -index 0b526044dcc7cbc21cc25cfdd7be8e4cdd8f06eb..c5c61601a684ea08e2279b4fc6b77d81ff2f03e1 100644 +index 832844a63a72788789e36a030c042d1ee17e4d1f..c58ad5686852563b7424f07dcde6b9798e7eb87c 100644 --- a/device/bluetooth/BUILD.gn +++ b/device/bluetooth/BUILD.gn -@@ -249,6 +249,7 @@ component("bluetooth") { +@@ -251,6 +251,7 @@ component("bluetooth") { "IOKit.framework", "Foundation.framework", ] @@ -116,7 +116,7 @@ index 0b526044dcc7cbc21cc25cfdd7be8e4cdd8f06eb..c5c61601a684ea08e2279b4fc6b77d81 if (is_win) { diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn -index e5bc3c86e07873f5ad5a54fba950e3105049ab2b..6774273357a7b6a465a9918f81b4cee90c0859a4 100644 +index 89e0e91bb24cb1b92abb8670f56328499c0669e0..6b6dd9c74011c1acafb931842d6675ff65e17bd9 100644 --- a/gpu/ipc/service/BUILD.gn +++ b/gpu/ipc/service/BUILD.gn @@ -119,6 +119,7 @@ component("service") { @@ -125,22 +125,22 @@ index e5bc3c86e07873f5ad5a54fba950e3105049ab2b..6774273357a7b6a465a9918f81b4cee9 defines += [ "GL_SILENCE_DEPRECATION" ] + configs += ["//electron/build/config:mas_build"] } - if (is_android) { + if (is_ios) { sources += [ diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 44635f13048890b20c74870d26c4e74bab363ddb..33ad7650832b7572949fb6f362bef02879f4c31b 100644 +index f1b4cd5055d00df425926e83a3b2e7f32af4c2e6..a80aaa7fde1fd9c70e7038aef4e322f1ec6a307a 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn -@@ -188,6 +188,7 @@ source_set("audio") { - "CoreAudio.framework", - "CoreFoundation.framework", +@@ -194,6 +194,7 @@ source_set("audio") { + "mac/coreaudio_dispatch_override.h", ] + frameworks += [ "AudioUnit.framework" ] + configs += ["//electron/build/config:mas_build"] } - if (is_win) { + if (is_ios) { diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn -index 1467334057a0f2ae4f2d2bb1bae9ec0b1ca1d77b..c358a3d9e16865eb8247b67c4369e3aaeea1a49a 100644 +index a8193d411da14f4ff0087fba81e63809832d1806..94c410b59ab7b40654fb214a6a9d828170fe2095 100644 --- a/net/dns/BUILD.gn +++ b/net/dns/BUILD.gn @@ -173,6 +173,8 @@ source_set("dns") { @@ -181,10 +181,10 @@ index b078486d595ec38e5db1462486ab31a2951430e0..5cafd91460d5f98a20caa884834cc3ed source_set("sandbox_unittests") { diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn -index fabf49654cebc659348e3505487b2be583647fed..58efb9cfe6e4ed44a8e3753ef4af8e4db84617cd 100644 +index c3d960bf0c7f76e54b2e43cf25c066df345db3ae..7133d697d01d35a47689345f5deecaa42286712f 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn -@@ -280,6 +280,7 @@ component("core") { +@@ -300,6 +300,7 @@ component("core") { configs -= core_config_remove configs += core_config_add configs += [ "//v8:external_startup_data" ] @@ -193,20 +193,20 @@ index fabf49654cebc659348e3505487b2be583647fed..58efb9cfe6e4ed44a8e3753ef4af8e4d public_deps = [ ":core_generated", diff --git a/ui/accelerated_widget_mac/BUILD.gn b/ui/accelerated_widget_mac/BUILD.gn -index 1ca2843130e81f9ea6be7a71b6b2a8d68bd413ae..712e4428bc9417f114a695a5980c488801007b77 100644 +index 161a304180a4a580efa7e8a8bb634a84594b857a..fd7e4f714655f8679e4e6dc2d87cff2c7090afdb 100644 --- a/ui/accelerated_widget_mac/BUILD.gn +++ b/ui/accelerated_widget_mac/BUILD.gn -@@ -53,6 +53,8 @@ component("accelerated_widget_mac") { - "OpenGL.framework", +@@ -30,6 +30,8 @@ component("accelerated_widget_mac") { "QuartzCore.framework", ] -+ -+ configs += ["//electron/build/config:mas_build"] - } - test("accelerated_widget_mac_unittests") { ++ configs += ["//electron/build/config:mas_build"] ++ + if (is_ios) { + sources += [ "ca_layer_frame_sink_provider.h" ] + } diff --git a/ui/accessibility/platform/BUILD.gn b/ui/accessibility/platform/BUILD.gn -index 3bec9f0f7d46f09842d785092295370c04d7b613..85aea7cc7fe5466aed6bf28f73409ce9b487e4b6 100644 +index ebc2470893838ec41ac1bf536c5a6db304bfa7cb..4a2082c2fed4e220cb8cbc2c803f682ca6f07179 100644 --- a/ui/accessibility/platform/BUILD.gn +++ b/ui/accessibility/platform/BUILD.gn @@ -249,6 +249,7 @@ component("platform") { @@ -218,19 +218,19 @@ index 3bec9f0f7d46f09842d785092295370c04d7b613..85aea7cc7fe5466aed6bf28f73409ce9 if (use_atk) { diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 8ed2cd062b2e9531742835c61f015975c7d59d40..989005583f46879f6ed32aa121d9dc2d7af0d589 100644 +index f563f390a0bafc963aea88bdb29ad85cac60d14d..740bf400458ce9089bd18b83759fa46e22dc35e7 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -348,6 +348,7 @@ component("base") { +@@ -347,6 +347,7 @@ component("base") { "l10n/l10n_util_mac.mm", "resource/resource_bundle_mac.mm", ] + configs += ["//electron/build/config:mas_build"] } - if (is_chromeos_lacros) { + if (is_apple) { diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn -index aadf9f2a52fd6bf4f027a070656c893b5025c714..445fa39d3676b80901ffb734bfb5ca1045dc4c41 100644 +index 7bd65e6d61d0845cf3a557a43b377ee7894fd7d1..91a470467ddd5e2118a08b5b63f96e5e94c554bc 100644 --- a/ui/display/BUILD.gn +++ b/ui/display/BUILD.gn @@ -56,6 +56,10 @@ component("display") { @@ -245,10 +245,10 @@ index aadf9f2a52fd6bf4f027a070656c893b5025c714..445fa39d3676b80901ffb734bfb5ca10 if (is_win) { diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn -index d2692c7422e4694a783876addc1b283d451e937f..a07aaa7e88f38fa91c1254f7af03675cb22bf4e7 100644 +index af0e7466f1a265c9d55ba81f3b2c9c68dafa7767..d991513ee82f4406f578a4751bf30fac1910c741 100644 --- a/ui/gfx/BUILD.gn +++ b/ui/gfx/BUILD.gn -@@ -188,6 +188,7 @@ component("gfx") { +@@ -193,6 +193,7 @@ component("gfx") { "scoped_ns_graphics_context_save_gstate_mac.h", "scoped_ns_graphics_context_save_gstate_mac.mm", ] @@ -257,10 +257,10 @@ index d2692c7422e4694a783876addc1b283d451e937f..a07aaa7e88f38fa91c1254f7af03675c if (is_win) { sources += [ diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn -index 36bc22a122193bf5ccd7e86df08cce7e5451a035..6d64206ee17042b6eef9ba15977eba0458903c75 100644 +index ce2250d2ab0d16034e4334f04ab035f19dc83697..f89fa55ef193d4c027a3fec44bce57580deaa561 100644 --- a/ui/views/BUILD.gn +++ b/ui/views/BUILD.gn -@@ -664,6 +664,7 @@ component("views") { +@@ -670,6 +670,7 @@ component("views") { "IOSurface.framework", "QuartzCore.framework", ] diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 3ac03da9c6d55..223d3c5423944 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 337aab0addc0a0e31df71b5dce3b62626b7f9504..080c99e23a4a81a4ddbf8a7689c8c10b66f9e039 100644 +index 73733a199ad655918cb26dd45d5add2e7555cba2..5a4104959d8ac39938d40da413b76a91eb8ae002 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -7474,6 +7474,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -7610,6 +7610,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,7 +21,7 @@ index 337aab0addc0a0e31df71b5dce3b62626b7f9504..080c99e23a4a81a4ddbf8a7689c8c10b &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 720156a65fe9804834aa943dbcad975076d99193..03082815e5c4de60da566176af10bc972cff0072 100644 +index 46198a2d2ec776c8e1b31308c56d6d75246790e6..247afa9d1b37c70d7df12a071cb2d7e9dab570b0 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -4127,6 +4127,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -51,10 +51,10 @@ index 720156a65fe9804834aa943dbcad975076d99193..03082815e5c4de60da566176af10bc97 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 d2f710218b4fb7c24be02ea1cc78abcfb5718fc9..4d6f86e5674cf4f419061a0f67f3700f7d10a16c 100644 +index 4fbba74078390c0c530294d65fd0ce74c3eec65a..6f9a676c10ff009fa3d27f2ab33c4c12562037a1 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -591,6 +591,10 @@ struct CreateNewWindowParams { +@@ -592,6 +592,10 @@ struct CreateNewWindowParams { // The navigation initiator's user activation and ad status. blink.mojom.NavigationInitiatorActivationAndAdStatus initiator_activation_and_ad_status; @@ -66,7 +66,7 @@ index d2f710218b4fb7c24be02ea1cc78abcfb5718fc9..4d6f86e5674cf4f419061a0f67f3700f // 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 28afdb7d6f13a0a7331048197762acb44381bc57..b8712563ca3804872a6aab6b6f0fd170f21bbcd6 100644 +index aafdfa7e9280e7308e017aef087d616adfc6653e..2361f913db46b8607bf8c44a7bb2ac642fd9449e 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -634,6 +634,8 @@ bool ContentBrowserClient::CanCreateWindow( @@ -79,7 +79,7 @@ index 28afdb7d6f13a0a7331048197762acb44381bc57..b8712563ca3804872a6aab6b6f0fd170 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 174a8d9197876cc7167407560fa011ed2e9d6adf..b1e3179eae105e29a360cc5a92c475e7c545704d 100644 +index b7e81c34eddc04e6758e2ec7bc2b36827707ee97..6d1653ecd29e6a2acacc59bfe1e5907bc864b108 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -164,6 +164,7 @@ class NetworkService; @@ -90,7 +90,7 @@ index 174a8d9197876cc7167407560fa011ed2e9d6adf..b1e3179eae105e29a360cc5a92c475e7 } // namespace network namespace sandbox { -@@ -1029,6 +1030,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1027,6 +1028,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -100,10 +100,10 @@ index 174a8d9197876cc7167407560fa011ed2e9d6adf..b1e3179eae105e29a360cc5a92c475e7 bool opener_suppressed, bool* no_javascript_access); diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc -index 3c6897e12b0a14a7502158e1e977fe4ea318b41d..6f6a5eee43f3f5ecc89f907b825451d1bb833836 100644 +index 885899b151520e0173a5ca68c2613b1333cadddf..5b53ee691c0a07ed1655139ca2d90341b5fa55a3 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc -@@ -27,6 +27,17 @@ namespace content { +@@ -28,6 +28,17 @@ namespace content { WebContentsDelegate::WebContentsDelegate() = default; @@ -122,7 +122,7 @@ index 3c6897e12b0a14a7502158e1e977fe4ea318b41d..6f6a5eee43f3f5ecc89f907b825451d1 const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 2717fd39b99c6c3f8b0cb8278fc5011dfb6d34a8..fae93468160463c098b5b115ef293989bbc1f38c 100644 +index 5da6f93293bc5ddae88c17ac2dd8d7037ba8e8f3..76d699790fb7d92587293b14332f696dc5460322 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -16,6 +16,7 @@ @@ -131,9 +131,9 @@ index 2717fd39b99c6c3f8b0cb8278fc5011dfb6d34a8..fae93468160463c098b5b115ef293989 #include "content/common/content_export.h" +#include "content/common/frame.mojom.h" #include "content/public/browser/eye_dropper.h" + #include "content/public/browser/fullscreen_types.h" #include "content/public/browser/invalidate_type.h" - #include "content/public/browser/media_stream_request.h" -@@ -342,6 +343,13 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -343,6 +344,13 @@ class CONTENT_EXPORT WebContentsDelegate { const StoragePartitionConfig& partition_config, SessionStorageNamespace* session_storage_namespace); @@ -148,10 +148,10 @@ index 2717fd39b99c6c3f8b0cb8278fc5011dfb6d34a8..fae93468160463c098b5b115ef293989 // 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 b5feb7b1c89954409c18f2a8d348ff1ca2f6389c..a0123eac7193282dbfba9712f0d88b2b87fccd9f 100644 +index 047d371d39f58e591f801760a3de17d4c1d42348..59a0e2d91f5d497f35324c0cec181baccecd2115 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -6290,6 +6290,10 @@ WebView* RenderFrameImpl::CreateNewWindow( +@@ -6264,6 +6264,10 @@ WebView* RenderFrameImpl::CreateNewWindow( blink::GetNavigationInitiatorActivationAndAdStatus( request.HasUserGesture(), GetWebFrame()->IsAdScriptInStack()); @@ -163,10 +163,10 @@ index b5feb7b1c89954409c18f2a8d348ff1ca2f6389c..a0123eac7193282dbfba9712f0d88b2b // moved on send. bool is_background_tab = diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc -index c1e5e53f49eee554daf7acbd097b3f3d4e2a084c..602f74dad295c86afa8506c0db7156966b4cce11 100644 +index 48a07780e61463b7e70e2a511bc6f81bd6fbdbf3..465cfb29380df203de7bcf2d27617b604097118a 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc -@@ -501,6 +501,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( +@@ -499,6 +499,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -176,7 +176,7 @@ index c1e5e53f49eee554daf7acbd097b3f3d4e2a084c..602f74dad295c86afa8506c0db715696 bool opener_suppressed, bool* no_javascript_access) { diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h -index 55f3b2ce596f18fdffde7f23f01da98778816395..07496fded98e6ac926b219f56f769e2aab41b021 100644 +index 22254206063abe36739e1c0e7c065223ab6807d2..7f5d89f8dc8b46ac1338e73b0394872569d803b8 100644 --- a/content/web_test/browser/web_test_content_browser_client.h +++ b/content/web_test/browser/web_test_content_browser_client.h @@ -84,6 +84,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient { @@ -210,10 +210,10 @@ index a50a83d36f9172add44867ee0b0f1c89779b387e..c4ac7d4c885e764cfcfc3f2cd25e31b4 } // 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 c88166f2b60dcb799f56bfecfd0a8a10e70a887f..6b58d128b238ebc98078e62f9f388d9e5f70c76d 100644 +index aa977dbc9d047fa87d07f2b0717aadd641164655..ede350aa1bc906c832b5828d61892116dbc68da2 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2213,6 +2213,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2223,6 +2223,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, entered_window, completed_url); diff --git a/patches/chromium/chore_add_electron_deps_to_gitignores.patch b/patches/chromium/chore_add_electron_deps_to_gitignores.patch index 9071f5a739156..bc1da4eb72d50 100644 --- a/patches/chromium/chore_add_electron_deps_to_gitignores.patch +++ b/patches/chromium/chore_add_electron_deps_to_gitignores.patch @@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores Makes things like "git status" quicker when developing electron locally diff --git a/.gitignore b/.gitignore -index 13ace36474a9de85ba7111c4b9794206e112e46d..ee8c0a6daed14a51a76595546f02f9834986decc 100644 +index f39533c8951d81fba73910a89b5cf2de9bd34a02..00756eb8a32aec3bc109db9aa1b370ab9f0b1d26 100644 --- a/.gitignore +++ b/.gitignore -@@ -236,6 +236,7 @@ vs-chromium-project.txt +@@ -238,6 +238,7 @@ vs-chromium-project.txt /delegate_execute /device/serial/device_serial_mojo.xml /docs/website @@ -18,10 +18,10 @@ index 13ace36474a9de85ba7111c4b9794206e112e46d..ee8c0a6daed14a51a76595546f02f983 /google_apis/internal /googleurl diff --git a/third_party/.gitignore b/third_party/.gitignore -index d2d1b438f80fa6fe94c935f64d1ba007265bd3fa..cf0966f75b61e407aa781849bfc5b1b5a8d1e033 100644 +index 438a5c69940b24ef67fd8c221d805e0ca6d5022f..0317ec23d0dbed2a2d1368ed2642af8de5d5cb2d 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore -@@ -87,6 +87,7 @@ +@@ -90,6 +90,7 @@ /directxsdk /dom_distiller_js/dist /eigen3/src @@ -29,7 +29,7 @@ index d2d1b438f80fa6fe94c935f64d1ba007265bd3fa..cf0966f75b61e407aa781849bfc5b1b5 /elfutils/src /emoji-metadata/src /emoji-segmenter/src -@@ -186,6 +187,7 @@ +@@ -194,6 +195,7 @@ /mocha /mockito/src /nacl_sdk_binaries/ @@ -37,7 +37,7 @@ index d2d1b438f80fa6fe94c935f64d1ba007265bd3fa..cf0966f75b61e407aa781849bfc5b1b5 /nasm /nearby/src /neon_2_sse/src -@@ -249,6 +251,7 @@ +@@ -257,6 +259,7 @@ /speex /sqlite/src /sqlite4java/lib/ diff --git a/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch b/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch index 1039b36cccde1..5fcd4c02811ee 100644 --- a/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch +++ b/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch @@ -34,10 +34,10 @@ index b23ba1bf3a49f72d1cd0f0ae4b0f316e7c15fa76..bf0a4869af4aaca15074fae42508b54a Widget* GetWidget(); const Widget* GetWidget() const; diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 214a596da0dfdff2566a7642ac04e501655c5d88..dff84d16386acfb3ccc72a22878476f1ac463ea1 100644 +index accfa82763a122dedc6eba4d9350bcd54371ac81..bcb2b89ca50b8b5004915055d591adeebabe50d6 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3094,15 +3094,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3207,15 +3207,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, SetMsgHandled(FALSE); // We must let Windows handle the caption buttons if it's drawing them, or // they won't work. diff --git a/patches/chromium/chore_introduce_blocking_api_for_electron.patch b/patches/chromium/chore_introduce_blocking_api_for_electron.patch index a1ead6fd579c6..a8f32d192bbaa 100644 --- a/patches/chromium/chore_introduce_blocking_api_for_electron.patch +++ b/patches/chromium/chore_introduce_blocking_api_for_electron.patch @@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor of explicitly adding ScopedAllowBlocking calls as friends. diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h -index f5436c117c2663a6c69e139d8a21338137c79ef0..ef0290a799dfd916b3aa971a71b41326100dbb52 100644 +index 957f5fb7aa3a1325ebeb834b7d17925f23a28d5c..2ad7f8587cf75983484a8d7e9f993c2e10d6dbac 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h @@ -129,6 +129,7 @@ class FirefoxProfileLock; @@ -28,7 +28,7 @@ index f5436c117c2663a6c69e139d8a21338137c79ef0..ef0290a799dfd916b3aa971a71b41326 namespace enterprise_connectors { class LinuxKeyRotationCommand; } // namespace enterprise_connectors -@@ -553,6 +557,7 @@ class BASE_EXPORT ScopedAllowBlocking { +@@ -550,6 +554,7 @@ class BASE_EXPORT [[nodiscard]] ScopedAllowBlocking { friend class ::DesktopNotificationBalloon; friend class ::FirefoxProfileLock; friend class ::GaiaConfig; @@ -36,7 +36,7 @@ index f5436c117c2663a6c69e139d8a21338137c79ef0..ef0290a799dfd916b3aa971a71b41326 friend class ::ProfileImpl; friend class ::ScopedAllowBlockingForProfile; friend class ::StartupTabProviderImpl; -@@ -593,6 +598,7 @@ class BASE_EXPORT ScopedAllowBlocking { +@@ -590,6 +595,7 @@ class BASE_EXPORT [[nodiscard]] ScopedAllowBlocking { friend class crosapi::LacrosThreadTypeDelegate; friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847 friend class drive::FakeDriveService; 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 eb1c41d780fc9..a772a593711ac 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,10 +14,10 @@ This change patches it out to prevent the DCHECK. It can be removed once/if we see a better solution to the problem. diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc -index c204a15da17d7ca717bc130c29a70c696b7299be..a06dcd028a39c85bf0f3649396155063dcc90e83 100644 +index 4aa0eba7afffce096148e69006f58d4fcf65144d..e613a4919c08494852e59e7e524f01782f7bee26 100644 --- a/content/browser/site_instance_impl.cc +++ b/content/browser/site_instance_impl.cc -@@ -209,7 +209,7 @@ scoped_refptr SiteInstanceImpl::CreateForGuest( +@@ -215,7 +215,7 @@ scoped_refptr SiteInstanceImpl::CreateForGuest( BrowserContext* browser_context, const StoragePartitionConfig& partition_config) { DCHECK(browser_context); diff --git a/patches/chromium/chore_patch_out_profile_methods_in_profile_selections_cc.patch b/patches/chromium/chore_patch_out_profile_methods_in_profile_selections_cc.patch index 8f2d18ea30f27..6beabd1fa25f0 100644 --- a/patches/chromium/chore_patch_out_profile_methods_in_profile_selections_cc.patch +++ b/patches/chromium/chore_patch_out_profile_methods_in_profile_selections_cc.patch @@ -8,10 +8,10 @@ is therefore not a method that will compile given we don't include relevant files. diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc -index 35c60a617a3d092b4ffbcc8652b7a80cc0d1f958..cd71486d98d5ade773f1d99bcec2215ac76e9c1d 100644 +index 1b87fca21a9dbfbb85cabdbfa1ca7038e7c52806..8e9a309283b9242c6627c5a49c7cc7ea2f1a03fe 100644 --- a/chrome/browser/profiles/profile_selections.cc +++ b/chrome/browser/profiles/profile_selections.cc -@@ -23,6 +23,7 @@ BASE_FEATURE(kGuestProfileSelectionDefaultNone, +@@ -19,6 +19,7 @@ BASE_FEATURE(kSystemProfileSelectionDefaultNone, base::FeatureState::FEATURE_DISABLED_BY_DEFAULT); bool AreKeyedServicesDisabledForProfileByDefault(const Profile* profile) { @@ -19,7 +19,7 @@ index 35c60a617a3d092b4ffbcc8652b7a80cc0d1f958..cd71486d98d5ade773f1d99bcec2215a if (profile && profile->IsSystemProfile()) { // The default behavior of the system profile selection depends on the value // of `kSystemProfileSelectionDefaultNone` feature flag. -@@ -33,7 +34,7 @@ bool AreKeyedServicesDisabledForProfileByDefault(const Profile* profile) { +@@ -29,7 +30,7 @@ bool AreKeyedServicesDisabledForProfileByDefault(const Profile* profile) { return system_profile_default == ProfileSelection::kNone; } diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 8faed925fa16b..d4b42ed9074e6 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -80,10 +80,10 @@ index aaaa61d5c3a1d5ade2fd355e38a3985ef5cc4e7d..b45746ba0f38a381a2ee5ca17f3a1685 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 08ac5f0afd874913929e6ea9c79b38c6b28789ce..efe0f782e7747825a836a590400b65106f557c43 100644 +index 8e86697ca27eca507e5a95acbc3d68656532e59a..a11b0dbd0962e67cc5e90a6b7fefc86974ec5a1e 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1840,12 +1840,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1835,12 +1835,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -99,10 +99,10 @@ index 08ac5f0afd874913929e6ea9c79b38c6b28789ce..efe0f782e7747825a836a590400b6510 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 08879ac2f134a338200f841cea1dea3323b6696f..136f86297dc03610e725526a70d0aaa1c45d81d0 100644 +index 83b8260beb59da437ae08a5b62746c40603a1200..3ea5f7c42ef350cc094355154c52220e68e6ceb5 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -853,8 +853,7 @@ class Browser : public TabStripModelObserver, +@@ -862,8 +862,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -218,10 +218,10 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7 void AddNewContents(content::WebContents* source, std::unique_ptr new_contents, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 465dcd8c19fff3f435ed1286a9932a484b7d7d4e..6fbf7fc57e7188d4fc323e0276a85a58c3d9cbc4 100644 +index f793f5f01b73df5dc6561729f80591bed25ca51e..61d8392b46864a9480913d8b727a5f9f156f8e87 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4027,8 +4027,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4030,8 +4030,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -232,12 +232,12 @@ index 465dcd8c19fff3f435ed1286a9932a484b7d7d4e..6fbf7fc57e7188d4fc323e0276a85a58 static_cast(delegate_->CreateCustomWebContents( opener, source_site_instance, is_new_browsing_instance, diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc -index 6f6a5eee43f3f5ecc89f907b825451d1bb833836..457cf0f6a5c254afca6148038b951391ca32addf 100644 +index 5b53ee691c0a07ed1655139ca2d90341b5fa55a3..684b2f9c1f20a2dd460491d9d4285756907a8aa4 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc -@@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( +@@ -136,8 +136,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( SiteInstance* source_site_instance, - content::mojom::WindowContainerType window_container_type, + mojom::WindowContainerType window_container_type, const GURL& opener_url, - const std::string& frame_name, - const GURL& target_url) { @@ -246,12 +246,12 @@ index 6f6a5eee43f3f5ecc89f907b825451d1bb833836..457cf0f6a5c254afca6148038b951391 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index fae93468160463c098b5b115ef293989bbc1f38c..3d6bcc0c6a21f318b76607c6fa25a3aafc975e60 100644 +index 76d699790fb7d92587293b14332f696dc5460322..2b15ee95474fab528fd710b52d3a1d9e6a60b871 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h -@@ -321,8 +321,7 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -322,8 +322,7 @@ class CONTENT_EXPORT WebContentsDelegate { SiteInstance* source_site_instance, - content::mojom::WindowContainerType window_container_type, + mojom::WindowContainerType window_container_type, const GURL& opener_url, - const std::string& frame_name, - const GURL& target_url); @@ -260,10 +260,10 @@ index fae93468160463c098b5b115ef293989bbc1f38c..3d6bcc0c6a21f318b76607c6fa25a3aa // Allow delegate to creates a custom WebContents when // WebContents::CreateNewWindow() is called. This function is only called diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc -index 2d6b5c054087593cff571daf1dcb5a10bdc6f157..fa255c126064a4072ede486d59e6dc00f63777cb 100644 +index 5579bd54453d9dd2c15b949dee9f6ddf3e5ec67b..459c15913c91b9a77c8ffaa30445dff7a0d9751b 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc -@@ -207,8 +207,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( +@@ -206,8 +206,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -288,10 +288,10 @@ index 675780388e55aaabcb099f795e7e388f7105e56c..fd876690186533cde2fde6a08a5a8916 content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index ec5521a6e20051b1b66bc41ccee79b9aa43de4d0..7d89a6c8f13feb533964eb26a390902813a48bbc 100644 +index 44d0b99677a74cd57c5f2d0462b0983812726083..72d66188452b8b5cb56b08475c6d94d84ea5c4c1 100644 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -@@ -400,8 +400,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( +@@ -404,8 +404,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -302,10 +302,10 @@ index ec5521a6e20051b1b66bc41ccee79b9aa43de4d0..7d89a6c8f13feb533964eb26a3909028 } diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -index 810289b11cba74feec6ee3f61f02562980050d06..db1f6baccb883cc35f35bf7c111483c2ecec776d 100644 +index 2ade4d0b28ba4c7179886c740952e963f828888e..b5e70e7e52df862a64baa8e3ca7e59020ac35871 100644 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -@@ -172,8 +172,7 @@ class MimeHandlerViewGuest +@@ -175,8 +175,7 @@ class MimeHandlerViewGuest content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -316,10 +316,10 @@ index 810289b11cba74feec6ee3f61f02562980050d06..db1f6baccb883cc35f35bf7c111483c2 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 c3af8403a996bac2742c6502dbe8e13e0809b0c0..fbea9891e2a5e533c3eb9d98ff16c3cc03396cc4 100644 +index 044cd83fd904db886c4cd28864f68918a35f6ed3..dafc76f15e994ddd32dbfd9580a1bcb03dce7513 100644 --- a/fuchsia_web/webengine/browser/frame_impl.cc +++ b/fuchsia_web/webengine/browser/frame_impl.cc -@@ -567,8 +567,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( +@@ -573,8 +573,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -330,10 +330,10 @@ index c3af8403a996bac2742c6502dbe8e13e0809b0c0..fbea9891e2a5e533c3eb9d98ff16c3cc // 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 69e45b758a48fd2a117715869861d70294b334b3..5e36410b91e92b399a7179e14dd18fca16d17268 100644 +index 4dbc575e68fbc0427deda9672d733ccb7265ba74..9d10e38ec140ba63fac532b844e917a693577813 100644 --- a/fuchsia_web/webengine/browser/frame_impl.h +++ b/fuchsia_web/webengine/browser/frame_impl.h -@@ -300,8 +300,7 @@ class WEB_ENGINE_EXPORT FrameImpl : public fuchsia::web::Frame, +@@ -305,8 +305,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, @@ -358,10 +358,10 @@ index 2bb690e05876c497abd1ad7d2c600b78532df1e6..c595d97a478a7475c8a56f322112006a ->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 a4e4703e5c2a3e668806e61ca5437a6a571e73d2..f1198ac26f34c68efd70e77453b0705c7c73376a 100644 +index af075e83021d4362b3ab75ee13f057d52afc5435..9291f978fca54fe600d3058ed3886ef412ea0889 100644 --- a/ui/views/controls/webview/web_dialog_view.cc +++ b/ui/views/controls/webview/web_dialog_view.cc -@@ -427,8 +427,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( +@@ -426,8 +426,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, diff --git a/patches/chromium/chrome_key_systems.patch b/patches/chromium/chrome_key_systems.patch deleted file mode 100644 index 7774ee0b52243..0000000000000 --- a/patches/chromium/chrome_key_systems.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: deepak1556 -Date: Thu, 20 Sep 2018 17:50:13 -0700 -Subject: chrome_key_systems.patch - -Disable persiste licence support check for widevine cdm, -as its not supported in the current version of chrome. - -diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc -index 56533ee562300302d27e3bde27148d36612f2f65..dcb9816d632dd3198377de3f87252fda5bc90133 100644 ---- a/chrome/renderer/media/chrome_key_systems.cc -+++ b/chrome/renderer/media/chrome_key_systems.cc -@@ -17,7 +17,9 @@ - #include "base/strings/utf_string_conversions.h" - #include "build/build_config.h" - #include "build/chromeos_buildflags.h" -+#if 0 - #include "chrome/renderer/chrome_render_thread_observer.h" -+#endif - #include "components/cdm/renderer/external_clear_key_key_system_info.h" - #include "components/cdm/renderer/widevine_key_system_info.h" - #include "content/public/renderer/render_thread.h" -@@ -238,12 +240,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability, - - // Returns whether persistent-license session can be supported. - bool CanSupportPersistentLicense() { -+#if 0 - // Do not support persistent-license if the process cannot persist data. - // TODO(crbug.com/457487): Have a better plan on this. See bug for details. - if (ChromeRenderThreadObserver::is_incognito_process()) { - DVLOG(2) << __func__ << ": Not supported in incognito process."; - return false; - } -+#endif - - // On ChromeOS, platform verification is similar to CDM host verification. - #if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION) || BUILDFLAG(IS_CHROMEOS) 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 5d746bebe787e..03257570d2527 100644 --- a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch +++ b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch @@ -7,7 +7,7 @@ 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 c2ef1da09511b9314298b4e55a23bd521ba17969..d95b992daae050ea601da86008823bbd41df9b6d 100644 +index b5e25381af8f19a16b76672936821b7d3becdba8..db198814fc07a8f278eaf013ca37d928ff0e0bc7 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc @@ -39,6 +39,7 @@ @@ -18,7 +18,7 @@ index c2ef1da09511b9314298b4e55a23bd521ba17969..d95b992daae050ea601da86008823bbd #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/task/single_thread_task_runner.h" -@@ -251,8 +252,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) { +@@ -256,8 +257,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) { #endif @@ -33,7 +33,7 @@ index c2ef1da09511b9314298b4e55a23bd521ba17969..d95b992daae050ea601da86008823bbd #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) base::FileDescriptorStore& file_descriptor_store = base::FileDescriptorStore::GetInstance(); -@@ -281,11 +287,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, +@@ -286,11 +292,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, #endif // V8_USE_EXTERNAL_STARTUP_DATA @@ -48,7 +48,7 @@ index c2ef1da09511b9314298b4e55a23bd521ba17969..d95b992daae050ea601da86008823bbd #endif // V8_USE_EXTERNAL_STARTUP_DATA } -@@ -965,7 +972,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { +@@ -998,7 +1005,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { return TerminateForFatalInitializationError(); #endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE) @@ -102,7 +102,7 @@ index d4bb0e9a017a833b403916e1d6e64fb058f40f86..35ba35a95e39700824d6e0b480b99bc3 friend class ContentClientCreator; friend class ContentClientInitializer; diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index 3fd76d7051ccc5f7e6f45c5be17fca4b22463b24..1d197cb685d14fb440c0136a6b4fff7336e9e946 100644 +index a7fa30946131687b046c701d1fe49293f1e837f7..4e7f681fb0ee15ec50328e345975195b0e9c6ba1 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc @@ -494,8 +494,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out, diff --git a/patches/chromium/custom_protocols_plzserviceworker.patch b/patches/chromium/custom_protocols_plzserviceworker.patch index 790079488650b..8ab70b1a158f2 100644 --- a/patches/chromium/custom_protocols_plzserviceworker.patch +++ b/patches/chromium/custom_protocols_plzserviceworker.patch @@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511 diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc -index 88a5ecbb040e74822be75585f8f0265825e63a3c..faac202dec6ba0b482ee4e3869a22fc6da7e852b 100644 +index b8a47c0a91a23c7cbd65595f857caed4f8404102..564785198facec512e0a241c8d1948f218c84279 100644 --- a/content/browser/service_worker/service_worker_context_wrapper.cc +++ b/content/browser/service_worker/service_worker_context_wrapper.cc -@@ -1724,6 +1724,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1727,6 +1727,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( loader_factory_bundle_info = context()->loader_factory_bundle_for_update_check()->Clone(); @@ -38,7 +38,7 @@ index 88a5ecbb040e74822be75585f8f0265825e63a3c..faac202dec6ba0b482ee4e3869a22fc6 if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig( browser_context(), scope_origin)) { // If this is a Service Worker for a WebUI, the WebUI's URLDataSource -@@ -1743,9 +1763,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1746,9 +1766,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( features::kEnableServiceWorkersForChromeScheme) && scope.scheme_piece() == kChromeUIScheme) { config->RegisterURLDataSource(browser_context()); @@ -49,7 +49,7 @@ index 88a5ecbb040e74822be75585f8f0265825e63a3c..faac202dec6ba0b482ee4e3869a22fc6 .emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory( browser_context(), kChromeUIScheme, base::flat_set())); -@@ -1753,9 +1771,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1756,9 +1774,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( features::kEnableServiceWorkersForChromeUntrusted) && scope.scheme_piece() == kChromeUIUntrustedScheme) { config->RegisterURLDataSource(browser_context()); diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index 10910767082b3..ec41f4e4e1b43 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc -index 2114f75a3172c70b70625ecc97e1135e9f58b699..12d289efee5920dcd9f54a7f8b9586b107daf7d5 100644 +index db4dbd9191b957e6530b8b4284ce783cabaff028..ab25345e4e3b85020aee58531696f7f7325026ce 100644 --- a/ui/base/clipboard/clipboard_win.cc +++ b/ui/base/clipboard/clipboard_win.cc -@@ -891,10 +891,10 @@ SkBitmap ClipboardWin::ReadBitmapInternal(ClipboardBuffer buffer) const { +@@ -912,10 +912,10 @@ SkBitmap ClipboardWin::ReadBitmapInternal(ClipboardBuffer buffer) const { void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) { UINT cf_format = format.ToFormatEtc().cfFormat; diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 2dafb42eeef61..ba0b2842574a0 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -82,10 +82,10 @@ index 33ca7a53dfb6d2c9e3a33f0065a3acd806e82e01..9fdf2e8ff0056ff407015b914c6b03eb const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index 97d1618356d2c42eda3e24ab0038c961d220194f..60aa0f41fbe1115d8367b024cacdfb71be26aff0 100644 +index b548c9fbd3c0bf425447b29dcd866cd27e96b14c..f994ac6086c7b4cd3e8534f34691189d78a21601 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc -@@ -141,7 +141,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) { +@@ -147,7 +147,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) { #if BUILDFLAG(IS_MAC) BASE_FEATURE(kWindowCaptureMacV2, "WindowCaptureMacV2", @@ -94,7 +94,7 @@ index 97d1618356d2c42eda3e24ab0038c961d220194f..60aa0f41fbe1115d8367b024cacdfb71 #endif } // namespace -@@ -451,6 +451,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { +@@ -457,6 +457,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { FROM_HERE, base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished, media_list_)); @@ -104,7 +104,7 @@ index 97d1618356d2c42eda3e24ab0038c961d220194f..60aa0f41fbe1115d8367b024cacdfb71 } void NativeDesktopMediaList::Worker::OnCaptureResult( -@@ -823,6 +826,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( +@@ -829,6 +832,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails, base::Unretained(worker_.get()), std::move(native_ids), thumbnail_size_)); diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index b27ab74face3d..1ab452d2f6b73 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at https://crbug.com/634542 and https://crbug.com/711107. diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc -index 940f15cab30983c3f05ef886d3b055bcc35159f2..4ddc504b02b8d0abcefd6e3e7871875df9b0fd81 100644 +index 5fe0a2d8252206bf1c0f33b87064f3475693976b..f17a711043ec17e47014857b56e46ca7c491f80a 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1880,6 +1880,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1889,6 +1889,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -35,7 +35,7 @@ index 940f15cab30983c3f05ef886d3b055bcc35159f2..4ddc504b02b8d0abcefd6e3e7871875d // If we are likely to software composite the resource, we use sRGB because // software compositing is unable to perform color conversion. diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h -index 012e0f781d21b96890b88e0bc2cb2d46cb1e3829..e74783c3f8003d87fbb343087a83da3cb2b06ab3 100644 +index 29cd1a8a5db8ad7533458e4ed3f7a08479747b3c..db87c255789f9194b6f0d5d2d9c7e33658e8dcc1 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -96,6 +96,8 @@ class CC_EXPORT LayerTreeSettings { @@ -81,7 +81,7 @@ index c7ca2458708dd9577afdaef7fbcafaaa68046904..c4a1f1368ef053830c86cf86c3bec7ce !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 9f1efcdd0ef27c528c4aec954ab9ca74085a6e74..f86f288f32404ce75d4f177c7bfd1253c7b1ee3f 100644 +index 8e8c58cf6bbbc2b2f09dbb13887d3e934ed6f163..630cf045a893f9ce6d7cc0f733a64d0b80cf2520 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -224,6 +224,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -93,10 +93,10 @@ index 9f1efcdd0ef27c528c4aec954ab9ca74085a6e74..f86f288f32404ce75d4f177c7bfd1253 sandbox::policy::switches::kGpuSandboxAllowSysVShm, sandbox::policy::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 31678701d6ee0aefdb86c046178abdf11277de3d..7632aeeba116e08c9d2c7fdfb684334c7fa0ba76 100644 +index beafe321328aabf6751508b3a5a756626b3670e8..a94fdeef88270d2b952ee4ae1579c3e85cc22f64 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -3309,6 +3309,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3301,6 +3301,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. static const char* const kSwitchNames[] = { @@ -148,7 +148,7 @@ index 318005b66e04ed03ce6d44931d9360c0e009cb94..0d622fddb95720141ccf8a285ace4714 } diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc -index 284cc1a6369e8fecce41f94643b77be7abbf25b0..d331a4bbe7fec9a870e84b7ed96048e2d0ab6b90 100644 +index 77624a8b54b6e05da79bd913aa3d25187118090c..0057d51aebaf7530cc91e87fc826dd70c49c1df4 100644 --- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc +++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc @@ -25,6 +25,7 @@ @@ -159,7 +159,7 @@ index 284cc1a6369e8fecce41f94643b77be7abbf25b0..d331a4bbe7fec9a870e84b7ed96048e2 #include "ui/native_theme/native_theme_features.h" #include "ui/native_theme/overlay_scrollbar_constants_aura.h" -@@ -217,6 +218,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( +@@ -214,6 +215,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); @@ -170,7 +170,7 @@ index 284cc1a6369e8fecce41f94643b77be7abbf25b0..d331a4bbe7fec9a870e84b7ed96048e2 // is what the renderer uses if its not threaded. settings.enable_checker_imaging = diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc -index c119ef410f437b27ae4d0ff76627af55a2679171..997558e36dc1aec86005d05a824336910468ba73 100644 +index 95d74c90b324760a0fafcf92fe3f40071ffa0187..cb138579bdb5b552a198d47fde220d8148e67d12 100644 --- a/ui/gfx/mac/io_surface.cc +++ b/ui/gfx/mac/io_surface.cc @@ -20,6 +20,7 @@ @@ -181,7 +181,7 @@ index c119ef410f437b27ae4d0ff76627af55a2679171..997558e36dc1aec86005d05a82433691 namespace gfx { -@@ -150,6 +151,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) { +@@ -152,6 +153,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) { // Common method used by IOSurfaceSetColorSpace and IOSurfaceCanSetColorSpace. bool IOSurfaceSetColorSpace(IOSurfaceRef io_surface, const ColorSpace& color_space) { @@ -196,7 +196,7 @@ index c119ef410f437b27ae4d0ff76627af55a2679171..997558e36dc1aec86005d05a82433691 // Allow but ignore invalid color spaces. if (!color_space.IsValid()) return true; -@@ -320,6 +329,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, +@@ -322,6 +331,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, DCHECK_EQ(kIOReturnSuccess, r); } @@ -213,7 +213,7 @@ index c119ef410f437b27ae4d0ff76627af55a2679171..997558e36dc1aec86005d05a82433691 IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB); diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc -index 52d44ad6b3e7c602711d304e07ce32138c99b4e0..e25476c76ad2d0aae66ee5a157548078b9f90ebd 100644 +index cbdfb60d42cb16848847eba67937b95b3504bedf..16c8ff102070ce75c518f8d444cae1e51580d0b4 100644 --- a/ui/gfx/switches.cc +++ b/ui/gfx/switches.cc @@ -13,6 +13,8 @@ namespace switches { @@ -226,10 +226,10 @@ index 52d44ad6b3e7c602711d304e07ce32138c99b4e0..e25476c76ad2d0aae66ee5a157548078 // sharpness, kerning, hinting and layout. const char kDisableFontSubpixelPositioning[] = diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h -index 166ac12df74510fd72d619251d4e7e455af075da..299a68885b5a5a4e6a684f12c96e61a1b34af273 100644 +index df3520997950911ab8dcd81f654016b2f726ce7d..ac38f23312eef89fb9e2614744c7226fc7091bad 100644 --- a/ui/gfx/switches.h +++ b/ui/gfx/switches.h -@@ -12,6 +12,7 @@ +@@ -13,6 +13,7 @@ namespace switches { GFX_SWITCHES_EXPORT extern const char kAnimationDurationScale[]; diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 1525620c9cec3..26ac3c378b15f 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 a557cc2b06e68e54817f154f2d1e6a7635958d0e..386bd7e06917a69b7fdcc26056aeccc5ad967b7b 100644 +index 15eb4a905bbbd65f11a45b1dee756a3ffe7f2e1c..c7d8bc7e7426686c5a0b62d7c5702ede13c79eb0 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -531,7 +531,11 @@ +@@ -527,7 +527,11 @@ return; host()->WasHidden(); diff --git a/patches/chromium/disable_freezing_flags_after_init_in_node.patch b/patches/chromium/disable_freezing_flags_after_init_in_node.patch index f832c305995a3..2687f2a71f3bd 100644 --- a/patches/chromium/disable_freezing_flags_after_init_in_node.patch +++ b/patches/chromium/disable_freezing_flags_after_init_in_node.patch @@ -15,12 +15,12 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor node initialization to not update flags after V8 initialization. diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc -index af6e5cee1b9e79821a3cf064b6336dbc96d2895b..58b6d3daca0eb85b63c3680742afa43e4af1f47b 100644 +index 6f5ed2f88ae7f725ae1862a3078540d54b9abd43..75093bc0c6b70002acd954b11952eac8a981e714 100644 --- a/content/renderer/render_process_impl.cc +++ b/content/renderer/render_process_impl.cc -@@ -223,6 +223,9 @@ RenderProcessImpl::RenderProcessImpl() - SetV8FlagIfNotFeature(features::kWebAssemblyDynamicTiering, - "--no-wasm-dynamic-tiering"); +@@ -227,6 +227,9 @@ RenderProcessImpl::RenderProcessImpl() + v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag)); + } + // Freezing flags after init conflicts with node in the renderer. + v8::V8::SetFlagsFromString("--no-freeze-flags-after-init"); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index faac5ad5518c0..2841db0d3a68a 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,7 +6,7 @@ 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 a689c6e60b5d55c1dd2f09c40da9c8a60786b90f..f49cf68e4b5be592000b193a3b1fae18e0bd41dc 100644 +index d2e112d5e79216ca1e28827f2acfa042b54fda43..a70399d42f9388887b087d21ff98f58805c3c4d7 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -800,6 +800,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -20,7 +20,7 @@ index a689c6e60b5d55c1dd2f09c40da9c8a60786b90f..f49cf68e4b5be592000b193a3b1fae18 blink::mojom::PointerLockResult::kWrongDocument); diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h -index 3910d3a1642abc19d01556b275582170ecc520ce..60224d202aa14bd83d5eb2a52b13e37282d621dc 100644 +index f4775ddc34202803b3b015dc565bdcf5d0f5d8e0..e33c5b8ea948523a91fee51f03651e1033e73407 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -896,6 +896,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl @@ -33,7 +33,7 @@ index 3910d3a1642abc19d01556b275582170ecc520ce..60224d202aa14bd83d5eb2a52b13e372 protected: // |routing_id| must not be MSG_ROUTING_NONE. 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 65daab40548600bff98bdd1273b7325611f6b82f..f09d6289319c5dbaff6002af60cfd53c1a6cc5cc 100644 +index 4cd6bcb8c4ace85b314fb5f09d6b611b23532d4e..5066857210152ef931b140203fd91a85f5a4b017 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -605,7 +605,7 @@ void RenderWidgetHostViewAura::HideImpl() { diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index fe1b6ad682c54..e942bfe996451 100644 --- a/patches/chromium/disable_unload_metrics.patch +++ b/patches/chromium/disable_unload_metrics.patch @@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we should continue seeking for a real fix. diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc -index f4b46f5f002366d9aaee6b851c8d0643ce8e556b..fb5344a6f91fb71d7b6ea483f25a1fac5729ba29 100644 +index 9f15b20a3871eed69f2d45d94298214b4ede3933..07514d08bc558ca49e6e93b8dc85cd4aa0775488 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1265,6 +1265,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1244,6 +1244,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index f4b46f5f002366d9aaee6b851c8d0643ce8e556b..fb5344a6f91fb71d7b6ea483f25a1fac // If this is a same-process navigation and we have timestamps for unload // durations, fill those metrics out as well. if (params.unload_start && params.unload_end && -@@ -1314,6 +1315,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1293,6 +1294,7 @@ void Navigator::RecordNavigationMetrics( first_before_unload_start_time) .InMilliseconds()); } diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index 47a96a7fec1e3..dbe1abc19f1f6 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -19,10 +19,10 @@ index 0be1688818063dac2242428393babcca1d03e836..e534b895eca4e28e003ef35de4a2fb5b aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 22bb24f2afcefc3d875fe6959a7926cf2eaf7d6f..0a546b2649b37ad2a8de2783079d0fe93a24d7ac 100644 +index a73f04ed21dcb7262e1a35dd85da24c4aae34f8c..a1a7081d64cfcc2c68986788e24bcad0d15f0533 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1009,8 +1009,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen, +@@ -1126,8 +1126,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen, } void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) { diff --git a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch index d3310a7bae117..002606a195054 100644 --- a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch +++ b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch @@ -9,10 +9,10 @@ correctly tagged with MAP_JIT we need to use gins page allocator instead of the default V8 allocator. This probably can't be usptreamed. diff --git a/gin/public/v8_platform.h b/gin/public/v8_platform.h -index c4f2df96133012faebec25ac3a738c34cd6b4cf8..54bc2625686b9344c2c793c74589ed85de8227ba 100644 +index e93fd69a9b6ceabd8c321f8b7ea641bb2f65f1c4..761584b86dc9d30c9bca018add9f1f8b1e728ff2 100644 --- a/gin/public/v8_platform.h +++ b/gin/public/v8_platform.h -@@ -30,6 +30,7 @@ class GIN_EXPORT V8Platform : public v8::Platform { +@@ -31,6 +31,7 @@ class GIN_EXPORT V8Platform : public v8::Platform { // enabling Arm's Branch Target Instructions for executable pages. This is // verified in the tests for gin::PageAllocator. PageAllocator* GetPageAllocator() override; @@ -21,10 +21,10 @@ index c4f2df96133012faebec25ac3a738c34cd6b4cf8..54bc2625686b9344c2c793c74589ed85 v8::ZoneBackingAllocator* GetZoneBackingAllocator() override; #endif diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc -index bbb16efbf5208989fa88c7f6d83d36aa5e54a0d1..ef562c9a9abed85198282728287637d178a0af0f 100644 +index a1f4bb41a6dde8b3495996e486cea60a5ecf2b6c..3a3b76471a7ca9d73928a23d0e330daf9d9d399b 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc -@@ -370,6 +370,10 @@ PageAllocator* V8Platform::GetPageAllocator() { +@@ -304,6 +304,10 @@ PageAllocator* V8Platform::GetPageAllocator() { return g_page_allocator.Pointer(); } diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 25a248d943637..76c82ea443db2 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 74b881ef99b32d085f58fc7b30cd42005855dcbc..ab34e6ad6736a5b4c154750d95eef622f2051f0d 100644 +index 1e6300466078bbe1ad02922d87e173d062cf1f79..e007b1ea550aa73fc0f04dc3dc4695574b70d3e0 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1387,6 +1387,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1395,6 +1395,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index 74b881ef99b32d085f58fc7b30cd42005855dcbc..ab34e6ad6736a5b4c154750d95eef622 // 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 98c33a3048f1a10e8293c51213a99089ca55456b..92cf6606e0cef6e640accbacfdacd9cb9f1aeef1 100644 +index 5aaa11be3d8ead3626bf49f7efcfe04ddbfa6933..c2e01df9ee72483121c307ca3a83d5307aa3eaa8 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -302,6 +302,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -310,6 +310,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CloseIdleConnections(CloseIdleConnectionsCallback callback) override; void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override; @@ -63,10 +63,10 @@ index 98c33a3048f1a10e8293c51213a99089ca55456b..92cf6606e0cef6e640accbacfdacd9cb void SetEnableReferrers(bool enable_referrers) override; void SetEnablePreconnect(bool enable_preconnect) override; diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index a9e7ccf5676cf72fddfd882d7582cc8f6f3162da..5b533f299ce753f5c40fbc432d6550f67fe994c0 100644 +index 71a39f2c31099ac4869690d4fe81ce9b83d49893..ccb72ac227aa621dd56d8f008d7dce2e00b0e60e 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1113,6 +1113,9 @@ interface NetworkContext { +@@ -1102,6 +1102,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,10 +77,10 @@ index a9e7ccf5676cf72fddfd882d7582cc8f6f3162da..5b533f299ce753f5c40fbc432d6550f6 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index 5415522f3b145519825082d31d4e4c95f8d5e848..842e8981d0f517196bd58f2a952d71f88991c56e 100644 +index 8719a8bd10960671561a316103a5d8e8fb9a98a9..43b6df49d94073861ce2aceaa538bef15f95985c 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -137,6 +137,7 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -139,6 +139,7 @@ class TestNetworkContext : public mojom::NetworkContext { void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {} void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override {} diff --git a/patches/chromium/expose_v8initializer_codegenerationcheckcallbackinmainthread.patch b/patches/chromium/expose_v8initializer_codegenerationcheckcallbackinmainthread.patch index f3414ee56bee7..0828fbea36083 100644 --- a/patches/chromium/expose_v8initializer_codegenerationcheckcallbackinmainthread.patch +++ b/patches/chromium/expose_v8initializer_codegenerationcheckcallbackinmainthread.patch @@ -6,10 +6,10 @@ Subject: expose V8Initializer::CodeGenerationCheckCallbackInMainThread This is needed to blend Blink and Node's policy for code generation policy. 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 c9c33c560476e43e097f04d1b21154debc20667c..fcbccbb67b0d152a771e26aaae5beb85ffe83bc2 100644 +index 7dafc767308fea4c9bfb94451b57c9a23f927917..35f6b7fb09528d4a2018cc423f5d459b8b62035c 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -@@ -443,8 +443,9 @@ TrustedTypesCodeGenerationCheck(v8::Local context, +@@ -444,8 +444,9 @@ TrustedTypesCodeGenerationCheck(v8::Local context, return {true, V8String(context->GetIsolate(), stringified_source)}; } diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index d0bccbc4573a2..7977d33d2f804 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -12,18 +12,18 @@ 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 490a381e1afd0a175cd1ca12926a21278c051712..66dabaf4f57ede27416b7f14fa30e652a056fefc 100644 +index f299f1103edfd5f53cfc8bafff1dcb907cbd5437..763c09fa845e0764096db4c075bf4f809e3cca14 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -164,6 +164,7 @@ - #include "third_party/blink/renderer/core/timing/window_performance.h" +@@ -165,6 +165,7 @@ + #include "third_party/blink/renderer/core/view_transition/view_transition_supplement.h" #include "third_party/blink/renderer/platform/fonts/font_cache.h" #include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h" +#include "third_party/blink/renderer/platform/graphics/color.h" #include "third_party/blink/renderer/platform/graphics/image.h" #include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h" -@@ -1816,6 +1817,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1818,6 +1819,7 @@ 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 8bc35e83559e2..b90f957e9f9c0 100644 --- a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch +++ b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch @@ -179,10 +179,10 @@ index 0e1baf024e7aee3bc1edad1e0620bd56647d042b..2302cd0b1c536f5c5bc5125a7bbe133e if (!WriteToSocket(socket.fd(), to_send.data(), to_send.length())) { // Try to kill the other process, because it might have been dead. diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 51a109504c1c8f79ef8748641ef21efed3a9315d..7df5b345b7e6a2360c226e0aaf48bcdf95c99afa 100644 +index 3dff138357d9e1ae8d572df7630aa6ec429728a3..ae123a441bcf7939fad222d84e4bd6ec84bf6422 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc -@@ -81,10 +81,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { +@@ -80,10 +80,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { bool ParseCommandLine(const COPYDATASTRUCT* cds, base::CommandLine* parsed_command_line, @@ -197,7 +197,7 @@ index 51a109504c1c8f79ef8748641ef21efed3a9315d..7df5b345b7e6a2360c226e0aaf48bcdf static const int min_message_size = 7; if (cds->cbData < min_message_size * sizeof(wchar_t) || cds->cbData % sizeof(wchar_t) != 0) { -@@ -134,6 +136,37 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds, +@@ -133,6 +135,37 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds, const std::wstring cmd_line = msg.substr(second_null + 1, third_null - second_null); *parsed_command_line = base::CommandLine::FromString(cmd_line); @@ -235,7 +235,7 @@ index 51a109504c1c8f79ef8748641ef21efed3a9315d..7df5b345b7e6a2360c226e0aaf48bcdf return true; } return false; -@@ -155,13 +188,14 @@ bool ProcessLaunchNotification( +@@ -154,13 +187,14 @@ bool ProcessLaunchNotification( base::CommandLine parsed_command_line(base::CommandLine::NO_PROGRAM); base::FilePath current_directory; @@ -253,7 +253,7 @@ index 51a109504c1c8f79ef8748641ef21efed3a9315d..7df5b345b7e6a2360c226e0aaf48bcdf return true; } -@@ -267,9 +301,11 @@ bool ProcessSingleton::EscapeVirtualization( +@@ -264,9 +298,11 @@ bool ProcessSingleton::EscapeVirtualization( ProcessSingleton::ProcessSingleton( const std::string& program_name, const base::FilePath& user_data_dir, @@ -265,7 +265,7 @@ index 51a109504c1c8f79ef8748641ef21efed3a9315d..7df5b345b7e6a2360c226e0aaf48bcdf program_name_(program_name), is_app_sandboxed_(is_app_sandboxed), is_virtualized_(false), -@@ -296,7 +332,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { +@@ -293,7 +329,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { return PROCESS_NONE; } 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 6018e0745c4bc..bd489a061f09a 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 @@ -13,7 +13,7 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass then refers to the list so that it can correctly determine the data source's settings. diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -index a26d2de400d1a2b5d97d03eb438c4d7024e03ef5..c1ae23cda6a72d92c508ef239b7c4892dc81c4af 100644 +index f1b47787d5296e8bdc3090840573270fff1f344e..ac114e77a335b0f66670be88873c071e18f4726f 100644 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc @@ -11,8 +11,10 @@ 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 0f29dcb7fa0a9..5afdc5333de50 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 27f5a789f39c3ac896e3d4b8fd9fedcb562ef8c4..cf73bd941d82d54cbd6fab95123672439a652f0e 100644 +index 8302d03e58eede9376d399eaf5f5de166bea9b20..1ee63c9349f8c6e12e3b3f483bb2a7d14dae9676 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc @@ -49,6 +49,9 @@ namespace { @@ -22,7 +22,7 @@ index 27f5a789f39c3ac896e3d4b8fd9fedcb562ef8c4..cf73bd941d82d54cbd6fab9512367243 // Close the file. void CloseDictionary(base::File file) { base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, -@@ -269,6 +272,10 @@ void SpellcheckHunspellDictionary::SetDownloadURLForTesting(const GURL url) { +@@ -266,6 +269,10 @@ void SpellcheckHunspellDictionary::SetDownloadURLForTesting(const GURL url) { g_download_url_for_testing.Get() = url; } @@ -33,7 +33,7 @@ index 27f5a789f39c3ac896e3d4b8fd9fedcb562ef8c4..cf73bd941d82d54cbd6fab9512367243 GURL SpellcheckHunspellDictionary::GetDictionaryURL() { if (g_download_url_for_testing.Get() != GURL()) return g_download_url_for_testing.Get(); -@@ -276,6 +283,9 @@ GURL SpellcheckHunspellDictionary::GetDictionaryURL() { +@@ -273,6 +280,9 @@ GURL SpellcheckHunspellDictionary::GetDictionaryURL() { std::string bdict_file = dictionary_file_.path.BaseName().MaybeAsASCII(); DCHECK(!bdict_file.empty()); diff --git a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch index ca27e84c67f09..96b2237ac75ce 100644 --- a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch +++ b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch @@ -7,20 +7,19 @@ Subject: feat: allow embedders to add observers on created hunspell This patch is used by Electron to implement spellchecker events. diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc -index 0409bf02684e1d01a76e04f43fe30bb19098ac4c..b1102a326d8ef74ac42494f6bc2a36815d56d465 100644 +index 809410c3c7337e0ac62e8ce0697469ebaaa3f8d1..6f82ca34664b323764603f41e0e4e174f6460d50 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc -@@ -463,6 +463,9 @@ void SpellcheckService::LoadDictionaries() { +@@ -468,6 +468,8 @@ void SpellcheckService::LoadDictionaries() { std::make_unique( dictionary, platform_spellcheck_language, context_, this)); hunspell_dictionaries_.back()->AddObserver(this); -+ if (hunspell_observer_) { ++ if (hunspell_observer_) + hunspell_dictionaries_.back()->AddObserver(hunspell_observer_); -+ } hunspell_dictionaries_.back()->Load(); } -@@ -515,6 +518,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { +@@ -520,6 +522,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { (!hunspell_dictionaries_.empty() || enable_if_uninitialized); } @@ -38,23 +37,23 @@ index 0409bf02684e1d01a76e04f43fe30bb19098ac4c..b1102a326d8ef74ac42494f6bc2a3681 + hunspell_observer_ = observer; +} + - void SpellcheckService::OnRenderProcessHostCreated( - content::RenderProcessHost* host) { - InitForRenderer(host); + void SpellcheckService::Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h -index 00e613bb4ca4346eb0b0e65b9b818d817ac724d9..bd9745d29a61944a23b83b274aace2ea8cb37a0f 100644 +index 17b0aaeb05bcb1f8dadc6551c6b688c7b084c1ff..1e1060f348bc9c5ee23ecf6cbffddad27a80af18 100644 --- a/chrome/browser/spellchecker/spellcheck_service.h +++ b/chrome/browser/spellchecker/spellcheck_service.h -@@ -135,6 +135,8 @@ class SpellcheckService : public KeyedService, +@@ -138,6 +138,8 @@ class SpellcheckService : public KeyedService, // dictionaries available. bool IsSpellcheckEnabled() const; + void SetHunspellObserver(SpellcheckHunspellDictionary::Observer* observer); + - // content::RenderProcessHostCreationObserver implementation. - void OnRenderProcessHostCreated(content::RenderProcessHost* host) override; - -@@ -299,6 +301,8 @@ class SpellcheckService : public KeyedService, + // NotificationProfile implementation. + void Observe(int type, + const content::NotificationSource& source, +@@ -305,6 +307,8 @@ class SpellcheckService : public KeyedService, // A pointer to the BrowserContext which this service refers to. raw_ptr context_; 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 3b8bcc0745388..62c9710b61c1f 100644 --- a/patches/chromium/feat_configure_launch_options_for_service_process.patch +++ b/patches/chromium/feat_configure_launch_options_for_service_process.patch @@ -58,7 +58,7 @@ index 2688eace4c00176ac9d1636641b44b8258c29b08..f8498a45db1158f2cfb7a9f548f290a8 // Launches a process asynchronously and notifies the client of the process diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc -index 7f6a4197aa7da2ba6a16cd83b78243e49ec1f2f4..a4b0ad5a63f39a4c4ff8301fe2a9ba131149a9bd 100644 +index 6d8aa39ab75edcba3e34134566c9fcbe56a7ec57..30912cc39806b13c47b85ba1bfc848a23c83c30d 100644 --- a/content/browser/child_process_launcher_helper_linux.cc +++ b/content/browser/child_process_launcher_helper_linux.cc @@ -62,6 +62,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( @@ -84,10 +84,10 @@ index 7f6a4197aa7da2ba6a16cd83b78243e49ec1f2f4..a4b0ad5a63f39a4c4ff8301fe2a9ba13 DCHECK(GetZygoteForLaunch()); // Environment variables could be supported in the future, but are not diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc -index a4be170a8c66e32f9913a34f31e5cfe29593e9b4..9ade30e64841a27e4bb174df3ff94514fbdcef8f 100644 +index 7bac4c30d0be2d89335a3f77ac7fd84d120ca4ce..39b3927d42fe65563a2d4bb735c9432f1e8c386f 100644 --- a/content/browser/child_process_launcher_helper_mac.cc +++ b/content/browser/child_process_launcher_helper_mac.cc -@@ -121,7 +121,8 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( +@@ -123,7 +123,8 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( 'mojo', base::MachRendezvousPort(endpoint.TakeMachReceiveRight()))); options->environment = delegate_->GetEnvironment(); @@ -97,7 +97,7 @@ index a4be170a8c66e32f9913a34f31e5cfe29593e9b4..9ade30e64841a27e4bb174df3ff94514 options->disclaim_responsibility = delegate_->DisclaimResponsibility(); options->enable_cpu_security_mitigations = delegate_->EnableCpuSecurityMitigations(); -@@ -182,6 +183,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( +@@ -184,6 +185,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( base::StringPrintf("%s%d", sandbox::switches::kSeatbeltClient, pipe)); } @@ -110,7 +110,7 @@ index a4be170a8c66e32f9913a34f31e5cfe29593e9b4..9ade30e64841a27e4bb174df3ff94514 } diff --git a/content/browser/child_process_launcher_helper_win.cc b/content/browser/child_process_launcher_helper_win.cc -index d4c9e420ce93414e4f73de6a4e195052eb523ca4..03a620bbf906678ec6c923f0e3285687da791f7c 100644 +index fee8640ccee0a24e1f1e282e9bad3a26bd721df8..4b6a3e7aaf686ea23500b7e051156e59f252a108 100644 --- a/content/browser/child_process_launcher_helper_win.cc +++ b/content/browser/child_process_launcher_helper_win.cc @@ -19,6 +19,8 @@ @@ -163,10 +163,10 @@ index d4c9e420ce93414e4f73de6a4e195052eb523ca4..03a620bbf906678ec6c923f0e3285687 } diff --git a/content/browser/service_process_host_impl.cc b/content/browser/service_process_host_impl.cc -index 0072ab78bd82d387c0b27c3e121cf233daf4ae25..ce2973c1fa05c4250d18b386ca6124aa580006b7 100644 +index 4d4c17b8fe687e01f7403335c88453998259d647..22c1e5fd0c6f16a101b2578675704f185e812791 100644 --- a/content/browser/service_process_host_impl.cc +++ b/content/browser/service_process_host_impl.cc -@@ -189,6 +189,15 @@ void LaunchServiceProcess(mojo::GenericPendingReceiver receiver, +@@ -198,6 +198,15 @@ void LaunchServiceProcess(mojo::GenericPendingReceiver receiver, host->SetExtraCommandLineSwitches(std::move(options.extra_switches)); if (options.child_flags) host->set_child_flags(*options.child_flags); @@ -252,7 +252,7 @@ index fe0b5134ea3d7887aa237200e89e79c2ff68314c..c544d1ef0eb381da7f96013643c862f6 #if BUILDFLAG(USE_ZYGOTE) if (zygote_for_testing_.has_value()) { diff --git a/content/browser/utility_process_host.h b/content/browser/utility_process_host.h -index c0abba2466c7dba5f3e41f95ede3f983ce0050e0..0f3bb9b69597aec460ad26d569b281b0877ff6f9 100644 +index 64ca6bc6657572bc4f878391ed9528704ce579af..095971ae67ce51f80d24f73fe69d7515a7027ea8 100644 --- a/content/browser/utility_process_host.h +++ b/content/browser/utility_process_host.h @@ -35,6 +35,10 @@ @@ -266,7 +266,7 @@ index c0abba2466c7dba5f3e41f95ede3f983ce0050e0..0f3bb9b69597aec460ad26d569b281b0 namespace base { class Thread; } // namespace base -@@ -93,9 +97,13 @@ class CONTENT_EXPORT UtilityProcessHost +@@ -98,9 +102,13 @@ class CONTENT_EXPORT UtilityProcessHost // Returns information about the utility child process. const ChildProcessData& GetData(); @@ -282,7 +282,7 @@ index c0abba2466c7dba5f3e41f95ede3f983ce0050e0..0f3bb9b69597aec460ad26d569b281b0 // Starts the utility process. bool Start(); -@@ -135,6 +143,16 @@ class CONTENT_EXPORT UtilityProcessHost +@@ -140,6 +148,16 @@ class CONTENT_EXPORT UtilityProcessHost void SetZygoteForTesting(ZygoteCommunication* handle); #endif // BUILDFLAG(USE_ZYGOTE) @@ -299,7 +299,7 @@ index c0abba2466c7dba5f3e41f95ede3f983ce0050e0..0f3bb9b69597aec460ad26d569b281b0 // Returns a control interface for the running child process. mojom::ChildProcess* GetChildProcess(); -@@ -183,6 +201,22 @@ class CONTENT_EXPORT UtilityProcessHost +@@ -188,6 +206,22 @@ class CONTENT_EXPORT UtilityProcessHost absl::optional> zygote_for_testing_; #endif // BUILDFLAG(USE_ZYGOTE) @@ -323,7 +323,7 @@ index c0abba2466c7dba5f3e41f95ede3f983ce0050e0..0f3bb9b69597aec460ad26d569b281b0 // launch failed. enum class LaunchState { diff --git a/content/browser/utility_sandbox_delegate.cc b/content/browser/utility_sandbox_delegate.cc -index 051f08d67c6186a8e874ded8752c1fd355e26cd7..fad86c948f6f2ee3a51680f367ad6440649141a4 100644 +index 68db1862fd51f9b6c8c8c9fbd4055490fccd5f9a..5fb93015c780124ced9781ff5ae3e9cb821bb6e7 100644 --- a/content/browser/utility_sandbox_delegate.cc +++ b/content/browser/utility_sandbox_delegate.cc @@ -29,13 +29,15 @@ UtilitySandboxedProcessLauncherDelegate:: @@ -346,7 +346,7 @@ index 051f08d67c6186a8e874ded8752c1fd355e26cd7..fad86c948f6f2ee3a51680f367ad6440 #if DCHECK_IS_ON() bool supported_sandbox_type = sandbox_type_ == sandbox::mojom::Sandbox::kNoSandbox || -@@ -96,11 +98,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() { +@@ -97,11 +99,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() { return sandbox_type_; } @@ -367,7 +367,7 @@ index 051f08d67c6186a8e874ded8752c1fd355e26cd7..fad86c948f6f2ee3a51680f367ad6440 #if BUILDFLAG(USE_ZYGOTE) ZygoteCommunication* UtilitySandboxedProcessLauncherDelegate::GetZygote() { diff --git a/content/browser/utility_sandbox_delegate.h b/content/browser/utility_sandbox_delegate.h -index 7ba799ad2bed61d4728c549f01004777b6e0979a..3cde2b41bdf8ed75e84040cf41d8fd99ab5deb20 100644 +index 7df4b4752e92fbc94c3d31cd4e0668d237bfd093..4c1d57a491a5f1044ebe1ad481809f3b088fd460 100644 --- a/content/browser/utility_sandbox_delegate.h +++ b/content/browser/utility_sandbox_delegate.h @@ -26,7 +26,9 @@ class UtilitySandboxedProcessLauncherDelegate @@ -434,10 +434,10 @@ index 498f60227d13eb2e476413f88eaa58cc0babf461..619639ad5d22a1121b0e0d5f2c9e3c10 } // namespace content diff --git a/content/public/browser/service_process_host.cc b/content/public/browser/service_process_host.cc -index 6d25170e3badb65745c7dbea9c9664bdf8c91b0e..df79ba6137c8a9264ba32e4f9e1c1d7893e8f38a 100644 +index b11ee73bed669057c02a9b3294a172003a339447..a33456d43a70fb01506c4c081f4f07f789801e87 100644 --- a/content/public/browser/service_process_host.cc +++ b/content/public/browser/service_process_host.cc -@@ -46,12 +46,45 @@ ServiceProcessHost::Options::WithExtraCommandLineSwitches( +@@ -52,12 +52,45 @@ ServiceProcessHost::Options::WithExtraCommandLineSwitches( return *this; } @@ -484,7 +484,7 @@ index 6d25170e3badb65745c7dbea9c9664bdf8c91b0e..df79ba6137c8a9264ba32e4f9e1c1d78 return std::move(*this); } diff --git a/content/public/browser/service_process_host.h b/content/public/browser/service_process_host.h -index c46ee10e6e02b7c48cf0bcdfdcf6d6096a4dbd32..2b0be74c55b711faab774a55e39748ed85f3b382 100644 +index 123bb6fe8287b65b9c47f726fc3f29e3f3976ad9..a3fd4878dbaa5e28b3111c2ffd3718653628e18d 100644 --- a/content/public/browser/service_process_host.h +++ b/content/public/browser/service_process_host.h @@ -13,6 +13,7 @@ @@ -495,7 +495,7 @@ index c46ee10e6e02b7c48cf0bcdfdcf6d6096a4dbd32..2b0be74c55b711faab774a55e39748ed #include "base/process/process_handle.h" #include "base/strings/string_piece.h" #include "build/chromecast_buildflags.h" -@@ -29,6 +30,10 @@ +@@ -30,6 +31,10 @@ #include "mojo/public/cpp/system/message_pipe.h" #endif @@ -506,7 +506,7 @@ index c46ee10e6e02b7c48cf0bcdfdcf6d6096a4dbd32..2b0be74c55b711faab774a55e39748ed namespace base { class Process; } // namespace base -@@ -88,11 +93,30 @@ class CONTENT_EXPORT ServiceProcessHost { +@@ -93,11 +98,30 @@ class CONTENT_EXPORT ServiceProcessHost { // Specifies extra command line switches to append before launch. Options& WithExtraCommandLineSwitches(std::vector switches); @@ -537,8 +537,8 @@ index c46ee10e6e02b7c48cf0bcdfdcf6d6096a4dbd32..2b0be74c55b711faab774a55e39748ed // Passes the contents of this Options object to a newly returned Options // value. This must be called when moving a built Options object into a call // to |Launch()|. -@@ -101,7 +125,16 @@ class CONTENT_EXPORT ServiceProcessHost { - std::u16string display_name; +@@ -107,7 +131,16 @@ class CONTENT_EXPORT ServiceProcessHost { + absl::optional site; absl::optional child_flags; std::vector extra_switches; +#if BUILDFLAG(IS_WIN) @@ -568,10 +568,10 @@ index 9bb4b30ba0f5d37ec2b28f0848d94f34c24f9423..b614fef01ee5cdf81b7112be721b851c } // namespace content diff --git a/content/public/common/sandboxed_process_launcher_delegate.cc b/content/public/common/sandboxed_process_launcher_delegate.cc -index 422613b73a9c3ef8d1d82914bd9425392b00d566..1e443457b3ddd245c82f95d0369ed9ed7d9fc43d 100644 +index 8656215a709012eef80532e7aac197818ac292df..6ee68149f140e475b11cfc02a25ade11ba9022b7 100644 --- a/content/public/common/sandboxed_process_launcher_delegate.cc +++ b/content/public/common/sandboxed_process_launcher_delegate.cc -@@ -53,11 +53,17 @@ ZygoteCommunication* SandboxedProcessLauncherDelegate::GetZygote() { +@@ -64,11 +64,17 @@ ZygoteCommunication* SandboxedProcessLauncherDelegate::GetZygote() { } #endif // BUILDFLAG(USE_ZYGOTE) @@ -592,7 +592,7 @@ index 422613b73a9c3ef8d1d82914bd9425392b00d566..1e443457b3ddd245c82f95d0369ed9ed #if BUILDFLAG(IS_MAC) diff --git a/content/public/common/sandboxed_process_launcher_delegate.h b/content/public/common/sandboxed_process_launcher_delegate.h -index ea5342394f2aaf6d612f58ab886440473ed12647..0a5a4fbdcebbb2ec5d06206f1854de5870b3096c 100644 +index 4b2ea0e2680c552b853fcbe4f5e4765a908f8915..b8815f846e2307c5c5841636da37262e6a75e7ca 100644 --- a/content/public/common/sandboxed_process_launcher_delegate.h +++ b/content/public/common/sandboxed_process_launcher_delegate.h @@ -6,6 +6,7 @@ @@ -603,7 +603,7 @@ index ea5342394f2aaf6d612f58ab886440473ed12647..0a5a4fbdcebbb2ec5d06206f1854de58 #include "base/files/scoped_file.h" #include "base/process/process.h" #include "build/build_config.h" -@@ -48,10 +49,14 @@ class CONTENT_EXPORT SandboxedProcessLauncherDelegate +@@ -56,10 +57,14 @@ class CONTENT_EXPORT SandboxedProcessLauncherDelegate virtual ZygoteCommunication* GetZygote(); #endif // BUILDFLAG(USE_ZYGOTE) @@ -621,10 +621,10 @@ index ea5342394f2aaf6d612f58ab886440473ed12647..0a5a4fbdcebbb2ec5d06206f1854de58 #if BUILDFLAG(IS_MAC) // Whether or not to disclaim TCC responsibility for the process, defaults to diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc -index 38601d04959aac61fbeba7b99482831833b9f564..3fbc8482465a03716cdeb434995dbcff30c32cec 100644 +index 544bf0087d9703e912914686ef37f8ab76584bf1..772e4048a1ce0e4588d84708f922377fe282f9f0 100644 --- a/sandbox/policy/win/sandbox_win.cc +++ b/sandbox/policy/win/sandbox_win.cc -@@ -742,11 +742,9 @@ ResultCode GenerateConfigForSandboxedProcess(const base::CommandLine& cmd_line, +@@ -739,11 +739,9 @@ ResultCode GenerateConfigForSandboxedProcess(const base::CommandLine& cmd_line, // command line flag. ResultCode LaunchWithoutSandbox( const base::CommandLine& cmd_line, @@ -637,7 +637,7 @@ index 38601d04959aac61fbeba7b99482831833b9f564..3fbc8482465a03716cdeb434995dbcff // Network process runs in a job even when unsandboxed. This is to ensure it // does not outlive the browser, which could happen if there is a lot of I/O // on process shutdown, in which case TerminateProcess can fail. See -@@ -973,7 +971,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) { +@@ -970,7 +968,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) { ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( const base::CommandLine& cmd_line, const std::string& process_type, @@ -646,7 +646,7 @@ index 38601d04959aac61fbeba7b99482831833b9f564..3fbc8482465a03716cdeb434995dbcff SandboxDelegate* delegate, TargetPolicy* policy) { const base::CommandLine& launcher_process_command_line = -@@ -987,7 +985,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -984,7 +982,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( } // Add any handles to be inherited to the policy. @@ -655,7 +655,7 @@ index 38601d04959aac61fbeba7b99482831833b9f564..3fbc8482465a03716cdeb434995dbcff policy->AddHandleToShare(handle); if (!policy->GetConfig()->IsConfigured()) { -@@ -1002,6 +1000,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -999,6 +997,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( // have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS. policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE)); policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE)); @@ -669,7 +669,7 @@ index 38601d04959aac61fbeba7b99482831833b9f564..3fbc8482465a03716cdeb434995dbcff #endif if (!delegate->PreSpawnTarget(policy)) -@@ -1014,7 +1019,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -1011,7 +1016,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( ResultCode SandboxWin::StartSandboxedProcess( const base::CommandLine& cmd_line, const std::string& process_type, @@ -678,7 +678,7 @@ index 38601d04959aac61fbeba7b99482831833b9f564..3fbc8482465a03716cdeb434995dbcff SandboxDelegate* delegate, base::Process* process) { const base::ElapsedTimer timer; -@@ -1022,7 +1027,7 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -1019,13 +1024,13 @@ ResultCode SandboxWin::StartSandboxedProcess( // Avoid making a policy if we won't use it. if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line, *base::CommandLine::ForCurrentProcess())) { @@ -687,15 +687,13 @@ index 38601d04959aac61fbeba7b99482831833b9f564..3fbc8482465a03716cdeb434995dbcff process); } -@@ -1033,7 +1038,7 @@ ResultCode SandboxWin::StartSandboxedProcess( - auto policy = g_broker_services->CreatePolicy(tag); - auto time_policy_created = timer.Elapsed(); + auto policy = g_broker_services->CreatePolicy(delegate->GetSandboxTag()); ResultCode result = GeneratePolicyForSandboxedProcess( - cmd_line, process_type, handles_to_inherit, delegate, policy.get()); + cmd_line, process_type, options, delegate, policy.get()); if (SBOX_ALL_OK != result) return result; - auto time_policy_generated = timer.Elapsed(); + diff --git a/sandbox/policy/win/sandbox_win.h b/sandbox/policy/win/sandbox_win.h index d8842ebdd1bd4ebd2ba9e33b8bcf390033dbf4d4..771c6f366559641544f775c3b45eba617923ebdb 100644 --- a/sandbox/policy/win/sandbox_win.h 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 308a90a03f289..f2e5017db2c77 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -87,7 +87,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 77fc13c924dd185f337fcf1d7a5f7e69953143e1..c320ce10cfcd8b62dc516871bae900f6da9600f5 100644 +index 21a1138ca8df215fc8a711b5d37b6eeba9020935..74b30a0d050468ad1f450d86621308c090a699b5 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -137,6 +137,8 @@ viz_component("service") { @@ -114,7 +114,7 @@ index 28f44e5df4a3591c8563564a9aba7cec1b023a29..befc5a556a7fd6719d8a1c2eb8e92784 } // namespace viz 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 ec7cc3404b5d60f2c57f239889f4b6a557d7c44c..1fdbbbfc7caf4c40fc7ff6240c70e40199ee7ad2 100644 +index 0bc450ca4faf2a4a38a93f4c6a60b95a583eec8b..5eaa99698b588edbfe8588aa80ba68457ccf8983 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -23,12 +23,14 @@ @@ -132,7 +132,7 @@ index ec7cc3404b5d60f2c57f239889f4b6a557d7c44c..1fdbbbfc7caf4c40fc7ff6240c70e401 #include "ui/base/ui_base_switches.h" #if BUILDFLAG(IS_WIN) -@@ -89,7 +91,8 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -92,7 +94,8 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( mojom::DisplayClient* display_client, DisplayCompositorMemoryAndTaskController* gpu_dependency, const RendererSettings& renderer_settings, @@ -142,7 +142,7 @@ index ec7cc3404b5d60f2c57f239889f4b6a557d7c44c..1fdbbbfc7caf4c40fc7ff6240c70e401 #if BUILDFLAG(IS_CHROMEOS_ASH) if (surface_handle == gpu::kNullSurfaceHandle) return std::make_unique(); -@@ -97,7 +100,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -100,7 +103,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( if (!gpu_compositing) { return std::make_unique( @@ -151,7 +151,7 @@ index ec7cc3404b5d60f2c57f239889f4b6a557d7c44c..1fdbbbfc7caf4c40fc7ff6240c70e401 } else { DCHECK(gpu_dependency); -@@ -137,10 +140,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -140,10 +143,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( std::unique_ptr OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( gpu::SurfaceHandle surface_handle, @@ -218,10 +218,10 @@ index a8fcbf5149efa95ec5ec01f4571428053a10bbdb..9fa132fd8dd984e65e53ef6298c09a7d IOSurfaceCreateMachPort(current_paint_buffer_->io_surface)); client_->SoftwareDeviceUpdatedCALayerParams(ca_layer_params); diff --git a/components/viz/service/display_embedder/software_output_device_mac.h b/components/viz/service/display_embedder/software_output_device_mac.h -index fd787775ccd27c85ebd1e36157a095d4a871d8c4..5a55149fc5ef8d2ea7136b92f67546155232c377 100644 +index e12c1d87018a86d763f59e5ac62058cf815fce3a..01f8023811b49797674a0de6e32c358d965789d1 100644 --- a/components/viz/service/display_embedder/software_output_device_mac.h +++ b/components/viz/service/display_embedder/software_output_device_mac.h -@@ -61,6 +61,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceMac : public SoftwareOutputDevice { +@@ -62,6 +62,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceMac : public SoftwareOutputDevice { void UpdateAndCopyBufferDamage(Buffer* previous_paint_buffer, const SkRegion& new_damage_rect); @@ -527,10 +527,10 @@ index f9dd844cd6b665a5566cf6f46830287cffedc0ca..5b74259b2650fc4a525ba3a1be61d3d9 // Creating output surface failed. The host can send a new request, possibly // with a different compositing mode. diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc -index 0b0c6d676f83f49eb3c846ee79430089b5a5bc0f..3427494a6b6d1df803d9b6bdae81ceaf296028ae 100644 +index a45fa7c141777bc6ebc5c34ba73c2e6cc602c2b0..a4bbec572b63a22e2b920e7b139c0c9b6ec34e0c 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc -@@ -399,8 +399,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( +@@ -397,8 +397,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( mojo::AssociatedRemote display_private; root_params->display_private = display_private.BindNewEndpointAndPassReceiver(); @@ -548,10 +548,10 @@ index 0b0c6d676f83f49eb3c846ee79430089b5a5bc0f..3427494a6b6d1df803d9b6bdae81ceaf compositor_data.display_client->GetBoundRemote(resize_task_runner_); mojo::AssociatedRemote diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom -index 83c153d99c1e2be2b139330cd4eedf129fcac2ce..14466dd30eb6b63638d351dcf7caf93a8d30e2fb 100644 +index c286482bc7ddb16cc0b755262006971f564bd54c..71914284f2ff078e949d300d4a19a18c73330d50 100644 --- a/services/viz/privileged/mojom/compositing/display_private.mojom +++ b/services/viz/privileged/mojom/compositing/display_private.mojom -@@ -107,7 +107,6 @@ interface DisplayClient { +@@ -109,7 +109,6 @@ interface DisplayClient { // Creates a LayeredWindowUpdater implementation to draw into a layered // window. @@ -560,7 +560,7 @@ index 83c153d99c1e2be2b139330cd4eedf129fcac2ce..14466dd30eb6b63638d351dcf7caf93a // Sends the created child window to the browser process so that it can be diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom -index ebb40d253e3870250d8dbe21dc26e7be5566297a..fd29e465522e7d219d1012d3e993d13d45c5e7e5 100644 +index b8037d39c0d763b25d3db09f73b1819a0907904d..2ecad8b7bda880b6aceb316e17a05a99575285b7 100644 --- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom +++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom @@ -30,6 +30,7 @@ struct RootCompositorFrameSinkParams { @@ -583,7 +583,7 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 2d296b025ec172d895512e58cfefe9bb156b5675..4cb3b9b6afde1484d5bdf4da4640c7d7604b77dc 100644 +index e7be43d3f842f3bfdaa58a4f8f334b4ece79168c..6ff1e4c41ca86a553e9ef050d76d31b3588426df 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -89,6 +89,7 @@ class DisplayPrivate; @@ -621,7 +621,7 @@ index 2d296b025ec172d895512e58cfefe9bb156b5675..4cb3b9b6afde1484d5bdf4da4640c7d7 // 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 -@@ -513,6 +527,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -520,6 +534,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, std::unique_ptr pending_begin_frame_args_; @@ -631,7 +631,7 @@ index 2d296b025ec172d895512e58cfefe9bb156b5675..4cb3b9b6afde1484d5bdf4da4640c7d7 raw_ptr root_layer_ = nullptr; diff --git a/ui/gfx/ca_layer_params.h b/ui/gfx/ca_layer_params.h -index f87ddf7ae117f9de5a88bd27b15dac6d64e7a286..66c51becce8df4de6588999dc316cd4940604040 100644 +index 86d5be8b3778ced67e65d3f1e22b6aef467c7042..a2044ee0440339247cc91e06a7a0c323cbf332fc 100644 --- a/ui/gfx/ca_layer_params.h +++ b/ui/gfx/ca_layer_params.h @@ -6,6 +6,7 @@ @@ -663,7 +663,7 @@ index 1944ef571b1f12fbee8dff553ad4de913c794efb..529296cbf858d2aaeb7b5fbe1ae8f36e float scale_factor; }; diff --git a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc -index ed75bb399270934b63d46b2fa38dc01a62a307d1..e5e8c73dff130a5364edfd1a5816193fafae5369 100644 +index a4296b8e1084197830ca007bd91434607d766ec1..a93b7b04b538ccbba29a09aa2c3321d9a1835acd 100644 --- a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc +++ b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc @@ -52,6 +52,9 @@ bool StructTraits::Read( 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 66d44ce5b1e8d..0ccdec2705d85 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -37,7 +37,7 @@ index 6d42ae691a2c4a8cf51501bc4c690aca328001f5..71ac9d67eaa87346e7348e63d10157fb allow_cookies_from_browser == other.allow_cookies_from_browser && client_security_state == other.client_security_state; diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h -index dcd008fe586c7745f5ab47733c98366e89ac7478..f36e6e628dca6307fc7725d08f7e8306d132c17c 100644 +index a39040c92d48394af20c1249215f6e02a51c0b76..0f6626c0ec3837c5e6095402211880fc4dac977f 100644 --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h @@ -64,6 +64,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { @@ -49,7 +49,7 @@ index dcd008fe586c7745f5ab47733c98366e89ac7478..f36e6e628dca6307fc7725d08f7e8306 mojo::PendingRemote trust_token_observer; mojo::PendingRemote diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc -index c5602f0181aa5ef8b0ee401900170a6c8864bb94..9d836552081d340acd25e4caf40a1b4f3a73d402 100644 +index 9b65526dee306bfc6f661cc97ca2d4c2f8618606..811b39b995d4270c8a4e94f18174585da4107e7d 100644 --- a/services/network/public/cpp/url_request_mojom_traits.cc +++ b/services/network/public/cpp/url_request_mojom_traits.cc @@ -90,6 +90,7 @@ bool StructTraits>(); out->trust_token_observer = data.TakeTrustTokenObserver< diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h -index acee3b745163333f20e4f43b3e73cf2f7c589f02..e8dbb39633d32f6935b3f55fbae23d7a20ad7805 100644 +index e50408e66ccd30e0c9bef2f5f39515ae31face64..df08da0cce3ed564655d617b9ffce484a6518525 100644 --- a/services/network/public/cpp/url_request_mojom_traits.h +++ b/services/network/public/cpp/url_request_mojom_traits.h @@ -70,6 +70,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) @@ -76,7 +76,7 @@ index acee3b745163333f20e4f43b3e73cf2f7c589f02..e8dbb39633d32f6935b3f55fbae23d7a cookie_observer( const network::ResourceRequest::TrustedParams& trusted_params) { diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom -index 6da8e326da7af60dbbcf23782c60c731a5989dba..b8b442cee1ed5c2c5aac756c32b502f95b0d7f5d 100644 +index be8d6d82f56fb2841b5e2a084c8320531db16a66..3c10936738c5f487b5a40690fc34e2734b01d5f1 100644 --- a/services/network/public/mojom/url_request.mojom +++ b/services/network/public/mojom/url_request.mojom @@ -71,6 +71,9 @@ struct TrustedUrlRequestParams { @@ -90,18 +90,18 @@ index 6da8e326da7af60dbbcf23782c60c731a5989dba..b8b442cee1ed5c2c5aac756c32b502f9 // a cookie. If this is set to non-null, the observer passed to // URLLoaderFactory will be ignored. diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom -index 5cfd1bb970562e19e668105e6e0accae63bfbd32..6aa05958b3dcf848038b9634b79823a35cdc2a39 100644 +index 48d273dd5db3b9db89fc543b04d47d1da9ccfede..0b95993bc7e5b8bd675e295f8d4acd2abffeb769 100644 --- a/services/network/public/mojom/url_response_head.mojom +++ b/services/network/public/mojom/url_response_head.mojom -@@ -10,6 +10,7 @@ import "services/network/public/mojom/alternate_protocol_usage.mojom"; - import "services/network/public/mojom/encoded_body_length.mojom"; +@@ -11,6 +11,7 @@ import "services/network/public/mojom/encoded_body_length.mojom"; + import "services/network/public/mojom/attribution.mojom"; import "services/network/public/mojom/fetch_api.mojom"; import "services/network/public/mojom/ip_address_space.mojom"; +import "services/network/public/mojom/http_raw_headers.mojom"; import "services/network/public/mojom/ip_endpoint.mojom"; import "services/network/public/mojom/load_timing_info.mojom"; import "services/network/public/mojom/network_param.mojom"; -@@ -39,6 +40,9 @@ struct URLResponseHead { +@@ -40,6 +41,9 @@ struct URLResponseHead { // The response headers or NULL if the URL type does not support headers. HttpResponseHeaders headers; @@ -112,10 +112,10 @@ index 5cfd1bb970562e19e668105e6e0accae63bfbd32..6aa05958b3dcf848038b9634b79823a3 string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index dd848ae45573b18d6c6ccaafdc51e45d9dc87a81..7078ca900dff196d267ccd57b11020f805d7e283 100644 +index c920828b2553946d794eca9398d46c609465a5ab..bb373f49f6c9bbdbec9495c877c2c6d820b46d80 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -642,6 +642,7 @@ URLLoader::URLLoader( +@@ -641,6 +641,7 @@ URLLoader::URLLoader( has_user_activation_ = request.trusted_params->has_user_activation; allow_cookies_from_browser_ = request.trusted_params->allow_cookies_from_browser; @@ -123,7 +123,7 @@ index dd848ae45573b18d6c6ccaafdc51e45d9dc87a81..7078ca900dff196d267ccd57b11020f8 } throttling_token_ = network::ScopedThrottlingToken::MaybeCreate( -@@ -708,7 +709,7 @@ URLLoader::URLLoader( +@@ -707,7 +708,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -132,7 +132,7 @@ index dd848ae45573b18d6c6ccaafdc51e45d9dc87a81..7078ca900dff196d267ccd57b11020f8 url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1528,6 +1529,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1580,6 +1581,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); @@ -153,10 +153,10 @@ index dd848ae45573b18d6c6ccaafdc51e45d9dc87a81..7078ca900dff196d267ccd57b11020f8 // Parse and remove the Trust Tokens response headers, if any are expected, diff --git a/services/network/url_loader.h b/services/network/url_loader.h -index 75c9872f16851db1ed1cf25efd898fc258863331..e905a5b054bc5c263d69aa3fd6a0dc5ba8d32b24 100644 +index f3e3fa51262832cc05661ebb3b4e50dfcdb6e9e2..1f80dd7becefe1442426b90d5e70b5689c17d263 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -505,6 +505,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -553,6 +553,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader std::unique_ptr resource_scheduler_request_handle_; 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 72a11658b9106..868d7285ae675 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 0255e13e061293cd57de670b6a817b3e822dd8c5..e72c644e0adb9b447d60021d0e511479f0479c0d 100644 +index c9d65125cee23ed0545608d6acde964f786d1b70..25ce25ed55c903af727e12e7bfdd86984c4273e4 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -16,12 +16,16 @@ @@ -34,9 +34,9 @@ index 0255e13e061293cd57de670b6a817b3e822dd8c5..e72c644e0adb9b447d60021d0e511479 #include "chrome/browser/ui/tabs/tab_strip_model.h" +#endif #include "chrome/common/chrome_switches.h" + #include "content/public/browser/fullscreen_types.h" #include "content/public/browser/navigation_details.h" - #include "content/public/browser/navigation_entry.h" -@@ -179,10 +183,12 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -180,10 +184,12 @@ void FullscreenController::EnterFullscreenModeForTab( return; } @@ -49,7 +49,7 @@ index 0255e13e061293cd57de670b6a817b3e822dd8c5..e72c644e0adb9b447d60021d0e511479 // Keep the current state. |SetTabWithExclusiveAccess| may change the return // value of |IsWindowFullscreenForTabOrPending|. -@@ -232,11 +238,13 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -233,11 +239,13 @@ void FullscreenController::EnterFullscreenModeForTab( } void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { @@ -63,7 +63,7 @@ index 0255e13e061293cd57de670b6a817b3e822dd8c5..e72c644e0adb9b447d60021d0e511479 if (MaybeToggleFullscreenWithinTab(web_contents, false)) { // During tab capture of fullscreen-within-tab views, the browser window -@@ -294,12 +302,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { +@@ -295,12 +303,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { void FullscreenController::FullscreenTabOpeningPopup( content::WebContents* opener, content::WebContents* popup) { @@ -78,7 +78,7 @@ index 0255e13e061293cd57de670b6a817b3e822dd8c5..e72c644e0adb9b447d60021d0e511479 } void FullscreenController::OnTabDeactivated( -@@ -475,18 +485,17 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -476,18 +486,17 @@ void FullscreenController::EnterFullscreenModeInternal( // Do not enter fullscreen mode if disallowed by pref. This prevents the user // from manually entering fullscreen mode and also disables kiosk mode on // desktop platforms. @@ -102,7 +102,7 @@ index 0255e13e061293cd57de670b6a817b3e822dd8c5..e72c644e0adb9b447d60021d0e511479 if (option == TAB) { url = GetRequestingOrigin(); tab_fullscreen_ = true; -@@ -519,6 +528,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -520,6 +529,7 @@ void FullscreenController::EnterFullscreenModeInternal( if (!extension_caused_fullscreen_.is_empty()) url = extension_caused_fullscreen_; } @@ -110,7 +110,7 @@ index 0255e13e061293cd57de670b6a817b3e822dd8c5..e72c644e0adb9b447d60021d0e511479 if (option == BROWSER) base::RecordAction(base::UserMetricsAction("ToggleFullscreen")); -@@ -540,12 +550,12 @@ void FullscreenController::ExitFullscreenModeInternal() { +@@ -541,12 +551,12 @@ void FullscreenController::ExitFullscreenModeInternal() { RecordExitingUMA(); toggled_into_fullscreen_ = false; started_fullscreen_transition_ = true; @@ -127,10 +127,10 @@ index 0255e13e061293cd57de670b6a817b3e822dd8c5..e72c644e0adb9b447d60021d0e511479 extension_caused_fullscreen_ = GURL(); diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h -index 6502b3e023947e9f34cef246b233d984d2a02373..31d275e7d07848bc72c11553b0e0c891148fec56 100644 +index 5ae306dd4e2d94f47b68098d6bdc84c3faca5d5d..99b45994c56d8a179c6b26ac2021b1285b618685 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h -@@ -249,10 +249,12 @@ class FullscreenController : public ExclusiveAccessControllerBase { +@@ -245,10 +245,12 @@ class FullscreenController : public ExclusiveAccessControllerBase { // Used in testing to set the state to tab fullscreen. bool is_tab_fullscreen_for_testing_ = false; diff --git a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch index 13410e6b05b5d..c671f63395f8e 100644 --- a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch +++ b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch @@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 2e3b9ebd5be217eb892fea1cce09afee4d05f2e3..eff9b4689b68c7ff291b31b53d98b9ab7bf21e85 100644 +index 2b6e805b6ae26ab4030b108a624b7d405a9cad85..593ddb8e6f61e2d0127c81e0560c37a71ee6f81a 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3549,7 +3549,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -3552,7 +3552,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame, options)); DCHECK(requesting_frame->IsActive()); diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index 850407bd0eaf0..3830365a40652 100644 --- a/patches/chromium/fix_aspect_ratio_with_max_size.patch +++ b/patches/chromium/fix_aspect_ratio_with_max_size.patch @@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the BrowserWindow. diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 0a546b2649b37ad2a8de2783079d0fe93a24d7ac..214a596da0dfdff2566a7642ac04e501655c5d88 100644 +index a1a7081d64cfcc2c68986788e24bcad0d15f0533..accfa82763a122dedc6eba4d9350bcd54371ac81 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3656,6 +3656,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3780,6 +3780,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, delegate_->GetMinMaxSize(&min_window_size, &max_window_size); min_window_size = delegate_->DIPToScreenSize(min_window_size); max_window_size = delegate_->DIPToScreenSize(max_window_size); 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 789064554c5d5..98ba5c0f12d9b 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 @@ -17,10 +17,10 @@ policy->CanCommitOriginAndUrl. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index 61b47ad9abee29a8e6f999830ca37b0095b62222..7b60da8f1433cf1d43432d1b42db69600c7f1640 100644 +index bc6595619b37be227a7a8d5e8d2f0c6ef3f3781a..b5033ab8a5bcfa96047f114d854d2b69176f93d6 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -6975,10 +6975,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { +@@ -7130,10 +7130,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { if (IsForMhtmlSubframe()) return origin_with_debug_info; @@ -37,12 +37,12 @@ index 61b47ad9abee29a8e6f999830ca37b0095b62222..7b60da8f1433cf1d43432d1b42db6960 } diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h -index 21cb1e96f90341981c02ffac84eb3c0d6f9ae87b..c62197529e85d94c387c0389b9fc0e05438e2975 100644 +index 76475a38b650428f5079f1b100a3b25ae523cb9b..6304b89066d940a8cb451d0ce2cb2d074c73acfb 100644 --- a/content/browser/renderer_host/render_frame_host_impl.h +++ b/content/browser/renderer_host/render_frame_host_impl.h -@@ -2783,6 +2783,17 @@ class CONTENT_EXPORT RenderFrameHostImpl - // used on primary main frames. - bool IsPageReadyToBeClosed(); +@@ -2865,6 +2865,17 @@ class CONTENT_EXPORT RenderFrameHostImpl + // last committed document. + CookieChangeListener::CookieChangeInfo GetCookieChangeInfo(); + // Returns whether the given origin and URL is allowed to commit in the + // current RenderFrameHost. The |url| is used to ensure it matches the origin @@ -58,7 +58,7 @@ index 21cb1e96f90341981c02ffac84eb3c0d6f9ae87b..c62197529e85d94c387c0389b9fc0e05 protected: friend class RenderFrameHostFactory; -@@ -3101,17 +3112,6 @@ class CONTENT_EXPORT RenderFrameHostImpl +@@ -3188,17 +3199,6 @@ class CONTENT_EXPORT RenderFrameHostImpl // relevant. void ResetWaitingState(); diff --git a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch index 9ac5f2f3011b6..7cf35fd9e9d10 100644 --- a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch +++ b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch @@ -13,10 +13,10 @@ This patch can be removed should we choose to support chrome.fileSystem or support it enough to fix the crash. diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts -index 6d2e7f812c5ac05153fdaa3634470c7e2e22cc82..8d7fe24747984e1ac2a2b74c180f18df1427535f 100644 +index b68423ffe09246ec7ba2935873774c7c452b5952..936ab4b4e12546ca93da27f264559c97f51509ae 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.ts +++ b/chrome/browser/resources/pdf/pdf_viewer.ts -@@ -879,26 +879,12 @@ export class PdfViewerElement extends PdfViewerBaseElement { +@@ -895,26 +895,12 @@ export class PdfViewerElement extends PdfViewerBaseElement { dataArray = [result.dataToSave]; } @@ -48,7 +48,7 @@ index 6d2e7f812c5ac05153fdaa3634470c7e2e22cc82..8d7fe24747984e1ac2a2b74c180f18df } /** -@@ -1006,30 +992,12 @@ export class PdfViewerElement extends PdfViewerBaseElement { +@@ -1022,30 +1008,12 @@ export class PdfViewerElement extends PdfViewerBaseElement { fileName = fileName + '.pdf'; } diff --git a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch index 908754dc47a7a..418634d9f5541 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta to users. We should try to upstream this. diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index ef8ac6dca3a43cfa5a58f10b3860987bb01eec2b..0b01ed746df9fc91c6b106381f79eedaa04851b5 100644 +index 1cee21e45f577a4d3d07ade888c6c5f4d3086213..a91c4e9a3bbdda073be73324a0cdd21f37dad460 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1852,7 +1852,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1866,7 +1866,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // IncrementCapturerCount() is destructed. void DecrementCapturerCount(bool stay_hidden, bool stay_awake, @@ -21,10 +21,10 @@ index ef8ac6dca3a43cfa5a58f10b3860987bb01eec2b..0b01ed746df9fc91c6b106381f79eeda // Calculates the PageVisibilityState for |visibility|, taking the capturing // state into account. diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index b32c7c02d85794f684ccbe0a7a6c9cf1aee695e9..7d8dec5501c4da0829122b5afd6a7e53f3ba8e02 100644 +index ac139f0d0b01f92b03c188f4506c87c5e3f4b267..25467d7df67cc2ef15dbb35b3bcc996b79be0f3f 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -694,6 +694,10 @@ class WebContents : public PageNavigator, +@@ -703,6 +703,10 @@ class WebContents : public PageNavigator, bool stay_awake, bool is_activity = true) = 0; 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 6768e7560262d..5802e5d139dc4 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 @@ -15,10 +15,10 @@ node does not change in this case. chromium-bug: https://crbug.com/1369605 diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc -index 0d51ac779dde44da69cb1d4141e3df53d46dde74..d2df636848524bb2d78d153ce90a732621a7a281 100644 +index 7d471653b3dfadaa91cbe7dfdd5ff324d0fbe1bb..08251f85beef09719808db3fb042c9f6f45c218e 100644 --- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc +++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc -@@ -993,6 +993,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties( +@@ -994,6 +994,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties( return viz::ScopedSurfaceIdAllocator(std::move(allocation_task)); } @@ -32,7 +32,7 @@ index 0d51ac779dde44da69cb1d4141e3df53d46dde74..d2df636848524bb2d78d153ce90a7326 if (!text_input_manager_) return ui::TEXT_INPUT_TYPE_NONE; diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h -index 05c3c2d19985b8d32d95187fe3075aa4eab6de0a..424967bfaf957b3ab426517b3185b8fc3bd7b633 100644 +index 2ca4e42342ff6bf3f2ad104208944e36d572aa3c..7421cc779873b580d6f5a109d57ff7445dde9d58 100644 --- a/content/browser/renderer_host/render_widget_host_view_child_frame.h +++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h @@ -181,6 +181,8 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame @@ -45,10 +45,10 @@ index 05c3c2d19985b8d32d95187fe3075aa4eab6de0a..424967bfaf957b3ab426517b3185b8fc // RenderFrameMetadataProvider::Observer implementation. void OnRenderFrameMetadataChangedBeforeActivation( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index eff9b4689b68c7ff291b31b53d98b9ab7bf21e85..c7bbcc7973341acfeefc374959feb0151ff57a33 100644 +index 593ddb8e6f61e2d0127c81e0560c37a71ee6f81a..6cedef896b4ab2a1953c8770bf5e83b0ed073561 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -8027,7 +8027,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( +@@ -8042,7 +8042,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( "WebContentsImpl::OnFocusedElementChangedInFrame", "render_frame_host", frame); RenderWidgetHostViewBase* root_view = diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index 9459a082f339c..2df4098760ba1 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -25,7 +25,7 @@ index 53b106a1522a04d596d6ec833b00aa2170c760d9..3b5ca717d48cdade667fda8ce113f3f6 // Returns true if duplex mode is set. bool SetDuplexModeInPrintSettings(mojom::DuplexMode mode); diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm -index 844c3befb928c1e7509f3af4be22ef7b9a131af8..dce986be7a16b6ecbcddbd33cedae69fb935d09e 100644 +index 22df5f28493591e2ae0625119fef26502373650e..fff2ea0440eafae258730b9bbc62e6165a3d6ac1 100644 --- a/printing/printing_context_mac.mm +++ b/printing/printing_context_mac.mm @@ -200,7 +200,8 @@ PMPaper MatchPaper(CFArrayRef paper_list, diff --git a/patches/chromium/fix_remove_caption-removing_style_call.patch b/patches/chromium/fix_remove_caption-removing_style_call.patch index 4eeaf273f9b5a..ef5b624ecb0bf 100644 --- a/patches/chromium/fix_remove_caption-removing_style_call.patch +++ b/patches/chromium/fix_remove_caption-removing_style_call.patch @@ -18,10 +18,10 @@ or resizing, but Electron does not seem to run into that issue for opaque frameless windows even with that block commented out. diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index dff84d16386acfb3ccc72a22878476f1ac463ea1..693705ebaebbccc8929b53b6e453e48af7dfdf09 100644 +index bcb2b89ca50b8b5004915055d591adeebabe50d6..dd2157bb1f81d1894cfcbbb859801e58eabb0861 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1729,7 +1729,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) { +@@ -1850,7 +1850,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) { SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS), 0); 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 a173e85b076bb..921b45ded549d 100644 --- a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -64,10 +64,10 @@ index 4cd668a127a50e5462e3878c3f1dcb7384926768..dfbec49249404df8f8ebdbd26e6e865c #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 8ebcae8f67814537a5350f89d163e2a510532f7f..9a1499f1da38efa27793f435bb62df801c6633b0 100644 +index 33476958785586fe146f4d6637355855abb33b1f..660dbfb51a6a5d9c56ce0fee48cff470061d8a88 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -2594,6 +2594,7 @@ void LocalFrame::RequestExecuteScript( +@@ -2635,6 +2635,7 @@ void LocalFrame::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -75,7 +75,7 @@ index 8ebcae8f67814537a5350f89d163e2a510532f7f..9a1499f1da38efa27793f435bb62df80 BackForwardCacheAware back_forward_cache_aware, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_behavior) { -@@ -2624,7 +2625,8 @@ void LocalFrame::RequestExecuteScript( +@@ -2665,7 +2666,8 @@ void LocalFrame::RequestExecuteScript( PausableScriptExecutor::CreateAndRun( ToScriptState(DomWindow(), *world), std::move(script_sources), execute_script_policy, user_gesture, evaluation_timing, blocking_option, @@ -86,10 +86,10 @@ index 8ebcae8f67814537a5350f89d163e2a510532f7f..9a1499f1da38efa27793f435bb62df80 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 0cc7e3abb8b17a598ed593127ed93a6e7f260ad6..4a90544d7adcaad487699c94cbf02dee724efae7 100644 +index 69447c234bdd873ee14d77d0eb20ea668b112ec1..d17679fc51abc31c39973d333d086a64a1c8b01a 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h -@@ -765,6 +765,7 @@ class CORE_EXPORT LocalFrame final +@@ -776,6 +776,7 @@ class CORE_EXPORT LocalFrame final mojom::blink::EvaluationTiming, mojom::blink::LoadEventBlockingOption, WebScriptExecutionCallback, @@ -98,10 +98,10 @@ index 0cc7e3abb8b17a598ed593127ed93a6e7f260ad6..4a90544d7adcaad487699c94cbf02dee 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 b2af7a248941bdb2a8af3e9fb4f0f4ee903b4a81..707d6fb55d2240b0a7f2a7a6184873eb8155e808 100644 +index fe43461f6df7da3e884dcb3824a8d82724d69828..acd1ad8b13c99fb687022a86e8a88e514d5759cd 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 -@@ -1051,6 +1051,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( +@@ -951,6 +951,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( std::move(callback).Run(value ? std::move(*value) : base::Value()); }, std::move(callback)), @@ -205,10 +205,10 @@ index 1e4d9e098463d61dcab787afcc46fea63b27e012..3f1ebf493ddd7d1c209acee2fb1255a0 const mojom::blink::UserActivationOption user_activation_option_; const mojom::blink::LoadEventBlockingOption blocking_option_; 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 ae6df696a514728e175982f202036d6a6029cd9f..33265ffd7b8a029b84eb1304de0331b292b07707 100644 +index c58c6cc3d65d45fba56f9c004ac4ce6c61405d65..54768888d88afa4da09823220d7926388f7dd7c5 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 -@@ -1114,14 +1114,15 @@ void WebLocalFrameImpl::RequestExecuteScript( +@@ -1102,14 +1102,15 @@ void WebLocalFrameImpl::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, diff --git a/patches/chromium/fix_tray_icon_gone_on_lock_screen.patch b/patches/chromium/fix_tray_icon_gone_on_lock_screen.patch index 829599e243310..a92df698b8fa9 100644 --- a/patches/chromium/fix_tray_icon_gone_on_lock_screen.patch +++ b/patches/chromium/fix_tray_icon_gone_on_lock_screen.patch @@ -6,10 +6,10 @@ Subject: Re-register status item when owner of status watcher is changed https://chromium-review.googlesource.com/c/chromium/src/+/4022621 diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc -index cba134dd8c10e9f05d4d2547fd39cc51f83ba054..797953fd2ddef1f827e504c5116a666e0d5e90fb 100644 +index 3e22390f3b8b83f65e8404881a684d2d77697018..ce2e13052d375d3b03fdd7dffaa84cbd2a5dc155 100644 --- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc +++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc -@@ -361,6 +361,13 @@ void StatusIconLinuxDbus::OnInitialized(bool success) { +@@ -360,6 +360,13 @@ void StatusIconLinuxDbus::OnInitialized(bool success) { return; } @@ -23,7 +23,7 @@ index cba134dd8c10e9f05d4d2547fd39cc51f83ba054..797953fd2ddef1f827e504c5116a666e dbus::MethodCall method_call(kInterfaceStatusNotifierWatcher, kMethodRegisterStatusNotifierItem); dbus::MessageWriter writer(&method_call); -@@ -376,6 +383,14 @@ void StatusIconLinuxDbus::OnRegistered(dbus::Response* response) { +@@ -375,6 +382,14 @@ void StatusIconLinuxDbus::OnRegistered(dbus::Response* response) { delegate_->OnImplInitializationFailed(); } diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 6b3db03d73c3b..475c1ac8383a6 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 c13bafd949765fe838322a1550efb0e4a2a1ab99..764fea690df47b026b0bffa8f85a3e4de30e6384 100644 +index 46c2ce0f9e171d7559b146a9e509b43bc39a900c..6fab136bf6c35a919eb831ec0e375216180e661d 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3536,6 +3536,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3633,6 +3633,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,7 +20,7 @@ index c13bafd949765fe838322a1550efb0e4a2a1ab99..764fea690df47b026b0bffa8f85a3e4d } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index b1e3179eae105e29a360cc5a92c475e7c545704d..a0a5173ad8feb09ded34ba462e9295649ca80667 100644 +index 6d1653ecd29e6a2acacc59bfe1e5907bc864b108..938802e641cfbe4710780df0e1f61d9d42adf05a 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -275,6 +275,11 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index ab69fb52f8090..1e5f2ba836426 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -38,7 +38,7 @@ index 10caab6d9ef3345332c163a55dcef991248ab4ea..c9bc6e5dd7e1cf8d198afcd21cbb2497 // 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 c10536b30120fc905988653e7117059ef7479838..3fd76d7051ccc5f7e6f45c5be17fca4b22463b24 100644 +index e2a73449586ec8f5f76ff3ca6152dca817c0b41c..a7fa30946131687b046c701d1fe49293f1e837f7 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc @@ -382,7 +382,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index be24af285a257..5c0b9965fcc22 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -40,7 +40,7 @@ index 1b03f182346d544a2551ab3a8fcad288d819ea26..67884548adff4a8dbda52e68f863445b void UpdateDawnInfo(const std::vector& dawn_info_list); diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc -index 280c20ab79a09d3b5dd70c4668a58c6fbb5799af..745297088e1255e16da251e92ee7881f42f1bb00 100644 +index 192341a5fad51a0b73d80f2ae5becf36d5a0ea91..54a316b80dc86a3bd4fa80b35fb249f32a45cfe0 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc @@ -1198,6 +1198,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 151355b225165..91297a249a65a 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 15e77b25cc0b10e59d154d2389d4b8dbaca6391a..5217174af25d95562b959974e3a9b491ea70b228 100644 +index 82fd9d2d4e1d4ba42ec525777af964de17b1fea4..4db5024665af20727bc316989d7e60e5fe14bd27 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -1107,6 +1107,11 @@ +@@ -1130,6 +1130,11 @@ "includes": [4960], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index edfcfd57dddc7..8966e68820368 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -18,7 +18,7 @@ index 355067ea178bee1466f9df5a3ed146e9f09f0768..1b385d12692deece9e10722fc70215e8 # on GTK. "//examples:peerconnection_client", diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn -index 7689ed291431cee284bd56292d4306fe34919ae6..c60506e7b9cc6c8961449b3bb49c5f36ba86b7f2 100644 +index 390f07735e946e1f6c2711cbe36549af69320ac3..af74a924e2fb1e401a796793cb7cbabfcf411620 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_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch index 12bad3d896b0c..5c0fc9cb2d905 100644 --- a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch +++ b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch @@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1: Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903 diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py -index 7cad05926ce951a5fdc879251b959b9f50d0b5af..4a91d8e45847171e4d59c5378fc795d48f93eeb3 100755 +index 63d6eb3415a19afe047a490de7629a34b31a2816..5b2289d07b9f23302a346aae180a8e18d39b9510 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -302,6 +302,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch index 58416f3d54b72..5f3df2d79080f 100644 --- a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch +++ b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch @@ -9,7 +9,7 @@ at rutime. It would be best if eventually all usages of this property were replaced with clean ozone native implementations. diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc -index 28a5f5e977fd0c31f70f34e5f3c2d329f1abc5ca..8eddf4f4bb5ee8e366de299582f13fe9ae2e1303 100644 +index 807a8f82fd0d6bfd402a5f84b5a9849a0f56f7e9..b351d8d47322d56bb219ad05d19d42c441c4ae0a 100644 --- a/ui/ozone/platform/x11/ozone_platform_x11.cc +++ b/ui/ozone/platform/x11/ozone_platform_x11.cc @@ -192,6 +192,7 @@ class OzonePlatformX11 : public OzonePlatform, @@ -21,10 +21,10 @@ index 28a5f5e977fd0c31f70f34e5f3c2d329f1abc5ca..8eddf4f4bb5ee8e366de299582f13fe9 properties->supports_global_application_menus = true; properties->app_modal_dialogs_use_event_blocker = true; diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h -index ecfc3487a1bd4ed3a15b09403e218460b25c1e51..acae9305f973b3c3781f6f3326d18230c23d52aa 100644 +index f61ffe943680896432cad35d849e6a0ae5042d42..83e842039e821381edb8b4c96a6aabe34c009ea8 100644 --- a/ui/ozone/public/ozone_platform.h +++ b/ui/ozone/public/ozone_platform.h -@@ -125,6 +125,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { +@@ -121,6 +121,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { // Linux only: determines if Skia can fall back to the X11 output device. bool skia_can_fall_back_to_x11 = false; diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index 6c847d077b026..c91b6eace150d 100644 --- a/patches/chromium/load_v8_snapshot_in_browser_process.patch +++ b/patches/chromium/load_v8_snapshot_in_browser_process.patch @@ -9,10 +9,10 @@ but due to the nature of electron, we need to load the v8 snapshot in the browser process. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 5029cbe44e4bdbf85b666d961ffac9d8314e1429..c2ef1da09511b9314298b4e55a23bd521ba17969 100644 +index 62a56a5d832782789182ac1f05f1758deaae51ff..b5e25381af8f19a16b76672936821b7d3becdba8 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -272,11 +272,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -277,11 +277,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, const std::string& process_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 8630d5174410d..ea17202cec89a 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,17 +9,15 @@ 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 00c293219a70cc046c1d2ebc703c8d6541a0a958..ee0c736944a67f8bfaf45ef270ddf536100e87d2 100644 +index a0d32d8019a6fc1dbf8717898a22f5d12b0a4be9..ec2965870def732c2e2fce528bbe7593fce416fb 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc -@@ -302,10 +302,12 @@ RunContentProcess(ContentMainParams params, +@@ -304,8 +304,12 @@ RunContentProcess(ContentMainParams params, #if BUILDFLAG(IS_WIN) // Route stdio to parent console (if any) or create one. - if (base::CommandLine::ForCurrentProcess()->HasSwitch( -- switches::kEnableLogging) || -- base::CommandLine::ForCurrentProcess()->HasSwitch( -- switches::kHeadless)) { +- switches::kEnableLogging)) { + auto const* cmd_line = base::CommandLine::ForCurrentProcess(); + bool const log_to_stderr = + cmd_line->HasSwitch(switches::kEnableLogging) && diff --git a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch index f7877ae9608f9..3a3223f12a993 100644 --- a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch +++ b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch @@ -39,7 +39,7 @@ index 91a65a1e700cf1accb8e4541e0ceca4e0a734b16..323b9b48214aa013ad8f7da2f63cca2e } // namespace base diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm -index 74d1351a7a3c46e5158f903a165fe3068b9732be..fb6529038b41ffddb1a05b139c86f593e14fb701 100644 +index d6f794edb5767e4c2986c93251f41af778f4c767..40739896b38b326d69643b5fa92c06abfc3303b0 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm @@ -28,12 +28,6 @@ @@ -65,7 +65,7 @@ index 74d1351a7a3c46e5158f903a165fe3068b9732be..fb6529038b41ffddb1a05b139c86f593 return ns_val; } -@@ -387,9 +380,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { +@@ -389,9 +382,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { return (CTFontRef)(cf_val); } @@ -76,10 +76,10 @@ index 74d1351a7a3c46e5158f903a165fe3068b9732be..fb6529038b41ffddb1a05b139c86f593 if ([ns_val isKindOfClass:[NSFont class]]) { return (CTFontRef)(cf_val); diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc -index f860be6fbb6caf166f4808772a490ebba9cd7f08..d1b588346e106b032045b1a33ccc469c479b8f03 100644 +index a6e71128fb047fcaf476f4846baeb48e1330c3e9..638e244b66e57d18d32e6a66cce2282a42569806 100644 --- a/base/process/launch_mac.cc +++ b/base/process/launch_mac.cc -@@ -19,14 +19,19 @@ +@@ -20,14 +20,19 @@ #include "base/threading/scoped_blocking_call.h" #include "base/threading/thread_restrictions.h" #include "base/trace_event/base_tracing.h" @@ -99,7 +99,7 @@ index f860be6fbb6caf166f4808772a490ebba9cd7f08..d1b588346e106b032045b1a33ccc469c int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim) API_AVAILABLE(macosx(10.14)); -@@ -95,13 +100,27 @@ class PosixSpawnFileActions { +@@ -96,13 +101,27 @@ class PosixSpawnFileActions { }; int ChangeCurrentThreadDirectory(const char* path) { @@ -127,7 +127,7 @@ index f860be6fbb6caf166f4808772a490ebba9cd7f08..d1b588346e106b032045b1a33ccc469c } struct GetAppOutputOptions { -@@ -221,11 +240,13 @@ Process LaunchProcess(const std::vector& argv, +@@ -222,11 +241,13 @@ Process LaunchProcess(const std::vector& argv, file_actions.Inherit(STDERR_FILENO); } @@ -142,7 +142,7 @@ index f860be6fbb6caf166f4808772a490ebba9cd7f08..d1b588346e106b032045b1a33ccc469c std::vector argv_cstr; argv_cstr.reserve(argv.size() + 1); diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc -index 72b78e9a7b80a37247c4c8e5468e17a5464e9d12..71fb7cfe4a0a8cd329940af5b0b371731ee2567a 100644 +index 27ddd89cdbbbb55d7784e6f3937bcf0c7034d2ba..2367e275a86a64b9e3a3cb23b3f19b828407a512 100644 --- a/media/audio/mac/audio_low_latency_input_mac.cc +++ b/media/audio/mac/audio_low_latency_input_mac.cc @@ -31,19 +31,23 @@ diff --git a/patches/chromium/mas_disable_custom_window_frame.patch b/patches/chromium/mas_disable_custom_window_frame.patch index 5db40e53488ae..a7d12a4372e23 100644 --- a/patches/chromium/mas_disable_custom_window_frame.patch +++ b/patches/chromium/mas_disable_custom_window_frame.patch @@ -95,10 +95,10 @@ index e7bf48ba670dbe8fa2a8688cf89e74a7d15cc6a3..f385de06d8b33aafa0eac1858d9fd233 // 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 0cf281aff32bd37b3539056ea202aa74ef432000..9b070697f5243ae25f50aa9f681cec57128da5cf 100644 +index ea4db769a697f6cda4a395eabdb5a634a8a84845..7ec95e49dab09f7c7eb6e1af58c01a14705b767b 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -@@ -97,7 +97,9 @@ void OrderChildWindow(NSWindow* child_window, +@@ -96,7 +96,9 @@ void OrderChildWindow(NSWindow* child_window, } // namespace @interface NSWindow (Private) @@ -117,7 +117,7 @@ index 0cf281aff32bd37b3539056ea202aa74ef432000..9b070697f5243ae25f50aa9f681cec57 @implementation NativeWidgetMacNSWindowTitledFrame - (void)mouseDown:(NSEvent*)event { if (self.window.isMovable) -@@ -170,6 +174,8 @@ - (BOOL)usesCustomDrawing { +@@ -155,6 +159,8 @@ - (BOOL)usesCustomDrawing { } @end @@ -126,7 +126,7 @@ index 0cf281aff32bd37b3539056ea202aa74ef432000..9b070697f5243ae25f50aa9f681cec57 @implementation NativeWidgetMacNSWindow { @private base::scoped_nsobject _commandDispatcher; -@@ -328,6 +334,8 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -327,6 +333,8 @@ - (NSAccessibilityRole)accessibilityRole { // NSWindow overrides. @@ -135,7 +135,7 @@ index 0cf281aff32bd37b3539056ea202aa74ef432000..9b070697f5243ae25f50aa9f681cec57 + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { if (windowStyle & NSWindowStyleMaskTitled) { if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class]) -@@ -339,6 +347,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { +@@ -338,6 +346,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { return [super frameViewClassForStyleMask:windowStyle]; } diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 67f3c6d085687..d62e64c37ae57 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -11,7 +11,7 @@ needs to think it's coming from the PWA process). I think it can just be chopped out -- if there are any side-effects, we should be able to work around them. diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components/remote_cocoa/app_shim/application_bridge.mm -index 447bc6bfb54484b30686db7fd9df0454f48316c8..a1b3140858ae9a456f1c07fbe60cf9ca55e78bb0 100644 +index 3600a7ce7b3e6540767f64c631f352aa62240459..3147961f3d1c2c1690b5adf16a9a58f71456c5d0 100644 --- a/components/remote_cocoa/app_shim/application_bridge.mm +++ b/components/remote_cocoa/app_shim/application_bridge.mm @@ -51,6 +51,7 @@ @@ -20,7 +20,7 @@ index 447bc6bfb54484b30686db7fd9df0454f48316c8..a1b3140858ae9a456f1c07fbe60cf9ca id GetNativeViewAccessible() override { +#if !IS_MAS_BUILD() if (!remote_accessibility_element_) { - base::ProcessId browser_pid = base::kNullProcessId; + int64_t browser_pid = 0; std::vector element_token; @@ -61,6 +62,9 @@ id GetNativeViewAccessible() override { ui::RemoteAccessibility::GetRemoteElementFromToken(element_token); @@ -44,10 +44,10 @@ index 447bc6bfb54484b30686db7fd9df0454f48316c8..a1b3140858ae9a456f1c07fbe60cf9ca } // namespace diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -index bb0bb33745c9fa7c2c9b7ba0b03e832ad51f0829..de419f3226b586b122cb9b90d105d85a957c02d7 100644 +index 104e2d7478e5390daa55c49333d786e80c4bb7a0..4342dee31743091c464690b99b9ed7dccbe67d2d 100644 --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -@@ -567,10 +567,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -600,10 +600,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -61,28 +61,10 @@ index bb0bb33745c9fa7c2c9b7ba0b03e832ad51f0829..de419f3226b586b122cb9b90d105d85a // Beware: This view was briefly removed (in favor of a bare CALayer) in // crrev/c/1236675. The ordering of unassociated layers relative to NSView diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm -index 5fbbb7a1d56640a2bf540ecb148f358ef88c4ad2..7eb3433b6561bba527d9c69b4819e7c26388eb2d 100644 +index f553d52bcc00acc9f1e2d87ee618efb7b24b389d..672aa22e5d1eeecfca3c780822024037e04ae4e2 100644 --- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm +++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm -@@ -77,6 +77,7 @@ explicit RenderWidgetHostNSViewBridgeOwner( - - // RenderWidgetHostNSViewHostHelper implementation. - id GetAccessibilityElement() override { -+#if !IS_MAS_BUILD() - if (!remote_accessibility_element_) { - base::ProcessId browser_pid = base::kNullProcessId; - std::vector element_token; -@@ -87,6 +88,9 @@ id GetAccessibilityElement() override { - ui::RemoteAccessibility::GetRemoteElementFromToken(element_token); - } - return remote_accessibility_element_.get(); -+#else -+ return nil; -+#endif - } - - id GetRootBrowserAccessibilityElement() override { -@@ -100,8 +104,10 @@ id GetFocusedBrowserAccessibilityElement() override { +@@ -87,8 +87,10 @@ id GetFocusedBrowserAccessibilityElement() override { return nil; } void SetAccessibilityWindow(NSWindow* window) override { @@ -93,7 +75,7 @@ index 5fbbb7a1d56640a2bf540ecb148f358ef88c4ad2..7eb3433b6561bba527d9c69b4819e7c2 } void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event, -@@ -163,8 +169,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { +@@ -150,8 +152,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { mojo::AssociatedRemote host_; std::unique_ptr bridge_; @@ -105,7 +87,7 @@ index 5fbbb7a1d56640a2bf540ecb148f358ef88c4ad2..7eb3433b6561bba527d9c69b4819e7c2 } diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index 22e8250d7f87d1c34854aa07f96b229caa807e17..5575c479ac6aaa92b6a637781c1cdb472b54f95c 100644 +index 3a81bbe5542f39c82f6ccf6643f491cb73ecb2aa..6b156ac4c514855f73fedc85fb9b0080e8e61463 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm @@ -22,7 +22,9 @@ @@ -118,7 +100,23 @@ index 22e8250d7f87d1c34854aa07f96b229caa807e17..5575c479ac6aaa92b6a637781c1cdb47 namespace { -@@ -617,6 +619,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -225,6 +227,7 @@ void PostAnnouncementNotification(NSString* announcement, + return; + } + ++#if !IS_MAS_BUILD() + BrowserAccessibilityManager* root_manager = GetManagerForRootFrame(); + if (root_manager) { + BrowserAccessibilityManagerMac* root_manager_mac = +@@ -247,6 +250,7 @@ void PostAnnouncementNotification(NSString* announcement, + return; + } + } ++#endif + + if (base::mac::IsOS10_13()) { + // Use the announcement API to get around OS <= 10.13 VoiceOver bug +@@ -643,6 +647,7 @@ void PostAnnouncementNotification(NSString* announcement, if ([NSApp isActive]) return window == [NSApp accessibilityFocusedWindow]; @@ -126,7 +124,7 @@ index 22e8250d7f87d1c34854aa07f96b229caa807e17..5575c479ac6aaa92b6a637781c1cdb47 // TODO(accessibility): We need a solution to the problem described below. // If the window is NSAccessibilityRemoteUIElement, there are some challenges: // 1. NSApp is the browser which spawned the PWA, and what it considers the -@@ -644,6 +647,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -670,6 +675,7 @@ void PostAnnouncementNotification(NSString* announcement, // from within the app shim content. if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]]) return true; @@ -135,10 +133,10 @@ index 22e8250d7f87d1c34854aa07f96b229caa807e17..5575c479ac6aaa92b6a637781c1cdb47 return false; } 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 a58b06e3fa5e9008e6013565c2a58fad906c8b79..8e679d886ca90636f63b1752296fc76405f562e5 100644 +index 086cfdb99c0fa960c4adb6deffbc9e14c0db36c5..ce6acfc56cf1b37800a77da9db27e8504d70f502 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h -@@ -52,7 +52,9 @@ class ScopedPasswordInputEnabler; +@@ -51,7 +51,9 @@ class ScopedPasswordInputEnabler; @protocol RenderWidgetHostViewMacDelegate; @@ -148,7 +146,7 @@ index a58b06e3fa5e9008e6013565c2a58fad906c8b79..8e679d886ca90636f63b1752296fc764 @class RenderWidgetHostViewCocoa; namespace content { -@@ -670,10 +672,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac +@@ -663,10 +665,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac // EnsureSurfaceSynchronizedForWebTest(). uint32_t latest_capture_sequence_number_ = 0u; @@ -162,10 +160,10 @@ index a58b06e3fa5e9008e6013565c2a58fad906c8b79..8e679d886ca90636f63b1752296fc764 // 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 ab7e3a7428a2ea2ac9eb3f0e97cd4bce9c72f0ba..a557cc2b06e68e54817f154f2d1e6a7635958d0e 100644 +index af459aea78e6970f63242fcc536577ef44ba2a35..15eb4a905bbbd65f11a45b1dee756a3ffe7f2e1c 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -262,8 +262,10 @@ +@@ -254,8 +254,10 @@ void RenderWidgetHostViewMac::MigrateNSViewBridge( remote_cocoa::mojom::Application* remote_cocoa_application, uint64_t parent_ns_view_id) { @@ -176,7 +174,7 @@ index ab7e3a7428a2ea2ac9eb3f0e97cd4bce9c72f0ba..a557cc2b06e68e54817f154f2d1e6a76 // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling // pointers. `ns_view_` gets reinitialized later in this method. -@@ -1580,8 +1582,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1568,8 +1570,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -187,7 +185,7 @@ index ab7e3a7428a2ea2ac9eb3f0e97cd4bce9c72f0ba..a557cc2b06e68e54817f154f2d1e6a76 return [GetInProcessNSView() window]; } -@@ -1629,9 +1633,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1613,9 +1617,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -199,19 +197,7 @@ index ab7e3a7428a2ea2ac9eb3f0e97cd4bce9c72f0ba..a557cc2b06e68e54817f154f2d1e6a76 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2127,20 +2133,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, - void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken( - GetRenderWidgetAccessibilityTokenCallback callback) { - base::ProcessId pid = getpid(); -+#if !IS_MAS_BUILD() - id element_id = GetNativeViewAccessible(); - std::vector token = - ui::RemoteAccessibility::GetTokenForLocalElement(element_id); -+#else -+ std::vector token; -+#endif - std::move(callback).Run(pid, token); - } +@@ -2110,12 +2116,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -227,10 +213,10 @@ index ab7e3a7428a2ea2ac9eb3f0e97cd4bce9c72f0ba..a557cc2b06e68e54817f154f2d1e6a76 /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index acd06385277ac91670e5aa3ad386ccb6740a5a52..8ed2cd062b2e9531742835c61f015975c7d59d40 100644 +index e61c3176e638f9fcebd3176bd99f5b8696666e9d..f563f390a0bafc963aea88bdb29ad85cac60d14d 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -354,6 +354,13 @@ component("base") { +@@ -360,6 +360,13 @@ component("base") { sources += [ "resource/resource_bundle_lacros.cc" ] } @@ -245,7 +231,7 @@ index acd06385277ac91670e5aa3ad386ccb6740a5a52..8ed2cd062b2e9531742835c61f015975 sources += [ "device_form_factor_ios.mm", diff --git a/ui/base/cocoa/remote_accessibility_api.h b/ui/base/cocoa/remote_accessibility_api.h -index 4d47115d3f72da17b2ada8866770ac24717c29da..506d7847d904478793d992dbe548a61177644d09 100644 +index aa09619a3137d1878c9f5c111a348703965dd16f..6553de29e861c15028564ffe4a4b9b01f2b42c5b 100644 --- a/ui/base/cocoa/remote_accessibility_api.h +++ b/ui/base/cocoa/remote_accessibility_api.h @@ -11,6 +11,8 @@ @@ -255,9 +241,9 @@ index 4d47115d3f72da17b2ada8866770ac24717c29da..506d7847d904478793d992dbe548a611 +#if !IS_MAS_BUILD() + @interface NSAccessibilityRemoteUIElement : NSObject - + (void)setRemoteUIApp:(BOOL)flag; + (void)registerRemoteUIProcessIdentifier:(int)pid; -@@ -33,4 +35,6 @@ class COMPONENT_EXPORT(UI_BASE) RemoteAccessibility { + + (NSData*)remoteTokenForLocalUIElement:(id)element; +@@ -32,4 +34,6 @@ class COMPONENT_EXPORT(UI_BASE) RemoteAccessibility { } // namespace ui @@ -265,7 +251,7 @@ index 4d47115d3f72da17b2ada8866770ac24717c29da..506d7847d904478793d992dbe548a611 + #endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_ diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h -index 1c30148ec8f091e6e35a9f849cc1935cd10f2691..3ca2b624c03ca09b75b966d63f3559d0966e5d51 100644 +index 1f7fef969cf78606110e4a848c00ed6546a626f2..01b031219c9d96eb9b1850ccfd5b86bc5abadbf7 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h @@ -32,7 +32,9 @@ @@ -278,7 +264,7 @@ index 1c30148ec8f091e6e35a9f849cc1935cd10f2691..3ca2b624c03ca09b75b966d63f3559d0 @class NSView; namespace remote_cocoa { -@@ -464,11 +466,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost +@@ -463,11 +465,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost mojo::AssociatedRemote remote_ns_window_remote_; @@ -293,10 +279,10 @@ index 1c30148ec8f091e6e35a9f849cc1935cd10f2691..3ca2b624c03ca09b75b966d63f3559d0 // Used to force the NSApplication's focused accessibility element to be the // views::Views accessibility tree when the NSView for this is focused. diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -index 0cb9bea6f8d29ccacac658ccb419e3549cdc6af5..14fcb3e2daf451a7db8111aad550300235bcd168 100644 +index 06af43645067a32088c4874724175379c8d366c8..76c803688baf2093417143ee0a621cbdf88566a1 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -337,14 +337,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -345,14 +345,22 @@ void BubbleAnchorViewContainedInWidget( NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const { if (in_process_ns_window_bridge_) return in_process_ns_window_bridge_->ns_view(); @@ -319,7 +305,7 @@ index 0cb9bea6f8d29ccacac658ccb419e3549cdc6af5..14fcb3e2daf451a7db8111aad5503002 } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1350,6 +1358,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1339,6 +1347,7 @@ void BubbleAnchorViewContainedInWidget( void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -327,15 +313,15 @@ index 0cb9bea6f8d29ccacac658ccb419e3549cdc6af5..14fcb3e2daf451a7db8111aad5503002 remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1358,14 +1367,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1346,14 +1355,17 @@ void BubbleAnchorViewContainedInWidget( + [remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()]; [remote_view_accessible_ setTopLevelUIElement:remote_window_accessible_.get()]; - [NSAccessibilityRemoteUIElement setRemoteUIApp:YES]; +#endif } bool NativeWidgetMacNSWindowHost::GetRootViewAccessibilityToken( - base::ProcessId* pid, + int64_t* pid, std::vector* token) { +#if !IS_MAS_BUILD() *pid = getpid(); diff --git a/patches/chromium/mas_disable_remote_layer.patch b/patches/chromium/mas_disable_remote_layer.patch index 9007af24b7248..c106bf1b83d19 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -16,11 +16,11 @@ cases where performance improves when disabling remote CoreAnimation (remote CoreAnimation is really only about battery usage). diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h -index 29b75456a779ff9c36bb0cc2cdc4a1b2a1aa5966..4157e90fdbc265ab34405e4e9c1efbff06c26d70 100644 +index 1ded7d05bea3fc3edc5b371ff2ff5fb045c558fa..793e468b9f65f62bd5ca6935984b86a5c1c557b9 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.h +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h -@@ -18,7 +18,9 @@ - #include "ui/gl/gpu_switching_observer.h" +@@ -17,7 +17,9 @@ + #include "ui/gl/gl_surface.h" #include "ui/gl/presenter.h" +#if !IS_MAS_BUILD() @@ -29,45 +29,50 @@ index 29b75456a779ff9c36bb0cc2cdc4a1b2a1aa5966..4157e90fdbc265ab34405e4e9c1efbff @class CALayer; namespace ui { -@@ -89,7 +91,9 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::Presenter, +@@ -75,10 +77,10 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::Presenter { + base::WeakPtr delegate_; +-#if BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_MAC) && !IS_MAS_BUILD() bool use_remote_layer_api_; -+#if !IS_MAS_BUILD() +-#endif base::scoped_nsobject ca_context_; +#endif std::unique_ptr ca_layer_tree_coordinator_; gfx::Size pixel_size_; diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -index e2b4368c08ba9e30cb46218988c6212a46c98217..02db1e7041f18bae8c90539fee0e768b353fa523 100644 +index ab3759f0c25736c11726dd7b16f4786562ce8248..040f636d6b3d9f2dad372bad3f2febb6fc8436f6 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -@@ -74,12 +74,14 @@ - - // Create the CAContext to send this to the GPU process, and the layer for - // the context. -+#if !IS_MAS_BUILD() - if (use_remote_layer_api_) { - CGSConnectionID connection_id = CGSMainConnectionID(); - ca_context_.reset([[CAContext contextWithCGSConnection:connection_id - options:@{}] retain]); - [ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()]; - } -+#endif - } - - ImageTransportSurfaceOverlayMacEGL::~ImageTransportSurfaceOverlayMacEGL() { -@@ -174,7 +176,9 @@ +@@ -55,7 +55,7 @@ + ImageTransportSurfaceOverlayMacEGL::ImageTransportSurfaceOverlayMacEGL( + base::WeakPtr delegate) + : delegate_(delegate), +-#if BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_MAC) && !IS_MAS_BUILD() + use_remote_layer_api_(ui::RemoteLayerAPISupported()), + #endif + scale_factor_(1), +@@ -71,7 +71,7 @@ + ->workarounds() + .disable_av_sample_buffer_display_layer; + +-#if BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_MAC) && !IS_MAS_BUILD() + ca_layer_tree_coordinator_ = std::make_unique( + use_remote_layer_api_, allow_av_sample_buffer_display_layer); + +@@ -168,7 +168,7 @@ + TRACE_EVENT_INSTANT2("test_gpu", "SwapBuffers", TRACE_EVENT_SCOPE_THREAD, "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); +-#if BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_MAC) && !IS_MAS_BUILD() if (use_remote_layer_api_) { -+#if !IS_MAS_BUILD() params.ca_context_id = [ca_context_ contextId]; -+#endif } else { - IOSurfaceRef io_surface = - ca_layer_tree_coordinator_->GetIOSurfaceForDisplay(); diff --git a/ui/accelerated_widget_mac/display_ca_layer_tree.mm b/ui/accelerated_widget_mac/display_ca_layer_tree.mm index 2c4821b34f71d30ce814bd1f3cf9a7a76bbaac66..c7dc371c780a405f502a84c77e92251ae08f66e0 100644 --- a/ui/accelerated_widget_mac/display_ca_layer_tree.mm diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 1ee20e07663fc..75c446a3a4db9 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -104,10 +104,10 @@ index f50448237c40710e25644c2f7d44e8d0bc0789c8..752b575cf341546bdcc46e6dfff28fe4 } diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm -index 0c4121f178392864053f5511bf880d8e20845fdd..f472ecfc2ba6d3ce51fa14f989bfad77d21347fb 100644 +index 2c5387fbdcac4b33df770fcd37b050121d0b9b38..a4c2867b4bb6c2c2dcd6565873ccccd940712449 100644 --- a/device/bluetooth/bluetooth_adapter_mac.mm +++ b/device/bluetooth/bluetooth_adapter_mac.mm -@@ -42,6 +42,7 @@ +@@ -37,6 +37,7 @@ #include "device/bluetooth/bluetooth_socket_mac.h" #include "device/bluetooth/public/cpp/bluetooth_address.h" @@ -115,7 +115,7 @@ index 0c4121f178392864053f5511bf880d8e20845fdd..f472ecfc2ba6d3ce51fa14f989bfad77 extern "C" { // Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and // `Karabiner` [3] to programmatically control the Bluetooth state. Calling the -@@ -55,6 +56,7 @@ +@@ -50,6 +51,7 @@ // [4] https://support.apple.com/kb/PH25091 void IOBluetoothPreferenceSetControllerPowerState(int state); } @@ -123,7 +123,7 @@ index 0c4121f178392864053f5511bf880d8e20845fdd..f472ecfc2ba6d3ce51fa14f989bfad77 namespace { -@@ -114,8 +116,10 @@ bool IsDeviceSystemPaired(const std::string& device_address) { +@@ -93,8 +95,10 @@ bool IsDeviceSystemPaired(const std::string& device_address) { : controller_state_function_( base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState, base::Unretained(this))), @@ -133,8 +133,8 @@ index 0c4121f178392864053f5511bf880d8e20845fdd..f472ecfc2ba6d3ce51fa14f989bfad77 +#endif classic_discovery_manager_( BluetoothDiscoveryManagerMac::CreateClassic(this)), - low_energy_discovery_manager_( -@@ -356,8 +360,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) { + device_paired_status_callback_( +@@ -249,8 +253,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) { } bool BluetoothAdapterMac::SetPoweredImpl(bool powered) { @@ -146,29 +146,12 @@ index 0c4121f178392864053f5511bf880d8e20845fdd..f472ecfc2ba6d3ce51fa14f989bfad77 +#endif } - void BluetoothAdapterMac::RemovePairingDelegateInternal( -diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 79021074867df91e3090bc6bbea6114364e6e78d..44635f13048890b20c74870d26c4e74bab363ddb 100644 ---- a/media/audio/BUILD.gn -+++ b/media/audio/BUILD.gn -@@ -176,6 +176,12 @@ source_set("audio") { - "mac/scoped_audio_unit.cc", - "mac/scoped_audio_unit.h", - ] -+ if (is_mas_build) { -+ sources -= [ -+ "mac/coreaudio_dispatch_override.cc", -+ "mac/coreaudio_dispatch_override.h", -+ ] -+ } - frameworks = [ - "AudioToolbox.framework", - "AudioUnit.framework", + base::WeakPtr diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc -index 2cd163bf82f16a44456d0f98505514489ba8f751..636096ec3d6425b858bbcb9f732be44cbab077e7 100644 +index f892054d85a0acb6cff3ac88214c9402caf4341a..e361a333d6a11e945dc9d2fd4a7651d5a78d2986 100644 --- a/media/audio/mac/audio_manager_mac.cc +++ b/media/audio/mac/audio_manager_mac.cc -@@ -975,7 +975,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( +@@ -969,7 +969,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( void AudioManagerMac::InitializeOnAudioThread() { DCHECK(GetTaskRunner()->BelongsToCurrentThread()); @@ -446,10 +429,10 @@ index 18479382a277cb2b25626ec8d31442bfd1377ee6..7d80d7fa8337523c3a70f317f883f0cc NOTREACHED(); return nullptr; diff --git a/ui/accessibility/platform/inspect/ax_transform_mac.mm b/ui/accessibility/platform/inspect/ax_transform_mac.mm -index fe043e6dc2203a9054ae367b70a3854b8560c9c7..6cc51d9df176512f6f296e0eb82bc31b5a9515fa 100644 +index 2b4c110a3f7e1eb4f125bb94204affd112c85073..4d480e5f2dc8f49b02e2404bdb5186de4415f4d6 100644 --- a/ui/accessibility/platform/inspect/ax_transform_mac.mm +++ b/ui/accessibility/platform/inspect/ax_transform_mac.mm -@@ -88,6 +88,7 @@ +@@ -95,6 +95,7 @@ } } @@ -457,7 +440,7 @@ index fe043e6dc2203a9054ae367b70a3854b8560c9c7..6cc51d9df176512f6f296e0eb82bc31b // AXTextMarker if (IsAXTextMarker(value)) { return AXTextMarkerToBaseValue(value, indexer); -@@ -96,6 +97,7 @@ +@@ -103,6 +104,7 @@ // AXTextMarkerRange if (IsAXTextMarkerRange(value)) return AXTextMarkerRangeToBaseValue(value, indexer); 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 bf862e2c563a2..6461e240207e9 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 47bba434b56d88a981ca1af6a72a3d4df76d455f..74b881ef99b32d085f58fc7b30cd42005855dcbc 100644 +index a454899a6aec4e581c9166478b4f4118e7a9e0a8..1e6300466078bbe1ad02922d87e173d062cf1f79 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -134,6 +134,11 @@ +@@ -137,6 +137,11 @@ #include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h" @@ -22,7 +22,7 @@ index 47bba434b56d88a981ca1af6a72a3d4df76d455f..74b881ef99b32d085f58fc7b30cd4200 #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -414,6 +419,91 @@ bool GetFullDataFilePath( +@@ -417,6 +422,91 @@ bool GetFullDataFilePath( } // namespace @@ -114,7 +114,7 @@ index 47bba434b56d88a981ca1af6a72a3d4df76d455f..74b881ef99b32d085f58fc7b30cd4200 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -714,6 +804,13 @@ void NetworkContext::SetClient( +@@ -717,6 +807,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -128,7 +128,7 @@ index 47bba434b56d88a981ca1af6a72a3d4df76d455f..74b881ef99b32d085f58fc7b30cd4200 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2192,6 +2289,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2202,6 +2299,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get()); #endif // BUILDFLAG(IS_CHROMEOS) @@ -139,10 +139,10 @@ index 47bba434b56d88a981ca1af6a72a3d4df76d455f..74b881ef99b32d085f58fc7b30cd4200 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index eb77d029e308a06b3dd9d41d9f270a3cd89ce406..98c33a3048f1a10e8293c51213a99089ca55456b 100644 +index dfacd0003f71fc929f61f5059dd5be606f6abedf..5aaa11be3d8ead3626bf49f7efcfe04ddbfa6933 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -104,6 +104,7 @@ class URLMatcher; +@@ -111,6 +111,7 @@ class URLMatcher; namespace network { class CertVerifierWithTrustAnchors; @@ -150,7 +150,7 @@ index eb77d029e308a06b3dd9d41d9f270a3cd89ce406..98c33a3048f1a10e8293c51213a99089 class CookieManager; class HostResolver; class MdnsResponderManager; -@@ -239,6 +240,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -246,6 +247,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -159,7 +159,7 @@ index eb77d029e308a06b3dd9d41d9f270a3cd89ce406..98c33a3048f1a10e8293c51213a99089 void ResetURLLoaderFactories() override; void GetViaObliviousHttp( mojom::ObliviousHttpRequestPtr request, -@@ -829,6 +832,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -838,6 +841,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -169,10 +169,10 @@ index eb77d029e308a06b3dd9d41d9f270a3cd89ce406..98c33a3048f1a10e8293c51213a99089 std::unique_ptr internal_host_resolver_; // Map values set to non-null only if that HostResolver has its own private diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index b2254b765c313a0fa552c82944f9b69e97df432b..a9e7ccf5676cf72fddfd882d7582cc8f6f3162da 100644 +index 5e719e0bbb87107754d5a8961625935c456de0ae..71a39f2c31099ac4869690d4fe81ce9b83d49893 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -291,6 +291,17 @@ struct NetworkContextFilePaths { +@@ -293,6 +293,17 @@ struct NetworkContextFilePaths { bool trigger_migration = false; }; @@ -190,7 +190,7 @@ index b2254b765c313a0fa552c82944f9b69e97df432b..a9e7ccf5676cf72fddfd882d7582cc8f // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -852,6 +863,9 @@ interface NetworkContext { +@@ -840,6 +851,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 0ff41914d509c..b7a87039ef6d5 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 39d85278026f2a625a593d75f5c7bd0166c6110c..72546797930ddade55d71d0a47e6702072acad8b 100644 +index aa9ce8fa016317d543752462f356ccdef6b931eb..71fc184b94286803300c396fe4845e5f17911f55 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc -@@ -197,6 +197,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( +@@ -200,6 +200,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( // TODO(awdf): Rename to DisplayNonPersistentNotification (Similar for Close) void PlatformNotificationServiceImpl::DisplayNotification( @@ -19,7 +19,7 @@ index 39d85278026f2a625a593d75f5c7bd0166c6110c..72546797930ddade55d71d0a47e67020 const GURL& origin, const GURL& document_url, diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h -index dfbfbf4e5d92eb8c7c2ba38f31264ac41713a485..78cc81931321656c308e5611e30e0813b8e6b88a 100644 +index 380a2da617ff5e49f780f4b89d87ceefd75bb6f7..ec78a854531b7d52fbaa5de71fc5e67180fad8c8 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.h +++ b/chrome/browser/notifications/platform_notification_service_impl.h @@ -56,6 +56,7 @@ class PlatformNotificationServiceImpl @@ -79,10 +79,10 @@ index 1c1a95953c6c216b378c2ab0bfbef6eeb19cc184..2f0ce853dbb28163aa30914b5bc31be7 scoped_refptr service_worker_context_; diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc -index f4a46e1d636349c9fe189afbc8b60ee2bf72ff14..4013af45d48a4ee936ba46f1892896338c7018ea 100644 +index 00965c253f28bd3947255b2ab77bf3a0bb71f14a..e04a7eef94990dfb0e2fca2e116352fe80965303 100644 --- a/content/browser/notifications/blink_notification_service_impl_unittest.cc +++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc -@@ -135,7 +135,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { +@@ -136,7 +136,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { notification_service_ = std::make_unique( notification_context_.get(), &browser_context_, embedded_worker_helper_->context_wrapper(), &render_process_host_, @@ -133,10 +133,10 @@ index bbd2aa78722fc0a14ac815ca0243b83965ad8d7c..b6e0a2fce3a0fb9c449aa1bef6a0f970 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 0f4588f2d8fd861bc6c84a4bd1b6913c0d4eb8b3..200131d89e8616054c321841b4b27fbee67b5d88 100644 +index d77374eba22123267730d21849a6d6ba38db1a56..ad5b92f58eacf71c854a4559df44cf12cd59becf 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2120,7 +2120,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2119,7 +2119,7 @@ void RenderProcessHostImpl::CreateNotificationService( case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker: case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -145,7 +145,7 @@ index 0f4588f2d8fd861bc6c84a4bd1b6913c0d4eb8b3..200131d89e8616054c321841b4b27fbe creator_type, std::move(receiver)); break; } -@@ -2128,7 +2128,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2127,7 +2127,7 @@ void RenderProcessHostImpl::CreateNotificationService( CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 0773add9aacfb..dcd63a7fa9c42 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -9,7 +9,7 @@ don't get errors for Chrome's generated resources, which are non-existent because we don't generate them in our build. 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 1ef7adec61a6b5f85177bb035f2534a319cd8f4f..dcb329f794e7a579e37eb370db4378b8cded3d69 100644 +index 0b68f7d80be51a2960aafa72a1f6ea7ebf678b8c..f075a25fad0e7efa2d958f5dc14434084e302124 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc @@ -14,9 +14,11 @@ 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 fd552c6d8afe7..77c8bdc3f6a1b 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 c8727dcac4d1440f7aef0b32e5ac7569b02f177e..4b6cd9afd7d224198c704e4a45f2f13c07e1fc81 100644 +index 8d2f3cb4a74a0fddf5c0cba4136eeca4e4b5ac71..bbd804f53e6bf05da871dcd17bb0581b9a378a5a 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h -@@ -289,6 +289,10 @@ +@@ -321,6 +321,10 @@ E_CPONLY(kColorScrollbarThumbInactive) \ E_CPONLY(kColorScrollbarThumbPressed) \ E_CPONLY(kColorScrollbarTrack) \ @@ -22,7 +22,7 @@ index c8727dcac4d1440f7aef0b32e5ac7569b02f177e..4b6cd9afd7d224198c704e4a45f2f13c E_CPONLY(kColorSeparator) \ E_CPONLY(kColorShadowBase) \ E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \ -@@ -344,6 +348,7 @@ +@@ -383,6 +387,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ @@ -31,10 +31,10 @@ index c8727dcac4d1440f7aef0b32e5ac7569b02f177e..4b6cd9afd7d224198c704e4a45f2f13c #if BUILDFLAG(IS_CHROMEOS) diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc -index 45bea447f6d25e23d60e0b5dde9aeb0ac7a005f3..7b9f527ba0efe6c09e00b15c7a9895a446f771cd 100644 +index 53ade877a6fe68264c88047004dbbcc0d47448b0..7519aeabf0f6c5d12e79ef1f2012f7426ff9b6f4 100644 --- a/ui/color/ui_color_mixer.cc +++ b/ui/color/ui_color_mixer.cc -@@ -202,6 +202,17 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -203,6 +203,17 @@ void AddUiColorMixer(ColorProvider* provider, : SkColorSetA(SK_ColorBLACK, 0x80)}; mixer[kColorScrollbarTrack] = {dark_mode ? SkColorSetRGB(0x42, 0x42, 0x42) : SkColorSetRGB(0xF1, 0xF1, 0xF1)}; @@ -52,7 +52,7 @@ index 45bea447f6d25e23d60e0b5dde9aeb0ac7a005f3..7b9f527ba0efe6c09e00b15c7a9895a4 mixer[kColorSeparator] = {kColorMidground}; mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800}; mixer[kColorShadowValueAmbientShadowElevationThree] = -@@ -283,6 +294,7 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -295,6 +306,7 @@ void AddUiColorMixer(ColorProvider* provider, mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground}; mixer[kColorTreeNodeForegroundSelectedUnfocused] = { kColorTreeNodeForegroundSelectedFocused}; @@ -61,7 +61,7 @@ index 45bea447f6d25e23d60e0b5dde9aeb0ac7a005f3..7b9f527ba0efe6c09e00b15c7a9895a4 } diff --git a/ui/color/win/native_color_mixers_win.cc b/ui/color/win/native_color_mixers_win.cc -index cb7bebda6d9d5a6005019542cd8904628e071b62..0f018db179d8858943c5fa5ab298fe218d3977cd 100644 +index 8f39697063d14429cf25cd8a56185d878c2ac3c7..83623e0742b27b5c1f5485e3319a4b52c6370b58 100644 --- a/ui/color/win/native_color_mixers_win.cc +++ b/ui/color/win/native_color_mixers_win.cc @@ -153,6 +153,10 @@ void AddNativeUiColorMixer(ColorProvider* provider, diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 65e13e764b056..fc24bf410810b 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -11,10 +11,10 @@ majority of changes originally come from these PRs: This patch also fixes callback for manual user cancellation and success. diff --git a/BUILD.gn b/BUILD.gn -index e8b687fa8db81d22d04bae5302b8514bed6053d3..0b67e532df8864e6e9b6c054d6d3225f63447f9d 100644 +index 6b65400bab39cd71bb043ff05f1a08b8e6af94c1..e547499b5670bb1125cdac276cc4e29d8bf4dd9d 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -956,7 +956,6 @@ if (is_win) { +@@ -965,7 +965,6 @@ if (is_win) { "//media:media_unittests", "//media/midi:midi_unittests", "//net:net_unittests", @@ -22,7 +22,7 @@ index e8b687fa8db81d22d04bae5302b8514bed6053d3..0b67e532df8864e6e9b6c054d6d3225f "//sql:sql_unittests", "//third_party/breakpad:symupload($host_toolchain)", "//ui/base:ui_base_unittests", -@@ -965,6 +964,10 @@ if (is_win) { +@@ -974,6 +973,10 @@ if (is_win) { "//ui/views:views_unittests", "//url:url_unittests", ] @@ -34,7 +34,7 @@ index e8b687fa8db81d22d04bae5302b8514bed6053d3..0b67e532df8864e6e9b6c054d6d3225f } diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc -index e1ddd8fc237f61ceb86115d66087a6f89940609f..3631a378c2829a6007d86a2b934ee0f4fd055156 100644 +index 044b34d3738985f3e38476c37a189a5c06ed5353..8cf9832ca1ba864860bccb9b8cb4180da0f1cb29 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc @@ -91,6 +91,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) { @@ -53,7 +53,7 @@ index e1ddd8fc237f61ceb86115d66087a6f89940609f..3631a378c2829a6007d86a2b934ee0f4 #endif // BUILDFLAG(IS_WIN) -@@ -359,8 +361,10 @@ void PrintJob::StartPdfToEmfConversion( +@@ -374,8 +376,10 @@ void PrintJob::StartPdfToEmfConversion( const PrintSettings& settings = document()->settings(); @@ -65,7 +65,7 @@ index e1ddd8fc237f61ceb86115d66087a6f89940609f..3631a378c2829a6007d86a2b934ee0f4 using RenderMode = PdfRenderSettings::Mode; RenderMode mode = print_with_reduced_rasterization -@@ -450,8 +454,10 @@ void PrintJob::StartPdfToPostScriptConversion( +@@ -465,8 +469,10 @@ void PrintJob::StartPdfToPostScriptConversion( if (ps_level2) { mode = PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2; } else { @@ -78,28 +78,20 @@ index e1ddd8fc237f61ceb86115d66087a6f89940609f..3631a378c2829a6007d86a2b934ee0f4 : 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 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab6a293880 100644 +index a2adc3c992aba745c75ba413095165711cb01413..766b546c64dec299ecc6aae87443c13096c29d82 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc -@@ -29,8 +29,6 @@ - #include "chrome/browser/printing/print_view_manager_common.h" - #include "chrome/browser/printing/printer_query.h" - #include "chrome/browser/profiles/profile.h" --#include "chrome/browser/ui/simple_message_box.h" --#include "chrome/browser/ui/webui/print_preview/printer_handler.h" - #include "chrome/common/pref_names.h" - #include "chrome/grit/generated_resources.h" - #include "components/prefs/pref_service.h" -@@ -57,7 +55,7 @@ - #include "printing/printing_utils.h" - #include "ui/base/l10n/l10n_util.h" - --#if !BUILDFLAG(IS_ANDROID) -+#if 0 // Electron does not implement this function. +@@ -22,7 +22,9 @@ + #include "chrome/browser/bad_message.h" + #include "chrome/browser/browser_process.h" + #include "chrome/browser/chrome_notification_types.h" ++#if 0 // Electron does not use Chrome error dialogs #include "chrome/browser/printing/print_error_dialog.h" - #endif - -@@ -81,10 +79,23 @@ namespace printing { ++#endif + #include "chrome/browser/printing/print_job.h" + #include "chrome/browser/printing/print_job_manager.h" + #include "chrome/browser/printing/print_view_manager_common.h" +@@ -77,6 +79,17 @@ namespace printing { namespace { @@ -117,40 +109,28 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab using PrintSettingsCallback = base::OnceCallback)>; - void ShowWarningMessageBox(const std::u16string& message) { -+ LOG(ERROR) << "Invalid printer settings " << message; -+#if 0 - // Runs always on the UI thread. - static bool is_dialog_shown = false; - if (is_dialog_shown) -@@ -93,6 +104,7 @@ void ShowWarningMessageBox(const std::u16string& message) { - base::AutoReset auto_reset(&is_dialog_shown, true); - - chrome::ShowWarningMessageBox(nullptr, std::u16string(), message); -+#endif - } - - void OnDidGetDefaultPrintSettings( -@@ -140,7 +152,9 @@ void OnDidUpdatePrintSettings( +@@ -87,15 +100,18 @@ void OnDidGetDefaultPrintSettings( + mojom::PrintManagerHost::GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - DCHECK(printer_query); - mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); -- if (printer_query->last_status() == mojom::ResultCode::kSuccess) { + mojom::PrintParamsPtr params = mojom::PrintParams::New(); +- if (printer_query && +- printer_query->last_status() == mojom::ResultCode::kSuccess) { + // We call update without first printing from defaults, + // so the last printer status will still be defaulted to PrintingContext::FAILED + if (printer_query) { - RenderParamsFromPrintSettings(printer_query->settings(), - params->params.get()); - params->params->document_cookie = printer_query->cookie(); -@@ -166,6 +180,7 @@ void OnDidScriptedPrint( - mojom::PrintManagerHost::ScriptedPrintCallback callback) { - DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); -+ - if (printer_query->last_status() == mojom::ResultCode::kSuccess && - printer_query->settings().dpi()) { - RenderParamsFromPrintSettings(printer_query->settings(), -@@ -175,7 +190,8 @@ void OnDidScriptedPrint( + RenderParamsFromPrintSettings(printer_query->settings(), params.get()); + params->document_cookie = printer_query->cookie(); + } + ++#if 0 // Electron does not use Chrome error dialogs + if (!want_pdf_settings && !PrintMsgPrintParamsIsValid(*params)) { + ShowPrintErrorDialogForInvalidPrinterError(); + } ++#endif + + std::move(callback).Run(std::move(params)); + +@@ -165,7 +181,8 @@ void OnDidScriptedPrint( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); @@ -160,19 +140,20 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -188,9 +204,11 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -178,9 +195,11 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); +#if 0 // Printing is always enabled. Profile* profile = Profile::FromBrowserContext(web_contents->GetBrowserContext()); - printing_enabled_.Init(prefs::kPrintingEnabled, profile->GetPrefs()); +- printing_enabled_.Init(prefs::kPrintingEnabled, profile->GetPrefs()); ++ printing_enabled_.Init(prefs::kPrintingEnabled, profile->GetPrefs()); +#endif } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -198,7 +216,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -188,7 +207,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -184,19 +165,20 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` // is still valid after a possible inner message loop runs in // `DisconnectFromCurrentPrintJob()`. -@@ -226,7 +247,10 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -216,7 +238,12 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { #endif SetPrintingRFH(rfh); -- CompletePrintNow(rfh); -+ //CompletePrintNow(rfh); ++#if 0 + CompletePrintNow(rfh); ++#endif + callback_ = std::move(callback); + + GetPrintRenderFrame(rfh)->PrintRequestedPages(silent, std::move(settings)); return true; } -@@ -384,7 +408,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -388,7 +415,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -206,7 +188,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab DCHECK_CURRENTLY_ON(content::BrowserThread::UI); #if BUILDFLAG(ENABLE_OOP_PRINTING) -@@ -399,8 +424,11 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -414,8 +442,11 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -219,12 +201,11 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab } void PrintViewManagerBase::NavigationStopped() { -@@ -535,11 +563,14 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -550,11 +581,13 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); +#if 0 // Printing is always enabled. -+ if (!printing_enabled_.GetValue()) { GetDefaultPrintSettingsReply(std::move(callback), mojom::PrintParams::New()); @@ -234,7 +215,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab #if BUILDFLAG(ENABLE_OOP_PRINTING) if (printing::features::kEnableOopPrintDriversJobPrint.Get() && #if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS) -@@ -588,18 +619,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -603,11 +636,13 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value::Dict job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -244,11 +225,11 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab CreateEmptyPrintPagesParamsPtr(), false); return; } -- +#endif + if (!job_settings.FindInt(kSettingPrinterType)) { UpdatePrintSettingsReply(std::move(callback), - CreateEmptyPrintPagesParamsPtr(), false); +@@ -615,6 +650,7 @@ void PrintViewManagerBase::UpdatePrintSettings( return; } @@ -256,7 +237,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -609,6 +642,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -624,6 +660,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.Set(kSettingRasterizePdfDpi, value); } @@ -264,7 +245,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -630,7 +664,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -645,7 +682,7 @@ void PrintViewManagerBase::UpdatePrintSettings( void PrintViewManagerBase::IsPrintingEnabled( IsPrintingEnabledCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -273,7 +254,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab } void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, -@@ -646,14 +680,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -661,14 +698,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -283,35 +264,42 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab } #if BUILDFLAG(ENABLE_OOP_PRINTING) if (printing::features::kEnableOopPrintDriversJobPrint.Get() && - !service_manager_client_id_.has_value()) { + !query_with_ui_client_id_.has_value()) { // Renderer process has requested settings outside of the expected setup. - std::move(callback).Run(CreateEmptyPrintPagesParamsPtr()); + std::move(callback).Run(CreateEmptyPrintPagesParamsPtr(), false); return; } #endif -@@ -691,7 +725,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, +@@ -706,6 +743,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, PrintManager::PrintingFailed(cookie, reason); --#if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. -+#if 0 // Electron does not implement this function. ++#if 0 // Electron does not use Chromium error dialogs // `PrintingFailed()` can occur because asynchronous compositing results // don't complete until after a print job has already failed and been // destroyed. In such cases the error notification to the user will -@@ -715,6 +749,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -715,7 +753,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, + print_job_->document()->cookie() == cookie) { + ShowPrintErrorDialogForGenericError(); + } +- ++#endif + ReleasePrinterQuery(); + } + +@@ -727,15 +765,24 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { + observers_.RemoveObserver(&observer); } - void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { ++void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { + if (!callback_.is_null()) { + printing_status_ = PrintStatus::kInvalid; + TerminatePrintJob(true); + } ++} + - base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( - FROM_HERE, base::BindOnce(&ShowWarningMessageBox, - l10n_util::GetStringUTF16( -@@ -725,11 +764,13 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( + void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -325,7 +313,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab } void PrintViewManagerBase::RenderFrameDeleted( -@@ -781,12 +822,17 @@ void PrintViewManagerBase::OnJobDone() { +@@ -787,7 +834,12 @@ 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. @@ -339,13 +327,19 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab ReleasePrintJob(); } +@@ -796,9 +848,10 @@ void PrintViewManagerBase::OnCanceling() { + } + void PrintViewManagerBase::OnFailed() { --#if !BUILDFLAG(IS_ANDROID) // Android does not implement this function. -+#if 0 // Electron does not implement this function. ++#if 0 // Electron does not use Chromium error dialogs if (!canceling_job_) - ShowPrintErrorDialog(); - #endif -@@ -800,7 +846,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { + ShowPrintErrorDialogForGenericError(); +- ++#endif + TerminatePrintJob(true); + } + +@@ -808,7 +861,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { // Is the document already complete? if (print_job_->document() && print_job_->document()->IsComplete()) { @@ -354,7 +348,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab return true; } -@@ -848,7 +894,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -856,7 +909,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current `print_job_`. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -366,7 +360,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab if (!weak_this) return false; -@@ -869,7 +918,7 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -877,7 +933,7 @@ bool PrintViewManagerBase::CreateNewPrintJob( #endif print_job_->AddObserver(*this); @@ -375,7 +369,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab return true; } -@@ -931,6 +980,11 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -939,6 +995,11 @@ void PrintViewManagerBase::ReleasePrintJob() { } #endif @@ -387,7 +381,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab if (!print_job_) return; -@@ -938,7 +992,7 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -946,7 +1007,7 @@ void PrintViewManagerBase::ReleasePrintJob() { // printing_rfh_ should only ever point to a RenderFrameHost with a live // RenderFrame. DCHECK(rfh->IsRenderFrameLive()); @@ -396,7 +390,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab } print_job_->RemoveObserver(*this); -@@ -980,7 +1034,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -988,7 +1049,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -405,7 +399,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab return true; if (!cookie) { -@@ -1086,7 +1140,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() { +@@ -1105,7 +1166,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() { } void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) { @@ -415,7 +409,7 @@ index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 1fe06e1ffd9ad45afe01fe0d4282a38759a53f3a..998bebb10e9fa24414e1adeb626c93dec46f7812 100644 +index e81de668ec6e4c3b357aced73106effdcb04aafe..fefb49202dd5b66f8cdc799e9ee0b23f11a49303 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h @@ -46,6 +46,8 @@ namespace printing { @@ -427,7 +421,7 @@ index 1fe06e1ffd9ad45afe01fe0d4282a38759a53f3a..998bebb10e9fa24414e1adeb626c93de // Base class for managing the print commands for a WebContents. class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { public: -@@ -71,7 +73,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -74,7 +76,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Prints the current document immediately. Since the rendering is // asynchronous, the actual printing will not be completed on the return of // this function. Returns false if printing is impossible at the moment. @@ -439,15 +433,18 @@ index 1fe06e1ffd9ad45afe01fe0d4282a38759a53f3a..998bebb10e9fa24414e1adeb626c93de #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Prints the document in `print_data` with settings specified in -@@ -127,6 +132,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { - void ShowInvalidPrinterSettingsError() override; +@@ -127,8 +132,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { + void IsPrintingEnabled(IsPrintingEnabledCallback callback) override; + void ScriptedPrint(mojom::ScriptedPrintParamsPtr params, + ScriptedPrintCallback callback) override; ++ void ShowInvalidPrinterSettingsError() override; void PrintingFailed(int32_t cookie, mojom::PrintFailureReason reason) override; + void UserInitCanceled(); // Adds and removes observers for `PrintViewManagerBase` events. The order in // which notifications are sent to observers is undefined. Observers must be -@@ -134,6 +140,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -136,6 +143,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { void AddObserver(Observer& observer); void RemoveObserver(Observer& observer); @@ -462,7 +459,7 @@ index 1fe06e1ffd9ad45afe01fe0d4282a38759a53f3a..998bebb10e9fa24414e1adeb626c93de protected: explicit PrintViewManagerBase(content::WebContents* web_contents); -@@ -270,7 +284,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -273,7 +288,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Runs `callback` with `params` to reply to ScriptedPrint(). void ScriptedPrintReply(ScriptedPrintCallback callback, int process_id, @@ -472,7 +469,7 @@ index 1fe06e1ffd9ad45afe01fe0d4282a38759a53f3a..998bebb10e9fa24414e1adeb626c93de // Requests the RenderView to render all the missing pages for the print job. // No-op if no print job is pending. Returns true if at least one page has -@@ -340,8 +355,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -343,8 +359,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // The current RFH that is printing with a system printing dialog. raw_ptr printing_rfh_ = nullptr; @@ -539,11 +536,36 @@ index 7f6faeb58f91bbcb8f836ad3a7c7e9007558e480..9ee41950cd4ec67df73ee73ecdeaae10 void PrintWithParams(mojom::PrintPagesParamsPtr params, PrintWithParamsCallback callback) override; void PrintForSystemDialog() override; +diff --git a/components/printing/browser/print_manager.cc b/components/printing/browser/print_manager.cc +index 21c81377d32ae8d4185598a7eba88ed1d2063ef0..0767f4e9369e926b1cea99178c1a1975941f1765 100644 +--- a/components/printing/browser/print_manager.cc ++++ b/components/printing/browser/print_manager.cc +@@ -47,6 +47,8 @@ void PrintManager::IsPrintingEnabled(IsPrintingEnabledCallback callback) { + std::move(callback).Run(true); + } + ++void PrintManager::ShowInvalidPrinterSettingsError() {} ++ + void PrintManager::PrintingFailed(int32_t cookie, + mojom::PrintFailureReason reason) { + // Note: Not redundant with cookie checks in the same method in other parts of +diff --git a/components/printing/browser/print_manager.h b/components/printing/browser/print_manager.h +index ca71560874a0189068dd11fbc039f5673bf6bd96..a8551d95e64da2afbc1685b2df8f1fc377c7117b 100644 +--- a/components/printing/browser/print_manager.h ++++ b/components/printing/browser/print_manager.h +@@ -48,6 +48,7 @@ class PrintManager : public content::WebContentsObserver, + DidPrintDocumentCallback callback) override; + void IsPrintingEnabled(IsPrintingEnabledCallback callback) override; + void DidShowPrintDialog() override; ++ void ShowInvalidPrinterSettingsError() override; + void PrintingFailed(int32_t cookie, + mojom::PrintFailureReason reason) override; + diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index 42d9af1e278f6c3e09bb7e54a7c4de0f17d064bf..96112222530e63f911d866884eca03cce24c3ade 100644 +index d18160466a3d4ada8fd6c1bfbb0ee674785a3b6e..69703fe649226f3d335059bfd6c9713f259413f2 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom -@@ -289,7 +289,7 @@ union PrintWithParamsResult { +@@ -291,7 +291,7 @@ union PrintWithParamsResult { interface PrintRenderFrame { // Tells the RenderFrame to switch the CSS to print media type, render every // requested page, and then switch back the CSS to display media type. @@ -552,20 +574,23 @@ index 42d9af1e278f6c3e09bb7e54a7c4de0f17d064bf..96112222530e63f911d866884eca03cc // Requests the frame to be printed with specified parameters. This is used // to programmatically produce PDF by request from the browser (e.g. over -@@ -380,7 +380,7 @@ interface PrintManagerHost { +@@ -382,7 +382,10 @@ interface PrintManagerHost { // Requests the print settings from the user. This step is about showing // UI to the user to select the final print settings. [Sync] - ScriptedPrint(ScriptedPrintParams params) => (PrintPagesParams settings); + ScriptedPrint(ScriptedPrintParams params) => (PrintPagesParams settings, bool canceled); ++ ++ // Tells the browser that there are invalid printer settings. ++ ShowInvalidPrinterSettingsError(); - // Tells the browser that there are invalid printer settings. - ShowInvalidPrinterSettingsError(); + // Tells the browser printing failed. + 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 f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f796605026976 100644 +index 23e925a62ed40710537e2e1b51100ee084f60ecd..8bd962c01ffd9c04facb5cac8795c506f618de6d 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -43,6 +43,7 @@ +@@ -45,6 +45,7 @@ #include "printing/mojom/print.mojom.h" #include "printing/page_number.h" #include "printing/print_job_constants.h" @@ -573,7 +598,7 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 #include "printing/units.h" #include "services/metrics/public/cpp/ukm_source_id.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" -@@ -1316,7 +1317,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1335,7 +1336,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -583,7 +608,7 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 if (!weak_this) return; -@@ -1347,7 +1349,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1366,7 +1368,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -592,7 +617,7 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1362,7 +1364,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1381,7 +1383,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -601,7 +626,7 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1444,7 +1446,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1463,7 +1465,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -611,7 +636,7 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1493,6 +1496,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { +@@ -1512,6 +1515,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -620,7 +645,7 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -2103,7 +2108,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2122,7 +2127,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -630,7 +655,7 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 // Check if |this| is still valid. if (!weak_this) return; -@@ -2118,7 +2124,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2137,7 +2143,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -641,7 +666,7 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -2126,7 +2134,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2145,7 +2153,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -650,7 +675,7 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -2145,8 +2153,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2164,8 +2172,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -667,7 +692,7 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 // Check if |this| is still valid. if (!self) return; -@@ -2408,36 +2423,52 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2421,36 +2436,53 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -697,10 +722,8 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 // Check if the printer returned any settings, if the settings is empty, we // can safely assume there are no printer drivers configured. So we safely // terminate. - bool result = true; -- if (!PrintMsgPrintParamsIsValid(*settings.params)) -+ if (!PrintMsgPrintParamsIsValid(*settings->params)) - result = false; +- const bool result = PrintMsgPrintParamsIsValid(*settings.params); ++ const bool result = PrintMsgPrintParamsIsValid(*settings->params); // Reset to default values. ignore_css_margins_ = false; @@ -729,10 +752,13 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 bool fit_to_paper_size = !IsPrintingPdfFrame(frame, node); - if (!InitPrintSettings(fit_to_paper_size)) { + if (!InitPrintSettings(fit_to_paper_size, std::move(settings))) { + // Browser triggered this code path. It already knows about the failure. notify_browser_of_print_failure_ = false; - GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); ++ GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2564,7 +2595,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( + } + +@@ -2575,7 +2607,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -742,7 +768,7 @@ index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f7966 std::move(quit_closure).Run(); }, diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index 3f82c0cdfd11a8d0c3cbcba9cc74b0e3e1a41b0f..36c1df7e3346f51945721ababf12dc3424f17686 100644 +index c7be37dc31f4725c945e7fde016b542d6e2b5902..03eff9ffcec9c655542d9c6508d9eb2fcad95583 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h @@ -253,7 +253,7 @@ class PrintRenderFrameHelper @@ -754,7 +780,7 @@ index 3f82c0cdfd11a8d0c3cbcba9cc74b0e3e1a41b0f..36c1df7e3346f51945721ababf12dc34 void PrintWithParams(mojom::PrintPagesParamsPtr params, PrintWithParamsCallback callback) override; #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -326,7 +326,9 @@ class PrintRenderFrameHelper +@@ -328,7 +328,9 @@ class PrintRenderFrameHelper // WARNING: |this| may be gone after this method returns. void Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -765,7 +791,7 @@ index 3f82c0cdfd11a8d0c3cbcba9cc74b0e3e1a41b0f..36c1df7e3346f51945721ababf12dc34 // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); -@@ -335,12 +337,14 @@ class PrintRenderFrameHelper +@@ -337,12 +339,14 @@ class PrintRenderFrameHelper // Initialize print page settings with default settings. // Used only for native printing workflow. @@ -783,10 +809,10 @@ index 3f82c0cdfd11a8d0c3cbcba9cc74b0e3e1a41b0f..36c1df7e3346f51945721ababf12dc34 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index f8325e930179fcb7a675db696fbfe0e2436b769b..9ba992e9ce8e107949db8dfc928a478b50fea35a 100644 +index 2faf1f903d034bd21367eccd6e56e0eb032104be..5648b47389a22845d37f4bdbc2287aadc4ecfed7 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -2827,8 +2827,9 @@ source_set("browser") { +@@ -2816,8 +2816,9 @@ source_set("browser") { "//ppapi/shared_impl", ] diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index 6b37ce4cc2063..b4b37ba63150d 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -172,10 +172,10 @@ index e9ba0101791d7ca84ae8a6801aa7b3607d5a6ded..0e1baf024e7aee3bc1edad1e0620bd56 int dir_mode = 0; CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) && diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 046764b67c98924b79405ef7d5d90ca9fa972d6e..51a109504c1c8f79ef8748641ef21efed3a9315d 100644 +index 844b1814ba832b82e6f57236a9a5f5380c6a65cc..3dff138357d9e1ae8d572df7630aa6ec429728a3 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc -@@ -29,7 +29,9 @@ +@@ -28,7 +28,9 @@ #include "base/win/wmi.h" #include "chrome/browser/process_singleton_internal.h" #include "chrome/browser/shell_integration.h" @@ -185,7 +185,7 @@ index 046764b67c98924b79405ef7d5d90ca9fa972d6e..51a109504c1c8f79ef8748641ef21efe #include "chrome/browser/win/chrome_process_finder.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" -@@ -164,6 +166,7 @@ bool ProcessLaunchNotification( +@@ -163,6 +165,7 @@ bool ProcessLaunchNotification( } bool DisplayShouldKillMessageBox() { @@ -193,7 +193,7 @@ index 046764b67c98924b79405ef7d5d90ca9fa972d6e..51a109504c1c8f79ef8748641ef21efe TRACE_EVENT0("startup", "ProcessSingleton:DisplayShouldKillMessageBox"); // Ensure there is an instance of ResourceBundle that is initialized for -@@ -174,6 +177,10 @@ bool DisplayShouldKillMessageBox() { +@@ -173,6 +176,10 @@ bool DisplayShouldKillMessageBox() { NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), l10n_util::GetStringUTF16(IDS_BROWSER_HUNGBROWSER_MESSAGE)) != chrome::MESSAGE_BOX_RESULT_NO; @@ -204,7 +204,7 @@ index 046764b67c98924b79405ef7d5d90ca9fa972d6e..51a109504c1c8f79ef8748641ef21efe } // Function was copied from Process::Terminate. -@@ -258,9 +265,13 @@ bool ProcessSingleton::EscapeVirtualization( +@@ -255,9 +262,13 @@ bool ProcessSingleton::EscapeVirtualization( } ProcessSingleton::ProcessSingleton( @@ -218,7 +218,7 @@ index 046764b67c98924b79405ef7d5d90ca9fa972d6e..51a109504c1c8f79ef8748641ef21efe is_virtualized_(false), lock_file_(INVALID_HANDLE_VALUE), user_data_dir_(user_data_dir), -@@ -380,7 +391,7 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -377,7 +388,7 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { bool ProcessSingleton::Create() { TRACE_EVENT0("startup", "ProcessSingleton::Create"); @@ -227,7 +227,7 @@ index 046764b67c98924b79405ef7d5d90ca9fa972d6e..51a109504c1c8f79ef8748641ef21efe remote_window_ = chrome::FindRunningChromeWindow(user_data_dir_); if (!remote_window_ && !EscapeVirtualization(user_data_dir_)) { -@@ -389,7 +400,7 @@ bool ProcessSingleton::Create() { +@@ -386,7 +397,7 @@ bool ProcessSingleton::Create() { // access. As documented, it's clearer to NOT request ownership on creation // since it isn't guaranteed we will get it. It is better to create it // without ownership and explicitly get the ownership afterward. @@ -236,7 +236,7 @@ index 046764b67c98924b79405ef7d5d90ca9fa972d6e..51a109504c1c8f79ef8748641ef21efe if (!only_me.IsValid()) { DPLOG(FATAL) << "CreateMutex failed"; return false; -@@ -428,6 +439,17 @@ bool ProcessSingleton::Create() { +@@ -425,6 +436,17 @@ bool ProcessSingleton::Create() { window_.CreateNamed(base::BindRepeating(&ProcessLaunchNotification, notification_callback_), user_data_dir_.value()); diff --git a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch index d639756a51a92..ec5ed18401e87 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -8,18 +8,18 @@ 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 b842aea32366182edd993f7de9ebad8612f29dd6..fbadeec8d06bf69e872d261447efd52ab770e6e5 100644 +index f1d5af4fc31b8a3ce361777c42db835033b733b5..614b0a43fcc0f6b05f5863f574ccc98ee85c975c 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h -@@ -21,6 +21,7 @@ - #include "third_party/blink/public/common/page/drag_operation.h" +@@ -22,6 +22,7 @@ #include "third_party/blink/public/mojom/frame/lifecycle.mojom.h" + #include "third_party/blink/public/mojom/input/input_handler.mojom-shared.h" #include "third_party/blink/public/mojom/manifest/display_mode.mojom.h" +#include "ui/base/cursor/cursor.h" #include "ui/gfx/native_widget_types.h" namespace blink { -@@ -257,6 +258,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { +@@ -264,6 +265,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { // Returns the associated RenderViewHostDelegateView*, if possible. virtual RenderViewHostDelegateView* GetDelegateView(); @@ -30,7 +30,7 @@ index b842aea32366182edd993f7de9ebad8612f29dd6..fbadeec8d06bf69e872d261447efd52a // 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 f49cf68e4b5be592000b193a3b1fae18e0bd41dc..06f9fd63819afb96cad0569abeb07410ca200024 100644 +index a70399d42f9388887b087d21ff98f58805c3c4d7..6c420355e70a8c9313f340cc3145272041c94910 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -2050,6 +2050,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { @@ -43,10 +43,10 @@ index f49cf68e4b5be592000b193a3b1fae18e0bd41dc..06f9fd63819afb96cad0569abeb07410 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 03082815e5c4de60da566176af10bc972cff0072..465dcd8c19fff3f435ed1286a9932a484b7d7d4e 100644 +index 247afa9d1b37c70d7df12a071cb2d7e9dab570b0..f793f5f01b73df5dc6561729f80591bed25ca51e 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4711,6 +4711,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4719,6 +4719,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,10 +59,10 @@ index 03082815e5c4de60da566176af10bc972cff0072..465dcd8c19fff3f435ed1286a9932a48 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 ae95a44450f4942cd463cfbcc3b90123796cdf3e..ef8ac6dca3a43cfa5a58f10b3860987bb01eec2b 100644 +index 4179436dd960f1bec62e08b09f790d15ae54e8ad..1cee21e45f577a4d3d07ade888c6c5f4d3086213 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -957,6 +957,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -967,6 +967,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, void SendScreenRects() override; void SendActiveState(bool active) override; TextInputManager* GetTextInputManager() override; @@ -71,7 +71,7 @@ index ae95a44450f4942cd463cfbcc3b90123796cdf3e..ef8ac6dca3a43cfa5a58f10b3860987b 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 d89d18e8d2509629c0d43c199c9a4ae3a302c062..82d6e6f97830282a89d5bbfa55a9b2d950e00fbc 100644 +index f4c8ee3fe8b161752b4c3b74f43b69f2b348d3c2..bab2cd2e09819e7629f5b9f6e8f92667a8ad7990 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -30,6 +30,7 @@ diff --git a/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch b/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch index 91ad8e3ba5ba6..d9356e4aa3df1 100644 --- a/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch +++ b/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch @@ -23,10 +23,10 @@ index f14db439624e395bd6cd9d10d5aff480e0384293..ec860cd4033ac09f96be031147d70d2c +#endif } diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc -index 9b73e3e04be2074a2bdfbd77afc58e37b5797d97..35c60a617a3d092b4ffbcc8652b7a80cc0d1f958 100644 +index d625e2e8229c9013b197e248543cd896d48525aa..1b87fca21a9dbfbb85cabdbfa1ca7038e7c52806 100644 --- a/chrome/browser/profiles/profile_selections.cc +++ b/chrome/browser/profiles/profile_selections.cc -@@ -186,6 +186,7 @@ Profile* ProfileSelections::ApplyProfileSelection(Profile* profile) const { +@@ -182,6 +182,7 @@ Profile* ProfileSelections::ApplyProfileSelection(Profile* profile) const { ProfileSelection ProfileSelections::GetProfileSelection( const Profile* profile) const { @@ -34,7 +34,7 @@ index 9b73e3e04be2074a2bdfbd77afc58e37b5797d97..35c60a617a3d092b4ffbcc8652b7a80c #if BUILDFLAG(IS_CHROMEOS_ASH) // This check has to be performed before the check on // `profile->IsRegularProfile()` because profiles that are internal ASH -@@ -241,6 +242,7 @@ ProfileSelection ProfileSelections::GetProfileSelection( +@@ -227,6 +228,7 @@ ProfileSelection ProfileSelections::GetProfileSelection( } NOTREACHED(); diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index 17d37e71a4903..e3f8147c0680b 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -6,7 +6,7 @@ Subject: render_widget_host_view_base.patch ... something to do with OSR? and maybe as well? terrifying. diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc -index 9a942b2b4dd39dc969803f7c5f20e343200b43cf..7fe07c3c491c998730770cdd72ca283fca589103 100644 +index 0c3953a9e8c68059374144a46276f4f1823306bf..b6fe4f5ca24228a8956128cead7a74e7a74f7204 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc @@ -699,6 +699,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( @@ -24,7 +24,7 @@ index 9a942b2b4dd39dc969803f7c5f20e343200b43cf..7fe07c3c491c998730770cdd72ca283f const blink::WebMouseEvent& event, const ui::LatencyInfo& latency) { diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h -index 1425fc2e82e485f6f31eb9ffba3bda30a8568b5c..5d5ffb5f5b9e84734e3173c61ba8c9ecb17f433b 100644 +index d83e754fe27be4cf77570eec5e8a05c7b90ca53b..be58619d4612d7a6ff382be21708a9422a9b2c81 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -25,8 +25,11 @@ diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index 327d5163435f6..16ce7a23e1dba 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -10,10 +10,10 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`. Additionally, disables usage of some private APIs in MAS builds. diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index 9235ef0202972569b4c5b2e5f2e0469e29df8992..306b05fe54b6baf43d4adbe8b1e0c6f69b2bcfd4 100644 +index cef7ff4be973149792f5801ecc90c7285a925fe3..5c927ae70de3133d78b95791ff2138a0de644ab5 100644 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -@@ -157,6 +157,15 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -156,6 +156,15 @@ void ExtractUnderlines(NSAttributedString* string, } // namespace @@ -29,7 +29,7 @@ index 9235ef0202972569b4c5b2e5f2e0469e29df8992..306b05fe54b6baf43d4adbe8b1e0c6f6 // RenderWidgetHostViewCocoa --------------------------------------------------- // Private methods: -@@ -596,6 +605,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { +@@ -595,6 +604,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -39,7 +39,7 @@ index 9235ef0202972569b4c5b2e5f2e0469e29df8992..306b05fe54b6baf43d4adbe8b1e0c6f6 return [self acceptsMouseEventsWhenInactive]; } -@@ -672,6 +684,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { +@@ -671,6 +683,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { // its parent view. BOOL hitSelf = NO; while (view) { @@ -50,7 +50,7 @@ index 9235ef0202972569b4c5b2e5f2e0469e29df8992..306b05fe54b6baf43d4adbe8b1e0c6f6 if (view == self) hitSelf = YES; if ([view isKindOfClass:[self class]] && ![view isEqual:self] && -@@ -991,6 +1007,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -990,6 +1006,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { eventType == NSEventTypeKeyDown && !(modifierFlags & NSEventModifierFlagCommand); @@ -61,7 +61,7 @@ index 9235ef0202972569b4c5b2e5f2e0469e29df8992..306b05fe54b6baf43d4adbe8b1e0c6f6 // We only handle key down events and just simply forward other events. if (eventType != NSEventTypeKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1806,9 +1826,11 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1802,9 +1822,11 @@ - (NSAccessibilityRole)accessibilityRole { // Since this implementation doesn't have to wait any IPC calls, this doesn't // make any key-typing jank. --hbono 7/23/09 // @@ -73,7 +73,7 @@ index 9235ef0202972569b4c5b2e5f2e0469e29df8992..306b05fe54b6baf43d4adbe8b1e0c6f6 - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1817,7 +1839,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1813,7 +1835,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 06b81f345bbcc..16d1706560546 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 cfe599398a92ad8954c102f3ba9644436f4e9791..8f003ac2da1e49bc2bbf3a7cce1a648980e325c1 100644 +index 5d54960da4162953561903862f590fd0a5047ea2..53363189fe649fa92040811ee9e858e9363f29e7 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1555,7 +1555,7 @@ if (is_chrome_branded && !is_android) { +@@ -1556,7 +1556,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index cfe599398a92ad8954c102f3ba9644436f4e9791..8f003ac2da1e49bc2bbf3a7cce1a6489 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1584,6 +1584,12 @@ if (!is_android) { +@@ -1585,6 +1585,12 @@ if (!is_android) { } } diff --git a/patches/chromium/revert_roll_clang_rust_llvmorg-16-init-17653-g39da55e8-3.patch b/patches/chromium/revert_roll_clang_rust_llvmorg-16-init-17653-g39da55e8-3.patch new file mode 100644 index 0000000000000..dd85a0f7cee45 --- /dev/null +++ b/patches/chromium/revert_roll_clang_rust_llvmorg-16-init-17653-g39da55e8-3.patch @@ -0,0 +1,78 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Charles Kerr +Date: Wed, 8 Mar 2023 14:10:53 -0600 +Subject: Revert "Roll clang+rust llvmorg-16-init-17653-g39da55e8-3 : + llvmorg-17-init-2082-g6d4a674a-1 / [skipping Rust]" + +This reverts commit eb840ac593ad7af941acf510ea6ce84c48bde748. + +diff --git a/build/toolchain/toolchain.gni b/build/toolchain/toolchain.gni +index 7ddeb126840f554955f6339a54756e21382d5a7d..c9558ee8b59f2824df9f4f103099a9d360735919 100644 +--- a/build/toolchain/toolchain.gni ++++ b/build/toolchain/toolchain.gni +@@ -38,7 +38,12 @@ if (generate_linker_map) { + } + + declare_args() { +- clang_version = "17" ++ if (llvm_force_head_revision) { ++ clang_version = "17" ++ } else { ++ # TODO(crbug.com/1410101): Remove in next Clang roll. ++ clang_version = "16" ++ } + } + + # Extension for shared library files (including leading dot). +diff --git a/tools/clang/scripts/build.py b/tools/clang/scripts/build.py +index b686912d6fb5775731b07217c964dc9f0ade8309..d78a85422fcbf3afb909d5195fad2942058246f8 100755 +--- a/tools/clang/scripts/build.py ++++ b/tools/clang/scripts/build.py +@@ -578,6 +578,15 @@ def main(): + + global CLANG_REVISION, PACKAGE_VERSION, LLVM_BUILD_DIR + ++ # TODO(crbug.com/1410101): Remove in next Clang roll. ++ if args.llvm_force_head_revision: ++ global RELEASE_VERSION ++ RELEASE_VERSION = '17' ++ old_lib_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang', '16.0.0') ++ if (os.path.isdir(old_lib_dir)): ++ print('Removing old lib dir: ', old_lib_dir) ++ RmTree(old_lib_dir) ++ + if (args.pgo or args.thinlto) and not args.bootstrap: + print('--pgo/--thinlto requires --bootstrap') + return 1 +diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py +index 5b2289d07b9f23302a346aae180a8e18d39b9510..106849006b66b157da92df2bbf2f7016d56dc375 100755 +--- a/tools/clang/scripts/update.py ++++ b/tools/clang/scripts/update.py +@@ -35,11 +35,12 @@ import zlib + # https://chromium.googlesource.com/chromium/src/+/main/docs/updating_clang.md + # Reverting problematic clang rolls is safe, though. + # This is the output of `git describe` and is usable as a commit-ish. +-CLANG_REVISION = 'llvmorg-17-init-3874-g93a2fecc' +-CLANG_SUB_REVISION = 1 ++CLANG_REVISION = 'llvmorg-16-init-17653-g39da55e8' ++CLANG_SUB_REVISION = 3 + + PACKAGE_VERSION = '%s-%s' % (CLANG_REVISION, CLANG_SUB_REVISION) +-RELEASE_VERSION = '17' ++RELEASE_VERSION = '16' ++# TODO(crbug.com/1410101): Bump to 17 in next Clang roll. + + CDS_URL = os.environ.get('CDS_CLANG_BUCKET_OVERRIDE', + 'https://commondatastorage.googleapis.com/chromium-browser-clang') +@@ -332,6 +333,11 @@ def main(): + help='Verify that clang has the passed-in version.') + args = parser.parse_args() + ++ # TODO(crbug.com/1410101): Remove in next Clang roll. ++ if args.llvm_force_head_revision: ++ global RELEASE_VERSION ++ RELEASE_VERSION = '17' ++ + if args.verify_version and args.verify_version != RELEASE_VERSION: + print('RELEASE_VERSION is %s but --verify-version argument was %s.' % ( + RELEASE_VERSION, args.verify_version)) diff --git a/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch b/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch index 6b9644bae3fa2..4c4cb46a0c0f7 100644 --- a/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch +++ b/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch @@ -10,10 +10,10 @@ can be reverted when those failures are addressed. It's unlikely that this patch will be upstreamed. diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc -index 87944ed0b4a51498e0c3e2da7fee2b6b0ed4768b..8ba3141b7bd18a073f71db6047ffd064f102cf02 100644 +index a3d8ddd285894cdad25302bb61ce2c7337bf3a95..5dddac32a65e9c73dc67c1c092f713a1b61610bb 100644 --- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc +++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc -@@ -293,26 +293,7 @@ TEST_F(LanguageSettingsPrivateApiTest, GetNeverTranslateLanguagesListTest) { +@@ -290,24 +290,7 @@ TEST_F(LanguageSettingsPrivateApiTest, GetNeverTranslateLanguagesListTest) { } } @@ -26,12 +26,10 @@ index 87944ed0b4a51498e0c3e2da7fee2b6b0ed4768b..8ba3141b7bd18a073f71db6047ffd064 - protected: - void InitFeatures() override { -#if BUILDFLAG(IS_WIN) -- // Force Windows hybrid spellcheck to be enabled, and disable the delayed -- // init feature since that case is tested in +- // Disable the delayed init feature since that case is tested in - // LanguageSettingsPrivateApiTestDelayInit below. -- feature_list_.InitWithFeatures( -- /*enabled_features=*/{spellcheck::kWinUseBrowserSpellChecker}, -- /*disabled_features=*/{spellcheck::kWinDelaySpellcheckServiceInit}); +- feature_list_.InitAndDisableFeature( +- spellcheck::kWinDelaySpellcheckServiceInit); -#endif // BUILDFLAG(IS_WIN) - } -}; @@ -42,10 +40,10 @@ index 87944ed0b4a51498e0c3e2da7fee2b6b0ed4768b..8ba3141b7bd18a073f71db6047ffd064 RunGetLanguageListTest(); } diff --git a/chrome/browser/spellchecker/spellcheck_service_unittest.cc b/chrome/browser/spellchecker/spellcheck_service_unittest.cc -index 42c96836486ad0b8d8a436c44f0989e981b1be36..4140c914223a56f300688023a931ac32628b7777 100644 +index f982882ed166c5abfecadbbf89fe8771908c35f5..b0be80e0622237c54749e9e645a44fb7e24c0c79 100644 --- a/chrome/browser/spellchecker/spellcheck_service_unittest.cc +++ b/chrome/browser/spellchecker/spellcheck_service_unittest.cc -@@ -335,18 +335,9 @@ const std::vector SpellcheckServiceHybridUnitTestBase:: +@@ -333,17 +333,9 @@ const std::vector SpellcheckServiceHybridUnitTestBase:: // dictionaries. }; @@ -57,16 +55,15 @@ index 42c96836486ad0b8d8a436c44f0989e981b1be36..4140c914223a56f300688023a931ac32 - void InitFeatures() override { - // Disable kWinDelaySpellcheckServiceInit, as the case where it's enabled - // is tested in SpellcheckServiceWindowsDictionaryMappingUnitTestDelayInit. -- feature_list_.InitWithFeatures( -- /*enabled_features=*/{spellcheck::kWinUseBrowserSpellChecker}, -- /*disabled_features=*/{spellcheck::kWinDelaySpellcheckServiceInit}); +- feature_list_.InitAndDisableFeature( +- spellcheck::kWinDelaySpellcheckServiceInit); - } -}; + public testing::WithParamInterface {}; static const TestCase kHybridGetDictionariesParams[] = { // Galician (gl) has only Windows support, no Hunspell dictionary. Croatian -@@ -401,10 +392,10 @@ static const TestCase kHybridGetDictionariesParams[] = { +@@ -398,10 +390,10 @@ static const TestCase kHybridGetDictionariesParams[] = { }; INSTANTIATE_TEST_SUITE_P(TestCases, @@ -79,7 +76,7 @@ index 42c96836486ad0b8d8a436c44f0989e981b1be36..4140c914223a56f300688023a931ac32 RunGetDictionariesTest(GetParam().accept_languages, GetParam().spellcheck_dictionaries, GetParam().expected_dictionaries); -@@ -434,16 +425,7 @@ std::ostream& operator<<(std::ostream& out, +@@ -431,15 +423,7 @@ std::ostream& operator<<(std::ostream& out, class SpellcheckServiceWindowsDictionaryMappingUnitTest : public SpellcheckServiceHybridUnitTestBase, @@ -88,9 +85,8 @@ index 42c96836486ad0b8d8a436c44f0989e981b1be36..4140c914223a56f300688023a931ac32 - void InitFeatures() override { - // Disable kWinDelaySpellcheckServiceInit, as the case where it's enabled - // is tested in SpellcheckServiceWindowsDictionaryMappingUnitTestDelayInit. -- feature_list_.InitWithFeatures( -- /*enabled_features=*/{spellcheck::kWinUseBrowserSpellChecker}, -- /*disabled_features=*/{spellcheck::kWinDelaySpellcheckServiceInit}); +- feature_list_.InitAndDisableFeature( +- spellcheck::kWinDelaySpellcheckServiceInit); - } -}; + public testing::WithParamInterface {}; @@ -98,10 +94,10 @@ index 42c96836486ad0b8d8a436c44f0989e981b1be36..4140c914223a56f300688023a931ac32 static const DictionaryMappingTestCase kHybridDictionaryMappingsParams[] = { DictionaryMappingTestCase({"en-CA", "en-CA", "en-CA", "en", "en"}), diff --git a/components/spellcheck/common/spellcheck_features.cc b/components/spellcheck/common/spellcheck_features.cc -index 9942d3a72004b75161579f4cda252a88b32459b4..3b7bb204a54da11bcf5404b8214d7c4da851227e 100644 +index c1b7636ea528c8162d71e2f71b2414e3ebb7a9f8..4927c08e372338619f8c43d693a8cf6196101933 100644 --- a/components/spellcheck/common/spellcheck_features.cc +++ b/components/spellcheck/common/spellcheck_features.cc -@@ -29,7 +29,7 @@ BASE_FEATURE(kWinUseBrowserSpellChecker, +@@ -43,7 +43,7 @@ ScopedDisableBrowserSpellCheckerForTesting:: BASE_FEATURE(kWinDelaySpellcheckServiceInit, "WinDelaySpellcheckServiceInit", diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 8ca070c2201d1..540266a815fb6 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 2fb8a5e9b9f185fa7ebc5cb3ddb28ec96517276c..98ee9b41922ff064a26deb38f911dc1a931b90ec 100644 +index ed299d6787339b2ce82f5e63dbec7c4d385fb4bb..4bd4398de8a72a77f623e2158438342f7b389651 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1334,7 +1334,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1343,7 +1343,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch index e9cb3ce1f94a1..878bf27b60e98 100644 --- a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch +++ b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch @@ -15,10 +15,10 @@ short-circuit all the permissions checks in MSDC for now to allow us to unduplicate this code. diff --git a/components/webrtc/media_stream_devices_controller.cc b/components/webrtc/media_stream_devices_controller.cc -index 9cec3223124ce856ab8bbe95d2fdf5c1f08bed06..f2c6f3dea44084d6de1a79776707c9e020904586 100644 +index efbea8c15b096344b0cc65cc337a9cdbd727cb55..ca31bba7fc6daf68e6862554a70032dfdc8285b5 100644 --- a/components/webrtc/media_stream_devices_controller.cc +++ b/components/webrtc/media_stream_devices_controller.cc -@@ -56,7 +56,8 @@ bool PermissionIsRequested(blink::PermissionType permission, +@@ -57,7 +57,8 @@ bool PermissionIsRequested(blink::PermissionType permission, void MediaStreamDevicesController::RequestPermissions( const content::MediaStreamRequest& request, MediaStreamDeviceEnumerator* enumerator, @@ -28,7 +28,7 @@ index 9cec3223124ce856ab8bbe95d2fdf5c1f08bed06..f2c6f3dea44084d6de1a79776707c9e0 content::RenderFrameHost* rfh = content::RenderFrameHost::FromID( request.render_process_id, request.render_frame_id); // The RFH may have been destroyed by the time the request is processed. -@@ -92,6 +93,7 @@ void MediaStreamDevicesController::RequestPermissions( +@@ -93,6 +94,7 @@ void MediaStreamDevicesController::RequestPermissions( std::vector permission_types; @@ -36,7 +36,7 @@ index 9cec3223124ce856ab8bbe95d2fdf5c1f08bed06..f2c6f3dea44084d6de1a79776707c9e0 content::PermissionController* permission_controller = web_contents->GetBrowserContext()->GetPermissionController(); -@@ -152,19 +154,25 @@ void MediaStreamDevicesController::RequestPermissions( +@@ -153,19 +155,25 @@ void MediaStreamDevicesController::RequestPermissions( permission_types.push_back(blink::PermissionType::CAMERA_PAN_TILT_ZOOM); } } @@ -69,7 +69,7 @@ index 9cec3223124ce856ab8bbe95d2fdf5c1f08bed06..f2c6f3dea44084d6de1a79776707c9e0 } MediaStreamDevicesController::~MediaStreamDevicesController() { -@@ -434,6 +442,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( +@@ -435,6 +443,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( return false; } @@ -77,7 +77,7 @@ index 9cec3223124ce856ab8bbe95d2fdf5c1f08bed06..f2c6f3dea44084d6de1a79776707c9e0 // TODO(raymes): This function wouldn't be needed if // PermissionManager::RequestPermissions returned a denial reason. content::PermissionResult result = -@@ -444,6 +453,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( +@@ -445,6 +454,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( DCHECK_EQ(blink::mojom::PermissionStatus::DENIED, result.status); return true; } diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 72af31d1ff1cd..754c5c9b97c33 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,13 +22,13 @@ 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 200131d89e8616054c321841b4b27fbee67b5d88..31678701d6ee0aefdb86c046178abdf11277de3d 100644 +index ad5b92f58eacf71c854a4559df44cf12cd59becf..beafe321328aabf6751508b3a5a756626b3670e8 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1800,9 +1800,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1798,9 +1798,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( - cmd_line.get(), IsJitDisabled()); + *cmd_line, IsJitDisabled()); +#else +#if BUILDFLAG(USE_ZYGOTE) + bool use_zygote = !cmd_line->HasSwitch(switches::kNoZygote); @@ -42,7 +42,7 @@ index 200131d89e8616054c321841b4b27fbee67b5d88..31678701d6ee0aefdb86c046178abdf1 auto file_data = std::make_unique(); diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc -index 83f3f0d60d9832112f50fbd4ef9fff98ef09d7c4..3ab11ff1a934192d439db7d2102248fa73b47183 100644 +index ef00d5539e5b859d23c6d137c179a88c7c41fd4c..aa2372ec406bdbd9b1b9a672784ca2df704892ff 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc @@ -33,6 +33,9 @@ namespace content { @@ -55,7 +55,7 @@ index 83f3f0d60d9832112f50fbd4ef9fff98ef09d7c4..3ab11ff1a934192d439db7d2102248fa const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); base::CommandLine::StringType renderer_prefix = -@@ -62,6 +65,9 @@ RendererSandboxedProcessLauncherDelegateWin:: +@@ -63,6 +66,9 @@ RendererSandboxedProcessLauncherDelegateWin:: GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()), renderer_app_container_disabled_( GetContentClient()->browser()->IsRendererAppContainerDisabled()) { @@ -66,7 +66,7 @@ index 83f3f0d60d9832112f50fbd4ef9fff98ef09d7c4..3ab11ff1a934192d439db7d2102248fa dynamic_code_can_be_disabled_ = true; return; diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h -index 8f6531e5aa2ce7f9faf4c6b24652366fe74941b1..9377b8aefbf3c67ce6a24f0804e913069c0594d2 100644 +index bd21850f7c700c537445cb6541446b2e9793750e..0d86702e124014b518382500c6ce1dac1a9a5276 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h @@ -18,6 +18,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate @@ -81,9 +81,9 @@ index 8f6531e5aa2ce7f9faf4c6b24652366fe74941b1..9377b8aefbf3c67ce6a24f0804e91306 ~RendererSandboxedProcessLauncherDelegate() override = default; #if BUILDFLAG(USE_ZYGOTE) -@@ -29,6 +34,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate - #endif // BUILDFLAG(IS_MAC) +@@ -30,6 +35,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate + // sandbox::policy::SandboxDelegate: sandbox::mojom::Sandbox GetSandboxType() override; + + private: diff --git a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch index f435f023d3c15..3fb8079e97b81 100644 --- a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch +++ b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch @@ -6,7 +6,7 @@ Subject: unsandboxed_ppapi_processes_skip_zygote.patch Unsandboxed ppapi processes should skip zygote. diff --git a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc -index 971044297de82aa6f79714481eaf713485d8a636..d46528d14a13308866e1f91b6d36f0f8aedf016d 100644 +index f2b5c3b52a2c16448bb4d7b8f35dd110f66da0f4..9b4e8205139af69a15e7a64bf7a9fd08733d3f0b 100644 --- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc +++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc @@ -10,6 +10,7 @@ @@ -16,8 +16,8 @@ index 971044297de82aa6f79714481eaf713485d8a636..d46528d14a13308866e1f91b6d36f0f8 +#include "sandbox/policy/switches.h" #if BUILDFLAG(IS_WIN) - #include "sandbox/policy/features.h" -@@ -68,6 +69,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( + #include "sandbox/policy/win/sandbox_win.h" +@@ -54,6 +55,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::InitializeConfig( ZygoteCommunication* PpapiPluginSandboxedProcessLauncherDelegate::GetZygote() { const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); diff --git a/patches/chromium/upload_list_add_loadsync_method.patch b/patches/chromium/upload_list_add_loadsync_method.patch index e34c04c06eedf..cfba32c6162b9 100644 --- a/patches/chromium/upload_list_add_loadsync_method.patch +++ b/patches/chromium/upload_list_add_loadsync_method.patch @@ -9,10 +9,10 @@ deprecated, and this API should be removed once the deprecated behavior is no longer supported. diff --git a/components/upload_list/upload_list.cc b/components/upload_list/upload_list.cc -index bc1432727df939385fbf58f4f427ff470c2c8361..7edf9e3f7140d387c7ce07531fb3b48f9014076c 100644 +index b19139c33758758970fd38aa87aaeb351e409edd..73498817f53236091f7be2c20d957c24c15b948e 100644 --- a/components/upload_list/upload_list.cc +++ b/components/upload_list/upload_list.cc -@@ -72,6 +72,10 @@ void UploadList::Load(base::OnceClosure callback) { +@@ -65,6 +65,10 @@ void UploadList::Load(base::OnceClosure callback) { base::BindOnce(&UploadList::OnLoadComplete, this)); } @@ -24,10 +24,10 @@ index bc1432727df939385fbf58f4f427ff470c2c8361..7edf9e3f7140d387c7ce07531fb3b48f const base::Time& end, base::OnceClosure callback) { diff --git a/components/upload_list/upload_list.h b/components/upload_list/upload_list.h -index 34aeeabde40111897b3e300861a0967a31887e3f..450c373f7d69986037fbd77bf9b1bcec88cdc5b3 100644 +index 3b84761fdd397ec41cd7ed2b675467c95e6d0faf..43b78dfbb0bc0c8897d96c20727cb5502f1f2a12 100644 --- a/components/upload_list/upload_list.h +++ b/components/upload_list/upload_list.h -@@ -77,6 +77,8 @@ class UploadList : public base::RefCountedThreadSafe { +@@ -81,6 +81,8 @@ class UploadList : public base::RefCountedThreadSafe { // overwrite the previously supplied one, and the first will not be called. void Load(base::OnceClosure callback); diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 109bb2875c003..2734b3c370438 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 6fbf7fc57e7188d4fc323e0276a85a58c3d9cbc4..2e3b9ebd5be217eb892fea1cce09afee4d05f2e3 100644 +index 61d8392b46864a9480913d8b727a5f9f156f8e87..2b6e805b6ae26ab4030b108a624b7d405a9cad85 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3167,6 +3167,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3170,6 +3170,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 6fbf7fc57e7188d4fc323e0276a85a58c3d9cbc4..2e3b9ebd5be217eb892fea1cce09afee std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3177,6 +3184,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3180,6 +3187,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -35,10 +35,10 @@ index 6fbf7fc57e7188d4fc323e0276a85a58c3d9cbc4..2e3b9ebd5be217eb892fea1cce09afee CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index 54c0a5f2c347af943f4720953889a10909f5d248..b32c7c02d85794f684ccbe0a7a6c9cf1aee695e9 100644 +index 433f3fe22d4223c57dcc8cc5875e3d6b4adf5b73..ac139f0d0b01f92b03c188f4506c87c5e3f4b267 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -94,10 +94,13 @@ class BrowserContext; +@@ -96,10 +96,13 @@ class BrowserContext; class BrowserPluginGuestDelegate; class RenderFrameHost; class RenderViewHost; @@ -52,7 +52,7 @@ index 54c0a5f2c347af943f4720953889a10909f5d248..b32c7c02d85794f684ccbe0a7a6c9cf1 class WebUI; struct DropData; struct MHTMLGenerationParams; -@@ -240,6 +243,10 @@ class WebContents : public PageNavigator, +@@ -242,6 +245,10 @@ class WebContents : public PageNavigator, network::mojom::WebSandboxFlags starting_sandbox_flags = network::mojom::WebSandboxFlags::kNone; diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index af2b83bbcca3f..74828572de77d 100644 --- a/patches/chromium/webview_cross_drag.patch +++ b/patches/chromium/webview_cross_drag.patch @@ -8,7 +8,7 @@ This allows dragging and dropping between s. Originally landed in https://github.com/electron/libchromiumcontent/pull/267 diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc -index 78ce9650aad29217d786e55a93ffd4c26e10d3a4..812777a6bd88a50bb90a7f5a6bf3c061284e1380 100644 +index 37b75adc1ef25d1688ea63da083c8dd764e953c8..63175581edc351e3dc13caa97ab0b86d1a7791c8 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -919,10 +919,7 @@ bool WebContentsViewAura::IsValidDragTarget( @@ -24,7 +24,7 @@ index 78ce9650aad29217d786e55a93ffd4c26e10d3a4..812777a6bd88a50bb90a7f5a6bf3c061 //////////////////////////////////////////////////////////////////////////////// diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm -index 1af80994a4a64cce27dfc8a46e6cb68bbbd51b1b..a2f1aa2f1a9792bb6978173c30cc2b9bb18108ab 100644 +index 6abd9ae6eafe6c5adfaa6a871ffad8e5e7cf44e2..87a97bd14d6ac028eb020197cfe40f41fa9d61a8 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm @@ -389,9 +389,7 @@ - (void)resetDragStartTrackers { diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index fa82e0181ca3a..a5d1fbfd89f43 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -14,10 +14,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 080c99e23a4a81a4ddbf8a7689c8c10b66f9e039..000a22639c2e3f9ef29a0be31d60756295e71fe9 100644 +index 5a4104959d8ac39938d40da413b76a91eb8ae002..b9c0d77aefa3194fc6a749faa3f7923d1c400505 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6726,6 +6726,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6857,6 +6857,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index f09009e683fed..1d51cf4f9c5ea 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,10 +26,10 @@ index 77f2c4fbf8c886c5c622f41d0b9da67d09b7d331..7aa2059f33dfa92828beec95f4716775 // 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 a0811daead7bc6b44f8ad7210bc5dcd89c92c592..0b9e29a204f6b06e064452bc70c688e8e1f651fa 100644 +index 53bfdfdc340596b1bf7eee664e5667f8e74d6a7a..91147e2b16c2f8f4c80e0ab2262b89d18cff59af 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -856,6 +856,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -821,6 +821,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index a0811daead7bc6b44f8ad7210bc5dcd89c92c592..0b9e29a204f6b06e064452bc70c688e8 const v8::Local& worker) { GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index f9b61ff32e3e76e73e82b5785521160c413c4dd5..64b38b09c9c6f0a67fe78fa80e621f3c5c8340f0 100644 +index beb3fab6e4c3a8b74482d0fc85f22af4b9e2cbd9..b1c2949e621d210c88a8eae812cc42f3d4c5ac0d 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -182,6 +182,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -180,6 +180,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -55,10 +55,10 @@ index f9b61ff32e3e76e73e82b5785521160c413c4dd5..64b38b09c9c6f0a67fe78fa80e621f3c const blink::WebSecurityOrigin& script_origin) override; blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel() diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index b2de9ae25b7acfae950a68e77b0f85fa619d6fc9..375442953c6284d8b5936d3554a1eb5892e42cdb 100644 +index 7b45e20cd208ffe01005898b5345a478b74fb96a..0933ffefcb4e736607f42729d334b161544c4bdc 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -646,6 +646,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -632,6 +632,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -67,10 +67,10 @@ index b2de9ae25b7acfae950a68e77b0f85fa619d6fc9..375442953c6284d8b5936d3554a1eb58 const WebSecurityOrigin& script_origin) { return false; diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc -index 26406732de36f38635ba19e7db6f7a9e7a4e946f..995f304bcfebb734c30c1230e96a4014a78b345f 100644 +index 1073865e634bb5a435ec638a4abc14462e4b16cb..33408c339c21704c433377ed3c7462c7f4b0b8f3 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -749,6 +749,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -754,6 +754,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { } pause_handle_.reset(); 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 fc0c267bd139e..88d0dbb5f02af 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 @@ -35,10 +35,10 @@ index 7aa2059f33dfa92828beec95f4716775e7291fed..df919b894d4f29274696806444d034d4 // 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 0b9e29a204f6b06e064452bc70c688e8e1f651fa..03463a737df6f168dd873a156ceecf478d124241 100644 +index 91147e2b16c2f8f4c80e0ab2262b89d18cff59af..34b87e12629e24ab6dd44fc42a60e5e8395ba363 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -868,6 +868,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -833,6 +833,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index 0b9e29a204f6b06e064452bc70c688e8e1f651fa..03463a737df6f168dd873a156ceecf47 const blink::WebSecurityOrigin& script_origin) { return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 64b38b09c9c6f0a67fe78fa80e621f3c5c8340f0..018c8a69e79c69374f25db973ea61f60bdd9dfae 100644 +index b1c2949e621d210c88a8eae812cc42f3d4c5ac0d..d1e7646bee788f261352265b79627e0c3c2a666a 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -182,6 +182,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -180,6 +180,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -65,10 +65,10 @@ index 64b38b09c9c6f0a67fe78fa80e621f3c5c8340f0..018c8a69e79c69374f25db973ea61f60 bool AllowScriptExtensionForServiceWorker( const blink::WebSecurityOrigin& script_origin) override; diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index 375442953c6284d8b5936d3554a1eb5892e42cdb..d5be14053c68a37033a5648bc0bf5fdf00e396ad 100644 +index 0933ffefcb4e736607f42729d334b161544c4bdc..a36fbc621b0fe0a85a718425653f2ac48a9c385f 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -646,6 +646,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -632,6 +632,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/config.json b/patches/config.json index 703821a3e6dcd..db929cb196534 100644 --- a/patches/config.json +++ b/patches/config.json @@ -1,8 +1,6 @@ { "src/electron/patches/chromium": "src", - "src/electron/patches/angle": "src/third_party/angle", - "src/electron/patches/boringssl": "src/third_party/boringssl/src", "src/electron/patches/devtools_frontend": "src/third_party/devtools-frontend/src", diff --git a/patches/ffmpeg/link_with_loader_path.patch b/patches/ffmpeg/link_with_loader_path.patch index 6665cd91ff354..9208d469fa462 100644 --- a/patches/ffmpeg/link_with_loader_path.patch +++ b/patches/ffmpeg/link_with_loader_path.patch @@ -15,10 +15,10 @@ include the out dir, and the linker won't be able to find ffmpeg.dylib because of so. diff --git a/BUILD.gn b/BUILD.gn -index 5ea4e373360f1e09d8295be89beb063f482ec165..4fd65674d1a2a94868de6aa32bdde04a4b9c2662 100755 +index 439635ceb91a6662a913b636c0314c5cbed986ac..f32d7200b8c27a1d5e8a0e5e57281b8de209d5d4 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -448,7 +448,7 @@ if (is_component_ffmpeg) { +@@ -453,7 +453,7 @@ if (is_component_ffmpeg) { if (!is_component_build) { if (is_mac) { diff --git a/patches/v8/.patches b/patches/v8/.patches index bd2409a468f17..d266dc584ca57 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -8,4 +8,3 @@ fix_build_deprecated_attribute_for_older_msvc_versions.patch fix_disable_implies_dcheck_for_node_stream_array_buffers.patch force_cppheapcreateparams_to_be_noncopyable.patch chore_allow_customizing_microtask_policy_per_context.patch -disable_the_use_of_preserve_most_on_arm64_windows.patch diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 0286a05968245..cf48f25ccf72f 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,10 +9,10 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index e1f23f17969f90df9becdcf7c0015b27cd973b4a..e689a0b35a0011ba14a94c3ab749043cddf93fb9 100644 +index fa2b6c77961ee169078f29c43655037573ba6a04..06dfd5bd543685e79ef33e84942721c91bb36624 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -674,7 +674,7 @@ config("internal_config") { +@@ -681,7 +681,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index e1f23f17969f90df9becdcf7c0015b27cd973b4a..e689a0b35a0011ba14a94c3ab749043c defines += [ "BUILDING_V8_SHARED" ] } -@@ -6320,7 +6320,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6327,7 +6327,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 7a9175bd2a7d2..7e389a1f8d342 100644 --- a/patches/v8/dcheck.patch +++ b/patches/v8/dcheck.patch @@ -6,10 +6,10 @@ Subject: dcheck.patch https://github.com/auchenberg/volkswagen diff --git a/src/api/api.cc b/src/api/api.cc -index 81c7d1e3f9b29a82224a21abf6b2574e3547c564..9199619c4752e95eb42e11704531de8872f5c0e4 100644 +index 6ae5bda0ac539385b16c96a29db5d2f02397061d..2328b7b6a0ea1908fd9e3093d9925e6b7d4af124 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9522,7 +9522,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9818,7 +9818,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { diff --git a/patches/v8/disable_the_use_of_preserve_most_on_arm64_windows.patch b/patches/v8/disable_the_use_of_preserve_most_on_arm64_windows.patch deleted file mode 100644 index 8b34dd70da735..0000000000000 --- a/patches/v8/disable_the_use_of_preserve_most_on_arm64_windows.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Clemens Backes -Date: Thu, 2 Feb 2023 14:38:14 +0100 -Subject: Disable the use of preserve_most on arm64 Windows - -We see crashes on arm64 on Windows. Disable the use of preserve_most -there, until we figure out (and fix) the root cause. - -R=mlippautz@chromium.org - -Bug: chromium:1409934 -Change-Id: Ic913039d36d158fb5ad368915d95c250d8724a07 -Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218354 -Commit-Queue: Clemens Backes -Reviewed-by: Michael Lippautz -Cr-Commit-Position: refs/heads/main@{#85634} -(cherry picked from commit e33c3a09b31af5b69286f904a378fcbfb36a726d) - -diff --git a/include/v8config.h b/include/v8config.h -index fd762d87f5ebd32ccb23ff0c6383a37a5093ac78..6cffeaa5ad21826123c8dda487fc6c65b7d03ed2 100644 ---- a/include/v8config.h -+++ b/include/v8config.h -@@ -346,12 +346,15 @@ path. Add it with -I to the command line - # define V8_HAS_ATTRIBUTE_NONNULL (__has_attribute(nonnull)) - # define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline)) - # define V8_HAS_ATTRIBUTE_UNUSED (__has_attribute(unused)) --// Support for the "preserve_most" attribute is incomplete on 32-bit, and we see --// failures in component builds. Thus only use it in 64-bit non-component builds --// for now. --#if (defined(_M_X64) || defined(__x86_64__) || defined(__AARCH64EL__) || \ -- defined(_M_ARM64)) /* x64 or arm64 */ \ -- && !defined(COMPONENT_BUILD) -+// Support for the "preserve_most" attribute is limited: -+// - 32-bit platforms do not implement it, -+// - component builds fail because _dl_runtime_resolve clobbers registers, -+// - we see crashes on arm64 on Windows (https://crbug.com/1409934), which can -+// hopefully be fixed in the future. -+#if (defined(_M_X64) || defined(__x86_64__) /* x64 (everywhere) */ \ -+ || ((defined(__AARCH64EL__) || defined(_M_ARM64)) /* arm64, but ... */ \ -+ && !defined(_WIN32))) /* not on windows */ \ -+ && !defined(COMPONENT_BUILD) /* no component build */ - # define V8_HAS_ATTRIBUTE_PRESERVE_MOST (__has_attribute(preserve_most)) - #endif - # define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility)) diff --git a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch index 873802cd81853..7201df4d209f6 100644 --- a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch +++ b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch @@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not contain any standard C++ library exports (e.g. `std::ostringstream`). diff --git a/BUILD.gn b/BUILD.gn -index de5bb0c5e7c9cd85211eeb073b828b793c8f49b3..9a3f28419a52b3c8433ca024d94b7a9445efdedb 100644 +index fc743546cff1cd3b6b66b1f1a155f33103b24e0b..592d77441daba30db4b7d304bec1a181bc40c25a 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -674,6 +674,10 @@ config("internal_config") { +@@ -681,6 +681,10 @@ config("internal_config") { ":cppgc_header_features", ] diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index f8f8b4c21089e..0ba3948cf5ca5 100644 --- a/patches/v8/export_symbols_needed_for_windows_build.patch +++ b/patches/v8/export_symbols_needed_for_windows_build.patch @@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build These symbols are required to build v8 with BUILD_V8_SHARED on Windows. diff --git a/src/objects/objects.h b/src/objects/objects.h -index 85e1c6012a04414123cf9e4c30af20bd87764921..0ffa0002bd853a771f113a13936ec6d22baac6d8 100644 +index d224bc3c6d0d93f7af7e418888247149f4b35ecf..e5df06019eb60eca11bb5b03d7142363f8c8dce5 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -973,7 +973,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -974,7 +974,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; // Utility superclass for stack-allocated objects that must be updated // on gc. It provides two ways for the gc to update instances, either // iterating or updating after gc. diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index e0e2eb64a67b4..fc2455ff2741d 100644 --- a/patches/v8/expose_mksnapshot.patch +++ b/patches/v8/expose_mksnapshot.patch @@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch Needed in order to target mksnapshot for mksnapshot zip. diff --git a/BUILD.gn b/BUILD.gn -index e689a0b35a0011ba14a94c3ab749043cddf93fb9..de5bb0c5e7c9cd85211eeb073b828b793c8f49b3 100644 +index 06dfd5bd543685e79ef33e84942721c91bb36624..fc743546cff1cd3b6b66b1f1a155f33103b24e0b 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -6332,7 +6332,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6339,7 +6339,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch index 9aa4012938b49..d19852eb4b99a 100644 --- a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch @@ -6,10 +6,10 @@ Subject: fix: usage of c++ [[deprecated]] attribute for older msvc versions This attribute can only be used in all contexts in Visual Studio 2019 diff --git a/include/v8config.h b/include/v8config.h -index a967d92c39c1518831f60eeb443409e5284bba6c..fd762d87f5ebd32ccb23ff0c6383a37a5093ac78 100644 +index 9410eb413555672191eeeb39922301eb5addb4ca..c27eef731b3d81c8b8bd4e1a618551ffe05646aa 100644 --- a/include/v8config.h +++ b/include/v8config.h -@@ -526,10 +526,13 @@ path. Add it with -I to the command line +@@ -536,10 +536,13 @@ path. Add it with -I to the command line # define V8_PRESERVE_MOST /* NOT SUPPORTED */ #endif @@ -25,7 +25,7 @@ index a967d92c39c1518831f60eeb443409e5284bba6c..fd762d87f5ebd32ccb23ff0c6383a37a #else # define V8_DEPRECATED(message) #endif -@@ -537,7 +540,11 @@ path. Add it with -I to the command line +@@ -547,7 +550,11 @@ path. Add it with -I to the command line // A macro (V8_DEPRECATE_SOON) to make it easier to see what will be deprecated. #if defined(V8_IMMINENT_DEPRECATION_WARNINGS) @@ -38,7 +38,7 @@ index a967d92c39c1518831f60eeb443409e5284bba6c..fd762d87f5ebd32ccb23ff0c6383a37a #else # define V8_DEPRECATE_SOON(message) #endif -@@ -571,7 +578,7 @@ path. Add it with -I to the command line +@@ -581,7 +588,7 @@ path. Add it with -I to the command line END_ALLOW_USE_DEPRECATED() diff --git a/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch b/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch index 82cd40f1b9cce..45ff652890ad8 100644 --- a/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch +++ b/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch @@ -18,7 +18,7 @@ This patch can be removed when streams support rab/gsab, or when support is synchronized across both v8 and node. diff --git a/src/objects/js-array-buffer.cc b/src/objects/js-array-buffer.cc -index 3695e9a17e5bb435a9b8a1a79ee68fab5c83cdb3..1c07176ef3c876cb7cb456dad4ffb9bcbf7a125b 100644 +index fc6578d7a496fa9c825291b9c2be7cdf71b161de..7b36db67a30130c36e27d03a31aaa76f06f923b3 100644 --- a/src/objects/js-array-buffer.cc +++ b/src/objects/js-array-buffer.cc @@ -73,9 +73,9 @@ void JSArrayBuffer::Attach(std::shared_ptr backing_store) { diff --git a/patches/v8/workaround_an_undefined_symbol_error.patch b/patches/v8/workaround_an_undefined_symbol_error.patch index 7220d97062992..f94c8a58d2e07 100644 --- a/patches/v8/workaround_an_undefined_symbol_error.patch +++ b/patches/v8/workaround_an_undefined_symbol_error.patch @@ -12,10 +12,10 @@ By moving some functions out of the the arm64-assembler header file, this error no longer seems to happen. diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc -index 1110345f6b1aa8dff61512d211191e3389acb51b..f85fb8b4cc34eec9444743851d8714b10f277f3d 100644 +index 69244dedf74b80d7fd9222c474488c571bdee089..bfd894139df41e63539e8c22e7d87c91e8b3a7e7 100644 --- a/src/codegen/arm64/assembler-arm64.cc +++ b/src/codegen/arm64/assembler-arm64.cc -@@ -3620,6 +3620,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift, +@@ -3792,6 +3792,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift, ImmMoveWide(static_cast(imm)) | ShiftMoveWide(shift)); } @@ -39,10 +39,10 @@ index 1110345f6b1aa8dff61512d211191e3389acb51b..f85fb8b4cc34eec9444743851d8714b1 const Operand& operand, FlagsUpdate S, AddSubOp op) { DCHECK_EQ(rd.SizeInBits(), rn.SizeInBits()); diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h -index ea079a9d6af6dca46f66004d4399f49e6e8fe6d5..4b9d3a8533910bbdbd8c7b073739dbb5699ab6e8 100644 +index 431a1abba7a88a2c422cfb3103c5b56b57b98e30..decdee799f083ed2b62fb7f76c39511de25f0c35 100644 --- a/src/codegen/arm64/assembler-arm64.h +++ b/src/codegen/arm64/assembler-arm64.h -@@ -2116,11 +2116,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { +@@ -2743,11 +2743,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { return rm.code() << Rm_offset; } @@ -55,7 +55,7 @@ index ea079a9d6af6dca46f66004d4399f49e6e8fe6d5..4b9d3a8533910bbdbd8c7b073739dbb5 static Instr Ra(CPURegister ra) { DCHECK_NE(ra.code(), kSPRegInternalCode); -@@ -2144,15 +2140,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { +@@ -2771,15 +2767,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { // These encoding functions allow the stack pointer to be encoded, and // disallow the zero register. diff --git a/script/node-disabled-tests.json b/script/node-disabled-tests.json index 74c1470f11cac..8f4f96256c202 100644 --- a/script/node-disabled-tests.json +++ b/script/node-disabled-tests.json @@ -33,6 +33,7 @@ "parallel/test-inspector-multisession-ws", "parallel/test-inspector-port-zero-cluster", "parallel/test-inspector-tracing-domain", + "parallel/test-intl", "parallel/test-module-loading-globalpaths", "parallel/test-module-version", "parallel/test-openssl-ca-options", diff --git a/script/prepare-appveyor.js b/script/prepare-appveyor.js index aef52619038c4..f16dd8ece8def 100644 --- a/script/prepare-appveyor.js +++ b/script/prepare-appveyor.js @@ -14,8 +14,8 @@ const ROLLER_BRANCH_PATTERN = /^roller\/chromium$/; const DEFAULT_BUILD_CLOUD_ID = '1598'; const DEFAULT_BUILD_CLOUD = 'electronhq-16-core'; -const DEFAULT_BAKE_BASE_IMAGE = 'e-111.0.5560.0-node18'; -const DEFAULT_BUILD_IMAGE = 'e-111.0.5560.0-node18'; +const DEFAULT_BAKE_BASE_IMAGE = 'e-112.0.5607.0-vs2022'; +const DEFAULT_BUILD_IMAGE = 'e-112.0.5607.0-vs2022'; const appveyorBakeJob = 'electron-bake-image'; const appVeyorJobs = { diff --git a/script/setup-win-for-dev.bat b/script/setup-win-for-dev.bat index d311c0fc6226b..ee71a3ab710d5 100644 --- a/script/setup-win-for-dev.bat +++ b/script/setup-win-for-dev.bat @@ -1,7 +1,7 @@ REM Parameters vs_buildtools.exe download link and wsdk version @ECHO OFF -SET wsdk=10SDK.20348 +SET wsdk=11SDK.22621 REM Check for disk space Rem 543210987654321 @@ -50,10 +50,10 @@ set chocolateyUseWindowsCompression='true' SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" REM Install Visual Studio Toolchain -choco install visualstudio2019buildtools --package-parameters "--quiet --wait --norestart --nocache --installPath ""%ProgramFiles(x86)%/Microsoft Visual Studio/2019/Community"" --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.140 --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.MFC.ARM64 --add Microsoft.VisualStudio.Component.Windows%wsdk% --includeRecommended" +choco install visualstudio2022buildtools --package-parameters "--quiet --wait --norestart --nocache --installPath ""%ProgramFiles%/Microsoft Visual Studio/2022/Community"" --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.140 --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.MFC.ARM64 --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.Windows%wsdk% --includeRecommended" REM Install Windows SDK -choco install windows-sdk-10-version-2104-all +choco install windows-sdk-11-version-22h2-all REM Install nodejs python git and yarn needed dependencies choco install -y --force nodejs --version=18.12.1 @@ -67,4 +67,7 @@ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git C:\de SET PATH=%PATH%;C:\depot_tools\ REM Add symstore to PATH permanently -setx path "%%path%%;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64" \ No newline at end of file +setx path "%%path%%;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64" + +REM Add vs2022_install to environment variables +SET vs2022_install="C:\Program Files\Microsoft Visual Studio\2022\Community" \ No newline at end of file diff --git a/script/zip_manifests/dist_zip.win.arm64.manifest b/script/zip_manifests/dist_zip.win.arm64.manifest index 20a089bcd67c6..5d8deb41a53b8 100755 --- a/script/zip_manifests/dist_zip.win.arm64.manifest +++ b/script/zip_manifests/dist_zip.win.arm64.manifest @@ -2,6 +2,7 @@ LICENSE LICENSES.chromium.html chrome_100_percent.pak chrome_200_percent.pak +d3dcompiler_47.dll electron.exe ffmpeg.dll icudtl.dat diff --git a/shell/app/electron_main_win.cc b/shell/app/electron_main_win.cc index a8b45f7166831..8fe758925662f 100644 --- a/shell/app/electron_main_win.cc +++ b/shell/app/electron_main_win.cc @@ -23,7 +23,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/win/dark_mode_support.h" #include "base/win/windows_version.h" -#include "components/browser_watcher/exit_code_watcher_win.h" +#include "chrome/app/exit_code_watcher_win.h" #include "components/crash/core/app/crash_switches.h" #include "components/crash/core/app/run_as_crashpad_handler_win.h" #include "content/public/app/content_main.h" @@ -183,7 +183,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) { if (process_type == crash_reporter::switches::kCrashpadHandler) { // Check if we should monitor the exit code of this process - std::unique_ptr exit_code_watcher; + std::unique_ptr exit_code_watcher; // Retrieve the client process from the command line crashpad::InitialClientData initial_client_data; @@ -196,8 +196,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) { ::GetCurrentProcess(), &duplicate_handle, PROCESS_QUERY_INFORMATION, FALSE, DUPLICATE_SAME_ACCESS)) { base::Process parent_process(duplicate_handle); - exit_code_watcher = - std::make_unique(); + exit_code_watcher = std::make_unique(); if (exit_code_watcher->Initialize(std::move(parent_process))) { exit_code_watcher->StartWatching(); } diff --git a/shell/browser/api/electron_api_content_tracing.cc b/shell/browser/api/electron_api_content_tracing.cc index 383c9327e099c..f7e64cb2bbccc 100644 --- a/shell/browser/api/electron_api_content_tracing.cc +++ b/shell/browser/api/electron_api_content_tracing.cc @@ -44,8 +44,7 @@ struct Converter { base::Value::Dict memory_dump_config; if (ConvertFromV8(isolate, val, &memory_dump_config)) { - *out = base::trace_event::TraceConfig( - base::Value(std::move(memory_dump_config))); + *out = base::trace_event::TraceConfig(std::move(memory_dump_config)); return true; } diff --git a/shell/browser/api/electron_api_crash_reporter.cc b/shell/browser/api/electron_api_crash_reporter.cc index 37388810faa96..a7ba78e86f95d 100644 --- a/shell/browser/api/electron_api_crash_reporter.cc +++ b/shell/browser/api/electron_api_crash_reporter.cc @@ -221,14 +221,15 @@ v8::Local GetUploadedReports(v8::Isolate* isolate) { electron::ScopedAllowBlockingForElectron allow_blocking; list->LoadSync(); } - std::vector uploads; + constexpr size_t kMaxUploadReportsToList = std::numeric_limits::max(); - list->GetUploads(kMaxUploadReportsToList, &uploads); + const std::vector uploads = + list->GetUploads(kMaxUploadReportsToList); std::vector> result; - for (const auto& upload : uploads) { + for (auto* const upload : uploads) { result.push_back(gin::DataObjectBuilder(isolate) - .Set("date", upload.upload_time) - .Set("id", upload.upload_id) + .Set("date", upload->upload_time) + .Set("id", upload->upload_id) .Build()); } v8::Local v8_result = gin::ConvertToV8(isolate, result); diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index a16abd3b82302..1dc28c474139e 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -46,6 +46,7 @@ #include "net/http/http_util.h" #include "services/network/network_service.h" #include "services/network/public/cpp/features.h" +#include "services/network/public/mojom/clear_data_filter.mojom.h" #include "shell/browser/api/electron_api_app.h" #include "shell/browser/api/electron_api_cookies.h" #include "shell/browser/api/electron_api_data_pipe_holder.h" @@ -181,7 +182,8 @@ struct Converter { if (!ConvertFromV8(isolate, val, &options)) return false; if (GURL storage_origin; options.Get("origin", &storage_origin)) - out->storage_key = blink::StorageKey(url::Origin::Create(storage_origin)); + out->storage_key = blink::StorageKey::CreateFirstParty( + url::Origin::Create(storage_origin)); std::vector types; if (options.Get("storages", &types)) out->storage_types = GetStorageMask(types); @@ -874,9 +876,10 @@ v8::Local Session::GetExtension(const std::string& extension_id) { v8::Local Session::GetAllExtensions() { auto* registry = extensions::ExtensionRegistry::Get(browser_context()); - auto installed_extensions = registry->GenerateInstalledExtensionsSet(); + const extensions::ExtensionSet extensions = + registry->GenerateInstalledExtensionsSet(); std::vector extensions_vector; - for (const auto& extension : *installed_extensions) { + for (const auto& extension : extensions) { if (extension->location() != extensions::mojom::ManifestLocation::kComponent) extensions_vector.emplace_back(extension.get()); @@ -944,8 +947,8 @@ static void StartPreconnectOnUI(ElectronBrowserContext* browser_context, url::Origin origin = url::Origin::Create(url); std::vector requests = { {url::Origin::Create(url), num_sockets_to_preconnect, - net::NetworkAnonymizationKey(net::SchemefulSite(origin), - net::SchemefulSite(origin))}}; + net::NetworkAnonymizationKey::CreateSameSite( + net::SchemefulSite(origin))}}; browser_context->GetPreconnectManager()->Start(url, requests); } diff --git a/shell/browser/api/electron_api_url_loader.cc b/shell/browser/api/electron_api_url_loader.cc index b1dc3c097a8b4..5953ed9d655d4 100644 --- a/shell/browser/api/electron_api_url_loader.cc +++ b/shell/browser/api/electron_api_url_loader.cc @@ -741,6 +741,7 @@ void SimpleURLLoaderWrapper::OnResponseStarted( } void SimpleURLLoaderWrapper::OnRedirect( + const GURL& url_before_redirect, const net::RedirectInfo& redirect_info, const network::mojom::URLResponseHead& response_head, std::vector* removed_headers) { diff --git a/shell/browser/api/electron_api_url_loader.h b/shell/browser/api/electron_api_url_loader.h index 4d48cc2b90973..55f49a502e1bf 100644 --- a/shell/browser/api/electron_api_url_loader.h +++ b/shell/browser/api/electron_api_url_loader.h @@ -110,7 +110,8 @@ class SimpleURLLoaderWrapper // SimpleURLLoader callbacks void OnResponseStarted(const GURL& final_url, const network::mojom::URLResponseHead& response_head); - void OnRedirect(const net::RedirectInfo& redirect_info, + void OnRedirect(const GURL& url_before_redirect, + const net::RedirectInfo& redirect_info, const network::mojom::URLResponseHead& response_head, std::vector* removed_headers); void OnUploadProgress(uint64_t position, uint64_t total); diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 111879fd7cd85..b859f36822c14 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1517,8 +1517,7 @@ void WebContents::OnAudioStateChanged(bool audible) { EmitWithoutEvent("audio-state-changed", event); } -void WebContents::BeforeUnloadFired(bool proceed, - const base::TimeTicks& proceed_time) { +void WebContents::BeforeUnloadFired(bool proceed) { // Do nothing, we override this method just to avoid compilation error since // there are two virtual functions named BeforeUnloadFired. } @@ -2931,7 +2930,7 @@ void WebContents::Print(gin::Arguments* args) { // We've already done necessary parameter sanitization at the // JS level, so we can simply pass this through. - base::Value media_size(base::Value::Type::DICTIONARY); + base::Value media_size(base::Value::Type::DICT); if (options.Get("mediaSize", &media_size)) settings.Set(printing::kSettingMediaSize, std::move(media_size)); @@ -3872,8 +3871,8 @@ void WebContents::DevToolsIndexPath( if (devtools_indexing_jobs_.count(request_id) != 0) return; std::vector excluded_folders; - std::unique_ptr parsed_excluded_folders = - base::JSONReader::ReadDeprecated(excluded_folders_message); + absl::optional parsed_excluded_folders = + base::JSONReader::Read(excluded_folders_message); if (parsed_excluded_folders && parsed_excluded_folders->is_list()) { for (const base::Value& folder_path : parsed_excluded_folders->GetList()) { if (folder_path.is_string()) diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 763f22123aa8a..b6e2bcb0414cd 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -584,8 +584,7 @@ class WebContents : public ExclusiveAccessContext, const gfx::Size& pref_size) override; // content::WebContentsObserver: - void BeforeUnloadFired(bool proceed, - const base::TimeTicks& proceed_time) override; + void BeforeUnloadFired(bool proceed) override; void OnBackgroundColorChanged() override; void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 3ab8cc7631cae..a11289255f834 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1514,13 +1514,6 @@ std::string ElectronBrowserClient::GetApplicationLocale() { return *g_application_locale; } -base::FilePath ElectronBrowserClient::GetFontLookupTableCacheDir() { - base::FilePath user_data_dir; - base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); - DCHECK(!user_data_dir.empty()); - return user_data_dir.Append(FILE_PATH_LITERAL("FontLookupTableCache")); -} - bool ElectronBrowserClient::ShouldEnableStrictSiteIsolation() { // Enable site isolation. It is off by default in Chromium <= 69. return true; diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index cac12e8582be0..ebdf2719a8e45 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -71,7 +71,6 @@ class ElectronBrowserClient : public content::ContentBrowserClient, // content::ContentBrowserClient: std::string GetApplicationLocale() override; - base::FilePath GetFontLookupTableCacheDir() override; bool ShouldEnableStrictSiteIsolation() override; void BindHostReceiverForRenderer( content::RenderProcessHost* render_process_host, diff --git a/shell/browser/electron_browser_main_parts_mac.mm b/shell/browser/electron_browser_main_parts_mac.mm index 4ed64a912d769..0b808e4cec54d 100644 --- a/shell/browser/electron_browser_main_parts_mac.mm +++ b/shell/browser/electron_browser_main_parts_mac.mm @@ -9,7 +9,7 @@ #include "base/mac/bundle_locations.h" #include "base/mac/foundation_util.h" #include "base/path_service.h" -#include "services/device/public/cpp/geolocation/geolocation_manager_impl_mac.h" +#include "services/device/public/cpp/geolocation/system_geolocation_source_mac.h" #import "shell/browser/mac/electron_application.h" #include "shell/browser/mac/electron_application_delegate.h" #include "shell/common/electron_paths.h" @@ -31,7 +31,8 @@ setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; - geolocation_manager_ = device::GeolocationManagerImpl::Create(); + geolocation_manager_ = + device::SystemGeolocationSourceMac::CreateGeolocationManagerOnMac(); } void ElectronBrowserMainParts::FreeAppDelegate() { 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 afd536cef6dbf..c352112ae2c22 100644 --- a/shell/browser/extensions/api/resources_private/resources_private_api.cc +++ b/shell/browser/extensions/api/resources_private/resources_private_api.cc @@ -4,7 +4,6 @@ #include "shell/browser/extensions/api/resources_private/resources_private_api.h" -#include #include #include @@ -79,7 +78,7 @@ ResourcesPrivateGetStringsFunction::~ResourcesPrivateGetStringsFunction() = default; ExtensionFunction::ResponseAction ResourcesPrivateGetStringsFunction::Run() { - std::unique_ptr params( + absl::optional params( get_strings::Params::Create(args())); base::Value::Dict dict; diff --git a/shell/browser/extensions/api/tabs/tabs_api.cc b/shell/browser/extensions/api/tabs/tabs_api.cc index ff2b09ada2521..785320aa51c98 100644 --- a/shell/browser/extensions/api/tabs/tabs_api.cc +++ b/shell/browser/extensions/api/tabs/tabs_api.cc @@ -183,9 +183,9 @@ bool TabsExecuteScriptFunction::ShouldRemoveCSS() const { } ExtensionFunction::ResponseAction TabsReloadFunction::Run() { - std::unique_ptr params( - tabs::Reload::Params::Create(args())); - EXTENSION_FUNCTION_VALIDATE(params.get()); + absl::optional params = + tabs::Reload::Params::Create(args()); + EXTENSION_FUNCTION_VALIDATE(params); bool bypass_cache = false; if (params->reload_properties && params->reload_properties->bypass_cache) { @@ -206,8 +206,8 @@ ExtensionFunction::ResponseAction TabsReloadFunction::Run() { } ExtensionFunction::ResponseAction TabsGetFunction::Run() { - std::unique_ptr params(tabs::Get::Params::Create(args())); - EXTENSION_FUNCTION_VALIDATE(params.get()); + absl::optional params = tabs::Get::Params::Create(args()); + EXTENSION_FUNCTION_VALIDATE(params); int tab_id = params->tab_id; auto* contents = electron::api::WebContents::FromID(tab_id); @@ -228,8 +228,8 @@ ExtensionFunction::ResponseAction TabsGetFunction::Run() { } ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() { - std::unique_ptr params( - tabs::SetZoom::Params::Create(args())); + absl::optional params = + tabs::SetZoom::Params::Create(args()); EXTENSION_FUNCTION_VALIDATE(params); int tab_id = params->tab_id ? *params->tab_id : -1; @@ -256,8 +256,8 @@ ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() { } ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() { - std::unique_ptr params( - tabs::GetZoom::Params::Create(args())); + absl::optional params = + tabs::GetZoomSettings::Params::Create(args()); EXTENSION_FUNCTION_VALIDATE(params); int tab_id = params->tab_id ? *params->tab_id : -1; @@ -272,8 +272,8 @@ ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() { } ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() { - std::unique_ptr params( - tabs::GetZoomSettings::Params::Create(args())); + absl::optional params = + tabs::GetZoomSettings::Params::Create(args()); EXTENSION_FUNCTION_VALIDATE(params); int tab_id = params->tab_id ? *params->tab_id : -1; @@ -296,8 +296,8 @@ ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() { ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() { using tabs::ZoomSettings; - std::unique_ptr params( - tabs::SetZoomSettings::Params::Create(args())); + absl::optional params = + tabs::SetZoomSettings::Params::Create(args()); EXTENSION_FUNCTION_VALIDATE(params); int tab_id = params->tab_id ? *params->tab_id : -1; @@ -423,9 +423,9 @@ bool PrepareURLForNavigation(const std::string& url_string, TabsUpdateFunction::TabsUpdateFunction() : web_contents_(nullptr) {} ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { - std::unique_ptr params( - tabs::Update::Params::Create(args())); - EXTENSION_FUNCTION_VALIDATE(params.get()); + absl::optional params = + tabs::Update::Params::Create(args()); + EXTENSION_FUNCTION_VALIDATE(params); int tab_id = params->tab_id ? *params->tab_id : -1; auto* contents = electron::api::WebContents::FromID(tab_id); diff --git a/shell/browser/extensions/electron_extension_host_delegate.cc b/shell/browser/extensions/electron_extension_host_delegate.cc index d4d81e7794787..a88e4a61d664b 100644 --- a/shell/browser/extensions/electron_extension_host_delegate.cc +++ b/shell/browser/extensions/electron_extension_host_delegate.cc @@ -44,7 +44,7 @@ void ElectronExtensionHostDelegate::CreateTab( std::unique_ptr web_contents, const std::string& extension_id, WindowOpenDisposition disposition, - const gfx::Rect& initial_rect, + const blink::mojom::WindowFeatures& window_features, bool user_gesture) { // TODO(jamescook): Should app_shell support opening popup windows? NOTREACHED(); diff --git a/shell/browser/extensions/electron_extension_host_delegate.h b/shell/browser/extensions/electron_extension_host_delegate.h index 078d1696e2565..6a23c881e9c68 100644 --- a/shell/browser/extensions/electron_extension_host_delegate.h +++ b/shell/browser/extensions/electron_extension_host_delegate.h @@ -30,7 +30,7 @@ class ElectronExtensionHostDelegate : public ExtensionHostDelegate { void CreateTab(std::unique_ptr web_contents, const std::string& extension_id, WindowOpenDisposition disposition, - const gfx::Rect& initial_rect, + const blink::mojom::WindowFeatures& window_features, bool user_gesture) override; void ProcessMediaAccessRequest(content::WebContents* web_contents, const content::MediaStreamRequest& request, diff --git a/shell/browser/hid/hid_chooser_context.cc b/shell/browser/hid/hid_chooser_context.cc index 77b4b4f632764..1c008abe0bc17 100644 --- a/shell/browser/hid/hid_chooser_context.cc +++ b/shell/browser/hid/hid_chooser_context.cc @@ -70,7 +70,7 @@ bool HidChooserContext::CanStorePersistentEntry( // static base::Value HidChooserContext::DeviceInfoToValue( const device::mojom::HidDeviceInfo& device) { - base::Value value(base::Value::Type::DICTIONARY); + base::Value value(base::Value::Type::DICT); value.SetStringKey( kHidDeviceNameKey, base::UTF16ToUTF8(HidChooserContext::DisplayNameFromDeviceInfo(device))); diff --git a/shell/browser/net/cert_verifier_client.cc b/shell/browser/net/cert_verifier_client.cc index e81cda3e1e5ae..bf14cdb397272 100644 --- a/shell/browser/net/cert_verifier_client.cc +++ b/shell/browser/net/cert_verifier_client.cc @@ -4,6 +4,7 @@ #include +#include "net/cert/cert_verify_result.h" #include "shell/browser/net/cert_verifier_client.h" namespace electron { diff --git a/shell/browser/network_hints_handler_impl.cc b/shell/browser/network_hints_handler_impl.cc index aa550fb4e69ec..417215d142c5d 100644 --- a/shell/browser/network_hints_handler_impl.cc +++ b/shell/browser/network_hints_handler_impl.cc @@ -25,7 +25,7 @@ NetworkHintsHandlerImpl::NetworkHintsHandlerImpl( NetworkHintsHandlerImpl::~NetworkHintsHandlerImpl() = default; -void NetworkHintsHandlerImpl::Preconnect(const GURL& url, +void NetworkHintsHandlerImpl::Preconnect(const url::SchemeHostPort& url, bool allow_credentials) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -34,7 +34,7 @@ void NetworkHintsHandlerImpl::Preconnect(const GURL& url, } auto* session = electron::api::Session::FromBrowserContext(browser_context_); if (session) { - session->Emit("preconnect", url, allow_credentials); + session->Emit("preconnect", url.GetURL(), allow_credentials); } } diff --git a/shell/browser/network_hints_handler_impl.h b/shell/browser/network_hints_handler_impl.h index 3339f0d7238e1..3270cf27748c1 100644 --- a/shell/browser/network_hints_handler_impl.h +++ b/shell/browser/network_hints_handler_impl.h @@ -23,7 +23,8 @@ class NetworkHintsHandlerImpl receiver); // network_hints::mojom::NetworkHintsHandler: - void Preconnect(const GURL& url, bool allow_credentials) override; + void Preconnect(const url::SchemeHostPort& url, + bool allow_credentials) override; private: explicit NetworkHintsHandlerImpl(content::RenderFrameHost*); diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index 2d71c219ec7bc..ae9ac0bae1e1f 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -1049,13 +1049,14 @@ void OffScreenRenderWidgetHostView::NotifyHostAndDelegateOnWasShown( NOTREACHED(); } -void OffScreenRenderWidgetHostView::RequestPresentationTimeFromHostOrDelegate( - blink::mojom::RecordContentToVisibleTimeRequestPtr) { +void OffScreenRenderWidgetHostView:: + RequestSuccessfulPresentationTimeFromHostOrDelegate( + blink::mojom::RecordContentToVisibleTimeRequestPtr) { NOTREACHED(); } void OffScreenRenderWidgetHostView:: - CancelPresentationTimeRequestForHostAndDelegate() { + CancelSuccessfulPresentationTimeRequestForHostAndDelegate() { NOTREACHED(); } diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 4b8395ea7e942..d4c15a3c0ce0c 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -144,9 +144,9 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, const content::DisplayFeature* display_feature) override; void NotifyHostAndDelegateOnWasShown( blink::mojom::RecordContentToVisibleTimeRequestPtr) final; - void RequestPresentationTimeFromHostOrDelegate( + void RequestSuccessfulPresentationTimeFromHostOrDelegate( blink::mojom::RecordContentToVisibleTimeRequestPtr) final; - void CancelPresentationTimeRequestForHostAndDelegate() final; + void CancelSuccessfulPresentationTimeRequestForHostAndDelegate() final; viz::SurfaceId GetCurrentSurfaceId() const override; std::unique_ptr CreateSyntheticGestureTarget() override; diff --git a/shell/browser/osr/osr_web_contents_view.cc b/shell/browser/osr/osr_web_contents_view.cc index 84a980eae0ad2..2276e97a40c7d 100644 --- a/shell/browser/osr/osr_web_contents_view.cc +++ b/shell/browser/osr/osr_web_contents_view.cc @@ -220,4 +220,7 @@ OffScreenRenderWidgetHostView* OffScreenWebContentsView::GetView() const { void OffScreenWebContentsView::FullscreenStateChanged(bool is_fullscreen) {} +void OffScreenWebContentsView::UpdateWindowControlsOverlay( + const gfx::Rect& bounding_rect) {} + } // namespace electron diff --git a/shell/browser/osr/osr_web_contents_view.h b/shell/browser/osr/osr_web_contents_view.h index 594b7bd75faa7..9f3d55a93d436 100644 --- a/shell/browser/osr/osr_web_contents_view.h +++ b/shell/browser/osr/osr_web_contents_view.h @@ -64,6 +64,7 @@ class OffScreenWebContentsView : public content::WebContentsView, void SetOverscrollControllerEnabled(bool enabled) override; void OnCapturerCountChanged() override; void FullscreenStateChanged(bool is_fullscreen) override; + void UpdateWindowControlsOverlay(const gfx::Rect& bounding_rect) override; #if BUILDFLAG(IS_MAC) bool CloseTabAfterEventTrackingIfNeeded() override; diff --git a/shell/browser/serial/serial_chooser_context.cc b/shell/browser/serial/serial_chooser_context.cc index 9301d75b15fb1..48c21f7a6639f 100644 --- a/shell/browser/serial/serial_chooser_context.cc +++ b/shell/browser/serial/serial_chooser_context.cc @@ -46,17 +46,6 @@ std::string EncodeToken(const base::UnguessableToken& token) { return buffer; } -base::UnguessableToken DecodeToken(base::StringPiece input) { - std::string buffer; - if (!base::Base64Decode(input, &buffer) || - buffer.length() != sizeof(uint64_t) * 2) { - return base::UnguessableToken(); - } - - const uint64_t* data = reinterpret_cast(buffer.data()); - return base::UnguessableToken::Deserialize(data[0], data[1]); -} - base::Value PortInfoToValue(const device::mojom::SerialPortInfo& port) { base::Value::Dict value; if (port.display_name && !port.display_name->empty()) diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index 035bf7fe74ff6..1f7931d55f590 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -97,7 +97,7 @@ const size_t kMaxMessageChunkSize = IPC::Channel::kMaximumMessageSize / 4; InspectableWebContents::List g_web_contents_instances_; base::Value RectToDictionary(const gfx::Rect& bounds) { - base::Value dict(base::Value::Type::DICTIONARY); + base::Value dict(base::Value::Type::DICT); dict.SetKey("x", base::Value(bounds.x())); dict.SetKey("y", base::Value(bounds.y())); dict.SetKey("width", base::Value(bounds.width())); @@ -105,17 +105,17 @@ base::Value RectToDictionary(const gfx::Rect& bounds) { return dict; } -gfx::Rect DictionaryToRect(const base::Value* dict) { - const base::Value* found = dict->FindKey("x"); +gfx::Rect DictionaryToRect(const base::Value::Dict& dict) { + const base::Value* found = dict.Find("x"); int x = found ? found->GetInt() : 0; - found = dict->FindKey("y"); + found = dict.Find("y"); int y = found ? found->GetInt() : 0; - found = dict->FindKey("width"); + found = dict.Find("width"); int width = found ? found->GetInt() : 800; - found = dict->FindKey("height"); + found = dict.Find("height"); int height = found ? found->GetInt() : 600; return gfx::Rect(x, y, width, height); @@ -353,7 +353,7 @@ InspectableWebContents::InspectableWebContents( const base::Value* bounds_dict = &pref_service_->GetValue(kDevToolsBoundsPref); if (bounds_dict->is_dict()) { - devtools_bounds_ = DictionaryToRect(bounds_dict); + devtools_bounds_ = DictionaryToRect(bounds_dict->GetDict()); // Sometimes the devtools window is out of screen or has too small size. if (devtools_bounds_.height() < 100 || devtools_bounds_.width() < 100) { devtools_bounds_.set_height(600); @@ -894,7 +894,7 @@ void InspectableWebContents::ClearPreferences() { } void InspectableWebContents::GetSyncInformation(DispatchCallback callback) { - base::Value result(base::Value::Type::DICTIONARY); + base::Value result(base::Value::Type::DICT); result.SetBoolKey("isSyncActive", false); std::move(callback).Run(&result); } diff --git a/shell/browser/usb/electron_usb_delegate.cc b/shell/browser/usb/electron_usb_delegate.cc index a5bb4bc0e3750..15a97b5bc1f74 100644 --- a/shell/browser/usb/electron_usb_delegate.cc +++ b/shell/browser/usb/electron_usb_delegate.cc @@ -153,9 +153,9 @@ void ElectronUsbDelegate::AdjustProtectedInterfaceClasses( content::RenderFrameHost* frame, std::vector& classes) { // Isolated Apps have unrestricted access to any USB interface class. - if (frame && frame->GetWebExposedIsolationLevel() >= - content::RenderFrameHost::WebExposedIsolationLevel:: - kMaybeIsolatedApplication) { + if (frame && + frame->GetWebExposedIsolationLevel() >= + content::WebExposedIsolationLevel::kMaybeIsolatedApplication) { // TODO(https://crbug.com/1236706): Should the list of interface classes the // app expects to claim be encoded in the Web App Manifest? classes.clear(); diff --git a/shell/browser/usb/usb_chooser_context.cc b/shell/browser/usb/usb_chooser_context.cc index d970ac5ec6721..567fbd30c4567 100644 --- a/shell/browser/usb/usb_chooser_context.cc +++ b/shell/browser/usb/usb_chooser_context.cc @@ -82,7 +82,7 @@ UsbChooserContext::UsbChooserContext(ElectronBrowserContext* context) // static base::Value UsbChooserContext::DeviceInfoToValue( const device::mojom::UsbDeviceInfo& device_info) { - base::Value device_value(base::Value::Type::DICTIONARY); + base::Value device_value(base::Value::Type::DICT); device_value.SetStringKey(kDeviceNameKey, device_info.product_name ? *device_info.product_name : base::StringPiece16()); diff --git a/shell/browser/web_contents_preferences.cc b/shell/browser/web_contents_preferences.cc index 14069bfdde30e..8a6fd0d8e5bd9 100644 --- a/shell/browser/web_contents_preferences.cc +++ b/shell/browser/web_contents_preferences.cc @@ -389,7 +389,7 @@ void WebContentsPreferences::AppendCommandLineSwitches( } void WebContentsPreferences::SaveLastPreferences() { - last_web_preferences_ = base::Value(base::Value::Type::DICTIONARY); + last_web_preferences_ = base::Value(base::Value::Type::DICT); last_web_preferences_.SetKey(options::kNodeIntegration, base::Value(node_integration_)); last_web_preferences_.SetKey(options::kNodeIntegrationInSubFrames, diff --git a/shell/common/api/electron_api_clipboard.cc b/shell/common/api/electron_api_clipboard.cc index 861b10472f656..364b8c112fd00 100644 --- a/shell/common/api/electron_api_clipboard.cc +++ b/shell/common/api/electron_api_clipboard.cc @@ -134,7 +134,7 @@ void Clipboard::Write(const gin_helper::Dictionary& data, } if (data.Get("html", &html)) - writer.WriteHTML(html, std::string()); + writer.WriteHTML(html, std::string(), ui::ClipboardContentType::kSanitized); if (data.Get("image", &image)) writer.WriteImage(image.AsBitmap()); @@ -195,7 +195,7 @@ std::u16string Clipboard::ReadHTML(gin_helper::Arguments* args) { void Clipboard::WriteHTML(const std::u16string& html, gin_helper::Arguments* args) { ui::ScopedClipboardWriter writer(GetClipboardBuffer(args)); - writer.WriteHTML(html, std::string()); + writer.WriteHTML(html, std::string(), ui::ClipboardContentType::kSanitized); } v8::Local Clipboard::ReadBookmark(gin_helper::Arguments* args) { diff --git a/shell/common/language_util_win.cc b/shell/common/language_util_win.cc index d0c87bea99eac..1e5020ef61402 100644 --- a/shell/common/language_util_win.cc +++ b/shell/common/language_util_win.cc @@ -18,10 +18,6 @@ namespace electron { bool GetPreferredLanguagesUsingGlobalization( std::vector* languages) { - if (!base::win::ResolveCoreWinRTDelayload() || - !base::win::ScopedHString::ResolveCoreWinRTStringDelayload()) - return false; - base::win::ScopedHString guid = base::win::ScopedHString::Create( RuntimeClass_Windows_System_UserProfile_GlobalizationPreferences); Microsoft::WRL::ComPtr< diff --git a/shell/renderer/api/electron_api_web_frame.cc b/shell/renderer/api/electron_api_web_frame.cc index 69e22d909fa45..71f10a241fa19 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -643,7 +643,7 @@ class WebFrameRenderer : public gin::Wrappable, std::move(completion_callback)); render_frame->GetWebFrame()->RequestExecuteScript( - blink::DOMWrapperWorld::kMainWorldId, base::make_span(&source, 1), + blink::DOMWrapperWorld::kMainWorldId, base::make_span(&source, 1u), has_user_gesture ? blink::mojom::UserActivationOption::kActivate : blink::mojom::UserActivationOption::kDoNotActivate, blink::mojom::EvaluationTiming::kSynchronous, diff --git a/shell/renderer/extensions/electron_extensions_dispatcher_delegate.cc b/shell/renderer/extensions/electron_extensions_dispatcher_delegate.cc index b587b7ff0341c..7fec271acef1a 100644 --- a/shell/renderer/extensions/electron_extensions_dispatcher_delegate.cc +++ b/shell/renderer/extensions/electron_extensions_dispatcher_delegate.cc @@ -45,10 +45,10 @@ void ElectronExtensionsDispatcherDelegate::InitializeBindingsSystem( extensions::Dispatcher* dispatcher, extensions::NativeExtensionBindingsSystem* bindings_system) { extensions::APIBindingsSystem* bindings = bindings_system->api_system(); - bindings->GetHooksForAPI("extension") - ->SetDelegate(std::make_unique( - bindings_system->messaging_service())); - bindings->GetHooksForAPI("tabs")->SetDelegate( - std::make_unique( - bindings_system->messaging_service())); + bindings->RegisterHooksDelegate( + "extension", std::make_unique( + bindings_system->messaging_service())); + bindings->RegisterHooksDelegate( + "tabs", std::make_unique( + bindings_system->messaging_service())); }