From 62da00e5c56832ea3bb673010749a76e62f8322c Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Wed, 11 Mar 2020 04:15:07 -0700 Subject: [PATCH] chore: bump chromium to 31b4a223e6e2bd9d5ce6c37cbdec6 (master) (#22514) * chore: bump chromium in DEPS to 7f366dc6e2f06228b12b021cc1486a1de81a257d * chore: bump chromium in DEPS to d785c1a601f5f33627d23e40b1ed9dd94c63d818 * update patches * Rename an old referrer policy value https://chromium-review.googlesource.com/c/chromium/src/+/2082856 * chore: bump chromium in DEPS to 735e0d2910b2e55c15e0b9cb9fca9431307ac661 * update v8 patches * Update DEPS * update patches * chore: bump chromium in DEPS to b3d09c15c4460680b85218b7b0eb0849c5a6e840 * Replace blink::WebCursorInfo with ui::Cursor https://chromium-review.googlesource.com/c/chromium/src/+/1997138 * chore: bump chromium in DEPS to bf433ad6dcfcaac460512bb45a53d5a2ea5356f9 * chore: bump chromium in DEPS to 38fad190ac908b6977ab271acc82c2fe74f6e85e * chore: bump chromium in DEPS to aa597178119cb37ab54caeda27b2ef30a2f9a003 * update patches * DownloadURLParameters: Remove NetworkIsolationKey parameter. https://chromium-review.googlesource.com/c/chromium/src/+/2050987 * fix pdf viewer tests by binding more mojo things * chore: bump chromium in DEPS to 08835601be331b4a223e6e2bd9d5ce6c37cbdec6 Co-authored-by: Jeremy Apthorp Co-authored-by: Jeremy Apthorp --- DEPS | 2 +- .../add_didinstallconditionalfeatures.patch | 28 +++++++------- patches/chromium/add_realloc.patch | 2 +- ...rustedauthclient_to_urlloaderfactory.patch | 34 ++++++++--------- patches/chromium/blink_local_frame.patch | 6 +-- patches/chromium/blink_world_context.patch | 8 ++-- .../build_add_electron_tracing_category.patch | 2 +- patches/chromium/can_create_window.patch | 18 ++++----- ...esources_not_chrome_for_spellchecker.patch | 4 +- patches/chromium/dcheck.patch | 2 +- ...ay_lock_the_protocol_scheme_registry.patch | 2 +- patches/chromium/disable-redraw-lock.patch | 4 +- .../disable_color_correct_rendering.patch | 10 ++--- patches/chromium/disable_hidden.patch | 2 +- ...requirement_for_beforeunload_dialogs.patch | 4 +- ...xpose_setuseragent_on_networkcontext.patch | 8 ++-- ...dd_set_theme_source_to_allow_apps_to.patch | 18 ++++----- ..._scheduler_throttling_per_renderview.patch | 36 +++++++++--------- ...screen_rendering_with_viz_compositor.patch | 6 +-- ...ns_through_the_web_contents_delegate.patch | 4 +- patches/chromium/fixme_grit_conflicts.patch | 4 +- patches/chromium/frame_host_manager.patch | 16 ++++---- .../gin_enable_disable_v8_platform.patch | 2 +- .../chromium/gritsettings_resource_ids.patch | 4 +- .../mas-cgdisplayusesforcetogray.patch | 4 +- patches/chromium/mas_no_private_api.patch | 36 +++++++++--------- ...emote_certificate_verification_logic.patch | 18 ++++----- .../chromium/notification_provenance.patch | 2 +- patches/chromium/printing.patch | 30 +++++++-------- ...put_back_deleted_colors_for_autofill.patch | 38 +++++++++---------- patches/chromium/resource_file_conflict.patch | 6 +-- ...ove_contentrendererclient_shouldfork.patch | 14 +++---- patches/chromium/scroll_bounce_flag.patch | 2 +- .../support_mixed_sandbox_with_zygote.patch | 2 +- ...andboxed_ppapi_processes_skip_zygote.patch | 2 +- patches/chromium/web_contents.patch | 8 ++-- .../worker_context_will_destroy.patch | 16 ++++---- 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 +-- ...ort_symbols_needed_for_windows_build.patch | 6 +-- patches/v8/expose_mksnapshot.patch | 4 +- shell/browser/api/electron_api_session.cc | 2 +- .../browser/api/electron_api_web_contents.cc | 2 +- shell/browser/electron_browser_client.cc | 37 ++++++++++++++++++ .../electron_extensions_browser_client.cc | 5 ++- .../common/gin_converters/blink_converter.cc | 6 +-- 48 files changed, 266 insertions(+), 228 deletions(-) diff --git a/DEPS b/DEPS index b668a02610dd..2c1ccdc7d0bc 100644 --- a/DEPS +++ b/DEPS @@ -12,7 +12,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '7178455852d5b340c815ce15ab2efcf277ed19e9', + '08835601be331b4a223e6e2bd9d5ce6c37cbdec6', 'node_version': 'v12.16.1', 'nan_version': diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 1ec4eee6b450..941fb6327b19 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index 156ba739a984347135857f8019fda0bfb01c97ad..f4093e9bb8b54d82c6d70375977c0ad9 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index faa3a77cb545114d9fd8f772d869ba822ad72386..61db7a2e08d5b88587fcd6a0d9ee43027a3f2bf6 100644 +index 7e8d6a291531a29e436573109ae2a3ba08452947..61e62d5e08d457f5a60ea41872628a6b4d1e950c 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4919,6 +4919,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4913,6 +4913,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index faa3a77cb545114d9fd8f772d869ba822ad72386..61db7a2e08d5b88587fcd6a0d9ee4302 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 57092be996f10ca650cd291be30b45a2a950d159..1c60c1f7075c622137ab2847c8166fb466be8533 100644 +index 36fc6b7baa10b3595b04cf88757fde6d0c70c30e..8dc772e92fe667521b5b41b652cf266b8d0c318c 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -748,6 +748,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -747,6 +747,8 @@ class CONTENT_EXPORT RenderFrameImpl bool ShouldTrackUseCounter(const blink::WebURL& url) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -53,10 +53,10 @@ index 57092be996f10ca650cd291be30b45a2a950d159..1c60c1f7075c622137ab2847c8166fb4 int world_id) override; void DidChangeScrollOffset() override; diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h -index 643b63d2ed90362ed615d8003ac02bbba606c5ef..b33fcc64464d5d57177794146854abf6dea627b1 100644 +index cee72cbe2a0a48dce51cbf7e9ba14a1b326afb6b..f73db341765f68b7b9fac043e070ef02227173c2 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -555,6 +555,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -548,6 +548,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -79,10 +79,10 @@ index d20d24c0ba6025af06f5f61cefd3e96e687c123d..c6cb7af9c2ec7e812954b7725f8506c1 if (World().IsMainWorld()) { GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld(); diff --git a/third_party/blink/renderer/core/exported/local_frame_client_impl.cc b/third_party/blink/renderer/core/exported/local_frame_client_impl.cc -index 40422650f8bc6b23d92ac670322585441a147446..e0a3f69ca2a19fdb5860ab6a0d2d4a978d5b699f 100644 +index de09295b42b4d7365e2873f72605393c4130258a..8717708fa9e55f7762c8a1602fccf85a6e8291c4 100644 --- a/third_party/blink/renderer/core/exported/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/exported/local_frame_client_impl.cc -@@ -348,6 +348,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( +@@ -343,6 +343,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( web_frame_->Client()->DidCreateScriptContext(context, world_id); } @@ -97,10 +97,10 @@ index 40422650f8bc6b23d92ac670322585441a147446..e0a3f69ca2a19fdb5860ab6a0d2d4a97 v8::Local context, int32_t world_id) { diff --git a/third_party/blink/renderer/core/exported/local_frame_client_impl.h b/third_party/blink/renderer/core/exported/local_frame_client_impl.h -index 835b91bc46f1b2b0d0d4dbfafaa42c1ce9d6a6ca..b067640f61ed836db62d30b05f379f4aa0b93f82 100644 +index eb40ab259bab5cbec42d153ad6de26a45781210f..5b18acb942fe1d106a63d045263df38c7d8fe58c 100644 --- a/third_party/blink/renderer/core/exported/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/exported/local_frame_client_impl.h -@@ -80,6 +80,8 @@ class LocalFrameClientImpl final : public LocalFrameClient { +@@ -78,6 +78,8 @@ class LocalFrameClientImpl final : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override; @@ -110,10 +110,10 @@ index 835b91bc46f1b2b0d0d4dbfafaa42c1ce9d6a6ca..b067640f61ed836db62d30b05f379f4a int32_t world_id) override; 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 c30c58b1ff71cb3a80412143c55e2e67f2ab43ec..f7089b126b5aa35bcc65a6312ed21075c916781c 100644 +index d6e4924bd04c826a91e717c16382c5519d9ddd39..bcf83d016368d6fa6fc763b835e5dd318d9c1785 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -289,6 +289,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -286,6 +286,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -123,10 +123,10 @@ index c30c58b1ff71cb3a80412143c55e2e67f2ab43ec..f7089b126b5aa35bcc65a6312ed21075 int32_t world_id) = 0; virtual bool AllowScriptExtensions() = 0; diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h -index 6d5be783ec5d25efca2aef1c5da48c0cc4704a28..f8c268110047520a03ca78ab5efb8d82ee4e7bdc 100644 +index aba9bc199c253f5093c516122ce6f1c7071de714..f1dfaf015b08f2b0804d400f88263cc5d9cf7f4c 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -364,6 +364,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -362,6 +362,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/add_realloc.patch b/patches/chromium/add_realloc.patch index 77b1e7b214e4..5e18af69793b 100644 --- a/patches/chromium/add_realloc.patch +++ b/patches/chromium/add_realloc.patch @@ -39,7 +39,7 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f GIN_EXPORT static ArrayBufferAllocator* SharedInstance(); diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -index 8cb127650e7b8b96e6155d2cb7f31f67625b1ce5..3b079ae1ac470208ac543ceca8f564591ede49eb 100644 +index 696a6170a584c1bb71c8ad253963d9f64395a13e..9677aa931cd543adfc1e9844d6afee8dcb0f4c2d 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc @@ -661,6 +661,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { diff --git a/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch b/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch index 4a11244bb30d..4771184c546b 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 b98cb1c863c72f631adad78dcb4c6412b42e8680..2d964693da7f9f2ea351f24c28ba04953988f9b1 100644 +index c37432121142472010b767b7fb257e20bc60b3fc..099c94d1db7994a0608864cb05e3686a85b7070d 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -193,6 +193,25 @@ struct HttpAuthStaticNetworkContextParams { @@ -49,10 +49,10 @@ index b98cb1c863c72f631adad78dcb4c6412b42e8680..2d964693da7f9f2ea351f24c28ba0495 NetworkIsolationKey? network_isolation_key; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index e8c902a95d23d785dad4d5920831337ad24c359c..dcb1421169062978b28ac0ea40f1fd63cc26c889 100644 +index 79091a2b010409b27ba54fbe875d108344f8c337..7b6bc5b4d608c78b7ab43f701c86a0d29931df73 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -483,6 +483,7 @@ URLLoader::URLLoader( +@@ -484,6 +484,7 @@ URLLoader::URLLoader( base::WeakPtr keepalive_statistics_recorder, base::WeakPtr network_usage_accumulator, mojom::TrustedURLLoaderHeaderClient* url_loader_header_client, @@ -60,7 +60,7 @@ index e8c902a95d23d785dad4d5920831337ad24c359c..dcb1421169062978b28ac0ea40f1fd63 mojom::OriginPolicyManager* origin_policy_manager) : url_request_context_(url_request_context), network_service_client_(network_service_client), -@@ -545,6 +546,11 @@ URLLoader::URLLoader( +@@ -544,6 +545,11 @@ URLLoader::URLLoader( header_client_.set_disconnect_handler( base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this))); } @@ -72,7 +72,7 @@ index e8c902a95d23d785dad4d5920831337ad24c359c..dcb1421169062978b28ac0ea40f1fd63 if (want_raw_headers_) { options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse | mojom::kURLLoadOptionSendSSLInfoForCertificateError; -@@ -980,7 +986,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request, +@@ -982,7 +988,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 e8c902a95d23d785dad4d5920831337ad24c359c..dcb1421169062978b28ac0ea40f1fd63 OnAuthCredentials(base::nullopt); return; } -@@ -996,11 +1002,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, +@@ -998,11 +1004,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; @@ -108,10 +108,10 @@ index e8c902a95d23d785dad4d5920831337ad24c359c..dcb1421169062978b28ac0ea40f1fd63 auth_challenge_responder_receiver_.set_disconnect_handler( base::BindOnce(&URLLoader::DeleteSelf, base::Unretained(this))); diff --git a/services/network/url_loader.h b/services/network/url_loader.h -index d2ebc94fdc3a6a7b73b89894427fa30ca6f45a20..5c39949e945b245becc1879b18123ee5628c299b 100644 +index 88c69d29b8a1ffe3293d9985ebb9fbb438f5e84d..f78923a2097ef2679b606ecb61f0b57bf167de41 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -104,6 +104,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -106,6 +106,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader base::WeakPtr keepalive_statistics_recorder, base::WeakPtr network_usage_accumulator, mojom::TrustedURLLoaderHeaderClient* url_loader_header_client, @@ -119,7 +119,7 @@ index d2ebc94fdc3a6a7b73b89894427fa30ca6f45a20..5c39949e945b245becc1879b18123ee5 mojom::OriginPolicyManager* origin_policy_manager); ~URLLoader() override; -@@ -412,6 +413,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -418,6 +419,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader base::Optional fetch_window_id_; mojo::Remote header_client_; @@ -128,19 +128,19 @@ index d2ebc94fdc3a6a7b73b89894427fa30ca6f45a20..5c39949e945b245becc1879b18123ee5 std::unique_ptr file_opener_for_upload_; diff --git a/services/network/url_loader_factory.cc b/services/network/url_loader_factory.cc -index 9e9baaf8ecd33e6416027014361edc332ab71e3c..cc2c59828f56988d43b680588d4625d9864aa9b6 100644 +index f3a9baefc1a18924503d7a6850bc704310e50015..9b3802dbdf7a1ab3f132529b794665a68eeac673 100644 --- a/services/network/url_loader_factory.cc +++ b/services/network/url_loader_factory.cc -@@ -65,6 +65,7 @@ URLLoaderFactory::URLLoaderFactory( - params_(std::move(params)), +@@ -66,6 +66,7 @@ URLLoaderFactory::URLLoaderFactory( resource_scheduler_client_(std::move(resource_scheduler_client)), header_client_(std::move(params_->header_client)), + coep_reporter_(std::move(params_->coep_reporter)), + auth_client_(std::move(params_->auth_client)), cors_url_loader_factory_(cors_url_loader_factory) { DCHECK(context); DCHECK_NE(mojom::kInvalidProcessId, params_->process_id); -@@ -207,6 +208,7 @@ void URLLoaderFactory::CreateLoaderAndStart( - resource_scheduler_client_, std::move(keepalive_statistics_recorder), +@@ -209,6 +210,7 @@ void URLLoaderFactory::CreateLoaderAndStart( + std::move(keepalive_statistics_recorder), std::move(network_usage_accumulator), header_client_.is_bound() ? header_client_.get() : nullptr, + auth_client_.is_bound() ? auth_client_.get() : nullptr, @@ -148,13 +148,13 @@ index 9e9baaf8ecd33e6416027014361edc332ab71e3c..cc2c59828f56988d43b680588d4625d9 cors_url_loader_factory_->OnLoaderCreated(std::move(loader)); } diff --git a/services/network/url_loader_factory.h b/services/network/url_loader_factory.h -index 7d13494649c43be52b06774f2cf5763ebe9129c0..d4b19342c44f86c685f700e4260475ff2235b298 100644 +index 1a623585035487de061ba6476914992ea2f7ac88..caa19dcd4b99296e50f8e22bfc92a70ba14473d1 100644 --- a/services/network/url_loader_factory.h +++ b/services/network/url_loader_factory.h -@@ -72,6 +72,7 @@ class URLLoaderFactory : public mojom::URLLoaderFactory { - mojom::URLLoaderFactoryParamsPtr params_; +@@ -74,6 +74,7 @@ class URLLoaderFactory : public mojom::URLLoaderFactory { scoped_refptr resource_scheduler_client_; mojo::Remote header_client_; + mojo::Remote coep_reporter_; + mojo::Remote auth_client_; // |cors_url_loader_factory_| owns this. diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 0acdebfb28b4..9b357a60788e 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -14,10 +14,10 @@ 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 c58f6dded2c2cb0059a07fb2867f73be2a9727f3..38a0b88a26d6af97c9d9e22c8b40dc4d768e1f64 100644 +index f275e8979f23a3e45b49d86dedc5f33d9c7127b5..5ca2bec7bc194753a118d100dfe45135463172c6 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -401,10 +401,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { +@@ -472,10 +472,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { } CHECK(!view_ || !view_->IsAttached()); @@ -28,7 +28,7 @@ index c58f6dded2c2cb0059a07fb2867f73be2a9727f3..38a0b88a26d6af97c9d9e22c8b40dc4d if (!Client()) return; -@@ -422,6 +418,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) { +@@ -493,6 +489,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) { // Notify ScriptController that the frame is closing, since its cleanup ends // up calling back to LocalFrameClient via WindowProxy. GetScriptController().ClearForClose(); diff --git a/patches/chromium/blink_world_context.patch b/patches/chromium/blink_world_context.patch index 0dec5a5b461c..fc67971a7824 100644 --- a/patches/chromium/blink_world_context.patch +++ b/patches/chromium/blink_world_context.patch @@ -7,10 +7,10 @@ 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 608f15dd955b226dae823ced2b6b7c2c153b9ab2..26b02b76239fc75e0f7c57d809cd3b22dd3a308b 100644 +index d38707a4d3dba6b46284deaf85be52fa7f841513..e873092c5918a6d010c6dbcb9c9e71311652a7c1 100644 --- a/third_party/blink/public/web/web_local_frame.h +++ b/third_party/blink/public/web/web_local_frame.h -@@ -327,6 +327,9 @@ class WebLocalFrame : public WebFrame { +@@ -332,6 +332,9 @@ class WebLocalFrame : public WebFrame { // be calling this API. virtual v8::Local MainWorldScriptContext() const = 0; @@ -21,7 +21,7 @@ index 608f15dd955b226dae823ced2b6b7c2c153b9ab2..26b02b76239fc75e0f7c57d809cd3b22 // 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 5fb167a882a6027c58e3a9c24031220c505219f6..7ae6d7f07b07304ffd7d42f48e077d5858021ea6 100644 +index 8b3f4a7f1df7aa3debe8e9b0119326cd1736a032..581679055fad89d2a0f681a18bb97eea934290ea 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 @@ -922,6 +922,13 @@ v8::Local WebLocalFrameImpl::GlobalProxy() const { @@ -39,7 +39,7 @@ index 5fb167a882a6027c58e3a9c24031220c505219f6..7ae6d7f07b07304ffd7d42f48e077d58 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 518f02086e2b5d243d4e17cdfad42c80177f5df2..a27c3fc771cfa4491f77a7c6e4cb9970da3124db 100644 +index ae5c07efdec59b0ef0f857b8210e7dfa35a9b5d4..edfc1b5a130c07ff90061704ee36757795daff43 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 @@ -160,6 +160,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 5f031ddd1e9d..947b17eaac42 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us to introduce a new Electron category for Electron-specific tracing. diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index b447973cdd4c95a4b1468224151dd18c624a74be..46d33f5d0449fd51a8d7cf17cec334bc80c23442 100644 +index 6f07209af5dce58b312d44a2bdb98d9186eab71c..51ad7bf75077308c058ba66f67daa7a9b6b2eed1 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -67,6 +67,7 @@ diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index db5dc37f1cad..fd82a5dc1c47 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/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc -index 8b8fb60d2ea5fe7c02e151d6a1455849bbca65ee..51ab38a13bcc2717970d786afd1c67949ea32d94 100644 +index 577ab7436be5f156c11237d992c43fe7da14d9a9..3075f7179093e082b1940b6990aab9cf9ef487d7 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc -@@ -4558,6 +4558,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -4596,6 +4596,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,7 +21,7 @@ index 8b8fb60d2ea5fe7c02e151d6a1455849bbca65ee..51ab38a13bcc2717970d786afd1c6794 &no_javascript_access); diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index c1b370d6b3debfcc72b681756b6f45e10e4ec4cc..d3105343fa3974c78bd678aeb632568abb2bde77 100644 +index 443ab9086c1d39efd976d59ab2441d32b20596b4..8f84b4fe97f299440b07814f886d667f6d008e9f 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom @@ -295,6 +295,10 @@ struct CreateNewWindowParams { @@ -36,7 +36,7 @@ index c1b370d6b3debfcc72b681756b6f45e10e4ec4cc..d3105343fa3974c78bd678aeb632568a // 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 53db803d62dc26ef69e886c89407fac9633d958b..2ea6dbb5697268743026d24116bc5c509f950b4b 100644 +index 95ce11ee6dc7040fac369e57923d993e8eeb6197..4ebd47182f8e237b49ad202b5ab3d9d39beb52bf 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -515,6 +515,8 @@ bool ContentBrowserClient::CanCreateWindow( @@ -49,7 +49,7 @@ index 53db803d62dc26ef69e886c89407fac9633d958b..2ea6dbb5697268743026d24116bc5c50 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 a996e9da772a4368c5845d3a8166d605f256108e..ee1034ee1bcd3f47964fec8fe11573596754e3b8 100644 +index 5e2f30e55860d6807404077c01095f2d47552fdc..050ece82da9dbcd7ad1a41deb3f9f731e9ed7b49 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -142,6 +142,7 @@ class NetworkService; @@ -70,7 +70,7 @@ index a996e9da772a4368c5845d3a8166d605f256108e..ee1034ee1bcd3f47964fec8fe1157359 bool opener_suppressed, bool* no_javascript_access); diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index 5d0b7267247ad16b0521e12e075baee347621efb..fa5d9e788c5a3bda72300d701113579d0a876ea8 100644 +index 8d9e277c713f0000aae8838ac40affc2d8bd7636..a40699b5c66d9ae9bd1e9aef629ed171d9a63ce6 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -68,6 +68,7 @@ @@ -81,7 +81,7 @@ index 5d0b7267247ad16b0521e12e075baee347621efb..fa5d9e788c5a3bda72300d701113579d #include "content/renderer/media/audio/audio_device_factory.h" #include "content/renderer/render_frame_impl.h" #include "content/renderer/render_frame_proxy.h" -@@ -1248,6 +1249,8 @@ WebView* RenderViewImpl::CreateView( +@@ -1247,6 +1248,8 @@ WebView* RenderViewImpl::CreateView( } params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features); @@ -91,10 +91,10 @@ index 5d0b7267247ad16b0521e12e075baee347621efb..fa5d9e788c5a3bda72300d701113579d // moved on send. bool is_background_tab = diff --git a/content/shell/browser/web_test/web_test_content_browser_client.cc b/content/shell/browser/web_test/web_test_content_browser_client.cc -index b899d6126b9ec7f226c0bb5721c281daaa22825d..331de60c4183b675d27cbdef70851e5d834ccad2 100644 +index 662e42bd902df1c62ca472306362f937173e8c0c..5e93f47397728f5f57129a04ed9317f773dd81c7 100644 --- a/content/shell/browser/web_test/web_test_content_browser_client.cc +++ b/content/shell/browser/web_test/web_test_content_browser_client.cc -@@ -335,6 +335,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( +@@ -332,6 +332,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, 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 f93943f5056e..f92089779543 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 66552b76a64b3ec0a3287366ef7dd8a2f0e14404..b962781b978558fef40df5beac9ea7fc6560dca0 100644 +index cd160e465a93322f27a69e0e380e74f07670852c..9f5a5ae5bb346aaf4e6b7eea3e61c55b7dc1a973 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -5256,6 +5256,7 @@ jumbo_static_library("browser") { +@@ -5273,6 +5273,7 @@ jumbo_static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index d3fde57beea7..f4c219944301 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -17,7 +17,7 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc -index deb02fbfd0732978ef82cd389559d29be1d562b1..37207b205dbc8308b0d92cbcf0e3861dc397ed93 100644 +index 3fdf089abe70f9968b26551be86ead8eb7fadad4..f10e5c3a148f3c00835e2c2b7c0e0f598db8e026 100644 --- a/content/browser/frame_host/navigation_controller_impl.cc +++ b/content/browser/frame_host/navigation_controller_impl.cc @@ -1250,8 +1250,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( diff --git a/patches/chromium/delay_lock_the_protocol_scheme_registry.patch b/patches/chromium/delay_lock_the_protocol_scheme_registry.patch index a27ee3d5c4cd..3497513e596e 100644 --- a/patches/chromium/delay_lock_the_protocol_scheme_registry.patch +++ b/patches/chromium/delay_lock_the_protocol_scheme_registry.patch @@ -19,7 +19,7 @@ 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 d7bfb2ad57ffa97d10432a2953efa754f3450785..a157e887c580f2f5bd3c1fea7c870e1798e45c52 100644 +index d769b656dbe9e88a3e2533f82cb8daebe871d88b..0955e03a1ff9347b1d7d692e16ff62f350453f7d 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc @@ -670,7 +670,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index 1179b2c06f53..8563406c3f0d 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 ecc248f37ecaf3ced049dace1bd8e324d0937585..2377e1af24f0005703fcaee439a99d0ca9a4636b 100644 +index 10f39e919d5692ad265086aa6d95d975df7a21fa..4ecb8fc211e2c1d80fb8b0541b489950026e0f8c 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -305,6 +305,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500; @@ -49,7 +49,7 @@ index ecc248f37ecaf3ced049dace1bd8e324d0937585..2377e1af24f0005703fcaee439a99d0c // HWNDMessageHandler, gfx::WindowImpl overrides: diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h -index 4a02d86842e6c85e604d5951c6d9caf791aaf272..fa81ac2cb5714ee994caf930fc29dd755f142e8a 100644 +index 6c94ab3e4972fff2fe984be748bcbc41fc6c97fc..2ca10cec3c065c3a7d5a42d3377ec9ba01524569 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 d57b70de7044..b42425adfab5 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 2158fc935826319a1d297dde70afc302ef2af870..a3317d70d0c1a81ee2fb4d42d8ecdc4b0eb1a1e7 100644 +index d9bc455ac5a4a2405becb678f19bba0fddc8ce00..4d9f8be17da2b3b56a3d673c6f1fa6ed63bf5a0d 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc @@ -84,6 +84,9 @@ @@ -216,7 +216,7 @@ index bf63bb9c03852263e9341c671be1ee4e7c1a3dc2..d06e2f99739298a4de13ebbce5606b68 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 54b5fd4f20ab3a37eb29772fcf49838dd22cf2ba..132b0d9856e9b075dd39fa32623514ffb8811303 100644 +index c4c55c26bf00373502d319536433485b851af5b0..356fb599f1ef49be6b7a962e471bbd045556979c 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -230,6 +230,7 @@ @@ -236,10 +236,10 @@ index 54b5fd4f20ab3a37eb29772fcf49838dd22cf2ba..132b0d9856e9b075dd39fa32623514ff service_manager::switches::kDisableInProcessStackTraces, service_manager::switches::kDisableSeccompFilterSandbox, diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc -index 4c9ed8ca9a64aa9e4b0d9e01a0551ed5b642ad7e..7c3f0a0d36d0e91bd8a6ab1d648af3c4eb84b7ac 100644 +index 6734b39c3f5c48545c4aea477f500b36015c2b99..7795fa943c18836cfada9a45ec01d4114d9d34e8 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc -@@ -2722,6 +2722,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( +@@ -2671,6 +2671,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); @@ -294,7 +294,7 @@ index d88680239152858689121d134559765fb8fae1b7..073ed8a8f84ebf994a2b9d9fa7e78f75 gfx::ColorSpace::TransferID transfer_id = diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc -index bc250cc868030cfc1ebd41f4a55a2e2cc3474ac6..5ff52a19ceabb2c88b979a27e0e166085bc70dde 100644 +index 4c47a1132ea3d53b6c63882e98374196ac7ce069..a7f00f426cc6a75d7b942581696332756f2cb792 100644 --- a/ui/gfx/mac/io_surface.cc +++ b/ui/gfx/mac/io_surface.cc @@ -16,6 +16,7 @@ diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 11aa447c865a..ab87f79f447f 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,7 +6,7 @@ Subject: disable_hidden.patch Electron uses this to disable background throttling for hidden windows. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 173e4e05787c7580c7028d75d98c9816912e7c35..67fb238367acb8f017ec610299484e0c1d2361b1 100644 +index 0358c815f6f346eb7c13ac0c1f103f47f67721d6..4bc738d1748bab96082ca6625fcaac5c78cb9afc 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -612,6 +612,9 @@ void RenderWidgetHostImpl::WasHidden() { diff --git a/patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch b/patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch index 69e5c8c68ac3..ec6b9b8267ca 100644 --- a/patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch +++ b/patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch @@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch See https://github.com/electron/electron/issues/10754 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc -index bdec26aab86d2f43101153c6ca3ea061b9e825e7..818119443641d7a6c479fc1cbd56ef9fa29e37b5 100644 +index 327c677d5ae61bcd25f1d4014fd21d9db054e1a2..060df8edf982d04719e73ef781194ac5787f53ca 100644 --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc -@@ -4073,7 +4073,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client, +@@ -4086,7 +4086,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client, "frame that never had a user gesture since its load. " "https://www.chromestatus.com/feature/5082396709879808"; Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message); diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 17f4706a76af..9bfd0a243630 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 360cb62fac2c54a9202750bb4656692a17d49d81..e376b6537748c7aa823bf6548537e1809ecedabe 100644 +index 9d340a9207d2e0b71e0726a0904282e160e036ae..f827654c8480ee9618ea48b418a5469882f4c1d3 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1000,6 +1000,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1006,6 +1006,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -63,10 +63,10 @@ index abc82d01185e1d3320bfd82bcd1705423e325ff2..b6885b6ebaf78d384a3f124ec6ef07b7 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 c1b292368f351dbceecf51dd7b573ac760924da1..b98cb1c863c72f631adad78dcb4c6412b42e8680 100644 +index 1d9ffd3de180e3256fb63a497544feeb427ae7ff..c37432121142472010b767b7fb257e20bc60b3fc 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1013,6 +1013,9 @@ interface NetworkContext { +@@ -1016,6 +1016,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); diff --git a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch index 9c24c302b124..1b30dad3e211 100644 --- a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch +++ b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch @@ -13,10 +13,10 @@ uses internally for things like menus and devtools. We can remove this patch once it has in some shape been upstreamed. diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc -index 8fb4f2417d948a0f51f51179bc30f6b8420ad598..e37fa52934c8582856ef7b067775cb640543101c 100644 +index bfca4412f0045bdd23a76597a803145e9f7f22c5..5337fa3fe2653684ff1688f1cf8a52c908ee1d61 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc -@@ -53,6 +53,8 @@ NativeTheme::NativeTheme() +@@ -53,6 +53,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors) NativeTheme::~NativeTheme() = default; bool NativeTheme::ShouldUseDarkColors() const { @@ -26,12 +26,12 @@ index 8fb4f2417d948a0f51f51179bc30f6b8420ad598..e37fa52934c8582856ef7b067775cb64 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index c5fd22fba2cd83084311b324a3018039cdf0be4d..0721ff1d9f31dfacf50fbd61fbc95d75f4f3451e 100644 +index edd042cfe327810c120c4b446c043761c0d21b9f..59aaf71ea1e7931c421a46a7ca8cadb4dc77483b 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -464,6 +464,22 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -348,6 +348,22 @@ class NATIVE_THEME_EXPORT NativeTheme { ColorId color_id, - ColorScheme color_scheme = ColorScheme::kDefault) const = 0; + ColorScheme color_scheme = ColorScheme::kDefault) const; + enum ThemeSource { + kSystem, @@ -52,7 +52,7 @@ index c5fd22fba2cd83084311b324a3018039cdf0be4d..0721ff1d9f31dfacf50fbd61fbc95d75 // Returns a shared instance of the native theme that should be used for web // rendering. Do not use it in a normal application context (i.e. browser). // The returned object should not be deleted by the caller. This function is -@@ -588,6 +604,8 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -478,6 +494,8 @@ class NATIVE_THEME_EXPORT NativeTheme { PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kNoPreference; @@ -62,7 +62,7 @@ index c5fd22fba2cd83084311b324a3018039cdf0be4d..0721ff1d9f31dfacf50fbd61fbc95d75 }; diff --git a/ui/native_theme/native_theme_dark_aura.cc b/ui/native_theme/native_theme_dark_aura.cc -index a8fbfee3b13672902aac05fd5a65fa8ee81f9f7e..1be6369acf0b7c02a6f862636c2b2de1fbf8cb5a 100644 +index 87b0abc9c646ace8cafc2b83eb4da6ffd3370237..75c677def845711ef4f3414f0a7df4f88431bf25 100644 --- a/ui/native_theme/native_theme_dark_aura.cc +++ b/ui/native_theme/native_theme_dark_aura.cc @@ -20,6 +20,8 @@ SkColor NativeThemeDarkAura::GetSystemColor(ColorId color_id, @@ -75,10 +75,10 @@ index a8fbfee3b13672902aac05fd5a65fa8ee81f9f7e..1be6369acf0b7c02a6f862636c2b2de1 } diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index 4bdaa3da0540e49f6794fcaf4d89780cd32720b2..281be00dc5b175c9a85e6aad318762bcddca0784 100644 +index dedaaaeaa93e55ec784f94864d670e0659d839bf..57009894edb9ad9422e24bf40f4100964fd32d1c 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc -@@ -706,6 +706,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { +@@ -726,6 +726,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { // ...unless --force-dark-mode was specified in which case caveat emptor. if (UsesHighContrastColors() && !IsForcedDarkMode()) return false; diff --git a/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch index f866e9ddaa99..1846622b452b 100644 --- a/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,10 +6,10 @@ Subject: feat: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index dd6d4fb271a713f492c7db12f5fbbcfe296b9c2c..5d04acf8289f295c29fdfa5724986f16528ed9cb 100644 +index a0e2078e02a50f9882cb9a15e67ee7f5c088a693..828d108c6683c152afb1dbdc116c6c1ee1c3bd9b 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -435,6 +435,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -443,6 +443,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { Send(new ViewMsg_SetBackgroundOpaque(GetRoutingID(), opaque)); } @@ -21,7 +21,7 @@ index dd6d4fb271a713f492c7db12f5fbbcfe296b9c2c..5d04acf8289f295c29fdfa5724986f16 return is_active(); } diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h -index cb276192e69dd8f352eb0835dbbb4eee2874a0bc..a127fe14860a33a54f1b3632c1162691aa79bd42 100644 +index 17715e62955bf3d4a8a9865ac9113f6caa410038..d4c0a074496031953cbfa00dec8c96910baf8622 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h @@ -109,6 +109,7 @@ class CONTENT_EXPORT RenderViewHostImpl @@ -33,10 +33,10 @@ index cb276192e69dd8f352eb0835dbbb4eee2874a0bc..a127fe14860a33a54f1b3632c1162691 void UpdateWebkitPreferences(const WebPreferences& prefs) override; void OnWebkitPreferencesChanged() override; diff --git a/content/common/view_messages.h b/content/common/view_messages.h -index 72594b5bb918935394fed7f092c9728bc65275f2..1afaaf0ad6b6aafecf2a47f8eec2004861581027 100644 +index bf461370dcca80ff9cd25824c17572117f5c5aed..5dd92772790e65216ad4aa6f97145cbed0e3e2aa 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h -@@ -100,6 +100,9 @@ IPC_STRUCT_TRAITS_END() +@@ -98,6 +98,9 @@ IPC_STRUCT_TRAITS_END() // Make the RenderWidget background transparent or opaque. IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque, bool /* opaque */) @@ -61,10 +61,10 @@ index 893c45a5c71b4e55ea323ae60e11d12ddb099efd..db9a1ff0fe1a912db83692ab17c620cf // // Returns the current WebKit preferences. Note: WebPreferences is cached, so diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index fa5d9e788c5a3bda72300d701113579d0a876ea8..b9d70619472b1ce39224c3d5e02ed32581979bac 100644 +index a40699b5c66d9ae9bd1e9aef629ed171d9a63ce6..a9b45e32d53b72cb8f52c50709b07945647295d0 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc -@@ -1169,6 +1169,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { +@@ -1172,6 +1172,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message) @@ -73,7 +73,7 @@ index fa5d9e788c5a3bda72300d701113579d0a876ea8..b9d70619472b1ce39224c3d5e02ed325 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck) IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences) IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) -@@ -1702,6 +1704,12 @@ bool RenderViewImpl::GetContentStateImmediately() { +@@ -1675,6 +1677,12 @@ bool RenderViewImpl::GetContentStateImmediately() { return send_content_state_immediately_; } @@ -87,10 +87,10 @@ index fa5d9e788c5a3bda72300d701113579d0a876ea8..b9d70619472b1ce39224c3d5e02ed325 PageVisibilityState visibility_state, bool initial_setting) { diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h -index 7ac12ecb12b0ab46ad8ba6309ecef93c2a55c916..cc43cb8f25b06703489ccbc0f9a3c0cb4949504f 100644 +index 3ede6c7d077d34f99054a3b3d85303533450af48..3f8cae4bc613a575009a1d589b0dba17c47e4395 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h -@@ -413,6 +413,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, +@@ -410,6 +410,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, void OnSetHistoryOffsetAndLength(int history_offset, int history_length); void OnSetRendererPrefs( const blink::mojom::RendererPreferences& renderer_prefs); @@ -99,10 +99,10 @@ index 7ac12ecb12b0ab46ad8ba6309ecef93c2a55c916..cc43cb8f25b06703489ccbc0f9a3c0cb void OnUpdateTargetURLAck(); void OnUpdateWebPreferences(const WebPreferences& prefs); diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h -index 01d82a1fed2f5595bb9b954009e7ea2a2fb379f9..70153bb520aa4fb32fcd9dd013d253faa5ba7299 100644 +index 3b5dea555dcd13b6cc35c21f47ab355ad1ef0cfc..042af49c945313519f87a90a249401d409f44b16 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h -@@ -408,6 +408,7 @@ class WebView { +@@ -413,6 +413,7 @@ class WebView { // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -111,10 +111,10 @@ index 01d82a1fed2f5595bb9b954009e7ea2a2fb379f9..70153bb520aa4fb32fcd9dd013d253fa // 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 e3bf3f8b544d1543a714270d369c533d4502d02e..66fdfc3babcd27b0663e1d10eb23e1e6e3d6982d 100644 +index 20cb57c07554199384556f604aeedfe2e3ddd9a1..6b2507b8ab8123f9f4c120e0cd9ea58bdf338d61 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3309,12 +3309,20 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3345,12 +3345,20 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -138,10 +138,10 @@ index e3bf3f8b544d1543a714270d369c533d4502d02e..66fdfc3babcd27b0663e1d10eb23e1e6 PageVisibilityState WebViewImpl::GetVisibilityState() { diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h -index e718e5aaf2f5b86e3ced16afaf2c10a16deb6eaa..82ad4711eec15bce52ad71e0bbad81d19d48ae2f 100644 +index ee8c32e966b29578a2f8077df1aa34b91564c61b..7417f736a7fab7c346e989173052e0265a37e91f 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -317,6 +317,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -320,6 +320,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -149,7 +149,7 @@ index e718e5aaf2f5b86e3ced16afaf2c10a16deb6eaa..82ad4711eec15bce52ad71e0bbad81d1 void SetVisibilityState(PageVisibilityState visibility_state, bool is_initial_state) override; PageVisibilityState GetVisibilityState() override; -@@ -682,6 +683,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -685,6 +686,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, // WebViewImpl::Close while handling an input event. bool debug_inside_input_handling_ = false; @@ -157,4 +157,4 @@ index e718e5aaf2f5b86e3ced16afaf2c10a16deb6eaa..82ad4711eec15bce52ad71e0bbad81d1 + FloatSize elastic_overscroll_; - Persistent popup_mouse_wheel_event_listener_; + // If true, we send IPC messages when |preferred_size_| changes. 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 a753c4cbb52e..b02d59b291e8 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 5cd92d7a38ee19fedce90976a898f0c312f7d908..4dea0a7721352865f463fad971c56f7f8c400f66 100644 +index 6cd9edd685ae22c95109fc6767ee5a76845707a9..4f3beebf5bff1bccb42662df2e21a6d397fe4567 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -111,6 +111,8 @@ viz_component("service") { @@ -107,7 +107,7 @@ index 5cd92d7a38ee19fedce90976a898f0c312f7d908..4dea0a7721352865f463fad971c56f7f "display_embedder/software_output_surface.h", "display_embedder/viz_process_context_provider.cc", diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc -index 8e29d3218851fa0395815fe10f8f7276d6ead3f1..5eb5b84cf816e487eacbace80990f2dc68b662af 100644 +index b4d4b1c1c5978ca9369f7348e51dde4d935c72b3..e70d95818adf62f2e966e715a5043f91b255b799 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -21,6 +21,7 @@ @@ -126,7 +126,7 @@ index 8e29d3218851fa0395815fe10f8f7276d6ead3f1..5eb5b84cf816e487eacbace80990f2dc #include "ui/base/ui_base_switches.h" #include "ui/gl/gl_context.h" #include "ui/gl/init/gl_factory.h" -@@ -225,6 +227,22 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( +@@ -224,6 +226,22 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( if (headless_) return std::make_unique(); 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 04428075da60..b8e32e02b6d4 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 cdb3fb99ee231b61f3668391d3e7282576246080..77727f694531a11b228f724d6988cc42670c8976 100644 +index 611ba2b46eaf4f3d9b69c3c1eeb7824a3a9ece48..e6fe086b2254d07eed3d1c6cd7fd73b34bf34f1a 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2379,11 +2379,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { +@@ -2385,11 +2385,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/fixme_grit_conflicts.patch b/patches/chromium/fixme_grit_conflicts.patch index f5ba55875518..fee2a0556c31 100644 --- a/patches/chromium/fixme_grit_conflicts.patch +++ b/patches/chromium/fixme_grit_conflicts.patch @@ -10,10 +10,10 @@ Should be removed once grit is fixed. Tracking bug: https://crbug.com/1040605 diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec -index d38d3adf23b81c6ad0bed291146b3bb5db4fbf46..cd62a50c152b150c26b8d469e0de76f22dfa3ef9 100644 +index 0a93db25931ecf549cfa92b5b101e96cdb92a47a..ba80a27460754d492fe69b7233352542dd25e490 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -578,15 +578,16 @@ +@@ -584,15 +584,16 @@ "includes": [3840], }, diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index dfd55afb1b56..faa9af0afd10 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -42,10 +42,10 @@ index 906a1ee4ac58b0744a32153bbaafeac4322a60e4..c90f4aead36cbf3767dc5094728963c2 // another SiteInstance for the same site. void RegisterSiteInstance(SiteInstanceImpl* site_instance); diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc -index 113700fbfbbb61b27c6f7bdee7f143e59807e411..f57678422f261b08f682c8290bcf4a47dc4dafd3 100644 +index bd35bd8a8deaa3d93939f78d9dd11be152840783..c9aa08e363b2fd61f7b27245478964fb81fb2c65 100644 --- a/content/browser/frame_host/navigation_request.cc +++ b/content/browser/frame_host/navigation_request.cc -@@ -1253,6 +1253,24 @@ void NavigationRequest::BeginNavigation() { +@@ -1257,6 +1257,24 @@ void NavigationRequest::BeginNavigation() { // it immediately. EnterChildTraceEvent("ResponseStarted", this); @@ -71,10 +71,10 @@ index 113700fbfbbb61b27c6f7bdee7f143e59807e411..f57678422f261b08f682c8290bcf4a47 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 07eebdd7863d9cb0f03f203c8d85275aa1374faa..d615a90014330b32e5ddd1b2dd22cf2421bdf3e7 100644 +index 6ab309abdd92f4b8e2bb4f789bbb225997f81cc7..ad6d9770bf3398d6086b9a90dfad19207b2fb6e1 100644 --- a/content/browser/frame_host/render_frame_host_manager.cc +++ b/content/browser/frame_host/render_frame_host_manager.cc -@@ -2327,6 +2327,16 @@ bool RenderFrameHostManager::InitRenderView( +@@ -2329,6 +2329,16 @@ bool RenderFrameHostManager::InitRenderView( scoped_refptr RenderFrameHostManager::GetSiteInstanceForNavigationRequest( NavigationRequest* request) { @@ -91,7 +91,7 @@ index 07eebdd7863d9cb0f03f203c8d85275aa1374faa..d615a90014330b32e5ddd1b2dd22cf24 SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance(); // All children of MHTML documents must be MHTML documents. They all live in -@@ -2346,10 +2356,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2348,10 +2358,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 07eebdd7863d9cb0f03f203c8d85275aa1374faa..d615a90014330b32e5ddd1b2dd22cf24 // Account for renderer-initiated reload as well. // Needed as a workaround for https://crbug.com/1045524, remove it when it is -@@ -2388,6 +2448,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2393,6 +2453,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -194,7 +194,7 @@ index caa100b3889e17a9afdc8127e0e13bb6b86e8042..f08d3a2eb28f0f6fff89b5759eff5369 size_t GetRelatedActiveContentsCount() override; bool RequiresDedicatedProcess() override; diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index 2ea6dbb5697268743026d24116bc5c509f950b4b..06b52f68eef476dd7c38003e20ebc868162ff996 100644 +index 4ebd47182f8e237b49ad202b5ab3d9d39beb52bf..ad4eba3b5a0de32e48c3ae5b19de858c27ba5dfd 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -58,6 +58,21 @@ @@ -220,7 +220,7 @@ index 2ea6dbb5697268743026d24116bc5c509f950b4b..06b52f68eef476dd7c38003e20ebc868 const MainFunctionParams& parameters) { return nullptr; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index ee1034ee1bcd3f47964fec8fe11573596754e3b8..9351616f0100694f18c760417a7d93a001d3bb72 100644 +index 050ece82da9dbcd7ad1a41deb3f9f731e9ed7b49..e4f531edd533525a84b59fac0521b0ee9954e853 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -231,8 +231,45 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index c3c81889c560..48e0a7137598 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -38,7 +38,7 @@ index f23af2d9738f3aa76e3a49301e1c3216ee4a64b4..ede178acabc63c3c33d6ce93efd5632b v8::Isolate* isolate() { return isolate_; } diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index 48bd647dcf7ecd121cd250bec1f7c2fc093a03fb..02468b82e0e304a76b9653c511ed0697dfd9b5f7 100644 +index 3a3742ed911cf49b6c93d02763d6eaa9554df62b..c53ea98d3897675c18c1eb8ad37dbce61110fa2e 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc @@ -190,12 +190,14 @@ enum LoadV8FileResult { diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index c20052b68f2f..1ddd80d1aa2d 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 79ce43668fca083d027a6a9d5ef09a98ac171bae..d38d3adf23b81c6ad0bed291146b3bb5db4fbf46 100644 +index 8f99ccb1a552ff449a88180987cccfaa128596ef..0a93db25931ecf549cfa92b5b101e96cdb92a47a 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -584,6 +584,11 @@ +@@ -590,6 +590,11 @@ "includes": [3860], }, diff --git a/patches/chromium/mas-cgdisplayusesforcetogray.patch b/patches/chromium/mas-cgdisplayusesforcetogray.patch index e6b8563f4d3e..4516a8896825 100644 --- a/patches/chromium/mas-cgdisplayusesforcetogray.patch +++ b/patches/chromium/mas-cgdisplayusesforcetogray.patch @@ -6,10 +6,10 @@ Subject: mas-cgdisplayusesforcetogray.patch Removes usage of the CGDisplayUsesForceToGray private API. diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm -index 585d02bf08000834b941455d90d355de3f9e76a9..de80c433a2151890d50bf1248d0948fd9df1b436 100644 +index de5994300fc405fe9e63f11023230f448f6109e9..78b880cd1064dc04fc9cd357d122e52179cdd90c 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm -@@ -134,7 +134,17 @@ Display BuildDisplayForScreen(NSScreen* screen) { +@@ -133,7 +133,17 @@ Display BuildDisplayForScreen(NSScreen* screen) { display.set_color_depth(Display::kDefaultBitsPerPixel); display.set_depth_per_component(Display::kDefaultBitsPerComponent); } diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index cb7a881a1c35..dbb269d75e22 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -50,7 +50,7 @@ index 5124b17f020849671a7f03d92bda052eff84d169..f9730f71c122965f7ce7815a1b9a7b32 // is concerned. @property(nonatomic, readonly) NSString* subrole; diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm -index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424fc4547a4 100644 +index 7504dd00bedb793b4cdaa87a3a2259cf82ce2e13..102a82f5922365f93d4ed228f775a0e68f74dfc5 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm @@ -206,6 +206,7 @@ @@ -124,7 +124,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 {NSAccessibilitySizeAttribute, @"size"}, {NSAccessibilitySortDirectionAttribute, @"sortDirection"}, {NSAccessibilitySubroleAttribute, @"subrole"}, -@@ -1309,6 +1321,7 @@ - (NSNumber*)enabled { +@@ -1308,6 +1320,7 @@ - (NSNumber*)enabled { ax::mojom::Restriction::kDisabled]; } @@ -132,7 +132,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 // Returns a text marker that points to the last character in the document that // can be selected with VoiceOver. - (id)endTextMarker { -@@ -1319,6 +1332,7 @@ - (id)endTextMarker { +@@ -1318,6 +1331,7 @@ - (id)endTextMarker { BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0); return CreateTextMarker(position->CreatePositionAtEndOfAnchor()); } @@ -140,7 +140,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 - (NSNumber*)expanded { if (![self instanceActive]) -@@ -1468,6 +1482,8 @@ - (NSNumber*)index { +@@ -1467,6 +1481,8 @@ - (NSNumber*)index { return nil; } @@ -149,7 +149,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 - (NSNumber*)insertionPointLineNumber { if (![self instanceActive]) return nil; -@@ -1490,6 +1506,7 @@ - (NSNumber*)insertionPointLineNumber { +@@ -1489,6 +1505,7 @@ - (NSNumber*)insertionPointLineNumber { caretPosition->AsTextPosition()->text_offset()); return @(std::distance(lineBreaks.begin(), iterator)); } @@ -157,7 +157,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 // Returns whether or not this node should be ignored in the // accessibility tree. -@@ -2169,6 +2186,7 @@ - (NSArray*)selectedChildren { +@@ -2166,6 +2183,7 @@ - (NSArray*)selectedChildren { return ret; } @@ -165,7 +165,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 - (NSString*)selectedText { if (![self instanceActive]) return nil; -@@ -2180,11 +2198,13 @@ - (NSString*)selectedText { +@@ -2177,11 +2195,13 @@ - (NSString*)selectedText { return nil; return base::SysUTF16ToNSString(range.GetText()); } @@ -179,7 +179,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 - (NSValue*)selectedTextRange { if (![self instanceActive]) return nil; -@@ -2205,12 +2225,15 @@ - (NSValue*)selectedTextRange { +@@ -2202,12 +2222,15 @@ - (NSValue*)selectedTextRange { int selLength = range.GetText().length(); return [NSValue valueWithRange:NSMakeRange(selStart, selLength)]; } @@ -195,7 +195,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 - (NSValue*)size { if (![self instanceActive]) -@@ -2243,6 +2266,7 @@ - (NSString*)sortDirection { +@@ -2240,6 +2263,7 @@ - (NSString*)sortDirection { return nil; } @@ -203,7 +203,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 // Returns a text marker that points to the first character in the document that // can be selected with VoiceOver. - (id)startTextMarker { -@@ -2253,6 +2277,7 @@ - (id)startTextMarker { +@@ -2250,6 +2274,7 @@ - (id)startTextMarker { BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0); return CreateTextMarker(position->CreatePositionAtStartOfAnchor()); } @@ -211,7 +211,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 // Returns a subrole based upon the role. - (NSString*)subrole { -@@ -2573,11 +2598,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range { +@@ -2570,11 +2595,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range { NSMutableAttributedString* attributedValue = [[[NSMutableAttributedString alloc] initWithString:value] autorelease]; @@ -225,7 +225,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 return [attributedValue attributedSubstringFromRange:range]; } -@@ -2680,9 +2707,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute +@@ -2677,9 +2704,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute return ToBrowserAccessibilityCocoa(cell); } @@ -237,7 +237,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 BrowserAccessibilityPositionInstance position = CreatePositionFromTextMarker(parameter); if (!position->IsNullPosition()) -@@ -2993,6 +3019,7 @@ AXPlatformRange range(std::move(lineStartPosition), +@@ -2990,6 +3016,7 @@ AXPlatformRange range(std::move(lineStartPosition), return CreateTextMarker(root->CreatePositionAt(index)); } @@ -245,7 +245,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 if ([attribute isEqualToString: NSAccessibilityBoundsForRangeParameterizedAttribute]) { -@@ -3026,6 +3053,7 @@ AXPlatformRange range(std::move(lineStartPosition), +@@ -3023,6 +3050,7 @@ AXPlatformRange range(std::move(lineStartPosition), return nil; } @@ -253,7 +253,7 @@ index f9c6d377494b6af9d99c2ec3e529acf6cc1f8e7b..8ec96495fe97efcc1fe88bafa9e1f424 if ([attribute isEqualToString: NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) { -@@ -3140,6 +3168,7 @@ AXPlatformRange range(std::move(lineStartPosition), +@@ -3137,6 +3165,7 @@ AXPlatformRange range(std::move(lineStartPosition), return @(child->GetIndexInParent()); } @@ -388,7 +388,7 @@ index 26436b47942b14e419adb5780c45a9d42224d39f..215abac9672f72aeef7694e97ff260ae } diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc -index 2e0f06b0c1e4b1670bfe8145b3c5abb178b47d62..2f9483283a789a69d7e85536620daa2e35ee9155 100644 +index eaa5336c3391a2babf133109805218e7253ea8ff..e64e93d602265133549b7c86605a8998e09f530e 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc @@ -246,6 +246,7 @@ class DnsConfigServicePosix::Watcher { @@ -396,8 +396,8 @@ index 2e0f06b0c1e4b1670bfe8145b3c5abb178b47d62..2f9483283a789a69d7e85536620daa2e bool Watch() { bool success = true; +#ifndef MAS_BUILD - if (!config_watcher_.Watch(base::Bind(&Watcher::OnConfigChanged, - base::Unretained(this)))) { + if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged, + base::Unretained(this)))) { LOG(ERROR) << "DNS config watch failed to start."; @@ -267,6 +268,7 @@ class DnsConfigServicePosix::Watcher { DNS_CONFIG_WATCH_MAX); 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 034674cdbdfa..5b18c9cef926 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 591d4ae7a87f580be9b9c44dcc50ef9fe99ca048..360cb62fac2c54a9202750bb4656692a17d49d81 100644 +index 7ce55da4749eeb3e774a5f0e069e73400ef392c7..9d340a9207d2e0b71e0726a0904282e160e036ae 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -98,6 +98,11 @@ +@@ -99,6 +99,11 @@ #include "services/network/url_loader.h" #include "services/network/url_request_context_builder_mojo.h" @@ -22,7 +22,7 @@ index 591d4ae7a87f580be9b9c44dcc50ef9fe99ca048..360cb62fac2c54a9202750bb4656692a #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -351,6 +356,79 @@ bool UsingBuiltinCertVerifier( +@@ -352,6 +357,79 @@ bool UsingBuiltinCertVerifier( } // namespace @@ -102,7 +102,7 @@ index 591d4ae7a87f580be9b9c44dcc50ef9fe99ca048..360cb62fac2c54a9202750bb4656692a constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -519,6 +597,13 @@ void NetworkContext::SetClient( +@@ -520,6 +598,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -116,7 +116,7 @@ index 591d4ae7a87f580be9b9c44dcc50ef9fe99ca048..360cb62fac2c54a9202750bb4656692a void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -1677,6 +1762,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1683,6 +1768,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { base::CommandLine::ForCurrentProcess(); std::unique_ptr cert_verifier; @@ -124,7 +124,7 @@ index 591d4ae7a87f580be9b9c44dcc50ef9fe99ca048..360cb62fac2c54a9202750bb4656692a if (g_cert_verifier_for_testing) { cert_verifier = std::make_unique(); } else { -@@ -1725,8 +1811,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1731,8 +1817,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { } #endif #if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) @@ -135,7 +135,7 @@ index 591d4ae7a87f580be9b9c44dcc50ef9fe99ca048..360cb62fac2c54a9202750bb4656692a std::make_unique( std::make_unique( UsingBuiltinCertVerifier(params_->use_builtin_cert_verifier) -@@ -1736,12 +1822,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1742,12 +1828,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { cert_net_fetcher_)))); } #endif @@ -190,7 +190,7 @@ index e9ab2a090f3eb19533376ed44cd5f344e738593e..abc82d01185e1d3320bfd82bcd170542 // 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 629867dbafd640fa70b9eae27e65ab83919f9ad9..c1b292368f351dbceecf51dd7b573ac760924da1 100644 +index b74677de805cc6f46c34b79883e0500ba337d82a..1d9ffd3de180e3256fb63a497544feeb427ae7ff 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -193,6 +193,17 @@ struct HttpAuthStaticNetworkContextParams { @@ -211,7 +211,7 @@ index 629867dbafd640fa70b9eae27e65ab83919f9ad9..c1b292368f351dbceecf51dd7b573ac7 // Parameters for constructing a network context. struct NetworkContextParams { // Name used by memory tools to identify the context. -@@ -842,6 +853,9 @@ interface NetworkContext { +@@ -845,6 +856,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index f49efa06dcc7..66d69dde7bd3 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 0fcd5010ded1bffe44291ca38ef2d6ce92db701b..698d19da7a75d2fbd0e9ee9568292030d229dc73 100644 +index 7876253c01d3058f29fc68ad3b0c16d5e4ff3361..ab4955c9ccec6653f15a8b358b512f29aa7989a3 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -2086,7 +2086,7 @@ void RenderProcessHostImpl::CreateNotificationService( diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 41b71261c728..b8afcff16f8a 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -406,18 +406,18 @@ 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 fa113e7596aca64482f72108ffc0def4af322b28..d56b0ac675b76d9165f866bb6b9ce98731e6ceb5 100644 +index 12268c0ca1b7ecdeb4a856c7c607d875f50bb7c3..16a9bdfb8c482356e357707ba4e8d846b5e4c0f3 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -38,6 +38,7 @@ - #include "net/base/escape.h" +@@ -41,6 +41,7 @@ #include "printing/buildflags/buildflags.h" #include "printing/metafile_skia.h" + #include "printing/printing_features.h" +#include "printing/print_settings.h" #include "printing/units.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" #include "third_party/blink/public/common/frame/frame_owner_element_type.h" -@@ -1121,7 +1122,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1136,7 +1137,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { web_frame->DispatchBeforePrintEvent(); if (!weak_this) return; @@ -427,7 +427,7 @@ index fa113e7596aca64482f72108ffc0def4af322b28..d56b0ac675b76d9165f866bb6b9ce987 if (weak_this) web_frame->DispatchAfterPrintEvent(); } -@@ -1142,7 +1144,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1157,7 +1159,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -436,7 +436,7 @@ index fa113e7596aca64482f72108ffc0def4af322b28..d56b0ac675b76d9165f866bb6b9ce987 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > 1) return; -@@ -1156,7 +1158,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1171,7 +1173,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // If we are printing a PDF extension frame, find the plugin node and print // that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -445,7 +445,7 @@ index fa113e7596aca64482f72108ffc0def4af322b28..d56b0ac675b76d9165f866bb6b9ce987 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1173,7 +1175,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1188,7 +1190,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { return; } Print(frame, print_preview_context_.source_node(), @@ -454,7 +454,7 @@ index fa113e7596aca64482f72108ffc0def4af322b28..d56b0ac675b76d9165f866bb6b9ce987 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1213,6 +1215,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1228,6 +1230,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > 1) return; @@ -463,7 +463,7 @@ index fa113e7596aca64482f72108ffc0def4af322b28..d56b0ac675b76d9165f866bb6b9ce987 print_preview_context_.OnPrintPreview(); base::UmaHistogramEnumeration(print_preview_context_.IsForArc() -@@ -1570,13 +1574,13 @@ bool PrintRenderFrameHelper::FinalizePrintReadyDocument() { +@@ -1585,13 +1589,13 @@ bool PrintRenderFrameHelper::FinalizePrintReadyDocument() { print_preview_context_.set_error(PREVIEW_ERROR_METAFILE_CAPTURE_FAILED); return false; } @@ -484,7 +484,7 @@ index fa113e7596aca64482f72108ffc0def4af322b28..d56b0ac675b76d9165f866bb6b9ce987 } preview_params.document_cookie = print_pages_params_->params.document_cookie; -@@ -1711,7 +1715,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1726,7 +1730,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { auto self = weak_ptr_factory_.GetWeakPtr(); Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -495,7 +495,7 @@ index fa113e7596aca64482f72108ffc0def4af322b28..d56b0ac675b76d9165f866bb6b9ce987 // Check if |this| is still valid. if (!self) return; -@@ -1722,7 +1728,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1737,7 +1743,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -506,7 +506,7 @@ index fa113e7596aca64482f72108ffc0def4af322b28..d56b0ac675b76d9165f866bb6b9ce987 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1730,7 +1738,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1745,7 +1753,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); int expected_page_count = 0; @@ -515,7 +515,7 @@ index fa113e7596aca64482f72108ffc0def4af322b28..d56b0ac675b76d9165f866bb6b9ce987 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1750,8 +1758,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1765,8 +1773,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, PrintMsg_PrintPages_Params print_settings; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -529,7 +529,7 @@ index fa113e7596aca64482f72108ffc0def4af322b28..d56b0ac675b76d9165f866bb6b9ce987 // Check if |this| is still valid. if (!self) return; -@@ -1986,10 +1997,23 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2001,10 +2012,23 @@ void PrintRenderFrameHelper::IPCProcessed() { base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); } @@ -556,7 +556,7 @@ index fa113e7596aca64482f72108ffc0def4af322b28..d56b0ac675b76d9165f866bb6b9ce987 // 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. -@@ -2009,12 +2033,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { +@@ -2024,12 +2048,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { return result; } diff --git a/patches/chromium/put_back_deleted_colors_for_autofill.patch b/patches/chromium/put_back_deleted_colors_for_autofill.patch index 1404514d6e25..290a28d825ed 100644 --- a/patches/chromium/put_back_deleted_colors_for_autofill.patch +++ b/patches/chromium/put_back_deleted_colors_for_autofill.patch @@ -42,7 +42,7 @@ index 0b035ec92d0df57e36be7ef5dd18baf9395b0dca..78f6bfad629640baab5f1eee88d4b900 // TODO(thomasanderson): Render GtkSpinner directly. case ui::NativeTheme::kColorId_ThrobberSpinningColor: diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc -index 901ac8794286e84be347d4f85946cc799bacb360..ec3a6195ba8728d4c55ae38f01ed71d0fc58ab28 100644 +index baa857e8655977fa524621c63e3382fadd3a6d9e..c629cec16ef9db7ebb28c4a15ea4741d8ddc4fd7 100644 --- a/ui/native_theme/common_theme.cc +++ b/ui/native_theme/common_theme.cc @@ -59,6 +59,14 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id, @@ -79,27 +79,27 @@ index 901ac8794286e84be347d4f85946cc799bacb360..ec3a6195ba8728d4c55ae38f01ed71d0 // Material spinner/throbber case NativeTheme::kColorId_ThrobberSpinningColor: return gfx::kGoogleBlue600; -diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index 832585d9ed6cc232ba2b23ef6b5b90055d561168..c5fd22fba2cd83084311b324a3018039cdf0be4d 100644 ---- a/ui/native_theme/native_theme.h -+++ b/ui/native_theme/native_theme.h -@@ -424,6 +424,11 @@ class NATIVE_THEME_EXPORT NativeTheme { - kColorId_TableHeaderText, - kColorId_TableHeaderBackground, - kColorId_TableHeaderSeparator, -+ // Results Tables, such as the omnibox -+ kColorId_ResultsTableNormalBackground, -+ kColorId_ResultsTableHoveredBackground, -+ kColorId_ResultsTableNormalText, -+ kColorId_ResultsTableDimmedText, - // Colors for the material spinner (aka throbber). - kColorId_ThrobberSpinningColor, - kColorId_ThrobberWaitingColor, +diff --git a/ui/native_theme/native_theme_color_id.h b/ui/native_theme/native_theme_color_id.h +index 85a7da0060f7e03081ec7e63dc0a367cef53fc7c..2d1a3c0159407b0c98ac6a3099e0e45e99240b64 100644 +--- a/ui/native_theme/native_theme_color_id.h ++++ b/ui/native_theme/native_theme_color_id.h +@@ -116,6 +116,11 @@ + OP(kColorId_TableHeaderText), \ + OP(kColorId_TableHeaderBackground), \ + OP(kColorId_TableHeaderSeparator), \ ++ /* Results Tables, such as the omnibox */ \ ++ OP(kColorId_ResultsTableNormalBackground), \ ++ OP(kColorId_ResultsTableHoveredBackground), \ ++ OP(kColorId_ResultsTableNormalText), \ ++ OP(kColorId_ResultsTableDimmedText), \ + /* Colors for the material spinner (aka throbber). */ \ + OP(kColorId_ThrobberSpinningColor), \ + OP(kColorId_ThrobberWaitingColor), \ diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index 53b4980bf65935e5028aa3b15c6be407069b669b..4bdaa3da0540e49f6794fcaf4d89780cd32720b2 100644 +index 07db545df305a0c22375e9be3fad05621f69867a..dedaaaeaa93e55ec784f94864d670e0659d839bf 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc -@@ -619,6 +619,18 @@ SkColor NativeThemeWin::GetPlatformHighContrastColor(ColorId color_id) const { +@@ -639,6 +639,18 @@ SkColor NativeThemeWin::GetPlatformHighContrastColor(ColorId color_id) const { case kColorId_ThrobberWaitingColor: return system_colors_[SystemThemeColor::kGrayText]; diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index a06f24e3e2b5..38afde36b61a 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 11ca4f7da7a4bc5cec698f226702ca30c13e88f1..86f6c21c18b21f43c8dcb2d4997b1c3b42b64639 100644 +index 123f2a6c133453763949829c4c5089554d6bd537..d9771a32069600f48b82870856e93ee5c4acc926 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1461,7 +1461,7 @@ if (is_chrome_branded && !is_android) { +@@ -1464,7 +1464,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 11ca4f7da7a4bc5cec698f226702ca30c13e88f1..86f6c21c18b21f43c8dcb2d4997b1c3b chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1481,6 +1481,12 @@ if (!is_android) { +@@ -1484,6 +1484,12 @@ if (!is_android) { } } diff --git a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch index 97e4ce729e0f..48bc0d5e31fa 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 e2e4951fbdd08b19c0372659bb82f5d7fb0dc6d5..30cce2ae6b12d7d0d9a097b0ef5bf6f0a1828978 100644 +index 6600de77c3f6c6a1a2409e0afe503d752038c9fa..9fa08ef75c82a75de4edad5694b8d07aae3fba83 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -1269,6 +1269,25 @@ bool ChromeContentRendererClient::AllowPopup() { +@@ -1273,6 +1273,25 @@ bool ChromeContentRendererClient::AllowPopup() { #endif } @@ -39,10 +39,10 @@ index e2e4951fbdd08b19c0372659bb82f5d7fb0dc6d5..30cce2ae6b12d7d0d9a097b0ef5bf6f0 WebLocalFrame* frame, ui::PageTransition transition_type, diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h -index bb88a967a002e44311c299c53773336f5aad8bb9..f2d3da0ff49647ba9b3a4509374f104c905ed602 100644 +index 8969adb44800e925c9066e51793463c09eb78622..d11a4fdf04f7632fb1191c28c83f1d66ce0e5bf2 100644 --- a/chrome/renderer/chrome_content_renderer_client.h +++ b/chrome/renderer/chrome_content_renderer_client.h -@@ -127,6 +127,11 @@ class ChromeContentRendererClient +@@ -126,6 +126,11 @@ class ChromeContentRendererClient base::SingleThreadTaskRunner* compositor_thread_task_runner) override; bool RunIdleHandlerWhenWidgetsHidden() override; bool AllowPopup() override; @@ -74,7 +74,7 @@ index c4c0e27127ff2976db4e78cf5a02bd22d1c667d3..a4318511d1081d4f101cb2f18ca5fa20 blink::WebLocalFrame* frame, ui::PageTransition transition_type, diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 93080b2bfea5565899b6ea1908d2ac9b7e97ec87..493d9ae6d1546fab0e37331d4fc3f0d56437f99d 100644 +index ee2079537feb23869fe4f812bcef33e1d7de29a7..93287ae0928b52f9df34834ad1a8ef0e54367882 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h @@ -213,6 +213,13 @@ class CONTENT_EXPORT ContentRendererClient { @@ -92,10 +92,10 @@ index 93080b2bfea5565899b6ea1908d2ac9b7e97ec87..493d9ae6d1546fab0e37331d4fc3f0d5 // |url|. If the function returns a valid |new_url|, the request must be // updated to use it. The |attach_same_site_cookies| output parameter diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 61db7a2e08d5b88587fcd6a0d9ee43027a3f2bf6..ff5367c33baca311a54d481a1328bf474b41a430 100644 +index 61e62d5e08d457f5a60ea41872628a6b4d1e950c..d67175cebf263a8efc314003ed1b9f1952daf960 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -5682,6 +5682,23 @@ void RenderFrameImpl::BeginNavigation( +@@ -5676,6 +5676,23 @@ void RenderFrameImpl::BeginNavigation( int cumulative_bindings = RenderProcess::current()->GetEnabledBindings(); bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) || (cumulative_bindings & kWebUIBindingsPolicyMask); diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 95007bc8e395..d1191f67eea8 100644 --- a/patches/chromium/scroll_bounce_flag.patch +++ b/patches/chromium/scroll_bounce_flag.patch @@ -6,7 +6,7 @@ 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 9aa93fb7fa4c043f8be337de88bfc627af721b07..5d8b63a0db78f17254ab461cc3b3ebe64213969e 100644 +index 8c0fe45b6865635a2ebd35445ad1c3e0e7c2d4c4..04a5316c81dc4371807960c8a5f4d8e79d7e193f 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -1345,7 +1345,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() { diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index aa31eb8c03a8..edbeac709c0e 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 698d19da7a75d2fbd0e9ee9568292030d229dc73..54b5fd4f20ab3a37eb29772fcf49838dd22cf2ba 100644 +index ab4955c9ccec6653f15a8b358b512f29aa7989a3..c4c55c26bf00373502d319536433485b851af5b0 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -416,6 +416,11 @@ class RendererSandboxedProcessLauncherDelegate diff --git a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch index 7b73212bba0a..1e68ef6cf1ef 100644 --- a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch +++ b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch @@ -6,7 +6,7 @@ Subject: unsandboxed_ppapi_processes_skip_zygote.patch Unsandboxed ppapi processes should skip zygote. diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc -index 620bd686edb8d623f790909db745f16eba507a1a..6ca4cabbdd451b5ef4cd9ee30d3160e4d27c9030 100644 +index 0fa99dc66e837110595d993114bb12b93ebf8a2d..ff5eeec244933de21afa8f97c574c1c4988d83f1 100644 --- a/content/browser/ppapi_plugin_process_host.cc +++ b/content/browser/ppapi_plugin_process_host.cc @@ -123,6 +123,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 34365aa54b8f..dc824893145c 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 e6abd33d9c80ff4b02b9aa3ce3fc7b9692c08015..cdb3fb99ee231b61f3668391d3e7282576246080 100644 +index 84587a78262128fb03bad83e8b51cba2755eab6c..611ba2b46eaf4f3d9b69c3c1eeb7824a3a9ece48 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2094,6 +2094,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2100,6 +2100,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 e6abd33d9c80ff4b02b9aa3ce3fc7b9692c08015..cdb3fb99ee231b61f3668391d3e72825 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2104,6 +2110,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2110,6 +2116,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -34,7 +34,7 @@ index e6abd33d9c80ff4b02b9aa3ce3fc7b9692c08015..cdb3fb99ee231b61f3668391d3e72825 CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index 338ac21a7205f27851e93eb1ec624a381a2f782e..e91009511ac8644b2dc11e823d3f86945bfc512c 100644 +index 65d6373115587dea79ef33b28ec898e9142f08ea..b28d70d9288fa94a55c4d460c68df1a38a2dfbff 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -78,9 +78,12 @@ class BrowserPluginGuestDelegate; diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 3ce4ae522535..c8a42b505758 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected: https://chromium-review.googlesource.com/c/chromium/src/+/1954347 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 5ab8f195209718731c7e6af5a61c9e447e1df1b9..93080b2bfea5565899b6ea1908d2ac9b7e97ec87 100644 +index 56062bb2680a71103d3c600697dfae03e265ef15..ee2079537feb23869fe4f812bcef33e1d7de29a7 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -382,6 +382,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -373,6 +373,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,10 +26,10 @@ index 5ab8f195209718731c7e6af5a61c9e447e1df1b9..93080b2bfea5565899b6ea1908d2ac9b // 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 c7bfe84ae56838d0beeb10cc978000087437bbcb..e4cfb5d8e3f82e40c6746c97ec242f7ddd6c3513 100644 +index d3811481eeba08129e64bd78f1382dbbae5489d8..0403f5665d656dd12b0e43a1c3b683e595be1b0c 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -879,6 +879,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -864,6 +864,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index c7bfe84ae56838d0beeb10cc978000087437bbcb..e4cfb5d8e3f82e40c6746c97ec242f7d const v8::Local& worker) { GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 096cd162c7d5228fea0c56ad007b9939e6f27809..1c332800cb133f93d21ee628b3b85e89ab6d7da7 100644 +index bb6da44af9aa825b2b7407f93ae4ce6392ef7982..30ac11d33df17941f8de70702d0b96199a4fe29d 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -181,6 +181,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -178,6 +178,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -55,10 +55,10 @@ index 096cd162c7d5228fea0c56ad007b9939e6f27809..1c332800cb133f93d21ee628b3b85e89 const blink::WebString& header_name) override; diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index 7d00b2a49d37c6e5ecdbfb08c8f273cc1d5b61f2..a68f9d16fbd1142a1ebda0a8fd1b29defb632b8f 100644 +index 16cf044a8c2b41b02ec42c987ec7b991bfef8eb8..74717a0c809000a2725ed83fdae24841ddb59788 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -622,6 +622,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -615,6 +615,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/v8/add_realloc.patch b/patches/v8/add_realloc.patch index 4f643fa7fdf7..dee132d8b5eb 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 52af897c98b8a0da92d562d0b96894a09ab4c215..80147ed47a6735876a2944e8c4c8c0a38e4c2553 100644 +index 96d6cb815c5a733a1f04117781fe88909c4e67bc..b97acc4cd3d3125512b927b201ed83334f556baf 100644 --- a/include/v8.h +++ b/include/v8.h @@ -5003,6 +5003,13 @@ class V8_EXPORT ArrayBuffer : public Object { @@ -30,7 +30,7 @@ index 52af897c98b8a0da92d562d0b96894a09ab4c215..80147ed47a6735876a2944e8c4c8c0a3 * 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 d1c1913b4127d689d399a911f41e876adb0e6e93..e93f594c197fb6e90f6f031c2fad3241dde145c3 100644 +index 0294e383fe47f4b16e70d84f8afa2f351fb650ab..1a2cd2c1566fab5ec67a23956bcf998e4252f84f 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 a5eab6b986af..0e2b52eb977e 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 c12bf2dc76ec831054e8ee8753bcc772fda06736..d0346a6537a9edbd04c6fd75a345d1fb50bcffa1 100644 +index 6c1088d932f3bc6eedec49a329120275a4fd8a2d..a04cd604ab7b7c300f7d7b4a7034d03397f3728f 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -310,7 +310,7 @@ config("internal_config") { - ":v8_header_features", +@@ -311,7 +311,7 @@ config("internal_config") { + ":v8_tracing_config", ] - if (is_component_build) { @@ -21,7 +21,7 @@ index c12bf2dc76ec831054e8ee8753bcc772fda06736..d0346a6537a9edbd04c6fd75a345d1fb defines += [ "BUILDING_V8_SHARED" ] } } -@@ -3959,7 +3959,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -3971,7 +3971,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index c12bf2dc76ec831054e8ee8753bcc772fda06736..d0346a6537a9edbd04c6fd75a345d1fb deps = [ ":v8_libbase", -@@ -3992,6 +3992,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -4004,6 +4004,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index e4a6fb5e5feb..c88127475442 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 e93f594c197fb6e90f6f031c2fad3241dde145c3..058cc1c07458610dd4cde7ba481fdf94580d4b57 100644 +index 1a2cd2c1566fab5ec67a23956bcf998e4252f84f..2de35499e25a930169af6b82e82e3c38b65da0b7 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -8688,7 +8688,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -8689,7 +8689,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index e93f594c197fb6e90f6f031c2fad3241dde145c3..058cc1c07458610dd4cde7ba481fdf94 isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index 6db19d85ede0233484e760b7895b437fb349f505..3280d76cf25c2c3ef9cf0cf01487389ceff625e8 100644 +index 687122d04f0569f6b8e1bc2f177b2d9f7dc775f5..5034492ec5f88fcc5c1b6c4b3d2dea3c52258a3e 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -5470,9 +5470,9 @@ void Heap::TearDown() { +@@ -5474,9 +5474,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 a58a9143269b..6d1aac2150cd 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 25657e38fb009370e57fbda73d8de9a16b6995e6..8bc3442964131428ac0afafca3c469cf23936151 100644 +index 45c7580386a2a5cb3eadf79da493f7077e52adc4..e2365d005b2c1b1a606a9621873fecca301ecb19 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -310,6 +310,10 @@ config("internal_config") { - ":v8_header_features", +@@ -311,6 +311,10 @@ config("internal_config") { + ":v8_tracing_config", ] + if (!is_component_build && is_electron_build) { diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index c50cb4e0c189..b0ca0106ea7a 100644 --- a/patches/v8/export_symbols_needed_for_windows_build.patch +++ b/patches/v8/export_symbols_needed_for_windows_build.patch @@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build These symbols are required to build v8 with BUILD_V8_SHARED on Windows. diff --git a/src/objects/objects.h b/src/objects/objects.h -index 9153bf96a38b8f40ed6656e52d7d829fa5e63f79..ed302c954892b02ad2dbc165a44ee5ef164f9e89 100644 +index ef437446fd6378e9749ce1b0d3c428f6aaac559c..3f2063d15bbdc587ea29bec4c889d1e09d7688bb 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -810,7 +810,7 @@ enum class KeyCollectionMode { +@@ -811,7 +811,7 @@ enum class KeyCollectionMode { // Utility superclass for stack-allocated objects that must be updated // on gc. It provides two ways for the gc to update instances, either // iterating or updating after gc. @@ -19,7 +19,7 @@ index 9153bf96a38b8f40ed6656e52d7d829fa5e63f79..ed302c954892b02ad2dbc165a44ee5ef explicit inline Relocatable(Isolate* isolate); inline virtual ~Relocatable(); diff --git a/src/objects/ordered-hash-table.h b/src/objects/ordered-hash-table.h -index 590846f1302775c0ee0f85767d23701bf99c9133..611874eaf7a5132478006a87ca1a5939fe754785 100644 +index b587960432caf56601920678686480f2f1dd5abc..3c08eb044115db534eb880b867e0d03802dc9615 100644 --- a/src/objects/ordered-hash-table.h +++ b/src/objects/ordered-hash-table.h @@ -60,7 +60,7 @@ namespace internal { diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index bfec8b6b9848..0fbbcba75046 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 d0346a6537a9edbd04c6fd75a345d1fb50bcffa1..25657e38fb009370e57fbda73d8de9a16b6995e6 100644 +index a04cd604ab7b7c300f7d7b4a7034d03397f3728f..45c7580386a2a5cb3eadf79da493f7077e52adc4 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -3970,7 +3970,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -3982,7 +3982,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index 85c59d7b354a..6751611025ed 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -635,7 +635,7 @@ void Session::DownloadURL(const GURL& url) { auto* download_manager = content::BrowserContext::GetDownloadManager(browser_context()); auto download_params = std::make_unique( - url, MISSING_TRAFFIC_ANNOTATION, net::NetworkIsolationKey()); + url, MISSING_TRAFFIC_ANNOTATION); download_manager->DownloadUrl(std::move(download_params)); } diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index e130d91b3c94..7c75b5a0e5b8 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -89,7 +89,7 @@ #include "third_party/blink/public/common/page/page_zoom.h" #include "third_party/blink/public/mojom/frame/find_in_page.mojom.h" #include "third_party/blink/public/mojom/frame/fullscreen.mojom.h" -#include "third_party/blink/public/platform/web_cursor_info.h" +#include "ui/base/cursor/cursor.h" #include "ui/base/mojom/cursor_type.mojom-shared.h" #include "ui/display/screen.h" #include "ui/events/base_event_utils.h" diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index a2fdc43f7cd9..d7a2528f85d6 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1474,6 +1474,21 @@ void BindMimeHandlerService( extensions::MimeHandlerServiceImpl::Create(guest_view->GetStreamWeakPtr(), std::move(receiver)); } + +void BindBeforeUnloadControl( + content::RenderFrameHost* frame_host, + mojo::PendingReceiver + receiver) { + auto* web_contents = content::WebContents::FromRenderFrameHost(frame_host); + if (!web_contents) + return; + + auto* guest_view = + extensions::MimeHandlerViewGuest::FromWebContents(web_contents); + if (!guest_view) + return; + guest_view->FuseBeforeUnloadControl(std::move(receiver)); +} #endif void ElectronBrowserClient::RegisterBrowserInterfaceBindersForFrame( @@ -1484,6 +1499,28 @@ void ElectronBrowserClient::RegisterBrowserInterfaceBindersForFrame( #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) map->Add( base::BindRepeating(&BindMimeHandlerService)); + map->Add( + base::BindRepeating(&BindBeforeUnloadControl)); + + content::WebContents* web_contents = + content::WebContents::FromRenderFrameHost(render_frame_host); + if (!web_contents) + return; + + const GURL& site = render_frame_host->GetSiteInstance()->GetSiteURL(); + if (!site.SchemeIs(extensions::kExtensionScheme)) + return; + + content::BrowserContext* browser_context = + render_frame_host->GetProcess()->GetBrowserContext(); + auto* extension = extensions::ExtensionRegistry::Get(browser_context) + ->enabled_extensions() + .GetByID(site.host()); + if (!extension) + return; + extensions::ExtensionsBrowserClient::Get() + ->RegisterBrowserInterfaceBindersForFrame(map, render_frame_host, + extension); #endif } diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index d05c250667ef..9ea6a1891eaa 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/shell/browser/extensions/electron_extensions_browser_client.cc @@ -25,6 +25,7 @@ #include "extensions/browser/core_extensions_browser_api_provider.h" #include "extensions/browser/event_router.h" #include "extensions/browser/extension_protocols.h" +#include "extensions/browser/extensions_browser_interface_binders.h" #include "extensions/browser/null_app_sorting.h" #include "extensions/browser/updater/null_extension_cache.h" #include "extensions/browser/url_request_util.h" @@ -364,6 +365,8 @@ std::string ElectronExtensionsBrowserClient::GetUserAgent() const { void ElectronExtensionsBrowserClient::RegisterBrowserInterfaceBindersForFrame( service_manager::BinderMapWithContext* map, content::RenderFrameHost* render_frame_host, - const extensions::Extension* extension) const {} + const extensions::Extension* extension) const { + PopulateExtensionFrameBinders(map, render_frame_host, extension); +} } // namespace electron diff --git a/shell/common/gin_converters/blink_converter.cc b/shell/common/gin_converters/blink_converter.cc index 694c42fba77d..0addfc36f507 100644 --- a/shell/common/gin_converters/blink_converter.cc +++ b/shell/common/gin_converters/blink_converter.cc @@ -443,8 +443,7 @@ v8::Local Converter::ToV8( return StringToV8(isolate, "no-referrer"); case network::mojom::ReferrerPolicy::kOrigin: return StringToV8(isolate, "origin"); - case network::mojom::ReferrerPolicy:: - kNoReferrerWhenDowngradeOriginWhenCrossOrigin: + case network::mojom::ReferrerPolicy::kStrictOriginWhenCrossOrigin: return StringToV8(isolate, "strict-origin-when-cross-origin"); case network::mojom::ReferrerPolicy::kSameOrigin: return StringToV8(isolate, "same-origin"); @@ -472,8 +471,7 @@ bool Converter::FromV8( else if (policy == "origin") *out = network::mojom::ReferrerPolicy::kOrigin; else if (policy == "strict-origin-when-cross-origin") - *out = network::mojom::ReferrerPolicy:: - kNoReferrerWhenDowngradeOriginWhenCrossOrigin; + *out = network::mojom::ReferrerPolicy::kStrictOriginWhenCrossOrigin; else if (policy == "same-origin") *out = network::mojom::ReferrerPolicy::kSameOrigin; else if (policy == "strict-origin")