Browse Source

chore: update patches

deepak1556 10 months ago
parent
commit
52fa5b30f1
32 changed files with 152 additions and 151 deletions
  1. 9 9
      patches/chromium/add_didinstallconditionalfeatures.patch
  2. 1 1
      patches/chromium/add_electron_deps_to_license_credits_file.patch
  3. 5 5
      patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch
  4. 8 8
      patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch
  5. 10 10
      patches/chromium/can_create_window.patch
  6. 1 1
      patches/chromium/chore_add_electron_deps_to_gitignores.patch
  7. 6 6
      patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch
  8. 4 4
      patches/chromium/custom_protocols_plzserviceworker.patch
  9. 1 1
      patches/chromium/disable_compositor_recycling.patch
  10. 10 9
      patches/chromium/disable_hidden.patch
  11. 3 3
      patches/chromium/disable_unload_metrics.patch
  12. 2 2
      patches/chromium/extend_apply_webpreferences.patch
  13. 10 10
      patches/chromium/feat_configure_launch_options_for_service_process.patch
  14. 5 5
      patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch
  15. 2 2
      patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch
  16. 1 1
      patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch
  17. 2 2
      patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch
  18. 2 2
      patches/chromium/fix_restore_original_resize_performance_on_macos.patch
  19. 6 6
      patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch
  20. 1 1
      patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch
  21. 20 20
      patches/chromium/mas_avoid_private_macos_api_usage.patch.patch
  22. 2 2
      patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch
  23. 1 1
      patches/chromium/picture-in-picture.patch
  24. 1 1
      patches/chromium/printing.patch
  25. 6 6
      patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch
  26. 3 3
      patches/chromium/render_widget_host_view_base.patch
  27. 1 1
      patches/chromium/resource_file_conflict.patch
  28. 6 6
      patches/chromium/web_contents.patch
  29. 6 6
      patches/chromium/webview_fullscreen.patch
  30. 1 1
      patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch
  31. 4 4
      patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch
  32. 12 12
      patches/v8/revert_heap_add_checks_position_info.patch

+ 9 - 9
patches/chromium/add_didinstallconditionalfeatures.patch

@@ -23,10 +23,10 @@ index 902d84ad70adc9496f3af989465a99b6f44b077a..3ce043eea32c41130aa59ab8570a05b3
                                          int32_t world_id) {}
    virtual void DidClearWindowObject() {}
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index 81f42913489724e621b916f1457d2966849c0f71..f976151c380ad1a9bf75c927ca3ba228d3f5a8f1 100644
+index 8e023991b3fdd05ceb60cf9f87f8e9f359570226..946e303709a16706da11ab9729e7d5e962effbee 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -4692,6 +4692,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
+@@ -4695,6 +4695,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
      observer.DidCreateScriptContext(context, world_id);
  }
  
@@ -67,7 +67,7 @@ index 03bf5ef3fc6664421d832ed001a613e37fa90e90..9e44146ddc56ef3627ac73da63830ea8
    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 a224fcecc5a3b2e351867d5fa324772c8279de2e..cdfddc8fccba2ad270b7726966d7b2fb130bfa9c 100644
+index f7e0144c74f879e9b29871d7c372b99e127966bb..c3cd7b77ed282f212a56d151dc3fbec36d183701 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
 @@ -217,6 +217,7 @@ void LocalWindowProxy::Initialize() {
@@ -79,10 +79,10 @@ index a224fcecc5a3b2e351867d5fa324772c8279de2e..cdfddc8fccba2ad270b7726966d7b2fb
    if (World().IsMainWorld()) {
      probe::DidCreateMainWorldContext(GetFrame());
 diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
-index ce0f4df2259a072f08a2ee5500f40222c480a601..80f158198419c7e61bf044d6b5fdfde1fbb63848 100644
+index 52c70685b63026c12ce5d0b064d133a68844b248..4062c6b34581c25d5218c410dfab3178dd96b40a 100644
 --- a/third_party/blink/renderer/core/frame/local_frame_client.h
 +++ b/third_party/blink/renderer/core/frame/local_frame_client.h
-@@ -306,6 +306,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
+@@ -305,6 +305,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
  
    virtual void DidCreateScriptContext(v8::Local<v8::Context>,
                                        int32_t world_id) = 0;
@@ -92,7 +92,7 @@ index ce0f4df2259a072f08a2ee5500f40222c480a601..80f158198419c7e61bf044d6b5fdfde1
                                          int32_t world_id) = 0;
    virtual bool AllowScriptExtensions() = 0;
 diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
-index 4c025f01c141b58f69932ca774cd89e6c470373b..9bb3eb65f7462d48b5f6b2b7b104b885eb38f86f 100644
+index 8e91e683ce267b1d7e603528dac3fbb2cdf39c6d..7ad8af1ee21ebab40cbab6fa6ef1530f9bdb4626 100644
 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
 @@ -293,6 +293,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -110,7 +110,7 @@ index 4c025f01c141b58f69932ca774cd89e6c470373b..9bb3eb65f7462d48b5f6b2b7b104b885
      v8::Local<v8::Context> context,
      int32_t world_id) {
 diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
-index de6a2faab0d261d0e50656b27ce06156fddef3ae..ec4550c7ff2fd600425f4575f1c6a735811a462f 100644
+index c01a1f7055a32c11880da78b520ae4747d8824fb..18cf55c052e88584e34cac786637476c3f865bba 100644
 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
 +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
 @@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -123,10 +123,10 @@ index de6a2faab0d261d0e50656b27ce06156fddef3ae..ec4550c7ff2fd600425f4575f1c6a735
                                  int32_t world_id) override;
  
 diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
-index ec2a8f7d2fc14702686be73e663dfb9632b5b4de..5f3fdd7d03b81c7bf59528af96c550d9f2307835 100644
+index b3d016f4602a34298e4694ad314bbfb7807053d4..c3aa86cb772c45fd87b58acc91b9f4f295e9baf7 100644
 --- a/third_party/blink/renderer/core/loader/empty_clients.h
 +++ b/third_party/blink/renderer/core/loader/empty_clients.h
-@@ -412,6 +412,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
+@@ -411,6 +411,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
  
    void DidCreateScriptContext(v8::Local<v8::Context>,
                                int32_t world_id) override {}

+ 1 - 1
patches/chromium/add_electron_deps_to_license_credits_file.patch

@@ -7,7 +7,7 @@ Ensure that licenses for the dependencies introduced by Electron
 are included in `LICENSES.chromium.html`
 
 diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
-index 7390ac2a6667abface68318c742043f185e3ed2e..9d9f746387c62d4f846c31ec1887a1777a10ee1a 100755
+index d2ec0bae06276fdb42dc43704b73c1705461d994..147ad6ec99228ea30594420169c1bb33331a7abb 100755
 --- a/tools/licenses/licenses.py
 +++ b/tools/licenses/licenses.py
 @@ -336,6 +336,31 @@ SPECIAL_CASES = {

+ 5 - 5
patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch

@@ -116,10 +116,10 @@ index a1197832494afac5207b682f187929844b0ebfd7..1c2c61d09d505eef575107201302c7be
    // Visibility -----------------------------------------------------------
  
 diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
-index 65c00aae8e04a9f3202ab7d0e664e6047681d38f..5b33d4cebaa04f11c2e9f0cfffb4fbb8fd40e324 100644
+index 995ba98826ff6f081cad7a530fe2982255e3ed0b..578e6b44127f4d7f131bd568b4e5d55c2614bb56 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
-@@ -2422,6 +2422,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
+@@ -2444,6 +2444,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
    TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
                 "old_state", old_state, "new_state", new_state);
  
@@ -130,7 +130,7 @@ index 65c00aae8e04a9f3202ab7d0e664e6047681d38f..5b33d4cebaa04f11c2e9f0cfffb4fbb8
    bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
                              !old_state->is_in_back_forward_cache;
    bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
-@@ -3932,10 +3936,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
+@@ -3958,10 +3962,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
    return GetPage()->GetPageScheduler();
  }
  
@@ -155,7 +155,7 @@ index 65c00aae8e04a9f3202ab7d0e664e6047681d38f..5b33d4cebaa04f11c2e9f0cfffb4fbb8
    // Do not throttle if the page should be painting.
    bool is_visible =
 diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
-index 0a1db1e8faa6b56d54627a51ab49db186a0231b9..b5036e48c48b7e88554d67cc988e2f675d5d66a3 100644
+index 075df7cc712fb625d684d16ed5e0601ad827fc9a..976ec61268527b56ffcf05e54dc499255093dec8 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.h
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.h
 @@ -450,6 +450,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -166,7 +166,7 @@ index 0a1db1e8faa6b56d54627a51ab49db186a0231b9..b5036e48c48b7e88554d67cc988e2f67
    void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
                            bool is_initial_state) override;
    mojom::blink::PageVisibilityState GetVisibilityState() override;
-@@ -928,6 +929,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
+@@ -931,6 +932,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
    // If true, we send IPC messages when |preferred_size_| changes.
    bool send_preferred_size_changes_ = false;
  

+ 8 - 8
patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch

@@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
 patch.
 
 diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
-index ce54376e4a56053fc8dc33ceeabcbc26f85ae40a..eef187949d45296dad0808f88652590e01bb71ee 100644
+index b7ce77bc5981331caf1a46c5eb4e9c3c4a79b3d5..8e95a6712bfddb2c7548f3a5489508194bc4de37 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
 @@ -192,11 +192,16 @@ if (!is_android && !is_mac) {
@@ -33,10 +33,10 @@ index ce54376e4a56053fc8dc33ceeabcbc26f85ae40a..eef187949d45296dad0808f88652590e
            "//base",
            "//build:branding_buildflags",
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index 4321ca4e768529f6ef9d8963fd86838e8ceec390..d7f4d8b0cbe3ac4fbbefe8e5fd2395b755e95577 100644
+index 8c3671ff909e1a70b0fe74352d25aac9491c3f6e..cd182bb08f739eafbe94db2c7668717ea69c9f23 100644
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -4846,7 +4846,7 @@ static_library("browser") {
+@@ -4857,7 +4857,7 @@ static_library("browser") {
  
      # On Windows, the hashes are embedded in //chrome:chrome_initial rather
      # than here in :chrome_dll.
@@ -46,10 +46,10 @@ index 4321ca4e768529f6ef9d8963fd86838e8ceec390..d7f4d8b0cbe3ac4fbbefe8e5fd2395b7
        sources += [ "certificate_viewer_stub.cc" ]
      }
 diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
-index 7597903255c024932fb9e99b886dc7001b6f4341..1e5a84c6a01f4b494ba7724e240aa5f7f4e5cbca 100644
+index beeeb51c09d70c5525f52fbce26f0b85ea10539b..f39309a682d748a1ad6ea8063d5590dadf64916a 100644
 --- a/chrome/test/BUILD.gn
 +++ b/chrome/test/BUILD.gn
-@@ -7418,9 +7418,12 @@ test("unit_tests") {
+@@ -7386,9 +7386,12 @@ test("unit_tests") {
        "//chrome/browser/safe_browsing/incident_reporting/verifier_test:verifier_test_dll_2",
      ]
  
@@ -63,7 +63,7 @@ index 7597903255c024932fb9e99b886dc7001b6f4341..1e5a84c6a01f4b494ba7724e240aa5f7
        "//chrome//services/util_win:unit_tests",
        "//chrome/app:chrome_dll_resources",
        "//chrome/app:win_unit_tests",
-@@ -8420,6 +8423,10 @@ test("unit_tests") {
+@@ -8391,6 +8394,10 @@ test("unit_tests") {
        "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
      ]
  
@@ -74,9 +74,9 @@ index 7597903255c024932fb9e99b886dc7001b6f4341..1e5a84c6a01f4b494ba7724e240aa5f7
      sources += [
        # The importer code is not used on Android.
        "../common/importer/firefox_importer_utils_unittest.cc",
-@@ -8497,7 +8504,6 @@ test("unit_tests") {
-     }
+@@ -8471,7 +8478,6 @@ test("unit_tests") {
  
+     # Non-android deps for "unit_tests" target.
      deps += [
 -      "//chrome:packed_resources_integrity_header",
        "//chrome/browser/apps:icon_standardizer",

+ 10 - 10
patches/chromium/can_create_window.patch

@@ -9,10 +9,10 @@ potentially prevent a window from being created.
 TODO(loc): this patch is currently broken.
 
 diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
-index 9c8b401d00136cdb5e1edde7973f176faf6fd89c..a08b52002aa0feab5183cd22016f3b0753a2108e 100644
+index 5f92e9d85785bbea06870b877652c54db107d5f8..ccfee9748a686a450a00f8fee9f19728bb73e9d3 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -8544,6 +8544,7 @@ void RenderFrameHostImpl::CreateNewWindow(
+@@ -8531,6 +8531,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 9c8b401d00136cdb5e1edde7973f176faf6fd89c..a08b52002aa0feab5183cd22016f3b07
            &no_javascript_access);
  
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index f43ec47a8c6504a2f1911bce5259a292b6e1aded..50a6d0835c70795a3c7865c305b9389936939ee9 100644
+index 205a1bb692091e425233bf6bd1e9910104585667..52ca5fc9774f74547f8231db8028fb9eb0b62996 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -4713,6 +4713,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -4714,6 +4714,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
  
    auto* new_contents_impl = new_contents.get();
  
@@ -37,7 +37,7 @@ index f43ec47a8c6504a2f1911bce5259a292b6e1aded..50a6d0835c70795a3c7865c305b93899
    // If the new frame has a name, make sure any SiteInstances that can find
    // this named frame have proxies for it.  Must be called after
    // SetSessionStorageNamespace, since this calls CreateRenderView, which uses
-@@ -4754,12 +4760,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -4755,12 +4761,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
      AddWebContentsDestructionObserver(new_contents_impl);
    }
  
@@ -148,10 +148,10 @@ index fd851a9347dd6920e035bc9183991ea2a275aff4..579a796fcfdecf44ab415ceebc30b427
    // typically happens when popups are created.
    virtual void WebContentsCreated(WebContents* source_contents,
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index a8d9b10d1cfc44fd7b3c76b813be6c41b9a1b827..81f42913489724e621b916f1457d2966849c0f71 100644
+index a74484bcf315a4b70f5c2e23e93317e73a984320..8e023991b3fdd05ceb60cf9f87f8e9f359570226 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -6688,6 +6688,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
+@@ -6673,6 +6673,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
            request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
            GetWebFrame()->IsAdScriptInStack());
  
@@ -189,7 +189,7 @@ index 53949c3510d0755e608847e174de63f46c8c2363..f6644476d8714fd02480830ebb0f0571
                         bool opener_suppressed,
                         bool* no_javascript_access) override;
 diff --git a/third_party/blink/public/web/web_window_features.h b/third_party/blink/public/web/web_window_features.h
-index 78956238f8d959580e928d2590866b2f4da3d218..806b3337ec8a8ad7c89681857b4e81dc06301c04 100644
+index c79c07788b16c394ed413a6a739b7dcdd4697496..1b25625d84fe6b2c64de106b4e86e9acc09a0c36 100644
 --- a/third_party/blink/public/web/web_window_features.h
 +++ b/third_party/blink/public/web/web_window_features.h
 @@ -35,6 +35,7 @@
@@ -200,7 +200,7 @@ index 78956238f8d959580e928d2590866b2f4da3d218..806b3337ec8a8ad7c89681857b4e81dc
  
  namespace blink {
  
-@@ -74,6 +75,8 @@ struct WebWindowFeatures {
+@@ -69,6 +70,8 @@ struct WebWindowFeatures {
    // TODO(apaseltiner): Investigate moving this field to a non-public struct
    // since it is only needed within //third_party/blink.
    std::optional<WebVector<WebString>> attribution_srcs;
@@ -210,7 +210,7 @@ index 78956238f8d959580e928d2590866b2f4da3d218..806b3337ec8a8ad7c89681857b4e81dc
  
  }  // namespace blink
 diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
-index 679a9f2aeeebb2b238f6fabaebb40c67c60c09b9..7dee70f410e1c137b2953c112d15ad584d3c554e 100644
+index 0cf716bebc828f9c4613f276e6485781dfe20ab5..8b535ad3d4d1ea5e9cddd95c97ae029117d381b3 100644
 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc
 +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
 @@ -2251,6 +2251,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,

+ 1 - 1
patches/chromium/chore_add_electron_deps_to_gitignores.patch

@@ -18,7 +18,7 @@ index 50992a3f4502d46a1bc2713c25bec6095c541ffa..121a09d7fa00162fe64ce901cae96d8f
  /googleurl
  /gpu/gles2_conform_test
 diff --git a/third_party/.gitignore b/third_party/.gitignore
-index dd03ce6ea14668478a6bce64b8c269d2c9d46a05..6fadd25f0351ce46d75120513efb1e6c463c2603 100644
+index e40ac4ea0b646f282768c58eddd9db7f6539ccd9..767644e39c48ee0a7805ab09879b8792166d03dc 100644
 --- a/third_party/.gitignore
 +++ b/third_party/.gitignore
 @@ -51,7 +51,9 @@

+ 6 - 6
patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch

@@ -80,10 +80,10 @@ index 28cd699814f32a7a569d63936b9544567a66d9c4..fd461fa448d983481dc4c0c7d03b1945
    }
  
 diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
-index eb7b0cc15149082d56872edc8e62d7aa894c8eb1..84c141b2b950458ec1180e6dfec280fd8307eed9 100644
+index 6dc8deaa47046e9ad6c81fb0ab48eb9f374cfaeb..7b60193f537faf9b88e546aa4287b95b9fb3a593 100644
 --- a/chrome/browser/ui/browser.cc
 +++ b/chrome/browser/ui/browser.cc
-@@ -1992,12 +1992,11 @@ bool Browser::IsWebContentsCreationOverridden(
+@@ -2064,12 +2064,11 @@ bool Browser::IsWebContentsCreationOverridden(
      content::SiteInstance* source_site_instance,
      content::mojom::WindowContainerType window_container_type,
      const GURL& opener_url,
@@ -99,10 +99,10 @@ index eb7b0cc15149082d56872edc8e62d7aa894c8eb1..84c141b2b950458ec1180e6dfec280fd
  
  WebContents* Browser::CreateCustomWebContents(
 diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
-index 628c4c3c0409e48c8105865da31bd33edca1b6eb..3fe7200c3b0210b8f8be3db34b5a715ec116f9a5 100644
+index 69f2c9c0ff003b6ced9a3db101c07db76510a47d..c5cdeba9d5835f67ecda9877e3afa337ffee0c79 100644
 --- a/chrome/browser/ui/browser.h
 +++ b/chrome/browser/ui/browser.h
-@@ -966,8 +966,7 @@ class Browser : public TabStripModelObserver,
+@@ -973,8 +973,7 @@ class Browser : public TabStripModelObserver,
        content::SiteInstance* source_site_instance,
        content::mojom::WindowContainerType window_container_type,
        const GURL& opener_url,
@@ -218,10 +218,10 @@ index c5b0d3b23b8da318ae55fcac2515a1187f261469..16ed1f46c9afde0ff25750128b4fcff6
    void AddNewContents(content::WebContents* source,
                        std::unique_ptr<content::WebContents> new_contents,
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 92f2823839cdfd6139a7f13684d2649b7e230964..0a548b96a53454313fe0175a2fa3da7e7b92346f 100644
+index 1f36be39c1f345f84d3ca8666dcd7ac6dbc4ae9b..7e994945a4bd5e3db876496762ab073ac8d76155 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -4619,8 +4619,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -4620,8 +4620,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
  
    if (delegate_ && delegate_->IsWebContentsCreationOverridden(
                         source_site_instance, params.window_container_type,

+ 4 - 4
patches/chromium/custom_protocols_plzserviceworker.patch

@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
 Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
 
 diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
-index d05bf1f172378351b15f1dd5412a2e3eac2373ac..544b53a99990385d6bc45368843e89050c7b8d31 100644
+index 08bcee90d1c2332361bfa52502632d3dfb598400..71ccf45f9b94bdf9fdf1734cd3e8f349c762ee6c 100644
 --- a/content/browser/service_worker/service_worker_context_wrapper.cc
 +++ b/content/browser/service_worker/service_worker_context_wrapper.cc
-@@ -2006,6 +2006,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
+@@ -2008,6 +2008,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
        loader_factory_bundle_info =
            context()->loader_factory_bundle_for_update_check()->Clone();
  
@@ -38,7 +38,7 @@ index d05bf1f172378351b15f1dd5412a2e3eac2373ac..544b53a99990385d6bc45368843e8905
    if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
            browser_context(), scope)) {
      // If this is a Service Worker for a WebUI, the WebUI's URLDataSource
-@@ -2025,9 +2045,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
+@@ -2027,9 +2047,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
              features::kEnableServiceWorkersForChromeScheme) &&
          scope.scheme_piece() == kChromeUIScheme) {
        config->RegisterURLDataSource(browser_context());
@@ -49,7 +49,7 @@ index d05bf1f172378351b15f1dd5412a2e3eac2373ac..544b53a99990385d6bc45368843e8905
            .emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
                                          browser_context(), kChromeUIScheme,
                                          base::flat_set<std::string>()));
-@@ -2035,9 +2053,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
+@@ -2037,9 +2055,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
                     features::kEnableServiceWorkersForChromeUntrusted) &&
                 scope.scheme_piece() == kChromeUIUntrustedScheme) {
        config->RegisterURLDataSource(browser_context());

+ 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 1950b34d864c5c86ed408d91019895b4e6ed40c2..1b18893a8917a5a726d48e0e5e3a8b023845dfb1 100644
+index 1e17e24f269fb6fc758a90fa11e33fcea7ce779e..cda21f6919c1eb1dca6cd11304a5bb5d2a27dc0e 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
 @@ -557,7 +557,11 @@

+ 10 - 9
patches/chromium/disable_hidden.patch

@@ -6,7 +6,7 @@ Subject: disable_hidden.patch
 Electron uses this to disable background throttling for hidden windows.
 
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index eca8d451e4d596bcc1736f05543dffe51fb0be8a..b138cbee968e966e4d4e67a20e22d5a53ca523ae 100644
+index 4f222d812b7627bc9dbe80996530188b8558d8ab..351e9df45b4df594f5a098624ea2c2d3ed8025f1 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
 @@ -777,6 +777,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -20,18 +20,19 @@ index eca8d451e4d596bcc1736f05543dffe51fb0be8a..b138cbee968e966e4d4e67a20e22d5a5
        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 fb269d2c99012f3917ce568dbac6ea5892598f99..87b5c5d8655b039268e34c5b7a9e0a4b67ececbb 100644
+index 65032bc948aa801f1620f1c21099827f839e41f2..6ed6e9c0a39207da97a2b0d7248a46b613c217cd 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.h
 +++ b/content/browser/renderer_host/render_widget_host_impl.h
-@@ -929,6 +929,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
-   void UpdateBrowserControlsState(cc::BrowserControlsState constraints,
-                                   cc::BrowserControlsState current,
-                                   bool animate);
+@@ -993,6 +993,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
+   // Requests a commit and forced redraw in the renderer compositor.
+   void ForceRedrawForTesting();
+ 
 +  // Electron: Prevents the widget from getting hidden.
 +  bool disable_hidden_ = false;
- 
-   void StartDragging(blink::mojom::DragDataPtr drag_data,
-                      const url::Origin& source_origin,
++
+  protected:
+   // |routing_id| must not be MSG_ROUTING_NONE.
+   // If this object outlives |delegate|, DetachDelegate() must be called when
 diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
 index a2e0720681d6fdcbbed81e3602491a83bbb17bee..1bed3962a7ac89b815cb6c5827de39c3bfa2449b 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc

+ 3 - 3
patches/chromium/disable_unload_metrics.patch

@@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
 should continue seeking for a real fix.
 
 diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
-index 5c1702ff0ffc3cc0f6f68d7ba3a13e5a0fd62d78..0a71f7770651377d8db21561581471ce27118644 100644
+index 38de77460b8cfad57b010d5655787819ba320d14..a8bff1c1a41d3be17d9bca041514415aaca431d6 100644
 --- a/content/browser/renderer_host/navigator.cc
 +++ b/content/browser/renderer_host/navigator.cc
-@@ -1329,6 +1329,7 @@ void Navigator::RecordNavigationMetrics(
+@@ -1325,6 +1325,7 @@ void Navigator::RecordNavigationMetrics(
              .InMilliseconds());
    }
  
@@ -35,7 +35,7 @@ index 5c1702ff0ffc3cc0f6f68d7ba3a13e5a0fd62d78..0a71f7770651377d8db21561581471ce
    // If this is a same-process navigation and we have timestamps for unload
    // durations, fill those metrics out as well.
    if (params.unload_start && params.unload_end &&
-@@ -1378,6 +1379,7 @@ void Navigator::RecordNavigationMetrics(
+@@ -1374,6 +1375,7 @@ void Navigator::RecordNavigationMetrics(
           first_before_unload_start_time)
              .InMilliseconds());
    }

+ 2 - 2
patches/chromium/extend_apply_webpreferences.patch

@@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be
 done in future work.
 
 diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
-index 5b33d4cebaa04f11c2e9f0cfffb4fbb8fd40e324..6ba638d19b24013d9b92965f234902d019525143 100644
+index 578e6b44127f4d7f131bd568b4e5d55c2614bb56..ace1aff76fd4e9a3967c924d23693f82a6c23780 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
 @@ -168,6 +168,7 @@
@@ -23,7 +23,7 @@ index 5b33d4cebaa04f11c2e9f0cfffb4fbb8fd40e324..6ba638d19b24013d9b92965f234902d0
  #include "third_party/blink/renderer/platform/graphics/image.h"
  #include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
  #include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
-@@ -1810,6 +1811,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
+@@ -1834,6 +1835,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
  #if BUILDFLAG(IS_MAC)
    web_view_impl->SetMaximumLegibleScale(
        prefs.default_maximum_page_scale_factor);

+ 10 - 10
patches/chromium/feat_configure_launch_options_for_service_process.patch

@@ -324,7 +324,7 @@ index 9791ae2f761043b9eecd9064a6fd39a6e2339af4..1083f1683a05825f51f5b2d71f8107d9
    // launch failed.
    enum class LaunchState {
 diff --git a/content/browser/utility_sandbox_delegate.cc b/content/browser/utility_sandbox_delegate.cc
-index bb7667de8bb189d5daccf0ae824bffbb092f1c22..2e5beb5ac9dac293ca3d2824972d26d8fcd9fe06 100644
+index 5aec5f3dc619373d8faa44b23c7482bbd19d3f96..826c5d3e7022208d87fc77e8735907aa5884d994 100644
 --- a/content/browser/utility_sandbox_delegate.cc
 +++ b/content/browser/utility_sandbox_delegate.cc
 @@ -29,13 +29,15 @@ UtilitySandboxedProcessLauncherDelegate::
@@ -347,7 +347,7 @@ index bb7667de8bb189d5daccf0ae824bffbb092f1c22..2e5beb5ac9dac293ca3d2824972d26d8
  #if DCHECK_IS_ON()
    bool supported_sandbox_type =
        sandbox_type_ == sandbox::mojom::Sandbox::kNoSandbox ||
-@@ -97,11 +99,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
+@@ -98,11 +100,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
    return sandbox_type_;
  }
  
@@ -628,10 +628,10 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8
  #if BUILDFLAG(IS_MAC)
    // Whether or not to disclaim TCC responsibility for the process, defaults to
 diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc
-index 0e6de2b7b49569883a72cda97ad0abcd601ac05f..377b78d84e18c0e63f2db990088df5567d581e91 100644
+index 459e6b31d7c10e4725e2b9140a2c66472261d725..ddff9f18dfb593fdd9b8cee7a3910a4324438a47 100644
 --- a/sandbox/policy/win/sandbox_win.cc
 +++ b/sandbox/policy/win/sandbox_win.cc
-@@ -692,11 +692,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
+@@ -688,11 +688,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
  // command line flag.
  ResultCode LaunchWithoutSandbox(
      const base::CommandLine& cmd_line,
@@ -644,7 +644,7 @@ index 0e6de2b7b49569883a72cda97ad0abcd601ac05f..377b78d84e18c0e63f2db990088df556
    // Network process runs in a job even when unsandboxed. This is to ensure it
    // does not outlive the browser, which could happen if there is a lot of I/O
    // on process shutdown, in which case TerminateProcess can fail. See
-@@ -927,7 +925,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
+@@ -923,7 +921,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
  ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
      const base::CommandLine& cmd_line,
      const std::string& process_type,
@@ -653,7 +653,7 @@ index 0e6de2b7b49569883a72cda97ad0abcd601ac05f..377b78d84e18c0e63f2db990088df556
      SandboxDelegate* delegate,
      TargetPolicy* policy) {
    const base::CommandLine& launcher_process_command_line =
-@@ -941,7 +939,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
+@@ -937,7 +935,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
    }
  
    // Add any handles to be inherited to the policy.
@@ -662,7 +662,7 @@ index 0e6de2b7b49569883a72cda97ad0abcd601ac05f..377b78d84e18c0e63f2db990088df556
      policy->AddHandleToShare(handle);
  
    if (!policy->GetConfig()->IsConfigured()) {
-@@ -956,6 +954,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
+@@ -952,6 +950,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
    // have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS.
    policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE));
    policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE));
@@ -676,7 +676,7 @@ index 0e6de2b7b49569883a72cda97ad0abcd601ac05f..377b78d84e18c0e63f2db990088df556
  #endif
  
    if (!delegate->PreSpawnTarget(policy))
-@@ -968,7 +973,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
+@@ -964,7 +969,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
  ResultCode SandboxWin::StartSandboxedProcess(
      const base::CommandLine& cmd_line,
      const std::string& process_type,
@@ -685,7 +685,7 @@ index 0e6de2b7b49569883a72cda97ad0abcd601ac05f..377b78d84e18c0e63f2db990088df556
      SandboxDelegate* delegate,
      base::Process* process) {
    SandboxLaunchTimer timer;
-@@ -976,7 +981,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
+@@ -972,7 +977,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
    // Avoid making a policy if we won't use it.
    if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line,
                             *base::CommandLine::ForCurrentProcess())) {
@@ -694,7 +694,7 @@ index 0e6de2b7b49569883a72cda97ad0abcd601ac05f..377b78d84e18c0e63f2db990088df556
                                  process);
    }
  
-@@ -984,7 +989,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
+@@ -980,7 +985,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
    timer.OnPolicyCreated();
  
    ResultCode result = GeneratePolicyForSandboxedProcess(

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

@@ -7,13 +7,13 @@ Subject: feat: filter out non-shareable windows in the current application in
 This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer.  This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself.  This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started.  There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases.
 
 diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
-index 2d05b1c438266f8e7bd6b39cf87fc297849f4b42..85f88adcf55b2d996976218d18dc94123cbb1214 100644
+index 186e8ffdff742c5ce465f9d95f9b43a9af2ad8ad..ceba504ca4e59c7ccd0ffc0befe24f4f432c48df 100644
 --- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
 +++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
-@@ -171,8 +171,17 @@ void OnShareableContentCreated(SCShareableContent* content) {
-       case DesktopMediaID::TYPE_SCREEN:
-         for (SCDisplay* display in content.displays) {
-           if (source_.id == display.displayID) {
+@@ -180,8 +180,17 @@ void OnShareableContentCreated(SCShareableContent* content) {
+           // fallback. See https://crbug.com/325530044.
+           if (source_.id == display.displayID ||
+               source_.id == webrtc::kFullDesktopScreenId) {
 +            NSArray<NSWindow*>* exclude_ns_windows = [[[NSApplication sharedApplication] windows] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSWindow* win, NSDictionary *bindings) {
 +              return [win sharingType] == NSWindowSharingNone;
 +            }]];

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

@@ -23,10 +23,10 @@ Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
 Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
 
 diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
-index 87db8bec186031ca4633d59759b569ee866bd2df..fcdc3487f4432ab1faf643cca052dc7d4e2d5a7d 100644
+index 1004937569f989d3376f20102225db2ca543132c..46bece51282df087425ad6a987d051f2fc25b657 100644
 --- a/content/browser/renderer_host/navigation_request.cc
 +++ b/content/browser/renderer_host/navigation_request.cc
-@@ -10531,6 +10531,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
+@@ -10527,6 +10527,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
      }
    }
  

+ 1 - 1
patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch

@@ -75,7 +75,7 @@ index ceced82cbd23b2dcd7fabf7d63028423f86e05c3..27d0b61a7b67d1c9d7e0699e287b7833
  
  PictureInPictureOcclusionTracker*
 diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
-index aea9bedd454caf342487054e5c06c9783e9a7c38..86b0db7d7c28df09befe618832a1fbab0e625372 100644
+index 24f680b6c50d8e35f7a4650788dc1494d467f6d0..d5bb12b038e8fa68cd52129cafd2e7689cd2ae9a 100644
 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
 +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
 @@ -345,11 +345,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(

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

@@ -87,10 +87,10 @@ index 0c7d5b2c1d3e97420913bd643bb2a524a76fc286..653793fa480f035ce11e079b370bf5ed
    // The view with active text input state, i.e., a focused <input> element.
    // It will be nullptr if no such view exists. Note that the active view
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index f8ca743c5629c8e62a16cad3e2f7f76e17826751..d6460ccac4aaa0643cb724e3b5c04401ed82b20b 100644
+index 239092d0231980c9febf342c78880aeed4be47ed..95569538ea569c12c2f6a3d8f28e4bfa705173c7 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -9085,7 +9085,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
+@@ -9086,7 +9086,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
                          "WebContentsImpl::OnFocusedElementChangedInFrame",
                          "render_frame_host", frame);
    RenderWidgetHostViewBase* root_view =

+ 2 - 2
patches/chromium/fix_restore_original_resize_performance_on_macos.patch

@@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop
 vs mobile runtimes.  i.e. restore the old logic only on desktop platforms
 
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index dce15cfa7e5f2c4820257656cde2096c34dc7298..3602cf12eca27ee90db74072b4830178c43d7ce9 100644
+index efcac7b1aedb20f0cea94c61597f361d9a165633..731d762bf57e7164ca60155d6629d2a2e94461d1 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -2109,9 +2109,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
+@@ -2051,9 +2051,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
  void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
    // The resize message (which may not happen immediately) will carry with it
    // the screen info as well as the new size (if the screen has changed scale

+ 6 - 6
patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch

@@ -97,10 +97,10 @@ index 0da6278d80f365d840c9ac7c551f878c6adbeeea..4c082c719fa9641b6637ae9532ea5fc2
                              mojom::blink::WantResultOption,
                              mojom::blink::PromiseResultOption);
 diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
-index 72a5ae6c7ede80fa2f5c088c5f3acf35a7116737..acb1d814098b9526511135d4101d70a57e7b2777 100644
+index b1c9a584be0baaa868fbcd1b6ead72e73808154c..b9afebbbb383f2eb5fc08efc1b5d89f89ce004e3 100644
 --- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
-@@ -955,6 +955,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
+@@ -954,6 +954,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
              std::move(callback).Run(value ? std::move(*value) : base::Value());
            },
            std::move(callback)),
@@ -216,10 +216,10 @@ index 9d4a82292e58df96589c4fb9efb5469042a3faf8..0d76dc78f8e8d8832fc4801664f2f7aa
        mojom::blink::WantResultOption::kWantResult, wait_for_promise);
  }
 diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
-index 4870d2a0cf167a91b9367f02bd5e442418f26e01..b6ffe4fc6b049de584b3e1bdbab3abf341aa8df1 100644
+index 73111871ec1859dc10d6f0bf8160fed3dd7ace18..2962322eefba6c317c6a19bfce36d6a76a028abe 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
-@@ -1084,14 +1084,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
+@@ -1083,14 +1083,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
      mojom::blink::EvaluationTiming evaluation_timing,
      mojom::blink::LoadEventBlockingOption blocking_option,
      WebScriptExecutionCallback callback,
@@ -238,10 +238,10 @@ index 4870d2a0cf167a91b9367f02bd5e442418f26e01..b6ffe4fc6b049de584b3e1bdbab3abf3
  
  v8::MaybeLocal<v8::Value> WebLocalFrameImpl::CallFunctionEvenIfScriptDisabled(
 diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
-index 9e54deed098ca7c53d67399310d81e241b3e545c..b228de5b7471e8ee638769e4ab433175bf90e13f 100644
+index dc77c55900a20f3b6ac1c5ac3b03e9d1253cb9cf..a1cfeb937988624178eb2db299760dd7d607043c 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
-@@ -194,6 +194,7 @@ class CORE_EXPORT WebLocalFrameImpl final
+@@ -195,6 +195,7 @@ class CORE_EXPORT WebLocalFrameImpl final
                              mojom::blink::EvaluationTiming,
                              mojom::blink::LoadEventBlockingOption,
                              WebScriptExecutionCallback,

+ 1 - 1
patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch

@@ -21,7 +21,7 @@ index 39e18820db0d0c1b57f4375e01d269e53c839e4e..ea4da67a9b7798822d1d5dd90d09597a
        properties->supports_global_application_menus = true;
        properties->app_modal_dialogs_use_event_blocker = true;
 diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h
-index bc3dce09be325a1a1754da3311f15681f74ce88d..b02e0295ecd35844d3e40b03c73955f8a64cdd9c 100644
+index 67059788c5facdc604cd635dc90b7621c459eb24..2c307378f066668804a502fd146714be7ca5196c 100644
 --- a/ui/ozone/public/ozone_platform.h
 +++ b/ui/ozone/public/ozone_platform.h
 @@ -121,6 +121,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform {

+ 20 - 20
patches/chromium/mas_avoid_private_macos_api_usage.patch.patch

@@ -35,7 +35,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
 system priority.
 
 diff --git a/base/BUILD.gn b/base/BUILD.gn
-index 4ae52e5351615e69074f528e971cf793645283aa..e63fe9910de091bee27716bbfcff81553ae82c5b 100644
+index b3e994ed5c39854b88a1b6c1b5bc964cdd0f4248..2b3eddc12848ee3da33b0cda32bb9e8ecaf67a57 100644
 --- a/base/BUILD.gn
 +++ b/base/BUILD.gn
 @@ -1052,6 +1052,7 @@ component("base") {
@@ -73,7 +73,7 @@ index 4bf9a3c27e05c6635b2beb8e880b5b43dbed61b5..57d4756c0d87b9313e8566b3083c0132
  
  }  // namespace base
 diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
-index 99d801d0fe89804bd87851c87f1ce76acff9f894..327c93478f491d098464f40dac7b936492f6e6fa 100644
+index d1b09cb1a75000cf41f31bddcdcb739f776920aa..825a6ecd65bc4e3412db83413d6de34ea997ddd0 100644
 --- a/base/process/launch_mac.cc
 +++ b/base/process/launch_mac.cc
 @@ -21,13 +21,18 @@
@@ -543,7 +543,7 @@ index fe37e5d17d217ad2a7861ac9dba2e61de5a063aa..ab8c04e648f320412de16ce31c134b28
    // 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 4cfc7dd8fedd289dbbbcf34ed552c307da005328..1950b34d864c5c86ed408d91019895b4e6ed40c2 100644
+index 2ad8852bf38dbfbdc600a5a21b354385338eb81e..1e17e24f269fb6fc758a90fa11e33fcea7ce779e 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
 @@ -272,8 +272,10 @@
@@ -557,7 +557,7 @@ index 4cfc7dd8fedd289dbbbcf34ed552c307da005328..1950b34d864c5c86ed408d91019895b4
  
    // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
    // pointers. `ns_view_` gets reinitialized later in this method.
-@@ -1655,8 +1657,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1656,8 +1658,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  
  gfx::NativeViewAccessible
  RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -568,7 +568,7 @@ index 4cfc7dd8fedd289dbbbcf34ed552c307da005328..1950b34d864c5c86ed408d91019895b4
    return [GetInProcessNSView() window];
  }
  
-@@ -1705,9 +1709,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1706,9 +1710,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  }
  
  void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -580,7 +580,7 @@ index 4cfc7dd8fedd289dbbbcf34ed552c307da005328..1950b34d864c5c86ed408d91019895b4
  }
  
  bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
-@@ -2231,20 +2237,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -2232,20 +2238,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken(
      GetRenderWidgetAccessibilityTokenCallback callback) {
    base::ProcessId pid = getpid();
@@ -608,10 +608,10 @@ index 4cfc7dd8fedd289dbbbcf34ed552c307da005328..1950b34d864c5c86ed408d91019895b4
  
  ///////////////////////////////////////////////////////////////////////////////
 diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
-index 4c05c03b390262dfccc34c58310a3077ff2bebab..faeac6eacc0d92224ce2a5ee59847226c34f284d 100644
+index 45490079b1f7b651532bc4758204aa872a52f7dc..409e530483da72db1f127ed8b1ab14bd3fb4b55b 100644
 --- a/content/common/BUILD.gn
 +++ b/content/common/BUILD.gn
-@@ -234,6 +234,7 @@ source_set("common") {
+@@ -236,6 +236,7 @@ source_set("common") {
      "//content:content_implementation",
      "//build/config:precompiled_headers",
    ]
@@ -700,7 +700,7 @@ index a119b4439bfb9218c7aaf09dca8e78527da7f20d..faa813b003940280c6eeb87e70173019
  
  }  // namespace content
 diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
-index b477623aaa45514e0c8bab35ec63f32d80ac7197..63b8503375d287c1c27f54beec20c520eb4753eb 100644
+index c69b0bb7c1c0a62a124b86bea02523d469f5e388..5314f8557fef9a66183ecde560a4ee6fcc1bc4d8 100644
 --- a/content/test/BUILD.gn
 +++ b/content/test/BUILD.gn
 @@ -504,6 +504,7 @@ static_library("test_support") {
@@ -719,7 +719,7 @@ index b477623aaa45514e0c8bab35ec63f32d80ac7197..63b8503375d287c1c27f54beec20c520
  }
  
  mojom("content_test_mojo_bindings") {
-@@ -1718,6 +1720,7 @@ test("content_browsertests") {
+@@ -1717,6 +1719,7 @@ test("content_browsertests") {
    defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
  
    configs += [ "//build/config:precompiled_headers" ]
@@ -1517,11 +1517,11 @@ index fc25ba79d2b0e1acdb7ba54b89e7d6e16f94771b..962df2d65d61ec0836cf465d847eb666
  
  }  // namespace
 diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn
-index 761d9361972720855719ae3418e19c623c465361..752744e489b9b2c184012562985e7803ef685b17 100644
+index d8e29c85add32bc13989aae412f953d5b2e5a7d3..03bea16fc3c62717c3a4072327af681a38c571ca 100644
 --- a/ui/display/BUILD.gn
 +++ b/ui/display/BUILD.gn
-@@ -69,6 +69,10 @@ component("display") {
-       "mac/display_link_mac.h",
+@@ -71,6 +71,10 @@ component("display") {
+       "mac/display_link_mac.mm",
        "mac/screen_mac.mm",
      ]
 +
@@ -1617,10 +1617,10 @@ index cd6c9a924dce762ff935ef722c8873c974772225..b162795219e0fac3d9caa6bbfead126c
      sources += [
        "test/desktop_window_tree_host_win_test_api.cc",
 diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
-index 06cb52062e66fc27c00941e703b909cf42cfa322..309f7a351b8a2aa2ccc42a084a5af086ddb8691d 100644
+index 11eaaf61d4ca39a0e2a0fd8df0e7e671b33d6413..13ca9dfacc92702af348f137cb0b095e441a5245 100644
 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
 +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
-@@ -30,7 +30,9 @@
+@@ -31,7 +31,9 @@
  #include "ui/views/window/dialog_observer.h"
  
  @class NativeWidgetMacNSWindow;
@@ -1630,7 +1630,7 @@ index 06cb52062e66fc27c00941e703b909cf42cfa322..309f7a351b8a2aa2ccc42a084a5af086
  @class NSView;
  
  namespace remote_cocoa {
-@@ -465,10 +467,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
+@@ -470,10 +472,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
    mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
        remote_ns_window_remote_;
  
@@ -1644,7 +1644,7 @@ index 06cb52062e66fc27c00941e703b909cf42cfa322..309f7a351b8a2aa2ccc42a084a5af086
    // Used to force the NSApplication's focused accessibility element to be the
    // views::Views accessibility tree when the NSView for this is focused.
 diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
-index b50e6f05254ea9e12985fa18b5468c3c020cf3cf..43051bb6a54ed56b2f920555f096494e1a5a65a8 100644
+index 7e071a6aad7457265846f6316e4a72bcff7f1a0b..d81d117b7e2372d6ad6795a85f48e85f8f49efa0 100644
 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
 +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
 @@ -345,7 +345,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1671,7 +1671,7 @@ index b50e6f05254ea9e12985fa18b5468c3c020cf3cf..43051bb6a54ed56b2f920555f096494e
  }
  
  remote_cocoa::mojom::NativeWidgetNSWindow*
-@@ -1265,9 +1273,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
+@@ -1280,9 +1288,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
    // for PWAs. However this breaks accessibility on in-process windows,
    // so set it back to NO when a local window gains focus. See
    // https://crbug.com/41485830.
@@ -1683,7 +1683,7 @@ index b50e6f05254ea9e12985fa18b5468c3c020cf3cf..43051bb6a54ed56b2f920555f096494e
    // Explicitly set the keyboard accessibility state on regaining key
    // window status.
    if (is_key && is_content_first_responder)
-@@ -1420,17 +1430,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
+@@ -1442,17 +1452,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
  void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
      const std::vector<uint8_t>& window_token,
      const std::vector<uint8_t>& view_token) {
@@ -1704,7 +1704,7 @@ index b50e6f05254ea9e12985fa18b5468c3c020cf3cf..43051bb6a54ed56b2f920555f096494e
    *pid = getpid();
    id element_id = GetNativeViewAccessible();
  
-@@ -1443,6 +1456,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
+@@ -1465,6 +1478,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
    }
  
    *token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id);

+ 2 - 2
patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch

@@ -10,10 +10,10 @@ an about:blank check to this area.
 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
 
 diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
-index 58b8be3dc44511278dd2d39c988158e3cbe04085..3b74f29c000662c2f1a45040cadc675c18faab3d 100644
+index cbd93364ad4c43dfa7fd0b3506ba65059dfc9fc5..995eae8fffc5edeccbfc4e608aeb5d18e0d41b5b 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -787,8 +787,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
+@@ -785,8 +785,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
    // TODO(crbug.com/40092527): Consider adding a separate boolean that
    // tracks this instead of piggybacking `origin_calculation_debug_info`.
    if (renderer_side_origin.opaque() &&

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

@@ -39,7 +39,7 @@ index d236578cefc347e772305ac7ec54b9734e4aa20b..6bb89cea3b6b91ec8ea351ed60c4e405
                  ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
                                                 kCloseButtonIconSize));
 diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
-index 74288023812360a58f6edbb15e6d644b0c37f7fb..aea9bedd454caf342487054e5c06c9783e9a7c38 100644
+index 48102b17ba779e1a3eb7755f04a7dfa5ebbe40fc..24f680b6c50d8e35f7a4650788dc1494d467f6d0 100644
 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
 +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
 @@ -17,9 +17,11 @@

+ 1 - 1
patches/chromium/printing.patch

@@ -11,7 +11,7 @@ majority of changes originally come from these PRs:
 This patch also fixes callback for manual user cancellation and success.
 
 diff --git a/BUILD.gn b/BUILD.gn
-index cd1403cf253cc1f545be1d0aaa7edfab8eca30be..1bae27e3ed6669ecf9cabfea4f3e4b94fb0a5d84 100644
+index 2902e374bb1a2bb28a1015ab342acd30c96cdc98..142bad995ce18e38849b1c4881851a863b62884b 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
 @@ -979,7 +979,6 @@ if (is_win) {

+ 6 - 6
patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch

@@ -30,10 +30,10 @@ index e8738cf3a033f69a2e8eaf06f1a9f61bf83e9066..b3777cb41cb5c6b007122ae808732765
    // RenderWidgetHost on the primary main frame, and false otherwise.
    virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index b138cbee968e966e4d4e67a20e22d5a53ca523ae..dce15cfa7e5f2c4820257656cde2096c34dc7298 100644
+index 351e9df45b4df594f5a098624ea2c2d3ed8025f1..efcac7b1aedb20f0cea94c61597f361d9a165633 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -2043,6 +2043,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
+@@ -1985,6 +1985,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
    if (view_) {
      view_->UpdateCursor(cursor);
    }
@@ -44,10 +44,10 @@ index b138cbee968e966e4d4e67a20e22d5a53ca523ae..dce15cfa7e5f2c4820257656cde2096c
  
  void RenderWidgetHostImpl::ShowContextMenuAtPoint(
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 50a6d0835c70795a3c7865c305b9389936939ee9..92f2823839cdfd6139a7f13684d2649b7e230964 100644
+index 52ca5fc9774f74547f8231db8028fb9eb0b62996..1f36be39c1f345f84d3ca8666dcd7ac6dbc4ae9b 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -5404,6 +5404,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
+@@ -5405,6 +5405,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
    return text_input_manager_.get();
  }
  
@@ -60,10 +60,10 @@ index 50a6d0835c70795a3c7865c305b9389936939ee9..92f2823839cdfd6139a7f13684d2649b
      RenderWidgetHostImpl* render_widget_host) {
    return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost();
 diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
-index c00653f5cb694f07dd20f2e8f4a672e285a9a724..d469afd4bbd0013784d8a0cffa0622a6225d2c87 100644
+index eefe5b401638e17f38f6b841086f12046b45b2bf..35f727d27bdeaca03c811f018fa28b9c9796375b 100644
 --- a/content/browser/web_contents/web_contents_impl.h
 +++ b/content/browser/web_contents/web_contents_impl.h
-@@ -1078,6 +1078,7 @@ class CONTENT_EXPORT WebContentsImpl
+@@ -1082,6 +1082,7 @@ class CONTENT_EXPORT WebContentsImpl
    void SendScreenRects() override;
    void SendActiveState(bool active) override;
    TextInputManager* GetTextInputManager() override;

+ 3 - 3
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 c9b1737f91452e4a3bb5bb16c8191057b16afda3..61b32cf1b0f9886dff720e6f581d76d2fea932da 100644
+index d2a2794dd355993084b2b4d37c0cb4b597a8f55b..5a8d990236984d4c7b7ef54accd94dce348d40f6 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_base.cc
-@@ -742,6 +742,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableForIOv2For(
+@@ -747,6 +747,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableForIOv2For(
    return false;
  }
  
@@ -24,7 +24,7 @@ index c9b1737f91452e4a3bb5bb16c8191057b16afda3..61b32cf1b0f9886dff720e6f581d76d2
      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 1a7932a580836bae3b92c63aa9bfeb56b250ee61..dc31ac9ef4dc708b44afb806d311e38a4f0597a3 100644
+index c5d3a88ea14af5f8281d541d12a02802f1cdc351..41d708ec314d5f5916a6c51eed364384e3e25bc7 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.h
 +++ b/content/browser/renderer_host/render_widget_host_view_base.h
 @@ -26,10 +26,12 @@

+ 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 c35f1b734745addf3a495b1d69957ad13fe954fb..ce54376e4a56053fc8dc33ceeabcbc26f85ae40a 100644
+index 010692aac03eb0cc77c86a0a7d70560a308e653b..b7ce77bc5981331caf1a46c5eb4e9c3c4a79b3d5 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
 @@ -1574,7 +1574,7 @@ if (is_chrome_branded && !is_android) {

+ 6 - 6
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 0a548b96a53454313fe0175a2fa3da7e7b92346f..bfef0d4ad7d543bd0f7cc5b0e57d067c1d8fc944 100644
+index 7e994945a4bd5e3db876496762ab073ac8d76155..fa60a21219cfbd35790222e355c734c5309b937c 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -3609,6 +3609,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
+@@ -3610,6 +3610,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
        params.main_frame_name, GetOpener(), primary_main_frame_policy,
        base::UnguessableToken::Create());
  
@@ -26,7 +26,7 @@ index 0a548b96a53454313fe0175a2fa3da7e7b92346f..bfef0d4ad7d543bd0f7cc5b0e57d067c
    std::unique_ptr<WebContentsViewDelegate> delegate =
        GetContentClient()->browser()->GetWebContentsViewDelegate(this);
  
-@@ -3619,6 +3626,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
+@@ -3620,6 +3627,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
      view_ = CreateWebContentsView(this, std::move(delegate),
                                    &render_view_host_delegate_view_);
    }
@@ -35,10 +35,10 @@ index 0a548b96a53454313fe0175a2fa3da7e7b92346f..bfef0d4ad7d543bd0f7cc5b0e57d067c
    CHECK(view_.get());
  
 diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
-index 4d573eb5d291776143c7f3a32192d20df3ec99d7..370f4e32bd3a5d8a9d3ff73f90a74c5c091a802d 100644
+index 1ee36913ac37c260bd3f718f1220598c1983c127..1788de12b06c290228f3e8a188a882611539d3cc 100644
 --- a/content/public/browser/web_contents.h
 +++ b/content/public/browser/web_contents.h
-@@ -104,10 +104,13 @@ class BrowserContext;
+@@ -105,10 +105,13 @@ class BrowserContext;
  class BrowserPluginGuestDelegate;
  class RenderFrameHost;
  class RenderViewHost;
@@ -52,7 +52,7 @@ index 4d573eb5d291776143c7f3a32192d20df3ec99d7..370f4e32bd3a5d8a9d3ff73f90a74c5c
  class WebUI;
  struct DropData;
  struct MHTMLGenerationParams;
-@@ -254,6 +257,10 @@ class WebContents : public PageNavigator,
+@@ -255,6 +258,10 @@ class WebContents : public PageNavigator,
      network::mojom::WebSandboxFlags starting_sandbox_flags =
          network::mojom::WebSandboxFlags::kNone;
  

+ 6 - 6
patches/chromium/webview_fullscreen.patch

@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
 `api::WebContents::IsFullscreenForTabOrPending` value.
 
 diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
-index a08b52002aa0feab5183cd22016f3b0753a2108e..58b8be3dc44511278dd2d39c988158e3cbe04085 100644
+index ccfee9748a686a450a00f8fee9f19728bb73e9d3..cbd93364ad4c43dfa7fd0b3506ba65059dfc9fc5 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -7703,6 +7703,17 @@ void RenderFrameHostImpl::EnterFullscreen(
+@@ -7690,6 +7690,17 @@ void RenderFrameHostImpl::EnterFullscreen(
      }
    }
  
@@ -37,10 +37,10 @@ index a08b52002aa0feab5183cd22016f3b0753a2108e..58b8be3dc44511278dd2d39c988158e3
    if (had_fullscreen_token && !GetView()->HasFocus())
      GetView()->Focus();
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index bfef0d4ad7d543bd0f7cc5b0e57d067c1d8fc944..f8ca743c5629c8e62a16cad3e2f7f76e17826751 100644
+index fa60a21219cfbd35790222e355c734c5309b937c..239092d0231980c9febf342c78880aeed4be47ed 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -3864,21 +3864,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
+@@ -3865,21 +3865,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
      const input::NativeWebKeyboardEvent& event) {
    OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
                          "WebContentsImpl::PreHandleKeyboardEvent");
@@ -78,7 +78,7 @@ index bfef0d4ad7d543bd0f7cc5b0e57d067c1d8fc944..f8ca743c5629c8e62a16cad3e2f7f76e
  }
  
  bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
-@@ -4035,7 +4039,7 @@ void WebContentsImpl::EnterFullscreenMode(
+@@ -4036,7 +4040,7 @@ void WebContentsImpl::EnterFullscreenMode(
    OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
    DCHECK(CanEnterFullscreenMode(requesting_frame));
    DCHECK(requesting_frame->IsActive());
@@ -88,7 +88,7 @@ index bfef0d4ad7d543bd0f7cc5b0e57d067c1d8fc944..f8ca743c5629c8e62a16cad3e2f7f76e
            features::kAutomaticFullscreenContentSetting)) {
      // Ensure the window is made active to take input focus. The user may have
 diff --git a/third_party/blink/renderer/core/fullscreen/fullscreen.cc b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
-index 7c69e3d4fc1a115f0d2b0d318566653279fa2741..f6a7ab2e25bf3c8345c82648efaa80983b425c27 100644
+index 5cb222aa469134e03af008f52e5e95fd5e2e2053..1b5fe8416277addbd3ef769f15ae0e1812f7c9f4 100644
 --- a/third_party/blink/renderer/core/fullscreen/fullscreen.cc
 +++ b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
 @@ -112,7 +112,7 @@ void FullscreenElementChanged(Document& document,

+ 1 - 1
patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch

@@ -8,7 +8,7 @@ This definition conflicts with libuv's: https://github.com/libuv/libuv/blob/bb0b
 Breaks the build on 32-bit windows.
 
 diff --git a/include/perfetto/ext/base/sys_types.h b/include/perfetto/ext/base/sys_types.h
-index bcb6433a23d160d69b52095280c024ff71e984cc..e5f575ee694153e87168bfc4d563d9fd35ecaaa4 100644
+index 33ef5e7d652807f2607466287eadd053c9c0ab67..dc1197ba0d6e30e22ddab55c4a57de30193fb1f5 100644
 --- a/include/perfetto/ext/base/sys_types.h
 +++ b/include/perfetto/ext/base/sys_types.h
 @@ -33,11 +33,7 @@ using uid_t = int;

+ 4 - 4
patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch

@@ -11,7 +11,7 @@ This is a non-ABI breaking solution added by Node.js in v20.x for:
 which are necessary for backporting the vm-related memory fixes in https://github.com/nodejs/node/pull/48510.
 
 diff --git a/include/v8-object.h b/include/v8-object.h
-index 063462864ab87f3887f6aa75191ddcb1ec8320f9..785f0c4f831681037b9588a6f65e5ef6619d394e 100644
+index 170429bf163b02963c0d59de4cd2b19bedf2e54a..c131d78dc92a37b92ef4608f8954bff4b8884a77 100644
 --- a/include/v8-object.h
 +++ b/include/v8-object.h
 @@ -22,6 +22,8 @@ class Function;
@@ -23,7 +23,7 @@ index 063462864ab87f3887f6aa75191ddcb1ec8320f9..785f0c4f831681037b9588a6f65e5ef6
  
  /**
   * A private symbol
-@@ -543,6 +545,21 @@ class V8_EXPORT Object : public Value {
+@@ -526,6 +528,21 @@ class V8_EXPORT Object : public Value {
          index);
    }
  
@@ -46,10 +46,10 @@ index 063462864ab87f3887f6aa75191ddcb1ec8320f9..785f0c4f831681037b9588a6f65e5ef6
    V8_INLINE static void* GetAlignedPointerFromInternalField(
        const BasicTracedReference<Object>& object, int index) {
 diff --git a/src/api/api.cc b/src/api/api.cc
-index 25ec0de2ff0b71451c64b47e83006e22813c44fa..da446139396ee7d09202f8eee60a2e095177bbd1 100644
+index 513bcb47e30a72c5818fcad3873b9af6f787596e..e48b8ef2d4ecdabf2a77e2219c5805f14c7a01e1 100644
 --- a/src/api/api.cc
 +++ b/src/api/api.cc
-@@ -6311,14 +6311,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
+@@ -6282,14 +6282,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
        isolate);
  }
  

+ 12 - 12
patches/v8/revert_heap_add_checks_position_info.patch

@@ -63,10 +63,10 @@ index 27fbc04bc880f2ea68dc7a126b8091a3b5ab4025..42d9649c5250c06a4d39ba0306cbdea0
  }  // namespace internal
  }  // namespace v8
 diff --git a/src/objects/objects.cc b/src/objects/objects.cc
-index 71c4b37adcc03901a289d4f01554bfb61356942d..0faa5d7f0ef0a80de99feaf6b0a3f338a216bd7a 100644
+index b84b556ee68370796796dc8a82fd6a8fb49068f5..5ccf04ae031cb1d2bedf00ba667cfc674b013150 100644
 --- a/src/objects/objects.cc
 +++ b/src/objects/objects.cc
-@@ -4316,7 +4316,6 @@ namespace {
+@@ -4340,7 +4340,6 @@ namespace {
  template <typename Char>
  bool GetPositionInfoSlowImpl(base::Vector<Char> source, int position,
                               Script::PositionInfo* info) {
@@ -74,7 +74,7 @@ index 71c4b37adcc03901a289d4f01554bfb61356942d..0faa5d7f0ef0a80de99feaf6b0a3f338
    if (position < 0) {
      position = 0;
    }
-@@ -4363,11 +4362,25 @@ int GetLength(const String::LineEndsVector& vector) {
+@@ -4387,11 +4386,25 @@ int GetLength(const String::LineEndsVector& vector) {
  }
  
  int GetLength(const Tagged<FixedArray>& array) { return array->length(); }
@@ -103,7 +103,7 @@ index 71c4b37adcc03901a289d4f01554bfb61356942d..0faa5d7f0ef0a80de99feaf6b0a3f338
    const int ends_len = GetLength(ends);
    if (ends_len == 0) return false;
  
-@@ -4406,31 +4419,6 @@ bool GetLineEndsContainerPositionInfo(const LineEndsContainer& ends,
+@@ -4430,31 +4443,6 @@ bool GetLineEndsContainerPositionInfo(const LineEndsContainer& ends,
      info->column = position - info->line_start;
    }
  
@@ -135,7 +135,7 @@ index 71c4b37adcc03901a289d4f01554bfb61356942d..0faa5d7f0ef0a80de99feaf6b0a3f338
    // Line end is position of the linebreak character.
    info->line_end = GetLineEnd(ends, info->line);
    if (info->line_end > 0) {
-@@ -4499,23 +4487,6 @@ bool Script::GetPositionInfoWithLineEnds(
+@@ -4523,23 +4511,6 @@ bool Script::GetPositionInfoWithLineEnds(
    return true;
  }
  
@@ -317,10 +317,10 @@ index d04bb9bf73b4b5725c99dade26510f4964ec0d4b..bb59c92a780160c4168349bfc5d523df
    AddressToTraceMap address_to_trace_;
  };
 diff --git a/src/profiler/heap-snapshot-generator.cc b/src/profiler/heap-snapshot-generator.cc
-index 9f92ebe9dc1d2412551be30a5299882883510316..c24078ed95e885b5ff307d9bf82e8fac117e5000 100644
+index 4eeefebbd5d3ab4c47d2977de5f1550b82efed3f..1b9421fa24498151f6f48234896749243685e302 100644
 --- a/src/profiler/heap-snapshot-generator.cc
 +++ b/src/profiler/heap-snapshot-generator.cc
-@@ -2999,6 +2999,7 @@ bool HeapSnapshotGenerator::GenerateSnapshot() {
+@@ -2998,6 +2998,7 @@ bool HeapSnapshotGenerator::GenerateSnapshot() {
    IsolateSafepointScope scope(heap_);
  
    Isolate* isolate = heap_->isolate();
@@ -328,7 +328,7 @@ index 9f92ebe9dc1d2412551be30a5299882883510316..c24078ed95e885b5ff307d9bf82e8fac
    auto temporary_global_object_tags =
        v8_heap_explorer_.CollectTemporaryGlobalObjectsTags();
  
-@@ -3010,7 +3011,6 @@ bool HeapSnapshotGenerator::GenerateSnapshot() {
+@@ -3009,7 +3010,6 @@ bool HeapSnapshotGenerator::GenerateSnapshot() {
    // DisallowGarbageCollection scope as the HeapObjectIterator used during
    // snapshot creation enters a safepoint as well. However, in practice we
    // already enter a safepoint above so that should never trigger a GC.
@@ -336,7 +336,7 @@ index 9f92ebe9dc1d2412551be30a5299882883510316..c24078ed95e885b5ff307d9bf82e8fac
  
    NullContextForSnapshotScope null_context_scope(isolate);
  
-@@ -3021,7 +3021,6 @@ bool HeapSnapshotGenerator::GenerateSnapshot() {
+@@ -3020,7 +3020,6 @@ bool HeapSnapshotGenerator::GenerateSnapshot() {
  
    snapshot_->AddSyntheticRootEntries();
  
@@ -344,7 +344,7 @@ index 9f92ebe9dc1d2412551be30a5299882883510316..c24078ed95e885b5ff307d9bf82e8fac
    if (!FillReferences()) return false;
  
    snapshot_->FillChildren();
-@@ -3092,9 +3091,12 @@ bool HeapSnapshotGenerator::FillReferences() {
+@@ -3091,9 +3090,12 @@ bool HeapSnapshotGenerator::FillReferences() {
  const int HeapSnapshotJSONSerializer::kNodeFieldsCount = 7;
  
  void HeapSnapshotJSONSerializer::Serialize(v8::OutputStream* stream) {
@@ -358,7 +358,7 @@ index 9f92ebe9dc1d2412551be30a5299882883510316..c24078ed95e885b5ff307d9bf82e8fac
    DCHECK_NULL(writer_);
    writer_ = new OutputStreamWriter(stream);
    SerializeImpl();
-@@ -3452,17 +3454,10 @@ void HeapSnapshotJSONSerializer::SerializeTraceNodeInfos() {
+@@ -3451,17 +3453,10 @@ void HeapSnapshotJSONSerializer::SerializeTraceNodeInfos() {
      // The cast is safe because script id is a non-negative Smi.
      buffer_pos =
          utoa(static_cast<unsigned>(info->script_id), buffer, buffer_pos);
@@ -379,7 +379,7 @@ index 9f92ebe9dc1d2412551be30a5299882883510316..c24078ed95e885b5ff307d9bf82e8fac
      buffer[buffer_pos++] = '\0';
      writer_->AddString(buffer.begin());
 diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
-index f151a848b0eb76b79c8f34296400d7311541e603..d3e703c678180628ff6e2ecf528dd2dcc82a804f 100644
+index 53a56d46fc5ac7a58461dcab9f9638322b98b994..c78b5633ab02cc3f5bae3fc6d3ac1dc6ec6561a1 100644
 --- a/test/cctest/test-heap-profiler.cc
 +++ b/test/cctest/test-heap-profiler.cc
 @@ -2869,6 +2869,8 @@ TEST(ArrayGrowLeftTrim) {