From ba3928103ffb660d987742f27989a632f5f6bddd Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 20 Apr 2020 16:51:27 -0700 Subject: [PATCH 1/2] spec: fix type errors in devToolsWebContents (#23187) --- spec-main/api-web-contents-spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index d5022fc9c4641..2e98bb442df27 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -384,7 +384,7 @@ describe('webContents module', () => { const devToolsOpened = emittedOnce(w.webContents, 'devtools-opened'); w.webContents.openDevTools(); await devToolsOpened; - expect(webContents.getFocusedWebContents().id).to.equal(w.webContents.devToolsWebContents.id); + expect(webContents.getFocusedWebContents().id).to.equal(w.webContents.devToolsWebContents!.id); const devToolsClosed = emittedOnce(w.webContents, 'devtools-closed'); w.webContents.closeDevTools(); await devToolsClosed; @@ -468,7 +468,7 @@ describe('webContents module', () => { const w = new BrowserWindow({ show: false }); w.webContents.openDevTools(); w.webContents.once('devtools-opened', () => { - expect(w.webContents.devToolsWebContents.getWebPreferences()).to.be.null(); + expect(w.webContents.devToolsWebContents!.getWebPreferences()).to.be.null(); done(); }); }); @@ -1656,11 +1656,11 @@ describe('webContents module', () => { const opened = emittedOnce(w.webContents, 'devtools-opened'); w.webContents.openDevTools(); await opened; - await emittedOnce(w.webContents.devToolsWebContents, 'did-finish-load'); - w.webContents.devToolsWebContents.focus(); + await emittedOnce(w.webContents.devToolsWebContents!, 'did-finish-load'); + w.webContents.devToolsWebContents!.focus(); // Focus an input field - await w.webContents.devToolsWebContents.executeJavaScript(` + await w.webContents.devToolsWebContents!.executeJavaScript(` const input = document.createElement('input') document.body.innerHTML = '' document.body.appendChild(input) @@ -1670,7 +1670,7 @@ describe('webContents module', () => { // Write something to the clipboard clipboard.writeText('test value'); - const pasted = w.webContents.devToolsWebContents.executeJavaScript(`new Promise(resolve => { + const pasted = w.webContents.devToolsWebContents!.executeJavaScript(`new Promise(resolve => { document.querySelector('input').addEventListener('paste', (e) => { resolve(e.target.value) }) From 1bbb407dc9bf8d253794b494b4a94b927f84858b Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Mon, 20 Apr 2020 17:25:38 -0700 Subject: [PATCH 2/2] chore: bump chromium to 2600291d041c530698616a4716cdf (master) (#23122) * chore: bump chromium in DEPS to 99e60beb593ecf98f8a441e3f03a13b68cfcb311 * update patches * chore: bump chromium in DEPS to b1abadda21f417ba5e8276c4dd779d31445d16cd * update patches * 2146532: gtkui: Fix standalone Ozone/Wayland configuration https://chromium-review.googlesource.com/c/chromium/src/+/2146532 * 2145152: Pass source URL when setting a cookie https://chromium-review.googlesource.com/c/chromium/src/+/2145152 * lint * chore: bump chromium in DEPS to 8897189f1da5a3670bbe32d343767fd71f80d779 * chore: bump chromium in DEPS to 8ac51eeee93a02ed5b81f47e28627079edeecde0 * chore: bump chromium in DEPS to e897b8003f3a5f3c8d654eee9b03c513046ae7ea * chore: bump chromium in DEPS to 7b80f9c82122600291d041c530698616a4716cdf * Update patches * Move definition of WebInputEvent enums into mojo https://chromium-review.googlesource.com/c/chromium/src/+/2152777 * update patches Co-authored-by: Electron Bot Co-authored-by: Jeremy Apthorp Co-authored-by: John Kleinschmidt --- BUILD.gn | 2 +- DEPS | 2 +- ...rustedauthclient_to_urlloaderfactory.patch | 12 +++---- patches/chromium/blink_local_frame.patch | 2 +- patches/chromium/blink_world_context.patch | 8 ++--- .../build_add_electron_tracing_category.patch | 4 +-- patches/chromium/can_create_window.patch | 6 ++-- ...esources_not_chrome_for_spellchecker.patch | 4 +-- patches/chromium/crashpad_pid_check.patch | 4 +-- ...ay_lock_the_protocol_scheme_registry.patch | 12 +++---- patches/chromium/disable-redraw-lock.patch | 6 ++-- .../disable_color_correct_rendering.patch | 30 ++++++++--------- .../disable_compositor_recycling.patch | 2 +- ...xpose_setuseragent_on_networkcontext.patch | 16 ++++----- ...screen_rendering_with_viz_compositor.patch | 2 +- ...review_disabled_when_printing_to_pdf.patch | 4 +-- ...ns_through_the_web_contents_delegate.patch | 4 +-- .../fix_undo_redo_broken_in_webviews.patch | 2 +- patches/chromium/frame_host_manager.patch | 10 +++--- ...gpu_notify_when_dxdiag_request_fails.patch | 26 +++++++-------- patches/chromium/gtk_visibility.patch | 4 +-- .../mas_disable_remote_accessibility.patch | 2 +- ...emote_certificate_verification_logic.patch | 14 ++++---- .../chromium/notification_provenance.patch | 2 +- patches/chromium/printing.patch | 33 ++++++++++--------- patches/chromium/resource_file_conflict.patch | 6 ++-- ...ove_contentrendererclient_shouldfork.patch | 4 +-- .../support_mixed_sandbox_with_zygote.patch | 2 +- patches/chromium/ui_gtk_public_header.patch | 2 +- patches/chromium/web_contents.patch | 6 ++-- patches/v8/add_realloc.patch | 4 +-- patches/v8/build_gn.patch | 10 +++--- patches/v8/dcheck.patch | 8 ++--- ...export_private_v8_symbols_on_windows.patch | 6 ++-- patches/v8/expose_mksnapshot.patch | 4 +-- shell/browser/api/electron_api_cookies.cc | 2 +- .../browser/api/electron_api_web_contents.cc | 5 +-- shell/browser/electron_browser_main_parts.cc | 2 +- 38 files changed, 138 insertions(+), 136 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index ec4c8881ae826..c274926e274f9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -505,7 +505,7 @@ source_set("electron_lib") { if (use_x11) { deps += [ "//ui/gfx/x", - "//ui/gtk:x", + "//ui/gtk/x", ] } configs += [ ":gio_unix" ] diff --git a/DEPS b/DEPS index b97655a44076b..0b0cc6f2652cd 100644 --- a/DEPS +++ b/DEPS @@ -12,7 +12,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - 'c5cbec6b4ac8f405dc5d5e416ffaf640aa3d088a', + '7b80f9c82122600291d041c530698616a4716cdf', 'node_version': 'v12.16.2', 'nan_version': diff --git a/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch b/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch index e2b5266bcf7d7..e1af720d5bdd3 100644 --- a/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch +++ b/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch @@ -10,7 +10,7 @@ WebContents, and cancels the authentication if there's no WebContents available, which there isn't in the case of the 'net' module. diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index a0d035ef7cbc701916ef0e10ce33ee62bae0777e..e556caa1e1f013559130794601fb9f3c098e5553 100644 +index 45e920425345dd3cdb2427df5f60f6d8cc81e07a..9f3e54bb0dc28ed6d6c2c49686bb24bb50d27a78 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -161,6 +161,25 @@ struct HttpAuthStaticNetworkContextParams { @@ -49,10 +49,10 @@ index a0d035ef7cbc701916ef0e10ce33ee62bae0777e..e556caa1e1f013559130794601fb9f3c // the per-context allow patterns that is managed via NetworkContext // interface. This still respects the per-context block lists. diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 2664641db02ca54ff8e95a42a90fdb02de0f4b32..417fb715a846af104086d00802abaf00f7bc226e 100644 +index 017193c28b387615dad57d50ceffe1c916fc7bea..ef8b093d4f7b13d9f7e7c25ce90c7cc1891dde0a 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -470,6 +470,7 @@ URLLoader::URLLoader( +@@ -471,6 +471,7 @@ URLLoader::URLLoader( base::WeakPtr keepalive_statistics_recorder, base::WeakPtr network_usage_accumulator, mojom::TrustedURLLoaderHeaderClient* url_loader_header_client, @@ -60,7 +60,7 @@ index 2664641db02ca54ff8e95a42a90fdb02de0f4b32..417fb715a846af104086d00802abaf00 mojom::OriginPolicyManager* origin_policy_manager, std::unique_ptr trust_token_helper_factory) : url_request_context_(url_request_context), -@@ -526,6 +527,11 @@ URLLoader::URLLoader( +@@ -527,6 +528,11 @@ URLLoader::URLLoader( header_client_.set_disconnect_handler( base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this))); } @@ -72,7 +72,7 @@ index 2664641db02ca54ff8e95a42a90fdb02de0f4b32..417fb715a846af104086d00802abaf00 if (want_raw_headers_) { options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse | mojom::kURLLoadOptionSendSSLInfoForCertificateError; -@@ -1015,7 +1021,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request, +@@ -1016,7 +1022,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request, void URLLoader::OnAuthRequired(net::URLRequest* url_request, const net::AuthChallengeInfo& auth_info) { @@ -81,7 +81,7 @@ index 2664641db02ca54ff8e95a42a90fdb02de0f4b32..417fb715a846af104086d00802abaf00 OnAuthCredentials(base::nullopt); return; } -@@ -1031,11 +1037,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, +@@ -1032,11 +1038,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, if (url_request->response_headers()) head->headers = url_request->response_headers(); head->auth_challenge_info = auth_info; diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index e8d67e7723a0e..b503f2e6f9906 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -14,7 +14,7 @@ when there is code doing that. This patch reverts the change to fix the crash in Electron. diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index d051a7e6621e70fb86434a000d5736fea040fe1c..0100d8ec83d86a5ca225ac08f4e7534862a5e245 100644 +index 9f3d51c820c850737d4ce2489bbddeee08fb1792..bd5a98dfe75bcaf3a84a9ae4e96f35caa7848aa7 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc @@ -472,10 +472,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { diff --git a/patches/chromium/blink_world_context.patch b/patches/chromium/blink_world_context.patch index 5a281b64d5b85..d921b63080124 100644 --- a/patches/chromium/blink_world_context.patch +++ b/patches/chromium/blink_world_context.patch @@ -7,7 +7,7 @@ This exposes a method for obtaining a reference to an isolated world, which is otherwise not available in the Blink API. diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h -index 8a545fcae6275e77b4dcc422be52402b96ef9d1c..fb84aa2239222a1b1ed9ddd0dd4194e326758d37 100644 +index afbed9686b4fccd43991f16be15a261486c127b9..80398b633bed8cd7d04f1ecb44abc306131fa977 100644 --- a/third_party/blink/public/web/web_local_frame.h +++ b/third_party/blink/public/web/web_local_frame.h @@ -334,6 +334,9 @@ class WebLocalFrame : public WebFrame { @@ -21,10 +21,10 @@ index 8a545fcae6275e77b4dcc422be52402b96ef9d1c..fb84aa2239222a1b1ed9ddd0dd4194e3 // that the script evaluated to with callback. Script execution can be // suspend. diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -index 8944b0e99d757cbe3aac98af0d86ac386c62052b..a12d14bbc49e8f3f4034cb63377aa274a41f6ffd 100644 +index bef9aa2ebcebea5e57f67ac03a1b16f6b0bfaa97..5deb335845057b1fb4e051af91f926ffeb2dd270 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -@@ -924,6 +924,13 @@ v8::Local WebLocalFrameImpl::GlobalProxy() const { +@@ -925,6 +925,13 @@ v8::Local WebLocalFrameImpl::GlobalProxy() const { return MainWorldScriptContext()->Global(); } @@ -39,7 +39,7 @@ index 8944b0e99d757cbe3aac98af0d86ac386c62052b..a12d14bbc49e8f3f4034cb63377aa274 return BindingSecurity::ShouldAllowAccessToFrame( CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()), diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h -index 27ede2774376e2fa348be97c941ab6c6d0cba88f..9d787b5e62efdf7ac495f7ef230ce2eddc47d03d 100644 +index 7f031166c0e98c06a93b419e11e1b2b9989a8e4e..ca5eb27215f12d0c15d9cd4a5ecc121327977ba4 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h @@ -161,6 +161,8 @@ class CORE_EXPORT WebLocalFrameImpl final diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index 6e4a09e815b36..7f8268d5ac35a 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,10 +8,10 @@ categories in use are known / declared. This patch is required for us to introduce a new Electron category for Electron-specific tracing. diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index ac67c35bbcb0e8b73e2059c1dfd5b510235449c4..648c35ba8eae74e8264f6d0e2ac74785d31460ae 100644 +index e52d62b2c66c74e3876c68be92ed1c5c7b5ba43a..8da9bcc73e7b3fe6cb6d59656cfc523239642a96 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h -@@ -68,6 +68,7 @@ +@@ -74,6 +74,7 @@ X("dwrite") \ X("DXVA Decoding") \ X("EarlyJava") \ diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 180fcd104ed59..5da12f415480f 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -9,7 +9,7 @@ potentially prevent a window from being created. TODO(loc): this patch is currently broken. diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc -index d3aa739956bf04de6ad0882f04d030e2901ab80d..04debb0b15a068d6216ccd7e5295a417c18c8861 100644 +index 347f57759468c89583c6366e6f9769ea6e2c777a..a0183ecd4c85a4d4c1019a108311a1c3b4499d9a 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc @@ -4341,6 +4341,7 @@ void RenderFrameHostImpl::CreateNewWindow( @@ -21,10 +21,10 @@ index d3aa739956bf04de6ad0882f04d030e2901ab80d..04debb0b15a068d6216ccd7e5295a417 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index b93b364cc24369589a61da02ebed82207e04d658..2076b318c689a3998ca19c8393810d53d1d986d2 100644 +index d0401023f395e05a628b529275440b60731f56e1..724a39e7a7c6157583050a31e51e3a54c029cce2 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2946,9 +2946,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -2960,9 +2960,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( } if (delegate_) { diff --git a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch index a5b584e235b9a..d88c85fd88232 100644 --- a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch +++ b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch @@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from Electrons grit header instead of Chromes diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 0723a28167732c372ca567899d48363fb61e3ba2..b2b8bc688972369f52077a76e4e70cdb89314eb7 100644 +index 0530163fc4536e0153194209a0a1e8566f479fda..3f9ae0020ad07d5c56fa356a37e94e4be0d5f516 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -5317,6 +5317,7 @@ jumbo_static_library("browser") { +@@ -5304,6 +5304,7 @@ jumbo_static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", diff --git a/patches/chromium/crashpad_pid_check.patch b/patches/chromium/crashpad_pid_check.patch index 04406863ba842..666008c94197f 100644 --- a/patches/chromium/crashpad_pid_check.patch +++ b/patches/chromium/crashpad_pid_check.patch @@ -16,10 +16,10 @@ https://github.com/electron/electron/pull/18483#discussion_r292703588 https://github.com/electron/electron/pull/18483#issuecomment-501090683 diff --git a/third_party/crashpad/crashpad/util/win/exception_handler_server.cc b/third_party/crashpad/crashpad/util/win/exception_handler_server.cc -index 2593ff2de0327c393c30cae9962a329c5e27b64e..e89b8ff675bed2fa65263ea451d40995e0b010b7 100644 +index c841f7bc5c3d9962ea24664f26c6867ded529c7b..13218a598bbd4b51cd9a045879ee20b0491f8146 100644 --- a/third_party/crashpad/crashpad/util/win/exception_handler_server.cc +++ b/third_party/crashpad/crashpad/util/win/exception_handler_server.cc -@@ -448,9 +448,16 @@ bool ExceptionHandlerServer::ServiceClientConnection( +@@ -445,9 +445,16 @@ bool ExceptionHandlerServer::ServiceClientConnection( DWORD real_pid = 0; if (get_named_pipe_client_process_id(service_context.pipe(), &real_pid) && message.registration.client_process_id != real_pid) { diff --git a/patches/chromium/delay_lock_the_protocol_scheme_registry.patch b/patches/chromium/delay_lock_the_protocol_scheme_registry.patch index 486f897c12e9e..28ef44e8b868c 100644 --- a/patches/chromium/delay_lock_the_protocol_scheme_registry.patch +++ b/patches/chromium/delay_lock_the_protocol_scheme_registry.patch @@ -19,10 +19,10 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try re-submitting the patch. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index bb72915a26e298bdb81009248fb3fb4df7bddab5..00d991ad0183ec0c82d23633c86a3c0d7a6e6754 100644 +index 67d7e8e69d8a9b8b34b82b83bdf688df4c17ed59..9f6b797ea0489fc87b33a36bbcaae84a2cbf05f3 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -671,7 +671,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { +@@ -640,7 +640,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { } #endif @@ -32,7 +32,7 @@ index bb72915a26e298bdb81009248fb3fb4df7bddab5..00d991ad0183ec0c82d23633c86a3c0d #if !defined(OS_ANDROID) diff --git a/content/common/url_schemes.cc b/content/common/url_schemes.cc -index d0a31f2406ee5c0dcc1f49e09177c914e8602132..a46deedb27c6509afaad40563bb2cbf49777fe68 100644 +index c00901a2a4ef59a63033c6669171ec9e3ffd2686..d637b79d9df82ad44b1eed8529024a21e0b3555b 100644 --- a/content/common/url_schemes.cc +++ b/content/common/url_schemes.cc @@ -49,7 +49,7 @@ std::vector& GetMutableServiceWorkerSchemes() { @@ -44,7 +44,7 @@ index d0a31f2406ee5c0dcc1f49e09177c914e8602132..a46deedb27c6509afaad40563bb2cbf4 // On Android and in tests, schemes may have been registered already. if (g_registered_url_schemes) return; -@@ -104,7 +104,8 @@ void RegisterContentSchemes() { +@@ -105,7 +105,8 @@ void RegisterContentSchemes() { // threadsafe so must be called when GURL isn't used on any other thread. This // is really easy to mess up, so we say that all calls to Add*Scheme in Chrome // must be inside this function. @@ -68,10 +68,10 @@ index 3038f9d25798f36811b6398f8cc0e7d83ecc41b0..68189c36c47ef85b345b0ccc40c456f8 // Re-initializes schemes for tests. CONTENT_EXPORT void ReRegisterContentSchemesForTests(); diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc -index af1200a0f2e04c1582e527b609a2e89a97bb0f4c..7ab4cd4a1d8aefcb4bd90d68870f02f3edcff5a7 100644 +index 6c27d324e6235051875b88c4bc5bd362d3907f3c..06c17d6673d280fabf5b47244e7f7f7ab374f9a3 100644 --- a/content/public/app/content_main_delegate.cc +++ b/content/public/app/content_main_delegate.cc -@@ -40,6 +40,10 @@ int ContentMainDelegate::TerminateForFatalInitializationError() { +@@ -37,6 +37,10 @@ int ContentMainDelegate::TerminateForFatalInitializationError() { return 0; } diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index b25d58ed4f502..1d8a09d13eb57 100644 --- a/patches/chromium/disable-redraw-lock.patch +++ b/patches/chromium/disable-redraw-lock.patch @@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue can be found at https://github.com/electron/electron/issues/1821 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index d887bfd2e75be9c9f3d29a6ebf6d37abb639bc4d..f9cfb7b49bd8d5eeb4d88acd99c048d06b278ccf 100644 +index 0328f536a10de1ff4b6fd0a70c1b80c260aa7b87..2bb93842c74feb1d3f33d4589b7a75ceff8858ef 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -306,6 +306,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500; @@ -37,7 +37,7 @@ index d887bfd2e75be9c9f3d29a6ebf6d37abb639bc4d..f9cfb7b49bd8d5eeb4d88acd99c048d0 (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) || !ui::win::IsAeroGlassEnabled())) { if (should_lock_) -@@ -976,6 +981,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { +@@ -969,6 +974,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { return scoped_enable; } @@ -49,7 +49,7 @@ index d887bfd2e75be9c9f3d29a6ebf6d37abb639bc4d..f9cfb7b49bd8d5eeb4d88acd99c048d0 // HWNDMessageHandler, gfx::WindowImpl overrides: diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h -index 7b56d58faff84a72cc8cf9f77daeafdee110ce3a..d46ba47aaa31a0b893ab43e9f70dddbc48c5ea41 100644 +index 4da6edd086c9df20af7cdcb5c6020cd61166fbea..81b300c2533a3aaa6e0c343405a6040351061e27 100644 --- a/ui/views/win/hwnd_message_handler.h +++ b/ui/views/win/hwnd_message_handler.h @@ -203,6 +203,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl, diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 54281483d5d98..ebe5fe323ecd1 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -66,7 +66,7 @@ index cb69e08c0185f55497089505ed5b226e57140321..362f28accc248248f3bcb54955c23528 !command_line->HasSwitch(switches::kUIDisablePartialSwap); #if defined(OS_MACOSX) diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f7bb8a5c9 100644 +index 9dc031e83073d4a729667e95a8b63d3c59c1da84..b4c1440cd9d998d2f5fdba012684c8f1589566e8 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc @@ -84,6 +84,9 @@ @@ -79,7 +79,7 @@ index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f namespace viz { namespace { -@@ -588,8 +591,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, +@@ -589,8 +592,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) { SetBlendEnabled(quad->ShouldDrawWithBlending()); @@ -91,7 +91,7 @@ index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f // Use the full quad_rect for debug quads to not move the edges based on // partial swaps. -@@ -1547,7 +1551,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, +@@ -1563,7 +1567,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, params->use_color_matrix, tint_gl_composited_content_, params->apply_shader_based_rounded_corner && ShouldApplyRoundedCorner(params->quad)), @@ -101,7 +101,7 @@ index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f } void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) { -@@ -2018,7 +2023,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, +@@ -2034,7 +2039,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -111,7 +111,7 @@ index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f SetShaderColor(color, opacity); if (current_program_->rounded_corner_rect_location() != -1) { SetShaderRoundedCorner( -@@ -2173,7 +2179,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, +@@ -2189,7 +2195,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, : NON_PREMULTIPLIED_ALPHA, false, false, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -121,7 +121,7 @@ index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2269,7 +2276,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, +@@ -2285,7 +2292,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, !quad->ShouldDrawWithBlending(), has_tex_clamp_rect, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -131,7 +131,7 @@ index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2371,7 +2379,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, +@@ -2387,7 +2395,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, // The source color space should never be RGB. DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB()); @@ -141,7 +141,7 @@ index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f #if defined(OS_WIN) // Force sRGB output on Windows for overlay candidate video quads to match -@@ -2535,7 +2544,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, +@@ -2551,7 +2560,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, SetUseProgram(ProgramKey::VideoStream(tex_coord_precision, ShouldApplyRoundedCorner(quad)), @@ -151,7 +151,7 @@ index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id()); -@@ -2600,8 +2610,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { +@@ -2616,8 +2626,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR); // Bind the program to the GL state. @@ -162,7 +162,7 @@ index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f if (current_program_->rounded_corner_rect_location() != -1) { SetShaderRoundedCorner( -@@ -3340,7 +3350,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) { +@@ -3356,7 +3366,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) { void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, const gfx::ColorSpace& src_color_space, const gfx::ColorSpace& dst_color_space) { @@ -173,7 +173,7 @@ index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f // If the input color space is PQ, and it did not specify a white level, // override it with the frame's white level. -@@ -3722,9 +3734,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( +@@ -3738,9 +3750,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple); } @@ -186,7 +186,7 @@ index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f *new_bounds = gfx::RectF(updated_dst_rect.origin(), gfx::SizeF((*overlay_texture)->texture.size())); -@@ -3943,8 +3955,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { +@@ -3959,8 +3971,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { PrepareGeometry(SHARED_BINDING); @@ -197,7 +197,7 @@ index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f gfx::Transform render_matrix; render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(), -@@ -4053,3 +4065,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize( +@@ -4074,3 +4086,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize( } } // namespace viz @@ -216,7 +216,7 @@ index d47312d5f89939eab55cfa94bd3fbd41a4bd7d2a..da2f5e9fdc0fda37c82357a12f4fa28f service_manager::switches::kGpuSandboxAllowSysVShm, service_manager::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 1106c583146c5903fa8dc3868bd99061dbb88538..66d328457ed16d461bde3f316d3aef8e41e5efe3 100644 +index 495e90285de38991e43425023aeaa8437254857b..ec383524faa4ddf738c915d309d660440a095cc7 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -228,6 +228,7 @@ @@ -236,7 +236,7 @@ index 1106c583146c5903fa8dc3868bd99061dbb88538..66d328457ed16d461bde3f316d3aef8e service_manager::switches::kDisableInProcessStackTraces, service_manager::switches::kDisableSeccompFilterSandbox, diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc -index 754621e31a6a07e52f9b4609c8263b2c1a17c246..95006fe1f4d1fefb51c2311d6323332d7c176fd4 100644 +index 1f6ff811150998e2f307564e8aa1766056a9abbb..66bb6e241070965f42c6e9a2b8d24731acedd61e 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -2673,6 +2673,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 86c9fb563bd92..49676df0e1be8 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,7 +6,7 @@ Subject: fix: disabling compositor recycling Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index f293a15c6145422707c22aeb5a254ad71a31900c..472869202ff8a62d854c9ca39ca9f14e2f91e8cf 100644 +index 878837a454336afe177c3113062a1e8c8fff9076..17e3fe40522e088057eaf01a290b658a0b6d1d01 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -472,7 +472,11 @@ void RenderWidgetHostViewMac::WasOccluded() { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index a208910af58be..77a3df71ad6c4 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970 DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings); }; diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 95a9d94838debcb64993e0a2533769d96e38dc1d..a16bb8858da2160288db8e67a565869e6b6a13ee 100644 +index fa804e8f46ce96af4d9c1c2172220b0780729103..4e84b19cd515883f9dd1db4672ab1a3fccbf00f3 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1029,6 +1029,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1044,6 +1044,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index 95a9d94838debcb64993e0a2533769d96e38dc1d..a16bb8858da2160288db8e67a565869e // 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 fccf53cd1a7188685345764c599e16d85d8ee92b..6160cbb5f3e6d2fdcf1f205d84ca28283b6366ff 100644 +index b70111eda2ed582e2b81e0364c6e5fade743515b..2682dc391d23cb9fe568c182ed55cc43412d9a1c 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -236,6 +236,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -238,6 +238,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CloseIdleConnections(CloseIdleConnectionsCallback callback) override; void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override; @@ -63,10 +63,10 @@ index fccf53cd1a7188685345764c599e16d85d8ee92b..6160cbb5f3e6d2fdcf1f205d84ca2828 void SetEnableReferrers(bool enable_referrers) override; #if defined(OS_CHROMEOS) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 44b00a1fc341de0adba9a2c908a4ce248bc02805..a0d035ef7cbc701916ef0e10ce33ee62bae0777e 100644 +index 485960c69443533461da4f95d2e73995f604702f..45e920425345dd3cdb2427df5f60f6d8cc81e07a 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1015,6 +1015,9 @@ interface NetworkContext { +@@ -1021,6 +1021,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,10 +77,10 @@ index 44b00a1fc341de0adba9a2c908a4ce248bc02805..a0d035ef7cbc701916ef0e10ce33ee62 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index 51593e249f23f37d031bcfc98a44ea538eb13dbc..2b4f72aefd0389dee85e088ed75550e92becefb2 100644 +index 30463e8b23411ff7d2b0c8b2464959b2f3ae88c2..f86b16b57b5b032c4460357e8c2248e4cd632712 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -102,6 +102,7 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -104,6 +104,7 @@ class TestNetworkContext : public mojom::NetworkContext { void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {} void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override {} diff --git a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch index 8ebaae46568cd..d5992cd8a4cfa 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -94,7 +94,7 @@ index 1026b739d283f0fc252fa2af83a6d4cf51bc8553..fe562ab60ce98b8bb0c5080a6428deb3 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 596e298cb3209d5999ded58b87de037155d8681f..544f2d8452faf7b437a85a5a1f0e5311b1fcbac5 100644 +index 3af93631092dc191c314f378b89ab09a56b36b3a..bcb285ee09d7218098d748d422e6dbbdafbc4c6a 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -111,6 +111,8 @@ viz_component("service") { diff --git a/patches/chromium/fix_account_for_print_preview_disabled_when_printing_to_pdf.patch b/patches/chromium/fix_account_for_print_preview_disabled_when_printing_to_pdf.patch index 211af656fc36d..285ab051cf65e 100644 --- a/patches/chromium/fix_account_for_print_preview_disabled_when_printing_to_pdf.patch +++ b/patches/chromium/fix_account_for_print_preview_disabled_when_printing_to_pdf.patch @@ -10,10 +10,10 @@ understanding, it seems like we slightly misuse the print preview API and this is fallout from using it in a way the code doesn't expect. diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index da45fb0629424ec010cde2c2e403808633663e25..3394154814cf0c4433e12b6571d1a9a1fbe42de3 100644 +index 03fb6efb2296d6e21b0569afd471487c08f49e66..bc38eaf3819561a2271624b4c856f4a9e999f909 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -1462,6 +1462,7 @@ PrintRenderFrameHelper::CreatePreviewDocument() { +@@ -1458,6 +1458,7 @@ PrintRenderFrameHelper::CreatePreviewDocument() { const std::vector& pages = print_pages_params_->pages; bool require_document_metafile = diff --git a/patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch b/patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch index f1fd1ec90a09c..d6a7d5f2e0600 100644 --- a/patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch +++ b/patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch @@ -13,10 +13,10 @@ This patch can be removed once app.allowRendererProcessReuse is forced to true as then Chromiums assumptions around processes become correct. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 2076b318c689a3998ca19c8393810d53d1d986d2..1373d882c2286164c0368bb417cba903329c9f2c 100644 +index 724a39e7a7c6157583050a31e51e3a54c029cce2..0312eff770307ee7d66c8ef950a4992c07f56d8f 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2349,11 +2349,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { +@@ -2363,11 +2363,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { WebContentsImpl* outermost = GetOutermostWebContents(); if (event.button == blink::WebPointerProperties::Button::kBack && outermost->controller_.CanGoBack()) { diff --git a/patches/chromium/fix_undo_redo_broken_in_webviews.patch b/patches/chromium/fix_undo_redo_broken_in_webviews.patch index 91b9113407359..10469e555e8b8 100644 --- a/patches/chromium/fix_undo_redo_broken_in_webviews.patch +++ b/patches/chromium/fix_undo_redo_broken_in_webviews.patch @@ -9,7 +9,7 @@ that error. A crbug has been opened at https://bugs.chromium.org/p/chromium/issu and this patch will be removed when it has been resolved upstream. 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 472869202ff8a62d854c9ca39ca9f14e2f91e8cf..1be0ad4382c735b7dcb78715528148aa2ad2d2c1 100644 +index 17e3fe40522e088057eaf01a290b658a0b6d1d01..a573ff0b42f344aade85f2c62ac5fbfb251f36ef 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -38,6 +38,7 @@ diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index db7b1a0c9ce32..4949b97386d0e 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -71,10 +71,10 @@ index a43d6d6aaaabbe7ec911ab725ba71ff6f1b36c10..ae3dffb5ba9791b9d46c5939c04d7877 render_frame_host_ = frame_tree_node_->render_manager()->GetFrameHostForNavigation(this); diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc -index 6e8fdb4ebb0b99d8b36a18cef53c278c5053c9e6..03ebe91e06097d1055c52531bf41839143bbecfa 100644 +index 30d39b16e65dd1b099beb9f9e3cc72923fd6367d..18adc443deea3ab825c1541f9175c81e689b58f1 100644 --- a/content/browser/frame_host/render_frame_host_manager.cc +++ b/content/browser/frame_host/render_frame_host_manager.cc -@@ -2396,6 +2396,16 @@ bool RenderFrameHostManager::InitRenderView( +@@ -2392,6 +2392,16 @@ bool RenderFrameHostManager::InitRenderView( scoped_refptr RenderFrameHostManager::GetSiteInstanceForNavigationRequest( NavigationRequest* request) { @@ -91,7 +91,7 @@ index 6e8fdb4ebb0b99d8b36a18cef53c278c5053c9e6..03ebe91e06097d1055c52531bf418391 SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance(); // All children of MHTML documents must be MHTML documents. They all live in -@@ -2415,10 +2425,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2411,10 +2421,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( // // TODO(clamy): We should also consider as a candidate SiteInstance the // speculative SiteInstance that was computed on redirects. @@ -156,7 +156,7 @@ index 6e8fdb4ebb0b99d8b36a18cef53c278c5053c9e6..03ebe91e06097d1055c52531bf418391 // Account for renderer-initiated reload as well. // Needed as a workaround for https://crbug.com/1045524, remove it when it is -@@ -2461,6 +2521,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2457,6 +2517,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -270,7 +270,7 @@ index be343c7f4a9e412fbb7b43cc908b8bdcb12aa533..0321dca8ba52be7d5e51f14e2f5cf942 // implementations for the browser startup code. See comments in // browser_main_parts.h. diff --git a/content/public/browser/site_instance.h b/content/public/browser/site_instance.h -index e3095f34c057ccf25b46beb809fbb88a440cc230..9d4472415d87455468cff86217e7489d39383e4e 100644 +index 0a5aec6455a9337f806a9376d83935b60891109b..b57294b1e19ce7a96aae05c23ab42190f35ae780 100644 --- a/content/public/browser/site_instance.h +++ b/content/public/browser/site_instance.h @@ -121,6 +121,11 @@ class CONTENT_EXPORT SiteInstance : public base::RefCounted { diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index 169f4cb1d447a..4e6e782196f76 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -12,14 +12,14 @@ rendering and there is no signal from browser process on this event to identify it. diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc -index db9780a6c0b679354a5f74b1f89e32a8ff9dd2e3..0fc50588e4776939093fb79b346ac032bf17b237 100644 +index 80fd68b4b862e59ba255163f3a903846a7768d75..ced78998277f37b4b8d656d264f389b5f47ddb1c 100644 --- a/content/browser/gpu/gpu_data_manager_impl.cc +++ b/content/browser/gpu/gpu_data_manager_impl.cc -@@ -165,6 +165,11 @@ void GpuDataManagerImpl::OnBrowserThreadsStarted() { +@@ -170,6 +170,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() { base::AutoLock auto_lock(lock_); - private_->OnBrowserThreadsStarted(); + private_->TerminateInfoCollectionGpuProcess(); } -+ ++ +bool GpuDataManagerImpl::DxdiagDx12VulkanRequested() const { + base::AutoLock auto_lock(lock_); + return private_->DxdiagDx12VulkanRequested(); @@ -28,23 +28,23 @@ index db9780a6c0b679354a5f74b1f89e32a8ff9dd2e3..0fc50588e4776939093fb79b346ac032 void GpuDataManagerImpl::UpdateGpuFeatureInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h -index d5595c91f4d63362e575ad31070335ee344261fa..986d21000988aa0880bac3f0a58003257f1a3ad3 100644 +index ce8f9551f1b17c7508a0e0bd0ecc55eca2c0ac6e..2e71ce71ff9f18e2fc68f51ddbeedc3901f3dc7c 100644 --- a/content/browser/gpu/gpu_data_manager_impl.h +++ b/content/browser/gpu/gpu_data_manager_impl.h -@@ -92,6 +92,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, - bool Dx12VulkanRequested() const; +@@ -93,6 +93,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, // Called from BrowserMainLoop::BrowserThreadsStarted(). void OnBrowserThreadsStarted(); + void TerminateInfoCollectionGpuProcess(); + bool DxdiagDx12VulkanRequested() const; #endif // Update the GPU feature info. This updates the blacklist and enabled status // of GPU rasterization. In the future this will be used for more features. diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc -index aae01a85f5d37d4c8e809815540662dee1550dbc..ee05d2fb8524664d2e989779201a670a201dd8bb 100644 +index b09b8ffe7684f511e971d0c470c8b67a46288b6e..f41734cc66d7ee71509a66effec76be3797b00d6 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -896,6 +896,10 @@ void GpuDataManagerImplPrivate::OnBrowserThreadsStarted() { - display::Screen::GetScreen()->AddObserver(owner_); +@@ -923,6 +923,10 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { + host->ForceShutdown(); } +bool GpuDataManagerImplPrivate::DxdiagDx12VulkanRequested() const { @@ -55,13 +55,13 @@ index aae01a85f5d37d4c8e809815540662dee1550dbc..ee05d2fb8524664d2e989779201a670a void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h -index 6a082f73e77d9f5e7630cc4dbc18188c7e565c0b..d880de03d168908f2f7d4bc0c65e18e283de0005 100644 +index 37c11fa98c30d2ab0455e550847c9dbecc327304..082a2062107d4baed74ea3ea77d0c33295e3eac8 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.h +++ b/content/browser/gpu/gpu_data_manager_impl_private.h -@@ -71,6 +71,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { - void UpdateDxDiagNodeRequestStatus(bool request_continues); +@@ -72,6 +72,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { bool Dx12VulkanRequested() const; void OnBrowserThreadsStarted(); + void TerminateInfoCollectionGpuProcess(); + bool DxdiagDx12VulkanRequested() const; #endif void UpdateGpuFeatureInfo(const gpu::GpuFeatureInfo& gpu_feature_info, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index 21a84d7ae26c4..14738678e1e74 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -6,10 +6,10 @@ Subject: gtk_visibility.patch Allow electron to depend on GTK in the GN build. diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn -index 9249f88e3234d0c11fe870169fc3fe8ce3c00ff1..7c4261f06c74f13d29b4cb2d2e3c047bf319b7f0 100644 +index a73160222398b0beb02a8f2c7f2e2f05a1b6e339..5a9ca1ca4f96a2a106eab3d92224a67d1620134f 100644 --- a/build/config/linux/gtk/BUILD.gn +++ b/build/config/linux/gtk/BUILD.gn -@@ -28,6 +28,8 @@ group("gtk") { +@@ -29,6 +29,8 @@ group("gtk") { # This should probably be moved into //ui/gtk. "//ui/ozone/platform/wayland", diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index ba409711da86a..11878b98e124f 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -117,7 +117,7 @@ index 0d8a8e14328be49407d35908bacadd92182dae31..86602419d16667ff002333f848abcd77 // 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 6c8313f7e09be253528ca83727b78152a17229c8..f293a15c6145422707c22aeb5a254ad71a31900c 100644 +index 359c792b2586756b6e195eaa0b61e426edbe764d..878837a454336afe177c3113062a1e8c8fff9076 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -231,8 +231,10 @@ RenderWidgetHostViewMac::~RenderWidgetHostViewMac() { 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 54500017ca606..e1e42f30c3a4e 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 65fcd744438548f65cbefc0278164f7efb244394..95a9d94838debcb64993e0a2533769d96e38dc1d 100644 +index 78978462eaaa607883e3368e81924a18b1bc876f..fa804e8f46ce96af4d9c1c2172220b0780729103 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -106,6 +106,11 @@ @@ -116,7 +116,7 @@ index 65fcd744438548f65cbefc0278164f7efb244394..95a9d94838debcb64993e0a2533769d9 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -1701,6 +1786,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1716,6 +1801,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { base::CommandLine::ForCurrentProcess(); std::unique_ptr cert_verifier; @@ -124,7 +124,7 @@ index 65fcd744438548f65cbefc0278164f7efb244394..95a9d94838debcb64993e0a2533769d9 if (g_cert_verifier_for_testing) { cert_verifier = std::make_unique(); } else { -@@ -1749,8 +1835,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1764,8 +1850,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { } #endif #if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) @@ -135,7 +135,7 @@ index 65fcd744438548f65cbefc0278164f7efb244394..95a9d94838debcb64993e0a2533769d9 std::make_unique( std::make_unique( UsingBuiltinCertVerifier(params_->use_builtin_cert_verifier) -@@ -1760,12 +1846,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1775,12 +1861,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { cert_net_fetcher_)))); } #endif @@ -160,7 +160,7 @@ index 65fcd744438548f65cbefc0278164f7efb244394..95a9d94838debcb64993e0a2533769d9 std::unique_ptr network_delegate = std::make_unique( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 1c1446dae8e341c9440ea90ca2d997535cd490c1..fccf53cd1a7188685345764c599e16d85d8ee92b 100644 +index bdda02b62c129116af89334056e5ae7da85f0636..b70111eda2ed582e2b81e0364c6e5fade743515b 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -84,6 +84,7 @@ class DomainReliabilityMonitor; @@ -180,7 +180,7 @@ index 1c1446dae8e341c9440ea90ca2d997535cd490c1..fccf53cd1a7188685345764c599e16d8 void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -652,6 +655,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -654,6 +657,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::unique_ptr nss_temp_certs_cache_; #endif @@ -190,7 +190,7 @@ index 1c1446dae8e341c9440ea90ca2d997535cd490c1..fccf53cd1a7188685345764c599e16d8 // CertNetFetcher is not used by the current platform. scoped_refptr cert_net_fetcher_; diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 02675e0ce69f815cbd59349dc5ef5ae6535b829b..44b00a1fc341de0adba9a2c908a4ce248bc02805 100644 +index cb96bae3601876f0447b668d335ddc8dbe76c3e3..485960c69443533461da4f95d2e73995f604702f 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -161,6 +161,17 @@ struct HttpAuthStaticNetworkContextParams { diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 4f978d2b223a6..f8ad2e8e066c0 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -108,7 +108,7 @@ index 4bf25bf1fa69f7d3869369172d375e2e489e62a1..f80ef2cecc8b111dc54e109646573a59 mojo::PendingReceiver receiver); diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index f1443f39284113392e268fa657b47b51429368a1..3ed28b408733a6ad2609336fbf635e3d68bac66b 100644 +index 40ef859ab14696de3e028256446bb1e5327ac4bc..5300930629a7a5741c0962f6bf6a1fca9a7a3976 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -2108,7 +2108,7 @@ void RenderProcessHostImpl::CreateNotificationService( diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index b801f48166161..78bafe9dc0e4f 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -288,7 +288,7 @@ index 3d434244927aca5e5dbec8d7c1cd212c5c260c71..9d62c903bf08fa8cfa8c425d430c5e99 // This means we are _blocking_ until all the necessary pages have been // rendered or the print settings are being loaded. diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc -index 40762a36024bc48dfe5259520161dc203197bfd0..e38aa442df858ce362645230f7642b2eb48262ce 100644 +index d105aae9c8b949d2fe910467dd9a5209229b3592..4ac32e0306d75533e3a091cb512aa8d8f44757e3 100644 --- a/chrome/browser/printing/printing_message_filter.cc +++ b/chrome/browser/printing/printing_message_filter.cc @@ -22,6 +22,7 @@ @@ -332,7 +332,7 @@ index 40762a36024bc48dfe5259520161dc203197bfd0..e38aa442df858ce362645230f7642b2e DCHECK_CURRENTLY_ON(BrowserThread::IO); +#if 0 if (!is_printing_enabled_.GetValue()) { - // Reply with NULL query. + // Reply with null query. OnGetDefaultPrintSettingsReply(nullptr, reply_msg); return; } @@ -340,21 +340,22 @@ index 40762a36024bc48dfe5259520161dc203197bfd0..e38aa442df858ce362645230f7642b2e std::unique_ptr printer_query = queue_->PopPrinterQuery(0); if (!printer_query) { printer_query = -@@ -228,11 +234,13 @@ void PrintingMessageFilter::OnScriptedPrintReply( +@@ -228,12 +234,13 @@ void PrintingMessageFilter::OnScriptedPrintReply( void PrintingMessageFilter::OnUpdatePrintSettings(int document_cookie, base::Value job_settings, IPC::Message* reply_msg) { +#if 0 if (!is_printing_enabled_.GetValue()) { - // Reply with NULL query. + // Reply with null query. OnUpdatePrintSettingsReply(nullptr, reply_msg); return; } +- +#endif - std::unique_ptr printer_query = - queue_->PopPrinterQuery(document_cookie); - if (!printer_query) { -@@ -258,7 +266,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( + if (!job_settings.is_dict() || + !job_settings.FindIntKey(kSettingPrinterType)) { + // Reply with null query. +@@ -266,7 +273,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( std::unique_ptr printer_query, IPC::Message* reply_msg) { PrintMsg_PrintPages_Params params; @@ -365,7 +366,7 @@ index 40762a36024bc48dfe5259520161dc203197bfd0..e38aa442df858ce362645230f7642b2e params.Reset(); } else { RenderParamsFromPrintSettings(printer_query->settings(), ¶ms.params); -@@ -296,7 +306,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( +@@ -304,7 +313,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintingMessageFilter::OnCheckForCancel(const PrintHostMsg_PreviewIds& ids, bool* cancel) { @@ -413,7 +414,7 @@ index 3695656560c54b5aa1fb08fb5e7c17d54989c597..85ffa5704d8dea809e80b1993c7c852f // Tells the RenderFrame to switch the CSS to print media type, render every // requested page using the print preview document's frame/node, and then diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 214893c680526d62091c0aabde6b481219e9d62e..da45fb0629424ec010cde2c2e403808633663e25 100644 +index 8e51567398aef2275236e962a71bce5e2ddb9c58..03fb6efb2296d6e21b0569afd471487c08f49e66 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -40,6 +40,7 @@ @@ -470,7 +471,7 @@ index 214893c680526d62091c0aabde6b481219e9d62e..da45fb0629424ec010cde2c2e4038086 print_preview_context_.OnPrintPreview(); base::UmaHistogramEnumeration(print_preview_context_.IsForArc() -@@ -1743,7 +1747,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1733,7 +1737,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { auto self = weak_ptr_factory_.GetWeakPtr(); Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -481,7 +482,7 @@ index 214893c680526d62091c0aabde6b481219e9d62e..da45fb0629424ec010cde2c2e4038086 // Check if |this| is still valid. if (!self) return; -@@ -1754,7 +1760,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1744,7 +1750,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -492,7 +493,7 @@ index 214893c680526d62091c0aabde6b481219e9d62e..da45fb0629424ec010cde2c2e4038086 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1762,7 +1770,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1752,7 +1760,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); int expected_page_count = 0; @@ -501,7 +502,7 @@ index 214893c680526d62091c0aabde6b481219e9d62e..da45fb0629424ec010cde2c2e4038086 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1782,8 +1790,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1772,8 +1780,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, PrintMsg_PrintPages_Params print_settings; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -515,7 +516,7 @@ index 214893c680526d62091c0aabde6b481219e9d62e..da45fb0629424ec010cde2c2e4038086 // Check if |this| is still valid. if (!self) return; -@@ -2018,10 +2029,23 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2008,10 +2019,23 @@ void PrintRenderFrameHelper::IPCProcessed() { base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); } @@ -542,7 +543,7 @@ index 214893c680526d62091c0aabde6b481219e9d62e..da45fb0629424ec010cde2c2e4038086 // Check if the printer returned any settings, if the settings is empty, we // can safely assume there are no printer drivers configured. So we safely // terminate. -@@ -2041,12 +2065,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { +@@ -2031,12 +2055,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { return result; } diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 6613c5c30f94c..25271848da363 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 d113eedf7afc704b0c2e8d112413e3bd7c58d8c7..fcd838d69b23e6799702353a551a0a7ac5c4ae15 100644 +index 4d66277281addea7a42e3c29682193fda92382c4..284704829f490a1cd2375a3b4609c326deb85ac0 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1470,7 +1470,7 @@ if (is_chrome_branded && !is_android) { +@@ -1369,7 +1369,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index d113eedf7afc704b0c2e8d112413e3bd7c58d8c7..fcd838d69b23e6799702353a551a0a7a chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1490,6 +1490,12 @@ if (!is_android) { +@@ -1389,6 +1389,12 @@ if (!is_android) { } } diff --git a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch index 00032f841f467..3b34090a4755e 100644 --- a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch +++ b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch @@ -9,10 +9,10 @@ for every navigation to keep Node.js working properly. Once Native Modules in th are required to be NAPI or context aware (Electron v11), this patch can be removed. diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc -index 6dd8726c5576ec23e4966f564d07f5df59e30ff5..adca28e96b974536bc1ad8791c80ef6e25747c29 100644 +index a513a74fa4f5f022b5fb269560953c3f0dd6a6d5..4569b87200227a889c10dfc4f4c337eab5b46950 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -1281,6 +1281,25 @@ bool ChromeContentRendererClient::AllowPopup() { +@@ -1288,6 +1288,25 @@ bool ChromeContentRendererClient::AllowPopup() { #endif } diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index c9d96ed861352..6e77ffe9f96a8 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,7 +22,7 @@ However, the patch would need to be reviewed by the security team, as it does touch a security-sensitive class. diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 3ed28b408733a6ad2609336fbf635e3d68bac66b..1106c583146c5903fa8dc3868bd99061dbb88538 100644 +index 5300930629a7a5741c0962f6bf6a1fca9a7a3976..495e90285de38991e43425023aeaa8437254857b 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -414,6 +414,11 @@ class RendererSandboxedProcessLauncherDelegate diff --git a/patches/chromium/ui_gtk_public_header.patch b/patches/chromium/ui_gtk_public_header.patch index ca1822005629c..7a71856c95c8a 100644 --- a/patches/chromium/ui_gtk_public_header.patch +++ b/patches/chromium/ui_gtk_public_header.patch @@ -6,7 +6,7 @@ Subject: ui_gtk_public_header.patch Allow electron to depend on //ui/gtk/gtk_util.h diff --git a/ui/gtk/BUILD.gn b/ui/gtk/BUILD.gn -index 2dd67393ec469b9c75761d98e729818453b6ce6b..53fc63acd371eb2efd77e9f50d60ce52b0436b59 100644 +index be7a538b84318339c61d25e61a196222cfbf848a..8c8ac2559e44b1d00e29f5ba6f95ae6c40bd8296 100644 --- a/ui/gtk/BUILD.gn +++ b/ui/gtk/BUILD.gn @@ -22,13 +22,15 @@ component("gtk_ui_delegate") { diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 87d9e2bc56b7e..32e4359522375 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 1373d882c2286164c0368bb417cba903329c9f2c..5eb25e36aa7b0fe78c7e34fa5556743aca9e192f 100644 +index 0312eff770307ee7d66c8ef950a4992c07f56d8f..55d8d11648ac7ac912f9c0f805d82bc908f1fe60 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2070,6 +2070,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2084,6 +2084,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -25,7 +25,7 @@ index 1373d882c2286164c0368bb417cba903329c9f2c..5eb25e36aa7b0fe78c7e34fa5556743a WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2080,6 +2086,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2094,6 +2100,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } diff --git a/patches/v8/add_realloc.patch b/patches/v8/add_realloc.patch index 85f5715d6840e..57d1ebc83bd01 100644 --- a/patches/v8/add_realloc.patch +++ b/patches/v8/add_realloc.patch @@ -12,7 +12,7 @@ when we override ReallocateBufferMemory, so we therefore need to implement Realloc on the v8 side. diff --git a/include/v8.h b/include/v8.h -index 800fc0da241b50d7a6629a1839f1aa1029e42d5b..94b7004c7d26764a598ade2d0e454e049167849d 100644 +index 9a8f0c4816a92b726ac218ef80dd3ec7e5e5eca1..7d1b860e9ff239e89f9dfc6166b8ec9f82d6f6f2 100644 --- a/include/v8.h +++ b/include/v8.h @@ -5041,6 +5041,13 @@ class V8_EXPORT ArrayBuffer : public Object { @@ -30,7 +30,7 @@ index 800fc0da241b50d7a6629a1839f1aa1029e42d5b..94b7004c7d26764a598ade2d0e454e04 * Free the memory block of size |length|, pointed to by |data|. * That memory is guaranteed to be previously allocated by |Allocate|. diff --git a/src/api/api.cc b/src/api/api.cc -index af686ca8c59d4b6ede00a78e542039b73f3ab363..ec522a513240c3fc2cbd28c0ff5dd52c420ca944 100644 +index 17bf01ed4b8f4c1a0b87e172ac4b4f2439bf5840..9ef98523dacc94c5288ffc58477678545fcf4d1c 100644 --- a/src/api/api.cc +++ b/src/api/api.cc @@ -528,6 +528,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 3a4c3d7a48520..0d2268018d08e 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,11 +9,11 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index 912ea284c9b30b2ae5b123e6dec0b07b0c8b4b1e..99b96d05ade62564762fa58200778d91b2c885b2 100644 +index b88d6ae937683ee39d73a208e98c8218dbfba32e..212ee5494fb7c05e616af1c2f42159151c2a18f8 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -311,7 +311,7 @@ config("internal_config") { - ":v8_tracing_config", +@@ -315,7 +315,7 @@ config("internal_config") { + ":v8_header_features", ] - if (is_component_build) { @@ -21,7 +21,7 @@ index 912ea284c9b30b2ae5b123e6dec0b07b0c8b4b1e..99b96d05ade62564762fa58200778d91 defines += [ "BUILDING_V8_SHARED" ] } } -@@ -4081,7 +4081,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -4131,7 +4131,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index 912ea284c9b30b2ae5b123e6dec0b07b0c8b4b1e..99b96d05ade62564762fa58200778d91 deps = [ ":v8_libbase", -@@ -4114,6 +4114,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -4164,6 +4164,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 6352a00473631..61da5f6bb3c79 100644 --- a/patches/v8/dcheck.patch +++ b/patches/v8/dcheck.patch @@ -6,10 +6,10 @@ Subject: dcheck.patch https://github.com/auchenberg/volkswagen diff --git a/src/api/api.cc b/src/api/api.cc -index ec522a513240c3fc2cbd28c0ff5dd52c420ca944..e630fa81eb510a45f8352fd2024f66f65e9d3573 100644 +index 9ef98523dacc94c5288ffc58477678545fcf4d1c..72e2034bb6d0ae1f4ef825a87f8c69d18d9c9bd6 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -8732,7 +8732,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -8726,7 +8726,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index ec522a513240c3fc2cbd28c0ff5dd52c420ca944..e630fa81eb510a45f8352fd2024f66f6 isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index 995ee61f42d436c6cd114575c15f96f18458f352..976b9f4c9cfb9330823088b973206e187e114b40 100644 +index a1b15694c01aa3d5da9c18f01b038d9eb9a19bb6..9b20209255a624451cda111826c75169b6abfcc3 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -5489,9 +5489,9 @@ void Heap::TearDown() { +@@ -5511,9 +5511,9 @@ void Heap::TearDown() { void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback, GCType gc_type, void* data) { DCHECK_NOT_NULL(callback); diff --git a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch index 3fb004896f96f..54d50f3450677 100644 --- a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch +++ b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch @@ -12,11 +12,11 @@ This patch can be safely removed if, when it is removed, `node.lib` does not contain any standard C++ library exports (e.g. `std::ostringstream`). diff --git a/BUILD.gn b/BUILD.gn -index 7a49655f43afc236641e033c8a3f2d2e91d956e1..a67b95e844a84c4ed1582eca6bb7c9c2d21b0cb4 100644 +index 44702bd7f08ff311841f514a7fc1ee7d970317cd..f6718a94ad391adb53bc60b425d27834de9bd964 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -311,6 +311,10 @@ config("internal_config") { - ":v8_tracing_config", +@@ -315,6 +315,10 @@ config("internal_config") { + ":v8_header_features", ] + if (!is_component_build && is_electron_build) { diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index 42edeaf83c686..75c2290182eca 100644 --- a/patches/v8/expose_mksnapshot.patch +++ b/patches/v8/expose_mksnapshot.patch @@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch Needed in order to target mksnapshot for mksnapshot zip. diff --git a/BUILD.gn b/BUILD.gn -index 99b96d05ade62564762fa58200778d91b2c885b2..7a49655f43afc236641e033c8a3f2d2e91d956e1 100644 +index 212ee5494fb7c05e616af1c2f42159151c2a18f8..44702bd7f08ff311841f514a7fc1ee7d970317cd 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -4092,7 +4092,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -4142,7 +4142,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/shell/browser/api/electron_api_cookies.cc b/shell/browser/api/electron_api_cookies.cc index 3d17495543bb3..a85de3555bb6c 100644 --- a/shell/browser/api/electron_api_cookies.cc +++ b/shell/browser/api/electron_api_cookies.cc @@ -338,7 +338,7 @@ v8::Local Cookies::Set(v8::Isolate* isolate, content::BrowserContext::GetDefaultStoragePartition(browser_context_); auto* manager = storage_partition->GetCookieManagerForBrowserProcess(); manager->SetCanonicalCookie( - *canonical_cookie, url.scheme(), options, + *canonical_cookie, url, options, base::BindOnce( [](gin_helper::Promise promise, net::CanonicalCookie::CookieInclusionStatus status) { diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 22339a1ae908a..b65096d368ad3 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -2299,7 +2299,8 @@ void WebContents::SendInputEvent(v8::Isolate* isolate, // Chromium expects phase info in wheel events (and applies a // DCHECK to verify it). See: https://crbug.com/756524. mouse_wheel_event.phase = blink::WebMouseWheelEvent::kPhaseBegan; - mouse_wheel_event.dispatch_type = blink::WebInputEvent::kBlocking; + mouse_wheel_event.dispatch_type = + blink::WebInputEvent::DispatchType::kBlocking; rwh->ForwardWheelEvent(mouse_wheel_event); // Send a synthetic wheel event with phaseEnded to finish scrolling. @@ -2308,7 +2309,7 @@ void WebContents::SendInputEvent(v8::Isolate* isolate, mouse_wheel_event.delta_y = 0; mouse_wheel_event.phase = blink::WebMouseWheelEvent::kPhaseEnded; mouse_wheel_event.dispatch_type = - blink::WebInputEvent::kEventNonBlocking; + blink::WebInputEvent::DispatchType::kEventNonBlocking; rwh->ForwardWheelEvent(mouse_wheel_event); } return; diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index aaff6d4e955c1..eeeb48a18ace2 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -70,8 +70,8 @@ #include "ui/gfx/x/x11_types.h" #include "ui/gtk/gtk_ui.h" #include "ui/gtk/gtk_ui_delegate.h" -#include "ui/gtk/gtk_ui_delegate_x11.h" #include "ui/gtk/gtk_util.h" +#include "ui/gtk/x/gtk_ui_delegate_x11.h" #include "ui/views/linux_ui/linux_ui.h" #endif