Browse Source

chore: bump chromium to 120.0.6099.0 (28-x-y) (#40413)

* chore: bump chromium to 120.0.6078.0 (main) (#40114)

* chore: bump chromium in DEPS to 120.0.6049.0

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6050.0

* chore: update patches

* 4910494: Reland "[autopip] Show autopip UI for video pip"

https://chromium-review.googlesource.com/c/chromium/src/+/4910494

* 4812338: Move partition_alloc into a "partition_alloc" dir.

https://chromium-review.googlesource.com/c/chromium/src/+/4812338

* [Extensions Cleanup] Remove mojom ViewType::kExtensionDialog

https://chromium-review.googlesource.com/c/chromium/src/+/4909897

* 4894923: Force enable raw_ptrs pointer arithmetic check.

https://chromium-review.googlesource.com/c/chromium/src/+/4894923

* gin: Prevent wrappables from being constructed from author code.

https://chromium-review.googlesource.com/c/chromium/src/+/4905829

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6052.0

* chore: bump chromium in DEPS to 120.0.6054.0

* chore: bump chromium in DEPS to 120.0.6056.0

* chore: fix patches

* 4918545: Reland "[autopip] Add permissions embargo"
https://chromium-review.googlesource.com/c/chromium/src/+/4918545

* 4881761: UI bindings for visual logging with structured metrics.

https://chromium-review.googlesource.com/c/chromium/src/+/4881761

* chore: bump chromium in DEPS to 120.0.6058.0

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6060.0

* chore: bump chromium in DEPS to 120.0.6061.0

* chore: bump chromium in DEPS to 120.0.6062.0

* chore: gen libc++ filenames

* chore: update patches

* 4911894: Move //c/b/ui/views/eye_dropper to //components
https://chromium-review.googlesource.com/c/chromium/src/+/4911894

* chore: bump chromium in DEPS to 120.0.6064.0

* chore: bump chromium in DEPS to 120.0.6066.0

* chore: bump chromium in DEPS to 120.0.6068.0

* chore: bump chromium in DEPS to 120.0.6070.0

* chore: remove temp_prevent_unused_function_error.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4931270

* chore: add TransferDragSecurityInfo()

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4928028

* mark TransferDragSecurityInfo() as NOTREACHED

A follow-up to previous commit. I think this is commit is correct (i.e.
that this function shouldn't get called) but am not positive, so I'm
including it in a standalone commit in case we need to revert.

* chore: update signature of OnPrivateNetworkAccessPermissionRequired()

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4919478

Our impl is a no-op, so updating the signature is the only change.

* chore: rebuild patches

* chore: bump chromium in DEPS to 120.0.6072.0

* chore: update patches

* chore: sync ParseMatchPattern() param order with upstream change

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4944243

* chore: update fix_crash_loading_non-standard_schemes_in_iframes.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4939602

* chore: rebuild patches

* chore: bump chromium in DEPS to 120.0.6073.0

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6074.0

* chore: update disable_color_correct_rendering.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4908053

no manual changes; patch applied with fuzz 1

* chore: update fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4936315

minor manual sync to upstream code shear

* chore: rebuild patches

* chore: update ClearHttpAuthCache arguments

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4937937

adding ClearDataFilterPtr arg. Upstream added this arg, which is already
present in other NetworkContext methods. Our code uses `nullptr` there.

* chore: bump chromium in DEPS to 120.0.6076.0

* chore: update mas_disable_remote_accessibility.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4865412

minor manual sync to upstream code shear

* chore: update disable_color_correct_rendering.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4942936

minor manual sync to upstream code shear

* fix: move x11_util.h include to top of source file

This is a short-term fix to unblock the roll. I will follow up a better fix in a standalone PR.

* chore: rebuild patches

* chore: bump chromium in DEPS to 120.0.6077.0

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6078.0

* chore: update patches

* refactor: add BrowserProcessImpl::os_crypt_async()

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4455776

This is one to keep an eye on. This commit copies the upstream impl,
which appears to be an interim step with more upstream code changes
still forthcoming.

Xref: https://bugs.chromium.org/p/chromium/issues/detail?id=1373092

* fixup! refactor: add BrowserProcessImpl::os_crypt_async()

chore: make 'gn check' happy

* chore: remove ensure_messageports_get_gced_when_not_referenced.patch

Xref: ensure_messageports_get_gced_when_not_referenced.patch

no longer needed because upstreamed

* chore: remove webrtc/pipewire_capturer_make_restore_tokens_re-usable_more_than_one_time.patch

Xref: https://webrtc-review.googlesource.com/c/src/+/322621

no longer needed because upstreamed

* chore: add //components/compose:buildflags dep

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4912601

needed by browser/ui/browser_dialogs.h

* chore: update filenames.libcxx.gni

node ./script/gen-libc++-filenames.js

* test: fix UI.InspectorView -> UI.InspectorView.instance()

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <[email protected]>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <[email protected]>
Co-authored-by: Charles Kerr <[email protected]>
Co-authored-by: Shelley Vohr <[email protected]>
(cherry picked from commit be44a2c5b7a0647f2c3bb7c776c53257360f615e)

* chore: bump chromium to 120.0.6099.0 (main) (#40316)

* chore: bump chromium in DEPS to 120.0.6086.0

* chore: update patches

* chore: rename FrameSubscriber::OnNewCropVersion()

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4905819

just a simple renaming

* chore: rename ToJsTime() to .InMillisecondsFSinceUnixEpoch()

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4956111

function renamed upstream

* chore: rename ToDoubleT() to .InSecondsFSinceUnixEpoch()

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4956111

function renamed upstream

* chore: rename FromDoubleT() to .FromSecondsSinceUnixEpoch()

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4956111

function renamed upstream

* chore: bump chromium in DEPS to 120.0.6088.2

* chore: update patches

* chore: regen filenames.libcxx.gni

* chore: migrate from (removed upstream) inputFormType to formControlType

* chore: bump chromium in DEPS to 120.0.6089.0

* chore: update allow_disabling_blink_scheduler_throttling_per_renderview.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4828507

manually sync to upstream changes + reduce diff size

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6090.0

* chore: update fix_disabling_background_throttling_in_compositor.patch

no manual changes; patch applied with fuzz 2 (4 lines)

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4944206

* chore: update fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4946653

do not patch WebContentsImpl::SetWindowShowState() any longer because it has been removed

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6091.0

* chore: update patches

* chore: bump chromium in DEPS to 120.0.6093.0

* chore: bump chromium in DEPS to 120.0.6095.0

* chore: bump chromium in DEPS to 120.0.6096.0

* chore: bump chromium in DEPS to 120.0.6097.0

* chore: update patches

* chore: update patch after rebase

* 4961495: [document pip] Focus the window when opened manually

https://chromium-review.googlesource.com/c/chromium/src/+/4961495

* [Extensions UserScripts] Store extensions with user scripts in tracker

 | https://chromium-review.googlesource.com/c/chromium/src/+/4950530

* chore: bump chromium in DEPS to 120.0.6099.0

* chore: update patches

* chore: update filenames.libcxx.gni

* chore: remove trailing space

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <[email protected]>
Co-authored-by: Shelley Vohr <[email protected]>
Co-authored-by: John Kleinschmidt <[email protected]>
(cherry picked from commit bc1ba1fe9d34044ffc6e7422e85e2dc4e7e1eafe)

* build: update appveyor image to latest version (#40325)

* build: update appveyor image to latest version

* chore: update version to e-120.0.6099.0

* chore: rename base image for bakes

---------

Co-authored-by: jkleinsc <[email protected]>
Co-authored-by: John Kleinschmidt <[email protected]>
(cherry picked from commit 878c6e30621372938ca583cbf5dd14b5f28b2130)

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
John Kleinschmidt 1 year ago
parent
commit
3934f72496
100 changed files with 748 additions and 693 deletions
  1. 3 0
      BUILD.gn
  2. 1 1
      DEPS
  3. 1 1
      appveyor-bake.yml
  4. 1 1
      appveyor-woa.yml
  5. 1 1
      appveyor.yml
  6. 10 11
      chromium_src/BUILD.gn
  7. 12 3
      docs/api/web-contents.md
  8. 12 3
      docs/api/webview-tag.md
  9. 6 0
      docs/breaking-changes.md
  10. 5 3
      filenames.libcxx.gni
  11. 2 1
      patches/chromium/.patches
  12. 3 3
      patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch
  13. 13 13
      patches/chromium/add_didinstallconditionalfeatures.patch
  14. 1 1
      patches/chromium/add_gin_converter_support_for_arraybufferview.patch
  15. 10 10
      patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
  16. 25 26
      patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch
  17. 9 9
      patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch
  18. 2 2
      patches/chromium/blink_file_path.patch
  19. 4 4
      patches/chromium/blink_local_frame.patch
  20. 1 1
      patches/chromium/boringssl_build_gn.patch
  21. 2 2
      patches/chromium/build_add_electron_tracing_category.patch
  22. 2 2
      patches/chromium/build_allow_electron_to_use_exec_script.patch
  23. 9 9
      patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch
  24. 1 1
      patches/chromium/build_libc_as_static_library.patch
  25. 26 26
      patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch
  26. 21 21
      patches/chromium/can_create_window.patch
  27. 2 2
      patches/chromium/chore_add_buildflag_guard_around_new_include.patch
  28. 1 1
      patches/chromium/chore_add_electron_deps_to_gitignores.patch
  29. 5 5
      patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch
  30. 3 3
      patches/chromium/chore_introduce_blocking_api_for_electron.patch
  31. 20 20
      patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch
  32. 22 0
      patches/chromium/chore_remove_check_is_test_on_script_injection_tracker.patch
  33. 3 3
      patches/chromium/command-ismediakey.patch
  34. 3 3
      patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch
  35. 4 4
      patches/chromium/custom_protocols_plzserviceworker.patch
  36. 2 2
      patches/chromium/dcheck.patch
  37. 20 20
      patches/chromium/disable_color_correct_rendering.patch
  38. 2 2
      patches/chromium/disable_compositor_recycling.patch
  39. 2 2
      patches/chromium/disable_freezing_flags_after_init_in_node.patch
  40. 6 6
      patches/chromium/disable_hidden.patch
  41. 3 3
      patches/chromium/disable_unload_metrics.patch
  42. 4 4
      patches/chromium/enable_reset_aspect_ratio.patch
  43. 0 73
      patches/chromium/ensure_messageports_get_gced_when_not_referenced.patch
  44. 2 2
      patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch
  45. 8 8
      patches/chromium/expose_setuseragent_on_networkcontext.patch
  46. 3 3
      patches/chromium/extend_apply_webpreferences.patch
  47. 3 3
      patches/chromium/feat_add_onclose_to_messageport.patch
  48. 5 5
      patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch
  49. 2 2
      patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch
  50. 43 0
      patches/chromium/feat_allow_passing_of_objecttemplate_to_objecttemplatebuilder.patch
  51. 11 11
      patches/chromium/feat_configure_launch_options_for_service_process.patch
  52. 26 26
      patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch
  53. 2 2
      patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch
  54. 9 9
      patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch
  55. 1 1
      patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch
  56. 2 2
      patches/chromium/fix_activate_background_material_on_windows.patch
  57. 2 2
      patches/chromium/fix_aspect_ratio_with_max_size.patch
  58. 7 7
      patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch
  59. 1 1
      patches/chromium/fix_crash_when_saving_edited_pdf_files.patch
  60. 9 9
      patches/chromium/fix_disabling_background_throttling_in_compositor.patch
  61. 6 15
      patches/chromium/fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch
  62. 1 1
      patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch
  63. 3 3
      patches/chromium/fix_media_key_usage_with_globalshortcuts.patch
  64. 70 12
      patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch
  65. 7 7
      patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch
  66. 5 5
      patches/chromium/fix_properly_honor_printing_page_ranges.patch
  67. 2 2
      patches/chromium/fix_remove_caption-removing_style_call.patch
  68. 18 18
      patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch
  69. 10 10
      patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch
  70. 3 3
      patches/chromium/frame_host_manager.patch
  71. 3 3
      patches/chromium/gin_enable_disable_v8_platform.patch
  72. 3 3
      patches/chromium/gritsettings_resource_ids.patch
  73. 1 1
      patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch
  74. 1 1
      patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch
  75. 1 1
      patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch
  76. 1 1
      patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch
  77. 2 2
      patches/chromium/mas-cgdisplayusesforcetogray.patch
  78. 6 6
      patches/chromium/mas_avoid_usage_of_private_macos_apis.patch
  79. 26 21
      patches/chromium/mas_disable_remote_accessibility.patch
  80. 3 3
      patches/chromium/mas_disable_remote_layer.patch
  81. 2 2
      patches/chromium/mas_no_private_api.patch
  82. 1 1
      patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch
  83. 10 10
      patches/chromium/network_service_allow_remote_certificate_verification_logic.patch
  84. 4 4
      patches/chromium/notification_provenance.patch
  85. 5 5
      patches/chromium/picture-in-picture.patch
  86. 9 9
      patches/chromium/port_autofill_colors_to_the_color_pipeline.patch
  87. 63 64
      patches/chromium/printing.patch
  88. 9 9
      patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch
  89. 1 1
      patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch
  90. 2 2
      patches/chromium/render_widget_host_view_base.patch
  91. 6 6
      patches/chromium/render_widget_host_view_mac.patch
  92. 3 3
      patches/chromium/resource_file_conflict.patch
  93. 1 1
      patches/chromium/revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch
  94. 2 2
      patches/chromium/scroll_bounce_flag.patch
  95. 2 2
      patches/chromium/support_mixed_sandbox_with_zygote.patch
  96. 4 4
      patches/chromium/web_contents.patch
  97. 11 29
      patches/chromium/webview_cross_drag.patch
  98. 7 7
      patches/chromium/webview_fullscreen.patch
  99. 7 7
      patches/chromium/worker_context_will_destroy.patch
  100. 6 6
      patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch

+ 3 - 0
BUILD.gn

@@ -434,6 +434,7 @@ source_set("electron_lib") {
     "//chrome/app/resources:platform_locale_settings",
     "//components/autofill/core/common:features",
     "//components/certificate_transparency",
+    "//components/compose:buildflags",
     "//components/embedder_support:browser_util",
     "//components/language/core/browser",
     "//components/net_log",
@@ -442,6 +443,8 @@ source_set("electron_lib") {
     "//components/network_hints/renderer",
     "//components/network_session_configurator/common",
     "//components/omnibox/browser:buildflags",
+    "//components/os_crypt/async/browser",
+    "//components/os_crypt/async/browser:key_provider_interface",
     "//components/os_crypt/sync",
     "//components/pref_registry",
     "//components/prefs",

+ 1 - 1
DEPS

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
 
 vars = {
   'chromium_version':
-    '119.0.6045.105',
+    '120.0.6099.0',
   'node_version':
     'v18.18.0',
   'nan_version':

+ 1 - 1
appveyor-bake.yml

@@ -6,7 +6,7 @@
 
 version: 1.0.{build}
 build_cloud: electronhq-16-core
-image: e-112.0.5607.0-vs2022
+image: base-bake-image
 environment:
   GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
   ELECTRON_OUT_DIR: Default

+ 1 - 1
appveyor-woa.yml

@@ -29,7 +29,7 @@
 
 version: 1.0.{build}
 build_cloud: electronhq-16-core
-image: e-119.0.6045.0
+image: e-120.0.6099.0
 environment:
   GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
   ELECTRON_OUT_DIR: Default

+ 1 - 1
appveyor.yml

@@ -29,7 +29,7 @@
 
 version: 1.0.{build}
 build_cloud: electronhq-16-core
-image: e-119.0.6045.0
+image: e-120.0.6099.0
 environment:
   GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
   ELECTRON_OUT_DIR: Default

+ 10 - 11
chromium_src/BUILD.gn

@@ -100,8 +100,6 @@ static_library("chrome") {
     "//chrome/browser/ui/ui_features.h",
     "//chrome/browser/ui/views/eye_dropper/eye_dropper.cc",
     "//chrome/browser/ui/views/eye_dropper/eye_dropper.h",
-    "//chrome/browser/ui/views/eye_dropper/eye_dropper_view.cc",
-    "//chrome/browser/ui/views/eye_dropper/eye_dropper_view.h",
     "//chrome/browser/ui/views/overlay/back_to_tab_label_button.cc",
     "//chrome/browser/ui/views/overlay/close_image_button.cc",
     "//chrome/browser/ui/views/overlay/close_image_button.h",
@@ -156,15 +154,6 @@ static_library("chrome") {
     sources += [ "//chrome/browser/media/webrtc/window_icon_util_ozone.cc" ]
   }
 
-  if (use_aura) {
-    sources += [
-      "//chrome/browser/platform_util_aura.cc",
-      "//chrome/browser/ui/views/eye_dropper/eye_dropper_view_aura.cc",
-      "//ui/views/native_window_tracker_aura.cc",
-      "//ui/views/native_window_tracker_aura.h",
-    ]
-  }
-
   public_deps = [
     "//chrome/browser:dev_ui_browser_resources",
     "//chrome/browser/resources/accessibility:resources",
@@ -189,6 +178,16 @@ static_library("chrome") {
     "//ui/views/controls/webview",
   ]
 
+  if (use_aura) {
+    sources += [
+      "//chrome/browser/platform_util_aura.cc",
+      "//chrome/browser/ui/views/eye_dropper/eye_dropper_aura.cc",
+      "//ui/views/native_window_tracker_aura.cc",
+      "//ui/views/native_window_tracker_aura.h",
+    ]
+    deps += [ "//components/eye_dropper" ]
+  }
+
   if (is_linux) {
     sources += [ "//chrome/browser/icon_loader_auralinux.cc" ]
     if (use_ozone) {

+ 12 - 3
docs/api/web-contents.md

@@ -783,9 +783,18 @@ Returns:
     word and spellchecker is enabled.
   * `frameCharset` string - The character encoding of the frame on which the
     menu was invoked.
-  * `inputFieldType` string - If the context menu was invoked on an input
-    field, the type of that field. Possible values include `none`, `plainText`,
-    `password`, `other`.
+  * `formControlType` string - The source that the context menu was invoked on.
+    Possible values include `none`, `button-button`, `field-set`,
+    `input-button`, `input-checkbox`, `input-color`, `input-date`,
+    `input-datetime-local`, `input-email`, `input-file`, `input-hidden`,
+    `input-image`, `input-month`, `input-number`, `input-password`, `input-radio`,
+    `input-range`, `input-reset`, `input-search`, `input-submit`, `input-telephone`,
+    `input-text`, `input-time`, `input-url`, `input-week`, `output`, `reset-button`,
+    `select-list`, `select-list`, `select-multiple`, `select-one`, `submit-button`,
+    and `text-area`,
+  * `inputFieldType` string _Deprecated_ - If the context menu was invoked on an
+    input field, the type of that field. Possible values include `none`,
+    `plainText`, `password`, `other`.
   * `spellcheckEnabled` boolean - If the context is editable, whether or not spellchecking is enabled.
   * `menuSourceType` string - Input source that invoked the context menu.
     Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`, `longPress`, `longTap`, `touchHandle`, `stylus`, `adjustSelection`, or `adjustSelectionReset`.

+ 12 - 3
docs/api/webview-tag.md

@@ -1106,9 +1106,18 @@ Returns:
     word and spellchecker is enabled.
   * `frameCharset` string - The character encoding of the frame on which the
     menu was invoked.
-  * `inputFieldType` string - If the context menu was invoked on an input
-    field, the type of that field. Possible values include `none`, `plainText`,
-    `password`, `other`.
+  * `formControlType` string - The source that the context menu was invoked on.
+    Possible values include `none`, `button-button`, `field-set`,
+    `input-button`, `input-checkbox`, `input-color`, `input-date`,
+    `input-datetime-local`, `input-email`, `input-file`, `input-hidden`,
+    `input-image`, `input-month`, `input-number`, `input-password`, `input-radio`,
+    `input-range`, `input-reset`, `input-search`, `input-submit`, `input-telephone`,
+    `input-text`, `input-time`, `input-url`, `input-week`, `output`, `reset-button`,
+    `select-list`, `select-list`, `select-multiple`, `select-one`, `submit-button`,
+    and `text-area`,
+  * `inputFieldType` string _Deprecated_ - If the context menu was invoked on an
+    input field, the type of that field. Possible values include `none`,
+    `plainText`, `password`, `other`.
   * `spellcheckEnabled` boolean - If the context is editable, whether or not spellchecking is enabled.
   * `menuSourceType` string - Input source that invoked the context menu.
     Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`, `longPress`, `longTap`, `touchHandle`, `stylus`, `adjustSelection`, or `adjustSelectionReset`.

+ 6 - 0
docs/breaking-changes.md

@@ -88,6 +88,12 @@ app.on('renderer-process-crashed', (event, webContents, killed) => { /* ... */ }
 app.on('render-process-gone', (event, webContents, details) => { /* ... */ })
 ```
 
+### Deprecated: `params.inputFormType` property on `context-menu` on `WebContents`
+
+The `inputFormType` property of the params object in the `context-menu`
+event from `WebContents` has been deprecated. Use the new `formControlType`
+property instead.
+
 ### Deprecated: `crashed` event on `WebContents` and `<webview>`
 
 The `crashed` events on `WebContents` and `<webview>` have been deprecated.

+ 5 - 3
filenames.libcxx.gni

@@ -95,7 +95,9 @@ libcxx_headers = [
   "//third_party/libc++/src/include/__algorithm/pstl_generate.h",
   "//third_party/libc++/src/include/__algorithm/pstl_is_partitioned.h",
   "//third_party/libc++/src/include/__algorithm/pstl_merge.h",
+  "//third_party/libc++/src/include/__algorithm/pstl_move.h",
   "//third_party/libc++/src/include/__algorithm/pstl_replace.h",
+  "//third_party/libc++/src/include/__algorithm/pstl_rotate_copy.h",
   "//third_party/libc++/src/include/__algorithm/pstl_sort.h",
   "//third_party/libc++/src/include/__algorithm/pstl_stable_sort.h",
   "//third_party/libc++/src/include/__algorithm/pstl_transform.h",
@@ -510,6 +512,7 @@ libcxx_headers = [
   "//third_party/libc++/src/include/__mdspan/extents.h",
   "//third_party/libc++/src/include/__mdspan/layout_left.h",
   "//third_party/libc++/src/include/__mdspan/layout_right.h",
+  "//third_party/libc++/src/include/__mdspan/layout_stride.h",
   "//third_party/libc++/src/include/__mdspan/mdspan.h",
   "//third_party/libc++/src/include/__memory/addressof.h",
   "//third_party/libc++/src/include/__memory/align.h",
@@ -840,6 +843,7 @@ libcxx_headers = [
   "//third_party/libc++/src/include/__utility/cmp.h",
   "//third_party/libc++/src/include/__utility/convert_to_integral.h",
   "//third_party/libc++/src/include/__utility/declval.h",
+  "//third_party/libc++/src/include/__utility/empty.h",
   "//third_party/libc++/src/include/__utility/exception_guard.h",
   "//third_party/libc++/src/include/__utility/exchange.h",
   "//third_party/libc++/src/include/__utility/forward.h",
@@ -852,8 +856,8 @@ libcxx_headers = [
   "//third_party/libc++/src/include/__utility/piecewise_construct.h",
   "//third_party/libc++/src/include/__utility/priority_tag.h",
   "//third_party/libc++/src/include/__utility/rel_ops.h",
+  "//third_party/libc++/src/include/__utility/small_buffer.h",
   "//third_party/libc++/src/include/__utility/swap.h",
-  "//third_party/libc++/src/include/__utility/terminate_on_exception.h",
   "//third_party/libc++/src/include/__utility/to_underlying.h",
   "//third_party/libc++/src/include/__utility/unreachable.h",
   "//third_party/libc++/src/include/__variant/monostate.h",
@@ -956,7 +960,6 @@ libcxx_headers = [
   "//third_party/libc++/src/include/latch",
   "//third_party/libc++/src/include/libcxx.imp",
   "//third_party/libc++/src/include/limits",
-  "//third_party/libc++/src/include/limits.h",
   "//third_party/libc++/src/include/list",
   "//third_party/libc++/src/include/locale",
   "//third_party/libc++/src/include/locale.h",
@@ -981,7 +984,6 @@ libcxx_headers = [
   "//third_party/libc++/src/include/scoped_allocator",
   "//third_party/libc++/src/include/semaphore",
   "//third_party/libc++/src/include/set",
-  "//third_party/libc++/src/include/setjmp.h",
   "//third_party/libc++/src/include/shared_mutex",
   "//third_party/libc++/src/include/source_location",
   "//third_party/libc++/src/include/span",

+ 2 - 1
patches/chromium/.patches

@@ -134,4 +134,5 @@ fix_activate_background_material_on_windows.patch
 fix_move_autopipsettingshelper_behind_branding_buildflag.patch
 revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch
 fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch
-ensure_messageports_get_gced_when_not_referenced.patch
+feat_allow_passing_of_objecttemplate_to_objecttemplatebuilder.patch
+chore_remove_check_is_test_on_script_injection_tracker.patch

+ 3 - 3
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 d7909fb4a736fee3e94708d7d0d073b6260288b2..91cba6a04500f12085e66d0dc88b8785490f68d7 100644
+index bfb0a24b2a57b4c75f64e0853700174c11df8d48..c9c40aca92fd7e0dde0da62d34120edb8479331a 100644
 --- a/content/gpu/gpu_main.cc
 +++ b/content/gpu/gpu_main.cc
-@@ -260,6 +260,10 @@ int GpuMain(MainFunctionParams parameters) {
+@@ -262,6 +262,10 @@ int GpuMain(MainFunctionParams parameters) {
    // to the GpuProcessHost once the GpuServiceImpl has started.
    viz::GpuServiceImpl::InstallPreInitializeLogHandler();
  
@@ -24,7 +24,7 @@ index d7909fb4a736fee3e94708d7d0d073b6260288b2..91cba6a04500f12085e66d0dc88b8785
    // 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
-@@ -344,7 +348,6 @@ int GpuMain(MainFunctionParams parameters) {
+@@ -358,7 +362,6 @@ int GpuMain(MainFunctionParams parameters) {
        const_cast<base::CommandLine*>(&command_line), gpu_preferences);
    const bool dead_on_arrival = !init_success;
  

+ 13 - 13
patches/chromium/add_didinstallconditionalfeatures.patch

@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
 context, which can cause some preload scripts to trip.
 
 diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
-index a4bf5bb618510ef5ef2ab2d05405cfd3688e97af..7a12c0ecb7254fe335c5563f3fd04c629abe065f 100644
+index c302f3e672cea9b73591048cf581f3e81078d5cb..eb1d1b0b59e687b996e76c205a8712346089c04b 100644
 --- a/content/public/renderer/render_frame_observer.h
 +++ b/content/public/renderer/render_frame_observer.h
 @@ -140,6 +140,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -23,10 +23,10 @@ index a4bf5bb618510ef5ef2ab2d05405cfd3688e97af..7a12c0ecb7254fe335c5563f3fd04c62
                                          int32_t world_id) {}
    virtual void DidClearWindowObject() {}
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index 925b1a7b72bba63a2f2f10da9da1814ff94711e0..345b15d2ee2f5f3b08f63801ee179bfe7a8e330e 100644
+index 47562a65e99b1bdbeca57f1ba69822df768c0291..104209cc6c8f5e6a6660936b8c6f185a30570237 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -4441,6 +4441,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
+@@ -4546,6 +4546,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
      observer.DidCreateScriptContext(context, world_id);
  }
  
@@ -40,10 +40,10 @@ index 925b1a7b72bba63a2f2f10da9da1814ff94711e0..345b15d2ee2f5f3b08f63801ee179bfe
                                                 int world_id) {
    for (auto& observer : observers_)
 diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
-index 9afa054b3927a9441824ba7b34737d0951d85021..8ed97dce0ee37207f6b77c04432f7c18c90faa0b 100644
+index 7a49bed638125a9980475ac6d4c825fcc9481548..7317ca6d2aca2362e6a260c931ec72fc2374fab5 100644
 --- a/content/renderer/render_frame_impl.h
 +++ b/content/renderer/render_frame_impl.h
-@@ -612,6 +612,8 @@ class CONTENT_EXPORT RenderFrameImpl
+@@ -614,6 +614,8 @@ class CONTENT_EXPORT RenderFrameImpl
    void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
    void DidCreateScriptContext(v8::Local<v8::Context> context,
                                int world_id) override;
@@ -53,10 +53,10 @@ index 9afa054b3927a9441824ba7b34737d0951d85021..8ed97dce0ee37207f6b77c04432f7c18
                                  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 e1dcfa8fa880f9d49445cb4501b2d79037c9bcf6..96df60413bee371797acc73bb5062692d359ff2c 100644
+index 714eef7a6809e0efc461cab62cd75d325540f66e..e7189320516d9f8563d7f9b679666781ef8ac995 100644
 --- a/third_party/blink/public/web/web_local_frame_client.h
 +++ b/third_party/blink/public/web/web_local_frame_client.h
-@@ -620,6 +620,9 @@ class BLINK_EXPORT WebLocalFrameClient {
+@@ -619,6 +619,9 @@ class BLINK_EXPORT WebLocalFrameClient {
    virtual void DidCreateScriptContext(v8::Local<v8::Context>,
                                        int32_t world_id) {}
  
@@ -79,7 +79,7 @@ index 5030619779b7bcd67923026991bb44d926d81e1a..1eea33740fcdca49e094ad7ad00cfda8
    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 286abd6bde7d57cf31621a61828e9d117ed9f721..16919d708515f0e1f0b713833f640db34e996482 100644
+index b83ee768ac5622ceb3c0f230cefdd1e46e219985..f034c3e647ee64c81d9684bb73ff999e16ce9a94 100644
 --- a/third_party/blink/renderer/core/frame/local_frame_client.h
 +++ b/third_party/blink/renderer/core/frame/local_frame_client.h
 @@ -320,6 +320,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -92,10 +92,10 @@ index 286abd6bde7d57cf31621a61828e9d117ed9f721..16919d708515f0e1f0b713833f640db3
                                          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 f9ac78c377548164e28e6485b39044741f1053e8..2b82d3c3c7e14dd03f5ce6eda3c4eb759e9765fd 100644
+index 5dd3383cfddf4edc050ef5b37e98452f3476d7a9..25942059009f735a1d6b52fc9c1033d26c893306 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
-@@ -281,6 +281,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
+@@ -283,6 +283,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
      web_frame_->Client()->DidCreateScriptContext(context, world_id);
  }
  
@@ -110,7 +110,7 @@ index f9ac78c377548164e28e6485b39044741f1053e8..2b82d3c3c7e14dd03f5ce6eda3c4eb75
      v8::Local<v8::Context> 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 acf2f38bc94c55af79682c0003f5a3695210f91d..11c487843b05eda5986cd5de9ae13a70f02f8667 100644
+index 2dd6df6727828335ca4462b470df4afd8dd29539..91ee3bf31ba43e650cacd2f781a3a8103d216570 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 {
@@ -123,10 +123,10 @@ index acf2f38bc94c55af79682c0003f5a3695210f91d..11c487843b05eda5986cd5de9ae13a70
                                  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 507d02dc496a2324274e12501cb9ff080a0ed401..abcff9a4020578ef435bfa7c0dc0f9d8330bfa6b 100644
+index 8f21b488a00e38ea318f08116cdabe5c9bd5e45a..2a90dc46b331f452bdd525fd043efd2a04adac9b 100644
 --- a/third_party/blink/renderer/core/loader/empty_clients.h
 +++ b/third_party/blink/renderer/core/loader/empty_clients.h
-@@ -407,6 +407,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
+@@ -408,6 +408,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
  
    void DidCreateScriptContext(v8::Local<v8::Context>,
                                int32_t world_id) override {}

+ 1 - 1
patches/chromium/add_gin_converter_support_for_arraybufferview.patch

@@ -39,7 +39,7 @@ index 4eb8c3d8c8392512eeb235bc18012589549b872b..d0432f6fff09cdcebed55ccf03a6524a
                                                Local<External> val) {
    return val.As<Value>();
 diff --git a/gin/converter.h b/gin/converter.h
-index eb704fcd56dee861e18e9cd64a857d68dea6f415..d32a8c26403cf32f3333ed85c23292915e6f0681 100644
+index be3931d424446ea7549d075a2d33ead526fa0ab4..6844dfc646268c4be74def855a8bec16adfe4190 100644
 --- a/gin/converter.h
 +++ b/gin/converter.h
 @@ -180,6 +180,15 @@ struct GIN_EXPORT Converter<v8::Local<v8::ArrayBuffer> > {

+ 10 - 10
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 a91b303e77f4b5b47742d12749eb70d857e0badf..284174aa697b3379863e0aa440b5d03c6b06f8e3 100644
+index ce42101bdec901047af1f97287d83879541ab53e..785382fdc0f47ff31baef16da13eab688be3689d 100644
 --- a/ui/gtk/gtk_ui.cc
 +++ b/ui/gtk/gtk_ui.cc
-@@ -523,12 +523,13 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
+@@ -527,12 +527,13 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
    return std::make_unique<gtk::NavButtonProviderGtk>();
  }
  
@@ -31,10 +31,10 @@ index a91b303e77f4b5b47742d12749eb70d857e0badf..284174aa697b3379863e0aa440b5d03c
  }
  
 diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h
-index 8ae3369be0b628ce94eeb067b2be9f3ace31eccb..520de739d2f6f63757c15bf738c9c09b71c2a479 100644
+index 38c1297588f30cc81d48cfd2321845815bb93ea5..0f4141d2146c38f054b060ddfa06a9f68ee2179c 100644
 --- a/ui/gtk/gtk_ui.h
 +++ b/ui/gtk/gtk_ui.h
-@@ -109,7 +109,7 @@ class GtkUi : public ui::LinuxUiAndTheme {
+@@ -110,7 +110,7 @@ class GtkUi : public ui::LinuxUiAndTheme {
    bool PreferDarkTheme() const override;
    void SetDarkTheme(bool dark) override;
    std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
@@ -43,7 +43,7 @@ index 8ae3369be0b628ce94eeb067b2be9f3ace31eccb..520de739d2f6f63757c15bf738c9c09b
  
   private:
    using TintMap = std::map<int, color_utils::HSL>;
-@@ -200,6 +200,8 @@ class GtkUi : public ui::LinuxUiAndTheme {
+@@ -203,6 +203,8 @@ class GtkUi : public ui::LinuxUiAndTheme {
    // while Chrome is running.
    std::unique_ptr<ui::WindowFrameProvider> solid_frame_provider_;
    std::unique_ptr<ui::WindowFrameProvider> transparent_frame_provider_;
@@ -173,7 +173,7 @@ index 32c3d63ae4598339965c58443a8c2d12b99fb89a..91496d957b8291cd37948e237a1cc4bf
  
  }  // namespace gtk
 diff --git a/ui/linux/fallback_linux_ui.cc b/ui/linux/fallback_linux_ui.cc
-index 6d77be047e202d1b1a75c62ab829dd1131ce7f68..ee1f503a679b3e939e3f2d2417aec2182063dbd8 100644
+index 2b67f6ebcae4f0495b73c750e73250921fa0ac04..796b44df8c8b9a63ba97e28f14e457d724c8ae50 100644
 --- a/ui/linux/fallback_linux_ui.cc
 +++ b/ui/linux/fallback_linux_ui.cc
 @@ -135,7 +135,7 @@ FallbackLinuxUi::CreateNavButtonProvider() {
@@ -186,10 +186,10 @@ index 6d77be047e202d1b1a75c62ab829dd1131ce7f68..ee1f503a679b3e939e3f2d2417aec218
  }
  
 diff --git a/ui/linux/fallback_linux_ui.h b/ui/linux/fallback_linux_ui.h
-index 9901d4939400da87610b1a960ca989eb9da6dc9b..035ab6679f9f6a9083382580bbbe7fa2420ab28d 100644
+index 9a6a5a7f21c318d3009df1766a7789f9c7597339..9454e8f8e622a5b92f980fdf6c1f68d6c4795cf7 100644
 --- a/ui/linux/fallback_linux_ui.h
 +++ b/ui/linux/fallback_linux_ui.h
-@@ -67,7 +67,7 @@ class FallbackLinuxUi : public LinuxUiAndTheme {
+@@ -68,7 +68,7 @@ class FallbackLinuxUi : public LinuxUiAndTheme {
    bool PreferDarkTheme() const override;
    void SetDarkTheme(bool dark) override;
    std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
@@ -199,10 +199,10 @@ index 9901d4939400da87610b1a960ca989eb9da6dc9b..035ab6679f9f6a9083382580bbbe7fa2
   private:
    std::string default_font_family_;
 diff --git a/ui/linux/linux_ui.h b/ui/linux/linux_ui.h
-index a47134d7fa67213e8928ce98071f85fa1bc66508..2fe17292aee5021864615abc5b60ee38d7fa0e4b 100644
+index 9cc65cf5713464e5964e9aa2109c281055e5b70f..014d1145e44e5e9420846476d4349070c78852d0 100644
 --- a/ui/linux/linux_ui.h
 +++ b/ui/linux/linux_ui.h
-@@ -313,7 +313,7 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUiTheme {
+@@ -316,7 +316,7 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUiTheme {
    // if transparency is unsupported and the frame should be rendered opaque.
    // The returned object is not owned by the caller and will remain alive until
    // the process ends.

+ 25 - 26
patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch

@@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView
 This allows us to disable throttling for hidden windows.
 
 diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
-index 914e4cdd97154c2f0986f85b0ca5e48fbd518160..d1ce82f3137dc8de3722c6406b63c47fe878e68e 100644
+index 093bed2d057df4b12ae01b8edc11c7924233b0c5..43a24c45bc5adf1bb6a3eb00c3b3ad64e663522f 100644
 --- a/content/browser/renderer_host/render_view_host_impl.cc
 +++ b/content/browser/renderer_host/render_view_host_impl.cc
 @@ -716,6 +716,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -22,10 +22,10 @@ index 914e4cdd97154c2f0986f85b0ca5e48fbd518160..d1ce82f3137dc8de3722c6406b63c47f
    return is_active();
  }
 diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
-index d44652650891eff7cd6111bc6d6454a009942cb6..16522609163ba6bc422fc30a8d145a25877c407e 100644
+index 2d5431caee0b44828ae35a861cda8b15b587123f..5db98459e35767aee91c9b901c10f2f59ac1456b 100644
 --- a/content/browser/renderer_host/render_view_host_impl.h
 +++ b/content/browser/renderer_host/render_view_host_impl.h
-@@ -140,6 +140,7 @@ class CONTENT_EXPORT RenderViewHostImpl
+@@ -139,6 +139,7 @@ class CONTENT_EXPORT RenderViewHostImpl
    void EnablePreferredSizeMode() override;
    void WriteIntoTrace(perfetto::TracedProto<TraceProto> context) const override;
  
@@ -34,10 +34,10 @@ index d44652650891eff7cd6111bc6d6454a009942cb6..16522609163ba6bc422fc30a8d145a25
    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 b7d50b6286ac90ab06089f75f0b9d0b7b02bbf6c..0d917c241b2acb9510ff65dbeabc6aae9a01eec6 100644
+index 2b7a01cd1e7637031bbd28ba32f332f9f97456f1..9840d0e1308bc6e4589f32f6eac5e27f353895dd 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
-@@ -563,8 +563,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
+@@ -564,8 +564,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.
@@ -63,31 +63,31 @@ index 9979c25ecd57e68331b628a518368635db5c2027..f65bfbbb663a5bb0511ffa389d3163e0
    // This interface should only be implemented inside content.
    friend class RenderViewHostImpl;
 diff --git a/content/test/test_page_broadcast.h b/content/test/test_page_broadcast.h
-index 73c0f64aa84061381a98ba60906835258f881468..41bdf7e231eca4617dbe53737a3925039bf77c4f 100644
+index b2204672b2dde14ce91a0c67e8a5b5ebede55aa9..0f9bed79ba572a5fffb4f39e2ffc6f58970ee7cb 100644
 --- a/content/test/test_page_broadcast.h
 +++ b/content/test/test_page_broadcast.h
-@@ -45,6 +45,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
-       override;
-   void UpdatePageBrowsingContextGroup(const blink::BrowsingContextGroupInfo&
+@@ -47,6 +47,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
                                            browsing_context_group_info) override;
+   void SetPageAttributionSupport(
+       network::mojom::AttributionSupport support) override;
 +  void SetSchedulerThrottling(bool allowed) override {}
  
    mojo::AssociatedReceiver<blink::mojom::PageBroadcast> receiver_;
  };
 diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
-index d3877e946b1d65eba5bb45efe786fbcc7925ca6e..73bd5056baf7e4278b7260e550e2b8516be72f20 100644
+index 1270218d71d365b3b33188ba803026e9a24f51dc..78fe7a385eb8781787c5288a9eb790df05afa088 100644
 --- a/third_party/blink/public/mojom/page/page.mojom
 +++ b/third_party/blink/public/mojom/page/page.mojom
-@@ -155,4 +155,7 @@ interface PageBroadcast {
-   // in `browsing_context_group_info`.
-   UpdatePageBrowsingContextGroup(
-     blink.mojom.BrowsingContextGroupInfo browsing_context_group_info);
+@@ -162,4 +162,7 @@ interface PageBroadcast {
+   // supported/unsupported or when attribution is enabled/disabled for
+   // Android WebView.
+   SetPageAttributionSupport(network.mojom.AttributionSupport support);
 +
 +  // Whether to enable the Renderer scheduler background throttling.
 +  SetSchedulerThrottling(bool allowed);
  };
 diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
-index 8a18ecf567cd3a6a2fb1627083a5544a93198bf4..6bb4074e033e045de164bc776f75f152ea7be16f 100644
+index e89d7153d66d15e6e9a2a6980aaec5c671dfd0f3..c77228f8aa6ada81bcafc2622d784bb3f85cca30 100644
 --- a/third_party/blink/public/web/web_view.h
 +++ b/third_party/blink/public/web/web_view.h
 @@ -371,6 +371,7 @@ class BLINK_EXPORT WebView {
@@ -99,10 +99,10 @@ index 8a18ecf567cd3a6a2fb1627083a5544a93198bf4..6bb4074e033e045de164bc776f75f152
    // 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 866af04a935f8b1d57e96f790568f42797cac309..371f7dbc063619dbadc2b58a84eb65d0837de9d1 100644
+index c8b7feaa65bfb47daa63565b193ff33806f53f88..70953a480dbc71594e292609ebd327c9b1c685af 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
-@@ -2407,6 +2407,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
+@@ -2413,6 +2413,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
    TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
                 "old_state", old_state, "new_state", new_state);
  
@@ -113,15 +113,14 @@ index 866af04a935f8b1d57e96f790568f42797cac309..371f7dbc063619dbadc2b58a84eb65d0
    bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
                              !old_state->is_in_back_forward_cache;
    bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
-@@ -3879,10 +3883,24 @@ PageScheduler* WebViewImpl::Scheduler() const {
+@@ -3903,10 +3907,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
    return GetPage()->GetPageScheduler();
  }
  
 +void WebViewImpl::SetSchedulerThrottling(bool allowed) {
 +  DCHECK(GetPage());
 +  scheduler_throttling_allowed_ = allowed;
-+  GetPage()->GetPageScheduler()->SetPageVisible(allowed ?
-+      (GetVisibilityState() == mojom::blink::PageVisibilityState::kVisible) : true);
++  GetPage()->GetPageScheduler()->SetPageVisible(!allowed || GetVisibilityState() == mojom::blink::PageVisibilityState::kVisible);
 +}
 +
  void WebViewImpl::SetVisibilityState(
@@ -129,20 +128,20 @@ index 866af04a935f8b1d57e96f790568f42797cac309..371f7dbc063619dbadc2b58a84eb65d0
      bool is_initial_state) {
    DCHECK(GetPage());
 +
-+  // If backgroundThrottling is disabled, the page is always visible.
 +  if (!scheduler_throttling_allowed_) {
 +    GetPage()->SetVisibilityState(mojom::blink::PageVisibilityState::kVisible, is_initial_state);
 +    GetPage()->GetPageScheduler()->SetPageVisible(true);
 +    return;
 +  }
++
    GetPage()->SetVisibilityState(visibility_state, is_initial_state);
-   GetPage()->GetPageScheduler()->SetPageVisible(
-       visibility_state == mojom::blink::PageVisibilityState::kVisible);
+   // 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 6a180620e00c77d0f4be346d1296f62feb714abb..c0ccf14faa52ab190c5848e8e9b597bcf637d4c0 100644
+index dde5e8c51fa5f690d67c077365e11c00edd4ea85..2cff9e7af83ba7ad13aafea1a22bbf7be9829839 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.h
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.h
-@@ -445,6 +445,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
+@@ -447,6 +447,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
    LocalDOMWindow* PagePopupWindow() const;
  
    PageScheduler* Scheduler() const override;
@@ -150,7 +149,7 @@ index 6a180620e00c77d0f4be346d1296f62feb714abb..c0ccf14faa52ab190c5848e8e9b597bc
    void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
                            bool is_initial_state) override;
    mojom::blink::PageVisibilityState GetVisibilityState() override;
-@@ -909,6 +910,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
+@@ -914,6 +915,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
    // If true, we send IPC messages when |preferred_size_| changes.
    bool send_preferred_size_changes_ = false;
  

+ 9 - 9
patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch

@@ -6,10 +6,10 @@ Subject: Allow setting secondary label via SimpleMenuModel
 Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976
 
 diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
-index da8b1d7d22f6f316263b7ea1595000b678920103..7165c6a3851c582c0dd71b667f46a52f568d0a12 100644
+index 30afdfc488f608851dd382d01aa5221c26d18180..e3a0540c933fc76a8f8717aca8e39f49d52ec033 100644
 --- a/ui/base/models/simple_menu_model.cc
 +++ b/ui/base/models/simple_menu_model.cc
-@@ -48,6 +48,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
+@@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
    return std::u16string();
  }
  
@@ -21,7 +21,7 @@ index da8b1d7d22f6f316263b7ea1595000b678920103..7165c6a3851c582c0dd71b667f46a52f
  ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
      int command_id) const {
    return ImageModel();
-@@ -333,6 +338,11 @@ void SimpleMenuModel::SetLabel(size_t index, const std::u16string& label) {
+@@ -338,6 +343,11 @@ void SimpleMenuModel::SetLabel(size_t index, const std::u16string& label) {
    MenuItemsChanged();
  }
  
@@ -33,7 +33,7 @@ index da8b1d7d22f6f316263b7ea1595000b678920103..7165c6a3851c582c0dd71b667f46a52f
  void SimpleMenuModel::SetMinorText(size_t index,
                                     const std::u16string& minor_text) {
    items_[ValidateItemIndex(index)].minor_text = minor_text;
-@@ -417,6 +427,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
+@@ -422,6 +432,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
    return items_[ValidateItemIndex(index)].label;
  }
  
@@ -47,10 +47,10 @@ index da8b1d7d22f6f316263b7ea1595000b678920103..7165c6a3851c582c0dd71b667f46a52f
    return items_[ValidateItemIndex(index)].minor_text;
  }
 diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
-index 9064a0db21f5751762a4534ee2e5878d09ae020d..29fd4818bb4565b5ab6c5ca3daa507593bd7244a 100644
+index c17c0242f07da0d66272691704c925147642a326..796635cd604c7ea831d98b2f07382a659588ab58 100644
 --- a/ui/base/models/simple_menu_model.h
 +++ b/ui/base/models/simple_menu_model.h
-@@ -50,6 +50,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
+@@ -54,6 +54,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
      // Some command ids have labels and icons that change over time.
      virtual bool IsItemForCommandIdDynamic(int command_id) const;
      virtual std::u16string GetLabelForCommandId(int command_id) const;
@@ -58,7 +58,7 @@ index 9064a0db21f5751762a4534ee2e5878d09ae020d..29fd4818bb4565b5ab6c5ca3daa50759
      // Gets the icon for the item with the specified id.
      virtual ImageModel GetIconForCommandId(int command_id) const;
  
-@@ -169,6 +170,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
+@@ -173,6 +174,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
    // Sets the label for the item at |index|.
    void SetLabel(size_t index, const std::u16string& label);
  
@@ -68,7 +68,7 @@ index 9064a0db21f5751762a4534ee2e5878d09ae020d..29fd4818bb4565b5ab6c5ca3daa50759
    // Sets the minor text for the item at |index|.
    void SetMinorText(size_t index, const std::u16string& minor_text);
  
-@@ -207,6 +211,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
+@@ -211,6 +215,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
    ui::MenuSeparatorType GetSeparatorTypeAt(size_t index) const override;
    int GetCommandIdAt(size_t index) const override;
    std::u16string GetLabelAt(size_t index) const override;
@@ -76,7 +76,7 @@ index 9064a0db21f5751762a4534ee2e5878d09ae020d..29fd4818bb4565b5ab6c5ca3daa50759
    std::u16string GetMinorTextAt(size_t index) const override;
    ImageModel GetMinorIconAt(size_t index) const override;
    bool IsItemDynamicAt(size_t index) const override;
-@@ -246,6 +251,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
+@@ -250,6 +255,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
      int command_id = 0;
      ItemType type = TYPE_COMMAND;
      std::u16string label;

+ 2 - 2
patches/chromium/blink_file_path.patch

@@ -7,10 +7,10 @@ This is used by editors to obtain the filesystem path from a dragged file. See
 documentation at https://electronjs.org/docs/api/file-object
 
 diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
-index 355ce2e090c60a38cd22750958710e138009d1f5..a9b1b7307f7f91d50d9a750455503381961c7cf7 100644
+index f0fdf307efda97473bb39c89cbca66dd146741dd..16eac8d3a50ad04b3141c8a3f416c273d86675ce 100644
 --- a/third_party/blink/renderer/core/fileapi/file.h
 +++ b/third_party/blink/renderer/core/fileapi/file.h
-@@ -215,6 +215,9 @@ class CORE_EXPORT File final : public Blob {
+@@ -219,6 +219,9 @@ class CORE_EXPORT File final : public Blob {
    }
    const String& name() const { return name_; }
  

+ 4 - 4
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 e0ce2a1bcbef7ece6b320adf820ba49148a66fd7..6aefdcfc226089ab3ae149b75ebdc86ba7bce6fb 100644
+index 840cac7b1f4231b8177e1d697e102a18201f41de..40762df275afe2b6f63ea3da44d94475e1f290bf 100644
 --- a/third_party/blink/renderer/core/frame/frame.cc
 +++ b/third_party/blink/renderer/core/frame/frame.cc
 @@ -125,14 +125,6 @@ bool Frame::Detach(FrameDetachType type) {
@@ -49,10 +49,10 @@ index e0ce2a1bcbef7ece6b320adf820ba49148a66fd7..6aefdcfc226089ab3ae149b75ebdc86b
    // 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 2782ad135f843c1b61dfd0882f000e627b4d59a4..bb6e6804a49c10e5d0238aea61e4676a9dcfb72d 100644
+index 152fd1307207a5dafce52b71dcb1469c3263165f..6fc9f48d84590f85576be0362c716634c87eff80 100644
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
-@@ -665,10 +665,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
+@@ -671,10 +671,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
    }
    DCHECK(!view_ || !view_->IsAttached());
  
@@ -63,7 +63,7 @@ index 2782ad135f843c1b61dfd0882f000e627b4d59a4..bb6e6804a49c10e5d0238aea61e4676a
    if (!Client())
      return false;
  
-@@ -716,6 +712,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
+@@ -722,6 +718,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
    DCHECK(!view_->IsAttached());
    Client()->WillBeDetached();
  

+ 1 - 1
patches/chromium/boringssl_build_gn.patch

@@ -6,7 +6,7 @@ Subject: boringssl BUILD.gn
 Build BoringSSL with some extra functions that nodejs needs.
 
 diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
-index 4e882f729aacf7c63629ce019ef0f0bdc11ca937..5f5ec93ef0dd0e2a916ee08923b6536a5ed019e7 100644
+index 321a2dc2eb38dfa57aaaa76ba65279001402b368..8f065573898836a0c7baeda1e0f626afbd55046a 100644
 --- a/third_party/boringssl/BUILD.gn
 +++ b/third_party/boringssl/BUILD.gn
 @@ -53,6 +53,20 @@ config("no_asm_config") {

+ 2 - 2
patches/chromium/build_add_electron_tracing_category.patch

@@ -8,10 +8,10 @@ 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 2f9a9813f863caa8f444bbcf64806826f5a8febb..ca6eaa5e0925936a3e6a4343c7b992b6a3e045ed 100644
+index c4ed2b8abb249bd85ea3ab6bd8d506e34fda1bc8..d48fb4f0ab45ed41ae087ae0aca4a542496e945a 100644
 --- a/base/trace_event/builtin_categories.h
 +++ b/base/trace_event/builtin_categories.h
-@@ -81,6 +81,8 @@
+@@ -82,6 +82,8 @@
    X("drm")                                                               \
    X("drmcursor")                                                         \
    X("dwrite")                                                            \

+ 2 - 2
patches/chromium/build_allow_electron_to_use_exec_script.patch

@@ -6,10 +6,10 @@ Subject: build: allow electron to use exec_script
 This is similar to the //build usecase so we're OK adding ourselves here
 
 diff --git a/.gn b/.gn
-index 628071cb9a46419307ba0a0b72a3fb137817a596..5e2b164ffa0903db09ac7e10576c0395af22f4ab 100644
+index 321877844bd21408fef009159dea6cf84c25d260..1dbf8b70c3ef4a567691268034f58787e3ac0192 100644
 --- a/.gn
 +++ b/.gn
-@@ -158,4 +158,6 @@ exec_script_whitelist =
+@@ -167,4 +167,6 @@ exec_script_whitelist =
  
        "//tools/grit/grit_rule.gni",
        "//tools/gritsettings/BUILD.gn",

+ 9 - 9
patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch

@@ -11,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this
 patch.
 
 diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
-index dcf02923c21e1c4c292eb800f6325e4bb764c823..8738860b44f179685198d2c0b9729fccbf6ebd6c 100644
+index 0594fc8f8122b5f66457c262890ea93be3a579d8..19f045d14c6072c1b0b8fb6a50bf4cafa563f7cb 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
-@@ -199,11 +199,16 @@ if (!is_android && !is_mac) {
+@@ -200,11 +200,16 @@ if (!is_android && !is_mac) {
            "common/crash_keys.h",
          ]
  
@@ -33,10 +33,10 @@ index dcf02923c21e1c4c292eb800f6325e4bb764c823..8738860b44f179685198d2c0b9729fcc
            "//base",
            "//build:branding_buildflags",
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index 7cb8d3fc03da2017fc5eaa83a9677d51013f4d92..c3a8dea68fc7d4a5c20d1b1946d3fa3120699bb5 100644
+index bce36d7ffb408e6bb150afae315c09087c89fc45..6c8ff481d2a89cdeb95f6598de8b716c5f1556a4 100644
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -4801,7 +4801,7 @@ static_library("browser") {
+@@ -4819,7 +4819,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 7cb8d3fc03da2017fc5eaa83a9677d51013f4d92..c3a8dea68fc7d4a5c20d1b1946d3fa31
        sources += [ "certificate_viewer_stub.cc" ]
      }
 diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
-index a39d63a6bbf905ff8266bbbefddc6f5a8bebb332..7961ccfc154a8ad1da7eed5f8a14b8fd37f47f93 100644
+index 21f47fbabc1c8af4524642d6ffe0c34fe23db874..beda741d58625b8069785b24a3049e87ba43990d 100644
 --- a/chrome/test/BUILD.gn
 +++ b/chrome/test/BUILD.gn
-@@ -6904,7 +6904,6 @@ test("unit_tests") {
+@@ -7033,7 +7033,6 @@ test("unit_tests") {
  
      deps += [
        "//chrome:other_version",
@@ -57,7 +57,7 @@ index a39d63a6bbf905ff8266bbbefddc6f5a8bebb332..7961ccfc154a8ad1da7eed5f8a14b8fd
        "//chrome//services/util_win:unit_tests",
        "//chrome/app:chrome_dll_resources",
        "//chrome/app:win_unit_tests",
-@@ -6925,6 +6924,10 @@ test("unit_tests") {
+@@ -7054,6 +7053,10 @@ test("unit_tests") {
        "//ui/resources",
      ]
  
@@ -68,7 +68,7 @@ index a39d63a6bbf905ff8266bbbefddc6f5a8bebb332..7961ccfc154a8ad1da7eed5f8a14b8fd
      ldflags = [
        "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
        "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
-@@ -7909,7 +7912,6 @@ test("unit_tests") {
+@@ -8046,7 +8049,6 @@ test("unit_tests") {
      }
  
      deps += [
@@ -76,7 +76,7 @@ index a39d63a6bbf905ff8266bbbefddc6f5a8bebb332..7961ccfc154a8ad1da7eed5f8a14b8fd
        "//chrome/browser/apps:icon_standardizer",
        "//chrome/browser/apps/app_service",
        "//chrome/browser/apps/app_service:app_registry_cache_waiter",
-@@ -7996,6 +7998,10 @@ test("unit_tests") {
+@@ -8136,6 +8138,10 @@ test("unit_tests") {
        "//ui/webui/resources/js/browser_command:mojo_bindings",
      ]
  

+ 1 - 1
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 c93cf2883d7109053b1daf68fb1d64219e745c6b..48ee62a16bcfbe7f3083855409b2c8db80d0109e 100644
+index 04569890c0084c286bd29b9b20caffabd664dfa7..a7b7beecb73f7789382274797d1851dc4406ef96 100644
 --- a/buildtools/third_party/libc++/BUILD.gn
 +++ b/buildtools/third_party/libc++/BUILD.gn
 @@ -44,7 +44,11 @@ config("winver") {

+ 26 - 26
patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch

@@ -6,10 +6,10 @@ Subject: build: only use the mas build config in the required components
 Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts
 
 diff --git a/base/BUILD.gn b/base/BUILD.gn
-index 55479f4187323ad0f26dbbda555c0ff3093cc8d5..a9cf41bce37672d355373568b04fbda45210a6d8 100644
+index 24f2397278ccb400a47e065a676be5ae783fa2e6..7d96eee167aadcea896fa18b7c806d9b6ccfff83 100644
 --- a/base/BUILD.gn
 +++ b/base/BUILD.gn
-@@ -1032,6 +1032,7 @@ component("base") {
+@@ -1035,6 +1035,7 @@ component("base") {
      "//build/config/compiler:prevent_unsafe_narrowing",
      "//build/config/compiler:wexit_time_destructors",
      "//build/config/compiler:wglobal_constructors",
@@ -54,10 +54,10 @@ index 0369b1efab3783c0c61e086f82b3724772e4dff0..11a35c9f611fba4f5313994e41a44065
      "alert.h",
      "alert.mm",
 diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
-index 3029fda279a6e2062115ac7fc7ade32e4a3aecd2..a76eb15b7498e13933331f221d8b7314c9004131 100644
+index 53611e788cde9012ca566444e6c1ee05c99b921e..c5d018ae78b486ef4b3cc86a8091869f62aef534 100644
 --- a/components/viz/service/BUILD.gn
 +++ b/components/viz/service/BUILD.gn
-@@ -337,6 +337,7 @@ viz_component("service") {
+@@ -335,6 +335,7 @@ viz_component("service") {
          "frame_sinks/external_begin_frame_source_mac.h",
        ]
      }
@@ -65,7 +65,7 @@ index 3029fda279a6e2062115ac7fc7ade32e4a3aecd2..a76eb15b7498e13933331f221d8b7314
    }
  
    if (is_android || use_ozone) {
-@@ -595,6 +596,7 @@ viz_source_set("unit_tests") {
+@@ -593,6 +594,7 @@ viz_source_set("unit_tests") {
        "display_embedder/software_output_device_mac_unittest.mm",
      ]
      frameworks = [ "IOSurface.framework" ]
@@ -74,10 +74,10 @@ index 3029fda279a6e2062115ac7fc7ade32e4a3aecd2..a76eb15b7498e13933331f221d8b7314
  
    if (is_win) {
 diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
-index 75d8a3fa0083a82587ba6d429286764db37ba84d..7643533c471d0ccbcc8a38dfc050bad1e41fe130 100644
+index 7ad4e9e5166265651ef50e3ee5488595ab97bc06..a10c3387aa8e81c7b02983e7bae9480a5354a0f3 100644
 --- a/content/browser/BUILD.gn
 +++ b/content/browser/BUILD.gn
-@@ -51,6 +51,7 @@ source_set("browser") {
+@@ -52,6 +52,7 @@ source_set("browser") {
      "//content:content_implementation",
      "//v8:external_startup_data",
    ]
@@ -86,7 +86,7 @@ index 75d8a3fa0083a82587ba6d429286764db37ba84d..7643533c471d0ccbcc8a38dfc050bad1
    libs = []
    frameworks = []
 diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
-index 0c72e7f246f3d0b46c4902dfbe0f9ec647e47c26..bd2afdf7630f4b3f5f2b99fe8d1bd226d3c7c6e0 100644
+index ddfe84e25422812bbf7f7b1a08cfb8534572f7bc..0cefb8fbe178e025dcb3d186473c8ecbada5e522 100644
 --- a/content/common/BUILD.gn
 +++ b/content/common/BUILD.gn
 @@ -182,6 +182,7 @@ source_set("common") {
@@ -98,10 +98,10 @@ index 0c72e7f246f3d0b46c4902dfbe0f9ec647e47c26..bd2afdf7630f4b3f5f2b99fe8d1bd226
    public_deps = [
      ":mojo_bindings",
 diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
-index 5ab406dbebe5c159c6e209f8844bf6fabd47199f..224c45b7bff3c4073c70bbd8bdc1fd1c508c37a3 100644
+index 697fa7c5e98e7ee16b1b5e676f60a9689f7aac2b..f5e7278a6e391cbab61bbd2981127beb4c624214 100644
 --- a/content/renderer/BUILD.gn
 +++ b/content/renderer/BUILD.gn
-@@ -225,6 +225,7 @@ target(link_target_type, "renderer") {
+@@ -224,6 +224,7 @@ target(link_target_type, "renderer") {
    }
  
    configs += [ "//content:content_implementation" ]
@@ -110,10 +110,10 @@ index 5ab406dbebe5c159c6e209f8844bf6fabd47199f..224c45b7bff3c4073c70bbd8bdc1fd1c
  
    public_deps = [
 diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
-index e08104a1a983176406483d97f8affa0c88b33a7a..a41b409ce8f08e20375504b324df7e1e75f6684d 100644
+index 810032493d005228fb9c49b924f91c247f6a9de2..46baa84dd5c05b185e8ea7ea7ea44a441056b9f1 100644
 --- a/content/test/BUILD.gn
 +++ b/content/test/BUILD.gn
-@@ -484,6 +484,7 @@ static_library("test_support") {
+@@ -480,6 +480,7 @@ static_library("test_support") {
    configs += [
      "//build/config:precompiled_headers",
      "//v8:external_startup_data",
@@ -122,10 +122,10 @@ index e08104a1a983176406483d97f8affa0c88b33a7a..a41b409ce8f08e20375504b324df7e1e
  
    public_deps = [
 diff --git a/content/web_test/BUILD.gn b/content/web_test/BUILD.gn
-index 5cd75b5bd5dcf31b6a589f69c1086b429c533923..924b5205cd38a80db38d505d8fd9263da77bf3af 100644
+index e2a496c7be6045d0a69d4fdf227e4951602620ae..1fa040e47d6acdfcac203e30af88d5ac2db6e03f 100644
 --- a/content/web_test/BUILD.gn
 +++ b/content/web_test/BUILD.gn
-@@ -145,6 +145,8 @@ static_library("web_test_browser") {
+@@ -147,6 +147,8 @@ static_library("web_test_browser") {
      "browser/web_test_tts_platform.h",
    ]
  
@@ -135,7 +135,7 @@ index 5cd75b5bd5dcf31b6a589f69c1086b429c533923..924b5205cd38a80db38d505d8fd9263d
      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 003a2504dd6810160924065e3acd65e6703fdcba..d9e0c2e88d55fe82c6ae98aef0adecf01d88a4fc 100644
+index 6a662873b042a50f052e88bc849e3ef623963961..8b429cb2a5d6cd4555d7d56d3b072b05f87a30e6 100644
 --- a/device/bluetooth/BUILD.gn
 +++ b/device/bluetooth/BUILD.gn
 @@ -242,6 +242,7 @@ component("bluetooth") {
@@ -159,7 +159,7 @@ index 090bbd6f03c5749aaf763dac9e52c776f366c33d..5143231f5b3c95f55bf12aaedf253781
    if (is_ios) {
      sources += [ "image_transport_surface_ios.mm" ]
 diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
-index e938775a9f4eccc31a6bc616cd25d45660d563cd..e232fff1f156844ba4c2919112f26bae9e1867c6 100644
+index c07f39acf8a733780b325b17d19718346136712d..c174e10763e8753257c7ebed6eee1fb6df818559 100644
 --- a/media/audio/BUILD.gn
 +++ b/media/audio/BUILD.gn
 @@ -206,6 +206,7 @@ source_set("audio") {
@@ -184,10 +184,10 @@ index f36bf682ffdeaf69da34a4f9e18465dde4e3a9a3..7f1a6fb71f78855bc771ee533b1715b2
  
  # The standard API of net/dns.
 diff --git a/sandbox/mac/BUILD.gn b/sandbox/mac/BUILD.gn
-index 5e9fc18352d1bf0939f8366d2282b49aeb307994..69dcc2cafa27b3d8bdf3fe8d0a22a98050bb3cc6 100644
+index 299a028f23314f479d2da8f914a5bdf34698d854..672dcb04dd3cf4e3cc71403f727a1dde91ad4402 100644
 --- a/sandbox/mac/BUILD.gn
 +++ b/sandbox/mac/BUILD.gn
-@@ -37,6 +37,7 @@ component("seatbelt") {
+@@ -39,6 +39,7 @@ component("seatbelt") {
    ]
    public_deps = [ "//third_party/protobuf:protobuf_lite" ]
    defines = [ "SEATBELT_IMPLEMENTATION" ]
@@ -195,7 +195,7 @@ index 5e9fc18352d1bf0939f8366d2282b49aeb307994..69dcc2cafa27b3d8bdf3fe8d0a22a980
  }
  
  component("seatbelt_extension") {
-@@ -50,6 +51,7 @@ component("seatbelt_extension") {
+@@ -52,6 +53,7 @@ component("seatbelt_extension") {
    libs = [ "sandbox" ]
    public_deps = [ "//base" ]
    defines = [ "SEATBELT_IMPLEMENTATION" ]
@@ -203,7 +203,7 @@ index 5e9fc18352d1bf0939f8366d2282b49aeb307994..69dcc2cafa27b3d8bdf3fe8d0a22a980
  }
  
  component("system_services") {
-@@ -64,6 +66,7 @@ component("system_services") {
+@@ -66,6 +68,7 @@ component("system_services") {
    deps = [ ":seatbelt_export" ]
    public_deps = [ "//base" ]
    defines = [ "SEATBELT_IMPLEMENTATION" ]
@@ -212,10 +212,10 @@ index 5e9fc18352d1bf0939f8366d2282b49aeb307994..69dcc2cafa27b3d8bdf3fe8d0a22a980
  
  source_set("sandbox_unittests") {
 diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
-index 77c1ee82fc5cca302148445fb6f2f975bb41c23e..90ab237f45e751b95b061146bb3f3f9a87763c1d 100644
+index 2e6598b26ca41f973c4a84578b82f52895cdf065..8825ce847e5da43d7fd659329ddd7c5ad113d730 100644
 --- a/third_party/blink/renderer/core/BUILD.gn
 +++ b/third_party/blink/renderer/core/BUILD.gn
-@@ -309,6 +309,7 @@ component("core") {
+@@ -311,6 +311,7 @@ component("core") {
    configs -= core_config_remove
    configs += core_config_add
    configs += [ "//v8:external_startup_data" ]
@@ -249,7 +249,7 @@ index 4e23c38763184840a393589b3f55dcabb0db8121..e4ad30d0d7acecdca3a22fe05935a340
  
      if (use_atk) {
 diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
-index ebdd885b00da86656bec13fb45a763ef49209d3e..614d07f318870db973f47d41f935c03f08970736 100644
+index 39a960146504ac6034fe24593006d09ff9c667ac..67d0b5c26ef4788559efc696656dc88fc5b7e637 100644
 --- a/ui/base/BUILD.gn
 +++ b/ui/base/BUILD.gn
 @@ -359,6 +359,7 @@ component("base") {
@@ -276,7 +276,7 @@ index a8c6d49637a53961d1e16521ae569c3f03fd1e8a..b36e64816bb296e53479c5666ab418fd
  
    if (is_win) {
 diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
-index ebd698116ef4f88c3bbaea1b02912bbeddbca34f..e096f9371607a088250e1ea72f450f85b092a3ec 100644
+index 9161edba8266e83480da3c04b63d64a6532517c9..2eb1d7637aede0e783cdddc04773015d4c70ecfd 100644
 --- a/ui/gfx/BUILD.gn
 +++ b/ui/gfx/BUILD.gn
 @@ -204,6 +204,7 @@ component("gfx") {
@@ -288,7 +288,7 @@ index ebd698116ef4f88c3bbaea1b02912bbeddbca34f..e096f9371607a088250e1ea72f450f85
    if (is_win) {
      sources += [
 diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
-index 3deb7d15b80319596e0be663fb0883ee27dd9d1d..017641614e530a5296599578f4ba80eece996b95 100644
+index d69a544d0971b776e59c0980b61961e7a0f83cac..2b4c4405911eba5f8cbb9dadb98e3b0224f1a938 100644
 --- a/ui/views/BUILD.gn
 +++ b/ui/views/BUILD.gn
 @@ -684,6 +684,7 @@ component("views") {
@@ -299,7 +299,7 @@ index 3deb7d15b80319596e0be663fb0883ee27dd9d1d..017641614e530a5296599578f4ba80ee
    }
  
    if (is_win) {
-@@ -1110,6 +1111,8 @@ source_set("test_support") {
+@@ -1113,6 +1114,8 @@ source_set("test_support") {
      "//testing/gtest",
    ]
  

+ 21 - 21
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 44ab3ea5a90eb31e2bea636c7d7a9aedc4b1823a..82d197413d990a8f08f25498a66f5097681b2793 100644
+index fe69db83393efd0a4b886761dce4b7ead3c4c7d0..f2e623cd6ed7eb910216ff4e32686f9124762d81 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -8119,6 +8119,7 @@ void RenderFrameHostImpl::CreateNewWindow(
+@@ -8231,6 +8231,7 @@ void RenderFrameHostImpl::CreateNewWindow(
            last_committed_origin_, params->window_container_type,
            params->target_url, params->referrer.To<Referrer>(),
            params->frame_name, params->disposition, *params->features,
@@ -21,10 +21,10 @@ index 44ab3ea5a90eb31e2bea636c7d7a9aedc4b1823a..82d197413d990a8f08f25498a66f5097
            &no_javascript_access);
  
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 355f0d796d3c6f0481a1a807b4f22113e09c8029..6354e6152d281d06fcd85c61b76d836bd5043e1a 100644
+index eab88872f0cee9f2fa208031684b0ed0018333d4..59701b5246e2d07662fb0072b77f3d73ab5df49d 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -4371,6 +4371,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -4487,6 +4487,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
  
    auto* new_contents_impl = new_contents.get();
  
@@ -37,7 +37,7 @@ index 355f0d796d3c6f0481a1a807b4f22113e09c8029..6354e6152d281d06fcd85c61b76d836b
    // 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
-@@ -4412,12 +4418,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -4528,12 +4534,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
      AddWebContentsDestructionObserver(new_contents_impl);
    }
  
@@ -51,10 +51,10 @@ index 355f0d796d3c6f0481a1a807b4f22113e09c8029..6354e6152d281d06fcd85c61b76d836b
                               new_contents_impl, opener, params.target_url,
                               params.referrer.To<Referrer>(), params.disposition,
 diff --git a/content/common/frame.mojom b/content/common/frame.mojom
-index e1d6dffca2e718f9e9b67525a1fe09abedfe077c..702fa0c351eada9c6de5d25f3ef2375db32fe595 100644
+index 40c14e1757dee4fda9aa79f3a52532f8ab737a97..2c833d683b737bd6b24d2ec10d97b46d2c9fcdb0 100644
 --- a/content/common/frame.mojom
 +++ b/content/common/frame.mojom
-@@ -589,6 +589,10 @@ struct CreateNewWindowParams {
+@@ -598,6 +598,10 @@ struct CreateNewWindowParams {
    // The navigation initiator's user activation and ad status.
    blink.mojom.NavigationInitiatorActivationAndAdStatus
        initiator_activation_and_ad_status;
@@ -66,10 +66,10 @@ index e1d6dffca2e718f9e9b67525a1fe09abedfe077c..702fa0c351eada9c6de5d25f3ef2375d
  
  // 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 5733e6d1ea77f85c428df07eb444391447b79e80..89eccdb2e2f429fb1a9c3d2994fd03bdda45ccb8 100644
+index dcdc54f90f114cdef17ae59e579493fe4278c5c8..72d942d2aea9369f319308fc01e6366ebd0f2612 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
-@@ -708,6 +708,8 @@ bool ContentBrowserClient::CanCreateWindow(
+@@ -715,6 +715,8 @@ bool ContentBrowserClient::CanCreateWindow(
      const std::string& frame_name,
      WindowOpenDisposition disposition,
      const blink::mojom::WindowFeatures& features,
@@ -79,7 +79,7 @@ index 5733e6d1ea77f85c428df07eb444391447b79e80..89eccdb2e2f429fb1a9c3d2994fd03bd
      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 8b4b26ed9f976438754c5ada0bd6193cf02891a5..48f2887b6c7181aae3d4cc6a87578d4f876ee79f 100644
+index 06e22b37dfbcefb71f0dc3705f7ab50a27487ff0..5266731678dbfe5fe66ff863b88325546c255be8 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
 @@ -177,6 +177,7 @@ class NetworkService;
@@ -90,7 +90,7 @@ index 8b4b26ed9f976438754c5ada0bd6193cf02891a5..48f2887b6c7181aae3d4cc6a87578d4f
  }  // namespace network
  
  namespace sandbox {
-@@ -1128,6 +1129,8 @@ class CONTENT_EXPORT ContentBrowserClient {
+@@ -1142,6 +1143,8 @@ class CONTENT_EXPORT ContentBrowserClient {
        const std::string& frame_name,
        WindowOpenDisposition disposition,
        const blink::mojom::WindowFeatures& features,
@@ -100,7 +100,7 @@ index 8b4b26ed9f976438754c5ada0bd6193cf02891a5..48f2887b6c7181aae3d4cc6a87578d4f
        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 688fac1fd874438ad9bc6494691b0eadca7e5bb2..db12930a449b38966e63c2274275b1157f38bea7 100644
+index fdcd738fb91ef8b0a341d24496913196dcc3047a..fc19223c3fe7d675c00d26df35fc21dfbc3e15ec 100644
 --- a/content/public/browser/web_contents_delegate.cc
 +++ b/content/public/browser/web_contents_delegate.cc
 @@ -29,6 +29,17 @@ namespace content {
@@ -122,7 +122,7 @@ index 688fac1fd874438ad9bc6494691b0eadca7e5bb2..db12930a449b38966e63c2274275b115
                                                   const OpenURLParams& params) {
    return nullptr;
 diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
-index 0fa12e6a5dd2eb2cd2102919f6127731e8500133..64ac8d677a9f7a723c46bbf0e74595b3c2866136 100644
+index a3da78805b9bc36d433861f7769dfdb943f43b6c..7400c6f7f50ae8fef6646590fab3e4186f911f67 100644
 --- a/content/public/browser/web_contents_delegate.h
 +++ b/content/public/browser/web_contents_delegate.h
 @@ -16,6 +16,7 @@
@@ -148,10 +148,10 @@ index 0fa12e6a5dd2eb2cd2102919f6127731e8500133..64ac8d677a9f7a723c46bbf0e74595b3
    // 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 47a2bc8e75e24ca61772f65140bbb2f868e63788..925b1a7b72bba63a2f2f10da9da1814ff94711e0 100644
+index d7c6222c977058f230d5e6153b1df13e127a9939..47562a65e99b1bdbeca57f1ba69822df768c0291 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -6364,6 +6364,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
+@@ -6507,6 +6507,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
            request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
            GetWebFrame()->IsAdScriptInStack());
  
@@ -163,10 +163,10 @@ index 47a2bc8e75e24ca61772f65140bbb2f868e63788..925b1a7b72bba63a2f2f10da9da1814f
    // 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 4bb1004a8a06d54850b6278de934d5f7b3d82247..989e4e964f4f845f32008ea58bbf17b4c4c7e70b 100644
+index eee2ed58f7aec55f2ba7b407aa1b00981c02202d..2aa188ccf5e4099ed232f5789bd1a4bc5d53369d 100644
 --- a/content/web_test/browser/web_test_content_browser_client.cc
 +++ b/content/web_test/browser/web_test_content_browser_client.cc
-@@ -511,6 +511,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
+@@ -512,6 +512,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
      const std::string& frame_name,
      WindowOpenDisposition disposition,
      const blink::mojom::WindowFeatures& features,
@@ -176,10 +176,10 @@ index 4bb1004a8a06d54850b6278de934d5f7b3d82247..989e4e964f4f845f32008ea58bbf17b4
      bool opener_suppressed,
      bool* no_javascript_access) {
 diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h
-index cb46d458e97131cd9be38a6424558718e0b8542c..bcb3542c921d6f52d23bbfa9b02457704763366c 100644
+index 64566572e9119ffa6ff0f1b5e69476da935262c3..561fe713ffd6c286436dee47b4d1b38f86a9e596 100644
 --- a/content/web_test/browser/web_test_content_browser_client.h
 +++ b/content/web_test/browser/web_test_content_browser_client.h
-@@ -84,6 +84,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
+@@ -86,6 +86,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
                         const std::string& frame_name,
                         WindowOpenDisposition disposition,
                         const blink::mojom::WindowFeatures& features,
@@ -210,10 +210,10 @@ index bef5a989bac50c177f15f52fe87ac3790d553e85..65dcd2e3b51929400c8bfb6a98a4fb59
  
  }  // 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 cc84e51f5bb4fe4413faa69ae52c025c3b476a54..09599219703a682e565ae2d03b69211a1e564182 100644
+index 7405d410af1859db405f3cc7a2169f3aab597631..bb27d4350590bc7712a271567e1457e6551c7f7d 100644
 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc
 +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
-@@ -2165,6 +2165,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
+@@ -2175,6 +2175,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
    WebWindowFeatures window_features =
        GetWindowFeaturesFromString(features, entered_window);
  

+ 2 - 2
patches/chromium/chore_add_buildflag_guard_around_new_include.patch

@@ -9,10 +9,10 @@ This is an experimental commit; but if it's successful,
 This patch should be upstreamed and then removed from electron's code.
 
 diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
-index f6251860d8bd387b31e748ede3d4a4a0d5c1ff8c..ca4df8d7ebda791e55932eaf512215da55fbdf49 100644
+index d6d8db2ed2341c475d076bef227f2973d9bca609..372a9760aa87f0dd97e95d0006da428ea46422c7 100644
 --- a/chrome/browser/ui/views/frame/browser_view.h
 +++ b/chrome/browser/ui/views/frame/browser_view.h
-@@ -43,7 +43,6 @@
+@@ -41,7 +41,6 @@
  #include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h"
  #include "chrome/common/buildflags.h"
  #include "components/infobars/core/infobar_container.h"

+ 1 - 1
patches/chromium/chore_add_electron_deps_to_gitignores.patch

@@ -18,7 +18,7 @@ index 22417f27125a44d481483439066d73e60348b414..82e5084b0e12231e5cc96a38d99b7238
  /googleurl
  /gpu/gles2_conform_test
 diff --git a/third_party/.gitignore b/third_party/.gitignore
-index 2d9aed0c5f27d34e586180214028fb9c6af6fbb4..f3c8d474c067f7012b42be1491c1e1f96e8e810f 100644
+index 3674dd13b4b2325790fbbdffb8631842594f9f8b..c31304f547a8ad07d846ea2c054360745ea409fd 100644
 --- a/third_party/.gitignore
 +++ b/third_party/.gitignore
 @@ -51,6 +51,7 @@

+ 5 - 5
patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch

@@ -7,10 +7,10 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch
 actions in the non-client caption area.
 
 diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
-index d90c652d7c572686bf54c4d282960ea49525fd5a..73e76c0d940f09336bbec6db47f1afee5153ced0 100644
+index 6cee219cf9128453f1102fd95747bbdd40b549c7..3117036f80dfea71392db76f6cc2d6c31b97a148 100644
 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
 +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
-@@ -1213,6 +1213,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
+@@ -1214,6 +1214,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
    window()->SetProperty(aura::client::kHeadlessBoundsKey, bounds);
  }
  
@@ -22,7 +22,7 @@ index d90c652d7c572686bf54c4d282960ea49525fd5a..73e76c0d940f09336bbec6db47f1afee
  DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() {
    return new DesktopNativeCursorManagerWin();
 diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
-index 2e4bacce52a45b5d9d7829c1f88f82aa0bb1b4bb..f3537e89191bd2c6d9b06c9b741a168071eb8662 100644
+index 0a3dcdbba1d808605723ecbdddfe0d7952f236f2..12633f447e1cc9ee65e0b6f425709f75f3af8bf9 100644
 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
 +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
 @@ -261,6 +261,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@@ -34,10 +34,10 @@ index 2e4bacce52a45b5d9d7829c1f88f82aa0bb1b4bb..f3537e89191bd2c6d9b06c9b741a1680
    Widget* GetWidget();
    const Widget* GetWidget() const;
 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
-index 58bae1b8b09bb5d235e67b25e700928e833582ed..27471c4ab49a5d8982ab5201141526386fcc1703 100644
+index d46dd18609a4d14410a5cf973f9ec690e873051f..1bef90fe94f1024f4d9c1f198cd55ec150959821 100644
 --- a/ui/views/win/hwnd_message_handler.cc
 +++ b/ui/views/win/hwnd_message_handler.cc
-@@ -3260,15 +3260,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
+@@ -3093,15 +3093,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
        SetMsgHandled(FALSE);
      // We must let Windows handle the caption buttons if it's drawing them, or
      // they won't work.

+ 3 - 3
patches/chromium/chore_introduce_blocking_api_for_electron.patch

@@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
 of explicitly adding ScopedAllowBlocking calls as friends.
 
 diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
-index b0bd783057a77a6752729105c5ca9d12f5b14ab0..2b665e4f96d4a86fc77ffa1ddf4b83e0efd8130e 100644
+index 2c6f5bf5fc203f0d3b01c8d23b81434d68a3c57f..699e10d74fea4482925d6f7a270833991cdc03e7 100644
 --- a/base/threading/thread_restrictions.h
 +++ b/base/threading/thread_restrictions.h
 @@ -135,6 +135,7 @@ class KeyStorageLinux;
@@ -28,7 +28,7 @@ index b0bd783057a77a6752729105c5ca9d12f5b14ab0..2b665e4f96d4a86fc77ffa1ddf4b83e0
  namespace enterprise_connectors {
  class LinuxKeyRotationCommand;
  }  // namespace enterprise_connectors
-@@ -561,6 +565,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
+@@ -562,6 +566,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
    friend class ::DesktopNotificationBalloon;
    friend class ::FirefoxProfileLock;
    friend class ::GaiaConfig;
@@ -36,7 +36,7 @@ index b0bd783057a77a6752729105c5ca9d12f5b14ab0..2b665e4f96d4a86fc77ffa1ddf4b83e0
    friend class ::ProfileImpl;
    friend class ::ScopedAllowBlockingForProfile;
    friend class ::StartupTabProviderImpl;
-@@ -599,6 +604,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
+@@ -600,6 +605,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
    friend class crosapi::LacrosThreadTypeDelegate;
    friend class crypto::ScopedAllowBlockingForNSS;  // http://crbug.com/59847
    friend class drive::FakeDriveService;

+ 20 - 20
patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch

@@ -35,7 +35,7 @@ index 155296ba7ee5495be62045bc620bb1cd31d3ceb3..954efde9e7a58f8b556c6ceabb81643f
        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 878b5cfde7847990e41e1c5dc2de5c1d39c6c4d7..bc019bfb7540c38204316d46e9f46fe8b90395d4 100644
+index 6494db63fa65aea215dbc63283b9575f4ec2068c..d05ce515ee04544677894b116e479727c601d5f5 100644
 --- a/chrome/browser/ui/ash/ash_web_view_impl.cc
 +++ b/chrome/browser/ui/ash/ash_web_view_impl.cc
 @@ -104,10 +104,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
@@ -80,10 +80,10 @@ index aaaa61d5c3a1d5ade2fd355e38a3985ef5cc4e7d..b45746ba0f38a381a2ee5ca17f3a1685
    }
  
 diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
-index 9ba202563436566aa63897b9e702e131b4353664..2fc17060004f81ba3e4d203700c5a8b4d8a1e575 100644
+index bd2f3d64f3f382722a697d67e8b9adf4a29e028a..d7de167b805969194d79be5fa0418dede14222a5 100644
 --- a/chrome/browser/ui/browser.cc
 +++ b/chrome/browser/ui/browser.cc
-@@ -1885,12 +1885,11 @@ bool Browser::IsWebContentsCreationOverridden(
+@@ -1884,12 +1884,11 @@ bool Browser::IsWebContentsCreationOverridden(
      content::SiteInstance* source_site_instance,
      content::mojom::WindowContainerType window_container_type,
      const GURL& opener_url,
@@ -99,10 +99,10 @@ index 9ba202563436566aa63897b9e702e131b4353664..2fc17060004f81ba3e4d203700c5a8b4
  
  WebContents* Browser::CreateCustomWebContents(
 diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
-index db37e861d254661b75bbe5802aa9d12c4e07b015..b41cf4e90a014a331835299291665df43f367b44 100644
+index 654474036268324ff169a814c960f0ee83345872..d1bbc1c49b20e3f0eee2295a225aa39e57dbbcf9 100644
 --- a/chrome/browser/ui/browser.h
 +++ b/chrome/browser/ui/browser.h
-@@ -890,8 +890,7 @@ class Browser : public TabStripModelObserver,
+@@ -891,8 +891,7 @@ class Browser : public TabStripModelObserver,
        content::SiteInstance* source_site_instance,
        content::mojom::WindowContainerType window_container_type,
        const GURL& opener_url,
@@ -218,10 +218,10 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7
    void AddNewContents(content::WebContents* source,
                        std::unique_ptr<content::WebContents> new_contents,
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 4eb6047128a5cfdd1c6e62adbae7f662c477b6f1..0be596bc2bd91b0f3e76e76f329c0e8d6c2ec928 100644
+index 3f7181097becd1b6236f49e6b653b7d9e080d5c7..16adc4112b0e10fadd9c8af254e9e26f6e8e19e3 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -4278,8 +4278,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -4393,8 +4393,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
  
    if (delegate_ && delegate_->IsWebContentsCreationOverridden(
                         source_site_instance, params.window_container_type,
@@ -232,7 +232,7 @@ index 4eb6047128a5cfdd1c6e62adbae7f662c477b6f1..0be596bc2bd91b0f3e76e76f329c0e8d
          static_cast<WebContentsImpl*>(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 db12930a449b38966e63c2274275b1157f38bea7..2d770e9c0c88e5ad1fac15fd13b70e6b5be824c8 100644
+index fc19223c3fe7d675c00d26df35fc21dfbc3e15ec..45d8465bce348c2a631f0a464b3cd14401d33a0c 100644
 --- a/content/public/browser/web_contents_delegate.cc
 +++ b/content/public/browser/web_contents_delegate.cc
 @@ -137,8 +137,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
@@ -246,7 +246,7 @@ index db12930a449b38966e63c2274275b1157f38bea7..2d770e9c0c88e5ad1fac15fd13b70e6b
  }
  
 diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
-index 64ac8d677a9f7a723c46bbf0e74595b3c2866136..48098a18fda2461a0ef981023908ec86a41e4223 100644
+index 7400c6f7f50ae8fef6646590fab3e4186f911f67..1489dfcf8ea3d3181abe784556b40565cc335c02 100644
 --- a/content/public/browser/web_contents_delegate.h
 +++ b/content/public/browser/web_contents_delegate.h
 @@ -323,8 +323,7 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -260,10 +260,10 @@ index 64ac8d677a9f7a723c46bbf0e74595b3c2866136..48098a18fda2461a0ef981023908ec86
    // Allow delegate to creates a custom WebContents when
    // WebContents::CreateNewWindow() is called. This function is only called
 diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
-index b6413e636b411a525a27bef0ec1dd68a6f06c2b4..55e458137786a722bd07e203c572438ad41fce2d 100644
+index 871d4bf48e3267cb518ebf2d4b2aaebdf9f4b0dc..d1f434fd9e23a172928aed23ca194b0b7bc2d884 100644
 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
 +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
-@@ -207,8 +207,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
+@@ -213,8 +213,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
      content::SiteInstance* source_site_instance,
      content::mojom::WindowContainerType window_container_type,
      const GURL& opener_url,
@@ -274,10 +274,10 @@ index b6413e636b411a525a27bef0ec1dd68a6f06c2b4..55e458137786a722bd07e203c572438a
    // view is used for displaying embedded extension options, we want any
    // external links to be opened in a new tab, not in a new guest view so we
 diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h
-index 583da1abe9cb405dc02806564b99a4619fc81473..8131afeee37a60ae3b10731bc708efd99114838c 100644
+index 2578fa3fe9709cccd116290b4646c4426c41f8c8..32e7f992af1830e619b80f454051044ad80a77c2 100644
 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.h
 +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h
-@@ -61,8 +61,7 @@ class ExtensionOptionsGuest
+@@ -62,8 +62,7 @@ class ExtensionOptionsGuest
        content::SiteInstance* source_site_instance,
        content::mojom::WindowContainerType window_container_type,
        const GURL& opener_url,
@@ -288,10 +288,10 @@ index 583da1abe9cb405dc02806564b99a4619fc81473..8131afeee37a60ae3b10731bc708efd9
        content::RenderFrameHost* opener,
        content::SiteInstance* source_site_instance,
 diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
-index 0fc4a40faf0704f5a0115505de6ca730f9ec5b03..e2ebcdcdff27c6ca6c96367a7cbbd94121577e43 100644
+index 02f204564a67e7088fc5c84331df51ae461b0225..7640b0df6e30a58afa9ee41a7283cfe75b4c1e8b 100644
 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
 +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
-@@ -379,8 +379,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
+@@ -385,8 +385,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
      content::SiteInstance* source_site_instance,
      content::mojom::WindowContainerType window_container_type,
      const GURL& opener_url,
@@ -302,10 +302,10 @@ index 0fc4a40faf0704f5a0115505de6ca730f9ec5b03..e2ebcdcdff27c6ca6c96367a7cbbd941
  }
  
 diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
-index 2a2f0b6b44293e7a9b31598c8c5382c5618d71b5..6c87565980a28532eeb4a7b51ca1188c5c26378f 100644
+index a5066da1a593cfb9033b31dc45beed29bdc58410..563224db005f79b3f5f0d5a604d5be109c2c8e8d 100644
 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
 +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
-@@ -173,8 +173,7 @@ class MimeHandlerViewGuest
+@@ -174,8 +174,7 @@ class MimeHandlerViewGuest
        content::SiteInstance* source_site_instance,
        content::mojom::WindowContainerType window_container_type,
        const GURL& opener_url,
@@ -358,10 +358,10 @@ index 60acb83c8d76f71db689f9d188bb6e8f64a74ffb..aa6cee708d1e451b443bc26528b56cc8
          ->options()
          ->block_new_web_contents();
 diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
-index e236e1ac647004c4a91c7098d38572e22d0312da..92c2b13acd54a8aaa14d0d0bab4f93bbd5bfe5ef 100644
+index 31baf3534e7ddaa16a9dc6078ed816b9abe102a3..270bb9041b6812cbb95df46f8a0815020ab0ed97 100644
 --- a/ui/views/controls/webview/web_dialog_view.cc
 +++ b/ui/views/controls/webview/web_dialog_view.cc
-@@ -433,8 +433,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
+@@ -430,8 +430,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
      content::SiteInstance* source_site_instance,
      content::mojom::WindowContainerType window_container_type,
      const GURL& opener_url,
@@ -372,7 +372,7 @@ index e236e1ac647004c4a91c7098d38572e22d0312da..92c2b13acd54a8aaa14d0d0bab4f93bb
      return delegate_->HandleShouldOverrideWebContentsCreation();
    return false;
 diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
-index 517debd480aba9340f058c9b37bef0a56a171659..2815466b8041beda9f05b36b1ff9ca221a22558b 100644
+index 66fd14db447d27b457e04e51b5fe76b94eb2cd45..8082fd27b0ad1637ee41f787bd769511af9e40b1 100644
 --- a/ui/views/controls/webview/web_dialog_view.h
 +++ b/ui/views/controls/webview/web_dialog_view.h
 @@ -158,8 +158,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,

+ 22 - 0
patches/chromium/chore_remove_check_is_test_on_script_injection_tracker.patch

@@ -0,0 +1,22 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: John Kleinschmidt <[email protected]>
+Date: Mon, 30 Oct 2023 20:56:45 -0400
+Subject: chore: remove CHECK_IS_TEST on script injection tracker
+
+https://chromium-review.googlesource.com/c/chromium/src/+/4950530 added
+a check for test when the UserScriptManager is not available.  In
+Electron when a session is non persistent we do not initialize the
+ExtensionSystem, so this check is not relevant for Electron.
+
+diff --git a/extensions/browser/script_injection_tracker.cc b/extensions/browser/script_injection_tracker.cc
+index 3ae34e1d1fc791a74a2430076b4ff2ab7607a1e5..a336ee67f3f1ee7fbdb70053135a9caf4fa55173 100644
+--- a/extensions/browser/script_injection_tracker.cc
++++ b/extensions/browser/script_injection_tracker.cc
+@@ -176,7 +176,6 @@ std::vector<const UserScript*> GetLoadedDynamicScripts(
+   UserScriptManager* manager =
+       ExtensionSystem::Get(process.GetBrowserContext())->user_script_manager();
+   if (!manager) {
+-    CHECK_IS_TEST();
+     return std::vector<const UserScript*>();
+   }
+ 

+ 3 - 3
patches/chromium/command-ismediakey.patch

@@ -87,10 +87,10 @@ index 943168e2c72c0aeb59f1ea21b14f2dc8e6cfd7e0..db3ca2ed0ba0994caa4d26436b942166
    // Create an observer that registers a hot key for |accelerator|.
    std::unique_ptr<gfx::SingletonHwndHotKeyObserver> observer =
 diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
-index e5d2d8d5061926ca0507a6d1f5cc1d7ee29a8cb4..169a009fd62d677955ac67df086dd658f902560c 100644
+index 65fa0fdec6316183a0e13210c2860548adee68ae..fd95c8c5b62a447542e38bf69acc86303be8fd9a 100644
 --- a/content/browser/media/media_keys_listener_manager_impl.cc
 +++ b/content/browser/media/media_keys_listener_manager_impl.cc
-@@ -298,6 +298,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() {
+@@ -316,6 +316,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() {
        case ui::VKEY_MEDIA_STOP:
          system_media_controls_->SetIsStopEnabled(should_enable);
          break;
@@ -117,7 +117,7 @@ index db596585cbb44b3710636e3fc013f288966f604f..6d5557ee1a2c35ee15e695e024834184
  
  }  // namespace ui
 diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerators/media_keys_listener_mac.mm
-index 3450e36ba7d80ad36d12fc4b85130d985c2f247a..e81a45c1f038cb43b19aa0225fbcf4c35f280442 100644
+index a955d19eedfe56ae3a115ce4c77fea016fd66d49..ad2557495a02cae03dd2b87df8659a6f05f1beac 100644
 --- a/ui/base/accelerators/media_keys_listener_mac.mm
 +++ b/ui/base/accelerators/media_keys_listener_mac.mm
 @@ -32,6 +32,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {

+ 3 - 3
patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch

@@ -102,10 +102,10 @@ index c891c5649a6ae76c9f0f988359649ece0e8ac1d9..54e30c4dd82042c283e36cae767dcdd7
    friend class ContentClientCreator;
    friend class ContentClientInitializer;
 diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
-index 7b9a1f6ab9c32415b0ecc7be3017227f58c2547a..3d2f9832312919ca6b650d18efa36d78b7319665 100644
+index d60429bab364f63afacb5e022ebf4dc65fbcba07..439f215ac7ecac065fe504ba0365cff20ed9147a 100644
 --- a/gin/v8_initializer.cc
 +++ b/gin/v8_initializer.cc
-@@ -541,8 +541,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
+@@ -549,8 +549,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
  
  #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
  
@@ -115,7 +115,7 @@ index 7b9a1f6ab9c32415b0ecc7be3017227f58c2547a..3d2f9832312919ca6b650d18efa36d78
    if (g_mapped_snapshot) {
      // TODO(crbug.com/802962): Confirm not loading different type of snapshot
      // files in a process.
-@@ -551,10 +550,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
+@@ -559,10 +558,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
  
    base::MemoryMappedFile::Region file_region;
    base::File file =

+ 4 - 4
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 d8d68ec1ca1da4c6a14f2cacc3b0cec60b96ed7c..08ac09937dda4d8950b5086abac637afeb3daaba 100644
+index 36e307e4ad424d7295633dac5ee1e2392662a2f5..9c372f560819c915a3a8f4ce6872c685e2cef5f4 100644
 --- a/content/browser/service_worker/service_worker_context_wrapper.cc
 +++ b/content/browser/service_worker/service_worker_context_wrapper.cc
-@@ -1886,6 +1886,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
+@@ -1899,6 +1899,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
        loader_factory_bundle_info =
            context()->loader_factory_bundle_for_update_check()->Clone();
  
@@ -38,7 +38,7 @@ index d8d68ec1ca1da4c6a14f2cacc3b0cec60b96ed7c..08ac09937dda4d8950b5086abac637af
    if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
            browser_context(), scope)) {
      // If this is a Service Worker for a WebUI, the WebUI's URLDataSource
-@@ -1905,9 +1925,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
+@@ -1918,9 +1938,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
              features::kEnableServiceWorkersForChromeScheme) &&
          scope.scheme_piece() == kChromeUIScheme) {
        config->RegisterURLDataSource(browser_context());
@@ -49,7 +49,7 @@ index d8d68ec1ca1da4c6a14f2cacc3b0cec60b96ed7c..08ac09937dda4d8950b5086abac637af
            .emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
                                          browser_context(), kChromeUIScheme,
                                          base::flat_set<std::string>()));
-@@ -1915,9 +1933,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
+@@ -1928,9 +1946,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
                     features::kEnableServiceWorkersForChromeUntrusted) &&
                 scope.scheme_piece() == kChromeUIUntrustedScheme) {
        config->RegisterURLDataSource(browser_context());

+ 2 - 2
patches/chromium/dcheck.patch

@@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the
 failing checks and allow the rest of the target to have them enabled.
 
 diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
-index 16babc872edeaf5984f24c3944978b7f9bcd65f8..a34e59373912771fef75ec5129bbaf7920a0fe89 100644
+index 41f27ac3bc062c5549799622a9c23ef828cf7791..e87df727c4c4ef2ecd1c5928e2a09108dc682855 100644
 --- a/ui/base/clipboard/clipboard_win.cc
 +++ b/ui/base/clipboard/clipboard_win.cc
-@@ -907,10 +907,10 @@ SkBitmap ClipboardWin::ReadBitmapInternal(ClipboardBuffer buffer) const {
+@@ -913,10 +913,10 @@ SkBitmap ClipboardWin::ReadBitmapInternal(ClipboardBuffer buffer) const {
  
  void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
    UINT cf_format = format.ToFormatEtc().cfFormat;

+ 20 - 20
patches/chromium/disable_color_correct_rendering.patch

@@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
 https://crbug.com/634542 and https://crbug.com/711107.
 
 diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
-index 2f7c2546d8543d7b296e214c524c95dc290539ca..5a917617ec583ef4ae7a4eebbc43eeb67694a956 100644
+index b64603e6a4bb9fae95ea529f90d9ad589bce9284..ae831251bd2a950297e1f2e264db7e24e2dae6ce 100644
 --- a/cc/trees/layer_tree_host_impl.cc
 +++ b/cc/trees/layer_tree_host_impl.cc
-@@ -1868,6 +1868,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
+@@ -1869,6 +1869,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
  TargetColorParams LayerTreeHostImpl::GetTargetColorParams(
      gfx::ContentColorUsage content_color_usage) const {
    TargetColorParams params;
@@ -35,10 +35,10 @@ index 2f7c2546d8543d7b296e214c524c95dc290539ca..5a917617ec583ef4ae7a4eebbc43eeb6
    // If we are likely to software composite the resource, we use sRGB because
    // software compositing is unable to perform color conversion.
 diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
-index e0732ebde444ca3def954797b4266501c68a0c30..8621bcdc40b16a31fec8bf86a4018c4a74d0101f 100644
+index e43b58e7458336f914662d026a24e774fbe647ba..68c8f235f6afb412ebc65604c7b39109d9842d23 100644
 --- a/cc/trees/layer_tree_settings.h
 +++ b/cc/trees/layer_tree_settings.h
-@@ -102,6 +102,8 @@ class CC_EXPORT LayerTreeSettings {
+@@ -101,6 +101,8 @@ class CC_EXPORT LayerTreeSettings {
    bool use_rgba_4444 = false;
    bool unpremultiply_and_dither_low_bit_depth_tiles = false;
  
@@ -81,7 +81,7 @@ index e4deb71ea3afa1ef9d6ddac9c61f5916ff608514..d2e6854ac2aaa3cc83c0b72ebc03193b
        !command_line->HasSwitch(switches::kUIDisablePartialSwap);
  
 diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
-index 981c012dc8c3c8d1106c02570e75c7b065f6b814..02dbede2d9291a702dd3d692e849938e3f501761 100644
+index 7c0598fb3f9f08d8d9905c5487f3a128f1262b15..314d443a60d0c9093dd06cd1589ab639dc81fabf 100644
 --- a/content/browser/gpu/gpu_process_host.cc
 +++ b/content/browser/gpu/gpu_process_host.cc
 @@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -93,10 +93,10 @@ index 981c012dc8c3c8d1106c02570e75c7b065f6b814..02dbede2d9291a702dd3d692e849938e
      sandbox::policy::switches::kGpuSandboxAllowSysVShm,
      sandbox::policy::switches::kGpuSandboxFailuresFatal,
 diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
-index 20351961220004528837f16b5d858481f0b788aa..5f8e6a9e2d85611fa4bbfe62ecec4431905a9c4f 100644
+index 179b9a06569a038e95a44ca42e35bf368860f51e..8d2053315bfa2847c7c3602b87f9bd6458bd484d 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -3279,6 +3279,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
+@@ -3353,6 +3353,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
    // Propagate the following switches to the renderer command line (along
    // with any associated values) if present in the browser command line.
    static const char* const kSwitchNames[] = {
@@ -148,18 +148,18 @@ index 6892376fa33d006453977c354734d880a7ef7c91..4cd7b762d5fe1c54f5b06cc0d8f50560
  }
  
 diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
-index d6e88526b6cb21f3b2eb983a6d42066b6f2ab3c5..66ea1727f6609008425a47fc485ee71843983133 100644
+index b7e8b531371564695dd811ebba094b5f5cd4862b..051120e7988ab5168114ddfe6db2daf744e78fe6 100644
 --- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
 +++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
-@@ -29,6 +29,7 @@
- #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
+@@ -30,6 +30,7 @@
+ #include "third_party/blink/renderer/platform/web_test_support.h"
  #include "ui/base/ui_base_features.h"
  #include "ui/base/ui_base_switches.h"
 +#include "ui/gfx/switches.h"
  #include "ui/native_theme/native_theme_features.h"
  #include "ui/native_theme/overlay_scrollbar_constants_aura.h"
  
-@@ -328,6 +329,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
+@@ -336,6 +337,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
    settings.main_frame_before_activation_enabled =
        cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
  
@@ -170,18 +170,18 @@ index d6e88526b6cb21f3b2eb983a6d42066b6f2ab3c5..66ea1727f6609008425a47fc485ee718
    // is what the renderer uses if its not threaded.
    settings.enable_checker_imaging =
 diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
-index af19d04e043366a2db07bf6eddfd1fc260590a37..b981128498991ccd67a78bc255da53081ab1cdec 100644
+index 2f2eb750b71e6a219af9f8601c6053a9799a0044..928dc14ef709c0d4fcb3e5883fc073d00f91b7a9 100644
 --- a/ui/gfx/mac/io_surface.cc
 +++ b/ui/gfx/mac/io_surface.cc
-@@ -20,6 +20,7 @@
- #include "ui/gfx/buffer_format_util.h"
+@@ -21,6 +21,7 @@
  #include "ui/gfx/color_space.h"
  #include "ui/gfx/icc_profile.h"
+ #include "ui/gfx/mac/color_space_util.h"
 +#include "ui/gfx/switches.h"
  
  namespace gfx {
  
-@@ -146,6 +147,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) {
+@@ -147,6 +148,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) {
  // Common method used by IOSurfaceSetColorSpace and IOSurfaceCanSetColorSpace.
  bool IOSurfaceSetColorSpace(IOSurfaceRef io_surface,
                              const ColorSpace& color_space) {
@@ -196,7 +196,7 @@ index af19d04e043366a2db07bf6eddfd1fc260590a37..b981128498991ccd67a78bc255da5308
    // Allow but ignore invalid color spaces.
    if (!color_space.IsValid())
      return true;
-@@ -318,6 +327,15 @@ base::apple::ScopedCFTypeRef<IOSurfaceRef> CreateIOSurface(
+@@ -340,6 +349,15 @@ base::apple::ScopedCFTypeRef<IOSurfaceRef> CreateIOSurface(
      DCHECK_EQ(kIOReturnSuccess, r);
    }
  
@@ -210,10 +210,10 @@ index af19d04e043366a2db07bf6eddfd1fc260590a37..b981128498991ccd67a78bc255da5308
 +  }
 +
    // Ensure that all IOSurfaces start as sRGB.
-   IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB);
- 
+   IOSurfaceSetValue(surface.get(), CFSTR("IOSurfaceColorSpace"),
+                     kCGColorSpaceSRGB);
 diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc
-index 7a4c07887d822b5b3fdf700deeff04c377939647..c2f5c9a92a71b4d64beb8e625385cb12dfbcdadd 100644
+index 1bf6fffae161414d650be3210c427dcc47ac1cf8..64a6e263c693b17b26a538219ab681000b98cb9a 100644
 --- a/ui/gfx/switches.cc
 +++ b/ui/gfx/switches.cc
 @@ -13,6 +13,8 @@ namespace switches {
@@ -226,7 +226,7 @@ index 7a4c07887d822b5b3fdf700deeff04c377939647..c2f5c9a92a71b4d64beb8e625385cb12
  // sharpness, kerning, hinting and layout.
  const char kDisableFontSubpixelPositioning[] =
 diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h
-index fa6a82887fc5e069b261aeda594d6027dbcc35a4..5d4c2551088d4d4db5d490b596344f43ecfc59cb 100644
+index 98697d908f507e30ffbe0e5f5996afb7856f7c12..039024924c7fc10d8311746b88369dec1732a9d0 100644
 --- a/ui/gfx/switches.h
 +++ b/ui/gfx/switches.h
 @@ -13,6 +13,7 @@

+ 2 - 2
patches/chromium/disable_compositor_recycling.patch

@@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
 Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
 
 diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
-index d9888a6c4bc5b6e6a386aeebd035cdc7a626e40c..9ea8e79e142a03cf7b5d101ae795594df137ca30 100644
+index 6800be4c8a0a6355318bd85c010189ec6c5d530b..00b9249d9892315d826acfc2337a34e82955a4b2 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
-@@ -558,7 +558,11 @@
+@@ -556,7 +556,11 @@
      return;
  
    host()->WasHidden();

+ 2 - 2
patches/chromium/disable_freezing_flags_after_init_in_node.patch

@@ -15,10 +15,10 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor
 node initialization to not update flags after V8 initialization.
 
 diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
-index 82d45115a964310fdccdedb03e542d417e632e6a..1b8f927f7a9b79d25178179205ddb63f8c425126 100644
+index be1f39d4038a80b9d73ae0cb0a6709d280501bd4..d3ae9bcab7e28145c3c196f6c5bba56597c29ee4 100644
 --- a/content/renderer/render_process_impl.cc
 +++ b/content/renderer/render_process_impl.cc
-@@ -212,6 +212,9 @@ RenderProcessImpl::RenderProcessImpl()
+@@ -224,6 +224,9 @@ RenderProcessImpl::RenderProcessImpl()
      v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag));
    }
  

+ 6 - 6
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 d7b85d4a6adbe718fe5a219a5c273d05676c3ec6..b85d2f53e55131491c32eff5475cffa7c9d65e25 100644
+index a1ce7be62ca99bf8fecc750c781e18b282c12772..895f5126806b557c853f163fe69459ea929f11a4 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -807,6 +807,9 @@ void RenderWidgetHostImpl::WasHidden() {
+@@ -818,6 +818,9 @@ void RenderWidgetHostImpl::WasHidden() {
      return;
    }
  
@@ -20,10 +20,10 @@ index d7b85d4a6adbe718fe5a219a5c273d05676c3ec6..b85d2f53e55131491c32eff5475cffa7
        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 5c042eea04022ed4e74b5b4796e60de7bbb4137e..9ba426de189921774e47e6e5b4763bae602f6532 100644
+index 28001459e1357d9c14b240d6a729484b5a7e4eff..d194945e1f9d30a85d2bcd8482b7094ad1684cef 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.h
 +++ b/content/browser/renderer_host/render_widget_host_impl.h
-@@ -905,6 +905,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
+@@ -911,6 +911,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
    void UpdateBrowserControlsState(cc::BrowserControlsState constraints,
                                    cc::BrowserControlsState current,
                                    bool animate);
@@ -33,10 +33,10 @@ index 5c042eea04022ed4e74b5b4796e60de7bbb4137e..9ba426de189921774e47e6e5b4763bae
    void StartDragging(blink::mojom::DragDataPtr drag_data,
                       const url::Origin& source_origin,
 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 98746fea627ab5319cd9b66e203738a270e27f17..b7d50b6286ac90ab06089f75f0b9d0b7b02bbf6c 100644
+index 96dbd73ff09724236d912382409e0166ba6777ff..2b7a01cd1e7637031bbd28ba32f332f9f97456f1 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
-@@ -624,7 +624,7 @@ void RenderWidgetHostViewAura::HideImpl() {
+@@ -625,7 +625,7 @@ void RenderWidgetHostViewAura::HideImpl() {
    DCHECK(visibility_ == Visibility::HIDDEN ||
           visibility_ == Visibility::OCCLUDED);
  

+ 3 - 3
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 9bd88230899f28ca20d98265f11e01ef94d4563d..21c6993d6bccdd10e5b12f524ea5168226123480 100644
+index 607f7aa461ac881f1fe83e6c37092993231f145b..f3c4d0e78e352f32b3c3cb179327909e750826f4 100644
 --- a/content/browser/renderer_host/navigator.cc
 +++ b/content/browser/renderer_host/navigator.cc
-@@ -1299,6 +1299,7 @@ void Navigator::RecordNavigationMetrics(
+@@ -1305,6 +1305,7 @@ void Navigator::RecordNavigationMetrics(
              .InMilliseconds());
    }
  
@@ -35,7 +35,7 @@ index 9bd88230899f28ca20d98265f11e01ef94d4563d..21c6993d6bccdd10e5b12f524ea51682
    // 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 &&
-@@ -1348,6 +1349,7 @@ void Navigator::RecordNavigationMetrics(
+@@ -1354,6 +1355,7 @@ void Navigator::RecordNavigationMetrics(
           first_before_unload_start_time)
              .InMilliseconds());
    }

+ 4 - 4
patches/chromium/enable_reset_aspect_ratio.patch

@@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0
 Make SetAspectRatio accept 0 as valid input, which would reset to null.
 
 diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
-index 53c1d25e3f56daa9d7929089620c9df7971ceda6..d90c652d7c572686bf54c4d282960ea49525fd5a 100644
+index 803d1c68db639ca67beacb06c6b06863ba60c325..6cee219cf9128453f1102fd95747bbdd40b549c7 100644
 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
 +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
-@@ -570,7 +570,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
+@@ -571,7 +571,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
  void DesktopWindowTreeHostWin::SetAspectRatio(
      const gfx::SizeF& aspect_ratio,
      const gfx::Size& excluded_margin) {
@@ -19,10 +19,10 @@ index 53c1d25e3f56daa9d7929089620c9df7971ceda6..d90c652d7c572686bf54c4d282960ea4
                                     excluded_margin);
  }
 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
-index f43aa724b2a8edf89284e4b3b8301fb939a07c97..130f0ee5def53883b07817a7f2ce7b8e7865b5bf 100644
+index b8f58a147c75131714ca1b838d86f44b62df2377..119b064245985ce798ea6293aa9c256a6f878126 100644
 --- a/ui/views/win/hwnd_message_handler.cc
 +++ b/ui/views/win/hwnd_message_handler.cc
-@@ -1156,8 +1156,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
+@@ -938,8 +938,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
  
  void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
                                          const gfx::Size& excluded_margin) {

+ 0 - 73
patches/chromium/ensure_messageports_get_gced_when_not_referenced.patch

@@ -1,73 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Yoav Weiss <[email protected]>
-Date: Mon, 9 Oct 2023 14:21:44 +0000
-Subject: Ensure MessagePorts get GCed when not referenced
-
-[1] regressed MessagePort memory and caused them to no longer be
-collected after not being referenced.
-This CL fixes that by turning the mutual pointers between attached
-MessagePorts to be WeakMembers.
-
-[1] https://chromium-review.googlesource.com/4919476
-
-Bug: 1487835
-Change-Id: Icd7eba09a217ad5d588958504d5c4794d7d8a295
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4919476
-Commit-Queue: Yoav Weiss <[email protected]>
-Reviewed-by: Michael Lippautz <[email protected]>
-Cr-Commit-Position: refs/heads/main@{#1207067}
-
-diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
-index 0fd5bbf170efa02d3e710de3cb6733158faec858..15f5f0f6aa05d3b17adae87286c92df9cc26a712 100644
---- a/third_party/blink/renderer/core/messaging/message_port.cc
-+++ b/third_party/blink/renderer/core/messaging/message_port.cc
-@@ -162,8 +162,10 @@ MessagePortChannel MessagePort::Disentangle() {
-   DCHECK(!IsNeutered());
-   port_descriptor_.GiveDisentangledHandle(connector_->PassMessagePipe());
-   connector_ = nullptr;
--  if (initially_entangled_port_) {
--    initially_entangled_port_->OnEntangledPortDisconnected();
-+  // Using a variable here places the WeakMember pointer on the stack, ensuring
-+  // it doesn't get GCed while it's being used.
-+  if (auto* entangled_port = initially_entangled_port_.Get()) {
-+    entangled_port->OnEntangledPortDisconnected();
-   }
-   OnEntangledPortDisconnected();
-   return MessagePortChannel(std::move(port_descriptor_));
-@@ -340,7 +342,10 @@ bool MessagePort::Accept(mojo::Message* mojo_message) {
-   // lifetime of this function.
-   std::unique_ptr<scheduler::TaskAttributionTracker::TaskScope>
-       task_attribution_scope;
--  if (initially_entangled_port_ && message.sender_origin &&
-+  // Using a variable here places the WeakMember pointer on the stack, ensuring
-+  // it doesn't get GCed while it's being used.
-+  auto* entangled_port = initially_entangled_port_.Get();
-+  if (entangled_port && message.sender_origin &&
-       message.sender_origin->IsSameOriginWith(context->GetSecurityOrigin()) &&
-       context->IsSameAgentCluster(message.sender_agent_cluster_id) &&
-       context->IsWindow()) {
-@@ -364,9 +369,9 @@ bool MessagePort::Accept(mojo::Message* mojo_message) {
-               ThreadScheduler::Current()->GetTaskAttributionTracker()) {
-         // Since `initially_entangled_port_` is not nullptr, neither should be
-         // its `post_message_task_container_`.
--        CHECK(initially_entangled_port_->post_message_task_container_);
-+        CHECK(entangled_port->post_message_task_container_);
-         scheduler::TaskAttributionInfo* parent_task =
--            initially_entangled_port_->post_message_task_container_
-+            entangled_port->post_message_task_container_
-                 ->GetAndDecrementPostMessageTask(message.parent_task_id);
-         task_attribution_scope = tracker->CreateTaskScope(
-             script_state, parent_task,
-diff --git a/third_party/blink/renderer/core/messaging/message_port.h b/third_party/blink/renderer/core/messaging/message_port.h
-index 98ed58a9a765f5101d9b421507bf25db4359d7e5..a178d15c11b1e5fb1ff74d182021fe39e9d9b107 100644
---- a/third_party/blink/renderer/core/messaging/message_port.h
-+++ b/third_party/blink/renderer/core/messaging/message_port.h
-@@ -195,7 +195,7 @@ class CORE_EXPORT MessagePort : public EventTarget,
- 
-   // The entangled port. Only set on initial entanglement, and gets unset as
-   // soon as the ports are disentangled.
--  Member<MessagePort> initially_entangled_port_;
-+  WeakMember<MessagePort> initially_entangled_port_;
- 
-   Member<PostMessageTaskContainer> post_message_task_container_;
- };

+ 2 - 2
patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch

@@ -9,7 +9,7 @@ correctly tagged with MAP_JIT we need to use gins page allocator instead
 of the default V8 allocator.  This probably can't be usptreamed.
 
 diff --git a/gin/public/v8_platform.h b/gin/public/v8_platform.h
-index df59829cbb31a5a7d8aa72df6dd8a9e623cbf60a..841cf5877f199bd77e4c84921ddddf83bf849d8a 100644
+index cec5e3b283343586ba846a4ce58fee34e8542164..09ec66b75113d6a934d51ee5aad684281be61e8f 100644
 --- a/gin/public/v8_platform.h
 +++ b/gin/public/v8_platform.h
 @@ -32,6 +32,7 @@ class GIN_EXPORT V8Platform : public v8::Platform {
@@ -21,7 +21,7 @@ index df59829cbb31a5a7d8aa72df6dd8a9e623cbf60a..841cf5877f199bd77e4c84921ddddf83
    ThreadIsolatedAllocator* GetThreadIsolatedAllocator() override;
  #endif
 diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
-index 2491bf34cffd22f580d1c18bedfcf061e84abc4c..73469c926f69b4a7b7e982263307b2aab24c81a6 100644
+index a31b05d93b3728a17ebf6b78f0c01a20e0c6f250..9e88ea2190aec8f8ba962dd19a00e7c0cd9402d5 100644
 --- a/gin/v8_platform.cc
 +++ b/gin/v8_platform.cc
 @@ -338,6 +338,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() {

+ 8 - 8
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 f2b36dbd52bc59928ea14b6adb30005f6505ab19..36c07c1a0371274ff93a86e388b2a6d541cdf614 100644
+index f07572030e7b80fdc2c0563606e0b3eecb6b9ee3..7caf22bd77afac6e699fe1d492796a33842ea204 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
-@@ -1558,6 +1558,13 @@ void NetworkContext::SetNetworkConditions(
+@@ -1562,6 +1562,13 @@ void NetworkContext::SetNetworkConditions(
                                        std::move(network_conditions));
  }
  
@@ -51,10 +51,10 @@ index f2b36dbd52bc59928ea14b6adb30005f6505ab19..36c07c1a0371274ff93a86e388b2a6d5
    // 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 c81ae450479d994a89f4d9560028ecd761e8e74f..eb181df1e63fe10734f4eb7d39a28705affa0bca 100644
+index 49d3215854977cbe78dff2909739646f0c40dad9..93ed007eb4ed65625d1c7edac240f138ea89a551 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
-@@ -316,6 +316,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -317,6 +317,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 c81ae450479d994a89f4d9560028ecd761e8e74f..eb181df1e63fe10734f4eb7d39a28705
    void SetEnableReferrers(bool enable_referrers) override;
  #if BUILDFLAG(IS_CHROMEOS)
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index 5d20e33a59de709a8e21630de2e1c357c5a68dfd..b736e555a1ce8ba513fe94ef8f52d95c4b7b120e 100644
+index cda826721b166691f270dd9b28aacec1ce396d2b..7eb6a0b5e9471f605baae703ef654c61144cb39f 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -1240,6 +1240,9 @@ interface NetworkContext {
+@@ -1245,6 +1245,9 @@ interface NetworkContext {
    SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
                         NetworkConditions? conditions);
  
@@ -77,10 +77,10 @@ index 5d20e33a59de709a8e21630de2e1c357c5a68dfd..b736e555a1ce8ba513fe94ef8f52d95c
    SetAcceptLanguage(string new_accept_language);
  
 diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
-index 02081b463da906f74a86eed381c5323717d67b7c..7a5c1fd375e0dc5da6bb877d8f4c06905bea9211 100644
+index b7b485b79ccbd1dd32f2777c4b54856c5dc5ea97..568524abba08fc0a4b0ce817593b7412dbb21ab8 100644
 --- a/services/network/test/test_network_context.h
 +++ b/services/network/test/test_network_context.h
-@@ -144,6 +144,7 @@ class TestNetworkContext : public mojom::NetworkContext {
+@@ -145,6 +145,7 @@ class TestNetworkContext : public mojom::NetworkContext {
    void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
    void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
                              mojom::NetworkConditionsPtr conditions) override {}

+ 3 - 3
patches/chromium/extend_apply_webpreferences.patch

@@ -12,10 +12,10 @@ Ideally we could add an embedder observer pattern here but that can be
 done in future work.
 
 diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
-index 371f7dbc063619dbadc2b58a84eb65d0837de9d1..78ce0161ca76e21a23b566be67e0476f44ab197d 100644
+index 70953a480dbc71594e292609ebd327c9b1c685af..cf7077949d5d04d8aef22ed29bb1b13315d706f7 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
-@@ -165,6 +165,7 @@
+@@ -166,6 +166,7 @@
  #include "third_party/blink/renderer/core/view_transition/view_transition_supplement.h"
  #include "third_party/blink/renderer/platform/fonts/font_cache.h"
  #include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h"
@@ -23,7 +23,7 @@ index 371f7dbc063619dbadc2b58a84eb65d0837de9d1..78ce0161ca76e21a23b566be67e0476f
  #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"
-@@ -1786,6 +1787,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
+@@ -1788,6 +1789,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
  #if BUILDFLAG(IS_MAC)
    web_view_impl->SetMaximumLegibleScale(
        prefs.default_maximum_page_scale_factor);

+ 3 - 3
patches/chromium/feat_add_onclose_to_messageport.patch

@@ -10,10 +10,10 @@ get this standardised, but in lieu of that, this makes MessagePort a
 whole bunch more useful!
 
 diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
-index 1d75181438c3219aa984bc87051df3e938b65211..0fd5bbf170efa02d3e710de3cb6733158faec858 100644
+index 5d7780c48a74fc7d95aeb690c90ab394b1e01a83..15f5f0f6aa05d3b17adae87286c92df9cc26a712 100644
 --- a/third_party/blink/renderer/core/messaging/message_port.cc
 +++ b/third_party/blink/renderer/core/messaging/message_port.cc
-@@ -193,6 +193,7 @@ void MessagePort::close() {
+@@ -195,6 +195,7 @@ void MessagePort::close() {
      Entangle(pipe.TakePort0(), nullptr);
    }
    closed_ = true;
@@ -22,7 +22,7 @@ index 1d75181438c3219aa984bc87051df3e938b65211..0fd5bbf170efa02d3e710de3cb673315
  
  void MessagePort::Entangle(MessagePortDescriptor port_descriptor,
 diff --git a/third_party/blink/renderer/core/messaging/message_port.h b/third_party/blink/renderer/core/messaging/message_port.h
-index e093a1ed6c40ab49255fec71c5349272c413d0ca..98ed58a9a765f5101d9b421507bf25db4359d7e5 100644
+index 3678c9887c1596f813cd9618b1e9728808659fa8..5fc9edb82bf983fee9084d89904e232ecfe66fd9 100644
 --- a/third_party/blink/renderer/core/messaging/message_port.h
 +++ b/third_party/blink/renderer/core/messaging/message_port.h
 @@ -125,6 +125,13 @@ class CORE_EXPORT MessagePort : public EventTarget,

+ 5 - 5
patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch

@@ -13,10 +13,10 @@ uses internally for things like menus and devtools.
 We can remove this patch once it has in some shape been upstreamed.
 
 diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
-index 18722961833e489b359a28cf691b67bbeeb3ac56..f1d61a47cae0e508d03cf773be4191c57712c59d 100644
+index ce34cced354b092b8e8cf04a8c034c9833765e71..67c1c16b028f87b04007242d60d9cf90a61731da 100644
 --- a/ui/native_theme/native_theme.cc
 +++ b/ui/native_theme/native_theme.cc
-@@ -162,6 +162,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
+@@ -191,6 +191,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
  NativeTheme::~NativeTheme() = default;
  
  bool NativeTheme::ShouldUseDarkColors() const {
@@ -26,10 +26,10 @@ index 18722961833e489b359a28cf691b67bbeeb3ac56..f1d61a47cae0e508d03cf773be4191c5
  }
  
 diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
-index ddfd9e4d3424a21bcc6c3d59cbb0b813b5e00b78..7f4310b8882ad1ba52eb726ff4f8e21a17cedc8d 100644
+index 099bc7193edf98c8b3aff2d35a3c1653820c75fd..1d1ae195131e80ee1bc080e28992ef3554808389 100644
 --- a/ui/native_theme/native_theme.h
 +++ b/ui/native_theme/native_theme.h
-@@ -434,6 +434,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
+@@ -441,6 +441,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
        scoped_refptr<ColorProviderKey::ThemeInitializerSupplier> custom_theme,
        bool use_custom_frame = true) const;
  
@@ -53,7 +53,7 @@ index ddfd9e4d3424a21bcc6c3d59cbb0b813b5e00b78..7f4310b8882ad1ba52eb726ff4f8e21a
    // 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
-@@ -655,6 +672,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
+@@ -662,6 +679,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
    bool inverted_colors_ = false;
    PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
    PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;

+ 2 - 2
patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch

@@ -13,7 +13,7 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass
 then refers to the list so that it can correctly determine the data source's settings.
 
 diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
-index 30558fdfc35755fbc35f9eab7db2356e038c1884..3232629b263acae147a56864ebd73caf59b39789 100644
+index a7e9ab69fa13a0ad2e5aa97f09a8da4d9d51a48f..f994f23c16cc7dbc703d5e2289803940bafa5271 100644
 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
 +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
 @@ -12,8 +12,10 @@
@@ -65,7 +65,7 @@ index 30558fdfc35755fbc35f9eab7db2356e038c1884..3232629b263acae147a56864ebd73caf
  
  void MultiBufferDataSource::SetReader(MultiBufferReader* reader) {
 diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h
-index c5093eea3f0f354d3ac7358a92f3d1a3dfa849b2..eb6c49c52b4f511db9c99735544c541ed64870ba 100644
+index 578374d9a4fbaa9001e2dc39e4c7fa2a09658dde..64031ef9928ec86bf7e46c77c05ba7ca2e7f2d28 100644
 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h
 +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h
 @@ -34,6 +34,8 @@ namespace blink {

+ 43 - 0
patches/chromium/feat_allow_passing_of_objecttemplate_to_objecttemplatebuilder.patch

@@ -0,0 +1,43 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: John Kleinschmidt <[email protected]>
+Date: Fri, 6 Oct 2023 14:15:20 -0400
+Subject: feat: allow passing of ObjectTemplate to ObjectTemplateBuilder
+
+https://chromium-review.googlesource.com/c/chromium/src/+/4905829 removed the
+ObjectTemplateBuilder constructor which allows passing in an ObjectTemplate.
+
+Electron needs this constructor, namely for gin_helper::Constructible
+objects.
+
+diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc
+index 1c7277c4f6e8ad7a8de2190a08ac79812823556b..9d4c053d69409ea02da8c2398463a033f5310172 100644
+--- a/gin/object_template_builder.cc
++++ b/gin/object_template_builder.cc
+@@ -168,6 +168,13 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
+   template_->SetInternalFieldCount(kNumberOfInternalFields);
+ }
+ 
++ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
++                                             const char* type_name,
++                                             v8::Local<v8::ObjectTemplate> tmpl)
++    : isolate_(isolate), type_name_(type_name), template_(tmpl) {
++  template_->SetInternalFieldCount(kNumberOfInternalFields);
++}
++
+ ObjectTemplateBuilder::ObjectTemplateBuilder(
+     const ObjectTemplateBuilder& other) = default;
+ 
+diff --git a/gin/object_template_builder.h b/gin/object_template_builder.h
+index c2bd76ba8f7b33c2043636fa8946eedad78817e5..95258a6576a5f8555f73271a7ae119c4ab41145d 100644
+--- a/gin/object_template_builder.h
++++ b/gin/object_template_builder.h
+@@ -46,6 +46,9 @@ class GIN_EXPORT ObjectTemplateBuilder {
+  public:
+   explicit ObjectTemplateBuilder(v8::Isolate* isolate);
+   ObjectTemplateBuilder(v8::Isolate* isolate, const char* type_name);
++  ObjectTemplateBuilder(v8::Isolate* isolate,
++                        const char* type_name,
++                        v8::Local<v8::ObjectTemplate> tmpl);
+   ObjectTemplateBuilder(const ObjectTemplateBuilder& other);
+   ~ObjectTemplateBuilder();
+ 

+ 11 - 11
patches/chromium/feat_configure_launch_options_for_service_process.patch

@@ -183,7 +183,7 @@ index 01e62d7e8df65efb900e9cd0d34bcd8e0ed3e7da..9af6784707f125046d9a734165fc2b08
    host->GetChildProcess()->BindServiceInterface(std::move(receiver));
  }
 diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
-index e7ea7206793a91edfceea5736d4c133a7f1acca2..4fba5bf7274334374aa3df3d22faee813940b0ab 100644
+index ac993ad9d37fd889669be9ea6c77c194973a1703..1db38822f3f91f84fc9dce1784db92938cc43000 100644
 --- a/content/browser/utility_process_host.cc
 +++ b/content/browser/utility_process_host.cc
 @@ -157,11 +157,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
@@ -227,7 +227,7 @@ index e7ea7206793a91edfceea5736d4c133a7f1acca2..4fba5bf7274334374aa3df3d22faee81
  mojom::ChildProcess* UtilityProcessHost::GetChildProcess() {
    return static_cast<ChildProcessHostImpl*>(process_->GetHost())
        ->child_process();
-@@ -442,9 +462,22 @@ bool UtilityProcessHost::StartProcess() {
+@@ -440,9 +460,22 @@ bool UtilityProcessHost::StartProcess() {
      }
  #endif  // BUILDFLAG(IS_LINUX)
  
@@ -323,7 +323,7 @@ index 012069cada2220f6c1976107bc2e4ca6dcb7d7ca..a52a197eb51f8c00d7321f03ccb436ec
    // launch failed.
    enum class LaunchState {
 diff --git a/content/browser/utility_sandbox_delegate.cc b/content/browser/utility_sandbox_delegate.cc
-index 1caf159300af5f8910d0c691c6eb5b2475d9f9a0..d3e4adfad23176d6e7989eb20d1f08d780d8831b 100644
+index bf65aec1c2a8eb6a91d0d2815979dbedc0e4a09f..4025b4fd7950d40088aa1c1364a7e7aa16bc325e 100644
 --- a/content/browser/utility_sandbox_delegate.cc
 +++ b/content/browser/utility_sandbox_delegate.cc
 @@ -29,13 +29,15 @@ UtilitySandboxedProcessLauncherDelegate::
@@ -346,7 +346,7 @@ index 1caf159300af5f8910d0c691c6eb5b2475d9f9a0..d3e4adfad23176d6e7989eb20d1f08d7
  #if DCHECK_IS_ON()
    bool supported_sandbox_type =
        sandbox_type_ == sandbox::mojom::Sandbox::kNoSandbox ||
-@@ -96,11 +98,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
+@@ -97,11 +99,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
    return sandbox_type_;
  }
  
@@ -627,10 +627,10 @@ 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 fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab51c665477 100644
+index 16eaab2a26ed43ac94d8bc2aa4b38ffc91fd166e..1699cdb4c9a97e7c475d07eca447d70f19254e16 100644
 --- a/sandbox/policy/win/sandbox_win.cc
 +++ b/sandbox/policy/win/sandbox_win.cc
-@@ -721,11 +721,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
+@@ -728,11 +728,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
  // command line flag.
  ResultCode LaunchWithoutSandbox(
      const base::CommandLine& cmd_line,
@@ -643,7 +643,7 @@ index fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab5
    // 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
-@@ -953,7 +951,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
+@@ -963,7 +961,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
  ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
      const base::CommandLine& cmd_line,
      const std::string& process_type,
@@ -652,7 +652,7 @@ index fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab5
      SandboxDelegate* delegate,
      TargetPolicy* policy) {
    const base::CommandLine& launcher_process_command_line =
-@@ -967,7 +965,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
+@@ -977,7 +975,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
    }
  
    // Add any handles to be inherited to the policy.
@@ -661,7 +661,7 @@ index fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab5
      policy->AddHandleToShare(handle);
  
    if (!policy->GetConfig()->IsConfigured()) {
-@@ -982,6 +980,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
+@@ -992,6 +990,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));
@@ -675,7 +675,7 @@ index fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab5
  #endif
  
    if (!delegate->PreSpawnTarget(policy))
-@@ -994,7 +999,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
+@@ -1004,7 +1009,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
  ResultCode SandboxWin::StartSandboxedProcess(
      const base::CommandLine& cmd_line,
      const std::string& process_type,
@@ -684,7 +684,7 @@ index fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab5
      SandboxDelegate* delegate,
      base::Process* process) {
    const base::ElapsedTimer timer;
-@@ -1002,13 +1007,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
+@@ -1012,13 +1017,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
    // Avoid making a policy if we won't use it.
    if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line,
                             *base::CommandLine::ForCurrentProcess())) {

+ 26 - 26
patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch

@@ -8,10 +8,10 @@ rendering with the viz compositor by way of a custom HostDisplayClient
 and LayeredWindowUpdater.
 
 diff --git a/components/viz/host/host_display_client.cc b/components/viz/host/host_display_client.cc
-index 0c63e0d59b6b005059d59415bb3dde57a8c1314d..863f1974eb76dc0860362445e48b3064837e5b44 100644
+index e4e7ac767c927535af1e27133ab03f3b039874fe..c790fbe637635d2fa46e0cd7529b876318ee62ef 100644
 --- a/components/viz/host/host_display_client.cc
 +++ b/components/viz/host/host_display_client.cc
-@@ -48,9 +48,9 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams(
+@@ -47,9 +47,9 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams(
  }
  #endif
  
@@ -22,7 +22,7 @@ index 0c63e0d59b6b005059d59415bb3dde57a8c1314d..863f1974eb76dc0860362445e48b3064
    if (!NeedsToUseLayerWindow(widget_)) {
      DLOG(ERROR) << "HWND shouldn't be using a layered window";
      return;
-@@ -58,7 +58,15 @@ void HostDisplayClient::CreateLayeredWindowUpdater(
+@@ -57,7 +57,15 @@ void HostDisplayClient::CreateLayeredWindowUpdater(
  
    layered_window_updater_ =
        std::make_unique<LayeredWindowUpdaterImpl>(widget_, std::move(receiver));
@@ -39,10 +39,10 @@ index 0c63e0d59b6b005059d59415bb3dde57a8c1314d..863f1974eb76dc0860362445e48b3064
      gpu::SurfaceHandle child_window) {
    NOTREACHED();
 diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h
-index 5eeaadec9773f4890d9f8cccba1d50f645045b74..d7eb61a67c507ff8bd9e60878a9f5bbfc0d667c2 100644
+index fa7f12e204cda40fafb9e6f6e52400f6002a1f9f..1afd52cc13aeb426cf505f02e2134ef8b34a7ac5 100644
 --- a/components/viz/host/host_display_client.h
 +++ b/components/viz/host/host_display_client.h
-@@ -47,11 +47,13 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
+@@ -50,11 +50,13 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
  #endif
  
  #if BUILDFLAG(IS_WIN)
@@ -55,9 +55,9 @@ index 5eeaadec9773f4890d9f8cccba1d50f645045b74..d7eb61a67c507ff8bd9e60878a9f5bbf
 +  void CreateLayeredWindowUpdater(
 +      mojo::PendingReceiver<mojom::LayeredWindowUpdater> receiver) override;
 +
- // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
- // of lacros-chrome is complete.
- #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
+ #if BUILDFLAG(IS_OZONE)
+ #if BUILDFLAG(OZONE_PLATFORM_X11)
+   void DidCompleteSwapWithNewSize(const gfx::Size& size) override;
 diff --git a/components/viz/host/layered_window_updater_impl.cc b/components/viz/host/layered_window_updater_impl.cc
 index 8f726bde2cb5da6acfe630006af0fc3a09811d6c..45d8cae3ba0fca9a1514f83032a10c8820b3126d 100644
 --- a/components/viz/host/layered_window_updater_impl.cc
@@ -87,7 +87,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
   private:
    const HWND hwnd_;
 diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
-index d3a1ba02c09245b063720749dd52c015bdf71efb..3029fda279a6e2062115ac7fc7ade32e4a3aecd2 100644
+index 9e66224b5cdb17a12c447eb67e2b1066d949128e..53611e788cde9012ca566444e6c1ee05c99b921e 100644
 --- a/components/viz/service/BUILD.gn
 +++ b/components/viz/service/BUILD.gn
 @@ -143,6 +143,8 @@ viz_component("service") {
@@ -197,7 +197,7 @@ index e82717d5167e13e2926bcaf6c0ad66c1502e66f6..783c4d6ed399120e026bbf18baab4092
    const raw_ptr<GpuServiceImpl> gpu_service_impl_;
  
 diff --git a/components/viz/service/display_embedder/software_output_device_mac.cc b/components/viz/service/display_embedder/software_output_device_mac.cc
-index 4ceb1a9d9f336f65e15831856d30b45af594dd0f..646ac22f074c3d1827e59170a93807bc10d83d0b 100644
+index 5dccc2360cd1f3d83ffc59697aeb559a19b0547a..5fe62069b15e6370e63645b257d931be2a714bc3 100644
 --- a/components/viz/service/display_embedder/software_output_device_mac.cc
 +++ b/components/viz/service/display_embedder/software_output_device_mac.cc
 @@ -106,6 +106,8 @@ void SoftwareOutputDeviceMac::UpdateAndCopyBufferDamage(
@@ -209,13 +209,13 @@ index 4ceb1a9d9f336f65e15831856d30b45af594dd0f..646ac22f074c3d1827e59170a93807bc
    // Record the previous paint buffer.
    Buffer* previous_paint_buffer =
        buffer_queue_.empty() ? nullptr : buffer_queue_.back().get();
-@@ -191,6 +193,7 @@ void SoftwareOutputDeviceMac::EndPaint() {
+@@ -194,6 +196,7 @@ void SoftwareOutputDeviceMac::EndPaint() {
      ca_layer_params.is_empty = false;
      ca_layer_params.scale_factor = scale_factor_;
      ca_layer_params.pixel_size = pixel_size_;
 +    ca_layer_params.damage = last_damage;
      ca_layer_params.io_surface_mach_port.reset(
-         IOSurfaceCreateMachPort(current_paint_buffer_->io_surface));
+         IOSurfaceCreateMachPort(current_paint_buffer_->io_surface.get()));
      client_->SoftwareDeviceUpdatedCALayerParams(ca_layer_params);
 diff --git a/components/viz/service/display_embedder/software_output_device_mac.h b/components/viz/service/display_embedder/software_output_device_mac.h
 index 67d5ff67d74c107a867b39b306c6528425b87e05..5fd12a25c9e319e8e675955926271c9d1cd3a7ca 100644
@@ -514,10 +514,10 @@ 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 1864388f93ae8c1be079af20988066d8f9d30629..9df25eb94d9862fda7ea743a5a1ae777ce787e4f 100644
+index da6b2717ddee4077d8e70dec98f70ddc9edbf8bd..25482cad4441507085fd5eeb4b572832a599d996 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
-@@ -97,7 +97,8 @@ RootCompositorFrameSinkImpl::Create(
+@@ -101,7 +101,8 @@ RootCompositorFrameSinkImpl::Create(
        params->gpu_compositing, params->widget);
    auto output_surface = output_surface_provider->CreateOutputSurface(
        params->widget, params->gpu_compositing, display_client.get(),
@@ -556,10 +556,10 @@ index cc1ceb263a60b9bd743bd4166def23cd1c01b49f..d2c24bf0b674c5028e48c6b51f23d4a8
  
  }  // namespace viz
 diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
-index c34c0854efeec1ddddcd47fea40c9516f9c8dfaf..c27169973e2ac9b2faf802b9f35ed5c6d2b22543 100644
+index 2705338b960a4f8de7ad14c58824fb897590639a..2eb3bfdf573976f17ef9df6a481fda65a75793d8 100644
 --- a/content/browser/compositor/viz_process_transport_factory.cc
 +++ b/content/browser/compositor/viz_process_transport_factory.cc
-@@ -393,8 +393,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
+@@ -397,8 +397,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
    mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
    root_params->display_private =
        display_private.BindNewEndpointAndPassReceiver();
@@ -577,7 +577,7 @@ index c34c0854efeec1ddddcd47fea40c9516f9c8dfaf..c27169973e2ac9b2faf802b9f35ed5c6
        compositor_data.display_client->GetBoundRemote(resize_task_runner_);
    mojo::AssociatedRemote<viz::mojom::ExternalBeginFrameController>
 diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom
-index 29936bca703b86fee89e2b7f35c64a47cd60770b..7fb5a0082bae7d8e06ca8588129d34e866f043bf 100644
+index 62f98959d80cfa961401dda55ea6917bba825ec5..899de1c0bb971b510d377ad1704191d1d8628ac6 100644
 --- a/services/viz/privileged/mojom/compositing/display_private.mojom
 +++ b/services/viz/privileged/mojom/compositing/display_private.mojom
 @@ -114,7 +114,6 @@ interface DisplayClient {
@@ -589,13 +589,13 @@ index 29936bca703b86fee89e2b7f35c64a47cd60770b..7fb5a0082bae7d8e06ca8588129d34e8
  
    // 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 e6447c185ebcfe387991f27d3fb25dc3c2f32e5b..d291f0db6e9b6a60ee9ca38febaf1ad0397ee113 100644
+index fe4b73a47c9fa1bce506cf3159c38dce1ae1b51e..1ab474693850cd710d33ee7f3410e8263653efe7 100644
 --- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
 +++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
-@@ -32,6 +32,7 @@ struct RootCompositorFrameSinkParams {
+@@ -30,6 +30,7 @@ struct RootCompositorFrameSinkParams {
+   bool send_swap_size_notifications = false;
+   // Disables begin frame rate limiting for the display compositor.
    bool disable_frame_rate_limit = false;
-   // Whether to use variable refresh rates when generating begin frames.
-   bool enable_variable_refresh_rate = false;
 +  bool offscreen = false;
  
    [EnableIf=is_android]
@@ -612,10 +612,10 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05
 +  Draw(gfx.mojom.Rect damage_rect) => ();
  };
 diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
-index c9f14ed6547ba1f5cdaade063452036ac402885a..ddb28fd6f7549759df7e3b7d6b309cd982e199af 100644
+index 456adfeb5725390289e3441974fcb579a491de9a..59d437e25be86b1d2e30478a90d1e102b891e662 100644
 --- a/ui/compositor/compositor.h
 +++ b/ui/compositor/compositor.h
-@@ -89,6 +89,7 @@ class DisplayPrivate;
+@@ -93,6 +93,7 @@ class DisplayPrivate;
  class ExternalBeginFrameController;
  }  // namespace mojom
  class ContextProvider;
@@ -623,7 +623,7 @@ index c9f14ed6547ba1f5cdaade063452036ac402885a..ddb28fd6f7549759df7e3b7d6b309cd9
  class HostFrameSinkManager;
  class LocalSurfaceId;
  class RasterContextProvider;
-@@ -145,6 +146,16 @@ class COMPOSITOR_EXPORT ContextFactory {
+@@ -149,6 +150,16 @@ class COMPOSITOR_EXPORT ContextFactory {
    virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
  };
  
@@ -640,7 +640,7 @@ index c9f14ed6547ba1f5cdaade063452036ac402885a..ddb28fd6f7549759df7e3b7d6b309cd9
  // Compositor object to take care of GPU painting.
  // A Browser compositor object is responsible for generating the final
  // displayable form of pixels comprising a single widget's contents. It draws an
-@@ -188,6 +199,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
+@@ -192,6 +203,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
    // Schedules a redraw of the layer tree associated with this compositor.
    void ScheduleDraw();
  
@@ -650,7 +650,7 @@ index c9f14ed6547ba1f5cdaade063452036ac402885a..ddb28fd6f7549759df7e3b7d6b309cd9
    // Sets the root of the layer tree drawn by this Compositor. The root layer
    // must have no parent. The compositor's root layer is reset if the root layer
    // is destroyed. NULL can be passed to reset the root layer, in which case the
-@@ -525,6 +539,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
+@@ -533,6 +547,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
  
    std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
  

+ 2 - 2
patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch

@@ -28,10 +28,10 @@ index 0960ab9c8361222cd4acf554e04dc3fc124d714e..524c7cf9032a249a30cc726019266ecd
  
    // 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 f6b1dc84c58ee94d1aed49f25494bcb64aa0c52c..dbca796070f2bc2aa29fedf6ccb96bdc66b31e8b 100644
+index e7155091dd5c076e6a785833be3ba450d1b38c39..b1a007ba4b865f44c060bf16dd2d9137054dcc10 100644
 --- a/third_party/blink/renderer/core/loader/document_loader.h
 +++ b/third_party/blink/renderer/core/loader/document_loader.h
-@@ -307,7 +307,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
+@@ -308,7 +308,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
        absl::optional<scheduler::TaskAttributionId>
            soft_navigation_heuristics_task_id);
  

+ 9 - 9
patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch

@@ -17,7 +17,7 @@ headers, moving forward we should find a way in upstream to provide
 access to these headers for loader clients created on the browser process.
 
 diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc
-index 14049395fbc56fbb4b755da918cc82a9b3e024d4..c9db1f47dca8d166ec6b4391059c3ffbbeff31b4 100644
+index 2a309fe2b1dd672c6a38889f707eb84872cfa57b..a98bcfdef9a7d7723971fd4f8f95317221de3bb4 100644
 --- a/services/network/public/cpp/resource_request.cc
 +++ b/services/network/public/cpp/resource_request.cc
 @@ -151,6 +151,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=(
@@ -37,7 +37,7 @@ index 14049395fbc56fbb4b755da918cc82a9b3e024d4..c9db1f47dca8d166ec6b4391059c3ffb
           allow_cookies_from_browser == other.allow_cookies_from_browser &&
           client_security_state == other.client_security_state;
 diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
-index facf69cab3dc0c21ca7eddb7f2828fa7765c5744..45d0bce5d469a977ae8dafe5129265dfd52beea5 100644
+index 41ef57d61f5d12748188a7791925d1c41bd52b66..b935b4d26e431599b8a37aa3725a7055ea7a7c65 100644
 --- a/services/network/public/cpp/resource_request.h
 +++ b/services/network/public/cpp/resource_request.h
 @@ -69,6 +69,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
@@ -49,7 +49,7 @@ index facf69cab3dc0c21ca7eddb7f2828fa7765c5744..45d0bce5d469a977ae8dafe5129265df
      mojo::PendingRemote<mojom::TrustTokenAccessObserver> trust_token_observer;
      mojo::PendingRemote<mojom::URLLoaderNetworkServiceObserver>
 diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc
-index a7fd270571a01ddaf2971ec1cdc845029bdf9a5e..fc567eeb9332ba7a4018bf51f2ef805e6a7bba71 100644
+index dc34fcc0d78f5b46809e5062709bc37575742487..e6f1fd1e8ad284ead0b10476db48a4c698dc1b40 100644
 --- a/services/network/public/cpp/url_request_mojom_traits.cc
 +++ b/services/network/public/cpp/url_request_mojom_traits.cc
 @@ -93,6 +93,7 @@ bool StructTraits<network::mojom::TrustedUrlRequestParamsDataView,
@@ -61,7 +61,7 @@ index a7fd270571a01ddaf2971ec1cdc845029bdf9a5e..fc567eeb9332ba7a4018bf51f2ef805e
        mojo::PendingRemote<network::mojom::CookieAccessObserver>>();
    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 aa9a2bffeb7d5c318fe0a094e82ad43a78c8cc9a..97dfddac3d1b520f025a2b50f55519e0295fa612 100644
+index d3fcbf6dec2ff609e3d17f9b3af763a4fe341b05..d3d622f33cee467166ce2678d51d2c52e26efe4b 100644
 --- a/services/network/public/cpp/url_request_mojom_traits.h
 +++ b/services/network/public/cpp/url_request_mojom_traits.h
 @@ -73,6 +73,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
@@ -76,7 +76,7 @@ index aa9a2bffeb7d5c318fe0a094e82ad43a78c8cc9a..97dfddac3d1b520f025a2b50f55519e0
    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 5553190b56d0dd7aefa0845a337a8085027098ae..1507bcaa7109976362ce33a5a7f516dde109ac7a 100644
+index 0bb989b3f5341c4c06d02939ae48a400d20e0603..a191f73c357ef16cf61c10d71f01ca531b9af5dc 100644
 --- a/services/network/public/mojom/url_request.mojom
 +++ b/services/network/public/mojom/url_request.mojom
 @@ -74,6 +74,9 @@ struct TrustedUrlRequestParams {
@@ -90,7 +90,7 @@ index 5553190b56d0dd7aefa0845a337a8085027098ae..1507bcaa7109976362ce33a5a7f516dd
    // 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 d0df2913c2e5102cfd1e1ff140e6c95d168900bd..830f90a83774e32116757f8a3b9598492dff33ee 100644
+index a58666f95cf6c0974e25b0c2805f944b290358ae..fa77efab0cbe5a702796a0e374f847c1f0cba697 100644
 --- a/services/network/public/mojom/url_response_head.mojom
 +++ b/services/network/public/mojom/url_response_head.mojom
 @@ -12,6 +12,7 @@ import "services/network/public/mojom/encoded_body_length.mojom";
@@ -112,7 +112,7 @@ index d0df2913c2e5102cfd1e1ff140e6c95d168900bd..830f90a83774e32116757f8a3b959849
    string mime_type;
  
 diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
-index e74967eb54ea03c3ceb0a1296fb978b5dd5521d4..e49c9ccdbcacb01e17a90b3803fe120b09d697d6 100644
+index 6d220fb47ca8e9019c2e4e8efd8c73ad3632c690..b0b972c5768087ded0ade3dfc15bd1c47e68bc3c 100644
 --- a/services/network/url_loader.cc
 +++ b/services/network/url_loader.cc
 @@ -623,6 +623,7 @@ URLLoader::URLLoader(
@@ -153,10 +153,10 @@ index e74967eb54ea03c3ceb0a1296fb978b5dd5521d4..e49c9ccdbcacb01e17a90b3803fe120b
  
    // 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 e4686f280703e8cd68ba7cfa1dd52cef08fd0076..ba5de4641b3360aa85548cdb509646f0f6b38076 100644
+index b5a9c7db397be9a85c0fdc0a5c76e13393eaa436..3082770fd7cd93da2578e55c4ea256edf819bf29 100644
 --- a/services/network/url_loader.h
 +++ b/services/network/url_loader.h
-@@ -631,6 +631,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
+@@ -630,6 +630,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
    std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
        resource_scheduler_request_handle_;
  

+ 1 - 1
patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch

@@ -7,7 +7,7 @@ Subject: feat: filter out non-shareable windows in the current application in
 This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer.  This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself.  This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started.  There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases.
 
 diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
-index 814eab6a5e8c83cae50da2491398edf329ca1ed4..9cacf36eae623c4787d5cccef4bed0202bfd5d35 100644
+index 0409dd9d72efd6a3b9da2842f3998e14ea1658ae..83c739080a48ced2d03d0a3d4d942910cc4ff4cf 100644
 --- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
 +++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
 @@ -170,7 +170,15 @@ void OnShareableContentCreated(SCShareableContent* content) {

+ 2 - 2
patches/chromium/fix_activate_background_material_on_windows.patch

@@ -10,10 +10,10 @@ This patch likely can't be upstreamed as-is, as Chromium doesn't have
 this use case in mind currently.
 
 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
-index 715f24b2bb0599e31acdf9e86cdf9d720461e63a..bc2ecc7e5c1c343e60c0ba12c1c17d41a6d5c035 100644
+index 29da2517abd90daec44c3e187f35b5f1aa8b9845..bbf996eaf933c33202344e698b8655e05ef53dc7 100644
 --- a/ui/views/win/hwnd_message_handler.cc
 +++ b/ui/views/win/hwnd_message_handler.cc
-@@ -1096,7 +1096,7 @@ void HWNDMessageHandler::FrameTypeChanged() {
+@@ -880,7 +880,7 @@ void HWNDMessageHandler::FrameTypeChanged() {
  
  void HWNDMessageHandler::PaintAsActiveChanged() {
    if (!delegate_->HasNonClientView() || !delegate_->CanActivate() ||

+ 2 - 2
patches/chromium/fix_aspect_ratio_with_max_size.patch

@@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the
 BrowserWindow.
 
 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
-index 130f0ee5def53883b07817a7f2ce7b8e7865b5bf..58bae1b8b09bb5d235e67b25e700928e833582ed 100644
+index 119b064245985ce798ea6293aa9c256a6f878126..d46dd18609a4d14410a5cf973f9ec690e873051f 100644
 --- a/ui/views/win/hwnd_message_handler.cc
 +++ b/ui/views/win/hwnd_message_handler.cc
-@@ -3817,14 +3817,29 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
+@@ -3640,14 +3640,29 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
    delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
    min_window_size = delegate_->DIPToScreenSize(min_window_size);
    max_window_size = delegate_->DIPToScreenSize(max_window_size);

+ 7 - 7
patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch

@@ -23,15 +23,15 @@ 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 8ba07ea4369762a1b1ad2a4c6cdcaae8c03e7ba7..a656a2d66411c58cc3d1ccf3b20033cf7e4aea85 100644
+index 159a0e1c17214afb638fff635340add040433b2d..1fa0251171411f8cdb05621fb0d43948e7b3e4af 100644
 --- a/content/browser/renderer_host/navigation_request.cc
 +++ b/content/browser/renderer_host/navigation_request.cc
-@@ -800,6 +800,12 @@ GetOriginForURLLoaderFactoryUncheckedWithDebugInfo(
+@@ -9862,6 +9862,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
      return std::make_pair(parent->GetLastCommittedOrigin(), "about_srcdoc");
    }
  
-+  if (!common_params.url.IsStandard()) {
-+    return std::make_pair(url::Origin::Resolve(common_params.url,
++  if (!common_params().url.IsStandard()) {
++    return std::make_pair(url::Origin::Resolve(common_params().url,
 +                                               url::Origin()),
 +                          "url_non_standard");
 +  }
@@ -40,10 +40,10 @@ index 8ba07ea4369762a1b1ad2a4c6cdcaae8c03e7ba7..a656a2d66411c58cc3d1ccf3b20033cf
    // origin of |common_params.url| and/or |common_params.initiator_origin|.
    return std::make_pair(
 diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
-index 9b0ad2483fcf02d8d46dcf222541b0a4b34984c0..d5f99b20fbe5242f95935918fedaf3e00d771ab9 100644
+index 440601f36c4e7f1d28520b859e4df9d075db4aa1..0eca1096d5adc39520cb38b62ce38abafbb37759 100644
 --- a/third_party/blink/renderer/core/loader/document_loader.cc
 +++ b/third_party/blink/renderer/core/loader/document_loader.cc
-@@ -2054,6 +2054,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
+@@ -2113,6 +2113,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
  scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
      Document* owner_document) {
    scoped_refptr<SecurityOrigin> origin;
@@ -54,7 +54,7 @@ index 9b0ad2483fcf02d8d46dcf222541b0a4b34984c0..d5f99b20fbe5242f95935918fedaf3e0
    StringBuilder debug_info_builder;
    if (origin_to_commit_) {
      // Origin to commit is specified by the browser process, it must be taken
-@@ -2101,6 +2105,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
+@@ -2160,6 +2164,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
      debug_info_builder.Append(", url=");
      debug_info_builder.Append(owner_document->Url().BaseAsString());
      debug_info_builder.Append(")");

+ 1 - 1
patches/chromium/fix_crash_when_saving_edited_pdf_files.patch

@@ -13,7 +13,7 @@ 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 b9d1652cfc2628d1f9f98698e8fddbfbae62b4de..bc93b2d47c061538d30bc886709abcda5f2d6eb0 100644
+index 21f74639c3a64e596e9ef06c492642489273ac4f..7c63f536458de2a680e5fe6eedd094b747d2c8d9 100644
 --- a/chrome/browser/resources/pdf/pdf_viewer.ts
 +++ b/chrome/browser/resources/pdf/pdf_viewer.ts
 @@ -898,26 +898,12 @@ export class PdfViewerElement extends PdfViewerBaseElement {

+ 9 - 9
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 623991465edb99ee720c8177c3511e4d025ed890..c94537af56f7de8cd15bd3b3155b79b41ea003f4 100644
+index 42c27a6fd63abaf1fe096cb24b5bba53b725e4bb..c373d23ff31f18217ab06f668e21a5fb58f275e1 100644
 --- a/ui/compositor/compositor.cc
 +++ b/ui/compositor/compositor.cc
-@@ -341,7 +341,8 @@ void Compositor::SetLayerTreeFrameSink(
+@@ -338,7 +338,8 @@ void Compositor::SetLayerTreeFrameSink(
    if (display_private_) {
      disabled_swap_until_resize_ = false;
      display_private_->Resize(size());
@@ -25,7 +25,7 @@ index 623991465edb99ee720c8177c3511e4d025ed890..c94537af56f7de8cd15bd3b3155b79b4
      display_private_->SetDisplayColorSpaces(display_color_spaces_);
      display_private_->SetDisplayColorMatrix(
          gfx::SkM44ToTransform(display_color_matrix_));
-@@ -533,8 +534,11 @@ void Compositor::SetVisible(bool visible) {
+@@ -530,8 +531,11 @@ void Compositor::SetVisible(bool visible) {
    host_->SetVisible(visible);
    // Visibility is reset when the output surface is lost, so this must also be
    // updated then.
@@ -39,7 +39,7 @@ index 623991465edb99ee720c8177c3511e4d025ed890..c94537af56f7de8cd15bd3b3155b79b4
  }
  
  bool Compositor::IsVisible() {
-@@ -959,4 +963,13 @@ const cc::LayerTreeSettings& Compositor::GetLayerTreeSettings() const {
+@@ -956,4 +960,13 @@ const cc::LayerTreeSettings& Compositor::GetLayerTreeSettings() const {
    return host_->GetSettings();
  }
  
@@ -54,12 +54,12 @@ index 623991465edb99ee720c8177c3511e4d025ed890..c94537af56f7de8cd15bd3b3155b79b4
 +
  }  // namespace ui
 diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
-index ddb28fd6f7549759df7e3b7d6b309cd982e199af..7473f3af9bc8cac8db3c30dfbc9b7140f832ac15 100644
+index 59d437e25be86b1d2e30478a90d1e102b891e662..f99676c579402f0961de036a49e62462ec6a6cec 100644
 --- a/ui/compositor/compositor.h
 +++ b/ui/compositor/compositor.h
-@@ -511,6 +511,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
- 
-   const cc::LayerTreeSettings& GetLayerTreeSettings() const;
+@@ -519,6 +519,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
+     return host_->saved_events_metrics_count_for_testing();
+   }
  
 +  // Sets |background_throttling_| responsible for suspending drawing
 +  // and switching frames.
@@ -68,7 +68,7 @@ index ddb28fd6f7549759df7e3b7d6b309cd982e199af..7473f3af9bc8cac8db3c30dfbc9b7140
   private:
    friend class base::RefCounted<Compositor>;
    friend class TotalAnimationThroughputReporter;
-@@ -617,6 +621,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
+@@ -625,6 +629,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
    // See go/report-ux-metrics-at-painting for details.
    bool animation_started_ = false;
  

+ 6 - 15
patches/chromium/fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch

@@ -14,24 +14,15 @@ can potentially be upstreamed but it's likely that the better fix for this
 is to update our OSR code which is several years outdated.
 
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 73cf38cf0846bf224b4e01434b2bcf1875c3e782..91ca97624a1a5a67cd4a7ea7d78393e7041eefe9 100644
+index f107f0089be4d7b75c95821d85b1666b0bf1077f..4aaa859a45e710863695755f69c2bdfbefb73ceb 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -3866,6 +3866,8 @@ void WebContentsImpl::Restore() {
- 
- void WebContentsImpl::SetWindowShowState(ui::WindowShowState state) {
-   aura::Window* window = GetTopLevelNativeWindow();
-+  if (!window)
-+    return;
- 
-   // TODO(isandrk, crbug.com/1466855): This API function currently works only on
-   // Aura platforms (Win/Lin/CrOS/Fuchsia), make it also work on Mac.
-@@ -3880,7 +3882,7 @@ void WebContentsImpl::SetWindowShowState(ui::WindowShowState state) {
- 
+@@ -3996,7 +3996,7 @@ void WebContentsImpl::Restore() {
  ui::WindowShowState WebContentsImpl::GetWindowShowState() {
+ #if defined(USE_AURA)
    aura::Window* window = GetTopLevelNativeWindow();
 -  return wm::GetWindowState(window);
 +  return window ? wm::GetWindowState(window) : ui::SHOW_STATE_NORMAL;
- }
- #endif
- 
+ #else
+   // TODO(laurila, crbug.com/1466855): This API function currently works only on
+   // Aura platforms (Win/Lin/CrOS/Fuchsia), make it also work on Mac.

+ 1 - 1
patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch

@@ -86,7 +86,7 @@ index 7ff8785cd64c1264a88f91f7bd3292c6943f58ea..bc14ad8cab9fa3ec45bcb9f670b19897
  
    // Cut the reference from ScriptState to V8 context.
 diff --git a/third_party/blink/renderer/platform/bindings/script_state.h b/third_party/blink/renderer/platform/bindings/script_state.h
-index 7c3cbdf73198f5592bff3e4fba8088f774efb0dd..ce3a01ded69eb10756e9a79f776afd3c22b8c931 100644
+index 6230f4272feb8aab426d45bebe55846020931bcf..2a973e435cfb0fbe4675a4a34bde8d3ecb9f4ac4 100644
 --- a/third_party/blink/renderer/platform/bindings/script_state.h
 +++ b/third_party/blink/renderer/platform/bindings/script_state.h
 @@ -182,7 +182,12 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected<ScriptState> {

+ 3 - 3
patches/chromium/fix_media_key_usage_with_globalshortcuts.patch

@@ -59,7 +59,7 @@ index f96af14cb915c8ab92b314ac15b6dffcdd6ec607..2556abe433493251ebd48d4aeddaa6d4
    // true if register successfully, or false if 1) the specificied |accelerator|
    // has been registered by another caller or other native applications, or
 diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
-index 169a009fd62d677955ac67df086dd658f902560c..134919f7ecedf2342139626977520b088f8b93d5 100644
+index fd95c8c5b62a447542e38bf69acc86303be8fd9a..e50d17d9ce7c8c844f4a8409ca0eef67e7c4003d 100644
 --- a/content/browser/media/media_keys_listener_manager_impl.cc
 +++ b/content/browser/media/media_keys_listener_manager_impl.cc
 @@ -56,7 +56,11 @@ bool MediaKeysListenerManagerImpl::StartWatchingMediaKey(
@@ -75,7 +75,7 @@ index 169a009fd62d677955ac67df086dd658f902560c..134919f7ecedf2342139626977520b08
        !media_keys_listener_->StartWatchingMediaKey(key_code)) {
      return false;
    }
-@@ -240,6 +244,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
+@@ -258,6 +262,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
  #endif
  
    if (system_media_controls_) {
@@ -83,7 +83,7 @@ index 169a009fd62d677955ac67df086dd658f902560c..134919f7ecedf2342139626977520b08
      system_media_controls_->AddObserver(this);
      system_media_controls_notifier_ =
          std::make_unique<SystemMediaControlsNotifier>(
-@@ -252,6 +257,19 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
+@@ -270,6 +275,19 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
      DCHECK(media_keys_listener_);
    }
  

+ 70 - 12
patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch

@@ -9,10 +9,10 @@ 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 4775cbbac9ccf5011d48df7042fbb6c8f454dec2..df9c7917391952b133d9a37fdbe61d85cc5ab845 100644
+index c74ff0ec2cd7c57b042dddce4e763a4cadf9072a..7f60801c4d3e4513ac5aaf27f287776134f63945 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
-@@ -19,8 +19,10 @@
+@@ -20,8 +20,10 @@
  #include "ui/gfx/geometry/size.h"
  #if !BUILDFLAG(IS_ANDROID)
  #include "base/task/sequenced_task_runner.h"
@@ -23,7 +23,34 @@ index 4775cbbac9ccf5011d48df7042fbb6c8f454dec2..df9c7917391952b133d9a37fdbe61d85
  #include "third_party/blink/public/common/features.h"
  #include "ui/views/view.h"
  #endif  // !BUILDFLAG(IS_ANDROID)
-@@ -337,7 +339,7 @@ void PictureInPictureWindowManager::CloseWindowInternal() {
+@@ -36,7 +38,7 @@ constexpr gfx::Size kMinWindowSize(240, 52);
+ // not apply to video Picture-in-Picture windows.
+ constexpr double kMaxWindowSizeRatio = 0.8;
+ 
+-#if !BUILDFLAG(IS_ANDROID)
++#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ // Returns true if a document picture-in-picture window should be focused upon
+ // opening it.
+ bool ShouldFocusPictureInPictureWindow(const NavigateParams& params) {
+@@ -168,7 +170,7 @@ bool PictureInPictureWindowManager::ExitPictureInPictureViaWindowUi(
+     return false;
+   }
+ 
+-#if !BUILDFLAG(IS_ANDROID)
++#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   if (auto_pip_setting_helper_) {
+     auto_pip_setting_helper_->OnUserClosedWindow();
+   }
+@@ -351,7 +353,7 @@ gfx::Size PictureInPictureWindowManager::GetMaximumWindowSize(
+ 
+ // static
+ void PictureInPictureWindowManager::SetWindowParams(NavigateParams& params) {
+-#if !BUILDFLAG(IS_ANDROID)
++#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   // 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)
+@@ -374,7 +376,7 @@ void PictureInPictureWindowManager::CloseWindowInternal() {
    video_web_contents_observer_.reset();
    pip_window_controller_->Close(false /* should_pause_video */);
    pip_window_controller_ = nullptr;
@@ -32,26 +59,26 @@ index 4775cbbac9ccf5011d48df7042fbb6c8f454dec2..df9c7917391952b133d9a37fdbe61d85
    auto_pip_setting_helper_.reset();
  #endif  // !BUILDFLAG(IS_ANDROID)
  }
-@@ -348,8 +350,10 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() {
+@@ -385,8 +387,10 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() {
    // contents, so we only need to forget the controller here when user closes
    // the parent web contents with the PiP window open.
    document_web_contents_observer_.reset();
 +#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
-   // `setting_helper_` depends on the opener's WebContents.
+   // `auto_pip_setting_helper_` depends on the opener's WebContents.
    auto_pip_setting_helper_.reset();
 +#endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
    if (pip_window_controller_)
      pip_window_controller_ = nullptr;
  }
-@@ -371,6 +375,7 @@ PictureInPictureWindowManager::GetOverlayView(
+@@ -408,6 +412,7 @@ PictureInPictureWindowManager::GetOverlayView(
      return nullptr;
    }
  
 +#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
-   auto* const web_contents = pip_window_controller_->GetWebContents();
- 
-   auto* auto_pip_tab_helper =
-@@ -393,6 +398,8 @@ PictureInPictureWindowManager::GetOverlayView(
+   // It would be nice to create this in `EnterPictureInPicture*`, but detecting
+   // auto-pip while pip is in the process of opening doesn't work.
+   //
+@@ -438,6 +443,8 @@ PictureInPictureWindowManager::GetOverlayView(
    }
  
    return overlay_view;
@@ -60,8 +87,17 @@ index 4775cbbac9ccf5011d48df7042fbb6c8f454dec2..df9c7917391952b133d9a37fdbe61d85
  }
  #endif  // !BUILDFLAG(IS_ANDROID)
  
+@@ -451,7 +458,7 @@ PictureInPictureWindowManager::GetActiveSessionOrigins() {
+   return active_origins;
+ }
+ 
+-#if !BUILDFLAG(IS_ANDROID)
++#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ void PictureInPictureWindowManager::CreateAutoPipSettingHelperIfNeeded() {
+   // Because we have to defer creating this until after the tab helper finds out
+   // about pip, we don't care if there's already a helper.  Just use it.
 diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
-index 85ae9fb9f969709c35c27ac1235e5bdc48e2084a..a2adddb3ec8c72a2ff1a3739a1792868a6f89ffc 100644
+index 64152ef42a5225e857fde6982e4d88baf0c96341..86617d4ae181337b3558b18303f305d4ce38fcbc 100644
 --- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
 +++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
 @@ -11,6 +11,7 @@
@@ -82,7 +118,29 @@ index 85ae9fb9f969709c35c27ac1235e5bdc48e2084a..a2adddb3ec8c72a2ff1a3739a1792868
  
  namespace views {
  class View;
-@@ -238,7 +241,9 @@ class PictureInPictureWindowManager {
+@@ -176,10 +179,11 @@ class PictureInPictureWindowManager {
+       const gfx::Rect& browser_view_overridden_bounds,
+       views::View* anchor_view,
+       views::BubbleBorder::Arrow arrow);
+-
++#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   AutoPipSettingHelper* get_setting_helper_for_testing() {
+     return auto_pip_setting_helper_.get();
+   }
++#endif
+ #endif
+ 
+   // Get the origins for initiators of active Picture-in-Picture sessions.
+@@ -237,7 +241,7 @@ class PictureInPictureWindowManager {
+   // helper class for callbacks, to avoid re-entrant calls during pip set-up.
+   static void ExitPictureInPictureSoon();
+ 
+-#if !BUILDFLAG(IS_ANDROID)
++#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   // Create the settings helper if this is auto-pip and we don't have one.
+   void CreateAutoPipSettingHelperIfNeeded();
+ #endif  // !BUILDFLAG(IS_ANDROID)
+@@ -252,7 +256,9 @@ class PictureInPictureWindowManager {
  #if !BUILDFLAG(IS_ANDROID)
    std::unique_ptr<DocumentWebContentsObserver> document_web_contents_observer_;
  

+ 7 - 7
patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch

@@ -15,10 +15,10 @@ node does not change in this case.
 chromium-bug: https://crbug.com/1369605
 
 diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
-index 96f7a459fca45f2d8c260d2de52b298afc1afd1c..9a57593c8059eecd75e84bcf4453010acaec4568 100644
+index f5f30d5696bdd2b8b5948b18b3f7959f9078cc72..660dc5f60bad28ce345827767fc508711ea06d31 100644
 --- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
-@@ -1045,6 +1045,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties(
+@@ -1046,6 +1046,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties(
    return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
  }
  
@@ -32,7 +32,7 @@ index 96f7a459fca45f2d8c260d2de52b298afc1afd1c..9a57593c8059eecd75e84bcf4453010a
    if (!text_input_manager_)
      return ui::TEXT_INPUT_TYPE_NONE;
 diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h
-index c403b82eeb27b6538dbfad0655796492a790bd0b..95b639e111df972db64afebb4d281438691fce1f 100644
+index 1dfd9c071a41482e0d35257b28522e5b37702f25..41a09e9470dfa5797c69d02fc9b4f5e608a43d94 100644
 --- a/content/browser/renderer_host/render_widget_host_view_child_frame.h
 +++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h
 @@ -184,6 +184,8 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame
@@ -45,15 +45,15 @@ index c403b82eeb27b6538dbfad0655796492a790bd0b..95b639e111df972db64afebb4d281438
    // RenderFrameMetadataProvider::Observer implementation.
    void OnRenderFrameMetadataChangedBeforeActivation(
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 737ca972a248538d110d4c91f9eb45a4645bdd0c..73cf38cf0846bf224b4e01434b2bcf1875c3e782 100644
+index 6fd40ddf07a55ec12f18ff88e92a7f59a5a52f96..f107f0089be4d7b75c95821d85b1666b0bf1077f 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -8392,7 +8392,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
+@@ -8649,7 +8649,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
                          "WebContentsImpl::OnFocusedElementChangedInFrame",
                          "render_frame_host", frame);
    RenderWidgetHostViewBase* root_view =
 -      static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
 +      static_cast<RenderWidgetHostViewBase*>(GetTopLevelRenderWidgetHostView());
-   if (!root_view || !frame->GetView())
+   if (!root_view || !frame->GetView()) {
      return;
-   // Convert to screen coordinates from window coordinates by adding the
+   }

+ 5 - 5
patches/chromium/fix_properly_honor_printing_page_ranges.patch

@@ -25,10 +25,10 @@ index c9a13aee1e64f359cd1d5c2e440b4df204420997..7790c311400fc84bfda6c99e1ebd8da7
    // 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 e7c2af99322d27d88e77bdebce44c1356161dfd4..22101df16677599a82e72c89014fa3d73aa3a147 100644
+index fab1e04e754cb63ab7335a45dce25c130c638a04..612a74964adaf7c2d82ca0bb846cb33a6449db98 100644
 --- a/printing/printing_context_mac.mm
 +++ b/printing/printing_context_mac.mm
-@@ -485,7 +485,8 @@ void ApplySystemPrintDialogData(
+@@ -486,7 +486,8 @@ void ApplySystemPrintDialogData(
          !SetCollateInPrintSettings(settings_->collate()) ||
          !SetDuplexModeInPrintSettings(settings_->duplex_mode()) ||
          !SetOutputColor(static_cast<int>(settings_->color())) ||
@@ -38,7 +38,7 @@ index e7c2af99322d27d88e77bdebce44c1356161dfd4..22101df16677599a82e72c89014fa3d7
        return OnError();
      }
    }
-@@ -637,6 +638,22 @@ void ApplySystemPrintDialogData(
+@@ -639,6 +640,22 @@ void ApplySystemPrintDialogData(
    return PMSetCopies(print_settings, copies, false) == noErr;
  }
  
@@ -62,7 +62,7 @@ index e7c2af99322d27d88e77bdebce44c1356161dfd4..22101df16677599a82e72c89014fa3d7
    PMPrintSettings print_settings =
        static_cast<PMPrintSettings>([print_info_ PMPrintSettings]);
 diff --git a/printing/printing_context_system_dialog_win.cc b/printing/printing_context_system_dialog_win.cc
-index 07847521e7217c78480205812a73cc89503c00d2..586e866ca7ec0eb0b573d23e3bd95792c22bff20 100644
+index 8a7d9c115cf5cca8d203cc71c5c83f06df2c6bee..d808b78d57ea2f29e0ed2248304fa720e3deede2 100644
 --- a/printing/printing_context_system_dialog_win.cc
 +++ b/printing/printing_context_system_dialog_win.cc
 @@ -75,14 +75,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings(
@@ -100,7 +100,7 @@ index 07847521e7217c78480205812a73cc89503c00d2..586e866ca7ec0eb0b573d23e3bd95792
    } else {
      // No need to bother, we don't know how many pages are available.
 diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc
-index 3fb7a99ac1f2efa472dc8aa6682ab5b8c326c7aa..4c43edf8dd9db4416cc1edbb438ee3612524cc8a 100644
+index 525df2cef7d1740ec488c88fd4f6c06314b45fbb..01b2e50d4537ed27916f978a9110b49a49bdcb32 100644
 --- a/ui/gtk/printing/print_dialog_gtk.cc
 +++ b/ui/gtk/printing/print_dialog_gtk.cc
 @@ -241,6 +241,24 @@ void PrintDialogGtk::UpdateSettings(

+ 2 - 2
patches/chromium/fix_remove_caption-removing_style_call.patch

@@ -18,10 +18,10 @@ or resizing, but Electron does not seem to run into that issue
 for opaque frameless windows even with that block commented out.
 
 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
-index 27471c4ab49a5d8982ab5201141526386fcc1703..715f24b2bb0599e31acdf9e86cdf9d720461e63a 100644
+index 1bef90fe94f1024f4d9c1f198cd55ec150959821..29da2517abd90daec44c3e187f35b5f1aa8b9845 100644
 --- a/ui/views/win/hwnd_message_handler.cc
 +++ b/ui/views/win/hwnd_message_handler.cc
-@@ -1880,7 +1880,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
+@@ -1713,7 +1713,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
    SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS),
                0);
  

+ 18 - 18
patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch

@@ -20,7 +20,7 @@ index 6c924dcf068a1ba2fe647a0a6b34d981d3dad570..febd81af331c06d9aaf1dda14be2718a
        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 f9567d5b4794a9822aef3cf70c7bb6ca9112b87f..eb8b57532ef5a4cf88426289b988b1d6504f0bac 100644
+index ad1adb6f54dc6975c95789287a594b371fead220..07f96c750b49188a11291e1bc165f771d2ca5142 100644
 --- a/third_party/blink/public/web/web_local_frame.h
 +++ b/third_party/blink/public/web/web_local_frame.h
 @@ -442,6 +442,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
@@ -64,10 +64,10 @@ index 4cd668a127a50e5462e3878c3f1dcb7384926768..dfbec49249404df8f8ebdbd26e6e865c
  
  #endif  // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
 diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
-index bb6e6804a49c10e5d0238aea61e4676a9dcfb72d..a3fec02c6c1179a2ed1a69c9eac76d0e53f3a544 100644
+index 6fc9f48d84590f85576be0362c716634c87eff80..33391eeb8ce9f70955e4e991c5f400a2c001461c 100644
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
-@@ -2813,6 +2813,7 @@ void LocalFrame::RequestExecuteScript(
+@@ -2844,6 +2844,7 @@ void LocalFrame::RequestExecuteScript(
      mojom::blink::EvaluationTiming evaluation_timing,
      mojom::blink::LoadEventBlockingOption blocking_option,
      WebScriptExecutionCallback callback,
@@ -75,7 +75,7 @@ index bb6e6804a49c10e5d0238aea61e4676a9dcfb72d..a3fec02c6c1179a2ed1a69c9eac76d0e
      BackForwardCacheAware back_forward_cache_aware,
      mojom::blink::WantResultOption want_result_option,
      mojom::blink::PromiseResultOption promise_behavior) {
-@@ -2846,7 +2847,7 @@ void LocalFrame::RequestExecuteScript(
+@@ -2877,7 +2878,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 bb6e6804a49c10e5d0238aea61e4676a9dcfb72d..a3fec02c6c1179a2ed1a69c9eac76d0e
  
  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 72ad9031f29df222b81c9232152d4d4f863349b9..f754df2a4edfffb9058625fc125d8114a27673c2 100644
+index b233430e6049761d478065247e7c2cd4bc26e080..0cb7aef72fdff3686c1c5da81c1f97bf34008d0c 100644
 --- a/third_party/blink/renderer/core/frame/local_frame.h
 +++ b/third_party/blink/renderer/core/frame/local_frame.h
-@@ -794,6 +794,7 @@ class CORE_EXPORT LocalFrame final
+@@ -803,6 +803,7 @@ class CORE_EXPORT LocalFrame final
                              mojom::blink::EvaluationTiming,
                              mojom::blink::LoadEventBlockingOption,
                              WebScriptExecutionCallback,
@@ -97,10 +97,10 @@ index 72ad9031f29df222b81c9232152d4d4f863349b9..f754df2a4edfffb9058625fc125d8114
                              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 b3403675e34ae0113d2d00ecc649818cf7cb9169..bbd94da0e079bc60a036aea8ba646cf73e1bf30c 100644
+index 6fa2559accc6abe55b450a85eb2bcd1ad539efd0..5d73bc525bed92df79cc7507e594148ec446ea6c 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
-@@ -937,6 +937,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
+@@ -938,6 +938,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
              std::move(callback).Run(value ? std::move(*value) : base::Value());
            },
            std::move(callback)),
@@ -109,10 +109,10 @@ index b3403675e34ae0113d2d00ecc649818cf7cb9169..bbd94da0e079bc60a036aea8ba646cf7
        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 438de31065a4834c169318de9e8e5693e2703efb..a285be083128f96120c1f673f5da8c6fa194fbe8 100644
+index f63a3f391d405ca9daa7181c748d181ef7377d2c..f39e697af6de1f222bfd7c868d11004bbc5ab8c5 100644
 --- a/third_party/blink/renderer/core/frame/pausable_script_executor.cc
 +++ b/third_party/blink/renderer/core/frame/pausable_script_executor.cc
-@@ -248,7 +248,7 @@ void PausableScriptExecutor::CreateAndRun(
+@@ -249,7 +249,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 438de31065a4834c169318de9e8e5693e2703efb..a285be083128f96120c1f673f5da8c6f
            MakeGarbageCollected<V8FunctionExecutor>(
                script_state->GetIsolate(), function, receiver, argc, argv));
    executor->Run();
-@@ -263,10 +263,11 @@ void PausableScriptExecutor::CreateAndRun(
+@@ -264,10 +264,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 438de31065a4834c169318de9e8e5693e2703efb..a285be083128f96120c1f673f5da8c6f
        MakeGarbageCollected<WebScriptExecutor>(std::move(sources),
                                                execute_script_policy));
    switch (evaluation_timing) {
-@@ -288,6 +289,14 @@ void PausableScriptExecutor::ContextDestroyed() {
+@@ -289,6 +290,14 @@ void PausableScriptExecutor::ContextDestroyed() {
      ScriptState::Scope script_scope(script_state_);
      std::move(callback_).Run({}, {});
    }
@@ -150,7 +150,7 @@ index 438de31065a4834c169318de9e8e5693e2703efb..a285be083128f96120c1f673f5da8c6f
    Dispose();
  }
  
-@@ -298,10 +307,12 @@ PausableScriptExecutor::PausableScriptExecutor(
+@@ -299,10 +308,12 @@ PausableScriptExecutor::PausableScriptExecutor(
      mojom::blink::WantResultOption want_result_option,
      mojom::blink::PromiseResultOption promise_result_option,
      WebScriptExecutionCallback callback,
@@ -163,7 +163,7 @@ index 438de31065a4834c169318de9e8e5693e2703efb..a285be083128f96120c1f673f5da8c6f
        user_activation_option_(user_activation_option),
        blocking_option_(blocking_option),
        want_result_option_(want_result_option),
-@@ -425,6 +436,9 @@ void PausableScriptExecutor::HandleResults(
+@@ -426,6 +437,9 @@ void PausableScriptExecutor::HandleResults(
      std::move(callback_).Run(std::move(value), start_time_);
    }
  
@@ -174,7 +174,7 @@ index 438de31065a4834c169318de9e8e5693e2703efb..a285be083128f96120c1f673f5da8c6f
  }
  
 diff --git a/third_party/blink/renderer/core/frame/pausable_script_executor.h b/third_party/blink/renderer/core/frame/pausable_script_executor.h
-index 1e4d9e098463d61dcab787afcc46fea63b27e012..3f1ebf493ddd7d1c209acee2fb1255a0530e45d0 100644
+index fa65331f40b90d812b71a489fd560e9359152d2b..390714d631dc88ef92d59ef9618a5706b4b52f22 100644
 --- a/third_party/blink/renderer/core/frame/pausable_script_executor.h
 +++ b/third_party/blink/renderer/core/frame/pausable_script_executor.h
 @@ -48,7 +48,8 @@ class CORE_EXPORT PausableScriptExecutor final
@@ -204,10 +204,10 @@ index 1e4d9e098463d61dcab787afcc46fea63b27e012..3f1ebf493ddd7d1c209acee2fb1255a0
    const mojom::blink::UserActivationOption user_activation_option_;
    const mojom::blink::LoadEventBlockingOption blocking_option_;
 diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
-index e2761c6b431657778ffe10cdf5fb7e6e29c4c099..42b8887568efdf978f563c8297c42dac04d5de12 100644
+index 6a52eedbbbebd07f588e1ea9cb3a644dc2ec60e4..43224443cad28087e5576aec07bf675de42e689c 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
-@@ -1117,14 +1117,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
+@@ -1113,14 +1113,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
      mojom::blink::EvaluationTiming evaluation_timing,
      mojom::blink::LoadEventBlockingOption blocking_option,
      WebScriptExecutionCallback callback,
@@ -226,7 +226,7 @@ index e2761c6b431657778ffe10cdf5fb7e6e29c4c099..42b8887568efdf978f563c8297c42dac
  
  v8::MaybeLocal<v8::Value> 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 26cea964db8d59780e39d16537d82a5a80c3c95f..94aa3254df5faaa4e9b0a504dc89d13cd97c3518 100644
+index f23c2223be86338be33b9ab82b4ffe1505431b97..cd696287bd545c2637ff9df84966962928fe1030 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
 @@ -196,6 +196,7 @@ class CORE_EXPORT WebLocalFrameImpl final

+ 10 - 10
patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch

@@ -6,10 +6,10 @@ 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 b02f25526d9cb6983a68a35df8c0700624eb7eb5..04f3c2b9ae8d509a90eb83d074d7a887c4faef2b 100644
+index 9b0b1c6011fec0a6653220b98c579443e22b3615..523929431b88fadb9d82838fdbcca9322c4ab490 100644
 --- a/ui/views/controls/menu/menu_controller.cc
 +++ b/ui/views/controls/menu/menu_controller.cc
-@@ -565,6 +565,7 @@ void MenuController::Run(Widget* parent,
+@@ -566,6 +566,7 @@ void MenuController::Run(Widget* parent,
                           MenuAnchorPosition position,
                           bool context_menu,
                           bool is_nested_drag,
@@ -17,7 +17,7 @@ index b02f25526d9cb6983a68a35df8c0700624eb7eb5..04f3c2b9ae8d509a90eb83d074d7a887
                           gfx::NativeView native_view_for_gestures) {
    exit_type_ = ExitType::kNone;
    possible_drag_ = false;
-@@ -629,6 +630,14 @@ void MenuController::Run(Widget* parent,
+@@ -630,6 +631,14 @@ void MenuController::Run(Widget* parent,
    // Set the selection, which opens the initial menu.
    SetSelection(root, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
  
@@ -32,7 +32,7 @@ index b02f25526d9cb6983a68a35df8c0700624eb7eb5..04f3c2b9ae8d509a90eb83d074d7a887
    if (button_controller) {
      pressed_lock_ = button_controller->TakeLock(
          false, ui::LocatedEvent::FromIfValid(event));
-@@ -2253,19 +2262,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
+@@ -2256,19 +2265,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
      }
      item->GetSubmenu()->ShowAt(params);
  
@@ -70,10 +70,10 @@ index 97c1f62da483bc629a795534849729c273768f27..3278dc846135e20816ce1c76137e8806
  
    bool for_drop() const { return for_drop_; }
 diff --git a/ui/views/controls/menu/menu_runner.cc b/ui/views/controls/menu/menu_runner.cc
-index adb22671b94fa16854773baad0e6bff1322c6646..fae32722f1209151fa1da59d0c7892aba8956108 100644
+index b434cf87b0bb2800e3f9d3d94e1c0bd639de1fcc..7d031febe2785d1270145aa075a93a956ae40c14 100644
 --- a/ui/views/controls/menu/menu_runner.cc
 +++ b/ui/views/controls/menu/menu_runner.cc
-@@ -82,7 +82,7 @@ void MenuRunner::RunMenuAt(Widget* parent,
+@@ -83,7 +83,7 @@ void MenuRunner::RunMenuAt(Widget* parent,
    }
  
    impl_->RunMenuAt(parent, button_controller, bounds, anchor, run_types_,
@@ -116,10 +116,10 @@ index 4d2909b5094ab2a4af63504ac0b9f905b5b17759..c49038f592ab1f219ba8b902b69ec7b3
        absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
    void Cancel() override;
 diff --git a/ui/views/controls/menu/menu_runner_impl_adapter.cc b/ui/views/controls/menu/menu_runner_impl_adapter.cc
-index b6c680063889bb997814cd1be45dfbe5f0989f74..dec5f4b2d609aa7b0cec0f16cc89e222bf9d7b85 100644
+index f7d363455a8bc722fd92182cba7accf710fdf053..b6e281344d14fc432d988681d6539cc02e326f07 100644
 --- a/ui/views/controls/menu/menu_runner_impl_adapter.cc
 +++ b/ui/views/controls/menu/menu_runner_impl_adapter.cc
-@@ -33,10 +33,11 @@ void MenuRunnerImplAdapter::RunMenuAt(
+@@ -34,10 +34,11 @@ void MenuRunnerImplAdapter::RunMenuAt(
      const gfx::Rect& bounds,
      MenuAnchorPosition anchor,
      int32_t types,
@@ -133,7 +133,7 @@ index b6c680063889bb997814cd1be45dfbe5f0989f74..dec5f4b2d609aa7b0cec0f16cc89e222
  
  void MenuRunnerImplAdapter::Cancel() {
 diff --git a/ui/views/controls/menu/menu_runner_impl_adapter.h b/ui/views/controls/menu/menu_runner_impl_adapter.h
-index e6587d2208a13576af1831b94724a6286f0e0607..91223ef3f099e20aee5cf1d685c45d2c7f53628e 100644
+index 5064010572a5586e93e7a04799be756044e7ebc0..21d2704b3fdf8644fb08cb66bad3fc6bcb900aef 100644
 --- a/ui/views/controls/menu/menu_runner_impl_adapter.h
 +++ b/ui/views/controls/menu/menu_runner_impl_adapter.h
 @@ -43,6 +43,7 @@ class VIEWS_EXPORT MenuRunnerImplAdapter : public MenuRunnerImplInterface {
@@ -157,7 +157,7 @@ index 2325534ec92430ac4effc95d370925984ce7bd4b..8b6cc1780e53f4edf579e8a62de83133
        absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
    void Cancel() override;
 diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.mm b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
-index c3c80f6becee734319e374968bc00a08273f07b8..5e1bfcc6e1114c6d9dee56428b41797f447586b6 100644
+index a7a82c6c40216eb5bfae8c3aff9013c11f25046e..268a12da51a0624d87e3a7ce6210a2e5212287e8 100644
 --- a/ui/views/controls/menu/menu_runner_impl_cocoa.mm
 +++ b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
 @@ -189,6 +189,7 @@

+ 3 - 3
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 331975fb93f435fc6ebe756113cee74cf7b61c56..f39fe9c4d85f351df8adeea8f32c3dd568311577 100644
+index 583ca650938d2e4feac0c31b0f828815c816ee02..525c97a6cf53e69f9eedd5cfb1223c8ba7d72871 100644
 --- a/content/browser/renderer_host/render_frame_host_manager.cc
 +++ b/content/browser/renderer_host/render_frame_host_manager.cc
-@@ -4222,6 +4222,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -4209,6 +4209,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
      request->ResetStateForSiteInstanceChange();
    }
  
@@ -20,7 +20,7 @@ index 331975fb93f435fc6ebe756113cee74cf7b61c56..f39fe9c4d85f351df8adeea8f32c3dd5
  }
  
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index 48f2887b6c7181aae3d4cc6a87578d4f876ee79f..6c9c592ccc5be2243e56f8b9dbc2a21173e35864 100644
+index 5266731678dbfe5fe66ff863b88325546c255be8..424ecbe94ec90ffd1351fb88d8ef48880862a451 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
 @@ -315,6 +315,11 @@ class CONTENT_EXPORT ContentBrowserClient {

+ 3 - 3
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 33dc4eb4070698bcd156fc59ec11fc419c2120a8..7b9a1f6ab9c32415b0ecc7be3017227f58c2547a 100644
+index d3ac95ba2740b6f3b047acae83a97dcddb805e53..d60429bab364f63afacb5e022ebf4dc65fbcba07 100644
 --- a/gin/v8_initializer.cc
 +++ b/gin/v8_initializer.cc
-@@ -429,7 +429,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
+@@ -437,7 +437,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 33dc4eb4070698bcd156fc59ec11fc419c2120a8..7b9a1f6ab9c32415b0ecc7be3017227f
    static bool v8_is_initialized = false;
    if (v8_is_initialized)
      return;
-@@ -439,7 +440,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
+@@ -447,7 +448,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
    // See https://crbug.com/v8/11043
    SetFlags(mode, js_command_line_flags);
  

+ 3 - 3
patches/chromium/gritsettings_resource_ids.patch

@@ -6,11 +6,11 @@ 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 99322038017ccbb65ced6a8d49ed6a2c7815caed..6db47e8ce5ea95df040626e5c6459bd55f36ce37 100644
+index 95e5ac768b9049ca5ce09264cd391f5f7247b5a3..e8c51cc830d87d08816c50525971c9f58a512b2e 100644
 --- a/tools/gritsettings/resource_ids.spec
 +++ b/tools/gritsettings/resource_ids.spec
-@@ -1238,6 +1238,11 @@
-     "includes": [7440],
+@@ -1260,6 +1260,11 @@
+     "includes": [8440],
    },
  
 +  "electron/electron_resources.grd": {

+ 1 - 1
patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch

@@ -8,7 +8,7 @@ require a largeish patch to get working, so just redirect it to our
 implementation instead.
 
 diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
-index f55dc18e1870bf19c07d212dfdfb5d401046ae93..a426d68a65054cf2f0007c93100530bb75aeb558 100644
+index eb6f869cffa22f69a16d8ba1e213a7c0664579c4..58d193d20b0019ad09b63dca0be1a14bd647abf8 100644
 --- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
 +++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
 @@ -10,8 +10,8 @@

+ 1 - 1
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 20c4147d7812f0f279b819fc8d0c1799cc25c7cc..f79259a2cf7aef8eb764e9ee5aaee7f27bbf34be 100755
+index 2b2dc1a58d62419e3008cdf95b273929cbba3049..34178daaf9d40960a3e1f324e62a765f12500b98 100755
 --- a/tools/clang/scripts/update.py
 +++ b/tools/clang/scripts/update.py
 @@ -307,6 +307,8 @@ def GetDefaultHostOs():

+ 1 - 1
patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch

@@ -21,7 +21,7 @@ index 348cf4c57ac478b6bd7fa34e526205314d6970bc..1e753b492b9ea186265d88d4dd589cc9
        properties->supports_global_application_menus = true;
        properties->app_modal_dialogs_use_event_blocker = true;
 diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h
-index 2d58c44fb731cee1a4830ce3c27f25fe75d690be..5dbffdb3247aa6599720fef843f4567bbd2b7ad4 100644
+index f2b0691696b50e028de1a26dfe78419debf2a596..8211ca74255b07b59aa008932fae11f2ea3fdcaf 100644
 --- a/ui/ozone/public/ozone_platform.h
 +++ b/ui/ozone/public/ozone_platform.h
 @@ -124,6 +124,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform {

+ 1 - 1
patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch

@@ -9,7 +9,7 @@ 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 f70a103a45c6d6610864147ce746c0e085d0ddb4..fda4438dac09ddbe805621214eac021a593e87ea 100644
+index 4320694e7f69179fcffd8ede4c499681f6fb3e95..31bebe229724917b0e93ca8563032f51711ce60d 100644
 --- a/content/app/content_main.cc
 +++ b/content/app/content_main.cc
 @@ -309,14 +309,13 @@ RunContentProcess(ContentMainParams params,

+ 2 - 2
patches/chromium/mas-cgdisplayusesforcetogray.patch

@@ -6,10 +6,10 @@ Subject: mas: avoid usage of CGDisplayUsesForceToGray
 Removes usage of the CGDisplayUsesForceToGray private API.
 
 diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
-index 2653ce451ee21f55824f30ee19c7b46b4c29c75e..e9144eba98b3b038f48b0c431af3bc39678ebec6 100644
+index a771c1c03fd1afe3a5e563b4421721a5ddc2eb93..a6cbdfcbeff30508d921d4637aac543dce9e8ad3 100644
 --- a/ui/display/mac/screen_mac.mm
 +++ b/ui/display/mac/screen_mac.mm
-@@ -170,7 +170,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {
+@@ -171,7 +171,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {
      display.set_color_depth(Display::kDefaultBitsPerPixel);
      display.set_depth_per_component(Display::kDefaultBitsPerComponent);
    }

+ 6 - 6
patches/chromium/mas_avoid_usage_of_private_macos_apis.patch

@@ -99,7 +99,7 @@ index b267bc2272fa82334a70d897a900f1ea37b1a598..967e22699bf565368704972c021f9b42
      DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1));
    }
 diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
-index 9642854e237edff1020ec5cd54e2cbe6b9e85dd2..4e84d8b09787a8a4592b64622bb8a8ca78fbaf49 100644
+index 2fa8809df1d4b29525a737cca40694a61e7ca570..c90c81b0bc5d87777b87de2848326696f95d2306 100644
 --- a/media/audio/mac/audio_low_latency_input_mac.cc
 +++ b/media/audio/mac/audio_low_latency_input_mac.cc
 @@ -31,19 +31,23 @@
@@ -127,10 +127,10 @@ index 9642854e237edff1020ec5cd54e2cbe6b9e85dd2..4e84d8b09787a8a4592b64622bb8a8ca
  
  }  // namespace
 diff --git a/sandbox/mac/sandbox_logging.cc b/sandbox/mac/sandbox_logging.cc
-index f52f1d1da4d431505b1a55df4764f37a70e0b29d..2406f5d4342dafc0d2c398f03ac23907a55c929f 100644
+index 095c639b9893e885d8937e29ed7d47a7c28bc6b6..cfa5e307de8326fbc335996feaf9595d1572cd3d 100644
 --- a/sandbox/mac/sandbox_logging.cc
 +++ b/sandbox/mac/sandbox_logging.cc
-@@ -32,9 +32,11 @@
+@@ -33,9 +33,11 @@
    }
  #endif
  
@@ -142,9 +142,9 @@ index f52f1d1da4d431505b1a55df4764f37a70e0b29d..2406f5d4342dafc0d2c398f03ac23907
  
  namespace sandbox::logging {
  
-@@ -71,9 +73,11 @@ void SendOsLog(Level level, const char* message) {
- 
-   os_log_with_type(log.get(), os_log_type, "%{public}s", message);
+@@ -76,9 +78,11 @@ void SendOsLog(Level level, const char* message) {
+     sandbox::crash_message::SetCrashMessage(message);
+   }
  
 +#if !IS_MAS_BUILD()
    if (level == Level::FATAL) {

+ 26 - 21
patches/chromium/mas_disable_remote_accessibility.patch

@@ -43,7 +43,7 @@ index 5a096477c123a782341115f964c4975301ccaf9a..ecfbb3b405425af346a6ba6788fc1d8f
  
  }  // namespace
 diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
-index 44e24a3c07a6ddc9feef75f0027bde9ad329ab0f..6acf4dd87dc2cbd4f527c6913ea53054e0ae8e5b 100644
+index 4616dd8ca21d7e243d5bd785477fe6e43bcdb34b..3332856a44751b3dab0b0002ff3d5a135922fbca 100644
 --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
 +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
 @@ -595,10 +595,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -121,7 +121,7 @@ index 5a6706495ed2a8f1cd781da9bde8572318bf6897..afd4d1f728a7f056e49b2ecb006c5a05
    return false;
  }
 diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
-index 3edad19a3ecbd27f54f1d17aca2e806fbbff05d4..1b4ed839f0d00334fd32a102be07be91516592d5 100644
+index 223b88f1ab7cb6dd3694cf50187317555f2719c6..cfa7c77c7785388012f774317a7e5fbcb33e8819 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.h
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.h
 @@ -50,7 +50,9 @@ class ScopedPasswordInputEnabler;
@@ -147,10 +147,10 @@ index 3edad19a3ecbd27f54f1d17aca2e806fbbff05d4..1b4ed839f0d00334fd32a102be07be91
    // 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 6f95c717849b0ba1795e018e237625e221fd4ced..d9888a6c4bc5b6e6a386aeebd035cdc7a626e40c 100644
+index 988682beecc0f2273859f6b4924d87b207778160..6800be4c8a0a6355318bd85c010189ec6c5d530b 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
-@@ -279,8 +279,10 @@
+@@ -272,8 +272,10 @@
  void RenderWidgetHostViewMac::MigrateNSViewBridge(
      remote_cocoa::mojom::Application* remote_cocoa_application,
      uint64_t parent_ns_view_id) {
@@ -161,7 +161,7 @@ index 6f95c717849b0ba1795e018e237625e221fd4ced..d9888a6c4bc5b6e6a386aeebd035cdc7
  
    // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
    // pointers. `ns_view_` gets reinitialized later in this method.
-@@ -1637,8 +1639,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1635,8 +1637,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  
  gfx::NativeViewAccessible
  RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -172,7 +172,7 @@ index 6f95c717849b0ba1795e018e237625e221fd4ced..d9888a6c4bc5b6e6a386aeebd035cdc7
    return [GetInProcessNSView() window];
  }
  
-@@ -1683,9 +1687,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1681,9 +1685,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  }
  
  void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -184,7 +184,7 @@ index 6f95c717849b0ba1795e018e237625e221fd4ced..d9888a6c4bc5b6e6a386aeebd035cdc7
  }
  
  bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
-@@ -2192,12 +2198,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -2190,12 +2196,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  
  void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
      const std::vector<uint8_t>& window_token) {
@@ -200,7 +200,7 @@ index 6f95c717849b0ba1795e018e237625e221fd4ced..d9888a6c4bc5b6e6a386aeebd035cdc7
  
  ///////////////////////////////////////////////////////////////////////////////
 diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
-index 099dd572b6b258b3214743bee63125c6bc30e0c5..ebdd885b00da86656bec13fb45a763ef49209d3e 100644
+index 3af6a66b319a17f7a5962a3135358dfa3ca5fa00..39a960146504ac6034fe24593006d09ff9c667ac 100644
 --- a/ui/base/BUILD.gn
 +++ b/ui/base/BUILD.gn
 @@ -376,6 +376,13 @@ component("base") {
@@ -218,7 +218,7 @@ index 099dd572b6b258b3214743bee63125c6bc30e0c5..ebdd885b00da86656bec13fb45a763ef
      sources += [
        "device_form_factor_ios.mm",
 diff --git a/ui/base/cocoa/remote_accessibility_api.h b/ui/base/cocoa/remote_accessibility_api.h
-index 835cce73b7ab8b38c37d3e2650e12303d9d918e3..4460a00497dfaee0ba90cd5d14888055ed8a2830 100644
+index 3182458838aa96d34911280ab4c6c3aa4aa22d6d..17b57f54492421743a0d69106eefce2c9beb8e87 100644
 --- a/ui/base/cocoa/remote_accessibility_api.h
 +++ b/ui/base/cocoa/remote_accessibility_api.h
 @@ -13,6 +13,8 @@
@@ -228,9 +228,9 @@ index 835cce73b7ab8b38c37d3e2650e12303d9d918e3..4460a00497dfaee0ba90cd5d14888055
 +#if !IS_MAS_BUILD()
 +
  @interface NSAccessibilityRemoteUIElement : NSObject
- + (void)registerRemoteUIProcessIdentifier:(int)pid;
- + (NSData*)remoteTokenForLocalUIElement:(id)element;
-@@ -34,4 +36,6 @@ class COMPONENT_EXPORT(UI_BASE) RemoteAccessibility {
+ + (void)setRemoteUIApp:(BOOL)flag;
+ + (BOOL)isRemoteUIApp;
+@@ -38,4 +40,6 @@ class COMPONENT_EXPORT(UI_BASE) RemoteAccessibility {
  
  }  // namespace ui
  
@@ -238,7 +238,7 @@ index 835cce73b7ab8b38c37d3e2650e12303d9d918e3..4460a00497dfaee0ba90cd5d14888055
 +
  #endif  // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_
 diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
-index ed832e00520aced33ef6341d413244fae10f8d42..905a922692cb7e522426639c083971cbd0c4190f 100644
+index f37c02488e6ba943ebf9b880a04bcfef9afc9d97..b10ed25b5cdf5eb2f314ed72226f71c8bc35e58e 100644
 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
 +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
 @@ -30,7 +30,9 @@
@@ -251,7 +251,7 @@ index ed832e00520aced33ef6341d413244fae10f8d42..905a922692cb7e522426639c083971cb
  @class NSView;
  
  namespace remote_cocoa {
-@@ -464,10 +466,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
+@@ -465,10 +467,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
    mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
        remote_ns_window_remote_;
  
@@ -265,10 +265,10 @@ index ed832e00520aced33ef6341d413244fae10f8d42..905a922692cb7e522426639c083971cb
    // 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 ff5060bbeb626822895a36fd1244559cf51aa21d..9833577e99f7166d0414de5056e3bf4acb2a44c0 100644
+index 34dd3d7497828edc0a2cc1a5babb5b00d54f2ada..501afb8d381ce229d7b30f0a87342b7af37a45ba 100644
 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
 +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
-@@ -342,7 +342,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
+@@ -345,7 +345,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
  NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const {
    if (in_process_ns_window_bridge_)
      return in_process_ns_window_bridge_->ns_view();
@@ -280,7 +280,7 @@ index ff5060bbeb626822895a36fd1244559cf51aa21d..9833577e99f7166d0414de5056e3bf4a
  }
  
  gfx::NativeViewAccessible
-@@ -357,7 +361,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
+@@ -360,7 +364,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
      return [in_process_ns_window_bridge_->ns_view() window];
    }
  
@@ -292,7 +292,7 @@ index ff5060bbeb626822895a36fd1244559cf51aa21d..9833577e99f7166d0414de5056e3bf4a
  }
  
  remote_cocoa::mojom::NativeWidgetNSWindow*
-@@ -1388,20 +1396,24 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
+@@ -1397,6 +1405,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
  void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
      const std::vector<uint8_t>& window_token,
      const std::vector<uint8_t>& view_token) {
@@ -300,9 +300,10 @@ index ff5060bbeb626822895a36fd1244559cf51aa21d..9833577e99f7166d0414de5056e3bf4a
    remote_window_accessible_ =
        ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
    remote_view_accessible_ =
-       ui::RemoteAccessibility::GetRemoteElementFromToken(view_token);
-   [remote_view_accessible_ setWindowUIElement:remote_window_accessible_];
-   [remote_view_accessible_ setTopLevelUIElement:remote_window_accessible_];
+@@ -1408,11 +1417,13 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
+       ![NSAccessibilityRemoteUIElement isRemoteUIApp]) {
+     [NSAccessibilityRemoteUIElement setRemoteUIApp:YES];
+   }
 +#endif
  }
  
@@ -312,6 +313,10 @@ index ff5060bbeb626822895a36fd1244559cf51aa21d..9833577e99f7166d0414de5056e3bf4a
 +#if !IS_MAS_BUILD()
    *pid = getpid();
    id element_id = GetNativeViewAccessible();
+ 
+@@ -1425,6 +1436,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
+   }
+ 
    *token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id);
 +#endif
    return true;

+ 3 - 3
patches/chromium/mas_disable_remote_layer.patch

@@ -86,10 +86,10 @@ index 34931ae06d7923aff611b384730ca2edb7e866e9..1973b90a04bcbd21059b82a0969d3ff1
            ca_layer_tree_coordinator_->GetIOSurfaceForDisplay();
        if (io_surface) {
 diff --git a/ui/accelerated_widget_mac/display_ca_layer_tree.mm b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
-index 3ff04691217a6b3c9d7605c2e6b8f8a88959b271..0296ca57a4c51cb3e97c65d5aba46f33617cb799 100644
+index dcf493d62990018040a3f84b6f875af737bd2214..6ffffe8b3946e0427aead8be19878c537c841294 100644
 --- a/ui/accelerated_widget_mac/display_ca_layer_tree.mm
 +++ b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
-@@ -120,6 +120,7 @@ - (void)setContentsChanged;
+@@ -121,6 +121,7 @@ - (void)setContentsChanged;
  }
  
  void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) {
@@ -97,7 +97,7 @@ index 3ff04691217a6b3c9d7605c2e6b8f8a88959b271..0296ca57a4c51cb3e97c65d5aba46f33
    // Early-out if the remote layer has not changed.
    if (remote_layer_.contextId == ca_context_id) {
      return;
-@@ -149,6 +150,9 @@ - (void)setContentsChanged;
+@@ -150,6 +151,9 @@ - (void)setContentsChanged;
      [io_surface_layer_ removeFromSuperlayer];
      io_surface_layer_ = nil;
    }

+ 2 - 2
patches/chromium/mas_no_private_api.patch

@@ -145,10 +145,10 @@ index 82836fc5fe3a7279f4fd15f297969162bc63089a..4276251875612430d1b197578f659736
  
  base::WeakPtr<BluetoothLowEnergyAdapterApple>
 diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
-index c97d1fff57cdf5128a9ec972a2987d6f8d50583f..b852f651086d5bf667984c151fd1111ee9f1b486 100644
+index 3dc680c0abe4252e5c733c641a2fc46e13503c43..11e325816ff0e5d49f8f710375ba1d9de8198439 100644
 --- a/media/audio/mac/audio_manager_mac.cc
 +++ b/media/audio/mac/audio_manager_mac.cc
-@@ -995,7 +995,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
+@@ -989,7 +989,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
  
  void AudioManagerMac::InitializeOnAudioThread() {
    DCHECK(GetTaskRunner()->BelongsToCurrentThread());

+ 1 - 1
patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch

@@ -9,7 +9,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
 system priority.
 
 diff --git a/ui/gfx/platform_font_mac.mm b/ui/gfx/platform_font_mac.mm
-index 342409c31eb73f4a13ac13a4740b32863f4ef0d6..a1b60a8f77fa4d32e07e6cda240447cf114e83cb 100644
+index b28640bb4d89ba9508d4086c9e5ca9ed4a9a7023..15cb883b91f624c1f23f4458dbf8d14763d11778 100644
 --- a/ui/gfx/platform_font_mac.mm
 +++ b/ui/gfx/platform_font_mac.mm
 @@ -28,9 +28,11 @@

+ 10 - 10
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 0a0fa8772cab92d23a8b75aded6c1dbcf29e7b94..f2b36dbd52bc59928ea14b6adb30005f6505ab19 100644
+index 344fb45470747ee5577e15fd5fc43f4e34a27459..f07572030e7b80fdc2c0563606e0b3eecb6b9ee3 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
-@@ -145,6 +145,11 @@
+@@ -146,6 +146,11 @@
  #include "third_party/abseil-cpp/absl/types/optional.h"
  #include "url/gurl.h"
  
@@ -22,7 +22,7 @@ index 0a0fa8772cab92d23a8b75aded6c1dbcf29e7b94..f2b36dbd52bc59928ea14b6adb30005f
  #if BUILDFLAG(IS_CT_SUPPORTED)
  #include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
  #include "components/certificate_transparency/chrome_require_ct_delegate.h"
-@@ -437,6 +442,99 @@ bool GetFullDataFilePath(
+@@ -461,6 +466,99 @@ bool GetFullDataFilePath(
  
  }  // namespace
  
@@ -122,7 +122,7 @@ index 0a0fa8772cab92d23a8b75aded6c1dbcf29e7b94..f2b36dbd52bc59928ea14b6adb30005f
  constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
  
  NetworkContext::NetworkContextHttpAuthPreferences::
-@@ -825,6 +923,13 @@ void NetworkContext::SetClient(
+@@ -828,6 +926,13 @@ void NetworkContext::SetClient(
    client_.Bind(std::move(client));
  }
  
@@ -136,7 +136,7 @@ index 0a0fa8772cab92d23a8b75aded6c1dbcf29e7b94..f2b36dbd52bc59928ea14b6adb30005f
  void NetworkContext::CreateURLLoaderFactory(
      mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
      mojom::URLLoaderFactoryParamsPtr params) {
-@@ -2448,6 +2553,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
+@@ -2467,6 +2572,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
          std::move(cert_verifier));
      cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get());
  #endif  // BUILDFLAG(IS_CHROMEOS)
@@ -147,7 +147,7 @@ index 0a0fa8772cab92d23a8b75aded6c1dbcf29e7b94..f2b36dbd52bc59928ea14b6adb30005f
  
    builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
 diff --git a/services/network/network_context.h b/services/network/network_context.h
-index ef4140d740e233964e1db25d3239a8807f591e2d..c81ae450479d994a89f4d9560028ecd761e8e74f 100644
+index 3d07f29d3aaa2100960cca787b35b626d472d388..49d3215854977cbe78dff2909739646f0c40dad9 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
 @@ -114,6 +114,7 @@ class URLMatcher;
@@ -167,7 +167,7 @@ index ef4140d740e233964e1db25d3239a8807f591e2d..c81ae450479d994a89f4d9560028ecd7
    void ResetURLLoaderFactories() override;
    void GetViaObliviousHttp(
        mojom::ObliviousHttpRequestPtr request,
-@@ -904,6 +907,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -905,6 +908,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
    std::vector<base::OnceClosure> dismount_closures_;
  #endif  // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
  
@@ -177,10 +177,10 @@ index ef4140d740e233964e1db25d3239a8807f591e2d..c81ae450479d994a89f4d9560028ecd7
    std::unique_ptr<HostResolver> internal_host_resolver_;
    // Map values set to non-null only if that HostResolver has its own private
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index 3d95f8cd1adebd11a57ec7fd5152ac89e30e28bc..5d20e33a59de709a8e21630de2e1c357c5a68dfd 100644
+index 88fc9ddba7fffd4d94a5086f258c5018788e9f93..cda826721b166691f270dd9b28aacec1ce396d2b 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -316,6 +316,17 @@ struct NetworkContextFilePaths {
+@@ -311,6 +311,17 @@ struct NetworkContextFilePaths {
    bool trigger_migration = false;
  };
  
@@ -198,7 +198,7 @@ index 3d95f8cd1adebd11a57ec7fd5152ac89e30e28bc..5d20e33a59de709a8e21630de2e1c357
  // Parameters for constructing a network context.
  struct NetworkContextParams {
    // The user agent string.
-@@ -949,6 +960,9 @@ interface NetworkContext {
+@@ -948,6 +959,9 @@ interface NetworkContext {
    // Sets a client for this network context.
    SetClient(pending_remote<NetworkContextClient> client);
  

+ 4 - 4
patches/chromium/notification_provenance.patch

@@ -7,7 +7,7 @@ Pass RenderFrameHost through to PlatformNotificationService
 so Electron can identify which renderer a notification came from.
 
 diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
-index 7b31b8fce0fb99baa751131b336a2842f728433a..8f230c09e465df0403c7f162f5f9161ae0085cdf 100644
+index 1c301d00fc74fff81dd1495ac812f1970ace3773..5add3b27b2c1a0af5529cdd5908dfc99dac61e42 100644
 --- a/chrome/browser/notifications/platform_notification_service_impl.cc
 +++ b/chrome/browser/notifications/platform_notification_service_impl.cc
 @@ -201,6 +201,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
@@ -133,10 +133,10 @@ index 9c9e590aab71d5b66cdd2c9a0cfc5f2d34443e84..c461c131d93d592487e319893d531bf4
        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 44922d6b9f7f7a9d1d0fb9f69b044d4728593cf3..cb161217889e2daaffcf68ff438bbba395ac7b4e 100644
+index 5da4ee8f01e8314f8e5d84544e497a3600540b87..1d9b5d3134c363c7b55bee1cb45a45d3557020e2 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -1960,7 +1960,7 @@ void RenderProcessHostImpl::CreateNotificationService(
+@@ -2038,7 +2038,7 @@ void RenderProcessHostImpl::CreateNotificationService(
      case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
      case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
        storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@@ -145,7 +145,7 @@ index 44922d6b9f7f7a9d1d0fb9f69b044d4728593cf3..cb161217889e2daaffcf68ff438bbba3
            creator_type, std::move(receiver));
        break;
      }
-@@ -1968,7 +1968,7 @@ void RenderProcessHostImpl::CreateNotificationService(
+@@ -2046,7 +2046,7 @@ void RenderProcessHostImpl::CreateNotificationService(
        CHECK(rfh);
  
        storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

+ 5 - 5
patches/chromium/picture-in-picture.patch

@@ -40,7 +40,7 @@ index af0616d9ca466d146f3c41887857dd4720ebafbf..c088db193f5bd4b88aa42a3803571d2b
                  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 50c222d235461ecce1f3ccc8941293de41cc134c..88d2338f7b6fb4fded4c34105bb7f52fc35f06a1 100644
+index 56da12ea713adc699fc8a5d7eef493824f5a4980..599e3f762a7cd4213f5296a91fc290553608901f 100644
 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
 +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
 @@ -16,9 +16,11 @@
@@ -55,7 +55,7 @@ index 50c222d235461ecce1f3ccc8941293de41cc134c..88d2338f7b6fb4fded4c34105bb7f52f
  #include "chrome/browser/ui/color/chrome_color_id.h"
  #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
  #include "chrome/browser/ui/views/overlay/close_image_button.h"
-@@ -55,7 +57,7 @@
+@@ -57,7 +59,7 @@
  #include "ui/aura/window.h"
  #endif
  
@@ -64,12 +64,12 @@ index 50c222d235461ecce1f3ccc8941293de41cc134c..88d2338f7b6fb4fded4c34105bb7f52f
  #include "chrome/browser/shell_integration_win.h"
  #include "ui/aura/window.h"
  #include "ui/aura/window_tree_host.h"
-@@ -276,7 +278,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
+@@ -286,7 +288,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
    overlay_window->Init(std::move(params));
    overlay_window->OnRootViewReady();
  
 -#if BUILDFLAG(IS_WIN)
 +#if 0
    std::wstring app_user_model_id;
-   Browser* browser =
-       chrome::FindBrowserWithWebContents(controller->GetWebContents());
+   Browser* browser = chrome::FindBrowserWithTab(controller->GetWebContents());
+   if (browser) {

+ 9 - 9
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 fd9c17dddf475eda4c75e7ef1fde522388024111..3190c2254635a59f79bb5db889b74f62f4f10dcc 100644
+index 59a11d14d3f15e08f222a81f947b581b139fc7a6..7af378fc2148676d6f39d0e7e0f6f22d8c3716c6 100644
 --- a/ui/color/color_id.h
 +++ b/ui/color/color_id.h
-@@ -399,6 +399,10 @@
+@@ -403,6 +403,10 @@
    E_CPONLY(kColorRadioButtonForegroundUnchecked) \
    E_CPONLY(kColorRadioButtonForegroundDisabled) \
    E_CPONLY(kColorRadioButtonForegroundChecked) \
@@ -22,7 +22,7 @@ index fd9c17dddf475eda4c75e7ef1fde522388024111..3190c2254635a59f79bb5db889b74f62
    E_CPONLY(kColorSegmentedButtonBorder) \
    E_CPONLY(kColorSegmentedButtonFocus) \
    E_CPONLY(kColorSegmentedButtonForegroundChecked) \
-@@ -503,6 +507,7 @@
+@@ -509,6 +513,7 @@
    E_CPONLY(kColorTreeNodeForeground) \
    E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \
    E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \
@@ -31,7 +31,7 @@ index fd9c17dddf475eda4c75e7ef1fde522388024111..3190c2254635a59f79bb5db889b74f62
    /* ui::NativeThemeBase::ControlColorId. */ \
    E_CPONLY(kColorWebNativeControlAccent) \
 diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc
-index 01fe909077a786d5c7d896e84fd91b01d730f695..4a71d681177effe8ed06d46056f6ba1cfd7dd690 100644
+index 1bef8b4a80d2d244f469a0ca9bee9b8d67bb8767..3e911e5931301a279b6608d5cb1451ccb67f0806 100644
 --- a/ui/color/ui_color_mixer.cc
 +++ b/ui/color/ui_color_mixer.cc
 @@ -200,6 +200,17 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) {
@@ -61,10 +61,10 @@ index 01fe909077a786d5c7d896e84fd91b01d730f695..4a71d681177effe8ed06d46056f6ba1c
                                               ? 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 c499561242bb013714b6909d73d3df0fcbe16a18..03171c32211c0bd2e96eded7bbafab0a9f440074 100644
+index f3a29c3c7393a26a7da72c4b412a98f126059a3f..9508cfc93c4980ef503a0ebb0cc87b3853dcc707 100644
 --- a/ui/color/win/native_color_mixers_win.cc
 +++ b/ui/color/win/native_color_mixers_win.cc
-@@ -201,6 +201,10 @@ void AddNativeUiColorMixer(ColorProvider* provider,
+@@ -200,6 +200,10 @@ void AddNativeUiColorMixer(ColorProvider* provider,
        SetAlpha(kColorNotificationInputForeground, gfx::kGoogleGreyAlpha700);
    mixer[kColorSliderTrack] = AlphaBlend(
        kColorNativeHighlight, kColorNativeWindow, gfx::kGoogleGreyAlpha400);
@@ -75,7 +75,7 @@ index c499561242bb013714b6909d73d3df0fcbe16a18..03171c32211c0bd2e96eded7bbafab0a
  
    CompleteControlsForcedColorsDefinition(mixer);
  
-@@ -211,6 +215,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
+@@ -210,6 +214,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
    mixer[kColorFrameInactive] = {kColorNativeWindow};
    mixer[kColorPrimaryBackground] = {kColorNativeWindow};
    mixer[kColorTooltipBackground] = {kColorNativeWindow};
@@ -83,7 +83,7 @@ index c499561242bb013714b6909d73d3df0fcbe16a18..03171c32211c0bd2e96eded7bbafab0a
  
    // Window Text
    mixer[kColorAlertLowSeverity] = {kColorNativeWindowText};
-@@ -224,6 +229,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
+@@ -223,6 +228,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
    mixer[kColorTableGroupingIndicator] = {kColorNativeWindowText};
    mixer[kColorThrobber] = {kColorNativeWindowText};
    mixer[kColorTooltipForeground] = {kColorNativeWindowText};
@@ -91,7 +91,7 @@ index c499561242bb013714b6909d73d3df0fcbe16a18..03171c32211c0bd2e96eded7bbafab0a
  
    // Hyperlinks
    mixer[kColorLinkForegroundDefault] = {kColorNativeHotlight};
-@@ -266,6 +272,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
+@@ -265,6 +271,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
    mixer[kColorTextfieldForeground] = {kColorNativeBtnText};
    mixer[kColorTextfieldForegroundPlaceholder] = {kColorNativeBtnText};
    mixer[kColorTextfieldForegroundDisabled] = {kColorNativeBtnText};

+ 63 - 64
patches/chromium/printing.patch

@@ -11,10 +11,10 @@ majority of changes originally come from these PRs:
 This patch also fixes callback for manual user cancellation and success.
 
 diff --git a/BUILD.gn b/BUILD.gn
-index 64819b31d74a78986b5e9f7f133192a83f9bf113..bc2c7f6505c8b8b99ff8e35c1b0798e29e76c5cc 100644
+index ad4b830fa0932340b7c6b45d94ebf49afb4b7f73..4acc0a5befd0da25460de37eef7c4aabfd291659 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
-@@ -973,7 +973,6 @@ if (is_win) {
+@@ -964,7 +964,6 @@ if (is_win) {
        "//media:media_unittests",
        "//media/midi:midi_unittests",
        "//net:net_unittests",
@@ -22,7 +22,7 @@ index 64819b31d74a78986b5e9f7f133192a83f9bf113..bc2c7f6505c8b8b99ff8e35c1b0798e2
        "//sql:sql_unittests",
        "//third_party/breakpad:symupload($host_toolchain)",
        "//ui/base:ui_base_unittests",
-@@ -982,6 +981,10 @@ if (is_win) {
+@@ -973,6 +972,10 @@ if (is_win) {
        "//ui/views:views_unittests",
        "//url:url_unittests",
      ]
@@ -34,10 +34,10 @@ index 64819b31d74a78986b5e9f7f133192a83f9bf113..bc2c7f6505c8b8b99ff8e35c1b0798e2
  }
  
 diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
-index 819ea8a1902bd4cbf52f6e52622203b34a096aae..c7111b8814cc9260de2201febdcaeb2f588e5d6a 100644
+index 57c9c4408946066cd89304d50798a3719c8012d5..1c44d16c792a497623333ee4cb89005e59b8e529 100644
 --- a/chrome/browser/printing/print_job.cc
 +++ b/chrome/browser/printing/print_job.cc
-@@ -93,6 +93,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) {
+@@ -92,6 +92,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) {
    return base::FeatureList::IsEnabled(features::kPrintWithReducedRasterization);
  }
  
@@ -45,7 +45,7 @@ index 819ea8a1902bd4cbf52f6e52622203b34a096aae..c7111b8814cc9260de2201febdcaeb2f
  PrefService* GetPrefsForWebContents(content::WebContents* web_contents) {
    // TODO(thestig): Figure out why crbug.com/1083911 occurred, which is likely
    // because `web_contents` was null. As a result, this section has many more
-@@ -107,6 +108,7 @@ content::WebContents* GetWebContents(content::GlobalRenderFrameHostId rfh_id) {
+@@ -106,6 +107,7 @@ content::WebContents* GetWebContents(content::GlobalRenderFrameHostId rfh_id) {
    auto* rfh = content::RenderFrameHost::FromID(rfh_id);
    return rfh ? content::WebContents::FromRenderFrameHost(rfh) : nullptr;
  }
@@ -53,7 +53,7 @@ index 819ea8a1902bd4cbf52f6e52622203b34a096aae..c7111b8814cc9260de2201febdcaeb2f
  
  #endif  // BUILDFLAG(IS_WIN)
  
-@@ -147,10 +149,8 @@ void PrintJob::Initialize(std::unique_ptr<PrinterQuery> query,
+@@ -146,10 +148,8 @@ void PrintJob::Initialize(std::unique_ptr<PrinterQuery> query,
  
  #if BUILDFLAG(IS_WIN)
    pdf_page_mapping_ = PageNumber::GetPages(settings->ranges(), page_count);
@@ -66,7 +66,7 @@ index 819ea8a1902bd4cbf52f6e52622203b34a096aae..c7111b8814cc9260de2201febdcaeb2f
  #endif
  
    auto new_doc = base::MakeRefCounted<PrintedDocument>(std::move(settings),
-@@ -387,8 +387,10 @@ void PrintJob::StartPdfToEmfConversion(
+@@ -386,8 +386,10 @@ void PrintJob::StartPdfToEmfConversion(
  
    const PrintSettings& settings = document()->settings();
  
@@ -78,7 +78,7 @@ index 819ea8a1902bd4cbf52f6e52622203b34a096aae..c7111b8814cc9260de2201febdcaeb2f
  
    using RenderMode = PdfRenderSettings::Mode;
    RenderMode mode = print_with_reduced_rasterization
-@@ -480,8 +482,10 @@ void PrintJob::StartPdfToPostScriptConversion(
+@@ -479,8 +481,10 @@ void PrintJob::StartPdfToPostScriptConversion(
    if (ps_level2) {
      mode = PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2;
    } else {
@@ -91,20 +91,20 @@ index 819ea8a1902bd4cbf52f6e52622203b34a096aae..c7111b8814cc9260de2201febdcaeb2f
                 : 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 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c5445468cbda20 100644
+index 5c39228c38530a7a631f94a6de3d2f607162650b..442a6f841e1e234413888c0b64d34b0828030494 100644
 --- a/chrome/browser/printing/print_view_manager_base.cc
 +++ b/chrome/browser/printing/print_view_manager_base.cc
-@@ -23,7 +23,9 @@
+@@ -22,7 +22,9 @@
+ #include "build/chromeos_buildflags.h"
  #include "chrome/browser/bad_message.h"
  #include "chrome/browser/browser_process.h"
- #include "chrome/browser/chrome_notification_types.h"
 +#if 0  // Electron does not use Chrome error dialogs
  #include "chrome/browser/printing/print_error_dialog.h"
 +#endif
  #include "chrome/browser/printing/print_job.h"
  #include "chrome/browser/printing/print_job_manager.h"
  #include "chrome/browser/printing/print_view_manager_common.h"
-@@ -83,6 +85,20 @@ namespace printing {
+@@ -79,6 +81,20 @@ namespace printing {
  
  namespace {
  
@@ -125,7 +125,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
  void OnDidGetDefaultPrintSettings(
      scoped_refptr<PrintQueriesQueue> queue,
      bool want_pdf_settings,
-@@ -91,9 +107,11 @@ void OnDidGetDefaultPrintSettings(
+@@ -87,9 +103,11 @@ void OnDidGetDefaultPrintSettings(
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
  
    if (printer_query->last_status() != mojom::ResultCode::kSuccess) {
@@ -137,7 +137,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
      std::move(callback).Run(nullptr);
      return;
    }
-@@ -103,9 +121,11 @@ void OnDidGetDefaultPrintSettings(
+@@ -99,9 +117,11 @@ void OnDidGetDefaultPrintSettings(
    params->document_cookie = printer_query->cookie();
  
    if (!PrintMsgPrintParamsIsValid(*params)) {
@@ -149,7 +149,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
      std::move(callback).Run(nullptr);
      return;
    }
-@@ -122,7 +142,8 @@ void OnDidScriptedPrint(
+@@ -118,7 +138,8 @@ void OnDidScriptedPrint(
  
    if (printer_query->last_status() != mojom::ResultCode::kSuccess ||
        !printer_query->settings().dpi()) {
@@ -159,7 +159,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
      return;
    }
  
-@@ -132,12 +153,12 @@ void OnDidScriptedPrint(
+@@ -128,12 +149,12 @@ void OnDidScriptedPrint(
                                  params->params.get());
    params->params->document_cookie = printer_query->cookie();
    if (!PrintMsgPrintParamsIsValid(*params->params)) {
@@ -174,7 +174,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    queue->QueuePrinterQuery(std::move(printer_query));
  }
  
-@@ -189,9 +210,11 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
+@@ -185,9 +206,11 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
      : PrintManager(web_contents),
        queue_(g_browser_process->print_job_manager()->queue()) {
    DCHECK(queue_);
@@ -187,7 +187,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
  }
  
  PrintViewManagerBase::~PrintViewManagerBase() {
-@@ -214,12 +237,20 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() {
+@@ -210,12 +233,20 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() {
  }
  #endif  // BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
  
@@ -209,7 +209,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    return true;
  }
  
-@@ -343,12 +374,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
+@@ -338,12 +369,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
    }
    PRINTER_LOG(EVENT) << "Paper printable area updated for vendor id "
                       << print_settings->requested_media().vendor_id;
@@ -224,7 +224,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
      base::Value::Dict job_settings,
      std::unique_ptr<PrintSettings> print_settings,
      UpdatePrintSettingsCallback callback) {
-@@ -356,7 +388,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
+@@ -351,7 +383,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
    settings->pages = GetPageRangesFromJobSettings(job_settings);
    settings->params = mojom::PrintParams::New();
    RenderParamsFromPrintSettings(*print_settings, settings->params.get());
@@ -234,7 +234,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    if (!PrintMsgPrintParamsIsValid(*settings->params)) {
      mojom::PrinterType printer_type = static_cast<mojom::PrinterType>(
          *job_settings.FindInt(kSettingPrinterType));
-@@ -368,6 +401,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
+@@ -363,6 +396,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
      return;
    }
  
@@ -245,7 +245,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    set_cookie(settings->params->document_cookie);
    std::move(callback).Run(std::move(settings));
  }
-@@ -503,7 +540,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
+@@ -497,7 +534,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
  void PrintViewManagerBase::ScriptedPrintReply(
      ScriptedPrintCallback callback,
      int process_id,
@@ -255,7 +255,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
  
  #if BUILDFLAG(ENABLE_OOP_PRINTING)
-@@ -518,12 +556,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
+@@ -512,12 +550,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
      return;
    }
  
@@ -273,7 +273,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    }
  }
  
-@@ -651,10 +692,12 @@ void PrintViewManagerBase::DidPrintDocument(
+@@ -645,10 +686,12 @@ void PrintViewManagerBase::DidPrintDocument(
  void PrintViewManagerBase::GetDefaultPrintSettings(
      GetDefaultPrintSettingsCallback callback) {
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -284,9 +284,9 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    }
 +#endif
  #if BUILDFLAG(ENABLE_OOP_PRINTING)
-   if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
+   if (features::ShouldPrintJobOop() &&
  #if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
-@@ -706,10 +749,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
+@@ -700,10 +743,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
      base::Value::Dict job_settings,
      UpdatePrintSettingsCallback callback) {
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -299,7 +299,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
  
    absl::optional<int> printer_type_value =
        job_settings.FindInt(kSettingPrinterType);
-@@ -720,6 +765,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
+@@ -714,6 +759,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
  
    mojom::PrinterType printer_type =
        static_cast<mojom::PrinterType>(*printer_type_value);
@@ -307,7 +307,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    if (printer_type != mojom::PrinterType::kExtension &&
        printer_type != mojom::PrinterType::kPdf &&
        printer_type != mojom::PrinterType::kLocal) {
-@@ -739,6 +785,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
+@@ -733,6 +779,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
      if (value > 0)
        job_settings.Set(kSettingRasterizePdfDpi, value);
    }
@@ -315,7 +315,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
  
    std::unique_ptr<PrintSettings> print_settings =
        PrintSettingsFromJobSettings(job_settings);
-@@ -758,7 +805,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
+@@ -752,7 +799,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
      }
    }
  
@@ -338,7 +338,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    // TODO(crbug.com/1424368):  Remove this if the printable areas can be made
    // fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()`
    // for in-browser queries.
-@@ -780,8 +841,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
+@@ -774,8 +835,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
    }
  #endif
  
@@ -347,7 +347,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
  }
  
  void PrintViewManagerBase::SetAccessibilityTree(
-@@ -797,7 +856,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
+@@ -791,7 +850,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
  void PrintViewManagerBase::IsPrintingEnabled(
      IsPrintingEnabledCallback callback) {
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -356,7 +356,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
  }
  
  void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
-@@ -813,14 +872,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
+@@ -807,13 +866,13 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
      // didn't happen for some reason.
      bad_message::ReceivedBadMessage(
          render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME);
@@ -365,15 +365,14 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
      return;
    }
  #if BUILDFLAG(ENABLE_OOP_PRINTING)
-   if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
-       !query_with_ui_client_id_.has_value()) {
+   if (features::ShouldPrintJobOop() && !query_with_ui_client_id_.has_value()) {
      // Renderer process has requested settings outside of the expected setup.
 -    std::move(callback).Run(nullptr);
 +    std::move(callback).Run(nullptr, false);
      return;
    }
  #endif
-@@ -862,6 +921,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
+@@ -855,6 +914,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
  
    PrintManager::PrintingFailed(cookie, reason);
  
@@ -381,7 +380,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    // `PrintingFailed()` can occur because asynchronous compositing results
    // don't complete until after a print job has already failed and been
    // destroyed.  In such cases the error notification to the user will
-@@ -871,7 +931,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
+@@ -864,7 +924,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
        print_job_->document()->cookie() == cookie) {
      ShowPrintErrorDialogForGenericError();
    }
@@ -390,7 +389,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    ReleasePrinterQuery();
  }
  
-@@ -883,15 +943,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
+@@ -876,15 +936,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
    test_observers_.RemoveObserver(&observer);
  }
  
@@ -415,7 +414,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
  }
  
  void PrintViewManagerBase::RenderFrameDeleted(
-@@ -943,7 +1012,12 @@ void PrintViewManagerBase::OnJobDone() {
+@@ -936,7 +1005,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.
@@ -429,7 +428,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    ReleasePrintJob();
  }
  
-@@ -952,9 +1026,10 @@ void PrintViewManagerBase::OnCanceling() {
+@@ -945,9 +1019,10 @@ void PrintViewManagerBase::OnCanceling() {
  }
  
  void PrintViewManagerBase::OnFailed() {
@@ -441,7 +440,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    TerminatePrintJob(true);
  }
  
-@@ -964,7 +1039,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
+@@ -957,7 +1032,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
  
    // Is the document already complete?
    if (print_job_->document() && print_job_->document()->IsComplete()) {
@@ -450,7 +449,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
      return true;
    }
  
-@@ -1017,7 +1092,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
+@@ -1010,7 +1085,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
  
    // Disconnect the current `print_job_`.
    auto weak_this = weak_ptr_factory_.GetWeakPtr();
@@ -462,7 +461,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    if (!weak_this)
      return false;
  
-@@ -1037,7 +1115,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
+@@ -1030,7 +1108,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
  #endif
    print_job_->AddObserver(*this);
  
@@ -471,7 +470,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    return true;
  }
  
-@@ -1105,6 +1183,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
+@@ -1098,6 +1176,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
    }
  #endif
  
@@ -483,7 +482,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    if (!print_job_)
      return;
  
-@@ -1112,7 +1195,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
+@@ -1105,7 +1188,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
      // printing_rfh_ should only ever point to a RenderFrameHost with a live
      // RenderFrame.
      DCHECK(rfh->IsRenderFrameLive());
@@ -492,7 +491,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
    }
  
    print_job_->RemoveObserver(*this);
-@@ -1154,7 +1237,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
+@@ -1147,7 +1230,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
  }
  
  bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
@@ -501,7 +500,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
      return true;
  
    if (!cookie) {
-@@ -1300,7 +1383,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
+@@ -1293,7 +1376,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
  }
  
  void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
@@ -510,7 +509,7 @@ index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c54454
  
    for (auto& observer : GetTestObservers()) {
      observer.OnPrintNow(rfh);
-@@ -1350,7 +1433,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
+@@ -1343,7 +1426,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
    set_analyzing_content(/*analyzing=*/false);
    if (!allowed || !printing_rfh_ || IsCrashed() ||
        !printing_rfh_->IsRenderFrameLive()) {
@@ -602,10 +601,10 @@ index ae2339d1ab82bd7cfa971ed03a188cfc26d6e1c0..186414ee72c6b431b87b02623abd4d19
    // Indication that the job is getting canceled.
    bool canceling_job_ = false;
 diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc
-index e175525a9626624bca06f1ac2b5babd75a8fd833..cbf981c3fc3b7fe8022312d44e054b70d3f5e43b 100644
+index 9fefdc150acf87774ca2a20301349f83de575944..13d6af57890b99192f4d3751ac47f2680cbe6266 100644
 --- a/chrome/browser/printing/printer_query.cc
 +++ b/chrome/browser/printing/printer_query.cc
-@@ -353,17 +353,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings,
+@@ -354,17 +354,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings,
  #endif  // BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS)
    }
  
@@ -706,7 +705,7 @@ index 3f9a514fb41d72c5d06de6ac989f9d7c0513a4e7..0e7ada9df962808dad7caf074a08ebde
    // Tells the browser printing failed.
    PrintingFailed(int32 cookie, PrintFailureReason reason);
 diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
-index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0d95cd1ed 100644
+index 6000a308a23627e87afd9d979f8cb732a0db71bc..dfa51e2d8d31b34a605ac8dbfcb911b81d70da14 100644
 --- a/components/printing/renderer/print_render_frame_helper.cc
 +++ b/components/printing/renderer/print_render_frame_helper.cc
 @@ -47,6 +47,7 @@
@@ -717,7 +716,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
  #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"
-@@ -1215,14 +1216,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
+@@ -1217,14 +1218,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
    }
  
    print_in_progress_ = true;
@@ -734,7 +733,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
    if (!weak_this) {
      return;
    }
-@@ -1253,7 +1254,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
+@@ -1255,7 +1256,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
    receivers_.Add(this, std::move(receiver));
  }
  
@@ -743,7 +742,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
    ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
    if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
      return;
-@@ -1268,7 +1269,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
+@@ -1270,7 +1271,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
    // plugin node and print that instead.
    auto plugin = delegate_->GetPdfElement(frame);
  
@@ -752,7 +751,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
  
    if (render_frame_gone_) {
      return;
-@@ -1357,7 +1358,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
+@@ -1359,7 +1360,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
    }
  
    Print(frame, print_preview_context_.source_node(),
@@ -762,7 +761,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
    if (render_frame_gone_) {
      return;
    }
-@@ -1420,6 +1422,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
+@@ -1422,6 +1424,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
    if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
      return;
  
@@ -771,7 +770,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
    print_preview_context_.OnPrintPreview();
  
  #if BUILDFLAG(IS_CHROMEOS_ASH)
-@@ -2044,7 +2048,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -2046,7 +2050,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
    }
  
    Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@@ -781,7 +780,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
    // Check if `this` is still valid.
    if (!weak_this) {
      return;
-@@ -2060,17 +2065,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -2062,17 +2067,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
  
  void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
                                     const blink::WebNode& node,
@@ -804,7 +803,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
      DidFinishPrinting(PrintingResult::kFailPrintInit);
      return;
    }
-@@ -2091,8 +2098,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -2093,8 +2100,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
          print_pages_params_->params->print_scaling_option;
  
      auto self = weak_ptr_factory_.GetWeakPtr();
@@ -821,7 +820,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
      // Check if `this` is still valid.
      if (!self)
        return;
-@@ -2331,25 +2345,33 @@ void PrintRenderFrameHelper::IPCProcessed() {
+@@ -2333,25 +2347,33 @@ void PrintRenderFrameHelper::IPCProcessed() {
  }
  
  bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame,
@@ -861,7 +860,7 @@ index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0
    return true;
  }
  
-@@ -2456,7 +2478,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
+@@ -2458,7 +2480,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
        std::move(params),
        base::BindOnce(
            [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output,
@@ -905,10 +904,10 @@ index c68b68767ac52602981278ec655d9ccfad0c30ab..df2ea4524584417d859e1a22ec8a49c8
    // Calculate number of pages in source document.
    uint32_t CalculateNumberOfPages(blink::WebLocalFrame* frame,
 diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
-index 576f6e3b2ef210aaae5b74d3e93ccc62017016d3..75d8a3fa0083a82587ba6d429286764db37ba84d 100644
+index 3b4f0f00e2e214b9615a07acfc02c9baf4a2a7ab..7ad4e9e5166265651ef50e3ee5488595ab97bc06 100644
 --- a/content/browser/BUILD.gn
 +++ b/content/browser/BUILD.gn
-@@ -2963,8 +2963,9 @@ source_set("browser") {
+@@ -2994,8 +2994,9 @@ source_set("browser") {
        "//ppapi/shared_impl",
      ]
  
@@ -957,7 +956,7 @@ index c753f04d8b73a51cb7e05dcdb86afc0e981e7a71..7ec1729e08bf42a51f80885b3838eee9
    bool skip_system_calls() const {
  #if BUILDFLAG(ENABLE_OOP_PRINTING)
 diff --git a/sandbox/policy/mac/sandbox_mac.mm b/sandbox/policy/mac/sandbox_mac.mm
-index 10096f5a3824c71e6cb13b86ef7bdd02488f76c8..f7de11c89efed78f0280ada29f55f3bbd119ee88 100644
+index 2dd2b99216e6ebc1e326b9ff61ea2254ea7df4e9..3cc24bed974ba52a12272bc856d085cc890859c0 100644
 --- a/sandbox/policy/mac/sandbox_mac.mm
 +++ b/sandbox/policy/mac/sandbox_mac.mm
 @@ -37,6 +37,10 @@

+ 9 - 9
patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch

@@ -30,10 +30,10 @@ index c4255d8dfc2e3c4f1f32506e4e9edbb90a74340a..142398a8adafc94e6724ee750b612a66
    // 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 b85d2f53e55131491c32eff5475cffa7c9d65e25..73d9f46fd52a9bda3322d1883207a56171507692 100644
+index 895f5126806b557c853f163fe69459ea929f11a4..b4ead2f5f2f813c23cd5eddae3d380522707fcb2 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -2128,6 +2128,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
+@@ -2139,6 +2139,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
    if (view_) {
      view_->UpdateCursor(cursor);
    }
@@ -44,10 +44,10 @@ index b85d2f53e55131491c32eff5475cffa7c9d65e25..73d9f46fd52a9bda3322d1883207a561
  
  void RenderWidgetHostImpl::ShowContextMenuAtPoint(
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 6354e6152d281d06fcd85c61b76d836bd5043e1a..4eb6047128a5cfdd1c6e62adbae7f662c477b6f1 100644
+index 59701b5246e2d07662fb0072b77f3d73ab5df49d..3f7181097becd1b6236f49e6b653b7d9e080d5c7 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -4972,6 +4972,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
+@@ -5110,6 +5110,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
    return text_input_manager_.get();
  }
  
@@ -60,10 +60,10 @@ index 6354e6152d281d06fcd85c61b76d836bd5043e1a..4eb6047128a5cfdd1c6e62adbae7f662
      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 d471d2559a21e4cd92c33fa08ab402167851654a..02352f13c1b26e9a49bf9957920424320e7c33e0 100644
+index a42970282ae2801c6d00cf7e2f0e78b2cb6973fc..c59480be5af3dae8492b5cd8200748b6a085f613 100644
 --- a/content/browser/web_contents/web_contents_impl.h
 +++ b/content/browser/web_contents/web_contents_impl.h
-@@ -1009,6 +1009,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
+@@ -1011,6 +1011,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
    void SendScreenRects() override;
    void SendActiveState(bool active) override;
    TextInputManager* GetTextInputManager() override;
@@ -72,10 +72,10 @@ index d471d2559a21e4cd92c33fa08ab402167851654a..02352f13c1b26e9a49bf995792042432
        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 c3d701fc68db0c02209b19598ffbf1c1bffe2a6d..615a31c3116c9c23a719f601764097a1442045a5 100644
+index 617b5a5609796dccf158273ed729a132f0425f09..a4cc8a53b21b40942b403ac6ffbe1f1c676402bb 100644
 --- a/content/public/browser/web_contents_observer.h
 +++ b/content/public/browser/web_contents_observer.h
-@@ -30,6 +30,7 @@
+@@ -32,6 +32,7 @@
  #include "third_party/blink/public/mojom/loader/resource_load_info.mojom-forward.h"
  #include "third_party/blink/public/mojom/media/capture_handle_config.mojom-forward.h"
  #include "third_party/skia/include/core/SkColor.h"
@@ -83,7 +83,7 @@ index c3d701fc68db0c02209b19598ffbf1c1bffe2a6d..615a31c3116c9c23a719f601764097a1
  #include "ui/base/page_transition_types.h"
  #include "ui/base/window_open_disposition.h"
  
-@@ -568,6 +569,9 @@ class CONTENT_EXPORT WebContentsObserver {
+@@ -572,6 +573,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
    // Invoked when the primary main frame changes size.
    virtual void PrimaryMainFrameWasResized(bool width_changed) {}
  

+ 1 - 1
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 1b44aeb4302d4ca0100e837e4551c5f83420cc6a..7570f6a85755b6760751cda22635cf509f61a8d0 100644
+index 592e15fac9de34c3b1a36788ff4a36de83bbe7e4..9a1c4733b2b2bb7c1c0e3ca438ab600e9cf372f8 100644
 --- a/base/functional/callback_helpers.h
 +++ b/base/functional/callback_helpers.h
 @@ -123,6 +123,22 @@ RepeatingCallback<void(Args...)> ForwardRepeatingCallbacks(

+ 2 - 2
patches/chromium/render_widget_host_view_base.patch

@@ -6,7 +6,7 @@ Subject: render_widget_host_view_base.patch
 ... something to do with OSR? and maybe <webview> as well? terrifying.
 
 diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
-index 1634c3556dc783f90f3a7527ab9f9745373b6f48..e3d2eeaa6d4af4cef87cb1dc639e0c247226092d 100644
+index 94d403ba5c7a2a824fa17dec3a3b16d28e094ce9..d3781de61ca85bd966c7e30465f744dba6da6e6d 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_base.cc
 @@ -695,6 +695,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableForIOv2For(
@@ -24,7 +24,7 @@ index 1634c3556dc783f90f3a7527ab9f9745373b6f48..e3d2eeaa6d4af4cef87cb1dc639e0c24
      const blink::WebMouseEvent& event,
      const ui::LatencyInfo& latency) {
 diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
-index b010d43aaeb90c766914b0c8038f7dfef064875a..7af2399116087fe4062fc5739f0ecee4f7242dc1 100644
+index 955f08e21de3099964e0701b0887d293653d020f..2fca7fd90fcb86863b95d6bfae6719be1992c2b4 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.h
 +++ b/content/browser/renderer_host/render_widget_host_view_base.h
 @@ -24,9 +24,12 @@

+ 6 - 6
patches/chromium/render_widget_host_view_mac.patch

@@ -10,10 +10,10 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
 Additionally, disables usage of some private APIs in MAS builds.
 
 diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
-index da2f9d9576d278dc52274056df8bb66f1eec825b..fc4acff0b5d1a75b3311c6e4ecc938ad3cef05bf 100644
+index 81f705328efd2de0957c1ef309e20c421e0959eb..d6f9998890d7a83a8fb221691aa2f1e761461d52 100644
 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
 +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
-@@ -157,6 +157,15 @@ void ExtractUnderlines(NSAttributedString* string,
+@@ -158,6 +158,15 @@ void ExtractUnderlines(NSAttributedString* string,
  
  }  // namespace
  
@@ -29,7 +29,7 @@ index da2f9d9576d278dc52274056df8bb66f1eec825b..fc4acff0b5d1a75b3311c6e4ecc938ad
  // RenderWidgetHostViewCocoa ---------------------------------------------------
  
  // Private methods:
-@@ -744,6 +753,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
+@@ -746,6 +755,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
  }
  
  - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@@ -39,7 +39,7 @@ index da2f9d9576d278dc52274056df8bb66f1eec825b..fc4acff0b5d1a75b3311c6e4ecc938ad
    return [self acceptsMouseEventsWhenInactive];
  }
  
-@@ -828,6 +840,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
+@@ -830,6 +842,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
    // its parent view.
    BOOL hitSelf = NO;
    while (view) {
@@ -50,7 +50,7 @@ index da2f9d9576d278dc52274056df8bb66f1eec825b..fc4acff0b5d1a75b3311c6e4ecc938ad
      if (view == self)
        hitSelf = YES;
      if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
-@@ -1157,6 +1173,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
+@@ -1159,6 +1175,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
                                eventType == NSEventTypeKeyDown &&
                                !(modifierFlags & NSEventModifierFlagCommand);
  
@@ -61,7 +61,7 @@ index da2f9d9576d278dc52274056df8bb66f1eec825b..fc4acff0b5d1a75b3311c6e4ecc938ad
    // We only handle key down events and just simply forward other events.
    if (eventType != NSEventTypeKeyDown) {
      _hostHelper->ForwardKeyboardEvent(event, latency_info);
-@@ -1987,15 +2007,21 @@ - (NSAccessibilityRole)accessibilityRole {
+@@ -1999,15 +2019,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
  //

+ 3 - 3
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 78e717afce47c78d502b43d0189fa0c13d118b9b..dcf02923c21e1c4c292eb800f6325e4bb764c823 100644
+index 6ccd58b51df777e63bba4ee79f873e3cb25f9a0e..0594fc8f8122b5f66457c262890ea93be3a579d8 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
-@@ -1608,7 +1608,7 @@ if (is_chrome_branded && !is_android) {
+@@ -1617,7 +1617,7 @@ if (is_chrome_branded && !is_android) {
    }
  }
  
@@ -64,7 +64,7 @@ index 78e717afce47c78d502b43d0189fa0c13d118b9b..dcf02923c21e1c4c292eb800f6325e4b
    chrome_paks("packed_resources") {
      if (is_mac) {
        output_dir = "$root_gen_dir/repack"
-@@ -1637,6 +1637,12 @@ if (!is_android) {
+@@ -1646,6 +1646,12 @@ if (!is_android) {
    }
  }
  

+ 1 - 1
patches/chromium/revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch

@@ -6,7 +6,7 @@ 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 19b03e9f1c5baa98f86e7b73be7de11a1a3c60da..693aee50f555830be560d0933a0f62969022b86f 100644
+index f01370e63377722e9585e89d479100b87a448015..89fe8c569e7ddc2fad2076a33d3de743fb2fee52 100644
 --- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
 +++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
 @@ -95,6 +95,17 @@ enum WebSocketOpCode {

+ 2 - 2
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 3c3ebfeec280e4d489121c4cfeba37c299753cd0..69569b601f94e68032a54d3290fe7f85513f3b4c 100644
+index 83daef460d5dd9b6b908485da1c807ec94a00f3f..7b4fb3da23f4e7805f74932cd959229554c3e217 100644
 --- a/content/renderer/render_thread_impl.cc
 +++ b/content/renderer/render_thread_impl.cc
-@@ -1293,7 +1293,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
+@@ -1302,7 +1302,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
  }
  
  bool RenderThreadImpl::IsElasticOverscrollEnabled() {

+ 2 - 2
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 cb161217889e2daaffcf68ff438bbba395ac7b4e..20351961220004528837f16b5d858481f0b788aa 100644
+index 1d9b5d3134c363c7b55bee1cb45a45d3557020e2..179b9a06569a038e95a44ca42e35bf368860f51e 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -1645,9 +1645,15 @@ bool RenderProcessHostImpl::Init() {
+@@ -1715,9 +1715,15 @@ bool RenderProcessHostImpl::Init() {
      std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
          std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
              *cmd_line, IsPdf(), IsJitDisabled());

+ 4 - 4
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 0be596bc2bd91b0f3e76e76f329c0e8d6c2ec928..c42ace29f426d7ea7d6d5ae9370d12b380181082 100644
+index 16adc4112b0e10fadd9c8af254e9e26f6e8e19e3..b618812f6d750ed4e3122aad642e4cc06c316904 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -3348,6 +3348,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
+@@ -3448,6 +3448,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 0be596bc2bd91b0f3e76e76f329c0e8d6c2ec928..c42ace29f426d7ea7d6d5ae9370d12b3
    std::unique_ptr<WebContentsViewDelegate> delegate =
        GetContentClient()->browser()->GetWebContentsViewDelegate(this);
  
-@@ -3358,6 +3365,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
+@@ -3458,6 +3465,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
      view_ = CreateWebContentsView(this, std::move(delegate),
                                    &render_view_host_delegate_view_);
    }
@@ -35,7 +35,7 @@ index 0be596bc2bd91b0f3e76e76f329c0e8d6c2ec928..c42ace29f426d7ea7d6d5ae9370d12b3
    CHECK(view_.get());
  
 diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
-index d3d0b0aab60e965951ac06e0fbbadbcecc0872b4..3cf361c6fd088862b36ade319dc1c37efd3d7176 100644
+index 3707858d0af5909fce48fc5e2270fdcb660492cb..2e213048464416e23e5d57258e7cf901ddab5415 100644
 --- a/content/public/browser/web_contents.h
 +++ b/content/public/browser/web_contents.h
 @@ -98,10 +98,13 @@ class BrowserContext;

+ 11 - 29
patches/chromium/webview_cross_drag.patch

@@ -1,40 +1,22 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Anonymous <[email protected]>
 Date: Thu, 20 Sep 2018 17:47:04 -0700
-Subject: webview_cross_drag.patch
+Subject: feat: allow dragging and dropping between <webview>s.
 
 This allows dragging and dropping between <webview>s.
 
 Originally landed in https://github.com/electron/libchromiumcontent/pull/267
 
-diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
-index 1420a19f223cc0cd3f683a96fc0f62516690a363..1830568c52a5ce96bd36ab866ac00012ce518570 100644
---- a/content/browser/web_contents/web_contents_view_aura.cc
-+++ b/content/browser/web_contents/web_contents_view_aura.cc
-@@ -901,10 +901,7 @@ bool WebContentsViewAura::IsValidDragTarget(
-   // for the outermost view. Inner `WebContents` will have a
-   // `WebContentsViewChildFrame` so when dragging between an inner
-   // `WebContents` and its embedder the view IDs will be the same.
--  bool cross_tab_drag =
--      GetRenderViewHostID(web_contents_->GetRenderViewHost()) !=
--      drag_start_->view_id;
--  return cross_tab_drag;
+diff --git a/content/browser/web_contents/web_contents_view_drag_security_info.cc b/content/browser/web_contents/web_contents_view_drag_security_info.cc
+index bf24f4e2ccff56a2a92c4f11c9318644ea59daff..c54e6717144e618b3034e8f5a96fd6d85d207f30 100644
+--- a/content/browser/web_contents/web_contents_view_drag_security_info.cc
++++ b/content/browser/web_contents/web_contents_view_drag_security_info.cc
+@@ -66,7 +66,7 @@ bool WebContentsViewDragSecurityInfo::IsValidDragTarget(
+   // browser-side checks only have local tree fragment (potentially with
+   // multiple origins) granularity at best, but a drag operation eventually
+   // targets one single frame in that local tree fragment.
+-  return target_rwh->GetSiteInstanceGroup()->GetId() == site_instance_group_id_;
 +  return true;
  }
  
- ////////////////////////////////////////////////////////////////////////////////
-diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
-index 9c49e73d58ecf5cd6fce0582e2a767d3f1ac43d9..07ca39e09bb3413bdb95c7c535b6612d18861799 100644
---- a/content/browser/web_contents/web_drag_dest_mac.mm
-+++ b/content/browser/web_contents/web_drag_dest_mac.mm
-@@ -427,9 +427,7 @@ - (void)resetDragStartTrackers {
- }
- 
- - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {
--  return targetRWH->GetProcess()->GetID() == _dragStartProcessID ||
--         GetRenderViewHostID(_webContents->GetRenderViewHost()) !=
--             _dragStartViewID;
-+  return YES;
- }
- 
- @end
+ }  // namespace content

+ 7 - 7
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 82d197413d990a8f08f25498a66f5097681b2793..9d967772f7afe3987f67f1440890a43032192735 100644
+index f2e623cd6ed7eb910216ff4e32686f9124762d81..57a8a953452a1c1bddd7956c3a83fff8a922ca84 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -7334,6 +7334,17 @@ void RenderFrameHostImpl::EnterFullscreen(
+@@ -7445,6 +7445,17 @@ void RenderFrameHostImpl::EnterFullscreen(
      }
    }
  
@@ -37,10 +37,10 @@ index 82d197413d990a8f08f25498a66f5097681b2793..9d967772f7afe3987f67f1440890a430
    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 c42ace29f426d7ea7d6d5ae9370d12b380181082..737ca972a248538d110d4c91f9eb45a4645bdd0c 100644
+index b618812f6d750ed4e3122aad642e4cc06c316904..6fd40ddf07a55ec12f18ff88e92a7f59a5a52f96 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -3594,21 +3594,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
+@@ -3702,21 +3702,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
      const NativeWebKeyboardEvent& event) {
    OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
                          "WebContentsImpl::PreHandleKeyboardEvent");
@@ -78,7 +78,7 @@ index c42ace29f426d7ea7d6d5ae9370d12b380181082..737ca972a248538d110d4c91f9eb45a4
  }
  
  bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
-@@ -3740,7 +3744,7 @@ void WebContentsImpl::EnterFullscreenMode(
+@@ -3852,7 +3856,7 @@ void WebContentsImpl::EnterFullscreenMode(
    OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
    DCHECK(CanEnterFullscreenMode(requesting_frame, options));
    DCHECK(requesting_frame->IsActive());
@@ -88,10 +88,10 @@ index c42ace29f426d7ea7d6d5ae9370d12b380181082..737ca972a248538d110d4c91f9eb45a4
    // When WebView is the `delegate_` we can end up with VisualProperties changes
    // synchronously. Notify the view ahead so it can handle the transition.
 diff --git a/third_party/blink/renderer/core/fullscreen/fullscreen.cc b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
-index 32b4f5d0c0e75fc94d95298ef127c113330896b0..ae1b2ebef7c9620f465506a38855a585fd79ce48 100644
+index 3d18b5a72a06c0ff1981ac6597d47a4bbe749b09..475c580d58df1a715937727dde2bed075ebffe70 100644
 --- a/third_party/blink/renderer/core/fullscreen/fullscreen.cc
 +++ b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
-@@ -99,7 +99,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) {

+ 7 - 7
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 a4130ad4dc8158f8256b55fdd87f577687135626..3139aa65807cee23f0e8dbc85243566ef9de89b9 100644
+index 72f72e2c6627d1f7159796f9151e697b04af66b1..4dfabec61229f50faba64d5c14255e5a726bf8f2 100644
 --- a/content/public/renderer/content_renderer_client.h
 +++ b/content/public/renderer/content_renderer_client.h
-@@ -376,6 +376,11 @@ class CONTENT_EXPORT ContentRendererClient {
+@@ -381,6 +381,11 @@ class CONTENT_EXPORT ContentRendererClient {
    virtual void DidInitializeWorkerContextOnWorkerThread(
        v8::Local<v8::Context> context) {}
  
@@ -26,10 +26,10 @@ index a4130ad4dc8158f8256b55fdd87f577687135626..3139aa65807cee23f0e8dbc85243566e
    // 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 4ed1a50637e40df4d3a9c1a1cfb63ad948df413c..bc446fa9f6dcbaa618a06040dd215ac928388341 100644
+index ee367c7306b078e442b7ac91a5b85144b458de1f..751f6f4455cfe8706e12f362f9af17b5182d525b 100644
 --- a/content/renderer/renderer_blink_platform_impl.cc
 +++ b/content/renderer/renderer_blink_platform_impl.cc
-@@ -788,6 +788,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
+@@ -792,6 +792,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
    WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
  }
  
@@ -43,7 +43,7 @@ index 4ed1a50637e40df4d3a9c1a1cfb63ad948df413c..bc446fa9f6dcbaa618a06040dd215ac9
      const v8::Local<v8::Context>& worker) {
    GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
 diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
-index 84c36d410a352f5d980fb8313356b6f6efcb0516..f2896f8b3e6164f967e06f385a0b399bd0847bfb 100644
+index 23c389ed9c7317b7c2ba42d1228086fa8bd94635..e602b298a5dca24d64a3fe2b8962cb06a1f782ae 100644
 --- a/content/renderer/renderer_blink_platform_impl.h
 +++ b/content/renderer/renderer_blink_platform_impl.h
 @@ -174,6 +174,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -53,9 +53,9 @@ index 84c36d410a352f5d980fb8313356b6f6efcb0516..f2896f8b3e6164f967e06f385a0b399b
 +  void WorkerContextWillDestroy(const v8::Local<v8::Context>& worker) override;
    bool AllowScriptExtensionForServiceWorker(
        const blink::WebSecurityOrigin& script_origin) override;
-   blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel()
+   blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel(
 diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
-index cfb8b2634af81699922e05579e4d86228c99495a..9017d70d4771c75ab21ec9e2bae184b5b73dbff4 100644
+index 70987c88d0daf76c96eaa97c7361ac6d365a5541..578dc22dad63fdb9145186999f5fe24ad0c4155f 100644
 --- a/third_party/blink/public/platform/platform.h
 +++ b/third_party/blink/public/platform/platform.h
 @@ -622,6 +622,7 @@ class BLINK_PLATFORM_EXPORT Platform {

+ 6 - 6
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 3139aa65807cee23f0e8dbc85243566ef9de89b9..19707edb1283f2432f3c0059f80fabd5ce8bdbd8 100644
+index 4dfabec61229f50faba64d5c14255e5a726bf8f2..b91c37ed1dfccf2189cd17d61d2623c1042b086c 100644
 --- a/content/public/renderer/content_renderer_client.h
 +++ b/content/public/renderer/content_renderer_client.h
-@@ -376,6 +376,11 @@ class CONTENT_EXPORT ContentRendererClient {
+@@ -381,6 +381,11 @@ class CONTENT_EXPORT ContentRendererClient {
    virtual void DidInitializeWorkerContextOnWorkerThread(
        v8::Local<v8::Context> context) {}
  
@@ -35,10 +35,10 @@ index 3139aa65807cee23f0e8dbc85243566ef9de89b9..19707edb1283f2432f3c0059f80fabd5
    // 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 bc446fa9f6dcbaa618a06040dd215ac928388341..77a9172d12af687235f303f3d38912d9b96ba6a8 100644
+index 751f6f4455cfe8706e12f362f9af17b5182d525b..5ba00c8ba1fd4d671627aa224e0d536867f0c875 100644
 --- a/content/renderer/renderer_blink_platform_impl.cc
 +++ b/content/renderer/renderer_blink_platform_impl.cc
-@@ -800,6 +800,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
+@@ -804,6 +804,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
        worker);
  }
  
@@ -52,7 +52,7 @@ index bc446fa9f6dcbaa618a06040dd215ac928388341..77a9172d12af687235f303f3d38912d9
      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 f2896f8b3e6164f967e06f385a0b399bd0847bfb..be305d221b57630e77595c9f2e2060e8d98911a6 100644
+index e602b298a5dca24d64a3fe2b8962cb06a1f782ae..61f1f60e8fbe82fc9b595c5204ccd11f8507eec8 100644
 --- a/content/renderer/renderer_blink_platform_impl.h
 +++ b/content/renderer/renderer_blink_platform_impl.h
 @@ -174,6 +174,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -65,7 +65,7 @@ index f2896f8b3e6164f967e06f385a0b399bd0847bfb..be305d221b57630e77595c9f2e2060e8
    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 9017d70d4771c75ab21ec9e2bae184b5b73dbff4..7ea40b7f3efd69777deaa1d836b25ac7605f7ed7 100644
+index 578dc22dad63fdb9145186999f5fe24ad0c4155f..6589eb05ad1ca3121d39431bc1c376bb02e0d53a 100644
 --- a/third_party/blink/public/platform/platform.h
 +++ b/third_party/blink/public/platform/platform.h
 @@ -622,6 +622,8 @@ class BLINK_PLATFORM_EXPORT Platform {

Some files were not shown because too many files changed in this diff