Browse Source

chore: bump chromium to 83.0.4102.3 (#22941)

Co-authored-by: Shelley Vohr <[email protected]>
Co-authored-by: deepak1556 <[email protected]>
Co-authored-by: Samuel Attard <[email protected]>
Co-authored-by: Andy Locascio <[email protected]>
Co-authored-by: John Kleinschmidt <[email protected]>
Jeremy Apthorp 5 years ago
parent
commit
7894ae9c01
72 changed files with 543 additions and 460 deletions
  1. 7 2
      BUILD.gn
  2. 1 1
      DEPS
  3. 9 5
      chromium_src/BUILD.gn
  4. 1 1
      filenames.hunspell.gni
  5. 1 1
      lib/browser/rpc-server.js
  6. 1 1
      lib/common/api/clipboard.js
  7. 2 0
      patches/chromium/.patches
  8. 5 5
      patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch
  9. 14 14
      patches/chromium/add_didinstallconditionalfeatures.patch
  10. 4 4
      patches/chromium/add_realloc.patch
  11. 16 16
      patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch
  12. 1 1
      patches/chromium/blink_local_frame.patch
  13. 4 4
      patches/chromium/blink_world_context.patch
  14. 2 2
      patches/chromium/build_add_electron_tracing_category.patch
  15. 1 1
      patches/chromium/build_gn.patch
  16. 15 15
      patches/chromium/can_create_window.patch
  17. 3 3
      patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch
  18. 2 2
      patches/chromium/content_browser_main_loop.patch
  19. 2 2
      patches/chromium/dcheck.patch
  20. 1 1
      patches/chromium/desktop_media_list.patch
  21. 6 6
      patches/chromium/disable-redraw-lock.patch
  22. 23 23
      patches/chromium/disable_color_correct_rendering.patch
  23. 1 1
      patches/chromium/disable_compositor_recycling.patch
  24. 8 9
      patches/chromium/disable_hidden.patch
  25. 2 2
      patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch
  26. 6 6
      patches/chromium/expose_setuseragent_on_networkcontext.patch
  27. 7 20
      patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch
  28. 21 21
      patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch
  29. 23 0
      patches/chromium/fix_account_for_print_preview_disabled_when_printing_to_pdf.patch
  30. 2 2
      patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch
  31. 2 2
      patches/chromium/fixme_grit_conflicts.patch
  32. 12 12
      patches/chromium/frame_host_manager.patch
  33. 19 19
      patches/chromium/gpu_notify_when_dxdiag_request_fails.patch
  34. 2 2
      patches/chromium/gritsettings_resource_ids.patch
  35. 7 7
      patches/chromium/gtk_visibility.patch
  36. 1 1
      patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch
  37. 11 11
      patches/chromium/mas_disable_remote_accessibility.patch
  38. 26 26
      patches/chromium/mas_no_private_api.patch
  39. 13 13
      patches/chromium/network_service_allow_remote_certificate_verification_logic.patch
  40. 2 2
      patches/chromium/notification_provenance.patch
  41. 1 1
      patches/chromium/picture-in-picture.patch
  42. 15 36
      patches/chromium/printing.patch
  43. 40 21
      patches/chromium/put_back_deleted_colors_for_autofill.patch
  44. 4 4
      patches/chromium/render_widget_host_view_base.patch
  45. 1 1
      patches/chromium/render_widget_host_view_mac.patch
  46. 1 1
      patches/chromium/resource_file_conflict.patch
  47. 56 58
      patches/chromium/revert_cleanup_remove_menu_subtitles_sublabels.patch
  48. 52 0
      patches/chromium/revert_enable_samesitebydefaultcookies_and.patch
  49. 4 4
      patches/chromium/revert_remove_contentrendererclient_shouldfork.patch
  50. 2 2
      patches/chromium/scroll_bounce_flag.patch
  51. 2 2
      patches/chromium/support_mixed_sandbox_with_zygote.patch
  52. 2 2
      patches/chromium/thread_capabilities.patch
  53. 3 3
      patches/chromium/web_contents.patch
  54. 16 10
      patches/chromium/webview_cross_drag.patch
  55. 1 3
      patches/config.json
  56. 6 4
      patches/node/build_add_gn_build_files.patch
  57. 0 1
      patches/swiftshader/.patches
  58. 0 23
      patches/swiftshader/marl_arm.patch
  59. 0 1
      script/zip_manifests/dist_zip.mac.x64.manifest
  60. 0 1
      script/zip_manifests/dist_zip.mac_mas.x64.manifest
  61. 1 1
      shell/browser/api/electron_api_cookies.cc
  62. 2 1
      shell/browser/api/electron_api_native_theme.cc
  63. 3 1
      shell/browser/api/electron_api_system_preferences.cc
  64. 10 1
      shell/browser/electron_browser_main_parts.cc
  65. 10 0
      shell/browser/electron_browser_main_parts.h
  66. 5 2
      shell/browser/net/proxying_websocket.cc
  67. 3 1
      shell/browser/net/proxying_websocket.h
  68. 3 3
      shell/browser/net/resolve_proxy_helper.cc
  69. 0 1
      shell/browser/ui/devtools_manager_delegate.cc
  70. 0 1
      shell/browser/ui/devtools_manager_delegate.h
  71. 10 2
      shell/common/api/electron_api_clipboard.cc
  72. 4 2
      spec/api-clipboard-spec.js

+ 7 - 2
BUILD.gn

@@ -224,7 +224,6 @@ grit("resources") {
   ]
 
   # Mojo manifest overlays are generated.
-  source_is_generated = true
   grit_flags = [
     "-E",
     "target_gen_dir=" + rebase_path(target_gen_dir, root_build_dir),
@@ -500,9 +499,16 @@ source_set("electron_lib") {
       "//third_party/breakpad:client",
       "//ui/events/devices/x11",
       "//ui/events/platform/x11",
+      "//ui/gtk",
       "//ui/views/controls/webview",
       "//ui/wm",
     ]
+    if (use_x11) {
+      deps += [
+        "//ui/gfx/x",
+        "//ui/gtk:x",
+      ]
+    }
     configs += [ ":gio_unix" ]
     include_dirs += [ "//third_party/breakpad" ]
     configs += [ "//build/config/linux:x11" ]
@@ -726,7 +732,6 @@ if (is_mac) {
       sources = [
         "$root_out_dir/egl_intermediates/libEGL.dylib",
         "$root_out_dir/egl_intermediates/libGLESv2.dylib",
-        "$root_out_dir/egl_intermediates/libvulkan.dylib",
       ]
       outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
       public_deps = [ "//ui/gl:angle_library_copy" ]

+ 1 - 1
DEPS

@@ -12,7 +12,7 @@ gclient_gn_args = [
 
 vars = {
   'chromium_version':
-    '82.0.4085.27',
+    '83.0.4102.3',
   'node_version':
     'v12.14.1',
   'nan_version':

+ 9 - 5
chromium_src/BUILD.gn

@@ -109,11 +109,15 @@ static_library("chrome") {
     ]
 
     if (use_aura) {
-      sources += [
-        "//chrome/browser/platform_util_aura.cc",
-        "//chrome/browser/ui/views/color_chooser_aura.cc",
-        "//chrome/browser/ui/views/color_chooser_aura.h",
-      ]
+      sources += [ "//chrome/browser/platform_util_aura.cc" ]
+
+      if (!is_win) {
+        sources += [
+          "//chrome/browser/ui/views/color_chooser_aura.cc",
+          "//chrome/browser/ui/views/color_chooser_aura.h",
+        ]
+      }
+
       deps += [ "//components/feature_engagement" ]
     }
 

+ 1 - 1
filenames.hunspell.gni

@@ -44,7 +44,7 @@ hunspell_dictionaries = [
   "//third_party/hunspell_dictionaries/ta-IN-3-0.bdic",
   "//third_party/hunspell_dictionaries/tg-TG-5-0.bdic",
   "//third_party/hunspell_dictionaries/tr-TR-4-0.bdic",
-  "//third_party/hunspell_dictionaries/uk-UA-3-0.bdic",
+  "//third_party/hunspell_dictionaries/uk-UA-4-0.bdic",
   "//third_party/hunspell_dictionaries/vi-VN-3-0.bdic",
   "//third_party/hunspell_dictionaries/xx-XX-3-0.bdic",
 ]

+ 1 - 1
lib/browser/rpc-server.js

@@ -57,7 +57,7 @@ const allowedClipboardMethods = (() => {
   }
 })();
 
-ipcMainUtils.handleSync('ELECTRON_BROWSER_CLIPBOARD', function (event, method, ...args) {
+ipcMainUtils.handleSync('ELECTRON_BROWSER_CLIPBOARD_SYNC', function (event, method, ...args) {
   if (!allowedClipboardMethods.has(method)) {
     throw new Error(`Invalid method: ${method}`);
   }

+ 1 - 1
lib/common/api/clipboard.js

@@ -9,7 +9,7 @@ if (process.type === 'renderer') {
   const makeRemoteMethod = function (method) {
     return (...args) => {
       args = typeUtils.serialize(args);
-      const result = ipcRendererUtils.invokeSync('ELECTRON_BROWSER_CLIPBOARD', method, ...args);
+      const result = ipcRendererUtils.invokeSync('ELECTRON_BROWSER_CLIPBOARD_SYNC', method, ...args);
       return typeUtils.deserialize(result);
     };
   };

+ 2 - 0
patches/chromium/.patches

@@ -90,3 +90,5 @@ feat_enable_offscreen_rendering_with_viz_compositor.patch
 feat_add_support_for_overriding_the_base_spellchecker_download_url.patch
 gpu_notify_when_dxdiag_request_fails.patch
 feat_allow_embedders_to_add_observers_on_created_hunspell.patch
+fix_account_for_print_preview_disabled_when_printing_to_pdf.patch
+revert_enable_samesitebydefaultcookies_and.patch

+ 5 - 5
patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch

@@ -10,12 +10,12 @@ 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 24f9e8efd14ea8e4bb739655c662d01c8c4b80c5..c354891df92db510291ba351ee3bc88b07b4d990 100644
+index a52345eb5b5facaf4ad1308c9d21407370d4c8bd..343f76603bd217e1d333944d4b7f20927121642f 100644
 --- a/content/gpu/gpu_main.cc
 +++ b/content/gpu/gpu_main.cc
-@@ -262,6 +262,10 @@ int GpuMain(const MainFunctionParams& parameters) {
- 
-   logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
+@@ -248,6 +248,10 @@ int GpuMain(const MainFunctionParams& parameters) {
+   // to the GpuProcessHost once the GpuServiceImpl has started.
+   viz::GpuServiceImpl::InstallPreInitializeLogHandler();
  
 +  auto* client = GetContentClient()->gpu();
 +  if (client)
@@ -24,7 +24,7 @@ index 24f9e8efd14ea8e4bb739655c662d01c8c4b80c5..c354891df92db510291ba351ee3bc88b
    // 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
-@@ -384,7 +388,6 @@ int GpuMain(const MainFunctionParams& parameters) {
+@@ -369,7 +373,6 @@ int GpuMain(const MainFunctionParams& parameters) {
        }));
  #endif
  

+ 14 - 14
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 156ba739a984347135857f8019fda0bfb01c97ad..f4093e9bb8b54d82c6d70375977c0ad91dc90580 100644
+index 172b2a246e6cdda81212a2cf4ec9c7e13cd4e85f..3932bd0a4d3de963d22869caaadb8b9a0b8586b9 100644
 --- a/content/public/renderer/render_frame_observer.h
 +++ b/content/public/renderer/render_frame_observer.h
 @@ -115,6 +115,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -23,10 +23,10 @@ index 156ba739a984347135857f8019fda0bfb01c97ad..f4093e9bb8b54d82c6d70375977c0ad9
                                          int32_t world_id) {}
    virtual void DidClearWindowObject() {}
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index 813fd92481d598abf616cf3370ee55f541df1c97..8dd80a3d7880eec9a4adb2288b883514b86e8880 100644
+index 3a9e1b0aaccdfe2ae7b03426370592f620b87315..7a6562904eebbf55fcc4b08c9676a80350ce0863 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -4933,6 +4933,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
+@@ -4926,6 +4926,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
      observer.DidCreateScriptContext(context, world_id);
  }
  
@@ -40,7 +40,7 @@ index 813fd92481d598abf616cf3370ee55f541df1c97..8dd80a3d7880eec9a4adb2288b883514
                                                 int world_id) {
    for (auto& observer : observers_)
 diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
-index d34fa34fe84390895c605e0ef799c78d50125abf..318f77471b65e74c7c12636e81601472e6957d6e 100644
+index 3b58f29dbc91c52dd0046d389c11d9fd698e3948..090ea1fec07cdfc0567af63407f8ad9b0dde7cdc 100644
 --- a/content/renderer/render_frame_impl.h
 +++ b/content/renderer/render_frame_impl.h
 @@ -747,6 +747,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -53,10 +53,10 @@ index d34fa34fe84390895c605e0ef799c78d50125abf..318f77471b65e74c7c12636e81601472
                                  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 cee72cbe2a0a48dce51cbf7e9ba14a1b326afb6b..f73db341765f68b7b9fac043e070ef02227173c2 100644
+index 8a2f1ab74873599448f27b784024b39ba13c7c6e..0720d9062272fdc823963a856f1e85e485e348c7 100644
 --- a/third_party/blink/public/web/web_local_frame_client.h
 +++ b/third_party/blink/public/web/web_local_frame_client.h
-@@ -548,6 +548,9 @@ class BLINK_EXPORT WebLocalFrameClient {
+@@ -555,6 +555,9 @@ class BLINK_EXPORT WebLocalFrameClient {
    virtual void DidCreateScriptContext(v8::Local<v8::Context>,
                                        int32_t world_id) {}
  
@@ -67,10 +67,10 @@ index cee72cbe2a0a48dce51cbf7e9ba14a1b326afb6b..f73db341765f68b7b9fac043e070ef02
    virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
                                          int32_t world_id) {}
 diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
-index d20d24c0ba6025af06f5f61cefd3e96e687c123d..c6cb7af9c2ec7e812954b7725f8506c1d9d115de 100644
+index c7eb05be74884686abc4cbb43868464d1066904f..8b05af30571f0a68a56adf6d74b2c7fc39591c70 100644
 --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
-@@ -215,6 +215,7 @@ void LocalWindowProxy::Initialize() {
+@@ -203,6 +203,7 @@ void LocalWindowProxy::Initialize() {
    }
  
    InstallConditionalFeatures();
@@ -79,7 +79,7 @@ index d20d24c0ba6025af06f5f61cefd3e96e687c123d..c6cb7af9c2ec7e812954b7725f8506c1
    if (World().IsMainWorld()) {
      GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
 diff --git a/third_party/blink/renderer/core/exported/local_frame_client_impl.cc b/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
-index 60496637209755d5f6ecaab7dd56c1e54bcdfda8..83c8a71fff6cc4230a9ae372fab8a536120f3ad5 100644
+index 22919e83d2fa5329471357849db28fd94899e92f..106a099cdfc49bcfc5a396fac46e93699f99f5e1 100644
 --- a/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
 +++ b/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
 @@ -344,6 +344,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -97,7 +97,7 @@ index 60496637209755d5f6ecaab7dd56c1e54bcdfda8..83c8a71fff6cc4230a9ae372fab8a536
      v8::Local<v8::Context> context,
      int32_t world_id) {
 diff --git a/third_party/blink/renderer/core/exported/local_frame_client_impl.h b/third_party/blink/renderer/core/exported/local_frame_client_impl.h
-index eb40ab259bab5cbec42d153ad6de26a45781210f..5b18acb942fe1d106a63d045263df38c7d8fe58c 100644
+index 77194e8e0b10946df54e536df3f556ff66b3aac5..99e21afc95504ca4427f73cb6a268d0a57c0cb8f 100644
 --- a/third_party/blink/renderer/core/exported/local_frame_client_impl.h
 +++ b/third_party/blink/renderer/core/exported/local_frame_client_impl.h
 @@ -78,6 +78,8 @@ class LocalFrameClientImpl final : public LocalFrameClient {
@@ -110,10 +110,10 @@ index eb40ab259bab5cbec42d153ad6de26a45781210f..5b18acb942fe1d106a63d045263df38c
                                  int32_t world_id) override;
  
 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 d6e4924bd04c826a91e717c16382c5519d9ddd39..bcf83d016368d6fa6fc763b835e5dd318d9c1785 100644
+index 5cd032934257d957b1e6ce85bf83e5a89dc6a87d..afca3554d93f7a6d5b3c10a7b594dcb1a3b6df07 100644
 --- a/third_party/blink/renderer/core/frame/local_frame_client.h
 +++ b/third_party/blink/renderer/core/frame/local_frame_client.h
-@@ -286,6 +286,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
+@@ -288,6 +288,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
  
    virtual void DidCreateScriptContext(v8::Local<v8::Context>,
                                        int32_t world_id) = 0;
@@ -123,10 +123,10 @@ index d6e4924bd04c826a91e717c16382c5519d9ddd39..bcf83d016368d6fa6fc763b835e5dd31
                                          int32_t world_id) = 0;
    virtual bool AllowScriptExtensions() = 0;
 diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
-index aba9bc199c253f5093c516122ce6f1c7071de714..f1dfaf015b08f2b0804d400f88263cc5d9cf7f4c 100644
+index ad193eee54963de001cee76153c6fafa25b814a1..d232898dfac0ba8f4b54a96b87e604dfea7ff7fc 100644
 --- a/third_party/blink/renderer/core/loader/empty_clients.h
 +++ b/third_party/blink/renderer/core/loader/empty_clients.h
-@@ -362,6 +362,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
+@@ -340,6 +340,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
  
    void DidCreateScriptContext(v8::Local<v8::Context>,
                                int32_t world_id) override {}

+ 4 - 4
patches/chromium/add_realloc.patch

@@ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f
  
    GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
 diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
-index 696a6170a584c1bb71c8ad253963d9f64395a13e..9677aa931cd543adfc1e9844d6afee8dcb0f4c2d 100644
+index e514c85d34e59f0f7bde3f62f567def06266bc79..c947c36b15d2cb8eac9d560b9aba9b0069bfc091 100644
 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
-@@ -661,6 +661,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
+@@ -681,6 +681,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
          size, ArrayBufferContents::kDontInitialize);
    }
  
@@ -70,10 +70,10 @@ index 095ca3db051362319611976b9052725ab16c1b3a..13e802a5732f0b04832d6dd8031ae43e
    WTF::Partitions::ArrayBufferPartition()->Free(data);
  }
 diff --git a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h
-index 2e871b20c1e6fc3703178957fd03923f02ab1b47..8f2fd80130f1e7f957d642af4e5c22f9a5937ce4 100644
+index cce802e4fc94c258607bc943d9902e6d18173c44..4f7f4eaf005aac701360e567e6faca7f2e0ff3da 100644
 --- a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h
 +++ b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h
-@@ -106,6 +106,7 @@ class CORE_EXPORT ArrayBufferContents {
+@@ -108,6 +108,7 @@ class CORE_EXPORT ArrayBufferContents {
    void CopyTo(ArrayBufferContents& other);
  
    static void* AllocateMemoryOrNull(size_t, InitializationPolicy);

+ 16 - 16
patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch

@@ -10,10 +10,10 @@ WebContents, and cancels the authentication if there's no WebContents
 available, which there isn't in the case of the 'net' module.
 
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index c37432121142472010b767b7fb257e20bc60b3fc..099c94d1db7994a0608864cb05e3686a85b7070d 100644
+index a46aab1db2de282e0ff3561a98bad1dac659b67a..31ce9719f63c564baf88e48c7494e030cf9d148c 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -193,6 +193,25 @@ struct HttpAuthStaticNetworkContextParams {
+@@ -159,6 +159,25 @@ struct HttpAuthStaticNetworkContextParams {
       = DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS;
  };
  
@@ -39,7 +39,7 @@ index c37432121142472010b767b7fb257e20bc60b3fc..099c94d1db7994a0608864cb05e3686a
  interface CertVerifierClient {
    Verify(
      int32 default_error,
-@@ -633,6 +652,8 @@ struct URLLoaderFactoryParams {
+@@ -603,6 +622,8 @@ struct URLLoaderFactoryParams {
    // interface. This still respects the per-context block lists.
    CorsOriginAccessPatterns? factory_bound_access_patterns;
  
@@ -49,7 +49,7 @@ index c37432121142472010b767b7fb257e20bc60b3fc..099c94d1db7994a0608864cb05e3686a
    NetworkIsolationKey? network_isolation_key;
  
 diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
-index 9452018180979377728162209651ebd914bd95a4..6c9f3192260bcce252c7868e042bd40a205b55b8 100644
+index fb4f8ad895c685922af873f96f62ad4662a70f24..07fa817025eae412f43f6311b68d26753c44ff50 100644
 --- a/services/network/url_loader.cc
 +++ b/services/network/url_loader.cc
 @@ -486,6 +486,7 @@ URLLoader::URLLoader(
@@ -57,10 +57,10 @@ index 9452018180979377728162209651ebd914bd95a4..6c9f3192260bcce252c7868e042bd40a
      base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
      mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
 +    mojom::TrustedURLLoaderAuthClient* url_loader_auth_client,
-     mojom::OriginPolicyManager* origin_policy_manager)
+     mojom::OriginPolicyManager* origin_policy_manager,
+     std::unique_ptr<TrustTokenRequestHelper> trust_token_helper)
      : url_request_context_(url_request_context),
-       network_service_client_(network_service_client),
-@@ -544,6 +545,11 @@ URLLoader::URLLoader(
+@@ -546,6 +547,11 @@ URLLoader::URLLoader(
      header_client_.set_disconnect_handler(
          base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
    }
@@ -72,7 +72,7 @@ index 9452018180979377728162209651ebd914bd95a4..6c9f3192260bcce252c7868e042bd40a
    if (want_raw_headers_) {
      options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse |
                  mojom::kURLLoadOptionSendSSLInfoForCertificateError;
-@@ -982,7 +988,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request,
+@@ -1020,7 +1026,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request,
  
  void URLLoader::OnAuthRequired(net::URLRequest* url_request,
                                 const net::AuthChallengeInfo& auth_info) {
@@ -81,7 +81,7 @@ index 9452018180979377728162209651ebd914bd95a4..6c9f3192260bcce252c7868e042bd40a
      OnAuthCredentials(base::nullopt);
      return;
    }
-@@ -998,11 +1004,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
+@@ -1036,11 +1042,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
    if (url_request->response_headers())
      head->headers = url_request->response_headers();
    head->auth_challenge_info = auth_info;
@@ -108,18 +108,18 @@ index 9452018180979377728162209651ebd914bd95a4..6c9f3192260bcce252c7868e042bd40a
    auth_challenge_responder_receiver_.set_disconnect_handler(
        base::BindOnce(&URLLoader::DeleteSelf, base::Unretained(this)));
 diff --git a/services/network/url_loader.h b/services/network/url_loader.h
-index 5b8e727e4a8f71d646eb2502d27256dcdae22e78..8b63418451933382b414e47001b9859017b60f7f 100644
+index 9a07d08baf1f52234898951f8680a8b3a5c6e82f..e99228fd574cd5291d71de6a5f77cdda2debea7c 100644
 --- a/services/network/url_loader.h
 +++ b/services/network/url_loader.h
-@@ -106,6 +106,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
+@@ -111,6 +111,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
        base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
        base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
        mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
 +      mojom::TrustedURLLoaderAuthClient* url_loader_auth_client,
-       mojom::OriginPolicyManager* origin_policy_manager);
+       mojom::OriginPolicyManager* origin_policy_manager,
+       std::unique_ptr<TrustTokenRequestHelper> trust_token_helper);
    ~URLLoader() override;
- 
-@@ -413,6 +414,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
+@@ -422,6 +423,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
    base::Optional<base::UnguessableToken> fetch_window_id_;
  
    mojo::Remote<mojom::TrustedHeaderClient> header_client_;
@@ -128,7 +128,7 @@ index 5b8e727e4a8f71d646eb2502d27256dcdae22e78..8b63418451933382b414e47001b98590
    std::unique_ptr<FileOpenerForUpload> file_opener_for_upload_;
  
 diff --git a/services/network/url_loader_factory.cc b/services/network/url_loader_factory.cc
-index f3a9baefc1a18924503d7a6850bc704310e50015..9b3802dbdf7a1ab3f132529b794665a68eeac673 100644
+index f17117db6f2ad140d797fad6a40fcd241c9538dd..a65a15d29df7a0667db56bbd768ef85aaff71d3d 100644
 --- a/services/network/url_loader_factory.cc
 +++ b/services/network/url_loader_factory.cc
 @@ -66,6 +66,7 @@ URLLoaderFactory::URLLoaderFactory(
@@ -144,7 +144,7 @@ index f3a9baefc1a18924503d7a6850bc704310e50015..9b3802dbdf7a1ab3f132529b794665a6
        std::move(network_usage_accumulator),
        header_client_.is_bound() ? header_client_.get() : nullptr,
 +      auth_client_.is_bound() ? auth_client_.get() : nullptr,
-       context_->origin_policy_manager());
+       context_->origin_policy_manager(), nullptr /* trust_token_helper */);
    cors_url_loader_factory_->OnLoaderCreated(std::move(loader));
  }
 diff --git a/services/network/url_loader_factory.h b/services/network/url_loader_factory.h

+ 1 - 1
patches/chromium/blink_local_frame.patch

@@ -14,7 +14,7 @@ when there is code doing that.
 This patch reverts the change to fix the crash in Electron.
 
 diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
-index bd3e6c88f1ec5d69e832c1e9c3bdde8f2d3c1186..60ad5021df58f6673262d32e9d895411eb3b3951 100644
+index adf78283c04036c92dede354be0a1835ba620ca4..a02ffcaef8e29a934d4e3a8f795ca9dd38537b55 100644
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
 @@ -473,10 +473,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {

+ 4 - 4
patches/chromium/blink_world_context.patch

@@ -7,10 +7,10 @@ This exposes a method for obtaining a reference to an isolated world, which is
 otherwise not available in the Blink API.
 
 diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
-index 2aefec4bd9877ee9109e3ab8ca9a8ab94d21b420..14a9a3c30164ced30d4bae47ea53f29ad831ab0d 100644
+index 0b154417ea7cbbf1ad4b88bc80027a67f16faa7d..c5d9cd52989c0d776ac12a5c0b88782d2c40b213 100644
 --- a/third_party/blink/public/web/web_local_frame.h
 +++ b/third_party/blink/public/web/web_local_frame.h
-@@ -333,6 +333,9 @@ class WebLocalFrame : public WebFrame {
+@@ -334,6 +334,9 @@ class WebLocalFrame : public WebFrame {
    // be calling this API.
    virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
  
@@ -21,7 +21,7 @@ index 2aefec4bd9877ee9109e3ab8ca9a8ab94d21b420..14a9a3c30164ced30d4bae47ea53f29a
    // that the script evaluated to with callback. Script execution can be
    // suspend.
 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 da1e0054a3bf57364055b37aad06a65a3bab783e..99cd24e4665943369f38278ba0737d2eb79e713a 100644
+index 2660078b0ed37bc3313e645f59e38cd306b1fdca..9cb4f3d02fccd6f1098c9b8080f1057642aead5f 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
 @@ -922,6 +922,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
@@ -39,7 +39,7 @@ index da1e0054a3bf57364055b37aad06a65a3bab783e..99cd24e4665943369f38278ba0737d2e
    return BindingSecurity::ShouldAllowAccessToFrame(
        CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()),
 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 1a349aee35a766015692922211b225e6cdeed97a..2e248e65407833ef893784b15e3e11d8cfeec371 100644
+index a8d2023b6b33f56af0dab8909f5863f4be68a311..d7582f9c2f733d4beeb294df34dcbf09ce3970ce 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
 @@ -160,6 +160,8 @@ class CORE_EXPORT WebLocalFrameImpl final

+ 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 6f07209af5dce58b312d44a2bdb98d9186eab71c..51ad7bf75077308c058ba66f67daa7a9b6b2eed1 100644
+index ac67c35bbcb0e8b73e2059c1dfd5b510235449c4..648c35ba8eae74e8264f6d0e2ac74785d31460ae 100644
 --- a/base/trace_event/builtin_categories.h
 +++ b/base/trace_event/builtin_categories.h
-@@ -67,6 +67,7 @@
+@@ -68,6 +68,7 @@
    X("dwrite")                                                            \
    X("DXVA Decoding")                                                     \
    X("EarlyJava")                                                         \

+ 1 - 1
patches/chromium/build_gn.patch

@@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will
 rebuild the entire tree.
 
 diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
-index 11e0a21820f34ac99bc2e9322e0c8bd1314045c3..5301eb0b4d7947c5e797d3ba8973a3ac5ff653f3 100644
+index 6f5d5f123f89c5ef4dd601eddb6025bd4dc3b9ab..b39aa4b3181489e5ea270c6cd3f30adfbb9847a0 100644
 --- a/build/config/BUILDCONFIG.gn
 +++ b/build/config/BUILDCONFIG.gn
 @@ -123,6 +123,9 @@ if (current_os == "") {

+ 15 - 15
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/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
-index b052809db3b3b6b00bc80546f49cdd3e43297e4a..8b3619268e3a495a51cbcaa2ce71e77139c677b5 100644
+index 6b54a537e4d9282a3af95364e9925cbdd6ce5812..979a9ca641971ca706f9ea00580fdceaaf64b3d2 100644
 --- a/content/browser/frame_host/render_frame_host_impl.cc
 +++ b/content/browser/frame_host/render_frame_host_impl.cc
-@@ -4441,6 +4441,7 @@ void RenderFrameHostImpl::CreateNewWindow(
+@@ -4324,6 +4324,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 b052809db3b3b6b00bc80546f49cdd3e43297e4a..8b3619268e3a495a51cbcaa2ce71e771
            &no_javascript_access);
  
 diff --git a/content/common/frame.mojom b/content/common/frame.mojom
-index db3ef3455077a2cbf3503eca4434c9135fd31082..5d022b7ccbb05ba155cdc81dbe60b34864fa6c6a 100644
+index edf716bca261df00ac7df5a34cec8fa57c526a3c..a2aea8d794d8b8083062d0c6e6f61a9ac0d8548a 100644
 --- a/content/common/frame.mojom
 +++ b/content/common/frame.mojom
-@@ -296,6 +296,10 @@ struct CreateNewWindowParams {
+@@ -304,6 +304,10 @@ struct CreateNewWindowParams {
  
    // The window features to use for the new window.
    blink.mojom.WindowFeatures features;
@@ -36,10 +36,10 @@ index db3ef3455077a2cbf3503eca4434c9135fd31082..5d022b7ccbb05ba155cdc81dbe60b348
  
  // 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 4e95486031b49c9cc3f5b025916c47a538aa3780..0520b0b7d4144666b95dc2bfd25c0b0ae5892bfe 100644
+index 89f33b33f8c848040f3bc6e34282688efda9c4db..f996a9a132a325a9a614f475024b612f32ace333 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
-@@ -508,6 +508,8 @@ bool ContentBrowserClient::CanCreateWindow(
+@@ -512,6 +512,8 @@ bool ContentBrowserClient::CanCreateWindow(
      const std::string& frame_name,
      WindowOpenDisposition disposition,
      const blink::mojom::WindowFeatures& features,
@@ -49,10 +49,10 @@ index 4e95486031b49c9cc3f5b025916c47a538aa3780..0520b0b7d4144666b95dc2bfd25c0b0a
      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 a13172df620df804c6b4458d3b768bb5e26fd469..8ae9b370cf842a4c6d95d96d94f8b2d7a2122966 100644
+index 26cd6d1afcb89148ed33ab733012a778e9b75c40..a11e1a1abc9d4ded6cdc87f99d4e3d19ee0e2af5 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
-@@ -142,6 +142,7 @@ class NetworkService;
+@@ -143,6 +143,7 @@ class NetworkService;
  class TrustedURLLoaderHeaderClient;
  }  // namespace mojom
  struct ResourceRequest;
@@ -60,7 +60,7 @@ index a13172df620df804c6b4458d3b768bb5e26fd469..8ae9b370cf842a4c6d95d96d94f8b2d7
  }  // namespace network
  
  namespace rappor {
-@@ -823,6 +824,8 @@ class CONTENT_EXPORT ContentBrowserClient {
+@@ -834,6 +835,8 @@ class CONTENT_EXPORT ContentBrowserClient {
        const std::string& frame_name,
        WindowOpenDisposition disposition,
        const blink::mojom::WindowFeatures& features,
@@ -70,7 +70,7 @@ index a13172df620df804c6b4458d3b768bb5e26fd469..8ae9b370cf842a4c6d95d96d94f8b2d7
        bool opener_suppressed,
        bool* no_javascript_access);
 diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
-index 9c452f46c9a1fe8644271ec9c8f34b51ec88c10a..d2aaba85dcf63d357d521d017425318d79dbd16b 100644
+index f0cb4833442be24dee52e2e172a0d22474d1135b..5e83b930fa0f32c368ce1d5980436d4c2cc450bc 100644
 --- a/content/renderer/render_view_impl.cc
 +++ b/content/renderer/render_view_impl.cc
 @@ -68,6 +68,7 @@
@@ -81,7 +81,7 @@ index 9c452f46c9a1fe8644271ec9c8f34b51ec88c10a..d2aaba85dcf63d357d521d017425318d
  #include "content/renderer/media/audio/audio_device_factory.h"
  #include "content/renderer/render_frame_impl.h"
  #include "content/renderer/render_frame_proxy.h"
-@@ -1246,6 +1247,8 @@ WebView* RenderViewImpl::CreateView(
+@@ -1254,6 +1255,8 @@ WebView* RenderViewImpl::CreateView(
    }
    params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
  
@@ -91,10 +91,10 @@ index 9c452f46c9a1fe8644271ec9c8f34b51ec88c10a..d2aaba85dcf63d357d521d017425318d
    // moved on send.
    bool is_background_tab =
 diff --git a/content/shell/browser/web_test/web_test_content_browser_client.cc b/content/shell/browser/web_test/web_test_content_browser_client.cc
-index bf7c4bf0b76a89b1ecee6edc11fcfd06fe679968..79b2ba79653a251d3a4c3a54adbcd5c10c460b19 100644
+index 33d795d25197745f870e967f34348fc4c4db953f..90afa523c8d093018a5d8a45acd88dd656405648 100644
 --- a/content/shell/browser/web_test/web_test_content_browser_client.cc
 +++ b/content/shell/browser/web_test/web_test_content_browser_client.cc
-@@ -333,6 +333,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
+@@ -367,6 +367,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
      const std::string& frame_name,
      WindowOpenDisposition disposition,
      const blink::mojom::WindowFeatures& features,
@@ -104,10 +104,10 @@ index bf7c4bf0b76a89b1ecee6edc11fcfd06fe679968..79b2ba79653a251d3a4c3a54adbcd5c1
      bool opener_suppressed,
      bool* no_javascript_access) {
 diff --git a/content/shell/browser/web_test/web_test_content_browser_client.h b/content/shell/browser/web_test/web_test_content_browser_client.h
-index aaf3b8fed16bc2959941effaffd3aec87017ca59..1ea96df464f61c963a6d9aa224b9607e4221daa6 100644
+index ab5c068684834eb892a711e9f8ac788bbce35db4..0f7d37f29be140ad2354fbe694f41e9f3c25b316 100644
 --- a/content/shell/browser/web_test/web_test_content_browser_client.h
 +++ b/content/shell/browser/web_test/web_test_content_browser_client.h
-@@ -71,6 +71,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
+@@ -90,6 +90,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
                         const std::string& frame_name,
                         WindowOpenDisposition disposition,
                         const blink::mojom::WindowFeatures& features,

+ 3 - 3
patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch

@@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources.  We need to load these from
 Electrons grit header instead of Chromes
 
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index 021b133ee20ebf3c8b4798be2f0c195127619bf0..83d29c1555ece904f772c21cf22923b860ed38ae 100644
+index 93001a62c6daea08854466429a5f17aff236a09b..83e2eabb262418627ee2a040989cfdd79939e50c 100644
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -5285,6 +5285,7 @@ jumbo_static_library("browser") {
+@@ -5329,6 +5329,7 @@ jumbo_static_library("browser") {
      deps += [
        "//components/spellcheck/browser",
        "//components/spellcheck/common",
@@ -44,7 +44,7 @@ index f28230ea94fece5ae8ca7ac27a14da48f40fadbb..c10eea103852b9411a644e1fe20a7e20
    ]
  }
 diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc
-index 7e06f689632ae67e3e17d7985c6e7b6ea0057f3c..0b4676f4c40b4a0eda927a51016ec91ec230291d 100644
+index 201dc7786e822d54b5d9ab8a9d02e7b4339a8d6d..a3232da24513b408403f9f7c033dcd2f3222da47 100644
 --- a/components/language/core/browser/language_prefs.cc
 +++ b/components/language/core/browser/language_prefs.cc
 @@ -21,7 +21,7 @@

+ 2 - 2
patches/chromium/content_browser_main_loop.patch

@@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously
 in atom::CommonWebContentsDelegate::ResetManageWebContents.
 
 diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
-index 1d291121fdf431adb459ad490258efb07677c275..0dc33867fb59c2cd7e95fb3d8ee9c8eb85600e63 100644
+index 8591e0018c58baaca66f14cab82faea523183afc..3570d543170eeb63167d786312294b04e49f7e93 100644
 --- a/content/browser/browser_main_loop.cc
 +++ b/content/browser/browser_main_loop.cc
-@@ -1494,7 +1494,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
+@@ -1487,7 +1487,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
    NOTREACHED();
  #else
    base::RunLoop run_loop;

+ 2 - 2
patches/chromium/dcheck.patch

@@ -46,10 +46,10 @@ index f950552abbe9e9a0002156b596438fe9aa4f01b9..23931899eb58432fd8eabf4d681d2294
    // navigation. Now we know that the renderer has updated its state accordingly
    // and it is safe to also clear the browser side history.
 diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
-index 23681d4192ac329a68822dbcdb06369f34e5e28a..ecb4cd19c364285044da60830fb1b4d4f52204f3 100644
+index 4362daa04e89ca8f47c5e07e998fc9f1ad4f4c5b..75d4c0ae3b419bb114f22d1e5df8d346f738b96a 100644
 --- a/ui/base/clipboard/clipboard_win.cc
 +++ b/ui/base/clipboard/clipboard_win.cc
-@@ -767,10 +767,10 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
+@@ -776,10 +776,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
  
  void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
    UINT cf_format = format.ToFormatEtc().cfFormat;

+ 1 - 1
patches/chromium/desktop_media_list.patch

@@ -111,7 +111,7 @@ index ad7f766a36b1b6b2a8bc0f96369f1aaadf6681f7..f6c6c14a0937430df62c9b9c1132c591
   protected:
    virtual ~DesktopMediaListObserver() {}
 diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
-index d415675b3f7b757f2fb7a972e1bd96032f9ddd2c..b143433c995319e35216f359c1b57331917b1271 100644
+index 224d52b83533543398757ca487f99b3e59897e21..eb50b0393ba532766867aeec5ddeab1a6acd0bc2 100644
 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
 +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
 @@ -10,14 +10,15 @@

+ 6 - 6
patches/chromium/disable-redraw-lock.patch

@@ -15,10 +15,10 @@ the redraw locking mechanism, which fixes these issues. The electron issue
 can be found at https://github.com/electron/electron/issues/1821
 
 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
-index 10f39e919d5692ad265086aa6d95d975df7a21fa..4ecb8fc211e2c1d80fb8b0541b489950026e0f8c 100644
+index e18afe3c8c287c4cd44ff7139c1cc4004a9704ec..281c722d81c0ad5fa7bacbe25c07a7578dfa43b6 100644
 --- a/ui/views/win/hwnd_message_handler.cc
 +++ b/ui/views/win/hwnd_message_handler.cc
-@@ -305,6 +305,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
+@@ -306,6 +306,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
  
  }  // namespace
  
@@ -29,7 +29,7 @@ index 10f39e919d5692ad265086aa6d95d975df7a21fa..4ecb8fc211e2c1d80fb8b0541b489950
  // A scoping class that prevents a window from being able to redraw in response
  // to invalidations that may occur within it for the lifetime of the object.
  //
-@@ -356,6 +360,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
+@@ -357,6 +361,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
          cancel_unlock_(false),
          should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
                       ::IsWindow(hwnd_) &&
@@ -37,7 +37,7 @@ index 10f39e919d5692ad265086aa6d95d975df7a21fa..4ecb8fc211e2c1d80fb8b0541b489950
                       (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
                        !ui::win::IsAeroGlassEnabled())) {
      if (should_lock_)
-@@ -969,6 +974,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
+@@ -974,6 +979,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
    return scoped_enable;
  }
  
@@ -49,7 +49,7 @@ index 10f39e919d5692ad265086aa6d95d975df7a21fa..4ecb8fc211e2c1d80fb8b0541b489950
  // HWNDMessageHandler, gfx::WindowImpl overrides:
  
 diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
-index 6c94ab3e4972fff2fe984be748bcbc41fc6c97fc..2ca10cec3c065c3a7d5a42d3377ec9ba01524569 100644
+index 7b56d58faff84a72cc8cf9f77daeafdee110ce3a..d46ba47aaa31a0b893ab43e9f70dddbc48c5ea41 100644
 --- a/ui/views/win/hwnd_message_handler.h
 +++ b/ui/views/win/hwnd_message_handler.h
 @@ -203,6 +203,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
@@ -62,7 +62,7 @@ index 6c94ab3e4972fff2fe984be748bcbc41fc6c97fc..2ca10cec3c065c3a7d5a42d3377ec9ba
    HICON GetDefaultWindowIcon() const override;
    HICON GetSmallWindowIcon() const override;
 diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
-index 649163d22b7ebe5be8e2010cd30eea96587be578..d7d971937362d08f7b508244f58cc1e2d2993e9f 100644
+index 98efa2b7c4033c9ce8c73f7201e68e85baf05bba..4f0897ecc675d3e366ec07df28e09698c6b6e4cf 100644
 --- a/ui/views/win/hwnd_message_handler_delegate.h
 +++ b/ui/views/win/hwnd_message_handler_delegate.h
 @@ -46,6 +46,8 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {

+ 23 - 23
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_settings.h b/cc/trees/layer_tree_settings.h
-index 499d5f149ed2a83ba0d6174d4d940b0b58e5580c..748335f21d92c858ff1efebe4ce85e7405e3bdce 100644
+index 95a901678c215220b9e88db768444d48e32f6dbd..841c809b0b50c8c34a9d9c972c511bd4fd57a7b0 100644
 --- a/cc/trees/layer_tree_settings.h
 +++ b/cc/trees/layer_tree_settings.h
-@@ -101,6 +101,8 @@ class CC_EXPORT LayerTreeSettings {
+@@ -100,6 +100,8 @@ class CC_EXPORT LayerTreeSettings {
    bool use_rgba_4444 = false;
    bool unpremultiply_and_dither_low_bit_depth_tiles = false;
  
@@ -33,7 +33,7 @@ index 499d5f149ed2a83ba0d6174d4d940b0b58e5580c..748335f21d92c858ff1efebe4ce85e74
    // Image Decode Service and raster tiles without images until the decode is
    // ready.
 diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h
-index a27d84cc640a5a2af25e8b4475a499eeb298f16a..de9ffade449dcc8652481ce98306fdd59962bfa2 100644
+index 8bde4796ebcf40f7f10c62f4005eabb84af9de04..913ab005e582b3d1ab0df8f88ac1df6245fce34e 100644
 --- a/components/viz/common/display/renderer_settings.h
 +++ b/components/viz/common/display/renderer_settings.h
 @@ -23,6 +23,7 @@ class VIZ_COMMON_EXPORT RendererSettings {
@@ -66,7 +66,7 @@ index cb69e08c0185f55497089505ed5b226e57140321..362f28accc248248f3bcb54955c23528
        !command_line->HasSwitch(switches::kUIDisablePartialSwap);
  #if defined(OS_MACOSX)
 diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
-index bd5b3e0fd07e2417cae37a8a7282dffbef178827..68f7203072ff567b473e8906de1af780977ad277 100644
+index ceb0c4ecbe0401c0190ba683bac479392726207b..a4b41b16a2850b899fa815bd49ac6625adb68e93 100644
 --- a/components/viz/service/display/gl_renderer.cc
 +++ b/components/viz/service/display/gl_renderer.cc
 @@ -84,6 +84,9 @@
@@ -91,7 +91,7 @@ index bd5b3e0fd07e2417cae37a8a7282dffbef178827..68f7203072ff567b473e8906de1af780
  
    // Use the full quad_rect for debug quads to not move the edges based on
    // partial swaps.
-@@ -1519,7 +1523,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
+@@ -1547,7 +1551,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
            params->use_color_matrix, tint_gl_composited_content_,
            params->apply_shader_based_rounded_corner &&
                ShouldApplyRoundedCorner(params->quad)),
@@ -101,7 +101,7 @@ index bd5b3e0fd07e2417cae37a8a7282dffbef178827..68f7203072ff567b473e8906de1af780
  }
  
  void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) {
-@@ -1990,7 +1995,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
+@@ -2018,7 +2023,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
    SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA,
                                         tint_gl_composited_content_,
                                         ShouldApplyRoundedCorner(quad)),
@@ -111,7 +111,7 @@ index bd5b3e0fd07e2417cae37a8a7282dffbef178827..68f7203072ff567b473e8906de1af780
    SetShaderColor(color, opacity);
    if (current_program_->rounded_corner_rect_location() != -1) {
      SetShaderRoundedCorner(
-@@ -2145,7 +2151,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
+@@ -2173,7 +2179,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
                                                : NON_PREMULTIPLIED_ALPHA,
                         false, false, tint_gl_composited_content_,
                         ShouldApplyRoundedCorner(quad)),
@@ -121,7 +121,7 @@ index bd5b3e0fd07e2417cae37a8a7282dffbef178827..68f7203072ff567b473e8906de1af780
  
    if (current_program_->tint_color_matrix_location() != -1) {
      auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
-@@ -2241,7 +2248,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
+@@ -2269,7 +2276,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
                         !quad->ShouldDrawWithBlending(), has_tex_clamp_rect,
                         tint_gl_composited_content_,
                         ShouldApplyRoundedCorner(quad)),
@@ -131,7 +131,7 @@ index bd5b3e0fd07e2417cae37a8a7282dffbef178827..68f7203072ff567b473e8906de1af780
  
    if (current_program_->tint_color_matrix_location() != -1) {
      auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
-@@ -2343,7 +2351,7 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
+@@ -2371,7 +2379,7 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
    // The source color space should never be RGB.
    DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB());
  
@@ -140,7 +140,7 @@ index bd5b3e0fd07e2417cae37a8a7282dffbef178827..68f7203072ff567b473e8906de1af780
  
  #if defined(OS_WIN)
    // Force sRGB output on Windows for overlay candidate video quads to match
-@@ -2507,7 +2515,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
+@@ -2535,7 +2543,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
  
    SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
                                          ShouldApplyRoundedCorner(quad)),
@@ -150,7 +150,7 @@ index bd5b3e0fd07e2417cae37a8a7282dffbef178827..68f7203072ff567b473e8906de1af780
  
    DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
    gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
-@@ -2572,8 +2581,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
+@@ -2600,8 +2609,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
        draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
  
    // Bind the program to the GL state.
@@ -161,7 +161,7 @@ index bd5b3e0fd07e2417cae37a8a7282dffbef178827..68f7203072ff567b473e8906de1af780
  
    if (current_program_->rounded_corner_rect_location() != -1) {
      SetShaderRoundedCorner(
-@@ -3312,7 +3321,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
+@@ -3340,7 +3349,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
  void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
                                 const gfx::ColorSpace& src_color_space,
                                 const gfx::ColorSpace& dst_color_space) {
@@ -172,7 +172,7 @@ index bd5b3e0fd07e2417cae37a8a7282dffbef178827..68f7203072ff567b473e8906de1af780
  
    // If the input color space is PQ, and it did not specify a white level,
    // override it with the frame's white level.
-@@ -3694,9 +3705,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
+@@ -3722,9 +3733,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
          cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple);
    }
  
@@ -185,7 +185,7 @@ index bd5b3e0fd07e2417cae37a8a7282dffbef178827..68f7203072ff567b473e8906de1af780
    *new_bounds = gfx::RectF(updated_dst_rect.origin(),
                             gfx::SizeF((*overlay_texture)->texture.size()));
  
-@@ -3915,8 +3926,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
+@@ -3943,8 +3954,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
  
    PrepareGeometry(SHARED_BINDING);
  
@@ -196,14 +196,14 @@ index bd5b3e0fd07e2417cae37a8a7282dffbef178827..68f7203072ff567b473e8906de1af780
  
    gfx::Transform render_matrix;
    render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
-@@ -4025,3 +4036,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
+@@ -4053,3 +4064,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
  }
  
  }  // namespace viz
 +
 +#undef PATCH_CS
 diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
-index bf63bb9c03852263e9341c671be1ee4e7c1a3dc2..d06e2f99739298a4de13ebbce5606b68f5523df3 100644
+index d47312d5f89939eab55cfa94bd3fbd41a4bd7d2a..da2f5e9fdc0fda37c82357a12f4fa28f5c556273 100644
 --- a/content/browser/gpu/gpu_process_host.cc
 +++ b/content/browser/gpu/gpu_process_host.cc
 @@ -209,6 +209,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -215,7 +215,7 @@ index bf63bb9c03852263e9341c671be1ee4e7c1a3dc2..d06e2f99739298a4de13ebbce5606b68
      service_manager::switches::kGpuSandboxAllowSysVShm,
      service_manager::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 016684c4340318308666545ddd8e4e85632d4ed2..fb015b5d3b2a82cd76cf166b1d694b3587906975 100644
+index 7faeda55e7190baee5e1a821611998d9914e6224..f631b9fe31eb2d2c6d55337418837f11865b61db 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
 @@ -229,6 +229,7 @@
@@ -226,7 +226,7 @@ index 016684c4340318308666545ddd8e4e85632d4ed2..fb015b5d3b2a82cd76cf166b1d694b35
  #include "ui/gl/gl_switches.h"
  #include "ui/native_theme/native_theme_features.h"
  #include "url/origin.h"
-@@ -3168,6 +3169,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
+@@ -3212,6 +3213,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[] = {
@@ -235,10 +235,10 @@ index 016684c4340318308666545ddd8e4e85632d4ed2..fb015b5d3b2a82cd76cf166b1d694b35
      service_manager::switches::kDisableInProcessStackTraces,
      service_manager::switches::kDisableSeccompFilterSandbox,
 diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
-index 48965b64fd7ec59b2132dc2c2fb47d4276fc945c..6d95719f7af3df9e1225e2547723d2231c25c612 100644
+index 3010e98ca5faea201679728894b6c9889e0d4f5e..0a3465813c2b0cfe15ef2bf5067e0fafe4155a91 100644
 --- a/content/renderer/render_widget.cc
 +++ b/content/renderer/render_widget.cc
-@@ -2735,6 +2735,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
+@@ -2681,6 +2681,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
    settings.main_frame_before_activation_enabled =
        cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
  
@@ -293,7 +293,7 @@ index d88680239152858689121d134559765fb8fae1b7..073ed8a8f84ebf994a2b9d9fa7e78f75
  
    gfx::ColorSpace::TransferID transfer_id =
 diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
-index 4c47a1132ea3d53b6c63882e98374196ac7ce069..a7f00f426cc6a75d7b942581696332756f2cb792 100644
+index 2674784dca1ed12b2f5afc7b728e0c6e8cd6ca4a..5b661c70c9c89883a1aaaf1a29a9ec9fe7f16da6 100644
 --- a/ui/gfx/mac/io_surface.cc
 +++ b/ui/gfx/mac/io_surface.cc
 @@ -16,6 +16,7 @@
@@ -304,7 +304,7 @@ index 4c47a1132ea3d53b6c63882e98374196ac7ce069..a7f00f426cc6a75d7b94258169633275
  
  namespace gfx {
  
-@@ -254,6 +255,11 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size,
+@@ -258,6 +259,11 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size,
      IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB);
    } else {
      CGColorSpaceRef color_space = base::mac::GetSRGBColorSpace();
@@ -316,7 +316,7 @@ index 4c47a1132ea3d53b6c63882e98374196ac7ce069..a7f00f426cc6a75d7b94258169633275
      base::ScopedCFTypeRef<CFDataRef> color_space_icc(
          CGColorSpaceCopyICCProfile(color_space));
      IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), color_space_icc);
-@@ -270,6 +276,14 @@ bool IOSurfaceCanSetColorSpace(const ColorSpace& color_space) {
+@@ -274,6 +280,14 @@ bool IOSurfaceCanSetColorSpace(const ColorSpace& color_space) {
  
  void IOSurfaceSetColorSpace(IOSurfaceRef io_surface,
                              const ColorSpace& color_space) {

+ 1 - 1
patches/chromium/disable_compositor_recycling.patch

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

+ 8 - 9
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 40b9e634b8bf09a0bbded7cc0648ed58b76825fa..0d290b86b9ad6d8152526e1433f88e035fb09b91 100644
+index 5ad66a6af94f07d7a989e738ea587ce467a542d6..8c54e34e716a647a72ffce78b56f94a03a5dd978 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -614,6 +614,9 @@ void RenderWidgetHostImpl::WasHidden() {
+@@ -660,6 +660,9 @@ void RenderWidgetHostImpl::WasHidden() {
    if (is_hidden_)
      return;
  
@@ -20,22 +20,21 @@ index 40b9e634b8bf09a0bbded7cc0648ed58b76825fa..0d290b86b9ad6d8152526e1433f88e03
        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 b6f95fdfa88b0094dc8316d61660a16e8ac0e8a8..b8d70e8973518f46f0c322af4bd2c86af626175a 100644
+index 013b2165038f1f21df394a0742f7927f26ab1671..894ddaa62fe8aa24eccbe7f9885a4dbb8db04206 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.h
 +++ b/content/browser/renderer_host/render_widget_host_impl.h
-@@ -175,6 +175,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
+@@ -179,6 +179,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
    // RenderWidgetHostImpl.
    static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
  
 +  // Electron: Prevents the widget from getting hidden.
 +  bool disable_hidden_ = false;
 +
-   void set_hung_renderer_delay(const base::TimeDelta& delay) {
-     hung_renderer_delay_ = delay;
-   }
-
+   void set_new_content_rendering_delay_for_testing(
+       const base::TimeDelta& delay) {
+     new_content_rendering_delay_ = delay;
 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 3e2190700aee..0ccdaa8d037c 100644
+index 3e2190700aee4ea6184ea59d8bb4a480cd52697b..0ccdaa8d037cb71ee3eebae027a74e96ffe1e846 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
 @@ -692,7 +692,7 @@ void RenderWidgetHostViewAura::HideImpl() {

+ 2 - 2
patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch

@@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch
 See https://github.com/electron/electron/issues/10754
 
 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
-index 31cbbadddd28540096263dd4811b0f098eff6e0a..aa76a4efd290b142bcc87ee960e79ec366ddceb8 100644
+index 474d302e08510884846e71c0dea41c30f8caa09e..59396d8a77b86ac0cb224fb91dec91fa79ade53d 100644
 --- a/third_party/blink/renderer/core/dom/document.cc
 +++ b/third_party/blink/renderer/core/dom/document.cc
-@@ -4147,7 +4147,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
+@@ -4153,7 +4153,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
          "frame that never had a user gesture since its load. "
          "https://www.chromestatus.com/feature/5082396709879808";
      Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message);

+ 6 - 6
patches/chromium/expose_setuseragent_on_networkcontext.patch

@@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
    DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
  };
 diff --git a/services/network/network_context.cc b/services/network/network_context.cc
-index 04463f777467a9f3ff6a9959d490d79c2e472c69..8e8853d741b8867d49be94fcc8428b7917d40f1d 100644
+index d0d646a42b3ee27f848dd0a47179e8f573e51d8f..35244d028375fe4d79ad41a864c38587ce02f749 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
-@@ -1009,6 +1009,13 @@ void NetworkContext::SetNetworkConditions(
+@@ -1008,6 +1008,13 @@ void NetworkContext::SetNetworkConditions(
                                        std::move(network_conditions));
  }
  
@@ -51,10 +51,10 @@ index 04463f777467a9f3ff6a9959d490d79c2e472c69..8e8853d741b8867d49be94fcc8428b79
    // 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 2cc0dc76a55026dea5db962df8c79bf85754912d..2d42b7197b61bed3af8e1859a9945318c96f8946 100644
+index 9d201f1a5ef0eaf3f8b42cbb3d2593dbd068bdd6..e32997067e57098198168675ffe3160134fb838b 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
-@@ -236,6 +236,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -233,6 +233,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 2cc0dc76a55026dea5db962df8c79bf85754912d..2d42b7197b61bed3af8e1859a9945318
    void SetEnableReferrers(bool enable_referrers) override;
  #if defined(OS_CHROMEOS)
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index 1d9ffd3de180e3256fb63a497544feeb427ae7ff..c37432121142472010b767b7fb257e20bc60b3fc 100644
+index 96ba4d67bcdefef44ecd246acb883824c9e842d6..a46aab1db2de282e0ff3561a98bad1dac659b67a 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -1016,6 +1016,9 @@ interface NetworkContext {
+@@ -986,6 +986,9 @@ interface NetworkContext {
    SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
                         NetworkConditions? conditions);
  

+ 7 - 20
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 bfca4412f0045bdd23a76597a803145e9f7f22c5..5337fa3fe2653684ff1688f1cf8a52c908ee1d61 100644
+index 2d4ec42b5c1f280f025f697d853925813303cab3..a284599bfd0e4242054ce4e0bf1de338abceb978 100644
 --- a/ui/native_theme/native_theme.cc
 +++ b/ui/native_theme/native_theme.cc
-@@ -53,6 +53,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors)
+@@ -234,6 +234,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors)
  NativeTheme::~NativeTheme() = default;
  
  bool NativeTheme::ShouldUseDarkColors() const {
@@ -26,10 +26,10 @@ index bfca4412f0045bdd23a76597a803145e9f7f22c5..5337fa3fe2653684ff1688f1cf8a52c9
  }
  
 diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
-index d0fb56734a9cb102c7c709873a4ec07a3af6b2e8..250cdbbbc95897e9e2162311bf1f97c9dbd93330 100644
+index 22278bde2d532da4f8f26e102c73b0edab424135..2ef51edc7308598486ce4bf486f432a436d88af5 100644
 --- a/ui/native_theme/native_theme.h
 +++ b/ui/native_theme/native_theme.h
-@@ -353,6 +353,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
+@@ -368,6 +368,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
        ColorId color_id,
        ColorScheme color_scheme = ColorScheme::kDefault) const;
  
@@ -52,7 +52,7 @@ index d0fb56734a9cb102c7c709873a4ec07a3af6b2e8..250cdbbbc95897e9e2162311bf1f97c9
    // 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
-@@ -483,6 +499,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
+@@ -502,6 +518,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
    PreferredColorScheme preferred_color_scheme_ =
        PreferredColorScheme::kNoPreference;
  
@@ -61,24 +61,11 @@ index d0fb56734a9cb102c7c709873a4ec07a3af6b2e8..250cdbbbc95897e9e2162311bf1f97c9
    DISALLOW_COPY_AND_ASSIGN(NativeTheme);
  };
  
-diff --git a/ui/native_theme/native_theme_dark_aura.cc b/ui/native_theme/native_theme_dark_aura.cc
-index 87b0abc9c646ace8cafc2b83eb4da6ffd3370237..75c677def845711ef4f3414f0a7df4f88431bf25 100644
---- a/ui/native_theme/native_theme_dark_aura.cc
-+++ b/ui/native_theme/native_theme_dark_aura.cc
-@@ -20,6 +20,8 @@ SkColor NativeThemeDarkAura::GetSystemColor(ColorId color_id,
- }
- 
- bool NativeThemeDarkAura::ShouldUseDarkColors() const {
-+  if (theme_source() == ThemeSource::kForcedLight) return false;
-+  if (theme_source() == ThemeSource::kForcedDark) return true;
-   return true;
- }
- 
 diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
-index dedaaaeaa93e55ec784f94864d670e0659d839bf..57009894edb9ad9422e24bf40f4100964fd32d1c 100644
+index 99494b370bf45e6587d82c040f85a5ffce46a219..a707841aa61a40ce8e3e35f6516de48cd9874d76 100644
 --- a/ui/native_theme/native_theme_win.cc
 +++ b/ui/native_theme/native_theme_win.cc
-@@ -726,6 +726,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
+@@ -729,6 +729,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
    // ...unless --force-dark-mode was specified in which case caveat emptor.
    if (UsesHighContrastColors() && !IsForcedDarkMode())
      return false;

+ 21 - 21
patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch

@@ -6,11 +6,11 @@ Subject: feat: 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 464c6df3e17a93c591701f23470b445a95cc8855..8e5f755f25cf09260d1612c1e54652d4f4c7caac 100644
+index f27504c70d635a3b45cd53ca675a473d39e74b44..297eb00c16fc683e420d74b720a4b005015aa9cc 100644
 --- a/content/browser/renderer_host/render_view_host_impl.cc
 +++ b/content/browser/renderer_host/render_view_host_impl.cc
-@@ -440,6 +440,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
-   Send(new ViewMsg_SetBackgroundOpaque(GetRoutingID(), opaque));
+@@ -453,6 +453,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
+   GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
  }
  
 +void RenderViewHostImpl::SetSchedulerThrottling(bool allowed) {
@@ -21,10 +21,10 @@ index 464c6df3e17a93c591701f23470b445a95cc8855..8e5f755f25cf09260d1612c1e54652d4
    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 9418a3622afb6a394391bb8420f2fdc3e8c08a61..6d74ea1ca2d1a9cf81838867532b14cd33fb9f74 100644
+index 70f9ea0f650b9a4b482d823a603871808f8e125c..8bd66fa4058fa5fa2ef0872c9fda2ab1192b2a2f 100644
 --- a/content/browser/renderer_host/render_view_host_impl.h
 +++ b/content/browser/renderer_host/render_view_host_impl.h
-@@ -109,6 +109,7 @@ class CONTENT_EXPORT RenderViewHostImpl
+@@ -110,6 +110,7 @@ class CONTENT_EXPORT RenderViewHostImpl
    SiteInstanceImpl* GetSiteInstance() override;
    bool IsRenderViewLive() override;
    void NotifyMoveOrResizeStarted() override;
@@ -33,12 +33,12 @@ index 9418a3622afb6a394391bb8420f2fdc3e8c08a61..6d74ea1ca2d1a9cf81838867532b14cd
    void UpdateWebkitPreferences(const WebPreferences& prefs) override;
    void OnWebkitPreferencesChanged() override;
 diff --git a/content/common/view_messages.h b/content/common/view_messages.h
-index ee01a4430f8e3098fbf741010394ad1a8fd6528b..01327559222ebd3e9de954cf9c9137cc105cbee0 100644
+index b75aee16237cad6043cd6cfbe22a166e10327a16..7a7e96bcd17e730d2a282e3c7df4a0e3c56b75e0 100644
 --- a/content/common/view_messages.h
 +++ b/content/common/view_messages.h
-@@ -98,6 +98,9 @@ IPC_STRUCT_TRAITS_END()
- // Make the RenderWidget background transparent or opaque.
- IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque, bool /* opaque */)
+@@ -95,6 +95,9 @@ IPC_STRUCT_TRAITS_END()
+ 
+ // Messages sent from the browser to the renderer.
  
 +// Whether to enable the Renderer scheduler background throttling.
 +IPC_MESSAGE_ROUTED1(ViewMsg_SetSchedulerThrottling, bool /* allowed */)
@@ -61,10 +61,10 @@ index 893c45a5c71b4e55ea323ae60e11d12ddb099efd..db9a1ff0fe1a912db83692ab17c620cf
    //
    // Returns the current WebKit preferences. Note: WebPreferences is cached, so
 diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
-index d2aaba85dcf63d357d521d017425318d79dbd16b..6927c27c62b5797b9b6fc3d05002a9e6b1b8fc70 100644
+index 5e83b930fa0f32c368ce1d5980436d4c2cc450bc..fdde69954f331cb28d0409d2987a147587685007 100644
 --- a/content/renderer/render_view_impl.cc
 +++ b/content/renderer/render_view_impl.cc
-@@ -1174,6 +1174,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
+@@ -1183,6 +1183,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
  
    bool handled = true;
    IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message)
@@ -73,7 +73,7 @@ index d2aaba85dcf63d357d521d017425318d79dbd16b..6927c27c62b5797b9b6fc3d05002a9e6
      IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck)
      IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
      IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
-@@ -1691,6 +1693,12 @@ bool RenderViewImpl::GetContentStateImmediately() {
+@@ -1698,6 +1700,12 @@ bool RenderViewImpl::GetContentStateImmediately() {
    return send_content_state_immediately_;
  }
  
@@ -87,10 +87,10 @@ index d2aaba85dcf63d357d521d017425318d79dbd16b..6927c27c62b5797b9b6fc3d05002a9e6
      PageVisibilityState visibility_state,
      bool initial_setting) {
 diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
-index 78fa09039c0458c9df3f6f93c28950a3ae1aa3ff..b12e78fa52c9ec80e388c40525f801857fa5521a 100644
+index 701aac4f7865097899b76ee8c37db6eb32672b33..9e4ef233ce1df822d08bef03bfa5bf48774e0c24 100644
 --- a/content/renderer/render_view_impl.h
 +++ b/content/renderer/render_view_impl.h
-@@ -415,6 +415,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
+@@ -413,6 +413,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
    void OnSetHistoryOffsetAndLength(int history_offset, int history_length);
    void OnSetRendererPrefs(
        const blink::mojom::RendererPreferences& renderer_prefs);
@@ -99,10 +99,10 @@ index 78fa09039c0458c9df3f6f93c28950a3ae1aa3ff..b12e78fa52c9ec80e388c40525f80185
    void OnUpdateTargetURLAck();
    void OnUpdateWebPreferences(const WebPreferences& prefs);
 diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
-index c2c079e51358696f18f8f4733bc904f9ac6f7ed6..3f11aa7cab36f45fd26ea0eb2babe6927f5b3539 100644
+index 406c19b10b2e97ba05b9b3eb5c1ac0831023b3e2..dcbaf84dceee74da60ae8cc5466e08db317e3543 100644
 --- a/third_party/blink/public/web/web_view.h
 +++ b/third_party/blink/public/web/web_view.h
-@@ -412,6 +412,7 @@ class WebView {
+@@ -402,6 +402,7 @@ class WebView {
    // Scheduling -----------------------------------------------------------
  
    virtual PageScheduler* Scheduler() const = 0;
@@ -111,10 +111,10 @@ index c2c079e51358696f18f8f4733bc904f9ac6f7ed6..3f11aa7cab36f45fd26ea0eb2babe692
    // 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 bcf5d6b07b2620ed71cff55927ff4a3326d85fa4..f25ee2578a49f5b8dc3db3d831b29d996031f273 100644
+index 43fc2bb2de690486b38061760edec4c64cc19c0b..cd94798b733c1ea12ca60666dbabd7058aa77393 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
-@@ -3354,12 +3354,20 @@ PageScheduler* WebViewImpl::Scheduler() const {
+@@ -3355,12 +3355,20 @@ PageScheduler* WebViewImpl::Scheduler() const {
    return GetPage()->GetPageScheduler();
  }
  
@@ -138,10 +138,10 @@ index bcf5d6b07b2620ed71cff55927ff4a3326d85fa4..f25ee2578a49f5b8dc3db3d831b29d99
  
  PageVisibilityState WebViewImpl::GetVisibilityState() {
 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 ea6325cccfe6274f41525fe586c05f8b7018307c..046a3b9ff1c378adb6d4b2610051271be8a1aa0b 100644
+index 60cfa746367a03d308f0f26fef05839ecd6420b2..5c2b7a3aafbd72567c413be42d4bdf9665a97a2e 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.h
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.h
-@@ -317,6 +317,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
+@@ -328,6 +328,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
    LocalDOMWindow* PagePopupWindow() const;
  
    PageScheduler* Scheduler() const override;
@@ -149,7 +149,7 @@ index ea6325cccfe6274f41525fe586c05f8b7018307c..046a3b9ff1c378adb6d4b2610051271b
    void SetVisibilityState(PageVisibilityState visibility_state,
                            bool is_initial_state) override;
    PageVisibilityState GetVisibilityState() override;
-@@ -686,6 +687,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
+@@ -696,6 +697,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
    // WebViewImpl::Close while handling an input event.
    bool debug_inside_input_handling_ = false;
  

+ 23 - 0
patches/chromium/fix_account_for_print_preview_disabled_when_printing_to_pdf.patch

@@ -0,0 +1,23 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Andy Locascio <[email protected]>
+Date: Thu, 2 Apr 2020 15:05:00 -0700
+Subject: fix: account for print preview disabled when printing to pdf
+
+Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2068936
+
+Avoid an optimization introduced in the above CL. In my limited
+understanding, it seems like we slightly misuse the print preview API
+and this is fallout from using it in a way the code doesn't expect.
+
+diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
+index 8350af471355b9c620d0c337545ce614974b5a6b..8456ec0c453345e5cab96728e501d341053d8cf2 100644
+--- a/components/printing/renderer/print_render_frame_helper.cc
++++ b/components/printing/renderer/print_render_frame_helper.cc
+@@ -1461,6 +1461,7 @@ PrintRenderFrameHelper::CreatePreviewDocument() {
+   const std::vector<int>& pages = print_pages_params_->pages;
+ 
+   bool require_document_metafile =
++      !g_is_preview_enabled ||
+       print_renderer_ ||
+       print_params.printed_doc_type != SkiaDocumentType::MSKP;
+   if (!print_preview_context_.CreatePreviewDocument(

+ 2 - 2
patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch

@@ -13,10 +13,10 @@ This patch can be removed once app.allowRendererProcessReuse is forced
 to true as then Chromiums assumptions around processes become correct.
 
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 6f2e0c12e7b4a2928346f6690c2e8a072822124b..d6cad38b1e0ca9aeb96eeaaf8b1bb39fc23893ea 100644
+index 552f4cf6e09855e9bc1ceecbdeb959dd85a1ce05..be2540b359525d3adbd8f4a37834566a71f150cb 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -2351,11 +2351,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
+@@ -2350,11 +2350,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
      WebContentsImpl* outermost = GetOutermostWebContents();
      if (event.button == blink::WebPointerProperties::Button::kBack &&
          outermost->controller_.CanGoBack()) {

+ 2 - 2
patches/chromium/fixme_grit_conflicts.patch

@@ -10,10 +10,10 @@ Should be removed once grit is fixed.
 Tracking bug: https://crbug.com/1040605
 
 diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
-index 9ca93ffa79d6fb8658d1d0f3581f91c229b737e0..4dbeb30632654ce6e65b0acd69a0526eae42cc54 100644
+index a598f84ff97bf3e687b4e32ad24532bd41fb937f..25f95ab7f7cbfa71adab97c35bf236526a45b6f0 100644
 --- a/tools/gritsettings/resource_ids.spec
 +++ b/tools/gritsettings/resource_ids.spec
-@@ -587,15 +587,16 @@
+@@ -588,15 +588,16 @@
      "includes": [3840],
    },
  

+ 12 - 12
patches/chromium/frame_host_manager.patch

@@ -42,10 +42,10 @@ index 906a1ee4ac58b0744a32153bbaafeac4322a60e4..c90f4aead36cbf3767dc5094728963c2
    // another SiteInstance for the same site.
    void RegisterSiteInstance(SiteInstanceImpl* site_instance);
 diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
-index dbfc24395349cfa40b5783590d60cc7e44b31205..499af1cdcf13cf57f97a0c28430cbe874c8ed7e7 100644
+index a0225751ed6f881e8f7b4e7233282ff2e8aeaac7..22f49e6f6c779adc929ee173591d7f5355bfe457 100644
 --- a/content/browser/frame_host/navigation_request.cc
 +++ b/content/browser/frame_host/navigation_request.cc
-@@ -1257,6 +1257,24 @@ void NavigationRequest::BeginNavigation() {
+@@ -1259,6 +1259,24 @@ void NavigationRequest::BeginNavigation() {
      // it immediately.
      EnterChildTraceEvent("ResponseStarted", this);
  
@@ -71,10 +71,10 @@ index dbfc24395349cfa40b5783590d60cc7e44b31205..499af1cdcf13cf57f97a0c28430cbe87
      render_frame_host_ =
          frame_tree_node_->render_manager()->GetFrameHostForNavigation(this);
 diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
-index 083dc2c8314e631329bfe81d1120d35fd3c9bfb6..dce5d1e96276dccddde3c3b3d10373fc443d1f9f 100644
+index 50533c338dd75f606ba542813cfe724301ad6527..d18482d9a934ea5fd10035328be540ba89af7441 100644
 --- a/content/browser/frame_host/render_frame_host_manager.cc
 +++ b/content/browser/frame_host/render_frame_host_manager.cc
-@@ -2335,6 +2335,16 @@ bool RenderFrameHostManager::InitRenderView(
+@@ -2392,6 +2392,16 @@ bool RenderFrameHostManager::InitRenderView(
  scoped_refptr<SiteInstance>
  RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
      NavigationRequest* request) {
@@ -91,7 +91,7 @@ index 083dc2c8314e631329bfe81d1120d35fd3c9bfb6..dce5d1e96276dccddde3c3b3d10373fc
    SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
  
    // All children of MHTML documents must be MHTML documents. They all live in
-@@ -2354,10 +2364,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -2411,10 +2421,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
    //
    // TODO(clamy): We should also consider as a candidate SiteInstance the
    // speculative SiteInstance that was computed on redirects.
@@ -156,7 +156,7 @@ index 083dc2c8314e631329bfe81d1120d35fd3c9bfb6..dce5d1e96276dccddde3c3b3d10373fc
  
    // Account for renderer-initiated reload as well.
    // Needed as a workaround for https://crbug.com/1045524, remove it when it is
-@@ -2398,6 +2458,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -2455,6 +2515,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
        request->dest_site_instance() != dest_site_instance) {
      request->ResetStateForSiteInstanceChange();
    }
@@ -166,10 +166,10 @@ index 083dc2c8314e631329bfe81d1120d35fd3c9bfb6..dce5d1e96276dccddde3c3b3d10373fc
    return dest_site_instance;
  }
 diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
-index 9dbc9bb7114e1dea5e8a24395f39bd9d068eeb76..31bddf69f2e805451d42d1a284a53f41bdaa5650 100644
+index c1eb23c23901158410f224baebf7786b97e6df6b..d1a1aee132d8ecce9892477addd39a35de6ef9ee 100644
 --- a/content/browser/site_instance_impl.cc
 +++ b/content/browser/site_instance_impl.cc
-@@ -426,6 +426,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
+@@ -456,6 +456,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
    return browsing_instance_->HasSiteInstance(url);
  }
  
@@ -181,7 +181,7 @@ index 9dbc9bb7114e1dea5e8a24395f39bd9d068eeb76..31bddf69f2e805451d42d1a284a53f41
      const GURL& url) {
    return browsing_instance_->GetSiteInstanceForURL(
 diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
-index caa100b3889e17a9afdc8127e0e13bb6b86e8042..f08d3a2eb28f0f6fff89b5759eff5369b7111821 100644
+index 85288dac0acfb51330669cd87cfc0343af3dfd2c..3bb39459fd3c87a0968044e02d684f6b777935bb 100644
 --- a/content/browser/site_instance_impl.h
 +++ b/content/browser/site_instance_impl.h
 @@ -98,6 +98,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
@@ -193,7 +193,7 @@ index caa100b3889e17a9afdc8127e0e13bb6b86e8042..f08d3a2eb28f0f6fff89b5759eff5369
    size_t GetRelatedActiveContentsCount() override;
    bool RequiresDedicatedProcess() override;
 diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
-index 0520b0b7d4144666b95dc2bfd25c0b0ae5892bfe..384812677668fb487cdfed2c7ad898e3591e1022 100644
+index f996a9a132a325a9a614f475024b612f32ace333..bc13d009f80df371159c5b010aa0620f724164bb 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
 @@ -58,6 +58,21 @@
@@ -219,10 +219,10 @@ index 0520b0b7d4144666b95dc2bfd25c0b0ae5892bfe..384812677668fb487cdfed2c7ad898e3
      const MainFunctionParams& parameters) {
    return nullptr;
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index 8ae9b370cf842a4c6d95d96d94f8b2d7a2122966..7da056827a8ed77de708b8a378dcdccf0c98bb1a 100644
+index a11e1a1abc9d4ded6cdc87f99d4e3d19ee0e2af5..3df1fe77b9551b99509621e6a5e092b268d2c8e1 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
-@@ -231,8 +231,45 @@ class CONTENT_EXPORT ContentBrowserClient {
+@@ -233,8 +233,45 @@ class CONTENT_EXPORT ContentBrowserClient {
    using IsClipboardPasteAllowedCallback =
        base::OnceCallback<void(ClipboardPasteAllowed)>;
  

+ 19 - 19
patches/chromium/gpu_notify_when_dxdiag_request_fails.patch

@@ -12,23 +12,23 @@ rendering and there is no signal from browser process on this event
 to identify it.
 
 diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
-index bf76db245cb4a9de24500c74f415c5ab23c64ce4..2dbd8e485c5138101921972d632a67d934120c16 100644
+index ba01477a3deea383f538adfe519bc53154df3321..441010b3e5cbe70f49e8aece3120dc24bd41e43c 100644
 --- a/content/browser/gpu/gpu_data_manager_impl.cc
 +++ b/content/browser/gpu/gpu_data_manager_impl.cc
-@@ -146,6 +146,11 @@ bool GpuDataManagerImpl::Dx12VulkanRequested() const {
-   base::AutoLock auto_lock(lock_);
+@@ -147,6 +147,11 @@ bool GpuDataManagerImpl::Dx12VulkanRequested() const {
    return private_->Dx12VulkanRequested();
  }
-+
+ 
 +bool GpuDataManagerImpl::DxdiagDx12VulkanRequested() const {
 +  base::AutoLock auto_lock(lock_);
 +  return private_->DxdiagDx12VulkanRequested();
 +}
- #endif
- 
- void GpuDataManagerImpl::UpdateGpuFeatureInfo(
++
+ void GpuDataManagerImpl::OnBrowserThreadsStarted() {
+   base::AutoLock auto_lock(lock_);
+   private_->OnBrowserThreadsStarted();
 diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
-index 917b55d4dd0f2a5e8de8267d27f094e13b2935c1..934e52d29ac545e61945504576a421befe70d033 100644
+index c5515870a1dcf017b3477d890510a672e82e00e3..436a16a581f5d39bd64e0101d2c0e59d5f8a4dc6 100644
 --- a/content/browser/gpu/gpu_data_manager_impl.h
 +++ b/content/browser/gpu/gpu_data_manager_impl.h
 @@ -87,6 +87,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
@@ -36,27 +36,27 @@ index 917b55d4dd0f2a5e8de8267d27f094e13b2935c1..934e52d29ac545e61945504576a421be
    void UpdateDx12VulkanRequestStatus(bool request_continues);
    bool Dx12VulkanRequested() const;
 +  bool DxdiagDx12VulkanRequested() const;
+   // Called from BrowserMainLoop::BrowserThreadsStarted().
+   void OnBrowserThreadsStarted();
  #endif
-   // Update the GPU feature info. This updates the blacklist and enabled status
-   // of GPU rasterization. In the future this will be used for more features.
 diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
-index 3dfda3d93904d9eb323dae585404e7c4c46f84c2..5a76ff6f0b792e16a7ba1517ec2f91cb8755113f 100644
+index aae01a85f5d37d4c8e809815540662dee1550dbc..c70dbbc6ec1fc460f8a1f95613dbf1a65482f4f4 100644
 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
 +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
-@@ -890,6 +890,11 @@ void GpuDataManagerImplPrivate::UpdateDx12VulkanRequestStatus(
- bool GpuDataManagerImplPrivate::Dx12VulkanRequested() const {
+@@ -885,6 +885,11 @@ bool GpuDataManagerImplPrivate::Dx12VulkanRequested() const {
    return gpu_info_dx12_vulkan_requested_;
  }
-+
+ 
 +bool GpuDataManagerImplPrivate::DxdiagDx12VulkanRequested() const {
 +  return !(gpu_info_dx12_vulkan_request_failed_ ||
 +           gpu_info_dx_diag_request_failed_);
 +}
- #endif
- 
- void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo(
++
+ void GpuDataManagerImplPrivate::OnBrowserThreadsStarted() {
+   // Launch the info collection GPU process to collect DX12 and Vulkan support
+   // information. Not to affect Chrome startup, this is done in a delayed mode,
 diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
-index dc1f2a69a5ed25a1067c442528725864a53cd891..f617fef81a34499dcbcee2ac1cc9382fda8e8981 100644
+index 6a082f73e77d9f5e7630cc4dbc18188c7e565c0b..1468b5a9a469e9fa9f9911dc4ca9eb91a20b5cad 100644
 --- a/content/browser/gpu/gpu_data_manager_impl_private.h
 +++ b/content/browser/gpu/gpu_data_manager_impl_private.h
 @@ -70,6 +70,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
@@ -64,6 +64,6 @@ index dc1f2a69a5ed25a1067c442528725864a53cd891..f617fef81a34499dcbcee2ac1cc9382f
    void UpdateDxDiagNodeRequestStatus(bool request_continues);
    bool Dx12VulkanRequested() const;
 +  bool DxdiagDx12VulkanRequested() const;
+   void OnBrowserThreadsStarted();
  #endif
    void UpdateGpuFeatureInfo(const gpu::GpuFeatureInfo& gpu_feature_info,
-                             const base::Optional<gpu::GpuFeatureInfo>&

+ 2 - 2
patches/chromium/gritsettings_resource_ids.patch

@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
 Add electron resources file to the list of resource ids generation.
 
 diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
-index f8e27f6df77302a9af952493ebf946349466225e..9ca93ffa79d6fb8658d1d0f3581f91c229b737e0 100644
+index 730e3209ec954e85cf56ea1edf3e63ea603fa5fc..a598f84ff97bf3e687b4e32ad24532bd41fb937f 100644
 --- a/tools/gritsettings/resource_ids.spec
 +++ b/tools/gritsettings/resource_ids.spec
-@@ -593,6 +593,11 @@
+@@ -594,6 +594,11 @@
      "includes": [3860],
    },
  

+ 7 - 7
patches/chromium/gtk_visibility.patch

@@ -6,15 +6,15 @@ Subject: gtk_visibility.patch
 Allow electron to depend on GTK in the GN build.
 
 diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn
-index 27cf4bb38f8d902927338e29e6e57c688eb77172..55a9dfe48421a8308acf945b2db5344e3a5173fb 100644
+index 8bfa5592441136ae13b97187682fdd10864a54e1..6e3a02ad3f3d8881a9f0a9b7f8ed13383eafde1f 100644
 --- a/build/config/linux/gtk/BUILD.gn
 +++ b/build/config/linux/gtk/BUILD.gn
-@@ -24,6 +24,8 @@ group("gtk") {
-   visibility = [
-     # This is the only target in Chrome that should depend on GTK.
-     "//chrome/browser/ui/gtk:*",
-+  
-+    "//electron:*",
+@@ -25,6 +25,8 @@ group("gtk") {
+     # This is the only target that should depend on GTK.
+     "//ui/gtk:*",
  
++    "//electron:*",
++
      # These are all for WebRTC.
      "//examples:peerconnection_client",
+     "//remoting/host/linux",

+ 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 1c9aeb8fa71d054159c2ccccccbe57aa474d417e..0bd6412f2c79f77f936720b1a0795b50ecefd26c 100644
+index 447dfa6f021ccba87d757f535f566fa3327aa7cd..090ea06708609f18750025b7895d6d97239f7fec 100644
 --- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
 +++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
 @@ -8,8 +8,8 @@

+ 11 - 11
patches/chromium/mas_disable_remote_accessibility.patch

@@ -90,7 +90,7 @@ index a8e5c8888cb7ea8a85de7c8e8c613cc2b3c5be15..d01468fe77703b2812865b0198b84b0b
    DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostNSViewBridgeOwner);
  };
 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 83c74b6245981863546295b5ce405fe3770671b6..82bc8415235357bfe78f67492e3406884fc5ff8c 100644
+index 0d8a8e14328be49407d35908bacadd92182dae31..86602419d16667ff002333f848abcd77322c1045 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.h
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.h
 @@ -46,7 +46,9 @@ class ScopedPasswordInputEnabler;
@@ -103,7 +103,7 @@ index 83c74b6245981863546295b5ce405fe3770671b6..82bc8415235357bfe78f67492e340688
  @class RenderWidgetHostViewCocoa;
  
  namespace content {
-@@ -617,10 +619,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
+@@ -618,10 +620,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
    // EnsureSurfaceSynchronizedForWebTest().
    uint32_t latest_capture_sequence_number_ = 0u;
  
@@ -117,7 +117,7 @@ index 83c74b6245981863546295b5ce405fe3770671b6..82bc8415235357bfe78f67492e340688
    // 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 c8b9491aa61f0fccff6b83aaf6a77ec20c5606dc..7f638d6881d6934bcff85c88804e130677ea9711 100644
+index 6c8313f7e09be253528ca83727b78152a17229c8..f293a15c6145422707c22aeb5a254ad71a31900c 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
 @@ -231,8 +231,10 @@
@@ -131,7 +131,7 @@ index c8b9491aa61f0fccff6b83aaf6a77ec20c5606dc..7f638d6881d6934bcff85c88804e1306
  
    // Disconnect from the previous bridge (this will have the effect of
    // destroying the associated bridge), and close the receiver (to allow it
-@@ -1338,8 +1340,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1348,8 +1350,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  
  gfx::NativeViewAccessible
  RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -142,7 +142,7 @@ index c8b9491aa61f0fccff6b83aaf6a77ec20c5606dc..7f638d6881d6934bcff85c88804e1306
    return [GetInProcessNSView() window];
  }
  
-@@ -1371,9 +1375,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1381,9 +1385,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  }
  
  void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -154,7 +154,7 @@ index c8b9491aa61f0fccff6b83aaf6a77ec20c5606dc..7f638d6881d6934bcff85c88804e1306
  }
  
  bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
-@@ -1856,12 +1862,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1870,12 +1876,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  
  void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
      const std::vector<uint8_t>& window_token) {
@@ -170,10 +170,10 @@ index c8b9491aa61f0fccff6b83aaf6a77ec20c5606dc..7f638d6881d6934bcff85c88804e1306
  
  ///////////////////////////////////////////////////////////////////////////////
 diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
-index 33b8a3bb7fae6941f0aa7af47aa048ac4a932b8f..49a7edc01183813d7411494a60c8dc1569961368 100644
+index 33be56acd4411a61d666c06049c10d11fb7fd10a..3765e1910ae2d314db2b5f6984b2428ecd424955 100644
 --- a/ui/base/BUILD.gn
 +++ b/ui/base/BUILD.gn
-@@ -299,6 +299,13 @@ jumbo_component("base") {
+@@ -301,6 +301,13 @@ jumbo_component("base") {
      ]
    }
  
@@ -208,10 +208,10 @@ index 2a58aebabb23443a2c11364af4988c573f3909ba..3424b6011e80e9c995519b6a8d652abd
 +
  #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 1c68117a8987463e810d0d1da5e7e598ce8fc3e1..ad29e87c00db0d34ee3a7d95469fb3fbb1aa76c2 100644
+index 06427b2009ceb2cecf39d783fd1c3477cd5e66f9..1a2cd7a0e52e6345472f29283dfe94be506a338a 100644
 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
 +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
-@@ -27,7 +27,9 @@
+@@ -29,7 +29,9 @@
  #include "ui/views/window/dialog_observer.h"
  
  @class NativeWidgetMacNSWindow;
@@ -221,7 +221,7 @@ index 1c68117a8987463e810d0d1da5e7e598ce8fc3e1..ad29e87c00db0d34ee3a7d95469fb3fb
  @class NSView;
  
  namespace remote_cocoa {
-@@ -406,11 +408,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
+@@ -408,11 +410,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
    mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
        remote_ns_window_remote_;
  

+ 26 - 26
patches/chromium/mas_no_private_api.patch

@@ -50,7 +50,7 @@ index 5124b17f020849671a7f03d92bda052eff84d169..f9730f71c122965f7ce7815a1b9a7b32
  // is concerned.
  @property(nonatomic, readonly) NSString* subrole;
 diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
-index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d5f902d3f 100644
+index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe7736531da80c6 100644
 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm
 +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
 @@ -206,6 +206,7 @@
@@ -124,7 +124,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
        {NSAccessibilitySizeAttribute, @"size"},
        {NSAccessibilitySortDirectionAttribute, @"sortDirection"},
        {NSAccessibilitySubroleAttribute, @"subrole"},
-@@ -1308,6 +1320,7 @@ - (NSNumber*)enabled {
+@@ -1306,6 +1318,7 @@ - (NSNumber*)enabled {
                                    ax::mojom::Restriction::kDisabled];
  }
  
@@ -132,7 +132,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
  // Returns a text marker that points to the last character in the document that
  // can be selected with VoiceOver.
  - (id)endTextMarker {
-@@ -1318,6 +1331,7 @@ - (id)endTextMarker {
+@@ -1316,6 +1329,7 @@ - (id)endTextMarker {
    BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
    return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
  }
@@ -140,7 +140,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
  
  - (NSNumber*)expanded {
    if (![self instanceActive])
-@@ -1467,6 +1481,8 @@ - (NSNumber*)index {
+@@ -1465,6 +1479,8 @@ - (NSNumber*)index {
    return nil;
  }
  
@@ -149,7 +149,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
  - (NSNumber*)insertionPointLineNumber {
    if (![self instanceActive])
      return nil;
-@@ -1489,6 +1505,7 @@ - (NSNumber*)insertionPointLineNumber {
+@@ -1487,6 +1503,7 @@ - (NSNumber*)insertionPointLineNumber {
                         caretPosition->AsTextPosition()->text_offset());
    return @(std::distance(lineBreaks.begin(), iterator));
  }
@@ -157,7 +157,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
  
  // Returns whether or not this node should be ignored in the
  // accessibility tree.
-@@ -2166,6 +2183,7 @@ - (NSArray*)selectedChildren {
+@@ -2164,6 +2181,7 @@ - (NSArray*)selectedChildren {
    return ret;
  }
  
@@ -165,7 +165,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
  - (NSString*)selectedText {
    if (![self instanceActive])
      return nil;
-@@ -2177,11 +2195,13 @@ - (NSString*)selectedText {
+@@ -2175,11 +2193,13 @@ - (NSString*)selectedText {
      return nil;
    return base::SysUTF16ToNSString(range.GetText());
  }
@@ -179,7 +179,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
  - (NSValue*)selectedTextRange {
    if (![self instanceActive])
      return nil;
-@@ -2202,12 +2222,15 @@ - (NSValue*)selectedTextRange {
+@@ -2200,12 +2220,15 @@ - (NSValue*)selectedTextRange {
    int selLength = range.GetText().length();
    return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
  }
@@ -195,7 +195,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
  
  - (NSValue*)size {
    if (![self instanceActive])
-@@ -2240,6 +2263,7 @@ - (NSString*)sortDirection {
+@@ -2238,6 +2261,7 @@ - (NSString*)sortDirection {
    return nil;
  }
  
@@ -203,7 +203,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
  // Returns a text marker that points to the first character in the document that
  // can be selected with VoiceOver.
  - (id)startTextMarker {
-@@ -2250,6 +2274,7 @@ - (id)startTextMarker {
+@@ -2248,6 +2272,7 @@ - (id)startTextMarker {
    BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
    return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
  }
@@ -211,21 +211,21 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
  
  // Returns a subrole based upon the role.
  - (NSString*)subrole {
-@@ -2570,11 +2595,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
-   NSMutableAttributedString* attributedValue =
-       [[[NSMutableAttributedString alloc] initWithString:value] autorelease];
- 
+@@ -2573,11 +2598,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
+   NSMutableAttributedString* attributedInnerText =
+       [[[NSMutableAttributedString alloc]
+           initWithString:base::SysUTF16ToNSString(innerText)] autorelease];
 +#ifndef MAS_BUILD
    if (!_owner->IsTextOnlyObject()) {
      AXPlatformRange ax_range(_owner->CreatePositionAt(0),
-                              _owner->CreatePositionAt(int{text.length()}));
-     AddMisspelledTextAttributes(ax_range, attributedValue);
+                              _owner->CreatePositionAt(int{innerText.length()}));
+     AddMisspelledTextAttributes(ax_range, attributedInnerText);
    }
 +#endif
  
-   return [attributedValue attributedSubstringFromRange:range];
+   return [attributedInnerText attributedSubstringFromRange:range];
  }
-@@ -2677,9 +2704,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
+@@ -2681,9 +2708,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
        return ToBrowserAccessibilityCocoa(cell);
    }
  
@@ -237,7 +237,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
      BrowserAccessibilityPositionInstance position =
          CreatePositionFromTextMarker(parameter);
      if (!position->IsNullPosition())
-@@ -2990,6 +3016,7 @@ AXPlatformRange range(std::move(lineStartPosition),
+@@ -2996,6 +3022,7 @@ AXPlatformRange range(std::move(lineStartPosition),
  
      return CreateTextMarker(root->CreatePositionAt(index));
    }
@@ -245,7 +245,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
  
    if ([attribute isEqualToString:
                       NSAccessibilityBoundsForRangeParameterizedAttribute]) {
-@@ -3025,6 +3052,7 @@ AXPlatformRange range(std::move(lineStartPosition),
+@@ -3031,6 +3058,7 @@ AXPlatformRange range(std::move(lineStartPosition),
      return nil;
    }
  
@@ -253,7 +253,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
    if ([attribute
            isEqualToString:
                NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
-@@ -3139,6 +3167,7 @@ AXPlatformRange range(std::move(lineStartPosition),
+@@ -3145,6 +3173,7 @@ AXPlatformRange range(std::move(lineStartPosition),
  
      return @(child->GetIndexInParent());
    }
@@ -262,10 +262,10 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
    return nil;
  }
 diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
-index 292d3ed82bf5cc6fdfbda2b05fb211afff5f0b69..5bdacb75ddafd56901d298993d71d772f0f51c0d 100644
+index 8e8b6b785ed6e2831f107e925c387f723f55a8fc..33324bbca5953f6f2f9d829e4c7b5d7daa3f49ea 100644
 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
 +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
-@@ -531,6 +531,7 @@ void PostAnnouncementNotification(NSString* announcement) {
+@@ -534,6 +534,7 @@ void PostAnnouncementNotification(NSString* announcement) {
        [user_info setObject:native_focus_object
                      forKey:NSAccessibilityTextChangeElement];
  
@@ -273,7 +273,7 @@ index 292d3ed82bf5cc6fdfbda2b05fb211afff5f0b69..5bdacb75ddafd56901d298993d71d772
        id selected_text = [native_focus_object selectedTextMarkerRange];
        if (selected_text) {
          NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
-@@ -538,6 +539,7 @@ void PostAnnouncementNotification(NSString* announcement) {
+@@ -541,6 +542,7 @@ void PostAnnouncementNotification(NSString* announcement) {
          [user_info setObject:selected_text
                        forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
        }
@@ -358,10 +358,10 @@ index 7c018cce2c2d9981c94e91e5d97cff0d37548b13..cfb0fb20c81f908caac9933b820e40e0
  
  void BluetoothAdapterMac::RemovePairingDelegateInternal(
 diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
-index a86080cf72d23cc6004547dfaad0e4ae65a60412..230954f574802a9692c723190cba3c8325ce1ad1 100644
+index 5acdb011a1f232569b43ba2f08a21f44b3c40151..9fca5b2e8c714308a404750cc9fc64dcaffa91cc 100644
 --- a/media/audio/BUILD.gn
 +++ b/media/audio/BUILD.gn
-@@ -173,6 +173,12 @@ source_set("audio") {
+@@ -171,6 +171,12 @@ source_set("audio") {
        "mac/scoped_audio_unit.cc",
        "mac/scoped_audio_unit.h",
      ]

+ 13 - 13
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 05bd6dc34b94bff0cfa828692e50e01a80a5759d..04463f777467a9f3ff6a9959d490d79c2e472c69 100644
+index 5e37a45a033a5a01ea70d867c4fd2f50f4fd4072..d0d646a42b3ee27f848dd0a47179e8f573e51d8f 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
-@@ -99,6 +99,11 @@
+@@ -104,6 +104,11 @@
  #include "services/network/url_loader.h"
  #include "services/network/url_request_context_builder_mojo.h"
  
@@ -22,7 +22,7 @@ index 05bd6dc34b94bff0cfa828692e50e01a80a5759d..04463f777467a9f3ff6a9959d490d79c
  #if BUILDFLAG(IS_CT_SUPPORTED)
  #include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
  #include "components/certificate_transparency/chrome_require_ct_delegate.h"
-@@ -355,6 +360,79 @@ bool UsingBuiltinCertVerifier(
+@@ -354,6 +359,79 @@ bool UsingBuiltinCertVerifier(
  
  }  // namespace
  
@@ -102,7 +102,7 @@ index 05bd6dc34b94bff0cfa828692e50e01a80a5759d..04463f777467a9f3ff6a9959d490d79c
  constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
  
  NetworkContext::PendingCertVerify::PendingCertVerify() = default;
-@@ -523,6 +601,13 @@ void NetworkContext::SetClient(
+@@ -522,6 +600,13 @@ void NetworkContext::SetClient(
    client_.Bind(std::move(client));
  }
  
@@ -116,7 +116,7 @@ index 05bd6dc34b94bff0cfa828692e50e01a80a5759d..04463f777467a9f3ff6a9959d490d79c
  void NetworkContext::CreateURLLoaderFactory(
      mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
      mojom::URLLoaderFactoryParamsPtr params) {
-@@ -1686,6 +1771,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
+@@ -1696,6 +1781,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
        base::CommandLine::ForCurrentProcess();
  
    std::unique_ptr<net::CertVerifier> cert_verifier;
@@ -124,7 +124,7 @@ index 05bd6dc34b94bff0cfa828692e50e01a80a5759d..04463f777467a9f3ff6a9959d490d79c
    if (g_cert_verifier_for_testing) {
      cert_verifier = std::make_unique<WrappedTestingCertVerifier>();
    } else {
-@@ -1734,8 +1820,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
+@@ -1744,8 +1830,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
      }
  #endif
  #if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED)
@@ -135,7 +135,7 @@ index 05bd6dc34b94bff0cfa828692e50e01a80a5759d..04463f777467a9f3ff6a9959d490d79c
            std::make_unique<net::CoalescingCertVerifier>(
                std::make_unique<net::MultiThreadedCertVerifier>(
                    UsingBuiltinCertVerifier(params_->use_builtin_cert_verifier)
-@@ -1745,12 +1831,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
+@@ -1755,12 +1841,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
                              cert_net_fetcher_))));
      }
  #endif
@@ -160,7 +160,7 @@ index 05bd6dc34b94bff0cfa828692e50e01a80a5759d..04463f777467a9f3ff6a9959d490d79c
    std::unique_ptr<NetworkServiceNetworkDelegate> network_delegate =
        std::make_unique<NetworkServiceNetworkDelegate>(
 diff --git a/services/network/network_context.h b/services/network/network_context.h
-index 8e52d22f5775fa727dd67e98bcf89caf5cfcd22e..2cc0dc76a55026dea5db962df8c79bf85754912d 100644
+index 00f14ca8448be93c1d4ed91db3d68a1297adc728..9d201f1a5ef0eaf3f8b42cbb3d2593dbd068bdd6 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
 @@ -84,6 +84,7 @@ class DomainReliabilityMonitor;
@@ -171,7 +171,7 @@ index 8e52d22f5775fa727dd67e98bcf89caf5cfcd22e..2cc0dc76a55026dea5db962df8c79bf8
  class CookieManager;
  class ExpectCTReporter;
  class HostResolver;
-@@ -186,6 +187,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -183,6 +184,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
    void CreateURLLoaderFactory(
        mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
        mojom::URLLoaderFactoryParamsPtr params) override;
@@ -180,7 +180,7 @@ index 8e52d22f5775fa727dd67e98bcf89caf5cfcd22e..2cc0dc76a55026dea5db962df8c79bf8
    void ResetURLLoaderFactories() override;
    void GetCookieManager(
        mojo::PendingReceiver<mojom::CookieManager> receiver) override;
-@@ -653,6 +656,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -646,6 +649,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
    std::unique_ptr<network::NSSTempCertsCacheChromeOS> nss_temp_certs_cache_;
  #endif
  
@@ -190,10 +190,10 @@ index 8e52d22f5775fa727dd67e98bcf89caf5cfcd22e..2cc0dc76a55026dea5db962df8c79bf8
    // CertNetFetcher is not used by the current platform.
    scoped_refptr<net::CertNetFetcherURLRequest> cert_net_fetcher_;
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index b74677de805cc6f46c34b79883e0500ba337d82a..1d9ffd3de180e3256fb63a497544feeb427ae7ff 100644
+index 9515fe92e0b1965285435f10817cdb07286dbe5e..96ba4d67bcdefef44ecd246acb883824c9e842d6 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -193,6 +193,17 @@ struct HttpAuthStaticNetworkContextParams {
+@@ -159,6 +159,17 @@ struct HttpAuthStaticNetworkContextParams {
       = DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS;
  };
  
@@ -211,7 +211,7 @@ index b74677de805cc6f46c34b79883e0500ba337d82a..1d9ffd3de180e3256fb63a497544feeb
  // Parameters for constructing a network context.
  struct NetworkContextParams {
    // Name used by memory tools to identify the context.
-@@ -845,6 +856,9 @@ interface NetworkContext {
+@@ -815,6 +826,9 @@ interface NetworkContext {
    // Sets a client for this network context.
    SetClient(pending_remote<NetworkContextClient> client);
  

+ 2 - 2
patches/chromium/notification_provenance.patch

@@ -108,10 +108,10 @@ index 4bf25bf1fa69f7d3869369172d375e2e489e62a1..f80ef2cecc8b111dc54e109646573a59
        mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
  
 diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
-index 22ff7354f692993b58d0a5b6b28f30f694a39d0b..60d0aab5416cb237c6de5013a6724fdb95a5422e 100644
+index 8d00b84a00615b456ecb31c836e873297c2966ee..9455ee13834bff4e2ff8a0f9b31b95289a70d854 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -2082,7 +2082,7 @@ void RenderProcessHostImpl::CreateNotificationService(
+@@ -2109,7 +2109,7 @@ void RenderProcessHostImpl::CreateNotificationService(
      mojo::PendingReceiver<blink::mojom::NotificationService> receiver) {
    DCHECK_CURRENTLY_ON(BrowserThread::UI);
    storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

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

@@ -35,7 +35,7 @@ index e9b64a823ae7e25361f37190d247af0fa6a6f68a..43fdb0ad50d2b11a1bc28aa0f358c6dd
  #include "ui/base/l10n/l10n_util.h"
  #include "ui/gfx/color_palette.h"
 diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
-index 4af5ead7df57e26ceb64ab909c4dc2de86ccfc41..294e6c08975fae62ca8dbe9e471f39a5adbf03e3 100644
+index baf717117f81bbf76a99c0464c7b889d6ef56e31..1a97776018375b2017e56bc787e406e67f2539b5 100644
 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
 +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
 @@ -19,7 +19,7 @@

+ 15 - 36
patches/chromium/printing.patch

@@ -63,7 +63,7 @@ index 33e17f0df3563726767d912fb828ab959c8ec252..780967949746cbe957cd7b3487507892
  }
  
 diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
-index f008ef9a25feda763d7a5a169aae0f47bf2dc347..b3dd9836e452947c21aa404d1c24ac10a66474ab 100644
+index 3378f34bd8e3b1cf8156e86d0e9bea97120c101e..c7c611486b158095c10db7d8e425635ed323b7db 100644
 --- a/chrome/browser/printing/print_view_manager_base.cc
 +++ b/chrome/browser/printing/print_view_manager_base.cc
 @@ -27,10 +27,7 @@
@@ -406,10 +406,10 @@ index 3695656560c54b5aa1fb08fb5e7c17d54989c597..85ffa5704d8dea809e80b1993c7c852f
    // Tells the RenderFrame to switch the CSS to print media type, render every
    // requested page using the print preview document's frame/node, and then
 diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
-index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846b5e4c0f3 100644
+index 3eb237c833300fdf8707a610616989a805133be4..8350af471355b9c620d0c337545ce614974b5a6b 100644
 --- a/components/printing/renderer/print_render_frame_helper.cc
 +++ b/components/printing/renderer/print_render_frame_helper.cc
-@@ -41,6 +41,7 @@
+@@ -40,6 +40,7 @@
  #include "printing/buildflags/buildflags.h"
  #include "printing/metafile_skia.h"
  #include "printing/printing_features.h"
@@ -417,7 +417,7 @@ index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846
  #include "printing/units.h"
  #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
  #include "third_party/blink/public/common/frame/frame_owner_element_type.h"
-@@ -1136,7 +1137,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
+@@ -1145,7 +1146,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
      web_frame->DispatchBeforePrintEvent();
      if (!weak_this)
        return;
@@ -427,7 +427,7 @@ index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846
      if (weak_this)
        web_frame->DispatchAfterPrintEvent();
    }
-@@ -1157,7 +1159,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
+@@ -1166,7 +1168,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
    receivers_.Add(this, std::move(receiver));
  }
  
@@ -436,7 +436,7 @@ index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846
    ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
    if (ipc_nesting_level_ > 1)
      return;
-@@ -1171,7 +1173,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
+@@ -1180,7 +1182,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
    // If we are printing a PDF extension frame, find the plugin node and print
    // that instead.
    auto plugin = delegate_->GetPdfElement(frame);
@@ -445,7 +445,7 @@ index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846
    if (!render_frame_gone_)
      frame->DispatchAfterPrintEvent();
    // WARNING: |this| may be gone at this point. Do not do any more work here and
-@@ -1188,7 +1190,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
+@@ -1197,7 +1199,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
      return;
    }
    Print(frame, print_preview_context_.source_node(),
@@ -454,7 +454,7 @@ index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846
    if (!render_frame_gone_)
      frame->DispatchAfterPrintEvent();
    // WARNING: |this| may be gone at this point. Do not do any more work here and
-@@ -1228,6 +1230,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
+@@ -1237,6 +1239,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
    if (ipc_nesting_level_ > 1)
      return;
  
@@ -463,28 +463,7 @@ index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846
    print_preview_context_.OnPrintPreview();
  
    base::UmaHistogramEnumeration(print_preview_context_.IsForArc()
-@@ -1585,13 +1589,13 @@ bool PrintRenderFrameHelper::FinalizePrintReadyDocument() {
-       print_preview_context_.set_error(PREVIEW_ERROR_METAFILE_CAPTURE_FAILED);
-       return false;
-     }
--  } else {
--    if (!CopyMetafileDataToReadOnlySharedMem(*metafile,
--                                             &preview_params.content)) {
--      LOG(ERROR) << "CopyMetafileDataToReadOnlySharedMem failed";
--      print_preview_context_.set_error(PREVIEW_ERROR_METAFILE_COPY_FAILED);
--      return false;
--    }
-+  }
-+
-+  if (!CopyMetafileDataToReadOnlySharedMem(*metafile,
-+                                           &preview_params.content)) {
-+    LOG(ERROR) << "CopyMetafileDataToReadOnlySharedMem failed";
-+    print_preview_context_.set_error(PREVIEW_ERROR_METAFILE_COPY_FAILED);
-+    return false;
-   }
- 
-   preview_params.document_cookie = print_pages_params_->params.document_cookie;
-@@ -1726,7 +1730,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -1736,7 +1740,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
  
      auto self = weak_ptr_factory_.GetWeakPtr();
      Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@@ -495,7 +474,7 @@ index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846
      // Check if |this| is still valid.
      if (!self)
        return;
-@@ -1737,7 +1743,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -1747,7 +1753,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
  
  void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
                                     const blink::WebNode& node,
@@ -506,7 +485,7 @@ index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846
    // If still not finished with earlier print request simply ignore.
    if (prep_frame_view_)
      return;
-@@ -1745,7 +1753,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -1755,7 +1763,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
    FrameReference frame_ref(frame);
  
    int expected_page_count = 0;
@@ -515,7 +494,7 @@ index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846
      DidFinishPrinting(FAIL_PRINT_INIT);
      return;  // Failed to init print page settings.
    }
-@@ -1765,8 +1773,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -1775,8 +1783,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
  
      PrintMsg_PrintPages_Params print_settings;
      auto self = weak_ptr_factory_.GetWeakPtr();
@@ -529,7 +508,7 @@ index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846
      // Check if |this| is still valid.
      if (!self)
        return;
-@@ -2001,10 +2012,23 @@ void PrintRenderFrameHelper::IPCProcessed() {
+@@ -2011,10 +2022,23 @@ void PrintRenderFrameHelper::IPCProcessed() {
      base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
  }
  
@@ -556,7 +535,7 @@ index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846
    // Check if the printer returned any settings, if the settings is empty, we
    // can safely assume there are no printer drivers configured. So we safely
    // terminate.
-@@ -2024,12 +2048,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
+@@ -2034,12 +2058,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
    return result;
  }
  
@@ -576,7 +555,7 @@ index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846
      Send(new PrintHostMsg_ShowInvalidPrinterSettingsError(routing_id()));
      return false;
 diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
-index 7b23fdb789562ff05290819d3d48b8f382183d86..8d21b11abb3a3c09569eb661aa3167400d37aa82 100644
+index 92ad8475b8268db89a5a7f22ad22547686388374..81df566a5908f1b35b9da5c2aad35ea7dec1dc3b 100644
 --- a/components/printing/renderer/print_render_frame_helper.h
 +++ b/components/printing/renderer/print_render_frame_helper.h
 @@ -226,7 +226,7 @@ class PrintRenderFrameHelper

+ 40 - 21
patches/chromium/put_back_deleted_colors_for_autofill.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/chrome/browser/ui/gtk/native_theme_gtk.cc b/chrome/browser/ui/gtk/native_theme_gtk.cc
-index 0b035ec92d0df57e36be7ef5dd18baf9395b0dca..daf4f524a401c752cddfd9919b36516214fcd180 100644
+index 990e2f0539dea8a4f2b47df1cc93715901fc5a7d..84a67a0efb3deed4a273be0f939abef71543e4fa 100644
 --- a/chrome/browser/ui/gtk/native_theme_gtk.cc
 +++ b/chrome/browser/ui/gtk/native_theme_gtk.cc
-@@ -341,6 +341,27 @@ base::Optional<SkColor> SkColorFromColorId(
+@@ -351,6 +351,27 @@ base::Optional<SkColor> SkColorFromColorId(
      case ui::NativeTheme::kColorId_TableHeaderSeparator:
        return GetBorderColor("GtkTreeView#treeview.view GtkButton#button");
  
@@ -40,25 +40,35 @@ index 0b035ec92d0df57e36be7ef5dd18baf9395b0dca..daf4f524a401c752cddfd9919b365162
      // TODO(thomasanderson): Render GtkSpinner directly.
      case ui::NativeTheme::kColorId_ThrobberSpinningColor:
 diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc
-index baa857e8655977fa524621c63e3382fadd3a6d9e..c629cec16ef9db7ebb28c4a15ea4741d8ddc4fd7 100644
+index cbef81b92f2589937c67370335713e5e9de44532..e850e603101e54e33b96fcd2c67a9e33a6819302 100644
 --- a/ui/native_theme/common_theme.cc
 +++ b/ui/native_theme/common_theme.cc
-@@ -59,6 +59,14 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
-       case NativeTheme::kColorId_BubbleFooterBackground:
-         return SkColorSetRGB(0x32, 0x36, 0x39);
+@@ -43,7 +43,8 @@ base::Optional<SkColor> GetHighContrastColor(
+   }
+ }
  
-+      // Results Tables
-+      case NativeTheme::kColorId_ResultsTableNormalBackground:
-+        return SkColorSetRGB(0x28, 0x28, 0x28);
-+      case NativeTheme::kColorId_ResultsTableNormalText:
-+        return SK_ColorWHITE;
-+      case NativeTheme::kColorId_ResultsTableDimmedText:
-+        return SkColorSetA(base_theme->GetSystemColor(NativeTheme::kColorId_ResultsTableNormalText), 0x80);
+-base::Optional<SkColor> GetDarkSchemeColor(NativeTheme::ColorId color_id) {
++base::Optional<SkColor> GetDarkSchemeColor(const NativeTheme* base_theme,
++                                           NativeTheme::ColorId color_id) {
+   switch (color_id) {
+     // Dialogs
+     case NativeTheme::kColorId_WindowBackground:
+@@ -57,6 +58,14 @@ base::Optional<SkColor> GetDarkSchemeColor(NativeTheme::ColorId color_id) {
+     case NativeTheme::kColorId_BubbleFooterBackground:
+       return SkColorSetRGB(0x32, 0x36, 0x39);
+ 
++    // Results Tables
++    case NativeTheme::kColorId_ResultsTableNormalBackground:
++      return SkColorSetRGB(0x28, 0x28, 0x28);
++    case NativeTheme::kColorId_ResultsTableNormalText:
++      return SK_ColorWHITE;
++    case NativeTheme::kColorId_ResultsTableDimmedText:
++      return SkColorSetA(base_theme->GetSystemColor(NativeTheme::kColorId_ResultsTableNormalText), 0x80);
 +
-       // FocusableBorder
-       case NativeTheme::kColorId_FocusedBorderColor:
-         return SkColorSetA(gfx::kGoogleBlue300, 0x4D);
-@@ -460,6 +468,18 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
+     // FocusableBorder
+     case NativeTheme::kColorId_FocusedBorderColor:
+       return SkColorSetA(gfx::kGoogleBlue300, 0x4D);
+@@ -484,6 +493,18 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id,
      case NativeTheme::kColorId_UnfocusedBorderColor:
        return gfx::kGoogleGrey300;
  
@@ -77,11 +87,20 @@ index baa857e8655977fa524621c63e3382fadd3a6d9e..c629cec16ef9db7ebb28c4a15ea4741d
      // Material spinner/throbber
      case NativeTheme::kColorId_ThrobberSpinningColor:
        return gfx::kGoogleBlue600;
+@@ -543,7 +564,7 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
+   }
+ 
+   if (color_scheme == NativeTheme::ColorScheme::kDark) {
+-    base::Optional<SkColor> color = GetDarkSchemeColor(color_id);
++    base::Optional<SkColor> color = GetDarkSchemeColor(base_theme, color_id);
+     if (color.has_value())
+       return color.value();
+   }
 diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
-index edd042cfe327810c120c4b446c043761c0d21b9f..d0fb56734a9cb102c7c709873a4ec07a3af6b2e8 100644
+index 8c60a3f7ba7cd3caec127028422be32024ff586b..22278bde2d532da4f8f26e102c73b0edab424135 100644
 --- a/ui/native_theme/native_theme.h
 +++ b/ui/native_theme/native_theme.h
-@@ -324,6 +324,11 @@ class NATIVE_THEME_EXPORT NativeTheme {
+@@ -339,6 +339,11 @@ class NATIVE_THEME_EXPORT NativeTheme {
  #define OP(enum_name) enum_name
      NATIVE_THEME_COLOR_IDS,
  #undef OP
@@ -94,10 +113,10 @@ index edd042cfe327810c120c4b446c043761c0d21b9f..d0fb56734a9cb102c7c709873a4ec07a
      kColorId_NumColors,
    };
 diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
-index 07db545df305a0c22375e9be3fad05621f69867a..dedaaaeaa93e55ec784f94864d670e0659d839bf 100644
+index 272b70d7c993c10a45f81c4fe639cf3c203e6d14..99494b370bf45e6587d82c040f85a5ffce46a219 100644
 --- a/ui/native_theme/native_theme_win.cc
 +++ b/ui/native_theme/native_theme_win.cc
-@@ -639,6 +639,18 @@ SkColor NativeThemeWin::GetPlatformHighContrastColor(ColorId color_id) const {
+@@ -641,6 +641,18 @@ SkColor NativeThemeWin::GetPlatformHighContrastColor(ColorId color_id) const {
      case kColorId_ThrobberWaitingColor:
        return system_colors_[SystemThemeColor::kGrayText];
  

+ 4 - 4
patches/chromium/render_widget_host_view_base.patch

@@ -6,10 +6,10 @@ 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 6fc2ae557a265ea0965707786c38a2bf8684cf1b..de62972bd8f9c136589169b8d34bcf0a3d9a0d9c 100644
+index 19c6b2e5c7053bebc77f4691ce03303f92de6d1b..f8e2b862f75732d9ec12ba9776f0bb01915b72e2 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_base.cc
-@@ -614,6 +614,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
+@@ -618,6 +618,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
    return false;
  }
  
@@ -24,7 +24,7 @@ index 6fc2ae557a265ea0965707786c38a2bf8684cf1b..de62972bd8f9c136589169b8d34bcf0a
      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 fca7a56a4b7f062ed3eee37e92c9e0c893af25fc..b862113765fdeace6b214332bab05a21a4681d91 100644
+index 27133fd983546181253847d02db019913ebd35c0..1183a6ef62dd9477f49e98552a9d9a4d5638df70 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.h
 +++ b/content/browser/renderer_host/render_widget_host_view_base.h
 @@ -23,9 +23,11 @@
@@ -61,7 +61,7 @@ index fca7a56a4b7f062ed3eee37e92c9e0c893af25fc..b862113765fdeace6b214332bab05a21
    // This only needs to be overridden by RenderWidgetHostViewBase subclasses
    // that handle content embedded within other RenderWidgetHostViews.
    gfx::PointF TransformPointToRootCoordSpaceF(
-@@ -316,6 +323,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
+@@ -319,6 +326,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
    virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
                                     const ui::LatencyInfo& latency);
  

+ 1 - 1
patches/chromium/render_widget_host_view_mac.patch

@@ -10,7 +10,7 @@ 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 c242af13bdf58b1c830781badaf27aadc3c0179b..2ba56a1951c7a1a76c5a6ecef1d04235d49451d8 100644
+index c7fb942367100b7a371d8941c73fc608a1a39435..ab0e620e824e0a0df93b12d2ff42cc1937812fd3 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
 @@ -154,6 +154,11 @@ void ExtractUnderlines(NSAttributedString* string,

+ 1 - 1
patches/chromium/resource_file_conflict.patch

@@ -52,7 +52,7 @@ 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 bcb3ba42257d9c5098c8dff84adbcbb972ce3f66..288ce1fee493c371fead863977b88fe31f3e0b39 100644
+index 23eb5fcfd9889aadd615d6a347258ff9db604bab..22844351c09b50ba958dfbbe416f4a645aaa035f 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
 @@ -1470,7 +1470,7 @@ if (is_chrome_branded && !is_android) {

+ 56 - 58
patches/chromium/revert_cleanup_remove_menu_subtitles_sublabels.patch

@@ -112,28 +112,30 @@ index a258d038da4a2bbfc6ec13c250781166235c1fbc..f6dbaa19cdb8938204c3452622589708
 +  EXPECT_EQ(7, changed_count());
  }
 diff --git a/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc b/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc
-index 326fe5abe680051a393c49ecbbdb07354ee16191..b80baf9290c054a3f254b73b4ed82f785c02b4b1 100644
+index 331f33660d682c14f7c5d096d8d1241d3670f4ee..2281623e9a4a41a7715f97b340984cf213ee3803 100644
 --- a/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc
 +++ b/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc
-@@ -91,8 +91,8 @@ class MenuItemViewTestInsert : public MenuTestBase {
+@@ -92,8 +92,9 @@ class MenuItemViewTestInsert : public MenuTestBase {
  
      inserted_item_ = menu()->AddMenuItemAt(
          INSERT_INDEX, 1000, ASCIIToUTF16("inserted item"), base::string16(),
--        nullptr, gfx::ImageSkia(), nullptr, views::MenuItemView::Type::kNormal,
--        ui::NORMAL_SEPARATOR);
-+        base::string16(), nullptr, gfx::ImageSkia(), nullptr,
-+        views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR);
+-        ui::ThemedVectorIcon(), gfx::ImageSkia(), ui::ThemedVectorIcon(),
+-        views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR);
++        base::string16(), ui::ThemedVectorIcon(), gfx::ImageSkia(),
++        ui::ThemedVectorIcon(), views::MenuItemView::Type::kNormal,
++        ui::NORMAL_SEPARATOR);
      ASSERT_TRUE(inserted_item_);
      menu()->ChildrenChanged();
  
-@@ -186,8 +186,8 @@ class MenuItemViewTestInsertWithSubmenu : public MenuTestBase {
+@@ -187,8 +188,9 @@ class MenuItemViewTestInsertWithSubmenu : public MenuTestBase {
    void Step2() {
      inserted_item_ = menu()->AddMenuItemAt(
          INSERT_INDEX, 1000, ASCIIToUTF16("inserted item"), base::string16(),
--        nullptr, gfx::ImageSkia(), nullptr, views::MenuItemView::Type::kNormal,
--        ui::NORMAL_SEPARATOR);
-+        base::string16(), nullptr, gfx::ImageSkia(), nullptr,
-+        views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR);
+-        ui::ThemedVectorIcon(), gfx::ImageSkia(), ui::ThemedVectorIcon(),
+-        views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR);
++        base::string16(), ui::ThemedVectorIcon(), gfx::ImageSkia(),
++        ui::ThemedVectorIcon(), views::MenuItemView::Type::kNormal,
++        ui::NORMAL_SEPARATOR);
      ASSERT_TRUE(inserted_item_);
      menu()->ChildrenChanged();
  
@@ -267,26 +269,26 @@ index 1ae8909a1404a43b34b9ef585511c7a3de39fa28..0d2a74ab5e9d55201a4992d81aecf9c2
      const gfx::VectorIcon* minor_icon = nullptr;
      gfx::Image icon;
 diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
-index c67fc8503db775079068d23c84bee615506ee81f..4522060274f0dd4081d39fbd07b6ae9022655d02 100644
+index 6f45e5ac5d1cec52f6f9a434c06cd894a788e421..7bab0474a57d6be35fd8dcefb260206914eb197f 100644
 --- a/ui/views/controls/menu/menu_item_view.cc
 +++ b/ui/views/controls/menu/menu_item_view.cc
-@@ -279,6 +279,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
+@@ -261,6 +261,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
      int index,
      int item_id,
      const base::string16& label,
 +    const base::string16& sublabel,
      const base::string16& minor_text,
-     const gfx::VectorIcon* minor_icon,
+     const ui::ThemedVectorIcon& minor_icon,
      const gfx::ImageSkia& icon,
-@@ -299,6 +300,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
+@@ -282,6 +283,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
      item->SetTitle(GetDelegate()->GetLabel(item_id));
    else
      item->SetTitle(label);
 +  item->SetSubtitle(sublabel);
    item->SetMinorText(minor_text);
    item->SetMinorIcon(minor_icon);
-   if (vector_icon) {
-@@ -340,21 +342,22 @@ void MenuItemView::RemoveAllMenuItems() {
+   if (!vector_icon.empty()) {
+@@ -322,21 +324,22 @@ void MenuItemView::RemoveAllMenuItems() {
  MenuItemView* MenuItemView::AppendMenuItem(int item_id,
                                             const base::string16& label,
                                             const gfx::ImageSkia& icon) {
@@ -309,10 +311,10 @@ index c67fc8503db775079068d23c84bee615506ee81f..4522060274f0dd4081d39fbd07b6ae90
  void MenuItemView::AddSeparatorAt(int index) {
    AddMenuItemAt(index, /*item_id=*/0, /*label=*/base::string16(),
 +                /*sub_label=*/base::string16(),
-                 /*minor_text=*/base::string16(), /*minor_icon=*/nullptr,
-                 /*icon=*/gfx::ImageSkia(), /*vector_icon=*/nullptr,
-                 /*type=*/Type::kSeparator,
-@@ -363,10 +366,11 @@ void MenuItemView::AddSeparatorAt(int index) {
+                 /*minor_text=*/base::string16(),
+                 /*minor_icon=*/ui::ThemedVectorIcon(),
+                 /*icon=*/gfx::ImageSkia(),
+@@ -347,10 +350,11 @@ void MenuItemView::AddSeparatorAt(int index) {
  
  MenuItemView* MenuItemView::AppendMenuItemImpl(int item_id,
                                                 const base::string16& label,
@@ -320,12 +322,12 @@ index c67fc8503db775079068d23c84bee615506ee81f..4522060274f0dd4081d39fbd07b6ae90
                                                 const gfx::ImageSkia& icon,
                                                 Type type) {
    const int index = submenu_ ? int{submenu_->children().size()} : 0;
--  return AddMenuItemAt(index, item_id, label, base::string16(), nullptr, icon,
-+  return AddMenuItemAt(index, item_id, label, sublabel, base::string16(), nullptr, icon,
-                        nullptr, type, ui::NORMAL_SEPARATOR);
+-  return AddMenuItemAt(index, item_id, label, base::string16(),
++  return AddMenuItemAt(index, item_id, label, sublabel, base::string16(),
+                        ui::ThemedVectorIcon(), icon, ui::ThemedVectorIcon(),
+                        type, ui::NORMAL_SEPARATOR);
  }
- 
-@@ -399,6 +403,11 @@ void MenuItemView::SetTitle(const base::string16& title) {
+@@ -383,6 +387,11 @@ void MenuItemView::SetTitle(const base::string16& title) {
    invalidate_dimensions();  // Triggers preferred size recalculation.
  }
  
@@ -337,7 +339,7 @@ index c67fc8503db775079068d23c84bee615506ee81f..4522060274f0dd4081d39fbd07b6ae90
  void MenuItemView::SetMinorText(const base::string16& minor_text) {
    minor_text_ = minor_text;
    invalidate_dimensions();  // Triggers preferred size recalculation.
-@@ -989,13 +998,23 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
+@@ -937,13 +946,23 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
                (!delegate || delegate->ShouldReserveSpaceForSubmenuIndicator()
                     ? item_right_margin_
                     : config.arrow_to_edge_padding);
@@ -362,7 +364,7 @@ index c67fc8503db775079068d23c84bee615506ee81f..4522060274f0dd4081d39fbd07b6ae90
    PaintMinorIconAndText(canvas, style);
  
    // Set the submenu indicator (arrow) image and color.
-@@ -1244,15 +1263,21 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
+@@ -1195,15 +1214,21 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
  
    // Determine the length of the label text.
    int string_width = gfx::GetStringWidth(title_, style.font_list);
@@ -388,18 +390,18 @@ index c67fc8503db775079068d23c84bee615506ee81f..4522060274f0dd4081d39fbd07b6ae90
        std::max(dimensions.height, MenuConfig::instance().item_min_height);
  
 diff --git a/ui/views/controls/menu/menu_item_view.h b/ui/views/controls/menu/menu_item_view.h
-index 294b0ea5d2bf28a41a1ae5e114d6e68936b958a9..ae97f8d3bb4b94ea89957cb761ee63ffab78b26a 100644
+index b38a048c22e6f89dfc02d7bda2ed053519a80e29..2db46616cb9a443d6fd280947e5a2673f9ca670c 100644
 --- a/ui/views/controls/menu/menu_item_view.h
 +++ b/ui/views/controls/menu/menu_item_view.h
-@@ -153,6 +153,7 @@ class VIEWS_EXPORT MenuItemView : public View {
+@@ -148,6 +148,7 @@ class VIEWS_EXPORT MenuItemView : public View {
    MenuItemView* AddMenuItemAt(int index,
                                int item_id,
                                const base::string16& label,
 +                              const base::string16& sublabel,
                                const base::string16& minor_text,
-                               const gfx::VectorIcon* minor_icon,
+                               const ui::ThemedVectorIcon& minor_icon,
                                const gfx::ImageSkia& icon,
-@@ -195,6 +196,7 @@ class VIEWS_EXPORT MenuItemView : public View {
+@@ -190,6 +191,7 @@ class VIEWS_EXPORT MenuItemView : public View {
    // All the AppendXXX methods funnel into this.
    MenuItemView* AppendMenuItemImpl(int item_id,
                                     const base::string16& label,
@@ -407,7 +409,7 @@ index 294b0ea5d2bf28a41a1ae5e114d6e68936b958a9..ae97f8d3bb4b94ea89957cb761ee63ff
                                     const gfx::ImageSkia& icon,
                                     Type type);
  
-@@ -219,6 +221,9 @@ class VIEWS_EXPORT MenuItemView : public View {
+@@ -214,6 +216,9 @@ class VIEWS_EXPORT MenuItemView : public View {
    void SetTitle(const base::string16& title);
    const base::string16& title() const { return title_; }
  
@@ -417,7 +419,7 @@ index 294b0ea5d2bf28a41a1ae5e114d6e68936b958a9..ae97f8d3bb4b94ea89957cb761ee63ff
    // Sets the minor text.
    void SetMinorText(const base::string16& minor_text);
  
-@@ -427,7 +432,7 @@ class VIEWS_EXPORT MenuItemView : public View {
+@@ -420,7 +425,7 @@ class VIEWS_EXPORT MenuItemView : public View {
    void DestroyAllMenuHosts();
  
    // Returns the text that should be displayed on the end (right) of the menu
@@ -426,7 +428,7 @@ index 294b0ea5d2bf28a41a1ae5e114d6e68936b958a9..ae97f8d3bb4b94ea89957cb761ee63ff
    base::string16 GetMinorText() const;
  
    // Returns the icon that should be displayed to the left of the minor text.
-@@ -518,6 +523,9 @@ class VIEWS_EXPORT MenuItemView : public View {
+@@ -511,6 +516,9 @@ class VIEWS_EXPORT MenuItemView : public View {
    // Title.
    base::string16 title_;
  
@@ -437,46 +439,42 @@ index 294b0ea5d2bf28a41a1ae5e114d6e68936b958a9..ae97f8d3bb4b94ea89957cb761ee63ff
    base::string16 minor_text_;
  
 diff --git a/ui/views/controls/menu/menu_item_view_unittest.cc b/ui/views/controls/menu/menu_item_view_unittest.cc
-index 6b5229578e0856a07c85db7d5eb36ffee812cef8..3d90eefa5345f4dc8563dfcefb2ee1376dd668d3 100644
+index 119aa4a49c32c2cb14832fd88a520e8645b732bd..e1f99e1fc7a3e42173250f5980a35378867ab298 100644
 --- a/ui/views/controls/menu/menu_item_view_unittest.cc
 +++ b/ui/views/controls/menu/menu_item_view_unittest.cc
-@@ -322,10 +322,10 @@ class MenuItemViewPaintUnitTest : public ViewsTestBase {
- // Provides assertion coverage for painting minor text and icons.
+@@ -324,8 +324,8 @@ class MenuItemViewPaintUnitTest : public ViewsTestBase {
  TEST_F(MenuItemViewPaintUnitTest, MinorTextAndIconAssertionCoverage) {
    auto AddItem = [this](auto label, auto minor_label, auto minor_icon) {
--    menu_item_view()->AddMenuItemAt(0, 1000, base::ASCIIToUTF16(label),
--                                    minor_label, minor_icon, gfx::ImageSkia(),
--                                    nullptr, views::MenuItemView::Type::kNormal,
--                                    ui::NORMAL_SEPARATOR);
-+    menu_item_view()->AddMenuItemAt(
+     menu_item_view()->AddMenuItemAt(
+-        0, 1000, base::ASCIIToUTF16(label), minor_label, minor_icon,
+-        gfx::ImageSkia(), ui::ThemedVectorIcon(),
 +        0, 1000, base::ASCIIToUTF16(label), base::string16(), minor_label,
-+        minor_icon, gfx::ImageSkia(), nullptr, views::MenuItemView::Type::kNormal,
-+        ui::NORMAL_SEPARATOR);
++        minor_icon, gfx::ImageSkia(), ui::ThemedVectorIcon(),
+         views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR);
    };
-   AddItem("No minor content", base::string16(), nullptr);
-   AddItem("Minor text only", base::ASCIIToUTF16("minor text"), nullptr);
+   AddItem("No minor content", base::string16(), ui::ThemedVectorIcon());
 diff --git a/ui/views/controls/menu/menu_model_adapter.cc b/ui/views/controls/menu/menu_model_adapter.cc
-index 373ea41937feea562ed25dbcb8c1ad6546beecb5..7307ac7b82b6432343c404d19cf0cdd60557d3d5 100644
+index 88a868cf6f9873b148cca0a42130978d09bf4712..1a5953ad911da5a9684086783c2e78b9d8b365b3 100644
 --- a/ui/views/controls/menu/menu_model_adapter.cc
 +++ b/ui/views/controls/menu/menu_model_adapter.cc
-@@ -99,8 +99,8 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
+@@ -99,8 +99,9 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
  
    if (*type == MenuItemView::Type::kSeparator) {
      return menu->AddMenuItemAt(menu_index, item_id, base::string16(),
--                               base::string16(), nullptr, gfx::ImageSkia(),
--                               nullptr, *type,
-+                               base::string16(), base::string16(), nullptr,
-+                               gfx::ImageSkia(), nullptr, *type,
+-                               base::string16(), ui::ThemedVectorIcon(),
+-                               gfx::ImageSkia(), ui::ThemedVectorIcon(), *type,
++                               base::string16(), base::string16(),
++                               ui::ThemedVectorIcon(), gfx::ImageSkia(),
++                               ui::ThemedVectorIcon(), *type,
                                 model->GetSeparatorTypeAt(model_index));
    }
  
-@@ -108,7 +108,8 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
+@@ -108,7 +109,7 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
    model->GetIconAt(model_index, &icon);
    return menu->AddMenuItemAt(
        menu_index, item_id, model->GetLabelAt(model_index),
--      model->GetMinorTextAt(model_index), model->GetMinorIconAt(model_index),
+-      model->GetMinorTextAt(model_index),
 +      model->GetSublabelAt(model_index), model->GetMinorTextAt(model_index),
-+      model->GetMinorIconAt(model_index),
+       ui::ThemedVectorIcon(model->GetMinorIconAt(model_index)),
        icon.IsEmpty() ? gfx::ImageSkia() : *icon.ToImageSkia(),
-       icon.IsEmpty() ? model->GetVectorIconAt(model_index) : nullptr, *type,
-       ui::NORMAL_SEPARATOR);
+       icon.IsEmpty() ? ui::ThemedVectorIcon(model->GetVectorIconAt(model_index))

+ 52 - 0
patches/chromium/revert_enable_samesitebydefaultcookies_and.patch

@@ -0,0 +1,52 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Lily Chen <[email protected]>
+Date: Fri, 3 Apr 2020 00:25:12 +0000
+Subject: Revert "Enable SameSiteByDefaultCookies and
+ CookiesWithoutSameSiteMustBeSecure"
+
+This reverts commit 2507555fe83d314ef6300317cd6f90ff165150bd.
+
+Reason for revert: Expected full rollout delayed
+
+Original change's description:
+> Enable SameSiteByDefaultCookies and CookiesWithoutSameSiteMustBeSecure
+>
+> [email protected]
+>
+> Bug: 953306
+> Change-Id: I5bde61d8ff66261ade4e68caadafda73c522df00
+> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122809
+> Reviewed-by: Lily Chen <[email protected]>
+> Commit-Queue: Lily Chen <[email protected]>
+> Cr-Commit-Position: refs/heads/master@{#753807}
+
[email protected],[email protected]
+
+# Not skipping CQ checks because original CL landed > 1 day ago.
+
+Bug: 953306
+Change-Id: Ic7da4e9938184e2833895ff263325c01948be6f0
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2135046
+Reviewed-by: Lily Chen <[email protected]>
+Commit-Queue: Lily Chen <[email protected]>
+Cr-Commit-Position: refs/heads/master@{#756087}
+
+diff --git a/net/base/features.cc b/net/base/features.cc
+index 0a0c2da968ca115eb6422ee244a7a97bb4627375..46b4562c621633c19bb7033a3c95618b8578e227 100644
+--- a/net/base/features.cc
++++ b/net/base/features.cc
+@@ -57,11 +57,11 @@ const base::FeatureParam<int> kEsniDnsMaxAbsoluteAdditionalWaitMilliseconds{
+ const base::FeatureParam<int> kEsniDnsMaxRelativeAdditionalWaitPercent{
+     &kRequestEsniDnsRecords, "EsniDnsMaxRelativeAdditionalWaitPercent", 5};
+ 
+-const base::Feature kSameSiteByDefaultCookies{"SameSiteByDefaultCookies",
+-                                              base::FEATURE_ENABLED_BY_DEFAULT};
++const base::Feature kSameSiteByDefaultCookies{
++    "SameSiteByDefaultCookies", base::FEATURE_DISABLED_BY_DEFAULT};
+ 
+ const base::Feature kCookiesWithoutSameSiteMustBeSecure{
+-    "CookiesWithoutSameSiteMustBeSecure", base::FEATURE_ENABLED_BY_DEFAULT};
++    "CookiesWithoutSameSiteMustBeSecure", base::FEATURE_DISABLED_BY_DEFAULT};
+ 
+ const base::Feature kShortLaxAllowUnsafeThreshold{
+     "ShortLaxAllowUnsafeThreshold", base::FEATURE_DISABLED_BY_DEFAULT};

+ 4 - 4
patches/chromium/revert_remove_contentrendererclient_shouldfork.patch

@@ -9,10 +9,10 @@ for every navigation to keep Node.js working properly. Once Native Modules in th
 are required to be NAPI or context aware (Electron v11), this patch can be removed.
 
 diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
-index 6600de77c3f6c6a1a2409e0afe503d752038c9fa..9fa08ef75c82a75de4edad5694b8d07aae3fba83 100644
+index 42383cda5a9ccb39e64ee65d0202bee60639623f..c9099e58ba6f552a83a7994529c7999e4e22cd07 100644
 --- a/chrome/renderer/chrome_content_renderer_client.cc
 +++ b/chrome/renderer/chrome_content_renderer_client.cc
-@@ -1273,6 +1273,25 @@ bool ChromeContentRendererClient::AllowPopup() {
+@@ -1272,6 +1272,25 @@ bool ChromeContentRendererClient::AllowPopup() {
  #endif
  }
  
@@ -92,10 +92,10 @@ index ee2079537feb23869fe4f812bcef33e1d7de29a7..93287ae0928b52f9df34834ad1a8ef0e
    // |url|. If the function returns a valid |new_url|, the request must be
    // updated to use it. The |attach_same_site_cookies| output parameter
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index 8dd80a3d7880eec9a4adb2288b883514b86e8880..fce52a0bf34c7ff66196951c2f72333e1cb45397 100644
+index 7a6562904eebbf55fcc4b08c9676a80350ce0863..bc18d55a6556adc1e8376f42d21fc64593ac1a59 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -5705,6 +5705,23 @@ void RenderFrameImpl::BeginNavigation(
+@@ -5694,6 +5694,23 @@ void RenderFrameImpl::BeginNavigation(
      int cumulative_bindings = RenderProcess::current()->GetEnabledBindings();
      bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) ||
                         (cumulative_bindings & kWebUIBindingsPolicyMask);

+ 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 1ba5936414aa46efae4999b2b06bf4f71904ef7b..b9c2de3aa2bb2647c85cf51a0990260a51f53be5 100644
+index 7cbdbcef0ce0f18aba40f6bdf71ac8064b4b6d71..460e85470f6dad7c38d2c50d3b4b668a01f17456 100644
 --- a/content/renderer/render_thread_impl.cc
 +++ b/content/renderer/render_thread_impl.cc
-@@ -1345,7 +1345,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
+@@ -1344,7 +1344,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
  }
  
  bool RenderThreadImpl::IsElasticOverscrollEnabled() {

+ 2 - 2
patches/chromium/support_mixed_sandbox_with_zygote.patch

@@ -22,7 +22,7 @@ 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 60d0aab5416cb237c6de5013a6724fdb95a5422e..016684c4340318308666545ddd8e4e85632d4ed2 100644
+index 9455ee13834bff4e2ff8a0f9b31b95289a70d854..7faeda55e7190baee5e1a821611998d9914e6224 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
 @@ -415,6 +415,11 @@ class RendererSandboxedProcessLauncherDelegate
@@ -62,7 +62,7 @@ index 60d0aab5416cb237c6de5013a6724fdb95a5422e..016684c4340318308666545ddd8e4e85
  };
  
  const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey";
-@@ -1791,11 +1802,18 @@ bool RenderProcessHostImpl::Init() {
+@@ -1821,11 +1832,18 @@ bool RenderProcessHostImpl::Init() {
        cmd_line->PrependWrapper(renderer_prefix);
      AppendRendererCommandLine(cmd_line.get());
  

+ 2 - 2
patches/chromium/thread_capabilities.patch

@@ -11,10 +11,10 @@ system.
 See https://github.com/atom/electron/issues/3666
 
 diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
-index 542567f3ee58776a8ca915f1f62dcffa29141798..0f5f017b0ee63bbe7107f39143484bc6d728104e 100644
+index d7b5d8c441354965ee0cb87a57d9552a4ae1f20d..dd145dd38fdbd7c426bd821baff0d9fe76201469 100644
 --- a/sandbox/linux/services/credentials.cc
 +++ b/sandbox/linux/services/credentials.cc
-@@ -352,8 +352,10 @@ pid_t Credentials::ForkAndDropCapabilitiesInChild() {
+@@ -354,8 +354,10 @@ pid_t Credentials::ForkAndDropCapabilitiesInChild() {
      return pid;
    }
  

+ 3 - 3
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 b57520fe4254335fd31bb86673d30e79c0656d51..6f2e0c12e7b4a2928346f6690c2e8a072822124b 100644
+index 1e0d0a28cfe2c25b186fac6eb2d02e96730c3934..552f4cf6e09855e9bc1ceecbdeb959dd85a1ce05 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -2066,6 +2066,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
+@@ -2065,6 +2065,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
    std::string unique_name;
    frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
  
@@ -25,7 +25,7 @@ index b57520fe4254335fd31bb86673d30e79c0656d51..6f2e0c12e7b4a2928346f6690c2e8a07
    WebContentsViewDelegate* delegate =
        GetContentClient()->browser()->GetWebContentsViewDelegate(this);
  
-@@ -2076,6 +2082,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
+@@ -2075,6 +2081,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
      view_.reset(CreateWebContentsView(this, delegate,
                                        &render_view_host_delegate_view_));
    }

+ 16 - 10
patches/chromium/webview_cross_drag.patch

@@ -8,26 +8,32 @@ 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 025f82ede5c7105ffcf5cd834c8ab6392de672bc..1792809631d50e2a2761d385ffb8b526fe4d9833 100644
+index 025f82ede5c7105ffcf5cd834c8ab6392de672bc..84cd07bc48e680053a012a674bd4b50fcf5123af 100644
 --- a/content/browser/web_contents/web_contents_view_aura.cc
 +++ b/content/browser/web_contents/web_contents_view_aura.cc
-@@ -796,6 +796,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
+@@ -796,9 +796,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
  
  bool WebContentsViewAura::IsValidDragTarget(
      RenderWidgetHostImpl* target_rwh) const {
+-  return target_rwh->GetProcess()->GetID() == drag_start_process_id_ ||
+-      GetRenderViewHostID(web_contents_->GetRenderViewHost()) !=
+-      drag_start_view_id_;
 +  return true;
-   return target_rwh->GetProcess()->GetID() == drag_start_process_id_ ||
-       GetRenderViewHostID(web_contents_->GetRenderViewHost()) !=
-       drag_start_view_id_;
+ }
+ 
+ ////////////////////////////////////////////////////////////////////////////////
 diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
-index b874b3c4b16ca87c9730c6caaf5788cff0ab3493..8931859b944905a80bb9d174a67d3aee0f0bf5d6 100644
+index b874b3c4b16ca87c9730c6caaf5788cff0ab3493..2c82d63d646c9201abd6a669b726dae0f8bec12b 100644
 --- a/content/browser/web_contents/web_drag_dest_mac.mm
 +++ b/content/browser/web_contents/web_drag_dest_mac.mm
-@@ -419,6 +419,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
+@@ -419,9 +419,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
  }
  
  - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {
+-  return targetRWH->GetProcess()->GetID() == _dragStartProcessID ||
+-         GetRenderViewHostID(_webContents->GetRenderViewHost()) !=
+-             _dragStartViewID;
 +  return YES;
-   return targetRWH->GetProcess()->GetID() == _dragStartProcessID ||
-          GetRenderViewHostID(_webContents->GetRenderViewHost()) !=
-              _dragStartViewID;
+ }
+ 
+ @end

+ 1 - 3
patches/config.json

@@ -5,7 +5,5 @@
 
   "src/electron/patches/v8":  "src/v8",
 
-  "src/electron/patches/node": "src/third_party/electron_node",
-
-  "src/electron/patches/swiftshader": "src/third_party/swiftshader"
+  "src/electron/patches/node": "src/third_party/electron_node"
 }

+ 6 - 4
patches/node/build_add_gn_build_files.patch

@@ -557,12 +557,13 @@ index 0000000000000000000000000000000000000000..da9e2b42dccacc1ed9b00202c1ff73eb
 +}
 diff --git a/deps/llhttp/BUILD.gn b/deps/llhttp/BUILD.gn
 new file mode 100644
-index 0000000000000000000000000000000000000000..e34e241e6733b19bf1b5762ad1307af0eba383f6
+index 0000000000000000000000000000000000000000..ce15bc57093caa1bd84ea77e7438e892fb916427
 --- /dev/null
 +++ b/deps/llhttp/BUILD.gn
-@@ -0,0 +1,13 @@
+@@ -0,0 +1,14 @@
 +config("llhttp_config") {
 +  include_dirs = [ "include" ]
++  cflags = [ "-Wno-unreachable-code" ]
 +}
 +
 +static_library("llhttp") {
@@ -628,10 +629,10 @@ index 0000000000000000000000000000000000000000..66af819990b338caa49ca59d1fe6c5ad
 +}
 diff --git a/deps/uv/BUILD.gn b/deps/uv/BUILD.gn
 new file mode 100644
-index 0000000000000000000000000000000000000000..4674bdd48b4bfc9b7152377b8cd0984d1cf42562
+index 0000000000000000000000000000000000000000..c90d5d9cf767c1460a549a993ad8a1ad16792703
 --- /dev/null
 +++ b/deps/uv/BUILD.gn
-@@ -0,0 +1,185 @@
+@@ -0,0 +1,186 @@
 +config("libuv_config") {
 +  include_dirs = [ "include" ]
 +
@@ -676,6 +677,7 @@ index 0000000000000000000000000000000000000000..4674bdd48b4bfc9b7152377b8cd0984d
 +    "-Wno-switch",
 +    "-Wno-unused-function",
 +    "-Wno-unused-variable",
++    "-Wno-unreachable-code",
 +  ]
 +
 +  libs = []

+ 0 - 1
patches/swiftshader/.patches

@@ -1 +0,0 @@
-marl_arm.patch

+ 0 - 23
patches/swiftshader/marl_arm.patch

@@ -1,23 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Cheng Zhao <[email protected]>
-Date: Wed, 4 Mar 2020 14:23:28 -0700
-Subject: fix: linux arm build
-
-Fix Linux ARM build error caused by compiler update.
-
-This means to be a quick fix, we should choose other solution once we
-get an answer at:
-https://bugs.chromium.org/p/chromium/issues/detail?id=1058107
-
-diff --git a/third_party/marl/src/osfiber_asm_arm.S b/third_party/marl/src/osfiber_asm_arm.S
-index d276ac806..b2be5face 100644
---- a/third_party/marl/src/osfiber_asm_arm.S
-+++ b/third_party/marl/src/osfiber_asm_arm.S
-@@ -22,6 +22,7 @@
- // x1: to
- .text
- .global marl_fiber_swap
-+.type marl_fiber_swap, %function
- .align 4
- marl_fiber_swap:
- 

+ 0 - 1
script/zip_manifests/dist_zip.mac.x64.manifest

@@ -15,7 +15,6 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari
 Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib
 Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib
 Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib
-Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvulkan.dylib
 Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json
 Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/
 Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist

+ 0 - 1
script/zip_manifests/dist_zip.mac_mas.x64.manifest

@@ -15,7 +15,6 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari
 Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib
 Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib
 Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib
-Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvulkan.dylib
 Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json
 Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/
 Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist

+ 1 - 1
shell/browser/api/electron_api_cookies.cc

@@ -204,7 +204,7 @@ v8::Local<v8::Promise> Cookies::Get(const gin_helper::Dictionary& filter) {
     net::CookieOptions options;
     options.set_include_httponly();
     options.set_same_site_cookie_context(
-        net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT);
+        net::CookieOptions::SameSiteCookieContext::MakeInclusive());
     options.set_do_not_update_access_time();
 
     manager->GetCookieList(GURL(url), options,

+ 2 - 1
shell/browser/api/electron_api_native_theme.cc

@@ -82,7 +82,8 @@ bool NativeTheme::ShouldUseInvertedColorScheme() {
     return false;
   return is_inverted;
 #else
-  return color_utils::IsInvertedColorScheme();
+  return ui_theme_->GetHighContrastColorScheme() ==
+         ui::NativeTheme::HighContrastColorScheme::kDark;
 #endif
 }
 

+ 3 - 1
shell/browser/api/electron_api_system_preferences.cc

@@ -37,7 +37,9 @@ bool SystemPreferences::IsDarkMode() {
 #endif
 
 bool SystemPreferences::IsInvertedColorScheme() {
-  return color_utils::IsInvertedColorScheme();
+  return ui::NativeTheme::GetInstanceForNativeUi()
+             ->GetHighContrastColorScheme() ==
+         ui::NativeTheme::HighContrastColorScheme::kDark;
 }
 
 bool SystemPreferences::IsHighContrastColorScheme() {

+ 10 - 1
shell/browser/electron_browser_main_parts.cc

@@ -69,6 +69,9 @@
 #include "ui/base/x/x11_util.h"
 #include "ui/base/x/x11_util_internal.h"
 #include "ui/events/devices/x11/touch_factory_x11.h"
+#include "ui/gfx/x/x11_types.h"
+#include "ui/gtk/gtk_ui_delegate.h"
+#include "ui/gtk/gtk_ui_delegate_x11.h"
 #include "ui/views/linux_ui/linux_ui.h"
 #endif
 
@@ -267,7 +270,6 @@ void ElectronBrowserMainParts::RegisterDestructionCallback(
 int ElectronBrowserMainParts::PreEarlyInitialization() {
   field_trial_list_ = std::make_unique<base::FieldTrialList>(nullptr);
 #if defined(USE_X11)
-  views::LinuxUI::SetInstance(BuildGtkUi());
   OverrideLinuxAppDataPath();
 
   // Installs the X11 error handlers for the browser process used during
@@ -403,6 +405,13 @@ void ElectronBrowserMainParts::PostDestroyThreads() {
 }
 
 void ElectronBrowserMainParts::ToolkitInitialized() {
+#if defined(USE_X11)
+  // In Aura/X11, Gtk-based LinuxUI implementation is used.
+  gtk_ui_delegate_ = std::make_unique<ui::GtkUiDelegateX11>(gfx::GetXDisplay());
+  ui::GtkUiDelegate::SetInstance(gtk_ui_delegate_.get());
+  views::LinuxUI::SetInstance(BuildGtkUi(ui::GtkUiDelegate::instance()));
+#endif
+
 #if defined(USE_AURA) && defined(USE_X11)
   views::LinuxUI::instance()->Initialize();
 #endif

+ 10 - 0
shell/browser/electron_browser_main_parts.h

@@ -29,6 +29,12 @@ class WMState;
 }
 #endif
 
+#if defined(USE_X11)
+namespace ui {
+class GtkUiDelegate;
+}
+#endif
+
 namespace electron {
 
 class ElectronBrowserContext;
@@ -121,6 +127,10 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
   std::unique_ptr<wm::WMState> wm_state_;
 #endif
 
+#if defined(USE_X11)
+  std::unique_ptr<ui::GtkUiDelegate> gtk_ui_delegate_;
+#endif
+
   std::unique_ptr<views::LayoutProvider> layout_provider_;
 
   // A fake BrowserProcess object that used to feed the source code from chrome.

+ 5 - 2
shell/browser/net/proxying_websocket.cc

@@ -120,7 +120,8 @@ void ProxyingWebSocket::OnConnectionEstablished(
     mojo::PendingRemote<network::mojom::WebSocket> websocket,
     mojo::PendingReceiver<network::mojom::WebSocketClient> client_receiver,
     network::mojom::WebSocketHandshakeResponsePtr response,
-    mojo::ScopedDataPipeConsumerHandle readable) {
+    mojo::ScopedDataPipeConsumerHandle readable,
+    mojo::ScopedDataPipeProducerHandle writable) {
   DCHECK(forwarding_handshake_client_);
   DCHECK(!is_done_);
   is_done_ = true;
@@ -128,6 +129,7 @@ void ProxyingWebSocket::OnConnectionEstablished(
   client_receiver_ = std::move(client_receiver);
   handshake_response_ = std::move(response);
   readable_ = std::move(readable);
+  writable_ = std::move(writable);
 
   response_->remote_endpoint = handshake_response_->remote_endpoint;
 
@@ -156,7 +158,8 @@ void ProxyingWebSocket::ContinueToCompleted() {
   web_request_api_->OnCompleted(&info_, request_, net::ERR_WS_UPGRADE);
   forwarding_handshake_client_->OnConnectionEstablished(
       std::move(websocket_), std::move(client_receiver_),
-      std::move(handshake_response_), std::move(readable_));
+      std::move(handshake_response_), std::move(readable_),
+      std::move(writable_));
 
   // Deletes |this|.
   delete this;

+ 3 - 1
shell/browser/net/proxying_websocket.h

@@ -59,7 +59,8 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient,
       mojo::PendingRemote<network::mojom::WebSocket> websocket,
       mojo::PendingReceiver<network::mojom::WebSocketClient> client_receiver,
       network::mojom::WebSocketHandshakeResponsePtr response,
-      mojo::ScopedDataPipeConsumerHandle readable) override;
+      mojo::ScopedDataPipeConsumerHandle readable,
+      mojo::ScopedDataPipeProducerHandle writable) override;
 
   // network::mojom::AuthenticationHandler method:
   void OnAuthRequired(const net::AuthChallengeInfo& auth_info,
@@ -149,6 +150,7 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient,
   mojo::PendingReceiver<network::mojom::WebSocketClient> client_receiver_;
   network::mojom::WebSocketHandshakeResponsePtr handshake_response_ = nullptr;
   mojo::ScopedDataPipeConsumerHandle readable_;
+  mojo::ScopedDataPipeProducerHandle writable_;
 
   extensions::WebRequestInfo info_;
 

+ 3 - 3
shell/browser/net/resolve_proxy_helper.cc

@@ -94,8 +94,8 @@ ResolveProxyHelper::PendingRequest::PendingRequest(
 
 ResolveProxyHelper::PendingRequest::~PendingRequest() noexcept = default;
 
-ResolveProxyHelper::PendingRequest& ResolveProxyHelper::PendingRequest::
-operator=(ResolveProxyHelper::PendingRequest&& pending_request) noexcept =
-    default;
+ResolveProxyHelper::PendingRequest&
+ResolveProxyHelper::PendingRequest::operator=(
+    ResolveProxyHelper::PendingRequest&& pending_request) noexcept = default;
 
 }  // namespace electron

+ 0 - 1
shell/browser/ui/devtools_manager_delegate.cc

@@ -100,7 +100,6 @@ void DevToolsManagerDelegate::Inspect(content::DevToolsAgentHost* agent_host) {}
 
 void DevToolsManagerDelegate::HandleCommand(
     content::DevToolsAgentHostClientChannel* channel,
-    const std::string& method,
     base::span<const uint8_t> message,
     NotHandledCallback callback) {
   std::move(callback).Run(message);

+ 0 - 1
shell/browser/ui/devtools_manager_delegate.h

@@ -24,7 +24,6 @@ class DevToolsManagerDelegate : public content::DevToolsManagerDelegate {
   // DevToolsManagerDelegate implementation.
   void Inspect(content::DevToolsAgentHost* agent_host) override;
   void HandleCommand(content::DevToolsAgentHostClientChannel* channel,
-                     const std::string& method,
                      base::span<const uint8_t> message,
                      NotHandledCallback callback) override;
   scoped_refptr<content::DevToolsAgentHost> CreateNewTarget(

+ 10 - 2
shell/common/api/electron_api_clipboard.cc

@@ -180,8 +180,16 @@ void Clipboard::WriteBookmark(const base::string16& title,
 
 gfx::Image Clipboard::ReadImage(gin_helper::Arguments* args) {
   ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
-  SkBitmap bitmap = clipboard->ReadImage(GetClipboardBuffer(args));
-  return gfx::Image::CreateFrom1xBitmap(bitmap);
+  base::Optional<gfx::Image> image;
+  clipboard->ReadImage(
+      GetClipboardBuffer(args),
+      base::Bind(
+          [](base::Optional<gfx::Image>* image, const SkBitmap& result) {
+            image->emplace(gfx::Image::CreateFrom1xBitmap(result));
+          },
+          &image));
+  DCHECK(image.has_value());
+  return image.value();
 }
 
 void Clipboard::WriteImage(const gfx::Image& image,

+ 4 - 2
spec/api-clipboard-spec.js

@@ -19,7 +19,8 @@ describe('clipboard module', () => {
       const p = path.join(fixtures, 'assets', 'logo.png');
       const i = nativeImage.createFromPath(p);
       clipboard.writeImage(p);
-      expect(clipboard.readImage().toDataURL()).to.equal(i.toDataURL());
+      const readImage = clipboard.readImage();
+      expect(readImage.toDataURL()).to.equal(i.toDataURL());
     });
   });
 
@@ -89,7 +90,8 @@ describe('clipboard module', () => {
       expect(clipboard.readText()).to.equal(text);
       expect(clipboard.readHTML()).to.equal(markup);
       expect(clipboard.readRTF()).to.equal(rtf);
-      expect(clipboard.readImage().toDataURL()).to.equal(i.toDataURL());
+      const readImage = clipboard.readImage();
+      expect(readImage.toDataURL()).to.equal(i.toDataURL());
 
       if (process.platform !== 'linux') {
         expect(clipboard.readBookmark()).to.deep.equal(bookmark);