From 3e22f992b064a07545a5d265a1a53a72a0cdbca2 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 08:59:44 -0700 Subject: [PATCH] chore: bump chromium to 128.0.6611.0 (main) (#42779) * chore: bump chromium in DEPS to 128.0.6577.0 * chore: bump chromium in DEPS to 128.0.6579.0 * 5675706: Reland "Reland "Reland "Reland "Add toolchains without PartitionAlloc-Everywhere for dump_syms et al"""" https://chromium-review.googlesource.com/c/chromium/src/+/5675706 * 5668597: [PDF Ink Signatures] Prompt download menu on save when there are edits https://chromium-review.googlesource.com/c/chromium/src/+/5668597 * 5677014: Reland "Pull data_sharing_sdk from CIPD" https://chromium-review.googlesource.com/c/chromium/src/+/5677014 * chore: fixup patch indices * chore: bump chromium in DEPS to 128.0.6581.0 * chore: bump chromium in DEPS to 128.0.6583.0 * update patches * 5455480: [Extensions] Allow service worker requests to continue without a cert https://chromium-review.googlesource.com/c/chromium/src/+/5455480 * try to get some debugging output from script/push-patch.js * chore: bump chromium in DEPS to 128.0.6585.0 * chore: bump chromium in DEPS to 128.0.6587.0 * update patches * chore: bump chromium in DEPS to 128.0.6589.0 * more patch work * maybe over here? * chore: update patches * 5673207: [HTTPS Upgrades] Disable in captive portal login webview https://chromium-review.googlesource.com/c/chromium/src/+/5673207 * 5636785: Extensions: WAR: manifest.json's use_dynamic_url requires a dynamic url https://chromium-review.googlesource.com/c/chromium/src/+/5636785 * chore: bump chromium in DEPS to 128.0.6591.0 * 5665458: Trigger WN2 page when feature is enabled https://chromium-review.googlesource.com/c/chromium/src/+/5665458 * update patches * chore: bump chromium in DEPS to 128.0.6593.0 * chore: bump chromium in DEPS to 128.0.6595.0 * chore: bump chromium in DEPS to 128.0.6597.0 * (patch update) 5694586: [compile hints] Remove the usage of v8::Isolate::SetJavaScriptCompileHintsMagicEnabledCallback API https://chromium-review.googlesource.com/c/chromium/src/+/5694586 * update patches * 5691287: Reland "Change blink::WebKeyboardEvent to use std::array in is members" https://chromium-review.googlesource.com/c/chromium/src/+/5691287 The code changed here is modeled after code in `content/renderer/pepper/event_conversion.cc` that was also modified in this CL, so I took the same approach. * 5529018: Cleanup EnableWebHidOnExtensionServiceWorker flag https://chromium-review.googlesource.com/c/chromium/src/+/5529018 * 5526324: [Code Health] Add deprecation comment for base::SupportsWeakPtr. https://chromium-review.googlesource.com/c/chromium/src/+/5526324 Note that this CL actually does make `SupportsWeakPtr` strictly restricted to existing implementations, no new ones. We could add a patch to add ourselves to this list, but it looks like we'll have to refactor this anyways in the near future. Since the refactor seems straightforward, let's try that first. * chore: bump chromium in DEPS to 128.0.6598.0 * chore: update patches * 5704737: Rename ExclusiveAccessContext::GetActiveWebContents to avoid conflict https://chromium-review.googlesource.com/c/chromium/src/+/5704737 * chore: bump chromium in DEPS to 128.0.6601.0 * chore: update patches * Add `base::StringPiece` header includes Chromium is working on replacing `base::StringPiece` with `std::string_view`. (See the Chromium Bug below.) They're currently running mass codemods (across many multiple changes) to replace uses of `StringPiece` with `string_view`, including removing the header include for `StringPiece` in those files. This cascades down to our files that were implicitly depending on those includes through some other include. They're on track to eventually deprecate and remove `StringPiece` so our code should be converted, but that can be done as an upgrade follow-up task. For now, adding the header back to files that need it should suffice for minimal upgrade changes. Chromium Bug: https://issues.chromium.org/issues/40506050 * 5702737: GlobalRequestID: Avoid unwanted inlining and narrowing int conversions https://chromium-review.googlesource.com/c/chromium/src/+/5702737 contender for smallest commit 2024 * 5706534: Rename GlobalFeatures to GlobalDesktopFeatures. https://chromium-review.googlesource.com/c/chromium/src/+/5706534 * 5691321: ui: remove params variants of SelectFile listener functions https://chromium-review.googlesource.com/c/chromium/src/+/5691321 * 5714949: [Extensions] Display re-enable dialog for MV2 disabled stage https://chromium-review.googlesource.com/c/chromium/src/+/5714949 * chore: update libc++ filenames * patch: disable scope reuse & associated dchecks in v8 (hopefully temp, upgrade follow-up) * fixup! Add `base::StringPiece` header includes * update MAS patch 5710330: Add crash keys to debug NativeWidgetMacNSWindowBorderlessFrame exception https://chromium-review.googlesource.com/c/chromium/src/+/5710330 * chore: bump chromium in DEPS to 128.0.6603.0 * chore: update patches * 5713258: Reland "Preparation for decoupling creation/initialization of context" https://chromium-review.googlesource.com/c/chromium/src/+/5713258 When destroying a context, it must already be shutdown, and this change enforces it with a new CHECK. We were overriding `BrowserContextKeyedServiceFactory::BrowserContextShutdown` with an empty implementation, which differed from the default implementation that notifies the `KeyedServiceFactory` that the context has shutdown. Since we were missing this notification, the CHECK would later trip when the service was being destoryed because it was not registered as shutdown when it was shutdown. * chore: bump chromium in DEPS to 128.0.6605.2 * chore: update patches * refactor: linux open/save dialog patch Our existing implementation was relying on an opaque `void* params` parameter that was passed through `ui::SelectFileDialog`. Recently, that parameter has been getting removed: - 5691321: ui: remove params variants of SelectFile listener functions | https://chromium-review.googlesource.com/c/chromium/src/+/5691321 - 5709097: ui: remove SelectFileDialog impl params | https://chromium-review.googlesource.com/c/chromium/src/+/5709097 - https://issues.chromium.org/issues/340178601 "reconsider SelectFileDialog" This restructures the patch to work with mostly the same mechanics, but directly on the `ui::SelectFileDialog` object. This nets us some wins in terms of a smaller patch. * 5713262: DevTools UI binding AIDA client event returns response https://chromium-review.googlesource.com/c/chromium/src/+/5713262 * fixup! refactor: linux open/save dialog patch * chore: bump chromium in DEPS to 128.0.6606.0 * chore: update patches * fixup! refactor: linux open/save dialog patch * chore: bump chromium in DEPS to 128.0.6607.0 * chore: update printing.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/5722937 * fix: pwd error in electron-test, nan-test fix: unshallow depot_tools before 3-way apply * chore: e patches all * fixup! fix: pwd error in electron-test, nan-test * chore: bump chromium in DEPS to 128.0.6609.0 * chore: bump chromium in DEPS to 128.0.6611.0 * chore: update patches * chore: update libcxx filenames --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr Co-authored-by: Jeremy Rose Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: clavin Co-authored-by: Charles Kerr Co-authored-by: Alice Zhao --- .github/actions/checkout/action.yml | 6 +- .github/workflows/build.yml | 1 + .github/workflows/pipeline-electron-lint.yml | 4 +- .../pipeline-segment-electron-build.yml | 2 +- .../pipeline-segment-electron-gn-check.yml | 2 +- .../pipeline-segment-electron-test.yml | 19 +- .../pipeline-segment-node-nan-test.yml | 10 +- DEPS | 2 +- build/extract_symbols.gni | 7 +- filenames.libcxx.gni | 3 +- ...client_precreatemessageloop_callback.patch | 6 +- .../add_didinstallconditionalfeatures.patch | 26 +- ...lectron_deps_to_license_credits_file.patch | 2 +- ...er_to_linuxui_getwindowframeprovider.patch | 26 +- ..._scheduler_throttling_per_renderview.patch | 24 +- ..._windows_to_have_different_web_prefs.patch | 10 +- patches/chromium/blink_local_frame.patch | 8 +- .../build_add_electron_tracing_category.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 14 +- patches/chromium/build_gn.patch | 2 +- .../build_libc_as_static_library.patch | 4 +- ...bcxx_abi_unstable_false_for_electron.patch | 4 +- patches/chromium/can_create_window.patch | 40 +- ...hore_add_electron_deps_to_gitignores.patch | 10 +- ...devices_request_until_usb_service_is.patch | 4 +- ...tition_attribute_dcheck_for_webviews.patch | 2 +- ...ile_methods_in_profile_selections_cc.patch | 2 +- ...screationoverridden_with_full_params.patch | 20 +- ...e_reference_to_chrome_browser_themes.patch | 4 +- patches/chromium/command-ismediakey.patch | 6 +- ...e_browser_v8_snapshot_file_name_fuse.patch | 6 +- .../custom_protocols_plzserviceworker.patch | 8 +- .../disable_compositor_recycling.patch | 2 +- patches/chromium/disable_hidden.patch | 12 +- patches/chromium/disable_unload_metrics.patch | 6 +- ...xpose_setuseragent_on_networkcontext.patch | 16 +- .../extend_apply_webpreferences.patch | 4 +- ...dd_set_theme_source_to_allow_apps_to.patch | 8 +- ...ing_dialog_features_to_shell_dialogs.patch | 419 ++++++------------ ...t_allow_code_cache_in_custom_schemes.patch | 10 +- ...e_launch_options_for_service_process.patch | 48 +- ...screen_rendering_with_viz_compositor.patch | 10 +- ...g_exit_code_on_service_process_crash.patch | 14 +- ...etdefersloading_on_webdocumentloader.patch | 4 +- ..._raw_response_headers_from_urlloader.patch | 30 +- ..._exclusive_access_for_electron_needs.patch | 18 +- ...ding_non-standard_schemes_in_iframes.patch | 10 +- ...x_crash_when_saving_edited_pdf_files.patch | 17 +- ..._background_throttling_in_compositor.patch | 8 +- ...media_key_usage_with_globalshortcuts.patch | 8 +- ...ingshelper_behind_branding_buildflag.patch | 18 +- ...board_hides_on_input_blur_in_webview.patch | 8 +- ..._properly_honor_printing_page_ranges.patch | 10 +- ...original_resize_performance_on_macos.patch | 4 +- ...from_localframe_requestexecutescript.patch | 46 +- ...t_menu_item_when_opened_via_keyboard.patch | 6 +- patches/chromium/frame_host_manager.patch | 8 +- .../gin_enable_disable_v8_platform.patch | 6 +- .../chromium/gritsettings_resource_ids.patch | 2 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- ...reate_a_console_if_logging_to_stderr.patch | 4 +- ..._avoid_private_macos_api_usage.patch.patch | 83 ++-- ...emote_certificate_verification_logic.patch | 28 +- .../chromium/notification_provenance.patch | 6 +- ...eated_to_allow_for_browser_initiated.patch | 4 +- patches/chromium/picture-in-picture.patch | 6 +- ...utofill_colors_to_the_color_pipeline.patch | 16 +- patches/chromium/preconnect_manager.patch | 10 +- patches/chromium/printing.patch | 98 ++-- ...r_changes_to_the_webcontentsobserver.patch | 16 +- ..._expose_file_system_access_blocklist.patch | 12 +- ...pose_hostimportmoduledynamically_and.patch | 14 +- ...store_base_adaptcallbackforrepeating.patch | 2 +- ...f_incognito_apis_in_the_spellchecker.patch | 6 +- .../render_widget_host_view_mac.patch | 4 +- patches/chromium/resource_file_conflict.patch | 6 +- ...ssivethrottlingwithwebsocket_feature.patch | 6 +- patches/chromium/scroll_bounce_flag.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 8 +- patches/chromium/web_contents.patch | 6 +- patches/chromium/webview_fullscreen.patch | 14 +- .../worker_context_will_destroy.patch | 16 +- ...feat_add_hook_to_notify_script_ready.patch | 16 +- ...i_to_allow_electron_to_set_dock_side.patch | 4 +- patches/v8/.patches | 1 + ...8_object_setinternalfieldfornodecore.patch | 8 +- ...sable_scope_reuse_associated_dchecks.patch | 54 +++ shell/app/electron_content_client.h | 1 + shell/browser/api/electron_api_app.cc | 1 + shell/browser/api/electron_api_app.h | 1 + shell/browser/api/electron_api_debugger.cc | 1 + .../browser/api/electron_api_web_contents.cc | 2 +- shell/browser/api/electron_api_web_contents.h | 2 +- shell/browser/browser_process_impl.cc | 5 + shell/browser/browser_process_impl.h | 1 + shell/browser/electron_browser_client.cc | 4 +- shell/browser/electron_browser_client.h | 3 + .../electron_download_manager_delegate.cc | 1 + .../electron_management_api_delegate.cc | 6 + .../electron_management_api_delegate.h | 5 + .../electron_extensions_browser_client.cc | 8 +- .../electron_extensions_browser_client.h | 3 +- shell/browser/file_select_helper.cc | 12 +- shell/browser/file_select_helper.h | 10 +- shell/browser/hid/electron_hid_delegate.cc | 4 +- .../hid/hid_chooser_context_factory.cc | 3 - .../browser/hid/hid_chooser_context_factory.h | 3 +- shell/browser/net/asar/asar_url_loader.cc | 1 + shell/browser/net/url_pipe_loader.h | 1 + .../browser/serial/serial_chooser_context.cc | 1 + shell/browser/ui/file_dialog_linux.cc | 47 +- shell/browser/ui/inspectable_web_contents.cc | 1 + shell/browser/ui/inspectable_web_contents.h | 3 +- shell/browser/usb/usb_chooser_context.cc | 1 + shell/common/api/electron_api_url_loader.cc | 2 +- shell/common/api/electron_api_url_loader.h | 3 +- .../common/gin_converters/blink_converter.cc | 7 +- shell/common/process_util.cc | 1 + .../api/electron_api_spell_check_client.cc | 8 +- .../api/electron_api_spell_check_client.h | 5 +- 120 files changed, 790 insertions(+), 859 deletions(-) create mode 100644 patches/v8/fix_disable_scope_reuse_associated_dchecks.patch diff --git a/.github/actions/checkout/action.yml b/.github/actions/checkout/action.yml index e9481a3eaca6..0a20bc90f2f6 100644 --- a/.github/actions/checkout/action.yml +++ b/.github/actions/checkout/action.yml @@ -87,7 +87,7 @@ runs: # Export it mkdir -p ../../patches git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch - if (node ./script/push-patch.js 2> /dev/null > /dev/null); then + if node ./script/push-patch.js; then echo echo "======================================================================" echo "Changes to the patches when applying, we have auto-pushed the diff to the current branch" @@ -100,6 +100,8 @@ runs: echo "There were changes to the patches when applying." echo "Check the CI artifacts for a patch you can apply to fix it." echo "======================================================================" + echo + cat ../../patches/update-patches.patch exit 1 fi fi @@ -151,4 +153,4 @@ runs: exit 1 else echo "Cache key persisted in $final_cache_path" - fi \ No newline at end of file + fi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c3e0838b745..2c9ed328ae33 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,6 +90,7 @@ jobs: - /var/run/sas:/var/run/sas env: GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' + PATCH_UP_APP_CREDS: ${{ secrets.PATCH_UP_APP_CREDS }} outputs: build-image-sha: ${{ needs.setup.outputs.build-image-sha }} steps: diff --git a/.github/workflows/pipeline-electron-lint.yml b/.github/workflows/pipeline-electron-lint.yml index 078730228f73..33af8c233858 100644 --- a/.github/workflows/pipeline-electron-lint.yml +++ b/.github/workflows/pipeline-electron-lint.yml @@ -32,7 +32,7 @@ jobs: shell: bash run: | # "depot_tools" has to be checkout into "//third_party/depot_tools" so pylint.py can a "pylintrc" file. - git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git src/third_party/depot_tools + git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git src/third_party/depot_tools echo "$(pwd)/src/third_party/depot_tools" >> $GITHUB_PATH - name: Download GN Binary shell: bash @@ -74,4 +74,4 @@ jobs: run: | cd src/electron node script/yarn tsc -p tsconfig.script.json - \ No newline at end of file + diff --git a/.github/workflows/pipeline-segment-electron-build.yml b/.github/workflows/pipeline-segment-electron-build.yml index 58218fb86711..27f4ca0a243d 100644 --- a/.github/workflows/pipeline-segment-electron-build.yml +++ b/.github/workflows/pipeline-segment-electron-build.yml @@ -114,7 +114,7 @@ jobs: - name: Get Depot Tools timeout-minutes: 5 run: | - git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git + git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git SEDOPTION="-i" if [ "`uname`" = "Darwin" ]; then diff --git a/.github/workflows/pipeline-segment-electron-gn-check.yml b/.github/workflows/pipeline-segment-electron-gn-check.yml index 1efa05d69fde..9b7eec5ca5b6 100644 --- a/.github/workflows/pipeline-segment-electron-gn-check.yml +++ b/.github/workflows/pipeline-segment-electron-gn-check.yml @@ -62,7 +62,7 @@ jobs: - name: Get Depot Tools timeout-minutes: 5 run: | - git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git + git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git SEDOPTION="-i" if [ "`uname`" = "Darwin" ]; then diff --git a/.github/workflows/pipeline-segment-electron-test.yml b/.github/workflows/pipeline-segment-electron-test.yml index 3b9254a6418e..6126bb976109 100644 --- a/.github/workflows/pipeline-segment-electron-test.yml +++ b/.github/workflows/pipeline-segment-electron-test.yml @@ -103,18 +103,17 @@ jobs: - name: Get Depot Tools timeout-minutes: 5 run: | - git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git - if [ "`uname`" = "Darwin" ]; then - # remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems - sed -i '' '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja - else - sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja - # Remove swift-format dep from cipd on macOS until we send a patch upstream. - cd depot_tools - git apply --3way ../src/electron/.github/workflows/config/gclient.diff - fi + git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git # Ensure depot_tools does not update. test -d depot_tools && cd depot_tools + if [ "`uname`" = "Darwin" ]; then + # remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems + sed -i '' '/ninjalog_uploader_wrapper.py/d' ./autoninja + else + sed -i '/ninjalog_uploader_wrapper.py/d' ./autoninja + # Remove swift-format dep from cipd on macOS until we send a patch upstream. + git apply --3way ../src/electron/.github/workflows/config/gclient.diff + fi touch .disable_auto_update - name: Add Depot Tools to PATH run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH diff --git a/.github/workflows/pipeline-segment-node-nan-test.yml b/.github/workflows/pipeline-segment-node-nan-test.yml index c445168c2f0e..2f87f316bea0 100644 --- a/.github/workflows/pipeline-segment-node-nan-test.yml +++ b/.github/workflows/pipeline-segment-node-nan-test.yml @@ -61,12 +61,11 @@ jobs: - name: Get Depot Tools timeout-minutes: 5 run: | - git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git + git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja - cd depot_tools - git apply --3way ../src/electron/.github/workflows/config/gclient.diff # Ensure depot_tools does not update. test -d depot_tools && cd depot_tools + git apply --3way ../src/electron/.github/workflows/config/gclient.diff touch .disable_auto_update - name: Add Depot Tools to PATH run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH @@ -125,12 +124,11 @@ jobs: - name: Get Depot Tools timeout-minutes: 5 run: | - git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git + git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja - cd depot_tools - git apply --3way ../src/electron/.github/workflows/config/gclient.diff # Ensure depot_tools does not update. test -d depot_tools && cd depot_tools + git apply --3way ../src/electron/.github/workflows/config/gclient.diff touch .disable_auto_update - name: Add Depot Tools to PATH run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH diff --git a/DEPS b/DEPS index 757a8d72b956..4bc946666c04 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '128.0.6573.0', + '128.0.6611.0', 'node_version': 'v20.15.1', 'nan_version': diff --git a/build/extract_symbols.gni b/build/extract_symbols.gni index 2f98aa466ba1..8d6c2e72b938 100644 --- a/build/extract_symbols.gni +++ b/build/extract_symbols.gni @@ -24,11 +24,8 @@ template("extract_symbols") { assert(defined(invoker.binary), "Need binary to dump") assert(defined(invoker.symbol_dir), "Need directory for symbol output") - if (host_os == "win" && target_cpu == "x86") { - dump_syms_label = "//third_party/breakpad:dump_syms(//build/toolchain/win:win_clang_x64)" - } else { - dump_syms_label = "//third_party/breakpad:dump_syms($host_toolchain)" - } + dump_syms_label = + "//third_party/breakpad:dump_syms($host_system_allocator_toolchain)" dump_syms_binary = get_label_info(dump_syms_label, "root_out_dir") + "/dump_syms$_host_executable_suffix" diff --git a/filenames.libcxx.gni b/filenames.libcxx.gni index 82f9140b7ee5..a9ded0b99ce7 100644 --- a/filenames.libcxx.gni +++ b/filenames.libcxx.gni @@ -712,6 +712,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__thread/timed_backoff_policy.h", "//third_party/libc++/src/include/__tree", "//third_party/libc++/src/include/__tuple/find_index.h", + "//third_party/libc++/src/include/__tuple/ignore.h", "//third_party/libc++/src/include/__tuple/make_tuple_types.h", "//third_party/libc++/src/include/__tuple/sfinae_helpers.h", "//third_party/libc++/src/include/__tuple/tuple_element.h", @@ -778,8 +779,6 @@ libcxx_headers = [ "//third_party/libc++/src/include/__type_traits/is_implicitly_default_constructible.h", "//third_party/libc++/src/include/__type_traits/is_integral.h", "//third_party/libc++/src/include/__type_traits/is_literal_type.h", - "//third_party/libc++/src/include/__type_traits/is_member_function_pointer.h", - "//third_party/libc++/src/include/__type_traits/is_member_object_pointer.h", "//third_party/libc++/src/include/__type_traits/is_member_pointer.h", "//third_party/libc++/src/include/__type_traits/is_nothrow_assignable.h", "//third_party/libc++/src/include/__type_traits/is_nothrow_constructible.h", diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 907e957b840a..7e19fb0ae1f5 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 3ef2255d2f9758a7ab497021ad4429aa6960504d..3de73ebf606d40cdd4d88b84d955923a8ebc7a0c 100644 +index b9651dfe19ecbdeb582e289a7fb69a8527a42be0..3ed36ff5ee743aec335d194eefb02e12b9a11be1 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -256,6 +256,10 @@ int GpuMain(MainFunctionParams parameters) { +@@ -257,6 +257,10 @@ int GpuMain(MainFunctionParams parameters) { // to the GpuProcessHost once the GpuServiceImpl has started. viz::GpuServiceImpl::InstallPreInitializeLogHandler(); @@ -24,7 +24,7 @@ index 3ef2255d2f9758a7ab497021ad4429aa6960504d..3de73ebf606d40cdd4d88b84d955923a // 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 -@@ -354,7 +358,6 @@ int GpuMain(MainFunctionParams parameters) { +@@ -355,7 +359,6 @@ int GpuMain(MainFunctionParams parameters) { #endif const bool dead_on_arrival = !init_success; diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 203f05f92a4d..d71078b595c4 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index c313c0342f0e470db13a4c95473decbc8dbdcbd3..10c6596a8cd06aebf19b4302a60eb78e int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index e5c8967a41c7cd645dfc5d6589a540e2027024df..7810c2e1b50f31b497c6a5eaf0a66b61d22f2760 100644 +index b559b333138e46192c6d85d7b4dfd0a66fcdc7da..bf148f2b74fec1ebf0d880c9f42c2645051209bb 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4694,6 +4694,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4689,6 +4689,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index e5c8967a41c7cd645dfc5d6589a540e2027024df..7810c2e1b50f31b497c6a5eaf0a66b61 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 74f337007151e491c02ae23ba4ca6f34f17bc65d..ff860ad1fb68dc5c1c7831f74b330be0c57c727a 100644 +index 7dff22180ef00c04ef1291929448d5fe8c1bb79a..1b611f429beac2de78f3ae9e3cbedc94e7793dc0 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -645,6 +645,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -643,6 +643,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 74f337007151e491c02ae23ba4ca6f34f17bc65d..ff860ad1fb68dc5c1c7831f74b330be0 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 7219fbabf0f7286af48dede7738a9dcd5125cc1a..9e962391ebd2cfc84837502c5babcbbff385408b 100644 +index 5bedd97cb999b3bf063b2cf46d95b655ac35afb4..4f5b7f661f11629602454d2f295a806fb7d63b70 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -646,6 +646,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -647,6 +647,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -79,10 +79,10 @@ index f7e0144c74f879e9b29871d7c372b99e127966bb..c3cd7b77ed282f212a56d151dc3fbec3 if (World().IsMainWorld()) { probe::DidCreateMainWorldContext(GetFrame()); diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h -index 1cf963689a08009fa137e49eacd909495d6517d1..4860e3b627160e544c3108b7dfdc4e03946ac865 100644 +index bb419323dd6afd6070fcee909672344beaf63322..98894c5e14ba97a93ec305da173c4cf312d1d531 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -301,6 +301,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -300,6 +300,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -92,10 +92,10 @@ index 1cf963689a08009fa137e49eacd909495d6517d1..4860e3b627160e544c3108b7dfdc4e03 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 b91c2be322f9c66a07bded75afebde935f28cbe0..acb8d1c364a8b077eca88af9c4bf0e8bb46f9ee5 100644 +index 47336f7596d7cdae9f78278f42fce07e1d86bba0..fcbddc3c13a5298dffea5c8ad87be02d60be52b2 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 -@@ -293,6 +293,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( +@@ -294,6 +294,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( web_frame_->Client()->DidCreateScriptContext(context, world_id); } @@ -110,10 +110,10 @@ index b91c2be322f9c66a07bded75afebde935f28cbe0..acb8d1c364a8b077eca88af9c4bf0e8b 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 7bbdf577711526a1bc60820d5737cdd28ebf60f5..4df922e030d17a852b8cc7862a4ce8ec57425bfa 100644 +index 1ea7ea4a054bea4711eeb6da14b83f54f7527cb1..ee3048b311f35483fd57bead855e3618a4d37cca 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 -@@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { +@@ -83,6 +83,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override; @@ -123,7 +123,7 @@ index 7bbdf577711526a1bc60820d5737cdd28ebf60f5..4df922e030d17a852b8cc7862a4ce8ec 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 da8f597a8eb45a5e0135a5f04b074b3756dd4921..c0f1a83db3171891b115eeb533f5bf1dcbad2c63 100644 +index d4e7bbc860b9cc2c27cdd8393a184e90d44214b9..66a37e0b6bcfe9714c1a11d76aa1789ccfc3862f 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h @@ -412,6 +412,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { 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 079569e20eec..70ff5e3e740f 100644 --- a/patches/chromium/add_electron_deps_to_license_credits_file.patch +++ b/patches/chromium/add_electron_deps_to_license_credits_file.patch @@ -7,7 +7,7 @@ Ensure that licenses for the dependencies introduced by Electron are included in `LICENSES.chromium.html` diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py -index 79b1e0f5d43caea6a5fcd03e5c7aa7a9dca7e9fd..341a1800abb18a96380ecfd521b9d94de0bb89d5 100755 +index c64e1fadc4474051a6981c83300f64fdbeb64cc0..e3ca127e39a2b69b97941293a13bd41b3cf763d6 100755 --- a/tools/licenses/licenses.py +++ b/tools/licenses/licenses.py @@ -335,6 +335,31 @@ SPECIAL_CASES = { diff --git a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch index e86ab5f10f37..68e731c7f9bf 100644 --- a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch +++ b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch @@ -8,10 +8,10 @@ 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 668c90b2102448a9fe215a70b727dc82d10c78fe..a6a41271bacf89e86ab64422ce0a77ae671c541c 100644 +index ca2fc0b1b3fe9f7fd65f55f8924b4b5e324bfdd4..da8ebfad6404c59471dc31625aeb4e68659116a3 100644 --- a/ui/gtk/gtk_ui.cc +++ b/ui/gtk/gtk_ui.cc -@@ -567,11 +567,12 @@ std::unique_ptr GtkUi::CreateNavButtonProvider() { +@@ -577,11 +577,12 @@ std::unique_ptr GtkUi::CreateNavButtonProvider() { } ui::WindowFrameProvider* GtkUi::GetWindowFrameProvider(bool solid_frame, @@ -28,11 +28,11 @@ index 668c90b2102448a9fe215a70b727dc82d10c78fe..a6a41271bacf89e86ab64422ce0a77ae return provider.get(); } diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h -index 0432ea4f5906502a4f6def46ab064292a6628218..e3cbfa3a1ac8c169c429e29c1262d0dd2a05a4b6 100644 +index 32051374590fc1179e5cfa21ebc34474d2ce0190..09e9399a67d30d4686f4c141050538b8dde9f301 100644 --- a/ui/gtk/gtk_ui.h +++ b/ui/gtk/gtk_ui.h -@@ -107,7 +107,8 @@ class GtkUi : public ui::LinuxUiAndTheme { - void SetDarkTheme(bool dark) override; +@@ -110,7 +110,8 @@ class GtkUi : public ui::LinuxUiAndTheme { + void SetAccentColor(std::optional accent_color) override; std::unique_ptr CreateNavButtonProvider() override; ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame, - bool tiled) override; @@ -41,7 +41,7 @@ index 0432ea4f5906502a4f6def46ab064292a6628218..e3cbfa3a1ac8c169c429e29c1262d0dd private: using TintMap = std::map; -@@ -191,7 +192,7 @@ class GtkUi : public ui::LinuxUiAndTheme { +@@ -199,7 +200,7 @@ class GtkUi : public ui::LinuxUiAndTheme { // while Chrome is running. This 2D array is indexed first by whether the // frame is translucent (0) or solid(1), then by whether the frame is normal // (0) or tiled (1). @@ -173,10 +173,10 @@ index 4faaae32a203bfa57f3e61c391dc6917c4a0bf59..94050a0136b78730f607f42991742e04 // Scale-independent metric calculated based on the bitmaps. std::optional frame_thickness_dip_; diff --git a/ui/linux/fallback_linux_ui.cc b/ui/linux/fallback_linux_ui.cc -index 8903f9ba950e7878fbd1bfa0cf2a42e0cc9daa21..7d13381eb1d16193bad0be1318e8ed199c6fb845 100644 +index e4a7f8eb0ef8bacd2d4e4231d0990b4a01021626..3477542587b08691c164941b2c2e3b22050231ca 100644 --- a/ui/linux/fallback_linux_ui.cc +++ b/ui/linux/fallback_linux_ui.cc -@@ -141,7 +141,8 @@ FallbackLinuxUi::CreateNavButtonProvider() { +@@ -143,7 +143,8 @@ FallbackLinuxUi::CreateNavButtonProvider() { ui::WindowFrameProvider* FallbackLinuxUi::GetWindowFrameProvider( bool solid_frame, @@ -187,11 +187,11 @@ index 8903f9ba950e7878fbd1bfa0cf2a42e0cc9daa21..7d13381eb1d16193bad0be1318e8ed19 } diff --git a/ui/linux/fallback_linux_ui.h b/ui/linux/fallback_linux_ui.h -index 2612cb68984a8435c84f0b0592eda8a5df6dd91e..282b48038f83d4a6dafe734f639d994c245c67ac 100644 +index 0800349bc18753e6a41a938c70213dd7dd123d0d..a1553e0cb1fac188fb2c74e10163c52dead02f29 100644 --- a/ui/linux/fallback_linux_ui.h +++ b/ui/linux/fallback_linux_ui.h -@@ -66,7 +66,8 @@ class FallbackLinuxUi : public LinuxUiAndTheme { - void SetDarkTheme(bool dark) override; +@@ -67,7 +67,8 @@ class FallbackLinuxUi : public LinuxUiAndTheme { + void SetAccentColor(std::optional accent_color) override; std::unique_ptr CreateNavButtonProvider() override; ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame, - bool tiled) override; @@ -201,10 +201,10 @@ index 2612cb68984a8435c84f0b0592eda8a5df6dd91e..282b48038f83d4a6dafe734f639d994c private: std::optional default_font_render_params_; diff --git a/ui/linux/linux_ui.h b/ui/linux/linux_ui.h -index b940382678ba70debaf7f33698c0b8bd02c42c4e..4477a1012fef5ad6dd365d70d28eadd3db136ceb 100644 +index 0a4c394b07a682d55639f37414331d68f175841c..45db96c165d61f551b344c7c852c083546508325 100644 --- a/ui/linux/linux_ui.h +++ b/ui/linux/linux_ui.h -@@ -304,7 +304,8 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUiTheme { +@@ -307,7 +307,8 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUiTheme { // The returned object is not owned by the caller and will remain alive until // the process ends. virtual WindowFrameProvider* GetWindowFrameProvider(bool solid_frame, 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 66cd4084cbd8..608140f09927 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -23,10 +23,10 @@ index b5934f99861b11afe1b695ac25886ee0d059d0ab..419f823a094c1b163d7a5b441f1b034c return receiver_.BindNewEndpointAndPassDedicatedRemote(); } diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 56f1f9234bee383ac4e8643e009ced56f2b12bb0..4f52bb9f87c1e3b86ddd0bfd920ac5d8812e11c7 100644 +index c398dc84de605c7feef92fda30b25297a12273b0..747d5d9e09c4c002a5f38483ef0022d263cddbe6 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -732,6 +732,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -737,6 +737,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -51,10 +51,10 @@ index 779e90581cdfb2d1bdd904da038f7537d0477f5a..c85620ac2f30998d1b67f159e50ee722 void SendRendererPreferencesToRenderer( const blink::RendererPreferences& preferences); diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc -index 0e969b8580ba6fa9116d5b3d2acfe77b7a8fed14..a36f033231c012db6b81b33efe4e42ef8b1464ce 100644 +index d1336997fbb2b4eae4e36f4266663d296b19d076..dcafa7c3ecf417ff1d79dff43b6f1a73cdd2da48 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -570,8 +570,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) { +@@ -579,8 +579,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) { // OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown, // which updates `visibility_`, unless the host is hidden. Make sure no update // is needed. @@ -92,7 +92,7 @@ index 603798ae0d45836f1bf3e6608761ce1467303310..2d8caa06e418f123d7565b96d40c66fb mojo::AssociatedReceiver receiver_; }; diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom -index ed73a6fe6d146eac904f0aa0d88facf055df503e..4bbc792068db75739a7ceb8ad01c85f9d3bbd8f6 100644 +index c980f3f76a37a4207bb54f18fbcdb8d0950c8856..91a9dfe56fbbcd1cc873add438947dd29c7e6646 100644 --- a/third_party/blink/public/mojom/page/page.mojom +++ b/third_party/blink/public/mojom/page/page.mojom @@ -173,4 +173,7 @@ interface PageBroadcast { @@ -104,10 +104,10 @@ index ed73a6fe6d146eac904f0aa0d88facf055df503e..4bbc792068db75739a7ceb8ad01c85f9 + SetSchedulerThrottling(bool allowed); }; diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h -index a1197832494afac5207b682f187929844b0ebfd7..1c2c61d09d505eef575107201302c7be6589f3c8 100644 +index 4220a0aebf4a2ce3d62f76c441b6ec1b5e11ffa1..6ea17602d2b186b81cf7dc69750bd302ff717aea 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h -@@ -364,6 +364,7 @@ class BLINK_EXPORT WebView { +@@ -362,6 +362,7 @@ class BLINK_EXPORT WebView { // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -116,10 +116,10 @@ index a1197832494afac5207b682f187929844b0ebfd7..1c2c61d09d505eef575107201302c7be // 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 567629babc9ff43995f56f62fa4fa7cae01651f3..e2f3e1171327eafb62d824c1241b0a06feb98312 100644 +index 36bd7ee7ed789981d3e6733d5f869430a1112a6f..831b3b1ee47a88b6b02a2256682e4a9b1cbeda3c 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -2460,6 +2460,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( +@@ -2461,6 +2461,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal", "old_state", old_state, "new_state", new_state); @@ -155,10 +155,10 @@ index 567629babc9ff43995f56f62fa4fa7cae01651f3..e2f3e1171327eafb62d824c1241b0a06 // Do not throttle if the page should be painting. bool is_visible = diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h -index e36a3b35fd3cbfc9439b15b32cf1bf432b8e1122..b8f0b7830e6d14c40d2371378556000d347e78fb 100644 +index 764d48e8fc89fa0b95e01881c2f5462e385ed8d5..c0e99aec75858ec00a57d4b4484cbc719dbdda88 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -450,6 +450,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -449,6 +449,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -166,7 +166,7 @@ index e36a3b35fd3cbfc9439b15b32cf1bf432b8e1122..b8f0b7830e6d14c40d2371378556000d void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -932,6 +933,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -930,6 +931,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 e99ba11ddfe2..ad1ac65e8a66 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,7 +8,7 @@ WebPreferences of in-process child windows, rather than relying on process-level command line switches, as before. diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc -index 2eb418015552910f6a5bceb117953a563e3b8c07..9974a94a6ae78f36e7baab097e710a79f817e682 100644 +index a93c0d81eb4fde2e85d0a56852b0a3a147b82039..7025e7ce57fbd0183933eed7f670ad23f2e00e51 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 @@ -147,6 +147,19 @@ bool StructTraitsaccelerated_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 5bebc1a29c78b5e668b8e7dcf4f19c210e064eb0..5285f9dbb650b98bd8f0c6bd1a2b762453429378 100644 +index 2c2dbbefe0450be58fcd484e45d8e79f3dd29971..a9dab859899b8ff7dba0e6e5a34da15f4a0d0b79 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h @@ -10,6 +10,7 @@ @@ -43,7 +43,7 @@ index 5bebc1a29c78b5e668b8e7dcf4f19c210e064eb0..5285f9dbb650b98bd8f0c6bd1a2b7624 #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" -@@ -433,6 +434,20 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -441,6 +442,20 @@ struct BLINK_COMMON_EXPORT WebPreferences { // blocking user's access to the background web content. bool modal_context_menu = true; @@ -65,7 +65,7 @@ index 5bebc1a29c78b5e668b8e7dcf4f19c210e064eb0..5285f9dbb650b98bd8f0c6bd1a2b7624 // chrome, except for the cases where it would require lots of extra work for // the embedder to use the same default value. diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h -index ffddf92b78f1bc03f40969bb93260502b0887e8a..7a8f75cb6b501b90df7a1fec2b5a84667250691c 100644 +index cdffdae3ec7fe010f9850a4a020eb1a49116cc58..4ef26a1695779564e943609314ee7ca06f423819 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 @@ @@ -130,7 +130,7 @@ index ffddf92b78f1bc03f40969bb93260502b0887e8a..7a8f75cb6b501b90df7a1fec2b5a8466 return r.cookie_enabled; } diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom -index 2dc2c857784ce482c7437a39e3e12f9a1d15bc55..fd6cf5ca4fbb22450da2c9677dfa806ab3f2aeb9 100644 +index 5560f0ff45342b806e89ab42a8f5f479f1946ad5..7bd5f65ef39988e3b08fd342c56c5f7f90f105c5 100644 --- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom +++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom @@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom"; diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 83f57f83c5a9..e50fa43aa820 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -15,7 +15,7 @@ Refs changes in: This patch reverts the changes to fix associated crashes in Electron. diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc -index 55343df3901f295f6570dfbcf74d326b6d0e1c4a..3ba0f8e60848147d61958f97d3ac0a8955f91441 100644 +index 313b9756ba3b28c26baa408088fe9cec9bcfa283..96e8579d1be764bb4aac9ef82e6ede192977961d 100644 --- a/third_party/blink/renderer/core/frame/frame.cc +++ b/third_party/blink/renderer/core/frame/frame.cc @@ -130,14 +130,6 @@ bool Frame::Detach(FrameDetachType type) { @@ -49,10 +49,10 @@ index 55343df3901f295f6570dfbcf74d326b6d0e1c4a..3ba0f8e60848147d61958f97d3ac0a89 // its owning reference back to our owning LocalFrame. client_->Detached(type); diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index dd58f6c3f8347a1981bbe97ddc9a6dce143bd6e6..80eac4a812056c663d86f01b98ebcdf7b4b0537a 100644 +index 12daaccd72cbae3663d134b78e3b876f61ee697f..d34e0e29de055b560d191356d0328fa528add7d5 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -730,10 +730,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -735,10 +735,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index dd58f6c3f8347a1981bbe97ddc9a6dce143bd6e6..80eac4a812056c663d86f01b98ebcdf7 if (!Client()) return false; -@@ -786,6 +782,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -791,6 +787,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index cb3089e96ce9..4219260501da 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us to introduce a new Electron category for Electron-specific tracing. diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index a3da4353d4ea519670b4a993893851f4788cd617..6c17f541837cc8e2c18d4ecec1f463da8f7661e6 100644 +index 560313ed41ea00c756126599252089c9bd468025..869e0492dbaed74fd086b6be3be525423fac3c42 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -88,6 +88,7 @@ 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 b97ae92762eb..ba0f8911f609 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 a1dbb6af74046225e9dc46f72eca9feb164bf453..091357f99a23806a2ddb7bc62df9d671fb4f16de 100644 +index 7ef8050aa89bb4132680c6d00d5d6ab3ecfdc713..bcf823da79171196447708b12c6bfd15cb15774b 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -192,11 +192,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index a1dbb6af74046225e9dc46f72eca9feb164bf453..091357f99a23806a2ddb7bc62df9d671 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 50c5d88f6adc99d4365a1540897c8ac1b7ea4763..969b0d5e82eaf716f8ad31f9bb57184d6d8f3297 100644 +index da009bfd7e8811cfc33319afd6a9c4b15cb7555e..1856d6e8240dbe47ded476a0f686da4ca58c49bd 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4831,7 +4831,7 @@ static_library("browser") { +@@ -4823,7 +4823,7 @@ static_library("browser") { # On Windows, the hashes are embedded in //chrome:chrome_initial rather # than here in :chrome_dll. @@ -46,10 +46,10 @@ index 50c5d88f6adc99d4365a1540897c8ac1b7ea4763..969b0d5e82eaf716f8ad31f9bb57184d sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 75211f756cda030e03f6944c02dc045eb8386500..4830f67586401dda1d732fbda62f6c497a7be822 100644 +index e110ffbcb5ea812118c29b702f5b906612984091..9c411b117cd6cd9840ceef7a19eca2b4a11d6fcb 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -7430,9 +7430,12 @@ test("unit_tests") { +@@ -7201,9 +7201,12 @@ test("unit_tests") { "//chrome/browser/safe_browsing/incident_reporting/verifier_test:verifier_test_dll_2", ] @@ -63,7 +63,7 @@ index 75211f756cda030e03f6944c02dc045eb8386500..4830f67586401dda1d732fbda62f6c49 "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/app:win_unit_tests", -@@ -8445,6 +8448,10 @@ test("unit_tests") { +@@ -8222,6 +8225,10 @@ test("unit_tests") { "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc", ] @@ -74,7 +74,7 @@ index 75211f756cda030e03f6944c02dc045eb8386500..4830f67586401dda1d732fbda62f6c49 sources += [ # The importer code is not used on Android. "../common/importer/firefox_importer_utils_unittest.cc", -@@ -8525,7 +8532,6 @@ test("unit_tests") { +@@ -8297,7 +8304,6 @@ test("unit_tests") { # Non-android deps for "unit_tests" target. deps += [ diff --git a/patches/chromium/build_gn.patch b/patches/chromium/build_gn.patch index 45c9a58b5fb2..65092836e653 100644 --- a/patches/chromium/build_gn.patch +++ b/patches/chromium/build_gn.patch @@ -7,7 +7,7 @@ These are variables we add to the root BUILDCONFIG so that they're available everywhere, without having to import("//electron/.../flags.gni"). diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index 29625fa7af1c8840bc530c4e4547e19a3bd5f8ce..83e32e23a7bc7ae098182033f065285858293cd1 100644 +index d1a665482c989dfd92ce7fb2a2444bd9311f5513..42ad98845d84496e197d8b6e2f09a45a2608e585 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -123,6 +123,9 @@ if (current_os == "") { diff --git a/patches/chromium/build_libc_as_static_library.patch b/patches/chromium/build_libc_as_static_library.patch index 3063acd25b66..00285f172ee2 100644 --- a/patches/chromium/build_libc_as_static_library.patch +++ b/patches/chromium/build_libc_as_static_library.patch @@ -7,7 +7,7 @@ Build libc++ as static library to compile and pass nan tests diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn -index 30fad21ed77fc063cb14ec109885b9533999c69a..e7060d599f4c84b135a824454f5d260907e5427a 100644 +index e69fb5fbd3a16b4c653f0128b588b6037c6af1e0..dfe43c573d6eb62cc625accec3b669d207fc1f4b 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn @@ -45,7 +45,11 @@ config("winver") { @@ -32,7 +32,7 @@ index 30fad21ed77fc063cb14ec109885b9533999c69a..e7060d599f4c84b135a824454f5d2609 ] if (is_linux) { diff --git a/buildtools/third_party/libc++abi/BUILD.gn b/buildtools/third_party/libc++abi/BUILD.gn -index bf3db7adc340d82ade8514a19d1bb033ec38538f..c8bcc73d8b1eefbd7851552c1e8431746c1f4b62 100644 +index 331ea447ea15e9f439396d4c7d41832de60adf4a..b96a994c43ac2ed0b0d5ec599f907ea0b501156e 100644 --- a/buildtools/third_party/libc++abi/BUILD.gn +++ b/buildtools/third_party/libc++abi/BUILD.gn @@ -6,7 +6,7 @@ import("//build/config/android/config.gni") 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 829889daa23e..c00aa3ef2ce8 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,10 +6,10 @@ 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 6bb31f334ab590fe5de47214785270a1ff05f885..780e5a3d43ac06d2543fde0024f3df8a94a1146c 100644 +index 1793075756fe4e22104e308a117c04496c07e0cd..6a1efa79bcf17f7a851aad86934fbcb9217d8cdb 100644 --- a/buildtools/third_party/libc++/__config_site +++ b/buildtools/third_party/libc++/__config_site -@@ -13,7 +13,9 @@ +@@ -18,7 +18,9 @@ // _LIBCPP_ABI_NAMESPACE to a shorter value. #define _LIBCPP_ABI_NAMESPACE __Cr diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 3e412012e514..b5ab66a3a2d2 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 0536c904b8e4ad8bfa9f4ab27250f979dab91b06..5873720454adfb5c4ab92c7748f9a2658a24c33f 100644 +index b4095003bbf3daf82fb628627a991985401245d9..a068a5c37ea84cd37b7842a2f9e6b647af29b211 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -8581,6 +8581,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -8816,6 +8816,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,12 +21,12 @@ index 0536c904b8e4ad8bfa9f4ab27250f979dab91b06..5873720454adfb5c4ab92c7748f9a265 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index fb55a7fac831f797a307711d6cd3d695085e6d03..f8d747565a1d5570c78301ee960ea7cbc4702c65 100644 +index a8caf5066e882c577747c2b570aa9019d1af96e1..697dc1f6dcb5c2ad5a44566a07471dd21a5787ad 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4763,6 +4763,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( - - auto* new_contents_impl = new_contents.get(); +@@ -4695,6 +4695,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( + new_contents_impl->is_popup_ = + params.disposition == WindowOpenDisposition::NEW_POPUP; + if (delegate_) { + delegate_->WebContentsCreatedWithFullParams(this, render_process_id, @@ -37,7 +37,7 @@ index fb55a7fac831f797a307711d6cd3d695085e6d03..f8d747565a1d5570c78301ee960ea7cb // If the new frame has a name, make sure any SiteInstances that can find // this named frame have proxies for it. Must be called after // SetSessionStorageNamespace, since this calls CreateRenderView, which uses -@@ -4804,12 +4810,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4736,12 +4742,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -51,7 +51,7 @@ index fb55a7fac831f797a307711d6cd3d695085e6d03..f8d747565a1d5570c78301ee960ea7cb 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 6df9186bcee6a56da11da8e365c7cf5b4375e366..0fdda1a6e0ac98a8c8619b4d4fab597788155d2e 100644 +index 37a00f8d520e6043faa9b202e2f7a3d7a0794664..08b56afaa591137aafc4aad38da84361742bbe66 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom @@ -605,6 +605,10 @@ struct CreateNewWindowParams { @@ -66,10 +66,10 @@ index 6df9186bcee6a56da11da8e365c7cf5b4375e366..0fdda1a6e0ac98a8c8619b4d4fab5977 // 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 c15c7f969951bab98be416b3a57e0f8ebd46c4bc..927d85c07c11b4b4e2fe56125d38ef3b5477f172 100644 +index dc4110d8878b83c537f8ba32ecbf445ff766341f..83c3de7a2d65310faa4b52d9f5949901206dc15f 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -742,6 +742,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -750,6 +750,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -79,10 +79,10 @@ index c15c7f969951bab98be416b3a57e0f8ebd46c4bc..927d85c07c11b4b4e2fe56125d38ef3b 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 bf8a6e4636065003dd33f0da71d006278ffa6b5f..e04ef368815fa5e5a281e0dc785f180bce77369d 100644 +index 77e3d993b3dc0b0e4121e98f8b05cef05d9cadd0..86154854493f5ad8b05b8f1649a126945d454f3d 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -188,6 +188,7 @@ class NetworkService; +@@ -189,6 +189,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -90,7 +90,7 @@ index bf8a6e4636065003dd33f0da71d006278ffa6b5f..e04ef368815fa5e5a281e0dc785f180b } // namespace network namespace sandbox { -@@ -1273,6 +1274,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1285,6 +1286,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -100,7 +100,7 @@ index bf8a6e4636065003dd33f0da71d006278ffa6b5f..e04ef368815fa5e5a281e0dc785f180b 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 7351bcf45b46a3668ee5d58135c3f5b28a37aacd..fdd2c2be6bc8c75eacfd85d1b1e1531e4715f6a0 100644 +index 0339011bd020ef28ce6edd7b6e02597df4401fab..ef00a3636e7cbbff08365f140da58fef6522005c 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -30,6 +30,17 @@ namespace content { @@ -122,7 +122,7 @@ index 7351bcf45b46a3668ee5d58135c3f5b28a37aacd..fdd2c2be6bc8c75eacfd85d1b1e1531e WebContents* source, const OpenURLParams& params, diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index fd851a9347dd6920e035bc9183991ea2a275aff4..579a796fcfdecf44ab415ceebc30b4278cda112b 100644 +index 138761070b63c16ea440f9eee98fe1139e7c0b09..f7bfa43693cff1a55a1e59950f1ecb06d67b8f3a 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -17,6 +17,7 @@ @@ -148,10 +148,10 @@ index fd851a9347dd6920e035bc9183991ea2a275aff4..579a796fcfdecf44ab415ceebc30b427 // 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 a8dec1b3471abcda88cb03470906389bf29b3503..e5c8967a41c7cd645dfc5d6589a540e2027024df 100644 +index 15d19eee4c9a135080294f4a65639c813a8a4dc5..b559b333138e46192c6d85d7b4dfd0a66fcdc7da 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -6667,6 +6667,10 @@ WebView* RenderFrameImpl::CreateNewWindow( +@@ -6663,6 +6663,10 @@ WebView* RenderFrameImpl::CreateNewWindow( request.HasUserGesture(), GetWebFrame()->IsAdFrame(), GetWebFrame()->IsAdScriptInStack()); @@ -163,7 +163,7 @@ index a8dec1b3471abcda88cb03470906389bf29b3503..e5c8967a41c7cd645dfc5d6589a540e2 // 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 d69026ae4fef521c8f1d18919639cde3504e7880..1ccfbdca49b80f1d028ab677a34313507f235ca3 100644 +index 221efc6ba624036cfb9fc7a287dae29312d4efc1..4319af90dedb12b3ffcacb81e72d8fe073c1da2f 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc @@ -515,6 +515,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( @@ -210,10 +210,10 @@ index 7c901dcc9f171a936ee6eb41dfd899a095a8a915..71748ad3a28946f816e2001ba78bbcb5 } // 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 451c228ec18f25eba303e5b06de6faa0c0800bc0..1041564538f1a6e65494bdc37f51b18021fa62b5 100644 +index 98896006653dfc7e691f51d5a9934ce7c185e1cc..01dfae25605c35867ba54d5a36191d4fc7527687 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2251,6 +2251,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2240,6 +2240,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, entered_window); diff --git a/patches/chromium/chore_add_electron_deps_to_gitignores.patch b/patches/chromium/chore_add_electron_deps_to_gitignores.patch index 69055e13088c..e7328f1ddcc9 100644 --- a/patches/chromium/chore_add_electron_deps_to_gitignores.patch +++ b/patches/chromium/chore_add_electron_deps_to_gitignores.patch @@ -18,11 +18,11 @@ index 50992a3f4502d46a1bc2713c25bec6095c541ffa..121a09d7fa00162fe64ce901cae96d8f /googleurl /gpu/gles2_conform_test diff --git a/third_party/.gitignore b/third_party/.gitignore -index 361b6ad8fea1b6caa4ffa35ddb73b813fab0e388..234c469cbbc611f3cb1b05bb71e36729606009b4 100644 +index e347f59477744c7c4c8b2a7fbe04107e997a9bbe..f3decca9583976705b8f29fe431068575755ed07 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore @@ -48,7 +48,9 @@ - /cygwin + /data_sharing_sdk /devserver /directxsdk +/electron_node @@ -31,14 +31,14 @@ index 361b6ad8fea1b6caa4ffa35ddb73b813fab0e388..234c469cbbc611f3cb1b05bb71e36729 /espresso/lib/ /eyesfree/src /fuchsia-sdk/images -@@ -104,6 +106,7 @@ +@@ -103,6 +105,7 @@ + /mocha /mockito/src /nacl_sdk_binaries/ - /ninja +/nan + /ninja /node/*.tar.gz /node/linux/ - /node/mac/ @@ -153,6 +156,7 @@ /spirv-headers/src /spirv-tools/src diff --git a/patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch b/patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch index e859e6f6df75..33419567d120 100644 --- a/patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch +++ b/patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch @@ -9,10 +9,10 @@ devices is available. This should no longer be necessary if/when https://crbug.com/1096743 is completed. diff --git a/services/device/usb/usb_service_impl.cc b/services/device/usb/usb_service_impl.cc -index fec443719f0b2588db3a306aa961a039a148496b..3da1902ccfb0f582398d3c92071e7c781eb15772 100644 +index f638ad390c4f05bec450d3acaae7697871233a8b..d50bdbf488c0b046a70d174e891807ebbb2be27b 100644 --- a/services/device/usb/usb_service_impl.cc +++ b/services/device/usb/usb_service_impl.cc -@@ -198,7 +198,7 @@ void UsbServiceImpl::GetDevices(GetDevicesCallback callback) { +@@ -203,7 +203,7 @@ void UsbServiceImpl::GetDevices(GetDevicesCallback callback) { return; } 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 60bd92f7b3cd..0ebe84b8cf5a 100644 --- a/patches/chromium/chore_patch_out_partition_attribute_dcheck_for_webviews.patch +++ b/patches/chromium/chore_patch_out_partition_attribute_dcheck_for_webviews.patch @@ -14,7 +14,7 @@ This change patches it out to prevent the DCHECK. It can be removed once/if we see a better solution to the problem. diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc -index 3954983758f6a3c734d4547f55db38cc48066955..ddc22dfce29c8fddcc984de60adcba104f90280e 100644 +index 5e8f841eafbf6dfd8b4af893f7e51874ede80e73..6c542184e2f1ef166337d0d97ca64d2499449251 100644 --- a/content/browser/site_instance_impl.cc +++ b/content/browser/site_instance_impl.cc @@ -211,7 +211,7 @@ scoped_refptr SiteInstanceImpl::CreateForGuest( 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 86ef3830aaed..580314cf3810 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,7 +8,7 @@ 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 6e2d839eb0e7ec1aa260f41904f78b1b2a2cbf73..6e2802e96da51eb0d5130c4847a07b1fddc1231d 100644 +index 8444b1666261e46d1509e1941a6ba5cb10c91edd..48165243dfa7adc8d1d1a23ac339dcfd9e394e60 100644 --- a/chrome/browser/profiles/profile_selections.cc +++ b/chrome/browser/profiles/profile_selections.cc @@ -13,6 +13,7 @@ diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 182e7f7a7ee6..b9a2a7913f8c 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -35,7 +35,7 @@ index 0163968067f2607507493a5e0816aa814de3ba0b..34b94af6a4e3f031a35520fde4173e18 content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) final; diff --git a/chrome/browser/ui/ash/ash_web_view_impl.cc b/chrome/browser/ui/ash/ash_web_view_impl.cc -index 9340d36a4b70fa83ef14722d4eed8d3030497ff8..f8e9e5060044c48d11eac8d783b84add84192640 100644 +index 67ffe13ccdd08e572089918ad07b9d3f2167f2a3..361feb0ea0121363906c69c1b7be272bfd8e5595 100644 --- a/chrome/browser/ui/ash/ash_web_view_impl.cc +++ b/chrome/browser/ui/ash/ash_web_view_impl.cc @@ -118,10 +118,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden( @@ -52,7 +52,7 @@ index 9340d36a4b70fa83ef14722d4eed8d3030497ff8..f8e9e5060044c48d11eac8d783b84add /*from_user_gesture=*/true); return true; diff --git a/chrome/browser/ui/ash/ash_web_view_impl.h b/chrome/browser/ui/ash/ash_web_view_impl.h -index 8a74129ac52e7c7ec0f8bd38b5869f5391c96d85..5d428b60c8e6c407ed12ffac43d86d996cbb09e0 100644 +index c234fda285ae347979ef77683a4340aa48979dbd..2699e20320e5b957656c1035d10aa3b7082bc1a2 100644 --- a/chrome/browser/ui/ash/ash_web_view_impl.h +++ b/chrome/browser/ui/ash/ash_web_view_impl.h @@ -59,8 +59,7 @@ class AshWebViewImpl : public ash::AshWebView, @@ -80,10 +80,10 @@ index 28cd699814f32a7a569d63936b9544567a66d9c4..fd461fa448d983481dc4c0c7d03b1945 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index ea32808db7991b3eb04f66fa0f7dc33a6be94474..481a9c63835122aa05f71b1b57a05de46f148076 100644 +index e53015c127ada628fec797fb4d9e553b1010f353..b04d6307475d10be9431b37c97ae514795b40842 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -2078,12 +2078,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -2068,12 +2068,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -99,10 +99,10 @@ index ea32808db7991b3eb04f66fa0f7dc33a6be94474..481a9c63835122aa05f71b1b57a05de4 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index eea11a77de8738028dde399c4d4e6e8b89e97072..118741930ba2a7314b8d0999fd2bcc09d65977c6 100644 +index cbc5ae1c02941bcf9b2adedbac2eb1baf7227305..0d204f9d06d59f2b6464df3009af1edc75ebe6b0 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -979,8 +979,7 @@ class Browser : public TabStripModelObserver, +@@ -977,8 +977,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 c5b0d3b23b8da318ae55fcac2515a1187f261469..16ed1f46c9afde0ff25750128b4fcff6 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 c02d1b289350c3b3bfb3f0206bc7595e1b84e187..0be9691ccde0ffcbe89bd039ae7f55403344cb73 100644 +index aa0841abdacb72309365f7abd5e7f78129798f0a..7e252a7017b3f6905627b6b8cd203dc2d9baf00b 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4669,8 +4669,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4597,8 +4597,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -232,7 +232,7 @@ index c02d1b289350c3b3bfb3f0206bc7595e1b84e187..0be9691ccde0ffcbe89bd039ae7f5540 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 fdd2c2be6bc8c75eacfd85d1b1e1531e4715f6a0..07f4b77b2be0d96df5e6412b84273ef26b3c0230 100644 +index ef00a3636e7cbbff08365f140da58fef6522005c..685a8007072638ed8a21974e162a44900a2bdc80 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -140,8 +140,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( @@ -246,7 +246,7 @@ index fdd2c2be6bc8c75eacfd85d1b1e1531e4715f6a0..07f4b77b2be0d96df5e6412b84273ef2 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 579a796fcfdecf44ab415ceebc30b4278cda112b..bb327163cd414ec862be62aa1e41f17e96d62715 100644 +index f7bfa43693cff1a55a1e59950f1ecb06d67b8f3a..843111cdfd1364bae993fababd3fdea8334f5289 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -337,8 +337,7 @@ class CONTENT_EXPORT WebContentsDelegate { diff --git a/patches/chromium/chore_remove_reference_to_chrome_browser_themes.patch b/patches/chromium/chore_remove_reference_to_chrome_browser_themes.patch index 2465091de685..b7bddb7a376a 100644 --- a/patches/chromium/chore_remove_reference_to_chrome_browser_themes.patch +++ b/patches/chromium/chore_remove_reference_to_chrome_browser_themes.patch @@ -11,10 +11,10 @@ not need this dependency. refs https://chromium-review.googlesource.com/c/chromium/src/+/5573603 diff --git a/chrome/browser/ui/color/BUILD.gn b/chrome/browser/ui/color/BUILD.gn -index 0dc4f47187dc7e23c3ea60e9ae70ed1c1418e675..830202f119d0be9e6b0700986abb68e0fbd7db6c 100644 +index 9d3db1e12d5f7a888879e6d2b0c67f49c1bd0be8..13f048055e1b8de14f6066f2567f60eed67cd16d 100644 --- a/chrome/browser/ui/color/BUILD.gn +++ b/chrome/browser/ui/color/BUILD.gn -@@ -87,9 +87,6 @@ source_set("mixers") { +@@ -89,9 +89,6 @@ source_set("mixers") { ] } diff --git a/patches/chromium/command-ismediakey.patch b/patches/chromium/command-ismediakey.patch index e7e95c0eec8f..9e4c67c8dbe1 100644 --- a/patches/chromium/command-ismediakey.patch +++ b/patches/chromium/command-ismediakey.patch @@ -66,10 +66,10 @@ index 3c2fc1707e38345c114e140104ffc5a93d704918..40dac9fd7beb7a1a589a479a8035391d bool is_listening_ = false; diff --git a/chrome/browser/extensions/global_shortcut_listener_win.cc b/chrome/browser/extensions/global_shortcut_listener_win.cc -index 88bfc034f4bf8f54452ebea1aae88dc83feb148c..940fd488aad20f688d827186885490009d68690f 100644 +index 2ce5b0038cb613d0a70d7c086e470f4428160b4b..5fa64783dc49193770fa316be92e82f4d73e901b 100644 --- a/chrome/browser/extensions/global_shortcut_listener_win.cc +++ b/chrome/browser/extensions/global_shortcut_listener_win.cc -@@ -62,6 +62,8 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd, +@@ -63,6 +63,8 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd, modifiers |= (LOWORD(lparam) & MOD_SHIFT) ? ui::EF_SHIFT_DOWN : 0; modifiers |= (LOWORD(lparam) & MOD_ALT) ? ui::EF_ALT_DOWN : 0; modifiers |= (LOWORD(lparam) & MOD_CONTROL) ? ui::EF_CONTROL_DOWN : 0; @@ -78,7 +78,7 @@ index 88bfc034f4bf8f54452ebea1aae88dc83feb148c..940fd488aad20f688d82718688549000 ui::Accelerator accelerator( ui::KeyboardCodeForWindowsKeyCode(key_code), modifiers); -@@ -92,6 +94,7 @@ bool GlobalShortcutListenerWin::RegisterAcceleratorImpl( +@@ -93,6 +95,7 @@ bool GlobalShortcutListenerWin::RegisterAcceleratorImpl( modifiers |= accelerator.IsShiftDown() ? MOD_SHIFT : 0; modifiers |= accelerator.IsCtrlDown() ? MOD_CONTROL : 0; modifiers |= accelerator.IsAltDown() ? MOD_ALT : 0; 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 aac71ca3d839..e1840695619d 100644 --- a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch +++ b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch @@ -102,10 +102,10 @@ index f482ce44b4339e0cf2a57a6a4f9db4d1be5fa178..d6fd25ccd747a7a0620f103cb0f101d3 friend class ContentClientCreator; friend class ContentClientInitializer; diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index 1f4ade4905be30789451a117a788782e59f3d4c4..0032741eb6c47323a8beaf8a33f98c95dbc22f8e 100644 +index cafbc4e6f6425853ad8cd3166a341453bfb8b9f4..d9448ee36a997a81082b960e01f3bbbd6e0d4340 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -592,8 +592,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out, +@@ -598,8 +598,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out, #if defined(V8_USE_EXTERNAL_STARTUP_DATA) @@ -115,7 +115,7 @@ index 1f4ade4905be30789451a117a788782e59f3d4c4..0032741eb6c47323a8beaf8a33f98c95 if (g_mapped_snapshot) { // TODO(crbug.com/40558459): Confirm not loading different type of snapshot // files in a process. -@@ -602,10 +601,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) { +@@ -608,10 +607,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) { base::MemoryMappedFile::Region file_region; base::File file = diff --git a/patches/chromium/custom_protocols_plzserviceworker.patch b/patches/chromium/custom_protocols_plzserviceworker.patch index 51fd9ba6f47b..ccdc9618fe3d 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 08bcee90d1c2332361bfa52502632d3dfb598400..71ccf45f9b94bdf9fdf1734cd3e8f349c762ee6c 100644 +index e879216a2f2cde45d9f4286e65400b0b60e1d04f..69e20bb1b257c3199774656c48b1d1a865523e5c 100644 --- a/content/browser/service_worker/service_worker_context_wrapper.cc +++ b/content/browser/service_worker/service_worker_context_wrapper.cc -@@ -2008,6 +2008,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -2024,6 +2024,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( loader_factory_bundle_info = context()->loader_factory_bundle_for_update_check()->Clone(); @@ -38,7 +38,7 @@ index 08bcee90d1c2332361bfa52502632d3dfb598400..71ccf45f9b94bdf9fdf1734cd3e8f349 if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig( browser_context(), scope)) { // If this is a Service Worker for a WebUI, the WebUI's URLDataSource -@@ -2027,9 +2047,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -2043,9 +2063,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( features::kEnableServiceWorkersForChromeScheme) && scope.scheme_piece() == kChromeUIScheme) { config->RegisterURLDataSource(browser_context()); @@ -49,7 +49,7 @@ index 08bcee90d1c2332361bfa52502632d3dfb598400..71ccf45f9b94bdf9fdf1734cd3e8f349 .emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory( browser_context(), kChromeUIScheme, base::flat_set())); -@@ -2037,9 +2055,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -2053,9 +2071,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( features::kEnableServiceWorkersForChromeUntrusted) && scope.scheme_piece() == kChromeUIUntrustedScheme) { config->RegisterURLDataSource(browser_context()); diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 5cdc407d6635..685bf80d77be 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,7 +6,7 @@ Subject: fix: disabling compositor recycling Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index b1630ac4289f23c5dd36a6bf6e57c911d8cede2a..9b8197311b4464a76ddd07263398ef64cae2254d 100644 +index 222a9cd87290efb0e30b503f9b6aaba122019bbe..2eebc699ce20577206b25fe0e83050ae45bb4999 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -557,7 +557,11 @@ diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 5cdb6b13d9ec..453557d9dfbc 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,10 +6,10 @@ Subject: disable_hidden.patch Electron uses this to disable background throttling for hidden windows. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 84a5587bb409ba99ae38d281b7ff65b30b40628a..2c0aec08ab428de9e028dc39694e7d72ede50490 100644 +index 632d06f99f2cf8985f17ba5b06c64b5efa341289..e5778e3fe86517fb2ee4177aa7d4b49a147f14d5 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -777,6 +777,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -781,6 +781,9 @@ void RenderWidgetHostImpl::WasHidden() { return; } @@ -20,10 +20,10 @@ index 84a5587bb409ba99ae38d281b7ff65b30b40628a..2c0aec08ab428de9e028dc39694e7d72 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 00eddcc640363e98ad7927a92368fb600367d49e..757970b31d519e1cbb4ae5a3af512444e41972a8 100644 +index 6f4e44aba5c19fcc2865b070708ef310d6a78d18..b7daed50073b61bf9ceab2c001b52e32cff42bf7 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -1002,6 +1002,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -1000,6 +1000,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl // Requests a commit and forced redraw in the renderer compositor. void ForceRedrawForTesting(); @@ -34,10 +34,10 @@ index 00eddcc640363e98ad7927a92368fb600367d49e..757970b31d519e1cbb4ae5a3af512444 // |routing_id| must not be MSG_ROUTING_NONE. // If this object outlives |delegate|, DetachDelegate() must be called when diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc -index a9ed20cb63b5f0278382d164856a7b6f607279a0..0e969b8580ba6fa9116d5b3d2acfe77b7a8fed14 100644 +index 5ad673b3f4968d7e8ad0bd0f54719939f7aa7f5a..d1336997fbb2b4eae4e36f4266663d296b19d076 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -634,7 +634,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -643,7 +643,7 @@ void RenderWidgetHostViewAura::HideImpl() { CHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index 29caea2413aa..71d3d7412d4d 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 2fce2e901cb9745447c8e55a0d34f742d5bf0d97..0981c31e2e770484b32bbb79f1c6babc0e68d97a 100644 +index de2139d2e7f938d08aa824fdd90e1633dc34ac69..38c228c1df9ae5cbd27844b01929a964bba53f55 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1329,6 +1329,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1338,6 +1338,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index 2fce2e901cb9745447c8e55a0d34f742d5bf0d97..0981c31e2e770484b32bbb79f1c6babc // 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 && -@@ -1378,6 +1379,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1387,6 +1388,7 @@ void Navigator::RecordNavigationMetrics( first_before_unload_start_time) .InMilliseconds()); } diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index e9e0e24660cd..538246a2c0d9 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 cf6141b4c886aab554ad347c0b5e4b88979261ad..ecda0abf1d19b22513a7315351d38ae12ae36996 100644 +index de631f7f1c9067746847a4fe046ef376ec5fcf11..9448e1d8b67a290ef498c038896b06f2a3bd1f65 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1673,6 +1673,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1716,6 +1716,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index cf6141b4c886aab554ad347c0b5e4b88979261ad..ecda0abf1d19b22513a7315351d38ae1 // 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 134a89ace8e7f06744cb13e83b2997236b160ade..9dd05a2192ae502b85dd202d78fab83e90314e48 100644 +index f9f0cf9534934346e55ea7ebb23bd17127c59914..4b81c9b824297714abfc5b14ec01797c28e478ba 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -316,6 +316,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -315,6 +315,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 134a89ace8e7f06744cb13e83b2997236b160ade..9dd05a2192ae502b85dd202d78fab83e void SetEnableReferrers(bool enable_referrers) override; #if BUILDFLAG(IS_CT_SUPPORTED) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 19f568b78c621ecbec64b8eb46c8c92d7af650f7..8abdfc8c32c7f3c05bd8436c4d4349af53852eaf 100644 +index 53b62d8ef441212469158feb569865e8f54c5b48..d54548005e16fe28cc05d2dc86aea3e26c74838f 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1265,6 +1265,9 @@ interface NetworkContext { +@@ -1290,6 +1290,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,10 +77,10 @@ index 19f568b78c621ecbec64b8eb46c8c92d7af650f7..8abdfc8c32c7f3c05bd8436c4d4349af SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index eb78d84ad3d6124313cf7b940425b0162d554fd6..80bfebc12978d976e239f6c81f1fff3aef5614c7 100644 +index cc01bb23132c15903640c37c7e6c12674678408e..c973aaba17a7a55cdfb29825e0567012ce9e6162 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -147,6 +147,7 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -154,6 +154,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/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 58c4d4be0791..52602d02e47c 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -12,7 +12,7 @@ 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 e2f3e1171327eafb62d824c1241b0a06feb98312..f1e4c0eb81b0f23b3151e7426309315a9c2b0f26 100644 +index 831b3b1ee47a88b6b02a2256682e4a9b1cbeda3c..ef68f9cbc63772f50269520fb0198a95e4270947 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -168,6 +168,7 @@ @@ -23,7 +23,7 @@ index e2f3e1171327eafb62d824c1241b0a06feb98312..f1e4c0eb81b0f23b3151e7426309315a #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" -@@ -1839,6 +1840,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1837,6 +1838,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_set_theme_source_to_allow_apps_to.patch b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch index 1d3faf4ba1da..733d5e5fc282 100644 --- a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch +++ b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch @@ -13,7 +13,7 @@ uses internally for things like menus and devtools. We can remove this patch once it has in some shape been upstreamed. diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc -index f62df6eb7d12b9decea1b3c0f29f557aa0ccddac..c977daee5622f67013a52dc4e77a6fe482b153c8 100644 +index 2a1b1cec67b1c125a82d46e600ccc99141f9dae8..615d64309ffc039deb1ae324518c5ee85931a10a 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc @@ -209,6 +209,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors, @@ -26,10 +26,10 @@ index f62df6eb7d12b9decea1b3c0f29f557aa0ccddac..c977daee5622f67013a52dc4e77a6fe4 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index fc32dfb0de44f0c174012c535dc8f06656795d5c..7011061bc8a64979cda3c558dff98aa4e3f84660 100644 +index 9caf18c2106c7ef081a7ff35517be07077e7df0e..1d1a85c27e8577ab1f613c15f76344f186dea595 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -434,6 +434,23 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -445,6 +445,23 @@ class NATIVE_THEME_EXPORT NativeTheme { scoped_refptr custom_theme, bool use_custom_frame = true) const; @@ -53,7 +53,7 @@ index fc32dfb0de44f0c174012c535dc8f06656795d5c..7011061bc8a64979cda3c558dff98aa4 // Returns a shared instance of the native theme that should be used for web // rendering. Do not use it in a normal application context (i.e. browser). // The returned object should not be deleted by the caller. This function is -@@ -656,6 +673,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -673,6 +690,7 @@ class NATIVE_THEME_EXPORT NativeTheme { PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight; PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference; std::optional caret_blink_interval_; diff --git a/patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch b/patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch index 4de6b2e9097c..d86764a41e4c 100644 --- a/patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch +++ b/patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch @@ -14,85 +14,31 @@ It also: This may be partially upstreamed to Chromium in the future. diff --git a/ui/gtk/select_file_dialog_linux_gtk.cc b/ui/gtk/select_file_dialog_linux_gtk.cc -index 698b0971130fa58bed102ce447a8335a9c74990b..e1a787744a472afdce04943b5bcb9dc671dca9d4 100644 +index e10245b4f36f324510a2dfd785ffaa2ceaad48d6..befb5666134d5f299b228e3d654fa2b0d39c9299 100644 --- a/ui/gtk/select_file_dialog_linux_gtk.cc +++ b/ui/gtk/select_file_dialog_linux_gtk.cc -@@ -243,6 +243,10 @@ void SelectFileDialogLinuxGtk::SelectFileImpl( - - std::string title_string = base::UTF16ToUTF8(title); - -+ ExtraSettings extra_settings; -+ if (params) -+ extra_settings = *(static_cast(params)); -+ - set_file_type_index(file_type_index); - if (file_types) - set_file_types(*file_types); -@@ -261,23 +265,23 @@ void SelectFileDialogLinuxGtk::SelectFileImpl( - case SELECT_UPLOAD_FOLDER: - case SELECT_EXISTING_FOLDER: - dialog = CreateSelectFolderDialog(type, title_string, default_path, -- owning_window); -+ owning_window, extra_settings); - connect("response", - &SelectFileDialogLinuxGtk::OnSelectSingleFolderDialogResponse); - break; - case SELECT_OPEN_FILE: -- dialog = CreateFileOpenDialog(title_string, default_path, owning_window); -+ dialog = CreateFileOpenDialog(title_string, default_path, owning_window, extra_settings); - connect("response", - &SelectFileDialogLinuxGtk::OnSelectSingleFileDialogResponse); - break; - case SELECT_OPEN_MULTI_FILE: - dialog = -- CreateMultiFileOpenDialog(title_string, default_path, owning_window); -+ CreateMultiFileOpenDialog(title_string, default_path, owning_window, extra_settings); - connect("response", - &SelectFileDialogLinuxGtk::OnSelectMultiFileDialogResponse); - break; - case SELECT_SAVEAS_FILE: -- dialog = CreateSaveAsDialog(title_string, default_path, owning_window); -+ dialog = CreateSaveAsDialog(title_string, default_path, owning_window, extra_settings); - connect("response", - &SelectFileDialogLinuxGtk::OnSelectSingleFileDialogResponse); - break; -@@ -412,10 +416,14 @@ void SelectFileDialogLinuxGtk::FileNotSelected(GtkWidget* dialog) { - GtkWidget* SelectFileDialogLinuxGtk::CreateFileOpenHelper( +@@ -408,9 +408,11 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateFileOpenHelper( const std::string& title, const base::FilePath& default_path, -- gfx::NativeWindow parent) { -+ gfx::NativeWindow parent, -+ const ExtraSettings& settings) { -+ const char* button_label = settings.button_label.empty() -+ ? GetOpenLabel() -+ : settings.button_label.c_str(); + gfx::NativeWindow parent) { ++ const char* accept_button_label = ++ button_label().empty() ? GetOpenLabel() : button_label().c_str(); GtkWidget* dialog = GtkFileChooserDialogNew( title.c_str(), nullptr, GTK_FILE_CHOOSER_ACTION_OPEN, GetCancelLabel(), - GTK_RESPONSE_CANCEL, GetOpenLabel(), GTK_RESPONSE_ACCEPT); -+ GTK_RESPONSE_CANCEL, button_label, GTK_RESPONSE_ACCEPT); ++ GTK_RESPONSE_CANCEL, accept_button_label, GTK_RESPONSE_ACCEPT); SetGtkTransientForAura(dialog, parent); AddFilters(GTK_FILE_CHOOSER(dialog)); -@@ -431,6 +439,8 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateFileOpenHelper( +@@ -426,6 +428,7 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateFileOpenHelper( GtkFileChooserSetCurrentFolder(GTK_FILE_CHOOSER(dialog), *last_opened_path()); } -+ gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(dialog), -+ settings.show_hidden); ++ gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(dialog), show_hidden()); return dialog; } -@@ -438,7 +448,8 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSelectFolderDialog( - Type type, - const std::string& title, - const base::FilePath& default_path, -- gfx::NativeWindow parent) { -+ gfx::NativeWindow parent, -+ const ExtraSettings& settings) { - std::string title_string = title; - if (title_string.empty()) { - title_string = -@@ -446,11 +457,14 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSelectFolderDialog( +@@ -441,11 +444,15 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSelectFolderDialog( ? l10n_util::GetStringUTF8(IDS_SELECT_UPLOAD_FOLDER_DIALOG_TITLE) : l10n_util::GetStringUTF8(IDS_SELECT_FOLDER_DIALOG_TITLE); } @@ -102,272 +48,186 @@ index 698b0971130fa58bed102ce447a8335a9c74990b..e1a787744a472afdce04943b5bcb9dc6 - IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON) - : GetOpenLabel(); + -+ std::string accept_button_label = settings.button_label; ++ std::string accept_button_label = button_label(); + if (accept_button_label.empty()) { -+ accept_button_label = (type == SELECT_UPLOAD_FOLDER) -+ ? l10n_util::GetStringUTF8( -+ IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON) -+ : GetOpenLabel(); ++ accept_button_label = ++ (type == SELECT_UPLOAD_FOLDER) ++ ? l10n_util::GetStringUTF8( ++ IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON) ++ : GetOpenLabel(); + } GtkWidget* dialog = GtkFileChooserDialogNew( title_string.c_str(), nullptr, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, -@@ -472,19 +486,21 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSelectFolderDialog( +@@ -467,7 +474,8 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSelectFolderDialog( gtk_file_filter_add_mime_type(only_folders, "inode/directory"); gtk_file_filter_add_mime_type(only_folders, "text/directory"); gtk_file_chooser_add_filter(chooser, only_folders); - gtk_file_chooser_set_select_multiple(chooser, FALSE); -+ gtk_file_chooser_set_select_multiple(chooser, settings.allow_multiple_selection); -+ gtk_file_chooser_set_show_hidden(chooser, settings.show_hidden); ++ gtk_file_chooser_set_select_multiple(chooser, allow_multiple_selection()); ++ gtk_file_chooser_set_show_hidden(chooser, show_hidden()); return dialog; } - GtkWidget* SelectFileDialogLinuxGtk::CreateFileOpenDialog( - const std::string& title, - const base::FilePath& default_path, -- gfx::NativeWindow parent) { -+ gfx::NativeWindow parent, -+ const ExtraSettings& settings) { - std::string title_string = - !title.empty() ? title - : l10n_util::GetStringUTF8(IDS_OPEN_FILE_DIALOG_TITLE); - -- GtkWidget* dialog = CreateFileOpenHelper(title_string, default_path, parent); -+ GtkWidget* dialog = CreateFileOpenHelper(title_string, default_path, parent, settings); - gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), FALSE); - return dialog; - } -@@ -492,12 +508,14 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateFileOpenDialog( - GtkWidget* SelectFileDialogLinuxGtk::CreateMultiFileOpenDialog( - const std::string& title, - const base::FilePath& default_path, -- gfx::NativeWindow parent) { -+ gfx::NativeWindow parent, -+ const ExtraSettings& settings) { - std::string title_string = - !title.empty() ? title - : l10n_util::GetStringUTF8(IDS_OPEN_FILES_DIALOG_TITLE); - -- GtkWidget* dialog = CreateFileOpenHelper(title_string, default_path, parent); -+ GtkWidget* dialog = -+ CreateFileOpenHelper(title_string, default_path, parent, settings); - gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), TRUE); - return dialog; - } -@@ -505,14 +523,17 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateMultiFileOpenDialog( - GtkWidget* SelectFileDialogLinuxGtk::CreateSaveAsDialog( - const std::string& title, - const base::FilePath& default_path, -- gfx::NativeWindow parent) { -+ gfx::NativeWindow parent, -+ const ExtraSettings& settings) { +@@ -504,10 +512,11 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSaveAsDialog( std::string title_string = !title.empty() ? title : l10n_util::GetStringUTF8(IDS_SAVE_AS_DIALOG_TITLE); - -+ const char* button_label = settings.button_label.empty() -+ ? GetSaveLabel() -+ : settings.button_label.c_str(); ++ const char* accept_button_label = ++ button_label().empty() ? GetSaveLabel() : button_label().c_str(); GtkWidget* dialog = GtkFileChooserDialogNew( title_string.c_str(), nullptr, GTK_FILE_CHOOSER_ACTION_SAVE, - GetCancelLabel(), GTK_RESPONSE_CANCEL, GetSaveLabel(), -+ GetCancelLabel(), GTK_RESPONSE_CANCEL, button_label, ++ GetCancelLabel(), GTK_RESPONSE_CANCEL, accept_button_label, GTK_RESPONSE_ACCEPT); SetGtkTransientForAura(dialog, parent); -@@ -538,9 +559,10 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSaveAsDialog( +@@ -533,9 +542,10 @@ GtkWidget* SelectFileDialogLinuxGtk::CreateSaveAsDialog( gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), FALSE); // Overwrite confirmation is always enabled in GTK4. if (!GtkCheckVersion(4)) { - gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), - TRUE); + gtk_file_chooser_set_do_overwrite_confirmation( -+ GTK_FILE_CHOOSER(dialog), settings.show_overwrite_confirmation); ++ GTK_FILE_CHOOSER(dialog), show_overwrite_confirmation()); } -+ gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(dialog), settings.show_hidden); ++ gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(dialog), show_hidden()); return dialog; } -diff --git a/ui/gtk/select_file_dialog_linux_gtk.h b/ui/gtk/select_file_dialog_linux_gtk.h -index 1c5f12fb39c648cff21da551372239167e4d8ff4..21c84810d0bdfa007ea17ffcdad9682b04e15bf4 100644 ---- a/ui/gtk/select_file_dialog_linux_gtk.h -+++ b/ui/gtk/select_file_dialog_linux_gtk.h -@@ -91,19 +91,23 @@ class SelectFileDialogLinuxGtk : public ui::SelectFileDialogLinux, - GtkWidget* CreateSelectFolderDialog(Type type, - const std::string& title, - const base::FilePath& default_path, -- gfx::NativeWindow parent); -+ gfx::NativeWindow parent, -+ const ExtraSettings& settings); +diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_file_dialog.h +index 657faef293353ab97e815b9682068a43963ea5a7..5ffa267d190d41b45f8b5bcdcf80297ab5ac3819 100644 +--- a/ui/shell_dialogs/select_file_dialog.h ++++ b/ui/shell_dialogs/select_file_dialog.h +@@ -222,6 +222,21 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog + const GURL* caller = nullptr); + bool HasMultipleFileTypeChoices(); - GtkWidget* CreateFileOpenDialog(const std::string& title, - const base::FilePath& default_path, -- gfx::NativeWindow parent); -+ gfx::NativeWindow parent, -+ const ExtraSettings& settings); ++#if BUILDFLAG(IS_LINUX) ++ // Set the label used for the file select button. ++ virtual void SetButtonLabel(const std::string& label) = 0; ++ ++ // Set whether a confirmation should be shown when attempting to overwrite an ++ // existing file. ++ virtual void SetOverwriteConfirmationShown(bool is_shown) = 0; ++ ++ // Set whether hidden files should be shown. ++ virtual void SetHiddenShown(bool is_shown) = 0; ++ ++ // Set whether multiple file/directory selections are allowed ++ virtual void SetMultipleSelectionsAllowed(bool is_allowed) = 0; ++#endif ++ + protected: + friend class base::RefCountedThreadSafe; - GtkWidget* CreateMultiFileOpenDialog(const std::string& title, - const base::FilePath& default_path, -- gfx::NativeWindow parent); -+ gfx::NativeWindow parent, -+ const ExtraSettings& settings); +diff --git a/ui/shell_dialogs/select_file_dialog_linux.cc b/ui/shell_dialogs/select_file_dialog_linux.cc +index 4b540a7fcdf077640e6eab0249f23ccb35a0fcb1..1ca82e8c12d2c9af09ab5facdd9753e83fcc44e4 100644 +--- a/ui/shell_dialogs/select_file_dialog_linux.cc ++++ b/ui/shell_dialogs/select_file_dialog_linux.cc +@@ -37,4 +37,17 @@ bool SelectFileDialogLinux::CallDirectoryExistsOnUIThread( + return base::DirectoryExists(path); + } - GtkWidget* CreateSaveAsDialog(const std::string& title, - const base::FilePath& default_path, -- gfx::NativeWindow parent); -+ gfx::NativeWindow parent, -+ const ExtraSettings& settings); - - // Removes and returns the |params| associated with |dialog| from - // |params_map_|. -@@ -122,7 +126,8 @@ class SelectFileDialogLinuxGtk : public ui::SelectFileDialogLinux, - // Common function for CreateFileOpenDialog and CreateMultiFileOpenDialog. - GtkWidget* CreateFileOpenHelper(const std::string& title, - const base::FilePath& default_path, -- gfx::NativeWindow parent); -+ gfx::NativeWindow parent, -+ const ExtraSettings& settings); - - // Callback for when the user responds to a Save As or Open File dialog. - void OnSelectSingleFileDialogResponse(GtkWidget* dialog, int response_id); ++void SelectFileDialogLinux::SetButtonLabel(const std::string& label) { ++ button_label_ = label; ++} ++void SelectFileDialogLinux::SetOverwriteConfirmationShown(bool is_shown) { ++ show_overwrite_confirmation_ = is_shown; ++} ++void SelectFileDialogLinux::SetHiddenShown(bool is_shown) { ++ show_hidden_ = is_shown; ++} ++void SelectFileDialogLinux::SetMultipleSelectionsAllowed(bool is_allowed) { ++ allow_multiple_selection_ = is_allowed; ++} ++ + } // namespace ui diff --git a/ui/shell_dialogs/select_file_dialog_linux.h b/ui/shell_dialogs/select_file_dialog_linux.h -index 20ad001988831afca73315c577f90c824a36e282..57a8d35ace583eaafb526f70935d21c0f8fd1078 100644 +index 61683d0eddb04c494ca5e650e7d556b44968ec49..5492456a9138b250e97a5479838bb443cafff8bb 100644 --- a/ui/shell_dialogs/select_file_dialog_linux.h +++ b/ui/shell_dialogs/select_file_dialog_linux.h -@@ -26,6 +26,13 @@ class SHELL_DIALOGS_EXPORT SelectFileDialogLinux : public SelectFileDialog { - SelectFileDialogLinux(const SelectFileDialogLinux&) = delete; - SelectFileDialogLinux& operator=(const SelectFileDialogLinux&) = delete; +@@ -33,6 +33,12 @@ class SHELL_DIALOGS_EXPORT SelectFileDialogLinux : public SelectFileDialog { + // BaseShellDialog implementation. + void ListenerDestroyed() override; -+ struct ExtraSettings { -+ std::string button_label; -+ bool show_overwrite_confirmation = true; -+ bool show_hidden = false; -+ bool allow_multiple_selection = false; -+ }; ++ // SelectFileDialog: ++ void SetButtonLabel(const std::string& label) override; ++ void SetOverwriteConfirmationShown(bool is_shown) override; ++ void SetHiddenShown(bool is_shown) override; ++ void SetMultipleSelectionsAllowed(bool is_allowed) override; + - // Returns true if the SelectFileDialog class returned by - // NewSelectFileDialogImplKDE will actually work. - static bool CheckKDEDialogWorksOnUIThread(std::string& kdialog_version); + protected: + explicit SelectFileDialogLinux(Listener* listener, + std::unique_ptr policy); +@@ -77,6 +83,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialogLinux : public SelectFileDialog { + *last_opened_path_ = last_opened_path; + } + ++ const std::string& button_label() { return button_label_; } ++ bool show_overwrite_confirmation() { return show_overwrite_confirmation_; } ++ bool show_hidden() { return show_hidden_; } ++ bool allow_multiple_selection() { return allow_multiple_selection_; } ++ + private: + // The file filters. + FileTypeInfo file_types_; +@@ -92,6 +103,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialogLinux : public SelectFileDialog { + // file so that we can display future dialogs with the same starting path. + static base::FilePath* last_saved_path_; + static base::FilePath* last_opened_path_; ++ ++ std::string button_label_; ++ bool show_overwrite_confirmation_ = true; ++ bool show_hidden_ = false; ++ bool allow_multiple_selection_ = false; + }; + + } // namespace ui diff --git a/ui/shell_dialogs/select_file_dialog_linux_kde.cc b/ui/shell_dialogs/select_file_dialog_linux_kde.cc -index c79fb47bfba9233da7d2c1438d1e26600684fc78..d7cc7cd70653aaa5b628ef456dcb48a2eef5ec5e 100644 +index 58985ce62dc569256bad5e94de9c0d125fc470d0..33436784b691c860d58f8b4dfcc6718e38a4da47 100644 --- a/ui/shell_dialogs/select_file_dialog_linux_kde.cc +++ b/ui/shell_dialogs/select_file_dialog_linux_kde.cc -@@ -480,6 +480,9 @@ void SelectFileDialogLinuxKde::CreateSelectFolderDialog( - int title_message_id = (type == SELECT_UPLOAD_FOLDER) - ? IDS_SELECT_UPLOAD_FOLDER_DIALOG_TITLE - : IDS_SELECT_FOLDER_DIALOG_TITLE; -+ ExtraSettings extra_settings; -+ if (params) -+ extra_settings = *(static_cast(params)); - pipe_task_runner_->PostTaskAndReplyWithResult( - FROM_HERE, - base::BindOnce( -@@ -487,7 +490,7 @@ void SelectFileDialogLinuxKde::CreateSelectFolderDialog( +@@ -468,7 +468,7 @@ void SelectFileDialogLinuxKde::CreateSelectFolderDialog( KDialogParams( "--getexistingdirectory", GetTitle(title, title_message_id), default_path.empty() ? *last_opened_path() : default_path, parent, - false, false)), -+ false, extra_settings.allow_multiple_selection)), ++ false, allow_multiple_selection())), base::BindOnce( &SelectFileDialogLinuxKde::OnSelectSingleFolderDialogResponse, this, - parent, params)); + parent)); diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.cc b/ui/shell_dialogs/select_file_dialog_linux_portal.cc -index 65727489ddecb755eeabbd194ce843ca9eaa59c9..38134183309f89b76e7d2a8cda0a11f530b79d44 100644 +index d94540d0a7bf90f57acdaf8ca6665cf283a646bf..9a892a2d1ac1480d3af7968c9dcaa7c69806fd0e 100644 --- a/ui/shell_dialogs/select_file_dialog_linux_portal.cc +++ b/ui/shell_dialogs/select_file_dialog_linux_portal.cc -@@ -219,6 +219,10 @@ void SelectFileDialogLinuxPortal::SelectFileImpl( +@@ -216,6 +216,8 @@ void SelectFileDialogLinuxPortal::SelectFileImpl( + weak_factory_.GetWeakPtr())); + info_->type = type; info_->main_task_runner = base::SequencedTaskRunner::GetCurrentDefault(); - listener_params_ = params; ++ info_->button_label = button_label(); ++ info_->allow_multiple_selection = allow_multiple_selection(); -+ ExtraSettings extra_settings; -+ if (params) -+ extra_settings = *(static_cast(params)); -+ if (owning_window) { if (auto* root = owning_window->GetRootWindow()) { - if (auto* host = root->GetNativeWindowProperty( -@@ -246,7 +250,7 @@ void SelectFileDialogLinuxPortal::SelectFileImpl( - host_->GetAcceleratedWidget(), - base::BindOnce( - &SelectFileDialogLinuxPortal::SelectFileImplWithParentHandle, -- this, title, default_path, filter_set, default_extension))) { -+ this, title, default_path, filter_set, default_extension, extra_settings))) { - // Return early to skip the fallback below. - return; - } else { -@@ -256,7 +260,7 @@ void SelectFileDialogLinuxPortal::SelectFileImpl( - - // No parent, so just use a blank parent handle. - SelectFileImplWithParentHandle(title, default_path, filter_set, -- default_extension, ""); -+ default_extension, extra_settings, ""); - } - - bool SelectFileDialogLinuxPortal::HasMultipleFileTypeChoicesImpl() { -@@ -453,6 +457,7 @@ void SelectFileDialogLinuxPortal::SelectFileImplWithParentHandle( - base::FilePath default_path, - PortalFilterSet filter_set, - base::FilePath::StringType default_extension, -+ const ExtraSettings& settings, - std::string parent_handle) { - bool default_path_exists = CallDirectoryExistsOnUIThread(default_path); - dbus_thread_linux::GetTaskRunner()->PostTask( -@@ -461,7 +466,7 @@ void SelectFileDialogLinuxPortal::SelectFileImplWithParentHandle( - &SelectFileDialogLinuxPortal::DialogInfo::SelectFileImplOnBusThread, - info_, std::move(title), std::move(default_path), default_path_exists, - std::move(filter_set), std::move(default_extension), -- std::move(parent_handle))); -+ std::move(parent_handle), std::move(settings))); - } - - void SelectFileDialogLinuxPortal::DialogInfo::SelectFileImplOnBusThread( -@@ -470,7 +475,8 @@ void SelectFileDialogLinuxPortal::DialogInfo::SelectFileImplOnBusThread( - const bool default_path_exists, - PortalFilterSet filter_set, - base::FilePath::StringType default_extension, -- std::string parent_handle) { -+ std::string parent_handle, -+ const ExtraSettings& settings) { - DCHECK(dbus_thread_linux::GetTaskRunner()->RunsTasksInCurrentSequence()); - dbus::Bus* bus = AcquireBusOnBusThread(); - if (!bus->Connect()) -@@ -516,7 +522,7 @@ void SelectFileDialogLinuxPortal::DialogInfo::SelectFileImplOnBusThread( - base::StringPrintf("handle_%d", handle_token_counter_++); - - AppendOptions(&writer, response_handle_token, default_path, -- default_path_exists, filter_set); -+ default_path_exists, filter_set, settings); - - // The sender part of the handle object contains the D-Bus connection name - // without the prefix colon and with all dots replaced with underscores. -@@ -546,7 +552,8 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions( - const std::string& response_handle_token, - const base::FilePath& default_path, - const bool default_path_exists, -- const SelectFileDialogLinuxPortal::PortalFilterSet& filter_set) { -+ const SelectFileDialogLinuxPortal::PortalFilterSet& filter_set, -+ const ExtraSettings& settings) { - dbus::MessageWriter options_writer(nullptr); - writer->OpenArray("{sv}", &options_writer); - -@@ -554,8 +561,10 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions( +@@ -552,7 +554,9 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions( response_handle_token); if (type == SelectFileDialog::Type::SELECT_UPLOAD_FOLDER) { - AppendStringOption(&options_writer, kFileChooserOptionAcceptLabel, -- l10n_util::GetStringUTF8( -+ const std::string accept_label = settings.button_label.empty() -+ ? kFileChooserOptionAcceptLabel -+ : settings.button_label; -+ AppendStringOption(&options_writer, accept_label, l10n_util::GetStringUTF8( ++ const std::string accept_label = ++ button_label.empty() ? kFileChooserOptionAcceptLabel : button_label; ++ AppendStringOption(&options_writer, accept_label, + l10n_util::GetStringUTF8( IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON)); } - -@@ -563,12 +572,12 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions( +@@ -561,12 +565,13 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions( type == SelectFileDialog::Type::SELECT_UPLOAD_FOLDER || type == SelectFileDialog::Type::SELECT_EXISTING_FOLDER) { AppendBoolOption(&options_writer, kFileChooserOptionDirectory, true); -+ AppendBoolOption(&options_writer, kFileChooserOptionMultiple, settings.allow_multiple_selection); ++ AppendBoolOption(&options_writer, kFileChooserOptionMultiple, ++ allow_multiple_selection); } else if (type == SelectFileDialog::Type::SELECT_OPEN_MULTI_FILE) { AppendBoolOption(&options_writer, kFileChooserOptionMultiple, true); } @@ -379,34 +239,15 @@ index 65727489ddecb755eeabbd194ce843ca9eaa59c9..38134183309f89b76e7d2a8cda0a11f5 // If this is an existing directory, navigate to that directory, with no // filename. diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.h b/ui/shell_dialogs/select_file_dialog_linux_portal.h -index c487f7da19e2d05696a8eb72f2fa3e12972149f3..02a40c571570974dcc61e1b1f7ed95fbfc2bedf2 100644 +index 47e3b0e658858ba5f3219f04d258bdf6dd7c26ed..ff8eaabb406cdf759f7a62725171aaf9f74ce183 100644 --- a/ui/shell_dialogs/select_file_dialog_linux_portal.h +++ b/ui/shell_dialogs/select_file_dialog_linux_portal.h -@@ -115,7 +115,8 @@ class SelectFileDialogLinuxPortal : public SelectFileDialogLinux { - const bool default_path_exists, - PortalFilterSet filter_set, - base::FilePath::StringType default_extension, -- std::string parent_handle); -+ std::string parent_handle, -+ const ExtraSettings& settings); +@@ -117,6 +117,8 @@ class SelectFileDialogLinuxPortal : public SelectFileDialogLinux { Type type; // The task runner the SelectFileImpl method was called on. scoped_refptr main_task_runner; -@@ -143,7 +144,8 @@ class SelectFileDialogLinuxPortal : public SelectFileDialogLinux { - const std::string& response_handle_token, - const base::FilePath& default_path, - const bool derfault_path_exists, -- const PortalFilterSet& filter_set); -+ const PortalFilterSet& filter_set, -+ const ExtraSettings& settings); - void AppendFilterStruct(dbus::MessageWriter* writer, - const PortalFilter& filter); - std::vector ConvertUrisToPaths( -@@ -190,6 +192,7 @@ class SelectFileDialogLinuxPortal : public SelectFileDialogLinux { - base::FilePath default_path, - PortalFilterSet filter_set, - base::FilePath::StringType default_extension, -+ const ExtraSettings& settings, - std::string parent_handle); ++ std::string button_label; ++ bool allow_multiple_selection = false; - void DialogCreatedOnMainThread(); + private: + friend class base::RefCountedThreadSafe; diff --git a/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch b/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch index 2b992764522e..64b6f363edc0 100644 --- a/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch +++ b/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch @@ -9,7 +9,7 @@ embedders to make custom schemes allow V8 code cache. Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/5019665 diff --git a/content/browser/code_cache/generated_code_cache.cc b/content/browser/code_cache/generated_code_cache.cc -index 7982c87feb19cf80aa05025996b50b1d9be5f54c..8434fdab9d0e66f54381ed96142b138a5149c9ce 100644 +index d9e3751608d19adc82bf67959a44926852d8eb85..3ad5a73c1326e4f9333d4f1af90bdd064e4024dd 100644 --- a/content/browser/code_cache/generated_code_cache.cc +++ b/content/browser/code_cache/generated_code_cache.cc @@ -12,6 +12,7 @@ @@ -20,7 +20,7 @@ index 7982c87feb19cf80aa05025996b50b1d9be5f54c..8434fdab9d0e66f54381ed96142b138a #include "base/feature_list.h" #include "base/functional/bind.h" #include "base/functional/callback_helpers.h" -@@ -32,6 +33,7 @@ +@@ -36,6 +37,7 @@ #include "net/http/http_cache.h" #include "third_party/blink/public/common/scheme_registry.h" #include "url/gurl.h" @@ -28,7 +28,7 @@ index 7982c87feb19cf80aa05025996b50b1d9be5f54c..8434fdab9d0e66f54381ed96142b138a using storage::BigIOBuffer; -@@ -44,7 +46,7 @@ constexpr char kSeparator[] = " \n"; +@@ -48,7 +50,7 @@ constexpr char kSeparator[] = " \n"; // We always expect to receive valid URLs that can be used as keys to the code // cache. The relevant checks (for ex: resource_url is valid, origin_lock is @@ -37,7 +37,7 @@ index 7982c87feb19cf80aa05025996b50b1d9be5f54c..8434fdab9d0e66f54381ed96142b138a // // This function doesn't enforce anything in the production code. It is here // to make the assumptions explicit and to catch any errors when DCHECKs are -@@ -54,33 +56,55 @@ void CheckValidKeys(const GURL& resource_url, +@@ -58,33 +60,55 @@ void CheckValidKeys(const GURL& resource_url, GeneratedCodeCache::CodeCacheType cache_type) { // If the resource url is invalid don't cache the code. DCHECK(resource_url.is_valid()); @@ -117,7 +117,7 @@ index 7982c87feb19cf80aa05025996b50b1d9be5f54c..8434fdab9d0e66f54381ed96142b138a // Generates the cache key for the given |resource_url|, |origin_lock| and diff --git a/content/browser/code_cache/generated_code_cache.h b/content/browser/code_cache/generated_code_cache.h -index f5c5ff2c89489257003dfe3284ee9de9f517c99b..fdd2e2483171c4d43963590200817dac27d22cf9 100644 +index e0cdc785d2557bc79bde98728c23c239ed8d0961..74e0acbea1e0c18a6ac8971170efc945ca58f4ed 100644 --- a/content/browser/code_cache/generated_code_cache.h +++ b/content/browser/code_cache/generated_code_cache.h @@ -52,12 +52,14 @@ class CONTENT_EXPORT GeneratedCodeCache { 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 03e0f13bf314..e8d98747f6bd 100644 --- a/patches/chromium/feat_configure_launch_options_for_service_process.patch +++ b/patches/chromium/feat_configure_launch_options_for_service_process.patch @@ -18,7 +18,7 @@ to STDOUT_FILENO/STD_OUTPUT_HANDLE and STDERR_FILENO/STD_ERROR_HANDLE allowing t parent process to read from the pipe. diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h -index 804532e89f46d4cccd295e0c78977405af53b485..178eaeff8159e7f28e4e17cc44e9fb7bfc9a007e 100644 +index a4c96c333e840527a18a7ed935cb36726f56f190..1166a67c6912b5e0b497eddc914e2e270e137104 100644 --- a/content/browser/child_process_launcher.h +++ b/content/browser/child_process_launcher.h @@ -32,6 +32,7 @@ @@ -29,7 +29,7 @@ index 804532e89f46d4cccd295e0c78977405af53b485..178eaeff8159e7f28e4e17cc44e9fb7b #endif #if BUILDFLAG(IS_POSIX) -@@ -170,7 +171,10 @@ struct ChildProcessLauncherFileData { +@@ -174,7 +175,10 @@ struct ChildProcessLauncherFileData { delete; ~ChildProcessLauncherFileData(); @@ -41,7 +41,7 @@ index 804532e89f46d4cccd295e0c78977405af53b485..178eaeff8159e7f28e4e17cc44e9fb7b // Files opened by the browser and passed as corresponding file descriptors // in the child process. If a FilePath is provided, the file will be opened // and the descriptor cached for future process launches. If a ScopedFD is -@@ -185,6 +189,15 @@ struct ChildProcessLauncherFileData { +@@ -189,6 +193,15 @@ struct ChildProcessLauncherFileData { std::map> files_to_preload; #endif @@ -163,10 +163,10 @@ index 2a01487c8ff837357f6d62dba80115b0ec64c343..8b1ed51630dc4fe77bd0edadb85f04fb } diff --git a/content/browser/service_process_host_impl.cc b/content/browser/service_process_host_impl.cc -index be6402b33d7e0e2aab7cbb2844ba4600a166e7a9..642f8b6da39615d1c68584ff18fc57ceb95b84b2 100644 +index bdd5bec301f5fcff2d3e3d7994ecbc4eae46da36..45cf31157c535a0cdc9236a07e2ffffd166ba412 100644 --- a/content/browser/service_process_host_impl.cc +++ b/content/browser/service_process_host_impl.cc -@@ -204,6 +204,16 @@ void LaunchServiceProcess(mojo::GenericPendingReceiver receiver, +@@ -205,6 +205,16 @@ void LaunchServiceProcess(mojo::GenericPendingReceiver receiver, options.allow_gpu_client.value()) { host->SetAllowGpuClient(); } @@ -324,10 +324,10 @@ index 9791ae2f761043b9eecd9064a6fd39a6e2339af4..1083f1683a05825f51f5b2d71f8107d9 // launch failed. enum class LaunchState { diff --git a/content/browser/utility_sandbox_delegate.cc b/content/browser/utility_sandbox_delegate.cc -index 5aec5f3dc619373d8faa44b23c7482bbd19d3f96..826c5d3e7022208d87fc77e8735907aa5884d994 100644 +index ad5ad7b27da8bc1b435bbb91e9e0eaa98aef9612..4f469e32f0e3ae88d11e6a6a1bb577c1302c624d 100644 --- a/content/browser/utility_sandbox_delegate.cc +++ b/content/browser/utility_sandbox_delegate.cc -@@ -29,13 +29,15 @@ UtilitySandboxedProcessLauncherDelegate:: +@@ -34,17 +34,19 @@ UtilitySandboxedProcessLauncherDelegate:: UtilitySandboxedProcessLauncherDelegate( sandbox::mojom::Sandbox sandbox_type, const base::EnvironmentMap& env, @@ -341,13 +341,17 @@ index 5aec5f3dc619373d8faa44b23c7482bbd19d3f96..826c5d3e7022208d87fc77e8735907aa -#endif + current_directory_(cwd), sandbox_type_(sandbox_type), + #if BUILDFLAG(IS_WIN) + app_container_disabled_( + GetContentClient()->browser()->IsAppContainerDisabled(sandbox_type)), + #endif - cmd_line_(cmd_line) { + cmd_line_(cmd_line), + inherit_environment_(inherit_environment) { #if DCHECK_IS_ON() bool supported_sandbox_type = sandbox_type_ == sandbox::mojom::Sandbox::kNoSandbox || -@@ -98,11 +100,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() { +@@ -107,11 +109,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() { return sandbox_type_; } @@ -368,10 +372,10 @@ index 5aec5f3dc619373d8faa44b23c7482bbd19d3f96..826c5d3e7022208d87fc77e8735907aa #if BUILDFLAG(USE_ZYGOTE) ZygoteCommunication* UtilitySandboxedProcessLauncherDelegate::GetZygote() { diff --git a/content/browser/utility_sandbox_delegate.h b/content/browser/utility_sandbox_delegate.h -index c1e56dc93b80594ffb55e11291e7bd152f029d61..928f3f693eed4252d9d34a64dd392af7e48e4190 100644 +index 368fb567e46a55bdc44820d5b7a2a08ac6cc4ffd..57c0d369e7373f755391da3fafbdaea86358d962 100644 --- a/content/browser/utility_sandbox_delegate.h +++ b/content/browser/utility_sandbox_delegate.h -@@ -29,7 +29,9 @@ class UtilitySandboxedProcessLauncherDelegate +@@ -30,7 +30,9 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate public: UtilitySandboxedProcessLauncherDelegate(sandbox::mojom::Sandbox sandbox_type, const base::EnvironmentMap& env, @@ -382,7 +386,7 @@ index c1e56dc93b80594ffb55e11291e7bd152f029d61..928f3f693eed4252d9d34a64dd392af7 ~UtilitySandboxedProcessLauncherDelegate() override; sandbox::mojom::Sandbox GetSandboxType() override; -@@ -55,18 +57,16 @@ class UtilitySandboxedProcessLauncherDelegate +@@ -56,18 +58,16 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate ZygoteCommunication* GetZygote() override; #endif // BUILDFLAG(USE_ZYGOTE) @@ -403,12 +407,16 @@ index c1e56dc93b80594ffb55e11291e7bd152f029d61..928f3f693eed4252d9d34a64dd392af7 #if BUILDFLAG(IS_WIN) std::vector preload_libraries_; -@@ -76,8 +76,10 @@ class UtilitySandboxedProcessLauncherDelegate +@@ -77,12 +77,14 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate std::optional> zygote_; #endif // BUILDFLAG(USE_ZYGOTE) + base::FilePath current_directory_; - sandbox::mojom::Sandbox sandbox_type_; + const sandbox::mojom::Sandbox sandbox_type_; + #if BUILDFLAG(IS_WIN) + // If true then App Container will not be used for this utility process. + const bool app_container_disabled_; + #endif // BUILDFLAG(IS_WIN) base::CommandLine cmd_line_; + bool inherit_environment_; }; @@ -628,7 +636,7 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8 #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 dc919f8220bb8c1cde8740399184a38a0ac7fc34..8847ba3e5e650dc341eb29aea51ae0442a24d51c 100644 +index d25dc43074f15d81504dcf062a0284f73c417698..6e764cccfbb69717331d13af60c681a889ade750 100644 --- a/sandbox/policy/win/sandbox_win.cc +++ b/sandbox/policy/win/sandbox_win.cc @@ -699,11 +699,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() { @@ -644,7 +652,7 @@ index dc919f8220bb8c1cde8740399184a38a0ac7fc34..8847ba3e5e650dc341eb29aea51ae044 // 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 -@@ -933,7 +931,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) { +@@ -938,7 +936,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) { // static ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( const base::CommandLine& cmd_line, @@ -653,7 +661,7 @@ index dc919f8220bb8c1cde8740399184a38a0ac7fc34..8847ba3e5e650dc341eb29aea51ae044 SandboxDelegate* delegate, TargetPolicy* policy) { const base::CommandLine& launcher_process_command_line = -@@ -947,7 +945,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -952,7 +950,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( } // Add any handles to be inherited to the policy. @@ -662,7 +670,7 @@ index dc919f8220bb8c1cde8740399184a38a0ac7fc34..8847ba3e5e650dc341eb29aea51ae044 policy->AddHandleToShare(handle); if (!policy->GetConfig()->IsConfigured()) { -@@ -962,6 +960,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -967,6 +965,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)); @@ -676,7 +684,7 @@ index dc919f8220bb8c1cde8740399184a38a0ac7fc34..8847ba3e5e650dc341eb29aea51ae044 #endif if (!delegate->PreSpawnTarget(policy)) -@@ -973,7 +978,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -978,7 +983,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( // static ResultCode SandboxWin::StartSandboxedProcess( const base::CommandLine& cmd_line, @@ -685,7 +693,7 @@ index dc919f8220bb8c1cde8740399184a38a0ac7fc34..8847ba3e5e650dc341eb29aea51ae044 SandboxDelegate* delegate, base::Process* process) { SandboxLaunchTimer timer; -@@ -981,7 +986,7 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -986,7 +991,7 @@ ResultCode SandboxWin::StartSandboxedProcess( // Avoid making a policy if we won't use it. if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line, *base::CommandLine::ForCurrentProcess())) { @@ -694,7 +702,7 @@ index dc919f8220bb8c1cde8740399184a38a0ac7fc34..8847ba3e5e650dc341eb29aea51ae044 process); } -@@ -989,7 +994,7 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -994,7 +999,7 @@ ResultCode SandboxWin::StartSandboxedProcess( timer.OnPolicyCreated(); ResultCode result = GeneratePolicyForSandboxedProcess( 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 4aaff0efa9d8..e3a3c5198649 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -90,10 +90,10 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index d493a07acf63ceec42f9b65b99f62650a7439d79..93df76eb4a1f47646595af39f4ae2c23ee5bd67c 100644 +index 3c5ab7a6e6608b3f5e35f8b46a59880100b2a627..2cefb70548ddfbd1f98d4028177e661fec4cea9b 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -167,6 +167,8 @@ viz_component("service") { +@@ -169,6 +169,8 @@ viz_component("service") { "display_embedder/skia_output_surface_impl_on_gpu_debug_capture.h", "display_embedder/skia_render_copy_results.cc", "display_embedder/skia_render_copy_results.h", @@ -520,7 +520,7 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf waiting_on_draw_ack_ = true; diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -index 4ce81412cad4ed61643e245b237aa12527edd993..f87ac9cf73ceba1735293f760b032a804ad63b89 100644 +index 2cf77183de23c2715d5fcf93e03185da87e56e90..abc08f01c19afd62d97effe1c104f95ddaa3a1e6 100644 --- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc +++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc @@ -100,7 +100,8 @@ RootCompositorFrameSinkImpl::Create( @@ -562,7 +562,7 @@ index febb2718cb34ea4d9f411f068d8c01a89c7db888..be8bd51cb61c20ef3df8552972a0ac2f gpu::SyncPointManager* GetSyncPointManager() override; }; diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc -index 2ea7347d2abe0a4ac9c1e57ea5249660ca2203fc..d71e6349fa887ddaf2d03438e72b4d696d9bf9c5 100644 +index b9ad5c8cbeb5b3684af6d84f70aa8aace69dc01a..55ea89b5c08daf3dd5cdf332be96ff43b8590233 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc @@ -390,8 +390,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( @@ -595,7 +595,7 @@ index d7deccb6e6ec63592cd840a05403f402238e645e..4c4356b8def15ed3156db38d0a593b83 // 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 3ede19b5c518c87b70333a8c94d958dc9f12b284..3daf805b8720915f6dcc7ef14afa736d643f228a 100644 +index 7eff777e19817bc321d770cab31db17bd9bdf6b6..c7fad80559177054f048885c7b70484b8e8bc5de 100644 --- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom +++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom @@ -34,6 +34,7 @@ struct RootCompositorFrameSinkParams { diff --git a/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch b/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch index 63b003b23362..1599bde93a92 100644 --- a/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch +++ b/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch @@ -11,10 +11,10 @@ ServiceProcessHost::Observer functions, but we need to pass the exit code to the observer. diff --git a/content/browser/service_process_host_impl.cc b/content/browser/service_process_host_impl.cc -index 642f8b6da39615d1c68584ff18fc57ceb95b84b2..cb58d75aa172b5144998fc2e3551231523d8b555 100644 +index 45cf31157c535a0cdc9236a07e2ffffd166ba412..9c89cdb3a290a7b0e68539ccd5383f2a26cc7ab3 100644 --- a/content/browser/service_process_host_impl.cc +++ b/content/browser/service_process_host_impl.cc -@@ -72,12 +72,15 @@ class ServiceProcessTracker { +@@ -73,12 +73,15 @@ class ServiceProcessTracker { processes_.erase(iter); } @@ -22,7 +22,7 @@ index 642f8b6da39615d1c68584ff18fc57ceb95b84b2..cb58d75aa172b5144998fc2e35512315 + void NotifyCrashed(ServiceProcessId id, int exit_code) { DCHECK_CURRENTLY_ON(BrowserThread::UI); auto iter = processes_.find(id); - DCHECK(iter != processes_.end()); + CHECK(iter != processes_.end(), base::NotFatalUntil::M130); - for (auto& observer : observers_) - observer.OnServiceProcessCrashed(iter->second.Duplicate()); + for (auto& observer : observers_) { @@ -33,7 +33,7 @@ index 642f8b6da39615d1c68584ff18fc57ceb95b84b2..cb58d75aa172b5144998fc2e35512315 processes_.erase(iter); } -@@ -86,6 +89,11 @@ class ServiceProcessTracker { +@@ -87,6 +90,11 @@ class ServiceProcessTracker { observers_.AddObserver(observer); } @@ -45,7 +45,7 @@ index 642f8b6da39615d1c68584ff18fc57ceb95b84b2..cb58d75aa172b5144998fc2e35512315 void RemoveObserver(ServiceProcessHost::Observer* observer) { // NOTE: Some tests may remove observers after BrowserThreads are shut down. DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || -@@ -153,7 +161,7 @@ class UtilityProcessClient : public UtilityProcessHost::Client { +@@ -154,7 +162,7 @@ class UtilityProcessClient : public UtilityProcessHost::Client { process_info_->service_process_id()); } @@ -54,7 +54,7 @@ index 642f8b6da39615d1c68584ff18fc57ceb95b84b2..cb58d75aa172b5144998fc2e35512315 // TODO(crbug.com/40654042): It is unclear how we can observe // |OnProcessCrashed()| without observing |OnProcessLaunched()| first, but // it can happen on Android. Ignore the notification in this case. -@@ -161,7 +169,7 @@ class UtilityProcessClient : public UtilityProcessHost::Client { +@@ -162,7 +170,7 @@ class UtilityProcessClient : public UtilityProcessHost::Client { return; GetServiceProcessTracker().NotifyCrashed( @@ -63,7 +63,7 @@ index 642f8b6da39615d1c68584ff18fc57ceb95b84b2..cb58d75aa172b5144998fc2e35512315 } private: -@@ -230,6 +238,11 @@ void ServiceProcessHost::AddObserver(Observer* observer) { +@@ -231,6 +239,11 @@ void ServiceProcessHost::AddObserver(Observer* observer) { GetServiceProcessTracker().AddObserver(observer); } diff --git a/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch b/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch index c6b43905a72c..2933eea35744 100644 --- a/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch +++ b/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch @@ -28,10 +28,10 @@ index f9d3219990dcf4f4a829567d567072df59a70ada..ca8281faaff601bf591cf5a2b185e4ba // Returns the http referrer of original request which initited this load. diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h -index 675ce162a8b85d9ad9a2fe82c1ebee40ce3c9abb..860d14e16af06446889ba2a8c864cf35123e18af 100644 +index c806129e938c420d7e7113ee8e64287294a8470a..63905cf210ea7deacba0fc8ad031cdf4af6d3545 100644 --- a/third_party/blink/renderer/core/loader/document_loader.h +++ b/third_party/blink/renderer/core/loader/document_loader.h -@@ -314,7 +314,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected, +@@ -319,7 +319,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected, std::optional soft_navigation_heuristics_task_id); 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 b577bd5a4491..a4f818122066 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -37,10 +37,10 @@ index b220ca953b1dbbb1465d87f08c140026c3fee5b0..2a5bc2735c4d632b2f3e9b76dd525ba8 allow_cookies_from_browser == other.allow_cookies_from_browser && include_request_cookies_with_response == diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h -index 0355643854d4eba4bc6061e924e3553b1499f5be..287e40c7bf6145b9ea8e48389cb7e9885a8c877f 100644 +index 5b695d21907bdbf4b657aad91ce1cd4ef2981f43..9d524b291a2e74d2c63084922e2b0b433db08eaa 100644 --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h -@@ -73,6 +73,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { +@@ -74,6 +74,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { bool has_user_activation = false; bool allow_cookies_from_browser = false; bool include_request_cookies_with_response = false; @@ -49,10 +49,10 @@ index 0355643854d4eba4bc6061e924e3553b1499f5be..287e40c7bf6145b9ea8e48389cb7e988 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 821dd730ca216f5ac5b20ec434463fbeee54458e..a2f2d4d03ab40c47ed938686ea78bd6054680def 100644 +index 478ac100dabf30cb60130a2a5f0229265a10e505..da3509da18eb634bebb25f1580c77e58256b60c9 100644 --- a/services/network/public/cpp/url_request_mojom_traits.cc +++ b/services/network/public/cpp/url_request_mojom_traits.cc -@@ -95,6 +95,7 @@ bool StructTraitsallow_cookies_from_browser = data.allow_cookies_from_browser(); out->include_request_cookies_with_response = data.include_request_cookies_with_response(); @@ -61,10 +61,10 @@ index 821dd730ca216f5ac5b20ec434463fbeee54458e..a2f2d4d03ab40c47ed938686ea78bd60 mojo::PendingRemote>(); 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 32218c469a135fe903b8fc02d6388258e144bd03..02fb800c1cc51e8371b8d5cdbce69227a91386eb 100644 +index 6123dcab398b054b4172da86ac42ae913b046c40..d54bf69e03159c02205caa56df8193de4720d8c8 100644 --- a/services/network/public/cpp/url_request_mojom_traits.h +++ b/services/network/public/cpp/url_request_mojom_traits.h -@@ -77,6 +77,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) +@@ -78,6 +78,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) const network::ResourceRequest::TrustedParams& trusted_params) { return trusted_params.include_request_cookies_with_response; } @@ -76,10 +76,10 @@ index 32218c469a135fe903b8fc02d6388258e144bd03..02fb800c1cc51e8371b8d5cdbce69227 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 1d510b64f480ba516009cb1d995fbe9ca29ec164..d6d17abbb058c2e4109ab98a3db1bdf7734ba4c9 100644 +index 4fdb324c31867ba360cc9f03d2ba432598fb7b35..397b5a3046a4d26fe41559572bca605747a32937 100644 --- a/services/network/public/mojom/url_request.mojom +++ b/services/network/public/mojom/url_request.mojom -@@ -80,6 +80,9 @@ struct TrustedUrlRequestParams { +@@ -81,6 +81,9 @@ struct TrustedUrlRequestParams { // client which should not be able to see them. bool include_request_cookies_with_response = false; @@ -90,7 +90,7 @@ index 1d510b64f480ba516009cb1d995fbe9ca29ec164..d6d17abbb058c2e4109ab98a3db1bdf7 // 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 e1d4360ac8d0ee6dacdd36ed5a98e2c954bff31d..9e763a3af2088c8507922932288e5e4c0c050f9d 100644 +index 3450c15835d8b792f37764f6edc4a4560be435ef..b1034aa141d6121f8e1524fb34a28a040a280420 100644 --- a/services/network/public/mojom/url_response_head.mojom +++ b/services/network/public/mojom/url_response_head.mojom @@ -13,6 +13,7 @@ import "services/network/public/mojom/attribution.mojom"; @@ -112,10 +112,10 @@ index e1d4360ac8d0ee6dacdd36ed5a98e2c954bff31d..9e763a3af2088c8507922932288e5e4c string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index ade58305e8b5a1e69b14ececd0a2b14861a38285..d6773107f5ea7992b4be0ed3ffb14af9d0ec5c8d 100644 +index 0f42a915d4755d9a7e531f5d1aba4060f77482ab..9334a3ccc919eb2420543679084e90485ba9c609 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -710,6 +710,7 @@ URLLoader::URLLoader( +@@ -712,6 +712,7 @@ URLLoader::URLLoader( request.trusted_params->allow_cookies_from_browser; include_request_cookies_with_response_ = request.trusted_params->include_request_cookies_with_response; @@ -123,7 +123,7 @@ index ade58305e8b5a1e69b14ececd0a2b14861a38285..d6773107f5ea7992b4be0ed3ffb14af9 } // Store any cookies passed from the browser process to later attach them to -@@ -748,7 +749,7 @@ URLLoader::URLLoader( +@@ -750,7 +751,7 @@ URLLoader::URLLoader( &URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this))); } @@ -132,7 +132,7 @@ index ade58305e8b5a1e69b14ececd0a2b14861a38285..d6773107f5ea7992b4be0ed3ffb14af9 url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1703,6 +1704,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1713,6 +1714,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); @@ -153,10 +153,10 @@ index ade58305e8b5a1e69b14ececd0a2b14861a38285..d6773107f5ea7992b4be0ed3ffb14af9 // 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 097f112d8fc560eb483310958a2276edae687381..df52b2339a06df6d4dd127fdb398bea2d2fb042d 100644 +index 457068609918167a0cd7714ddea922dc91e173b1..0a9dd2a04353d345e1d2a2f7d5519b4fd35025e6 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -654,6 +654,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -670,6 +670,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 44fa30984530..96b2144196f4 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 5136dd14692d31fc0b12adf0e026c99168db4da5..3e32e68cb017c11bba84278681fac7902f378527 100644 +index 530199f4d873efdf66c7084cd09651ef85e74ead..6dcefd75a2fc9164eae24de3efaded0fc665e024 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -21,12 +21,16 @@ @@ -36,7 +36,7 @@ index 5136dd14692d31fc0b12adf0e026c99168db4da5..3e32e68cb017c11bba84278681fac790 #include "chrome/common/chrome_switches.h" #include "components/history/core/browser/history_service.h" #include "components/history/core/browser/history_types.h" -@@ -254,10 +258,12 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -256,10 +260,12 @@ void FullscreenController::EnterFullscreenModeForTab( return; } @@ -49,7 +49,7 @@ index 5136dd14692d31fc0b12adf0e026c99168db4da5..3e32e68cb017c11bba84278681fac790 // Keep the current state. |SetTabWithExclusiveAccess| may change the return // value of |IsWindowFullscreenForTabOrPending|. -@@ -369,12 +375,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { +@@ -371,12 +377,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { void FullscreenController::FullscreenTabOpeningPopup( content::WebContents* opener, content::WebContents* popup) { @@ -64,7 +64,7 @@ index 5136dd14692d31fc0b12adf0e026c99168db4da5..3e32e68cb017c11bba84278681fac790 } void FullscreenController::OnTabDeactivated( -@@ -460,10 +468,12 @@ void FullscreenController::FullscreenTransitionCompleted() { +@@ -462,10 +470,12 @@ void FullscreenController::FullscreenTransitionCompleted() { #endif // DCHECK_IS_ON() tab_fullscreen_target_display_id_ = display::kInvalidDisplayId; started_fullscreen_transition_ = false; @@ -77,7 +77,7 @@ index 5136dd14692d31fc0b12adf0e026c99168db4da5..3e32e68cb017c11bba84278681fac790 } void FullscreenController::RunOrDeferUntilTransitionIsComplete( -@@ -571,18 +581,17 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -573,18 +583,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. @@ -101,7 +101,7 @@ index 5136dd14692d31fc0b12adf0e026c99168db4da5..3e32e68cb017c11bba84278681fac790 if (option == TAB) { url = GetRequestingOrigin(); tab_fullscreen_ = true; -@@ -615,6 +624,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -617,6 +626,7 @@ void FullscreenController::EnterFullscreenModeInternal( if (!extension_caused_fullscreen_.is_empty()) url = extension_caused_fullscreen_; } @@ -109,7 +109,7 @@ index 5136dd14692d31fc0b12adf0e026c99168db4da5..3e32e68cb017c11bba84278681fac790 fullscreen_start_time_ = base::TimeTicks::Now(); if (option == BROWSER) -@@ -634,6 +644,7 @@ void FullscreenController::ExitFullscreenModeInternal() { +@@ -636,6 +646,7 @@ void FullscreenController::ExitFullscreenModeInternal() { if (chrome::IsRunningInAppMode()) return; @@ -117,7 +117,7 @@ index 5136dd14692d31fc0b12adf0e026c99168db4da5..3e32e68cb017c11bba84278681fac790 // `fullscreen_start_time_` is null if a fullscreen tab moves to a new window. if (fullscreen_start_time_ && exclusive_access_tab()) { ukm::SourceId source_id = -@@ -645,15 +656,16 @@ void FullscreenController::ExitFullscreenModeInternal() { +@@ -647,15 +658,16 @@ void FullscreenController::ExitFullscreenModeInternal() { .Record(ukm::UkmRecorder::Get()); fullscreen_start_time_.reset(); } @@ -137,7 +137,7 @@ index 5136dd14692d31fc0b12adf0e026c99168db4da5..3e32e68cb017c11bba84278681fac790 exclusive_access_manager()->context()->ExitFullscreen(); extension_caused_fullscreen_ = GURL(); exclusive_access_manager()->UpdateBubble(base::NullCallback()); -@@ -715,8 +727,12 @@ GURL FullscreenController::GetEmbeddingOrigin() const { +@@ -717,8 +729,12 @@ GURL FullscreenController::GetEmbeddingOrigin() const { void FullscreenController::RecordMetricsOnFullscreenApiRequested( content::RenderFrameHost* requesting_frame) { history::HistoryService* service = 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 70c92c017379..7be097b3e815 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 @@ -23,10 +23,10 @@ Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397. 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 2c3068912e292b970bdb3ea25aff667bae26d688..7de86e2b57fd6f6d05153f5691caaf68fd17a2eb 100644 +index fa22dada0703819b5160fde07c2274ade4c9b675..6a13fb6cfad42f918744ae7f01d2c10874185318 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -10573,6 +10573,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() { +@@ -10654,6 +10654,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() { } } @@ -40,10 +40,10 @@ index 2c3068912e292b970bdb3ea25aff667bae26d688..7de86e2b57fd6f6d05153f5691caaf68 // origin of |common_params.url| and/or |common_params.initiator_origin|. url::Origin resolved_origin = url::Origin::Resolve( diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc -index 3221105144b57c9148220f9ae892c3e1d9f62e21..5c54136b83579cbb06e8ef31cc2a8f769408000c 100644 +index 85c4d912e2fdb5e9cb3336ecbfe0cbad112fafe8..0ac0108cf08457d5b597070e43dcca38ee95f81e 100644 --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc -@@ -2231,6 +2231,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() { +@@ -2243,6 +2243,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() { scoped_refptr DocumentLoader::CalculateOrigin( Document* owner_document) { scoped_refptr origin; @@ -54,7 +54,7 @@ index 3221105144b57c9148220f9ae892c3e1d9f62e21..5c54136b83579cbb06e8ef31cc2a8f76 StringBuilder debug_info_builder; // Whether the origin is newly created within this call, instead of copied // from an existing document's origin or from `origin_to_commit_`. If this is -@@ -2283,6 +2287,10 @@ scoped_refptr DocumentLoader::CalculateOrigin( +@@ -2295,6 +2299,10 @@ scoped_refptr DocumentLoader::CalculateOrigin( debug_info_builder.Append(", url="); debug_info_builder.Append(owner_document->Url().BaseAsString()); debug_info_builder.Append(")"); 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 6bc9e3359778..460b31734667 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 6168e69b59168c471bf349a4fd3b83b1fdb8b17a..7969930eecd6cc9f165681cd73fc62234b9c38d5 100644 +index 8f516ab1d3772b27f4568b36d3f87dddcdd57ed7..cf82067ba9ff479dd3c9fb213fae9f9993e9cf35 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.ts +++ b/chrome/browser/resources/pdf/pdf_viewer.ts -@@ -998,7 +998,15 @@ export class PdfViewerElement extends PdfViewerBaseElement { +@@ -1012,7 +1012,15 @@ export class PdfViewerElement extends PdfViewerBaseElement { dataArray = [result.dataToSave]; } @@ -32,7 +32,7 @@ index 6168e69b59168c471bf349a4fd3b83b1fdb8b17a..7969930eecd6cc9f165681cd73fc6223 const fileName = this.attachments_[index].name; chrome.fileSystem.chooseEntry( {type: 'saveFile', suggestedName: fileName}, -@@ -1020,6 +1028,7 @@ export class PdfViewerElement extends PdfViewerBaseElement { +@@ -1034,6 +1042,7 @@ export class PdfViewerElement extends PdfViewerBaseElement { // }); }); @@ -40,11 +40,10 @@ index 6168e69b59168c471bf349a4fd3b83b1fdb8b17a..7969930eecd6cc9f165681cd73fc6223 } /** -@@ -1127,8 +1136,15 @@ export class PdfViewerElement extends PdfViewerBaseElement { - fileName = fileName + '.pdf'; +@@ -1157,7 +1166,15 @@ export class PdfViewerElement extends PdfViewerBaseElement { } -- // Create blob before callback to avoid race condition. + // Create blob before callback to avoid race condition. + const a = document.createElement('a'); + a.download = fileName; const blob = new Blob([result.dataToSave], {type: 'application/pdf'}); @@ -57,11 +56,11 @@ index 6168e69b59168c471bf349a4fd3b83b1fdb8b17a..7969930eecd6cc9f165681cd73fc6223 chrome.fileSystem.chooseEntry( { type: 'saveFile', -@@ -1153,6 +1169,7 @@ export class PdfViewerElement extends PdfViewerBaseElement { +@@ -1182,6 +1199,7 @@ export class PdfViewerElement extends PdfViewerBaseElement { // }); }); + // - // - // Saving in Annotation mode is destructive: crbug.com/919364 + // + // Ink2 doesn't need to exit annotation mode after save. diff --git a/patches/chromium/fix_disabling_background_throttling_in_compositor.patch b/patches/chromium/fix_disabling_background_throttling_in_compositor.patch index 7755f74be5d4..fda5bc58d740 100644 --- a/patches/chromium/fix_disabling_background_throttling_in_compositor.patch +++ b/patches/chromium/fix_disabling_background_throttling_in_compositor.patch @@ -12,10 +12,10 @@ invisible state of the `viz::DisplayScheduler` owned by the `ui::Compositor`. diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc -index 582ee2eeb0b65672bfe23bae29c142a63f1289b8..13574eaac0f8a3568c1a904bb24c37ef03a7508d 100644 +index 56f22ef70665d66692ca9d50e6b822a6ce3740de..dfd02e5e83684aa2f6c7188598095ed09a80bd80 100644 --- a/ui/compositor/compositor.cc +++ b/ui/compositor/compositor.cc -@@ -341,7 +341,8 @@ void Compositor::SetLayerTreeFrameSink( +@@ -342,7 +342,8 @@ void Compositor::SetLayerTreeFrameSink( if (display_private_) { disabled_swap_until_resize_ = false; display_private_->Resize(size()); @@ -25,7 +25,7 @@ index 582ee2eeb0b65672bfe23bae29c142a63f1289b8..13574eaac0f8a3568c1a904bb24c37ef display_private_->SetDisplayColorSpaces(display_color_spaces_); display_private_->SetDisplayColorMatrix( gfx::SkM44ToTransform(display_color_matrix_)); -@@ -553,7 +554,9 @@ void Compositor::SetVisible(bool visible) { +@@ -554,7 +555,9 @@ void Compositor::SetVisible(bool visible) { // updated then. We need to call this even if the visibility hasn't changed, // for the same reason. if (display_private_) @@ -36,7 +36,7 @@ index 582ee2eeb0b65672bfe23bae29c142a63f1289b8..13574eaac0f8a3568c1a904bb24c37ef if (changed) { for (auto& observer : observer_list_) { -@@ -1015,4 +1018,13 @@ void Compositor::MaybeUpdateObserveBeginFrame() { +@@ -1016,4 +1019,13 @@ void Compositor::MaybeUpdateObserveBeginFrame() { host_begin_frame_observer_->GetBoundRemote()); } diff --git a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch index 29b2f2e4a648..45fa12db4450 100644 --- a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch +++ b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch @@ -11,18 +11,18 @@ counter to the design of globalShortcuts, and so we need to instead use `ui::MediaKeysListener`. diff --git a/chrome/browser/extensions/global_shortcut_listener.cc b/chrome/browser/extensions/global_shortcut_listener.cc -index a8acaa1780af7a0801832e1a698ed8d03598618c..5d92376feebc94d0c0e7658496eb9742740b089d 100644 +index 91226bd6e383636ecebdac93b151e107b3f943d9..7fe79f49484b50d2ae9a8d5d0ba9749c62464378 100644 --- a/chrome/browser/extensions/global_shortcut_listener.cc +++ b/chrome/browser/extensions/global_shortcut_listener.cc -@@ -7,6 +7,7 @@ - #include "base/check.h" +@@ -8,6 +8,7 @@ + #include "base/not_fatal_until.h" #include "base/notreached.h" #include "content/public/browser/browser_thread.h" +#include "content/public/browser/media_keys_listener_manager.h" #include "ui/base/accelerators/accelerator.h" using content::BrowserThread; -@@ -66,6 +67,22 @@ void GlobalShortcutListener::UnregisterAccelerator( +@@ -67,6 +68,22 @@ void GlobalShortcutListener::UnregisterAccelerator( StopListening(); } diff --git a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch index 71207b61da55..0ab94285ec7d 100644 --- a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch +++ b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch @@ -9,7 +9,7 @@ to support content settings UI. The support pulls in chrome content settings and UI code which are not valid in the scope of Electron. diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc -index ceced82cbd23b2dcd7fabf7d63028423f86e05c3..27d0b61a7b67d1c9d7e0699e287b78332d9dce26 100644 +index 5d692d88c9f95845c97f848fd421916c52bd2416..b0131582dc0a308e1525b12b554dd03e3373e8b1 100644 --- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc +++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc @@ -6,6 +6,7 @@ @@ -30,7 +30,7 @@ index ceced82cbd23b2dcd7fabf7d63028423f86e05c3..27d0b61a7b67d1c9d7e0699e287b7833 #include "media/base/media_switches.h" #include "net/base/url_util.h" #include "third_party/blink/public/common/features.h" -@@ -46,7 +49,7 @@ constexpr gfx::Size kMinWindowSize(240, 52); +@@ -49,7 +52,7 @@ constexpr gfx::Size kMinWindowSize(240, 52); // not apply to video Picture-in-Picture windows. constexpr double kMaxWindowSizeRatio = 0.8; @@ -39,7 +39,7 @@ index ceced82cbd23b2dcd7fabf7d63028423f86e05c3..27d0b61a7b67d1c9d7e0699e287b7833 // Returns true if a document picture-in-picture window should be focused upon // opening it. bool ShouldFocusPictureInPictureWindow(const NavigateParams& params) { -@@ -177,7 +180,7 @@ bool PictureInPictureWindowManager::ExitPictureInPictureViaWindowUi( +@@ -187,7 +190,7 @@ bool PictureInPictureWindowManager::ExitPictureInPictureViaWindowUi( return false; } @@ -48,7 +48,7 @@ index ceced82cbd23b2dcd7fabf7d63028423f86e05c3..27d0b61a7b67d1c9d7e0699e287b7833 // The user manually closed the pip window, so let the tab helper know in case // the auto-pip permission dialog was visible. if (auto* tab_helper = AutoPictureInPictureTabHelper::FromWebContents( -@@ -373,7 +376,7 @@ gfx::Size PictureInPictureWindowManager::GetMaximumWindowSize( +@@ -383,7 +386,7 @@ gfx::Size PictureInPictureWindowManager::GetMaximumWindowSize( // static void PictureInPictureWindowManager::SetWindowParams(NavigateParams& params) { @@ -57,7 +57,7 @@ index ceced82cbd23b2dcd7fabf7d63028423f86e05c3..27d0b61a7b67d1c9d7e0699e287b7833 // Always show document picture-in-picture in a new window. When this is // not opened via the AutoPictureInPictureTabHelper, focus the window. params.window_action = ShouldFocusPictureInPictureWindow(params) -@@ -452,6 +455,7 @@ PictureInPictureWindowManager::GetOverlayView( +@@ -469,6 +472,7 @@ PictureInPictureWindowManager::GetOverlayView( return nullptr; } @@ -65,7 +65,7 @@ index ceced82cbd23b2dcd7fabf7d63028423f86e05c3..27d0b61a7b67d1c9d7e0699e287b7833 // It would be nice to create this in `EnterPictureInPicture*`, but detecting // auto-pip while pip is in the process of opening doesn't work. // -@@ -490,6 +494,8 @@ PictureInPictureWindowManager::GetOverlayView( +@@ -507,6 +511,8 @@ PictureInPictureWindowManager::GetOverlayView( } return overlay_view; @@ -75,11 +75,11 @@ index ceced82cbd23b2dcd7fabf7d63028423f86e05c3..27d0b61a7b67d1c9d7e0699e287b7833 PictureInPictureOcclusionTracker* diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -index 507a695ba97c6321c4d1aa662bdd0206991e6c69..847447364a2ae158ae764a01f883e69b4907d031 100644 +index 87c1bd3a4717a22fdc1f6411d14171f706e127d7..48f6353ac7fd1b428f4c05b8c45ea0790ac2e044 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -@@ -332,11 +332,13 @@ std::unique_ptr VideoOverlayWindowViews::Create( - } +@@ -348,11 +348,13 @@ std::unique_ptr VideoOverlayWindowViews::Create( + #endif // BUILDFLAG(IS_WIN) +#if 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 3e8e2fd5ab41..dd87cb7cdeaa 100644 --- a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch +++ b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch @@ -9,10 +9,10 @@ focus node change via TextInputManager. chromium-bug: https://crbug.com/1369605 diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc -index a36f033231c012db6b81b33efe4e42ef8b1464ce..ba801597faf224a531142d5c471593928f897ff7 100644 +index dcafa7c3ecf417ff1d79dff43b6f1a73cdd2da48..0d3fce939150f689613576f471f32edfe097f0fe 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -2932,6 +2932,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged( +@@ -2941,6 +2941,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged( } } @@ -87,10 +87,10 @@ index 0c7d5b2c1d3e97420913bd643bb2a524a76fc286..653793fa480f035ce11e079b370bf5ed // The view with active text input state, i.e., a focused element. // It will be nullptr if no such view exists. Note that the active view diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index aa4a8225fc15aaa9e5315f98006ad8772d33ec1d..7a89eb9f8552992609e8122eb7400ca8540b08bc 100644 +index ded73c5a5b127c16b7116612f9e4a84464be2b90..b1b1fcb29e45879220da9ecf276f2f8d6466e8c7 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -9157,7 +9157,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( +@@ -9091,7 +9091,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 4e25a08ccb8e..3c9fe5381c30 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -25,10 +25,10 @@ index 5b469b3b6bd11d8e0baa08e9be257990ac9bc438..c1410e5d8112f0319de40e4fbf41dbae // 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 0b3e9d694c47534996bc7de375a7a0b3fda47e15..67b19d37d582556b117b7f5f9caff29c6e30077f 100644 +index e724e46e422be25ddab8b94d03324832ab08e518..b5c4c9c41607d55d89a1ee6831848d4ecc4b06be 100644 --- a/printing/printing_context_mac.mm +++ b/printing/printing_context_mac.mm -@@ -486,7 +486,8 @@ void ApplySystemPrintDialogData( +@@ -527,7 +527,8 @@ bool IsIppColorModelColorful(mojom::ColorModel color_model) { !SetCollateInPrintSettings(settings_->collate()) || !SetDuplexModeInPrintSettings(settings_->duplex_mode()) || !SetOutputColor(static_cast(settings_->color())) || @@ -38,7 +38,7 @@ index 0b3e9d694c47534996bc7de375a7a0b3fda47e15..67b19d37d582556b117b7f5f9caff29c return OnError(); } } -@@ -639,6 +640,22 @@ void ApplySystemPrintDialogData( +@@ -680,6 +681,22 @@ bool IsIppColorModelColorful(mojom::ColorModel color_model) { return PMSetCopies(print_settings, copies, false) == noErr; } @@ -62,10 +62,10 @@ index 0b3e9d694c47534996bc7de375a7a0b3fda47e15..67b19d37d582556b117b7f5f9caff29c PMPrintSettings print_settings = static_cast([print_info_ PMPrintSettings]); diff --git a/printing/printing_context_system_dialog_win.cc b/printing/printing_context_system_dialog_win.cc -index b935f996b137d91d82f89414122355d5db65aeb9..6d7d84cd2ea6d9197c4ff1149131658e49f2ff23 100644 +index c6a080107949c435565d6e57646f36fd5e3b912d..e37331436cf5d4bca41bb39a288d395e820736fd 100644 --- a/printing/printing_context_system_dialog_win.cc +++ b/printing/printing_context_system_dialog_win.cc -@@ -72,14 +72,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings( +@@ -77,14 +77,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings( PRINTPAGERANGE ranges[32]; dialog_options.nStartPage = START_PAGE_GENERAL; if (max_pages) { diff --git a/patches/chromium/fix_restore_original_resize_performance_on_macos.patch b/patches/chromium/fix_restore_original_resize_performance_on_macos.patch index 8a6919c0af8e..ddcfdfc76fd6 100644 --- a/patches/chromium/fix_restore_original_resize_performance_on_macos.patch +++ b/patches/chromium/fix_restore_original_resize_performance_on_macos.patch @@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop vs mobile runtimes. i.e. restore the old logic only on desktop platforms diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 9f8dfe77123c6229bc186d0619e6108da8bd9832..7364a2e4547759708376803fa987618f3c70160c 100644 +index f52c0ba0fce5747dff3c97a4423874fcf34fdb2a..699c70778dc251064d61f771963b28e8b45f3029 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2040,9 +2040,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() { +@@ -2032,9 +2032,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() { void RenderWidgetHostImpl::NotifyScreenInfoChanged() { // The resize message (which may not happen immediately) will carry with it // the screen info as well as the new size (if the screen has changed scale diff --git a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch index 9f22a7985216..79b48301746a 100644 --- a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -20,10 +20,10 @@ index 424b73ed6ccda8a29ddfb17e7c1ed2dbbe222711..2391a8e29a9501b7f2461867991819bb injector_->ExpectsResults(), injector_->ShouldWaitForPromise()); } diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h -index e9a982b30c35aecd2c9bae90cf7014d8ae48153c..564f2dda56cf463a4889c8ae5bb9b166fac3d90c 100644 +index 34474ddd196528801336414b7a19d7833cee6565..1a5f1a3b5decd940536f122b348815fbad027a3b 100644 --- a/third_party/blink/public/web/web_local_frame.h +++ b/third_party/blink/public/web/web_local_frame.h -@@ -439,6 +439,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame { +@@ -446,6 +446,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame { mojom::EvaluationTiming, mojom::LoadEventBlockingOption, WebScriptExecutionCallback, @@ -64,10 +64,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..7a985067b1371604644d48159f2f5aa7 #endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 80eac4a812056c663d86f01b98ebcdf7b4b0537a..7439ea5a868090a7a52722f616ed0314663e4619 100644 +index d34e0e29de055b560d191356d0328fa528add7d5..fe25b70c84a2ee4c2950ccc92042b9ea906f2ff2 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -3088,6 +3088,7 @@ void LocalFrame::RequestExecuteScript( +@@ -3113,6 +3113,7 @@ void LocalFrame::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -75,7 +75,7 @@ index 80eac4a812056c663d86f01b98ebcdf7b4b0537a..7439ea5a868090a7a52722f616ed0314 BackForwardCacheAware back_forward_cache_aware, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_behavior) { -@@ -3121,7 +3122,7 @@ void LocalFrame::RequestExecuteScript( +@@ -3146,7 +3147,7 @@ void LocalFrame::RequestExecuteScript( PausableScriptExecutor::CreateAndRun( script_state, std::move(script_sources), execute_script_policy, user_gesture, evaluation_timing, blocking_option, want_result_option, @@ -85,10 +85,10 @@ index 80eac4a812056c663d86f01b98ebcdf7b4b0537a..7439ea5a868090a7a52722f616ed0314 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 f37f46cfff3a7461fc1f99cdc34bc911c34b5e2f..18b14b3ecefe20e83abe61311c9c4d0c4230a25e 100644 +index 95fa065a5d077ef88c5a575c5366bfc9cc3d709b..6b9d6c69589b292ddfbfa477c549d85a71ac24b7 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h -@@ -828,6 +828,7 @@ class CORE_EXPORT LocalFrame final +@@ -826,6 +826,7 @@ class CORE_EXPORT LocalFrame final mojom::blink::EvaluationTiming, mojom::blink::LoadEventBlockingOption, WebScriptExecutionCallback, @@ -97,10 +97,10 @@ index f37f46cfff3a7461fc1f99cdc34bc911c34b5e2f..18b14b3ecefe20e83abe61311c9c4d0c 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 9887256c6a3bbdfca21994a26287bb096a7d6d6a..913368e4e36a2b35f704248df8ab0c28b31d07a0 100644 +index 3a914f8f530caf235a60fbcf5366ae098ba43257..364214efdf5592c547eff03f01568672999af7fa 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 -@@ -954,6 +954,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( +@@ -959,6 +959,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( std::move(callback).Run(value ? std::move(*value) : base::Value()); }, std::move(callback)), @@ -109,10 +109,10 @@ index 9887256c6a3bbdfca21994a26287bb096a7d6d6a..913368e4e36a2b35f704248df8ab0c28 wants_result ? mojom::blink::WantResultOption::kWantResultDateAndRegExpAllowed diff --git a/third_party/blink/renderer/core/frame/pausable_script_executor.cc b/third_party/blink/renderer/core/frame/pausable_script_executor.cc -index f16d546304c6cdbc81096e04c73f62b17091644b..323de900832ef9109a6d301258349e91f47a5935 100644 +index ca6d6fc79f33ab6187c9c7924294c423a714359f..766655751cc9b8f8aaa254eb5eb74fb91ab0f5b8 100644 --- a/third_party/blink/renderer/core/frame/pausable_script_executor.cc +++ b/third_party/blink/renderer/core/frame/pausable_script_executor.cc -@@ -250,7 +250,7 @@ void PausableScriptExecutor::CreateAndRun( +@@ -255,7 +255,7 @@ void PausableScriptExecutor::CreateAndRun( script_state, mojom::blink::UserActivationOption::kDoNotActivate, mojom::blink::LoadEventBlockingOption::kDoNotBlock, want_result_option, mojom::blink::PromiseResultOption::kDoNotWait, @@ -121,7 +121,7 @@ index f16d546304c6cdbc81096e04c73f62b17091644b..323de900832ef9109a6d301258349e91 MakeGarbageCollected( script_state->GetIsolate(), function, receiver, argc, argv)); executor->Run(); -@@ -265,10 +265,11 @@ void PausableScriptExecutor::CreateAndRun( +@@ -270,10 +270,11 @@ void PausableScriptExecutor::CreateAndRun( mojom::blink::LoadEventBlockingOption blocking_option, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_result_option, @@ -135,7 +135,7 @@ index f16d546304c6cdbc81096e04c73f62b17091644b..323de900832ef9109a6d301258349e91 MakeGarbageCollected(std::move(sources), execute_script_policy)); switch (evaluation_timing) { -@@ -290,6 +291,14 @@ void PausableScriptExecutor::ContextDestroyed() { +@@ -295,6 +296,14 @@ void PausableScriptExecutor::ContextDestroyed() { ScriptState::Scope script_scope(script_state_); std::move(callback_).Run({}, {}); } @@ -150,7 +150,7 @@ index f16d546304c6cdbc81096e04c73f62b17091644b..323de900832ef9109a6d301258349e91 Dispose(); } -@@ -300,10 +309,12 @@ PausableScriptExecutor::PausableScriptExecutor( +@@ -305,10 +314,12 @@ PausableScriptExecutor::PausableScriptExecutor( mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_result_option, WebScriptExecutionCallback callback, @@ -163,7 +163,7 @@ index f16d546304c6cdbc81096e04c73f62b17091644b..323de900832ef9109a6d301258349e91 user_activation_option_(user_activation_option), blocking_option_(blocking_option), want_result_option_(want_result_option), -@@ -427,6 +438,9 @@ void PausableScriptExecutor::HandleResults( +@@ -432,6 +443,9 @@ void PausableScriptExecutor::HandleResults( std::move(callback_).Run(std::move(value), start_time_); } @@ -204,10 +204,10 @@ index fa65331f40b90d812b71a489fd560e9359152d2b..390714d631dc88ef92d59ef9618a5706 const mojom::blink::UserActivationOption user_activation_option_; const mojom::blink::LoadEventBlockingOption blocking_option_; diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc -index 3dbdae2305f24878a26b21f010a1c031736db11c..c30a457bcc040f9995657f45049c496e20e6ebe7 100644 +index db1cc198dfc40ce359bad4157a4aad396e1be1a0..424fa3415a9f7d44a8422ecf0eb3670bfffd910a 100644 --- a/third_party/blink/renderer/core/frame/web_frame_test.cc +++ b/third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -288,6 +288,7 @@ void ExecuteScriptsInMainWorld( +@@ -294,6 +294,7 @@ void ExecuteScriptsInMainWorld( DOMWrapperWorld::kMainWorldId, sources, user_gesture, mojom::blink::EvaluationTiming::kSynchronous, mojom::blink::LoadEventBlockingOption::kDoNotBlock, std::move(callback), @@ -216,10 +216,10 @@ index 3dbdae2305f24878a26b21f010a1c031736db11c..c30a457bcc040f9995657f45049c496e mojom::blink::WantResultOption::kWantResult, wait_for_promise); } diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -index b88a960da3d0fcaf870e5ad4667b82ea397c2dfd..b8c0c4b94c1078c8c84e498228d048be0c828c6c 100644 +index 0799f6b0f1789885b98698085a1bf592d7b090f7..36e344e290f24297c3e9905b4b9e32dab617d515 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 -@@ -1090,14 +1090,15 @@ void WebLocalFrameImpl::RequestExecuteScript( +@@ -1095,14 +1095,15 @@ void WebLocalFrameImpl::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -238,10 +238,10 @@ index b88a960da3d0fcaf870e5ad4667b82ea397c2dfd..b8c0c4b94c1078c8c84e498228d048be v8::MaybeLocal WebLocalFrameImpl::CallFunctionEvenIfScriptDisabled( diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h -index dc77c55900a20f3b6ac1c5ac3b03e9d1253cb9cf..a1cfeb937988624178eb2db299760dd7d607043c 100644 +index a986b357438ab1b0d076b5cd28231f019772fb8a..fd63c05fbce9429977b2a0509e1516eea448ce68 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h -@@ -195,6 +195,7 @@ class CORE_EXPORT WebLocalFrameImpl final +@@ -196,6 +196,7 @@ class CORE_EXPORT WebLocalFrameImpl final mojom::blink::EvaluationTiming, mojom::blink::LoadEventBlockingOption, WebScriptExecutionCallback, @@ -250,10 +250,10 @@ index dc77c55900a20f3b6ac1c5ac3b03e9d1253cb9cf..a1cfeb937988624178eb2db299760dd7 mojom::blink::WantResultOption, mojom::blink::PromiseResultOption) override; diff --git a/third_party/blink/renderer/core/scheduler_integration_tests/virtual_time_test.cc b/third_party/blink/renderer/core/scheduler_integration_tests/virtual_time_test.cc -index 5b633b529b13213cb95865d0116395cf8c40d573..cf861f130b3426d1da6c37f1efd5cd8984dee9dc 100644 +index 7c5eb8bfb0473334b49ce922f186f277d8d6e3fa..c8e77c29d319c74cd88401cb8619b43a40f0da44 100644 --- a/third_party/blink/renderer/core/scheduler_integration_tests/virtual_time_test.cc +++ b/third_party/blink/renderer/core/scheduler_integration_tests/virtual_time_test.cc -@@ -58,6 +58,7 @@ class VirtualTimeTest : public SimTest { +@@ -63,6 +63,7 @@ class VirtualTimeTest : public SimTest { mojom::blink::LoadEventBlockingOption::kDoNotBlock, WTF::BindOnce(&ScriptExecutionCallbackHelper::Completed, base::Unretained(&callback_helper)), diff --git a/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch b/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch index 0b96c5fa0a2a..cee470a9d414 100644 --- a/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch +++ b/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch @@ -6,7 +6,7 @@ Subject: fix: select the first menu item when opened via keyboard This fixes an accessibility issue where the root view is 'focused' to the screen reader instead of the first menu item as with all other native menus. This patch will be upstreamed. diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc -index ef6a903caf5a9bfd092170b74ba1cb1eacb919ee..30274b6772d01fa0d3dee5d93e5f9f52e6efea05 100644 +index 84add53f8b20708c0bd8a8e5fdc736c1707775ea..610fc3010e19a2d52c0545b7eed21f64da7c8e46 100644 --- a/ui/views/controls/menu/menu_controller.cc +++ b/ui/views/controls/menu/menu_controller.cc @@ -578,6 +578,7 @@ void MenuController::Run(Widget* parent, @@ -32,7 +32,7 @@ index ef6a903caf5a9bfd092170b74ba1cb1eacb919ee..30274b6772d01fa0d3dee5d93e5f9f52 if (button_controller) { pressed_lock_ = button_controller->TakeLock( false, ui::LocatedEvent::FromIfValid(event)); -@@ -2267,19 +2276,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { +@@ -2276,19 +2285,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { } item->GetSubmenu()->ShowAt(params); @@ -58,7 +58,7 @@ index ef6a903caf5a9bfd092170b74ba1cb1eacb919ee..30274b6772d01fa0d3dee5d93e5f9f52 item->GetSubmenu()->GetWidget()->SetNativeWindowProperty( diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h -index 4c25ffcf9ab92ac97e55acf9c115a16b3d34cdd7..94e847cd8161ebfd2b715754d6af1b4a7296ca29 100644 +index 33d49999d729820d42a806055092ad0f3ac9569f..c2b5e0175295108fd1ba0b6c3cbef1cab7ecb68c 100644 --- a/ui/views/controls/menu/menu_controller.h +++ b/ui/views/controls/menu/menu_controller.h @@ -137,6 +137,7 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate, diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index d778b134bc3b..6bcc84bf7420 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 f09bbcf64bfcfa26b684b3ad11e289d3f2877f50..f9009fde517e70f31f71ed23684bd02de59bfdad 100644 +index 6fe74ec01b3547e69035592c2820bf2b70374070..aa958aec47a477bbe1dbf840c6a44e63973000c2 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -4436,6 +4436,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -4470,6 +4470,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index f09bbcf64bfcfa26b684b3ad11e289d3f2877f50..f9009fde517e70f31f71ed23684bd02d } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index e04ef368815fa5e5a281e0dc785f180bce77369d..ccd40d3617468bd3c0f6ea07e3def5e920c4237a 100644 +index 86154854493f5ad8b05b8f1649a126945d454f3d..52330606a560851972bfcd38fca29a0a30f51802 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -328,6 +328,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -329,6 +329,11 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ~ContentBrowserClient() = default; diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index e5d99ab0bded..5af9ff263987 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -38,10 +38,10 @@ index c19eb72e8d37fe8145b813d07875addf793e12dc..a5db8841773618814ac90f740201d4d7 // 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 dd0088534a79a5380be8c3d069d8bc2cdc1466fa..1f4ade4905be30789451a117a788782e59f3d4c4 100644 +index 5d020cdea3cc68fe3c455a2f574fe584892e7c23..cafbc4e6f6425853ad8cd3166a341453bfb8b9f4 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -480,7 +480,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, +@@ -486,7 +486,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, // static void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, const std::string js_command_line_flags, @@ -51,7 +51,7 @@ index dd0088534a79a5380be8c3d069d8bc2cdc1466fa..1f4ade4905be30789451a117a788782e static bool v8_is_initialized = false; if (v8_is_initialized) return; -@@ -490,7 +491,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, +@@ -496,7 +497,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, // See https://crbug.com/v8/11043 SetFlags(mode, js_command_line_flags); diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index e42366be4515..ffee570e96b8 100644 --- a/patches/chromium/gritsettings_resource_ids.patch +++ b/patches/chromium/gritsettings_resource_ids.patch @@ -6,7 +6,7 @@ Subject: gritsettings_resource_ids.patch Add electron resources file to the list of resource ids generation. diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec -index 568617211dad1af84a998cb4479b89d52f050bfe..be677ab73acd0d6759583f11aed6c5b9554bf107 100644 +index ed1887839c274b1cde8f2de7a92b6de0ea33cd85..eb378b4a4a1d6b0c9aa93e6e4225576949c76a2a 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec @@ -1342,6 +1342,11 @@ 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 a2dffb876762..66641c46b65b 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 beffde877eabb6d45f9dabdc822966af0c58ae02..7a94e487021d9889610721b7948e8d3a951048b3 100755 +index 8992ea7199b7991c36a153a971a88c7f72a77375..93dd495f6640d0f07d87d58c716c98c3c8dbf053 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -304,6 +304,8 @@ def GetDefaultHostOs(): 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 a3d7430d710f..347892ecf73c 100644 --- a/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch +++ b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch @@ -9,10 +9,10 @@ be created for each child process, despite logs being redirected to a file. diff --git a/content/app/content_main.cc b/content/app/content_main.cc -index 1715d079de5e46ff2d26450f78c7df49aabcb5ae..be53ce8e26644432f5fed161ebc1d4dc1fa0b1e9 100644 +index 4251459b695e6375618de489415c3105afb1449d..6cb3cb7fd49f57f19f9780cac32218b8331c3d38 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc -@@ -305,16 +305,14 @@ RunContentProcess(ContentMainParams params, +@@ -306,16 +306,14 @@ RunContentProcess(ContentMainParams params, #if BUILDFLAG(IS_WIN) base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); diff --git a/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch b/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch index e92d05ceed4c..d3b8cf5d810b 100644 --- a/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch +++ b/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch @@ -35,10 +35,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to system priority. diff --git a/base/BUILD.gn b/base/BUILD.gn -index fb4093873eb91eca1c0139f56a77ad9eb3674679..05f3f34d135bf24c648d51339a803fbbfe3bca03 100644 +index e80597587f9afc01bc5b3e9f2a1dc9a5d9c4d4e0..5cf0e7276cdc167b42a45d680e7ba5fc58979e22 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1052,6 +1052,7 @@ component("base") { +@@ -1048,6 +1048,7 @@ component("base") { "//build/config/compiler:prevent_unsafe_narrowing", "//build/config/compiler:wexit_time_destructors", "//build/config/compiler:wglobal_constructors", @@ -303,12 +303,21 @@ index 945b01f2132547fa0f6a97ee4895994c500d1410..c01b2fdecf9b54fa01e5be9f45eaa234 // 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 6ebc4754ef986f5ae966ff7a3217ab77df78edf9..91147b8a42f731c645c318776933b4c139ca606d 100644 +index 5df3e394a693939e021be4e9e3222989ae6e5122..06ec9f081f22afbda243bb69759dd1972dff8dd0 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -@@ -104,7 +104,9 @@ void OrderChildWindow(NSWindow* child_window, +@@ -106,14 +106,18 @@ void OrderChildWindow(NSWindow* child_window, + } // namespace ++#if !IS_MAS_BUILD() + @interface NSNextStepFrame (Private) + - (instancetype)initWithFrame:(NSRect)frame + styleMask:(NSUInteger)styleMask + owner:(id)owner; + @end ++#endif + @interface NSWindow (Private) +#if !IS_MAS_BUILD() + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle; @@ -316,7 +325,7 @@ index 6ebc4754ef986f5ae966ff7a3217ab77df78edf9..91147b8a42f731c645c318776933b4c1 - (BOOL)hasKeyAppearance; - (long long)_resizeDirectionForMouseLocation:(CGPoint)location; - (BOOL)_isConsideredOpenForPersistentState; -@@ -143,6 +145,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event { +@@ -152,6 +156,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event { } @end @@ -325,7 +334,7 @@ index 6ebc4754ef986f5ae966ff7a3217ab77df78edf9..91147b8a42f731c645c318776933b4c1 @implementation NativeWidgetMacNSWindowTitledFrame - (void)mouseDown:(NSEvent*)event { if (self.window.isMovable) -@@ -169,6 +173,8 @@ - (BOOL)usesCustomDrawing { +@@ -214,6 +220,8 @@ - (BOOL)usesCustomDrawing { } @end @@ -334,7 +343,7 @@ index 6ebc4754ef986f5ae966ff7a3217ab77df78edf9..91147b8a42f731c645c318776933b4c1 @implementation NativeWidgetMacNSWindow { @private CommandDispatcher* __strong _commandDispatcher; -@@ -357,6 +363,8 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -402,6 +410,8 @@ - (NSAccessibilityRole)accessibilityRole { // NSWindow overrides. @@ -343,7 +352,7 @@ index 6ebc4754ef986f5ae966ff7a3217ab77df78edf9..91147b8a42f731c645c318776933b4c1 + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { if (windowStyle & NSWindowStyleMaskTitled) { if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class]) -@@ -368,6 +376,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { +@@ -413,6 +423,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { return [super frameViewClassForStyleMask:windowStyle]; } @@ -370,10 +379,10 @@ index b3c087eda0561d94d205ef0cbbb341a7e2a34638..035202378209e32e6f7c630140367cda // Beware: This view was briefly removed (in favor of a bare CALayer) in // https://crrev.com/c/1236675. The ordering of unassociated layers relative diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index dbc67fb38b69dd5d8e256d190727c02cbabef622..d493a07acf63ceec42f9b65b99f62650a7439d79 100644 +index 2ce093d0818f52433670e889847fbf00b7d398cc..3c5ab7a6e6608b3f5e35f8b46a59880100b2a627 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -362,6 +362,7 @@ viz_component("service") { +@@ -364,6 +364,7 @@ viz_component("service") { "frame_sinks/external_begin_frame_source_mac.h", ] } @@ -381,7 +390,7 @@ index dbc67fb38b69dd5d8e256d190727c02cbabef622..d493a07acf63ceec42f9b65b99f62650 } if (is_android || use_ozone) { -@@ -632,6 +633,7 @@ viz_source_set("unit_tests") { +@@ -635,6 +636,7 @@ viz_source_set("unit_tests") { "display_embedder/software_output_device_mac_unittest.mm", ] frameworks = [ "IOSurface.framework" ] @@ -433,10 +442,10 @@ index dbf334caa3a6d10017b69ad76802e389a011436b..0cdb0def975e457651771b43fd543261 void ForwardKeyboardEvent(const input::NativeWebKeyboardEvent& key_event, diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index 05dbd641ea4af9276be7f89627e4075153e667a9..a50cc9cd1502d7aaebdb7029fc5792fe2b74eda9 100644 +index 00493dc6c3f0229438b440a6fb2438ca668aba6b..6ce251058868529551cd6f008f840e06baa52bb7 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 -@@ -2068,15 +2068,21 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -2062,15 +2062,21 @@ - (NSAccessibilityRole)accessibilityRole { // Since this implementation doesn't have to wait any IPC calls, this doesn't // make any key-typing jank. --hbono 7/23/09 // @@ -459,10 +468,10 @@ index 05dbd641ea4af9276be7f89627e4075153e667a9..a50cc9cd1502d7aaebdb7029fc5792fe return kAttributes; } diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 6ba9d79342f44c8d942ccf8ed39bcc2af51cfacf..c2b6ffbafe1cac3f81efb4a125ce8bf5bada5272 100644 +index 6b8d614f08dfe2e1c1b1458e70452195fb0934d6..684acd5d99dc1fa78261861870fb865a2d923c18 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -54,6 +54,7 @@ source_set("browser") { +@@ -70,6 +70,7 @@ source_set("browser") { "//content:content_implementation", "//v8:external_startup_data", ] @@ -471,7 +480,7 @@ index 6ba9d79342f44c8d942ccf8ed39bcc2af51cfacf..c2b6ffbafe1cac3f81efb4a125ce8bf5 libs = [] frameworks = [] diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index b1dd00ab48e22e1e248728e0400b00e92553e8fd..253670f014c4fc13ad99d674e8dcbf145c17fcc7 100644 +index 9485916338d16e11acbb56ea0b9b34e749db0281..45df87ec3bd98474513cef590b8312f8bd976947 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm @@ -20,7 +20,9 @@ @@ -500,7 +509,7 @@ index b1dd00ab48e22e1e248728e0400b00e92553e8fd..253670f014c4fc13ad99d674e8dcbf14 // Use native VoiceOver support for live regions. BrowserAccessibilityCocoa* retained_node = native_node; -@@ -647,6 +651,7 @@ void PostAnnouncementNotification(NSString* announcement, +@@ -646,6 +650,7 @@ void PostAnnouncementNotification(NSString* announcement, return window == [NSApp accessibilityFocusedWindow]; } @@ -508,7 +517,7 @@ index b1dd00ab48e22e1e248728e0400b00e92553e8fd..253670f014c4fc13ad99d674e8dcbf14 // 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 -@@ -675,6 +680,7 @@ void PostAnnouncementNotification(NSString* announcement, +@@ -674,6 +679,7 @@ void PostAnnouncementNotification(NSString* announcement, if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]]) { return true; } @@ -543,7 +552,7 @@ index 940adeedcd38062b44afdeda1b41c89394e5e420..0809615a9818da6c6b5fd8363b168336 // 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 71fec36cef95fcb24960fde3fa7216a345aeb4d7..b1630ac4289f23c5dd36a6bf6e57c911d8cede2a 100644 +index 078f33c9c4b628b4427bb152912bf2a221e29efb..222a9cd87290efb0e30b503f9b6aaba122019bbe 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -272,8 +272,10 @@ @@ -700,7 +709,7 @@ index a119b4439bfb9218c7aaf09dca8e78527da7f20d..faa813b003940280c6eeb87e70173019 } // namespace content diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn -index 3638b51c713c360f1d0e51f5942725c24f194e10..9dfc657684299843862d0b4c55425304401b16d1 100644 +index 9be91de90914c3da214982e128ab3b506196232f..e0698a2ba0d23fd39702d19e34e1ef64c5cef0d4 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn @@ -502,6 +502,7 @@ static_library("test_support") { @@ -719,7 +728,7 @@ index 3638b51c713c360f1d0e51f5942725c24f194e10..9dfc657684299843862d0b4c55425304 } mojom("content_test_mojo_bindings") { -@@ -1716,6 +1718,7 @@ test("content_browsertests") { +@@ -1718,6 +1720,7 @@ test("content_browsertests") { defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] configs += [ "//build/config:precompiled_headers" ] @@ -727,7 +736,7 @@ index 3638b51c713c360f1d0e51f5942725c24f194e10..9dfc657684299843862d0b4c55425304 public_deps = [ ":test_interfaces", -@@ -2967,6 +2970,7 @@ test("content_unittests") { +@@ -2974,6 +2977,7 @@ test("content_unittests") { } configs += [ "//build/config:precompiled_headers" ] @@ -749,7 +758,7 @@ index c28458b5ddc8ef74e82125a983344b1daf65dda6..48e6d48962a2228d26444dbdbcfa1637 sources += [ "browser/web_test_shell_platform_delegate_mac.mm" ] } else if (toolkit_views && !is_castos) { diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn -index cfb175b6985ed81021b236fc2ce14064e23beba7..81116f63eb9443165721064c26bacc710c454684 100644 +index 2e53ca913d9b4380792df82f73dcfdd5177c0214..edb1e1a3283ee1978d64527c29ad207e9f06153a 100644 --- a/device/bluetooth/BUILD.gn +++ b/device/bluetooth/BUILD.gn @@ -249,6 +249,7 @@ component("bluetooth") { @@ -884,7 +893,7 @@ index a5070091785d80a47d1d9d9977803cd1de8b2054..b280a0d58fc03257aa1763cd15791db4 } diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn -index 63414d8db326c0fdd44ed59f99400d5c16cfc93c..d80a104451c66017750d04c776355cfa4691d2a3 100644 +index 5f4ff9ff8172d4ad282cc9c781f85118b8ba7d1a..6a542c8f0d7afad876ab2739a1a2576a64cb6be9 100644 --- a/net/dns/BUILD.gn +++ b/net/dns/BUILD.gn @@ -187,6 +187,8 @@ source_set("dns") { @@ -1260,10 +1269,10 @@ index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..dc30306f2c5d20503399fc3a8860773a } // namespace sandbox diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn -index 6ee0ec12c17501514937f9126338bd402546d28b..9801bfbc7b6e0fe85809b343500cad352f01ff21 100644 +index fb1e7f7238358ca9d505f76a158b88f4412412f7..3340e675bed474cba55d78b249c4658dcf91f990 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn -@@ -330,6 +330,7 @@ component("core") { +@@ -332,6 +332,7 @@ component("core") { configs -= core_config_remove configs += core_config_add configs += [ "//v8:external_startup_data" ] @@ -1417,7 +1426,7 @@ index 84e156b7ff28abc2071dde155e56a2a92a53b142..bd73dac7fe3ed256cab805a0815d31d4 // Accessible object if (AXElementWrapper::IsValidElement(value)) { diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 70342aaf70db9d0d53494ea98c4eec5e36c58de5..ecf8c102cbb6110eabeba95053a2fdfb739c954c 100644 +index 381ecc15e5cd3ef6275ce36335e95fc745788c32..08438eb0ed184c2afa1bf2501a5cccf77056cbed 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -363,6 +363,7 @@ component("base") { @@ -1517,10 +1526,10 @@ index fc25ba79d2b0e1acdb7ba54b89e7d6e16f94771b..962df2d65d61ec0836cf465d847eb666 } // namespace diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn -index cb0c8581489dfaf09e62182ca5069a4ab9cf3e31..7317b3b313b407cfd76c769f729599610eff61de 100644 +index 9fb3bee897513d262ac44dccfe6662cc145a8df7..5b7592d7f739b5e580429a69575e6df5ee7e4695 100644 --- a/ui/display/BUILD.gn +++ b/ui/display/BUILD.gn -@@ -71,6 +71,10 @@ component("display") { +@@ -72,6 +72,10 @@ component("display") { "mac/display_link_mac.mm", "mac/screen_mac.mm", ] @@ -1617,7 +1626,7 @@ index cd6c9a924dce762ff935ef722c8873c974772225..b162795219e0fac3d9caa6bbfead126c sources += [ "test/desktop_window_tree_host_win_test_api.cc", diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h -index e92ca79bebffde146bd0d8778f126651f44e527e..298f06095ea598348eec489b0a4be737945b87de 100644 +index 3911cb0691cb74c855c8edc9402cfd5a7fa7ddf3..8014af9cb95cdcb976c2f070b5a158c0947cc6ce 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h @@ -31,7 +31,9 @@ @@ -1630,7 +1639,7 @@ index e92ca79bebffde146bd0d8778f126651f44e527e..298f06095ea598348eec489b0a4be737 @class NSView; namespace remote_cocoa { -@@ -475,10 +477,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost +@@ -479,10 +481,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost mojo::AssociatedRemote remote_ns_window_remote_; @@ -1644,10 +1653,10 @@ index e92ca79bebffde146bd0d8778f126651f44e527e..298f06095ea598348eec489b0a4be737 // 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 8dc2fc9768da17f8635dce99da218450b231cafe..a88e24a51070ba906d3b858f8492ebe39d372c69 100644 +index 5d03d63d5ac0f114269b03098364ee3ab2620daa..7200b48bd63e1c951d51781c92a7995ad80c26bb 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -345,7 +345,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -349,7 +349,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const { if (in_process_ns_window_bridge_) return in_process_ns_window_bridge_->ns_view(); @@ -1659,7 +1668,7 @@ index 8dc2fc9768da17f8635dce99da218450b231cafe..a88e24a51070ba906d3b858f8492ebe3 } gfx::NativeViewAccessible -@@ -360,7 +364,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -364,7 +368,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, return [in_process_ns_window_bridge_->ns_view() window]; } @@ -1671,7 +1680,7 @@ index 8dc2fc9768da17f8635dce99da218450b231cafe..a88e24a51070ba906d3b858f8492ebe3 } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1297,9 +1305,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1316,9 +1324,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, // for PWAs. However this breaks accessibility on in-process windows, // so set it back to NO when a local window gains focus. See // https://crbug.com/41485830. @@ -1683,7 +1692,7 @@ index 8dc2fc9768da17f8635dce99da218450b231cafe..a88e24a51070ba906d3b858f8492ebe3 // Explicitly set the keyboard accessibility state on regaining key // window status. if (is_key && is_content_first_responder) -@@ -1459,17 +1469,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1481,17 +1491,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -1704,7 +1713,7 @@ index 8dc2fc9768da17f8635dce99da218450b231cafe..a88e24a51070ba906d3b858f8492ebe3 *pid = getpid(); id element_id = GetNativeViewAccessible(); -@@ -1482,6 +1495,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1504,6 +1517,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, } *token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id); diff --git a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch index aa21051cf826..20ef0b31449d 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 84a7701412be101ecd95ea8e1561e0bdb11dea7d..cf6141b4c886aab554ad347c0b5e4b88979261ad 100644 +index 1d56dccaece230facd6e49591313728ef422b3d4..de631f7f1c9067746847a4fe046ef376ec5fcf11 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -154,6 +154,11 @@ +@@ -156,6 +156,11 @@ #include "services/network/web_transport.h" #include "url/gurl.h" @@ -22,7 +22,7 @@ index 84a7701412be101ecd95ea8e1561e0bdb11dea7d..cf6141b4c886aab554ad347c0b5e4b88 #if BUILDFLAG(IS_CT_SUPPORTED) // gn check does not account for BUILDFLAG(). So, for iOS builds, it will // complain about a missing dependency on the target exposing this header. Add a -@@ -578,6 +583,99 @@ mojom::URLLoaderFactoryParamsPtr CreateURLLoaderFactoryParamsForPrefetch() { +@@ -580,6 +585,99 @@ mojom::URLLoaderFactoryParamsPtr CreateURLLoaderFactoryParamsForPrefetch() { } // namespace @@ -122,7 +122,7 @@ index 84a7701412be101ecd95ea8e1561e0bdb11dea7d..cf6141b4c886aab554ad347c0b5e4b88 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::NetworkContextHttpAuthPreferences:: -@@ -941,6 +1039,13 @@ void NetworkContext::SetClient( +@@ -961,6 +1059,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -136,7 +136,7 @@ index 84a7701412be101ecd95ea8e1561e0bdb11dea7d..cf6141b4c886aab554ad347c0b5e4b88 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2412,6 +2517,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2455,6 +2560,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = std::move(cert_verifier_with_trust_anchors); #endif // BUILDFLAG(IS_CHROMEOS) @@ -147,10 +147,10 @@ index 84a7701412be101ecd95ea8e1561e0bdb11dea7d..cf6141b4c886aab554ad347c0b5e4b88 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 71046570e064d2b2820710575c10a6f57a3b8aa0..134a89ace8e7f06744cb13e83b2997236b160ade 100644 +index 304843eb91b51951ff1fc4e71b69cfd13e60ce27..f9f0cf9534934346e55ea7ebb23bd17127c59914 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -113,6 +113,7 @@ class URLMatcher; +@@ -115,6 +115,7 @@ class URLMatcher; } namespace network { @@ -158,7 +158,7 @@ index 71046570e064d2b2820710575c10a6f57a3b8aa0..134a89ace8e7f06744cb13e83b299723 class CookieManager; class HostResolver; class MdnsResponderManager; -@@ -247,6 +248,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; @@ -167,7 +167,7 @@ index 71046570e064d2b2820710575c10a6f57a3b8aa0..134a89ace8e7f06744cb13e83b299723 void ResetURLLoaderFactories() override; void GetViaObliviousHttp( mojom::ObliviousHttpRequestPtr request, -@@ -900,6 +903,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -924,6 +927,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -177,10 +177,10 @@ index 71046570e064d2b2820710575c10a6f57a3b8aa0..134a89ace8e7f06744cb13e83b299723 std::unique_ptr internal_host_resolver_; std::set, base::UniquePtrComparator> diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index c2babfc29eaf0e190939173a75f9f35d1816d6bc..19f568b78c621ecbec64b8eb46c8c92d7af650f7 100644 +index e50bac15e7b67b3c6388c45c410517c07e5b8d73..53b62d8ef441212469158feb569865e8f54c5b48 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -297,6 +297,16 @@ struct SocketBrokerRemotes { +@@ -298,6 +298,16 @@ struct SocketBrokerRemotes { pending_remote server; }; @@ -197,7 +197,7 @@ index c2babfc29eaf0e190939173a75f9f35d1816d6bc..19f568b78c621ecbec64b8eb46c8c92d // Parameters for constructing a network context. struct NetworkContextParams { -@@ -969,6 +979,9 @@ interface NetworkContext { +@@ -989,6 +999,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); @@ -208,10 +208,10 @@ index c2babfc29eaf0e190939173a75f9f35d1816d6bc..19f568b78c621ecbec64b8eb46c8c92d CreateURLLoaderFactory(pending_receiver url_loader_factory, URLLoaderFactoryParams params); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index f9aabc3d30ed66012402ef23027092be7e806b65..eb78d84ad3d6124313cf7b940425b0162d554fd6 100644 +index 22aa7af3eabc333711f637ae18c1b9a5b26ef4ad..cc01bb23132c15903640c37c7e6c12674678408e 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -62,6 +62,8 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -63,6 +63,8 @@ class TestNetworkContext : public mojom::NetworkContext { void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override {} diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 66cdcea57b97..21b38f45bcd9 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -133,10 +133,10 @@ index 38c8cf36fdf9366121c7ada96c167a4c9664952e..03b37fb62655a355e104870a088e4222 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 e1c467ad23f9bd88a8693b539dbceb8dcd12deba..a25d966c3395d89c9a1533356de19a3d6fa5279b 100644 +index 569883b00dad3971e204f47dca7902909a9613d7..f8e2b5c2f270b9ed6e8ceda213decb0d81d56a41 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1963,7 +1963,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -1970,7 +1970,7 @@ void RenderProcessHostImpl::CreateNotificationService( case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker: case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -145,7 +145,7 @@ index e1c467ad23f9bd88a8693b539dbceb8dcd12deba..a25d966c3395d89c9a1533356de19a3d creator_type, std::move(receiver)); break; } -@@ -1971,7 +1971,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -1978,7 +1978,7 @@ void RenderProcessHostImpl::CreateNotificationService( CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch b/patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch index 400edfd54a86..e6ed516bc110 100644 --- a/patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch +++ b/patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch @@ -10,10 +10,10 @@ an about:blank check to this area. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876 diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 5025c67e50aa0540a0fb8f39c83f37e406586ef1..094a98447186676d6e62158e7520c7eb9fb44335 100644 +index b428b8fa0ff0565c8f42c2b9949c90a38d1e5813..b40a37e073877f561b1397bfe1fdc00b15c0c63f 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -783,8 +783,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch( +@@ -786,8 +786,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch( // TODO(crbug.com/40092527): Consider adding a separate boolean that // tracks this instead of piggybacking `origin_calculation_debug_info`. if (renderer_side_origin.opaque() && diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index bc4adf6580a7..473e0c2715f7 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -39,7 +39,7 @@ index d236578cefc347e772305ac7ec54b9734e4aa20b..6bb89cea3b6b91ec8ea351ed60c4e405 ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground, kCloseButtonIconSize)); diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -index c67f93efc462c2ac7b15ecb3a2ffb2daaccbd1cc..507a695ba97c6321c4d1aa662bdd0206991e6c69 100644 +index fc59766e2aacf6b231eb545aedf2bb624e4df981..87c1bd3a4717a22fdc1f6411d14171f706e127d7 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc @@ -17,9 +17,11 @@ @@ -61,9 +61,9 @@ index c67f93efc462c2ac7b15ecb3a2ffb2daaccbd1cc..507a695ba97c6321c4d1aa662bdd0206 -#if BUILDFLAG(IS_WIN) +#if 0 #include "chrome/browser/shell_integration_win.h" + #include "content/public/browser/render_widget_host_view.h" #include "ui/aura/window.h" - #include "ui/aura/window_tree_host.h" -@@ -310,7 +312,7 @@ std::unique_ptr VideoOverlayWindowViews::Create( +@@ -313,7 +315,7 @@ std::unique_ptr VideoOverlayWindowViews::Create( overlay_window->Init(std::move(params)); overlay_window->OnRootViewReady(); 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 8100185f59c5..92442655ff7c 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 ae05bb69f1792235594682441fb721558e910fc0..68d8b04c7f3a29f6408aa99241bebc9fe9aaf480 100644 +index 71a9ce1f6b57b6b8843abda6bd3e4999530aa828..6048a08e872a81f3dbaa60efc0019f349cabbb22 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h -@@ -407,6 +407,10 @@ +@@ -405,6 +405,10 @@ E_CPONLY(kColorRadioButtonForegroundUnchecked) \ E_CPONLY(kColorRadioButtonForegroundDisabled) \ E_CPONLY(kColorRadioButtonForegroundChecked) \ @@ -22,7 +22,7 @@ index ae05bb69f1792235594682441fb721558e910fc0..68d8b04c7f3a29f6408aa99241bebc9f E_CPONLY(kColorSegmentedButtonBorder) \ E_CPONLY(kColorSegmentedButtonFocus) \ E_CPONLY(kColorSegmentedButtonForegroundChecked) \ -@@ -511,6 +515,7 @@ +@@ -509,6 +513,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ @@ -61,10 +61,10 @@ index 6ec67f8c283779fc76d38ba15c095152bf3aba76..964cd58619476634299c067498f09d46 ? SkColorSetRGB(0x99, 0xC8, 0xFF) : SkColorSetRGB(0x00, 0x75, 0xFF)}; diff --git a/ui/color/win/native_color_mixers_win.cc b/ui/color/win/native_color_mixers_win.cc -index 02ac937e8bdf054fa516ad25714e60f32f452342..9c55f5fa27fdcf4192b18c8234f8b117d5cd26be 100644 +index f85dc80f3e90c4758f1aef770c9c2a10c723a5ff..f990ccbe41355c00bd3cd34c0ef169429eea7cc6 100644 --- a/ui/color/win/native_color_mixers_win.cc +++ b/ui/color/win/native_color_mixers_win.cc -@@ -172,6 +172,10 @@ void AddNativeUiColorMixer(ColorProvider* provider, +@@ -171,6 +171,10 @@ void AddNativeUiColorMixer(ColorProvider* provider, SetAlpha(kColorNotificationInputForeground, gfx::kGoogleGreyAlpha700); mixer[kColorSliderTrack] = AlphaBlend( kColorNativeHighlight, kColorNativeWindow, gfx::kGoogleGreyAlpha400); @@ -75,7 +75,7 @@ index 02ac937e8bdf054fa516ad25714e60f32f452342..9c55f5fa27fdcf4192b18c8234f8b117 // Window Background mixer[kColorBubbleFooterBackground] = {kColorNativeWindow}; -@@ -180,6 +184,7 @@ void AddNativeUiColorMixer(ColorProvider* provider, +@@ -179,6 +183,7 @@ void AddNativeUiColorMixer(ColorProvider* provider, mixer[kColorFrameInactive] = {kColorNativeWindow}; mixer[kColorPrimaryBackground] = {kColorNativeWindow}; mixer[kColorTooltipBackground] = {kColorNativeWindow}; @@ -83,7 +83,7 @@ index 02ac937e8bdf054fa516ad25714e60f32f452342..9c55f5fa27fdcf4192b18c8234f8b117 // Window Text mixer[kColorAlertLowSeverity] = {kColorNativeWindowText}; -@@ -193,6 +198,7 @@ void AddNativeUiColorMixer(ColorProvider* provider, +@@ -192,6 +197,7 @@ void AddNativeUiColorMixer(ColorProvider* provider, mixer[kColorTableGroupingIndicator] = {kColorNativeWindowText}; mixer[kColorThrobber] = {kColorNativeWindowText}; mixer[kColorTooltipForeground] = {kColorNativeWindowText}; @@ -91,7 +91,7 @@ index 02ac937e8bdf054fa516ad25714e60f32f452342..9c55f5fa27fdcf4192b18c8234f8b117 // Hyperlinks mixer[kColorLinkForegroundDefault] = {kColorNativeHotlight}; -@@ -236,6 +242,7 @@ void AddNativeUiColorMixer(ColorProvider* provider, +@@ -235,6 +241,7 @@ void AddNativeUiColorMixer(ColorProvider* provider, mixer[kColorTextfieldForeground] = {kColorNativeBtnText}; mixer[kColorTextfieldForegroundPlaceholder] = {kColorNativeBtnText}; mixer[kColorTextfieldForegroundDisabled] = {kColorNativeBtnText}; diff --git a/patches/chromium/preconnect_manager.patch b/patches/chromium/preconnect_manager.patch index 7c739d5e981d..8a032c3965c6 100644 --- a/patches/chromium/preconnect_manager.patch +++ b/patches/chromium/preconnect_manager.patch @@ -10,12 +10,12 @@ in favor of defining PreconnectRequest in this file since we don't build the header. diff --git a/chrome/browser/predictors/preconnect_manager.cc b/chrome/browser/predictors/preconnect_manager.cc -index a51225da52ea92e39b9d11f48b024e423e6039ac..552f748612f59455b480d62f14c5d49ec752997b 100644 +index 7eb87e7e7128da73ff78323c50d4efa488de781c..54cd08ea761076034fda450abe07e40d3235d9b0 100644 --- a/chrome/browser/predictors/preconnect_manager.cc +++ b/chrome/browser/predictors/preconnect_manager.cc -@@ -10,9 +10,11 @@ - #include "base/functional/bind.h" +@@ -11,9 +11,11 @@ #include "base/metrics/histogram_macros.h" + #include "base/not_fatal_until.h" #include "base/trace_event/trace_event.h" +#if 0 #include "chrome/browser/predictors/resource_prefetch_predictor.h" @@ -25,7 +25,7 @@ index a51225da52ea92e39b9d11f48b024e423e6039ac..552f748612f59455b480d62f14c5d49e #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" -@@ -23,6 +25,20 @@ namespace predictors { +@@ -24,6 +26,20 @@ namespace predictors { const bool kAllowCredentialsOnPreconnectByDefault = true; @@ -46,7 +46,7 @@ index a51225da52ea92e39b9d11f48b024e423e6039ac..552f748612f59455b480d62f14c5d49e PreconnectedRequestStats::PreconnectedRequestStats(const url::Origin& origin, bool was_preconnected) : origin(origin), was_preconnected(was_preconnected) {} -@@ -83,12 +99,15 @@ PreconnectManager::PreconnectManager(base::WeakPtr delegate, +@@ -84,12 +100,15 @@ PreconnectManager::PreconnectManager(base::WeakPtr delegate, PreconnectManager::~PreconnectManager() = default; bool PreconnectManager::IsEnabled() { diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 2affd6c697d5..fae1bf5068c1 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -11,18 +11,18 @@ 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 d08e389678df3348acc0085d9b3af2725a32cdae..ff2b512131e1e81d417b5007d5b248b5f9256add 100644 +index 35e7fdec178193bc38fb4e52830579168cf217ce..e0015540b429dec99e8a0ab9d539095240d57fea 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -976,7 +976,6 @@ if (is_win) { +@@ -1001,7 +1001,6 @@ if (is_win) { "//media:media_unittests", "//media/midi:midi_unittests", "//net:net_unittests", - "//printing:printing_unittests", "//sql:sql_unittests", - "//third_party/breakpad:symupload($host_toolchain)", + "//third_party/breakpad:symupload", "//ui/base:ui_base_unittests", -@@ -985,6 +984,10 @@ if (is_win) { +@@ -1010,6 +1009,10 @@ if (is_win) { "//ui/views:views_unittests", "//url:url_unittests", ] @@ -91,7 +91,7 @@ index 163eacc8bb6654880d37111923a87ea5a6134485..565258e9bd4cc52e347e1f4a72ee29ec : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d28a6e5af1 100644 +index e53414c7288f087a6d9ae47c8e96b516430e5419..3084546bee021eb2752335b8d31d48d28a6e5af1 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -87,6 +87,20 @@ namespace printing { @@ -139,7 +139,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 std::move(callback).Run(nullptr); return; } -@@ -121,11 +135,15 @@ void OnDidGetDefaultPrintSettings( +@@ -121,14 +135,14 @@ void OnDidGetDefaultPrintSettings( void OnDidScriptedPrint( scoped_refptr queue, std::unique_ptr printer_query, @@ -150,13 +150,15 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 if (printer_query->last_status() != mojom::ResultCode::kSuccess || !printer_query->settings().dpi()) { +- // Notify user of the error, unless it was explicitly canceled. +- if (printer_query->last_status() != mojom::ResultCode::kCanceled) { +- ShowPrintErrorDialogForGenericError(); + if (printer_query->last_status() == mojom::ResultCode::kCanceled) { + std::move(cancel_job).Run(); -+ } + } std::move(callback).Run(nullptr); return; - } -@@ -182,9 +200,11 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -186,9 +200,11 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -168,7 +170,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -208,12 +228,16 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() { +@@ -212,12 +228,16 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() { } #endif // BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) @@ -187,7 +189,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 for (auto& observer : GetTestObservers()) { observer.OnPrintNow(rfh); -@@ -295,7 +319,7 @@ void PrintViewManagerBase::PrintDocument( +@@ -299,7 +319,7 @@ void PrintViewManagerBase::PrintDocument( const gfx::Size& page_size, const gfx::Rect& content_area, const gfx::Point& offsets) { @@ -196,7 +198,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 if (content_analysis_before_printing_document_) { std::move(content_analysis_before_printing_document_) .Run(print_data, page_size, content_area, offsets); -@@ -342,12 +366,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea( +@@ -346,12 +366,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea( } PRINTER_LOG(EVENT) << "Paper printable area updated for vendor id " << print_settings->requested_media().vendor_id; @@ -211,7 +213,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 base::Value::Dict job_settings, std::unique_ptr print_settings, UpdatePrintSettingsCallback callback) { -@@ -355,7 +380,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings( +@@ -359,7 +380,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings( settings->pages = GetPageRangesFromJobSettings(job_settings); settings->params = mojom::PrintParams::New(); RenderParamsFromPrintSettings(*print_settings, settings->params.get()); @@ -221,7 +223,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 if (!PrintMsgPrintParamsIsValid(*settings->params)) { mojom::PrinterType printer_type = static_cast( *job_settings.FindInt(kSettingPrinterType)); -@@ -367,6 +393,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings( +@@ -371,6 +393,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings( return; } @@ -232,7 +234,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 set_cookie(settings->params->document_cookie); std::move(callback).Run(std::move(settings)); } -@@ -436,7 +466,7 @@ void PrintViewManagerBase::StartLocalPrintJob( +@@ -440,7 +466,7 @@ void PrintViewManagerBase::StartLocalPrintJob( PrinterHandler::PrintCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -241,7 +243,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 // Populating `content_analysis_before_printing_document_` if needed should be // done first in this function's workflow, this way other code can check if // content analysis is going to happen and delay starting `print_job_` to -@@ -669,7 +699,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings( +@@ -673,7 +699,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings( #if BUILDFLAG(ENABLE_OOP_PRINTING) if (ShouldPrintJobOop() && @@ -250,7 +252,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 !analyzing_content_ && #endif !query_with_ui_client_id().has_value()) { -@@ -697,7 +727,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings( +@@ -701,7 +727,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings( // Sometimes it is desired to get the PDF settings as opposed to the settings // of the default system print driver. @@ -259,7 +261,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 bool want_pdf_settings = analyzing_content_; #else bool want_pdf_settings = false; -@@ -741,10 +771,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -745,10 +771,7 @@ void PrintViewManagerBase::UpdatePrintSettings( // `job_settings` does not yet contain the rasterized PDF dpi, so if the user // has the print preference set, fetch it for use in // `PrintSettingsFromJobSettings()`. @@ -271,7 +273,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 if (prefs && prefs->HasPrefPath(prefs::kPrintRasterizePdfDpi)) { int value = prefs->GetInteger(prefs::kPrintRasterizePdfDpi); if (value > 0) -@@ -769,8 +796,22 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -773,8 +796,22 @@ void PrintViewManagerBase::UpdatePrintSettings( } } @@ -296,7 +298,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 // fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()` // for in-browser queries. if (printer_type == mojom::PrinterType::kLocal) { -@@ -791,8 +832,6 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -795,8 +832,6 @@ void PrintViewManagerBase::UpdatePrintSettings( } #endif @@ -305,7 +307,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 } void PrintViewManagerBase::SetAccessibilityTree( -@@ -808,7 +847,7 @@ void PrintViewManagerBase::SetAccessibilityTree( +@@ -812,7 +847,7 @@ void PrintViewManagerBase::SetAccessibilityTree( void PrintViewManagerBase::IsPrintingEnabled( IsPrintingEnabledCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -314,7 +316,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 } void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, -@@ -834,7 +873,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -838,7 +873,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, return; } #endif @@ -323,7 +325,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 std::optional scanning_data = enterprise_data_protection::GetPrintAnalysisData( web_contents(), enterprise_data_protection::PrintScanningContext:: -@@ -864,11 +903,9 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, +@@ -868,11 +903,9 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, // destroyed. In such cases the error notification to the user will // have already been displayed, and a second message should not be // shown. @@ -337,7 +339,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 ReleasePrinterQuery(); } -@@ -880,15 +917,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) { +@@ -884,15 +917,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) { test_observers_.RemoveObserver(&observer); } @@ -362,7 +364,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 } void PrintViewManagerBase::RenderFrameDeleted( -@@ -936,7 +982,7 @@ void PrintViewManagerBase::SystemDialogCancelled() { +@@ -940,7 +982,7 @@ void PrintViewManagerBase::SystemDialogCancelled() { #endif bool PrintViewManagerBase::GetPrintingEnabledBooleanPref() const { @@ -371,7 +373,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 } void PrintViewManagerBase::OnDocDone(int job_id, PrintedDocument* document) { -@@ -953,7 +999,12 @@ void PrintViewManagerBase::OnJobDone() { +@@ -957,7 +999,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. @@ -385,7 +387,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 ReleasePrintJob(); } -@@ -962,9 +1013,9 @@ void PrintViewManagerBase::OnCanceling() { +@@ -966,9 +1013,9 @@ void PrintViewManagerBase::OnCanceling() { } void PrintViewManagerBase::OnFailed() { @@ -397,7 +399,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 TerminatePrintJob(true); } -@@ -974,7 +1025,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { +@@ -978,7 +1025,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { // Is the document already complete? if (print_job_->document() && print_job_->document()->IsComplete()) { @@ -406,7 +408,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 return true; } -@@ -1027,7 +1078,10 @@ bool PrintViewManagerBase::SetupNewPrintJob( +@@ -1031,7 +1078,10 @@ bool PrintViewManagerBase::SetupNewPrintJob( // Disconnect the current `print_job_`. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -418,7 +420,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 if (!weak_this) return false; -@@ -1047,7 +1101,7 @@ bool PrintViewManagerBase::SetupNewPrintJob( +@@ -1051,7 +1101,7 @@ bool PrintViewManagerBase::SetupNewPrintJob( #endif print_job_->AddObserver(*this); @@ -427,7 +429,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 return true; } -@@ -1105,7 +1159,7 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -1109,7 +1159,7 @@ void PrintViewManagerBase::ReleasePrintJob() { // Ensure that any residual registration of printing client is released. // This might be necessary in some abnormal cases, such as the associated // render process having terminated. @@ -436,7 +438,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 if (!analyzing_content_) { UnregisterSystemPrintClient(); } -@@ -1115,6 +1169,11 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -1119,6 +1169,11 @@ void PrintViewManagerBase::ReleasePrintJob() { } #endif @@ -448,7 +450,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 if (!print_job_) return; -@@ -1122,7 +1181,7 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -1126,7 +1181,7 @@ void PrintViewManagerBase::ReleasePrintJob() { // printing_rfh_ should only ever point to a RenderFrameHost with a live // RenderFrame. DCHECK(rfh->IsRenderFrameLive()); @@ -457,7 +459,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 } print_job_->RemoveObserver(*this); -@@ -1164,7 +1223,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -1168,7 +1223,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -466,7 +468,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 return true; if (!cookie) { -@@ -1187,7 +1246,7 @@ bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { +@@ -1191,7 +1246,7 @@ bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { return false; } @@ -475,7 +477,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 // Don't start printing if enterprise checks are being performed to check if // printing is allowed, or if content analysis is going to take place right // before starting `print_job_`. -@@ -1318,6 +1377,8 @@ void PrintViewManagerBase::CompleteScriptedPrint( +@@ -1322,6 +1377,8 @@ void PrintViewManagerBase::CompleteScriptedPrint( auto callback_wrapper = base::BindOnce( &PrintViewManagerBase::ScriptedPrintReply, weak_ptr_factory_.GetWeakPtr(), std::move(callback), render_process_host->GetID()); @@ -484,7 +486,7 @@ index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d2 #if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) DisableThirdPartyBlocking(); #endif -@@ -1332,10 +1393,10 @@ void PrintViewManagerBase::CompleteScriptedPrint( +@@ -1336,10 +1393,10 @@ void PrintViewManagerBase::CompleteScriptedPrint( params->expected_pages_count, params->has_selection, params->margin_type, params->is_scripted, !render_process_host->IsPdf(), base::BindOnce(&OnDidScriptedPrint, queue_, std::move(printer_query), @@ -654,7 +656,7 @@ index 3c2fdc9f9a6c60efc4b0afacbfb83eef55917791..8fd9aff538fa03da6c171927c316d4f6 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 1c12ab70d993b742ee73b1235ecfdd3239125e97..b24751087f4015fc6b93518af95b0911529d3c6e 100644 +index f039e0f694e7db6b14d222b917505ba2c02c7106..6b8493163997718d498e217bcfd261e840d79377 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -51,6 +51,7 @@ @@ -665,7 +667,7 @@ index 1c12ab70d993b742ee73b1235ecfdd3239125e97..b24751087f4015fc6b93518af95b0911 #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" -@@ -1224,14 +1225,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1222,14 +1223,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { } print_in_progress_ = true; @@ -682,7 +684,7 @@ index 1c12ab70d993b742ee73b1235ecfdd3239125e97..b24751087f4015fc6b93518af95b0911 if (!weak_this) { return; } -@@ -1262,12 +1263,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1260,12 +1261,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -700,7 +702,7 @@ index 1c12ab70d993b742ee73b1235ecfdd3239125e97..b24751087f4015fc6b93518af95b0911 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) { return; -@@ -1284,9 +1287,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( +@@ -1282,9 +1285,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( is_loading_ = frame->WillPrintSoon(); if (is_loading_) { @@ -714,7 +716,7 @@ index 1c12ab70d993b742ee73b1235ecfdd3239125e97..b24751087f4015fc6b93518af95b0911 SetupOnStopLoadingTimeout(); return; } -@@ -1296,7 +1300,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( +@@ -1294,7 +1298,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -723,7 +725,7 @@ index 1c12ab70d993b742ee73b1235ecfdd3239125e97..b24751087f4015fc6b93518af95b0911 if (render_frame_gone_) { return; -@@ -1453,6 +1457,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { +@@ -1451,6 +1455,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -732,7 +734,7 @@ index 1c12ab70d993b742ee73b1235ecfdd3239125e97..b24751087f4015fc6b93518af95b0911 print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -2045,17 +2051,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2043,17 +2049,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -755,7 +757,7 @@ index 1c12ab70d993b742ee73b1235ecfdd3239125e97..b24751087f4015fc6b93518af95b0911 DidFinishPrinting(PrintingResult::kFailPrintInit); return; } -@@ -2076,8 +2084,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2074,8 +2082,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -772,7 +774,7 @@ index 1c12ab70d993b742ee73b1235ecfdd3239125e97..b24751087f4015fc6b93518af95b0911 // Check if `this` is still valid. if (!self) return; -@@ -2338,29 +2353,37 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2336,29 +2351,37 @@ void PrintRenderFrameHelper::IPCProcessed() { } bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame, @@ -861,10 +863,10 @@ index 14de029740ffbebe06d309651c1a2c007d9fb96b..e9bf9c5bef2a9235260e7d6c8d26d415 ScriptingThrottler scripting_throttler_; diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index c2b6ffbafe1cac3f81efb4a125ce8bf5bada5272..49d9943512685d6b6cf1d470059b701e0eced33f 100644 +index 684acd5d99dc1fa78261861870fb865a2d923c18..ba14efc42e1c66339d237fc833bae34c6d7cc26f 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -2979,8 +2979,9 @@ source_set("browser") { +@@ -2988,8 +2988,9 @@ source_set("browser") { "//ppapi/shared_impl", ] 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 a78a61bc477a..dbb569cabf91 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -8,7 +8,7 @@ Chrome moved the SetCursor IPC message to mojo, which we use to tell OSR about ` Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779 diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h -index 70600292ad70c7cae3c42a434aeb8c70c0f97b16..bf0984fc166b9b41342d8bdb74493d31d495e304 100644 +index eaca11c1b16ee0befe8f5bfd3735a582a63cbd81..9f042cd993e46993826634772714c4f2c2089705 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h @@ -26,6 +26,7 @@ @@ -30,10 +30,10 @@ index 70600292ad70c7cae3c42a434aeb8c70c0f97b16..bf0984fc166b9b41342d8bdb74493d31 // 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 2c0aec08ab428de9e028dc39694e7d72ede50490..9f8dfe77123c6229bc186d0619e6108da8bd9832 100644 +index e5778e3fe86517fb2ee4177aa7d4b49a147f14d5..f52c0ba0fce5747dff3c97a4423874fcf34fdb2a 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -1974,6 +1974,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { +@@ -1966,6 +1966,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { if (view_) { view_->UpdateCursor(cursor); } @@ -44,10 +44,10 @@ index 2c0aec08ab428de9e028dc39694e7d72ede50490..9f8dfe77123c6229bc186d0619e6108d void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index f8d747565a1d5570c78301ee960ea7cbc4702c65..c02d1b289350c3b3bfb3f0206bc7595e1b84e187 100644 +index 697dc1f6dcb5c2ad5a44566a07471dd21a5787ad..aa0841abdacb72309365f7abd5e7f78129798f0a 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5454,6 +5454,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -5386,6 +5386,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -60,10 +60,10 @@ index f8d747565a1d5570c78301ee960ea7cbc4702c65..c02d1b289350c3b3bfb3f0206bc7595e 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 b4efaee46c41aa00ce375c8b3c446ee59e8ecc9a..2cae6395e6e780b5179d2db378c4e80ebbd6d743 100644 +index 31b97a40964d73a5d4d05209253e07bc1a93ca48..38743cefe8b34ed9e4fd4f71515701fbb0085642 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1095,6 +1095,7 @@ class CONTENT_EXPORT WebContentsImpl +@@ -1099,6 +1099,7 @@ class CONTENT_EXPORT WebContentsImpl void SendScreenRects() override; void SendActiveState(bool active) override; TextInputManager* GetTextInputManager() override; @@ -72,7 +72,7 @@ index b4efaee46c41aa00ce375c8b3c446ee59e8ecc9a..2cae6395e6e780b5179d2db378c4e80e 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 da6b102da0927221568580b405ef22271ce43055..8021248b3ea764c802e27e0a6b06088fa0841aa7 100644 +index 7e1fc02b877333fea43ea0a95ebd0ca455cef623..7b80d6cb769dd0388338f4afca3b75ecc0a68c99 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -33,6 +33,7 @@ diff --git a/patches/chromium/refactor_expose_file_system_access_blocklist.patch b/patches/chromium/refactor_expose_file_system_access_blocklist.patch index 3d69b59fa738..4072eafd93f4 100644 --- a/patches/chromium/refactor_expose_file_system_access_blocklist.patch +++ b/patches/chromium/refactor_expose_file_system_access_blocklist.patch @@ -8,7 +8,7 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w to upstream this change to Chrome. diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -index 01c10e95f31595d8e9e40d6fdcc75bd66b75efe8..8377944c3253b546dbb743a1053c79b162c05019 100644 +index 0b8499aa3b00d72e8598f0bbdfe14cc559055d9b..7cac8e43bda2de490aa5bfc17dcc5f575425c4cd 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc @@ -39,7 +39,6 @@ @@ -143,7 +143,7 @@ index 01c10e95f31595d8e9e40d6fdcc75bd66b75efe8..8377944c3253b546dbb743a1053c79b1 // Describes a rule for blocking a directory, which can be constructed // dynamically (based on state) or statically (from kBlockedPaths). diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h -index 62cbdc561d99e87feecc6f204ece7d1b8fcdee59..98d1ce1d2f4c2443cde417911249f10027f6eb0e 100644 +index d48fd46095400bf5eeaa874eaa5d8e6f05b4e7da..7789be00bbc503d8278e38fcb1e7feebac9ff325 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h @@ -17,12 +17,13 @@ @@ -171,9 +171,9 @@ index 62cbdc561d99e87feecc6f204ece7d1b8fcdee59..98d1ce1d2f4c2443cde417911249f100 #include "chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.h" #include "components/enterprise/common/files_scan_data.h" #endif -@@ -334,6 +336,119 @@ class ChromeFileSystemAccessPermissionContext - // chrome://settings/content/filesystem UI. - static constexpr char kPermissionPathKey[] = "path"; +@@ -337,6 +339,119 @@ class ChromeFileSystemAccessPermissionContext + // KeyedService: + void Shutdown() override; + // Sentinel used to indicate that no PathService key is specified for a path in + // the struct below. @@ -291,7 +291,7 @@ index 62cbdc561d99e87feecc6f204ece7d1b8fcdee59..98d1ce1d2f4c2443cde417911249f100 protected: SEQUENCE_CHECKER(sequence_checker_); -@@ -353,7 +468,7 @@ class ChromeFileSystemAccessPermissionContext +@@ -356,7 +471,7 @@ class ChromeFileSystemAccessPermissionContext void PermissionGrantDestroyed(PermissionGrantImpl* grant); diff --git a/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch b/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch index bc2b60dfcd8c..f3247884abe1 100644 --- a/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch +++ b/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch @@ -7,10 +7,10 @@ Subject: refactor: expose HostImportModuleDynamically and This is so that Electron can blend Blink's and Node's implementations of these isolate handlers. diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -index 9d584cb0d0741ad8ce41f638aed90d2bfaf116ed..7bb28b4b7b1b47ff66caa67a6813aa78839cd403 100644 +index c17479e167de17b4ed02be7934a7c3ac7a020ed1..a1d5426f62f24395a7304dce7b040755e7f7b941 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -@@ -628,7 +628,9 @@ bool JavaScriptCompileHintsMagicEnabledCallback( +@@ -609,7 +609,9 @@ bool WasmJSPromiseIntegrationEnabledCallback(v8::Local context) { execution_context); } @@ -21,7 +21,7 @@ index 9d584cb0d0741ad8ce41f638aed90d2bfaf116ed..7bb28b4b7b1b47ff66caa67a6813aa78 v8::Local context, v8::Local v8_host_defined_options, v8::Local v8_referrer_resource_url, -@@ -706,7 +708,7 @@ v8::MaybeLocal HostImportModuleDynamically( +@@ -687,7 +689,7 @@ v8::MaybeLocal HostImportModuleDynamically( } // https://html.spec.whatwg.org/C/#hostgetimportmetaproperties @@ -30,7 +30,7 @@ index 9d584cb0d0741ad8ce41f638aed90d2bfaf116ed..7bb28b4b7b1b47ff66caa67a6813aa78 v8::Local module, v8::Local meta) { v8::Isolate* isolate = context->GetIsolate(); -@@ -749,9 +751,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) { +@@ -730,9 +732,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) { return os; } @@ -40,10 +40,10 @@ index 9d584cb0d0741ad8ce41f638aed90d2bfaf116ed..7bb28b4b7b1b47ff66caa67a6813aa78 void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { // Set up garbage collection before setting up anything else as V8 may trigger // GCs during Blink setup. -@@ -773,9 +772,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { +@@ -752,9 +751,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { + isolate->SetWasmJSPIEnabledCallback(WasmJSPromiseIntegrationEnabledCallback); + isolate->SetSharedArrayBufferConstructorEnabledCallback( SharedArrayBufferConstructorEnabledCallback); - isolate->SetJavaScriptCompileHintsMagicEnabledCallback( - JavaScriptCompileHintsMagicEnabledCallback); - isolate->SetHostImportModuleDynamicallyCallback(HostImportModuleDynamically); + isolate->SetHostImportModuleDynamicallyCallback(V8Initializer::HostImportModuleDynamically); isolate->SetHostInitializeImportMetaObjectCallback( diff --git a/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch b/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch index d585cbab2ff0..cd5841216ea4 100644 --- a/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch +++ b/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch @@ -12,7 +12,7 @@ should be removed as soon as those have been updated. Patching because every instance is a FTBFS that prevents testing any one instance's fix. diff --git a/base/functional/callback_helpers.h b/base/functional/callback_helpers.h -index d7444427588f85d27399442d8d6e4acee581392d..c8cc6c186a27078f26f4f8a417a7f2fe0c0303c4 100644 +index a491f22076c16addeb4aa5ad21678164fc979991..ef50f9d2c5681d7d88cd9c07b07baa52fe338d09 100644 --- a/base/functional/callback_helpers.h +++ b/base/functional/callback_helpers.h @@ -100,6 +100,22 @@ RepeatingCallback ForwardRepeatingCallbacks( 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 c04172ee0e51..e8d3c140bb29 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 30a7e6a641e7b17a47fb5c66fb44d3d5899b9e78..85764a533585df0abe398758e4fd510c +#endif } diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc -index 12b649c4fcc23318b68f3d66076d34f95fd6b07d..6e2d839eb0e7ec1aa260f41904f78b1b2a2cbf73 100644 +index a4e6a26e6ce757092771b747be76135deb84cf4a..8444b1666261e46d1509e1941a6ba5cb10c91edd 100644 --- a/chrome/browser/profiles/profile_selections.cc +++ b/chrome/browser/profiles/profile_selections.cc -@@ -120,6 +120,7 @@ Profile* ProfileSelections::ApplyProfileSelection(Profile* profile) const { +@@ -123,6 +123,7 @@ Profile* ProfileSelections::ApplyProfileSelection(Profile* profile) const { ProfileSelection ProfileSelections::GetProfileSelection( Profile* profile) const { @@ -34,7 +34,7 @@ index 12b649c4fcc23318b68f3d66076d34f95fd6b07d..6e2d839eb0e7ec1aa260f41904f78b1b #if BUILDFLAG(IS_CHROMEOS_ASH) // This check has to be performed before the check on // `profile->IsRegularProfile()` because profiles that are internal ASH -@@ -155,6 +156,7 @@ ProfileSelection ProfileSelections::GetProfileSelection( +@@ -148,6 +149,7 @@ ProfileSelection ProfileSelections::GetProfileSelection( } NOTREACHED_IN_MIGRATION(); diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index 93ceffcc6fec..4a1d4be3fecf 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -8,7 +8,7 @@ respond to the first mouse click in their window, which is desirable for some kinds of utility windows. Similarly for `disableAutoHideCursor`. diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index a14c65728ec516e437015d66f56eabaa05bf2376..05dbd641ea4af9276be7f89627e4075153e667a9 100644 +index 4a476b69cf6b77147bb777a19416ff3b90f7d4b8..00493dc6c3f0229438b440a6fb2438ca668aba6b 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 @@ -169,6 +169,15 @@ void ExtractUnderlines(NSAttributedString* string, @@ -48,7 +48,7 @@ index a14c65728ec516e437015d66f56eabaa05bf2376..05dbd641ea4af9276be7f89627e40751 if (view == self) hitSelf = YES; if ([view isKindOfClass:[self class]] && ![view isEqual:self] && -@@ -1188,6 +1204,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -1183,6 +1199,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { eventType == NSEventTypeKeyDown && !(modifierFlags & NSEventModifierFlagCommand); diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 60037366df50..c4edc8649caf 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 6c30be7b0b41575035cc23f1dc585b10e89fb9d2..a1dbb6af74046225e9dc46f72eca9feb164bf453 100644 +index a8c87a5d595af314ff9592b5795346b6859ff60b..7ef8050aa89bb4132680c6d00d5d6ab3ecfdc713 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1557,7 +1557,7 @@ if (is_chrome_branded && !is_android) { +@@ -1567,7 +1567,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 6c30be7b0b41575035cc23f1dc585b10e89fb9d2..a1dbb6af74046225e9dc46f72eca9feb chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1596,6 +1596,12 @@ if (!is_android) { +@@ -1606,6 +1606,12 @@ if (!is_android) { } } diff --git a/patches/chromium/revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch b/patches/chromium/revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch index 576cdd196738..bf16c5bfec95 100644 --- a/patches/chromium/revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch +++ b/patches/chromium/revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch @@ -6,10 +6,10 @@ Subject: Revert "Remove the AllowAggressiveThrottlingWithWebSocket feature." This reverts commit 615c1810a187840ffeb04096087efff86edb37de. diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc -index e9c5df9cec4cc7d15285843098b858320de72a3a..4a9045b59475577eac62a4ce99d18fac0d5b7195 100644 +index 4da9f69469dc57788a252757602ea5f18451c502..300531e6cf3c94744fda547244cef4bb8a98c96c 100644 --- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc +++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc -@@ -98,6 +98,17 @@ enum WebSocketOpCode { +@@ -103,6 +103,17 @@ enum WebSocketOpCode { kOpCodeBinary = 0x2, }; @@ -27,7 +27,7 @@ index e9c5df9cec4cc7d15285843098b858320de72a3a..4a9045b59475577eac62a4ce99d18fac } // namespace void WebSocketChannelImpl::MessageDataDeleter::operator()(char* p) const { -@@ -288,7 +299,10 @@ bool WebSocketChannelImpl::Connect(const KURL& url, const String& protocol) { +@@ -293,7 +304,10 @@ bool WebSocketChannelImpl::Connect(const KURL& url, const String& protocol) { // even if the `WebSocketChannel` is closed. feature_handle_for_scheduler_ = scheduler->RegisterFeature( SchedulingPolicy::Feature::kWebSocket, diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index b8ae39388c38..a3c9e0c5743e 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 7d5aafaa074e62dca4a5981bc00c9ff721a8eb54..74e5a44a7f93c82d4d1fff4b7cab1123f2ad10a4 100644 +index f2b7b6d436431bc5b6c847621e86ef6223380d29..45e029e33291c70fdf46939326bb212cfcdc0927 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1273,7 +1273,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1276,7 +1276,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 8ea6d5a00865..c56a515a7396 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it does touch a security-sensitive class. diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index a25d966c3395d89c9a1533356de19a3d6fa5279b..f3f70ca3a47414f18d56070d60b288e38bbb265b 100644 +index f8e2b5c2f270b9ed6e8ceda213decb0d81d56a41..03c7c523920d8670bad599dde8e9075f31603c19 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1602,9 +1602,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1604,9 +1604,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( *cmd_line, IsPdf(), /*is_jit_disabled=*/IsPdf()); @@ -42,7 +42,7 @@ index a25d966c3395d89c9a1533356de19a3d6fa5279b..f3f70ca3a47414f18d56070d60b288e3 auto tracing_config_memory_region = 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 01c5da99e5bd8dd9d38e5cec9ad4f953e8167cbe..2005dc7c90d1851f9368a7ef3231f4cca52fafca 100644 +index 2c724b73a55fa21154ff8cedd41d3ca5738dfa76..b3f5973a4b686542d46d8338722f5fe42c86c529 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc @@ -35,6 +35,9 @@ namespace content { @@ -55,7 +55,7 @@ index 01c5da99e5bd8dd9d38e5cec9ad4f953e8167cbe..2005dc7c90d1851f9368a7ef3231f4cc const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); base::CommandLine::StringType renderer_prefix = -@@ -69,6 +72,9 @@ RendererSandboxedProcessLauncherDelegateWin:: +@@ -70,6 +73,9 @@ RendererSandboxedProcessLauncherDelegateWin:: is_pdf_renderer_(is_pdf_renderer) { // PDF renderers must be jitless. CHECK(!is_pdf_renderer || is_jit_disabled); diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 2067fbec0ac7..d8e0a0cd8c11 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 0be9691ccde0ffcbe89bd039ae7f55403344cb73..3a120f4682e8f2e7e83d00e16f3b5f66fb1fb1b4 100644 +index 7e252a7017b3f6905627b6b8cd203dc2d9baf00b..9aec4dceabb169338e800c1eacdb98fa7817b81c 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3658,6 +3658,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3586,6 +3586,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 0be9691ccde0ffcbe89bd039ae7f55403344cb73..3a120f4682e8f2e7e83d00e16f3b5f66 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3668,6 +3675,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3596,6 +3603,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index c1fe079c1fee..ef2af1310f07 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -15,10 +15,10 @@ Note that we also need to manually update embedder's `api::WebContents::IsFullscreenForTabOrPending` value. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 5873720454adfb5c4ab92c7748f9a2658a24c33f..5025c67e50aa0540a0fb8f39c83f37e406586ef1 100644 +index a068a5c37ea84cd37b7842a2f9e6b647af29b211..b428b8fa0ff0565c8f42c2b9949c90a38d1e5813 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -7737,6 +7737,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -7963,6 +7963,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } @@ -37,10 +37,10 @@ index 5873720454adfb5c4ab92c7748f9a2658a24c33f..5025c67e50aa0540a0fb8f39c83f37e4 if (had_fullscreen_token && !GetView()->HasFocus()) GetView()->Focus(); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 3a120f4682e8f2e7e83d00e16f3b5f66fb1fb1b4..aa4a8225fc15aaa9e5315f98006ad8772d33ec1d 100644 +index 9aec4dceabb169338e800c1eacdb98fa7817b81c..ded73c5a5b127c16b7116612f9e4a84464be2b90 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3913,21 +3913,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( +@@ -3841,21 +3841,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( const input::NativeWebKeyboardEvent& event) { OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"), "WebContentsImpl::PreHandleKeyboardEvent"); @@ -78,7 +78,7 @@ index 3a120f4682e8f2e7e83d00e16f3b5f66fb1fb1b4..aa4a8225fc15aaa9e5315f98006ad877 } bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { -@@ -4085,7 +4089,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -4013,7 +4017,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame)); DCHECK(requesting_frame->IsActive()); @@ -88,10 +88,10 @@ index 3a120f4682e8f2e7e83d00e16f3b5f66fb1fb1b4..aa4a8225fc15aaa9e5315f98006ad877 features::kAutomaticFullscreenContentSetting)) { // Ensure the window is made active to take input focus. The user may have diff --git a/third_party/blink/renderer/core/fullscreen/fullscreen.cc b/third_party/blink/renderer/core/fullscreen/fullscreen.cc -index 5cb222aa469134e03af008f52e5e95fd5e2e2053..1b5fe8416277addbd3ef769f15ae0e1812f7c9f4 100644 +index 3064ff21ba772923b590130e786c834c00c37126..a58ab54701989644e64758b675af311d4c5b9705 100644 --- a/third_party/blink/renderer/core/fullscreen/fullscreen.cc +++ b/third_party/blink/renderer/core/fullscreen/fullscreen.cc -@@ -112,7 +112,7 @@ void FullscreenElementChanged(Document& document, +@@ -109,7 +109,7 @@ void FullscreenElementChanged(Document& document, // is the iframe element for the out-of-process frame that contains the // fullscreen element. Hence, it must match :-webkit-full-screen-ancestor. if (new_request_type & FullscreenRequestType::kForCrossProcessDescendant) { diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 68b5d0e11589..b079e06dcf0d 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected: https://chromium-review.googlesource.com/c/chromium/src/+/1954347 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 7f934695ad22e27a02aba16a5ec1b0d99b03a603..5e99d69adde3cb32e588d94bef84ed2ff7ab9334 100644 +index dd8f6b9a87a0cc5d2b1ba4867a4cc35ab961a3a2..ef247e62733ebe5058803a4c2a8866af300ba16c 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -401,6 +401,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -403,6 +403,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,10 +26,10 @@ index 7f934695ad22e27a02aba16a5ec1b0d99b03a603..5e99d69adde3cb32e588d94bef84ed2f // 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 23a15a223206a2e99bd0ee7711e9592e3749fe7c..d0cc959bb3a2bacf43d4acff26df9582055efa61 100644 +index 06000a2c90989be3d58fcdd92237201ae199e6c9..4907d047aecb64ca36304881ded73c018fb89a00 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -871,6 +871,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -875,6 +875,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index 23a15a223206a2e99bd0ee7711e9592e3749fe7c..d0cc959bb3a2bacf43d4acff26df9582 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 3ad3a20d1c4802c5511750170bc1883d325fb4f2..7e8e2445fb3f85920b5524f63e0cf29b9041b1b5 100644 +index 75504bfc89cbe83828db7730e6e6ce2ad8c2b2a7..45af12ddbf7dd3ab5c82d810e330fd008b567448 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -192,6 +192,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -193,6 +193,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 3ad3a20d1c4802c5511750170bc1883d325fb4f2..7e8e2445fb3f85920b5524f63e0cf29b 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 0cf3f6df20704cabc731e73409d6999f6d1c3420..64a0cc94c97c5e98a2072ddc3bff3d521a779e6f 100644 +index 848edcdaf3a0169be0904e2fe081adb42d4b4242..73d35d10eeec0ba1851d186bcb13b65a97af2630 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -653,6 +653,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -656,6 +656,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch index dd799e293e14..8e9dab9c37dd 100644 --- a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch +++ b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch @@ -19,10 +19,10 @@ that clearly establishes the worker script is ready for evaluation with the scop initialized. diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 5e99d69adde3cb32e588d94bef84ed2ff7ab9334..f3ecba82c33a27e0a0b8e28948880154f076dac7 100644 +index ef247e62733ebe5058803a4c2a8866af300ba16c..f020fb016cce18b480c86b53e4cbedf418637567 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -401,6 +401,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -403,6 +403,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -35,10 +35,10 @@ index 5e99d69adde3cb32e588d94bef84ed2ff7ab9334..f3ecba82c33a27e0a0b8e28948880154 // 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 d0cc959bb3a2bacf43d4acff26df9582055efa61..9269bd0a139304467c295984aacefd6e5d19f98f 100644 +index 4907d047aecb64ca36304881ded73c018fb89a00..babd21dc19ee329694d93c99c025822bca30ee6b 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -883,6 +883,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -887,6 +887,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index d0cc959bb3a2bacf43d4acff26df9582055efa61..9269bd0a139304467c295984aacefd6e 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 7e8e2445fb3f85920b5524f63e0cf29b9041b1b5..f12644eabd967876fcc09575aa19870bd267e83d 100644 +index 45af12ddbf7dd3ab5c82d810e330fd008b567448..1e4d14dac6398f3b81149d58ba13c021e7d0faff 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -192,6 +192,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -193,6 +193,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 7e8e2445fb3f85920b5524f63e0cf29b9041b1b5..f12644eabd967876fcc09575aa19870b 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 64a0cc94c97c5e98a2072ddc3bff3d521a779e6f..bc61d4f42152289e6f10828c210bb1ce9f4952a0 100644 +index 73d35d10eeec0ba1851d186bcb13b65a97af2630..bc503c4f89afd0036b5b7986d28502742893e44c 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -653,6 +653,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -656,6 +656,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch b/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch index d0e99dd58c36..a39c8d23d00d 100644 --- a/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch +++ b/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch @@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer patching legacy devtools code. diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts -index 834c4641adbfd2ddcff8979a1f3fc93316706fb4..e4e8223e1cd1147076f989d53c04e18c185a83ad 100644 +index b999c155769da744b8971526cd66c9b052ce80ce..993b79e31e69807ed4311e75c0c04dc8ec438496 100644 --- a/front_end/entrypoints/main/MainImpl.ts +++ b/front_end/entrypoints/main/MainImpl.ts -@@ -728,6 +728,8 @@ export class MainImpl { +@@ -740,6 +740,8 @@ export class MainImpl { globalThis.Main = globalThis.Main || {}; // @ts-ignore Exported for Tests.js globalThis.Main.Main = MainImpl; diff --git a/patches/v8/.patches b/patches/v8/.patches index 280a34b93603..886a2ec1a311 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -1,2 +1,3 @@ chore_allow_customizing_microtask_policy_per_context.patch deps_add_v8_object_setinternalfieldfornodecore.patch +fix_disable_scope_reuse_associated_dchecks.patch diff --git a/patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch b/patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch index b49ee233a757..ca93b3b9623f 100644 --- a/patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch +++ b/patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch @@ -11,7 +11,7 @@ This is a non-ABI breaking solution added by Node.js in v20.x for: which are necessary for backporting the vm-related memory fixes in https://github.com/nodejs/node/pull/48510. diff --git a/include/v8-object.h b/include/v8-object.h -index 170429bf163b02963c0d59de4cd2b19bedf2e54a..c131d78dc92a37b92ef4608f8954bff4b8884a77 100644 +index d03b33acd7c83ef1e683e2ddc4eb6c1ecafd83b3..626425af0b121e3489e7ac8171af64b1c7a25f55 100644 --- a/include/v8-object.h +++ b/include/v8-object.h @@ -22,6 +22,8 @@ class Function; @@ -23,7 +23,7 @@ index 170429bf163b02963c0d59de4cd2b19bedf2e54a..c131d78dc92a37b92ef4608f8954bff4 /** * A private symbol -@@ -526,6 +528,21 @@ class V8_EXPORT Object : public Value { +@@ -532,6 +534,21 @@ class V8_EXPORT Object : public Value { index); } @@ -46,10 +46,10 @@ index 170429bf163b02963c0d59de4cd2b19bedf2e54a..c131d78dc92a37b92ef4608f8954bff4 V8_INLINE static void* GetAlignedPointerFromInternalField( const BasicTracedReference& object, int index) { diff --git a/src/api/api.cc b/src/api/api.cc -index 5335cca0c84817b20b5e92e11a72e9c528bc5106..368171cdca1b3550c60fc4a12f916057d7140990 100644 +index f8d3c5aa1231f4b62a614bc0c705366d922b4c75..88118ae452275ff2a515c5efbad4f6ecb3629abd 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -6284,14 +6284,33 @@ Local v8::Object::SlowGetInternalField(int index) { +@@ -6372,14 +6372,33 @@ Local v8::Object::SlowGetInternalField(int index) { isolate); } diff --git a/patches/v8/fix_disable_scope_reuse_associated_dchecks.patch b/patches/v8/fix_disable_scope_reuse_associated_dchecks.patch new file mode 100644 index 000000000000..a09adb29be96 --- /dev/null +++ b/patches/v8/fix_disable_scope_reuse_associated_dchecks.patch @@ -0,0 +1,54 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Calvin Watford +Date: Wed, 17 Jul 2024 12:52:10 -0600 +Subject: fix: disable scope reuse & associated dchecks + +This change was introduced in https://crrev.com/c/5630974 which reuses +scope info objects across allocations. Unfortunately, this change seems +to be not yet fully cooked and causes crashes with normal usage of V8. + +In particular, Node.js call's V8's `v8::ScriptCompiler::CompileFunction` +method. This ends up wrapping the source code in a function, which this +code is not yet prepared to handle. The generated function wrapper +(created by V8) has no source position, so it reports being at the start +of the source, which may overlap with other scopes that are in the +original source. This new feature adds a "UniqueIdInScript" concept that +is derived from the source position of a scope, along with the invariant +that inner scopes have a higher ID than outer scopes, which does not +hold for the above situation. + +This patch is not intended to remain indefinitely. Once the upstream +feature stabilizes, we can remove this patch. Unfortunately, there is no +public tracking bug for this feature nor the crashes its been causing, +so we'll have to keep an eye on this for the time being. + +diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc +index 530a249adde65a47c8e0babf5723b52b8d2a6b1a..fca49d135ad2f23307654e1b0c36e846ca5a6ec6 100644 +--- a/src/ast/scopes.cc ++++ b/src/ast/scopes.cc +@@ -2717,9 +2717,9 @@ void Scope::AllocateScopeInfosRecursively( + + // Allocate ScopeInfos for inner scopes. + for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) { +- DCHECK_GT(scope->UniqueIdInScript(), UniqueIdInScript()); +- DCHECK_IMPLIES(scope->sibling_, scope->sibling_->UniqueIdInScript() != +- scope->UniqueIdInScript()); ++ // DCHECK_GT(scope->UniqueIdInScript(), UniqueIdInScript()); ++ // DCHECK_IMPLIES(scope->sibling_, scope->sibling_->UniqueIdInScript() != ++ // scope->UniqueIdInScript()); + if (!scope->is_function_scope() || + scope->AsDeclarationScope()->ShouldEagerCompile()) { + scope->AllocateScopeInfosRecursively(isolate, next_outer_scope, +diff --git a/src/flags/flag-definitions.h b/src/flags/flag-definitions.h +index 657ac0ebd872d6be4e2fa962a17259dd96f047b7..8e413913048d20b57bdd40807bfa4365e9d9ec77 100644 +--- a/src/flags/flag-definitions.h ++++ b/src/flags/flag-definitions.h +@@ -993,6 +993,8 @@ DEFINE_BOOL(trace_track_allocation_sites, false, + DEFINE_BOOL(trace_migration, false, "trace object migration") + DEFINE_BOOL(trace_generalization, false, "trace map generalization") + ++// ELECTRON: The following flag should remain false by default until we can ++// remove `fix_disable_scope_reuse_associated_dchecks.patch` + DEFINE_BOOL(reuse_scope_infos, false, + "reuse scope infos from previous compiles") + diff --git a/shell/app/electron_content_client.h b/shell/app/electron_content_client.h index 25074537ab7b..a6f203a29b94 100644 --- a/shell/app/electron_content_client.h +++ b/shell/app/electron_content_client.h @@ -8,6 +8,7 @@ #include #include "base/files/file_path.h" +#include "base/strings/string_piece.h" #include "content/public/common/content_client.h" namespace electron { diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 59a25af90012..1e1a5da2f70d 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -731,6 +731,7 @@ void App::AllowCertificateError( base::OnceClosure App::SelectClientCertificate( content::BrowserContext* browser_context, + int process_id, content::WebContents* web_contents, net::SSLCertRequestInfo* cert_request_info, net::ClientCertIdentityList identities, diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index f03fc96d855f..10bb09985ecf 100644 --- a/shell/browser/api/electron_api_app.h +++ b/shell/browser/api/electron_api_app.h @@ -132,6 +132,7 @@ class App : public ElectronBrowserClient::Delegate, override; base::OnceClosure SelectClientCertificate( content::BrowserContext* browser_context, + int process_id, content::WebContents* web_contents, net::SSLCertRequestInfo* cert_request_info, net::ClientCertIdentityList identities, diff --git a/shell/browser/api/electron_api_debugger.cc b/shell/browser/api/electron_api_debugger.cc index fddd8dd36e06..11369fa66b76 100755 --- a/shell/browser/api/electron_api_debugger.cc +++ b/shell/browser/api/electron_api_debugger.cc @@ -9,6 +9,7 @@ #include "base/json/json_reader.h" #include "base/json/json_writer.h" +#include "base/strings/string_piece.h" #include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/web_contents.h" #include "gin/object_template_builder.h" diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index bf9f51d7a319..ecdd929a2450 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1337,7 +1337,7 @@ void WebContents::UpdateExclusiveAccessBubble( void WebContents::OnExclusiveAccessUserInput() {} -content::WebContents* WebContents::GetActiveWebContents() { +content::WebContents* WebContents::GetWebContentsForExclusiveAccess() { return web_contents(); } diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index c1321d1b314b..8f7956f20e67 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -722,7 +722,7 @@ class WebContents : public ExclusiveAccessContext, const ExclusiveAccessBubbleParams& params, ExclusiveAccessBubbleHideCallback bubble_first_hide_callback) override; void OnExclusiveAccessUserInput() override; - content::WebContents* GetActiveWebContents() override; + content::WebContents* GetWebContentsForExclusiveAccess() override; bool CanUserExitFullscreen() const override; bool IsExclusiveAccessBubbleDisplayed() const override; diff --git a/shell/browser/browser_process_impl.cc b/shell/browser/browser_process_impl.cc index 727bacccccfa..c27d9afb75a7 100644 --- a/shell/browser/browser_process_impl.cc +++ b/shell/browser/browser_process_impl.cc @@ -93,6 +93,11 @@ BuildState* BrowserProcessImpl::GetBuildState() { return nullptr; } +GlobalDesktopFeatures* BrowserProcessImpl::GetDesktopFeatures() { + NOTIMPLEMENTED(); + return nullptr; +} + void BrowserProcessImpl::PostEarlyInitialization() { PrefServiceFactory prefs_factory; auto pref_registry = base::MakeRefCounted(); diff --git a/shell/browser/browser_process_impl.h b/shell/browser/browser_process_impl.h index fc02158f28b6..6c136d0ad52d 100644 --- a/shell/browser/browser_process_impl.h +++ b/shell/browser/browser_process_impl.h @@ -68,6 +68,7 @@ class BrowserProcessImpl : public BrowserProcess { // BrowserProcess BuildState* GetBuildState() override; + GlobalDesktopFeatures* GetDesktopFeatures() override; void EndSession() override {} void FlushLocalStateAndReply(base::OnceClosure reply) override {} bool IsShuttingDown() override; diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index f713437fabd2..8e28587a58f8 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -613,6 +613,7 @@ void ElectronBrowserClient::AllowCertificateError( base::OnceClosure ElectronBrowserClient::SelectClientCertificate( content::BrowserContext* browser_context, + int process_id, content::WebContents* web_contents, net::SSLCertRequestInfo* cert_request_info, net::ClientCertIdentityList client_certs, @@ -621,7 +622,7 @@ base::OnceClosure ElectronBrowserClient::SelectClientCertificate( delegate->ContinueWithCertificate(nullptr, nullptr); } else if (delegate_) { delegate_->SelectClientCertificate( - browser_context, web_contents, cert_request_info, + browser_context, process_id, web_contents, cert_request_info, std::move(client_certs), std::move(delegate)); } @@ -1356,6 +1357,7 @@ ElectronBrowserClient::WillCreateURLLoaderRequestInterceptors( content::NavigationUIData* navigation_ui_data, int frame_tree_node_id, int64_t navigation_id, + bool force_no_https_upgrade, scoped_refptr navigation_response_task_runner) { std::vector> interceptors; diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index 24eb34621bf2..e1e69adeef57 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -14,6 +14,7 @@ #include "base/containers/flat_set.h" #include "base/files/file_path.h" #include "base/memory/raw_ptr.h" +#include "base/strings/string_piece.h" #include "base/synchronization/lock.h" #include "content/public/browser/content_browser_client.h" #include "content/public/browser/render_process_host_observer.h" @@ -144,6 +145,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient, override; base::OnceClosure SelectClientCertificate( content::BrowserContext* browser_context, + int process_id, content::WebContents* web_contents, net::SSLCertRequestInfo* cert_request_info, net::ClientCertIdentityList client_certs, @@ -239,6 +241,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient, content::NavigationUIData* navigation_ui_data, int frame_tree_node_id, int64_t navigation_id, + bool force_no_https_upgrade, scoped_refptr navigation_response_task_runner) override; bool ShouldTreatURLSchemeAsFirstPartyWhenTopLevel( diff --git a/shell/browser/electron_download_manager_delegate.cc b/shell/browser/electron_download_manager_delegate.cc index 0c20db786b4b..0829d3920e3f 100644 --- a/shell/browser/electron_download_manager_delegate.cc +++ b/shell/browser/electron_download_manager_delegate.cc @@ -10,6 +10,7 @@ #include "base/files/file_util.h" #include "base/functional/bind.h" +#include "base/strings/string_piece.h" #include "base/task/thread_pool.h" #include "base/threading/thread_restrictions.h" #include "chrome/common/pref_names.h" diff --git a/shell/browser/extensions/api/management/electron_management_api_delegate.cc b/shell/browser/extensions/api/management/electron_management_api_delegate.cc index 6e20758ab91b..2dc842cad6d6 100644 --- a/shell/browser/extensions/api/management/electron_management_api_delegate.cc +++ b/shell/browser/extensions/api/management/electron_management_api_delegate.cc @@ -218,3 +218,9 @@ GURL ElectronManagementAPIDelegate::GetEffectiveUpdateURL( // TODO(codebytere): we do not currently support ExtensionManagement. return GURL::EmptyGURL(); } + +void ElectronManagementAPIDelegate::ShowMv2DeprecationReEnableDialog( + content::BrowserContext* context, + content::WebContents* web_contents, + const extensions::Extension& extension, + base::OnceCallback done_callback) const {} diff --git a/shell/browser/extensions/api/management/electron_management_api_delegate.h b/shell/browser/extensions/api/management/electron_management_api_delegate.h index ce94ef3d26af..65030697ce01 100644 --- a/shell/browser/extensions/api/management/electron_management_api_delegate.h +++ b/shell/browser/extensions/api/management/electron_management_api_delegate.h @@ -73,6 +73,11 @@ class ElectronManagementAPIDelegate : public extensions::ManagementAPIDelegate { bool grayscale) const override; GURL GetEffectiveUpdateURL(const extensions::Extension& extension, content::BrowserContext* context) const override; + void ShowMv2DeprecationReEnableDialog( + content::BrowserContext* context, + content::WebContents* web_contents, + const extensions::Extension& extension, + base::OnceCallback done_callback) const override; }; #endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_API_MANAGEMENT_ELECTRON_MANAGEMENT_API_DELEGATE_H_ diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index e972603b205d..e3d4e5338ad2 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/shell/browser/extensions/electron_extensions_browser_client.cc @@ -213,10 +213,11 @@ bool AllowCrossRendererResourceLoad( const extensions::Extension* extension, const extensions::ExtensionSet& extensions, const extensions::ProcessMap& process_map, + const GURL& upstream_url, bool* allowed) { if (extensions::url_request_util::AllowCrossRendererResourceLoad( request, destination, page_transition, child_id, is_incognito, - extension, extensions, process_map, allowed)) { + extension, extensions, process_map, upstream_url, allowed)) { return true; } @@ -242,11 +243,12 @@ bool ElectronExtensionsBrowserClient::AllowCrossRendererResourceLoad( bool is_incognito, const extensions::Extension* extension, const extensions::ExtensionSet& extensions, - const extensions::ProcessMap& process_map) { + const extensions::ProcessMap& process_map, + const GURL& upstream_url) { bool allowed = false; if (::electron::AllowCrossRendererResourceLoad( request, destination, page_transition, child_id, is_incognito, - extension, extensions, process_map, &allowed)) { + extension, extensions, process_map, upstream_url, &allowed)) { return allowed; } diff --git a/shell/browser/extensions/electron_extensions_browser_client.h b/shell/browser/extensions/electron_extensions_browser_client.h index 135d348a2749..89a29ce4680c 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.h +++ b/shell/browser/extensions/electron_extensions_browser_client.h @@ -93,7 +93,8 @@ class ElectronExtensionsBrowserClient bool is_incognito, const extensions::Extension* extension, const extensions::ExtensionSet& extensions, - const extensions::ProcessMap& process_map) override; + const extensions::ProcessMap& process_map, + const GURL& upstream_url) override; PrefService* GetPrefServiceForContext( content::BrowserContext* context) override; void GetEarlyExtensionPrefsObservers( diff --git a/shell/browser/file_select_helper.cc b/shell/browser/file_select_helper.cc index 154886c75133..fc80a64fbde1 100644 --- a/shell/browser/file_select_helper.cc +++ b/shell/browser/file_select_helper.cc @@ -77,8 +77,7 @@ FileSelectHelper::~FileSelectHelper() { } void FileSelectHelper::FileSelected(const ui::SelectedFileInfo& file, - int index, - void* params) { + int index) { if (!render_frame_host_) { RunFileChooserEnd(); return; @@ -93,12 +92,11 @@ void FileSelectHelper::FileSelected(const ui::SelectedFileInfo& file, std::vector files; files.push_back(file); - MultiFilesSelected(files, params); + MultiFilesSelected(files); } void FileSelectHelper::MultiFilesSelected( - const std::vector& files, - void* params) { + const std::vector& files) { #if BUILDFLAG(IS_MAC) base::ThreadPool::PostTask( FROM_HERE, @@ -109,7 +107,7 @@ void FileSelectHelper::MultiFilesSelected( #endif // BUILDFLAG(IS_MAC) } -void FileSelectHelper::FileSelectionCanceled(void* params) { +void FileSelectHelper::FileSelectionCanceled() { RunFileChooserEnd(); } @@ -150,7 +148,7 @@ void FileSelectHelper::OnListDone(int error) { std::unique_ptr entry = std::move(directory_enumeration_); if (error) { - FileSelectionCanceled(nullptr); + FileSelectionCanceled(); return; } diff --git a/shell/browser/file_select_helper.h b/shell/browser/file_select_helper.h index c5604b521bae..0035c68cfe47 100644 --- a/shell/browser/file_select_helper.h +++ b/shell/browser/file_select_helper.h @@ -82,12 +82,10 @@ class FileSelectHelper : public base::RefCountedThreadSafe< void RunFileChooserEnd(); // SelectFileDialog::Listener overrides. - void FileSelected(const ui::SelectedFileInfo& file, - int index, - void* params) override; - void MultiFilesSelected(const std::vector& files, - void* params) override; - void FileSelectionCanceled(void* params) override; + void FileSelected(const ui::SelectedFileInfo& file, int index) override; + void MultiFilesSelected( + const std::vector& files) override; + void FileSelectionCanceled() override; // content::WebContentsObserver overrides. void RenderFrameHostChanged(content::RenderFrameHost* old_host, diff --git a/shell/browser/hid/electron_hid_delegate.cc b/shell/browser/hid/electron_hid_delegate.cc index 35f0cf115ec9..017a95b8cc6e 100644 --- a/shell/browser/hid/electron_hid_delegate.cc +++ b/shell/browser/hid/electron_hid_delegate.cc @@ -211,9 +211,7 @@ bool ElectronHidDelegate::IsServiceWorkerAllowedForOrigin( #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) // WebHID is only available on extension service workers with feature flag // enabled for now. - if (base::FeatureList::IsEnabled( - features::kEnableWebHidOnExtensionServiceWorker) && - origin.scheme() == extensions::kExtensionScheme) + if (origin.scheme() == extensions::kExtensionScheme) return true; #endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) return false; diff --git a/shell/browser/hid/hid_chooser_context_factory.cc b/shell/browser/hid/hid_chooser_context_factory.cc index cec317b2714b..74982208ca88 100644 --- a/shell/browser/hid/hid_chooser_context_factory.cc +++ b/shell/browser/hid/hid_chooser_context_factory.cc @@ -49,7 +49,4 @@ content::BrowserContext* HidChooserContextFactory::GetBrowserContextToUse( return context; } -void HidChooserContextFactory::BrowserContextShutdown( - content::BrowserContext* context) {} - } // namespace electron diff --git a/shell/browser/hid/hid_chooser_context_factory.h b/shell/browser/hid/hid_chooser_context_factory.h index 14f444da6d5c..26ea0d0e67d5 100644 --- a/shell/browser/hid/hid_chooser_context_factory.h +++ b/shell/browser/hid/hid_chooser_context_factory.h @@ -30,12 +30,11 @@ class HidChooserContextFactory : public BrowserContextKeyedServiceFactory { HidChooserContextFactory(); ~HidChooserContextFactory() override; - // BrowserContextKeyedBaseFactory: + // BrowserContextKeyedServiceFactory: KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - void BrowserContextShutdown(content::BrowserContext* context) override; }; } // namespace electron diff --git a/shell/browser/net/asar/asar_url_loader.cc b/shell/browser/net/asar/asar_url_loader.cc index a32e52e9d67c..d13dc55c7d70 100644 --- a/shell/browser/net/asar/asar_url_loader.cc +++ b/shell/browser/net/asar/asar_url_loader.cc @@ -10,6 +10,7 @@ #include #include +#include "base/strings/string_piece.h" #include "base/task/thread_pool.h" #include "content/public/browser/file_url_loader.h" #include "electron/fuses.h" diff --git a/shell/browser/net/url_pipe_loader.h b/shell/browser/net/url_pipe_loader.h index bb302084bd34..bfcc91a0e108 100644 --- a/shell/browser/net/url_pipe_loader.h +++ b/shell/browser/net/url_pipe_loader.h @@ -9,6 +9,7 @@ #include #include +#include "base/strings/string_piece.h" #include "base/values.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" diff --git a/shell/browser/serial/serial_chooser_context.cc b/shell/browser/serial/serial_chooser_context.cc index 30b52b09a39f..ec5ac12c7368 100644 --- a/shell/browser/serial/serial_chooser_context.cc +++ b/shell/browser/serial/serial_chooser_context.cc @@ -9,6 +9,7 @@ #include "base/base64.h" #include "base/containers/contains.h" +#include "base/strings/string_piece.h" #include "base/values.h" #include "content/public/browser/device_service.h" #include "content/public/browser/web_contents.h" diff --git a/shell/browser/ui/file_dialog_linux.cc b/shell/browser/ui/file_dialog_linux.cc index 66f39b5600ea..5efe45eb7063 100644 --- a/shell/browser/ui/file_dialog_linux.cc +++ b/shell/browser/ui/file_dialog_linux.cc @@ -64,28 +64,11 @@ class FileChooserDialog : public ui::SelectFileDialog::Listener { ~FileChooserDialog() override = default; - ui::SelectFileDialogLinux::ExtraSettings GetExtraSettings( - const DialogSettings& settings) { - ui::SelectFileDialogLinux::ExtraSettings extra; - extra.button_label = settings.button_label; - extra.show_overwrite_confirmation = - settings.properties & SAVE_DIALOG_SHOW_OVERWRITE_CONFIRMATION; - extra.allow_multiple_selection = - settings.properties & OPEN_DIALOG_MULTI_SELECTIONS; - if (type_ == DialogType::SAVE) { - extra.show_hidden = settings.properties & SAVE_DIALOG_SHOW_HIDDEN_FILES; - } else { - extra.show_hidden = settings.properties & OPEN_DIALOG_SHOW_HIDDEN_FILES; - } - - return extra; - } - void RunSaveDialogImpl(const DialogSettings& settings) { type_ = DialogType::SAVE; ui::SelectFileDialog::FileTypeInfo file_info = GetFilterInfo(settings.filters); - auto extra_settings = GetExtraSettings(settings); + ApplySettings(settings); dialog_->SelectFile( ui::SelectFileDialog::SELECT_SAVEAS_FILE, base::UTF8ToUTF16(settings.title), settings.default_path, @@ -93,7 +76,7 @@ class FileChooserDialog : public ui::SelectFileDialog::Listener { base::FilePath::StringType() /* default_extension */, settings.parent_window ? settings.parent_window->GetNativeWindow() : nullptr, - static_cast(&extra_settings)); + nullptr); } void RunSaveDialog(gin_helper::Promise promise, @@ -112,14 +95,14 @@ class FileChooserDialog : public ui::SelectFileDialog::Listener { type_ = DialogType::OPEN; ui::SelectFileDialog::FileTypeInfo file_info = GetFilterInfo(settings.filters); - auto extra_settings = GetExtraSettings(settings); + ApplySettings(settings); dialog_->SelectFile( GetDialogType(settings.properties), base::UTF8ToUTF16(settings.title), settings.default_path, &file_info, 0 /* file_type_index */, base::FilePath::StringType() /* default_extension */, settings.parent_window ? settings.parent_window->GetNativeWindow() : nullptr, - static_cast(&extra_settings)); + nullptr); } void RunOpenDialog(gin_helper::Promise promise, @@ -135,9 +118,7 @@ class FileChooserDialog : public ui::SelectFileDialog::Listener { } // ui::SelectFileDialog::Listener - void FileSelected(const ui::SelectedFileInfo& file, - int index, - void* params) override { + void FileSelected(const ui::SelectedFileInfo& file, int index) override { v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate(); v8::HandleScope scope(isolate); auto dict = gin_helper::Dictionary::CreateEmpty(isolate); @@ -157,8 +138,8 @@ class FileChooserDialog : public ui::SelectFileDialog::Listener { delete this; } - void MultiFilesSelected(const std::vector& files, - void* params) override { + void MultiFilesSelected( + const std::vector& files) override { v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate(); v8::HandleScope scope(isolate); auto dict = gin_helper::Dictionary::CreateEmpty(isolate); @@ -174,7 +155,7 @@ class FileChooserDialog : public ui::SelectFileDialog::Listener { delete this; } - void FileSelectionCanceled(void* params) override { + void FileSelectionCanceled() override { v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate(); v8::HandleScope scope(isolate); auto dict = gin_helper::Dictionary::CreateEmpty(isolate); @@ -195,6 +176,18 @@ class FileChooserDialog : public ui::SelectFileDialog::Listener { } private: + void ApplySettings(const DialogSettings& settings) { + dialog_->SetButtonLabel(settings.button_label); + dialog_->SetOverwriteConfirmationShown( + settings.properties & SAVE_DIALOG_SHOW_OVERWRITE_CONFIRMATION); + dialog_->SetMultipleSelectionsAllowed(settings.properties & + OPEN_DIALOG_MULTI_SELECTIONS); + int hidden_flag = type_ == DialogType::SAVE + ? static_cast(SAVE_DIALOG_SHOW_HIDDEN_FILES) + : static_cast(OPEN_DIALOG_SHOW_HIDDEN_FILES); + dialog_->SetHiddenShown(settings.properties & hidden_flag); + } + DialogType type_; scoped_refptr dialog_; base::OnceCallback callback_; diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index 93d7735cc4ae..2236d83910d8 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -15,6 +15,7 @@ #include "base/ranges/algorithm.h" #include "base/strings/pattern.h" #include "base/strings/string_number_conversions.h" +#include "base/strings/string_piece.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" diff --git a/shell/browser/ui/inspectable_web_contents.h b/shell/browser/ui/inspectable_web_contents.h index 1150bf79fada..361c29ef46c5 100644 --- a/shell/browser/ui/inspectable_web_contents.h +++ b/shell/browser/ui/inspectable_web_contents.h @@ -182,7 +182,8 @@ class InspectableWebContents void DoAidaConversation(DispatchCallback callback, const std::string& request, int stream_id) override {} - void RegisterAidaClientEvent(const std::string& request) override {} + void RegisterAidaClientEvent(DispatchCallback callback, + const std::string& request) override {} // content::DevToolsFrontendHostDelegate: void HandleMessageFromDevToolsFrontend(base::Value::Dict message); diff --git a/shell/browser/usb/usb_chooser_context.cc b/shell/browser/usb/usb_chooser_context.cc index 25cc990dfd3c..40577f067fa1 100644 --- a/shell/browser/usb/usb_chooser_context.cc +++ b/shell/browser/usb/usb_chooser_context.cc @@ -9,6 +9,7 @@ #include "base/containers/contains.h" #include "base/functional/bind.h" +#include "base/strings/string_piece.h" #include "base/task/sequenced_task_runner.h" #include "base/values.h" #include "build/build_config.h" diff --git a/shell/common/api/electron_api_url_loader.cc b/shell/common/api/electron_api_url_loader.cc index d449e17f160a..9ddc559d926a 100644 --- a/shell/common/api/electron_api_url_loader.cc +++ b/shell/common/api/electron_api_url_loader.cc @@ -398,7 +398,7 @@ SimpleURLLoaderWrapper::~SimpleURLLoaderWrapper() = default; void SimpleURLLoaderWrapper::OnAuthRequired( const std::optional& window_id, - uint32_t request_id, + int32_t request_id, const GURL& url, bool first_auth_attempt, const net::AuthChallengeInfo& auth_info, diff --git a/shell/common/api/electron_api_url_loader.h b/shell/common/api/electron_api_url_loader.h index 8b9f1f913401..86ce37c7012d 100644 --- a/shell/common/api/electron_api_url_loader.h +++ b/shell/common/api/electron_api_url_loader.h @@ -12,6 +12,7 @@ #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "base/sequence_checker.h" +#include "base/strings/string_piece.h" #include "gin/wrappable.h" #include "mojo/public/cpp/bindings/receiver_set.h" #include "net/base/auth.h" @@ -74,7 +75,7 @@ class SimpleURLLoaderWrapper // network::mojom::URLLoaderNetworkServiceObserver: void OnAuthRequired( const std::optional& window_id, - uint32_t request_id, + int32_t request_id, const GURL& url, bool first_auth_attempt, const net::AuthChallengeInfo& auth_info, diff --git a/shell/common/gin_converters/blink_converter.cc b/shell/common/gin_converters/blink_converter.cc index 17964f0ac1e4..7e9c6097850d 100644 --- a/shell/common/gin_converters/blink_converter.cc +++ b/shell/common/gin_converters/blink_converter.cc @@ -287,13 +287,12 @@ bool Converter::FromV8(v8::Isolate* isolate, // Make sure to not read beyond the buffer in case some bad code doesn't // NULL-terminate it (this is called from plugins). - size_t text_length_cap = blink::WebKeyboardEvent::kTextLengthCap; std::u16string text16 = character_str.empty() ? base::UTF8ToUTF16(str) : base::UTF8ToUTF16(character_str); - std::fill_n(out->text, text_length_cap, 0); - std::fill_n(out->unmodified_text, text_length_cap, 0); - for (size_t i = 0; i < std::min(text_length_cap - 1, text16.size()); ++i) { + std::ranges::fill(out->text, 0); + std::ranges::fill(out->unmodified_text, 0); + for (size_t i = 0; i < std::min(out->text.size() - 1, text16.size()); ++i) { out->text[i] = text16[i]; out->unmodified_text[i] = text16[i]; } diff --git a/shell/common/process_util.cc b/shell/common/process_util.cc index c55573b8dc56..d54dc15e2665 100644 --- a/shell/common/process_util.cc +++ b/shell/common/process_util.cc @@ -5,6 +5,7 @@ #include "shell/common/process_util.h" #include "base/command_line.h" +#include "base/strings/string_piece.h" #include "content/public/common/content_switches.h" #include "gin/dictionary.h" #include "shell/common/gin_converters/callback_converter.h" diff --git a/shell/renderer/api/electron_api_spell_check_client.cc b/shell/renderer/api/electron_api_spell_check_client.cc index 79bcc8044be7..b59d27814895 100644 --- a/shell/renderer/api/electron_api_spell_check_client.cc +++ b/shell/renderer/api/electron_api_spell_check_client.cc @@ -109,8 +109,8 @@ void SpellCheckClient::RequestCheckingOfText( std::make_unique(text, std::move(completionCallback)); base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( - FROM_HERE, - base::BindOnce(&SpellCheckClient::SpellCheckText, AsWeakPtr())); + FROM_HERE, base::BindOnce(&SpellCheckClient::SpellCheckText, + weak_factory_.GetWeakPtr())); } bool SpellCheckClient::IsSpellCheckingEnabled() const { @@ -225,8 +225,8 @@ void SpellCheckClient::SpellCheckWords(const SpellCheckScope& scope, v8::MicrotasksScope::kDoNotRunMicrotasks); v8::Local templ = gin_helper::CreateFunctionTemplate( - isolate_, - base::BindRepeating(&SpellCheckClient::OnSpellCheckDone, AsWeakPtr())); + isolate_, base::BindRepeating(&SpellCheckClient::OnSpellCheckDone, + weak_factory_.GetWeakPtr())); v8::Local args[] = {gin::ConvertToV8(isolate_, words), templ->GetFunction(context).ToLocalChecked()}; // Call javascript with the words and the callback function diff --git a/shell/renderer/api/electron_api_spell_check_client.h b/shell/renderer/api/electron_api_spell_check_client.h index 404400b76d8c..32ccf8014cc1 100644 --- a/shell/renderer/api/electron_api_spell_check_client.h +++ b/shell/renderer/api/electron_api_spell_check_client.h @@ -27,8 +27,7 @@ class WebTextCheckingCompletion; namespace electron::api { class SpellCheckClient : public blink::WebSpellCheckPanelHostClient, - public blink::WebTextCheckClient, - public base::SupportsWeakPtr { + public blink::WebTextCheckClient { public: SpellCheckClient(const std::string& language, v8::Isolate* isolate, @@ -106,6 +105,8 @@ class SpellCheckClient : public blink::WebSpellCheckPanelHostClient, v8::Global context_; v8::Global provider_; v8::Global spell_check_; + + base::WeakPtrFactory weak_factory_{this}; }; } // namespace electron::api