diff --git a/.circleci/config.yml b/.circleci/config.yml index 55e87c297dffc..f16cab9f494ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -474,7 +474,6 @@ step-fix-sync-on-mac: &step-fix-sync-on-mac # Fix Clang Install (wrong binary) rm -rf src/third_party/llvm-build python src/tools/clang/scripts/update.py - python src/tools/clang/scripts/update.py --package=lld_mac fi step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac diff --git a/DEPS b/DEPS index 7d3cb2f907070..3a23d5e0065cb 100644 --- a/DEPS +++ b/DEPS @@ -10,11 +10,12 @@ gclient_gn_args = [ 'checkout_openxr', 'checkout_google_benchmark', 'mac_xcode_version', + 'generate_location_tags', ] vars = { 'chromium_version': - '93.0.4539.0', + '93.0.4552.0', 'node_version': 'v14.17.0', 'nan_version': @@ -55,6 +56,8 @@ vars = { 'mac_xcode_version': 'default', + 'generate_location_tags': False, + # To allow running hooks without parsing the DEPS tree 'process_deps': True, diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index 4f0968e183133..f5ce3bbf779f6 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -88,6 +88,10 @@ static_library("chrome") { "//components/optimization_guide/proto:optimization_guide_proto", ] + if (enable_basic_printing && is_win) { + deps += [ "//chrome/common:cloud_print_utility_mojom" ] + } + if (is_linux) { sources += [ "//chrome/browser/icon_loader_auralinux.cc" ] if (use_x11 || use_ozone) { diff --git a/patches/boringssl/expose_ripemd160.patch b/patches/boringssl/expose_ripemd160.patch index 20b9a9e21d014..64f3ab29da1fd 100644 --- a/patches/boringssl/expose_ripemd160.patch +++ b/patches/boringssl/expose_ripemd160.patch @@ -80,7 +80,7 @@ index d540144b293297791c087e0b968a47d368a73695..53cb9d2dc8f1962a70dc12b648d27c32 + callback(EVP_ripemd160(), "ripemd160", NULL, arg); } diff --git a/include/openssl/digest.h b/include/openssl/digest.h -index 66f1b5dcfd8232a697145acb2b6c2efe890d543f..67fc522172dc3ab56787fa5db3c277fd4811474a 100644 +index 12542c18b2563c83f0f37a0cbbab6847060ab180..f96c5c59ddfa7aee63bb0212812dd14c677b59cb 100644 --- a/include/openssl/digest.h +++ b/include/openssl/digest.h @@ -90,6 +90,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void); diff --git a/patches/chromium/.patches b/patches/chromium/.patches index f10e395ff96a0..bcd042cdb48de 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -69,7 +69,7 @@ gpu_notify_when_dxdiag_request_fails.patch feat_allow_embedders_to_add_observers_on_created_hunspell.patch feat_add_onclose_to_messageport.patch ui_gtk_public_header.patch -allow_in_process_windows_to_have_different_web_prefs.patch +allow_in-process_windows_to_have_different_web_prefs.patch refactor_expose_cursor_changes_to_the_webcontentsobserver.patch crash_allow_setting_more_options.patch breakpad_treat_node_processes_as_browser_processes.patch @@ -97,7 +97,6 @@ add_setter_for_browsermainloop_result_code.patch make_include_of_stack_trace_h_unconditional.patch build_libc_as_static_library.patch build_do_not_depend_on_packed_resource_integrity.patch -build_read_idl_files_as_utf8_to_fix_python3_character_encodding.patch don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch refactor_restore_base_adaptcallbackforrepeating.patch hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 7a6388a7ab2d1..557829915147f 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the context, which can cause some preload scripts to trip. diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h -index 3d985164eee3d7d8ef9e7ff2215ec9a17ec157a5..9c1c4fd8528fbb088f1836c8503c5875727f5d62 100644 +index e24c169444c699f295de2c1f1f42683eeca73436..4675cdccb1876a318a9a0253cdf552bb65516310 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h @@ -127,6 +127,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, @@ -23,10 +23,10 @@ index 3d985164eee3d7d8ef9e7ff2215ec9a17ec157a5..9c1c4fd8528fbb088f1836c8503c5875 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 105dc2b5db804a699da4173476281b7ff240f0dc..197d97364bb19a1378d57cced8c485e86fda1e18 100644 +index 4d78d4f667e6068ba98bc4044ee6437a5afab15b..8602f563a6de20fb5feb7aaac12a7a99adac088e 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4263,6 +4263,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4310,6 +4310,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,7 +40,7 @@ index 105dc2b5db804a699da4173476281b7ff240f0dc..197d97364bb19a1378d57cced8c485e8 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 53299308d20eaaf5e26b8a5dc34d1c66d7b0fdf8..fa63808238ede5bebc3589901e318acc882b766a 100644 +index 578da3c68bca81ebd7d14023571655946aaa99bc..dbbaf8eed62b7e4b57894b96b0321c5a78a498b4 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -583,6 +583,8 @@ class CONTENT_EXPORT RenderFrameImpl @@ -53,10 +53,10 @@ index 53299308d20eaaf5e26b8a5dc34d1c66d7b0fdf8..fa63808238ede5bebc3589901e318acc 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 493358dade0f6a1359f95bc3f8b3adc4303b8bcc..c0a53b380d5d3d2430e353d581dab6f183fa48b7 100644 +index 346027ed008208978d187e025b90e7cc667698d6..c2aa23af0cae2b0a7322cd8809b9015fd953938a 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -583,6 +583,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -578,6 +578,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -79,10 +79,10 @@ index 83b81f4c1fd4232ee5c2b7b1b7b85424164f3acc..bdd4a0031af6f9c2b701979dd469867c if (World().IsMainWorld()) { GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld(); diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h -index fafb45421f5bc348672d20caa23b5b35293db811..1172958ff116b2f98c994245c3c3a42c6a18627b 100644 +index cc3f43d1d06bd41193d5035d9e4a46342ff6a548..f44020c144b17626d833cf3a6d8ceb25602fd767 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -298,6 +298,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -293,6 +293,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -92,7 +92,7 @@ index fafb45421f5bc348672d20caa23b5b35293db811..1172958ff116b2f98c994245c3c3a42c int32_t world_id) = 0; virtual bool AllowScriptExtensions() = 0; diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc -index 69b8211729d5b10bad95abc2ed40e9f7844666c7..a2996e454141b1823b6baa0184ccbdde784808ab 100644 +index 0748a5f4f636792c05e436bd7186b35ca7b023a5..2df7e6cf8b474f0a86763e521c4058ec868b4683 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc @@ -273,6 +273,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( @@ -110,7 +110,7 @@ index 69b8211729d5b10bad95abc2ed40e9f7844666c7..a2996e454141b1823b6baa0184ccbdde v8::Local context, int32_t world_id) { diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h -index a853d0dd0ecfd676b6ada622f38a6546e526be92..d39a81547c3335d6b2ff3219ddcf5f3b2daa1c9c 100644 +index 0391fc4cd19f44b54896fb80dfc0d95816fcf878..b2242b4f084ffd3934a5f1fc23c0412cf69b99c7 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h @@ -77,6 +77,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -123,10 +123,10 @@ index a853d0dd0ecfd676b6ada622f38a6546e526be92..d39a81547c3335d6b2ff3219ddcf5f3b 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 461ecb3cf70026a1f6a43a72ed9e0ad6c27296fd..b7e5a66f9dc0d27df09ddaf9483d56af0e892489 100644 +index ac2ed9b3bb99ceec9cc72477e38bc0fbd7f7f4f9..1401e63a14cab972b4ccc7a25098536aca74d7f2 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -348,6 +348,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -350,6 +350,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 c7acbe1529801..66aa7183ac464 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 2e43f4e05e0521a8d1e3bf077360171128a0898f..5934a03cfb6fa7239aa0994fb0a10ae6c5ce69c8 100644 +index 0f23ca9416f951e7983dd9b2ff131eddce12245c..cfce3af034bec1f57cc1937a4b07a09c1ed8da88 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -615,6 +615,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -617,6 +617,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -48,10 +48,10 @@ index 740d1c322b740d374dd0287d99daebc1fe39ceda..f6ed1402120c0d8b30356c87a52d88fe // This interface should only be implemented inside content. friend class RenderViewHostImpl; diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h -index 59f8c47769c5fa325bb9464912561da1f0ba6c8b..822c94e3a3439b1c97ef25baf3eac97a017fa472 100644 +index a4e38fd9825fdb2c16f728d8012bb2392cb31dfe..2239f82411d0ba73b95020e18d3838507521dd1c 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h -@@ -155,6 +155,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, +@@ -154,6 +154,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, static WindowOpenDisposition NavigationPolicyToDisposition( blink::WebNavigationPolicy policy); @@ -61,22 +61,22 @@ index 59f8c47769c5fa325bb9464912561da1f0ba6c8b..822c94e3a3439b1c97ef25baf3eac97a // ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put // it in the same order in the .cc file as it was in the header. diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom -index e122d4ffb857023841dabcb6fed352d7586d8344..3c7cd1cb8b204024a0835150302ee8896e01ee45 100644 +index a428fe70d2ca5f21a529e881e41d87f4ba46ed32..8af5470ee168ae49ef3764c28c39e08b3fdbd1a7 100644 --- a/third_party/blink/public/mojom/page/page.mojom +++ b/third_party/blink/public/mojom/page/page.mojom -@@ -73,4 +73,7 @@ interface PageBroadcast { +@@ -77,4 +77,7 @@ interface PageBroadcast { - // Set history offset and length. - SetHistoryOffsetAndLength(int32 offset, int32 length); + // Sent to whole page, but should only be used by the main frame. + SetPageBaseBackgroundColor(skia.mojom.SkColor? color); + + // Whether to enable the Renderer scheduler background throttling. + SetSchedulerThrottling(bool allowed); }; diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h -index 97e150f7d7f1ccba622ca0a286023ebd75438bb6..85333052af3dcdf39325033f345ae15674dd8768 100644 +index 04906f28c8e03f1692690713b2ca5c9e3b188236..c4e453bb2dfa1857e73ac4dcc1e202e7a378acf6 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h -@@ -364,6 +364,7 @@ class WebView { +@@ -363,6 +363,7 @@ class WebView { // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -85,7 +85,7 @@ index 97e150f7d7f1ccba622ca0a286023ebd75438bb6..85333052af3dcdf39325033f345ae156 // 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 81c88781d0b7d5c662164b787d581dbfddaa138a..b627f400d16ee1c605ef7657dc3ba63319c5fd56 100644 +index c91848389bebee7e25e8243f1490e1fff6db638a..d0f12dd329ac67e635ce39601b9939ffceddc0c0 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -3577,6 +3577,13 @@ PageScheduler* WebViewImpl::Scheduler() const { @@ -113,10 +113,10 @@ index 81c88781d0b7d5c662164b787d581dbfddaa138a..b627f400d16ee1c605ef7657dc3ba633 mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() { diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h -index 10d9aaaeacf83019edf676ba38d6dfe0d438a789..39e68cc6769d1f389a6eaab13dab3983f992fe69 100644 +index 07afcf4eb67fb5cb51f94ba0055f101481014f8f..f3e9a9fd15ffe4072c8d30a563329efd23c39aa6 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -409,6 +409,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -412,6 +412,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -124,7 +124,7 @@ index 10d9aaaeacf83019edf676ba38d6dfe0d438a789..39e68cc6769d1f389a6eaab13dab3983 void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -834,6 +835,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -838,6 +839,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, // If true, we send IPC messages when |preferred_size_| changes. bool send_preferred_size_changes_ = false; diff --git a/patches/chromium/allow_in_process_windows_to_have_different_web_prefs.patch b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch similarity index 87% rename from patches/chromium/allow_in_process_windows_to_have_different_web_prefs.patch rename to patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch index 795a0de31470e..bf447217bc52e 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,15 +8,14 @@ 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 8a1315f7f89588bb21c6d3c21a7de7c07fed9679..2ad5dc0b70a2b0bf298866dd2b9515112d3583f0 100644 +index 8a1315f7f89588bb21c6d3c21a7de7c07fed9679..51cc790f7e1ba1440a6ffaa56c9e01687fc35c06 100644 --- a/third_party/blink/common/web_preferences/web_preferences.cc +++ b/third_party/blink/common/web_preferences/web_preferences.cc -@@ -148,6 +148,23 @@ WebPreferences::WebPreferences() +@@ -148,6 +148,22 @@ WebPreferences::WebPreferences() fake_no_alloc_direct_call_for_testing_enabled(false), v8_cache_options(blink::mojom::V8CacheOptions::kDefault), record_whole_document(false), + // Begin Electron-specific WebPreferences. -+ background_color(base::EmptyString()), + opener_id(0), + context_isolation(false), + guest_instance_id(0), @@ -36,22 +35,21 @@ index 8a1315f7f89588bb21c6d3c21a7de7c07fed9679..2ad5dc0b70a2b0bf298866dd2b951511 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 ab2d320a4073308c249821a060e870afc0dbc3a5..1799d27380c112d98e55e63b9dd842c78014c62a 100644 +index c6b92861449ffd929b03971fb62efc18305eb1fe..ce78fe29ab799944c2c3d7b41a0c44b970b11d05 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 -@@ -24,6 +24,11 @@ bool StructTraitscursive_font_family_map) || !data.ReadFantasyFontFamilyMap(&out->fantasy_font_family_map) || !data.ReadPictographFontFamilyMap(&out->pictograph_font_family_map) || + // Begin Electron-specific WebPreferences. + !data.ReadPreloads(&out->preloads) || -+ !data.ReadBackgroundColor(&out->background_color) || + !data.ReadPreload(&out->preload) || + // End Electron-specific WebPreferences. !data.ReadLazyFrameLoadingDistanceThresholdsPx( &out->lazy_frame_loading_distance_thresholds_px) || !data.ReadLazyImageLoadingDistanceThresholdsPx( -@@ -154,6 +159,21 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); @@ -74,7 +72,7 @@ index ab2d320a4073308c249821a060e870afc0dbc3a5..1799d27380c112d98e55e63b9dd842c7 out->accelerated_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 84736bea7ac7b6fcc85782ba9faecb23a0d6574c..99b0d5866781e26022fb3fd8ef684562582d8204 100644 +index 4517bf43c1b80f1aa0f3ba8e67e78b8b91e19f8a..492f6c948af74bb925826a1075e6343f147f0eb2 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 @@ @@ -85,13 +83,12 @@ index 84736bea7ac7b6fcc85782ba9faecb23a0d6574c..99b0d5866781e26022fb3fd8ef684562 #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" #include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h" -@@ -160,6 +161,25 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -162,6 +163,24 @@ struct BLINK_COMMON_EXPORT WebPreferences { blink::mojom::V8CacheOptions v8_cache_options; bool record_whole_document; + // Begin Electron-specific WebPreferences. + std::vector preloads; -+ std::string background_color; + int opener_id; + bool context_isolation; + int guest_instance_id; @@ -112,7 +109,7 @@ index 84736bea7ac7b6fcc85782ba9faecb23a0d6574c..99b0d5866781e26022fb3fd8ef684562 // only controls whether or not the "document.cookie" field is properly // connected to the backing store, for instance if you wanted to be able to 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 90a2bb1a13afd749b540545fff22ba2134917b5d..5ca57b9b52de2b398ed19ae0e2ce5bf3a2387469 100644 +index 0313bac28edf43e84c6e914f85af75fb541bb7ea..6eedfe15cc02b3c1ee531a94d77f8d4e04feb11f 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 @@ @@ -123,7 +120,7 @@ index 90a2bb1a13afd749b540545fff22ba2134917b5d..5ca57b9b52de2b398ed19ae0e2ce5bf3 #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -446,6 +447,72 @@ struct BLINK_COMMON_EXPORT StructTraits preloads; -+ string background_color; + int32 opener_id; + bool context_isolation; + int32 guest_instance_id; diff --git a/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch b/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch index b1fd664d1855e..1042f847af780 100644 --- a/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch +++ b/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch @@ -6,7 +6,7 @@ Subject: Allow setting secondary label via SimpleMenuModel Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976 diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc -index 976a45c49c810b228e7576926979001593de8dcb..2975dcd4a946edd7100789a1c3d8e3637d2bd86c 100644 +index e7504cd790821ffa213961b51c0c9ab7763ddd82..bd96c37404e930a59d5c91c921b324a10aae38d3 100644 --- a/ui/base/models/simple_menu_model.cc +++ b/ui/base/models/simple_menu_model.cc @@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId( @@ -21,7 +21,7 @@ index 976a45c49c810b228e7576926979001593de8dcb..2975dcd4a946edd7100789a1c3d8e363 ImageModel SimpleMenuModel::Delegate::GetIconForCommandId( int command_id) const { return ImageModel(); -@@ -295,6 +300,11 @@ void SimpleMenuModel::SetLabel(int index, const std::u16string& label) { +@@ -304,6 +309,11 @@ void SimpleMenuModel::SetLabel(int index, const std::u16string& label) { MenuItemsChanged(); } @@ -33,7 +33,7 @@ index 976a45c49c810b228e7576926979001593de8dcb..2975dcd4a946edd7100789a1c3d8e363 void SimpleMenuModel::SetMinorText(int index, const std::u16string& minor_text) { items_[ValidateItemIndex(index)].minor_text = minor_text; -@@ -382,6 +392,12 @@ std::u16string SimpleMenuModel::GetLabelAt(int index) const { +@@ -391,6 +401,12 @@ std::u16string SimpleMenuModel::GetLabelAt(int index) const { return items_[ValidateItemIndex(index)].label; } @@ -47,7 +47,7 @@ index 976a45c49c810b228e7576926979001593de8dcb..2975dcd4a946edd7100789a1c3d8e363 return items_[ValidateItemIndex(index)].minor_text; } diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h -index 6127fb6a161598a58d08fb68f171fd02b9cbb6a7..5297195cb7128106a376818ade66daf0a5f6b868 100644 +index 4536b388717844cc74905760828e80ea6d64b7b1..2f9b507b623307e37eb1eb216e96363881404b25 100644 --- a/ui/base/models/simple_menu_model.h +++ b/ui/base/models/simple_menu_model.h @@ -50,6 +50,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { @@ -58,7 +58,7 @@ index 6127fb6a161598a58d08fb68f171fd02b9cbb6a7..5297195cb7128106a376818ade66daf0 // Gets the icon for the item with the specified id. virtual ImageModel GetIconForCommandId(int command_id) const; -@@ -153,6 +154,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { +@@ -157,6 +158,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { // Sets the label for the item at |index|. void SetLabel(int index, const std::u16string& label); @@ -68,7 +68,7 @@ index 6127fb6a161598a58d08fb68f171fd02b9cbb6a7..5297195cb7128106a376818ade66daf0 // Sets the minor text for the item at |index|. void SetMinorText(int index, const std::u16string& minor_text); -@@ -188,6 +192,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { +@@ -192,6 +196,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override; int GetCommandIdAt(int index) const override; std::u16string GetLabelAt(int index) const override; @@ -76,7 +76,7 @@ index 6127fb6a161598a58d08fb68f171fd02b9cbb6a7..5297195cb7128106a376818ade66daf0 std::u16string GetMinorTextAt(int index) const override; ImageModel GetMinorIconAt(int index) const override; bool IsItemDynamicAt(int index) const override; -@@ -226,6 +231,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { +@@ -230,6 +235,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { int command_id = 0; ItemType type = TYPE_COMMAND; std::u16string label; diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index b4e1d2d022b00..f9fd4ec9ef81e 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -49,10 +49,10 @@ index 8bf6b4bc077cc41da5e0e6b13302bc343537c68f..01bddc0bcb7476408023c4cfc042a088 // its owning reference back to our owning LocalFrame. client_->Detached(type); diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 9eaacc65478f56de32ffa6d02c053bf5d6ea8649..bfbee4c165e545e45fbef47cc6d4556096c79e72 100644 +index c23606754e5a2388ceb2e757ad33161b8f9a38e2..3178265e2c9b94cc88d4d7b0ad13deb8e38261cc 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -792,10 +792,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -806,10 +806,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index 9eaacc65478f56de32ffa6d02c053bf5d6ea8649..bfbee4c165e545e45fbef47cc6d45560 if (!Client()) return false; -@@ -840,6 +836,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -854,6 +850,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); 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 fcbb9a01578e2..42c8d06abb93a 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 c0beea906cc463cf55d37924a61cf0ba7eba6ab2..98202508b872221e9242d7ebaf0d03e654d8cecb 100644 +index 72567c45bafd90556c133b594053f18c45265da0..ee2b95656d1bc1dc37d9bbf0ad2e9c2158eeab19 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -172,11 +172,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index c0beea906cc463cf55d37924a61cf0ba7eba6ab2..98202508b872221e9242d7ebaf0d03e6 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index c9b47583391472ed9d0e309fe6c5c8cf5b900400..63e29d5b1f1ee6af729feb82ed002d96e1fc582a 100644 +index cb21679be696a3e657dcc81c5ac2c7e2ca492481..15e2df00e3be64ad3be1e2664c04b0ee82d02f76 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4275,7 +4275,7 @@ static_library("browser") { +@@ -4286,7 +4286,7 @@ static_library("browser") { # On Windows, the hashes are embedded in //chrome:chrome_initial rather # than here in :chrome_dll. @@ -46,16 +46,20 @@ index c9b47583391472ed9d0e309fe6c5c8cf5b900400..63e29d5b1f1ee6af729feb82ed002d96 } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 9135f841967fc8e85e6befbf23c54d570fd3ce58..43a4578c5cd67179acb2769c17cf82837d505e56 100644 +index 9f662133dcf029d2f2805b2fbfc2df2fa977e4be..c52362df8b3a729459b0aa13798d55c4f5225439 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5045,10 +5045,15 @@ test("unit_tests") { +@@ -5218,7 +5218,6 @@ test("unit_tests") { assert(toolkit_views) sources += [ "../browser/ui/startup/credential_provider_signin_info_fetcher_win_unittest.cc" ] deps += [ - "//chrome:packed_resources_integrity", - "//chrome/browser/win/conflicts:unit_tests", - "//chrome/test:credential_provider_test_utils", + "//chrome/browser:chrome_process_finder", + "//chrome/browser/safe_browsing/chrome_cleaner", + "//chrome/browser/safe_browsing/chrome_cleaner:public", +@@ -5231,6 +5230,12 @@ test("unit_tests") { + "//components/chrome_cleaner/public/proto", + "//ui/events/devices:test_support", ] + + if (!is_electron_build) { @@ -66,3 +70,21 @@ index 9135f841967fc8e85e6befbf23c54d570fd3ce58..43a4578c5cd67179acb2769c17cf8283 } if (is_win || is_chromeos_ash || is_mac) { +@@ -5792,7 +5797,6 @@ test("unit_tests") { + } + + deps += [ +- "//chrome:packed_resources_integrity_hash", + "//chrome/browser:cart_db_content_proto", + "//chrome/browser/media/router:test_support", + "//chrome/browser/promo_browser_command:mojo_bindings", +@@ -5827,6 +5831,9 @@ test("unit_tests") { + "//ui/color:test_support", + "//ui/native_theme:test_support", + ] ++ if (!is_electron_build) { ++ deps += [ "//chrome:packed_resources_integrity_hash" ] ++ } + if (is_win) { + deps += [ "//components/chrome_cleaner/public/proto:test_only_proto" ] + } diff --git a/patches/chromium/build_gn.patch b/patches/chromium/build_gn.patch index eb55f778aabbf..a41d724db3f2c 100644 --- a/patches/chromium/build_gn.patch +++ b/patches/chromium/build_gn.patch @@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will rebuild the entire tree. diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index 46bc4769236eabee773be1e5690f0d406cb22229..0c674012b6265a8109e00b13c7c95a36eaddbe27 100644 +index 725894d05274355be4ad5d6ac3388a489220a50c..e568780d699a9ac977e509165b2e9b0516cde779 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -123,6 +123,9 @@ if (current_os == "") { @@ -27,7 +27,7 @@ index 46bc4769236eabee773be1e5690f0d406cb22229..0c674012b6265a8109e00b13c7c95a36 # Set to enable the official build level of optimization. This has nothing # to do with branding, but enables an additional level of optimization above # release (!is_debug). This might be better expressed as a tri-state -@@ -336,6 +339,7 @@ default_compiler_configs = [ +@@ -337,6 +340,7 @@ default_compiler_configs = [ "//build/config/compiler/pgo:default_pgo_flags", "//build/config/coverage:default_coverage", "//build/config/sanitizers:default_sanitizer_flags", diff --git a/patches/chromium/build_read_idl_files_as_utf8_to_fix_python3_character_encodding.patch b/patches/chromium/build_read_idl_files_as_utf8_to_fix_python3_character_encodding.patch deleted file mode 100644 index 388b362d83d3f..0000000000000 --- a/patches/chromium/build_read_idl_files_as_utf8_to_fix_python3_character_encodding.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Fri, 28 May 2021 14:29:38 -0700 -Subject: build: read IDL files as utf8 to fix python3 character encodding - issue - -This should be upstreamed - -diff --git a/tools/json_schema_compiler/compiler.py b/tools/json_schema_compiler/compiler.py -index 6e6990525d0441d22899450d34991bbb94265ca6..2ac3ae8f783f7472ffaf054714f07cf50bdf0fd3 100755 ---- a/tools/json_schema_compiler/compiler.py -+++ b/tools/json_schema_compiler/compiler.py -@@ -146,7 +146,7 @@ def GenerateSchema(generator_name, - output_dir = os.path.join(destdir, src_path) - if not os.path.exists(output_dir): - os.makedirs(output_dir) -- with open(os.path.join(output_dir, filename), 'w') as f: -+ with open(os.path.join(output_dir, filename), 'w', encoding='utf-8') as f: - f.write(code) - # If multiple files are being output, add the filename for each file. - if len(generators) > 1: -diff --git a/tools/json_schema_compiler/idl_schema.py b/tools/json_schema_compiler/idl_schema.py -index 029e83c7179b2582bc46b5e3eeac1e32a016a479..f83d9edd37ad89478d6b741e1cf0c525bab94587 100755 ---- a/tools/json_schema_compiler/idl_schema.py -+++ b/tools/json_schema_compiler/idl_schema.py -@@ -575,7 +575,7 @@ def Load(filename): - Python dictionary in a format that the JSON schema compiler expects to see. - ''' - -- f = open(filename, 'r') -+ f = open(filename, 'r', encoding='utf-8') - contents = f.read() - f.close() - diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 4185e846fca85..2fa3a04cd401d 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 e66ca44bd592a7152bdd34e5ed4c75b1bda1261c..aa69fedec09e2bd51f3b205787bb2b7f0cd76a42 100644 +index f050e8863b2412242cb4cd025444abcc1ad85889..f9f15b4b95208cbd9ff0269c882ac4b4b80e4125 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6001,6 +6001,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -6082,6 +6082,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 e66ca44bd592a7152bdd34e5ed4c75b1bda1261c..aa69fedec09e2bd51f3b205787bb2b7f &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 05888b53ef39c90941ccc069849f271e60bbd909..95d2a7b15e67e2af6f9aebb0c975f5713762032d 100644 +index 8b51334cfaff6f8b2de5c969c01c0dfec6e381c3..9fa5062a0eb8754c1a3e560a8d0bcd3098bcdb2e 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3756,6 +3756,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -3788,6 +3788,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index 05888b53ef39c90941ccc069849f271e60bbd909..95d2a7b15e67e2af6f9aebb0c975f571 new_contents_impl->GetController().SetSessionStorageNamespace( partition_id, session_storage_namespace); -@@ -3798,12 +3806,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -3830,12 +3838,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,10 +53,10 @@ index 05888b53ef39c90941ccc069849f271e60bbd909..95d2a7b15e67e2af6f9aebb0c975f571 new_contents_impl, opener, params.target_url, params.referrer.To(), params.disposition, diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index 542a9bb6343b16c4dfe3aebae97ec06073021e52..840d562fcc8e0da12393924d56c2a6f319be9006 100644 +index a61f273506fecd8574ffd0bb04d507adef7859c8..3a4a6efca3a66b12409da15e4f360fb8e3a40e2c 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -468,6 +468,10 @@ struct CreateNewWindowParams { +@@ -519,6 +519,10 @@ struct CreateNewWindowParams { // The impression associated with the navigation in the new window, if // one is specified. Impression? impression; @@ -68,10 +68,10 @@ index 542a9bb6343b16c4dfe3aebae97ec06073021e52..840d562fcc8e0da12393924d56c2a6f3 // 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 ccf2bfaef1cf8ef5a12a6273f67f9aeeb67f49fa..9e2a2492ebeafb5d6a6eda9391f9bed3e457bf21 100644 +index 0703cbb93d207e8d6529cc6005e5e66091ba03f0..dd18f6b137ae5c724400d4229a2867474824dc56 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -566,6 +566,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -562,6 +562,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,7 +81,7 @@ index ccf2bfaef1cf8ef5a12a6273f67f9aeeb67f49fa..9e2a2492ebeafb5d6a6eda9391f9bed3 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 89f07fd6a1062fcf5cfd175b93e52f5d7165ceca..6fb1c8156683647e58de2c8564c276e798fdba70 100644 +index 6000d0326898e33cdf4b311c88e5400d8be71ed2..7430e483567b227630bc42933820e2d4e5559ed7 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -160,6 +160,7 @@ class NetworkService; @@ -92,7 +92,7 @@ index 89f07fd6a1062fcf5cfd175b93e52f5d7165ceca..6fb1c8156683647e58de2c8564c276e7 } // namespace network namespace sandbox { -@@ -929,6 +930,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -923,6 +924,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -102,7 +102,7 @@ index 89f07fd6a1062fcf5cfd175b93e52f5d7165ceca..6fb1c8156683647e58de2c8564c276e7 bool opener_suppressed, bool* no_javascript_access); diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc -index 8ba5d82ebb39b495a0c175c771be8c4f071b5052..cf2974dad890e61e4090d3328b23de203838bd7c 100644 +index 0117e9fb3919e866edc625bb573a2922e4cea866..98025d50f132dc425f26b982d1a4a2e07b972229 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -28,6 +28,17 @@ namespace content { @@ -124,7 +124,7 @@ index 8ba5d82ebb39b495a0c175c771be8c4f071b5052..cf2974dad890e61e4090d3328b23de20 const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 8a3c4c24a55ae7c520514ded527eb6214a5708a9..631c9b3aab0f2dfe8e6d8437b3f31676e8e158b5 100644 +index af41f0750b58dc714a2587565a6144bf3a2addb4..23342e066586c4fb2cf3843d63d737d33f92669b 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -16,6 +16,7 @@ @@ -150,7 +150,7 @@ index 8a3c4c24a55ae7c520514ded527eb6214a5708a9..631c9b3aab0f2dfe8e6d8437b3f31676 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index a229509d7254f87af5128ffdaad4cd9c74c3e980..766adb31cf654ff964fbca3acc941c092e382448 100644 +index 2f697c7819d8ec0acd04c3c2949c084eb830b341..12e85524a462a1846674e7f01eb8b6d6b3efdc8c 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -26,6 +26,7 @@ @@ -173,10 +173,10 @@ index a229509d7254f87af5128ffdaad4cd9c74c3e980..766adb31cf654ff964fbca3acc941c09 // moved on send. bool is_background_tab = diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc -index e3dd040164fec1a70c9bd2dac7cc3d93478ec39f..f8894682e181a99b9e6cf3d0e4b46413076eb5ef 100644 +index d21606dd0a194a645decdc81a0c1390e0492ded0..c015934debd27937d583269950c2e2d5dc82cd53 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc -@@ -450,6 +450,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( +@@ -451,6 +451,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -220,7 +220,7 @@ index 84d32491a56528a84b4395fba1d54cdbb38d522b..09998a83c449ef8cd9f360fbcdcf7edc } // 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 06983193aa144c526b606c6b1291b2271a4570b3..cf2bc64ee509727570cc55a08dcdb39d3f18cce9 100644 +index 9797f3dfa05ada91cb83a6d271df19a5fbb1ab93..fc7278a77d78096b7eb804fae9210d9dea8bbf17 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc @@ -1989,6 +1989,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index c544d9fe76439..a9207f25f237c 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -140,7 +140,7 @@ index ef84e04d628fb5cdbaf8fbbf84af3bf23e00c522..f1ee0bee5bfd08227a29498f8410d5d3 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index a850e0d28bc9a9f54ba17b04a6cc08d1de7c53c0..d369412dd13e05cfebfd07cf3161a7c060a87a55 100644 +index 8a1af8eb8efd51d51e9ea4155dc55a493673a74b..563a95d6ee87d61b086d7aa822a5c547c4bbaf1e 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1786,12 +1786,11 @@ bool Browser::IsWebContentsCreationOverridden( @@ -159,10 +159,10 @@ index a850e0d28bc9a9f54ba17b04a6cc08d1de7c53c0..d369412dd13e05cfebfd07cf3161a7c0 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 682e706b4d73f862241d441de4314b65cb78253d..c31fa011812186e9d2b3ee1515d187f346770a4c 100644 +index ab9c5fb85f83b2ffb04bf21be631d38cfacd8835..6166d92517629ce17b48845f30c2086ce26ceabf 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -797,8 +797,7 @@ class Browser : public TabStripModelObserver, +@@ -803,8 +803,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -264,21 +264,21 @@ index c5c5a7b63b5b3b62a9517cbef3ae23ce57a3c89c..4f1b7e88d6d2ae89a60311c8aeb1fcee 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 09ae42633e0635d94b5a1b4f71af943f0cd7bb64..76aac784c441de59e1188a220e6ced4b51be322d 100644 +index f9efbea691c72a2c34ae54ef7e40b7e995e37514..86136d3222d7d5f66fe797ba274ef3c5a7e49306 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3708,8 +3708,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -3736,8 +3736,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, - opener->GetLastCommittedURL(), params.frame_name, - params.target_url)) { + opener->GetLastCommittedURL(), params)) { - return static_cast(delegate_->CreateCustomWebContents( - opener, source_site_instance, is_new_browsing_instance, - opener->GetLastCommittedURL(), params.frame_name, params.target_url, + auto* web_contents_impl = + static_cast(delegate_->CreateCustomWebContents( + opener, source_site_instance, is_new_browsing_instance, diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc -index cf2974dad890e61e4090d3328b23de203838bd7c..4eb0b83a4b68c0a0be3fbeca25d345a0246746c4 100644 +index 98025d50f132dc425f26b982d1a4a2e07b972229..45f2d4d29add5c6ca6c1e5e27a19d1623cc6a4ce 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -136,8 +136,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( @@ -292,7 +292,7 @@ index cf2974dad890e61e4090d3328b23de203838bd7c..4eb0b83a4b68c0a0be3fbeca25d345a0 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 631c9b3aab0f2dfe8e6d8437b3f31676e8e158b5..b8fad336db3a4b1f3e7877df179d29b32d719fc3 100644 +index 23342e066586c4fb2cf3843d63d737d33f92669b..8f1dfebf5ebd3d9ffdfe16b08950504ca2e64894 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -319,8 +319,7 @@ class CONTENT_EXPORT WebContentsDelegate { @@ -334,7 +334,7 @@ index 9b293d0df6c634bf44a69d607c4eee839a74b4a1..7e5b9cbdcc232c5e20eae0130d800f50 content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index 330b9467832a93aade64c962a1715ced6fa4c6a6..babcfb3eee9933a2db39023492095f30c957b21c 100644 +index 2dc016e4be765413b4cef0f5471dcf9240f73ff5..224cd2be71670ac565d02ecb2838123154255dc6 100644 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc @@ -386,8 +386,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( @@ -348,7 +348,7 @@ index 330b9467832a93aade64c962a1715ced6fa4c6a6..babcfb3eee9933a2db39023492095f30 } diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -index 7d27e12c4e9a7f32af8a26f672359057a643dd67..7a30ac31f79871f2a9afa0345e0e88affe7fe72f 100644 +index bb90319f768ed2f3a3e530d64bf622de585ce163..d84de1d218267887f6b8624f913438ebc4aa7a79 100644 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h @@ -158,8 +158,7 @@ class MimeHandlerViewGuest @@ -362,10 +362,10 @@ index 7d27e12c4e9a7f32af8a26f672359057a643dd67..7a30ac31f79871f2a9afa0345e0e88af content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc -index d5bb190807b3b8e7b025d3779420e41c222c054a..b7dc3554078011c9fbf5d467df31bc091b94013c 100644 +index 47d77ca9263a4f9029b00393f092f3340f5e8751..e668ba08d6f032abe1e8d26ce755876d4d4fa0f5 100644 --- a/fuchsia/engine/browser/frame_impl.cc +++ b/fuchsia/engine/browser/frame_impl.cc -@@ -387,8 +387,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( +@@ -388,8 +388,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -376,10 +376,10 @@ index d5bb190807b3b8e7b025d3779420e41c222c054a..b7dc3554078011c9fbf5d467df31bc09 // can catch bad client behavior while not interfering with normal operation. constexpr size_t kMaxPendingWebContentsCount = 10; diff --git a/fuchsia/engine/browser/frame_impl.h b/fuchsia/engine/browser/frame_impl.h -index 08b2a1d7e1a0bc458e478a77bfd2fbaf35865d08..690c4baace675a6f8bbeaa1e7297e3bf0f0a8a50 100644 +index a9e134ba416af9ca27c580892bd1c4599912ec82..39ddf61c9506b6bb12b3fe51e0a1cabacd3ece70 100644 --- a/fuchsia/engine/browser/frame_impl.h +++ b/fuchsia/engine/browser/frame_impl.h -@@ -241,8 +241,7 @@ class FrameImpl : public fuchsia::web::Frame, +@@ -242,8 +242,7 @@ class FrameImpl : public fuchsia::web::Frame, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, diff --git a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch index 9787d2698e317..385b9ff471799 100644 --- a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch +++ b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch @@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from Electrons grit header instead of Chromes diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 95d495998f5feb4c290ffbc430b380ce136d89e8..c9b47583391472ed9d0e309fe6c5c8cf5b900400 100644 +index a8a8bb73214a6b81f899fd8a024c76e50bfea3ff..cb21679be696a3e657dcc81c5ac2c7e2ca492481 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -6384,6 +6384,7 @@ static_library("browser") { +@@ -6438,6 +6438,7 @@ static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", diff --git a/patches/chromium/chrome_key_systems.patch b/patches/chromium/chrome_key_systems.patch index adeb0797bba1d..fd04b70fb61d3 100644 --- a/patches/chromium/chrome_key_systems.patch +++ b/patches/chromium/chrome_key_systems.patch @@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm, as its not supported in the current version of chrome. diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc -index 03489704b2632b8a5af07ca073e83b03fe407130..21233d01ef39a959769bd0bb58cbe4c9a0daef08 100644 +index ac83e2c1290d16db38d6f91f3bb7eeab1adafed6..7f6b9cb64bbf3533c2d2f4ee30566e3ee4e217fa 100644 --- a/chrome/renderer/media/chrome_key_systems.cc +++ b/chrome/renderer/media/chrome_key_systems.cc @@ -16,7 +16,9 @@ @@ -20,7 +20,7 @@ index 03489704b2632b8a5af07ca073e83b03fe407130..21233d01ef39a959769bd0bb58cbe4c9 #include "components/cdm/renderer/external_clear_key_key_system_properties.h" #include "components/cdm/renderer/widevine_key_system_properties.h" #include "content/public/renderer/render_thread.h" -@@ -269,12 +271,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability, +@@ -258,12 +260,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) { // Returns persistent-license session support. EmeSessionTypeSupport GetPersistentLicenseSupport(bool supported_by_the_cdm) { diff --git a/patches/chromium/crashpad_pid_check.patch b/patches/chromium/crashpad_pid_check.patch index 09e281be106fd..7e15cc76b4b21 100644 --- a/patches/chromium/crashpad_pid_check.patch +++ b/patches/chromium/crashpad_pid_check.patch @@ -16,7 +16,7 @@ https://github.com/electron/electron/pull/18483#discussion_r292703588 https://github.com/electron/electron/pull/18483#issuecomment-501090683 diff --git a/third_party/crashpad/crashpad/util/win/exception_handler_server.cc b/third_party/crashpad/crashpad/util/win/exception_handler_server.cc -index a520c720ceb0152d11acb3acac02e0852a84d786..dd237a7b84350e3c254719630d4f5f9da17bb1aa 100644 +index 9394256e05748297988dd457439875409ed96461..a5502155e6bb9370cf73a9a571054eac9b0253a2 100644 --- a/third_party/crashpad/crashpad/util/win/exception_handler_server.cc +++ b/third_party/crashpad/crashpad/util/win/exception_handler_server.cc @@ -444,9 +444,16 @@ bool ExceptionHandlerServer::ServiceClientConnection( diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index e88284bc6bbb2..aaaa454be608a 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc -index c2df77803f30ad948d357a9679938320702e14b4..7d4a89e10e475c8cddd8fea77eac348c54014f0e 100644 +index 470bc0a84181afc4946395621cb8864dfbc8d894..8fea46b34353e65436fa06c9bb0cb51d8463108f 100644 --- a/ui/base/clipboard/clipboard_win.cc +++ b/ui/base/clipboard/clipboard_win.cc -@@ -882,10 +882,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const { +@@ -912,10 +912,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const { void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) { UINT cf_format = format.ToFormatEtc().cfFormat; diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 83ea0526891cf..a66d1ac970d9b 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -20,7 +20,7 @@ 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 3a817e6450f8ee3239294d1ec5ead0d0fd584b5e..4a0a1c8104ee9d2989d10b1110ef9d30453a3047 100644 +index 41a143a1cb391b038600ab648bb8ce7d40157297..fa0b01f1420846d4c39a5631304259cc3a06b671 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -1799,6 +1799,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( @@ -229,7 +229,7 @@ index 4da975c0f06df7aef526898557f0945dcdd1806a..5810197b0ab6a247e12ae8a6d96f71b2 + +#undef PATCH_CS diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 262633bdb89ffefb78091788b4b48d23e0e473e6..69016f864405f87a5ee161b52b9dacf909c52949 100644 +index d828f1dfe25326854b68f7f6957702a6b7ba5e36..2df7e9ea219997503f5574307dd721c32b1e9ddb 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -225,6 +225,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -241,10 +241,10 @@ index 262633bdb89ffefb78091788b4b48d23e0e473e6..69016f864405f87a5ee161b52b9dacf9 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 506888cef32304ae5b27f85f758c9fa38024dfdb..261901ec21e83a3514519041c6a1e626380faa02 100644 +index 85e3dd76f528b3e60b86bef6a9231135ef2bc0f5..922e8e30a2918ef99dc53fc9124d56916d57ea5e 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -213,6 +213,7 @@ +@@ -216,6 +216,7 @@ #include "ui/accessibility/accessibility_switches.h" #include "ui/base/ui_base_switches.h" #include "ui/display/display_switches.h" @@ -252,7 +252,7 @@ index 506888cef32304ae5b27f85f758c9fa38024dfdb..261901ec21e83a3514519041c6a1e626 #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_features.h" #include "url/origin.h" -@@ -3315,6 +3316,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3376,6 +3377,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[] = { @@ -293,7 +293,7 @@ index 628c6bca129cd58a25984ff8300bfb4c33ec7ebf..ff9ce55f2701990b5b6119c18575477b } 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 82757ec0893fb1a0c4a31549d85ed95194826d8c..e7ba24aec0d1aabc0093fe0ecaf72438c6009a8f 100644 +index 4d87cdf578fdd2cbde7929e3a8c7cabfbb1fc836..be8550927a7c9cdc001dedef66672453846c5dfa 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 @@ -25,6 +25,7 @@ diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index ac40833011b40..c7a68591c2023 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,7 +6,7 @@ Subject: fix: disabling compositor recycling Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 4f4e4c0af566570e276090558c8427531a370ff5..b613b7462c548061d14b14fb6ef9151f7cc2a7ac 100644 +index e4dd3f09ffb460c6c28b74d4fb13c461f4553f5c..0ce7640b3fae669542e2712d14ce0f82ff99ef8a 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -482,7 +482,11 @@ diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 10ff544e4aec4..f45eb264e2f17 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,10 +6,10 @@ Subject: disable_hidden.patch Electron uses this to disable background throttling for hidden windows. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index addcbef452fb2c0be97633590ba969a9b1466edc..7188857619477bc3f93dc836f56d4f25a88cc29e 100644 +index 9a9cb5c87829d15b480e9a396ad8d3d1bfb6cd90..f03c14c1aa614b7efc93a627863c3aa03b0e5d45 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -743,6 +743,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -754,6 +754,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; @@ -20,7 +20,7 @@ index addcbef452fb2c0be97633590ba969a9b1466edc..7188857619477bc3f93dc836f56d4f25 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 e5f7cc5384e530db60f1c561a4e72b33bc6d9e1c..84707bfac659b2d6bb3186b609339f92072044b7 100644 +index bdba3cf07542d494c45ef9167642898b196f06cc..db5eb3b795ab2442058dbf16375f5f132a80a61f 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -855,6 +855,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl @@ -34,7 +34,7 @@ index e5f7cc5384e530db60f1c561a4e72b33bc6d9e1c..84707bfac659b2d6bb3186b609339f92 // |routing_id| must not be MSG_ROUTING_NONE. // If this object outlives |delegate|, DetachDelegate() must be called when diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc -index b302331f7d9ee9029e26a97418745e561307de10..51cd34dc66d11aada15714a319e54e5d2c9d6df6 100644 +index 150b03e368ec3ae0d9b3c8c6eb61e5ca830c1fbc..65cead03331f7680cde35333e7c316fced8a9056 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -594,7 +594,7 @@ void RenderWidgetHostViewAura::HideImpl() { diff --git a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch b/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch index 26fc466417e3f..b6ccc0b68bbcd 100644 --- a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch +++ b/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch @@ -11,10 +11,10 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572 Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 197d97364bb19a1378d57cced8c485e86fda1e18..b2d42172ebd420b3d6c43016da5aba3d6d1ad30b 100644 +index 8602f563a6de20fb5feb7aaac12a7a99adac088e..9964cb8a10918774558aaac8a15fe85b41f51fb5 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2328,7 +2328,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { +@@ -2318,7 +2318,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index 2999138c27080..b7cad83987853 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -6,7 +6,7 @@ Subject: feat: enable setting aspect ratio to 0 Make SetAspectRatio accept 0 as valid input, which would reset to null. diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index fb8bbb639f6b6d93581b4eb6500a54deb331f18d..71a5b130e2c956f4d43c9a5b6a21f887dca66cfb 100644 +index f6c41d83fbd4ef613c951c1d0fee46d8379c1ded..a362a573bef4ce15d82335990c50cb0e6a72d053 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -491,7 +491,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index dc1b5af897228..f944a4be100e9 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,7 +33,7 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970 DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings); }; diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 4d69ee0e9ccdb27ca168dc1816dcd07396b289c3..ac9db3b33ed1061c8c5035b525deffa8af6d6ad5 100644 +index 3a34df559a160c51488242bb7541a0a939ba67a3..42bf611491cda4778c1c109be6237814dd5e8c45 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -1184,6 +1184,13 @@ void NetworkContext::SetNetworkConditions( @@ -51,7 +51,7 @@ index 4d69ee0e9ccdb27ca168dc1816dcd07396b289c3..ac9db3b33ed1061c8c5035b525deffa8 // 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 f233facfe80440d09a389fded2ea4ad01880f08e..c84ff3ba5fb445b803cbb2926610b7c27797b8f3 100644 +index 3457e652131b962a574352803d06f5f4e47b6e59..c347bc731d58e5610cdbabb71075f30f282b4ab7 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -255,6 +255,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext @@ -63,10 +63,10 @@ index f233facfe80440d09a389fded2ea4ad01880f08e..c84ff3ba5fb445b803cbb2926610b7c2 void SetEnableReferrers(bool enable_referrers) override; #if BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index a1ca0c3521cc26fd5a6ee83385516d1623e749ed..3a775db4edf1e0568c6fe23566a37358d5e5e2d2 100644 +index 2595d0b342951d03dcc9d809b33b3f2705e14aa3..3c6798196ada1e28936e8b2bc5530b675a9ea994 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -956,6 +956,9 @@ interface NetworkContext { +@@ -949,6 +949,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,10 +77,10 @@ index a1ca0c3521cc26fd5a6ee83385516d1623e749ed..3a775db4edf1e0568c6fe23566a37358 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index a0b7e16d2297de4fb6eab21cc9411a33c20a8763..e54a43392cdaf67c2d854367204605ad66ec1f10 100644 +index b10229fcdef0d6a50a03df26761511be5d3a2f04..65ef615b3a7cf3f8fc79b3972311265ec9dc91e0 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -121,6 +121,7 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -123,6 +123,7 @@ class TestNetworkContext : public mojom::NetworkContext { void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {} void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override {} diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 5c02bd2a81d32..314aba5f0d7c8 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 b627f400d16ee1c605ef7657dc3ba63319c5fd56..72f7e877a9601f7b2277d109aaae13eda4277076 100644 +index d0f12dd329ac67e635ce39601b9939ffceddc0c0..fdeb405ada2ecafec58c22966d3b8508e67d8120 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -155,6 +155,7 @@ @@ -23,7 +23,7 @@ index b627f400d16ee1c605ef7657dc3ba63319c5fd56..72f7e877a9601f7b2277d109aaae13ed #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" -@@ -1784,6 +1785,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1781,6 +1782,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if defined(OS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); @@ -31,18 +31,3 @@ index b627f400d16ee1c605ef7657dc3ba63319c5fd56..72f7e877a9601f7b2277d109aaae13ed #endif #if defined(OS_WIN) -@@ -1792,6 +1794,14 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, - - RuntimeEnabledFeatures::SetTranslateServiceEnabled( - prefs.translate_service_available); -+ -+ SkColor color = SK_ColorTRANSPARENT; -+ if (!prefs.guest_instance_id) { // not inside electron tag, which is always transparent. -+ Color blink_color; -+ if (blink_color.SetFromString(WebString::FromASCII(prefs.background_color))) -+ color = static_cast(blink_color); -+ } -+ web_view->SetBaseBackgroundColor(color); - } - - void WebViewImpl::ThemeChanged() { diff --git a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch index 53386d64701e3..675ea32fe1e15 100644 --- a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch +++ b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch @@ -13,10 +13,10 @@ uses internally for things like menus and devtools. We can remove this patch once it has in some shape been upstreamed. diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc -index db0681f9278b4a60f6c25faf37fdb2aba41d65a6..58655f4285d3835b51c43e0b55fe15d9d6360a7f 100644 +index cfacc084fe300f0d2863183723b4126f69b1377a..9278659d6b25b55518d2eee41ac845458358912a 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc -@@ -135,6 +135,8 @@ absl::optional NativeTheme::GetColorProviderColor( +@@ -136,6 +136,8 @@ absl::optional NativeTheme::GetColorProviderColor( } bool NativeTheme::ShouldUseDarkColors() const { @@ -26,7 +26,7 @@ index db0681f9278b4a60f6c25faf37fdb2aba41d65a6..58655f4285d3835b51c43e0b55fe15d9 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index 2ba7ea70d901b17c3f8f98cb93e2bc8a97ec8853..ad2dc2a217bdc08820fc5311a2bda08e42182620 100644 +index 06c11ef6f03a5de803d9f8d3893d614e763afb16..cd7e6bdbf24c4ee1b5fd0047b83de2c12106d7da 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h @@ -404,6 +404,22 @@ class NATIVE_THEME_EXPORT NativeTheme { @@ -52,7 +52,7 @@ index 2ba7ea70d901b17c3f8f98cb93e2bc8a97ec8853..ad2dc2a217bdc08820fc5311a2bda08e // Returns a shared instance of the native theme that should be used for web // rendering. Do not use it in a normal application context (i.e. browser). // The returned object should not be deleted by the caller. This function is -@@ -578,6 +594,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -573,6 +589,7 @@ class NATIVE_THEME_EXPORT NativeTheme { bool forced_colors_ = false; PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight; PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference; diff --git a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch index 2d7875d71fd01..8a97ae638757e 100644 --- a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch +++ b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch @@ -13,10 +13,10 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass then refers to the list so that it can correctly determine the data source's settings. diff --git a/third_party/blink/public/platform/media/multi_buffer_data_source.h b/third_party/blink/public/platform/media/multi_buffer_data_source.h -index afbde40779e7d3056afa19c112059febee2700a4..4ae073d92840c1458e7719e4c1d1df0d348f6875 100644 +index 8bf52b6cb5fe9f253450bd0262c94d95f0072b2e..9aff9afcbd27ce06ea523821b39fa3adfb94a6bf 100644 --- a/third_party/blink/public/platform/media/multi_buffer_data_source.h +++ b/third_party/blink/public/platform/media/multi_buffer_data_source.h -@@ -31,6 +31,8 @@ class BufferedDataSourceHost; +@@ -30,6 +30,8 @@ class BufferedDataSourceHost; class MediaLog; class MultiBufferReader; @@ -26,13 +26,13 @@ index afbde40779e7d3056afa19c112059febee2700a4..4ae073d92840c1458e7719e4c1d1df0d // in-memory sliding window. // diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -index 15f201e6ecbca2f05e1dd7792df5048068c59359..e7f1f8f6a6262455520cf9de8de69e8bf0a79c55 100644 +index d1977cfbc3df216b4c320a452c516e72d6091d5c..dce79179d6465d05feef42543d6bdc911fd368c3 100644 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -@@ -10,9 +10,11 @@ +@@ -9,9 +9,11 @@ + #include "base/bind.h" #include "base/callback_helpers.h" #include "base/location.h" - #include "base/macros.h" +#include "base/no_destructor.h" #include "base/numerics/ranges.h" #include "base/numerics/safe_conversions.h" @@ -41,7 +41,7 @@ index 15f201e6ecbca2f05e1dd7792df5048068c59359..e7f1f8f6a6262455520cf9de8de69e8b #include "media/base/media_log.h" #include "net/base/net_errors.h" #include "third_party/blink/public/platform/media/buffered_data_source_host_impl.h" -@@ -60,10 +62,22 @@ const int kUpdateBufferSizeFrequency = 32; +@@ -59,10 +61,22 @@ const int kUpdateBufferSizeFrequency = 32; // How long to we delay a seek after a read? constexpr base::TimeDelta kSeekDelay = base::TimeDelta::FromMilliseconds(20); @@ -63,7 +63,7 @@ index 15f201e6ecbca2f05e1dd7792df5048068c59359..e7f1f8f6a6262455520cf9de8de69e8b + class MultiBufferDataSource::ReadOperation { public: - ReadOperation(int64_t position, + ReadOperation() = delete; @@ -153,7 +167,14 @@ bool MultiBufferDataSource::media_has_played() const { bool MultiBufferDataSource::AssumeFullyBuffered() const { 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 65c282b9867db..731b199811bb5 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -81,10 +81,10 @@ index 1026b739d283f0fc252fa2af83a6d4cf51bc8553..fe562ab60ce98b8bb0c5080a6428deb3 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 7692a2aaf9e4aced560ee4af170e967b7d612eb9..85a2af12aee6eca62b624ae68bccf824750b367b 100644 +index 922d7086008603c43ab394c73358876d9d6151d5..669ea31ffdd0cf957f9340a82dfe84429225dfd7 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -137,6 +137,8 @@ viz_component("service") { +@@ -139,6 +139,8 @@ viz_component("service") { "display_embedder/output_surface_provider_impl.h", "display_embedder/server_shared_bitmap_manager.cc", "display_embedder/server_shared_bitmap_manager.h", @@ -108,7 +108,7 @@ index 77d463e683d8b8d3a202681a6884eacaab79d70d..05d51cb2637d34c073cd0025e3658036 } // namespace viz diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc -index bd64ee19f71691bfaf9be2a523b5f5efbbff5066..dc82c4653b2fe22de0ed4ab73c06b85d8f3ecd35 100644 +index 827084542417d45c9db8082e2c2537e7bdb8ff7f..927b48bbd855fdaebe2b26b8efbb7c48fec0c1a6 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -25,6 +25,7 @@ @@ -127,7 +127,7 @@ index bd64ee19f71691bfaf9be2a523b5f5efbbff5066..dc82c4653b2fe22de0ed4ab73c06b85d #include "ui/base/ui_base_switches.h" #include "ui/gl/gl_context.h" #include "ui/gl/init/gl_factory.h" -@@ -131,7 +133,8 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -130,7 +132,8 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( mojom::DisplayClient* display_client, DisplayCompositorMemoryAndTaskController* gpu_dependency, const RendererSettings& renderer_settings, @@ -137,7 +137,7 @@ index bd64ee19f71691bfaf9be2a523b5f5efbbff5066..dc82c4653b2fe22de0ed4ab73c06b85d #if BUILDFLAG(IS_CHROMEOS_ASH) if (surface_handle == gpu::kNullSurfaceHandle) return std::make_unique(); -@@ -143,7 +146,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -142,7 +145,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( if (!gpu_compositing) { output_surface = std::make_unique( @@ -146,7 +146,7 @@ index bd64ee19f71691bfaf9be2a523b5f5efbbff5066..dc82c4653b2fe22de0ed4ab73c06b85d } else if (renderer_settings.use_skia_renderer) { DCHECK(gpu_dependency); { -@@ -252,10 +255,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -251,10 +254,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( std::unique_ptr OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( gpu::SurfaceHandle surface_handle, @@ -497,7 +497,7 @@ index 599b06c1765ef4ddbfeb2fd96e0875098f7c6ae1..2151fc8aa710162a3870639bd6e952df 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 6ea2c624e1e31414bf8765582ab89dd0551c1111..07248135401dc29d6747c91edd027b0abb433e3e 100644 +index be4b04dc525a548276eed50cbfc83603b1f2095b..d9995ac8b5e832ac329ce113aa837a6a587c39bd 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 @@ -47,7 +47,8 @@ RootCompositorFrameSinkImpl::Create( @@ -567,10 +567,10 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 5bf36e2873bfb7dfa46ca6f010c780f1f02235ac..0378d1246930c3dc4ac8b4d1886fc5dc497dcb66 100644 +index 7f98032f09be545040af596809c67a86cb7de3b4..e181f6cfe93b4a8e432e0d3ae0dc492aa8642ee1 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h -@@ -81,6 +81,7 @@ class DisplayPrivate; +@@ -80,6 +80,7 @@ class DisplayPrivate; class ExternalBeginFrameController; } // namespace mojom class ContextProvider; @@ -578,7 +578,7 @@ index 5bf36e2873bfb7dfa46ca6f010c780f1f02235ac..0378d1246930c3dc4ac8b4d1886fc5dc class HostFrameSinkManager; class LocalSurfaceId; class RasterContextProvider; -@@ -137,6 +138,16 @@ class COMPOSITOR_EXPORT ContextFactory { +@@ -136,6 +137,16 @@ class COMPOSITOR_EXPORT ContextFactory { virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0; }; @@ -595,7 +595,7 @@ index 5bf36e2873bfb7dfa46ca6f010c780f1f02235ac..0378d1246930c3dc4ac8b4d1886fc5dc // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -172,6 +183,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -171,6 +182,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -605,7 +605,7 @@ index 5bf36e2873bfb7dfa46ca6f010c780f1f02235ac..0378d1246930c3dc4ac8b4d1886fc5dc // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -443,6 +457,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -442,6 +456,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, std::unique_ptr pending_begin_frame_args_; diff --git a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch index 2d4a3bded2142..eac48fd935b8e 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta to users. We should try to upstream this. diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index aa6b35d85fcbd1378a96c027a1f9e72660911484..3580cda37034922643dd15f9e92977c051532a99 100644 +index a804f30ed40830a11228ef94f4dedcdc8f0753ac..77b22dd8d8a2d733eb49d4ed9ef49a8ec88df453 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1765,10 +1765,12 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1768,10 +1768,12 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // outermost frame trees in this WebContents. std::vector GetOutermostMainFrames(); @@ -26,10 +26,10 @@ index aa6b35d85fcbd1378a96c027a1f9e72660911484..3580cda37034922643dd15f9e92977c0 // state into account. PageVisibilityState CalculatePageVisibilityState(Visibility visibility) const; diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index e4e70e4d378cf13eb00d7327b88e2501dcfc7f84..7c0d9ee9311de772f8966bacf7908480b89c7915 100644 +index 41943c884912ee34b1f588f404a085683588a549..940bae96321b6a939cdae14560ddc61b9bcee673 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -582,6 +582,8 @@ class WebContents : public PageNavigator, +@@ -630,6 +630,8 @@ class WebContents : public PageNavigator, bool stay_hidden, bool stay_awake) WARN_UNUSED_RESULT = 0; diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 6c13686ecf596..06c7b8ed66cce 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 79caf35e2fb7a752c88418216731cbc27065447c..1ffdf5ce375255fcd0fffff4d2eb526f92ecd52a 100644 +index 98da18667ed4c6226f0f8cb2f3917b14f2ec13df..fea2cd804220d206610d5248cda315cbaae262bd 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -2936,6 +2936,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2990,6 +2990,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,7 +20,7 @@ index 79caf35e2fb7a752c88418216731cbc27065447c..1ffdf5ce375255fcd0fffff4d2eb526f } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 6fb1c8156683647e58de2c8564c276e798fdba70..90756aa3e0bbdbc32e991602818ca17e64f525b6 100644 +index 7430e483567b227630bc42933820e2d4e5559ed7..2ebc4de42761242f97f2a9aa40ba0c111a1bf78a 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -265,6 +265,11 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index 9cc7342444ee3..9a962ec5de1e9 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -38,10 +38,10 @@ index eaf06bd895f3ed390d1b206b2dc5adcca5c87e72..6bd634c4a66999648c51b8867c0d9b0c v8::Isolate* isolate() { return isolate_; } diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index 8bac97b6809a1f09020db980790d538c8ff03033..5230314293c6970d99f3700ec616eb99f5fd5dbd 100644 +index 3b856e74ddd6b39fb2cf1c0796a5ed0c6b375a32..3843074f130b3b6886981a67f55798076321ac38 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -207,12 +207,14 @@ void SetV8FlagsFormatted(const char* format, ...) { +@@ -241,7 +241,8 @@ void RunArrayBufferCageReservationExperiment() { } // namespace // static @@ -51,6 +51,9 @@ index 8bac97b6809a1f09020db980790d538c8ff03033..5230314293c6970d99f3700ec616eb99 static bool v8_is_initialized = false; if (v8_is_initialized) return; +@@ -251,7 +252,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode) { + RunArrayBufferCageReservationExperiment(); + } - v8::V8::InitializePlatform(V8Platform::Get()); + if (create_v8_platform) diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index d4284aec57cdc..b97e99bceaa1c 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -12,7 +12,7 @@ rendering and there is no signal from browser process on this event to identify it. diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc -index 6f778baa0c1f3d34f3b744ed37696af57df6aa01..fb802b880994e31e445ef98c646c001ba87ed073 100644 +index b55ab1c2e4172b069ee9f0a7dbce3b8a64cfe6da..19c138929e28bd155c1c510bbd1abc2712b6a29e 100644 --- a/content/browser/gpu/gpu_data_manager_impl.cc +++ b/content/browser/gpu/gpu_data_manager_impl.cc @@ -229,6 +229,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() { @@ -26,27 +26,28 @@ index 6f778baa0c1f3d34f3b744ed37696af57df6aa01..fb802b880994e31e445ef98c646c001b +} #endif - void GpuDataManagerImpl::UpdateGpuFeatureInfo( + void GpuDataManagerImpl::UpdateDawnInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h -index 9b75a03bb11bb9e9338017a1a287209bdb0636c5..aab43444bdb1a968d9c880028144ac81b1bd1ac7 100644 +index 008795fbdc8724931852399704a945563fd0b3f2..6b295d21deebf59a79a205ef2fa8579d689a7c72 100644 --- a/content/browser/gpu/gpu_data_manager_impl.h +++ b/content/browser/gpu/gpu_data_manager_impl.h -@@ -102,6 +102,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, +@@ -115,6 +115,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, // BrowserMainParts override instead. void PostCreateThreads(); void TerminateInfoCollectionGpuProcess(); + bool DxdiagDx12VulkanRequested() const; #endif - // Update the GPU feature info. This updates the blocklist and enabled status - // of GPU rasterization. In the future this will be used for more features. + void UpdateDawnInfo(const std::vector& dawn_info_list); + diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc -index 420dbbdfab57b18edc0ea646acac6d9d8748471d..7f00895f75177016045cbd016bc55cbec0a5f4ee 100644 +index 2f10ccb498b2b8f70188bc7599264674978bd9ac..1e7d9336c327e3b47a3dad5053123e9e210d9c75 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1082,6 +1082,11 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { +@@ -1113,6 +1113,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { + if (host) host->ForceShutdown(); } - ++ +bool GpuDataManagerImplPrivate::DxdiagDx12VulkanRequested() const { + return !(gpu_info_vulkan_request_failed_ || + gpu_info_dx12_request_failed_ || @@ -54,16 +55,16 @@ index 420dbbdfab57b18edc0ea646acac6d9d8748471d..7f00895f75177016045cbd016bc55cbe +} #endif - void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo( + void GpuDataManagerImplPrivate::UpdateDawnInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h -index c679229beae9440a9fc92f39be76a1d37065d586..a0468d452604a5dee05f5dd5d0bb6256d2808aea 100644 +index 845792fc94ee7d8cacbbd92e51bb8e5f53cce05a..6daec10d27836cb31ae3ec6c8eae41de05238c1c 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.h +++ b/content/browser/gpu/gpu_data_manager_impl_private.h -@@ -77,6 +77,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { +@@ -79,6 +79,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { bool VulkanRequested() const; void PostCreateThreads(); void TerminateInfoCollectionGpuProcess(); + bool DxdiagDx12VulkanRequested() const; #endif - void UpdateGpuFeatureInfo(const gpu::GpuFeatureInfo& gpu_feature_info, - const absl::optional& + void UpdateDawnInfo(const std::vector& dawn_info_list); + diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 9acc3c18dc9dc..6a5745bf2f57a 100644 --- a/patches/chromium/gritsettings_resource_ids.patch +++ b/patches/chromium/gritsettings_resource_ids.patch @@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch Add electron resources file to the list of resource ids generation. diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec -index 5b357dc8e522ade6bae00396db62ef6fac2867bb..593dca9a693b8da5d12bfd0e48cbb9223f009dfe 100644 +index 7669ab4ed8d048a75c779636cbe4bc43dcf96507..850a172c1581e76b84c4e593306f8c68007c9b7f 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -786,6 +786,11 @@ +@@ -798,6 +798,11 @@ "includes": [3880], }, diff --git a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch index 9a8c11d4ba17e..33d6dade5dfc4 100644 --- a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch +++ b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch @@ -11,10 +11,10 @@ If removing this patch causes no sync failures, it's safe to delete :+1: Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903 diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py -index 0f78c1ce6d8d6729052ff591bdb1b44e090baead..0b208ceeb92cb057ee427c3fa87371c8e6bf42c8 100755 +index 76ccb3b6989285892628e8ad6b1ba739fd623353..dbcafd744f648a0dbd662d7e05c848798721daf8 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py -@@ -294,6 +294,8 @@ def main(): +@@ -297,6 +297,8 @@ def main(): 'win32': 'win', } default_host_os = _PLATFORM_HOST_OS_MAP.get(sys.platform, sys.platform) diff --git a/patches/chromium/mas-cgdisplayusesforcetogray.patch b/patches/chromium/mas-cgdisplayusesforcetogray.patch index e60c7bfd099d1..dfcf2cd427351 100644 --- a/patches/chromium/mas-cgdisplayusesforcetogray.patch +++ b/patches/chromium/mas-cgdisplayusesforcetogray.patch @@ -6,10 +6,10 @@ Subject: mas: avoid usage of CGDisplayUsesForceToGray Removes usage of the CGDisplayUsesForceToGray private API. diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm -index 4d4ed7e8e5f38b50945fbb58ab8b913f56582533..6201e341d3a16f1344ae8f7177c80c290691ccd8 100644 +index 81150290909adbb0c440d752857aa5694f4362f4..b2ceb80f86530ef801239e149aa246f983cd0437 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm -@@ -133,7 +133,17 @@ Display BuildDisplayForScreen(NSScreen* screen) { +@@ -149,7 +149,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { display.set_color_depth(Display::kDefaultBitsPerPixel); display.set_depth_per_component(Display::kDefaultBitsPerComponent); } diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index ea98a66182ff4..b94b160e0ebfe 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -87,7 +87,7 @@ index c3a9fbf0f9d2b80c1de42a22ad094a286f0b559b..02493d4b62c98a3aebd3e460c459218a DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostNSViewBridgeOwner); }; diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h -index 3116e9098aad4fab8d1f8d2bb74b2437548b3566..1bb3ed4c7ec4f03c2512c6321c016face0b45361 100644 +index ffa437e300635290525658642cc83882fd08231a..7616391e80408ce11817c078c0ad280ecda4b4e7 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h @@ -47,7 +47,9 @@ class ScopedPasswordInputEnabler; @@ -114,7 +114,7 @@ index 3116e9098aad4fab8d1f8d2bb74b2437548b3566..1bb3ed4c7ec4f03c2512c6321c016fac // 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 9ac29edf10f8ffd2e1e4db549a7977d8f26e8c22..4f4e4c0af566570e276090558c8427531a370ff5 100644 +index 9582f6c48320560362903787f7f086c5c3d274e7..e4dd3f09ffb460c6c28b74d4fb13c461f4553f5c 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -240,8 +240,10 @@ @@ -167,7 +167,7 @@ index 9ac29edf10f8ffd2e1e4db549a7977d8f26e8c22..4f4e4c0af566570e276090558c842753 /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index a6b721245a5b141b7ee3170b92335a5f89eaebb6..8a370c537f62ee2246f0d64ee1f1f1613e76bf29 100644 +index 76f3bfb35e2c8dd353115137359921be989945da..8abf05b40427890b9171f0f72800b2a65eced5fd 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -320,6 +320,13 @@ component("base") { diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 51bfec3cdd77e..0b95931ad0eba 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -7,7 +7,7 @@ Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be excluded for people who want to submit their apps to the Mac App store. diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm -index 65adc773e82d99c5dd57d52e84a71e67d676be13..f5d0318c1c4fa036a233142cd6eea0a03eed7e39 100644 +index e3470fdbf945042a16dcb2affb7859607ca4184a..641d0a0e57ef7903ba9577954f85ae62a6dd6d6d 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm +++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm @@ -273,7 +273,7 @@ @@ -46,10 +46,22 @@ index 65adc773e82d99c5dd57d52e84a71e67d676be13..f5d0318c1c4fa036a233142cd6eea0a0 NSArray* node_array, const LineIndexer* line_indexer) const { diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm -index 517f501c3f9dc2e83a918d02564d123115b67d82..9dc0c66a357b378345a28b271d4e65dee343cdd2 100644 +index 73e440312d01d575a92072b05c4f84f5107242b1..c202a6faa8114b146f4fb51139542ab247f64655 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm +++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm -@@ -243,6 +243,7 @@ +@@ -140,9 +140,11 @@ + if (IsBrowserAccessibilityCocoa(target) || IsAXUIElement(target)) + return InvokeForAXElement(target, property_node); + ++#ifndef MAS_BUILD + if (content::IsAXTextMarkerRange(target)) { + return InvokeForAXTextMarkerRange(target, property_node); + } ++#endif + + if ([target isKindOfClass:[NSArray class]]) + return InvokeForArray(target, property_node); +@@ -287,6 +289,7 @@ property_name == "AXTextMarkerRangeForUIElement") { // UIElement return OptionalNSObject::NotNilOrError(PropertyNodeToUIElement(arg_node)); } @@ -57,7 +69,7 @@ index 517f501c3f9dc2e83a918d02564d123115b67d82..9dc0c66a357b378345a28b271d4e65de if (property_name == "AXIndexForTextMarker" || property_name == "AXNextWordEndTextMarkerForTextMarker" || property_name == -@@ -253,6 +254,7 @@ +@@ -297,6 +300,7 @@ return OptionalNSObject::NotNilOrError( PropertyNodeToTextMarkerRange(arg_node)); } @@ -65,7 +77,7 @@ index 517f501c3f9dc2e83a918d02564d123115b67d82..9dc0c66a357b378345a28b271d4e65de return OptionalNSObject::NotApplicable(); } -@@ -318,6 +320,7 @@ +@@ -362,6 +366,7 @@ return uielement; } @@ -73,7 +85,7 @@ index 517f501c3f9dc2e83a918d02564d123115b67d82..9dc0c66a357b378345a28b271d4e65de id AttributeInvoker::DictNodeToTextMarker( const AXPropertyNode& dictnode) const { if (!dictnode.IsDict()) { -@@ -425,6 +428,7 @@ OptionalNSObject TextMarkerRangeGetEndMarker(const OptionalNSObject& obj) { +@@ -469,6 +474,7 @@ OptionalNSObject TextMarkerRangeGetEndMarker(const OptionalNSObject& obj) { return OptionalNSObject::NotNilOrError(content::AXTextMarkerFrom( cocoa_node, range.focus()->text_offset(), range.focus()->affinity())); } @@ -125,7 +137,7 @@ index a7d6351854d08926c4e9c43c95e9075bd4d4c728..9c89595cb6c37527b96b4afde3871333 // is concerned. @property(nonatomic, readonly) NSString* subrole; diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm -index 30a503578611d87227e21a7d3acc1637d45ba728..41e82f5576eded04334983af2a98eba3764ca947 100644 +index a9629ae6a6909765282917b168f8968d2a0c7438..8a1e0a1b84c213816fc34a49587beb45a4320a69 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm @@ -205,6 +205,7 @@ @@ -224,7 +236,7 @@ index 30a503578611d87227e21a7d3acc1637d45ba728..41e82f5576eded04334983af2a98eba3 // can be selected with VoiceOver. - (id)endTextMarker { @@ -1385,6 +1400,7 @@ - (id)endTextMarker { - BrowserAccessibility::AXPosition position = _owner->CreatePositionAt(0); + BrowserAccessibility::AXPosition position = _owner->CreateTextPositionAt(0); return CreateTextMarker(position->CreatePositionAtEndOfContent()); } +#endif @@ -253,7 +265,7 @@ index 30a503578611d87227e21a7d3acc1637d45ba728..41e82f5576eded04334983af2a98eba3 } +#ifndef MAS_BUILD return content::AXTextEdit(insertedText, deletedText, - CreateTextMarker(_owner->CreatePositionAt(i))); + CreateTextMarker(_owner->CreateTextPositionAt(i))); +#else + return content::AXTextEdit(insertedText, deletedText, nil); +#endif @@ -309,29 +321,29 @@ index 30a503578611d87227e21a7d3acc1637d45ba728..41e82f5576eded04334983af2a98eba3 // can be selected with VoiceOver. - (id)startTextMarker { @@ -2387,6 +2416,7 @@ - (id)startTextMarker { - BrowserAccessibility::AXPosition position = _owner->CreatePositionAt(0); + BrowserAccessibility::AXPosition position = _owner->CreateTextPositionAt(0); return CreateTextMarker(position->CreatePositionAtStartOfContent()); } +#endif // Returns a subrole based upon the role. - (NSString*)subrole { -@@ -2716,12 +2746,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range { +@@ -2717,12 +2747,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range { NSMutableAttributedString* attributedInnerText = [[[NSMutableAttributedString alloc] initWithString:base::SysUTF16ToNSString(innerText)] autorelease]; +#ifndef MAS_BUILD if (!_owner->IsText()) { BrowserAccessibility::AXRange ax_range( - _owner->CreatePositionAt(0), - _owner->CreatePositionAt(int{innerText.length()})); + _owner->CreateTextPositionAt(0), + _owner->CreateTextPositionAt(static_cast(innerText.length()))); AddMisspelledTextAttributes(ax_range, attributedInnerText); } +#endif return [attributedInnerText attributedSubstringFromRange:range]; } -@@ -2834,6 +2866,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute +@@ -2835,6 +2867,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute return ToBrowserAccessibilityCocoa(cell); } @@ -339,15 +351,15 @@ index 30a503578611d87227e21a7d3acc1637d45ba728..41e82f5576eded04334983af2a98eba3 if ([attribute isEqualToString: NSAccessibilityUIElementForTextMarkerParameterizedAttribute]) { -@@ -3157,6 +3190,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute +@@ -3158,6 +3191,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute - return CreateTextMarker(root->CreatePositionAt(index)); + return CreateTextMarker(root->CreateTextPositionAt(index)); } +#endif if ([attribute isEqualToString: NSAccessibilityBoundsForRangeParameterizedAttribute]) { -@@ -3187,6 +3221,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute +@@ -3188,6 +3222,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute return nil; } @@ -355,7 +367,7 @@ index 30a503578611d87227e21a7d3acc1637d45ba728..41e82f5576eded04334983af2a98eba3 if ([attribute isEqualToString: NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) { -@@ -3306,6 +3341,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute +@@ -3307,6 +3342,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute return @(child->GetIndexInParent()); } @@ -363,15 +375,15 @@ index 30a503578611d87227e21a7d3acc1637d45ba728..41e82f5576eded04334983af2a98eba3 return nil; } -@@ -3838,6 +3874,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { - _owner->CreatePositionAt(range.location)->AsLeafTextPosition(), - _owner->CreatePositionAt(NSMaxRange(range))->AsLeafTextPosition())); +@@ -3839,6 +3875,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { + _owner->CreateTextPositionAt(range.location)->AsLeafTextPosition(), + _owner->CreateTextPositionAt(NSMaxRange(range))->AsLeafTextPosition())); } +#ifndef MAS_BUILD if ([attribute isEqualToString:NSAccessibilitySelectedTextMarkerRangeAttribute]) { BrowserAccessibility::AXRange range = CreateRangeFromTextMarkerRange(value); -@@ -3848,6 +3885,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { +@@ -3849,6 +3886,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { BrowserAccessibility::AXRange(range.anchor()->AsLeafTextPosition(), range.focus()->AsLeafTextPosition())); } @@ -380,10 +392,10 @@ index 30a503578611d87227e21a7d3acc1637d45ba728..41e82f5576eded04334983af2a98eba3 - (id)accessibilityFocusedUIElement { diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index ade9b849732c8b09a6584146b85a6914eaec7ca1..bef70937556c206f09446197a1c3c6dd41a41fe7 100644 +index a6b5a26aab2467ae074070d2ddee4ef8ac05922c..c737936326d455422d81497e1f544ca5f1e3aee0 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm -@@ -497,7 +497,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -500,7 +500,7 @@ void PostAnnouncementNotification(NSString* announcement) { if (native_focus_object && [native_focus_object instanceActive]) { [user_info setObject:native_focus_object forKey:ui::NSAccessibilityTextChangeElement]; @@ -392,7 +404,7 @@ index ade9b849732c8b09a6584146b85a6914eaec7ca1..bef70937556c206f09446197a1c3c6dd id selected_text = [native_focus_object selectedTextMarkerRange]; if (selected_text) { NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute = -@@ -505,6 +505,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -508,6 +508,7 @@ void PostAnnouncementNotification(NSString* announcement) { [user_info setObject:selected_text forKey:NSAccessibilitySelectedTextMarkerRangeAttribute]; } @@ -471,7 +483,7 @@ index c15f3a631292b538698625328fb429ee3c9964f5..37e038753ecf1b82ec92c06b2c0729b5 } diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm -index 717daca205b64ddbaf138f88400683dafac1a270..50ce32674525567b24b387e64b27f815585e61a0 100644 +index 54d902424796eb0687ebeedb6f1a9cd4a926e5b0..9d3ca310a7554c5606f95e9df26ea35ec37879d9 100644 --- a/device/bluetooth/bluetooth_adapter_mac.mm +++ b/device/bluetooth/bluetooth_adapter_mac.mm @@ -42,6 +42,7 @@ diff --git a/patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch b/patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch index bb50af9e2baf7..f32d33fa70c06 100644 --- a/patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch +++ b/patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch @@ -9,10 +9,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to system priority. diff --git a/ui/gfx/platform_font_mac.mm b/ui/gfx/platform_font_mac.mm -index 932212892c0823ae221cd601cf1a3a309323e56a..3fba1b4d32715302b12112a4ff01654be0b799f5 100644 +index e39d9fe5f149adbaf6c9066b2f1438f7e824113d..70d180dc00a1e96e8b8dd522937b44d734c5db17 100644 --- a/ui/gfx/platform_font_mac.mm +++ b/ui/gfx/platform_font_mac.mm -@@ -25,9 +25,11 @@ +@@ -26,9 +26,11 @@ using Weight = Font::Weight; @@ -24,7 +24,7 @@ index 932212892c0823ae221cd601cf1a3a309323e56a..3fba1b4d32715302b12112a4ff01654b namespace { -@@ -232,7 +234,13 @@ NSInteger ToNSFontManagerWeight(Weight weight) { +@@ -233,7 +235,13 @@ NSInteger ToNSFontManagerWeight(Weight weight) { // TODO(avi, etienneb): Figure out this font stuff. base::ScopedCFTypeRef descriptor( CTFontCopyFontDescriptor(font)); 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 8b8e24628a91a..aaa613a9853a9 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 071a5e4611cbf98e5e0e4bc4ac09936e76d7dea9..4d69ee0e9ccdb27ca168dc1816dcd07396b289c3 100644 +index cbe158aa7a6691ee0f908fff061117dcc8b79ce4..3a34df559a160c51488242bb7541a0a939ba67a3 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -117,6 +117,11 @@ @@ -116,7 +116,7 @@ index 071a5e4611cbf98e5e0e4bc4ac09936e76d7dea9..4d69ee0e9ccdb27ca168dc1816dcd073 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -1989,6 +2074,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -1983,6 +2068,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -127,7 +127,7 @@ index 071a5e4611cbf98e5e0e4bc4ac09936e76d7dea9..4d69ee0e9ccdb27ca168dc1816dcd073 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 184db7d51c405494deaa418a66eff9d1dc332cd6..f233facfe80440d09a389fded2ea4ad01880f08e 100644 +index c18f35d8debb142a0d23a72040b7668a93f3602c..3457e652131b962a574352803d06f5f4e47b6e59 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -91,6 +91,7 @@ class DomainReliabilityMonitor; @@ -147,7 +147,7 @@ index 184db7d51c405494deaa418a66eff9d1dc332cd6..f233facfe80440d09a389fded2ea4ad0 void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -707,6 +710,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -705,6 +708,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr; #endif @@ -157,7 +157,7 @@ index 184db7d51c405494deaa418a66eff9d1dc332cd6..f233facfe80440d09a389fded2ea4ad0 // CertNetFetcher is not used by the current platform, or if the actual // net::CertVerifier is instantiated outside of the network service. diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 17693738bb1bc2d239639942816259f4b910fe5c..a1ca0c3521cc26fd5a6ee83385516d1623e749ed 100644 +index c1e7628be3dc7881c7871639edd7461ade3fd546..2595d0b342951d03dcc9d809b33b3f2705e14aa3 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -189,6 +189,17 @@ struct CTPolicy { @@ -178,7 +178,7 @@ index 17693738bb1bc2d239639942816259f4b910fe5c..a1ca0c3521cc26fd5a6ee83385516d16 // Parameters for constructing a network context. struct NetworkContextParams { // Name used by memory tools to identify the context. -@@ -723,6 +734,9 @@ interface NetworkContext { +@@ -716,6 +727,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 a9241cf2a334f..770f6f9cd19f6 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -54,10 +54,10 @@ index 19c2beb1f1949f0dc4466a8728f151c035544b24..f7aa5f94d6dea0e6b2c1107b8ef01600 scoped_refptr service_worker_context_; diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc -index 2bdd5f7efcd5c891d08d328bba61bfa9436a2420..d9af5c04a80f6ff637c4f6cd1c274c99e82d0643 100644 +index 25a35dc7647d8bcb503c9b023bd912a5c0542877..cea756feb06f1b0ee1f7f5bd8b68fd4ddaaedaa6 100644 --- a/content/browser/notifications/blink_notification_service_impl_unittest.cc +++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc -@@ -139,7 +139,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { +@@ -140,7 +140,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { notification_service_ = std::make_unique( notification_context_.get(), &browser_context_, @@ -108,10 +108,10 @@ index b195cb84d8bba3c51b04f8c32cf909d15bf34335..37528715db985d12771ba2dca86dcec8 const GURL& document_url, mojo::PendingReceiver receiver); diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 6fcb17275b7ea709f9a2d69db2e08d8d8f65826c..953797c2efaa9de150b6a43f6a2a59fe031af236 100644 +index 3c98f632f55c99e9e1b96d1a4b31f9f813272a60..fdad49451e9dcdab8d2b532c90c784faf2e5aeba 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2269,7 +2269,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2298,7 +2298,7 @@ void RenderProcessHostImpl::CreateNotificationService( document_url = rfh->GetLastCommittedURL(); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 0164d870513ee..a73352528decc 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -48,20 +48,20 @@ index b40d96b754118c1dd1f1fb62f441a5a870d16ed9..7e205e324f5a8604ae6624c42b5b216e #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/color_palette.h" diff --git a/chrome/browser/ui/views/overlay/hang_up_button.cc b/chrome/browser/ui/views/overlay/hang_up_button.cc -index 4b741d67c4c20766e248f0799825103ba4f2a1ce..adf85811da98e1666e8e93e5b339e176ecfe64e3 100644 +index 7b711bdbaf4afddd6ccf300af7bab26487942243..987a60b81554b676661d8f1a53facbc9dc08f5d5 100644 --- a/chrome/browser/ui/views/overlay/hang_up_button.cc +++ b/chrome/browser/ui/views/overlay/hang_up_button.cc -@@ -5,7 +5,7 @@ +@@ -4,7 +4,7 @@ + #include "chrome/browser/ui/views/overlay/hang_up_button.h" - #include "chrome/browser/ui/views/overlay/constants.h" -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/paint_vector_icon.h" diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc -index d094b65029c7d73a77238844b9f31ffbf3ddbafd..61ecfb4dee4b6bca43721039651752793d30fab6 100644 +index 6da231ce996fda46be2c2ce787d08fba988b5304..e4628ae26118d8a042b805371142428f34247a9f 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc @@ -16,9 +16,11 @@ @@ -85,7 +85,7 @@ index d094b65029c7d73a77238844b9f31ffbf3ddbafd..61ecfb4dee4b6bca4372103965175279 #include "components/url_formatter/url_formatter.h" #include "components/vector_icons/vector_icons.h" #include "content/public/browser/picture_in_picture_window_controller.h" -@@ -56,7 +58,7 @@ +@@ -58,7 +60,7 @@ #include "ui/aura/window.h" #endif @@ -94,7 +94,7 @@ index d094b65029c7d73a77238844b9f31ffbf3ddbafd..61ecfb4dee4b6bca4372103965175279 #include "chrome/browser/shell_integration_win.h" #include "ui/aura/window.h" #include "ui/aura/window_tree_host.h" -@@ -240,7 +242,7 @@ std::unique_ptr OverlayWindowViews::Create( +@@ -242,7 +244,7 @@ std::unique_ptr OverlayWindowViews::Create( overlay_window->Init(std::move(params)); overlay_window->OnRootViewReady(); diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 6e903131966ae..cd20455cd5e87 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -102,7 +102,7 @@ index f2ba13cb21d66c2067264086926341e8490b1b84..29dc7c84c22d9aa7bf0711467fa98b16 } diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 15dcd3179a2705ab87c525efe1a5210c07ffc17b..fc45f0449fc8bc24fe3bdc3571c9793c6789d36b 100644 +index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac3936cd29c2 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -28,10 +28,10 @@ @@ -375,10 +375,10 @@ index b19ee4414584d0e192ea6b4b91b4e2ed59aef51b..e67bf37ca58877639a724589ca911940 // This means we are _blocking_ until all the necessary pages have been // rendered or the print settings are being loaded. diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index bfca294bd94763d7a661f9b424bbe1351f076030..a5b50dfbf2a64d87c5f9e632c0709bf5967c0f1e 100644 +index 623659a3c78ce069cbcc83eeccfbc7265437ff01..f02cb6bced9f8382c84f560b5b40c9247db790ce 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom -@@ -271,7 +271,7 @@ interface PrintPreviewUI { +@@ -270,7 +270,7 @@ interface PrintPreviewUI { interface PrintRenderFrame { // Tells the RenderFrame to switch the CSS to print media type, render every // requested page, and then switch back the CSS to display media type. @@ -388,7 +388,7 @@ index bfca294bd94763d7a661f9b424bbe1351f076030..a5b50dfbf2a64d87c5f9e632c0709bf5 // Tells the RenderFrame to switch the CSS to print media type, render every // requested page using the print preview document's frame/node, and then diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7efe71924 100644 +index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a1648065bf8a 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -38,6 +38,7 @@ @@ -399,7 +399,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 #include "printing/units.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" -@@ -1178,7 +1179,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1175,7 +1176,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -409,7 +409,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 if (!weak_this) return; -@@ -1209,7 +1211,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1206,7 +1208,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -418,7 +418,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > 1) return; -@@ -1224,7 +1226,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1221,7 +1223,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -427,7 +427,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1255,7 +1257,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1252,7 +1254,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -437,7 +437,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1302,6 +1305,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1299,6 +1302,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > 1) return; @@ -446,7 +446,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 print_preview_context_.OnPrintPreview(); if (print_preview_context_.IsForArc()) { -@@ -1837,7 +1842,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1834,7 +1839,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -456,7 +456,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 // Check if |this| is still valid. if (!weak_this) return; -@@ -1852,7 +1858,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1849,7 +1855,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -467,7 +467,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1860,7 +1868,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1857,7 +1865,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -476,7 +476,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1879,8 +1887,41 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1876,8 +1884,41 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -519,7 +519,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 // Check if |this| is still valid. if (!self) return; -@@ -2128,7 +2169,9 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2125,7 +2166,9 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -530,7 +530,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 mojom::PrintPagesParams settings; settings.params = mojom::PrintParams::New(); GetPrintManagerHost()->GetDefaultPrintSettings(&settings.params); -@@ -2152,12 +2195,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { +@@ -2149,12 +2192,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { return result; } @@ -549,7 +549,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2528,18 +2573,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) { +@@ -2523,18 +2568,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) { } bool PrintRenderFrameHelper::CheckForCancel() { @@ -570,7 +570,7 @@ index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7 bool PrintRenderFrameHelper::PreviewPageRendered( diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index c6cc4719d58b36a958deccf274517b732b1f65ca..88cb62d5e94328ced887d24533e2a9ac8f2863df 100644 +index dd23fe0ad391cff76dd4560795f01749a756e8cf..dc746304213cb9a1f131b7a383e48e8595ac3668 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h @@ -231,7 +231,7 @@ class PrintRenderFrameHelper diff --git a/patches/chromium/put_back_deleted_colors_for_autofill.patch b/patches/chromium/put_back_deleted_colors_for_autofill.patch index dd34b25d9608b..378ecae30be1f 100644 --- a/patches/chromium/put_back_deleted_colors_for_autofill.patch +++ b/patches/chromium/put_back_deleted_colors_for_autofill.patch @@ -8,7 +8,7 @@ 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/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc -index 4a526861f54e7c6fffaf76a2457bf418698cdc8b..2335988a186e4a437bbe82a6a113a17755e65cd1 100644 +index 37fe41cb525ebc19a32a592f5695f7a083135116..d70767e072799c15b5ee0c4eeb4c76d82dfb247c 100644 --- a/ui/native_theme/common_theme.cc +++ b/ui/native_theme/common_theme.cc @@ -68,6 +68,14 @@ absl::optional GetDarkSchemeColor(NativeTheme::ColorId color_id, @@ -46,7 +46,7 @@ index 4a526861f54e7c6fffaf76a2457bf418698cdc8b..2335988a186e4a437bbe82a6a113a177 // Keeping the kColorId_NumColors case instead of using the default case // allows ColorId additions to trigger compile error for an incomplete diff --git a/ui/native_theme/native_theme_color_id.h b/ui/native_theme/native_theme_color_id.h -index 083640808cd6a4a5e6e65d715c77ef58d090ba1e..d7d2fe4e0ada417769cbfe8390b8e2b134549962 100644 +index 84848edbbe9de7ef9fe6e2ab0a34d3b9428cde10..5e07980e4793cc3b19140510fb3fd3b23c6a88ef 100644 --- a/ui/native_theme/native_theme_color_id.h +++ b/ui/native_theme/native_theme_color_id.h @@ -157,6 +157,11 @@ 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 33229fc69610a..1a6aec65240b1 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -8,7 +8,7 @@ Chrome moved the SetCursor IPC message to mojo, which we use to tell OSR about ` Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779 diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h -index 591d412c780a87c8aaffb71e812774ab7a3e2612..cebe9c6943001e0a0a02b82cfd49fc0617871625 100644 +index 952c3f143f525a1a0af9ae57343086494924d1ee..45c1d5519846218b8ef2376dd0a7b5fe596ea7ce 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h @@ -14,6 +14,7 @@ @@ -19,7 +19,7 @@ index 591d412c780a87c8aaffb71e812774ab7a3e2612..cebe9c6943001e0a0a02b82cfd49fc06 #include "content/public/common/drop_data.h" #include "services/metrics/public/cpp/ukm_recorder.h" #include "third_party/abseil-cpp/absl/types/optional.h" -@@ -260,6 +261,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { +@@ -257,6 +258,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { // Returns the associated RenderViewHostDelegateView*, if possible. virtual RenderViewHostDelegateView* GetDelegateView(); @@ -30,10 +30,10 @@ index 591d412c780a87c8aaffb71e812774ab7a3e2612..cebe9c6943001e0a0a02b82cfd49fc06 // RenderWidgetHost on the main frame, and false otherwise. virtual bool IsWidgetForMainFrame(RenderWidgetHostImpl*); diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 7188857619477bc3f93dc836f56d4f25a88cc29e..ba6e00b0b168c46fbb983937466a5fd4f72bca5d 100644 +index f03c14c1aa614b7efc93a627863c3aa03b0e5d45..cdf834e8f67475d6b75912bfafba3705bf75f820 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -1979,6 +1979,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { +@@ -1990,6 +1990,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { if (view_) view_->UpdateCursor(WebCursor(cursor)); @@ -43,10 +43,10 @@ index 7188857619477bc3f93dc836f56d4f25a88cc29e..ba6e00b0b168c46fbb983937466a5fd4 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 95d2a7b15e67e2af6f9aebb0c975f5713762032d..09ae42633e0635d94b5a1b4f71af943f0cd7bb64 100644 +index 9fa5062a0eb8754c1a3e560a8d0bcd3098bcdb2e..f9efbea691c72a2c34ae54ef7e40b7e995e37514 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4316,6 +4316,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4348,6 +4348,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,10 +59,10 @@ index 95d2a7b15e67e2af6f9aebb0c975f5713762032d..09ae42633e0635d94b5a1b4f71af943f RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 7ba50c203e96b98774fe92f7c772de236deba824..aa6b35d85fcbd1378a96c027a1f9e72660911484 100644 +index b9373f51c8bdc5d59f87f6e6baae211ce2d06451..a804f30ed40830a11228ef94f4dedcdc8f0753ac 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -969,6 +969,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -972,6 +972,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, blink::mojom::FrameVisibility visibility) override; void SendScreenRects() override; TextInputManager* GetTextInputManager() override; @@ -71,7 +71,7 @@ index 7ba50c203e96b98774fe92f7c772de236deba824..aa6b35d85fcbd1378a96c027a1f9e726 bool IsShowingContextMenuOnPage() const override; void DidChangeScreenOrientation() override; diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h -index 3fc353fbfc4db00eedb858301b4d7bdd1e1a1fad..d9f4902377884488e1588cabba93a9e8cecd82c2 100644 +index c4c77a82bef2f3fce25172ae610dc47daf613017..e7ed935e48a7c0a2891cf14a9f08dc95dfe700e1 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -13,6 +13,7 @@ diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index ae330ddc21510..7a50a860b94f2 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch ... something to do with OSR? and maybe as well? terrifying. diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc -index 3e66a34ed1dabececdc508bb1bc8711b4da21096..d1eebf26451c584f069a493dbc7d92e702d8b1aa 100644 +index c31a2b532540befb093e27677f87b4081fa0264c..13351ff303530bbd59516338f620fea16347810b 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -664,6 +664,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -665,6 +665,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,7 +24,7 @@ index 3e66a34ed1dabececdc508bb1bc8711b4da21096..d1eebf26451c584f069a493dbc7d92e7 const blink::WebMouseEvent& event, const ui::LatencyInfo& latency) { diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h -index 6c9aa1e30be7dfb105e722096a159bb3be1697b6..d7676abb4a04dcb4e2851c29473e0ac70cc36c51 100644 +index 17803f43ea18185878cc2c0b6b4c13de5559a795..583f70174be866e1d79664bc47306dd2cfbaa4be 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -24,8 +24,10 @@ @@ -50,9 +50,9 @@ index 6c9aa1e30be7dfb105e722096a159bb3be1697b6..d7676abb4a04dcb4e2851c29473e0ac7 class WebCursor; class WebContentsAccessibility; class DelegatedFrameHost; -@@ -138,6 +142,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { - bool show_reason_unoccluded, +@@ -139,6 +143,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { bool show_reason_bfcache_restore) final; + bool ShouldVirtualKeyboardOverlayContent() override; + virtual void InitAsGuest(RenderWidgetHostView* parent_host_view, + RenderWidgetHostViewGuest* guest_view) {} @@ -60,7 +60,7 @@ index 6c9aa1e30be7dfb105e722096a159bb3be1697b6..d7676abb4a04dcb4e2851c29473e0ac7 // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. gfx::PointF TransformPointToRootCoordSpaceF( -@@ -300,6 +307,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -301,6 +308,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { virtual void ProcessGestureEvent(const blink::WebGestureEvent& event, const ui::LatencyInfo& latency); diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 584261c7c82d2..2564765edd907 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 3aeda626f18b23cb79e81710c08c353b5abe6651..c0beea906cc463cf55d37924a61cf0ba7eba6ab2 100644 +index 1c6fd93d94871a7f4913fc08898987056c8f21e5..72567c45bafd90556c133b594053f18c45265da0 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1532,7 +1532,7 @@ if (is_chrome_branded && !is_android) { +@@ -1530,7 +1530,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 3aeda626f18b23cb79e81710c08c353b5abe6651..c0beea906cc463cf55d37924a61cf0ba chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1560,6 +1560,12 @@ if (!is_android) { +@@ -1558,6 +1558,12 @@ if (!is_android) { } } diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index a3c4b811e730c..ffeef6b603f2a 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it does touch a security-sensitive class. diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 953797c2efaa9de150b6a43f6a2a59fe031af236..506888cef32304ae5b27f85f758c9fa38024dfdb 100644 +index fdad49451e9dcdab8d2b532c90c784faf2e5aeba..85e3dd76f528b3e60b86bef6a9231135ef2bc0f5 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -422,10 +422,18 @@ class RendererSandboxedProcessLauncherDelegate +@@ -427,10 +427,18 @@ class RendererSandboxedProcessLauncherDelegate public: RendererSandboxedProcessLauncherDelegate() = default; @@ -44,7 +44,7 @@ index 953797c2efaa9de150b6a43f6a2a59fe031af236..506888cef32304ae5b27f85f758c9fa3 const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); base::CommandLine::StringType renderer_prefix = -@@ -443,6 +451,11 @@ class RendererSandboxedProcessLauncherDelegate +@@ -448,6 +456,11 @@ class RendererSandboxedProcessLauncherDelegate sandbox::policy::SandboxType GetSandboxType() override { return sandbox::policy::SandboxType::kRenderer; } @@ -56,20 +56,20 @@ index 953797c2efaa9de150b6a43f6a2a59fe031af236..506888cef32304ae5b27f85f758c9fa3 }; #if defined(OS_WIN) -@@ -453,6 +466,9 @@ class RendererSandboxedProcessLauncherDelegateWin - RendererSandboxedProcessLauncherDelegateWin(base::CommandLine* cmd_line) +@@ -459,6 +472,9 @@ class RendererSandboxedProcessLauncherDelegateWin + bool is_jit_disabled) : renderer_code_integrity_enabled_( GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()) { +#if BUILDFLAG(USE_ZYGOTE_HANDLE) + use_zygote_ = !cmd_line->HasSwitch(switches::kNoZygote); +#endif - if (cmd_line->HasSwitch(switches::kJavaScriptFlags)) { - std::string js_flags = - cmd_line->GetSwitchValueASCII(switches::kJavaScriptFlags); -@@ -1984,9 +2000,15 @@ bool RenderProcessHostImpl::Init() { + if (is_jit_disabled) { + dynamic_code_can_be_disabled_ = true; + return; +@@ -2009,9 +2025,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( - cmd_line.get()); + cmd_line.get(), IsJitDisabled()); +#else +#if BUILDFLAG(USE_ZYGOTE_HANDLE) + bool use_zygote = !cmd_line->HasSwitch(switches::kNoZygote); diff --git a/patches/chromium/sysroot.patch b/patches/chromium/sysroot.patch index f884a0dbe459e..de8974b0f2238 100644 --- a/patches/chromium/sysroot.patch +++ b/patches/chromium/sysroot.patch @@ -7,11 +7,11 @@ Make chrome's install-sysroot scripts point to our custom sysroot builds, which include extra deps that Electron needs (e.g. libnotify) diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py -index f8b7906cc557fb196e19dd6684a29c174b56c789..351b3a658b6b6d1dbe2370e825058b8b6dcbf9df 100755 +index f5f1da41bb9be11bf00c39b5c4cbfd1b2413edef..0dd2bdf66c531f34483d888abed99e8fee321588 100755 --- a/build/linux/sysroot_scripts/install-sysroot.py +++ b/build/linux/sysroot_scripts/install-sysroot.py -@@ -37,9 +37,11 @@ except ImportError: - from urllib2 import urlopen +@@ -41,9 +41,11 @@ except ImportError: + from urllib2 import urlopen SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(SCRIPT_DIR))) @@ -24,7 +24,7 @@ index f8b7906cc557fb196e19dd6684a29c174b56c789..351b3a658b6b6d1dbe2370e825058b8b VALID_ARCHS = ('arm', 'arm64', 'i386', 'amd64', 'mips', 'mips64el') -@@ -101,7 +103,7 @@ def GetSysrootDict(target_platform, target_arch): +@@ -105,7 +107,7 @@ def GetSysrootDict(target_platform, target_arch): if target_arch not in VALID_ARCHS: raise Error('Unknown architecture: %s' % target_arch) diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 193109934c791..c473b2cfcf45a 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 76aac784c441de59e1188a220e6ced4b51be322d..bc6b6175d3d735b96613c42083513e2e6d6d661a 100644 +index 86136d3222d7d5f66fe797ba274ef3c5a7e49306..d844dd785d9570468b21e334d6d825d1e1d5c8f5 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2897,6 +2897,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2925,6 +2925,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { frame_tree_.Init(site_instance.get(), params.renderer_initiated_creation, params.main_frame_name); @@ -25,7 +25,7 @@ index 76aac784c441de59e1188a220e6ced4b51be322d..bc6b6175d3d735b96613c42083513e2e WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2907,6 +2913,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2935,6 +2941,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -34,7 +34,7 @@ index 76aac784c441de59e1188a220e6ced4b51be322d..bc6b6175d3d735b96613c42083513e2e CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index 67006dfc4c4fab7494d54fee35ab72a38035d4ee..e4e70e4d378cf13eb00d7327b88e2501dcfc7f84 100644 +index eff5a1b759bcfd6f775413080d5cdc9de148a547..41943c884912ee34b1f588f404a085683588a549 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -85,10 +85,13 @@ class BrowserContext; diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 41e9d70fd6e38..d7009038188e7 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,10 +26,10 @@ index 7ec0901cf6ba2c3b8d8dd69d02f12c1c603f13b8..d8c7a1954d5acc0eb4bb675795038eae // 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 5ccc942c2b09a0ef6c370db147c2c827b0a76b13..693350fad26bed9ca4bf250fc9115753ee76616d 100644 +index cb70283baf85185f0332d967d49c7033800f1f8e..e3e45f37ea1b3e732cb85c151fd98ce491e39c47 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -944,6 +944,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -939,6 +939,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index 5ccc942c2b09a0ef6c370db147c2c827b0a76b13..693350fad26bed9ca4bf250fc9115753 const v8::Local& worker) { GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index d2e127a42e43ba606b03fc506b3c65da1031e494..98570f9df56f58e0478a34a023b329ed7e7f3c87 100644 +index cb8770a47a808279d7c1999245d19eae3c941a4e..523a489b89735d77a2d44b5f5d327b20dcbab3fb 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -206,6 +206,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -205,6 +205,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -55,7 +55,7 @@ index d2e127a42e43ba606b03fc506b3c65da1031e494..98570f9df56f58e0478a34a023b329ed const blink::WebSecurityOrigin& script_origin) override; blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel() diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index ba0b3775def8323668a893c48d4c56aa495efa0f..aac79f78f362b6025d5a6403b91f8ebece3297a0 100644 +index 7691e1e8b3289774f89830fd850c6f6d155dec24..e311411dc9b7074290cff0551fc3ae8043218538 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h @@ -728,6 +728,7 @@ class BLINK_PLATFORM_EXPORT Platform { @@ -67,10 +67,10 @@ index ba0b3775def8323668a893c48d4c56aa495efa0f..aac79f78f362b6025d5a6403b91f8ebe const WebSecurityOrigin& script_origin) { return false; diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc -index 13420144484a55dab439cf32475b6681b783cc10..b277c8632e17cbb7afcc60fddd0edd757c6580fd 100644 +index 314dc76e24dad33d8363cf8ae1f24787c448fb5b..9306fcca19dfaa1ed7a52cafd2e56eed190dd203 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -737,6 +737,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -738,6 +738,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { nested_runner_->QuitNow(); } 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 56e100981ac99..7ffd551c8d9bf 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,10 +35,10 @@ index d8c7a1954d5acc0eb4bb675795038eae0e16bc05..0eee88a106abdc6f232b384265da03e8 // 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 693350fad26bed9ca4bf250fc9115753ee76616d..d5f2f1d89ef3081991f340c7f4cc89970d09e1a2 100644 +index e3e45f37ea1b3e732cb85c151fd98ce491e39c47..7a5046aa9f6d6e8788af0893f6cce46507d31997 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -956,6 +956,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -951,6 +951,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index 693350fad26bed9ca4bf250fc9115753ee76616d..d5f2f1d89ef3081991f340c7f4cc8997 const blink::WebSecurityOrigin& script_origin) { return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 98570f9df56f58e0478a34a023b329ed7e7f3c87..b4da952fc15d4914da04bdcc509cce631f4ccd51 100644 +index 523a489b89735d77a2d44b5f5d327b20dcbab3fb..842890143c2bc79f2acbf1d6f17cd8ea857344d1 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -206,6 +206,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -205,6 +205,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -65,7 +65,7 @@ index 98570f9df56f58e0478a34a023b329ed7e7f3c87..b4da952fc15d4914da04bdcc509cce63 bool AllowScriptExtensionForServiceWorker( const blink::WebSecurityOrigin& script_origin) override; diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index aac79f78f362b6025d5a6403b91f8ebece3297a0..5b26abe1ca23e6e5d782ca674f976fdb41eafbfd 100644 +index e311411dc9b7074290cff0551fc3ae8043218538..3a1f06e9b7d8522dd8ed7fbfb61f3899cde24808 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h @@ -728,6 +728,8 @@ class BLINK_PLATFORM_EXPORT Platform { diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 1893125f6c174..bdcdd5819ecf5 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,10 +9,10 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index a5330c29219ecbfa5bdb09ddace257fd2acff39e..ce7c4c1829f2d5a15626a49cf66434fe5370e798 100644 +index bcc86f64f5598402e0ec6f726c0a5a1050411d1a..767ddfcd2b2812991a01ceb997674238b1e5ecae 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -530,7 +530,7 @@ config("internal_config") { +@@ -544,7 +544,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index a5330c29219ecbfa5bdb09ddace257fd2acff39e..ce7c4c1829f2d5a15626a49cf66434fe defines += [ "BUILDING_V8_SHARED" ] } } -@@ -5249,7 +5249,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5286,7 +5286,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index a5330c29219ecbfa5bdb09ddace257fd2acff39e..ce7c4c1829f2d5a15626a49cf66434fe deps = [ ":v8_libbase", -@@ -5287,6 +5287,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5324,6 +5324,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 54e77f40bd302..95e5880553724 100644 --- a/patches/v8/dcheck.patch +++ b/patches/v8/dcheck.patch @@ -6,10 +6,10 @@ Subject: dcheck.patch https://github.com/auchenberg/volkswagen diff --git a/src/api/api.cc b/src/api/api.cc -index f0c877406168347c55f7c63042bd0dfc6de2a55a..9d57566fd3cfad8de300ba0074a77dc5492abc59 100644 +index 5880ca6e4806c8fefde88e94bea79314261a3fcb..f48c9fdfd8022eb32c73149945ab88822ef00f75 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -8771,7 +8771,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -8788,7 +8788,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index f0c877406168347c55f7c63042bd0dfc6de2a55a..9d57566fd3cfad8de300ba0074a77dc5 isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index b994bbd9cc408daf96ad0ad034aa69ff69c476e3..2bb0b7ce4d9f3216cbdf50279e021b64b7290ce5 100644 +index 3252e14c78e4803e109960de36498066af9fe8ca..c0a5acd2c6c7dbfae08c6910ae6519e3c8afd326 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -5846,9 +5846,9 @@ void Heap::DeinitSharedSpaces() { +@@ -5865,9 +5865,9 @@ void Heap::DeinitSharedSpaces() { void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback, GCType gc_type, void* data) { DCHECK_NOT_NULL(callback); 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 3ada3604bb586..709f0475a4bb8 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,10 +12,10 @@ 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 d15939cbb2279d896b02963834d20589aa98f282..b857985527f19be1ea052731a7cd07516d67c3c8 100644 +index 7ac71d5aff1f93cc34b458124f2854d01a44b7cc..7804557003c5a57110e36d0962cf58246a43e172 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -530,6 +530,10 @@ config("internal_config") { +@@ -544,6 +544,10 @@ config("internal_config") { ":cppgc_header_features", ] @@ -27,7 +27,7 @@ index d15939cbb2279d896b02963834d20589aa98f282..b857985527f19be1ea052731a7cd0751 defines += [ "BUILDING_V8_SHARED" ] } diff --git a/src/base/macros.h b/src/base/macros.h -index 99ccd28a1db58d0fa938025dbf28c5490e04ca15..b36cf6a2b43741b7b72aaa6896787ce621d09d9c 100644 +index a1880cf7845474d6849f92bb391ab89cd3e67be6..c978e7a78ab2ee96a5374303c61a021c1526a19b 100644 --- a/src/base/macros.h +++ b/src/base/macros.h @@ -381,13 +381,17 @@ bool is_inbounds(float_t v) { diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index 2b91aa2e76bc9..118fc093ba1c5 100644 --- a/patches/v8/export_symbols_needed_for_windows_build.patch +++ b/patches/v8/export_symbols_needed_for_windows_build.patch @@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build These symbols are required to build v8 with BUILD_V8_SHARED on Windows. diff --git a/src/objects/objects.h b/src/objects/objects.h -index e80098dfe8df39132272fb23525f02ec4112e355..e3f73c939f285c98ca77aa273933457f19765d63 100644 +index 7be9c731e8a5ef2908cb617ece2096fb5f39c4fb..a5ab83832aa9824fb1ff1c5b59ea14120934d436 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -841,7 +841,7 @@ enum class KeyCollectionMode { +@@ -848,7 +848,7 @@ enum class KeyCollectionMode { // Utility superclass for stack-allocated objects that must be updated // on gc. It provides two ways for the gc to update instances, either // iterating or updating after gc. diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index b7e73f42f3695..d343d526b944b 100644 --- a/patches/v8/expose_mksnapshot.patch +++ b/patches/v8/expose_mksnapshot.patch @@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch Needed in order to target mksnapshot for mksnapshot zip. diff --git a/BUILD.gn b/BUILD.gn -index ce7c4c1829f2d5a15626a49cf66434fe5370e798..d15939cbb2279d896b02963834d20589aa98f282 100644 +index 767ddfcd2b2812991a01ceb997674238b1e5ecae..7ac71d5aff1f93cc34b458124f2854d01a44b7cc 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5261,7 +5261,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5298,7 +5298,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/workaround_an_undefined_symbol_error.patch b/patches/v8/workaround_an_undefined_symbol_error.patch index 64045fc09af56..c3b872cbf251c 100644 --- a/patches/v8/workaround_an_undefined_symbol_error.patch +++ b/patches/v8/workaround_an_undefined_symbol_error.patch @@ -12,7 +12,7 @@ By moving some functions out of the the arm64-assembler header file, this error no longer seems to happen. diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc -index 0551877403175d71bc55553a630847334eab8516..6550a53f2660553d71a10ac103e1b724dcab3a20 100644 +index cc975913b96b30e1fd3bab2d4d268e08fae5e772..1392fa02b1202af2190f41e748d2132fc14b83a7 100644 --- a/src/codegen/arm64/assembler-arm64.cc +++ b/src/codegen/arm64/assembler-arm64.cc @@ -3629,6 +3629,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift, @@ -39,7 +39,7 @@ index 0551877403175d71bc55553a630847334eab8516..6550a53f2660553d71a10ac103e1b724 const Operand& operand, FlagsUpdate S, AddSubOp op) { DCHECK_EQ(rd.SizeInBits(), rn.SizeInBits()); diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h -index 9d8b135954b4f7d4805316fc6f0e300d69fb7bf9..7fde7e4ae5cbf6fa26cb1ff304da9a0207cde7b1 100644 +index 6a0245fcd628c2ffe928f75db503d23639ce200a..cdd58eedb6276bd7ab38ce4e5e05596288add394 100644 --- a/src/codegen/arm64/assembler-arm64.h +++ b/src/codegen/arm64/assembler-arm64.h @@ -2117,11 +2117,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 18398b0707f6b..3c1398d9eb7dd 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -11,6 +11,7 @@ #include "base/callback_helpers.h" #include "base/command_line.h" +#include "base/containers/span.h" #include "base/environment.h" #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -536,7 +537,8 @@ void OnClientCertificateSelected( return; auto certs = net::X509Certificate::CreateCertificateListFromBytes( - data.c_str(), data.length(), net::X509Certificate::FORMAT_AUTO); + base::as_bytes(base::make_span(data.c_str(), data.size())), + net::X509Certificate::FORMAT_AUTO); if (!certs.empty()) { scoped_refptr cert(certs[0].get()); for (auto& identity : *identities) { diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 0578ce6c262e7..27ece8159d1c4 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -907,6 +907,16 @@ void WebContents::InitWithWebContents(content::WebContents* web_contents, inspectable_web_contents_.reset(new InspectableWebContents( web_contents, browser_context->prefs(), is_guest)); inspectable_web_contents_->SetDelegate(this); + + if (web_preferences) { + std::string color_name; + if (web_preferences->GetPreference(options::kBackgroundColor, + &color_name)) { + web_contents->SetPageBaseBackgroundColor(ParseHexColor(color_name)); + } else { + web_contents->SetPageBaseBackgroundColor(SK_ColorTRANSPARENT); + } + } } WebContents::~WebContents() { @@ -1366,18 +1376,6 @@ void WebContents::HandleNewRenderFrame( if (!rwhv) return; - // Set the background color of RenderWidgetHostView. - auto* web_preferences = WebContentsPreferences::From(web_contents()); - if (web_preferences) { - std::string color_name; - if (web_preferences->GetPreference(options::kBackgroundColor, - &color_name)) { - rwhv->SetBackgroundColor(ParseHexColor(color_name)); - } else { - rwhv->SetBackgroundColor(SK_ColorTRANSPARENT); - } - } - if (!background_throttling_) render_frame_host->GetRenderViewHost()->SetSchedulerThrottling(false); diff --git a/shell/browser/api/frame_subscriber.cc b/shell/browser/api/frame_subscriber.cc index 42bbe5e6a24df..90173b567868d 100644 --- a/shell/browser/api/frame_subscriber.cc +++ b/shell/browser/api/frame_subscriber.cc @@ -9,6 +9,7 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/render_widget_host.h" #include "content/public/browser/render_widget_host_view.h" +#include "media/capture/mojom/video_capture_buffer.mojom.h" #include "media/capture/mojom/video_capture_types.mojom.h" #include "mojo/public/cpp/bindings/remote.h" #include "ui/gfx/geometry/size_conversions.h" diff --git a/shell/browser/api/gpuinfo_manager.cc b/shell/browser/api/gpuinfo_manager.cc index 9e4461ac71d35..8b267c11f6b9f 100644 --- a/shell/browser/api/gpuinfo_manager.cc +++ b/shell/browser/api/gpuinfo_manager.cc @@ -68,7 +68,7 @@ void GPUInfoManager::CompleteInfoFetcher( if (NeedsCompleteGpuInfoCollection()) { gpu_data_manager_->RequestDxdiagDx12VulkanGpuInfoIfNeeded( - content::kGpuInfoRequestAll, /* delayed */ false); + content::GpuDataManagerImpl::kGpuInfoRequestAll, /* delayed */ false); } else { GPUInfoManager::OnGpuInfoUpdate(); } diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index 1d8c41e968826..c10f37b029bd5 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -46,7 +46,7 @@ class ElectronPermissionManager::PendingRequest { const std::vector& permissions, StatusesCallback callback) : render_process_id_(render_frame_host->GetProcess()->GetID()), - render_frame_id_(render_frame_host->GetGlobalFrameRoutingId()), + render_frame_id_(render_frame_host->GetGlobalId()), callback_(std::move(callback)), permissions_(permissions), results_(permissions.size(), blink::mojom::PermissionStatus::DENIED), @@ -86,7 +86,7 @@ class ElectronPermissionManager::PendingRequest { private: int render_process_id_; - content::GlobalFrameRoutingId render_frame_id_; + content::GlobalRenderFrameHostId render_frame_id_; StatusesCallback callback_; std::vector permissions_; std::vector results_; diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index f5d335c0891e3..4652fa9d8e628 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -345,6 +345,21 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options, // bounds if the bounds are smaller than the current display SetBounds(gfx::Rect(GetPosition(), bounds.size()), false); #endif + + SetOwnedByWidget(false); + RegisterDeleteDelegateCallback(base::BindOnce( + [](NativeWindowViews* window) { + if (window->is_modal() && window->parent()) { + auto* parent = window->parent(); + // Enable parent window after current window gets closed. + static_cast(parent)->DecrementChildModals(); + // Focus on parent window. + parent->Focus(true); + } + + window->NotifyWindowClosed(); + }, + this)); } NativeWindowViews::~NativeWindowViews() { @@ -1472,18 +1487,6 @@ void NativeWindowViews::OnWidgetDestroyed(views::Widget* changed_widget) { widget_destroyed_ = true; } -void NativeWindowViews::DeleteDelegate() { - if (is_modal() && this->parent()) { - auto* parent = this->parent(); - // Enable parent window after current window gets closed. - static_cast(parent)->DecrementChildModals(); - // Focus on parent window. - parent->Focus(true); - } - - NotifyWindowClosed(); -} - views::View* NativeWindowViews::GetInitiallyFocusedView() { return focused_view_; } diff --git a/shell/browser/native_window_views.h b/shell/browser/native_window_views.h index 88b70dc98dad9..1cc9ca1e03c2b 100644 --- a/shell/browser/native_window_views.h +++ b/shell/browser/native_window_views.h @@ -184,7 +184,6 @@ class NativeWindowViews : public NativeWindow, void OnWidgetDestroyed(views::Widget* widget) override; // views::WidgetDelegate: - void DeleteDelegate() override; views::View* GetInitiallyFocusedView() override; bool CanMaximize() const override; bool CanMinimize() const override; diff --git a/shell/browser/net/proxying_url_loader_factory.cc b/shell/browser/net/proxying_url_loader_factory.cc index ed5971d8ca700..16ea5bdffa4ba 100644 --- a/shell/browser/net/proxying_url_loader_factory.cc +++ b/shell/browser/net/proxying_url_loader_factory.cc @@ -18,6 +18,7 @@ #include "net/http/http_util.h" #include "services/metrics/public/cpp/ukm_source_id.h" #include "services/network/public/cpp/features.h" +#include "services/network/public/mojom/early_hints.mojom.h" #include "shell/browser/net/asar/asar_url_loader.h" #include "shell/common/options_switches.h" diff --git a/shell/browser/net/proxying_websocket.cc b/shell/browser/net/proxying_websocket.cc index d2fe4b6ee1ba9..fd952f5d804fc 100644 --- a/shell/browser/net/proxying_websocket.cc +++ b/shell/browser/net/proxying_websocket.cc @@ -13,6 +13,7 @@ #include "extensions/browser/extension_navigation_ui_data.h" #include "net/base/ip_endpoint.h" #include "net/http/http_util.h" +#include "services/network/public/mojom/url_response_head.mojom.h" namespace electron { diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index 618297e11b984..b8409c6e21016 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -480,13 +480,13 @@ void OffScreenRenderWidgetHostView::CopyFromSurface( } void OffScreenRenderWidgetHostView::GetScreenInfo( - blink::ScreenInfo* screen_info) { + display::ScreenInfo* screen_info) { screen_info->depth = 24; screen_info->depth_per_component = 8; screen_info->orientation_angle = 0; screen_info->device_scale_factor = GetCurrentDeviceScaleFactor(); screen_info->orientation_type = - blink::mojom::ScreenOrientation::kLandscapePrimary; + display::mojom::ScreenOrientation::kLandscapePrimary; screen_info->rect = gfx::Rect(size_); screen_info->available_rect = gfx::Rect(size_); } diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 51d976fd267ff..51eaa290acac0 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -127,7 +127,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, const gfx::Rect& src_rect, const gfx::Size& output_size, base::OnceCallback callback) override; - void GetScreenInfo(blink::ScreenInfo* screen_info) override; + void GetScreenInfo(display::ScreenInfo* screen_info) override; void TransformPointToRootSurface(gfx::PointF* point) override; gfx::Rect GetBoundsInRootWindow(void) override; absl::optional GetDisplayFeature() override; diff --git a/shell/browser/osr/osr_video_consumer.cc b/shell/browser/osr/osr_video_consumer.cc index 5ddc883127239..c2eb11ecbd2a6 100644 --- a/shell/browser/osr/osr_video_consumer.cc +++ b/shell/browser/osr/osr_video_consumer.cc @@ -7,6 +7,7 @@ #include #include "media/base/video_frame_metadata.h" +#include "media/capture/mojom/video_capture_buffer.mojom.h" #include "media/capture/mojom/video_capture_types.mojom.h" #include "shell/browser/osr/osr_render_widget_host_view.h" #include "ui/gfx/skbitmap_operations.h" diff --git a/shell/browser/osr/osr_web_contents_view.cc b/shell/browser/osr/osr_web_contents_view.cc index eed0be9cc7e82..f1acacf0380bd 100644 --- a/shell/browser/osr/osr_web_contents_view.cc +++ b/shell/browser/osr/osr_web_contents_view.cc @@ -6,8 +6,8 @@ #include "content/browser/web_contents/web_contents_impl.h" // nogncheck #include "content/public/browser/render_view_host.h" -#include "third_party/blink/public/common/widget/screen_info.h" #include "ui/display/screen.h" +#include "ui/display/screen_info.h" namespace electron { diff --git a/shell/browser/printing/print_preview_message_handler.h b/shell/browser/printing/print_preview_message_handler.h index e620dca0ed30a..7a64ac7c9212b 100644 --- a/shell/browser/printing/print_preview_message_handler.h +++ b/shell/browser/printing/print_preview_message_handler.h @@ -14,6 +14,7 @@ #include "content/public/browser/web_contents_user_data.h" #include "mojo/public/cpp/bindings/associated_receiver.h" #include "mojo/public/cpp/bindings/associated_remote.h" +#include "printing/mojom/print.mojom.h" #include "shell/common/gin_helper/promise.h" #include "v8/include/v8.h" diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index 399e6f09d0474..073936e461236 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -158,7 +158,7 @@ GURL GetRemoteBaseURL() { return GURL(base::StringPrintf("%s%s/%s/", kChromeUIDevToolsRemoteFrontendBase, kChromeUIDevToolsRemoteFrontendPath, - content::GetWebKitRevision().c_str())); + content::GetChromiumGitRevision().c_str())); } GURL GetDevToolsURL(bool can_dock) { diff --git a/shell/browser/ui/views/inspectable_web_contents_view_views.cc b/shell/browser/ui/views/inspectable_web_contents_view_views.cc index e05b903c31352..e71a38eb27eb0 100644 --- a/shell/browser/ui/views/inspectable_web_contents_view_views.cc +++ b/shell/browser/ui/views/inspectable_web_contents_view_views.cc @@ -33,7 +33,7 @@ class DevToolsWindowDelegate : public views::ClientView, shell_(shell), view_(view), widget_(widget) { - // A WidgetDelegate should be deleted on DeleteDelegate. + SetOwnedByWidget(true); set_owned_by_client(); if (shell->GetDelegate()) @@ -42,7 +42,6 @@ class DevToolsWindowDelegate : public views::ClientView, ~DevToolsWindowDelegate() override = default; // views::WidgetDelegate: - void DeleteDelegate() override { delete this; } views::View* GetInitiallyFocusedView() override { return view_; } bool CanMaximize() const override { return true; } bool CanMinimize() const override { return true; } diff --git a/shell/browser/web_contents_preferences.cc b/shell/browser/web_contents_preferences.cc index 2ff57837bd35f..bf8982810e78d 100644 --- a/shell/browser/web_contents_preferences.cc +++ b/shell/browser/web_contents_preferences.cc @@ -428,14 +428,6 @@ void WebContentsPreferences::OverrideWebkitPrefs( if (GetAsString(&preference_, "defaultEncoding", &encoding)) prefs->default_encoding = encoding; - // --background-color. - std::string color; - if (GetAsString(&preference_, options::kBackgroundColor, &color)) { - prefs->background_color = color; - } else if (!IsEnabled(options::kOffscreen)) { - prefs->background_color = "#fff"; - } - // Pass the opener's window id. int opener_id; if (GetAsInteger(&preference_, options::kOpenerID, &opener_id)) diff --git a/shell/common/gin_converters/net_converter.cc b/shell/common/gin_converters/net_converter.cc index b5f776d40642c..0a6ec15e8804f 100644 --- a/shell/common/gin_converters/net_converter.cc +++ b/shell/common/gin_converters/net_converter.cc @@ -9,6 +9,7 @@ #include #include +#include "base/containers/span.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/values.h" @@ -33,7 +34,7 @@ namespace { bool CertFromData(const std::string& data, scoped_refptr* out) { auto cert_list = net::X509Certificate::CreateCertificateListFromBytes( - data.c_str(), data.length(), + base::as_bytes(base::make_span(data)), net::X509Certificate::FORMAT_SINGLE_CERTIFICATE); if (cert_list.empty()) return false; diff --git a/shell/renderer/api/electron_api_web_frame.cc b/shell/renderer/api/electron_api_web_frame.cc index 7362cf39412c4..d880b271a91ea 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -259,8 +259,7 @@ class FrameSetSpellChecker : public content::RenderFrameVisitor { } bool Visit(content::RenderFrame* render_frame) override { - auto* view = render_frame->GetRenderView(); - if (view->GetMainRenderFrame() == main_frame_ || + if (render_frame->GetMainRenderFrame() == main_frame_ || (render_frame->IsMainFrame() && render_frame == main_frame_)) { render_frame->GetWebFrame()->SetTextCheckClient(spell_check_client_); } @@ -489,8 +488,6 @@ class WebFrameRenderer : public gin::Wrappable, if (pref_name == options::kPreloadScripts) { return gin::ConvertToV8(isolate, prefs.preloads); - } else if (pref_name == options::kBackgroundColor) { - return gin::ConvertToV8(isolate, prefs.background_color); } else if (pref_name == options::kOpenerID) { // NOTE: openerId is internal-only. return gin::ConvertToV8(isolate, prefs.opener_id); diff --git a/shell/utility/electron_content_utility_client.cc b/shell/utility/electron_content_utility_client.cc index e114d9f9c22c9..ae7edafe15532 100644 --- a/shell/utility/electron_content_utility_client.cc +++ b/shell/utility/electron_content_utility_client.cc @@ -107,19 +107,6 @@ void ElectronContentUtilityClient::ExposeInterfacesToBrowser( } } -bool ElectronContentUtilityClient::OnMessageReceived( - const IPC::Message& message) { - if (utility_process_running_elevated_) - return false; - -#if BUILDFLAG(ENABLE_PRINT_PREVIEW) && defined(OS_WIN) - if (printing_handler_->OnMessageReceived(message)) - return true; -#endif - - return false; -} - void ElectronContentUtilityClient::RegisterMainThreadServices( mojo::ServiceFactory& services) { #if defined(OS_WIN) diff --git a/shell/utility/electron_content_utility_client.h b/shell/utility/electron_content_utility_client.h index 4177ca8c92168..35543e6720ceb 100644 --- a/shell/utility/electron_content_utility_client.h +++ b/shell/utility/electron_content_utility_client.h @@ -30,7 +30,6 @@ class ElectronContentUtilityClient : public content::ContentUtilityClient { ~ElectronContentUtilityClient() override; void ExposeInterfacesToBrowser(mojo::BinderMap* binders) override; - bool OnMessageReceived(const IPC::Message& message) override; void RegisterMainThreadServices(mojo::ServiceFactory& services) override; void RegisterIOThreadServices(mojo::ServiceFactory& services) override; diff --git a/spec-main/api-app-spec.ts b/spec-main/api-app-spec.ts index e2a12e9f7a2be..bc189f3f72a10 100644 --- a/spec-main/api-app-spec.ts +++ b/spec-main/api-app-spec.ts @@ -1294,8 +1294,15 @@ describe('app module', () => { }); const [exitCode] = await emittedOnce(appProcess, 'exit'); if (exitCode === 0) { - // return info data on successful exit - return JSON.parse(gpuInfoData); + try { + const [, json] = /HERE COMES THE JSON: (.+) AND THERE IT WAS/.exec(gpuInfoData)!; + // return info data on successful exit + return JSON.parse(json); + } catch (e) { + console.error('Failed to interpret the following as JSON:'); + console.error(gpuInfoData); + throw e; + } } else { // return error if not clean exit return Promise.reject(new Error(errorData)); diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index 654b0675918a0..34bf9aaac342b 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -352,8 +352,8 @@ describe('web security', () => { expect(r).to.equal('WebAssembly.instantiate(): Wasm code generation disallowed by embedder'); }); - it('wasm codegen is allowed with "wasm-eval" csp', async () => { - const r = await loadWasm("'wasm-eval'"); + it('wasm codegen is allowed with "wasm-unsafe-eval" csp', async () => { + const r = await loadWasm("'wasm-unsafe-eval'"); expect(r).to.equal('loaded'); }); }); diff --git a/spec/fixtures/api/gpu-info.js b/spec/fixtures/api/gpu-info.js index 7dbcfd8ea413d..3bacd1165b3b0 100644 --- a/spec/fixtures/api/gpu-info.js +++ b/spec/fixtures/api/gpu-info.js @@ -8,7 +8,7 @@ app.whenReady().then(() => { w.webContents.once('did-finish-load', () => { app.getGPUInfo(infoType).then( (gpuInfo) => { - console.log(JSON.stringify(gpuInfo)); + console.log('HERE COMES THE JSON: ' + JSON.stringify(gpuInfo) + ' AND THERE IT WAS'); setImmediate(() => app.exit(0)); }, (error) => {