diff --git a/DEPS b/DEPS index adfeb15f6296..0b9d01f05799 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '118.0.5975.0', + '118.0.5991.0', 'node_version': 'v18.17.1', 'nan_version': diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index ce7bb0428cb5..1fc02fc3d83b 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -37,6 +37,8 @@ static_library("chrome") { "//chrome/browser/icon_loader.h", "//chrome/browser/icon_manager.cc", "//chrome/browser/icon_manager.h", + "//chrome/browser/media/webrtc/desktop_capturer_wrapper.cc", + "//chrome/browser/media/webrtc/desktop_capturer_wrapper.h", "//chrome/browser/media/webrtc/desktop_media_list.cc", "//chrome/browser/media/webrtc/desktop_media_list.h", "//chrome/browser/media/webrtc/desktop_media_list_base.cc", @@ -44,6 +46,8 @@ static_library("chrome") { "//chrome/browser/media/webrtc/desktop_media_list_observer.h", "//chrome/browser/media/webrtc/native_desktop_media_list.cc", "//chrome/browser/media/webrtc/native_desktop_media_list.h", + "//chrome/browser/media/webrtc/thumbnail_capturer.cc", + "//chrome/browser/media/webrtc/thumbnail_capturer.h", "//chrome/browser/media/webrtc/window_icon_util.h", "//chrome/browser/net/chrome_mojo_proxy_resolver_factory.cc", "//chrome/browser/net/chrome_mojo_proxy_resolver_factory.h", diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 997cf0f3955b..1d1ccf1594ce 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index d1e9ad95891487b37e2e03cb2a220eb969e877ab..13bdc6cf7ba4221f0a3219975a0825eb int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 662db5f4bcb4fb110817a0cd87888969247c6b6b..d0af10cfb032dfe7775290d24b558de2c277a820 100644 +index 54368c4a6ae9e2fb40017ecb31228a035dacf4cb..dceea20dd2a53fa079da7263e3161e1bd86279fe 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4461,6 +4461,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4474,6 +4474,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,7 +40,7 @@ index 662db5f4bcb4fb110817a0cd87888969247c6b6b..d0af10cfb032dfe7775290d24b558de2 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index ff2fe1a44cc6202ec519ee368032b4a6b012169b..ccc22cb3222135c25c377cb57c8277ecadca12f9 100644 +index bbca34db538e7fcfa54a845485e4c3e93507b754..988dafcd1f22c7e74386308825556f71e1b69ff1 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -611,6 +611,8 @@ class CONTENT_EXPORT RenderFrameImpl @@ -53,10 +53,10 @@ index ff2fe1a44cc6202ec519ee368032b4a6b012169b..ccc22cb3222135c25c377cb57c8277ec 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 c96c0f2bfe7f07bcb81b662c03829b810bb59923..805337b138c299ede125e86979389d5153e2cde9 100644 +index cb4cd28c051c3ac4f97981e44636a6ea7d311c39..8eb2fd06f694c2c390427a0e981960f9292e9659 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -619,6 +619,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -620,6 +620,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -123,10 +123,10 @@ index ee4555b8ee7eab9b1ef7ef532fe94649f60c36b1..02b8bd5ce9579b4517f8188cfcb28f60 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 1934ca82e3e26e0f5c4f2f7b417df6bcd6e66abf..1277b858f2d5b4b0a0dd1c97282eff0d763cdc2b 100644 +index 507d02dc496a2324274e12501cb9ff080a0ed401..abcff9a4020578ef435bfa7c0dc0f9d8330bfa6b 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -403,6 +403,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -407,6 +407,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch index a4e3ced76cfe..ae69a30822ff 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -34,7 +34,7 @@ index d44652650891eff7cd6111bc6d6454a009942cb6..16522609163ba6bc422fc30a8d145a25 void SendRendererPreferencesToRenderer( const blink::RendererPreferences& preferences); diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc -index fda4a9605d1f5cd1f19c3504194b66d603c2e4e0..9c953d9c6519df7683b74be0b4ab79e0d5587340 100644 +index 9b7814890a4f513e8b9e07fbac370a40af6dac15..ee2b3bc3aabf7f5a8e3d2ad57675537f21aafaa6 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -562,8 +562,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) { @@ -99,10 +99,10 @@ index 8a18ecf567cd3a6a2fb1627083a5544a93198bf4..6bb4074e033e045de164bc776f75f152 // Visibility ----------------------------------------------------------- diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index 36513717f5fd901db6420c2355a0301a336c34bb..ee358e58de1e744025237373623e5ddbb2b5ba01 100644 +index 1043f13dd1d47ba58e2cf5311d2ed2387ba97b14..fd48c793a0d447a4a6777f94c5b580fdf9b5b2d9 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -2404,6 +2404,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( +@@ -2407,6 +2407,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal", "old_state", old_state, "new_state", new_state); @@ -113,7 +113,7 @@ index 36513717f5fd901db6420c2355a0301a336c34bb..ee358e58de1e744025237373623e5ddb 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 && -@@ -3868,17 +3872,31 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3875,20 +3879,34 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -129,8 +129,11 @@ index 36513717f5fd901db6420c2355a0301a336c34bb..ee358e58de1e744025237373623e5ddb bool is_initial_state) { DCHECK(GetPage()); - GetPage()->SetVisibilityState(visibility_state, is_initial_state); +- // Do not throttle if the page should be painting. - GetPage()->GetPageScheduler()->SetPageVisible( -- visibility_state == mojom::blink::PageVisibilityState::kVisible); +- visibility_state == mojom::blink::PageVisibilityState::kVisible || +- visibility_state == +- mojom::blink::PageVisibilityState::kHiddenButPainting); - // Notify observers of the change. - if (!is_initial_state) { - for (auto& observer : observers_) @@ -141,7 +144,10 @@ index 36513717f5fd901db6420c2355a0301a336c34bb..ee358e58de1e744025237373623e5ddb + GetPage()->SetVisibilityState(mojom::blink::PageVisibilityState::kVisible, is_initial_state); + GetPage()->GetPageScheduler()->SetPageVisible(true); + } else { -+ bool is_visible = visibility_state == mojom::blink::PageVisibilityState::kVisible; ++ bool is_visible = ++ (visibility_state == mojom::blink::PageVisibilityState::kVisible || ++ visibility_state == ++ mojom::blink::PageVisibilityState::kHiddenButPainting); + GetPage()->SetVisibilityState(visibility_state, is_initial_state); + GetPage()->GetPageScheduler()->SetPageVisible(is_visible); + // Notify observers of the change. diff --git a/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch index 1209e7833cfa..f4226dad3110 100644 --- a/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch +++ b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch @@ -8,7 +8,7 @@ WebPreferences of in-process child windows, rather than relying on process-level command line switches, as before. diff --git a/third_party/blink/common/web_preferences/web_preferences.cc b/third_party/blink/common/web_preferences/web_preferences.cc -index 27cfd70de3bcd3c7b13c30162445f93b4df2ae1a..102283d9b7baacc613c055c1d90804ef08dc2a5d 100644 +index fa46daef1d7da536c434d41475d25ed8f8f933c6..37ae01f45d768afa4bfa538307cf2f08ba14b906 100644 --- a/third_party/blink/common/web_preferences/web_preferences.cc +++ b/third_party/blink/common/web_preferences/web_preferences.cc @@ -144,6 +144,19 @@ WebPreferences::WebPreferences() @@ -32,7 +32,7 @@ index 27cfd70de3bcd3c7b13c30162445f93b4df2ae1a..102283d9b7baacc613c055c1d90804ef accelerated_video_decode_enabled(false), animation_policy( diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc -index dba12554c2c18bc2b252d159cb1a1aaca930944e..abafe6cfa66b8ab6de6c10a65dbbd5a33a7673bf 100644 +index bd5d2f9ba30d847a44e70c1173eb49a5d3f4b6bb..3ef312b2e84427ec1bcc738e88d6425255a96b20 100644 --- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc +++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc @@ -148,6 +148,19 @@ bool StructTraitsaccelerated_video_decode_enabled = data.accelerated_video_decode_enabled(); diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h -index 12fc1535d591eba1759f15461800e81974f19fee..1d91a57d5f2e01ac3aaa267b521339737b7b242d 100644 +index 65cf8211005546a8c527a679306e5ad6617cc046..0c08e298107d1aa0d0809691a98dd12b2c0aeb5a 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h @@ -10,6 +10,7 @@ @@ -88,7 +88,7 @@ index 12fc1535d591eba1759f15461800e81974f19fee..1d91a57d5f2e01ac3aaa267b52133973 // This flags corresponds to a Page's Settings' setCookieEnabled state. It // only controls whether or not the "document.cookie" field is properly diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h -index 1110171bf8088671a1cfdce180d437e13d34fe8d..cff39300b787c9e1e606c364e91b65cb15fb4d5f 100644 +index c5cf0543740b47c12b0cd211a64152d8abee1d21..c1ffebd09f2547454bd1551cf5fc576dd384fac2 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h +++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h @@ -6,6 +6,7 @@ @@ -153,7 +153,7 @@ index 1110171bf8088671a1cfdce180d437e13d34fe8d..cff39300b787c9e1e606c364e91b65cb return r.cookie_enabled; } diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom -index 6f7c7bd707716f77107d10f94a9e707c3c4a2050..a82788fa51c796cb115ff2351e8cb830d635c8ad 100644 +index d03fc2e4ccef645e31bab838dabf76ade7a35de8..ca35e4d6cf8fc49b8275a4b49bc4da8019282c3d 100644 --- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom +++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom @@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom"; diff --git a/patches/chromium/boringssl_build_gn.patch b/patches/chromium/boringssl_build_gn.patch index 6a74c4280d7d..73f42616c789 100644 --- a/patches/chromium/boringssl_build_gn.patch +++ b/patches/chromium/boringssl_build_gn.patch @@ -6,12 +6,12 @@ Subject: boringssl BUILD.gn Build BoringSSL with some extra functions that nodejs needs. diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index db3cf20b2951445986474e9f54981715ad3cd613..ab2bf2dbb35d6360a773881cb619507405222e81 100644 +index c4e792544775011671084cef9af8a3b62834265c..840f799fe03a48e29ef09c35be8c4ab3402974f3 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn -@@ -49,6 +49,20 @@ config("no_asm_config") { +@@ -53,6 +53,20 @@ config("no_asm_config") { - all_sources = crypto_sources + ssl_sources + all_sources = crypto_sources + ssl_sources + pki_sources all_headers = crypto_headers + ssl_headers +if (is_electron_build) { + # Needed to build a nodejs-compatible boringssl. diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index a5fe6fa2e562..a0946bab1de6 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us to introduce a new Electron category for Electron-specific tracing. diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index c175e896868e99391ee8382d37fa08e17afb6768..d80b28386150f089ca48534d680759bcf0859b09 100644 +index 292e5ce4922b37a642233a70672d777f5ec6143a..2da2d79a05b0fbb4c53a21136cf47f51635afa03 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -80,6 +80,8 @@ diff --git a/patches/chromium/build_disable_print_content_analysis.patch b/patches/chromium/build_disable_print_content_analysis.patch index 73536497cd57..7e2e040580c2 100644 --- a/patches/chromium/build_disable_print_content_analysis.patch +++ b/patches/chromium/build_disable_print_content_analysis.patch @@ -13,7 +13,7 @@ This patch can be removed when enable_print_content_analysis can be more easily enabled or disabled by default with buildflags. diff --git a/printing/buildflags/buildflags.gni b/printing/buildflags/buildflags.gni -index 5ceb96d63f948f94a44393337366bb68a2e0f31d..086f5e568cc6ae43c75477cfd3fac4c68f2a25b0 100644 +index fa9004e2ec3e3e785d0ea590ea8c632db7cbadda..da809d75f191fe0437cd783f8689b0b3866e343b 100644 --- a/printing/buildflags/buildflags.gni +++ b/printing/buildflags/buildflags.gni @@ -48,7 +48,7 @@ declare_args() { diff --git a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch index 068ceca75da8..b98eee5321db 100644 --- a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch +++ b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch @@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this patch. diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index 93a7ba1a84491f25e96b1345219f34dedef1edca..dc435ef0258d072fad55529ec2f14a3d6748480e 100644 +index 41ce32113ec2679b76d5a4fd69a7109c832ac7a1..1cd35794bf78f3d92b42634d9494c85a98e93ea6 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -199,11 +199,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index 93a7ba1a84491f25e96b1345219f34dedef1edca..dc435ef0258d072fad55529ec2f14a3d "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index b74e94b04e21bb0107564be656e3d11cfededc56..985000bd28f221f15f11a56ce4256e8204c42526 100644 +index 5cce9134fabf566ec968d5738242b3dc13f2f54c..0e8ca7b1762571f57372a937630004252f396ae7 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4714,7 +4714,7 @@ static_library("browser") { +@@ -4723,7 +4723,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 b74e94b04e21bb0107564be656e3d11cfededc56..985000bd28f221f15f11a56ce4256e82 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index e7a2f067cc14478b6b74bb7412642969a7c3e8a6..d908f5ce48c3c6e994d3699d0ac59ee0d772318b 100644 +index 513932b71a19d8f0a8196faf2ef14c2a7a996229..0b16b410606d2dcb8f8013755f079a209c8ba3a4 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -6815,7 +6815,6 @@ test("unit_tests") { +@@ -6833,7 +6833,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index e7a2f067cc14478b6b74bb7412642969a7c3e8a6..d908f5ce48c3c6e994d3699d0ac59ee0 "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/app:win_unit_tests", -@@ -6841,6 +6840,10 @@ test("unit_tests") { +@@ -6859,6 +6858,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index e7a2f067cc14478b6b74bb7412642969a7c3e8a6..d908f5ce48c3c6e994d3699d0ac59ee0 ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -7801,7 +7804,6 @@ test("unit_tests") { +@@ -7826,7 +7829,6 @@ test("unit_tests") { } deps += [ @@ -76,7 +76,7 @@ index e7a2f067cc14478b6b74bb7412642969a7c3e8a6..d908f5ce48c3c6e994d3699d0ac59ee0 "//chrome/browser/apps:icon_standardizer", "//chrome/browser/apps/app_service", "//chrome/browser/apps/app_service:app_registry_cache_waiter", -@@ -7890,6 +7892,10 @@ test("unit_tests") { +@@ -7913,6 +7915,10 @@ test("unit_tests") { "//ui/webui/resources/js/browser_command:mojo_bindings", ] diff --git a/patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch b/patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch index 61dba89f8a49..3d9face486f6 100644 --- a/patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch +++ b/patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch @@ -6,7 +6,7 @@ Subject: build: only use the mas build config in the required components Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts diff --git a/base/BUILD.gn b/base/BUILD.gn -index 7a5486b35f34f23d71574805a373568cbb4ea49f..9aedd696c7102aa2008ff0d43f560968ad5b1b58 100644 +index 82cb596dcbb369cf67addf856dfe8c0789449e78..149d429b8f80de9a16ef1459693b940f86710dc2 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -1038,6 +1038,7 @@ component("base") { @@ -74,7 +74,7 @@ index 729753a72edd761ec831f79828742a26f9dd2417..45858456c9c8c82870c41b0edd1359d1 if (is_win) { diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 180a4bbe8f0b39858f154d41aca8ffbb483c7cab..bced1f3d53a1ce3686bcaf5cc3594a5b03fc1347 100644 +index e0d55a859061f029e5298599bf2d9345674ecb34..74f977ca68b566d4c2859d71fabbe112555d1d91 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -56,6 +56,7 @@ source_set("browser") { @@ -98,10 +98,10 @@ index dce27cfa39b52e39a95cee658584ed80ab1953ef..366edd2e86edcdbb30ae4c0fa952b5d9 public_deps = [ ":mojo_bindings", diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn -index 62117d9c83972003d0483ed9fc6efad6a4490a75..246d7289fd5727886054e182e17520c5ce5a7916 100644 +index b16be8f9992b23ce93d174531f2debd7f18bb436..119038743dc222907cb74c2c3ea34d23b5915a5e 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn -@@ -224,6 +224,7 @@ target(link_target_type, "renderer") { +@@ -225,6 +225,7 @@ target(link_target_type, "renderer") { } configs += [ "//content:content_implementation" ] @@ -110,10 +110,10 @@ index 62117d9c83972003d0483ed9fc6efad6a4490a75..246d7289fd5727886054e182e17520c5 public_deps = [ diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn -index 26e2f7101275af5e68492098d486683f1d87d035..e20d69ab8f98c751383a8c420c259c8daf8d95ca 100644 +index 8fbd09e0305b22114c2cc2534a43622cf660bb23..39951971e29c374aa705eab8c921f73e56d428c8 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn -@@ -478,6 +478,7 @@ static_library("test_support") { +@@ -480,6 +480,7 @@ static_library("test_support") { configs += [ "//build/config:precompiled_headers", "//v8:external_startup_data", @@ -147,10 +147,10 @@ index 4885f927ae2b871cf2911fb5bc5a2aac128b2aae..5f820bd6ef9f91f69e75065f08bd61a7 if (is_mac) { diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn -index 550cf601dcb65e710e9dab6fb5023119b52b5278..18e60732057a3695858b17d6faef13927f869726 100644 +index 090bbd6f03c5749aaf763dac9e52c776f366c33d..5143231f5b3c95f55bf12aaedf253781eb59bb64 100644 --- a/gpu/ipc/service/BUILD.gn +++ b/gpu/ipc/service/BUILD.gn -@@ -138,6 +138,7 @@ component("service") { +@@ -134,6 +134,7 @@ component("service") { "QuartzCore.framework", ] defines += [ "GL_SILENCE_DEPRECATION" ] @@ -276,10 +276,10 @@ index 7e17546f658ce0e6908f7dea499eac31e5295895..85c5fe7e25a84de5342d3d9b8cd20d19 if (is_win) { diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn -index b09b4510e9f5b1578e4e8ba18330bed928e7728a..ad3d29a93714080be660b5364ed15a676e153a66 100644 +index 98869537561ba6eaaa838601c9e0d1e71a016197..2141e6d3376042df7992f89119735c1b9b3cb236 100644 --- a/ui/gfx/BUILD.gn +++ b/ui/gfx/BUILD.gn -@@ -194,6 +194,7 @@ component("gfx") { +@@ -192,6 +192,7 @@ component("gfx") { "scoped_ns_graphics_context_save_gstate_mac.h", "scoped_ns_graphics_context_save_gstate_mac.mm", ] diff --git a/patches/chromium/build_remove_ent_content_analysis_assert.patch b/patches/chromium/build_remove_ent_content_analysis_assert.patch index 5dea5d5bb7d2..207dab41df44 100644 --- a/patches/chromium/build_remove_ent_content_analysis_assert.patch +++ b/patches/chromium/build_remove_ent_content_analysis_assert.patch @@ -9,10 +9,10 @@ This patch can be removed when we decide how we want to handle enterprise content analysis. diff --git a/components/enterprise/buildflags/buildflags.gni b/components/enterprise/buildflags/buildflags.gni -index 7653c1c9e8fb18ce2c471af11468583d2da0cfb0..f63c1c7263b40d4344ef4b8468acb77d9718e19c 100644 +index b26c6ca3480f529b21cd4c7544de786baa995dfd..6509e0131bca73ab080b1e47878acf7fae72d112 100644 --- a/components/enterprise/buildflags/buildflags.gni +++ b/components/enterprise/buildflags/buildflags.gni -@@ -31,4 +31,4 @@ declare_args() { +@@ -34,4 +34,4 @@ declare_args() { # These two flags are equivalent, but `enable_print_content_analysis` still # needs to exist separately as it lives under //printing which cannot depend # on //components. diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 4f1f9b9fa317..8983ecccd6b7 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -9,10 +9,10 @@ potentially prevent a window from being created. TODO(loc): this patch is currently broken. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index b3d40683cb43f96a853803bd4f577d4ecf6ffad5..5703e89379df95dc4c5e99f77c0a60a1778c4ca6 100644 +index 6646263a52601e5283d2a2bb924945acacfff702..e2303fbb80ccc7d76d6a949678608c6a55ea411d 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -8169,6 +8169,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -8208,6 +8208,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -21,10 +21,10 @@ index b3d40683cb43f96a853803bd4f577d4ecf6ffad5..5703e89379df95dc4c5e99f77c0a60a1 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 4d2396fdff71a20cdd95a74179b9287733fae957..afbfd6e2ee6b3cb331dd0abd034f82903207981a 100644 +index 6f1581c517bf6c4526d7831d50ce2ad0bc8d7531..9bb752da088be1fae748430c69c39b7fa86cab08 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4312,6 +4312,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4315,6 +4315,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( auto* new_contents_impl = new_contents.get(); @@ -37,7 +37,7 @@ index 4d2396fdff71a20cdd95a74179b9287733fae957..afbfd6e2ee6b3cb331dd0abd034f8290 // 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 -@@ -4353,12 +4359,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4356,12 +4362,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -66,7 +66,7 @@ index 3ddc93e18d353d5af31e28f8f8e682ea813db21c..2f1df452ce3617cf845409d01d804932 // 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 0895ee43e65c4e25c16d0d79c4f200a216f300b7..69e76b6a9a8d3b8543a138fb018775dee8782863 100644 +index 549fa60921444c60b3343fc381fb283ca73f7b6a..c76eb798967426772e8e673f93f223581d2fd00f 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -683,6 +683,8 @@ bool ContentBrowserClient::CanCreateWindow( @@ -79,7 +79,7 @@ index 0895ee43e65c4e25c16d0d79c4f200a216f300b7..69e76b6a9a8d3b8543a138fb018775de 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 23d172929b465d58aee28965a87462fda8b0b3a9..773c9cf07ac60b8555debe0c2bc9f7c66e897bb7 100644 +index 667ba54d54dfccb37540e3eb00c6d1d0a078ff2f..98582da50756470a233dcec6ebd5ad78a172a74c 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -173,6 +173,7 @@ class NetworkService; @@ -122,7 +122,7 @@ index 688fac1fd874438ad9bc6494691b0eadca7e5bb2..db12930a449b38966e63c2274275b115 const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 34d3d2feb7d236d8f220da8e2aadda28b6eb4d26..39e142eedd051073a5f31b5455001a37b839a6bc 100644 +index 0fa12e6a5dd2eb2cd2102919f6127731e8500133..64ac8d677a9f7a723c46bbf0e74595b3c2866136 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -16,6 +16,7 @@ @@ -148,10 +148,10 @@ index 34d3d2feb7d236d8f220da8e2aadda28b6eb4d26..39e142eedd051073a5f31b5455001a37 // 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 eb4fccba88f8aa4b33bc8ff55cc87e6fd82efe3a..662db5f4bcb4fb110817a0cd87888969247c6b6b 100644 +index ab92d5b8f710661d8b1c863423f0c0f7928646ba..54368c4a6ae9e2fb40017ecb31228a035dacf4cb 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -6372,6 +6372,10 @@ WebView* RenderFrameImpl::CreateNewWindow( +@@ -6391,6 +6391,10 @@ WebView* RenderFrameImpl::CreateNewWindow( request.HasUserGesture(), GetWebFrame()->IsAdFrame(), GetWebFrame()->IsAdScriptInStack()); @@ -210,10 +210,10 @@ index bef5a989bac50c177f15f52fe87ac3790d553e85..65dcd2e3b51929400c8bfb6a98a4fb59 } // namespace blink diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc -index 7529a505b448d8773a4a5191ae19f8d0bf89bec5..714874042813178000321d27cdbfaaafba9a1c00 100644 +index 5005d4dd1169c45e44247ff96dafb29ee96680f1..9e79e9afd483b319a0ebc8707acdf5ab54edcd12 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2164,6 +2164,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2165,6 +2165,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, entered_window); diff --git a/patches/chromium/chore_add_buildflag_guard_around_new_include.patch b/patches/chromium/chore_add_buildflag_guard_around_new_include.patch index 112531d7ed69..0f0c9e1c2297 100644 --- a/patches/chromium/chore_add_buildflag_guard_around_new_include.patch +++ b/patches/chromium/chore_add_buildflag_guard_around_new_include.patch @@ -9,7 +9,7 @@ This is an experimental commit; but if it's successful, This patch should be upstreamed and then removed from electron's code. diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h -index 2336c783417223b5f8a03868928837a573db172f..7b25c1f19be76f7b3f632b1427173dc8d2e71008 100644 +index 8d0b8e65bb2697bb48c3f4ec2b85041d17b0590a..d3b4e01b6a6030166629f5f88f6226e00d94baf4 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h @@ -43,7 +43,6 @@ diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 4e9f3dd37d18..fb162a53d9b6 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -80,10 +80,10 @@ index aaaa61d5c3a1d5ade2fd355e38a3985ef5cc4e7d..b45746ba0f38a381a2ee5ca17f3a1685 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 2c98bdd6336762e11b76e8f0d5993dd4d40bf5a2..f91ad8f22b4e5ac3417a536468db217666eda4e1 100644 +index fdb96dee050670757ed4ce247bc0a12b01005d04..ceebc70bc445bfd417babc932e37d4c71215f195 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1872,12 +1872,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1881,12 +1881,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -99,10 +99,10 @@ index 2c98bdd6336762e11b76e8f0d5993dd4d40bf5a2..f91ad8f22b4e5ac3417a536468db2176 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 2cd706cf14ce954289ce789886193e3fdb735801..35881d5d2ad489eb4e57f3fe26f1c58e8f1123cc 100644 +index ce9edb90a7ac7f16af1dcb3fda492315315ace7c..126ddd6068e6023d7e21aefcf87d81791a61d262 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -884,8 +884,7 @@ class Browser : public TabStripModelObserver, +@@ -886,8 +886,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -155,7 +155,7 @@ index 69d39ab12f7a1895e1ca50914a4f8dc37e10e6cd..eaa9156721de98d19f6110e7b2ab55af } content::WebContents* CreateCustomWebContents( diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc -index 3ef115a4f625f5a776c880ac85848909683d733b..4e0a58c6a618a32cc269ab98b62389201912210d 100644 +index ae7e7189cee9f033d528275fa27e1e5a0d4b4b49..02ee0c513babcac48fe8e0c9e8de483b3e1b2626 100644 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc @@ -169,14 +169,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden( @@ -176,7 +176,7 @@ index 3ef115a4f625f5a776c880ac85848909683d733b..4e0a58c6a618a32cc269ab98b6238920 java_gurl); } diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h -index d42e4b793677188c090593ad6aa612e48058dfbb..25aebc2aaffd1f43274ffc52a20b5979afc5aaec 100644 +index e5b1bd6bb831f9e1e17520015d09068464ecb098..f8094fb78f30d6f3145b6ee704305281a5b302df 100644 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.h +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h @@ -78,8 +78,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate { @@ -218,10 +218,10 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7 void AddNewContents(content::WebContents* source, std::unique_ptr new_contents, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 80e0b9747484b13b76eba8e9a097a2fd10c1ef9d..d28f76fb8221df7da24179bf703f69861ae14042 100644 +index 5bcd634f1bd29a58cae240274269d952ef6570e9..60d76d4ecf3bbda940f9a43d86259fcfd7d4a349 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4219,8 +4219,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4222,8 +4222,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -246,7 +246,7 @@ index db12930a449b38966e63c2274275b1157f38bea7..2d770e9c0c88e5ad1fac15fd13b70e6b } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 39e142eedd051073a5f31b5455001a37b839a6bc..dcc4a956485b61514f0fa208d96083aaf53d563e 100644 +index 64ac8d677a9f7a723c46bbf0e74595b3c2866136..48098a18fda2461a0ef981023908ec86a41e4223 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -323,8 +323,7 @@ class CONTENT_EXPORT WebContentsDelegate { @@ -316,7 +316,7 @@ index 2a2f0b6b44293e7a9b31598c8c5382c5618d71b5..6c87565980a28532eeb4a7b51ca1188c content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc -index 109b251204ede578be1664a8935926c7b61d0419..a741be8feed5b7b6d322630bf494c0feaec38268 100644 +index 67ba5e236c9e244ab8f2564bdb66f320525f012e..ca16fe72485fe1f0ec6b05e1877b4d4de1cdad44 100644 --- a/fuchsia_web/webengine/browser/frame_impl.cc +++ b/fuchsia_web/webengine/browser/frame_impl.cc @@ -567,8 +567,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( @@ -330,7 +330,7 @@ index 109b251204ede578be1664a8935926c7b61d0419..a741be8feed5b7b6d322630bf494c0fe // can catch bad client behavior while not interfering with normal operation. constexpr size_t kMaxPendingWebContentsCount = 10; diff --git a/fuchsia_web/webengine/browser/frame_impl.h b/fuchsia_web/webengine/browser/frame_impl.h -index 0ba76ffa875efe29e576310cfb210e4e86cc3478..e565a89da74fe1b455a03ede05cb302ae81d6e21 100644 +index f0788870c01c4de281c8173da234616385f57131..2632d0d33d38973f8822d214b8bc91ef81b10460 100644 --- a/fuchsia_web/webengine/browser/frame_impl.h +++ b/fuchsia_web/webengine/browser/frame_impl.h @@ -305,8 +305,7 @@ class WEB_ENGINE_EXPORT FrameImpl : public fuchsia::web::Frame, @@ -358,10 +358,10 @@ index 60acb83c8d76f71db689f9d188bb6e8f64a74ffb..aa6cee708d1e451b443bc26528b56cc8 ->options() ->block_new_web_contents(); diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc -index 0da0750e43157470a25636af3b152f783c8a2f25..6898a8b6844811cccbafd23a483fbfca9b57a25c 100644 +index e236e1ac647004c4a91c7098d38572e22d0312da..92c2b13acd54a8aaa14d0d0bab4f93bbd5bfe5ef 100644 --- a/ui/views/controls/webview/web_dialog_view.cc +++ b/ui/views/controls/webview/web_dialog_view.cc -@@ -428,8 +428,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( +@@ -433,8 +433,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -372,10 +372,10 @@ index 0da0750e43157470a25636af3b152f783c8a2f25..6898a8b6844811cccbafd23a483fbfca return delegate_->HandleShouldOverrideWebContentsCreation(); return false; diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h -index 63a3eb7b4a73e8d28662ca1175008b7e4225ed36..df1fd8f901507854bc6fbed5ba8b94c15b58b56d 100644 +index e01b8206fe3661b157436c221eca6e6b6eef3f17..1828c2d1b80d772be734a6b2ab56aa71829c38e0 100644 --- a/ui/views/controls/webview/web_dialog_view.h +++ b/ui/views/controls/webview/web_dialog_view.h -@@ -155,8 +155,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView, +@@ -156,8 +156,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, diff --git a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch index a3174b9ed867..8a697a9942a7 100644 --- a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch +++ b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch @@ -7,7 +7,7 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index a972785f956cbfd04730a7420a249a3c9880d7ab..4a90e06f8d81a5813797ae9097622f2e09195094 100644 +index 2c8a95ce169f9c322b545a4426b8bec2964de2e5..02b93bb09564ffacee638ccbd725c56855dbb6ab 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc @@ -39,6 +39,7 @@ @@ -48,7 +48,7 @@ index a972785f956cbfd04730a7420a249a3c9880d7ab..4a90e06f8d81a5813797ae9097622f2e #endif // V8_USE_EXTERNAL_STARTUP_DATA } -@@ -944,7 +951,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { +@@ -966,7 +973,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { return TerminateForFatalInitializationError(); #endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE) @@ -81,7 +81,7 @@ index a687861c04b323102a8d2bfe22b24a964793cd9b..4a7a469111eaec3e1e76ee852bd5afbb return new ContentClient(); } diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h -index d4bb0e9a017a833b403916e1d6e64fb058f40f86..35ba35a95e39700824d6e0b480b99bc3cb033a99 100644 +index c891c5649a6ae76c9f0f988359649ece0e8ac1d9..54e30c4dd82042c283e36cae767dcdd716f94292 100644 --- a/content/public/app/content_main_delegate.h +++ b/content/public/app/content_main_delegate.h @@ -9,6 +9,7 @@ @@ -92,7 +92,7 @@ index d4bb0e9a017a833b403916e1d6e64fb058f40f86..35ba35a95e39700824d6e0b480b99bc3 #include "build/build_config.h" #include "content/common/content_export.h" #include "content/public/common/main_function_params.h" -@@ -165,6 +166,8 @@ class CONTENT_EXPORT ContentMainDelegate { +@@ -168,6 +169,8 @@ class CONTENT_EXPORT ContentMainDelegate { virtual bool ShouldHandleConsoleControlEvents(); #endif diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index e3aefc69cd99..b63f780583d9 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -41,7 +41,7 @@ index 0389599ac786b6abd61ca921347fe12ddd5d0ee7..780927301744ea7312f230cec76a24a3 int DesktopMediaListBase::GetSourceCount() const { diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h -index f25dede94beab46120194bd5450882fa30a2ad8d..e74071f9e82cb89d0f3eba8ff86e01d67207f1d3 100644 +index b65012985ff1797203160d9e26af17fefee5c244..9ee211fb487007bd37b57cfa7b4ffbe5307af637 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.h +++ b/chrome/browser/media/webrtc/desktop_media_list_base.h @@ -39,7 +39,7 @@ class DesktopMediaListBase : public DesktopMediaList { @@ -82,10 +82,10 @@ index 33ca7a53dfb6d2c9e3a33f0065a3acd806e82e01..9fdf2e8ff0056ff407015b914c6b03eb const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index b548c9fbd3c0bf425447b29dcd866cd27e96b14c..4de719510eaeaaf77cdbd46560f3b4ab1869877a 100644 +index 9ce1d9acbf2fd4b521905f4e4c2d0bb0d63bb170..20be457034f0636486c0ca560628e554b5792445 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc -@@ -147,7 +147,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) { +@@ -159,7 +159,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) { #if BUILDFLAG(IS_MAC) BASE_FEATURE(kWindowCaptureMacV2, "WindowCaptureMacV2", @@ -94,7 +94,16 @@ index b548c9fbd3c0bf425447b29dcd866cd27e96b14c..4de719510eaeaaf77cdbd46560f3b4ab #endif } // namespace -@@ -457,6 +457,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { +@@ -235,7 +235,7 @@ class NativeDesktopMediaList::Worker + base::WeakPtr media_list_; + + DesktopMediaList::Type type_; +- const std::unique_ptr capturer_; ++ std::unique_ptr capturer_; + const ThumbnailCapturer::FrameDeliveryMethod frame_delivery_method_; + const bool add_current_process_windows_; + +@@ -529,6 +529,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { FROM_HERE, base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished, media_list_)); @@ -107,7 +116,7 @@ index b548c9fbd3c0bf425447b29dcd866cd27e96b14c..4de719510eaeaaf77cdbd46560f3b4ab } void NativeDesktopMediaList::Worker::OnCaptureResult( -@@ -829,6 +835,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( +@@ -935,6 +941,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails, base::Unretained(worker_.get()), std::move(native_ids), thumbnail_size_)); diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index fbf2c2e49996..6d1dbded6e06 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at https://crbug.com/634542 and https://crbug.com/711107. diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc -index 12fb395856ed60bd554fce70d2e72b24057676b7..89982aa8a434b379331c0df9372bd67d6f8a87b7 100644 +index 777465ab5bb311035f805f5eba49fae14fd6601c..30813d35bacedbff1494aeff5b481ccffc6af70d 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1873,6 +1873,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1869,6 +1869,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -35,7 +35,7 @@ index 12fb395856ed60bd554fce70d2e72b24057676b7..89982aa8a434b379331c0df9372bd67d // If we are likely to software composite the resource, we use sRGB because // software compositing is unable to perform color conversion. diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h -index 46ea5b77442eb577de068ee90f06fe55733ee93e..f832306bc4a38b743cff2eb525badb7e383a8241 100644 +index c84d4536210f3671c9e98f0de7caeaba523d1959..62863927742375e10a5907496cca95058ae5eece 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -102,6 +102,8 @@ class CC_EXPORT LayerTreeSettings { @@ -93,10 +93,10 @@ index 6b2f1af11e1480153dff4bd1f32527f87f18dc80..ef69c734878fcd9f8fa6dd61dada1729 sandbox::policy::switches::kGpuSandboxAllowSysVShm, sandbox::policy::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index a11bb4b6a2740240bdf325b2b0c609d0bd662fa7..df1fbd9f4a8b365490a4c7d911e227e097aaa4bd 100644 +index b549e5795621e5493db5d23407b6d040f32c38cf..f4ff150530694a38ce0de16ba0b05ca152c99b8b 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -3272,6 +3272,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3284,6 +3284,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. static const char* const kSwitchNames[] = { @@ -148,7 +148,7 @@ index 6892376fa33d006453977c354734d880a7ef7c91..4cd7b762d5fe1c54f5b06cc0d8f50560 } diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc -index 39c7450c8e0f184f0ca482ad6bea8ad68cef19de..9d4198f4f6fa5e3301b267a551a3650a6ef7173b 100644 +index 368105b62e1650255e28cf71fcac2b956e811658..2dbbef93571ff5d41fc70a339d22470fdc5f5529 100644 --- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc +++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc @@ -30,6 +30,7 @@ @@ -159,7 +159,7 @@ index 39c7450c8e0f184f0ca482ad6bea8ad68cef19de..9d4198f4f6fa5e3301b267a551a3650a #include "ui/native_theme/native_theme_features.h" #include "ui/native_theme/overlay_scrollbar_constants_aura.h" -@@ -331,6 +332,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( +@@ -332,6 +333,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); @@ -213,7 +213,7 @@ index af19d04e043366a2db07bf6eddfd1fc260590a37..b981128498991ccd67a78bc255da5308 IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB); diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc -index 7639d05f73b27a65b8c7cd41b526bc9308a98a31..f377eca18f90b1ae4aa85471a63f8e726f979ffb 100644 +index 9576188a9872f4c10448e7333cf5aa1577128b45..8b0be327bd496c70a7461d41eaf459af62816c20 100644 --- a/ui/gfx/switches.cc +++ b/ui/gfx/switches.cc @@ -13,6 +13,8 @@ namespace switches { @@ -226,7 +226,7 @@ index 7639d05f73b27a65b8c7cd41b526bc9308a98a31..f377eca18f90b1ae4aa85471a63f8e72 // sharpness, kerning, hinting and layout. const char kDisableFontSubpixelPositioning[] = diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h -index ebeb73e7f679280297a09332612a83181e24a4e1..79ec8deb0cab719b344a4964221c10725bd066e7 100644 +index 37011f67b3d33d5cb212b12ebdbaa0ae0671287e..845c30e4ac4b5d53fa638d3a609ac75848a72c68 100644 --- a/ui/gfx/switches.h +++ b/ui/gfx/switches.h @@ -13,6 +13,7 @@ diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 6cd9b7696853..ef6dbbd82d80 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 6dadda85eaa3c885540190fc0744c5063961d06a..1612858c00f9c1405805c384df39562db8f314b3 100644 +index 3fb6ed640ee9d857f19b4d60b12047133e68f920..0e035eae2094ef5351e4a35dc6ccc9866efe43ba 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -564,7 +564,11 @@ +@@ -557,7 +557,11 @@ return; host()->WasHidden(); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 794d3a6e6c0a..83b39d413b05 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,7 +6,7 @@ Subject: disable_hidden.patch Electron uses this to disable background throttling for hidden windows. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index a8c4cfa46cc8626fcc10e68cdab037e853183b98..fa85ffa12a49b8be8f2801441ba255642cec2402 100644 +index 9e946e02bca276a877defacf6cf6cb54f882ceba..149ead7bbf52ad127747c5f80f0e35a13203502a 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -801,6 +801,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -20,7 +20,7 @@ index a8c4cfa46cc8626fcc10e68cdab037e853183b98..fa85ffa12a49b8be8f2801441ba25564 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 17d59903f24120d6c2f7e48279db02482b382679..edd7db5d0bf42728a36f080444875d94f5267095 100644 +index cd75eee211a8ea7242420cc1ba47784d55c3fb5d..76956dd92fcde059f2c928d604d465997c6ff4f0 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -907,6 +907,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl @@ -30,13 +30,13 @@ index 17d59903f24120d6c2f7e48279db02482b382679..edd7db5d0bf42728a36f080444875d94 + // Electron: Prevents the widget from getting hidden. + bool disable_hidden_ = false; - protected: - // |routing_id| must not be MSG_ROUTING_NONE. + void StartDragging(blink::mojom::DragDataPtr drag_data, + blink::DragOperationsMask drag_operations_mask, 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 36594e82db0b58d904c5c2c700219bca870ed83e..fda4a9605d1f5cd1f19c3504194b66d603c2e4e0 100644 +index d8345f942111fbdc6a5b2eb7f3e10842ea00baff..9b7814890a4f513e8b9e07fbac370a40af6dac15 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -614,7 +614,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -623,7 +623,7 @@ void RenderWidgetHostViewAura::HideImpl() { DCHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 81cab7d09557..b0b5d2841683 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4 } // namespace net diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index ba499d50b948d90011d6eeb1463dbfda54e7d9b0..2188a08d93d82e1085c568f12829225964aaffed 100644 +index ad246393cbd3eedbd91495fe9d3c3f046ccfb553..e748386cdbeefec2acf2a6054b21eadc0f6a556f 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1516,6 +1516,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1559,6 +1559,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,7 +51,7 @@ index ba499d50b948d90011d6eeb1463dbfda54e7d9b0..2188a08d93d82e1085c568f128292259 // 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 a452681df0b17c99fb476950ca9e22325bd8b8b9..302910ee8b7dee6a93293fc41989f1510b0db8da 100644 +index 4c0cb2e133d84329ab58eff4f30dc7615516b3ae..8790965cc2ac2f9e77dec85d152e5ce66766c3cd 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -316,6 +316,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext @@ -63,10 +63,10 @@ index a452681df0b17c99fb476950ca9e22325bd8b8b9..302910ee8b7dee6a93293fc41989f151 void SetEnableReferrers(bool enable_referrers) override; #if BUILDFLAG(IS_CHROMEOS) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 987d1186a02e7261980dae8ba732a97d03aed7b8..8966c31b06d213628c26a6b80a351f551c24133c 100644 +index 772577a0ed4aeb47bb13dcd27ea38b943a2c0952..d7601f0f1b699984577b0d84a8b60d3dbad0d4fb 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1213,6 +1213,9 @@ interface NetworkContext { +@@ -1227,6 +1227,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index dfdb848d5de7..f99e4125194d 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be done in future work. diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index ee358e58de1e744025237373623e5ddbb2b5ba01..4037b158a4fbb2bfdc47f049ea75d95953d6c546 100644 +index fd48c793a0d447a4a6777f94c5b580fdf9b5b2d9..8c14bfc9f0a6ad2bd314b653d4f993eda1e87348 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -165,6 +165,7 @@ @@ -23,7 +23,7 @@ index ee358e58de1e744025237373623e5ddbb2b5ba01..4037b158a4fbb2bfdc47f049ea75d959 #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" -@@ -1783,6 +1784,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1786,6 +1787,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); diff --git a/patches/chromium/feat_configure_launch_options_for_service_process.patch b/patches/chromium/feat_configure_launch_options_for_service_process.patch index eaba7a04cca6..e668befb4640 100644 --- a/patches/chromium/feat_configure_launch_options_for_service_process.patch +++ b/patches/chromium/feat_configure_launch_options_for_service_process.patch @@ -627,10 +627,10 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8 #if BUILDFLAG(IS_MAC) // Whether or not to disclaim TCC responsibility for the process, defaults to diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc -index da5844e2ef28872d91f76ebbbaee3ca976304568..a4aaeaccb3cb73b7fc3244873d33af1af61a42c6 100644 +index 3add6ba6997a36738bd0421641c91c477936241a..8718b14fdd41ec3488cb2c10d8e2053101529701 100644 --- a/sandbox/policy/win/sandbox_win.cc +++ b/sandbox/policy/win/sandbox_win.cc -@@ -706,11 +706,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() { +@@ -712,11 +712,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() { // command line flag. ResultCode LaunchWithoutSandbox( const base::CommandLine& cmd_line, @@ -643,7 +643,7 @@ index da5844e2ef28872d91f76ebbbaee3ca976304568..a4aaeaccb3cb73b7fc3244873d33af1a // 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 -@@ -938,7 +936,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) { +@@ -944,7 +942,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) { ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( const base::CommandLine& cmd_line, const std::string& process_type, @@ -652,7 +652,7 @@ index da5844e2ef28872d91f76ebbbaee3ca976304568..a4aaeaccb3cb73b7fc3244873d33af1a SandboxDelegate* delegate, TargetPolicy* policy) { const base::CommandLine& launcher_process_command_line = -@@ -952,7 +950,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -958,7 +956,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( } // Add any handles to be inherited to the policy. @@ -661,7 +661,7 @@ index da5844e2ef28872d91f76ebbbaee3ca976304568..a4aaeaccb3cb73b7fc3244873d33af1a policy->AddHandleToShare(handle); if (!policy->GetConfig()->IsConfigured()) { -@@ -967,6 +965,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -973,6 +971,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( // have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS. policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE)); policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE)); @@ -675,7 +675,7 @@ index da5844e2ef28872d91f76ebbbaee3ca976304568..a4aaeaccb3cb73b7fc3244873d33af1a #endif if (!delegate->PreSpawnTarget(policy)) -@@ -979,7 +984,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -985,7 +990,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( ResultCode SandboxWin::StartSandboxedProcess( const base::CommandLine& cmd_line, const std::string& process_type, @@ -684,7 +684,7 @@ index da5844e2ef28872d91f76ebbbaee3ca976304568..a4aaeaccb3cb73b7fc3244873d33af1a SandboxDelegate* delegate, base::Process* process) { const base::ElapsedTimer timer; -@@ -987,13 +992,13 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -993,13 +998,13 @@ ResultCode SandboxWin::StartSandboxedProcess( // Avoid making a policy if we won't use it. if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line, *base::CommandLine::ForCurrentProcess())) { diff --git a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch index 948b0f1d5c34..6e63795b55b3 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -514,10 +514,10 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf waiting_on_draw_ack_ = true; diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -index e8df1465346e7e9254fb25865d48c9e3f3e8e0ac..ddd2c4dcc6f597eda0eba91ba395aa3822a65e83 100644 +index c70b0af70a68386c5d36833e621dd1b5cdc1522a..17e5c96cbb4ef2f575fd5ba7bd8b0c7bd58da5e7 100644 --- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc +++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -@@ -96,7 +96,8 @@ RootCompositorFrameSinkImpl::Create( +@@ -97,7 +97,8 @@ RootCompositorFrameSinkImpl::Create( params->gpu_compositing, params->widget); auto output_surface = output_surface_provider->CreateOutputSurface( params->widget, params->gpu_compositing, display_client.get(), @@ -556,10 +556,10 @@ index cc1ceb263a60b9bd743bd4166def23cd1c01b49f..d2c24bf0b674c5028e48c6b51f23d4a8 } // namespace viz diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc -index c86f1e090cb844fb555098d128391ae66de2d594..1f20ff61a66f9a269fe5d5257470ef99e11fa72c 100644 +index c34c0854efeec1ddddcd47fea40c9516f9c8dfaf..c27169973e2ac9b2faf802b9f35ed5c6d2b22543 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc -@@ -395,8 +395,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( +@@ -393,8 +393,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( mojo::AssociatedRemote display_private; root_params->display_private = display_private.BindNewEndpointAndPassReceiver(); diff --git a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch index 6ce7013df22c..a06feceaf298 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -112,7 +112,7 @@ index d0df2913c2e5102cfd1e1ff140e6c95d168900bd..830f90a83774e32116757f8a3b959849 string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 569a0382d0d9fa1f4f94ed6bbf3f252ffa7ead24..3be656813eb260c4dbd174c111e5390fe8ad8b96 100644 +index c509cb5af0a15979ea8044367e7b19ba61d09179..4ad8c5476cbf00a4246ec524e5d95037b06a7151 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc @@ -623,6 +623,7 @@ URLLoader::URLLoader( @@ -132,7 +132,7 @@ index 569a0382d0d9fa1f4f94ed6bbf3f252ffa7ead24..3be656813eb260c4dbd174c111e5390f url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1597,6 +1598,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1596,6 +1597,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); diff --git a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch index 1172e3be5944..81cc175014a3 100644 --- a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch +++ b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch @@ -16,10 +16,10 @@ Linux or Windows to un-fullscreen in some circumstances without this change. diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8e47c91b8 100644 +index 3d9ccff4a6a70e97d90f461a92c204af9a8e0a4f..e2a5a1751a6496a0ed7854737056564c2046d436 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -@@ -15,12 +15,16 @@ +@@ -16,12 +16,16 @@ #include "build/build_config.h" #include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/profiles/profile.h" @@ -36,7 +36,7 @@ index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8 #include "chrome/common/chrome_switches.h" #include "content/public/browser/fullscreen_types.h" #include "content/public/browser/navigation_details.h" -@@ -176,10 +180,12 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -177,10 +181,12 @@ void FullscreenController::EnterFullscreenModeForTab( return; } @@ -49,7 +49,7 @@ index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8 // Keep the current state. |SetTabWithExclusiveAccess| may change the return // value of |IsWindowFullscreenForTabOrPending|. -@@ -229,11 +235,13 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -237,11 +243,13 @@ void FullscreenController::EnterFullscreenModeForTab( } void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { @@ -63,7 +63,7 @@ index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8 if (MaybeToggleFullscreenWithinTab(web_contents, false)) { // During tab capture of fullscreen-within-tab views, the browser window -@@ -291,12 +299,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { +@@ -299,12 +307,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { void FullscreenController::FullscreenTabOpeningPopup( content::WebContents* opener, content::WebContents* popup) { @@ -78,7 +78,7 @@ index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8 } void FullscreenController::OnTabDeactivated( -@@ -466,18 +476,17 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -474,18 +484,17 @@ void FullscreenController::EnterFullscreenModeInternal( // Do not enter fullscreen mode if disallowed by pref. This prevents the user // from manually entering fullscreen mode and also disables kiosk mode on // desktop platforms. @@ -102,7 +102,7 @@ index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8 if (option == TAB) { url = GetRequestingOrigin(); tab_fullscreen_ = true; -@@ -510,6 +519,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -518,6 +527,7 @@ void FullscreenController::EnterFullscreenModeInternal( if (!extension_caused_fullscreen_.is_empty()) url = extension_caused_fullscreen_; } @@ -110,7 +110,7 @@ index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8 if (option == BROWSER) base::RecordAction(base::UserMetricsAction("ToggleFullscreen")); -@@ -530,12 +540,12 @@ void FullscreenController::ExitFullscreenModeInternal() { +@@ -538,12 +548,12 @@ void FullscreenController::ExitFullscreenModeInternal() { toggled_into_fullscreen_ = false; started_fullscreen_transition_ = true; diff --git a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch index f749936d6427..fb31961fce57 100644 --- a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch +++ b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch @@ -17,10 +17,10 @@ policy->CanCommitOriginAndUrl. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index 7a2ae574463e37388b61fc3aaee171cbcdb00add..deebea3bde4350388fc2ea25b41c5d4a0d9ba0a0 100644 +index e91fb6b203b55d4937e9f4b4ed8fd5e8efb5aa10..855cb90260de04b90b8bbf4a8733e0869cda551d 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -7536,10 +7536,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { +@@ -7543,10 +7543,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { if (IsForMhtmlSubframe()) return origin_with_debug_info; @@ -37,10 +37,10 @@ index 7a2ae574463e37388b61fc3aaee171cbcdb00add..deebea3bde4350388fc2ea25b41c5d4a } diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h -index c181162f4ab4be11c4ab2bb16be565e57ce82184..865a27f34e8b416429306b76e8f04613bfbf7f7b 100644 +index 10282bf7372a07937d3aa15af6f3f7e767321df6..ae5cfc9bc17c7e8e9d1ab9134c95ff6413fe2017 100644 --- a/content/browser/renderer_host/render_frame_host_impl.h +++ b/content/browser/renderer_host/render_frame_host_impl.h -@@ -2960,6 +2960,17 @@ class CONTENT_EXPORT RenderFrameHostImpl +@@ -2968,6 +2968,17 @@ class CONTENT_EXPORT RenderFrameHostImpl // last committed document. CookieChangeListener::CookieChangeInfo GetCookieChangeInfo(); @@ -58,7 +58,7 @@ index c181162f4ab4be11c4ab2bb16be565e57ce82184..865a27f34e8b416429306b76e8f04613 // Sets a ResourceCache in the renderer. `this` must be active and there must // be no pending navigation. `remote` must have the same and process // isolation policy. -@@ -3372,17 +3383,6 @@ class CONTENT_EXPORT RenderFrameHostImpl +@@ -3391,17 +3402,6 @@ class CONTENT_EXPORT RenderFrameHostImpl // relevant. void ResetWaitingState(); diff --git a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch index 414fff951fd7..795a7af4a9b8 100644 --- a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch +++ b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch @@ -9,20 +9,21 @@ to support content settings UI. The support pulls in chrome content settings and UI code which are not valid in the scope of Electron. diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc -index dbf7fedc002726f27e5e69bc13e5326ea26a3d85..452fb41d97060776e5434394ad5dee6a39b02ac8 100644 +index 0a58771f77f9fab4bd660191a1b2c612f7951858..a25feb97dfa1f7f5c0378cdac256a8de542f3b7d 100644 --- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc +++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc -@@ -18,7 +18,9 @@ +@@ -18,8 +18,10 @@ #include "ui/gfx/geometry/size.h" #if !BUILDFLAG(IS_ANDROID) #include "base/task/sequenced_task_runner.h" +#if BUILDFLAG(GOOGLE_CHROME_BRANDING) + #include "chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.h" #include "chrome/browser/picture_in_picture/auto_pip_setting_helper.h" +#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #include "third_party/blink/public/common/features.h" #include "ui/views/view.h" #endif // !BUILDFLAG(IS_ANDROID) -@@ -287,7 +289,7 @@ void PictureInPictureWindowManager::CloseWindowInternal() { +@@ -288,7 +290,7 @@ void PictureInPictureWindowManager::CloseWindowInternal() { video_web_contents_observer_.reset(); pip_window_controller_->Close(false /* should_pause_video */); pip_window_controller_ = nullptr; @@ -31,7 +32,7 @@ index dbf7fedc002726f27e5e69bc13e5326ea26a3d85..452fb41d97060776e5434394ad5dee6a auto_pip_setting_helper_.reset(); #endif // !BUILDFLAG(IS_ANDROID) } -@@ -298,8 +300,10 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() { +@@ -299,8 +301,10 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() { // contents, so we only need to forget the controller here when user closes // the parent web contents with the PiP window open. document_web_contents_observer_.reset(); @@ -42,15 +43,15 @@ index dbf7fedc002726f27e5e69bc13e5326ea26a3d85..452fb41d97060776e5434394ad5dee6a if (pip_window_controller_) pip_window_controller_ = nullptr; } -@@ -319,6 +323,7 @@ std::unique_ptr PictureInPictureWindowManager::GetOverlayView() { +@@ -318,6 +322,7 @@ std::unique_ptr PictureInPictureWindowManager::GetOverlayView() { return nullptr; } +#if BUILDFLAG(GOOGLE_CHROME_BRANDING) - auto auto_pip_setting_helper = AutoPipSettingHelper::CreateForWebContents( - pip_window_controller_->GetWebContents(), - base::BindOnce(&PictureInPictureWindowManager::ExitPictureInPictureSoon)); -@@ -330,6 +335,8 @@ std::unique_ptr PictureInPictureWindowManager::GetOverlayView() { + auto* const web_contents = pip_window_controller_->GetWebContents(); + + auto* auto_pip_tab_helper = +@@ -339,6 +344,8 @@ std::unique_ptr PictureInPictureWindowManager::GetOverlayView() { } return overlay_view; diff --git a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch index 6106a020813d..57b4c1299b28 100644 --- a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch +++ b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch @@ -45,10 +45,10 @@ index 648896b13ad4f811fdd196bd2fe5bdf62e7154ab..e2e3b414e73052b2b5b8e443ded18ae3 // RenderFrameMetadataProvider::Observer implementation. void OnRenderFrameMetadataChangedBeforeActivation( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 46258346efd962f2484d4edafd69a1c8e13fcc7e..4d7cb755eda35c4fe994c3d012781db33eb467d5 100644 +index e2e7b3e5cf8f581adee596903fc19886a23832c1..dd060f4207516af6b7db21593dcbed3848d47409 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -8331,7 +8331,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( +@@ -8336,7 +8336,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( "WebContentsImpl::OnFocusedElementChangedInFrame", "render_frame_host", frame); RenderWidgetHostViewBase* root_view = diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index 1c55b85349d0..21201d98f4f9 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -25,10 +25,10 @@ index c9a13aee1e64f359cd1d5c2e440b4df204420997..7790c311400fc84bfda6c99e1ebd8da7 // Returns true if duplex mode is set. bool SetDuplexModeInPrintSettings(mojom::DuplexMode mode); diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm -index 5acb259643c5d59e95cb958d1a066e9690758107..ed46c63b5a031eae8aaaf975ebb19b0dd1b357e7 100644 +index ee900c7541af99c61844920433ae39e2648ae90b..59137008aeddc03d60c58a463206dc91a0ef5c1f 100644 --- a/printing/printing_context_mac.mm +++ b/printing/printing_context_mac.mm -@@ -209,7 +209,8 @@ bool IsIppColorModelColorful(mojom::ColorModel color_model) { +@@ -464,7 +464,8 @@ void ApplySystemPrintDialogData( !SetCollateInPrintSettings(settings_->collate()) || !SetDuplexModeInPrintSettings(settings_->duplex_mode()) || !SetOutputColor(static_cast(settings_->color())) || @@ -38,7 +38,7 @@ index 5acb259643c5d59e95cb958d1a066e9690758107..ed46c63b5a031eae8aaaf975ebb19b0d return OnError(); } } -@@ -362,6 +363,22 @@ bool IsIppColorModelColorful(mojom::ColorModel color_model) { +@@ -617,6 +618,22 @@ void ApplySystemPrintDialogData( return PMSetCopies(print_settings, copies, false) == noErr; } @@ -100,10 +100,10 @@ index 07847521e7217c78480205812a73cc89503c00d2..586e866ca7ec0eb0b573d23e3bd95792 } else { // No need to bother, we don't know how many pages are available. diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc -index 154082c896f9a4403b75fe2120b5ad7371d5a0bf..8084f69a784100efcd1d731ebe2e71ab9c2b4f6d 100644 +index f3892e3f9ff2557bf604b48a8abc0fc4cbd3df1f..ba57bfc2dcef007dee536be0be6eb64d86532d09 100644 --- a/ui/gtk/printing/print_dialog_gtk.cc +++ b/ui/gtk/printing/print_dialog_gtk.cc -@@ -243,6 +243,24 @@ void PrintDialogGtk::UpdateSettings( +@@ -258,6 +258,24 @@ void PrintDialogGtk::UpdateSettings( gtk_print_settings_set_n_copies(gtk_settings_, settings->copies()); gtk_print_settings_set_collate(gtk_settings_, settings->collate()); diff --git a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch index 2c4d252ce081..90dc50433244 100644 --- a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -204,7 +204,7 @@ index 1e4d9e098463d61dcab787afcc46fea63b27e012..3f1ebf493ddd7d1c209acee2fb1255a0 const mojom::blink::UserActivationOption user_activation_option_; const mojom::blink::LoadEventBlockingOption blocking_option_; diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -index 11bcf86627d48da691d29b9f34c2db8ed8498e36..2e8a5d1954c34f5e5b382483808e0bc29c091d8d 100644 +index ccbf9e325d2aefe460800b1e515fd99c807a047c..24e810c757f3277b02d023c0f9937726b4242ffd 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 @@ -1118,14 +1118,15 @@ void WebLocalFrameImpl::RequestExecuteScript( diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 0082f813b13d..61058ee132cc 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -6,10 +6,10 @@ Subject: frame_host_manager.patch Allows embedder to intercept site instances created by chromium. diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc -index 32c4188651b2b14da3e8169b6d2ae58657be78d6..e38764b3ac83c06efba1bbea3b244c917c65901c 100644 +index 802e0ab8073b0709bd723c4d08eafbefef575592..93a6e16a3fee99c9c9d8e85f2a8e43bf7f1cbd17 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -4148,6 +4148,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -4161,6 +4161,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,7 +20,7 @@ index 32c4188651b2b14da3e8169b6d2ae58657be78d6..e38764b3ac83c06efba1bbea3b244c91 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 773c9cf07ac60b8555debe0c2bc9f7c66e897bb7..12374cd455795e188601095f984d12268ef91a95 100644 +index 98582da50756470a233dcec6ebd5ad78a172a74c..4179b3bd9825868245ea6431291166f377a6990d 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -311,6 +311,11 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index 4f1581d6ee4c..14ee684618f0 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -40,10 +40,10 @@ index c57305681efb469d296c90df68b6cdbea927580d..6dda1a5465e08df64b539ee203b7c403 // Called from BrowserMainLoop::PostCreateThreads(). // TODO(content/browser/gpu/OWNERS): This should probably use a diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc -index 990409f4bc4d8f2f06a6096925451ff005c1e97f..c9be8294f0246e88a2f18ef5bf7f17f97c481ef3 100644 +index 6831a7207aa2e02ea88673cd69cfe50f31c1682c..2ebd7dcbffed67caa5b625fa57332904c7e443fc 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1199,6 +1199,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { +@@ -1222,6 +1222,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { if (host) host->ForceShutdown(); } @@ -57,7 +57,7 @@ index 990409f4bc4d8f2f06a6096925451ff005c1e97f..c9be8294f0246e88a2f18ef5bf7f17f9 void GpuDataManagerImplPrivate::PostCreateThreads() { diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h -index 790e72f12c7f1cf6e49d2a51949769a5d14bd4db..e02c3033231f93792fe2b456c08cfc2ac0f3d49e 100644 +index 6d5e9789ad9eab175087cc6bd30100d83d90a13b..d1946374205973cf2856acf4fe81fbe7c62c923e 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.h +++ b/content/browser/gpu/gpu_data_manager_impl_private.h @@ -86,6 +86,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index c42c46f5b49f..8b46f462d6e3 100644 --- a/patches/chromium/gritsettings_resource_ids.patch +++ b/patches/chromium/gritsettings_resource_ids.patch @@ -6,7 +6,7 @@ Subject: gritsettings_resource_ids.patch Add electron resources file to the list of resource ids generation. diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec -index fcebe9c23e4fc823c8b178dcc26365dd70953314..620b79150735608222a2656dd48ca3bc0e27d92f 100644 +index e65fe348a1b7eaed2871cc811cb8c7a40dc9f92b..d86e9e965b3e5b47faad4a2bae390aca98285b86 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec @@ -1213,6 +1213,11 @@ diff --git a/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch b/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch index f6cf1655990d..1973ce20ae95 100644 --- a/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch +++ b/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 d8616c3d0e0f2c7a564521479d0013b5580b762d..44c3625a27a0cc4846cdec0e14b3cd0b0a42dfc4 100644 +index f55dc18e1870bf19c07d212dfdfb5d401046ae93..a426d68a65054cf2f0007c93100530bb75aeb558 100644 --- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc +++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc @@ -10,8 +10,8 @@ diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index 19ade17c2bee..127fc1682f60 100644 --- a/patches/chromium/load_v8_snapshot_in_browser_process.patch +++ b/patches/chromium/load_v8_snapshot_in_browser_process.patch @@ -9,7 +9,7 @@ but due to the nature of electron, we need to load the v8 snapshot in the browser process. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 5a28e805be7211fc5c26111aa22a30691f94fe7f..a972785f956cbfd04730a7420a249a3c9880d7ab 100644 +index 11dcd5eaabaaba0e297ecb992d1290b3adaff1b1..2c8a95ce169f9c322b545a4426b8bec2964de2e5 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc @@ -273,11 +273,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { diff --git a/patches/chromium/mas-cgdisplayusesforcetogray.patch b/patches/chromium/mas-cgdisplayusesforcetogray.patch index c6031ae10e18..a0c6d959cfce 100644 --- a/patches/chromium/mas-cgdisplayusesforcetogray.patch +++ b/patches/chromium/mas-cgdisplayusesforcetogray.patch @@ -6,7 +6,7 @@ Subject: mas: avoid usage of CGDisplayUsesForceToGray Removes usage of the CGDisplayUsesForceToGray private API. diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm -index 6130432b9c89636105b6793b99d495e3843a39bf..ce1ca1c610a581ad657d26bf586f56d62e78397c 100644 +index 18d1dbbc6d15ea7191f8c48c30e692a59875df37..8997858f873901a7cc7fb922f322c0150a1716f3 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm @@ -159,7 +159,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { diff --git a/patches/chromium/mas_disable_custom_window_frame.patch b/patches/chromium/mas_disable_custom_window_frame.patch index ae5ad21b66f1..e29ca56c8e77 100644 --- a/patches/chromium/mas_disable_custom_window_frame.patch +++ b/patches/chromium/mas_disable_custom_window_frame.patch @@ -95,7 +95,7 @@ index 94ac4fa8db42cb70fa5032a0c1eeb10ad94b8d9a..048cfe7b16d74845492c9317f1ed9790 // The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that // can only be accomplished by overriding methods. diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -index d52272fd1de2a7cd54841aec05d30fdae112c1ee..cc17da89fb9972f57f0686029b6e7a0f95354409 100644 +index 517333705c9b68706159bff2396c3ba1f8dc1f55..f11ce18fb4d1567eb53e6b9272424eecb40e51e1 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm @@ -113,7 +113,9 @@ void OrderChildWindow(NSWindow* child_window, diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index fb21a25ac18c..82e5f6573fcd 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -75,7 +75,7 @@ index 76be676717e62c429319338c6115be89f2dfa424..18a5fd3c87b08c95d668b70c9b8f7a76 void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event, diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index 45aeb6838a859f57287bec51f79a4eb77d69b619..6f5c28de251d4f6db9b07b37d0b513c2cc2826b3 100644 +index 5a6706495ed2a8f1cd781da9bde8572318bf6897..afd4d1f728a7f056e49b2ecb006c5a05388d3409 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm @@ -21,7 +21,9 @@ @@ -104,18 +104,18 @@ index 45aeb6838a859f57287bec51f79a4eb77d69b619..6f5c28de251d4f6db9b07b37d0b513c2 // Use native VoiceOver support for live regions. BrowserAccessibilityCocoa* retained_node = native_node; -@@ -627,6 +631,7 @@ void PostAnnouncementNotification(NSString* announcement, - if ([NSApp isActive]) +@@ -632,6 +636,7 @@ void PostAnnouncementNotification(NSString* announcement, return window == [NSApp accessibilityFocusedWindow]; + } +#if !IS_MAS_BUILD() // TODO(accessibility): We need a solution to the problem described below. // If the window is NSAccessibilityRemoteUIElement, there are some challenges: // 1. NSApp is the browser which spawned the PWA, and what it considers the -@@ -654,6 +659,7 @@ void PostAnnouncementNotification(NSString* announcement, - // from within the app shim content. - if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]]) +@@ -660,6 +665,7 @@ void PostAnnouncementNotification(NSString* announcement, + if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]]) { return true; + } +#endif return false; @@ -147,10 +147,10 @@ index 3edad19a3ecbd27f54f1d17aca2e806fbbff05d4..1b4ed839f0d00334fd32a102be07be91 // Used to force the NSApplication's focused accessibility element to be the // content::BrowserAccessibilityCocoa accessibility tree when the NSView for diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 8fc94f84498fe5f6cde55f9b9cdf93c9592124d6..6dadda85eaa3c885540190fc0744c5063961d06a 100644 +index d7e190889ff678599410eef4c172f0a25e9837d0..3fb6ed640ee9d857f19b4d60b12047133e68f920 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -285,8 +285,10 @@ +@@ -278,8 +278,10 @@ void RenderWidgetHostViewMac::MigrateNSViewBridge( remote_cocoa::mojom::Application* remote_cocoa_application, uint64_t parent_ns_view_id) { @@ -161,7 +161,7 @@ index 8fc94f84498fe5f6cde55f9b9cdf93c9592124d6..6dadda85eaa3c885540190fc0744c506 // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling // pointers. `ns_view_` gets reinitialized later in this method. -@@ -1652,8 +1654,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1636,8 +1638,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -172,7 +172,7 @@ index 8fc94f84498fe5f6cde55f9b9cdf93c9592124d6..6dadda85eaa3c885540190fc0744c506 return [GetInProcessNSView() window]; } -@@ -1698,9 +1702,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1682,9 +1686,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -184,7 +184,7 @@ index 8fc94f84498fe5f6cde55f9b9cdf93c9592124d6..6dadda85eaa3c885540190fc0744c506 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2202,12 +2208,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2186,12 +2192,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { diff --git a/patches/chromium/mas_disable_remote_layer.patch b/patches/chromium/mas_disable_remote_layer.patch index 23790b550922..e466027bfdc5 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -16,10 +16,10 @@ cases where performance improves when disabling remote CoreAnimation (remote CoreAnimation is really only about battery usage). diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h -index 879113fded1a373f844b1d2bc3b001acc1da8554..fe0540847d3347244e4e9bfecd5ddc771e71b4e3 100644 +index 655dca3b5628eae2d13bce22e24a517113701480..30b97c47b6804d5677f87a59d7d5c6028f6d4bf4 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.h +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h -@@ -27,7 +27,9 @@ +@@ -23,7 +23,9 @@ #include "ui/display/types/display_constants.h" #endif @@ -29,7 +29,7 @@ index 879113fded1a373f844b1d2bc3b001acc1da8554..fe0540847d3347244e4e9bfecd5ddc77 @class CALayer; namespace ui { -@@ -83,8 +85,10 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::Presenter { +@@ -79,8 +81,10 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::Presenter { base::WeakPtr delegate_; diff --git a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch index e43a8c4d6504..4131f8b2812a 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,7 +7,7 @@ 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 5afca29e19d618e75bf866e2382aa782ff38e409..ba499d50b948d90011d6eeb1463dbfda54e7d9b0 100644 +index 65b1c1214ee4de50d43d88f880aa578ab45d30ae..ad246393cbd3eedbd91495fe9d3c3f046ccfb553 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -146,6 +146,11 @@ @@ -121,8 +121,8 @@ index 5afca29e19d618e75bf866e2382aa782ff38e409..ba499d50b948d90011d6eeb1463dbfda + constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; - NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -781,6 +879,13 @@ void NetworkContext::SetClient( + NetworkContext::NetworkContextHttpAuthPreferences:: +@@ -824,6 +922,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -136,7 +136,7 @@ index 5afca29e19d618e75bf866e2382aa782ff38e409..ba499d50b948d90011d6eeb1463dbfda void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2340,6 +2445,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2383,6 +2488,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get()); #endif // BUILDFLAG(IS_CHROMEOS) @@ -147,7 +147,7 @@ index 5afca29e19d618e75bf866e2382aa782ff38e409..ba499d50b948d90011d6eeb1463dbfda builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index f798602b2d56db1c44e5a97de017f8095edba5cd..a452681df0b17c99fb476950ca9e22325bd8b8b9 100644 +index ff73db2f2a269de96efb4c762c92e0d3f7514945..4c0cb2e133d84329ab58eff4f30dc7615516b3ae 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -114,6 +114,7 @@ class URLMatcher; @@ -167,7 +167,7 @@ index f798602b2d56db1c44e5a97de017f8095edba5cd..a452681df0b17c99fb476950ca9e2232 void ResetURLLoaderFactories() override; void GetViaObliviousHttp( mojom::ObliviousHttpRequestPtr request, -@@ -885,6 +888,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -896,6 +899,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -177,10 +177,10 @@ index f798602b2d56db1c44e5a97de017f8095edba5cd..a452681df0b17c99fb476950ca9e2232 std::unique_ptr internal_host_resolver_; // Map values set to non-null only if that HostResolver has its own private diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 30514ba8a4157a1d8331ffb1a567b2e0ccce04d2..987d1186a02e7261980dae8ba732a97d03aed7b8 100644 +index 40dfb7fd2ad98b80a3f41c0e8e3d82674339cd9e..772577a0ed4aeb47bb13dcd27ea38b943a2c0952 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -311,6 +311,17 @@ struct NetworkContextFilePaths { +@@ -317,6 +317,17 @@ struct NetworkContextFilePaths { bool trigger_migration = false; }; @@ -198,7 +198,7 @@ index 30514ba8a4157a1d8331ffb1a567b2e0ccce04d2..987d1186a02e7261980dae8ba732a97d // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -922,6 +933,9 @@ interface NetworkContext { +@@ -936,6 +947,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 36ea53a6a435..b5694dd10da4 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -133,7 +133,7 @@ index d0e0d10739b5daf99435a67e18dc51df8e670e09..704f3d6c2fdd27a84d1c4e1b7bf680f6 const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 22905a0f4e04d6e3e42cb9a76f930811b6e6252c..a3f0c3cebf6e15b88ab5183ddce1cd56f3e7a431 100644 +index 522868ab9b0e6b26880d2b0cf9d446ffcccdbf94..d4532109047c928cbd69e042b020b334896c82d8 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -1967,7 +1967,7 @@ void RenderProcessHostImpl::CreateNotificationService( diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 15b7ee0c0184..7483d4e4e428 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -8,6 +8,37 @@ chrome's generated resources for our own. This updates the #include so that we don't get errors for Chrome's generated resources, which are non-existent because we don't generate them in our build. +diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc +index af0616d9ca466d146f3c41887857dd4720ebafbf..c088db193f5bd4b88aa42a3803571d2b87251b76 100644 +--- a/chrome/browser/ui/views/overlay/close_image_button.cc ++++ b/chrome/browser/ui/views/overlay/close_image_button.cc +@@ -4,11 +4,14 @@ + + #include "chrome/browser/ui/views/overlay/close_image_button.h" + ++#include "build/branding_buildflags.h" + #include "build/chromeos_buildflags.h" + #include "chrome/browser/ui/color/chrome_color_id.h" + #include "chrome/grit/generated_resources.h" ++#if BUILDFLAG(GOOGLE_CHROME_BRANDING) + #include "components/omnibox/browser/omnibox_field_trial.h" + #include "components/vector_icons/vector_icons.h" ++#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) + #include "ui/base/l10n/l10n_util.h" + #include "ui/base/metadata/metadata_impl_macros.h" + #include "ui/base/models/image_model.h" +@@ -28,9 +31,11 @@ CloseImageButton::CloseImageButton(PressedCallback callback) + SetSize(gfx::Size(kCloseButtonSize, kCloseButtonSize)); + + auto* icon = &views::kIcCloseIcon; ++#if BUILDFLAG(GOOGLE_CHROME_BRANDING) + if (OmniboxFieldTrial::IsChromeRefreshIconsEnabled()) { + icon = &vector_icons::kCloseChromeRefreshIcon; + } ++#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) + SetImageModel(views::Button::STATE_NORMAL, + 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 9e5e40c912c00b70d921d422ce141cd9d4a5bcd3..25b4b9cd6d4d9ff8c48fac7d04385963463d00f5 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc diff --git a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch index 0153f855587e..954b715f542c 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index 72d98dde6611ee65aa5b3f2fb1ad8c1cbcd24230..5d4d972b24a3e758a0fce116021b48c0c1b8021f 100644 +index 8a74fba9a68fc15899542da777140a9e45ea469c..08828dad209510d715f711280cc8b2836e4e84e9 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h -@@ -400,6 +400,10 @@ +@@ -407,6 +407,10 @@ E_CPONLY(kColorScrollbarThumbInactive) \ E_CPONLY(kColorScrollbarThumbPressed) \ E_CPONLY(kColorScrollbarTrack) \ @@ -22,7 +22,7 @@ index 72d98dde6611ee65aa5b3f2fb1ad8c1cbcd24230..5d4d972b24a3e758a0fce116021b48c0 E_CPONLY(kColorSegmentedButtonBorder) \ E_CPONLY(kColorSegmentedButtonFocus) \ E_CPONLY(kColorSegmentedButtonForegroundChecked) \ -@@ -504,6 +508,7 @@ +@@ -511,6 +515,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 66da647dad0f..165a80ec4e77 100644 --- a/patches/chromium/printing.patch +++ b/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 99a80c73248bf54e7478d6038601442645f01158..beb628520129d48019c12a8383c5ab5d7a22e22d 100644 +index ce097109b6a199de57693481310bbf5fdd948c35..11e5c96c3379375bd320320fc684881013ef0e8f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -969,7 +969,6 @@ if (is_win) { @@ -706,7 +706,7 @@ index 3f9a514fb41d72c5d06de6ac989f9d7c0513a4e7..0e7ada9df962808dad7caf074a08ebde // Tells the browser printing failed. PrintingFailed(int32 cookie, PrintFailureReason reason); diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index cf97fc794294cbd5c2bcfd8a358c7b2291723e74..f55a1a6fd0eaeb9f1b2487dfcb272c301c9f9b1c 100644 +index 658a3c59993ac30feaea4d86148ed5adc9dcbdb1..afa788bbefc8f814af9b70ff5b5ebbc86a1777cd 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -45,6 +45,7 @@ @@ -717,7 +717,7 @@ index cf97fc794294cbd5c2bcfd8a358c7b2291723e74..f55a1a6fd0eaeb9f1b2487dfcb272c30 #include "printing/units.h" #include "services/metrics/public/cpp/ukm_source_id.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" -@@ -1318,14 +1319,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1322,14 +1323,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { } print_in_progress_ = true; @@ -734,7 +734,7 @@ index cf97fc794294cbd5c2bcfd8a358c7b2291723e74..f55a1a6fd0eaeb9f1b2487dfcb272c30 if (!weak_this) { return; } -@@ -1356,7 +1357,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1360,7 +1361,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -743,7 +743,7 @@ index cf97fc794294cbd5c2bcfd8a358c7b2291723e74..f55a1a6fd0eaeb9f1b2487dfcb272c30 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1371,7 +1372,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1375,7 +1376,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -752,7 +752,7 @@ index cf97fc794294cbd5c2bcfd8a358c7b2291723e74..f55a1a6fd0eaeb9f1b2487dfcb272c30 if (render_frame_gone_) { return; -@@ -1458,7 +1459,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1462,7 +1463,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -762,7 +762,7 @@ index cf97fc794294cbd5c2bcfd8a358c7b2291723e74..f55a1a6fd0eaeb9f1b2487dfcb272c30 if (render_frame_gone_) { return; } -@@ -1521,6 +1523,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { +@@ -1525,6 +1527,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -771,7 +771,7 @@ index cf97fc794294cbd5c2bcfd8a358c7b2291723e74..f55a1a6fd0eaeb9f1b2487dfcb272c30 print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -2153,7 +2157,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2158,7 +2162,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { } Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -781,7 +781,7 @@ index cf97fc794294cbd5c2bcfd8a358c7b2291723e74..f55a1a6fd0eaeb9f1b2487dfcb272c30 // Check if `this` is still valid. if (!weak_this) { return; -@@ -2169,7 +2174,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2174,7 +2179,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -792,7 +792,7 @@ index cf97fc794294cbd5c2bcfd8a358c7b2291723e74..f55a1a6fd0eaeb9f1b2487dfcb272c30 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -2177,7 +2184,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2182,7 +2189,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -801,7 +801,7 @@ index cf97fc794294cbd5c2bcfd8a358c7b2291723e74..f55a1a6fd0eaeb9f1b2487dfcb272c30 DidFinishPrinting(PrintingResult::kFailPrintInit); return; // Failed to init print page settings. } -@@ -2196,8 +2203,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2201,8 +2208,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -818,7 +818,7 @@ index cf97fc794294cbd5c2bcfd8a358c7b2291723e74..f55a1a6fd0eaeb9f1b2487dfcb272c30 // Check if `this` is still valid. if (!self) return; -@@ -2441,35 +2455,47 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2446,35 +2460,47 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -876,7 +876,7 @@ index cf97fc794294cbd5c2bcfd8a358c7b2291723e74..f55a1a6fd0eaeb9f1b2487dfcb272c30 return false; } -@@ -2574,7 +2600,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2579,7 +2605,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -927,10 +927,10 @@ index 8d65b7b6440c8e653eb1b3f9c50b40944b7ae61b..eb6b4a42d507ff216fc07328c1907815 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 7dcbbbba95fbc85c574f02dcd8b64a461d0652ec..180a4bbe8f0b39858f154d41aca8ffbb483c7cab 100644 +index e861d5b7562cda69a7e113882d22087a2f6cdda9..e0d55a859061f029e5298599bf2d9345674ecb34 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -2946,8 +2946,9 @@ source_set("browser") { +@@ -2951,8 +2951,9 @@ source_set("browser") { "//ppapi/shared_impl", ] @@ -943,7 +943,7 @@ index 7dcbbbba95fbc85c574f02dcd8b64a461d0652ec..180a4bbe8f0b39858f154d41aca8ffbb if (is_chromeos) { sources += [ diff --git a/printing/printing_context.cc b/printing/printing_context.cc -index 370dedfb4b4649f85a02b3a50ee16f525f57f44a..256666b64d8ffb5b50c9424c40ae1bb4050da6fb 100644 +index 6aae8700c36346edfb44db0cec569efb3702cafe..75a5c89b8e0c916239b5f4fc1f062df4cd22733b 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc @@ -143,7 +143,6 @@ void PrintingContext::UsePdfSettings() { @@ -955,10 +955,10 @@ index 370dedfb4b4649f85a02b3a50ee16f525f57f44a..256666b64d8ffb5b50c9424c40ae1bb4 std::unique_ptr settings = PrintSettingsFromJobSettings(job_settings); diff --git a/printing/printing_context.h b/printing/printing_context.h -index 2fb3aef0797f204f08c20e48987cd8c2703185de..75a70e331f8b539027748dad3252912cb85e8797 100644 +index c753f04d8b73a51cb7e05dcdb86afc0e981e7a71..7ec1729e08bf42a51f80885b3838eee95c8bc953 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h -@@ -178,6 +178,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { +@@ -174,6 +174,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { bool PrintingAborted() const { return abort_printing_; } @@ -968,7 +968,7 @@ index 2fb3aef0797f204f08c20e48987cd8c2703185de..75a70e331f8b539027748dad3252912c int job_id() const { return job_id_; } protected: -@@ -188,9 +191,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { +@@ -184,9 +187,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { static std::unique_ptr CreateImpl(Delegate* delegate, bool skip_system_calls); diff --git a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch index 63207c9bfd1c..49e88489db8f 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -30,7 +30,7 @@ index fe010b1f001130fbdeaf4ef9ce7798e4baf958b5..28f1305f439be7f669e482ac0e4804c0 // 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 fa85ffa12a49b8be8f2801441ba255642cec2402..830cc666fd767d3de1de3cab3870adf7224613a4 100644 +index 149ead7bbf52ad127747c5f80f0e35a13203502a..0f2a73f990fd41112d18ab6a9ed5bc43b90c235a 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -2121,6 +2121,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { @@ -44,10 +44,10 @@ index fa85ffa12a49b8be8f2801441ba255642cec2402..830cc666fd767d3de1de3cab3870adf7 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index afbfd6e2ee6b3cb331dd0abd034f82903207981a..80e0b9747484b13b76eba8e9a097a2fd10c1ef9d 100644 +index 9bb752da088be1fae748430c69c39b7fa86cab08..5bcd634f1bd29a58cae240274269d952ef6570e9 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4913,6 +4913,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4916,6 +4916,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index 57b98249dc79..97bffade33c9 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/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 afb765cb7b74a8353fbaf284ee8a648d5d4eede7..cb1111aaf2132737b730ba1d358088f212e11599 100644 +index ecd17200be6a50c26642daa8964c526454414335..0e66bac2dce5ae1b30b782702e15b387b73b04b4 100644 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm @@ -157,6 +157,15 @@ void ExtractUnderlines(NSAttributedString* string, @@ -50,7 +50,7 @@ index afb765cb7b74a8353fbaf284ee8a648d5d4eede7..cb1111aaf2132737b730ba1d358088f2 if (view == self) hitSelf = YES; if ([view isKindOfClass:[self class]] && ![view isEqual:self] && -@@ -1147,6 +1163,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -1157,6 +1173,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { eventType == NSEventTypeKeyDown && !(modifierFlags & NSEventModifierFlagCommand); @@ -61,7 +61,7 @@ index afb765cb7b74a8353fbaf284ee8a648d5d4eede7..cb1111aaf2132737b730ba1d358088f2 // We only handle key down events and just simply forward other events. if (eventType != NSEventTypeKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1977,15 +1997,21 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1987,15 +2007,21 @@ - (NSAccessibilityRole)accessibilityRole { // Since this implementation doesn't have to wait any IPC calls, this doesn't // make any key-typing jank. --hbono 7/23/09 // diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 646aefd07ea7..81f5205a997a 100644 --- a/patches/chromium/resource_file_conflict.patch +++ b/patches/chromium/resource_file_conflict.patch @@ -52,10 +52,10 @@ Some alternatives to this patch: None of these options seems like a substantial maintainability win over this patch to me (@nornagon). diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index 546e384e8d865e451d7fc6cf28bcd85669b13fec..93a7ba1a84491f25e96b1345219f34dedef1edca 100644 +index bc54ace77cade8c2e2439af6d0c18984cfdaf5c6..41ce32113ec2679b76d5a4fd69a7109c832ac7a1 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1609,7 +1609,7 @@ if (is_chrome_branded && !is_android) { +@@ -1612,7 +1612,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 546e384e8d865e451d7fc6cf28bcd85669b13fec..93a7ba1a84491f25e96b1345219f34de chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1638,6 +1638,12 @@ if (!is_android) { +@@ -1641,6 +1641,12 @@ if (!is_android) { } } diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index b1e04801b13e..f692d18520a1 100644 --- a/patches/chromium/scroll_bounce_flag.patch +++ b/patches/chromium/scroll_bounce_flag.patch @@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch Patch to make scrollBounce option work. diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc -index d1f8638d390858b0872c56a62168acb7eef04db4..6193cefd3e98ca550dc3a5ac7b78925b89aebd71 100644 +index 328ed025f6b71c34f2855a5a2983dee7e7081c11..1ec54e2cdd24e5510d1081524554dbc05c256281 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1334,7 +1334,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1331,7 +1331,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch index 878bf27b60e9..61420c952d3b 100644 --- a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch +++ b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch @@ -15,7 +15,7 @@ short-circuit all the permissions checks in MSDC for now to allow us to unduplicate this code. diff --git a/components/webrtc/media_stream_devices_controller.cc b/components/webrtc/media_stream_devices_controller.cc -index efbea8c15b096344b0cc65cc337a9cdbd727cb55..ca31bba7fc6daf68e6862554a70032dfdc8285b5 100644 +index be66cc8226fa719645701d5cf708ae91c2bf823d..6cf82318db3cc74b2387cb76583284df5ddaed4a 100644 --- a/components/webrtc/media_stream_devices_controller.cc +++ b/components/webrtc/media_stream_devices_controller.cc @@ -57,7 +57,8 @@ bool PermissionIsRequested(blink::PermissionType permission, @@ -36,7 +36,7 @@ index efbea8c15b096344b0cc65cc337a9cdbd727cb55..ca31bba7fc6daf68e6862554a70032df content::PermissionController* permission_controller = web_contents->GetBrowserContext()->GetPermissionController(); -@@ -153,19 +155,25 @@ void MediaStreamDevicesController::RequestPermissions( +@@ -153,21 +155,27 @@ void MediaStreamDevicesController::RequestPermissions( permission_types.push_back(blink::PermissionType::CAMERA_PAN_TILT_ZOOM); } } @@ -50,7 +50,9 @@ index efbea8c15b096344b0cc65cc337a9cdbd727cb55..ca31bba7fc6daf68e6862554a70032df - rfh->GetBrowserContext() - ->GetPermissionController() - ->RequestPermissionsFromCurrentDocument( -- permission_types, rfh, request.user_gesture, +- rfh, +- content::PermissionRequestDescription(permission_types, +- request.user_gesture), - base::BindOnce( - &MediaStreamDevicesController::PromptAnsweredGroupedRequest, - std::move(controller))); @@ -59,17 +61,19 @@ index efbea8c15b096344b0cc65cc337a9cdbd727cb55..ca31bba7fc6daf68e6862554a70032df + blink::mojom::PermissionStatus::GRANTED /*video*/}); + } else { + rfh->GetBrowserContext() -+ ->GetPermissionController() -+ ->RequestPermissionsFromCurrentDocument( -+ permission_types, rfh, request.user_gesture, -+ base::BindOnce( -+ &MediaStreamDevicesController::PromptAnsweredGroupedRequest, -+ std::move(controller))); ++ ->GetPermissionController() ++ ->RequestPermissionsFromCurrentDocument( ++ rfh, ++ content::PermissionRequestDescription(permission_types, ++ request.user_gesture), ++ base::BindOnce( ++ &MediaStreamDevicesController::PromptAnsweredGroupedRequest, ++ std::move(controller))); + } } MediaStreamDevicesController::~MediaStreamDevicesController() { -@@ -435,6 +443,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( +@@ -437,6 +445,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( return false; } @@ -77,7 +81,7 @@ index efbea8c15b096344b0cc65cc337a9cdbd727cb55..ca31bba7fc6daf68e6862554a70032df // TODO(raymes): This function wouldn't be needed if // PermissionManager::RequestPermissions returned a denial reason. content::PermissionResult result = -@@ -445,6 +454,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( +@@ -447,6 +456,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( DCHECK_EQ(blink::mojom::PermissionStatus::DENIED, result.status); return true; } diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 9a9141a08d61..a17f3d72f35e 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/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 a3f0c3cebf6e15b88ab5183ddce1cd56f3e7a431..a11bb4b6a2740240bdf325b2b0c609d0bd662fa7 100644 +index d4532109047c928cbd69e042b020b334896c82d8..b549e5795621e5493db5d23407b6d040f32c38cf 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -1652,9 +1652,15 @@ bool RenderProcessHostImpl::Init() { diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index f1c6e9bbbbc2..4b35381b7c02 100644 --- a/patches/chromium/web_contents.patch +++ b/patches/chromium/web_contents.patch @@ -9,10 +9,10 @@ is needed for OSR. Originally landed in https://github.com/electron/libchromiumcontent/pull/226. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index d28f76fb8221df7da24179bf703f69861ae14042..79df3379152f0fa8d0bd00dc44dcc6c5fc60b089 100644 +index 60d76d4ecf3bbda940f9a43d86259fcfd7d4a349..d4fc5a92413234196a531edc90aae66d3131b5fb 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3321,6 +3321,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3324,6 +3324,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 d28f76fb8221df7da24179bf703f69861ae14042..79df3379152f0fa8d0bd00dc44dcc6c5 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3331,6 +3338,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3334,6 +3341,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index a52b49fb6e18..cfabd64b93f6 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -15,10 +15,10 @@ Note that we also need to manually update embedder's `api::WebContents::IsFullscreenForTabOrPending` value. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 5703e89379df95dc4c5e99f77c0a60a1778c4ca6..1b123b73db2a6761014d7849f42996daf9c52de7 100644 +index e2303fbb80ccc7d76d6a949678608c6a55ea411d..029c90e6f1ea240d2c4f87182351b6c587fbef4b 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -7378,6 +7378,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -7417,6 +7417,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } @@ -37,10 +37,10 @@ index 5703e89379df95dc4c5e99f77c0a60a1778c4ca6..1b123b73db2a6761014d7849f42996da 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 79df3379152f0fa8d0bd00dc44dcc6c5fc60b089..46258346efd962f2484d4edafd69a1c8e13fcc7e 100644 +index d4fc5a92413234196a531edc90aae66d3131b5fb..e2e7b3e5cf8f581adee596903fc19886a23832c1 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3566,21 +3566,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( +@@ -3569,21 +3569,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( const NativeWebKeyboardEvent& event) { OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"), "WebContentsImpl::PreHandleKeyboardEvent"); @@ -78,7 +78,7 @@ index 79df3379152f0fa8d0bd00dc44dcc6c5fc60b089..46258346efd962f2484d4edafd69a1c8 } bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { -@@ -3712,7 +3716,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -3715,7 +3719,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame, options)); DCHECK(requesting_frame->IsActive()); diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 1d261c064301..a4d28cc39ae3 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,7 +26,7 @@ index a4130ad4dc8158f8256b55fdd87f577687135626..3139aa65807cee23f0e8dbc85243566e // An empty URL is returned if the URL is not overriden. virtual GURL OverrideFlashEmbedWithHTML(const GURL& url); diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index 321cfcb54a8dd80b12c741c9a8f20394aa004402..6f548767407d2e56ec259edf6d5103306e36233d 100644 +index 0371357fd074162b7569b2075acf0342b1fbd39b..f5cca7df8c6876ea777ee985d77e3a882b0b2776 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc @@ -794,6 +794,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { diff --git a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch index ff24fb5d8e5f..559d4c371101 100644 --- a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch +++ b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch @@ -35,7 +35,7 @@ index 3139aa65807cee23f0e8dbc85243566ef9de89b9..19707edb1283f2432f3c0059f80fabd5 // from the worker thread. virtual void WillDestroyWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index 6f548767407d2e56ec259edf6d5103306e36233d..c4b490868e5c941461d422bbea3047438d6b476a 100644 +index f5cca7df8c6876ea777ee985d77e3a882b0b2776..104be40b57bed8ecdc7e81953810ba79355a6e44 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc @@ -806,6 +806,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( diff --git a/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch b/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch index 42bbae8b52af..c937aca6a5fe 100644 --- a/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch +++ b/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch @@ -12,10 +12,10 @@ upstream a more durable approach to allowing us to do this, at which point this patch can be removed. diff --git a/front_end/entrypoints/shell/BUILD.gn b/front_end/entrypoints/shell/BUILD.gn -index eb0638979786ef5ec3973a861f424a8e95b02e68..ae3c2f29512d0f2443c5b6c45b3a5d69aeba639c 100644 +index 9b7c4251dde44c7e2ce76637515bb193a63427d8..76c2f924967df85d01ed41616609273adfad1342 100644 --- a/front_end/entrypoints/shell/BUILD.gn +++ b/front_end/entrypoints/shell/BUILD.gn -@@ -31,6 +31,7 @@ devtools_entrypoint("shell") { +@@ -30,6 +30,7 @@ devtools_entrypoint("shell") { "../../ui/legacy/components/perf_ui:meta", "../../ui/legacy/components/quick_open:meta", "../../ui/legacy/components/source_frame:meta", @@ -24,10 +24,10 @@ index eb0638979786ef5ec3973a861f424a8e95b02e68..ae3c2f29512d0f2443c5b6c45b3a5d69 visibility = [ diff --git a/front_end/entrypoints/shell/shell.ts b/front_end/entrypoints/shell/shell.ts -index 10580db71ce6150210c7eb01bf6410197e94c236..766707a9efcea634d203aeee2497f67f79ce32c8 100644 +index b1f0db6afb29188e4e69c5dd899523e836f9d253..4290e626fd875a50740bbd668ca11a4fef6ef8b5 100644 --- a/front_end/entrypoints/shell/shell.ts +++ b/front_end/entrypoints/shell/shell.ts -@@ -19,6 +19,7 @@ import '../../models/logs/logs-meta.js'; +@@ -18,6 +18,7 @@ import '../../models/logs/logs-meta.js'; import '../main/main-meta.js'; import '../../ui/legacy/components/perf_ui/perf_ui-meta.js'; import '../../ui/legacy/components/quick_open/quick_open-meta.js'; diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index f0b72b070685..e38803dc1064 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,7 +9,7 @@ necessary for native modules to load. Also change visibility on mksnapshot in order to target mksnapshot for mksnapshot zip. diff --git a/BUILD.gn b/BUILD.gn -index 60628363bcf72a6767fb73580e8d244d8c04f5b0..17c26db05ed7e2bae375f2f57e68031c2a0cc597 100644 +index dd97c4f922c81a65bdc401e251612333ca63ee78..0509b89bee4ff47ba9e55c244a50b7470b3ea1c3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -747,7 +747,7 @@ config("internal_config") { @@ -21,7 +21,7 @@ index 60628363bcf72a6767fb73580e8d244d8c04f5b0..17c26db05ed7e2bae375f2f57e68031c defines += [ "BUILDING_V8_SHARED" ] } -@@ -6740,7 +6740,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6741,7 +6741,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index 60628363bcf72a6767fb73580e8d244d8c04f5b0..17c26db05ed7e2bae375f2f57e68031c deps = [ ":v8_libbase", -@@ -6752,7 +6752,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6753,7 +6753,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/chore_allow_customizing_microtask_policy_per_context.patch b/patches/v8/chore_allow_customizing_microtask_policy_per_context.patch index 7d62ff91391f..ab29d69f3301 100644 --- a/patches/v8/chore_allow_customizing_microtask_policy_per_context.patch +++ b/patches/v8/chore_allow_customizing_microtask_policy_per_context.patch @@ -23,10 +23,10 @@ index 85d227fa3fdce6fc29bc4927e30a0171987578ac..1a61190ed3a2aeb440aa774788a46907 MicrotaskQueue& operator=(const MicrotaskQueue&) = delete; diff --git a/src/execution/microtask-queue.h b/src/execution/microtask-queue.h -index 6091fa3575cf82ea532e88747c753040045cc9a0..55eee1dcede4daeed53bdc0447cfb714763d0d32 100644 +index 8ef62824d475d7c669e08b8d11e9d91af3c8e5a3..b64c7f603c67420aa09029dead063bfb12ba863b 100644 --- a/src/execution/microtask-queue.h +++ b/src/execution/microtask-queue.h -@@ -91,10 +91,10 @@ class V8_EXPORT_PRIVATE MicrotaskQueue final : public v8::MicrotaskQueue { +@@ -93,10 +93,10 @@ class V8_EXPORT_PRIVATE MicrotaskQueue final : public v8::MicrotaskQueue { } #endif diff --git a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch index ab0a3ccb557e..ba7b8676dffb 100644 --- a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch +++ b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch @@ -12,7 +12,7 @@ This patch can be safely removed if, when it is removed, `node.lib` does not contain any standard C++ library exports (e.g. `std::ostringstream`). diff --git a/BUILD.gn b/BUILD.gn -index 17c26db05ed7e2bae375f2f57e68031c2a0cc597..dfad9c716c4e067822cfdf431cd8ee375c92fb94 100644 +index 0509b89bee4ff47ba9e55c244a50b7470b3ea1c3..e5a30137ccb2051f43e2bdfc276052e1e9114669 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -747,6 +747,10 @@ config("internal_config") { @@ -27,13 +27,13 @@ index 17c26db05ed7e2bae375f2f57e68031c2a0cc597..dfad9c716c4e067822cfdf431cd8ee37 defines += [ "BUILDING_V8_SHARED" ] } diff --git a/src/base/macros.h b/src/base/macros.h -index 25a533c5a4a4a7b9395615e9742b823dfde5856f..8079d2f49066dfc0c63a28b8d3964aaaceb017fc 100644 +index f812583633b8d8b7efdf67deeb8a1190350d52c2..bb035f25ee60d9fd9a0e8af9751a84397221fb1a 100644 --- a/src/base/macros.h +++ b/src/base/macros.h -@@ -387,13 +387,17 @@ bool is_inbounds(float_t v) { - #ifdef V8_OS_WIN +@@ -388,13 +388,17 @@ bool is_inbounds(float_t v) { // Setup for Windows shared library export. + #define V8_EXPORT_ENUM +#if defined(HIDE_PRIVATE_SYMBOLS) +#define V8_EXPORT_PRIVATE +#else //if !defined(HIDE_PRIVATE_SYMBOLS) diff --git a/shell/browser/api/electron_api_desktop_capturer.cc b/shell/browser/api/electron_api_desktop_capturer.cc index 43bc87cf67bf..5e54b5f78071 100644 --- a/shell/browser/api/electron_api_desktop_capturer.cc +++ b/shell/browser/api/electron_api_desktop_capturer.cc @@ -12,6 +12,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_restrictions.h" +#include "chrome/browser/media/webrtc/desktop_capturer_wrapper.h" #include "chrome/browser/media/webrtc/desktop_media_list.h" #include "chrome/browser/media/webrtc/window_icon_util.h" #include "content/public/browser/desktop_capture.h" @@ -237,9 +238,13 @@ void DesktopCapturer::StartHandling(bool capture_window, if (capture_window && capture_screen) { // Some capturers like PipeWire suppport a single capturer for both screens // and windows. Use it if possible, treating both as window capture - if (auto capturer = webrtc::DesktopCapturer::CreateGenericCapturer( + std::unique_ptr desktop_capturer = + webrtc::DesktopCapturer::CreateGenericCapturer( content::desktop_capture::CreateDesktopCaptureOptions()); - capturer && capturer->GetDelegatedSourceListController()) { + auto capturer = desktop_capturer ? std::make_unique( + std::move(desktop_capturer)) + : nullptr; + if (capturer && capturer->GetDelegatedSourceListController()) { capture_screen_ = false; capture_window_ = capture_window; window_capturer_ = std::make_unique( @@ -269,8 +274,13 @@ void DesktopCapturer::StartHandling(bool capture_window, // Initialize the source list. // Apply the new thumbnail size and restart capture. if (capture_window) { - if (auto capturer = content::desktop_capture::CreateWindowCapturer(); - capturer) { + std::unique_ptr window_capturer = + content::desktop_capture::CreateWindowCapturer(); + auto capturer = window_capturer + ? std::make_unique( + std::move(window_capturer)) + : nullptr; + if (capturer) { window_capturer_ = std::make_unique( DesktopMediaList::Type::kWindow, std::move(capturer)); window_capturer_->SetThumbnailSize(thumbnail_size); @@ -294,8 +304,13 @@ void DesktopCapturer::StartHandling(bool capture_window, } if (capture_screen) { - if (auto capturer = content::desktop_capture::CreateScreenCapturer(); - capturer) { + std::unique_ptr screen_capturer = + content::desktop_capture::CreateScreenCapturer(); + auto capturer = screen_capturer + ? std::make_unique( + std::move(screen_capturer)) + : nullptr; + if (capturer) { screen_capturer_ = std::make_unique( DesktopMediaList::Type::kScreen, std::move(capturer)); screen_capturer_->SetThumbnailSize(thumbnail_size); diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index 6fb611696391..cb00abb914d6 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -139,21 +139,6 @@ void ElectronPermissionManager::SetBluetoothPairingHandler( bluetooth_pairing_handler_ = handler; } -void ElectronPermissionManager::RequestPermission( - blink::PermissionType permission, - content::RenderFrameHost* render_frame_host, - const GURL& requesting_origin, - bool user_gesture, - StatusCallback callback) { - if (render_frame_host->IsNestedWithinFencedFrame()) { - std::move(callback).Run(blink::mojom::PermissionStatus::DENIED); - return; - } - - RequestPermissionWithDetails(permission, render_frame_host, requesting_origin, - user_gesture, {}, std::move(callback)); -} - void ElectronPermissionManager::RequestPermissionWithDetails( blink::PermissionType permission, content::RenderFrameHost* render_frame_host, @@ -161,35 +146,41 @@ void ElectronPermissionManager::RequestPermissionWithDetails( bool user_gesture, base::Value::Dict details, StatusCallback response_callback) { + if (render_frame_host->IsNestedWithinFencedFrame()) { + std::move(response_callback).Run(blink::mojom::PermissionStatus::DENIED); + return; + } + RequestPermissionsWithDetails( - std::vector(1, permission), render_frame_host, - user_gesture, std::move(details), + render_frame_host, + content::PermissionRequestDescription(permission, user_gesture, + requesting_origin), + std::move(details), base::BindOnce(PermissionRequestResponseCallbackWrapper, std::move(response_callback))); } void ElectronPermissionManager::RequestPermissions( - const std::vector& permissions, content::RenderFrameHost* render_frame_host, - const GURL& requesting_origin, - bool user_gesture, + const content::PermissionRequestDescription& request_description, StatusesCallback callback) { if (render_frame_host->IsNestedWithinFencedFrame()) { std::move(callback).Run(std::vector( - permissions.size(), blink::mojom::PermissionStatus::DENIED)); + request_description.permissions.size(), + blink::mojom::PermissionStatus::DENIED)); return; } - RequestPermissionsWithDetails(permissions, render_frame_host, user_gesture, - {}, std::move(callback)); + RequestPermissionsWithDetails(render_frame_host, request_description, {}, + std::move(callback)); } void ElectronPermissionManager::RequestPermissionsWithDetails( - const std::vector& permissions, content::RenderFrameHost* render_frame_host, - bool user_gesture, + const content::PermissionRequestDescription& request_description, base::Value::Dict details, StatusesCallback response_callback) { + auto& permissions = request_description.permissions; if (permissions.empty()) { std::move(response_callback).Run({}); return; @@ -197,7 +188,7 @@ void ElectronPermissionManager::RequestPermissionsWithDetails( if (request_handler_.is_null()) { std::vector statuses; - for (auto permission : permissions) { + for (auto& permission : permissions) { if (permission == blink::PermissionType::MIDI_SYSEX) { content::ChildProcessSecurityPolicy::GetInstance() ->GrantSendMidiSysExMessage( @@ -252,19 +243,19 @@ void ElectronPermissionManager::ResetPermission( const GURL& embedding_origin) {} void ElectronPermissionManager::RequestPermissionsFromCurrentDocument( - const std::vector& permissions, content::RenderFrameHost* render_frame_host, - bool user_gesture, + const content::PermissionRequestDescription& request_description, base::OnceCallback&)> callback) { if (render_frame_host->IsNestedWithinFencedFrame()) { std::move(callback).Run(std::vector( - permissions.size(), blink::mojom::PermissionStatus::DENIED)); + request_description.permissions.size(), + blink::mojom::PermissionStatus::DENIED)); return; } - RequestPermissionsWithDetails(permissions, render_frame_host, user_gesture, - {}, std::move(callback)); + RequestPermissionsWithDetails(render_frame_host, request_description, {}, + std::move(callback)); } blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatus( diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index 57ab21fc9fb1..bc0a632b2777 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -61,6 +61,13 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { using BluetoothPairingHandler = base::RepeatingCallback; + void RequestPermissionWithDetails(blink::PermissionType permission, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin, + bool user_gesture, + base::Value::Dict details, + StatusCallback response_callback); + // Handler to dispatch permission requests in JS. void SetPermissionRequestHandler(const RequestHandler& handler); void SetPermissionCheckHandler(const CheckHandler& handler); @@ -68,31 +75,6 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { void SetProtectedUSBHandler(const ProtectedUSBHandler& handler); void SetBluetoothPairingHandler(const BluetoothPairingHandler& handler); - // content::PermissionControllerDelegate: - void RequestPermission(blink::PermissionType permission, - content::RenderFrameHost* render_frame_host, - const GURL& requesting_origin, - bool user_gesture, - StatusCallback callback) override; - void RequestPermissionWithDetails(blink::PermissionType permission, - content::RenderFrameHost* render_frame_host, - const GURL& requesting_origin, - bool user_gesture, - base::Value::Dict details, - StatusCallback callback); - void RequestPermissions(const std::vector& permissions, - content::RenderFrameHost* render_frame_host, - const GURL& requesting_origin, - bool user_gesture, - StatusesCallback callback) override; - - void RequestPermissionsWithDetails( - const std::vector& permissions, - content::RenderFrameHost* render_frame_host, - bool user_gesture, - base::Value::Dict details, - StatusesCallback callback); - void CheckBluetoothDevicePair(gin_helper::Dictionary details, PairCallback pair_callback) const; @@ -125,6 +107,10 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { blink::mojom::PermissionStatus status); // content::PermissionControllerDelegate: + void RequestPermissions( + content::RenderFrameHost* render_frame_host, + const content::PermissionRequestDescription& request_description, + StatusesCallback callback) override; void ResetPermission(blink::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) override; @@ -133,9 +119,8 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { const GURL& requesting_origin, const GURL& embedding_origin) override; void RequestPermissionsFromCurrentDocument( - const std::vector& permissions, content::RenderFrameHost* render_frame_host, - bool user_gesture, + const content::PermissionRequestDescription& request_description, base::OnceCallback< void(const std::vector&)> callback) override; @@ -167,6 +152,12 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { class PendingRequest; using PendingRequestsMap = base::IDMap>; + void RequestPermissionsWithDetails( + content::RenderFrameHost* render_frame_host, + const content::PermissionRequestDescription& request_description, + base::Value::Dict details, + StatusesCallback callback); + RequestHandler request_handler_; CheckHandler check_handler_; DeviceCheckHandler device_permission_handler_;