diff --git a/DEPS b/DEPS index 2978414890..5e4c7ab0d0 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '146.0.7650.0', + '146.0.7666.0', 'node_version': 'v24.13.0', 'nan_version': diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 17cc03a61f..3b788e8b57 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -144,5 +144,4 @@ fix_linux_tray_id.patch expose_gtk_ui_platform_field.patch fix_os_crypt_async_cookie_encryption.patch patch_osr_control_screen_info.patch -graphite_handle_out_of_order_recording_errors.patch loaf_add_feature_to_enable_sourceurl_for_all_protocols.patch diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index cc67817d07..98f924cc3d 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set. This should be upstreamed. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index 30cc1d4a179f9da59824cb98415baed8493fc843..2272eaa7e0e3306201e5e32226a0115f6f6636e5 100644 +index b9fbc9e5b1d57e0ed842b08f0e3709d2bcf25aa5..bee847f2c72ae6856eb40d6e7e4afa6927965ea8 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -272,6 +272,10 @@ int GpuMain(MainFunctionParams parameters) { @@ -24,7 +24,7 @@ index 30cc1d4a179f9da59824cb98415baed8493fc843..2272eaa7e0e3306201e5e32226a0115f // We are experiencing what appear to be memory-stomp issues in the GPU // process. These issues seem to be impacting the task executor and listeners // registered to it. Create the task executor on the heap to guard against -@@ -381,7 +385,6 @@ int GpuMain(MainFunctionParams parameters) { +@@ -380,7 +384,6 @@ int GpuMain(MainFunctionParams parameters) { #endif const bool dead_on_arrival = !init_success; diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 51640b10b8..3af491886b 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index 8077ed85e45e56d6cccb691223216c1f6a94b5ee..dd4cee346f16df703d414bf206bbe6c9 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 79cc9552a5504b7fce8f8bf31b1cb2833b8cf1ef..9bcc65dd9017980e7846378dd0b6311f72d0909b 100644 +index 3bb9a589b1a8b90c5f70e556f44232911eb62d3a..4d2788bf2795326e7094a24fc9551cad9fcebc90 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4755,6 +4755,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4754,6 +4754,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -79,10 +79,10 @@ index 851e792c6c6f26b6074ffe8b0ba39a5813fabacc..8bd06f4c155cc0ed8afaf89347f9fc97 if (World().IsMainWorld()) { probe::DidCreateMainWorldContext(GetFrame()); diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h -index af2f7ec68180f69c2b39e674649e8b02dc3db77d..98f9870b985bc6eb889d6e76c021d10fcbf5892a 100644 +index 47dd48bd495f89f2dd3528053d9b6446df264c7c..ee43008b2bec7ea013cbbe7a782aa0a38e1acd02 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -308,6 +308,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -311,6 +311,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -92,10 +92,10 @@ index af2f7ec68180f69c2b39e674649e8b02dc3db77d..98f9870b985bc6eb889d6e76c021d10f 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 280505288771b91f4b14597413f6241783979832..e7a528015ce97b357f9308f4b33b533a8ee9152d 100644 +index 294c9ec4bfb788235be8047eb3174d7dcc97bdfb..6ab8ec1924a76f51d6e390d9457c596f9b0d8453 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 -@@ -300,6 +300,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( +@@ -301,6 +301,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( } } @@ -110,7 +110,7 @@ index 280505288771b91f4b14597413f6241783979832..e7a528015ce97b357f9308f4b33b533a 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 c828e48b93ac7e57343c178650293cba853c6cba..ca3b04c157275bcddf4bdd237004b5c60fc1853c 100644 +index e7b822d45d608a78009576c2a299201014dd93ec..54be144d5b24b369e12d551e6c15d2d85fa8b8c3 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 @@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -123,10 +123,10 @@ index c828e48b93ac7e57343c178650293cba853c6cba..ca3b04c157275bcddf4bdd237004b5c6 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 8b348b886bf912838903efcc007a560b6d3c20c1..1235c9d51d09b715296d8ae8072d3c99622e1bfd 100644 +index 00427a65059e03a3b5733de7e9fd061aa91da95c..cb14cd270c69ee9ec20ea2e52a968d9dd721182e 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -426,6 +426,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -430,6 +430,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/add_electron_deps_to_license_credits_file.patch b/patches/chromium/add_electron_deps_to_license_credits_file.patch index 968bcd24bd..c9775444cd 100644 --- a/patches/chromium/add_electron_deps_to_license_credits_file.patch +++ b/patches/chromium/add_electron_deps_to_license_credits_file.patch @@ -7,7 +7,7 @@ Ensure that licenses for the dependencies introduced by Electron are included in `LICENSES.chromium.html` diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py -index 7f22f02d2bc80abdb3be5191d55a1a6d00d1d0a7..8989fde2a7416100f238b0350fb7daf6e3944a70 100755 +index f87d1ffc90ba5bd6da87a90c6dd904c01ae42e23..9987b33124cfec689502f991b92c0b05d0433106 100755 --- a/tools/licenses/licenses.py +++ b/tools/licenses/licenses.py @@ -355,6 +355,31 @@ SPECIAL_CASES = { diff --git a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch index a7f762497c..3619a75e73 100644 --- a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch +++ b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch @@ -8,7 +8,7 @@ was removed as part of the Raw Clipboard API scrubbing. https://bugs.chromium.org/p/chromium/issues/detail?id=1217643 diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc -index e104f4d7814b6f6a0e1f5cf49ae24d5571e30fb1..cc7e9064b21f8f2c45690454805901c0c56e2aa1 100644 +index bafc8421e14071a926a48bee1958a44d266a9a0b..4463080e08f7a0635ef240794deae1ea8d90e148 100644 --- a/ui/base/clipboard/scoped_clipboard_writer.cc +++ b/ui/base/clipboard/scoped_clipboard_writer.cc @@ -244,6 +244,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format, diff --git a/patches/chromium/adjust_accessibility_ui_for_electron.patch b/patches/chromium/adjust_accessibility_ui_for_electron.patch index 5a517f6b54..44c99b6a49 100644 --- a/patches/chromium/adjust_accessibility_ui_for_electron.patch +++ b/patches/chromium/adjust_accessibility_ui_for_electron.patch @@ -10,7 +10,7 @@ usage of BrowserList and Browser as we subclass related methods and use our WindowList. diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc -index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3b33c3777 100644 +index 9b22efa07e43b60a8bd8bb6288792846709fae87..cf60a541720ffbcdaa5163d727a7761dcb30f131 100644 --- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc +++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc @@ -48,6 +48,7 @@ @@ -21,19 +21,19 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3 #include "ui/accessibility/accessibility_features.h" #include "ui/accessibility/ax_mode.h" #include "ui/accessibility/ax_updates_and_events.h" -@@ -179,7 +180,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) { +@@ -179,7 +180,7 @@ base::DictValue BuildTargetDescriptor(content::RenderViewHost* rvh) { rvh->GetRoutingID(), accessibility_mode); } -#if !BUILDFLAG(IS_ANDROID) +#if 0 - base::Value::Dict BuildTargetDescriptor(BrowserWindowInterface* browser) { - base::Value::Dict target_data; + base::DictValue BuildTargetDescriptor(BrowserWindowInterface* browser) { + base::DictValue target_data; target_data.Set(kSessionIdField, browser->GetSessionID().id()); @@ -226,7 +227,7 @@ void HandleAccessibilityRequestCallback( auto& browser_accessibility_state = *content::BrowserAccessibilityState::GetInstance(); - base::Value::Dict data; + base::DictValue data; - PrefService* pref = Profile::FromBrowserContext(current_context)->GetPrefs(); + PrefService* pref = static_cast(current_context)->prefs(); ui::AXMode mode = browser_accessibility_state.GetAccessibilityMode(); @@ -51,7 +51,7 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3 @@ -355,13 +356,13 @@ void HandleAccessibilityRequestCallback( data.Set(kPagesField, std::move(page_list)); - base::Value::List browser_list; + base::ListValue browser_list; -#if !BUILDFLAG(IS_ANDROID) +#if 0 ForEachCurrentBrowserWindowInterfaceOrderedByActivation( @@ -64,7 +64,7 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3 data.Set(kBrowsersField, std::move(browser_list)); #if BUILDFLAG(IS_WIN) -@@ -848,7 +849,8 @@ void AccessibilityUIMessageHandler::SetGlobalString( +@@ -847,7 +848,8 @@ void AccessibilityUIMessageHandler::SetGlobalString( const std::string value = CheckJSValue(data.FindString(kValueField)); if (string_name == kApiTypeField) { @@ -74,7 +74,7 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3 pref->SetString(prefs::kShownAccessibilityApiType, value); } } -@@ -902,7 +904,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( +@@ -901,7 +903,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -84,7 +84,7 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3 ui::AXApiType::Type api_type = ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType)); std::string accessibility_contents = -@@ -922,7 +925,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -921,7 +924,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( AllowJavascript(); @@ -93,16 +93,16 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3 std::vector property_filters; AddPropertyFilters(property_filters, allow, AXPropertyFilter::ALLOW); AddPropertyFilters(property_filters, allow_empty, -@@ -949,7 +952,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -948,7 +951,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( if (found) { return; } -#endif // !BUILDFLAG(IS_ANDROID) +#endif // No browser with the specified |session_id| was found. - base::Value::Dict result; + base::DictValue result; result.Set(kSessionIdField, session_id); -@@ -992,11 +995,13 @@ void AccessibilityUIMessageHandler::StopRecording( +@@ -991,11 +994,13 @@ void AccessibilityUIMessageHandler::StopRecording( } ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() { @@ -119,7 +119,7 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3 // Check to see if it is in the supported types list. if (std::find(supported_types.begin(), supported_types.end(), api_type) == supported_types.end()) { -@@ -1066,10 +1071,13 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( +@@ -1065,10 +1070,13 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( // static void AccessibilityUIMessageHandler::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { @@ -127,14 +127,14 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3 const std::string_view default_api_type = std::string_view(ui::AXApiType::Type(ui::AXApiType::kBlink)); registry->RegisterStringPref(prefs::kShownAccessibilityApiType, - std::string(default_api_type)); + default_api_type); + registry->RegisterBooleanPref(prefs::kShowInternalAccessibilityTree, false); +#endif } void AccessibilityUIMessageHandler::OnVisibilityChanged( diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.h b/chrome/browser/ui/webui/accessibility/accessibility_ui.h -index 4b9d7df73c901c57c14693e9f24a51694ecd375f..93e1c9a79d88c8b4c57b244c9eec1e83c1d1fa0a 100644 +index 67f7e34271994ff66da2a3c3b90c2f02797c2d14..8f786bc00dc4a7cc775ca3ff3fca4da680272682 100644 --- a/chrome/browser/ui/webui/accessibility/accessibility_ui.h +++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.h @@ -28,6 +28,8 @@ namespace content { @@ -152,6 +152,6 @@ index 4b9d7df73c901c57c14693e9f24a51694ecd375f..93e1c9a79d88c8b4c57b244c9eec1e83 private: + friend class ElectronAccessibilityUIMessageHandler; + - void ToggleAccessibilityForWebContents(const base::Value::List& args); - void SetGlobalFlag(const base::Value::List& args); - void SetGlobalString(const base::Value::List& args); + void ToggleAccessibilityForWebContents(const base::ListValue& args); + void SetGlobalFlag(const base::ListValue& args); + void SetGlobalString(const base::ListValue& args); 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 8b899e874a..b4b6712adf 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc -index 14e6fd9b6d20fa18fc5b558f9a7bbf76f9fd4059..b12ce72835b2acd9099a4fad4308b5eee7963635 100644 +index e74b8674d5cec49a510948b97f6e8b790c57e864..8f4f3787fc590fe6e4378546a656a8d51ae965a0 100644 --- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc +++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc @@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast { @@ -116,10 +116,10 @@ index 932658273154ef2e022358e493a8e7c00c86e732..57bbfb5cde62c9496c351c861880a189 // 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 e47f324d52c0837eff24c592da0c51f0aaf47565..3642fb358bc92dcf523b589ac5fe07c877f3a221 100644 +index 71d165e99309bc632b8abc707f6b8695bc8a88a0..6aae8ee3c34d11ee927822f54e76f8e136b6faf9 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -2530,6 +2530,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( +@@ -2531,6 +2531,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal", "old_state", old_state, "new_state", new_state); @@ -130,7 +130,7 @@ index e47f324d52c0837eff24c592da0c51f0aaf47565..3642fb358bc92dcf523b589ac5fe07c8 bool storing_in_bfcache = new_state->is_in_back_forward_cache && !old_state->is_in_back_forward_cache; bool restoring_from_bfcache = !new_state->is_in_back_forward_cache && -@@ -4165,10 +4169,23 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -4193,10 +4197,23 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -155,7 +155,7 @@ index e47f324d52c0837eff24c592da0c51f0aaf47565..3642fb358bc92dcf523b589ac5fe07c8 // Do not throttle if the page should be painting. bool is_visible = diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h -index e55ac3fc72ce5b4acebaa6705c6f7080f0ac8fd4..ff27ea4dc50d163aaa22513907960950a080353a 100644 +index 21d84d57e83dedbab658c25e87ac7c469db778d0..dae614e1badff16d581b559245da80bbb220cf59 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h @@ -445,6 +445,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -166,7 +166,7 @@ index e55ac3fc72ce5b4acebaa6705c6f7080f0ac8fd4..ff27ea4dc50d163aaa22513907960950 void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -953,6 +954,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -959,6 +960,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_new_privileges_in_unsandboxed_child_processes.patch b/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch index b0e5046d84..f8f08212c1 100644 --- a/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch +++ b/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch @@ -6,10 +6,10 @@ Subject: allow new privileges in unsandboxed child processes This allows unsandboxed child process to launch setuid processes on Linux. diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc -index 75cafbe0dbd7d4b3dca4c8fe56e17cd836123588..8f551374e1ffc729081f7d50e73671313c641bb6 100644 +index b6f5667c86c3e74807728aa2dbb61fee87e6156a..492a0822181aebbede38f7783a457b820ce4f8d1 100644 --- a/content/browser/child_process_launcher_helper_linux.cc +++ b/content/browser/child_process_launcher_helper_linux.cc -@@ -64,6 +64,15 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( +@@ -65,6 +65,15 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( options->fds_to_remap.emplace_back(sandbox_fd, GetSandboxFD()); } diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 3820632c66..c574a3da2a 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -49,10 +49,10 @@ index ac5d88520a785e12b66ebd96c92c46319a08311c..5c582e4f249c28a5739da2da4e600ee2 // 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 85bb570db1d2d4fafa8d5ac449122225965b425a..d39312542b93c4c5eaf4580c2a8d20290cf82a89 100644 +index b44d08b5d44830e38b87e15e6a8e3a1a09ac9b79..ed1bc8e58a982091dd00134b4915ddc758bfe507 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -768,10 +768,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -778,10 +778,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index 85bb570db1d2d4fafa8d5ac449122225965b425a..d39312542b93c4c5eaf4580c2a8d2029 if (!Client()) return false; -@@ -828,6 +824,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -838,6 +834,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch b/patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch index 747cb64e5c..41ccbc52e5 100644 --- a/patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch +++ b/patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch @@ -10,10 +10,10 @@ Needed for: 2) //electron/shell/common:web_contents_utility diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn -index c4c12588a21bdb5502dd3c3ffec358278b802e34..85628d8898087895120575af6fc9e26e82e10f45 100644 +index afa85a15f8064b6a1b3f3ddd34797f0008af94d1..51946114bfd1564e4e5352ecae934a5d89b4ce03 100644 --- a/content/public/common/BUILD.gn +++ b/content/public/common/BUILD.gn -@@ -362,6 +362,8 @@ mojom("interfaces") { +@@ -358,6 +358,8 @@ mojom("interfaces") { "//content/common/*", "//extensions/common:mojom", "//extensions/common:mojom_blink", 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 4c7a28e8f8..bb936f12b8 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 f21010994e7e554c63f1bf24d5c09e9904e97bc9..ac151bbddafc76b92af9a7bce56bb405afb5b389 100644 +index 4a742db71f62f9ac891ceeb0604ca0b99d1d89c1..2c5af6482e2b6905552a05b16d3df0a400e96582 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -196,11 +196,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index f21010994e7e554c63f1bf24d5c09e9904e97bc9..ac151bbddafc76b92af9a7bce56bb405 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 996beedb7437f42b33ec5458d69403478e7840a5..464b75de67b41f3a947af2cb885e1aada0f5869d 100644 +index 487a055090691fb015465144e6e703cde846adf5..c75d7e336ad00230c2a7852f62c69b8f0cae748d 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4769,7 +4769,7 @@ static_library("browser") { +@@ -4746,7 +4746,7 @@ static_library("browser") { ] } @@ -46,10 +46,10 @@ index 996beedb7437f42b33ec5458d69403478e7840a5..464b75de67b41f3a947af2cb885e1aad # than here in :chrome_dll. deps += [ "//chrome:packed_resources_integrity_header" ] diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 78b828817d717e277daf2824b93da7538015cdfa..f09ea3eff2d1c5661b9d87a66d9920d9edced7a6 100644 +index 66e2d12af77a88806a194ac5e5a986ae246e19dd..f2e53a896d6567408c4fe12bf36ecdaebdb7f384 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -7666,9 +7666,12 @@ test("unit_tests") { +@@ -7712,9 +7712,12 @@ test("unit_tests") { "//chrome/notification_helper", ] @@ -63,7 +63,7 @@ index 78b828817d717e277daf2824b93da7538015cdfa..f09ea3eff2d1c5661b9d87a66d9920d9 "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/app:win_unit_tests", -@@ -8632,6 +8635,10 @@ test("unit_tests") { +@@ -8681,6 +8684,10 @@ test("unit_tests") { "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc", ] @@ -74,7 +74,7 @@ index 78b828817d717e277daf2824b93da7538015cdfa..f09ea3eff2d1c5661b9d87a66d9920d9 sources += [ # The importer code is not used on Android. "../common/importer/firefox_importer_utils_unittest.cc", -@@ -8689,7 +8696,6 @@ test("unit_tests") { +@@ -8738,7 +8745,6 @@ test("unit_tests") { # TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above? deps += [ "../browser/screen_ai:screen_ai_install_state", diff --git a/patches/chromium/build_gn.patch b/patches/chromium/build_gn.patch index 9e3ead05e2..5b88311547 100644 --- a/patches/chromium/build_gn.patch +++ b/patches/chromium/build_gn.patch @@ -7,7 +7,7 @@ These are variables we add to the root BUILDCONFIG so that they're available everywhere, without having to import("//electron/.../flags.gni"). diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index 4174baa9c0e39b517ade66aab07123eaf9b58e47..9601a32e3b763bb6b84727be509f51326fa08233 100644 +index b5dca4a24f63813a230655df433105039513974d..94065bca4c3a60c10ff4c54d8d4fdbe64c29cf75 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -123,6 +123,9 @@ if (current_os == "") { diff --git a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch index 038970d913..fd989a3c2d 100644 --- a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch +++ b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch @@ -3,15 +3,22 @@ From: Charles Kerr Date: Tue, 22 Mar 2022 16:24:44 -0500 Subject: build: make libcxx_abi_unstable false for electron -https://nornagon.medium.com/a-libc-odyssey-973e51649063 +The libc++ C++ standard library uses ABI versioning to control binary +compatibility. ABI version 2 (Chromium's default) enables various +optimizations that break compatibility with system libc++, while ABI +version 1 maintains compatibility needed for native Node.js modules. -See also https://github.com/electron/electron/issues/45810#issuecomment-2691417213. +References: +* https://nornagon.medium.com/a-libc-odyssey-973e51649063 +* https://github.com/electron/electron/issues/45810#issuecomment-2691417213. +* https://libcxx.llvm.org/ABIGuarantees.html +* third_party/libc++/src/include/__configuration/abi.h diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site -index 3cd0af88fd13613216464d31d04e26dbb8f61343..6335536338e1eba8b56055eee31910ecba6a65c4 100644 +index 3cd0af88fd13613216464d31d04e26dbb8f61343..218cfaf258ebc55e4d332c67abd02b5b1ad2ba19 100644 --- a/buildtools/third_party/libc++/__config_site +++ b/buildtools/third_party/libc++/__config_site -@@ -18,7 +18,9 @@ +@@ -18,7 +18,11 @@ // _LIBCPP_ABI_NAMESPACE to a shorter value. #define _LIBCPP_ABI_NAMESPACE __Cr @@ -19,6 +26,8 @@ index 3cd0af88fd13613216464d31d04e26dbb8f61343..6335536338e1eba8b56055eee31910ec +#define _LIBCPP_ABI_VERSION 1 +#define _LIBCPP_ABI_USE_WRAP_ITER_IN_STD_ARRAY +#define _LIBCPP_ABI_USE_WRAP_ITER_IN_STD_STRING_VIEW ++#define _LIBCPP_ABI_TRIVIALLY_COPYABLE_BIT_ITERATOR ++#define _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL #define _LIBCPP_ABI_FORCE_ITANIUM 0 #define _LIBCPP_ABI_FORCE_MICROSOFT 0 diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index ab4637101f..1107e60b70 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 7b8b10f561b9e9b1fe480f0dbdfcabbe795745e2..528b2ef70453b904c630fd657e8dffff8c7c642d 100644 +index 4ea4d47084d39f0a165a3a2948ab3ed291f01c47..f7eaca99d21f707e9e139e65bf7c69c6359cece3 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -9981,6 +9981,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -10003,6 +10003,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 7b8b10f561b9e9b1fe480f0dbdfcabbe795745e2..528b2ef70453b904c630fd657e8dffff &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 75ce3e0027b111c7e29d4c602521512dbf6b68ac..2138c00b6e732dc826df07ac66fd7f8e62fffd0c 100644 +index 99ef8c6adf68ee069bb38cf7552c28c5da367cb8..ca53ad6537e317dade06332b07bf9c0fe1fc00eb 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5346,6 +5346,10 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5351,6 +5351,10 @@ FrameTree* WebContentsImpl::CreateNewWindow( create_params.initially_hidden = renderer_started_hidden; create_params.initial_popup_url = params.target_url; @@ -35,7 +35,7 @@ index 75ce3e0027b111c7e29d4c602521512dbf6b68ac..2138c00b6e732dc826df07ac66fd7f8e // Even though all codepaths leading here are in response to a renderer // trying to open a new window, if the new window ends up in a different // browsing instance, then the RenderViewHost, RenderWidgetHost, -@@ -5398,6 +5402,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5403,6 +5407,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( // Sets the newly created WebContents WindowOpenDisposition. new_contents_impl->original_window_open_disposition_ = params.disposition; @@ -48,7 +48,7 @@ index 75ce3e0027b111c7e29d4c602521512dbf6b68ac..2138c00b6e732dc826df07ac66fd7f8e // If the new frame has a name, make sure any SiteInstances that can find // this named frame have proxies for it. Must be called after // SetSessionStorageNamespace, since this calls CreateRenderView, which uses -@@ -5439,12 +5449,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5444,12 +5454,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -62,10 +62,10 @@ index 75ce3e0027b111c7e29d4c602521512dbf6b68ac..2138c00b6e732dc826df07ac66fd7f8e 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 4c55f0abf8df5a3408f3f90d444ceff3c23ee1bc..72bdb5b5a4c2c21a7192b34bb293bd23bafaf50c 100644 +index ecfe129905639e9b7a5ed973017539cfaec9c2af..39308fa42e57b2dfba91aaa6f33d1a0bea3273ae 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -648,6 +648,10 @@ struct CreateNewWindowParams { +@@ -651,6 +651,10 @@ struct CreateNewWindowParams { pending_associated_remote widget; pending_associated_receiver frame_widget_host; pending_associated_remote frame_widget; @@ -77,10 +77,10 @@ index 4c55f0abf8df5a3408f3f90d444ceff3c23ee1bc..72bdb5b5a4c2c21a7192b34bb293bd23 // 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 f40acd79dd69dffa922ecf147a19ff658f6f26c9..57f55937e634d2988d86b1cca95f3f056e518f32 100644 +index 27785c7f58d13a57d64c7373547f2c1b5071c4e9..dde4648c5315ba8295e95d3335425ca12d7a5285 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -872,6 +872,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -868,6 +868,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -90,7 +90,7 @@ index f40acd79dd69dffa922ecf147a19ff658f6f26c9..57f55937e634d2988d86b1cca95f3f05 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 84cafee582dee5d49e1b95d7b90e838dbdf86c8a..ef0171853547a4172f2bd933abb043963923390b 100644 +index 264bc115b437987e038b44e6e884c375db841aa0..5280ea840a979dc2cd9d77fae9c2cfbb10105f4a 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -205,6 +205,7 @@ class NetworkService; @@ -101,7 +101,7 @@ index 84cafee582dee5d49e1b95d7b90e838dbdf86c8a..ef0171853547a4172f2bd933abb04396 } // namespace network namespace sandbox { -@@ -1456,6 +1457,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1450,6 +1451,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -170,12 +170,12 @@ index 6a72c7925222ed8a11830b68718d7973629a6d2c..a6f0447b6ede476162f555d951f346b0 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index f0103098d2f4d1915d8c8f3481fe077ae562edbb..79cc9552a5504b7fce8f8bf31b1cb2833b8cf1ef 100644 +index 1981118e714a0360b38f1bee7f81dbab20c48341..3bb9a589b1a8b90c5f70e556f44232911eb62d3a 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -6826,6 +6826,10 @@ WebView* RenderFrameImpl::CreateNewWindow( - request.HasUserGesture(), GetWebFrame()->IsAdFrame(), - GetWebFrame()->IsAdScriptInStack()); +@@ -6846,6 +6846,10 @@ WebView* RenderFrameImpl::CreateNewWindow( + params->started_by_ad = + GetWebFrame()->IsAdFrame() || GetWebFrame()->IsAdScriptInStack(); + params->raw_features = features.raw_features.Utf8( + WebString::UTF8ConversionMode::kStrictReplacingErrorsWithFFFD); @@ -224,7 +224,7 @@ index d92bab531c12c62a5321a23f4a0cb89691668127..2060e04795ba8e7a923fd0fe3485b8c5 } // 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 fdd1d6e1ee68b824df2de6e0ba97669151cf63d9..da2a47bdb8f78abfe37b845e1c3751806df3acba 100644 +index c425735d53a8a79c9ce20c049506659c17b51be3..0c652f899781138cc177460a949280606ebd059f 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc @@ -2335,6 +2335,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, diff --git a/patches/chromium/chore_expose_isolate_parameter_in_script_lifecycle_observers.patch b/patches/chromium/chore_expose_isolate_parameter_in_script_lifecycle_observers.patch index 8346f821fa..50cdd2ba54 100644 --- a/patches/chromium/chore_expose_isolate_parameter_in_script_lifecycle_observers.patch +++ b/patches/chromium/chore_expose_isolate_parameter_in_script_lifecycle_observers.patch @@ -34,10 +34,10 @@ index dd4cee346f16df703d414bf206bbe6c9f4b1f796..5565f5a9259bd7da0722080bf01b3415 virtual void DidClearWindowObject() {} virtual void DidChangeScrollOffset() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 9bcc65dd9017980e7846378dd0b6311f72d0909b..d3000974f71cf6fbb4b4015c938e7f301e656b02 100644 +index 4d2788bf2795326e7094a24fc9551cad9fcebc90..1b560c64976b184ec86be25bc6949bb9141cc44f 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4761,10 +4761,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures( +@@ -4760,10 +4760,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures( observer.DidInstallConditionalFeatures(context, world_id); } @@ -103,7 +103,7 @@ index 8482d7fab12634e6b9a8d5f9bab6c7e428bb99ee..4f131fbfc9350352bce4430f92b9f2cf void WillInitializeWorkerContext() override; void WillDestroyWorkerContext(v8::Local context) override; diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc -index 39166de2b27c44a4502a89a3b175eebbec8ee0e9..33ae3f465865aecfcb7d3b0244d57ad2838cea12 100644 +index 095ba031a645e9972e831d60880bcae98d7b5cd5..ef7b9416f6c2afcecb987b59c17cc0763a61730c 100644 --- a/extensions/renderer/dispatcher.cc +++ b/extensions/renderer/dispatcher.cc @@ -614,6 +614,7 @@ void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( @@ -115,7 +115,7 @@ index 39166de2b27c44a4502a89a3b175eebbec8ee0e9..33ae3f465865aecfcb7d3b0244d57ad2 int64_t service_worker_version_id, const GURL& service_worker_scope, diff --git a/extensions/renderer/dispatcher.h b/extensions/renderer/dispatcher.h -index 9d4c74b7996e2e573079413cd24a99f86dd5b90f..241c012f1a7434944dc5ea6cad8a8c9988b069b2 100644 +index f5786a8e321d08b9e1cd008f797d5a4bcac791db..9e71d645ac1cb5c52a102f9f4ab539715b30d546 100644 --- a/extensions/renderer/dispatcher.h +++ b/extensions/renderer/dispatcher.h @@ -151,6 +151,7 @@ class Dispatcher : public content::RenderThreadObserver, @@ -127,10 +127,10 @@ index 9d4c74b7996e2e573079413cd24a99f86dd5b90f..241c012f1a7434944dc5ea6cad8a8c99 int64_t service_worker_version_id, const GURL& service_worker_scope, diff --git a/extensions/renderer/extension_frame_helper.cc b/extensions/renderer/extension_frame_helper.cc -index c89ea22fcd36a9fef2ce8a83ffc46d3358630e90..6c14424384832b5ed193a08c46a0addb27e54244 100644 +index 89515878024756de8263622e054e50a9ad284232..f1e94fd2583d18641ab91d9d598ad94a4fd607e0 100644 --- a/extensions/renderer/extension_frame_helper.cc +++ b/extensions/renderer/extension_frame_helper.cc -@@ -439,6 +439,7 @@ void ExtensionFrameHelper::DidCreateScriptContext( +@@ -450,6 +450,7 @@ void ExtensionFrameHelper::DidCreateScriptContext( } void ExtensionFrameHelper::WillReleaseScriptContext( @@ -139,10 +139,10 @@ index c89ea22fcd36a9fef2ce8a83ffc46d3358630e90..6c14424384832b5ed193a08c46a0addb int32_t world_id) { extension_dispatcher_->WillReleaseScriptContext( diff --git a/extensions/renderer/extension_frame_helper.h b/extensions/renderer/extension_frame_helper.h -index e16f370211ba014f778e7b9021b83988a5d27661..a79b20fe95050d6e92615711988384deea3fa1e0 100644 +index 6a54b76669f497fae7d8808c7fd873dc833db1cb..eee92c9b2cf71df397d377f72dd87eff9fc35c32 100644 --- a/extensions/renderer/extension_frame_helper.h +++ b/extensions/renderer/extension_frame_helper.h -@@ -188,7 +188,8 @@ class ExtensionFrameHelper +@@ -197,7 +197,8 @@ class ExtensionFrameHelper blink::WebDocumentLoader* document_loader) override; void DidCreateScriptContext(v8::Local, int32_t world_id) override; @@ -200,10 +200,10 @@ index 8bd06f4c155cc0ed8afaf89347f9fc9728bb1e41..85ae42670cc038e18e4a0ea05e3de25c ->ContextWillBeDestroyed(script_state_); if (next_status == Lifecycle::kV8MemoryIsForciblyPurged || 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 98f9870b985bc6eb889d6e76c021d10fcbf5892a..dd4e9908f51e08bdc546d2248b70b4c78f4c2ebc 100644 +index ee43008b2bec7ea013cbbe7a782aa0a38e1acd02..2352aeaad71be960729e74305ed665583b15ed70 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -310,7 +310,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -313,7 +313,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { int32_t world_id) = 0; virtual void DidInstallConditionalFeatures(v8::Local, int32_t world_id) = 0; @@ -214,10 +214,10 @@ index 98f9870b985bc6eb889d6e76c021d10fcbf5892a..dd4e9908f51e08bdc546d2248b70b4c7 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 e7a528015ce97b357f9308f4b33b533a8ee9152d..4bc9b7ede3aa2af867146d9ec98b01359d00f638 100644 +index 6ab8ec1924a76f51d6e390d9457c596f9b0d8453..42f6281a44de055e964acbfbf20041ffa1fca592 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 -@@ -308,10 +308,11 @@ void LocalFrameClientImpl::DidInstallConditionalFeatures( +@@ -309,10 +309,11 @@ void LocalFrameClientImpl::DidInstallConditionalFeatures( } void LocalFrameClientImpl::WillReleaseScriptContext( @@ -231,7 +231,7 @@ index e7a528015ce97b357f9308f4b33b533a8ee9152d..4bc9b7ede3aa2af867146d9ec98b0135 } 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 ca3b04c157275bcddf4bdd237004b5c60fc1853c..19d9c726e4e2ab2dc9ff2102c1087c312fd55183 100644 +index 54be144d5b24b369e12d551e6c15d2d85fa8b8c3..0ddb1e0730618bba73e54c2618930355fcf6dc19 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 @@ -82,7 +82,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -245,10 +245,10 @@ index ca3b04c157275bcddf4bdd237004b5c60fc1853c..19d9c726e4e2ab2dc9ff2102c1087c31 // Returns true if we should allow register V8 extensions to be added. diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h -index 1235c9d51d09b715296d8ae8072d3c99622e1bfd..915de939cb4e8a5d42c17a39861b4de35b4c58b1 100644 +index cb14cd270c69ee9ec20ea2e52a968d9dd721182e..7a3d983758896cbc58ff68adb33d1ebebf8a5404 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -428,7 +428,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -432,7 +432,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { int32_t world_id) override {} void DidInstallConditionalFeatures(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch b/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch index 94f33ac4eb..1cf44ff8b0 100644 --- a/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch +++ b/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch @@ -10,10 +10,10 @@ Subject: chore: "grandfather in" Electron Views and Delegates 6448510: Lock further access to View::set_owned_by_client(). | https://chromium-review.googlesource.com/c/chromium/src/+/6448510 diff --git a/ui/views/view.h b/ui/views/view.h -index b7d13fff1f53e2ce3e53d2d5e97a442627962cd8..295249a582c77b70abf78313439b0100fed0c2ce 100644 +index 193a954ccae57abbd9f977d542ef9a931e9ce77b..60da3226347167470f562fbc0a5ed5f633a47ea6 100644 --- a/ui/views/view.h +++ b/ui/views/view.h -@@ -77,6 +77,19 @@ class ArcNotificationContentView; +@@ -78,6 +78,19 @@ class ArcNotificationContentView; class WideFrameView; } // namespace ash @@ -33,7 +33,7 @@ index b7d13fff1f53e2ce3e53d2d5e97a442627962cd8..295249a582c77b70abf78313439b0100 namespace exo { class ShellSurfaceBase; } -@@ -308,6 +321,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, +@@ -309,6 +322,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, public: class OwnedByClientPassKey { private: diff --git a/patches/chromium/chore_modify_chromium_handling_of_mouse_events.patch b/patches/chromium/chore_modify_chromium_handling_of_mouse_events.patch index 2969c9258c..2776a1d35c 100644 --- a/patches/chromium/chore_modify_chromium_handling_of_mouse_events.patch +++ b/patches/chromium/chore_modify_chromium_handling_of_mouse_events.patch @@ -34,10 +34,10 @@ index cc3f9bc9383f8272a5cd95b1f2ac56529d86e493..5ca29b84cdaf42ef516ef819ae32b230 class ScrollEvent; 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 b2f7bbc51484d8db4c69de05d36398866b170721..b37df4100eac1263f874dc5bff9e29eea64c1c0a 100644 +index 1e0c7aa8a17ca62eda9bee3444668e032a1c928f..8fe4ef2a5699fdf1a895a2981f5cc7312070fbc2 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 -@@ -1378,6 +1378,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() { +@@ -1380,6 +1380,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() { return background_paint_brush_; } @@ -61,10 +61,10 @@ index b65ced55f997d5064b9d9338190567f8c264fce8..e8acd2828ed05deefa335ce2bb461f0c Widget* GetWidget(); const Widget* GetWidget() const; diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 196a4bd514ac8cfb071f6b6211221cd8465bd725..5bf619a30b7ae95c0369f472e4062b93199c3716 100644 +index 180fe676748d9f4b2ad5e26c7e35ee14c8a79f11..bbefa1324800849b389efbe487ad6631615327e7 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3271,15 +3271,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3281,15 +3281,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, } // We must let Windows handle the caption buttons if it's drawing them, or // they won't work. @@ -86,7 +86,7 @@ index 196a4bd514ac8cfb071f6b6211221cd8465bd725..5bf619a30b7ae95c0369f472e4062b93 return 0; } } -@@ -3302,6 +3306,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3312,6 +3316,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, // handle alt-space, or in the frame itself. is_right_mouse_pressed_on_caption_ = false; ReleaseCapture(); @@ -94,7 +94,7 @@ index 196a4bd514ac8cfb071f6b6211221cd8465bd725..5bf619a30b7ae95c0369f472e4062b93 // |point| is in window coordinates, but WM_NCHITTEST and TrackPopupMenu() // expect screen coordinates. POINT screen_point = CR_POINT_INITIALIZER_FROM_LPARAM(l_param); -@@ -3309,7 +3314,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3319,7 +3324,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, w_param = static_cast(SendMessage( hwnd(), WM_NCHITTEST, 0, MAKELPARAM(screen_point.x, screen_point.y))); if (w_param == HTCAPTION || w_param == HTSYSMENU) { diff --git a/patches/chromium/chore_partial_revert_of.patch b/patches/chromium/chore_partial_revert_of.patch index 4a19eebe30..1d3d1fe1eb 100644 --- a/patches/chromium/chore_partial_revert_of.patch +++ b/patches/chromium/chore_partial_revert_of.patch @@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it by changing something in Electron. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index aa42c0a3815cb28387ee57dcfe1fc30a7b6500f1..fc5c7782035bb4d0b9d673cb125062f47cd98a14 100644 +index 4b5c7b2f8ea61dc156b6136991f25b91190fd4e6..4c951d0326500e68a2644b7917ce6b87ee54c39e 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5317,7 +5317,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5322,7 +5322,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( : IsGuest(); // While some guest types do not have a guest SiteInstance, the ones that // don't all override WebContents creation above. diff --git a/patches/chromium/chore_patch_out_profile_methods.patch b/patches/chromium/chore_patch_out_profile_methods.patch index 8bd3c5c707..7ac5183b4e 100644 --- a/patches/chromium/chore_patch_out_profile_methods.patch +++ b/patches/chromium/chore_patch_out_profile_methods.patch @@ -43,7 +43,7 @@ index 21d5ab99800c0830cc31ec4ebb24e3f05cd904d8..3f8f514519d6e4a0abe3690f5df35de8 // When the enterprise policy is not set, use finch/feature flag choice. return base::FeatureList::IsEnabled(chrome_pdf::features::kPdfXfaSupport); diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc -index d7150c5f576f141cac2755c32dfb8e763675ff7b..ace4033f0257e3da62e7ebaf1a98b177c9e1e49b 100644 +index a5ca2bceacf0bdcb394d8730ac047dbd781b1ca3..93997149e0057ebd457f2bd4acbf917a00591142 100644 --- a/chrome/browser/pdf/pdf_extension_util.cc +++ b/chrome/browser/pdf/pdf_extension_util.cc @@ -248,10 +248,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) { @@ -100,7 +100,7 @@ index bc0bad82ebcdceadc505e912ff27202b452fefab..6b77c57fccc4619a1df3b4ed661d2bdd ProfileSelection ProfileSelections::GetProfileSelection( diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc -index c063b296c7ff808342e5437a53fbcef6d7534342..9f3329d098a74316ddc2f04d8d470674d756ceba 100644 +index cf9cf84da456314804083c902859a0965425479f..779bdd17641c1808ff2c707b3de5f6c9b331ca2d 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc @@ -20,8 +20,10 @@ diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index a5a89f358d..a36e62d654 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -35,7 +35,7 @@ index 231e3595f218aeebe28d0b13ce6182e7a4d6f4e1..609bd205d1cd0404cab3471765bef8b0 content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) final; diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc -index 7f99bf8c0c79de2cb8a812a7bfe8b4255697444a..d39aee929900cca756a6293b782a44228725f6fc 100644 +index 33edb0a90d886dd44956046e03fcc182a0f6bc8e..5b5edd3da3d9f7a248ea3affd195c36bfd64a38e 100644 --- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc +++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc @@ -80,8 +80,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate, @@ -80,10 +80,10 @@ index 39fa45f0a0f9076bd7ac0be6f455dd540a276512..3d0381d463eed73470b28085830f2a23 content::WebContents* source, const content::OpenURLParams& params, diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 6fc340e394bb6e7f757d4a0464589bd0d843371c..d3cf90a4a709138a7c99ca3cd7eebbd197456585 100644 +index a5deff46819dc2aee4ffb44a9b6aabcb3f65c528..9e3ce7b90d9254ecb4bd024ae62909825e3f38bc 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -2377,7 +2377,8 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -2351,7 +2351,8 @@ bool Browser::IsWebContentsCreationOverridden( content::mojom::WindowContainerType window_container_type, const GURL& opener_url, const std::string& frame_name, @@ -93,7 +93,7 @@ index 6fc340e394bb6e7f757d4a0464589bd0d843371c..d3cf90a4a709138a7c99ca3cd7eebbd1 if (HasActorTask(profile(), opener)) { // If an ExecutionEngine is acting on the opener, prevent it from creating a // new WebContents. We'll instead force the navigation to happen in the same -@@ -2390,7 +2391,7 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -2364,7 +2365,7 @@ bool Browser::IsWebContentsCreationOverridden( return (window_container_type == content::mojom::WindowContainerType::BACKGROUND && ShouldCreateBackgroundContents(source_site_instance, opener_url, @@ -103,10 +103,10 @@ index 6fc340e394bb6e7f757d4a0464589bd0d843371c..d3cf90a4a709138a7c99ca3cd7eebbd1 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 3bbf1f6bfcc654ee750862153e37fe2836b4514c..d8859df2113171bf7f2e86dce653e2d258961de3 100644 +index b5b72e04fbf0467107818a97c12ed6ac6e369dd7..63324d9384e3fd0c742aea083e9ea5d5ae6af7f1 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -936,8 +936,7 @@ class Browser : public TabStripModelObserver, +@@ -932,8 +932,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -145,7 +145,7 @@ index 3fc06be01f20e8cd314d95d73a3f58c2f0742fe9..c07910ae59a185442f37ea6e7b96fdf3 // The profile used for the presentation. raw_ptr otr_profile_; diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc -index 3bbd4e568ba99245622a96f0801d2b6cd203025f..1e0b7d16b33daed980961dd49c667a3b254c186f 100644 +index 592ac3bba77571d4bd2f08e43a6acaaeee59611f..2c7f23ef9cd474230a2a2a773c53bbeff169d2ab 100644 --- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc +++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc @@ -104,8 +104,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView { @@ -223,10 +223,10 @@ index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c5 content::WebContents* AddNewContents( content::WebContents* source, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 76855246e19933850dc5b79c65c816a2690dd229..a6197d7c8ec5e1c27c74372e478b87aadd7ba7a7 100644 +index 2890adbe64e95ffa53611f6616511628232c4570..e9bbc2b44544ba718ab7eabc5627ff03a1c211b4 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5282,8 +5282,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5287,8 +5287,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( opener, source_site_instance, params.window_container_type, @@ -265,7 +265,7 @@ index a6f0447b6ede476162f555d951f346b080e40be3..58f34bc33426136d2040f241f2cb5928 // Allow delegate to creates a custom WebContents when // WebContents::CreateNewWindow() is called. This function is only called diff --git a/extensions/browser/guest_view/app_view/app_view_guest.cc b/extensions/browser/guest_view/app_view/app_view_guest.cc -index af80323215e2cb6ff7bdb802f8da4bdbe0067f71..187816751bde435e9c622921c457873d4b3172cd 100644 +index 1c9720ba470c559b24d0605b5906e1eded998841..fc6fd8264e83d1dfc8409fbcd7ad81d4c918091a 100644 --- a/extensions/browser/guest_view/app_view/app_view_guest.cc +++ b/extensions/browser/guest_view/app_view/app_view_guest.cc @@ -153,8 +153,7 @@ bool AppViewGuest::IsWebContentsCreationOverridden( @@ -279,7 +279,7 @@ index af80323215e2cb6ff7bdb802f8da4bdbe0067f71..187816751bde435e9c622921c457873d return true; diff --git a/extensions/browser/guest_view/app_view/app_view_guest.h b/extensions/browser/guest_view/app_view/app_view_guest.h -index 7695578f626f2a0c7fefae2bc1d5c35e5ac154f2..78958bff12ce41ae5ad77f43279a4b35b9408a12 100644 +index 8c43b222e21277d6c8ebc07f8b2f0f23c2ad259c..1be43223eb9c2f4e2d877d6748d08d29c0b9c86a 100644 --- a/extensions/browser/guest_view/app_view/app_view_guest.h +++ b/extensions/browser/guest_view/app_view/app_view_guest.h @@ -10,6 +10,7 @@ @@ -301,10 +301,10 @@ index 7695578f626f2a0c7fefae2bc1d5c35e5ac154f2..78958bff12ce41ae5ad77f43279a4b35 content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc -index 0ab40dfd23d1071212c4d30d01fa8e7755458d4a..f032127a94c52beb3f509d6ea84c7e55f21084e2 100644 +index 77a96d11dd5ee2bae9d4de8057698ad04bad1167..442b2f83e3288fbfad7035ecbbe9d905f1117501 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc -@@ -263,8 +263,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( +@@ -261,8 +261,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -315,7 +315,7 @@ index 0ab40dfd23d1071212c4d30d01fa8e7755458d4a..f032127a94c52beb3f509d6ea84c7e55 // This method handles opening links from within the guest. Since this guest diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h -index 56d86e3d1179df2d5f34eb6216989aef2687f49f..236f3ccf8354b156737e03929ee538f99f1f4adf 100644 +index d86fc00d6c58a11ef2503d307a8b4416af866419..d469bf55fa6046acdda173e21331458512c1810b 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.h +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h @@ -74,8 +74,7 @@ class ExtensionOptionsGuest @@ -329,10 +329,10 @@ index 56d86e3d1179df2d5f34eb6216989aef2687f49f..236f3ccf8354b156737e03929ee538f9 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 23705fa50cf79865b68d8352f6ec72444ca5233e..efa5e78ed92464a6d47319f7b2087555d683bd8c 100644 +index 828b7cf7ef981dca939ea8842960176b6bfe8925..ecb0774145c35d11f9462c8394294d8b232291ff 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 -@@ -424,8 +424,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( +@@ -423,8 +423,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -343,7 +343,7 @@ index 23705fa50cf79865b68d8352f6ec72444ca5233e..efa5e78ed92464a6d47319f7b2087555 return true; 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 7eeffdfbda9611806c6f260f0c68f6d84689cb7e..5d8f6d132068d7fabaa52bc61354c71a8ac8cd20 100644 +index f6ca86c34c83b8bba4b73f5c0d8ed4bef39fd9b9..4bf187eabf9f923b779b4188e4d1f95b5877e694 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 @@ -187,8 +187,7 @@ class MimeHandlerViewGuest @@ -357,7 +357,7 @@ index 7eeffdfbda9611806c6f260f0c68f6d84689cb7e..5d8f6d132068d7fabaa52bc61354c71a content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc -index 8f212198f6542ce3d1c4843e2029b3c21bb3b368..a54b9a842badf38db25d0c79659ff7ff03cef3d2 100644 +index 3b50b6b3616ead57de44d309a306db09dce82c65..c709f13b7c0bac9f41cac745678aaee04c1caf46 100644 --- a/fuchsia_web/webengine/browser/frame_impl.cc +++ b/fuchsia_web/webengine/browser/frame_impl.cc @@ -585,8 +585,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( @@ -385,7 +385,7 @@ index 756d4192271d6a65cfe8e1511737c565b543cb1f..5688f6f745056565c3c01947f741c4d1 int opener_render_process_id, int opener_render_frame_id, diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc -index f45f822c20bfdc46cb0904ae01fa22ca1e024642..55660b44fb2e53d16c434bba40ffd031de20c021 100644 +index 3143e1c3bef99488c80f02e3a1fe4ab12acd854c..bb75971438348a0bcb3e4ed0658dc35567f20799 100644 --- a/headless/lib/browser/headless_web_contents_impl.cc +++ b/headless/lib/browser/headless_web_contents_impl.cc @@ -208,8 +208,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { @@ -399,7 +399,7 @@ index f45f822c20bfdc46cb0904ae01fa22ca1e024642..55660b44fb2e53d16c434bba40ffd031 ->options() ->block_new_web_contents(); diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc -index f56882565de72fa9ab660b4a8d86f08c7392becd..439586a03288822bab8f5f21d0c38b678ed52fb6 100644 +index 20555af0857f1e8ea8227d71245fb95c5e95679a..a6df69bc877046214bf693ceff3c60036e8767ed 100644 --- a/ui/views/controls/webview/web_dialog_view.cc +++ b/ui/views/controls/webview/web_dialog_view.cc @@ -489,8 +489,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( diff --git a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch index 9ab24d6a7e..66beb13a63 100644 --- a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch +++ b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch @@ -7,10 +7,10 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 304e7a9379b012367dae26b425e5cbb3f56ba99e..736deda278d5cdc5f7a149429fc5b9a51dbb63a2 100644 +index 61a645ade548e47c049d6491bca3a9c700473f95..c4838efd40b1c53bcd624116245ebb5f5bfd8658 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -276,8 +276,13 @@ void AsanProcessInfoCB(const char* reason, +@@ -277,8 +277,13 @@ void AsanProcessInfoCB(const char* reason, } #endif // defined(ADDRESS_SANITIZER) @@ -25,7 +25,7 @@ index 304e7a9379b012367dae26b425e5cbb3f56ba99e..736deda278d5cdc5f7a149429fc5b9a5 #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) base::FileDescriptorStore& file_descriptor_store = base::FileDescriptorStore::GetInstance(); -@@ -945,7 +950,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { +@@ -954,7 +959,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { #if defined(V8_USE_EXTERNAL_STARTUP_DATA) if (delegate_->ShouldLoadV8Snapshot(process_type)) { diff --git a/patches/chromium/custom_protocols_plzserviceworker.patch b/patches/chromium/custom_protocols_plzserviceworker.patch index 0d2ac2cdc7..139874e788 100644 --- a/patches/chromium/custom_protocols_plzserviceworker.patch +++ b/patches/chromium/custom_protocols_plzserviceworker.patch @@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511 diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc -index 2906184ac12cca4dd82447364becdd16ccdaa6e6..97535e9f1052952aa1061af88e6be624a2874bb6 100644 +index 25e8b179815dce93168d377961f6848199228bcd..d61f9554f0ab76ee9d654a70e419522b53165f9c 100644 --- a/content/browser/service_worker/service_worker_context_wrapper.cc +++ b/content/browser/service_worker/service_worker_context_wrapper.cc -@@ -1930,6 +1930,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1941,6 +1941,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( loader_factory_bundle_info = context()->loader_factory_bundle_for_update_check()->Clone(); @@ -38,7 +38,7 @@ index 2906184ac12cca4dd82447364becdd16ccdaa6e6..97535e9f1052952aa1061af88e6be624 if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig( browser_context(), scope)) { // If this is a Service Worker for a WebUI, the WebUI's URLDataSource -@@ -1949,9 +1969,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1960,9 +1980,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( features::kEnableServiceWorkersForChromeScheme) && scope.scheme() == kChromeUIScheme) { config->RegisterURLDataSource(browser_context()); @@ -49,7 +49,7 @@ index 2906184ac12cca4dd82447364becdd16ccdaa6e6..97535e9f1052952aa1061af88e6be624 .emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory( browser_context(), kChromeUIScheme, base::flat_set())); -@@ -1959,9 +1977,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1970,9 +1988,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( features::kEnableServiceWorkersForChromeUntrusted) && scope.scheme() == kChromeUIUntrustedScheme) { config->RegisterURLDataSource(browser_context()); diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index ab37f93a4e..0bdaf6f883 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 082c24657917671fbee8f755786285af66640a92..d506230061f3bc969cc3cf9b998ec0321a44a1d2 100644 +index c4ada35c3ca32ce06ffc57577af7bc4c45c98579..9f345d0da8bcc8f2818f71347a2eab7675ad544a 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -559,7 +559,11 @@ +@@ -573,7 +573,11 @@ } host()->WasHidden(); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 9286d9db01..f2b9c10fd3 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 93fe27d2e7cf5cf78d30685e50f25715ddefd66e..b092a09cada3f289cb13ed4352b6da8cb7ff154a 100644 +index f41937897e1189357969f92f6741ab4f6eb0599e..798ca07aa4cd1f47f459def5d6b57473cc8c7f2b 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -846,6 +846,10 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -847,6 +847,10 @@ void RenderWidgetHostImpl::WasHidden() { return; } diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index 94fe2bb38a..8d60f03b6f 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 4467ed08afa4d56059775b4786ba2907884e2f28..b2f7bbc51484d8db4c69de05d36398866b170721 100644 +index 3a02cb67eb114efdfe796de8e544e05f6559ddae..1e0c7aa8a17ca62eda9bee3444668e032a1c928f 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 @@ -617,7 +617,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { @@ -19,10 +19,10 @@ index 4467ed08afa4d56059775b4786ba2907884e2f28..b2f7bbc51484d8db4c69de05d3639886 excluded_margin); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index b4d4bf43a45bc08970c9c2857da9adafd28da410..88010fe24109d006ff2e1a37f39c0db8e2be1c4f 100644 +index fcd56efb87230f193b492b657c6843ec168009e9..b68f7c997fab3f370bad77a956c77579fcd24a51 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1062,8 +1062,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen, +@@ -1068,8 +1068,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen, void HWNDMessageHandler::SetAspectRatio(float aspect_ratio, const gfx::Size& excluded_margin) { diff --git a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch index 4510bf196e..d6f641120d 100644 --- a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch +++ b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch @@ -21,7 +21,7 @@ index 8c32005730153251e93516340e4baa500d777178..ff444dc689542a909ec5aada39816931 ThreadIsolatedAllocator* GetThreadIsolatedAllocator() override; #endif diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc -index d3ea23dc328ae05f26a51fbe791a69d80dfbcffe..52ced989b595d472e3ac143f35cb6cecc75fdf47 100644 +index 1dea7a32eeb7f4783da020fc974acd78863742bb..d7ea65359a39f3c633c212c51b5a7909e789f53e 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc @@ -222,6 +222,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() { diff --git a/patches/chromium/expose_gtk_ui_platform_field.patch b/patches/chromium/expose_gtk_ui_platform_field.patch index 14e0eb709c..9f3f9a2255 100644 --- a/patches/chromium/expose_gtk_ui_platform_field.patch +++ b/patches/chromium/expose_gtk_ui_platform_field.patch @@ -10,7 +10,7 @@ This patch should be proposed upstream. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7237910 "7237910: Remove g_gtk_ui global" diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc -index 71eaed03a15ba2ab5bae874daecfb0e95ac7c64d..12915abc0ba658b87b3a867e308f1b81cad61a17 100644 +index 393aa9918c97e9d61ef0f6e596aeeaa3d93862c6..5397fe5b57a60ea0948e412d0627c942f37dd0df 100644 --- a/extensions/renderer/script_injection.cc +++ b/extensions/renderer/script_injection.cc @@ -9,6 +9,7 @@ diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 3cc5b1d829..e6fc079f82 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4 } // namespace net diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 40ed5ee64f8588a7373128adc0bc640d3b1d32f0..53cee001783f11a6364e66e4845c95eb27113285 100644 +index 02f70ce0f192562c11cdbc4d193302e700a302aa..f9e704f9dc76f802b330487238717a6df3ba7b36 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1875,6 +1875,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1879,6 +1879,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,7 +51,7 @@ index 40ed5ee64f8588a7373128adc0bc640d3b1d32f0..53cee001783f11a6364e66e4845c95eb // 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 4395ddd300e876bf5fdb02d23cd401276c29e07d..ab9bb1d559e7761165b98f7c08e29a5b0d1a4aa6 100644 +index 01a7a606dd6341df2c519776399f8f9875b557f7..d8de2ba162a97fab31a797408ed918cba4382543 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -321,6 +321,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext @@ -63,10 +63,10 @@ index 4395ddd300e876bf5fdb02d23cd401276c29e07d..ab9bb1d559e7761165b98f7c08e29a5b void SetEnableReferrers(bool enable_referrers) override; #if BUILDFLAG(IS_CT_SUPPORTED) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 160d18eba4101efab2dae444d09947f650079003..b78bde54c454a986ae8b2ed68bf0cf5a3d10568f 100644 +index 9599c3570b74fa03464beb9adeb1a0c237744640..0a837fbd18a0e597805b418a7f3022c499fb0c41 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1268,6 +1268,9 @@ interface NetworkContext { +@@ -1277,6 +1277,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, array conditions); @@ -77,7 +77,7 @@ index 160d18eba4101efab2dae444d09947f650079003..b78bde54c454a986ae8b2ed68bf0cf5a SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index 195b237d37a8cf6739d83d87c79a67eb9f0a6bac..6381265ccba02b96b5d153585d576b7ed62b75af 100644 +index b228a3725b04b92037fc1c2ec601f04642d59fc3..7905f8afd42dd4646745cc4ce5dc7c169ab0ac26 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h @@ -156,6 +156,7 @@ class TestNetworkContext : public mojom::NetworkContext { diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index be213a6676..cb52451341 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -15,10 +15,10 @@ Ideally we could add an embedder observer pattern here but that can be done in future work. diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index 3642fb358bc92dcf523b589ac5fe07c877f3a221..eaf48d7c193d881ce8414bffdb708efb286d25aa 100644 +index 6aae8ee3c34d11ee927822f54e76f8e136b6faf9..8d90e826715a00173f83485c0105387e7fc9568b 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -1918,6 +1918,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1919,6 +1919,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); diff --git a/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch b/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch index 650911828f..3662e3ff02 100644 --- a/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch +++ b/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch @@ -414,7 +414,7 @@ index 33e2ff42e4d9da442d522b959a4a21c2f7032b6b..a0d81212327fc17e1f4704e78803c1d7 std::vector extension_schemes; // Registers a URL scheme with a predefined default custom handler. diff --git a/url/url_util.cc b/url/url_util.cc -index bbf9aa18ffb03a45cef59855fc4ca9ab36d00739..1d26a531fd89be680a704bdc8155908f537da5fa 100644 +index 7578135ca53c4421cfc08c722d9471f376a0673c..cd136b7a978adb4fb8f293015817eb55a06f1176 100644 --- a/url/url_util.cc +++ b/url/url_util.cc @@ -131,6 +131,9 @@ struct SchemeRegistry { diff --git a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch index 7fca9d47c0..0ce54fbd22 100644 --- a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch +++ b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch @@ -7,7 +7,7 @@ Subject: feat: allow embedders to add observers on created hunspell This patch is used by Electron to implement spellchecker events. diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc -index 8b261e4c65664b229c2c4a859dbead78e11fd9a6..c063b296c7ff808342e5437a53fbcef6d7534342 100644 +index c138bc5b0021f323fbd842a0e6af35962e6037ce..cf9cf84da456314804083c902859a0965425479f 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc @@ -479,6 +479,8 @@ void SpellcheckService::LoadDictionaries() { diff --git a/patches/chromium/feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch b/patches/chromium/feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch index c8c9271034..99afe4df42 100644 --- a/patches/chromium/feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch +++ b/patches/chromium/feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch @@ -46,7 +46,7 @@ index e2771b7b281274cdcb601a5bc78a948ad592087b..48d116823a28213e50775f378e6ce04c // OnStop is called by StopAndDeAllocate. virtual void OnStop() = 0; diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm -index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d313f401cd1 100644 +index 38aa41a82acdf42fb05d3315c4df408796437873..0c6cbbc920c65a6e671839eb8022fbc9ed697147 100644 --- a/content/browser/media/capture/screen_capture_kit_device_mac.mm +++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm @@ -28,6 +28,61 @@ @@ -111,7 +111,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31 namespace { API_AVAILABLE(macos(12.3)) -@@ -151,18 +206,22 @@ @interface ScreenCaptureKitDeviceHelper +@@ -158,18 +213,22 @@ @interface ScreenCaptureKitDeviceHelper : NSObject - (instancetype)initWithSampleCallback:(SampleCallback)sampleCallback @@ -134,7 +134,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31 _errorCallback = errorCallback; } return self; -@@ -254,12 +313,11 @@ class API_AVAILABLE(macos(12.3)) ScreenCaptureKitDeviceMac +@@ -261,12 +320,11 @@ class API_AVAILABLE(macos(12.3)) ScreenCaptureKitDeviceMac explicit ScreenCaptureKitDeviceMac( const DesktopMediaID& source, @@ -148,7 +148,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31 stream_created_callback_(std::move(stream_created_callback)), device_task_runner_(base::SingleThreadTaskRunner::GetCurrentDefault()), pip_screen_capture_coordinator_proxy_( -@@ -268,21 +326,43 @@ explicit ScreenCaptureKitDeviceMac( +@@ -275,21 +333,43 @@ explicit ScreenCaptureKitDeviceMac( device_task_runner_, base::BindRepeating(&ScreenCaptureKitDeviceMac::OnStreamSample, weak_factory_.GetWeakPtr())); @@ -192,7 +192,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31 DCHECK(device_task_runner_->RunsTasksInCurrentSequence()); if (pip_screen_capture_coordinator_proxy_) { pip_screen_capture_coordinator_proxy_->RemoveObserver(this); -@@ -373,7 +453,7 @@ void CreateStream(SCContentFilter* filter) { +@@ -380,7 +460,7 @@ void CreateStream(SCContentFilter* filter) { return; } @@ -201,7 +201,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31 // Update the content size. This step is neccessary when used together // with SCContentSharingPicker. If the Chrome picker is used, it will // change to retina resolution if applicable. -@@ -382,6 +462,9 @@ void CreateStream(SCContentFilter* filter) { +@@ -389,6 +469,9 @@ void CreateStream(SCContentFilter* filter) { filter.contentRect.size.height * filter.pointPixelScale); } @@ -211,7 +211,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31 gfx::RectF dest_rect_in_frame; actual_capture_format_ = capture_params().requested_format; actual_capture_format_.pixel_format = media::PIXEL_FORMAT_NV12; -@@ -395,6 +478,7 @@ void CreateStream(SCContentFilter* filter) { +@@ -402,6 +485,7 @@ void CreateStream(SCContentFilter* filter) { stream_ = [[SCStream alloc] initWithFilter:filter configuration:config delegate:helper_]; @@ -219,7 +219,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31 { NSError* error = nil; bool add_stream_output_result = -@@ -554,7 +638,7 @@ void OnStreamError() { +@@ -561,7 +645,7 @@ void OnStreamError() { if (fullscreen_module_) { fullscreen_module_->Reset(); } @@ -228,7 +228,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31 } else { client()->OnError(media::VideoCaptureError::kScreenCaptureKitStreamError, FROM_HERE, "Stream delegate called didStopWithError"); -@@ -640,23 +724,41 @@ void OnStateChanged( +@@ -647,23 +731,41 @@ void OnStateChanged( } // IOSurfaceCaptureDeviceBase: @@ -285,7 +285,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31 } void OnStop() override { DCHECK(device_task_runner_->RunsTasksInCurrentSequence()); -@@ -715,7 +817,7 @@ void ResetStreamTo(SCWindow* window) override { +@@ -722,7 +824,7 @@ void ResetStreamTo(SCWindow* window) override { private: const DesktopMediaID source_; @@ -294,7 +294,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31 StreamCallback stream_created_callback_; const scoped_refptr device_task_runner_; -@@ -732,6 +834,10 @@ void ResetStreamTo(SCWindow* window) override { +@@ -739,6 +841,10 @@ void ResetStreamTo(SCWindow* window) override { // Helper class that acts as output and delegate for `stream_`. ScreenCaptureKitDeviceHelper* __strong helper_; @@ -305,7 +305,7 @@ index d864b712d47452d1941aeae870da91ec2dfc8691..478808f20945ac42dfbd49e160b61d31 // This is used to detect when a captured presentation enters fullscreen mode. // If this happens, the module will call the ResetStreamTo function. std::unique_ptr fullscreen_module_; -@@ -746,6 +852,8 @@ void ResetStreamTo(SCWindow* window) override { +@@ -753,6 +859,8 @@ void ResetStreamTo(SCWindow* window) override { base::WeakPtrFactory weak_factory_{this}; }; diff --git a/patches/chromium/feat_configure_launch_options_for_service_process.patch b/patches/chromium/feat_configure_launch_options_for_service_process.patch index 5147528057..c8ad7240ad 100644 --- a/patches/chromium/feat_configure_launch_options_for_service_process.patch +++ b/patches/chromium/feat_configure_launch_options_for_service_process.patch @@ -61,10 +61,10 @@ index 1b42600b2d240c1215c1b7223ac2aaa7c90794fc..65ffcb9491176722bb573be78ed15e81 // Launches a process asynchronously and notifies the client of the process diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc -index 8f551374e1ffc729081f7d50e73671313c641bb6..6e7a3f46b82f82035f612f9700281d0edb363de5 100644 +index 492a0822181aebbede38f7783a457b820ce4f8d1..878e5245266cfd4ea96bdbf8ca20c7ae0ac9a80e 100644 --- a/content/browser/child_process_launcher_helper_linux.cc +++ b/content/browser/child_process_launcher_helper_linux.cc -@@ -64,6 +64,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( +@@ -65,6 +65,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( options->fds_to_remap.emplace_back(sandbox_fd, GetSandboxFD()); } @@ -76,7 +76,7 @@ index 8f551374e1ffc729081f7d50e73671313c641bb6..6e7a3f46b82f82035f612f9700281d0e // (For Electron), if we're launching without zygote, that means we're // launching an unsandboxed process (since all sandboxed processes are // forked from the zygote). Relax the allow_new_privs option to permit -@@ -73,7 +78,9 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( +@@ -74,7 +79,9 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( options->allow_new_privs = true; } @@ -87,7 +87,7 @@ index 8f551374e1ffc729081f7d50e73671313c641bb6..6e7a3f46b82f82035f612f9700281d0e DCHECK(GetZygoteForLaunch()); // Environment variables could be supported in the future, but are not diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc -index 1d981cec12769d145b694b61772b4c09616df9f0..cf9d9bfe7af12e16520354ebd1f7bc4050c57ec7 100644 +index 6414b5b306d48da66c216683c68af1627330eba4..5bde1851fb5914ddb7a580a63405cc61ca25a9da 100644 --- a/content/browser/child_process_launcher_helper_mac.cc +++ b/content/browser/child_process_launcher_helper_mac.cc @@ -107,7 +107,8 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( @@ -113,19 +113,19 @@ index 1d981cec12769d145b694b61772b4c09616df9f0..cf9d9bfe7af12e16520354ebd1f7bc40 } diff --git a/content/browser/child_process_launcher_helper_win.cc b/content/browser/child_process_launcher_helper_win.cc -index 0791b5317fc6846389f65f93734ae5e816d04623..71df2459fd759a75be573449accd3a4dd4f54e08 100644 +index 34b4e7c1b449312e9cb517be192a39a6b5286e3c..4f39415717f423b9a87f83779851e08bf5481b8c 100644 --- a/content/browser/child_process_launcher_helper_win.cc +++ b/content/browser/child_process_launcher_helper_win.cc -@@ -24,6 +24,8 @@ - #include "mojo/public/cpp/platform/named_platform_channel.h" +@@ -26,6 +26,8 @@ #include "mojo/public/cpp/platform/platform_channel.h" + #include "sandbox/policy/win/sandbox_win.h" +#include + namespace { // Helper to avoid marking the log file as non-executable every time we launch a -@@ -132,6 +134,31 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( +@@ -134,6 +136,31 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( mojo_channel_->PrepareToPassRemoteEndpoint(&options->handles_to_inherit, command_line()); } @@ -157,15 +157,15 @@ index 0791b5317fc6846389f65f93734ae5e816d04623..71df2459fd759a75be573449accd3a4d return true; } -@@ -158,7 +185,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThread( - } - *is_synchronous_launch = false; - *launch_result = StartSandboxedProcess( -- delegate_.get(), *command_line(), options->handles_to_inherit, -+ delegate_.get(), *command_line(), options, - base::BindOnce(&ChildProcessLauncherHelper:: - FinishStartSandboxedProcessOnLauncherThread, - this)); +@@ -166,7 +193,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThread( + "tag", delegate_->GetSandboxTag()); + + *launch_result = sandbox::policy::SandboxWin::StartSandboxedProcess( +- *command_line(), options->handles_to_inherit, delegate_.get(), ++ *command_line(), options, delegate_.get(), + base::BindOnce(&ChildProcessLauncherHelper:: + FinishStartSandboxedProcessOnLauncherThread, + this)); diff --git a/content/browser/service_host/service_process_host_impl.cc b/content/browser/service_host/service_process_host_impl.cc index d9c14f91747bde0e76056d7f2f2ada166e67f994..09335acac17f526fb8d8e42e4b2d993b11045786 100644 --- a/content/browser/service_host/service_process_host_impl.cc @@ -193,7 +193,7 @@ index d9c14f91747bde0e76056d7f2f2ada166e67f994..09335acac17f526fb8d8e42e4b2d993b UtilityProcessHost::Start(std::move(utility_options), diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc -index 1f848cd121b2ecef4892bb2563c593124337e7cf..8ad0b2ebbe0e4e2a1a60efec7c4d7b9f8277b82c 100644 +index 5101e22a804554d7e289d37f8a4191976763b69f..f00b3a784de14d564b6d02eeb72bc80711ac7395 100644 --- a/content/browser/service_host/utility_process_host.cc +++ b/content/browser/service_host/utility_process_host.cc @@ -241,13 +241,13 @@ UtilityProcessHost::Options& UtilityProcessHost::Options::WithFileToPreload( @@ -377,7 +377,7 @@ index dfdcb66d65f07f4543703396eb529a6ec02b3f4a..96c0cadf5caf5bf27f2a767c43f0f1da // Whether or not to bind viz::mojom::Gpu to the utility process. bool allowed_gpu_; diff --git a/content/browser/service_host/utility_sandbox_delegate.cc b/content/browser/service_host/utility_sandbox_delegate.cc -index ada7034c8926c276ea1c7ebf8242c61b0a993c39..aec3de8bd0c18666b33147779cad68c6b41fe1fe 100644 +index 47a64f9c60ef359fc0015dff566c8041e34b5405..cd17ff94f279cf32c0bf0aef6c2b53bae37f80fb 100644 --- a/content/browser/service_host/utility_sandbox_delegate.cc +++ b/content/browser/service_host/utility_sandbox_delegate.cc @@ -39,17 +39,19 @@ UtilitySandboxedProcessLauncherDelegate:: @@ -452,7 +452,7 @@ index ada7034c8926c276ea1c7ebf8242c61b0a993c39..aec3de8bd0c18666b33147779cad68c6 } // namespace content diff --git a/content/browser/service_host/utility_sandbox_delegate.h b/content/browser/service_host/utility_sandbox_delegate.h -index f2e8c1d62c1cb1677f618b584ed401685b03034b..00a20885092bd299e817685dd18c3971b25f721b 100644 +index ee2df2f709b17571747f53efc208ea9d234d076f..e20e5d5233db5bf1bbb81560bbf3d403cd6f79c2 100644 --- a/content/browser/service_host/utility_sandbox_delegate.h +++ b/content/browser/service_host/utility_sandbox_delegate.h @@ -36,7 +36,9 @@ class CONTENT_EXPORT UtilitySandboxedProcessLauncherDelegate @@ -519,28 +519,70 @@ index f2e8c1d62c1cb1677f618b584ed401685b03034b..00a20885092bd299e817685dd18c3971 }; } // namespace content -diff --git a/content/common/sandbox_init_win.cc b/content/common/sandbox_init_win.cc -index 39c96d4423b24695eee86353057cfeed19318b57..31b343d97b7672294644041c9bb1a4cd0a869cca 100644 ---- a/content/common/sandbox_init_win.cc -+++ b/content/common/sandbox_init_win.cc -@@ -23,7 +23,7 @@ namespace content { - sandbox::ResultCode StartSandboxedProcess( - SandboxedProcessLauncherDelegate* delegate, - const base::CommandLine& target_command_line, -- const base::HandlesToInheritVector& handles_to_inherit, -+ const base::LaunchOptions* options, - sandbox::StartSandboxedProcessCallback result_callback) { - std::string type_str = - target_command_line.GetSwitchValueASCII(switches::kProcessType); -@@ -46,7 +46,7 @@ sandbox::ResultCode StartSandboxedProcess( - } - - return sandbox::policy::SandboxWin::StartSandboxedProcess( -- full_command_line, handles_to_inherit, delegate, -+ full_command_line, options, delegate, - std::move(result_callback)); +diff --git a/content/public/browser/sandboxed_process_launcher_delegate.cc b/content/public/browser/sandboxed_process_launcher_delegate.cc +index b0c57f32835b1d04e4c4f136bab327dc0286df4d..0373d505bfefcc9b44148e82524faf4f9d6a6c40 100644 +--- a/content/public/browser/sandboxed_process_launcher_delegate.cc ++++ b/content/public/browser/sandboxed_process_launcher_delegate.cc +@@ -74,11 +74,23 @@ ZygoteCommunication* SandboxedProcessLauncherDelegate::GetZygote() { } + #endif // BUILDFLAG(USE_ZYGOTE) +-#if BUILDFLAG(IS_POSIX) + base::EnvironmentMap SandboxedProcessLauncherDelegate::GetEnvironment() { + return base::EnvironmentMap(); + } +-#endif // BUILDFLAG(IS_POSIX) ++ ++bool SandboxedProcessLauncherDelegate::ShouldInheritEnvironment() { ++ return true; ++} ++ ++base::FilePath SandboxedProcessLauncherDelegate::GetCurrentDirectory() { ++ return base::FilePath(); ++} ++ ++#if BUILDFLAG(IS_WIN) ++bool SandboxedProcessLauncherDelegate::ShouldShowFeedbackCursor() { ++ return true; ++} ++#endif // #if BUILDFLAG(IS_WIN) + + #if BUILDFLAG(IS_MAC) + +diff --git a/content/public/browser/sandboxed_process_launcher_delegate.h b/content/public/browser/sandboxed_process_launcher_delegate.h +index cf86232460f117627f1c822fcf18b334bcf62341..7e559235533a36ceecc24787b07987a4fefc1f8c 100644 +--- a/content/public/browser/sandboxed_process_launcher_delegate.h ++++ b/content/public/browser/sandboxed_process_launcher_delegate.h +@@ -8,6 +8,7 @@ + #include + + #include "base/environment.h" ++#include "base/files/file_path.h" + #include "base/files/scoped_file.h" + #include "base/process/process.h" + #include "build/build_config.h" +@@ -63,10 +64,19 @@ class CONTENT_EXPORT SandboxedProcessLauncherDelegate + virtual ZygoteCommunication* GetZygote(); + #endif // BUILDFLAG(USE_ZYGOTE) + +-#if BUILDFLAG(IS_POSIX) + // Override this if the process needs a non-empty environment map. + virtual base::EnvironmentMap GetEnvironment(); +-#endif // BUILDFLAG(IS_POSIX) ++ ++ // Override this if the process should not inherit parent environment. ++ virtual bool ShouldInheritEnvironment(); ++ ++ // Specifies the directory to change to before executing the process. ++ virtual base::FilePath GetCurrentDirectory(); ++ ++#if BUILDFLAG(IS_WIN) ++ // Override this if the process should not trigger mouse cursor feedback. ++ virtual bool ShouldShowFeedbackCursor(); ++#endif // #if BUILDFLAG(IS_WIN) + + #if BUILDFLAG(IS_MAC) + // Whether or not to disclaim TCC responsibility for the process, defaults to diff --git a/content/public/browser/service_process_host.cc b/content/public/browser/service_process_host.cc index d1bc550a891979e2d41d8d5b18a2f9287468e460..5d255f628788bc8b40d8df0039b08c06ffec8730 100644 --- a/content/public/browser/service_process_host.cc @@ -699,83 +741,6 @@ index 0062d2cb6634b8b29977a0312516b1b13936b40a..888ff36d70c83010f1f45e9eeb2dd6b5 }; // An interface which can be implemented and registered/unregistered with -diff --git a/content/public/common/sandbox_init_win.h b/content/public/common/sandbox_init_win.h -index 5c24090e3311a89dc2a9162045feaacda574bb99..b772a2a054e9d19025ebd2909acf1b920d389a95 100644 ---- a/content/public/common/sandbox_init_win.h -+++ b/content/public/common/sandbox_init_win.h -@@ -29,7 +29,7 @@ class SandboxedProcessLauncherDelegate; - CONTENT_EXPORT sandbox::ResultCode StartSandboxedProcess( - SandboxedProcessLauncherDelegate* delegate, - const base::CommandLine& target_command_line, -- const base::HandlesToInheritVector& handles_to_inherit, -+ const base::LaunchOptions* options, - sandbox::StartSandboxedProcessCallback result_callback); - - } // namespace content -diff --git a/content/public/common/sandboxed_process_launcher_delegate.cc b/content/public/common/sandboxed_process_launcher_delegate.cc -index b1d6ab11dcb522d01c796ec1217b5bde11f2ca5b..280dca4795903e4974d1ccc6cd306ee2637aeb25 100644 ---- a/content/public/common/sandboxed_process_launcher_delegate.cc -+++ b/content/public/common/sandboxed_process_launcher_delegate.cc -@@ -74,11 +74,23 @@ ZygoteCommunication* SandboxedProcessLauncherDelegate::GetZygote() { - } - #endif // BUILDFLAG(USE_ZYGOTE) - --#if BUILDFLAG(IS_POSIX) - base::EnvironmentMap SandboxedProcessLauncherDelegate::GetEnvironment() { - return base::EnvironmentMap(); - } --#endif // BUILDFLAG(IS_POSIX) -+ -+bool SandboxedProcessLauncherDelegate::ShouldInheritEnvironment() { -+ return true; -+} -+ -+base::FilePath SandboxedProcessLauncherDelegate::GetCurrentDirectory() { -+ return base::FilePath(); -+} -+ -+#if BUILDFLAG(IS_WIN) -+bool SandboxedProcessLauncherDelegate::ShouldShowFeedbackCursor() { -+ return true; -+} -+#endif // #if BUILDFLAG(IS_WIN) - - #if BUILDFLAG(IS_MAC) - -diff --git a/content/public/common/sandboxed_process_launcher_delegate.h b/content/public/common/sandboxed_process_launcher_delegate.h -index c5fee4ad8b246bc1113a383794c6101bade24df3..61f0a0f62795b30105c42da3632052846880e137 100644 ---- a/content/public/common/sandboxed_process_launcher_delegate.h -+++ b/content/public/common/sandboxed_process_launcher_delegate.h -@@ -8,6 +8,7 @@ - #include - - #include "base/environment.h" -+#include "base/files/file_path.h" - #include "base/files/scoped_file.h" - #include "base/process/process.h" - #include "build/build_config.h" -@@ -63,10 +64,19 @@ class CONTENT_EXPORT SandboxedProcessLauncherDelegate - virtual ZygoteCommunication* GetZygote(); - #endif // BUILDFLAG(USE_ZYGOTE) - --#if BUILDFLAG(IS_POSIX) - // Override this if the process needs a non-empty environment map. - virtual base::EnvironmentMap GetEnvironment(); --#endif // BUILDFLAG(IS_POSIX) -+ -+ // Override this if the process should not inherit parent environment. -+ virtual bool ShouldInheritEnvironment(); -+ -+ // Specifies the directory to change to before executing the process. -+ virtual base::FilePath GetCurrentDirectory(); -+ -+#if BUILDFLAG(IS_WIN) -+ // Override this if the process should not trigger mouse cursor feedback. -+ virtual bool ShouldShowFeedbackCursor(); -+#endif // #if BUILDFLAG(IS_WIN) - - #if BUILDFLAG(IS_MAC) - // Whether or not to disclaim TCC responsibility for the process, defaults to diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc index 2b23d76459e5f714ac33868ea247ebbb9d51bb2a..edb3838b8b30dd0767c1aaeabed29f73ce8249dc 100644 --- a/sandbox/policy/win/sandbox_win.cc diff --git a/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch b/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch index 27aff2fc05..dc0e4599e5 100644 --- a/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch +++ b/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch @@ -20,7 +20,7 @@ making three primary changes to Blink: * Controls whether the CSS rule is available. diff --git a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom -index 3dc1e9241f708ebcb3148999f1c69fee86be1008..28765da85bcbed322546a80fd5f71bd4d5618700 100644 +index 47bcd315f50d54ede50676997c14a84cc78fae08..8703f0fb80901f92f798a3d8bcc5303ae3e4fd2e 100644 --- a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom +++ b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom @@ -50,7 +50,7 @@ enum CSSSampleId { @@ -46,10 +46,10 @@ index 576fb9bff78221a61236a76a597b6b66ae8a5e6a..78e844e7dd0bd85640b208bfcdd385fd 'internal-forced-visited-'): internal_visited_order = 0 diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 -index 82ab198abf549fc82d0fadba95e826fd77641261..1d58becfafb4035025aaac129b0f357750f9f38b 100644 +index 940deeed996413815a4b178a2ce6c4ab92a59a43..62f3881998e5197b3c43b04618f8efbc623129c5 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5 -@@ -9275,6 +9275,26 @@ +@@ -9320,6 +9320,26 @@ property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"], }, @@ -77,7 +77,7 @@ index 82ab198abf549fc82d0fadba95e826fd77641261..1d58becfafb4035025aaac129b0f3577 { name: "-internal-visited-color", diff --git a/third_party/blink/renderer/core/css/css_property_equality.cc b/third_party/blink/renderer/core/css/css_property_equality.cc -index 2a6fdf1e705e1486e82bcaba248f9e6a369fc67f..101d1fc61e0802e5367b1ebc036076669ee44366 100644 +index e7077a46930b158ee062e746f643cb3afe75a93e..0b8d25ab2ac81b0d5a6b85d233c8787464bbfb2c 100644 --- a/third_party/blink/renderer/core/css/css_property_equality.cc +++ b/third_party/blink/renderer/core/css/css_property_equality.cc @@ -402,6 +402,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property, @@ -90,10 +90,10 @@ index 2a6fdf1e705e1486e82bcaba248f9e6a369fc67f..101d1fc61e0802e5367b1ebc03607666 return a.EmptyCells() == b.EmptyCells(); case CSSPropertyID::kFill: diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc -index 2f378422e277ea5fcb4ce436b9653023db07c100..98df9ac4e6c6301c560374912ea95131ca3cee59 100644 +index bc07180eb81a1f12c23c8c40ec5d92bccc11eb5a..075f8f494b35fa411b6d609a9e853c864d84bb43 100644 --- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc +++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc -@@ -12834,5 +12834,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue( +@@ -12851,5 +12851,36 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue( CSSValueID::kNone>(stream); } @@ -202,7 +202,7 @@ index 19cda703154dab9397827ab6ea66c2ca446c644d..dd5943c511886f4e39b2e7f10e67e60f return result; } diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn -index e2256766d7a01aee814ba0281b40921b2e261aa9..d55807d00042027fc91faa4479db4043d4ba4add 100644 +index 83ebf4a21a9d42b307a8a2108e118174d6d62f0e..160b3828d38f55734740cc07d6f851099922f70b 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn @@ -1669,6 +1669,8 @@ component("platform") { @@ -313,7 +313,7 @@ index 18f283e625101318ee14b50e6e765dfd1c9a1a44..44a3a55974c9e4b9e715574075f25661 auto DrawAsSinglePath = [&]() { diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -index 65c7ddbba26c0456899dc084888205cef2e23380..689850b72dca601717ff025a9fc5cf9d85c64cca 100644 +index add134dd9f197069e36c6355e7c83ce060461b7d..50fc6bc67fa1edcfff786f2c98b3fe67381b6189 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 @@ -214,6 +214,10 @@ 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 b62acd3466..5784938f05 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -90,7 +90,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 123118d66734295f7b00e807aa0437ac76ab3f57..24daad8568b05f35f93f0695f3bcea81d312d379 100644 +index 6ed74ce305052e3f88727d15277aa86eafdffcd0..bfef970e1ffc5a3c714a2a2a7df719f686ed0c01 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -176,6 +176,8 @@ viz_component("service") { diff --git a/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch b/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch index df0a50b4fb..3b7fc085fd 100644 --- a/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch +++ b/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch @@ -84,7 +84,7 @@ index 2648adb1cf38ab557b66ffd0e3034b26b04d76d6..98eab587f343f6ca472efc3d4e7b31b2 private: const std::string service_interface_name_; diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc -index 8ad0b2ebbe0e4e2a1a60efec7c4d7b9f8277b82c..ac1a3d303aa8dbcdb47e6cbddbfd10b9035ef885 100644 +index f00b3a784de14d564b6d02eeb72bc80711ac7395..e14f4b3b4cde8182431faee7c46d0bf901f98d9e 100644 --- a/content/browser/service_host/utility_process_host.cc +++ b/content/browser/service_host/utility_process_host.cc @@ -648,7 +648,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) { diff --git a/patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch b/patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch index fa79c2713a..dad64f27b4 100644 --- a/patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch +++ b/patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch @@ -12,12 +12,12 @@ We attempt to migrate the safe storage key from the old account, if that migrati Existing apps that aren't built for the app store should be unimpacted, there is one edge case where a user uses BOTH an AppStore and a darwin build of the same app only one will keep it's access to the safestorage key as during the migration we delete the old account. This is an acceptable edge case as no one should be actively using two versions of the same app. diff --git a/components/os_crypt/common/keychain_password_mac.mm b/components/os_crypt/common/keychain_password_mac.mm -index f19628cc0cdba39b232f55935e8eee9786b02a77..036b50f53e78bc21ed1e1d6dd876b50ab1e8f05d 100644 +index a3a8c87ad73f3bc69fc567f9f9d054b185093d7b..e9e0259f8faf35576a6a7ca658c5041e2a1fefd3 100644 --- a/components/os_crypt/common/keychain_password_mac.mm +++ b/components/os_crypt/common/keychain_password_mac.mm -@@ -27,6 +27,12 @@ - using KeychainNameContainerType = const base::NoDestructor; - #endif +@@ -32,6 +32,12 @@ + + namespace { +#if IS_MAS_BUILD() +const char kAccountNameSuffix[] = " App Store Key"; @@ -25,62 +25,63 @@ index f19628cc0cdba39b232f55935e8eee9786b02a77..036b50f53e78bc21ed1e1d6dd876b50a +const char kAccountNameSuffix[] = " Key"; +#endif + - namespace { - // These two strings ARE indeed user facing. But they are used to access -@@ -96,11 +102,51 @@ + // the encryption keyword. So as to not lose encrypted data when system + // locale changes we DO NOT LOCALIZE. +@@ -88,16 +94,51 @@ uma_result); }; -+ const std::string account_name_suffix = kAccountNameSuffix; -+ const std::string suffixed_account_name = GetAccountName() + account_name_suffix; - auto password = -- keychain_->FindGenericPassword(GetServiceName(), GetAccountName()); -+ keychain_->FindGenericPassword(GetServiceName(), suffixed_account_name); -+ -+ if (password.has_value()) { -+ uma_result = FindGenericPasswordResult::kPasswordFound; -+ return std::string(base::as_string_view(*password)); -+ } -+ -+ // If the error was anything other than "it does not exist" we should error out here -+ // This normally means the account exists but we were denied access to it -+ if (password.error() != errSecItemNotFound) { -+ uma_result = FindGenericPasswordResult::kErrorOccurred; -+ OSSTATUS_LOG(ERROR, password.error()) << "Keychain lookup for suffixed key failed"; -+ return std::string(); -+ } -+ -+ // If the suffixed account didn't exist, we should check if the legacy non-suffixed account -+ // exists. If it does we can use that key and migrate it to the new account -+ base::apple::ScopedCFTypeRef item_ref; -+ password = -+ keychain_->FindGenericPassword(GetServiceName(), GetAccountName(), -+ item_ref.InitializeInto()); +- auto password = keychain.FindGenericPassword(service_name, account_name); ++ const std::string suffixed_account_name = account_name + kAccountNameSuffix; ++ auto password = ++ keychain.FindGenericPassword(service_name, suffixed_account_name); if (password.has_value()) { uma_result = FindGenericPasswordResult::kPasswordFound; -+ -+ // If we found the legacy account name we should copy it over to -+ // the new suffixed account -+ OSStatus error = keychain_->AddGenericPassword( -+ GetServiceName(), suffixed_account_name, *password); -+ -+ if (error == noErr) { -+ // If we successfully made the suffixed account we can delete the old -+ // account to ensure new apps don't try to use it and run into IAM -+ // issues -+ error = keychain_->ItemDelete(item_ref.get()); -+ if (error != noErr) { -+ OSSTATUS_DLOG(ERROR, error) << "Keychain delete for legacy key failed"; -+ } -+ } else { -+ OSSTATUS_DLOG(ERROR, error) << "Keychain add for suffixed key failed"; -+ } -+ return std::string(base::as_string_view(*password)); } ++ // If the suffixed account didn't exist, we should check if the legacy ++ // non-suffixed account exists. If it does we can use that key and migrate it ++ // to the new account. ++ if (password.error() == errSecItemNotFound) { ++ base::apple::ScopedCFTypeRef item_ref; ++ password = keychain.FindGenericPassword(service_name, account_name, ++ item_ref.InitializeInto()); ++ ++ if (password.has_value()) { ++ // If we found the legacy account name we should copy it over to ++ // the new suffixed account ++ OSStatus error = keychain.AddGenericPassword( ++ service_name, suffixed_account_name, *password); ++ ++ if (error == noErr) { ++ // If we successfully made the suffixed account we can delete the old ++ // account to ensure new apps don't try to use it and run into IAM ++ // issues ++ error = keychain.ItemDelete(item_ref.get()); ++ if (error != noErr) { ++ OSSTATUS_DLOG(ERROR, error) ++ << "Keychain delete for legacy key failed"; ++ } ++ } else { ++ OSSTATUS_DLOG(ERROR, error) << "Keychain add for suffixed key failed"; ++ } ++ ++ uma_result = FindGenericPasswordResult::kPasswordFound; ++ return std::string(base::as_string_view(*password)); ++ } ++ } ++ + if (password.error() == errSecItemNotFound) { + uma_result = FindGenericPasswordResult::kPasswordNotFound; +- return AddRandomPasswordToKeychain(keychain, service_name, account_name); ++ return AddRandomPasswordToKeychain(keychain, service_name, ++ suffixed_account_name); + } + + OSSTATUS_LOG(ERROR, password.error()) << "Keychain lookup failed"; diff --git a/crypto/apple/keychain.h b/crypto/apple/keychain.h index 1d2264a5229206f45d1a9bcb009d47180efa6a8b..1dcf2b1d09831012c7f5768a5c6193d529efc821 100644 --- a/crypto/apple/keychain.h diff --git a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch index 808ce735e6..299cfa8b87 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -112,7 +112,7 @@ index 13a211107294e856616d1626fa1dc9c79eb5646c..549a36886d665c1a8100f09b7a86c8dc string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 5878ca56c4aa364098cd813be2a397c377ad6416..e7e149875767cc146b1a46d27af4ef4a5d5eb41b 100644 +index 1bb1dc14917765f83e9369cdc9b4daec1a66838e..009d1baa692bc5e574c5af7119b69ed1e644e0cd 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc @@ -370,6 +370,9 @@ URLLoader::URLLoader( @@ -134,7 +134,7 @@ index 5878ca56c4aa364098cd813be2a397c377ad6416..e7e149875767cc146b1a46d27af4ef4a url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1151,6 +1154,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1152,6 +1155,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); diff --git a/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch b/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch index ee449e0467..8e77acc114 100644 --- a/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch +++ b/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch @@ -7,10 +7,10 @@ Subject: feat: filter out non-shareable windows in the current application in This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer. This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself. This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started. There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases. diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm -index 34343b8a8270a25f2528efff70d5ab05d4de3242..d864b712d47452d1941aeae870da91ec2dfc8691 100644 +index 9269a9a12f3d1f049e31c5037f772f3060ae0b23..38aa41a82acdf42fb05d3315c4df408796437873 100644 --- a/content/browser/media/capture/screen_capture_kit_device_mac.mm +++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm -@@ -310,6 +310,31 @@ void OnShareableContentCreated(SCShareableContent* content) { +@@ -317,6 +317,31 @@ void OnShareableContentCreated(SCShareableContent* content) { source_.id == webrtc::kFullDesktopScreenId) { NSArray* excluded_windows = GetWindowsToExclude( content, pip_screen_capture_coordinator_proxy_.get(), source_); diff --git a/patches/chromium/feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch b/patches/chromium/feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch index f7f4b6f6c9..4f1f5e02dd 100644 --- a/patches/chromium/feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch +++ b/patches/chromium/feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch @@ -20,10 +20,10 @@ This patch will be removed when the deprecated sync api support is removed. diff --git a/components/permissions/permission_util.cc b/components/permissions/permission_util.cc -index b8b5151bae179da02725a37c0942cb26aaddb042..951682514323db7325496201f82716516e3e87f9 100644 +index 1e0b4bfd8b31f9ccbd663e8bb7c3990a9fa9c879..d9d7e902dfaaf360dc80bd292b56eeba9cfc5f12 100644 --- a/components/permissions/permission_util.cc +++ b/components/permissions/permission_util.cc -@@ -554,7 +554,8 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe( +@@ -552,7 +552,8 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe( return ContentSettingsType::LOCAL_NETWORK; case PermissionType::LOOPBACK_NETWORK: return ContentSettingsType::LOOPBACK_NETWORK; @@ -34,7 +34,7 @@ index b8b5151bae179da02725a37c0942cb26aaddb042..951682514323db7325496201f8271651 } diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc -index b47be001075cfd1ef963cac3e877704c64bc62f4..1b99c0e3bd89fb909bc18537dc70c0e04f4149c7 100644 +index f263d96b11aee75bbd0e6b8f4ff5a520f7047e9e..d278eae0806c1d51e949c7026fa01f01494c8dd3 100644 --- a/content/browser/permissions/permission_controller_impl.cc +++ b/content/browser/permissions/permission_controller_impl.cc @@ -97,7 +97,8 @@ PermissionToSchedulingFeature(PermissionType permission_name) { @@ -48,7 +48,7 @@ index b47be001075cfd1ef963cac3e877704c64bc62f4..1b99c0e3bd89fb909bc18537dc70c0e0 } diff --git a/content/browser/permissions/permission_descriptor_util.cc b/content/browser/permissions/permission_descriptor_util.cc -index 17ff5e9376c44ef0dba7d2f95c50e1af5230b140..260951e60f5d805a044afe94cad6fca86bb7e365 100644 +index 8acf00d2618d9a0552750f0f8e1d734b52f790b1..d2ea06fa66c07baaf741382af40de154068a7d6b 100644 --- a/content/browser/permissions/permission_descriptor_util.cc +++ b/content/browser/permissions/permission_descriptor_util.cc @@ -180,7 +180,12 @@ content::PermissionDescriptorUtil::CreatePermissionDescriptorForPermissionType( @@ -66,7 +66,7 @@ index 17ff5e9376c44ef0dba7d2f95c50e1af5230b140..260951e60f5d805a044afe94cad6fca8 } NOTREACHED(); diff --git a/third_party/blink/common/permissions/permission_utils.cc b/third_party/blink/common/permissions/permission_utils.cc -index 47e020ed0e706dee01fbee90a2af2fe6c521cd9b..9297e5667ef794fad52d76d878d2d50aefad3d11 100644 +index 0d873c13f1463d37e0fcdeacf68a84817b6524ca..19b8fa4b094b646ad6a5864c5e14a2f125fb7880 100644 --- a/third_party/blink/common/permissions/permission_utils.cc +++ b/third_party/blink/common/permissions/permission_utils.cc @@ -108,7 +108,10 @@ std::string GetPermissionString(PermissionType permission) { @@ -90,7 +90,7 @@ index 47e020ed0e706dee01fbee90a2af2fe6c521cd9b..9297e5667ef794fad52d76d878d2d50a case PermissionType::NUM: diff --git a/third_party/blink/public/common/permissions/permission_utils.h b/third_party/blink/public/common/permissions/permission_utils.h -index 638d0ee4fb368d28465322d34dbfca645ecd162d..38c20e7f0c597815ce5ee3333f12183ac1e18c62 100644 +index b124d53fdd245f055f57ad00250112e2637e1cd1..31158388db2df745af999adc9d07fc9272a2d6f8 100644 --- a/third_party/blink/public/common/permissions/permission_utils.h +++ b/third_party/blink/public/common/permissions/permission_utils.h @@ -69,7 +69,7 @@ enum class PermissionType { @@ -103,7 +103,7 @@ index 638d0ee4fb368d28465322d34dbfca645ecd162d..38c20e7f0c597815ce5ee3333f12183a NUM, MIN_VALUE = MIDI_SYSEX, diff --git a/third_party/blink/public/mojom/permissions/permission.mojom b/third_party/blink/public/mojom/permissions/permission.mojom -index 10ef656b019f46d389de074e5aad292af1728eac..cd200c6aadb304e440df65532a9ef86f0aef4fa7 100644 +index 699f6dfd43f0f6f8ab2b717e75ad74fa9dca0789..8a2e1ec60c337d4fb40292b53ee8949e0ce2b8a4 100644 --- a/third_party/blink/public/mojom/permissions/permission.mojom +++ b/third_party/blink/public/mojom/permissions/permission.mojom @@ -47,7 +47,7 @@ enum PermissionName { @@ -152,7 +152,7 @@ index 8fded9303e74737d82ca6d54e00807ebabf6c1ac..c0b66eb9a62f8f75e3c4de43f467ddd0 bool ClipboardCommands::ExecuteCopy(LocalFrame& frame, diff --git a/third_party/blink/renderer/modules/permissions/permission_utils.cc b/third_party/blink/renderer/modules/permissions/permission_utils.cc -index 91ef9f50a41150108f8cb4abfecba2b7c54f5fa4..ca46a15c03d72da4a301aff6fc18c173eaa7e6c8 100644 +index 27cdc852f5974951f0a10157a0473e67791f6688..e9b7dcb070567580e8c6ad11b2bb943083e804f6 100644 --- a/third_party/blink/renderer/modules/permissions/permission_utils.cc +++ b/third_party/blink/renderer/modules/permissions/permission_utils.cc @@ -151,6 +151,8 @@ String PermissionNameToString(PermissionName name) { diff --git a/patches/chromium/fix_adjust_headless_mode_handling_in_native_widget.patch b/patches/chromium/fix_adjust_headless_mode_handling_in_native_widget.patch index df525f18d2..2f5d1bee98 100644 --- a/patches/chromium/fix_adjust_headless_mode_handling_in_native_widget.patch +++ b/patches/chromium/fix_adjust_headless_mode_handling_in_native_widget.patch @@ -18,11 +18,59 @@ Additionally, this patch reverts https://chromium-review.googlesource.com/c/chromium/src/+/6936895 as we depend on the removed functionality in this patch. +2026-02-06: Partial revert of the following patch to prevent +additional headless changes from breaking macOS window behavior. +https://chromium-review.googlesource.com/c/chromium/src/+/7487666 + +diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +index 96588e0dfd084822f5c98cfaf2ee3c403fbd5e5f..b7983880254a09722d540c41937095f63cbb8109 100644 +--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm ++++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +@@ -218,6 +218,7 @@ @implementation NativeWidgetMacNSWindow { + BOOL _isEnforcingNeverMadeVisible; + BOOL _activationIndependence; + BOOL _isTooltip; ++ BOOL _isHeadless; + BOOL _isShufflingForOrdering; + BOOL _miniaturizationInProgress; + std::unique_ptr _headless_info; +@@ -225,6 +226,7 @@ @implementation NativeWidgetMacNSWindow { + @synthesize bridgedNativeWidgetId = _bridgedNativeWidgetId; + @synthesize bridge = _bridge; + @synthesize isTooltip = _isTooltip; ++@synthesize isHeadless = _isHeadless; + @synthesize isShufflingForOrdering = _isShufflingForOrdering; + @synthesize preventKeyWindow = _preventKeyWindow; + @synthesize childWindowAddedHandler = _childWindowAddedHandler; +@@ -246,23 +248,6 @@ - (instancetype)initWithContentRect:(NSRect)contentRect + return self; + } + +-- (BOOL)isHeadless { +- return _headless_info != nullptr; +-} +- +-- (void)setIsHeadless:(BOOL)isHeadless { +- // NativeWidgetMacNSWindowHeadlessInfo constructor overrides certain NSWindow +- // methods in order to implement headless mode behavior. This affects all +- // NativeWidgetMacNSWindow instances, however, the overrides will fallback to +- // the original implementations if there is no headless info associated with +- // the window. +- if (isHeadless) { +- _headless_info = std::make_unique(); +- } else { +- _headless_info.reset(); +- } +-} +- + - (NativeWidgetMacNSWindowHeadlessInfo*)headlessInfo { + return _headless_info.get(); + } diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -index b620a31aed5801160dc49d964df56410786e6f2e..6161185d8360822cf349114e530aa896f01af25c 100644 +index b99b8ec014c81c1d6ad14a6758568dd864102e2a..5747d9b79444674b65d481248fb0576679cdef4e 100644 --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -@@ -533,7 +533,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -534,7 +534,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { is_translucent_window_ = params->is_translucent; pending_restoration_data_ = params->state_restoration_data; diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index c009a4da29..cd74261545 100644 --- a/patches/chromium/fix_aspect_ratio_with_max_size.patch +++ b/patches/chromium/fix_aspect_ratio_with_max_size.patch @@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the BrowserWindow. diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 88010fe24109d006ff2e1a37f39c0db8e2be1c4f..196a4bd514ac8cfb071f6b6211221cd8465bd725 100644 +index b68f7c997fab3f370bad77a956c77579fcd24a51..180fe676748d9f4b2ad5e26c7e35ee14c8a79f11 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3859,17 +3859,30 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3874,17 +3874,30 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, delegate_->GetMinMaxSize(&min_window_size, &max_window_size); min_window_size = delegate_->DIPToScreenSize(min_window_size); max_window_size = delegate_->DIPToScreenSize(max_window_size); diff --git a/patches/chromium/fix_check_for_file_existence_before_setting_mtime.patch b/patches/chromium/fix_check_for_file_existence_before_setting_mtime.patch index 541aeadd6f..65bf3b41dc 100644 --- a/patches/chromium/fix_check_for_file_existence_before_setting_mtime.patch +++ b/patches/chromium/fix_check_for_file_existence_before_setting_mtime.patch @@ -8,7 +8,7 @@ Check for broken links by confirming the file exists before setting its utime. This patch should be upstreamed & removed. diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py -index 91dfea4fa3724a9d8120381503aa9caa9ba36f25..a4136cf157cc2c2df0812f4b7d622d68e0ff386b 100755 +index 0700060feb2b0384b4f0ea2a36a4af42df5054d5..3607160a83c1e0246738abb23b10dc3a0a824651 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -201,10 +201,9 @@ def DownloadAndUnpack(url, output_dir, path_prefixes=None, is_known_zip=False): diff --git a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch index 02fb945f2a..02adc03444 100644 --- a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch +++ b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch @@ -28,10 +28,10 @@ The patch should be removed in favor of either: Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index 3dd0679aa8bc2e86fecb07f92cb1385001684cd7..1fb2b5f777a98ec3da68b9915ce41869580ce5ac 100644 +index 39f86bf7117adcbaa11c147dfe07981279cb0265..673d89a63bd34bc0535a488c8449686ba3e7d5e6 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -11657,6 +11657,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() { +@@ -11683,6 +11683,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() { target_rph_id); } @@ -44,7 +44,7 @@ index 3dd0679aa8bc2e86fecb07f92cb1385001684cd7..1fb2b5f777a98ec3da68b9915ce41869 // origin of |common_params.url| and/or |common_params.initiator_origin|. url::Origin resolved_origin = url::Origin::Resolve( diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc -index d04e85a56a536ef119e041460603dda0d1122f3a..b3f860f282f666e395d1f006569bb2b66712d27e 100644 +index a2aebaac0ff383b2afc4a050c69dfd11df719e24..c7d98a8b648a25fe38370a1546d5a6439571facb 100644 --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc @@ -2321,6 +2321,7 @@ Frame* DocumentLoader::CalculateOwnerFrame() { diff --git a/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch b/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch index e76ab4fdc5..084f134ef6 100644 --- a/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch +++ b/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch @@ -13,10 +13,10 @@ messages in the legacy window handle layer. These conditions are regularly hit with WCO-enabled windows on Windows. diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc -index d7e38fbec97d3df8493bb2a766d26a0a78b0bf62..dff6fec488f0011d3929e1db4da4be1ea64bb0df 100644 +index a19ddfe9f82684bec4e18ca71b285aa0849acd33..bfd37eda48ba59cda50dafebbd44f758ff438fc0 100644 --- a/content/browser/renderer_host/legacy_render_widget_host_win.cc +++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc -@@ -381,12 +381,12 @@ LRESULT LegacyRenderWidgetHostHWND::OnKeyboardRange(UINT message, +@@ -363,12 +363,12 @@ LRESULT LegacyRenderWidgetHostHWND::OnKeyboardRange(UINT message, LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) { @@ -31,7 +31,7 @@ index d7e38fbec97d3df8493bb2a766d26a0a78b0bf62..dff6fec488f0011d3929e1db4da4be1e tme.hwndTrack = hwnd(); tme.dwHoverTime = 0; TrackMouseEvent(&tme); -@@ -419,7 +419,10 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, +@@ -401,7 +401,10 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, // the picture. if (!msg_handled && (message >= WM_NCMOUSEMOVE && message <= WM_NCXBUTTONDBLCLK)) { @@ -44,14 +44,14 @@ index d7e38fbec97d3df8493bb2a766d26a0a78b0bf62..dff6fec488f0011d3929e1db4da4be1e } return ret; diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.h b/content/browser/renderer_host/legacy_render_widget_host_win.h -index ec3e5576b0b5f5c6f2ed5158a80d7816dbfbb702..ac5005fe7378ae1628db161b49fe16ea0a93b33a 100644 +index 185391c70440d89f96030fdb4a8d60b90d4c4ffa..9ee57fdc726a37500d44e5f52371e6a35d06cd43 100644 --- a/content/browser/renderer_host/legacy_render_widget_host_win.h +++ b/content/browser/renderer_host/legacy_render_widget_host_win.h -@@ -109,6 +109,7 @@ class CONTENT_EXPORT LegacyRenderWidgetHostHWND +@@ -97,6 +97,7 @@ class CONTENT_EXPORT LegacyRenderWidgetHostHWND CR_MESSAGE_HANDLER_EX(WM_NCHITTEST, OnNCHitTest) CR_MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnMouseRange) + CR_MESSAGE_HANDLER_EX(WM_NCMOUSELEAVE, OnMouseLeave) CR_MESSAGE_HANDLER_EX(WM_NCCALCSIZE, OnNCCalcSize) CR_MESSAGE_HANDLER_EX(WM_SIZE, OnSize) - CR_MESSAGE_HANDLER_EX(WM_CREATE, OnCreate) + CR_MESSAGE_HANDLER_EX(WM_DESTROY, OnDestroy) diff --git a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch index 1830d27fab..8a4fe8a0ae 100644 --- a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch +++ b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch @@ -87,10 +87,10 @@ index 75df43e3cd2721a92c90c18154d53d5c203e2465..ce42c75c8face36d21f53f44c0201ac4 // The view with active text input state, i.e., a focused element. // It will be nullptr if no such view exists. Note that the active view diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 3649b08b774c2bc2d8b314f6a4d02a67444de305..aa42c0a3815cb28387ee57dcfe1fc30a7b6500f1 100644 +index 2460932f2f8ed1a6d80b8fea0453ce550e428885..4b5c7b2f8ea61dc156b6136991f25b91190fd4e6 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -10198,7 +10198,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( +@@ -10202,7 +10202,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( "WebContentsImpl::OnFocusedElementChangedInFrame", "render_frame_host", frame); RenderWidgetHostViewBase* root_view = diff --git a/patches/chromium/fix_os_crypt_async_cookie_encryption.patch b/patches/chromium/fix_os_crypt_async_cookie_encryption.patch index b13e9ea65e..486d37a5dd 100644 --- a/patches/chromium/fix_os_crypt_async_cookie_encryption.patch +++ b/patches/chromium/fix_os_crypt_async_cookie_encryption.patch @@ -17,10 +17,10 @@ Revert "Reland "Port net::CookieCryptoDelegate to os_crypt async"" This reverts commit f01b115c7e21a09cc762f65bf7fd9c6ea9d9d0f8. diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 464b75de67b41f3a947af2cb885e1aada0f5869d..0272712c00c1e59d79d83e4b610482c79addd52e 100644 +index c75d7e336ad00230c2a7852f62c69b8f0cae748d..8e80ebd537871b204f254a4468996350b8f4f231 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -740,6 +740,8 @@ static_library("browser") { +@@ -716,6 +716,8 @@ static_library("browser") { "net/chrome_report_sender.h", "net/convert_explicitly_allowed_network_ports_pref.cc", "net/convert_explicitly_allowed_network_ports_pref.h", @@ -192,7 +192,7 @@ index b862afe7663111a6cbd342d33723942770bb0490..9dc46cedb109cea63bf71aa43fc7a2b6 #include "services/network/public/mojom/network_context.mojom.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc -index 0f49109d35e6af1416f402baaa1aed64311f0ace..cd669a8deae1687877a75a05fa9c4c7b52720246 100644 +index 223c7a55b1db65430d22dcff9898845ccaca68a0..9f7347a39c1a0a982632fc6a6b04240b0a3b9510 100644 --- a/chrome/browser/net/system_network_context_manager.cc +++ b/chrome/browser/net/system_network_context_manager.cc @@ -919,13 +919,8 @@ void SystemNetworkContextManager::DisableQuic() { @@ -491,7 +491,7 @@ index bb308187837371ecfa2482affaf35ac7ed98c1f3..1e554fe95b0521a883ced83fc67f5d52 sources = [ "os_crypt.h", diff --git a/headless/BUILD.gn b/headless/BUILD.gn -index 3b7ac1e77fb8f1696e6fea46e5e76fd05151b6c0..fa9731f028cf2e2ba7c821e67d3fca95f3e16f36 100644 +index 0d07069219883d28af7add90ad4509a94109603f..b732da23aa014aaa3525bbadaec97178d7844e04 100644 --- a/headless/BUILD.gn +++ b/headless/BUILD.gn @@ -373,7 +373,6 @@ component("headless_non_renderer") { @@ -731,10 +731,10 @@ index 91d74eaadd9f4d451e809b38a2f999b298068820..e45427ce90f909e609688ab59f4581b1 mojo::PendingRemote<::network::mojom::NetworkContext> system_context_; }; diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 53cee001783f11a6364e66e4845c95eb27113285..24263b12793249fe823d62e62e7751ce9cdb6aa2 100644 +index f9e704f9dc76f802b330487238717a6df3ba7b36..1702b7f7603d98e2f08a8af7310daa1fb3250d54 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -3252,12 +3252,7 @@ NetworkContext::MakeSessionCleanupCookieStore() const { +@@ -3274,12 +3274,7 @@ NetworkContext::MakeSessionCleanupCookieStore() const { crypto_delegate = std::make_unique( std::move(params_->cookie_encryption_provider)); } else { @@ -749,7 +749,7 @@ index 53cee001783f11a6364e66e4845c95eb27113285..24263b12793249fe823d62e62e7751ce } diff --git a/services/network/public/cpp/BUILD.gn b/services/network/public/cpp/BUILD.gn -index b48bdf27cd97142ceebc1f0b769b502bf037ce36..3b1424b6df37aa4a3cd341e8b89524e34480d4ac 100644 +index eb6d8e40d27b7d1027e9afcace37aad487c333d7..3916ffd9787183bdd1e04dce1fe8e9dafd16b338 100644 --- a/services/network/public/cpp/BUILD.gn +++ b/services/network/public/cpp/BUILD.gn @@ -69,8 +69,6 @@ component("cpp") { @@ -761,7 +761,7 @@ index b48bdf27cd97142ceebc1f0b769b502bf037ce36..3b1424b6df37aa4a3cd341e8b89524e3 "cors/cors.cc", "cors/cors.h", "cors/origin_access_list.cc", -@@ -187,8 +185,6 @@ component("cpp") { +@@ -191,8 +189,6 @@ component("cpp") { deps = [ "//base", "//components/link_header_util", @@ -771,10 +771,10 @@ index b48bdf27cd97142ceebc1f0b769b502bf037ce36..3b1424b6df37aa4a3cd341e8b89524e3 "//ipc", "//net", diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index b78bde54c454a986ae8b2ed68bf0cf5a3d10568f..23c76697cc74f342b8c6786ec62b257ad1c2efd8 100644 +index 0a837fbd18a0e597805b418a7f3022c499fb0c41..e511f65399c20cb9889c56a1c2c9e97eb84b3bf2 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -573,9 +573,10 @@ struct NetworkContextParams { +@@ -576,9 +576,10 @@ struct NetworkContextParams { bool acam_preflight_spec_conformant = true; // Sets the cookie encryption provider to be used by this network context if diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index b4911ab247..db6fe5fbfb 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -25,7 +25,7 @@ index 8be4ca70ff71cfc33cd812ec0cc9ae8155538532..f7985331838387232b27e557e4351134 // Returns true if duplex mode is set. bool SetDuplexModeInPrintSettings(mojom::DuplexMode mode); diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm -index 72f8e7e8fd00f55f7e4338fe585f9da03d105cd4..8b57241f09889dabdc283b2b9cd804eaa4816e27 100644 +index 4f15b217fcf8119f323e04596978c6710d73727a..7ffd6c873a4320c76605417819a8b71ffd9ced65 100644 --- a/printing/printing_context_mac.mm +++ b/printing/printing_context_mac.mm @@ -543,7 +543,8 @@ bool IsIppColorModelColorful(mojom::ColorModel color_model) { @@ -113,7 +113,7 @@ index f8e903f21cee7041dea67b479c298baf9093d719..ed5d59f29992b0925efd89cb0ac4b33a } else { // No need to bother, we don't know how many pages are available. diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc -index bd4a853bdb365045075092301b66116f016708fd..9540053fd35e84e60096c91e5f65ec7b6930720e 100644 +index 16c80d9ff00089ced6d65dc618316079b9204ba2..96fb7867eb92e19bc8513907124b2cfdaecc4c55 100644 --- a/ui/gtk/printing/print_dialog_gtk.cc +++ b/ui/gtk/printing/print_dialog_gtk.cc @@ -21,6 +21,7 @@ diff --git a/patches/chromium/fix_remove_caption-removing_style_call.patch b/patches/chromium/fix_remove_caption-removing_style_call.patch index ee0f63eece..0fb776dcd7 100644 --- a/patches/chromium/fix_remove_caption-removing_style_call.patch +++ b/patches/chromium/fix_remove_caption-removing_style_call.patch @@ -18,10 +18,10 @@ or resizing, but Electron does not seem to run into that issue for opaque frameless windows even with that block commented out. diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 5bf619a30b7ae95c0369f472e4062b93199c3716..ed350871f73dd47e1a7de767ac7c8771fe1a2cea 100644 +index bbefa1324800849b389efbe487ad6631615327e7..10985dbb1d89a2e0b79ed4f9411a179c80bf98ed 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1869,7 +1869,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) { +@@ -1875,7 +1875,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) { SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS), 0); diff --git a/patches/chromium/fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch b/patches/chromium/fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch index bc251da9c3..b0edd5e21f 100644 --- a/patches/chromium/fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch +++ b/patches/chromium/fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch @@ -8,7 +8,7 @@ such as the background turning black when maximizing the window and dynamic background material settings not taking effect. 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 724a094c1b9a3c1efaf65c5222e40433a374b76d..30713bfd13909446977605748000aa54a0fca3fc 100644 +index 2bf4889631ea93ab34bad6e69b301f1b09844840..d366e440dddde5627743e21ce0e184cd485bf76a 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 @@ -183,6 +183,10 @@ void DesktopWindowTreeHostWin::FinishTouchDrag(gfx::Point screen_point) { @@ -36,10 +36,10 @@ index 0cd07fd5fb55dcc0d972de4c027fcb895d156592..0f4d335e1d54b5e92fc217080d86513d // Overridden from DesktopWindowTreeHost: void Init(const Widget::InitParams& params) override; diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index ed350871f73dd47e1a7de767ac7c8771fe1a2cea..fa27bf763ab4d82ebba7925025e1e245620f3f0b 100644 +index 10985dbb1d89a2e0b79ed4f9411a179c80bf98ed..f2a0cef99f44599d8b801bf490e7bcb0da7aa339 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1002,13 +1002,13 @@ void HWNDMessageHandler::FrameTypeChanged() { +@@ -1008,13 +1008,13 @@ void HWNDMessageHandler::FrameTypeChanged() { void HWNDMessageHandler::PaintAsActiveChanged() { if (!delegate_->HasNonClientView() || !delegate_->CanActivate() || @@ -55,7 +55,7 @@ index ed350871f73dd47e1a7de767ac7c8771fe1a2cea..fa27bf763ab4d82ebba7925025e1e245 } void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon, -@@ -1093,7 +1093,14 @@ void HWNDMessageHandler::SizeConstraintsChanged() { +@@ -1099,7 +1099,14 @@ void HWNDMessageHandler::SizeConstraintsChanged() { // allowing ui::GetResizableFrameThickness() to be used consistently when // removing the visible system frame. const bool had_caption_on_init = window_style() & WS_CAPTION; @@ -71,7 +71,7 @@ index ed350871f73dd47e1a7de767ac7c8771fe1a2cea..fa27bf763ab4d82ebba7925025e1e245 const bool can_maximize = can_resize && delegate_->CanMaximize(); auto set_style_func = [&style](LONG bit, bool should_set) { -@@ -1691,11 +1698,16 @@ void HWNDMessageHandler::ResetWindowRegion(bool force, bool redraw) { +@@ -1697,11 +1704,16 @@ void HWNDMessageHandler::ResetWindowRegion(bool force, bool redraw) { // through, but that isn't the case when using Direct3D to draw transparent // windows. So we route translucent windows throught to the delegate to // allow for a custom hit mask. @@ -89,7 +89,7 @@ index ed350871f73dd47e1a7de767ac7c8771fe1a2cea..fa27bf763ab4d82ebba7925025e1e245 return; } -@@ -2444,17 +2456,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message, +@@ -2449,17 +2461,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message, delegate_->SchedulePaint(); } diff --git a/patches/chromium/fix_restore_original_resize_performance_on_macos.patch b/patches/chromium/fix_restore_original_resize_performance_on_macos.patch index 1f00a559e4..1a3928c046 100644 --- a/patches/chromium/fix_restore_original_resize_performance_on_macos.patch +++ b/patches/chromium/fix_restore_original_resize_performance_on_macos.patch @@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop vs mobile runtimes. i.e. restore the old logic only on desktop platforms diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 671e8054e7373be2ac5d67722a56149a72f47051..e344d188e4b250074acfa058782a76841b9295b8 100644 +index a1487f8aabb5ebfef85d4b9bf4bcac2b1370c70c..e5fcc7acc4823f3b9396c431815d9d97a986f86b 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2168,9 +2168,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() { +@@ -2181,9 +2181,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() { void RenderWidgetHostImpl::NotifyScreenInfoChanged() { // The resize message (which may not happen immediately) will carry with it // the screen info as well as the new size (if the screen has changed scale diff --git a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch index 3e912f92d0..e225661718 100644 --- a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -8,10 +8,10 @@ v8::Value instead of base::Value. Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1323953 diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc -index cf5dee0e4531dc1e57a41a6f3e8a3e9f84560545..71eaed03a15ba2ab5bae874daecfb0e95ac7c64d 100644 +index 8ce2c7f2739ef1342b323fbf27160f52990e2b56..393aa9918c97e9d61ef0f6e596aeeaa3d93862c6 100644 --- a/extensions/renderer/script_injection.cc +++ b/extensions/renderer/script_injection.cc -@@ -317,6 +317,7 @@ void ScriptInjection::InjectJs(std::set* executing_scripts, +@@ -319,6 +319,7 @@ void ScriptInjection::InjectJs(std::set* executing_scripts, blink::mojom::LoadEventBlockingOption::kBlock, base::BindOnce(&ScriptInjection::OnJsInjectionCompleted, weak_ptr_factory_.GetWeakPtr()), @@ -59,10 +59,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..a54f1b3351efd2d8f324436f7f35cd43 #endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index d39312542b93c4c5eaf4580c2a8d20290cf82a89..7505059ad085c6465598cd65756d11d4ef5b4aa1 100644 +index ed1bc8e58a982091dd00134b4915ddc758bfe507..157cae42179da715a8d5b6d9697cfc673fbdcab3 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -3210,6 +3210,7 @@ void LocalFrame::RequestExecuteScript( +@@ -3220,6 +3220,7 @@ void LocalFrame::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -70,7 +70,7 @@ index d39312542b93c4c5eaf4580c2a8d20290cf82a89..7505059ad085c6465598cd65756d11d4 BackForwardCacheAware back_forward_cache_aware, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_behavior) { -@@ -3267,7 +3268,7 @@ void LocalFrame::RequestExecuteScript( +@@ -3277,7 +3278,7 @@ void LocalFrame::RequestExecuteScript( PausableScriptExecutor::CreateAndRun( script_state, std::move(script_sources), execute_script_policy, user_gesture, evaluation_timing, blocking_option, want_result_option, @@ -92,7 +92,7 @@ index c0e8a5798c9c6ec6273fcaf4f19bdcc74108efdc..d56938ac2d6b7a0927e52590ad2ed757 mojom::blink::WantResultOption, mojom::blink::PromiseResultOption); diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc -index b71dc96ea8311fb97855fb02a021e2b863d847e9..34fc2d61b1a5648f3e4c94a33b270424cfe5a56c 100644 +index 556d17c107ae4d6d5fbeb97ef3ddb58d48e453e5..20c9be2070dd64eb87eda5c4a7ec2d29ddd52700 100644 --- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc +++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc @@ -985,6 +985,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( @@ -104,7 +104,7 @@ index b71dc96ea8311fb97855fb02a021e2b863d847e9..34fc2d61b1a5648f3e4c94a33b270424 wants_result ? mojom::blink::WantResultOption::kWantResultDateAndRegExpAllowed diff --git a/third_party/blink/renderer/core/frame/pausable_script_executor.cc b/third_party/blink/renderer/core/frame/pausable_script_executor.cc -index 2b83e5d674d54bff121153c22d17d560114b70d6..77f1c2eafc02a0852da77774604ddb045aca18e0 100644 +index e3910789cf46db6c46efb6632b1e46b1232c064f..490b19556981b50dbb1cea348b27c3599753112e 100644 --- a/third_party/blink/renderer/core/frame/pausable_script_executor.cc +++ b/third_party/blink/renderer/core/frame/pausable_script_executor.cc @@ -10,6 +10,7 @@ @@ -115,7 +115,7 @@ index 2b83e5d674d54bff121153c22d17d560114b70d6..77f1c2eafc02a0852da77774604ddb04 #include "base/logging.h" #include "base/numerics/safe_conversions.h" #include "third_party/blink/public/mojom/frame/user_activation_notification_type.mojom-blink.h" -@@ -243,7 +244,7 @@ void PausableScriptExecutor::CreateAndRun( +@@ -248,7 +249,7 @@ void PausableScriptExecutor::CreateAndRun( script_state, mojom::blink::UserActivationOption::kDoNotActivate, mojom::blink::LoadEventBlockingOption::kDoNotBlock, want_result_option, mojom::blink::PromiseResultOption::kDoNotWait, @@ -124,7 +124,7 @@ index 2b83e5d674d54bff121153c22d17d560114b70d6..77f1c2eafc02a0852da77774604ddb04 MakeGarbageCollected(isolate, function, receiver, argc, argv)); executor->Run(); -@@ -258,10 +259,11 @@ void PausableScriptExecutor::CreateAndRun( +@@ -263,10 +264,11 @@ void PausableScriptExecutor::CreateAndRun( mojom::blink::LoadEventBlockingOption blocking_option, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_result_option, @@ -138,7 +138,7 @@ index 2b83e5d674d54bff121153c22d17d560114b70d6..77f1c2eafc02a0852da77774604ddb04 MakeGarbageCollected(std::move(sources), execute_script_policy)); switch (evaluation_timing) { -@@ -283,6 +285,14 @@ void PausableScriptExecutor::ContextDestroyed() { +@@ -288,6 +290,14 @@ void PausableScriptExecutor::ContextDestroyed() { ScriptState::Scope script_scope(script_state_); std::move(callback_).Run({}, {}); } @@ -153,7 +153,7 @@ index 2b83e5d674d54bff121153c22d17d560114b70d6..77f1c2eafc02a0852da77774604ddb04 Dispose(); } -@@ -293,10 +303,12 @@ PausableScriptExecutor::PausableScriptExecutor( +@@ -298,10 +308,12 @@ PausableScriptExecutor::PausableScriptExecutor( mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_result_option, WebScriptExecutionCallback callback, @@ -166,7 +166,7 @@ index 2b83e5d674d54bff121153c22d17d560114b70d6..77f1c2eafc02a0852da77774604ddb04 user_activation_option_(user_activation_option), blocking_option_(blocking_option), want_result_option_(want_result_option), -@@ -420,6 +432,13 @@ void PausableScriptExecutor::HandleResults( +@@ -425,6 +437,13 @@ void PausableScriptExecutor::HandleResults( std::move(callback_).Run(std::move(value), start_time_); } @@ -211,10 +211,10 @@ index f2c94689450f0333a144ccf82cf147c194896e6b..1c2e9fe36c297f7d614d9ca290e4d13c const mojom::blink::UserActivationOption user_activation_option_; const mojom::blink::LoadEventBlockingOption blocking_option_; diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc -index 6e7fd9f4350bd005c76d09585f15e3bbf5cb7282..6e29e0dfcca54fb6cc2782bc2683cb9e367434d3 100644 +index 070c53703e8af06b73eae0be07aa5d6f8496f777..5e6585e7d6129ff9ee45d9fce972775c9b3ab51c 100644 --- a/third_party/blink/renderer/core/frame/web_frame_test.cc +++ b/third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -296,6 +296,7 @@ void ExecuteScriptsInMainWorld( +@@ -298,6 +298,7 @@ void ExecuteScriptsInMainWorld( DOMWrapperWorld::kMainWorldId, sources, user_gesture, mojom::blink::EvaluationTiming::kSynchronous, mojom::blink::LoadEventBlockingOption::kDoNotBlock, std::move(callback), diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index aebf648fa5..4942e35a01 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 581d86c4ec4f437d7195c003d8776795f59cf696..632d2645d4ed3a8e83070f08320b2252ad3c6e18 100644 +index 40bec6c27e5f6b27abaabd07d77535a1f6a2e09f..3a70911b9015ae83d88a886cf9fafe853bb966a5 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -4851,6 +4851,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -4850,6 +4850,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,7 +20,7 @@ index 581d86c4ec4f437d7195c003d8776795f59cf696..632d2645d4ed3a8e83070f08320b2252 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index ef0171853547a4172f2bd933abb043963923390b..862552caa208fe1b5fa8453c71aaad4aad8842f0 100644 +index 5280ea840a979dc2cd9d77fae9c2cfbb10105f4a..aced90838f8be0c50345192e858ddac9662be458 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -350,6 +350,11 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/chromium/graphite_handle_out_of_order_recording_errors.patch b/patches/chromium/graphite_handle_out_of_order_recording_errors.patch deleted file mode 100644 index 64781f0c81..0000000000 --- a/patches/chromium/graphite_handle_out_of_order_recording_errors.patch +++ /dev/null @@ -1,348 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Sunny Sachanandani -Date: Fri, 30 Jan 2026 12:51:05 -0800 -Subject: [graphite] Handle out of order recording errors - -Explicitly handle out of order recording errors to crash just like async -shader compile failed errors. Also, emit the insert status to an UMA -histogram at 1% subsampling and log all error statuses at runtime. - -Bug: 458722690 -Change-Id: Id94657be6ae870dcf8adba71aff216386a6a6964 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7533855 -Commit-Queue: Sunny Sachanandani -Auto-Submit: Sunny Sachanandani -Reviewed-by: Jonathan Ross -Reviewed-by: Michael Ludwig -Cr-Commit-Position: refs/heads/main@{#1577487} - -diff --git a/gpu/command_buffer/service/graphite_shared_context.cc b/gpu/command_buffer/service/graphite_shared_context.cc -index f9a47ac16bddc2352d81f43629d8ce8c2d2b3b99..9856d68f893e4329fda5d002835613161b346bc1 100644 ---- a/gpu/command_buffer/service/graphite_shared_context.cc -+++ b/gpu/command_buffer/service/graphite_shared_context.cc -@@ -4,7 +4,10 @@ - - #include "gpu/command_buffer/service/graphite_shared_context.h" - -+#include "base/logging.h" - #include "base/memory/ptr_util.h" -+#include "base/metrics/histogram_macros.h" -+#include "base/rand_util.h" - #include "base/task/single_thread_task_runner.h" - #include "gpu/command_buffer/common/shm_count.h" - #include "third_party/skia/include/core/SkColorSpace.h" -@@ -14,6 +17,44 @@ - namespace gpu { - - namespace { -+// This is emitted to UMA - values should not be reordered, only appended! -+// LINT.IfChange(InsertRecordingStatusUma) -+enum class InsertRecordingStatusUma { -+ kSuccess, -+ kInvalidRecording, -+ kPromiseImageInstantiationFailed, -+ kAddCommandsFailed, -+ kAsyncShaderCompilesFailed, -+ kOutOfOrderRecording, -+ kMaxValue = kOutOfOrderRecording -+}; -+// LINT.ThenChange(//tools/metrics/histograms/metadata/gpu/enums.xml:GraphiteInsertRecordingStatus) -+ -+InsertRecordingStatusUma InsertRecordingStatusUma( -+ skgpu::graphite::InsertStatus insert_status) { -+ // InsertStatus almost behaves like an enum class, but not quite since it can -+ // convert to both bool and integer types and can't be used in a switch. -+ if (insert_status == skgpu::graphite::InsertStatus::kSuccess) { -+ return InsertRecordingStatusUma::kSuccess; -+ } else if (insert_status == -+ skgpu::graphite::InsertStatus::kInvalidRecording) { -+ return InsertRecordingStatusUma::kInvalidRecording; -+ } else if (insert_status == -+ skgpu::graphite::InsertStatus::kPromiseImageInstantiationFailed) { -+ return InsertRecordingStatusUma::kPromiseImageInstantiationFailed; -+ } else if (insert_status == -+ skgpu::graphite::InsertStatus::kAddCommandsFailed) { -+ return InsertRecordingStatusUma::kAddCommandsFailed; -+ } else if (insert_status == -+ skgpu::graphite::InsertStatus::kAsyncShaderCompilesFailed) { -+ return InsertRecordingStatusUma::kAsyncShaderCompilesFailed; -+ } else if (insert_status == -+ skgpu::graphite::InsertStatus::kOutOfOrderRecording) { -+ return InsertRecordingStatusUma::kOutOfOrderRecording; -+ } -+ NOTREACHED(); -+} -+ - struct RecordingContext { - skgpu::graphite::GpuFinishedProc old_finished_proc; - skgpu::graphite::GpuFinishedContext old_context; -@@ -216,20 +257,38 @@ bool GraphiteSharedContext::InsertRecordingImpl( - - auto insert_status = graphite_context_->insertRecording(*info_ptr); - -- // TODO(433845560): Check the kAddCommandsFailed failures. -- // Crash only if we're not simulating a failure for testing. - const bool simulating_insert_failure = - info_ptr->fSimulatedStatus != skgpu::graphite::InsertStatus::kSuccess; - -- // InsertStatus::kAsyncShaderCompilesFailed is also an unrecoverable error for -- // which we should also clear the disk shader cache in case the error was due -- // to a corrupted cached shader blob. -+ // Crash, log, or emit UMA only if we're not simulating a failure for testing. -+ if (!simulating_insert_failure) { -+ if (base::ShouldRecordSubsampledMetric(0.01)) { -+ UMA_HISTOGRAM_ENUMERATION("GPU.Graphite.InsertRecordingStatus", -+ InsertRecordingStatusUma(insert_status)); -+ } -+ if (insert_status != skgpu::graphite::InsertStatus::kSuccess) { -+ // skgpu::graphite::InsertStatus almost behaves like an enum class, but -+ // not quite - it can't be static_cast to an int. -+ LOG(ERROR) << "Graphite insertRecording failed with status " -+ << static_cast(InsertRecordingStatusUma(insert_status)); -+ } -+ } -+ -+ // kAsyncShaderCompilesFailed and kOutOfOrderRecording are unrecoverable -+ // failures because they cause future recordings to be rendered incorrectly. -+ // TODO(433845560): Check the kAddCommandsFailed failures. -+ const bool is_unrecoverable_failure = -+ insert_status == -+ skgpu::graphite::InsertStatus::kAsyncShaderCompilesFailed || -+ insert_status == skgpu::graphite::InsertStatus::kOutOfOrderRecording; -+ // For kAsyncShaderCompilesFailed, we should also clear the disk shader -+ // cache in case the error was due to a corrupted cached shader blob. -+ std::optional use_shader_cache; - if (insert_status == - skgpu::graphite::InsertStatus::kAsyncShaderCompilesFailed) { -- GpuProcessShmCount::ScopedIncrement use_shader_cache( -- use_shader_cache_shm_count_); -- CHECK(simulating_insert_failure); -+ use_shader_cache.emplace(use_shader_cache_shm_count_); - } -+ CHECK(simulating_insert_failure || !is_unrecoverable_failure); - - // All other failure modes are recoverable in the sense that future recordings - // will be rendered correctly, so merely return a boolean here so that callers -diff --git a/gpu/command_buffer/service/graphite_shared_context_unittest.cc b/gpu/command_buffer/service/graphite_shared_context_unittest.cc -index 0de107a9d86ff8217a4c537598f198f313ecf9df..852343ab6804efed962b707b748ddf1920c20ea7 100644 ---- a/gpu/command_buffer/service/graphite_shared_context_unittest.cc -+++ b/gpu/command_buffer/service/graphite_shared_context_unittest.cc -@@ -6,6 +6,7 @@ - - #include "base/threading/thread.h" - #include "gpu/command_buffer/common/shm_count.h" -+#include "gpu/command_buffer/service/skia_utils.h" - #include "skia/buildflags.h" - #include "testing/gmock/include/gmock/gmock.h" - #include "testing/gtest/include/gtest/gtest.h" -@@ -86,8 +87,7 @@ class GraphiteSharedContextTest : public testing::TestWithParam { - - wgpu::DeviceDescriptor device_desc = {}; - -- wgpu::Device device = -- wgpu::Adapter(adapters[0].Get()).CreateDevice(&device_desc); -+ auto device = wgpu::Adapter(adapters[0].Get()).CreateDevice(&device_desc); - CHECK(device); - - skgpu::graphite::DawnBackendContext backend_context = {}; -@@ -95,7 +95,11 @@ class GraphiteSharedContextTest : public testing::TestWithParam { - backend_context.fDevice = device; - backend_context.fQueue = device.GetQueue(); - -- skgpu::graphite::ContextOptions context_options = {}; -+ // Use the default Graphite context options that Chromium uses e.g. disallow -+ // things like out of order recordings. -+ gpu::GpuDriverBugWorkarounds workarounds; -+ auto context_options = GetDefaultGraphiteContextOptions(workarounds); -+ - graphite_shared_context_ = std::make_unique( - skgpu::graphite::ContextFactory::MakeDawn(backend_context, - context_options), -@@ -133,14 +137,12 @@ TEST_P(GraphiteSharedContextTest, ConcurrentAccess) { - auto run_graphite_functions = - [](GraphiteSharedContext* graphite_shared_context) { - // Call a method that acquires the lock -- std::unique_ptr recorder = -- graphite_shared_context->makeRecorder(); -+ auto recorder = graphite_shared_context->makeRecorder(); - EXPECT_TRUE(recorder); - - for (int i = 0; i < 2; ++i) { - for (int j = 0; j < 10; ++j) { -- std::unique_ptr recording = -- recorder->snap(); -+ auto recording = recorder->snap(); - skgpu::graphite::InsertRecordingInfo info = {}; - info.fRecording = recording.get(); - EXPECT_TRUE(recording); -@@ -172,18 +174,17 @@ TEST_P(GraphiteSharedContextTest, ConcurrentAccess) { - } - - TEST_P(GraphiteSharedContextTest, AsyncShaderCompilesFailed) { -- std::unique_ptr recorder = -- graphite_shared_context_->makeRecorder(); -+ auto recorder = graphite_shared_context_->makeRecorder(); - EXPECT_TRUE(recorder); - - auto ii = SkImageInfo::Make(64, 64, kN32_SkColorType, kPremul_SkAlphaType); -- sk_sp surface1 = SkSurfaces::RenderTarget(recorder.get(), ii); -+ auto surface1 = SkSurfaces::RenderTarget(recorder.get(), ii); - surface1->getCanvas()->clear(SK_ColorRED); - -- sk_sp surface2 = SkSurfaces::RenderTarget(recorder.get(), ii); -+ auto surface2 = SkSurfaces::RenderTarget(recorder.get(), ii); - surface2->getCanvas()->drawImage(surface1->makeTemporaryImage(), 0, 0); - -- std::unique_ptr recording = recorder->snap(); -+ auto recording = recorder->snap(); - EXPECT_TRUE(recording); - - skgpu::graphite::InsertRecordingInfo info = {}; -@@ -197,19 +198,43 @@ TEST_P(GraphiteSharedContextTest, AsyncShaderCompilesFailed) { - EXPECT_FALSE(graphite_shared_context_->insertRecording(info)); - } - -+TEST_P(GraphiteSharedContextTest, OutOfOrderRecording) { -+ auto recorder = graphite_shared_context_->makeRecorder(); -+ EXPECT_TRUE(recorder); -+ -+ auto ii = SkImageInfo::Make(64, 64, kN32_SkColorType, kPremul_SkAlphaType); -+ auto surface1 = SkSurfaces::RenderTarget(recorder.get(), ii); -+ surface1->getCanvas()->clear(SK_ColorRED); -+ auto recording1 = recorder->snap(); -+ EXPECT_TRUE(recording1); -+ -+ auto surface2 = SkSurfaces::RenderTarget(recorder.get(), ii); -+ surface2->getCanvas()->drawImage(surface1->makeTemporaryImage(), 0, 0); -+ auto recording2 = recorder->snap(); -+ EXPECT_TRUE(recording2); -+ -+ skgpu::graphite::InsertRecordingInfo info = {}; -+ -+ info.fRecording = recording2.get(); -+ graphite_shared_context_->insertRecording(info); -+ -+ info.fRecording = recording1.get(); -+ EXPECT_DEATH_IF_SUPPORTED(graphite_shared_context_->insertRecording(info), -+ ""); -+} -+ - TEST_P(GraphiteSharedContextTest, AddCommandsFailed) { -- std::unique_ptr recorder = -- graphite_shared_context_->makeRecorder(); -+ auto recorder = graphite_shared_context_->makeRecorder(); - EXPECT_TRUE(recorder); - - auto ii = SkImageInfo::Make(64, 64, kN32_SkColorType, kPremul_SkAlphaType); -- sk_sp surface1 = SkSurfaces::RenderTarget(recorder.get(), ii); -+ auto surface1 = SkSurfaces::RenderTarget(recorder.get(), ii); - surface1->getCanvas()->clear(SK_ColorRED); - -- sk_sp surface2 = SkSurfaces::RenderTarget(recorder.get(), ii); -+ auto surface2 = SkSurfaces::RenderTarget(recorder.get(), ii); - surface2->getCanvas()->drawImage(surface1->makeTemporaryImage(), 0, 0); - -- std::unique_ptr recording = recorder->snap(); -+ auto recording = recorder->snap(); - EXPECT_TRUE(recording); - - skgpu::graphite::InsertRecordingInfo info = {}; -@@ -223,39 +248,37 @@ TEST_P(GraphiteSharedContextTest, AddCommandsFailed) { - } - - TEST_P(GraphiteSharedContextTest, LowPendingRecordings) { -- std::unique_ptr recorder = -- graphite_shared_context_->makeRecorder(); -+ auto recorder = graphite_shared_context_->makeRecorder(); - EXPECT_TRUE(recorder); - -- std::unique_ptr recording = recorder->snap(); -- EXPECT_TRUE(recording); -- -- skgpu::graphite::InsertRecordingInfo info = {}; -- info.fRecording = recording.get(); -- - // No flush is expected if the number of pending recordings is low. - EXPECT_CALL(backend_flush_callback_, Flush()).Times(0); - - for (size_t i = 0; i < kMaxPendingRecordings - 1; ++i) { -+ auto recording = recorder->snap(); -+ EXPECT_TRUE(recording); -+ -+ skgpu::graphite::InsertRecordingInfo info = {}; -+ info.fRecording = recording.get(); -+ - EXPECT_TRUE(graphite_shared_context_->insertRecording(info)); - } - } - - TEST_P(GraphiteSharedContextTest, MaxPendingRecordings) { -- std::unique_ptr recorder = -- graphite_shared_context_->makeRecorder(); -+ auto recorder = graphite_shared_context_->makeRecorder(); - EXPECT_TRUE(recorder); - -- std::unique_ptr recording = recorder->snap(); -- EXPECT_TRUE(recording); -- -- skgpu::graphite::InsertRecordingInfo info = {}; -- info.fRecording = recording.get(); -- - // Expect a flush when the number of pending recordings reaches the max. - EXPECT_CALL(backend_flush_callback_, Flush()).Times(1); - - for (size_t i = 0; i < kMaxPendingRecordings; ++i) { -+ auto recording = recorder->snap(); -+ EXPECT_TRUE(recording); -+ -+ skgpu::graphite::InsertRecordingInfo info = {}; -+ info.fRecording = recording.get(); -+ - EXPECT_TRUE(graphite_shared_context_->insertRecording(info)); - } - } -diff --git a/tools/metrics/histograms/metadata/gpu/enums.xml b/tools/metrics/histograms/metadata/gpu/enums.xml -index 2df046e16f9186c340042506eb23a2526e515528..106bbdf71a3a067a7378486caa8423a839465455 100644 ---- a/tools/metrics/histograms/metadata/gpu/enums.xml -+++ b/tools/metrics/histograms/metadata/gpu/enums.xml -@@ -1112,6 +1112,19 @@ Called by update_gpu_driver_bug_workaround_entries.py.--> - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - -diff --git a/tools/metrics/histograms/metadata/gpu/histograms.xml b/tools/metrics/histograms/metadata/gpu/histograms.xml -index 6b28a436fb4be0ba088de243f54134b4b024bfd4..f67c31921c224dcd9e94f07d60f32ec16debaaac 100644 ---- a/tools/metrics/histograms/metadata/gpu/histograms.xml -+++ b/tools/metrics/histograms/metadata/gpu/histograms.xml -@@ -1033,6 +1033,16 @@ chromium-metrics-reviews@google.com. - - - -+ -+ sunnyps@chromium.org -+ michaelludwig@google.com -+ chrome-gpu-metric-alerts@chromium.org -+ -+ The return value for each Graphite insertRecording call made by Chromium. -+ -+ -+ - - vasilyt@chromium.org diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index a0645326e2..39fa66e5b3 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 9c95ec9dc4923c0a4d1b4aef7102821f12124fb8..6a5b88a70392f99b1fdf34a3ea7f222f29f38803 100644 +index 13e0cd7958522192144e3488940ff2fffabb3cee..a246a95bcf26ca00a31161183d0b321168b62052 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -1629,6 +1629,11 @@ +@@ -1636,6 +1636,11 @@ "messages": [10120], }, diff --git a/patches/chromium/loaf_add_feature_to_enable_sourceurl_for_all_protocols.patch b/patches/chromium/loaf_add_feature_to_enable_sourceurl_for_all_protocols.patch index d4155df7bb..dd8b05bd59 100644 --- a/patches/chromium/loaf_add_feature_to_enable_sourceurl_for_all_protocols.patch +++ b/patches/chromium/loaf_add_feature_to_enable_sourceurl_for_all_protocols.patch @@ -15,10 +15,10 @@ Reviewed-by: Noam Rosenthal Cr-Commit-Position: refs/heads/main@{#1579397} diff --git a/third_party/blink/renderer/core/frame/animation_frame_timing_monitor.cc b/third_party/blink/renderer/core/frame/animation_frame_timing_monitor.cc -index 24e58da8eaa9319e2bb626c69d5ad23de720e108..0ffea9dafe3e3dffcbaf9031082aa88dccb46267 100644 +index 20eb792c45d23874fb6a3982a335a140820a94d0..1e8c8c6f73bf576f10cb32beb80cadcaa9516b71 100644 --- a/third_party/blink/renderer/core/frame/animation_frame_timing_monitor.cc +++ b/third_party/blink/renderer/core/frame/animation_frame_timing_monitor.cc -@@ -516,8 +516,15 @@ void AnimationFrameTimingMonitor::Trace(Visitor* visitor) const { +@@ -524,8 +524,15 @@ void AnimationFrameTimingMonitor::Trace(Visitor* visitor) const { visitor->Trace(frame_handling_input_); } @@ -35,7 +35,7 @@ index 24e58da8eaa9319e2bb626c69d5ad23de720e108..0ffea9dafe3e3dffcbaf9031082aa88d return kurl.ProtocolIsData() || kurl.ProtocolIsInHTTPFamily() || kurl.ProtocolIs("blob") || kurl.IsEmpty(); diff --git a/third_party/blink/renderer/core/frame/animation_frame_timing_monitor.h b/third_party/blink/renderer/core/frame/animation_frame_timing_monitor.h -index f2fe39be2db525d89fcd9787c2ae9285babab26d..c395cf39d404f6c4f6f6e23c9fb8dfe92151a7d2 100644 +index 60a891c17f34ec617c86d0fcbfcec0f2469bdd07..91475dfc3175cf49b8396c9f029cb25bf3ec1e75 100644 --- a/third_party/blink/renderer/core/frame/animation_frame_timing_monitor.h +++ b/third_party/blink/renderer/core/frame/animation_frame_timing_monitor.h @@ -22,6 +22,11 @@ class TimeTicks; diff --git a/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch b/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch index f7826baa4a..41c30f4465 100644 --- a/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch +++ b/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch @@ -50,10 +50,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to system priority. diff --git a/base/BUILD.gn b/base/BUILD.gn -index d68e37353cb4c5037b080f9a23dc252bbba2db4a..7b101305f8986cb5d1e8c0ac60f48ddc6fccf8eb 100644 +index 01b3ae3c904b76a0421f0562cfcd887980087d80..b712db260fb9b941da82b6a4d1849db1964074c2 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1081,6 +1081,7 @@ component("base") { +@@ -1084,6 +1084,7 @@ component("base") { "//build:ios_buildflags", "//build/config/compiler:compiler_buildflags", "//third_party/modp_b64", @@ -255,11 +255,11 @@ index e12c1d078147d956a1d9b1bc498c1b1d6fe7b974..233362259dc4e728ed37435e65041764 } // namespace base diff --git a/components/os_crypt/common/keychain_password_mac.mm b/components/os_crypt/common/keychain_password_mac.mm -index caa0e420956a31be1bd744319a0e40a0e50b46cf..f19628cc0cdba39b232f55935e8eee9786b02a77 100644 +index 0206d808c72b38e3d3abc98bd9a44fc47ed6c4da..a3a8c87ad73f3bc69fc567f9f9d054b185093d7b 100644 --- a/components/os_crypt/common/keychain_password_mac.mm +++ b/components/os_crypt/common/keychain_password_mac.mm -@@ -16,6 +16,7 @@ - #include "base/strings/string_view_util.h" +@@ -19,6 +19,7 @@ + #include "base/types/expected.h" #include "build/branding_buildflags.h" #include "crypto/apple/keychain.h" +#include "electron/mas.h" @@ -279,10 +279,10 @@ index 2d155f49248a24b5551cb93e010ac1a0c0f94261..23aa391aaf380f87310fb295277809f8 } else if (is_win) { sources += [ "os_crypt_win.cc" ] diff --git a/components/remote_cocoa/app_shim/BUILD.gn b/components/remote_cocoa/app_shim/BUILD.gn -index ba813851fde2660c21f99248a124161d2ac2ca07..c34f920e4a592b6798f5307c726bc34ebedf3f88 100644 +index 32001b02032379d6338e59a1cf5ce5619c4e1acb..f3827c60ee95b38acae103b2f3f4a94764610c3d 100644 --- a/components/remote_cocoa/app_shim/BUILD.gn +++ b/components/remote_cocoa/app_shim/BUILD.gn -@@ -77,6 +77,7 @@ component("app_shim") { +@@ -79,6 +79,7 @@ component("app_shim") { "//components/crash/core/common", "//components/remote_cocoa/common:mojo", "//components/system_media_controls", @@ -491,18 +491,18 @@ index 3a815ebf505bd95fa7f6b61ba433d98fbfe20225..149de0175c2ec0e41e3ba40caad7019c + @end diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h -index 020050de162705651b4eb8378880cd4eb017d46c..2d3554861a570271d6f9b9a2c8b1de53860b9fd2 100644 +index 889c0849910afa8f5be8bd8f55692bb482335383..ff2a4bc790b0fa2dec9702d82a0221855833cb65 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h -@@ -9,6 +9,7 @@ - +@@ -10,6 +10,7 @@ #include "base/apple/foundation_util.h" + #import "components/remote_cocoa/app_shim/native_widget_mac_nswindow_headless.h" #include "components/remote_cocoa/app_shim/remote_cocoa_app_shim_export.h" +#include "electron/mas.h" #import "ui/base/cocoa/command_dispatcher.h" namespace remote_cocoa { -@@ -17,6 +18,7 @@ class NativeWidgetNSWindowBridge; +@@ -18,6 +19,7 @@ class NativeWidgetNSWindowBridge; @protocol WindowTouchBarDelegate; @@ -510,7 +510,7 @@ index 020050de162705651b4eb8378880cd4eb017d46c..2d3554861a570271d6f9b9a2c8b1de53 // Weak lets Chrome launch even if a future macOS doesn't have the below classes WEAK_IMPORT_ATTRIBUTE @interface NSNextStepFrame : NSView -@@ -33,6 +35,7 @@ REMOTE_COCOA_APP_SHIM_EXPORT +@@ -34,6 +36,7 @@ REMOTE_COCOA_APP_SHIM_EXPORT REMOTE_COCOA_APP_SHIM_EXPORT @interface NativeWidgetMacNSWindowTitledFrame : NSThemeFrame @end @@ -519,10 +519,10 @@ index 020050de162705651b4eb8378880cd4eb017d46c..2d3554861a570271d6f9b9a2c8b1de53 // The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that // can only be accomplished by overriding methods. diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303bd07b2ea0 100644 +index 20fbdb2d4ac747aa174c5d8e19fd9f1ea48314a9..96588e0dfd084822f5c98cfaf2ee3c403fbd5e5f 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -@@ -21,6 +21,7 @@ +@@ -22,6 +22,7 @@ #import "components/remote_cocoa/app_shim/views_nswindow_delegate.h" #import "components/remote_cocoa/app_shim/window_touch_bar_delegate.h" #include "components/remote_cocoa/common/native_widget_ns_window_host.mojom.h" @@ -530,7 +530,7 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b #include "ui/accessibility/platform/ax_platform_node.h" #import "ui/base/cocoa/user_interface_item_command_handler.h" #import "ui/base/cocoa/window_size_constants.h" -@@ -108,20 +109,24 @@ void OrderChildWindow(NSWindow* child_window, +@@ -109,20 +110,24 @@ void OrderChildWindow(NSWindow* child_window, } // namespace @@ -556,7 +556,7 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b @end struct NSEdgeAndCornerThicknesses { -@@ -158,13 +163,17 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event; +@@ -159,13 +164,17 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event; @implementation NSView (CRFrameViewAdditions) // If a mouseDown: falls through to the frame view, turn it into a window drag. - (void)cr_mouseDownOnFrameView:(NSEvent*)event { @@ -574,7 +574,7 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b @implementation NativeWidgetMacNSWindowTitledFrame - (void)mouseDown:(NSEvent*)event { if (self.window.isMovable) -@@ -192,6 +201,8 @@ - (BOOL)usesCustomDrawing { +@@ -193,6 +202,8 @@ - (BOOL)usesCustomDrawing { } @end @@ -583,7 +583,7 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b @implementation NativeWidgetMacNSWindow { @private CommandDispatcher* __strong _commandDispatcher; -@@ -241,6 +252,7 @@ - (instancetype)initWithContentRect:(NSRect)contentRect +@@ -262,6 +273,7 @@ - (NativeWidgetMacNSWindowHeadlessInfo*)headlessInfo { // bubbles and the find bar, but these should not be movable. // Instead, let's push this up to the parent window which should be // the browser. @@ -591,7 +591,7 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b - (void)_zoomToScreenEdge:(NSUInteger)edge { if (self.parentWindow) { [self.parentWindow _zoomToScreenEdge:edge]; -@@ -248,6 +260,7 @@ - (void)_zoomToScreenEdge:(NSUInteger)edge { +@@ -269,6 +281,7 @@ - (void)_zoomToScreenEdge:(NSUInteger)edge { [super _zoomToScreenEdge:edge]; } } @@ -599,7 +599,7 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b // This override helps diagnose lifetime issues in crash stacktraces by // inserting a symbol on NativeWidgetMacNSWindow and should be kept even if it -@@ -393,6 +406,8 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -401,6 +414,8 @@ - (NSAccessibilityRole)accessibilityRole { // NSWindow overrides. @@ -608,16 +608,16 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { if (windowStyle & NSWindowStyleMaskTitled) { if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class]) -@@ -404,6 +419,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { +@@ -412,6 +427,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { return [super frameViewClassForStyleMask:windowStyle]; } +#endif + - - (BOOL)_isTitleHidden { - bool shouldShowWindowTitle = YES; - if (_bridge) -@@ -428,12 +445,14 @@ - (BOOL)_usesCustomDrawing { + - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen { + if (self.isHeadless || self.parentWindow) { + // AppKit's default implementation moves child windows down to avoid +@@ -449,12 +466,14 @@ - (BOOL)_usesCustomDrawing { // if it were valid to set that style for windows, setting the window style // recalculates and re-caches a bunch of stuff, so a surgical override is the // cleanest approach. @@ -632,7 +632,7 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b + (void)_getExteriorResizeEdgeThicknesses: (NSEdgeAndCornerThicknesses*)outThicknesses -@@ -687,9 +706,11 @@ - (id)archiver:(NSKeyedArchiver*)archiver willEncodeObject:(id)object { +@@ -708,9 +727,11 @@ - (id)archiver:(NSKeyedArchiver*)archiver willEncodeObject:(id)object { } - (void)saveRestorableState { @@ -644,7 +644,7 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b // Certain conditions, such as in the Speedometer 3 benchmark, can trigger a // rapid succession of calls to saveRestorableState. If there's no pending -@@ -756,6 +777,7 @@ - (void)reallySaveRestorableState { +@@ -777,6 +798,7 @@ - (void)reallySaveRestorableState { // affects its restorable state changes. - (void)invalidateRestorableState { [super invalidateRestorableState]; @@ -652,7 +652,7 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b if ([self _isConsideredOpenForPersistentState]) { if (_willUpdateRestorableState) return; -@@ -768,6 +790,7 @@ - (void)invalidateRestorableState { +@@ -789,6 +811,7 @@ - (void)invalidateRestorableState { _willUpdateRestorableState = NO; [NSObject cancelPreviousPerformRequestsWithTarget:self]; } @@ -660,7 +660,7 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b } // On newer SDKs, _canMiniaturize respects NSWindowStyleMaskMiniaturizable in -@@ -944,6 +967,7 @@ - (void)maybeRemoveTreeFromOrderingGroups { +@@ -965,6 +988,7 @@ - (void)maybeRemoveTreeFromOrderingGroups { // Since _removeFromGroups: is not documented it could go away in newer // versions of macOS. If the selector does not exist, DumpWithoutCrashing() so // we hear about the change. @@ -668,7 +668,7 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b if (![NSWindow instancesRespondToSelector:@selector(_removeFromGroups:)]) { base::debug::DumpWithoutCrashing(); return; -@@ -961,6 +985,7 @@ - (void)maybeRemoveTreeFromOrderingGroups { +@@ -982,6 +1006,7 @@ - (void)maybeRemoveTreeFromOrderingGroups { [currentWindow _removeFromGroups:child]; } } @@ -677,7 +677,7 @@ index 3c7bfe98848cbb3a309737b84ff1c8d683a83ec7..84036a1c4635e7b5bca5ebe1ea5e303b - (NSWindow*)rootWindow { diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -index 414874d84338ff12e707d52bc82483957d74d8ef..b620a31aed5801160dc49d964df56410786e6f2e 100644 +index c6cfdc7b778f2027280d8624a0d48f385365f758..b99b8ec014c81c1d6ad14a6758568dd864102e2a 100644 --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm @@ -42,6 +42,7 @@ @@ -688,7 +688,7 @@ index 414874d84338ff12e707d52bc82483957d74d8ef..b620a31aed5801160dc49d964df56410 #include "mojo/public/cpp/bindings/self_owned_receiver.h" #include "net/cert/x509_util_apple.h" #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" -@@ -73,10 +74,13 @@ +@@ -74,10 +75,13 @@ using CGRegionRef = CFTypeRef; CG_EXTERN CGSConnectionID CGSMainConnectionID(void); @@ -702,7 +702,7 @@ index 414874d84338ff12e707d52bc82483957d74d8ef..b620a31aed5801160dc49d964df56410 namespace { constexpr auto kUIPaintTimeout = base::Milliseconds(500); -@@ -731,10 +735,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -732,10 +736,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -715,7 +715,7 @@ index 414874d84338ff12e707d52bc82483957d74d8ef..b620a31aed5801160dc49d964df56410 // Beware: This view was briefly removed (in favor of a bare CALayer) in // https://crrev.com/c/1236675. The ordering of unassociated layers relative -@@ -1220,6 +1226,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -1221,6 +1227,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { } void NativeWidgetNSWindowBridge::SetAllowScreenshots(bool allow) { @@ -723,7 +723,7 @@ index 414874d84338ff12e707d52bc82483957d74d8ef..b620a31aed5801160dc49d964df56410 CGSConnectionID connection_id = CGSMainConnectionID(); CGSWindowID window_id = ns_window().windowNumber; CGRect frame = ns_window().frame; -@@ -1229,6 +1236,10 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -1230,6 +1237,10 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { region.reset(CGRegionCreateWithRect(frame)); } CGSSetWindowCaptureExcludeShape(connection_id, window_id, region.get()); @@ -735,10 +735,10 @@ index 414874d84338ff12e707d52bc82483957d74d8ef..b620a31aed5801160dc49d964df56410 void NativeWidgetNSWindowBridge::SetColorMode( diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 3c60e4e519f36a098704d744e3659ad0b8083157..123118d66734295f7b00e807aa0437ac76ab3f57 100644 +index 10497f25d8386ae2807d0a3389ba303f75ae1b20..6ed74ce305052e3f88727d15277aa86eafdffcd0 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -389,6 +389,7 @@ viz_component("service") { +@@ -390,6 +390,7 @@ viz_component("service") { "frame_sinks/external_begin_frame_source_mojo_mac.h", ] } @@ -746,7 +746,7 @@ index 3c60e4e519f36a098704d744e3659ad0b8083157..123118d66734295f7b00e807aa0437ac } if (is_ios) { -@@ -714,6 +715,7 @@ viz_source_set("unit_tests") { +@@ -716,6 +717,7 @@ viz_source_set("unit_tests") { "display_embedder/software_output_device_mac_unittest.mm", ] frameworks = [ "IOSurface.framework" ] @@ -840,10 +840,10 @@ index 712d59e1f7d9681c122e6d05a8b65bccbfacb492..de24209bbd3cd4a530c6f32990a0f93a return kAttributes; } diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 58c529557527b8e3914a235a82d2d475e71d6315..23ae9220812480274d0347009d38343fc005ea6f 100644 +index dea1ad18b05a249f6e0b867e1a6ecd528b2e36d6..db2a79357a6a0fa0862c0a94358de3798166023f 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -344,6 +344,7 @@ source_set("browser") { +@@ -345,6 +345,7 @@ source_set("browser") { "//ui/webui/resources", "//v8", "//v8:v8_version", @@ -886,7 +886,7 @@ index 367834e678f44d6e71c4218d293e11c3569daf2b..c97fb8f0411b45c1a01e4fab8dc40cc3 // 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 d93c66c9997dbaa912195d1d99a021486fd81e14..082c24657917671fbee8f755786285af66640a92 100644 +index cf8652cb6ddbf07e114d576c192bcda99dc78e3a..c4ada35c3ca32ce06ffc57577af7bc4c45c98579 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -52,6 +52,7 @@ @@ -908,7 +908,7 @@ index d93c66c9997dbaa912195d1d99a021486fd81e14..082c24657917671fbee8f755786285af // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling // pointers. `ns_view_` gets reinitialized later in this method. -@@ -1673,10 +1676,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1687,10 +1690,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -921,7 +921,7 @@ index d93c66c9997dbaa912195d1d99a021486fd81e14..082c24657917671fbee8f755786285af return gfx::NativeViewAccessible([GetInProcessNSView() window]); } -@@ -1728,9 +1733,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1742,9 +1747,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -933,7 +933,7 @@ index d93c66c9997dbaa912195d1d99a021486fd81e14..082c24657917671fbee8f755786285af } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2255,20 +2262,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2269,20 +2276,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken( GetRenderWidgetAccessibilityTokenCallback callback) { base::ProcessId pid = getpid(); @@ -961,10 +961,10 @@ index d93c66c9997dbaa912195d1d99a021486fd81e14..082c24657917671fbee8f755786285af /////////////////////////////////////////////////////////////////////////////// diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn -index 605f250c1f94e4b12a6790bd9fb4623d1f1a9d45..d5cf3b48e1b35527ec69b49e375710cc5f12cf9d 100644 +index 864bedc939029e594abb441c390c143739874fc9..3ef7c5ad377ddba1a00c55a97c7602d55effb299 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn -@@ -270,6 +270,7 @@ source_set("common") { +@@ -265,6 +265,7 @@ source_set("common") { "//ui/shell_dialogs", "//url", "//url/ipc:url_ipc", @@ -1055,10 +1055,10 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe } // namespace content diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn -index bb457cce37fa5eba33948a25d697882d44b9d81c..53511f295e7b4cef4b4a841b9293fb164f72f780 100644 +index fb48801fd89b4fabb7eb294aa4d088f69a4f5384..0e2df5a8844d431e0cf7baa6f15403745b5cd9b2 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn -@@ -702,6 +702,7 @@ static_library("test_support") { +@@ -700,6 +700,7 @@ static_library("test_support") { "//url", "//url/mojom:url_mojom_gurl", "//v8", @@ -1066,7 +1066,7 @@ index bb457cce37fa5eba33948a25d697882d44b9d81c..53511f295e7b4cef4b4a841b9293fb16 ] data_deps = [ -@@ -1177,6 +1178,8 @@ static_library("browsertest_support") { +@@ -1175,6 +1176,8 @@ static_library("browsertest_support") { # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and # enable the diagnostic by removing this line. configs += [ "//build/config/compiler:no_exit_time_destructors" ] @@ -1075,7 +1075,7 @@ index bb457cce37fa5eba33948a25d697882d44b9d81c..53511f295e7b4cef4b4a841b9293fb16 } mojom("content_test_mojo_bindings") { -@@ -2066,6 +2069,7 @@ test("content_browsertests") { +@@ -2063,6 +2066,7 @@ test("content_browsertests") { "//ui/shell_dialogs", "//ui/snapshot", "//ui/webui:test_support", @@ -1083,7 +1083,7 @@ index bb457cce37fa5eba33948a25d697882d44b9d81c..53511f295e7b4cef4b4a841b9293fb16 ] if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) { -@@ -3410,6 +3414,7 @@ test("content_unittests") { +@@ -3405,6 +3409,7 @@ test("content_unittests") { "//ui/shell_dialogs", "//ui/webui:test_support", "//url", @@ -1196,7 +1196,7 @@ index 8b7a675d95ad36cbb9528bc5bc7ef05e5124e5a3..ed6a9a326b82b177059317dc4bc54b10 namespace ui { diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 9388ffac4f70746b04e533b51faf4f2d55ab3358..98f45dc973159b5823d8a0433dfd4bc634874b1e 100644 +index 0d5c59a4946b3d3dd992cb15162fc8ed2bc17a99..8eb798f03771d2dbdaebb0ef5f781ef4fc0336e8 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn @@ -203,6 +203,7 @@ source_set("audio") { @@ -1208,7 +1208,7 @@ index 9388ffac4f70746b04e533b51faf4f2d55ab3358..98f45dc973159b5823d8a0433dfd4bc6 if (is_ios) { diff --git a/media/audio/apple/audio_low_latency_input.cc b/media/audio/apple/audio_low_latency_input.cc -index 1caead59d7cf767f14e4c4d26054511016a38bc3..8154e0447cc5f6c80d9f9af9c1e65f515b557102 100644 +index 97477a88340a7ae10e109d47bf5c7072b900964d..60cab6dca22061157311af6c033c9fa04218916f 100644 --- a/media/audio/apple/audio_low_latency_input.cc +++ b/media/audio/apple/audio_low_latency_input.cc @@ -30,6 +30,7 @@ @@ -1244,7 +1244,7 @@ index 1caead59d7cf767f14e4c4d26054511016a38bc3..8154e0447cc5f6c80d9f9af9c1e65f51 } // namespace #endif diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn -index 3253d17a45802661a501207c18c2751e085fc418..dc299ca9ebe0a3cff6b986a666f870530a39fbf5 100644 +index c83337113e00bea81e6e79070ffd94b79a1d3162..c520f0645a804bbbbc1b6ea755fe458e484e836d 100644 --- a/net/dns/BUILD.gn +++ b/net/dns/BUILD.gn @@ -197,6 +197,8 @@ source_set("dns") { @@ -1977,7 +1977,7 @@ index 423fa6c7d4c9e1a17f0df2a7b1357c3424070f8e..b7e9a3ae2b5e004c670b20dff12e9bf8 return false; } diff --git a/ui/accessibility/platform/inspect/ax_transform_mac.mm b/ui/accessibility/platform/inspect/ax_transform_mac.mm -index 6846060ef9622d8fc8d1d6c8da16e2f1b785e6bd..05c22db87e882b246bd7034e027cf1495376b6c6 100644 +index ef031ba14e4c649f6f3a5718ac521e6b424d64cb..38e528450196b4dbd5fa6a25b96baa10980fe73c 100644 --- a/ui/accessibility/platform/inspect/ax_transform_mac.mm +++ b/ui/accessibility/platform/inspect/ax_transform_mac.mm @@ -11,6 +11,7 @@ @@ -2005,7 +2005,7 @@ index 6846060ef9622d8fc8d1d6c8da16e2f1b785e6bd..05c22db87e882b246bd7034e027cf149 // Accessible object if (AXElementWrapper::IsValidElement(value)) { diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index fb8d813511df674326803084a8083da34e754308..a17afdfeb2c5fc29e13d299c41ddb1c9796fe16a 100644 +index 7d1c33b93adebfb9d93464399af2df84418d74f4..0b9789fad27bd46acecda88ccf3b13e58c39232c 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -355,6 +355,13 @@ component("base") { @@ -2126,7 +2126,7 @@ index 93e90c4eba9bc9b93d68e834eb6baabeb2d0ecf0..1b90f41d05f847a94adf2f4da827b1d0 } // namespace diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn -index 8a11735dd897617e374dfd03a9a0521473515b39..193ef1558cb937ad2e28f7cd8ae87e6345f97910 100644 +index 1b3ed08902ddb5a4400345c4b0d204ca82df2c5e..6db9f06dbaf357cf83ac7b6ff9acc2f20149d09c 100644 --- a/ui/display/BUILD.gn +++ b/ui/display/BUILD.gn @@ -138,6 +138,12 @@ component("display") { @@ -2173,10 +2173,10 @@ index bfffd0444b0711b201cedaddfd3edaa7b5d9220a..8cdae9f250d407d0c2d34ba7c0891b84 // Query the display's refresh rate. display.set_display_frequency(screen.maximumFramesPerSecond); diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn -index 04e2be450e4499ed08f0b61650e929b2ee46e73a..af4cbcecbbfb2050a390a979543e4ba5bffbdafa 100644 +index 8db4f9770541cbd49830fba2770adb03c5db3b2e..7fcbd3fc20a1b116587bf6507cd43ca6f0164b22 100644 --- a/ui/gfx/BUILD.gn +++ b/ui/gfx/BUILD.gn -@@ -278,6 +278,8 @@ component("gfx") { +@@ -280,6 +280,8 @@ component("gfx") { "CoreGraphics.framework", "CoreText.framework", ] @@ -2224,7 +2224,7 @@ index bbe355cf69f160866188216cc274d75bd35603db..06ee100d7ea2e892dbf3c0b1adc96c50 // enough. return PlatformFontMac::SystemFontType::kGeneral; diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn -index ece2f92106e7cd5ab875a5e13889ae94e9337ab6..e076d917f60187a2103591266d39185ef703864a 100644 +index 6253f851c93670055f3fe9e14e1b8d0970e9beb9..b1b224285e5dfef66cfbec828e47527e3b8dfcde 100644 --- a/ui/views/BUILD.gn +++ b/ui/views/BUILD.gn @@ -726,6 +726,8 @@ component("views") { @@ -2236,7 +2236,7 @@ index ece2f92106e7cd5ab875a5e13889ae94e9337ab6..e076d917f60187a2103591266d39185e } if (is_win) { -@@ -1157,6 +1159,8 @@ source_set("test_support") { +@@ -1155,6 +1157,8 @@ source_set("test_support") { "//ui/base/mojom:ui_base_types", ] 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 c0d4ed1cb5..60115ed21f 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 6b6fdcbccbc36751daf80dfea1a4f585612dd086..40ed5ee64f8588a7373128adc0bc640d3b1d32f0 100644 +index 36771cf23bbf39af4fcc79576e93fc0c2ee1a8ab..02f70ce0f192562c11cdbc4d193302e700a302aa 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -169,6 +169,11 @@ +@@ -170,6 +170,11 @@ #include "services/network/web_transport.h" #include "url/gurl.h" @@ -22,7 +22,7 @@ index 6b6fdcbccbc36751daf80dfea1a4f585612dd086..40ed5ee64f8588a7373128adc0bc640d #if BUILDFLAG(IS_CT_SUPPORTED) // gn check does not account for BUILDFLAG(). So, for iOS builds, it will // complain about a missing dependency on the target exposing this header. Add a -@@ -624,6 +629,111 @@ void RecordHSTSPreconnectUpgradeReason(HSTSRedirectUpgradeReason reason) { +@@ -628,6 +633,111 @@ void RecordHSTSPreconnectUpgradeReason(HSTSRedirectUpgradeReason reason) { } // namespace @@ -134,7 +134,7 @@ index 6b6fdcbccbc36751daf80dfea1a4f585612dd086..40ed5ee64f8588a7373128adc0bc640d constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::NetworkContextHttpAuthPreferences:: -@@ -1025,6 +1135,13 @@ void NetworkContext::SetClient( +@@ -1029,6 +1139,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -148,7 +148,7 @@ index 6b6fdcbccbc36751daf80dfea1a4f585612dd086..40ed5ee64f8588a7373128adc0bc640d void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2656,6 +2773,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2674,6 +2791,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( cert_verifier = std::make_unique( std::make_unique( std::move(cert_verifier))); @@ -160,7 +160,7 @@ index 6b6fdcbccbc36751daf80dfea1a4f585612dd086..40ed5ee64f8588a7373128adc0bc640d builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index eb631af17f221915e9f9795e65e4c3dcbab28346..4395ddd300e876bf5fdb02d23cd401276c29e07d 100644 +index 98ec8269223714f54f48245bfc83f0c018dbf0b3..01a7a606dd6341df2c519776399f8f9875b557f7 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -118,6 +118,7 @@ class SimpleUrlPatternMatcher; @@ -190,10 +190,10 @@ index eb631af17f221915e9f9795e65e4c3dcbab28346..4395ddd300e876bf5fdb02d23cd40127 std::unique_ptr internal_host_resolver_; std::set, base::UniquePtrComparator> diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 2e1694ccdade6cd5c0ddb849aef3932a856651e2..160d18eba4101efab2dae444d09947f650079003 100644 +index 036b7177221e0c067dc6ef580dcbe7ed80845028..9599c3570b74fa03464beb9adeb1a0c237744640 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -310,6 +310,17 @@ struct SocketBrokerRemotes { +@@ -313,6 +313,17 @@ struct SocketBrokerRemotes { pending_remote server; }; @@ -211,7 +211,7 @@ index 2e1694ccdade6cd5c0ddb849aef3932a856651e2..160d18eba4101efab2dae444d09947f6 // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -954,6 +965,9 @@ interface NetworkContext { +@@ -963,6 +974,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); @@ -222,7 +222,7 @@ index 2e1694ccdade6cd5c0ddb849aef3932a856651e2..160d18eba4101efab2dae444d09947f6 CreateURLLoaderFactory( pending_receiver url_loader_factory, diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index 15844e78a6399b1546be7c69eceeb077c623e627..195b237d37a8cf6739d83d87c79a67eb9f0a6bac 100644 +index 233a5c213e50ea5a39dff0543842602279a7c7c3..b228a3725b04b92037fc1c2ec601f04642d59fc3 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h @@ -63,6 +63,8 @@ class TestNetworkContext : public mojom::NetworkContext { diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 4a31711634..ab4a7d60ed 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -133,10 +133,10 @@ index 9bf238e64af483294ae3c3f18a4e9aed49a8658d..b9b2a4c8c387b8e8b4eb1f02fc0f891c const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 9308ef3abab38292865a9f2ccc5abfe7e47d70d3..430c191b8d282b63aa5a04207da28660f203d910 100644 +index 02369c57e0a307d32a9f38752a650aedeec34808..377c9375ba8e98bb7b8db39259d15a3ae504af7b 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2354,7 +2354,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2353,7 +2353,7 @@ void RenderProcessHostImpl::CreateNotificationService( case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker: case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -145,7 +145,7 @@ index 9308ef3abab38292865a9f2ccc5abfe7e47d70d3..430c191b8d282b63aa5a04207da28660 creator_type, std::move(receiver)); break; } -@@ -2362,7 +2362,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2361,7 +2361,7 @@ void RenderProcessHostImpl::CreateNotificationService( CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch b/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch index d53b76d360..5abab12e03 100644 --- a/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch +++ b/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch @@ -11,10 +11,10 @@ For resolving complex conflict please pin @reitowo For more reason please see: https://crrev.com/c/5465148 diff --git a/gpu/command_buffer/service/shared_image/d3d_image_backing_factory.cc b/gpu/command_buffer/service/shared_image/d3d_image_backing_factory.cc -index f0495805b90386588abaec45ff39c33753efe6f5..b14a585aba0d75f59a980bc6c045ea4d7ce5b4c7 100644 +index 4f1db7db3da9f792ed2a0352abf6940b0f03f4ff..c35b5a44474b6a0c38f177342263e49a58d49f60 100644 --- a/gpu/command_buffer/service/shared_image/d3d_image_backing_factory.cc +++ b/gpu/command_buffer/service/shared_image/d3d_image_backing_factory.cc -@@ -381,7 +381,8 @@ gfx::GpuMemoryBufferHandle D3DImageBackingFactory::CreateGpuMemoryBufferHandle( +@@ -378,7 +378,8 @@ gfx::GpuMemoryBufferHandle D3DImageBackingFactory::CreateGpuMemoryBufferHandle( // so make sure that the usage is one that we support. DCHECK(usage == gfx::BufferUsage::GPU_READ || usage == gfx::BufferUsage::SCANOUT || @@ -24,7 +24,7 @@ index f0495805b90386588abaec45ff39c33753efe6f5..b14a585aba0d75f59a980bc6c045ea4d << "Incorrect usage, usage=" << gfx::BufferUsageToString(usage); D3D11_TEXTURE2D_DESC desc = { -@@ -395,7 +396,9 @@ gfx::GpuMemoryBufferHandle D3DImageBackingFactory::CreateGpuMemoryBufferHandle( +@@ -392,7 +393,9 @@ gfx::GpuMemoryBufferHandle D3DImageBackingFactory::CreateGpuMemoryBufferHandle( D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET, 0, D3D11_RESOURCE_MISC_SHARED_NTHANDLE | diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 0a0cee12a5..76a8c1b6de 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -68,7 +68,7 @@ index f91857eb0b6ad385721b8224100de26dfdd7dd8d..45e8766fcb8d46d8edc3bf8d21d3f826 : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 57d09902647c4f257728589e494f71793121f015..c6b544eb72b11baca99770b6b98566b4ab7adc5d 100644 +index aa79c324af2cec50019bca3bccff5d420fb30ffd..eb76ee91743236d05c3a70a54d5345a705b5d994 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -80,6 +80,20 @@ namespace printing { @@ -153,7 +153,7 @@ index 57d09902647c4f257728589e494f71793121f015..c6b544eb72b11baca99770b6b98566b4 -bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh, -+ base::Value::Dict settings, ++ base::DictValue settings, + CompletionCallback callback) { if (!StartPrintCommon(rfh)) { return false; @@ -187,7 +187,7 @@ index 57d09902647c4f257728589e494f71793121f015..c6b544eb72b11baca99770b6b98566b4 void PrintViewManagerBase::CompleteUpdatePrintSettings( + std::unique_ptr printer_query, - base::Value::Dict job_settings, + base::DictValue job_settings, std::unique_ptr print_settings, UpdatePrintSettingsCallback callback) { @@ -332,7 +353,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings( @@ -497,7 +497,7 @@ index 57d09902647c4f257728589e494f71793121f015..c6b544eb72b11baca99770b6b98566b4 scoped_refptr print_data, const gfx::Size& page_size, diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 824d6d8a9242302c2ab0c0c517d0cc329e607100..d3b25c90c90fe860990789aa96c872b45132720b 100644 +index cdd25ff24507cc49684454820c7d385b8c67259e..d4dc7e8e0cd604a6418f76e2e387985d847ce0be 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h @@ -46,6 +46,8 @@ namespace printing { @@ -515,7 +515,7 @@ index 824d6d8a9242302c2ab0c0c517d0cc329e607100..d3b25c90c90fe860990789aa96c872b4 // this function. Returns false if printing is impossible at the moment. - virtual bool PrintNow(content::RenderFrameHost* rfh); + virtual bool PrintNow(content::RenderFrameHost* rfh, -+ base::Value::Dict settings = {}, ++ base::DictValue settings = {}, + CompletionCallback callback = {}); // Like PrintNow(), but for the node under the context menu, instead of the @@ -560,7 +560,7 @@ index 824d6d8a9242302c2ab0c0c517d0cc329e607100..d3b25c90c90fe860990789aa96c872b4 #endif void CompleteUpdatePrintSettings( + std::unique_ptr printer_query, - base::Value::Dict job_settings, + base::DictValue job_settings, std::unique_ptr print_settings, UpdatePrintSettingsCallback callback); @@ -376,8 +391,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { @@ -577,10 +577,10 @@ index 824d6d8a9242302c2ab0c0c517d0cc329e607100..d3b25c90c90fe860990789aa96c872b4 // Indication that the job is getting canceled. bool canceling_job_ = false; diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc -index c31c873db21ef06b6d0f19c789c9a097f3cfeb2b..94a05c657a895cadc98324f7fef133c3d206fbd9 100644 +index 15bd25f0d99b38c2d3a01b5bab78173ea9fef23c..27de3e2b4de7052af5d60a0c60b8ceec79869a49 100644 --- a/chrome/browser/printing/printer_query.cc +++ b/chrome/browser/printing/printer_query.cc -@@ -356,17 +356,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings, +@@ -356,17 +356,19 @@ void PrinterQuery::UpdatePrintSettings(base::DictValue new_settings, #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) } @@ -605,7 +605,7 @@ index c31c873db21ef06b6d0f19c789c9a097f3cfeb2b..94a05c657a895cadc98324f7fef133c3 #if BUILDFLAG(IS_CHROMEOS) diff --git a/chrome/browser/printing/printer_query_oop.cc b/chrome/browser/printing/printer_query_oop.cc -index f58d494764ea77c997770ae0257b7c21b248a0e0..6eb4a9436a9bee5420a29ec643b984cea0700faa 100644 +index 0dd564edd45425c75830f5e078f6fb375d10460b..61e0af99682502056f77426f6d17ee33463df6ae 100644 --- a/chrome/browser/printing/printer_query_oop.cc +++ b/chrome/browser/printing/printer_query_oop.cc @@ -126,7 +126,7 @@ void PrinterQueryOop::OnDidAskUserForSettings( @@ -666,7 +666,7 @@ index ac2f719be566020d9f41364560c12e6d6d0fe3d8..16d758a6936f66148a196761cfb875f6 PrintingFailed(int32 cookie, PrintFailureReason reason); diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 1750c48c5dcff0ec3f45497a0949bdefe01bc730..73ac20c027c44fa0e1d5df94ce050ebb992c10e9 100644 +index 60b5e83a8bc1ed07970be4cdfdc19962698bd754..1320f3b10b07b2cee90f39f406604176c7575796 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -54,6 +54,7 @@ @@ -690,7 +690,7 @@ index 1750c48c5dcff0ec3f45497a0949bdefe01bc730..73ac20c027c44fa0e1d5df94ce050ebb - Print(web_frame, blink::WebNode(), PrintRequestType::kScripted); + Print(web_frame, blink::WebNode(), PrintRequestType::kScripted, -+ base::Value::Dict()); ++ base::DictValue()); if (!weak_this) { return; } @@ -700,7 +700,7 @@ index 1750c48c5dcff0ec3f45497a0949bdefe01bc730..73ac20c027c44fa0e1d5df94ce050ebb -void PrintRenderFrameHelper::PrintRequestedPages() { - PrintRequestedPagesInternal(/*already_notified_frame=*/false); -+void PrintRenderFrameHelper::PrintRequestedPages(base::Value::Dict settings) { ++void PrintRenderFrameHelper::PrintRequestedPages(base::DictValue settings) { + PrintRequestedPagesInternal(/*already_notified_frame=*/false, + std::move(settings)); } @@ -708,7 +708,7 @@ index 1750c48c5dcff0ec3f45497a0949bdefe01bc730..73ac20c027c44fa0e1d5df94ce050ebb void PrintRenderFrameHelper::PrintRequestedPagesInternal( - bool already_notified_frame) { + bool already_notified_frame, -+ base::Value::Dict settings) { ++ base::DictValue settings) { ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) { return; @@ -735,7 +735,7 @@ index 1750c48c5dcff0ec3f45497a0949bdefe01bc730..73ac20c027c44fa0e1d5df94ce050ebb if (render_frame_gone_) { return; -@@ -1483,6 +1487,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { +@@ -1483,6 +1487,8 @@ void PrintRenderFrameHelper::PrintPreview(base::DictValue settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -750,7 +750,7 @@ index 1750c48c5dcff0ec3f45497a0949bdefe01bc730..73ac20c027c44fa0e1d5df94ce050ebb const blink::WebNode& node, - PrintRequestType print_request_type) { + PrintRequestType print_request_type, -+ base::Value::Dict settings) { ++ base::DictValue settings) { // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; @@ -796,7 +796,7 @@ index 1750c48c5dcff0ec3f45497a0949bdefe01bc730..73ac20c027c44fa0e1d5df94ce050ebb bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame, - const blink::WebNode& node) { + const blink::WebNode& node, -+ base::Value::Dict new_settings) { ++ base::DictValue new_settings) { // Reset to default values. ignore_css_margins_ = false; @@ -844,7 +844,7 @@ index 1750c48c5dcff0ec3f45497a0949bdefe01bc730..73ac20c027c44fa0e1d5df94ce050ebb } diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index 37f84d2001e7e1dff029f1556b7676a71ac2f6f2..8c89e826165db6de2c681c8fa97cd91a8706b0ae 100644 +index 8b4cea7d43fe16d7414e017b11ee1cda722e1a8d..116939ffd857354ab1bfab472b292cfedd99dcba 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h @@ -258,7 +258,7 @@ class PrintRenderFrameHelper @@ -852,7 +852,7 @@ index 37f84d2001e7e1dff029f1556b7676a71ac2f6f2..8c89e826165db6de2c681c8fa97cd91a // printing::mojom::PrintRenderFrame: - void PrintRequestedPages() override; -+ void PrintRequestedPages(base::Value::Dict settings) override; ++ void PrintRequestedPages(base::DictValue settings) override; void PrintWithParams(mojom::PrintPagesParamsPtr params, PrintWithParamsCallback callback) override; #if BUILDFLAG(ENABLE_PRINT_PREVIEW) @@ -862,7 +862,7 @@ index 37f84d2001e7e1dff029f1556b7676a71ac2f6f2..8c89e826165db6de2c681c8fa97cd91a const blink::WebNode& node, - PrintRequestType print_request_type); + PrintRequestType print_request_type, -+ base::Value::Dict settings = {}); ++ base::DictValue settings = {}); // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); @@ -872,7 +872,7 @@ index 37f84d2001e7e1dff029f1556b7676a71ac2f6f2..8c89e826165db6de2c681c8fa97cd91a bool InitPrintSettings(blink::WebLocalFrame* frame, - const blink::WebNode& node); + const blink::WebNode& node, -+ base::Value::Dict new_settings); ++ base::DictValue new_settings); // Calculate number of pages in source document. uint32_t CalculateNumberOfPages(blink::WebLocalFrame* frame, @@ -882,24 +882,24 @@ index 37f84d2001e7e1dff029f1556b7676a71ac2f6f2..8c89e826165db6de2c681c8fa97cd91a void SetupOnStopLoadingTimeout(); - void PrintRequestedPagesInternal(bool already_notified_frame); + void PrintRequestedPagesInternal(bool already_notified_frame, -+ base::Value::Dict settings); ++ base::DictValue settings); ScriptingThrottler scripting_throttler_; diff --git a/printing/printing_context.cc b/printing/printing_context.cc -index 746a056e1c7980803323739c51cedb930c62de25..34a9e45a3407612d6960a7cad798cf30989f065e 100644 +index 4b004cf94b93137a4a64b79eab49b8d216891846..45c14773307612708c487e29e2cced8429f12850 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc @@ -157,7 +157,6 @@ void PrintingContext::UsePdfSettings() { mojom::ResultCode PrintingContext::UpdatePrintSettings( - base::Value::Dict job_settings) { + base::DictValue job_settings) { - ResetSettings(); { std::unique_ptr settings = PrintSettingsFromJobSettings(job_settings); diff --git a/printing/printing_context.h b/printing/printing_context.h -index 2f34f45aaf89e6f4600be1d2b8444c636b0cc83f..5bfd45c5efbf300a36e016af80e18fb9ad376d41 100644 +index 01970ac4c5c38182774353762ee138dbd9af184c..fa261eec18ee102d9b3ab152ce5540ffa5d6512f 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h @@ -208,6 +208,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { 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 8d58bbd99f..f3f4c38abc 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -30,10 +30,10 @@ index 9fce41c59c6878e0a29b831d76fcb53dcf86dcd5..2cff43e9fc4374ae48d87dd048a295a0 // RenderWidgetHost on the primary main frame, and false otherwise. virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*); diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index b092a09cada3f289cb13ed4352b6da8cb7ff154a..671e8054e7373be2ac5d67722a56149a72f47051 100644 +index 798ca07aa4cd1f47f459def5d6b57473cc8c7f2b..a1487f8aabb5ebfef85d4b9bf4bcac2b1370c70c 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2079,6 +2079,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { +@@ -2092,6 +2092,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { if (view_) { view_->UpdateCursor(cursor); } @@ -44,10 +44,10 @@ index b092a09cada3f289cb13ed4352b6da8cb7ff154a..671e8054e7373be2ac5d67722a56149a void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 2138c00b6e732dc826df07ac66fd7f8e62fffd0c..76855246e19933850dc5b79c65c816a2690dd229 100644 +index ca53ad6537e317dade06332b07bf9c0fe1fc00eb..2890adbe64e95ffa53611f6616511628232c4570 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -6155,6 +6155,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -6159,6 +6159,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } diff --git a/patches/chromium/refactor_expose_file_system_access_blocklist.patch b/patches/chromium/refactor_expose_file_system_access_blocklist.patch index 108b39e4ec..3c02728ad6 100644 --- a/patches/chromium/refactor_expose_file_system_access_blocklist.patch +++ b/patches/chromium/refactor_expose_file_system_access_blocklist.patch @@ -8,7 +8,7 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w to upstream this change to Chrome. diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -index c8fa1938134d1550ac7116d1690a7e0d4207e5b1..c342d0adfbb867ff6fbacb78aad4b96f097fedf3 100644 +index b2457fa5e7de1a4ea28a71985e54825b5172d370..ac44b6723085c7a94a5d8736e24ea4ea22ac206a 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc @@ -83,11 +83,13 @@ @@ -25,7 +25,7 @@ index c8fa1938134d1550ac7116d1690a7e0d4207e5b1..c342d0adfbb867ff6fbacb78aad4b96f #include "components/tabs/public/tab_interface.h" #if BUILDFLAG(ENABLE_PLATFORM_APPS) #include "extensions/browser/extension_registry.h" // nogncheck -@@ -288,190 +290,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) { +@@ -287,190 +289,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) { } #endif @@ -220,7 +220,7 @@ index c8fa1938134d1550ac7116d1690a7e0d4207e5b1..c342d0adfbb867ff6fbacb78aad4b96f // Checks if `path` should be blocked by the `rules`. // The BlockType of the nearest ancestor of a path to check is what -@@ -1406,16 +1228,6 @@ struct ChromeFileSystemAccessPermissionContext::OriginState { +@@ -1405,16 +1227,6 @@ struct ChromeFileSystemAccessPermissionContext::OriginState { std::unique_ptr cleanup_timer; }; @@ -237,7 +237,7 @@ index c8fa1938134d1550ac7116d1690a7e0d4207e5b1..c342d0adfbb867ff6fbacb78aad4b96f ChromeFileSystemAccessPermissionContext:: ChromeFileSystemAccessPermissionContext(content::BrowserContext* context, const base::Clock* clock) -@@ -1434,7 +1246,7 @@ ChromeFileSystemAccessPermissionContext:: +@@ -1433,7 +1245,7 @@ ChromeFileSystemAccessPermissionContext:: #if BUILDFLAG(IS_ANDROID) one_time_permissions_tracker_.Observe( OneTimePermissionsTrackerFactory::GetForBrowserContext(context)); @@ -246,7 +246,7 @@ index c8fa1938134d1550ac7116d1690a7e0d4207e5b1..c342d0adfbb867ff6fbacb78aad4b96f auto* provider = web_app::WebAppProvider::GetForWebApps( Profile::FromBrowserContext(profile_)); if (provider) { -@@ -2814,7 +2626,7 @@ void ChromeFileSystemAccessPermissionContext::OnShutdown() { +@@ -2813,7 +2625,7 @@ void ChromeFileSystemAccessPermissionContext::OnShutdown() { one_time_permissions_tracker_.Reset(); } @@ -255,7 +255,7 @@ index c8fa1938134d1550ac7116d1690a7e0d4207e5b1..c342d0adfbb867ff6fbacb78aad4b96f void ChromeFileSystemAccessPermissionContext::OnWebAppInstalled( const webapps::AppId& app_id) { if (!base::FeatureList::IsEnabled( -@@ -3172,11 +2984,7 @@ bool ChromeFileSystemAccessPermissionContext:: +@@ -3171,11 +2983,7 @@ bool ChromeFileSystemAccessPermissionContext:: HandleType handle_type, UserAction user_action, GrantType grant_type) { @@ -268,7 +268,7 @@ index c8fa1938134d1550ac7116d1690a7e0d4207e5b1..c342d0adfbb867ff6fbacb78aad4b96f if (!base::FeatureList::IsEnabled( features::kFileSystemAccessPersistentPermissions)) { return false; -@@ -3227,6 +3035,7 @@ bool ChromeFileSystemAccessPermissionContext:: +@@ -3226,6 +3034,7 @@ bool ChromeFileSystemAccessPermissionContext:: return false; #endif // BUILDFLAG(IS_ANDROID) @@ -277,7 +277,7 @@ index c8fa1938134d1550ac7116d1690a7e0d4207e5b1..c342d0adfbb867ff6fbacb78aad4b96f std::vector ChromeFileSystemAccessPermissionContext:: diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h -index c026a5ac558d3570c8d893943f93a5833c16ccd2..4a9bc924e609066086812bc1002258b6ce586c14 100644 +index add60ba0e2ca7be385b59d46e3bdaceb55996947..5163e7092c3016494321b4c4a5f785f37f8b9411 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h @@ -9,10 +9,13 @@ diff --git a/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch b/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch index c1f1f8dd2f..d0767b6cf5 100644 --- a/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch +++ b/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch @@ -6,10 +6,10 @@ Subject: refactor: patch electron PermissionTypes into blink 6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077 diff --git a/components/permissions/permission_util.cc b/components/permissions/permission_util.cc -index 951682514323db7325496201f82716516e3e87f9..2d2358e1438013ba79963a692b45030692cefdca 100644 +index d9d7e902dfaaf360dc80bd292b56eeba9cfc5f12..4507fec489ecb0d6e02dbf613c6a87817f7b7f65 100644 --- a/components/permissions/permission_util.cc +++ b/components/permissions/permission_util.cc -@@ -554,9 +554,17 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe( +@@ -552,9 +552,17 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe( return ContentSettingsType::LOCAL_NETWORK; case PermissionType::LOOPBACK_NETWORK: return ContentSettingsType::LOOPBACK_NETWORK; @@ -30,7 +30,7 @@ index 951682514323db7325496201f82716516e3e87f9..2d2358e1438013ba79963a692b450306 return ContentSettingsType::DEFAULT; diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc -index 1b99c0e3bd89fb909bc18537dc70c0e04f4149c7..9aa94047dbd6067109988766584b915f40283b2c 100644 +index d278eae0806c1d51e949c7026fa01f01494c8dd3..6e663bb95de59ddc06064a9bf26e6e58828c1a7f 100644 --- a/content/browser/permissions/permission_controller_impl.cc +++ b/content/browser/permissions/permission_controller_impl.cc @@ -97,9 +97,15 @@ PermissionToSchedulingFeature(PermissionType permission_name) { @@ -53,7 +53,7 @@ index 1b99c0e3bd89fb909bc18537dc70c0e04f4149c7..9aa94047dbd6067109988766584b915f #if !BUILDFLAG(IS_ANDROID) diff --git a/content/browser/permissions/permission_descriptor_util.cc b/content/browser/permissions/permission_descriptor_util.cc -index 260951e60f5d805a044afe94cad6fca86bb7e365..f8e74586db1aef323d78f7ef6b5b31d26c1861b5 100644 +index d2ea06fa66c07baaf741382af40de154068a7d6b..3397e741fbc52ce45cd62dd3fe12e73b8c010c4b 100644 --- a/content/browser/permissions/permission_descriptor_util.cc +++ b/content/browser/permissions/permission_descriptor_util.cc @@ -180,13 +180,27 @@ content::PermissionDescriptorUtil::CreatePermissionDescriptorForPermissionType( @@ -90,7 +90,7 @@ index 260951e60f5d805a044afe94cad6fca86bb7e365..f8e74586db1aef323d78f7ef6b5b31d2 NOTREACHED(); } diff --git a/third_party/blink/common/permissions/permission_utils.cc b/third_party/blink/common/permissions/permission_utils.cc -index 9297e5667ef794fad52d76d878d2d50aefad3d11..99241994175249437141fcf6f49918f8f073e907 100644 +index 19b8fa4b094b646ad6a5864c5e14a2f125fb7880..9728d674902d84f99fd93f258a8868ab811a8707 100644 --- a/third_party/blink/common/permissions/permission_utils.cc +++ b/third_party/blink/common/permissions/permission_utils.cc @@ -108,11 +108,21 @@ std::string GetPermissionString(PermissionType permission) { @@ -158,7 +158,7 @@ index 9297e5667ef794fad52d76d878d2d50aefad3d11..99241994175249437141fcf6f49918f8 } diff --git a/third_party/blink/public/common/permissions/permission_utils.h b/third_party/blink/public/common/permissions/permission_utils.h -index 38c20e7f0c597815ce5ee3333f12183ac1e18c62..7bce804a8ed1c8a2f2ac18524c6317db8bbc4442 100644 +index 31158388db2df745af999adc9d07fc9272a2d6f8..fed5994c8563792405838d8923d3502aedbe85a2 100644 --- a/third_party/blink/public/common/permissions/permission_utils.h +++ b/third_party/blink/public/common/permissions/permission_utils.h @@ -69,8 +69,17 @@ enum class PermissionType { @@ -182,7 +182,7 @@ index 38c20e7f0c597815ce5ee3333f12183ac1e18c62..7bce804a8ed1c8a2f2ac18524c6317db MIN_VALUE = MIDI_SYSEX, }; diff --git a/third_party/blink/public/mojom/permissions/permission.mojom b/third_party/blink/public/mojom/permissions/permission.mojom -index cd200c6aadb304e440df65532a9ef86f0aef4fa7..88448c95da18953402b6de44676edfb19f657c05 100644 +index 8a2e1ec60c337d4fb40292b53ee8949e0ce2b8a4..e5d9922b15ccd8c08e4dd0b2656d606c8e896b66 100644 --- a/third_party/blink/public/mojom/permissions/permission.mojom +++ b/third_party/blink/public/mojom/permissions/permission.mojom @@ -47,8 +47,16 @@ enum PermissionName { @@ -204,7 +204,7 @@ index cd200c6aadb304e440df65532a9ef86f0aef4fa7..88448c95da18953402b6de44676edfb1 bool sysex; }; diff --git a/third_party/blink/renderer/modules/permissions/permission_utils.cc b/third_party/blink/renderer/modules/permissions/permission_utils.cc -index ca46a15c03d72da4a301aff6fc18c173eaa7e6c8..7a52f09c49fbf8343b33f8c07057c5de894f6f28 100644 +index e9b7dcb070567580e8c6ad11b2bb943083e804f6..898efc336171ba6e33788dc754afaa47e3928f9e 100644 --- a/third_party/blink/renderer/modules/permissions/permission_utils.cc +++ b/third_party/blink/renderer/modules/permissions/permission_utils.cc @@ -151,8 +151,22 @@ String PermissionNameToString(PermissionName name) { diff --git a/patches/chromium/refactor_unfilter_unresponsive_events.patch b/patches/chromium/refactor_unfilter_unresponsive_events.patch index fda4c02f50..3c76a3f4d6 100644 --- a/patches/chromium/refactor_unfilter_unresponsive_events.patch +++ b/patches/chromium/refactor_unfilter_unresponsive_events.patch @@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be accessed from our JS event. The filtering is moved into Electron's code. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index fc5c7782035bb4d0b9d673cb125062f47cd98a14..6e1738a8a0e63d1e3dbabf29ee4d034e124a3dd2 100644 +index 4c951d0326500e68a2644b7917ce6b87ee54c39e..a0039d06b681a8d229604f8d8ef026b3ddb1e70e 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -10360,25 +10360,13 @@ void WebContentsImpl::RendererUnresponsive( +@@ -10364,25 +10364,13 @@ void WebContentsImpl::RendererUnresponsive( base::RepeatingClosure hang_monitor_restarter) { OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive", "render_widget_host", render_widget_host); diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 8c860c7ffc..510a10fa90 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 f8d29b704ab491524175e773062c624dfd59db0a..f21010994e7e554c63f1bf24d5c09e9904e97bc9 100644 +index d6686618cb86ba313f456adebf586c9e4a7ff89f..4a742db71f62f9ac891ceeb0604ca0b99d1d89c1 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1540,7 +1540,7 @@ if (is_chrome_branded && !is_android) { +@@ -1538,7 +1538,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index f8d29b704ab491524175e773062c624dfd59db0a..f21010994e7e554c63f1bf24d5c09e99 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1586,6 +1586,12 @@ repack("browser_tests_pak") { +@@ -1584,6 +1584,12 @@ repack("browser_tests_pak") { deps = [ "//chrome/test/data/webui:resources" ] } diff --git a/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch b/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch index 07ea6ee90a..9010974487 100644 --- a/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch +++ b/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch @@ -254,10 +254,10 @@ index 8fa50db5b7aee7f8138d2b9be41d15e567059c36..c5bb7897b00ee5a6be6789096f9a55f7 } diff --git a/content/common/features.cc b/content/common/features.cc -index ee57a03b5f673534960e7e59cbde29911dcee7c4..b66c1a906c800354c86173ee7a77bafc4ae666f5 100644 +index ea4c05a2ac7e05f55cfdfaccef0158c81fb360c4..d2d6fe1a33177b90574cae4f84d832e11274e4ad 100644 --- a/content/common/features.cc +++ b/content/common/features.cc -@@ -359,6 +359,14 @@ BASE_FEATURE(kInterestGroupUpdateIfOlderThan, base::FEATURE_ENABLED_BY_DEFAULT); +@@ -364,6 +364,14 @@ BASE_FEATURE(kInterestGroupUpdateIfOlderThan, base::FEATURE_ENABLED_BY_DEFAULT); BASE_FEATURE(kIOSurfaceCapturer, base::FEATURE_ENABLED_BY_DEFAULT); #endif @@ -273,10 +273,10 @@ index ee57a03b5f673534960e7e59cbde29911dcee7c4..b66c1a906c800354c86173ee7a77bafc BASE_FEATURE(kKeepChildProcessAfterIPCReset, base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/content/common/features.h b/content/common/features.h -index 1f0da9ad14a61c055e38f9dac54c8654c67f73e5..d21af11d91149a0cec2cf9400b44a9f670662340 100644 +index a482f12b9e95a84bf3d9981e06dab623eb5b4941..45a248901f3a45097857d5d620379c5c2739687c 100644 --- a/content/common/features.h +++ b/content/common/features.h -@@ -138,6 +138,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan); +@@ -140,6 +140,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan); #if BUILDFLAG(IS_MAC) CONTENT_EXPORT BASE_DECLARE_FEATURE(kIOSurfaceCapturer); #endif diff --git a/patches/chromium/revert_partial_remove_unused_prehandlemouseevent.patch b/patches/chromium/revert_partial_remove_unused_prehandlemouseevent.patch index 34f6768a98..600ee53a23 100644 --- a/patches/chromium/revert_partial_remove_unused_prehandlemouseevent.patch +++ b/patches/chromium/revert_partial_remove_unused_prehandlemouseevent.patch @@ -39,10 +39,10 @@ index 2cff43e9fc4374ae48d87dd048a295a00e5575e4..9cb5baccaa083a8030d4d0d57dc00040 // event before sending it to the renderer. See enum for details on return // value. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index e344d188e4b250074acfa058782a76841b9295b8..3b4dc6615e68254bf2fabf2887a0c21af81d50b1 100644 +index e5fcc7acc4823f3b9396c431815d9d97a986f86b..95b4370872f1529c14110f314609c314bc317198 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -1593,6 +1593,10 @@ void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo( +@@ -1598,6 +1598,10 @@ void RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo( CHECK_GE(mouse_event.GetType(), WebInputEvent::Type::kMouseTypeFirst); CHECK_LE(mouse_event.GetType(), WebInputEvent::Type::kMouseTypeLast); @@ -54,10 +54,10 @@ index e344d188e4b250074acfa058782a76841b9295b8..3b4dc6615e68254bf2fabf2887a0c21a if (mouse_event_callback.Run(mouse_event)) { return; diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 6e1738a8a0e63d1e3dbabf29ee4d034e124a3dd2..033ae3771b30d5475de5c20838aa9686255d9988 100644 +index a0039d06b681a8d229604f8d8ef026b3ddb1e70e..8d9f9b03c07474fafb0085e5bd666c6c98f127d2 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4463,6 +4463,12 @@ void WebContentsImpl::RenderWidgetWasResized( +@@ -4461,6 +4461,12 @@ void WebContentsImpl::RenderWidgetWasResized( width_changed); } diff --git a/patches/chromium/revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch b/patches/chromium/revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch index 23c22f5984..56336f3f4e 100644 --- a/patches/chromium/revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch +++ b/patches/chromium/revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch @@ -10,10 +10,10 @@ on Windows. We should refactor our code so that this patch isn't necessary. diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json -index 00882bfa1977eb6306c5ca75bb576d2717d8f24d..60cc87850bf7c3f89f5b6f8be53cbcf124beca73 100644 +index ee61a8860e6acc7dec1daa6f49ce32e5ac97c64d..94b5774c1e22208d5dc5627da945454d7926fd7e 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json -@@ -26116,6 +26116,21 @@ +@@ -26563,6 +26563,21 @@ ] } ], @@ -67,7 +67,7 @@ index 5f5ea15678bd76399fdbbb8904fe155657f49335..a67c124878fb710599fed5d9714bfa72 VIEWS_EXPORT BASE_DECLARE_FEATURE(kApplyInitialUrlToWebContents); 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 b37df4100eac1263f874dc5bff9e29eea64c1c0a..724a094c1b9a3c1efaf65c5222e40433a374b76d 100644 +index 8fe4ef2a5699fdf1a895a2981f5cc7312070fbc2..2bf4889631ea93ab34bad6e69b301f1b09844840 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 @@ -84,6 +84,23 @@ namespace { @@ -219,7 +219,7 @@ index b37df4100eac1263f874dc5bff9e29eea64c1c0a..724a094c1b9a3c1efaf65c5222e40433 } gfx::Rect -@@ -920,18 +959,26 @@ int DesktopWindowTreeHostWin::GetNonClientComponent( +@@ -922,18 +961,26 @@ int DesktopWindowTreeHostWin::GetNonClientComponent( void DesktopWindowTreeHostWin::GetWindowMask(const gfx::Size& size_px, SkPath* path) { diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 65a9dbd527..d72f9c3bd7 100644 --- a/patches/chromium/scroll_bounce_flag.patch +++ b/patches/chromium/scroll_bounce_flag.patch @@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch Patch to make scrollBounce option work. diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc -index 2c2a3443d6c9dd16849b15160ae97ea6ae1ff6a2..f8a411eda4df00e6f27ed64fa72eb649a72afdce 100644 +index 45a65d4edc77c0211a8725fd2e2da49222d52071..028ff20cf097324dbfd174470dd23eeed5f20eaf 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1130,11 +1130,11 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1128,11 +1128,11 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabledOnRoot() { diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 955aa24e15..ef5e95b427 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 430c191b8d282b63aa5a04207da28660f203d910..78685aedc7b246b01714eccb94af6045e19466fd 100644 +index 377c9375ba8e98bb7b8db39259d15a3ae504af7b..d1aed513b3147259a41200c4159f75778d12c13a 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1936,6 +1936,10 @@ bool RenderProcessHostImpl::Init() { +@@ -1935,6 +1935,10 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( *cmd_line, IsPdf(), IsJitDisabled()); @@ -61,7 +61,7 @@ index 0936beb23188f0d07cd5750f3a2e56dc560fdef2..996eab5dae4ffa6b7898cc070de8162a dynamic_code_can_be_disabled_ = true; return; diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h -index b98b23a95003c3e3dd7b2da6a48b956cdbeb5251..0597eca8efa2bea2cb800c6919b59dfb64c87083 100644 +index 96977b4d91e8062d49e69f3622c258f6610426bc..58544aa651f516c85cfc3ed6a4777595dd69e6a8 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h @@ -18,6 +18,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index c0472979e7..4ff08c6aaf 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 a6197d7c8ec5e1c27c74372e478b87aadd7ba7a7..b882687c609de03c4df43439691a1214cb8536e1 100644 +index e9bbc2b44544ba718ab7eabc5627ff03a1c211b4..005cb6776c620af858a1188f89743ef1ba595c3c 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4180,6 +4180,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -4179,6 +4179,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, params.main_frame_name, GetOpener(), primary_main_frame_policy, base::UnguessableToken::Create()); @@ -26,7 +26,7 @@ index a6197d7c8ec5e1c27c74372e478b87aadd7ba7a7..b882687c609de03c4df43439691a1214 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -4190,6 +4197,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -4189,6 +4196,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 324048e695..8cff7a4456 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -15,10 +15,10 @@ Note that we also need to manually update embedder's `api::WebContents::IsFullscreenForTabOrPending` value. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 528b2ef70453b904c630fd657e8dffff8c7c642d..80b57dbb3c79bc4333a87325d877223dcd7c7581 100644 +index f7eaca99d21f707e9e139e65bf7c69c6359cece3..aeb8fb48210a6ce267464c3a780cd0a34ae1595d 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -9087,6 +9087,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -9110,6 +9110,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } @@ -37,10 +37,10 @@ index 528b2ef70453b904c630fd657e8dffff8c7c642d..80b57dbb3c79bc4333a87325d877223d if (had_fullscreen_token && !GetView()->HasFocus()) { GetView()->Focus(); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index b882687c609de03c4df43439691a1214cb8536e1..3649b08b774c2bc2d8b314f6a4d02a67444de305 100644 +index 005cb6776c620af858a1188f89743ef1ba595c3c..2460932f2f8ed1a6d80b8fea0453ce550e428885 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4480,21 +4480,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( +@@ -4478,21 +4478,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( const input::NativeWebKeyboardEvent& event) { OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"), "WebContentsImpl::PreHandleKeyboardEvent"); @@ -80,7 +80,7 @@ index b882687c609de03c4df43439691a1214cb8536e1..3649b08b774c2bc2d8b314f6a4d02a67 } bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { -@@ -4663,7 +4667,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -4668,7 +4672,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame)); DCHECK(requesting_frame->IsActive()); diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index bf82577a7e..756ec05e06 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,7 +26,7 @@ index 36b734254b0c5836e9765f52587b7a1967c5c486..b7c3a63d126c1f8d83673c456d71c946 // 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 dca3e11ca57ba7cc3d455270540becbe15243e15..bd8d503675b01f205091c926e35d967ef951619b 100644 +index 6eedc70574ff328fc0ca3eb6f06fefd36b6d317f..2d420c91bff17baf1f6525e40248ce2a8ef011db 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc @@ -922,6 +922,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { diff --git a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch index 2975e58b57..68f23135ba 100644 --- a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch +++ b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch @@ -35,7 +35,7 @@ index b7c3a63d126c1f8d83673c456d71c946d50ca067..a0a6c6815c553ca6a50c49f52ad45055 // 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 bd8d503675b01f205091c926e35d967ef951619b..7aa2e89c568c4c18a86f283facb077752e3f768b 100644 +index 2d420c91bff17baf1f6525e40248ce2a8ef011db..222286e1606e82823494de18f5d33dc2ce2dc80e 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc @@ -934,6 +934,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( diff --git a/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch b/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch index a8dbdaeb49..a6e8edba0b 100644 --- a/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch +++ b/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch @@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer patching legacy devtools code. diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts -index da118ebfb1779de981d2eb30f2054fbd0799d9fe..a0f960b24c5f5d111ce5bafe0659ad3d87911975 100644 +index 24bebe7a64772cfaa513dfbe9c8453b0f878a856..939451f98b06e0dca0dc9c0678939ac3fa69db64 100644 --- a/front_end/entrypoints/main/MainImpl.ts +++ b/front_end/entrypoints/main/MainImpl.ts -@@ -786,6 +786,8 @@ export class MainImpl { +@@ -813,6 +813,8 @@ export class MainImpl { globalThis.Main = globalThis.Main || {}; // @ts-expect-error Exported for Tests.js globalThis.Main.Main = MainImpl; diff --git a/patches/node/api_promote_deprecation_of_v8_context_and_v8_object_api_methods.patch b/patches/node/api_promote_deprecation_of_v8_context_and_v8_object_api_methods.patch index dfa4403289..d5787d3e64 100644 --- a/patches/node/api_promote_deprecation_of_v8_context_and_v8_object_api_methods.patch +++ b/patches/node/api_promote_deprecation_of_v8_context_and_v8_object_api_methods.patch @@ -43,6 +43,20 @@ index 37d83e41b618a07aca98118260abe9618f11256d..26d5c1bd3c8191fce1d22b969996b6bf } template +diff --git a/src/base_object.cc b/src/base_object.cc +index 404e2aa8c88d0cc0e6717c01e0df68899c64cc32..16462f305a2ac6b6c3d7b85024f2e52648c4300c 100644 +--- a/src/base_object.cc ++++ b/src/base_object.cc +@@ -45,7 +45,8 @@ BaseObject::~BaseObject() { + + { + HandleScope handle_scope(realm()->isolate()); +- object()->SetAlignedPointerInInternalField(BaseObject::kSlot, nullptr); ++ object()->SetAlignedPointerInInternalField( ++ BaseObject::kSlot, nullptr, v8::kEmbedderDataTypeTagDefault); + } + } + diff --git a/src/env-inl.h b/src/env-inl.h index 97c43afb487b58c0c77bd59b4a6b6d7a13690053..23a4d7b651935a4029249fb2f1dd3ed46ea3b26f 100644 --- a/src/env-inl.h @@ -57,6 +71,66 @@ index 97c43afb487b58c0c77bd59b4a6b6d7a13690053..23a4d7b651935a4029249fb2f1dd3ed4 } inline Environment* Environment::GetCurrent( +diff --git a/src/histogram.cc b/src/histogram.cc +index 836a51b0e5aa4b1910604537c8b380038c27a7db..c4634e42fd2e5a27b0139a9b1716bc04875be469 100644 +--- a/src/histogram.cc ++++ b/src/histogram.cc +@@ -136,7 +136,8 @@ HistogramBase::HistogramBase( + MakeWeak(); + wrap->SetAlignedPointerInInternalField( + HistogramImpl::InternalFields::kImplField, +- static_cast(this)); ++ static_cast(this), ++ v8::kEmbedderDataTypeTagDefault); + } + + HistogramBase::HistogramBase( +@@ -148,7 +149,8 @@ HistogramBase::HistogramBase( + MakeWeak(); + wrap->SetAlignedPointerInInternalField( + HistogramImpl::InternalFields::kImplField, +- static_cast(this)); ++ static_cast(this), ++ v8::kEmbedderDataTypeTagDefault); + } + + void HistogramBase::MemoryInfo(MemoryTracker* tracker) const { +@@ -362,7 +364,8 @@ IntervalHistogram::IntervalHistogram( + MakeWeak(); + wrap->SetAlignedPointerInInternalField( + HistogramImpl::InternalFields::kImplField, +- static_cast(this)); ++ static_cast(this), ++ v8::kEmbedderDataTypeTagDefault); + uv_timer_init(env->event_loop(), &timer_); + } + +@@ -601,7 +604,8 @@ HistogramImpl* HistogramImpl::FromJSObject(Local value) { + auto obj = value.As(); + DCHECK_GE(obj->InternalFieldCount(), HistogramImpl::kInternalFieldCount); + return static_cast( +- obj->GetAlignedPointerFromInternalField(HistogramImpl::kImplField)); ++ obj->GetAlignedPointerFromInternalField(HistogramImpl::kImplField, ++ v8::kEmbedderDataTypeTagDefault)); + } + + std::unique_ptr +diff --git a/src/js_udp_wrap.cc b/src/js_udp_wrap.cc +index 51e4f8c45ffd38fcf925ab8d283b3b88f2a35832..0c30c8b4609e4870c0ccfc5e9e465248c20763b8 100644 +--- a/src/js_udp_wrap.cc ++++ b/src/js_udp_wrap.cc +@@ -55,8 +55,9 @@ JSUDPWrap::JSUDPWrap(Environment* env, Local obj) + : AsyncWrap(env, obj, PROVIDER_JSUDPWRAP) { + MakeWeak(); + +- obj->SetAlignedPointerInInternalField( +- kUDPWrapBaseField, static_cast(this)); ++ obj->SetAlignedPointerInInternalField(kUDPWrapBaseField, ++ static_cast(this), ++ v8::kEmbedderDataTypeTagDefault); + } + + int JSUDPWrap::RecvStart() { diff --git a/src/node_context_data.h b/src/node_context_data.h index d81c75daaae47b8b0b489cf357a32e437e7a6cf7..b0aab2f7b2538b6e2cacc9ffd52473b7b4ffff38 100644 --- a/src/node_context_data.h @@ -103,6 +177,21 @@ index cb13d84388bcc6806d3b038a51e1cc2d1feccda1..687b2cf3e63b2a3306e2cbac67e3e216 persistent().Reset(v8::Isolate::GetCurrent(), handle); MakeWeak(); } +diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc +index fe4aad63bc877be105830a80aa6be10ce3f8fda4..588b1fef718853bec95a4e4a3b14809a0e7018ea 100644 +--- a/src/node_process_methods.cc ++++ b/src/node_process_methods.cc +@@ -672,8 +672,8 @@ void BindingData::RegisterExternalReferences( + + BindingData* BindingData::FromV8Value(Local value) { + Local v8_object = value.As(); +- return static_cast( +- v8_object->GetAlignedPointerFromInternalField(BaseObject::kSlot)); ++ return static_cast(v8_object->GetAlignedPointerFromInternalField( ++ BaseObject::kSlot, v8::kEmbedderDataTypeTagDefault)); + } + + void BindingData::MemoryInfo(MemoryTracker* tracker) const { diff --git a/src/node_realm-inl.h b/src/node_realm-inl.h index f162d1506c990a5fe578be6f1324427e3f9023f4..b57bb0b42e98b954c0c8662c667e589d6c68a5d3 100644 --- a/src/node_realm-inl.h @@ -117,3 +206,118 @@ index f162d1506c990a5fe578be6f1324427e3f9023f4..b57bb0b42e98b954c0c8662c667e589d } inline Realm* Realm::GetCurrent( +diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc +index e34d24d51d5c090b560d06f727043f20924e6f46..07615933c858a17515836a29f7e27ace4b81e6ff 100644 +--- a/src/node_snapshotable.cc ++++ b/src/node_snapshotable.cc +@@ -1400,7 +1400,8 @@ StartupData SerializeNodeContextInternalFields(Local holder, + // For the moment we do not set any internal fields in ArrayBuffer + // or ArrayBufferViews, so just return nullptr. + if (holder->IsArrayBuffer() || holder->IsArrayBufferView()) { +- CHECK_NULL(holder->GetAlignedPointerFromInternalField(index)); ++ CHECK_NULL(holder->GetAlignedPointerFromInternalField( ++ index, v8::kEmbedderDataTypeTagDefault)); + return StartupData{nullptr, 0}; + } + +@@ -1420,7 +1421,8 @@ StartupData SerializeNodeContextInternalFields(Local holder, + *holder); + + BaseObject* object_ptr = static_cast( +- holder->GetAlignedPointerFromInternalField(BaseObject::kSlot)); ++ holder->GetAlignedPointerFromInternalField( ++ BaseObject::kSlot, v8::kEmbedderDataTypeTagDefault)); + // If the native object is already set to null, ignore it. + if (object_ptr == nullptr) { + return StartupData{nullptr, 0}; +diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h +index 29a4c29f3d3822394d23c453899cdd6aae280f3f..2a953d6390d5e4e251e54c1e847d4e5e25785065 100644 +--- a/src/stream_base-inl.h ++++ b/src/stream_base-inl.h +@@ -19,22 +19,22 @@ StreamReq::StreamReq( + + void StreamReq::AttachToObject(v8::Local req_wrap_obj) { + CHECK_EQ(req_wrap_obj->GetAlignedPointerFromInternalField( +- StreamReq::kStreamReqField), ++ StreamReq::kStreamReqField, v8::kEmbedderDataTypeTagDefault), + nullptr); + req_wrap_obj->SetAlignedPointerInInternalField( +- StreamReq::kStreamReqField, this); ++ StreamReq::kStreamReqField, this, v8::kEmbedderDataTypeTagDefault); + } + + StreamReq* StreamReq::FromObject(v8::Local req_wrap_obj) { + return static_cast( + req_wrap_obj->GetAlignedPointerFromInternalField( +- StreamReq::kStreamReqField)); ++ StreamReq::kStreamReqField, v8::kEmbedderDataTypeTagDefault)); + } + + void StreamReq::Dispose() { + BaseObjectPtr destroy_me{GetAsyncWrap()}; + object()->SetAlignedPointerInInternalField( +- StreamReq::kStreamReqField, nullptr); ++ StreamReq::kStreamReqField, nullptr, v8::kEmbedderDataTypeTagDefault); + destroy_me->Detach(); + } + +@@ -120,16 +120,17 @@ SimpleWriteWrap::SimpleWriteWrap( + + void StreamBase::AttachToObject(v8::Local obj) { + obj->SetAlignedPointerInInternalField( +- StreamBase::kStreamBaseField, this); ++ StreamBase::kStreamBaseField, this, v8::kEmbedderDataTypeTagDefault); + } + + StreamBase* StreamBase::FromObject(v8::Local obj) { +- if (obj->GetAlignedPointerFromInternalField(StreamBase::kSlot) == nullptr) ++ if (obj->GetAlignedPointerFromInternalField( ++ StreamBase::kSlot, v8::kEmbedderDataTypeTagDefault) == nullptr) + return nullptr; + + return static_cast( + obj->GetAlignedPointerFromInternalField( +- StreamBase::kStreamBaseField)); ++ StreamBase::kStreamBaseField, v8::kEmbedderDataTypeTagDefault)); + } + + WriteWrap* WriteWrap::FromObject(v8::Local req_wrap_obj) { +@@ -162,8 +163,10 @@ void WriteWrap::SetBackingStore(std::unique_ptr bs) { + void StreamReq::ResetObject(v8::Local obj) { + DCHECK_GT(obj->InternalFieldCount(), StreamReq::kStreamReqField); + +- obj->SetAlignedPointerInInternalField(StreamReq::kSlot, nullptr); +- obj->SetAlignedPointerInInternalField(StreamReq::kStreamReqField, nullptr); ++ obj->SetAlignedPointerInInternalField( ++ StreamReq::kSlot, nullptr, v8::kEmbedderDataTypeTagDefault); ++ obj->SetAlignedPointerInInternalField( ++ StreamReq::kStreamReqField, nullptr, v8::kEmbedderDataTypeTagDefault); + } + + } // namespace node +diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc +index 150ef0f0400bed9df4f4b1a4c20ec4045ef7a5f6..2ca2ac177c6b5edc3b40712a40ff4a36e96904dc 100644 +--- a/src/udp_wrap.cc ++++ b/src/udp_wrap.cc +@@ -126,8 +126,8 @@ void UDPWrapBase::set_listener(UDPListener* listener) { + + UDPWrapBase* UDPWrapBase::FromObject(Local obj) { + CHECK_GT(obj->InternalFieldCount(), UDPWrapBase::kUDPWrapBaseField); +- return static_cast( +- obj->GetAlignedPointerFromInternalField(UDPWrapBase::kUDPWrapBaseField)); ++ return static_cast(obj->GetAlignedPointerFromInternalField( ++ UDPWrapBase::kUDPWrapBaseField, v8::kEmbedderDataTypeTagDefault)); + } + + void UDPWrapBase::AddMethods(Environment* env, Local t) { +@@ -147,7 +147,9 @@ UDPWrap::UDPWrap(Environment* env, Local object) + reinterpret_cast(&handle_), + AsyncWrap::PROVIDER_UDPWRAP) { + object->SetAlignedPointerInInternalField( +- UDPWrapBase::kUDPWrapBaseField, static_cast(this)); ++ UDPWrapBase::kUDPWrapBaseField, ++ static_cast(this), ++ v8::kEmbedderDataTypeTagDefault); + + int r = uv_udp_init(env->event_loop(), &handle_); + CHECK_EQ(r, 0); // can't fail anyway diff --git a/patches/node/fix_crypto_tests_to_run_with_bssl.patch b/patches/node/fix_crypto_tests_to_run_with_bssl.patch index ed15a7a861..d0e9e8f457 100644 --- a/patches/node/fix_crypto_tests_to_run_with_bssl.patch +++ b/patches/node/fix_crypto_tests_to_run_with_bssl.patch @@ -299,7 +299,7 @@ index d22281abbd5c3cab3aaa3ac494301fa6b4a8a968..5f0c6a4aed2e868a1a1049212edf2187 s.pipe(h).on('data', common.mustCall(function(c) { assert.strictEqual(c, expect); diff --git a/test/parallel/test-crypto-key-objects-to-crypto-key.js b/test/parallel/test-crypto-key-objects-to-crypto-key.js -index 141e51d1ab74a4fc3b176b303807fb1cf2a58ce1..7ea6643fe5c8cc0e7613782419e1d465f99314cd 100644 +index 141e51d1ab74a4fc3b176b303807fb1cf2a58ce1..ba4fc881aa72ba7c39e8ae227a08be0ecf501c6f 100644 --- a/test/parallel/test-crypto-key-objects-to-crypto-key.js +++ b/test/parallel/test-crypto-key-objects-to-crypto-key.js @@ -26,9 +26,14 @@ function assertCryptoKey(cryptoKey, keyObject, algorithm, extractable, usages) { @@ -318,7 +318,7 @@ index 141e51d1ab74a4fc3b176b303807fb1cf2a58ce1..7ea6643fe5c8cc0e7613782419e1d465 for (const algorithm of algorithms) { const usages = algorithm === 'AES-KW' ? ['wrapKey', 'unwrapKey'] : ['encrypt', 'decrypt']; for (const extractable of [true, false]) { -@@ -97,7 +102,14 @@ function assertCryptoKey(cryptoKey, keyObject, algorithm, extractable, usages) { +@@ -97,7 +102,13 @@ function assertCryptoKey(cryptoKey, keyObject, algorithm, extractable, usages) { } { @@ -330,7 +330,6 @@ index 141e51d1ab74a4fc3b176b303807fb1cf2a58ce1..7ea6643fe5c8cc0e7613782419e1d465 + } + + for (const algorithm of algorithms) { -+ console.log(algorithm); const { publicKey, privateKey } = generateKeyPairSync(algorithm.toLowerCase()); assert.throws(() => { publicKey.toCryptoKey(algorithm === 'Ed25519' ? 'X25519' : 'Ed25519', true, []); @@ -541,6 +540,21 @@ index 75cb4800ff1bd51fedd7bc4e2d7e6af6f4f48346..b4363c31592763235116d970a5f45d4c // Test XOF hash functions and the outputLength option. { // Default outputLengths. +diff --git a/test/parallel/test-crypto-pqc-key-objects-ml-dsa.js b/test/parallel/test-crypto-pqc-key-objects-ml-dsa.js +index 37eab463deae472a78102c9fc6e03d4b642854ce..99e8c47702c55a9518ff093a58d87c753bec3aa8 100644 +--- a/test/parallel/test-crypto-pqc-key-objects-ml-dsa.js ++++ b/test/parallel/test-crypto-pqc-key-objects-ml-dsa.js +@@ -4,6 +4,10 @@ const common = require('../common'); + if (!common.hasCrypto) + common.skip('missing crypto'); + ++if (process.features.openssl_is_boringssl) { ++ common.skip('Skipping unsupported ML-DSA key tests'); ++} ++ + const { hasOpenSSL } = require('../common/crypto'); + + const assert = require('assert'); diff --git a/test/parallel/test-crypto-rsa-dsa.js b/test/parallel/test-crypto-rsa-dsa.js index 119bc3c2d20ea7d681f0b579f9d91ad46cdc3634..ad9cd4fd81aff32ec175f469176e1012b81872ac 100644 --- a/test/parallel/test-crypto-rsa-dsa.js diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index 278ae4c7be..37bef80587 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -66,6 +66,8 @@ #if BUILDFLAG(IS_LINUX) #include "base/nix/xdg_util.h" +#include "base/posix/global_descriptors.h" +#include "content/public/common/content_descriptors.h" #include "v8/include/v8-wasm-trap-handler-posix.h" #include "v8/include/v8.h" #endif @@ -240,6 +242,20 @@ void ElectronMainDelegate::PreSandboxStartup() { auto* command_line = base::CommandLine::ForCurrentProcess(); std::string process_type = GetProcessType(); +#if BUILDFLAG(IS_LINUX) + // Register the pseudonymization salt descriptor in GlobalDescriptors. + // (see https://crbug.com/40850085) Only affects processes launched + // without the zygote (i.e. utility processes) + // TODO: Remove in favor of + // https://chromium-review.googlesource.com/c/chromium/src/+/7568382 + if (!process_type.empty() && !IsZygoteProcess()) { + base::GlobalDescriptors::GetInstance()->Set( + kPseudonymizationSaltDescriptor, + kPseudonymizationSaltDescriptor + + base::GlobalDescriptors::kBaseDescriptor); + } +#endif + base::FilePath user_data_dir = command_line->GetSwitchValuePath(::switches::kUserDataDir); if (!user_data_dir.empty()) { diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index b5cfbd2368..10b8ab078d 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -510,7 +510,7 @@ int ImportIntoCertStore(CertificateManagerModel* model, base::Value options) { net::ScopedCERTCertificateList imported_certs; int rv = -1; - if (const base::Value::Dict* dict = options.GetIfDict(); dict != nullptr) { + if (const base::DictValue* dict = options.GetIfDict(); dict != nullptr) { if (const std::string* str = dict->FindString("certificate"); str) cert_path = *str; @@ -611,7 +611,7 @@ void App::OnWillFinishLaunching() { Emit("will-finish-launching"); } -void App::OnFinishLaunching(base::Value::Dict launch_info) { +void App::OnFinishLaunching(base::DictValue launch_info) { #if BUILDFLAG(IS_LINUX) // Set the application name for audio streams shown in external // applications. Only affects pulseaudio currently. @@ -662,8 +662,8 @@ void App::OnDidFailToContinueUserActivity(const std::string& type, void App::OnContinueUserActivity(bool* prevent_default, const std::string& type, - base::Value::Dict user_info, - base::Value::Dict details) { + base::DictValue user_info, + base::DictValue details) { if (Emit("continue-activity", type, base::Value(std::move(user_info)), base::Value(std::move(details)))) { *prevent_default = true; @@ -671,13 +671,13 @@ void App::OnContinueUserActivity(bool* prevent_default, } void App::OnUserActivityWasContinued(const std::string& type, - base::Value::Dict user_info) { + base::DictValue user_info) { Emit("activity-was-continued", type, base::Value(std::move(user_info))); } void App::OnUpdateUserActivityState(bool* prevent_default, const std::string& type, - base::Value::Dict user_info) { + base::DictValue user_info) { if (Emit("update-activity-state", type, base::Value(std::move(user_info)))) { *prevent_default = true; } @@ -1584,7 +1584,7 @@ v8::Local App::SetProxy(gin::Arguments* args) { return handle; } - base::Value::Dict proxy_config; + base::DictValue proxy_config; switch (proxy_mode) { case ProxyPrefs::MODE_DIRECT: proxy_config = ProxyConfigDictionary::CreateDirect(); diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index fd0565b51c..9e43cdc0ae 100644 --- a/shell/browser/api/electron_api_app.h +++ b/shell/browser/api/electron_api_app.h @@ -106,7 +106,7 @@ class App final : public gin::Wrappable, void OnOpenURL(const std::string& url) override; void OnActivate(bool has_visible_windows) override; void OnWillFinishLaunching() override; - void OnFinishLaunching(base::Value::Dict launch_info) override; + void OnFinishLaunching(base::DictValue launch_info) override; void OnAccessibilitySupportChanged() override; void OnPreMainMessageLoopRun() override; void OnPreCreateThreads() override; @@ -117,13 +117,13 @@ class App final : public gin::Wrappable, const std::string& error) override; void OnContinueUserActivity(bool* prevent_default, const std::string& type, - base::Value::Dict user_info, - base::Value::Dict details) override; + base::DictValue user_info, + base::DictValue details) override; void OnUserActivityWasContinued(const std::string& type, - base::Value::Dict user_info) override; + base::DictValue user_info) override; void OnUpdateUserActivityState(bool* prevent_default, const std::string& type, - base::Value::Dict user_info) override; + base::DictValue user_info) override; void OnNewWindowForTab() override; void OnDidBecomeActive() override; void OnDidResignActive() override; diff --git a/shell/browser/api/electron_api_base_window.cc b/shell/browser/api/electron_api_base_window.cc index acd6642ad6..dccccb4978 100644 --- a/shell/browser/api/electron_api_base_window.cc +++ b/shell/browser/api/electron_api_base_window.cc @@ -333,7 +333,7 @@ void BaseWindow::OnExecuteAppCommand(const std::string_view command_name) { } void BaseWindow::OnTouchBarItemResult(const std::string& item_id, - const base::Value::Dict& details) { + const base::DictValue& details) { Emit("-touch-bar-interaction", item_id, details); } diff --git a/shell/browser/api/electron_api_base_window.h b/shell/browser/api/electron_api_base_window.h index 51d6ed0e58..81bde406e5 100644 --- a/shell/browser/api/electron_api_base_window.h +++ b/shell/browser/api/electron_api_base_window.h @@ -92,7 +92,7 @@ class BaseWindow : public gin_helper::TrackableObject, void OnWindowAlwaysOnTopChanged() override; void OnExecuteAppCommand(std::string_view command_name) override; void OnTouchBarItemResult(const std::string& item_id, - const base::Value::Dict& details) override; + const base::DictValue& details) override; void OnNewWindowForTab() override; void OnSystemContextMenu(int x, int y, bool* prevent_default) override; #if BUILDFLAG(IS_WIN) diff --git a/shell/browser/api/electron_api_content_tracing.cc b/shell/browser/api/electron_api_content_tracing.cc index 90652c0de5..6eaf1c69c1 100644 --- a/shell/browser/api/electron_api_content_tracing.cc +++ b/shell/browser/api/electron_api_content_tracing.cc @@ -45,7 +45,7 @@ struct Converter { } } - base::Value::Dict memory_dump_config; + base::DictValue memory_dump_config; if (ConvertFromV8(isolate, val, &memory_dump_config)) { *out = base::trace_event::TraceConfig(std::move(memory_dump_config)); return true; diff --git a/shell/browser/api/electron_api_cookies.cc b/shell/browser/api/electron_api_cookies.cc index 417ffa217b..a9520dbe2a 100644 --- a/shell/browser/api/electron_api_cookies.cc +++ b/shell/browser/api/electron_api_cookies.cc @@ -108,7 +108,7 @@ namespace electron::api { namespace { // Returns whether |cookie| matches |filter|. -bool MatchesCookie(const base::Value::Dict& filter, +bool MatchesCookie(const base::DictValue& filter, const net::CanonicalCookie& cookie) { const std::string* str; if ((str = filter.FindString("name")) && *str != cookie.Name()) @@ -130,7 +130,7 @@ bool MatchesCookie(const base::Value::Dict& filter, } // Remove cookies from |list| not matching |filter|, and pass it to |callback|. -void FilterCookies(base::Value::Dict filter, +void FilterCookies(base::DictValue filter, gin_helper::Promise promise, const net::CookieList& cookies) { net::CookieList result; @@ -142,7 +142,7 @@ void FilterCookies(base::Value::Dict filter, } void FilterCookieWithStatuses( - base::Value::Dict filter, + base::DictValue filter, gin_helper::Promise promise, const net::CookieAccessResultList& list, const net::CookieAccessResultList& excluded_list) { @@ -236,7 +236,9 @@ const std::string InclusionStatusToString(net::CookieInclusionStatus status) { "The cookie contains no content or only whitespace."}, {Reason::EXCLUDE_ANONYMOUS_CONTEXT, "The cookie is unpartitioned and being accessed from an anonymous " - "context."}}); + "context."}, + {Reason::EXCLUDE_INVALID_PATH, + "The cookie was set with an invalid Path attribute."}}); static_assert( Reasons.size() == net::CookieInclusionStatus::ExclusionReasonBitset::kValueCount, @@ -310,7 +312,7 @@ v8::Local Cookies::Get(v8::Isolate* isolate, auto* storage_partition = browser_context_->GetDefaultStoragePartition(); auto* manager = storage_partition->GetCookieManagerForBrowserProcess(); - base::Value::Dict dict; + base::DictValue dict; gin::ConvertFromV8(isolate, filter.GetHandle(), &dict); std::string url; @@ -359,7 +361,7 @@ v8::Local Cookies::Remove(v8::Isolate* isolate, } v8::Local Cookies::Set(v8::Isolate* isolate, - base::Value::Dict details) { + base::DictValue details) { gin_helper::Promise promise(isolate); v8::Local handle = promise.GetHandle(); diff --git a/shell/browser/api/electron_api_cookies.h b/shell/browser/api/electron_api_cookies.h index 53261f35a4..c24b08c073 100644 --- a/shell/browser/api/electron_api_cookies.h +++ b/shell/browser/api/electron_api_cookies.h @@ -54,7 +54,7 @@ class Cookies final : public gin_helper::DeprecatedWrappable, v8::Local Get(v8::Isolate*, const gin_helper::Dictionary& filter); - v8::Local Set(v8::Isolate*, base::Value::Dict details); + v8::Local Set(v8::Isolate*, base::DictValue details); v8::Local Remove(v8::Isolate*, const GURL& url, const std::string& name); diff --git a/shell/browser/api/electron_api_debugger.cc b/shell/browser/api/electron_api_debugger.cc index 29f496c746..5a9bc16703 100644 --- a/shell/browser/api/electron_api_debugger.cc +++ b/shell/browser/api/electron_api_debugger.cc @@ -53,31 +53,31 @@ void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host, message_str, base::JSON_REPLACE_INVALID_CHARACTERS); if (!parsed_message || !parsed_message->is_dict()) return; - base::Value::Dict& dict = parsed_message->GetDict(); + base::DictValue& dict = parsed_message->GetDict(); std::optional id = dict.FindInt("id"); if (!id) { std::string* method = dict.FindString("method"); if (!method) return; std::string* session_id = dict.FindString("sessionId"); - base::Value::Dict* params = dict.FindDict("params"); - Emit("message", *method, params ? std::move(*params) : base::Value::Dict(), + base::DictValue* params = dict.FindDict("params"); + Emit("message", *method, params ? std::move(*params) : base::DictValue(), session_id ? *session_id : ""); } else { auto it = pending_requests_.find(*id); if (it == pending_requests_.end()) return; - gin_helper::Promise promise = std::move(it->second); + gin_helper::Promise promise = std::move(it->second); pending_requests_.erase(it); - base::Value::Dict* error = dict.FindDict("error"); + base::DictValue* error = dict.FindDict("error"); if (error) { std::string* error_message = error->FindString("message"); promise.RejectWithErrorMessage(error_message ? *error_message : ""); } else { - base::Value::Dict* result = dict.FindDict("result"); - promise.Resolve(result ? std::move(*result) : base::Value::Dict()); + base::DictValue* result = dict.FindDict("result"); + promise.Resolve(result ? std::move(*result) : base::DictValue()); } } } @@ -132,7 +132,7 @@ void Debugger::Detach() { v8::Local Debugger::SendCommand(gin::Arguments* args) { v8::Isolate* isolate = args->isolate(); - gin_helper::Promise promise(isolate); + gin_helper::Promise promise(isolate); v8::Local handle = promise.GetHandle(); if (!agent_host_) { @@ -146,7 +146,7 @@ v8::Local Debugger::SendCommand(gin::Arguments* args) { return handle; } - base::Value::Dict command_params; + base::DictValue command_params; args->GetNext(&command_params); std::string session_id; @@ -155,7 +155,7 @@ v8::Local Debugger::SendCommand(gin::Arguments* args) { return handle; } - base::Value::Dict request; + base::DictValue request; int request_id = ++previous_request_id_; pending_requests_.emplace(request_id, std::move(promise)); request.Set("id", request_id); diff --git a/shell/browser/api/electron_api_debugger.h b/shell/browser/api/electron_api_debugger.h index 1d40c4f16e..1e8a52cc39 100644 --- a/shell/browser/api/electron_api_debugger.h +++ b/shell/browser/api/electron_api_debugger.h @@ -68,8 +68,7 @@ class Debugger final : public gin::Wrappable, content::RenderFrameHost* new_rfh) override; private: - using PendingRequestMap = - std::map>; + using PendingRequestMap = std::map>; void Attach(gin::Arguments* args); bool IsAttached(); diff --git a/shell/browser/api/electron_api_net_log.cc b/shell/browser/api/electron_api_net_log.cc index 5d91452046..6981f9a1c6 100644 --- a/shell/browser/api/electron_api_net_log.cc +++ b/shell/browser/api/electron_api_net_log.cc @@ -133,7 +133,7 @@ v8::Local NetLog::StartLogging(base::FilePath log_path, auto command_line_string = base::CommandLine::ForCurrentProcess()->GetCommandLineString(); auto channel_string = std::string("Electron " ELECTRON_VERSION); - base::Value::Dict custom_constants = net_log::GetPlatformConstantsForNetLog( + base::DictValue custom_constants = net_log::GetPlatformConstantsForNetLog( command_line_string, channel_string); auto* network_context = @@ -155,7 +155,7 @@ v8::Local NetLog::StartLogging(base::FilePath log_path, void NetLog::StartNetLogAfterCreateFile(net::NetLogCaptureMode capture_mode, uint64_t max_file_size, - base::Value::Dict custom_constants, + base::DictValue custom_constants, base::File output_file) { if (!net_log_exporter_) { // Theoretically the mojo pipe could have been closed by the time we get @@ -206,7 +206,7 @@ v8::Local NetLog::StopLogging(v8::Isolate* const isolate) { // pointer lives long enough to resolve the promise. Moving it into the // callback will cause the instance variable to become empty. net_log_exporter_->Stop( - base::Value::Dict(), + base::DictValue(), base::BindOnce( [](mojo::Remote, gin_helper::Promise promise, int32_t error) { diff --git a/shell/browser/api/electron_api_net_log.h b/shell/browser/api/electron_api_net_log.h index 108a867982..4771c78676 100644 --- a/shell/browser/api/electron_api_net_log.h +++ b/shell/browser/api/electron_api_net_log.h @@ -67,7 +67,7 @@ class NetLog final : public gin::Wrappable { void StartNetLogAfterCreateFile(net::NetLogCaptureMode capture_mode, uint64_t max_file_size, - base::Value::Dict custom_constants, + base::DictValue custom_constants, base::File output_file); void NetLogStarted(int32_t error); diff --git a/shell/browser/api/electron_api_push_notifications.h b/shell/browser/api/electron_api_push_notifications.h index a9e7161dba..dec639cfac 100644 --- a/shell/browser/api/electron_api_push_notifications.h +++ b/shell/browser/api/electron_api_push_notifications.h @@ -41,7 +41,7 @@ class PushNotifications final PushNotifications& operator=(const PushNotifications&) = delete; #if BUILDFLAG(IS_MAC) - void OnDidReceiveAPNSNotification(const base::Value::Dict& user_info); + void OnDidReceiveAPNSNotification(const base::DictValue& user_info); void ResolveAPNSPromiseSetWithToken(const std::string& token_string); void RejectAPNSPromiseSetWithError(const std::string& error_message); #endif diff --git a/shell/browser/api/electron_api_push_notifications_mac.mm b/shell/browser/api/electron_api_push_notifications_mac.mm index ede147f28b..eb8bcb796c 100644 --- a/shell/browser/api/electron_api_push_notifications_mac.mm +++ b/shell/browser/api/electron_api_push_notifications_mac.mm @@ -46,7 +46,7 @@ void PushNotifications::UnregisterForAPNSNotifications() { } void PushNotifications::OnDidReceiveAPNSNotification( - const base::Value::Dict& user_info) { + const base::DictValue& user_info) { Emit("received-apns-notification", user_info); } diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index ceb29c29f0..6bc9191a80 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -369,10 +369,10 @@ class ClearDataTask : public gin_helper::CleanedUpAtExit { std::vector> operations_; }; -base::Value::Dict createProxyConfig(ProxyPrefs::ProxyMode proxy_mode, - std::string const& pac_url, - std::string const& proxy_server, - std::string const& bypass_list) { +base::DictValue createProxyConfig(ProxyPrefs::ProxyMode proxy_mode, + std::string const& pac_url, + std::string const& proxy_server, + std::string const& bypass_list) { if (proxy_mode == ProxyPrefs::MODE_DIRECT) { return ProxyConfigDictionary::CreateDirect(); } @@ -1579,7 +1579,7 @@ void Session::SetSpellCheckerLanguages( gin_helper::ErrorThrower thrower, const std::vector& languages) { #if !BUILDFLAG(IS_MAC) - base::Value::List language_codes; + base::ListValue language_codes; for (const std::string& lang : languages) { std::string code = spellcheck::GetCorrespondingSpellCheckLanguage(lang); if (code.empty()) { @@ -1738,7 +1738,7 @@ Session* Session::FromOrCreate(v8::Isolate* isolate, // static Session* Session::FromPartition(v8::Isolate* isolate, const std::string& partition, - base::Value::Dict options) { + base::DictValue options) { ElectronBrowserContext* browser_context; if (partition.empty()) { browser_context = @@ -1757,7 +1757,7 @@ Session* Session::FromPartition(v8::Isolate* isolate, // static Session* Session::FromPath(gin::Arguments* args, const base::FilePath& path, - base::Value::Dict options) { + base::DictValue options) { ElectronBrowserContext* browser_context; if (path.empty()) { @@ -1902,7 +1902,7 @@ Session* FromPartition(const std::string& partition, gin::Arguments* args) { args->ThrowTypeError("Session can only be received when app is ready"); return {}; } - base::Value::Dict options; + base::DictValue options; args->GetNext(&options); return Session::FromPartition(args->isolate(), partition, std::move(options)); } @@ -1912,7 +1912,7 @@ Session* FromPath(const base::FilePath& path, gin::Arguments* args) { args->ThrowTypeError("Session can only be received when app is ready"); return {}; } - base::Value::Dict options; + base::DictValue options; args->GetNext(&options); return Session::FromPath(args, path, std::move(options)); } diff --git a/shell/browser/api/electron_api_session.h b/shell/browser/api/electron_api_session.h index 58c28b9dab..f7e672d4ad 100644 --- a/shell/browser/api/electron_api_session.h +++ b/shell/browser/api/electron_api_session.h @@ -90,12 +90,12 @@ class Session final : public gin::Wrappable, // Gets the Session of |partition|. static Session* FromPartition(v8::Isolate* isolate, const std::string& partition, - base::Value::Dict options = {}); + base::DictValue options = {}); // Gets the Session based on |path|. static Session* FromPath(gin::Arguments* args, const base::FilePath& path, - base::Value::Dict options = {}); + base::DictValue options = {}); static void FillObjectTemplate(v8::Isolate*, v8::Local); static const char* GetClassName() { return "Session"; } diff --git a/shell/browser/api/electron_api_system_preferences.h b/shell/browser/api/electron_api_system_preferences.h index 442f2e2c11..0c155118e3 100644 --- a/shell/browser/api/electron_api_system_preferences.h +++ b/shell/browser/api/electron_api_system_preferences.h @@ -77,25 +77,25 @@ class SystemPreferences final void OnWndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); // BrowserObserver: - void OnFinishLaunching(base::Value::Dict launch_info) override; + void OnFinishLaunching(base::DictValue launch_info) override; #elif BUILDFLAG(IS_MAC) using NotificationCallback = base::RepeatingCallback< void(const std::string&, base::Value, const std::string&)>; void PostNotification(const std::string& name, - base::Value::Dict user_info, + base::DictValue user_info, gin::Arguments* args); int SubscribeNotification(v8::Local maybe_name, const NotificationCallback& callback); void UnsubscribeNotification(int id); void PostLocalNotification(const std::string& name, - base::Value::Dict user_info); + base::DictValue user_info); int SubscribeLocalNotification(v8::Local maybe_name, const NotificationCallback& callback); void UnsubscribeLocalNotification(int request_id); void PostWorkspaceNotification(const std::string& name, - base::Value::Dict user_info); + base::DictValue user_info); int SubscribeWorkspaceNotification(v8::Local maybe_name, const NotificationCallback& callback); void UnsubscribeWorkspaceNotification(int request_id); diff --git a/shell/browser/api/electron_api_system_preferences_mac.mm b/shell/browser/api/electron_api_system_preferences_mac.mm index f0f39f43b9..523a21060c 100644 --- a/shell/browser/api/electron_api_system_preferences_mac.mm +++ b/shell/browser/api/electron_api_system_preferences_mac.mm @@ -129,7 +129,7 @@ NSNotificationCenter* GetNotificationCenter(NotificationCenterKind kind) { } // namespace void SystemPreferences::PostNotification(const std::string& name, - base::Value::Dict user_info, + base::DictValue user_info, gin::Arguments* args) { bool immediate = false; args->GetNext(&immediate); @@ -157,7 +157,7 @@ void SystemPreferences::UnsubscribeNotification(int request_id) { } void SystemPreferences::PostLocalNotification(const std::string& name, - base::Value::Dict user_info) { + base::DictValue user_info) { NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; [center postNotificationName:base::SysUTF8ToNSString(name) @@ -178,7 +178,7 @@ void SystemPreferences::UnsubscribeLocalNotification(int request_id) { } void SystemPreferences::PostWorkspaceNotification(const std::string& name, - base::Value::Dict user_info) { + base::DictValue user_info) { NSNotificationCenter* center = [[NSWorkspace sharedWorkspace] notificationCenter]; [center @@ -236,7 +236,7 @@ int SystemPreferences::DoSubscribeNotification( } else { copied_callback.Run( base::SysNSStringToUTF8(notification.name), - base::Value(base::Value::Dict()), object); + base::Value(base::DictValue()), object); } }]; return request_id; @@ -285,7 +285,7 @@ v8::Local SystemPreferences::GetUserDefault( } void SystemPreferences::RegisterDefaults(gin::Arguments* args) { - base::Value::Dict dict_value; + base::DictValue dict_value; if (!args->GetNext(&dict_value)) { args->ThrowError(); diff --git a/shell/browser/api/electron_api_system_preferences_win.cc b/shell/browser/api/electron_api_system_preferences_win.cc index 46cac9af30..beb44ec86b 100644 --- a/shell/browser/api/electron_api_system_preferences_win.cc +++ b/shell/browser/api/electron_api_system_preferences_win.cc @@ -221,7 +221,7 @@ void SystemPreferences::OnWndProc(HWND hwnd, Emit("color-changed"); } -void SystemPreferences::OnFinishLaunching(base::Value::Dict launch_info) { +void SystemPreferences::OnFinishLaunching(base::DictValue launch_info) { hwnd_subscription_ = gfx::SingletonHwnd::GetInstance()->RegisterCallback(base::BindRepeating( &SystemPreferences::OnWndProc, base::Unretained(this))); diff --git a/shell/browser/api/electron_api_utility_process.cc b/shell/browser/api/electron_api_utility_process.cc index 474ee3f3b6..a3e68e8b9a 100644 --- a/shell/browser/api/electron_api_utility_process.cc +++ b/shell/browser/api/electron_api_utility_process.cc @@ -19,6 +19,7 @@ #include "content/public/common/result_codes.h" #include "gin/object_template_builder.h" #include "mojo/public/cpp/bindings/pending_receiver.h" +#include "services/network/public/cpp/originating_process.h" #include "shell/browser/api/message_port.h" #include "shell/browser/browser.h" #include "shell/browser/javascript_environment.h" @@ -214,7 +215,7 @@ UtilityProcessWrapper::UtilityProcessWrapper( mojo::PendingRemote url_loader_factory; network::mojom::URLLoaderFactoryParamsPtr loader_params = network::mojom::URLLoaderFactoryParams::New(); - loader_params->process_id = pid_; + loader_params->process_id = network::OriginatingProcess::browser(); loader_params->is_orb_enabled = false; loader_params->is_trusted = true; if (create_network_observer) { diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 34aa5187d6..3460e5f005 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -68,6 +68,7 @@ #include "content/public/browser/storage_partition.h" #include "content/public/browser/visibility.h" #include "content/public/browser/web_contents.h" +#include "content/public/common/child_process_id.h" #include "content/public/common/referrer_type_converters.h" #include "content/public/common/result_codes.h" #include "content/public/common/webplugininfo.h" @@ -642,13 +643,14 @@ std::string RegisterFileSystem(content::WebContents* web_contents, content::ChildProcessSecurityPolicy::GetInstance(); content::RenderViewHost* render_view_host = web_contents->GetRenderViewHost(); int renderer_id = render_view_host->GetProcess()->GetDeprecatedID(); + content::ChildProcessId process_id = render_view_host->GetProcess()->GetID(); policy->GrantReadFileSystem(renderer_id, file_system.id()); policy->GrantWriteFileSystem(renderer_id, file_system.id()); policy->GrantCreateFileForFileSystem(renderer_id, file_system.id()); policy->GrantDeleteFromFileSystem(renderer_id, file_system.id()); - if (!policy->CanReadFile(renderer_id, path)) - policy->GrantReadFile(renderer_id, path); + if (!policy->CanReadFile(process_id, path)) + policy->GrantReadFile(process_id, path); return file_system.id(); } @@ -665,8 +667,8 @@ FileSystem CreateFileSystemStruct(content::WebContents* web_contents, return FileSystem(type, file_system_name, root_url, file_system_path); } -base::Value::Dict CreateFileSystemValue(const FileSystem& file_system) { - base::Value::Dict value; +base::DictValue CreateFileSystemValue(const FileSystem& file_system) { + base::DictValue value; value.Set("type", file_system.type); value.Set("fileSystemName", file_system.file_system_name); value.Set("rootURL", file_system.root_url); @@ -709,7 +711,7 @@ PrefService* GetPrefService(content::WebContents* web_contents) { } // returns a Dict of filesystem_path -> type -[[nodiscard]] const base::Value::Dict& GetAddedFileSystems( +[[nodiscard]] const base::DictValue& GetAddedFileSystems( content::WebContents* web_contents) { return GetPrefService(web_contents)->GetDict(prefs::kDevToolsFileSystemPaths); } @@ -3024,7 +3026,7 @@ bool WebContents::IsCurrentlyAudible() { namespace { void OnGetDeviceNameToUse(base::WeakPtr web_contents, - base::Value::Dict print_settings, + base::DictValue print_settings, printing::CompletionCallback print_callback, // std::pair info) { @@ -3103,7 +3105,7 @@ void WebContents::Print(gin::Arguments* const args) { return; } - base::Value::Dict settings; + base::DictValue settings; if (options.IsEmptyObject()) { content::RenderFrameHost* rfh = GetRenderFrameHostToUse(web_contents()); if (!rfh) @@ -3134,7 +3136,7 @@ void WebContents::Print(gin::Arguments* const args) { if (margin_type == printing::mojom::MarginType::kCustomMargins) { settings.Set(printing::kSettingMarginsCustom, - base::Value::Dict{} + base::DictValue{} .Set(printing::kSettingMarginTop, margins.ValueOrDefault("top", 0)) .Set(printing::kSettingMarginBottom, @@ -3202,11 +3204,11 @@ void WebContents::Print(gin::Arguments* const args) { // Set custom page ranges to print std::vector page_ranges; if (options.Get("pageRanges", &page_ranges)) { - base::Value::List page_range_list; + base::ListValue page_range_list; for (auto& range : page_ranges) { int from, to; if (range.Get("from", &from) && range.Get("to", &to)) { - base::Value::Dict range_dict; + base::DictValue range_dict; // Chromium uses 1-based page ranges, so increment each by 1. range_dict.Set(printing::kSettingPageRangeFrom, from + 1); range_dict.Set(printing::kSettingPageRangeTo, to + 1); @@ -3224,13 +3226,13 @@ void WebContents::Print(gin::Arguments* const args) { "duplexMode", printing::mojom::DuplexMode::kSimplex); settings.Set(printing::kSettingDuplexMode, static_cast(duplex_mode)); - base::Value::Dict media_size; + base::DictValue media_size; if (options.Get("mediaSize", &media_size)) { settings.Set(printing::kSettingMediaSize, std::move(media_size)); } else { // Default to A4 paper size (210mm x 297mm) settings.Set(printing::kSettingMediaSize, - base::Value::Dict() + base::DictValue() .Set(printing::kSettingMediaSizeHeightMicrons, 297000) .Set(printing::kSettingMediaSizeWidthMicrons, 210000) .Set(printing::kSettingsImageableAreaLeftMicrons, 0) @@ -4180,9 +4182,9 @@ void WebContents::DevToolsAppendToFile(const std::string& url, void WebContents::DevToolsRequestFileSystems() { const std::string empty_str; content::WebContents* const dtwc = GetDevToolsWebContents(); - const base::Value::Dict& added_paths = GetAddedFileSystems(dtwc); + const base::DictValue& added_paths = GetAddedFileSystems(dtwc); - auto filesystems = base::Value::List::with_capacity(added_paths.size()); + auto filesystems = base::ListValue::with_capacity(added_paths.size()); for (const auto path_and_type : added_paths) { const auto& [path, type_val] = path_and_type; const auto& type = type_val.is_string() ? type_val.GetString() : empty_str; @@ -4219,7 +4221,7 @@ void WebContents::DevToolsAddFileSystem( FileSystem file_system = CreateFileSystemStruct( GetDevToolsWebContents(), file_system_id, path.AsUTF8Unsafe(), type); - base::Value::Dict file_system_value = CreateFileSystemValue(file_system); + base::DictValue file_system_value = CreateFileSystemValue(file_system); auto* pref_service = GetPrefService(GetDevToolsWebContents()); ScopedDictPrefUpdate update(pref_service, prefs::kDevToolsFileSystemPaths); @@ -4329,7 +4331,7 @@ void WebContents::DevToolsSetEyeDropperActive(bool active) { } void WebContents::ColorPickedInEyeDropper(int r, int g, int b, int a) { - base::Value::Dict color; + base::DictValue color; color.Set("r", r); color.Set("g", g); color.Set("b", b); @@ -4381,7 +4383,7 @@ void WebContents::OnDevToolsSearchCompleted( int request_id, const std::string& file_system_path, const std::vector& file_paths) { - base::Value::List file_paths_value; + base::ListValue file_paths_value; for (const auto& file_path : file_paths) file_paths_value.Append(file_path); inspectable_web_contents_->CallClientFunction( diff --git a/shell/browser/api/electron_api_web_request.cc b/shell/browser/api/electron_api_web_request.cc index 814ed1e9b4..b20db2988f 100644 --- a/shell/browser/api/electron_api_web_request.cc +++ b/shell/browser/api/electron_api_web_request.cc @@ -90,7 +90,7 @@ extensions::WebRequestResourceType ParseResourceType(std::string_view value) { // to pass the original keys. v8::Local HttpResponseHeadersToV8( net::HttpResponseHeaders* headers) { - base::Value::Dict response_headers; + base::DictValue response_headers; if (headers) { size_t iter = 0; std::string key; diff --git a/shell/browser/api/gpu_info_enumerator.cc b/shell/browser/api/gpu_info_enumerator.cc index da6b215750..c9564398aa 100644 --- a/shell/browser/api/gpu_info_enumerator.cc +++ b/shell/browser/api/gpu_info_enumerator.cc @@ -104,7 +104,7 @@ void GPUInfoEnumerator::EndOverlayInfo() { value_stack_.pop(); } -base::Value::Dict GPUInfoEnumerator::GetDictionary() { +base::DictValue GPUInfoEnumerator::GetDictionary() { return std::move(current_); } diff --git a/shell/browser/api/gpu_info_enumerator.h b/shell/browser/api/gpu_info_enumerator.h index 87c68e6786..c1ed53cff1 100644 --- a/shell/browser/api/gpu_info_enumerator.h +++ b/shell/browser/api/gpu_info_enumerator.h @@ -47,12 +47,12 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator { void EndAuxAttributes() override; void BeginOverlayInfo() override; void EndOverlayInfo() override; - base::Value::Dict GetDictionary(); + base::DictValue GetDictionary(); private: // The stack is used to manage nested values - std::stack value_stack_; - base::Value::Dict current_; + std::stack value_stack_; + base::DictValue current_; }; } // namespace electron diff --git a/shell/browser/api/gpuinfo_manager.cc b/shell/browser/api/gpuinfo_manager.cc index b68d7e27e6..d3c122a295 100644 --- a/shell/browser/api/gpuinfo_manager.cc +++ b/shell/browser/api/gpuinfo_manager.cc @@ -33,7 +33,7 @@ GPUInfoManager::~GPUInfoManager() { // Should be posted to the task runner void GPUInfoManager::ProcessCompleteInfo() { - base::Value::Dict result = EnumerateGPUInfo(gpu_data_manager_->GetGPUInfo()); + base::DictValue result = EnumerateGPUInfo(gpu_data_manager_->GetGPUInfo()); // We have received the complete information, resolve all promises that // were waiting for this info. for (auto& promise : complete_info_promise_set_) { @@ -76,8 +76,7 @@ void GPUInfoManager::FetchBasicInfo(gin_helper::Promise promise) { promise.Resolve(base::Value(EnumerateGPUInfo(gpu_info))); } -base::Value::Dict GPUInfoManager::EnumerateGPUInfo( - gpu::GPUInfo gpu_info) const { +base::DictValue GPUInfoManager::EnumerateGPUInfo(gpu::GPUInfo gpu_info) const { GPUInfoEnumerator enumerator; gpu_info.EnumerateFields(&enumerator); return enumerator.GetDictionary(); diff --git a/shell/browser/api/gpuinfo_manager.h b/shell/browser/api/gpuinfo_manager.h index b2f5cae518..d01764be3f 100644 --- a/shell/browser/api/gpuinfo_manager.h +++ b/shell/browser/api/gpuinfo_manager.h @@ -40,7 +40,7 @@ class GPUInfoManager : private content::GpuDataManagerObserver, // content::GpuDataManagerObserver void OnGpuInfoUpdate() override; - base::Value::Dict EnumerateGPUInfo(gpu::GPUInfo gpu_info) const; + base::DictValue EnumerateGPUInfo(gpu::GPUInfo gpu_info) const; // These should be posted to the task queue void CompleteInfoFetcher(gin_helper::Promise promise); diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.cc b/shell/browser/bluetooth/electron_bluetooth_delegate.cc index 37ea4f9d1a..ede199b7c7 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.cc +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.cc @@ -191,7 +191,7 @@ void ElectronBluetoothDelegate::ShowDevicePairPrompt( void ElectronBluetoothDelegate::OnDevicePairPromptResponse( PairPromptCallback callback, - base::Value::Dict response) { + base::DictValue response) { BluetoothDelegate::PairPromptResult result; if (response.FindBool("confirmed").value_or(false)) { result.result_code = BluetoothDelegate::PairPromptStatus::kSuccess; diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.h b/shell/browser/bluetooth/electron_bluetooth_delegate.h index 437ff0c9da..da7ed5e648 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.h +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.h @@ -95,7 +95,7 @@ class ElectronBluetoothDelegate : public content::BluetoothDelegate { private: void OnDevicePairPromptResponse(PairPromptCallback callback, - base::Value::Dict response); + base::DictValue response); base::WeakPtrFactory weak_factory_{this}; }; diff --git a/shell/browser/browser.cc b/shell/browser/browser.cc index ca23057de9..10f0609bea 100644 --- a/shell/browser/browser.cc +++ b/shell/browser/browser.cc @@ -180,7 +180,7 @@ void Browser::WillFinishLaunching() { observers_.Notify(&BrowserObserver::OnWillFinishLaunching); } -void Browser::DidFinishLaunching(base::Value::Dict launch_info) { +void Browser::DidFinishLaunching(base::DictValue launch_info) { // Make sure the userData directory is created. ScopedAllowBlockingForElectron allow_blocking; base::FilePath user_data; diff --git a/shell/browser/browser.h b/shell/browser/browser.h index 925573615c..798a113385 100644 --- a/shell/browser/browser.h +++ b/shell/browser/browser.h @@ -174,7 +174,7 @@ class Browser : private WindowListObserver { // Creates an activity and sets it as the one currently in use. void SetUserActivity(const std::string& type, - base::Value::Dict user_info, + base::DictValue user_info, gin::Arguments* args); // Returns the type name of the current user activity. @@ -189,7 +189,7 @@ class Browser : private WindowListObserver { // Updates the current user activity void UpdateCurrentActivity(const std::string& type, - base::Value::Dict user_info); + base::DictValue user_info); // Indicates that an user activity is about to be resumed. bool WillContinueUserActivity(const std::string& type); @@ -200,16 +200,16 @@ class Browser : private WindowListObserver { // Resumes an activity via hand-off. bool ContinueUserActivity(const std::string& type, - base::Value::Dict user_info, - base::Value::Dict details); + base::DictValue user_info, + base::DictValue details); // Indicates that an activity was continued on another device. void UserActivityWasContinued(const std::string& type, - base::Value::Dict user_info); + base::DictValue user_info); // Gives an opportunity to update the Handoff payload. bool UpdateUserActivityState(const std::string& type, - base::Value::Dict user_info); + base::DictValue user_info); void ApplyForcedRTL(); @@ -246,7 +246,7 @@ class Browser : private WindowListObserver { #endif // BUILDFLAG(IS_MAC) void ShowAboutPanel(); - void SetAboutPanelOptions(base::Value::Dict options); + void SetAboutPanelOptions(base::DictValue options); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) void ShowEmojiPanel(); @@ -306,7 +306,7 @@ class Browser : private WindowListObserver { // Tell the application the loading has been done. void WillFinishLaunching(); - void DidFinishLaunching(base::Value::Dict launch_info); + void DidFinishLaunching(base::DictValue launch_info); void OnAccessibilitySupportChanged(); @@ -379,7 +379,7 @@ class Browser : private WindowListObserver { bool was_launched_at_login_; #endif - base::Value::Dict about_panel_options_; + base::DictValue about_panel_options_; #if BUILDFLAG(IS_WIN) void UpdateBadgeContents(HWND hwnd, diff --git a/shell/browser/browser_linux.cc b/shell/browser/browser_linux.cc index c3bb05faa7..296fae2690 100644 --- a/shell/browser/browser_linux.cc +++ b/shell/browser/browser_linux.cc @@ -180,7 +180,7 @@ void Browser::ShowAboutPanel() { GtkAboutDialog* dialog = GTK_ABOUT_DIALOG(dialogWidget); const std::string* str; - const base::Value::List* list; + const base::ListValue* list; if ((str = opts.FindString("applicationName"))) { gtk_about_dialog_set_program_name(dialog, str->c_str()); @@ -233,7 +233,7 @@ void Browser::ShowAboutPanel() { gtk_widget_show_all(dialogWidget); } -void Browser::SetAboutPanelOptions(base::Value::Dict options) { +void Browser::SetAboutPanelOptions(base::DictValue options) { about_panel_options_ = std::move(options); } diff --git a/shell/browser/browser_mac.mm b/shell/browser/browser_mac.mm index 4c5156ae21..8786ddb88e 100644 --- a/shell/browser/browser_mac.mm +++ b/shell/browser/browser_mac.mm @@ -304,7 +304,7 @@ bool Browser::SetBadgeCount(std::optional count) { } void Browser::SetUserActivity(const std::string& type, - base::Value::Dict user_info, + base::DictValue user_info, gin::Arguments* args) { std::string url_string; args->GetNext(&url_string); @@ -330,7 +330,7 @@ void Browser::ResignCurrentActivity() { } void Browser::UpdateCurrentActivity(const std::string& type, - base::Value::Dict user_info) { + base::DictValue user_info) { [[AtomApplication sharedApplication] updateCurrentActivity:base::SysUTF8ToNSString(type) withUserInfo:DictionaryValueToNSDictionary( @@ -351,8 +351,8 @@ void Browser::DidFailToContinueUserActivity(const std::string& type, } bool Browser::ContinueUserActivity(const std::string& type, - base::Value::Dict user_info, - base::Value::Dict details) { + base::DictValue user_info, + base::DictValue details) { bool prevent_default = false; for (BrowserObserver& observer : observers_) observer.OnContinueUserActivity(&prevent_default, type, user_info.Clone(), @@ -361,13 +361,13 @@ bool Browser::ContinueUserActivity(const std::string& type, } void Browser::UserActivityWasContinued(const std::string& type, - base::Value::Dict user_info) { + base::DictValue user_info) { for (BrowserObserver& observer : observers_) observer.OnUserActivityWasContinued(type, user_info.Clone()); } bool Browser::UpdateUserActivityState(const std::string& type, - base::Value::Dict user_info) { + base::DictValue user_info) { bool prevent_default = false; for (BrowserObserver& observer : observers_) observer.OnUpdateUserActivityState(&prevent_default, type, @@ -621,7 +621,7 @@ void Browser::ShowAboutPanel() { orderFrontStandardAboutPanelWithOptions:options]; } -void Browser::SetAboutPanelOptions(base::Value::Dict options) { +void Browser::SetAboutPanelOptions(base::DictValue options) { about_panel_options_.clear(); for (const auto pair : options) { diff --git a/shell/browser/browser_observer.h b/shell/browser/browser_observer.h index 94faa53684..ff1e1dc544 100644 --- a/shell/browser/browser_observer.h +++ b/shell/browser/browser_observer.h @@ -43,7 +43,7 @@ class BrowserObserver : public base::CheckedObserver { // The browser has finished loading. virtual void OnWillFinishLaunching() {} - virtual void OnFinishLaunching(base::Value::Dict launch_info) {} + virtual void OnFinishLaunching(base::DictValue launch_info) {} // The browser's accessibility support has changed. virtual void OnAccessibilitySupportChanged() {} @@ -66,15 +66,15 @@ class BrowserObserver : public base::CheckedObserver { // The browser wants to resume a user activity via handoff. (macOS only) virtual void OnContinueUserActivity(bool* prevent_default, const std::string& type, - base::Value::Dict user_info, - base::Value::Dict details) {} + base::DictValue user_info, + base::DictValue details) {} // The browser wants to notify that an user activity was resumed. (macOS only) virtual void OnUserActivityWasContinued(const std::string& type, - base::Value::Dict user_info) {} + base::DictValue user_info) {} // The browser wants to update an user activity payload. (macOS only) virtual void OnUpdateUserActivityState(bool* prevent_default, const std::string& type, - base::Value::Dict user_info) {} + base::DictValue user_info) {} // User clicked the native macOS new tab button. (macOS only) virtual void OnNewWindowForTab() {} diff --git a/shell/browser/browser_win.cc b/shell/browser/browser_win.cc index d640283b4b..10a8283e51 100644 --- a/shell/browser/browser_win.cc +++ b/shell/browser/browser_win.cc @@ -780,7 +780,7 @@ void Browser::ShowEmojiPanel() { } void Browser::ShowAboutPanel() { - base::Value::Dict dict; + base::DictValue dict; std::string aboutMessage = ""; gfx::ImageSkia image; @@ -815,7 +815,7 @@ void Browser::ShowAboutPanel() { base::BindOnce([](int, bool) { /* do nothing. */ })); } -void Browser::SetAboutPanelOptions(base::Value::Dict options) { +void Browser::SetAboutPanelOptions(base::DictValue options) { about_panel_options_ = std::move(options); } diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 9fea5d0e06..61450497ca 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -67,6 +67,7 @@ #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/is_potentially_trustworthy.h" #include "services/network/public/cpp/network_switches.h" +#include "services/network/public/cpp/originating_process.h" #include "services/network/public/cpp/resource_request_body.h" #include "services/network/public/cpp/self_deleting_url_loader_factory.h" #include "services/network/public/cpp/url_loader_factory_builder.h" @@ -1430,11 +1431,12 @@ void ElectronBrowserClient::OverrideURLLoaderFactoryParams( bool is_for_isolated_world, bool is_for_service_worker, network::mojom::URLLoaderFactoryParams* factory_params) { - if (factory_params->top_frame_id) { + if (factory_params->top_frame_id && + !factory_params->process_id.is_browser()) { // Bypass CORB and CORS when web security is disabled. auto* rfh = content::RenderFrameHost::FromFrameToken( content::GlobalRenderFrameHostToken( - factory_params->process_id, + factory_params->process_id.renderer_process().value(), blink::LocalFrameToken(factory_params->top_frame_id.value()))); auto* web_contents = content::WebContents::FromRenderFrameHost(rfh); auto* prefs = WebContentsPreferences::From(web_contents); diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index 0847aedc9b..d4b4140cf4 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -41,6 +41,7 @@ #include "gin/arguments.h" #include "media/audio/audio_device_description.h" #include "services/network/public/cpp/features.h" +#include "services/network/public/cpp/originating_process.h" #include "services/network/public/cpp/url_loader_factory_builder.h" #include "services/network/public/cpp/wrapper_shared_url_loader_factory.h" #include "services/network/public/mojom/network_context.mojom.h" @@ -356,7 +357,7 @@ void ElectronBrowserContext::DestroyAllContexts() { ElectronBrowserContext::ElectronBrowserContext( const PartitionOrPath partition_location, bool in_memory, - base::Value::Dict options) + base::DictValue options) : in_memory_pref_store_(new ValueMapPrefStore), storage_policy_(base::MakeRefCounted()), protocol_registry_(base::WrapUnique(new ProtocolRegistry)), @@ -481,7 +482,7 @@ void ElectronBrowserContext::InitPrefs() { std::string default_code = spellcheck::GetCorrespondingSpellCheckLanguage( base::i18n::GetConfiguredLocale()); if (!default_code.empty()) { - base::Value::List language_codes; + base::ListValue language_codes; language_codes.Append(default_code); prefs()->Set(spellcheck::prefs::kSpellCheckDictionaries, base::Value(std::move(language_codes))); @@ -588,7 +589,7 @@ ElectronBrowserContext::GetURLLoaderFactory() { network::mojom::URLLoaderFactoryParamsPtr params = network::mojom::URLLoaderFactoryParams::New(); params->header_client = std::move(header_client); - params->process_id = network::mojom::kBrowserProcessId; + params->process_id = network::OriginatingProcess::browser(); params->is_trusted = true; params->is_orb_enabled = false; // The tests of net module would fail if this setting is true, it seems that @@ -870,7 +871,7 @@ bool ElectronBrowserContext::CheckDevicePermission( ElectronBrowserContext* ElectronBrowserContext::From( const std::string& partition, bool in_memory, - base::Value::Dict options) { + base::DictValue options) { auto& context = ContextMap()[PartitionKey(partition, in_memory)]; if (!context) { context.reset(new ElectronBrowserContext{std::cref(partition), in_memory, @@ -881,13 +882,13 @@ ElectronBrowserContext* ElectronBrowserContext::From( // static ElectronBrowserContext* ElectronBrowserContext::GetDefaultBrowserContext( - base::Value::Dict options) { + base::DictValue options) { return ElectronBrowserContext::From("", false, std::move(options)); } ElectronBrowserContext* ElectronBrowserContext::FromPath( const base::FilePath& path, - base::Value::Dict options) { + base::DictValue options) { auto& context = ContextMap()[PartitionKey(path)]; if (!context) { context.reset( diff --git a/shell/browser/electron_browser_context.h b/shell/browser/electron_browser_context.h index d91182eb43..21af6e5758 100644 --- a/shell/browser/electron_browser_context.h +++ b/shell/browser/electron_browser_context.h @@ -67,20 +67,20 @@ class ElectronBrowserContext : public content::BrowserContext { // Get or create the default BrowserContext. static ElectronBrowserContext* GetDefaultBrowserContext( - base::Value::Dict options = {}); + base::DictValue options = {}); // Get or create the BrowserContext according to its |partition| and // |in_memory|. The |options| will be passed to constructor when there is no // existing BrowserContext. static ElectronBrowserContext* From(const std::string& partition, bool in_memory, - base::Value::Dict options = {}); + base::DictValue options = {}); // Get or create the BrowserContext using the |path|. // The |options| will be passed to constructor when there is no // existing BrowserContext. static ElectronBrowserContext* FromPath(const base::FilePath& path, - base::Value::Dict options = {}); + base::DictValue options = {}); static void DestroyAllContexts(); @@ -172,9 +172,9 @@ class ElectronBrowserContext : public content::BrowserContext { ElectronBrowserContext(const PartitionOrPath partition_location, bool in_memory, - base::Value::Dict options); + base::DictValue options); - ElectronBrowserContext(base::FilePath partition, base::Value::Dict options); + ElectronBrowserContext(base::FilePath partition, base::DictValue options); static void DisplayMediaDeviceChosen( const content::MediaStreamRequest& request, diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 30bdea86cd..11816ab9dc 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -472,7 +472,7 @@ int ElectronBrowserMainParts::PreMainMessageLoopRun() { #if !BUILDFLAG(IS_MAC) // The corresponding call in macOS is in ElectronApplicationDelegate. Browser::Get()->WillFinishLaunching(); - Browser::Get()->DidFinishLaunching(base::Value::Dict()); + Browser::Get()->DidFinishLaunching(base::DictValue()); #endif // Notify observers that main thread message loop was initialized. diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index 9835b3292b..19ae51fe88 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -174,7 +174,7 @@ void ElectronPermissionManager::RequestPermissionWithDetails( content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, bool user_gesture, - base::Value::Dict details, + base::DictValue details, StatusCallback response_callback) { if (render_frame_host->IsNestedWithinFencedFrame()) { std::move(response_callback) @@ -213,7 +213,7 @@ void ElectronPermissionManager::RequestPermissions( void ElectronPermissionManager::RequestPermissionsWithDetails( content::RenderFrameHost* render_frame_host, const content::PermissionRequestDescription& request_description, - base::Value::Dict details, + base::DictValue details, StatusesCallback response_callback) { if (request_description.permissions.empty()) { std::move(response_callback).Run({}); @@ -315,7 +315,7 @@ blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatus( const GURL& embedding_origin) { const auto permission = blink::PermissionDescriptorToPermissionType(permission_descriptor); - base::Value::Dict details; + base::DictValue details; details.Set("embeddingOrigin", embedding_origin.spec()); bool granted = CheckPermissionWithDetails(permission, {}, requesting_origin, std::move(details)); @@ -338,7 +338,7 @@ void ElectronPermissionManager::CheckBluetoothDevicePair( gin_helper::Dictionary details, PairCallback pair_callback) const { if (bluetooth_pairing_handler_.is_null()) { - base::Value::Dict response; + base::DictValue response; response.Set("confirmed", false); std::move(pair_callback).Run(std::move(response)); } else { @@ -350,7 +350,7 @@ bool ElectronPermissionManager::CheckPermissionWithDetails( blink::PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, - base::Value::Dict details) const { + base::DictValue details) const { if (permission == blink::PermissionType::GEOLOCATION && IsGeolocationDisabledViaCommandLine()) return false; @@ -450,7 +450,7 @@ ElectronPermissionManager::GetPermissionResultForCurrentDocument( const auto permission = blink::PermissionDescriptorToPermissionType(permission_descriptor); - base::Value::Dict details; + base::DictValue details; details.Set("embeddingOrigin", content::PermissionUtil::GetLastCommittedOriginAsURL( render_frame_host->GetMainFrame()) diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index 9a0062ef63..13b4cbacdf 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -46,7 +46,7 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { using StatusCallback = base::OnceCallback; using StatusesCallback = base::OnceCallback&)>; - using PairCallback = base::OnceCallback; + using PairCallback = base::OnceCallback; using RequestHandler = base::RepeatingCallbackurl), base::Value::List()))); + IsUrlAllowedToEmbedLocalFiles(GURL(params->url), base::ListValue()))); } PdfViewerPrivateSaveToDriveFunction::PdfViewerPrivateSaveToDriveFunction() = diff --git a/shell/browser/extensions/api/resources_private/resources_private_api.cc b/shell/browser/extensions/api/resources_private/resources_private_api.cc index f1170e574a..977354f25e 100644 --- a/shell/browser/extensions/api/resources_private/resources_private_api.cc +++ b/shell/browser/extensions/api/resources_private/resources_private_api.cc @@ -25,7 +25,7 @@ // To add a new component to this API, simply: // 1. Add your component to the Component enum in // shell/common/extensions/api/resources_private.idl -// 2. Create an AddStringsForMyComponent(base::Value::Dict* dict) method. +// 2. Create an AddStringsForMyComponent(base::DictValue* dict) method. // 3. Tie in that method to the switch statement in Run() namespace extensions { @@ -40,7 +40,7 @@ ResourcesPrivateGetStringsFunction::~ResourcesPrivateGetStringsFunction() = ExtensionFunction::ResponseAction ResourcesPrivateGetStringsFunction::Run() { get_strings::Params params = get_strings::Params::Create(args()).value(); - base::Value::Dict dict; + base::DictValue dict; switch (params.component) { case api::resources_private::Component::kPdf: diff --git a/shell/browser/extensions/api/tabs/tabs_api.cc b/shell/browser/extensions/api/tabs/tabs_api.cc index fb6b6c37b2..6c01e31cfb 100644 --- a/shell/browser/extensions/api/tabs/tabs_api.cc +++ b/shell/browser/extensions/api/tabs/tabs_api.cc @@ -266,7 +266,7 @@ ExtensionFunction::ResponseAction TabsQueryFunction::Run() { std::optional audible = params->query_info.audible; std::optional muted = params->query_info.muted; - base::Value::List result; + base::ListValue result; // Filter out webContents that don't belong to the current browser context. auto* bc = browser_context(); diff --git a/shell/browser/extensions/electron_component_extension_resource_manager.cc b/shell/browser/extensions/electron_component_extension_resource_manager.cc index c5b6fb8cca..e47934ff2f 100644 --- a/shell/browser/extensions/electron_component_extension_resource_manager.cc +++ b/shell/browser/extensions/electron_component_extension_resource_manager.cc @@ -28,7 +28,7 @@ ElectronComponentExtensionResourceManager:: AddComponentResourceEntries(kPdfResources); // Register strings for the PDF viewer, so that $i18n{} replacements work. - base::Value::Dict dict = pdf_extension_util::GetStrings( + base::DictValue dict = pdf_extension_util::GetStrings( pdf_extension_util::PdfViewerContext::kPdfViewer); ui::TemplateReplacements pdf_viewer_replacements; diff --git a/shell/browser/extensions/electron_extension_loader.h b/shell/browser/extensions/electron_extension_loader.h index f57cb4d0b5..043edfd268 100644 --- a/shell/browser/extensions/electron_extension_loader.h +++ b/shell/browser/extensions/electron_extension_loader.h @@ -41,7 +41,7 @@ class ElectronExtensionLoader : public ExtensionRegistrar::Delegate { void OnExtensionInstalled(const Extension* extension, const syncer::StringOrdinal& page_ordinal, int install_flags, - base::Value::Dict ruleset_install_prefs) override {} + base::DictValue ruleset_install_prefs) override {} // Loads an unpacked extension from a directory synchronously. Returns the // extension on success, or nullptr otherwise. diff --git a/shell/browser/extensions/electron_extension_system.cc b/shell/browser/extensions/electron_extension_system.cc index 47689d290a..3172c2e68d 100644 --- a/shell/browser/extensions/electron_extension_system.cc +++ b/shell/browser/extensions/electron_extension_system.cc @@ -90,7 +90,7 @@ void ElectronExtensionSystem::InitForRegularProfile(bool extensions_enabled) { #if BUILDFLAG(ENABLE_PDF_VIEWER) namespace { -std::unique_ptr ParseManifest( +std::unique_ptr ParseManifest( const std::string_view manifest_contents) { JSONStringValueDeserializer deserializer(manifest_contents); std::unique_ptr manifest = @@ -100,7 +100,7 @@ std::unique_ptr ParseManifest( LOG(ERROR) << "Failed to parse extension manifest."; return {}; } - return std::make_unique(std::move(*manifest).TakeDict()); + return std::make_unique(std::move(*manifest).TakeDict()); } } // namespace @@ -110,7 +110,7 @@ void ElectronExtensionSystem::LoadComponentExtensions() { #if BUILDFLAG(ENABLE_PDF_VIEWER) std::u16string error; std::string pdf_manifest_string = pdf_extension_util::GetManifest(); - std::unique_ptr pdf_manifest = + std::unique_ptr pdf_manifest = ParseManifest(pdf_manifest_string); if (pdf_manifest) { base::FilePath root_directory; @@ -194,7 +194,7 @@ void ElectronExtensionSystem::InstallUpdate( void ElectronExtensionSystem::PerformActionBasedOnOmahaAttributes( const std::string& extension_id, - const base::Value::Dict& attributes) { + const base::DictValue& attributes) { NOTREACHED(); } diff --git a/shell/browser/extensions/electron_extension_system.h b/shell/browser/extensions/electron_extension_system.h index 9bb1fe3093..c8270c72e0 100644 --- a/shell/browser/extensions/electron_extension_system.h +++ b/shell/browser/extensions/electron_extension_system.h @@ -82,7 +82,7 @@ class ElectronExtensionSystem : public ExtensionSystem { InstallUpdateCallback install_update_callback) override; void PerformActionBasedOnOmahaAttributes( const std::string& extension_id, - const base::Value::Dict& attributes) override; + const base::DictValue& attributes) override; private: void OnExtensionRegisteredWithRequestContexts( diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index 3e5ed3161a..a5563ca703 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/shell/browser/extensions/electron_extensions_browser_client.cc @@ -330,7 +330,7 @@ ElectronExtensionsBrowserClient::GetComponentExtensionResourceManager() { void ElectronExtensionsBrowserClient::BroadcastEventToRenderers( extensions::events::HistogramValue histogram_value, const std::string& event_name, - base::Value::List args, + base::ListValue args, bool dispatch_to_off_the_record_profiles) { if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { content::GetUIThreadTaskRunner({})->PostTask( diff --git a/shell/browser/extensions/electron_extensions_browser_client.h b/shell/browser/extensions/electron_extensions_browser_client.h index fc81c996c3..17012d6fa7 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.h +++ b/shell/browser/extensions/electron_extensions_browser_client.h @@ -132,7 +132,7 @@ class ElectronExtensionsBrowserClient void BroadcastEventToRenderers( extensions::events::HistogramValue histogram_value, const std::string& event_name, - base::Value::List args, + base::ListValue args, bool dispatch_to_off_the_record_profiles) override; extensions::ExtensionCache* GetExtensionCache() override; bool IsBackgroundUpdateAllowed() override; diff --git a/shell/browser/extensions/electron_messaging_delegate.cc b/shell/browser/extensions/electron_messaging_delegate.cc index a76c85f2b2..d0cf15eec1 100644 --- a/shell/browser/extensions/electron_messaging_delegate.cc +++ b/shell/browser/extensions/electron_messaging_delegate.cc @@ -39,7 +39,7 @@ ElectronMessagingDelegate::IsNativeMessagingHostAllowed( return PolicyPermission::DISALLOW; } -std::optional ElectronMessagingDelegate::MaybeGetTabInfo( +std::optional ElectronMessagingDelegate::MaybeGetTabInfo( content::WebContents* web_contents) { if (web_contents) { auto* api_contents = electron::api::WebContents::From(web_contents); diff --git a/shell/browser/extensions/electron_messaging_delegate.h b/shell/browser/extensions/electron_messaging_delegate.h index 2a447ef844..60ea3046d5 100644 --- a/shell/browser/extensions/electron_messaging_delegate.h +++ b/shell/browser/extensions/electron_messaging_delegate.h @@ -27,7 +27,7 @@ class ElectronMessagingDelegate : public MessagingDelegate { PolicyPermission IsNativeMessagingHostAllowed( content::BrowserContext* browser_context, const std::string& native_host_name) override; - std::optional MaybeGetTabInfo( + std::optional MaybeGetTabInfo( content::WebContents* web_contents) override; content::WebContents* GetWebContentsByTabId( content::BrowserContext* browser_context, diff --git a/shell/browser/file_system_access/file_system_access_permission_context.cc b/shell/browser/file_system_access/file_system_access_permission_context.cc index 35997566ca..46c8d025d4 100644 --- a/shell/browser/file_system_access/file_system_access_permission_context.cc +++ b/shell/browser/file_system_access/file_system_access_permission_context.cc @@ -263,7 +263,7 @@ class FileSystemAccessPermissionContext::PermissionGrantImpl static_cast( context_->browser_context()->GetPermissionControllerDelegate()); if (permission_manager && permission_manager->HasPermissionCheckHandler()) { - base::Value::Dict details; + base::DictValue details; details.Set("filePath", base::FilePathToValue(path_info_.path)); details.Set("isDirectory", handle_type_ == HandleType::kDirectory); details.Set("fileAccessType", @@ -360,7 +360,7 @@ class FileSystemAccessPermissionContext::PermissionGrantImpl return; } - base::Value::Dict details; + base::DictValue details; details.Set("filePath", base::FilePathToValue(path_info_.path)); details.Set("isDirectory", handle_type_ == HandleType::kDirectory); details.Set("fileAccessType", @@ -822,7 +822,7 @@ void FileSystemAccessPermissionContext::DidCheckPathAgainstBlocklist( } void FileSystemAccessPermissionContext::MaybeEvictEntries( - base::Value::Dict& dict) { + base::DictValue& dict) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); std::vector> entries; @@ -861,7 +861,7 @@ void FileSystemAccessPermissionContext::SetLastPickedDirectory( DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // Create an entry into the nested dictionary. - base::Value::Dict entry; + base::DictValue entry; entry.Set(kPathKey, base::FilePathToValue(path_info.path)); entry.Set(kPathTypeKey, static_cast(path_info.type)); entry.Set(kDisplayNameKey, path_info.display_name); @@ -869,11 +869,11 @@ void FileSystemAccessPermissionContext::SetLastPickedDirectory( auto it = id_pathinfo_map_.find(origin); if (it != id_pathinfo_map_.end()) { - base::Value::Dict& dict = it->second; + base::DictValue& dict = it->second; dict.Set(GenerateLastPickedDirectoryKey(id), std::move(entry)); MaybeEvictEntries(dict); } else { - base::Value::Dict dict; + base::DictValue dict; dict.Set(GenerateLastPickedDirectoryKey(id), std::move(entry)); MaybeEvictEntries(dict); id_pathinfo_map_.try_emplace(origin, std::move(dict)); diff --git a/shell/browser/file_system_access/file_system_access_permission_context.h b/shell/browser/file_system_access/file_system_access_permission_context.h index 91d81b09ce..66781e39eb 100644 --- a/shell/browser/file_system_access/file_system_access_permission_context.h +++ b/shell/browser/file_system_access/file_system_access_permission_context.h @@ -169,7 +169,7 @@ class FileSystemAccessPermissionContext void OnRestrictedPathResult(const base::FilePath& file_path, gin::Arguments* args); - void MaybeEvictEntries(base::Value::Dict& dict); + void MaybeEvictEntries(base::DictValue& dict); void CleanupPermissions(const url::Origin& origin); @@ -194,7 +194,7 @@ class FileSystemAccessPermissionContext const raw_ptr clock_; - std::map id_pathinfo_map_; + std::map id_pathinfo_map_; std::map> callback_map_; diff --git a/shell/browser/hid/electron_hid_delegate.cc b/shell/browser/hid/electron_hid_delegate.cc index 2d235845e8..20c5f6bd21 100644 --- a/shell/browser/hid/electron_hid_delegate.cc +++ b/shell/browser/hid/electron_hid_delegate.cc @@ -139,7 +139,7 @@ bool ElectronHidDelegate::CanRequestDevicePermission( if (!browser_context) return false; - base::Value::Dict details; + base::DictValue details; details.Set("securityOrigin", origin.GetURL().spec()); auto* permission_manager = static_cast( browser_context->GetPermissionControllerDelegate()); diff --git a/shell/browser/hid/hid_chooser_context.cc b/shell/browser/hid/hid_chooser_context.cc index 1c53a86c2e..2d305b67e5 100644 --- a/shell/browser/hid/hid_chooser_context.cc +++ b/shell/browser/hid/hid_chooser_context.cc @@ -92,9 +92,8 @@ std::string UnitSystemToString(uint8_t unit) { } // Adapted from third_party/blink/renderer/modules/hid/hid_device.cc. -base::Value::Dict HidReportItemToValue( - const device::mojom::HidReportItem& item) { - base::Value::Dict dict; +base::DictValue HidReportItemToValue(const device::mojom::HidReportItem& item) { + base::DictValue dict; dict.Set("hasNull", item.has_null_position); dict.Set("hasPreferredState", !item.no_preferred_state); @@ -131,7 +130,7 @@ base::Value::Dict HidReportItemToValue( dict.Set("usageMinimum", ConvertHidUsageAndPageToInt(*item.usage_minimum)); dict.Set("usageMaximum", ConvertHidUsageAndPageToInt(*item.usage_maximum)); } else { - base::Value::List usages_list; + base::ListValue usages_list; for (const auto& usage : item.usages) { usages_list.Append(ConvertHidUsageAndPageToInt(*usage)); } @@ -144,12 +143,12 @@ base::Value::Dict HidReportItemToValue( } // Adapted from third_party/blink/renderer/modules/hid/hid_device.cc. -base::Value::Dict HidReportDescriptionToValue( +base::DictValue HidReportDescriptionToValue( const device::mojom::HidReportDescription& report) { - base::Value::Dict dict; + base::DictValue dict; dict.Set("reportId", static_cast(report.report_id)); - base::Value::List items_list; + base::ListValue items_list; for (const auto& item : report.items) { items_list.Append(base::Value(HidReportItemToValue(*item))); } @@ -159,9 +158,9 @@ base::Value::Dict HidReportDescriptionToValue( } // Adapted from third_party/blink/renderer/modules/hid/hid_device.cc. -base::Value::Dict HidCollectionInfoToValue( +base::DictValue HidCollectionInfoToValue( const device::mojom::HidCollectionInfo& collection) { - base::Value::Dict dict; + base::DictValue dict; // Usage information dict.Set("usage", collection.usage->usage); @@ -171,7 +170,7 @@ base::Value::Dict HidCollectionInfoToValue( dict.Set("collectionType", static_cast(collection.collection_type)); // Input reports - base::Value::List input_reports_list; + base::ListValue input_reports_list; for (const auto& report : collection.input_reports) { input_reports_list.Append( base::Value(HidReportDescriptionToValue(*report))); @@ -179,7 +178,7 @@ base::Value::Dict HidCollectionInfoToValue( dict.Set("inputReports", std::move(input_reports_list)); // Output reports - base::Value::List output_reports_list; + base::ListValue output_reports_list; for (const auto& report : collection.output_reports) { output_reports_list.Append( base::Value(HidReportDescriptionToValue(*report))); @@ -187,7 +186,7 @@ base::Value::Dict HidCollectionInfoToValue( dict.Set("outputReports", std::move(output_reports_list)); // Feature reports - base::Value::List feature_reports_list; + base::ListValue feature_reports_list; for (const auto& report : collection.feature_reports) { feature_reports_list.Append( base::Value(HidReportDescriptionToValue(*report))); @@ -195,7 +194,7 @@ base::Value::Dict HidCollectionInfoToValue( dict.Set("featureReports", std::move(feature_reports_list)); // Child collections (recursive) - base::Value::List children_list; + base::ListValue children_list; for (const auto& child : collection.children) { children_list.Append(base::Value(HidCollectionInfoToValue(*child))); } @@ -240,7 +239,7 @@ bool HidChooserContext::CanStorePersistentEntry( // static base::Value HidChooserContext::DeviceInfoToValue( const device::mojom::HidDeviceInfo& device) { - base::Value::Dict value; + base::DictValue value; value.Set( kHidDeviceNameKey, base::UTF16ToUTF8(HidChooserContext::DisplayNameFromDeviceInfo(device))); @@ -259,7 +258,7 @@ base::Value HidChooserContext::DeviceInfoToValue( } // Convert collections array - base::Value::List collections_list; + base::ListValue collections_list; for (const auto& collection : device.collections) { collections_list.Append(base::Value(HidCollectionInfoToValue(*collection))); } diff --git a/shell/browser/mac/dict_util.h b/shell/browser/mac/dict_util.h index 88ce5e58fe..9ad51a284a 100644 --- a/shell/browser/mac/dict_util.h +++ b/shell/browser/mac/dict_util.h @@ -11,10 +11,10 @@ namespace electron { -NSArray* ListValueToNSArray(const base::Value::List& value); -base::Value::List NSArrayToValue(NSArray* arr); -NSDictionary* DictionaryValueToNSDictionary(const base::Value::Dict& value); -base::Value::Dict NSDictionaryToValue(NSDictionary* dict); +NSArray* ListValueToNSArray(const base::ListValue& value); +base::ListValue NSArrayToValue(NSArray* arr); +NSDictionary* DictionaryValueToNSDictionary(const base::DictValue& value); +base::DictValue NSDictionaryToValue(NSDictionary* dict); } // namespace electron diff --git a/shell/browser/mac/dict_util.mm b/shell/browser/mac/dict_util.mm index 4efda58212..16e4503226 100644 --- a/shell/browser/mac/dict_util.mm +++ b/shell/browser/mac/dict_util.mm @@ -13,7 +13,7 @@ namespace electron { -NSArray* ListValueToNSArray(const base::Value::List& value) { +NSArray* ListValueToNSArray(const base::ListValue& value) { const auto json = base::WriteJson(value); if (!json.has_value()) return nil; @@ -26,8 +26,8 @@ NSArray* ListValueToNSArray(const base::Value::List& value) { return obj; } -base::Value::List NSArrayToValue(NSArray* arr) { - base::Value::List result; +base::ListValue NSArrayToValue(NSArray* arr) { + base::ListValue result; if (!arr) return result; @@ -54,7 +54,7 @@ base::Value::List NSArrayToValue(NSArray* arr) { return result; } -NSDictionary* DictionaryValueToNSDictionary(const base::Value::Dict& value) { +NSDictionary* DictionaryValueToNSDictionary(const base::DictValue& value) { const auto json = base::WriteJson(value); if (!json.has_value()) return nil; @@ -67,8 +67,8 @@ NSDictionary* DictionaryValueToNSDictionary(const base::Value::Dict& value) { return obj; } -base::Value::Dict NSDictionaryToValue(NSDictionary* dict) { - base::Value::Dict result; +base::DictValue NSDictionaryToValue(NSDictionary* dict) { + base::DictValue result; if (!dict) return result; diff --git a/shell/browser/mac/electron_application.mm b/shell/browser/mac/electron_application.mm index 5179ae1389..13853870c3 100644 --- a/shell/browser/mac/electron_application.mm +++ b/shell/browser/mac/electron_application.mm @@ -163,7 +163,7 @@ inline void dispatch_sync_main(dispatch_block_t block) { dispatch_sync_main(^{ std::string activity_type( base::SysNSStringToUTF8(userActivity.activityType)); - base::Value::Dict user_info = + base::DictValue user_info = electron::NSDictionaryToValue(userActivity.userInfo); electron::Browser* browser = electron::Browser::Get(); @@ -192,7 +192,7 @@ inline void dispatch_sync_main(dispatch_block_t block) { dispatch_async(dispatch_get_main_queue(), ^{ std::string activity_type( base::SysNSStringToUTF8(userActivity.activityType)); - base::Value::Dict user_info = + base::DictValue user_info = electron::NSDictionaryToValue(userActivity.userInfo); electron::Browser* browser = electron::Browser::Get(); diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index 9b5615760e..f2f8b23b13 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -637,7 +637,7 @@ void NativeWindow::NotifyWindowExecuteAppCommand( } void NativeWindow::NotifyTouchBarItemInteraction(const std::string& item_id, - base::Value::Dict details) { + base::DictValue details) { observers_.Notify(&NativeWindowObserver::OnTouchBarItemResult, item_id, details); } diff --git a/shell/browser/native_window.h b/shell/browser/native_window.h index 64e0594264..6f8dc7420d 100644 --- a/shell/browser/native_window.h +++ b/shell/browser/native_window.h @@ -335,7 +335,7 @@ class NativeWindow : public views::WidgetDelegate { void NotifyWindowAlwaysOnTopChanged(); void NotifyWindowExecuteAppCommand(std::string_view command_name); void NotifyTouchBarItemInteraction(const std::string& item_id, - base::Value::Dict details); + base::DictValue details); void NotifyNewWindowForTab(); void NotifyWindowSystemContextMenu(int x, int y, bool* prevent_default); void NotifyLayoutWindowControlsOverlay(); diff --git a/shell/browser/native_window_observer.h b/shell/browser/native_window_observer.h index 1adf24d474..957e4f83e4 100644 --- a/shell/browser/native_window_observer.h +++ b/shell/browser/native_window_observer.h @@ -96,7 +96,7 @@ class NativeWindowObserver : public base::CheckedObserver { virtual void OnWindowLeaveHtmlFullScreen() {} virtual void OnWindowAlwaysOnTopChanged() {} virtual void OnTouchBarItemResult(const std::string& item_id, - const base::Value::Dict& details) {} + const base::DictValue& details) {} virtual void OnNewWindowForTab() {} virtual void OnSystemContextMenu(int x, int y, bool* prevent_default) {} diff --git a/shell/browser/net/electron_url_loader_factory.cc b/shell/browser/net/electron_url_loader_factory.cc index 0e7e04459b..7f888c2c10 100644 --- a/shell/browser/net/electron_url_loader_factory.cc +++ b/shell/browser/net/electron_url_loader_factory.cc @@ -135,7 +135,7 @@ network::mojom::URLResponseHeadPtr ToResponseHead( bool has_mime_type = dict.Get("mimeType", &head->mime_type); bool has_content_type = false; - base::Value::Dict headers; + base::DictValue headers; if (dict.Get("headers", &headers)) { for (const auto iter : headers) { if (iter.second.is_string()) { @@ -204,7 +204,7 @@ class URLPipeLoader : public network::mojom::URLLoader, mojo::PendingReceiver loader, mojo::PendingRemote client, const net::NetworkTrafficAnnotationTag& annotation, - base::Value::Dict upload_data) + base::DictValue upload_data) : url_loader_(this, std::move(loader)), client_(std::move(client)) { url_loader_.set_disconnect_handler( base::BindOnce(&URLPipeLoader::NotifyComplete, base::Unretained(this), @@ -228,7 +228,7 @@ class URLPipeLoader : public network::mojom::URLLoader, void Start(scoped_refptr factory, std::unique_ptr request, const net::NetworkTrafficAnnotationTag& annotation, - base::Value::Dict upload_data) { + base::DictValue upload_data) { loader_ = network::SimpleURLLoader::Create(std::move(request), annotation); loader_->SetOnResponseStartedCallback(base::BindOnce( &URLPipeLoader::OnResponseStarted, weak_factory_.GetWeakPtr())); @@ -665,7 +665,7 @@ void ElectronURLLoaderFactory::StartLoadingHttp( if (!dict.Get("method", &request->method)) request->method = original_request.method; - base::Value::Dict upload_data; + base::DictValue upload_data; if (request->method != net::HttpRequestHeaders::kGetMethod && request->method != net::HttpRequestHeaders::kHeadMethod) dict.Get("uploadData", &upload_data); diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index fe5d783c3b..59594726ed 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/shell/browser/net/system_network_context_manager.cc @@ -30,6 +30,7 @@ #include "services/network/network_service.h" #include "services/network/public/cpp/cross_thread_pending_shared_url_loader_factory.h" #include "services/network/public/cpp/features.h" +#include "services/network/public/cpp/originating_process.h" #include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/mojom/network_context.mojom.h" #include "services/network/public/mojom/url_response_head.mojom.h" @@ -164,7 +165,7 @@ SystemNetworkContextManager::GetURLLoaderFactory() { network::mojom::URLLoaderFactoryParamsPtr params = network::mojom::URLLoaderFactoryParams::New(); - params->process_id = network::mojom::kBrowserProcessId; + params->process_id = network::OriginatingProcess::browser(); params->is_orb_enabled = false; url_loader_factory_.reset(); GetContext()->CreateURLLoaderFactory( diff --git a/shell/browser/serial/serial_chooser_context.cc b/shell/browser/serial/serial_chooser_context.cc index d238ac59a8..c382ef0f83 100644 --- a/shell/browser/serial/serial_chooser_context.cc +++ b/shell/browser/serial/serial_chooser_context.cc @@ -33,7 +33,7 @@ std::string EncodeToken(const base::UnguessableToken& token) { } base::Value PortInfoToValue(const device::mojom::SerialPortInfo& port) { - base::Value::Dict value; + base::DictValue value; if (port.display_name && !port.display_name->empty()) { value.Set(kPortNameKey, *port.display_name); } else { diff --git a/shell/browser/special_storage_policy.cc b/shell/browser/special_storage_policy.cc index 9a60656480..985dbaa71b 100644 --- a/shell/browser/special_storage_policy.cc +++ b/shell/browser/special_storage_policy.cc @@ -20,7 +20,7 @@ bool SpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { return true; } -bool SpecialStoragePolicy::IsStorageDurable(const GURL& origin) { +bool SpecialStoragePolicy::IsStoragePersistent(const GURL& origin) { return true; } diff --git a/shell/browser/special_storage_policy.h b/shell/browser/special_storage_policy.h index 30aa4bd54f..c4815ef87c 100644 --- a/shell/browser/special_storage_policy.h +++ b/shell/browser/special_storage_policy.h @@ -16,7 +16,7 @@ class SpecialStoragePolicy : public storage::SpecialStoragePolicy { // storage::SpecialStoragePolicy implementation. bool IsStorageProtected(const GURL& origin) override; bool IsStorageUnlimited(const GURL& origin) override; - bool IsStorageDurable(const GURL& origin) override; + bool IsStoragePersistent(const GURL& origin) override; bool HasIsolatedStorage(const GURL& origin) override; bool IsStorageSessionOnly(const GURL& origin) override; bool HasSessionOnlyOrigins() override; diff --git a/shell/browser/ui/cocoa/electron_ns_window.mm b/shell/browser/ui/cocoa/electron_ns_window.mm index 9e83e6b02d..59270594ff 100644 --- a/shell/browser/ui/cocoa/electron_ns_window.mm +++ b/shell/browser/ui/cocoa/electron_ns_window.mm @@ -320,7 +320,7 @@ void SwizzleSwipeWithEvent(NSView* view, SEL swiz_selector) { } - (void)disableHeadlessMode { - if (shell_) { + if (shell_ && self.isHeadless) { // We initialize the window in headless mode to allow painting before it is // shown, but we don't want the headless behavior of allowing the window to // be placed unconstrained. diff --git a/shell/browser/ui/cocoa/electron_touch_bar.mm b/shell/browser/ui/cocoa/electron_touch_bar.mm index 8fb63c7c82..9ad2570a1a 100644 --- a/shell/browser/ui/cocoa/electron_touch_bar.mm +++ b/shell/browser/ui/cocoa/electron_touch_bar.mm @@ -254,7 +254,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item"; NSColor* color = ((NSColorPickerTouchBarItem*)sender).color; std::string hex_color = electron::ToRGBHex(skia::NSDeviceColorToSkColor(color)); - base::Value::Dict details; + base::DictValue details; details.Set("color", hex_color); window_->NotifyTouchBarItemInteraction([item_id UTF8String], std::move(details)); @@ -264,7 +264,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item"; NSString* identifier = ((NSSliderTouchBarItem*)sender).identifier; NSString* item_id = [self idFromIdentifier:identifier withPrefix:SliderIdentifier]; - base::Value::Dict details; + base::DictValue details; details.Set("value", [((NSSliderTouchBarItem*)sender).slider intValue]); window_->NotifyTouchBarItemInteraction([item_id UTF8String], std::move(details)); @@ -278,7 +278,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item"; - (void)segmentedControlAction:(id)sender { NSString* item_id = [NSString stringWithFormat:@"%ld", ((NSSegmentedControl*)sender).tag]; - base::Value::Dict details; + base::DictValue details; details.Set("selectedIndex", static_cast(((NSSegmentedControl*)sender).selectedSegment)); details.Set( @@ -291,7 +291,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item"; - (void)scrubber:(NSScrubber*)scrubber didSelectItemAtIndex:(NSInteger)selectedIndex { - base::Value::Dict details; + base::DictValue details; details.Set("selectedIndex", static_cast(selectedIndex)); details.Set("type", "select"); window_->NotifyTouchBarItemInteraction([scrubber.identifier UTF8String], @@ -300,7 +300,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item"; - (void)scrubber:(NSScrubber*)scrubber didHighlightItemAtIndex:(NSInteger)highlightedIndex { - base::Value::Dict details; + base::DictValue details; details.Set("highlightedIndex", static_cast(highlightedIndex)); details.Set("type", "highlight"); window_->NotifyTouchBarItemInteraction([scrubber.identifier UTF8String], diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index c1e5d14722..fda854c97c 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -96,15 +96,15 @@ constexpr std::string_view kTitleFormat = "Developer Tools - %s"; const size_t kMaxMessageChunkSize = IPC::mojom::kChannelMaximumMessageSize / 4; -base::Value::Dict RectToDictionary(const gfx::Rect& bounds) { - return base::Value::Dict{} +base::DictValue RectToDictionary(const gfx::Rect& bounds) { + return base::DictValue{} .Set("x", bounds.x()) .Set("y", bounds.y()) .Set("width", bounds.width()) .Set("height", bounds.height()); } -gfx::Rect DictionaryToRect(const base::Value::Dict& dict) { +gfx::Rect DictionaryToRect(const base::DictValue& dict) { return gfx::Rect{dict.FindInt("x").value_or(0), dict.FindInt("y").value_or(0), dict.FindInt("width").value_or(800), dict.FindInt("height").value_or(600)}; @@ -269,7 +269,7 @@ class InspectableWebContents::NetworkResourceLoader "statusCode", response_headers_ ? response_headers_->response_code() : net::HTTP_OK); - base::Value::Dict headers; + base::DictValue headers; size_t iterator = 0; std::string name; std::string value; @@ -490,7 +490,7 @@ void InspectableWebContents::CallClientFunction( if (!GetDevToolsWebContents()) return; - base::Value::List arguments; + base::ListValue arguments; if (!arg1.is_none()) { arguments.Append(std::move(arg1)); if (!arg2.is_none()) { @@ -550,7 +550,7 @@ void InspectableWebContents::LoadCompleted() { } } else { if (dock_state_.empty()) { - const base::Value::Dict& prefs = + const base::DictValue& prefs = pref_service_->GetDict(kDevToolsPreferences); const std::string* current_dock_state = prefs.FindString("currentDockState"); @@ -597,7 +597,7 @@ void InspectableWebContents::AddDevToolsExtensionsToClient() { if (!registry) return; - base::Value::List results; + base::ListValue results; for (auto& extension : registry->enabled_extensions()) { auto devtools_page_url = extensions::chrome_manifest_urls::GetDevToolsPage(extension.get()); @@ -611,7 +611,7 @@ void InspectableWebContents::AddDevToolsExtensionsToClient() { web_contents_->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(), url::Origin::Create(extension->url())); - base::Value::Dict extension_info; + base::DictValue extension_info; extension_info.Set("startPage", devtools_page_url.spec()); extension_info.Set("name", extension->name()); extension_info.Set("exposeExperimentalAPIs", @@ -864,7 +864,7 @@ void InspectableWebContents::GetSyncInformation(DispatchCallback callback) { } void InspectableWebContents::GetHostConfig(DispatchCallback callback) { - base::Value::Dict response_dict; + base::DictValue response_dict; base::Value response = base::Value(std::move(response_dict)); std::move(callback).Run(&response); } @@ -875,7 +875,7 @@ void InspectableWebContents::RegisterExtensionsAPI(const std::string& origin, } void InspectableWebContents::HandleMessageFromDevToolsFrontend( - base::Value::Dict message) { + base::DictValue message) { // TODO(alexeykuzmin): Should we expect it to exist? if (!embedder_message_dispatcher_) { return; @@ -889,8 +889,8 @@ void InspectableWebContents::HandleMessageFromDevToolsFrontend( return; } - const base::Value::List no_params; - const base::Value::List& params_list = + const base::ListValue no_params; + const base::ListValue& params_list = params != nullptr && params->is_list() ? params->GetList() : no_params; const int id = message.FindInt(kFrontendHostId).value_or(0); diff --git a/shell/browser/ui/inspectable_web_contents.h b/shell/browser/ui/inspectable_web_contents.h index ffb036b562..841fb8d77f 100644 --- a/shell/browser/ui/inspectable_web_contents.h +++ b/shell/browser/ui/inspectable_web_contents.h @@ -201,7 +201,7 @@ class InspectableWebContents const DevToolsDispatchHttpRequestParams& params) override {} // content::DevToolsFrontendHostDelegate: - void HandleMessageFromDevToolsFrontend(base::Value::Dict message); + void HandleMessageFromDevToolsFrontend(base::DictValue message); // content::DevToolsAgentHostClient: void DispatchProtocolMessage(content::DevToolsAgentHost* agent_host, diff --git a/shell/browser/ui/webui/accessibility_ui.cc b/shell/browser/ui/webui/accessibility_ui.cc index da4976e3f3..eb5e2a6f48 100644 --- a/shell/browser/ui/webui/accessibility_ui.cc +++ b/shell/browser/ui/webui/accessibility_ui.cc @@ -94,7 +94,7 @@ constexpr std::string_view kWeb = "web"; static const char kDetectedATName[] = "detectedATName"; static const char kIsScreenReaderActive[] = "isScreenReaderActive"; -base::Value::Dict BuildTargetDescriptor( +base::DictValue BuildTargetDescriptor( const GURL& url, const std::string& name, const GURL& favicon_url, @@ -102,7 +102,7 @@ base::Value::Dict BuildTargetDescriptor( int routing_id, ui::AXMode accessibility_mode, base::ProcessHandle handle = base::kNullProcessHandle) { - base::Value::Dict target_data; + base::DictValue target_data; target_data.Set(kProcessIdField, process_id); target_data.Set(kRoutingIdField, routing_id); target_data.Set(kUrlField, url.spec()); @@ -115,7 +115,7 @@ base::Value::Dict BuildTargetDescriptor( return target_data; } -base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) { +base::DictValue BuildTargetDescriptor(content::RenderViewHost* rvh) { content::WebContents* web_contents = content::WebContents::FromRenderViewHost(rvh); ui::AXMode accessibility_mode; @@ -143,8 +143,8 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) { rvh->GetRoutingID(), accessibility_mode); } -base::Value::Dict BuildTargetDescriptor(electron::NativeWindow* window) { - base::Value::Dict target_data; +base::DictValue BuildTargetDescriptor(electron::NativeWindow* window) { + base::DictValue target_data; target_data.Set(kSessionIdField, window->window_id()); target_data.Set(kNameField, window->GetTitle()); target_data.Set(kTypeField, kBrowser); @@ -157,7 +157,7 @@ bool ShouldHandleAccessibilityRequestCallback(const std::string& path) { // Sets boolean values in `data` for each bit in `new_ax_mode` that differs from // that in `last_ax_mode`. Returns `true` if `data` was modified. -void SetProcessModeBools(ui::AXMode ax_mode, base::Value::Dict& data) { +void SetProcessModeBools(ui::AXMode ax_mode, base::DictValue& data) { data.Set(kNative, ax_mode.has_mode(ui::AXMode::kNativeAPIs)); data.Set(kWeb, ax_mode.has_mode(ui::AXMode::kWebContents)); data.Set(kText, ax_mode.has_mode(ui::AXMode::kInlineTextBoxes)); @@ -170,7 +170,7 @@ void SetProcessModeBools(ui::AXMode ax_mode, base::Value::Dict& data) { #if BUILDFLAG(IS_WIN) // Sets values in `data` for the platform node counts in `counts`. void SetNodeCounts(const ui::AXPlatformNodeWin::Counts& counts, - base::Value::Dict& data) { + base::DictValue& data) { data.Set("dormantCount", base::NumberToString(counts.dormant_nodes)); data.Set("liveCount", base::NumberToString(counts.live_nodes)); data.Set("ghostCount", base::NumberToString(counts.ghost_nodes)); @@ -186,7 +186,7 @@ void HandleAccessibilityRequestCallback( auto& browser_accessibility_state = *content::BrowserAccessibilityState::GetInstance(); - base::Value::Dict data; + base::DictValue data; PrefService* pref = static_cast(current_context)->prefs(); ui::AXMode mode = @@ -226,7 +226,7 @@ void HandleAccessibilityRequestCallback( // is checked. data.Set( kLockedPlatformModes, - base::Value::Dict() + base::DictValue() .Set(kNative, allow_platform_activation && native && initial_process_mode.has_mode(ui::AXMode::kNativeAPIs)) @@ -252,7 +252,7 @@ void HandleAccessibilityRequestCallback( std::vector supported_api_types = content::AXInspectFactory::SupportedApis(); - base::Value::List supported_api_list; + base::ListValue supported_api_list; supported_api_list.reserve(supported_api_types.size()); for (ui::AXApiType::Type type : supported_api_types) { supported_api_list.Append(std::string_view(type)); @@ -274,7 +274,7 @@ void HandleAccessibilityRequestCallback( data.Set(kLocked, !browser_accessibility_state.IsAXModeChangeAllowed()); - base::Value::List page_list; + base::ListValue page_list; std::unique_ptr widget_iter( content::RenderWidgetHost::GetRenderWidgetHosts()); @@ -305,7 +305,7 @@ void HandleAccessibilityRequestCallback( continue; } - base::Value::Dict descriptor = BuildTargetDescriptor(rvh); + base::DictValue descriptor = BuildTargetDescriptor(rvh); descriptor.Set(kNative, native); descriptor.Set(kExtendedProperties, extended_properties); descriptor.Set(kScreenReader, screen_reader); @@ -314,7 +314,7 @@ void HandleAccessibilityRequestCallback( } data.Set(kPagesField, std::move(page_list)); - base::Value::List window_list; + base::ListValue window_list; for (auto* window : electron::WindowList::GetWindows()) { window_list.Append(BuildTargetDescriptor(window)); } @@ -420,7 +420,7 @@ ElectronAccessibilityUIMessageHandler::ElectronAccessibilityUIMessageHandler() base::Unretained(this))) {} void ElectronAccessibilityUIMessageHandler::GetRequestTypeAndFilters( - const base::Value::Dict& data, + const base::DictValue& data, std::string& request_type, std::string& allow, std::string& allow_empty, @@ -433,8 +433,8 @@ void ElectronAccessibilityUIMessageHandler::GetRequestTypeAndFilters( } void ElectronAccessibilityUIMessageHandler::RequestNativeUITree( - const base::Value::List& args) { - const base::Value::Dict& data = args.front().GetDict(); + const base::ListValue& args) { + const base::DictValue& data = args.front().GetDict(); std::string request_type, allow, allow_empty, deny; GetRequestTypeAndFilters(data, request_type, allow, allow_empty, deny); @@ -451,7 +451,7 @@ void ElectronAccessibilityUIMessageHandler::RequestNativeUITree( for (auto* window : electron::WindowList::GetWindows()) { if (window->window_id() == window_id) { - base::Value::Dict result = BuildTargetDescriptor(window); + base::DictValue result = BuildTargetDescriptor(window); gfx::NativeWindow native_window = window->GetNativeWindow(); ui::AXPlatformNode* node = ui::AXPlatformNode::FromNativeWindow(native_window); @@ -463,7 +463,7 @@ void ElectronAccessibilityUIMessageHandler::RequestNativeUITree( } // No browser with the specified |id| was found. - base::Value::Dict result; + base::DictValue result; result.Set(kSessionIdField, window_id); result.Set(kTypeField, kBrowser); result.Set(kErrorField, "Window no longer exists."); @@ -533,7 +533,7 @@ void ElectronAccessibilityUIMessageHandler::OnVisibilityChanged( void ElectronAccessibilityUIMessageHandler::OnUpdateDisplayTimer() { // Collect the current state. - base::Value::Dict data; + base::DictValue data; SetProcessModeBools( content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode(), diff --git a/shell/browser/ui/webui/accessibility_ui.h b/shell/browser/ui/webui/accessibility_ui.h index 5634bfc22d..c80ea647d1 100644 --- a/shell/browser/ui/webui/accessibility_ui.h +++ b/shell/browser/ui/webui/accessibility_ui.h @@ -34,12 +34,13 @@ class ElectronAccessibilityUIMessageHandler static void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry); private: - void GetRequestTypeAndFilters(const base::Value::Dict& data, + void GetRequestTypeAndFilters(const base::DictValue& data, std::string& request_type, std::string& allow, std::string& allow_empty, std::string& deny); - void RequestNativeUITree(const base::Value::List& args); + + void RequestNativeUITree(const base::ListValue& args); // content::WebContentsObserver: void OnVisibilityChanged(content::Visibility visibility) override; @@ -49,7 +50,7 @@ class ElectronAccessibilityUIMessageHandler void OnUpdateDisplayTimer(); // The last data for display sent to the UI by OnUpdateDisplayTimer. - base::Value::Dict last_data_; + base::DictValue last_data_; // A timer that runs while the UI is visible to call OnUpdateDisplayTimer. base::RepeatingTimer update_display_timer_; diff --git a/shell/browser/usb/electron_usb_delegate.cc b/shell/browser/usb/electron_usb_delegate.cc index 916112e16d..c1610c798e 100644 --- a/shell/browser/usb/electron_usb_delegate.cc +++ b/shell/browser/usb/electron_usb_delegate.cc @@ -178,7 +178,7 @@ bool ElectronUsbDelegate::CanRequestDevicePermission( if (!browser_context) return false; - base::Value::Dict details; + base::DictValue details; details.Set("securityOrigin", origin.GetURL().spec()); auto* permission_manager = static_cast( browser_context->GetPermissionControllerDelegate()); diff --git a/shell/browser/usb/usb_chooser_context.cc b/shell/browser/usb/usb_chooser_context.cc index a1c8de932c..cf7a04c9cc 100644 --- a/shell/browser/usb/usb_chooser_context.cc +++ b/shell/browser/usb/usb_chooser_context.cc @@ -70,7 +70,7 @@ UsbChooserContext::UsbChooserContext(ElectronBrowserContext* context) // static base::Value UsbChooserContext::DeviceInfoToValue( const device::mojom::UsbDeviceInfo& device_info) { - base::Value::Dict device_value; + base::DictValue device_value; device_value.Set(kDeviceNameKey, device_info.product_name ? *device_info.product_name : std::u16string_view()); @@ -100,9 +100,9 @@ base::Value UsbChooserContext::DeviceInfoToValue( device_info.device_version_subminor); bool has_active_configuration = false; - base::Value::List configuration_list; + base::ListValue configuration_list; for (const auto& configuration : device_info.configurations) { - base::Value::Dict configuration_value; + base::DictValue configuration_value; configuration_value.Set("configurationValue", configuration->configuration_value); configuration_value.Set("configurationName", @@ -111,12 +111,12 @@ base::Value UsbChooserContext::DeviceInfoToValue( : std::u16string_view()); for (const auto& interface : configuration->interfaces) { - base::Value::Dict interface_value; + base::DictValue interface_value; interface_value.Set("interfaceNumber", interface->interface_number); - base::Value::List alternate_list; + base::ListValue alternate_list; for (const auto& alternate : interface->alternates) { - base::Value::Dict alternate_value; + base::DictValue alternate_value; alternate_value.Set("alternateSetting", alternate->alternate_setting); alternate_value.Set("interfaceClass", alternate->class_code); alternate_value.Set("interfaceSubclass", alternate->subclass_code); @@ -125,9 +125,9 @@ base::Value UsbChooserContext::DeviceInfoToValue( ? *alternate->interface_name : std::u16string_view()); - base::Value::List endpoint_list; + base::ListValue endpoint_list; for (const auto& endpoint : alternate->endpoints) { - base::Value::Dict endpoint_value; + base::DictValue endpoint_value; endpoint_value.Set("endpointNumber", endpoint->endpoint_number); bool inbound = endpoint->direction == @@ -258,7 +258,7 @@ void UsbChooserContext::RevokeObjectPermissionInternal( const url::Origin& origin, const base::Value& object, bool revoked_by_website = false) { - const base::Value::Dict* object_dict = object.GetIfDict(); + const base::DictValue* object_dict = object.GetIfDict(); DCHECK(object_dict != nullptr); if (object_dict->FindString(kDeviceSerialNumberKey) != nullptr) { diff --git a/shell/browser/web_contents_permission_helper.cc b/shell/browser/web_contents_permission_helper.cc index dbe7253802..bff0c44506 100644 --- a/shell/browser/web_contents_permission_helper.cc +++ b/shell/browser/web_contents_permission_helper.cc @@ -216,7 +216,7 @@ void WebContentsPermissionHelper::RequestPermission( blink::PermissionType permission, base::OnceCallback callback, bool user_gesture, - base::Value::Dict details) { + base::DictValue details) { auto* permission_manager = static_cast( web_contents_->GetBrowserContext()->GetPermissionControllerDelegate()); auto origin = web_contents_->GetLastCommittedURL(); @@ -229,7 +229,7 @@ void WebContentsPermissionHelper::RequestPermission( bool WebContentsPermissionHelper::CheckPermission( blink::PermissionType permission, - base::Value::Dict details) const { + base::DictValue details) const { auto* rfh = web_contents_->GetPrimaryMainFrame(); auto* permission_manager = static_cast( web_contents_->GetBrowserContext()->GetPermissionControllerDelegate()); @@ -252,8 +252,8 @@ void WebContentsPermissionHelper::RequestMediaAccessPermission( auto callback = base::BindOnce(&MediaAccessAllowed, request, std::move(response_callback)); - base::Value::Dict details; - base::Value::List media_types; + base::DictValue details; + base::ListValue media_types; if (request.audio_type == blink::mojom::MediaStreamType::DEVICE_AUDIO_CAPTURE) { media_types.Append("audio"); @@ -306,7 +306,7 @@ void WebContentsPermissionHelper::RequestOpenExternalPermission( base::OnceCallback callback, bool user_gesture, const GURL& url) { - base::Value::Dict details; + base::DictValue details; details.Set("externalURL", url.spec()); RequestPermission(requesting_frame, blink::PermissionType::OPEN_EXTERNAL, std::move(callback), user_gesture, std::move(details)); @@ -315,7 +315,7 @@ void WebContentsPermissionHelper::RequestOpenExternalPermission( bool WebContentsPermissionHelper::CheckMediaAccessPermission( const url::Origin& security_origin, blink::mojom::MediaStreamType type) const { - base::Value::Dict details; + base::DictValue details; details.Set("securityOrigin", security_origin.GetURL().spec()); details.Set("mediaType", MediaStreamTypeToString(type)); auto blink_type = type == blink::mojom::MediaStreamType::DEVICE_AUDIO_CAPTURE @@ -326,7 +326,7 @@ bool WebContentsPermissionHelper::CheckMediaAccessPermission( bool WebContentsPermissionHelper::CheckSerialAccessPermission( const url::Origin& embedding_origin) const { - base::Value::Dict details; + base::DictValue details; details.Set("securityOrigin", embedding_origin.GetURL().spec()); return CheckPermission(blink::PermissionType::SERIAL, std::move(details)); } diff --git a/shell/browser/web_contents_permission_helper.h b/shell/browser/web_contents_permission_helper.h index 24804ee98e..e98189bf8f 100644 --- a/shell/browser/web_contents_permission_helper.h +++ b/shell/browser/web_contents_permission_helper.h @@ -59,10 +59,10 @@ class WebContentsPermissionHelper blink::PermissionType permission, base::OnceCallback callback, bool user_gesture = false, - base::Value::Dict details = {}); + base::DictValue details = {}); bool CheckPermission(blink::PermissionType permission, - base::Value::Dict details) const; + base::DictValue details) const; // TODO(clavin): refactor to use the WebContents provided by the // WebContentsUserData base class instead of storing a duplicate ref diff --git a/shell/browser/web_contents_preferences.cc b/shell/browser/web_contents_preferences.cc index f92fbadc32..9917ca8f08 100644 --- a/shell/browser/web_contents_preferences.cc +++ b/shell/browser/web_contents_preferences.cc @@ -361,7 +361,7 @@ void WebContentsPreferences::AppendCommandLineSwitches( } void WebContentsPreferences::SaveLastPreferences() { - base::Value::Dict dict; + base::DictValue dict; dict.Set(options::kNodeIntegration, node_integration_); dict.Set(options::kNodeIntegrationInSubFrames, node_integration_in_sub_frames_); diff --git a/shell/browser/zoom_level_delegate.cc b/shell/browser/zoom_level_delegate.cc index c79435b22c..be7847aa66 100644 --- a/shell/browser/zoom_level_delegate.cc +++ b/shell/browser/zoom_level_delegate.cc @@ -63,7 +63,7 @@ void ZoomLevelDelegate::SetDefaultZoomLevelPref(double level) { } double ZoomLevelDelegate::GetDefaultZoomLevelPref() const { - const base::Value::Dict& default_zoom_level_dictionary = + const base::DictValue& default_zoom_level_dictionary = pref_service_->GetDict(kPartitionDefaultZoomLevel); // If no default has been previously set, the default returned is the // value used to initialize default_zoom_level in this function. @@ -77,15 +77,15 @@ void ZoomLevelDelegate::OnZoomLevelChanged( double level = change.zoom_level; ScopedDictPrefUpdate update(pref_service_, kPartitionPerHostZoomLevels); - base::Value::Dict& host_zoom_dictionaries = update.Get(); + base::DictValue& host_zoom_dictionaries = update.Get(); bool modification_is_removal = blink::ZoomValuesEqual(level, host_zoom_map_->GetDefaultZoomLevel()); - base::Value::Dict* host_zoom_dictionary = + base::DictValue* host_zoom_dictionary = host_zoom_dictionaries.FindDict(partition_key_); if (!host_zoom_dictionary) { - base::Value::Dict dict; + base::DictValue dict; host_zoom_dictionaries.Set(partition_key_, std::move(dict)); host_zoom_dictionary = host_zoom_dictionaries.FindDict(partition_key_); } @@ -97,9 +97,9 @@ void ZoomLevelDelegate::OnZoomLevelChanged( } void ZoomLevelDelegate::ExtractPerHostZoomLevels( - const base::Value::Dict& host_zoom_dictionary) { + const base::DictValue& host_zoom_dictionary) { std::vector keys_to_remove; - base::Value::Dict host_zoom_dictionary_copy = host_zoom_dictionary.Clone(); + base::DictValue host_zoom_dictionary_copy = host_zoom_dictionary.Clone(); for (auto [host, value] : host_zoom_dictionary_copy) { const std::optional zoom_level = value.GetIfDouble(); @@ -123,7 +123,7 @@ void ZoomLevelDelegate::ExtractPerHostZoomLevels( // have an empty host. { ScopedDictPrefUpdate update(pref_service_, kPartitionPerHostZoomLevels); - base::Value::Dict* sanitized_host_zoom_dictionary = + base::DictValue* sanitized_host_zoom_dictionary = update->FindDict(partition_key_); if (sanitized_host_zoom_dictionary) { for (const std::string& key : keys_to_remove) @@ -143,9 +143,9 @@ void ZoomLevelDelegate::InitHostZoomMap(content::HostZoomMap* host_zoom_map) { // Initialize the HostZoomMap with per-host zoom levels from the persisted // zoom-level preference values. - const base::Value::Dict& host_zoom_dictionaries = + const base::DictValue& host_zoom_dictionaries = pref_service_->GetDict(kPartitionPerHostZoomLevels); - const base::Value::Dict* host_zoom_dictionary = + const base::DictValue* host_zoom_dictionary = host_zoom_dictionaries.FindDict(partition_key_); if (host_zoom_dictionary) { // Since we're calling this before setting up zoom_subscription_ below we diff --git a/shell/browser/zoom_level_delegate.h b/shell/browser/zoom_level_delegate.h index c241206bef..9edaf692bc 100644 --- a/shell/browser/zoom_level_delegate.h +++ b/shell/browser/zoom_level_delegate.h @@ -47,7 +47,7 @@ class ZoomLevelDelegate : public content::ZoomLevelDelegate { void InitHostZoomMap(content::HostZoomMap* host_zoom_map) override; private: - void ExtractPerHostZoomLevels(const base::Value::Dict& host_zoom_dictionary); + void ExtractPerHostZoomLevels(const base::DictValue& host_zoom_dictionary); // This is a callback function that receives notifications from HostZoomMap // when per-host zoom levels change. It is used to update the per-host diff --git a/shell/common/api/electron_api_native_image.cc b/shell/common/api/electron_api_native_image.cc index 14ab473c7c..82da50e44c 100644 --- a/shell/common/api/electron_api_native_image.cc +++ b/shell/common/api/electron_api_native_image.cc @@ -339,7 +339,7 @@ float NativeImage::GetAspectRatio(const std::optional scale_factor) { } gin_helper::Handle NativeImage::Resize(gin::Arguments* args, - base::Value::Dict options) { + base::DictValue options) { float scale_factor = GetScaleFactorFromOptions(args); gfx::Size size = GetSize(scale_factor); diff --git a/shell/common/api/electron_api_native_image.h b/shell/common/api/electron_api_native_image.h index ad70f4637f..515318ca5e 100644 --- a/shell/common/api/electron_api_native_image.h +++ b/shell/common/api/electron_api_native_image.h @@ -117,7 +117,7 @@ class NativeImage final : public gin_helper::DeprecatedWrappable { v8::Local GetBitmap(gin::Arguments* args); v8::Local GetNativeHandle(gin_helper::ErrorThrower thrower); gin_helper::Handle Resize(gin::Arguments* args, - base::Value::Dict options); + base::DictValue options); gin_helper::Handle Crop(v8::Isolate* isolate, const gfx::Rect& rect); std::string ToDataURL(gin::Arguments* args); diff --git a/shell/common/api/electron_api_shared_texture.cc b/shell/common/api/electron_api_shared_texture.cc index ba22b50aa0..4582e4e65a 100644 --- a/shell/common/api/electron_api_shared_texture.cc +++ b/shell/common/api/electron_api_shared_texture.cc @@ -360,7 +360,8 @@ void ImportedTextureGetVideoFrame( const v8::FunctionCallbackInfo& info) { auto* isolate = info.GetIsolate(); auto* wrapper = static_cast( - info.Data().As()->Value()); + info.Data().As()->Value( + v8::kExternalPointerTypeTagDefault)); if (wrapper->IsReferenceReleased()) { gin_helper::ErrorThrower(isolate).ThrowTypeError( @@ -382,7 +383,8 @@ void ImportedTextureStartTransferSharedTexture( const v8::FunctionCallbackInfo& info) { auto* isolate = info.GetIsolate(); auto* wrapper = static_cast( - info.Data().As()->Value()); + info.Data().As()->Value( + v8::kExternalPointerTypeTagDefault)); if (wrapper->IsReferenceReleased()) { gin_helper::ErrorThrower(isolate).ThrowTypeError( @@ -396,7 +398,8 @@ void ImportedTextureStartTransferSharedTexture( void ImportedTextureRelease(const v8::FunctionCallbackInfo& info) { auto* wrapper = static_cast( - info.Data().As()->Value()); + info.Data().As()->Value( + v8::kExternalPointerTypeTagDefault)); auto cb = info[0]; if (cb->IsFunction()) { @@ -415,7 +418,8 @@ void ImportedTextureGetFrameCreationSyncToken( const v8::FunctionCallbackInfo& info) { auto* isolate = info.GetIsolate(); auto* wrapper = static_cast( - info.Data().As()->Value()); + info.Data().As()->Value( + v8::kExternalPointerTypeTagDefault)); if (wrapper->IsReferenceReleased()) { gin_helper::ErrorThrower(isolate).ThrowTypeError( @@ -431,7 +435,8 @@ void ImportedTextureSetReleaseSyncToken( const v8::FunctionCallbackInfo& info) { auto* isolate = info.GetIsolate(); auto* wrapper = static_cast( - info.Data().As()->Value()); + info.Data().As()->Value( + v8::kExternalPointerTypeTagDefault)); if (wrapper->IsReferenceReleased()) { gin_helper::ErrorThrower(isolate).ThrowTypeError( @@ -454,7 +459,8 @@ v8::Local CreateImportedSharedTextureFromSharedImage( auto* wrapper = new ImportedSharedTextureWrapper(); wrapper->ist = base::WrapRefCounted(imported); - auto imported_wrapped = v8::External::New(isolate, wrapper); + auto imported_wrapped = + v8::External::New(isolate, wrapper, v8::kExternalPointerTypeTagDefault); gin::Dictionary root(isolate, v8::Object::New(isolate)); auto releaser = v8::Function::New(isolate->GetCurrentContext(), diff --git a/shell/common/asar/archive.cc b/shell/common/asar/archive.cc index 29c1a7e137..8bce0e2864 100644 --- a/shell/common/asar/archive.cc +++ b/shell/common/asar/archive.cc @@ -37,16 +37,16 @@ const char kSeparators[] = "\\/"; const char kSeparators[] = "/"; #endif -const base::Value::Dict* GetNodeFromPath(std::string path, - const base::Value::Dict& root); +const base::DictValue* GetNodeFromPath(std::string path, + const base::DictValue& root); // Gets the "files" from "dir". -const base::Value::Dict* GetFilesNode(const base::Value::Dict& root, - const base::Value::Dict& dir) { +const base::DictValue* GetFilesNode(const base::DictValue& root, + const base::DictValue& dir) { // Test for symbol linked directory. const std::string* link = dir.FindString("link"); if (link != nullptr) { - const base::Value::Dict* linked_node = GetNodeFromPath(*link, root); + const base::DictValue* linked_node = GetNodeFromPath(*link, root); if (!linked_node) return nullptr; return linked_node->FindDict("files"); @@ -56,27 +56,27 @@ const base::Value::Dict* GetFilesNode(const base::Value::Dict& root, } // Gets sub-file "name" from "dir". -const base::Value::Dict* GetChildNode(const base::Value::Dict& root, - const std::string& name, - const base::Value::Dict& dir) { +const base::DictValue* GetChildNode(const base::DictValue& root, + const std::string& name, + const base::DictValue& dir) { if (name.empty()) return &root; - const base::Value::Dict* files = GetFilesNode(root, dir); + const base::DictValue* files = GetFilesNode(root, dir); return files ? files->FindDict(name) : nullptr; } // Gets the node of "path" from "root". -const base::Value::Dict* GetNodeFromPath(std::string path, - const base::Value::Dict& root) { +const base::DictValue* GetNodeFromPath(std::string path, + const base::DictValue& root) { if (path.empty()) return &root; - const base::Value::Dict* dir = &root; + const base::DictValue* dir = &root; for (size_t delimiter_position = path.find_first_of(kSeparators); delimiter_position != std::string::npos; delimiter_position = path.find_first_of(kSeparators)) { - const base::Value::Dict* child = + const base::DictValue* child = GetChildNode(root, path.substr(0, delimiter_position), *dir); if (!child) return nullptr; @@ -91,7 +91,7 @@ const base::Value::Dict* GetNodeFromPath(std::string path, bool FillFileInfoWithNode(Archive::FileInfo* info, uint32_t header_size, bool load_integrity, - const base::Value::Dict* node) { + const base::DictValue* node) { if (std::optional size = node->FindInt("size")) { info->size = static_cast(*size); } else { @@ -120,11 +120,11 @@ bool FillFileInfoWithNode(Archive::FileInfo* info, #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) if (load_integrity && electron::fuses::IsEmbeddedAsarIntegrityValidationEnabled()) { - if (const base::Value::Dict* integrity = node->FindDict("integrity")) { + if (const base::DictValue* integrity = node->FindDict("integrity")) { const std::string* algorithm = integrity->FindString("algorithm"); const std::string* hash = integrity->FindString("hash"); std::optional block_size = integrity->FindInt("blockSize"); - const base::Value::List* blocks = integrity->FindList("blocks"); + const base::ListValue* blocks = integrity->FindList("blocks"); if (algorithm && hash && block_size && block_size > 0 && blocks) { IntegrityPayload integrity_payload; @@ -281,8 +281,7 @@ bool Archive::GetFileInfo(const base::FilePath& path, FileInfo* info) const { if (!header_) return false; - const base::Value::Dict* node = - GetNodeFromPath(path.AsUTF8Unsafe(), *header_); + const base::DictValue* node = GetNodeFromPath(path.AsUTF8Unsafe(), *header_); if (!node) return false; @@ -297,8 +296,7 @@ bool Archive::Stat(const base::FilePath& path, Stats* stats) const { if (!header_) return false; - const base::Value::Dict* node = - GetNodeFromPath(path.AsUTF8Unsafe(), *header_); + const base::DictValue* node = GetNodeFromPath(path.AsUTF8Unsafe(), *header_); if (!node) return false; @@ -320,12 +318,11 @@ bool Archive::Readdir(const base::FilePath& path, if (!header_) return false; - const base::Value::Dict* node = - GetNodeFromPath(path.AsUTF8Unsafe(), *header_); + const base::DictValue* node = GetNodeFromPath(path.AsUTF8Unsafe(), *header_); if (!node) return false; - const base::Value::Dict* files_node = GetFilesNode(*header_, *node); + const base::DictValue* files_node = GetFilesNode(*header_, *node); if (!files_node) return false; @@ -339,8 +336,7 @@ bool Archive::Realpath(const base::FilePath& path, if (!header_) return false; - const base::Value::Dict* node = - GetNodeFromPath(path.AsUTF8Unsafe(), *header_); + const base::DictValue* node = GetNodeFromPath(path.AsUTF8Unsafe(), *header_); if (!node) return false; diff --git a/shell/common/asar/archive.h b/shell/common/asar/archive.h index 5b38b0114b..4ebe80ec1b 100644 --- a/shell/common/asar/archive.h +++ b/shell/common/asar/archive.h @@ -106,7 +106,7 @@ class Archive { base::File file_{base::File::FILE_OK}; int fd_ = -1; uint32_t header_size_ = 0; - std::optional header_; + std::optional header_; // Cached external temporary files. base::Lock external_files_lock_; diff --git a/shell/common/asar/archive_win.cc b/shell/common/asar/archive_win.cc index 2360493832..fb1ab198fe 100644 --- a/shell/common/asar/archive_win.cc +++ b/shell/common/asar/archive_win.cc @@ -78,7 +78,7 @@ auto LoadIntegrityConfig() { LOG(FATAL) << "Invalid integrity config: NOT a valid JSON."; } - const base::Value::List* file_configs = root.value().GetIfList(); + const base::ListValue* file_configs = root.value().GetIfList(); if (!file_configs) { LOG(FATAL) << "Invalid integrity config: NOT a list."; } @@ -87,7 +87,7 @@ auto LoadIntegrityConfig() { cache.reserve(file_configs->size()); for (size_t i = 0; i < file_configs->size(); i++) { // Skip invalid file configs - const base::Value::Dict* ele_dict = (*file_configs)[i].GetIfDict(); + const base::DictValue* ele_dict = (*file_configs)[i].GetIfDict(); if (!ele_dict) { LOG(WARNING) << "Skip config " << i << ": NOT a valid dict"; continue; diff --git a/shell/common/gin_converters/content_converter.cc b/shell/common/gin_converters/content_converter.cc index 349d2cbd64..6bada32a25 100644 --- a/shell/common/gin_converters/content_converter.cc +++ b/shell/common/gin_converters/content_converter.cc @@ -187,7 +187,7 @@ v8::Local Converter::ToV8( return StringToV8(isolate, "payment-handler"); case blink::PermissionType::PERIODIC_BACKGROUND_SYNC: return StringToV8(isolate, "periodic-background-sync"); - case blink::PermissionType::DURABLE_STORAGE: + case blink::PermissionType::PERSISTENT_STORAGE: return StringToV8(isolate, "persistent-storage"); case blink::PermissionType::GEOLOCATION: return StringToV8(isolate, "geolocation"); diff --git a/shell/common/gin_converters/hid_device_info_converter.h b/shell/common/gin_converters/hid_device_info_converter.h index c855d134fb..06d6deb199 100644 --- a/shell/common/gin_converters/hid_device_info_converter.h +++ b/shell/common/gin_converters/hid_device_info_converter.h @@ -19,11 +19,11 @@ struct Converter { v8::Isolate* isolate, const device::mojom::HidDeviceInfoPtr& device) { base::Value value = electron::HidChooserContext::DeviceInfoToValue(*device); - base::Value::Dict& dict = value.GetDict(); + base::DictValue& dict = value.GetDict(); dict.Set("deviceId", electron::HidChooserController::PhysicalDeviceIdFromDeviceInfo( *device)); - return gin::Converter::ToV8(isolate, dict); + return gin::Converter::ToV8(isolate, dict); } }; diff --git a/shell/common/gin_converters/net_converter.cc b/shell/common/gin_converters/net_converter.cc index 6a7ade637f..e5cb7fa8e4 100644 --- a/shell/common/gin_converters/net_converter.cc +++ b/shell/common/gin_converters/net_converter.cc @@ -164,16 +164,16 @@ v8::Local Converter::ToV8( v8::Local Converter::ToV8( v8::Isolate* isolate, net::HttpResponseHeaders* headers) { - base::Value::Dict response_headers; + base::DictValue response_headers; if (headers) { size_t iter = 0; std::string key; std::string value; while (headers->EnumerateHeaderLines(&iter, &key, &value)) { key = base::ToLowerASCII(key); - base::Value::List* values = response_headers.FindList(key); + base::ListValue* values = response_headers.FindList(key); if (!values) - values = &response_headers.Set(key, base::Value::List())->GetList(); + values = &response_headers.Set(key, base::ListValue())->GetList(); values->Append(value); } } @@ -245,7 +245,7 @@ v8::Local Converter::ToV8( bool Converter::FromV8(v8::Isolate* isolate, v8::Local val, net::HttpRequestHeaders* out) { - base::Value::Dict dict; + base::DictValue dict; if (!ConvertFromV8(isolate, val, &dict)) return false; for (const auto it : dict) { @@ -588,12 +588,12 @@ bool Converter>::FromV8( base::Value list_value; if (!ConvertFromV8(isolate, val, &list_value) || !list_value.is_list()) return false; - base::Value::List& list = list_value.GetList(); + base::ListValue& list = list_value.GetList(); *out = base::MakeRefCounted(); for (base::Value& dict_value : list) { if (!dict_value.is_dict()) return false; - base::Value::Dict& dict = dict_value.GetDict(); + base::DictValue& dict = dict_value.GetDict(); std::string* type = dict.FindString("type"); if (!type) return false; diff --git a/shell/common/gin_converters/osr_converter.cc b/shell/common/gin_converters/osr_converter.cc index 4c513a4d34..27129416c9 100644 --- a/shell/common/gin_converters/osr_converter.cc +++ b/shell/common/gin_converters/osr_converter.cc @@ -87,10 +87,12 @@ v8::Local Converter::ToV8( // GC collects the object. auto* monitor = new OffscreenReleaseHolderMonitor(val.releaser_holder); - auto releaserHolder = v8::External::New(isolate, monitor); + auto releaserHolder = + v8::External::New(isolate, monitor, v8::kExternalPointerTypeTagDefault); auto releaserFunc = [](const v8::FunctionCallbackInfo& info) { auto* mon = static_cast( - info.Data().As()->Value()); + info.Data().As()->Value( + v8::kExternalPointerTypeTagDefault)); // Release the shared texture, so that future frames can be generated. mon->ReleaseTexture(); // Release the monitor happens at GC, don't release here. diff --git a/shell/common/gin_converters/value_converter.cc b/shell/common/gin_converters/value_converter.cc index b82c13d72a..c82319f641 100644 --- a/shell/common/gin_converters/value_converter.cc +++ b/shell/common/gin_converters/value_converter.cc @@ -11,9 +11,9 @@ namespace gin { -bool Converter::FromV8(v8::Isolate* isolate, - v8::Local val, - base::Value::Dict* out) { +bool Converter::FromV8(v8::Isolate* isolate, + v8::Local val, + base::DictValue* out) { std::unique_ptr value = content::V8ValueConverter::Create()->FromV8Value( val, isolate->GetCurrentContext()); @@ -46,9 +46,9 @@ v8::Local Converter::ToV8( val, isolate->GetCurrentContext()); } -bool Converter::FromV8(v8::Isolate* isolate, - v8::Local val, - base::Value::List* out) { +bool Converter::FromV8(v8::Isolate* isolate, + v8::Local val, + base::ListValue* out) { std::unique_ptr value = content::V8ValueConverter::Create()->FromV8Value( val, isolate->GetCurrentContext()); diff --git a/shell/common/gin_converters/value_converter.h b/shell/common/gin_converters/value_converter.h index a3d294f431..1ce8049323 100644 --- a/shell/common/gin_converters/value_converter.h +++ b/shell/common/gin_converters/value_converter.h @@ -17,12 +17,12 @@ struct Converter { }; template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - base::Value::Dict* out); + base::DictValue* out); static v8::Local ToV8(v8::Isolate* isolate, - const base::Value::Dict& val) { + const base::DictValue& val) { return gin::ConvertToV8(isolate, base::ValueView{val}); } }; @@ -39,12 +39,12 @@ struct Converter { }; template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - base::Value::List* out); + base::ListValue* out); static v8::Local ToV8(v8::Isolate* isolate, - const base::Value::List& val) { + const base::ListValue& val) { return gin::ConvertToV8(isolate, base::ValueView{val}); } }; diff --git a/shell/common/gin_helper/callback.cc b/shell/common/gin_helper/callback.cc index fb56f95a01..403fe751b1 100644 --- a/shell/common/gin_helper/callback.cc +++ b/shell/common/gin_helper/callback.cc @@ -14,7 +14,10 @@ namespace { struct TranslatorHolder { explicit TranslatorHolder(v8::Isolate* isolate) - : handle(isolate, v8::External::New(isolate, this)) { + : handle(isolate, + v8::External::New(isolate, + this, + v8::kExternalPointerTypeTagDefault)) { handle.SetWeak(this, &GC, v8::WeakCallbackType::kParameter); } ~TranslatorHolder() { @@ -57,7 +60,8 @@ void CallTranslator(v8::Local external, } } - auto* holder = static_cast(external->Value()); + auto* holder = static_cast( + external->Value(v8::kExternalPointerTypeTagDefault)); holder->translator.Run(args); // Free immediately for one-time callback. diff --git a/shell/common/gin_helper/function_template.cc b/shell/common/gin_helper/function_template.cc index 54019899bb..6c19caf4c5 100644 --- a/shell/common/gin_helper/function_template.cc +++ b/shell/common/gin_helper/function_template.cc @@ -5,6 +5,7 @@ #include "shell/common/gin_helper/function_template.h" #include "base/strings/strcat.h" +#include "gin/public/gin_embedders.h" namespace gin_helper { @@ -29,7 +30,10 @@ void CallbackHolderBase::DisposeObserver::OnDisposed() { } CallbackHolderBase::CallbackHolderBase(v8::Isolate* isolate) - : v8_ref_(isolate, v8::External::New(isolate, this)), + : v8_ref_(isolate, + v8::External::New(isolate, + this, + gin::kGinInternalCallbackHolderBaseTag)), dispose_observer_(gin::PerIsolateData::From(isolate), this) { v8_ref_.SetWeak(this, &CallbackHolderBase::FirstWeakCallback, v8::WeakCallbackType::kParameter); diff --git a/shell/common/gin_helper/function_template.h b/shell/common/gin_helper/function_template.h index c9d82747ce..1c4f5430b4 100644 --- a/shell/common/gin_helper/function_template.h +++ b/shell/common/gin_helper/function_template.h @@ -13,6 +13,7 @@ #include "base/memory/raw_ptr.h" #include "gin/arguments.h" #include "gin/per_isolate_data.h" +#include "gin/public/gin_embedders.h" #include "shell/common/gin_helper/destroyable.h" #include "shell/common/gin_helper/error_thrower.h" #include "v8/include/v8-context.h" @@ -289,8 +290,8 @@ struct Dispatcher { static void DispatchToCallbackImpl(gin::Arguments* args) { v8::Local v8_holder; CHECK(args->GetData(&v8_holder)); - CallbackHolderBase* holder_base = - reinterpret_cast(v8_holder->Value()); + CallbackHolderBase* holder_base = reinterpret_cast( + v8_holder->Value(gin::kGinInternalCallbackHolderBaseTag)); typedef CallbackHolder HolderT; HolderT* holder = static_cast(holder_base); diff --git a/shell/common/node_util.cc b/shell/common/node_util.cc index 233cbeeb2d..af22c8b5bb 100644 --- a/shell/common/node_util.cc +++ b/shell/common/node_util.cc @@ -115,7 +115,7 @@ node::Environment* CreateEnvironment(v8::Isolate* isolate, node::Environment* env = node::CreateEnvironment(isolate_data, context, args, exec_args, env_flags); if (auto message = try_catch.Message(); !message.IsEmpty()) { - base::Value::Dict dict; + base::DictValue dict; if (std::string str; gin::ConvertFromV8(isolate, message->Get(), &str)) dict.Set("message", std::move(str)); diff --git a/shell/renderer/api/electron_api_spell_check_client.cc b/shell/renderer/api/electron_api_spell_check_client.cc index bab5d93fc8..170bd17b17 100644 --- a/shell/renderer/api/electron_api_spell_check_client.cc +++ b/shell/renderer/api/electron_api_spell_check_client.cc @@ -91,8 +91,7 @@ SpellCheckClient::~SpellCheckClient() { void SpellCheckClient::RequestCheckingOfText( const blink::WebString& text_to_check, - const std::vector< - WebTextCheckClient::WebSpellingMarker>& /* spelling_markers */, + const std::vector& /* spelling_markers */, ShouldForceRefreshTextCheckService /* should_force_refresh */, std::unique_ptr completion_callback) { std::u16string text(text_to_check.Utf16()); diff --git a/shell/renderer/api/electron_api_spell_check_client.h b/shell/renderer/api/electron_api_spell_check_client.h index cbcbe79d6b..6d633445fd 100644 --- a/shell/renderer/api/electron_api_spell_check_client.h +++ b/shell/renderer/api/electron_api_spell_check_client.h @@ -44,8 +44,7 @@ class SpellCheckClient : public blink::WebSpellCheckPanelHostClient, // blink::WebTextCheckClient: void RequestCheckingOfText( const blink::WebString& text_to_check, - const std::vector& - spelling_markers, + const std::vector& spelling_markers, ShouldForceRefreshTextCheckService should_force_refresh, std::unique_ptr completion_callback) override; diff --git a/shell/renderer/printing/print_render_frame_helper_delegate.cc b/shell/renderer/printing/print_render_frame_helper_delegate.cc index fff17b4db6..e95b9e0bbc 100644 --- a/shell/renderer/printing/print_render_frame_helper_delegate.cc +++ b/shell/renderer/printing/print_render_frame_helper_delegate.cc @@ -51,7 +51,7 @@ bool PrintRenderFrameHelperDelegate::OverridePrint( // instructs the PDF plugin to print. This is to make window.print() on a // PDF plugin document correctly print the PDF. See // https://crbug.com/448720. - base::Value::Dict message; + base::DictValue message; message.Set("type", "print"); post_message_support->PostMessageFromValue(base::Value(std::move(message))); return true; diff --git a/spec/api-net-session-spec.ts b/spec/api-net-session-spec.ts index 42525be2c0..ffa30006e6 100644 --- a/spec/api-net-session-spec.ts +++ b/spec/api-net-session-spec.ts @@ -381,7 +381,7 @@ describe('net module (session)', () => { url: 'https://electronjs.org', domain: 'wssss.iamabaddomain.fun', name: 'cookie1' - })).to.eventually.be.rejectedWith(/Failed to set cookie - The cookie was set with an invalid Domain attribute./); + })).to.eventually.be.rejectedWith(/The cookie was set with an invalid Domain attribute/); }); it('should be able correctly filter out cookies that are session', async () => { diff --git a/spec/index.js b/spec/index.js index f52ef70e92..ebf60b1c46 100644 --- a/spec/index.js +++ b/spec/index.js @@ -38,7 +38,10 @@ app.commandLine.appendSwitch('host-resolver-rules', [ // Enable features required by tests. app.commandLine.appendSwitch('enable-features', [ // spec/api-web-frame-main-spec.ts - 'DocumentPolicyIncludeJSCallStacksInCrashReports' + 'DocumentPolicyIncludeJSCallStacksInCrashReports', + // spec/spellchecker-spec.ts - allows spellcheck without user gesture + // https://chromium-review.googlesource.com/c/chromium/src/+/7452579 + 'UnrestrictSpellingAndGrammarForTesting' ].join(',')); global.standardScheme = 'app';