diff --git a/.circleci/config.yml b/.circleci/config.yml index 00d3068bde27d..4f9c17e446865 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1945,7 +1945,7 @@ jobs: checkout: false linux-arm-testing: - <<: *machine-linux-xlarge + <<: *machine-linux-2xlarge environment: <<: *env-global <<: *env-arm @@ -2012,7 +2012,7 @@ jobs: checkout: false linux-arm64-testing: - <<: *machine-linux-xlarge + <<: *machine-linux-2xlarge environment: <<: *env-global <<: *env-arm64 diff --git a/DEPS b/DEPS index 9986412aaf974..37952ac21a635 100644 --- a/DEPS +++ b/DEPS @@ -14,7 +14,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - 'b04584161e07d4ac110045b7647fa8a81f5f0709', + '87.0.4251.1', 'node_version': 'v12.18.3', 'nan_version': diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index cabaf6367de3d..23b2b7f8d321c 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set. This should be upstreamed. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index ed134d1d40fb23808a4cc251be50a7fbd833b49b..5aaf2356cc2c0fec9a90f3201f1e16553c69a5e3 100644 +index 1bb696ec5a89fd2215e523a9e320c6d74bd79a42..c0cbe3a2920b0cb453b847be7a0dc8a167ab3f9f 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -255,6 +255,10 @@ int GpuMain(const MainFunctionParams& parameters) { +@@ -256,6 +256,10 @@ int GpuMain(const MainFunctionParams& parameters) { // to the GpuProcessHost once the GpuServiceImpl has started. viz::GpuServiceImpl::InstallPreInitializeLogHandler(); @@ -24,7 +24,7 @@ index ed134d1d40fb23808a4cc251be50a7fbd833b49b..5aaf2356cc2c0fec9a90f3201f1e1655 // We are experiencing what appear to be memory-stomp issues in the GPU // process. These issues seem to be impacting the task executor and listeners // registered to it. Create the task executor on the heap to guard against -@@ -389,7 +393,6 @@ int GpuMain(const MainFunctionParams& parameters) { +@@ -394,7 +398,6 @@ int GpuMain(const MainFunctionParams& parameters) { } #endif diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 244c95ecb56e4..03b3b8d3065b5 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the context, which can cause some preload scripts to trip. diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h -index e1bd458060e2eba703562121f134d0eede7c1986..7b9f534dbfff58c0778a2a4b0c79adb73c8fc377 100644 +index 8ab07f180b0e5d7baaa314cf1121c7182de7cce9..feb76f5278ba11f82c65e298d9772fc8742739a9 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h @@ -115,6 +115,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, @@ -23,10 +23,10 @@ index e1bd458060e2eba703562121f134d0eede7c1986..7b9f534dbfff58c0778a2a4b0c79adb7 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 62f6c5fd2ca94ac36851a952b5c1be3430331d60..68d2666696de00c28d57f9745f5ca902d2c16bc9 100644 +index 2a202b7a21744a4d736831de74cfbf5cbbed22b2..fd2f73901ec6f565033af71f99d531aecab0233f 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4940,6 +4940,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4978,6 +4978,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index 62f6c5fd2ca94ac36851a952b5c1be3430331d60..68d2666696de00c28d57f9745f5ca902 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 0a1647b88f70b6a669e922fdc6bf3b55a3acd745..9befc7bd8fd78de9cdea25dbc860af651d87c042 100644 +index adf5764a4dc452dee870954063950980171bcfd6..a5660ad498e1a9df255f1302bea8144de3eded3f 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -729,6 +729,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -730,6 +730,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 0a1647b88f70b6a669e922fdc6bf3b55a3acd745..9befc7bd8fd78de9cdea25dbc860af65 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 e07d735a401ac23b3516fecef5a6a6094d2d0af3..e1d1502e839822277fef42e4e43e4f771485e335 100644 +index 55fcd230465f4732066188dca62c120b7d875378..97e297d4010c02cdf0af7361a5538e11790746a6 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -532,6 +532,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -541,6 +541,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -67,7 +67,7 @@ index e07d735a401ac23b3516fecef5a6a6094d2d0af3..e1d1502e839822277fef42e4e43e4f77 virtual void WillReleaseScriptContext(v8::Local, int32_t world_id) {} diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc -index 5467a8c10153d7e88d58d8bcbccbd1716a82870a..9311077be9fd1540e504aa1995bfb6171119d200 100644 +index 81287dbc57a55f02945a66801ea62b0e0dfe262c..8d084e236d4f0d142a2414c55a8b8aab51f41622 100644 --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc @@ -203,6 +203,7 @@ void LocalWindowProxy::Initialize() { @@ -79,7 +79,7 @@ index 5467a8c10153d7e88d58d8bcbccbd1716a82870a..9311077be9fd1540e504aa1995bfb617 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 b849df64ee16f08d2370638fbe14ed364b2c0650..f38e3cfb85d5d5da9a429fd51dec0cd335a1a930 100644 +index b99784880e15e5b8f8dbe2ae1616d71ffd7a16d1..d6bbf992272e13e2f4f2478af66c6e4ce19e3d24 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 @@ -392,6 +392,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( @@ -97,7 +97,7 @@ index b849df64ee16f08d2370638fbe14ed364b2c0650..f38e3cfb85d5d5da9a429fd51dec0cd3 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 dd60568c183c164bede36c69260866399b7e4b79..ab05496705b4aeeedf14af4c509a32c1d4382bb8 100644 +index 1a9e59e20ebfcdaac5fc3a3b4098e4ec6f9192f4..7da3cdcf3ca099e81b8ac94e87c697ad2d841e61 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 @@ -77,6 +77,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -123,10 +123,10 @@ index 831ce5ccc32676790307d49416a3a40e7e3652bc..8898a6162a759a3a4d313d8956051b62 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 c233b9b5067c7833e773926585bcb774641faf05..2d2bee9cf782851a93d1e2e021f3890893fa11f2 100644 +index 8080a1b3c4efe3854bd12dc4d714838a4e135689..d16d2572a37b46028dfa8d7554f97289918bf792 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -331,6 +331,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -325,6 +325,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch b/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch index 403b9d55ea318..711885308ca7d 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 7dc2d14d47d395e3b8046cae8788c4e04bc8e7f3..55068e71568a022bbf335147e6b35c24402d43ad 100644 +index 113006d65c011bacd856c471d93dbff71254f034..d9e327e72ddf86f79387fa3c003e56379f3096a5 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -214,6 +214,25 @@ struct CTPolicy { @@ -39,7 +39,7 @@ index 7dc2d14d47d395e3b8046cae8788c4e04bc8e7f3..55068e71568a022bbf335147e6b35c24 interface CertVerifierClient { Verify( int32 default_error, -@@ -647,6 +666,8 @@ struct URLLoaderFactoryParams { +@@ -659,6 +678,8 @@ struct URLLoaderFactoryParams { // impact because of the extra process hops, so use should be minimized. pending_remote? header_client; @@ -49,10 +49,10 @@ index 7dc2d14d47d395e3b8046cae8788c4e04bc8e7f3..55068e71568a022bbf335147e6b35c24 // the per-context allow patterns that is managed via NetworkContext // interface. This still respects the per-context block lists. diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index c209506ca5f450f4611cb339f6d9876175eb713e..d4ff5100be651655140ca024fec12a7d98baa00e 100644 +index 2527d28a4af8116e410f286f8511b778d6db0f5b..9ded831c921c1f7e3eabac4549a70570c13bd5c2 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -473,6 +473,7 @@ URLLoader::URLLoader( +@@ -483,6 +483,7 @@ URLLoader::URLLoader( base::WeakPtr keepalive_statistics_recorder, base::WeakPtr network_usage_accumulator, mojom::TrustedURLLoaderHeaderClient* url_loader_header_client, @@ -60,7 +60,7 @@ index c209506ca5f450f4611cb339f6d9876175eb713e..d4ff5100be651655140ca024fec12a7d mojom::OriginPolicyManager* origin_policy_manager, std::unique_ptr trust_token_helper_factory, mojo::PendingRemote cookie_observer) -@@ -536,6 +537,11 @@ URLLoader::URLLoader( +@@ -546,6 +547,11 @@ URLLoader::URLLoader( header_client_.set_disconnect_handler( base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this))); } @@ -72,7 +72,7 @@ index c209506ca5f450f4611cb339f6d9876175eb713e..d4ff5100be651655140ca024fec12a7d if (want_raw_headers_) { options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse | mojom::kURLLoadOptionSendSSLInfoForCertificateError; -@@ -1120,7 +1126,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, +@@ -1119,7 +1125,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, // |this| may have been deleted. return; } @@ -81,7 +81,7 @@ index c209506ca5f450f4611cb339f6d9876175eb713e..d4ff5100be651655140ca024fec12a7d OnAuthCredentials(base::nullopt); return; } -@@ -1136,11 +1142,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, +@@ -1135,11 +1141,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,7 +108,7 @@ index c209506ca5f450f4611cb339f6d9876175eb713e..d4ff5100be651655140ca024fec12a7d 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 51c6034e14c0ddbbf69e02f293590a810328bcbb..63b8b0a5349d0a6401cb6c71b116958d13acaf15 100644 +index a624b8c43f49a7db975d8deda753b18583db5d72..cce8d7e0b8847528715aca4704db5194829c5bbc 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h @@ -118,6 +118,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader @@ -119,7 +119,7 @@ index 51c6034e14c0ddbbf69e02f293590a810328bcbb..63b8b0a5349d0a6401cb6c71b116958d mojom::OriginPolicyManager* origin_policy_manager, std::unique_ptr trust_token_helper_factory, -@@ -471,6 +472,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -481,6 +482,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader base::Optional fetch_window_id_; mojo::Remote header_client_; diff --git a/patches/chromium/allow_nested_error_trackers.patch b/patches/chromium/allow_nested_error_trackers.patch index 0ba8cfec3285c..fa722fe722816 100644 --- a/patches/chromium/allow_nested_error_trackers.patch +++ b/patches/chromium/allow_nested_error_trackers.patch @@ -20,15 +20,15 @@ least harm in the interim by removing the check that prevents more than one tracker from existing at a time. diff --git a/ui/gfx/x/x11_error_tracker.cc b/ui/gfx/x/x11_error_tracker.cc -index 6592ae0483884815697358040123eed5ee657816..d6862673c0b5a61db550c084291787ad1549db69 100644 +index 2e6addccf11ae33de6b4bb1de0a921deff36dd9d..59742930aa1eb488568068a3a4f1c4127a1ca18f 100644 --- a/ui/gfx/x/x11_error_tracker.cc +++ b/ui/gfx/x/x11_error_tracker.cc -@@ -24,7 +24,7 @@ namespace gfx { +@@ -25,7 +25,7 @@ namespace gfx { X11ErrorTracker::X11ErrorTracker() { // This is a non-exhaustive check for incorrect usage. It disallows nested // X11ErrorTracker instances on the same thread. - DCHECK(g_handler == nullptr); + // DCHECK(g_handler == nullptr); g_handler = this; - XSync(GetXDisplay(), False); - old_handler_ = XSetErrorHandler(X11ErrorHandler); + XSync(GetXDisplay(), x11::False); + old_handler_ = reinterpret_cast(XSetErrorHandler(X11ErrorHandler)); diff --git a/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch b/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch index c6eed44fedf18..36ef408786e75 100644 --- a/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch +++ b/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch @@ -47,10 +47,10 @@ index 0c37f6e2caead2f3004f1fbdd2abe7921ef4bea7..6f46775d96153d0c6a0795a1d6085f53 return items_[ValidateItemIndex(index)].minor_text; } diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h -index 5f1116ba19b8160a2fee008415b8841f056aad98..9c07e44c484a9a15b7d16d592311eb07d9b3734a 100644 +index 31669898f91d928bb63665d32ab9e4b114fecbf5..6c3f9734e2ee2cb3b6d5f9ed2787751709b013ed 100644 --- a/ui/base/models/simple_menu_model.h +++ b/ui/base/models/simple_menu_model.h -@@ -48,6 +48,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { +@@ -51,6 +51,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { // Some command ids have labels and icons that change over time. virtual bool IsItemForCommandIdDynamic(int command_id) const; virtual base::string16 GetLabelForCommandId(int command_id) const; @@ -58,7 +58,7 @@ index 5f1116ba19b8160a2fee008415b8841f056aad98..9c07e44c484a9a15b7d16d592311eb07 // Gets the icon for the item with the specified id. virtual ImageModel GetIconForCommandId(int command_id) const; -@@ -151,6 +152,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { +@@ -154,6 +155,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { // Sets the label for the item at |index|. void SetLabel(int index, const base::string16& label); @@ -68,7 +68,7 @@ index 5f1116ba19b8160a2fee008415b8841f056aad98..9c07e44c484a9a15b7d16d592311eb07 // Sets the minor text for the item at |index|. void SetMinorText(int index, const base::string16& minor_text); -@@ -180,6 +184,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { +@@ -183,6 +187,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override; int GetCommandIdAt(int index) const override; base::string16 GetLabelAt(int index) const override; @@ -76,7 +76,7 @@ index 5f1116ba19b8160a2fee008415b8841f056aad98..9c07e44c484a9a15b7d16d592311eb07 base::string16 GetMinorTextAt(int index) const override; ImageModel GetMinorIconAt(int index) const override; bool IsItemDynamicAt(int index) const override; -@@ -216,6 +221,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { +@@ -219,6 +224,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel { int command_id = 0; ItemType type = TYPE_COMMAND; base::string16 label; diff --git a/patches/chromium/blink-worker-enable-csp-in-file-scheme.patch b/patches/chromium/blink-worker-enable-csp-in-file-scheme.patch index c6c96ea08d0ad..0fd3af3e4ac8e 100644 --- a/patches/chromium/blink-worker-enable-csp-in-file-scheme.patch +++ b/patches/chromium/blink-worker-enable-csp-in-file-scheme.patch @@ -6,10 +6,10 @@ Subject: blink-worker-enable-csp-in-file-scheme.patch This allows file:// URLs in workers to have a CSP. diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc -index 7acd62e8657cce14733fa9d2449f3c48ad0dc0a6..f4c6c8b6361a6ae8403b13137cc213803892db5e 100644 +index 0d31933076d65aae063c01514f77deec1724c159..def9d2d52f41d09ea2d5291df2749f93a0b3f9fc 100644 --- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc +++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc -@@ -369,7 +369,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy( +@@ -373,7 +373,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy( // document (which is implemented in WorkerMessagingProxy, and // m_contentSecurityPolicy should be left as nullptr to inherit the policy). if (!response.CurrentRequestUrl().ProtocolIs("blob") && diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 124f92ff7dc2a..c7cb8c8b05a11 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -14,12 +14,12 @@ 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 97cd8eb72e9932797089787dc13dcd0f540f2b78..edf0e4e8786997556509c8bb997bbc9859a5147e 100644 +index ec267e98e19486163c70b1af240a4b638f554dc6..a33d19e719989584deb2c95f9fd8257e2b03b1f8 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -563,10 +563,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { +@@ -571,10 +571,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { } - CHECK(!view_ || !view_->IsAttached()); + DCHECK(!view_ || !view_->IsAttached()); - // This is the earliest that scripting can be disabled: - // - FrameLoader::Detach() can fire XHR abort events @@ -28,7 +28,7 @@ index 97cd8eb72e9932797089787dc13dcd0f540f2b78..edf0e4e8786997556509c8bb997bbc98 if (!Client()) return; -@@ -584,6 +580,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) { +@@ -591,6 +587,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(); @@ -37,5 +37,5 @@ index 97cd8eb72e9932797089787dc13dcd0f540f2b78..edf0e4e8786997556509c8bb997bbc98 + // - Document::Shutdown() can dispose plugins which can run script. + ScriptForbiddenScope forbid_script; - // TODO(crbug.com/729196): Trace why LocalFrameView::DetachFromLayout crashes. - CHECK(!view_->IsAttached()); + DCHECK(!view_->IsAttached()); + SetView(nullptr); diff --git a/patches/chromium/blink_world_context.patch b/patches/chromium/blink_world_context.patch index c55730388c211..b3d2d16e21e0e 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 9bda8d2fae9929485d2278de8b7ba9d4395e24b3..73e6de07678f24b983fcc6ebfba2ef000f9eac1c 100644 +index 345860ae12ba4bc3ce68373ab2cc44f4ddc40767..21c80483521f31b8860cd41504c5796eee12875e 100644 --- a/third_party/blink/public/web/web_local_frame.h +++ b/third_party/blink/public/web/web_local_frame.h -@@ -350,6 +350,8 @@ class WebLocalFrame : public WebFrame { +@@ -356,6 +356,8 @@ class WebLocalFrame : public WebFrame { // Returns the world ID associated with |script_context|. virtual int32_t GetScriptContextWorldId( v8::Local script_context) const = 0; @@ -20,10 +20,10 @@ index 9bda8d2fae9929485d2278de8b7ba9d4395e24b3..73e6de07678f24b983fcc6ebfba2ef00 // Executes script in the context of the current page and returns the value // that the script evaluated to with callback. Script execution can be 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 584792c678e3f8bf965d59df16422b70a844542b..60109fdcc7499843d10c5c7e9f8e22deff6c007c 100644 +index 3c9637763e265d6044eaae64d162dcdeda589b6f..26cc86a4924f5e3b9b422b62356b1184f8592b3b 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 -@@ -950,6 +950,13 @@ v8::Local WebLocalFrameImpl::GlobalProxy() const { +@@ -969,6 +969,13 @@ v8::Local WebLocalFrameImpl::GlobalProxy() const { return MainWorldScriptContext()->Global(); } @@ -38,7 +38,7 @@ index 584792c678e3f8bf965d59df16422b70a844542b..60109fdcc7499843d10c5c7e9f8e22de 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 a6c74bdad96fc535a52b40bf7927782d2198aefb..0f7e00f7ff58fbea3a797b6b1d90f316582d22af 100644 +index 2fb039f3be319d47899ce3567ef1d14e74894a52..b6b494a83a69022a1380750fd6e72afb6386f10c 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 @@ -162,6 +162,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 c6175d81cdeaa..154ae2eeabbba 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 732db68d17821b29041dd387e7e00b305c52a34c..d81a915e77a4dff952e6e81df7937292f4899d7d 100644 +index b945977840047dbe0d84fb2b316d2ff5e8dfedb0..70f9e23c5a31e2c1daaac7d55b64deabb780ed93 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -73,6 +73,7 @@ diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 2674738df6b24..878bdaebd8a27 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 795238249222dd246c2254434a4454b9d2aedd7c..ca9463ee9326816fca51d1ef75634973a12cd4b9 100644 +index 3936083ceb8371dde6ba486b1cf588a2d05be071..ae074d43e9c1704911ffc3f6f4ce1be65292e636 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc -@@ -4883,6 +4883,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -4906,6 +4906,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -21,10 +21,10 @@ index 795238249222dd246c2254434a4454b9d2aedd7c..ca9463ee9326816fca51d1ef75634973 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index b92cebd04eacb5b6fa3ff3d4c06388e7c8eac942..3ab23d0c634e8379573a4d818bbbe6200a88d073 100644 +index ecc73328f4fa0541ba62b5811b16ffdb7dffda9e..008f03d41669738b250ba99428bfd6d3baed1e85 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3420,9 +3420,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -3442,9 +3442,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( } if (delegate_) { @@ -53,10 +53,10 @@ index c969ed9b17b915f713d9b82114c7b637c8fd90df..9530a1936b0a801a4c6152dd53ec5105 // 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 479e52d0c08050704f65fbf02779261446a107fe..0e150a89b451e7ae464f1bd5e38c412f58aa8568 100644 +index 7b19c20596bfa1eff5680192dba7643721e49285..593aaa7d7c9a170b2961a8d2c245c81fe138bd0f 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -543,6 +543,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -544,6 +544,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -66,10 +66,10 @@ index 479e52d0c08050704f65fbf02779261446a107fe..0e150a89b451e7ae464f1bd5e38c412f 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 5f73f4713eae097b544ba38c4117621d3a1b77e4..170beaff3f579d3fcf9c461f6a41350e8c9439cc 100644 +index 0229ba39ba7ff66e139df331e6ef519cba1640df..203ae3449f4547d9ba304f8aebb66becbe70d79d 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -149,6 +149,7 @@ class NetworkService; +@@ -150,6 +150,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -77,7 +77,7 @@ index 5f73f4713eae097b544ba38c4117621d3a1b77e4..170beaff3f579d3fcf9c461f6a41350e } // namespace network namespace sandbox { -@@ -869,6 +870,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -870,6 +871,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -87,7 +87,7 @@ index 5f73f4713eae097b544ba38c4117621d3a1b77e4..170beaff3f579d3fcf9c461f6a41350e bool opener_suppressed, bool* no_javascript_access); diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc -index 5631ce92ac15737d4aff4d08e4a285bc507b6d47..04428e426ff43570deb01edf33400824f9a5206c 100644 +index 7ac50fbbe16b057d7263c7850a62b01d3dfae095..90d315d815bb269ee47cef7fb5e0b0e2edd578c4 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -26,6 +26,17 @@ namespace content { @@ -109,7 +109,7 @@ index 5631ce92ac15737d4aff4d08e4a285bc507b6d47..04428e426ff43570deb01edf33400824 const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 61ed37a5868fd53f669d40c62542d6271daea91d..c1d7b01d0d63f9f1ba90a32511f69318c9ec10fb 100644 +index a10c5caf5a4b7a30b7338c8b10ffa038e13dfd6a..938b6e622b52a05e6b7d626c4824e76121d807c5 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -17,6 +17,7 @@ @@ -135,7 +135,7 @@ index 61ed37a5868fd53f669d40c62542d6271daea91d..c1d7b01d0d63f9f1ba90a32511f69318 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index 49619a9b5683a3e53c53c9b750c6ea6a0efc92b2..e7c03ac99a0a9cf80d65797a81065f8997cf4646 100644 +index 8d1b62918d688c1d6060ed997dc801d9c00c5c30..0bda7168094b09f14a2eaee3840cd3603536b2a9 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -67,6 +67,7 @@ @@ -146,7 +146,7 @@ index 49619a9b5683a3e53c53c9b750c6ea6a0efc92b2..e7c03ac99a0a9cf80d65797a81065f89 #include "content/renderer/media/audio/audio_device_factory.h" #include "content/renderer/render_frame_impl.h" #include "content/renderer/render_frame_proxy.h" -@@ -1209,6 +1210,10 @@ WebView* RenderViewImpl::CreateView( +@@ -1192,6 +1193,10 @@ WebView* RenderViewImpl::CreateView( } params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features); @@ -206,10 +206,10 @@ index 4f735ad0d97eaac9a57dad137e479f8a7ec33a36..0a3c5821962c85609b64b3625fa6b8d6 } // namespace blink diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc -index 7a4451acee7822fc525d000f7b54a9922b1bd788..3c950eaa5bfb98b398a4daaec182745e87cc73d2 100644 +index 17af243870a442d5f52c75c56de6f538cb067cea..01a7456a354e258f681b1064c95ee9a680f10973 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -1915,6 +1915,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -1943,6 +1943,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, } WebWindowFeatures window_features = GetWindowFeaturesFromString(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 e5cdfcc99b5ca..9e62f1ddb2c52 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 178c8d95431e9bcfa7a3beae42d950451d78c047..781eee7436868d164549aa2932685223cdd7aca5 100644 +index bcd196814af64c055b0e3757d49cf770f4d239c5..322fde5dfe98156a1fbc459a1b7b38d1cf112661 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -5602,6 +5602,7 @@ static_library("browser") { +@@ -5662,6 +5662,7 @@ static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", diff --git a/patches/chromium/content_browser_main_loop.patch b/patches/chromium/content_browser_main_loop.patch index 42bca81be63e3..bdd52acc91cd3 100644 --- a/patches/chromium/content_browser_main_loop.patch +++ b/patches/chromium/content_browser_main_loop.patch @@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously in atom::CommonWebContentsDelegate::ResetManageWebContents. diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc -index 5bcf1709d610438ff8ebc37dc65ed4d5e01ece7e..1a4f1aff0644412bdff44be7b859d5e8b4508a72 100644 +index 40e29b8f369ee653c2b07ef48f1e3474f067fc70..e29026d38b219c5dc8e3b2673be3c30ec4386c30 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc -@@ -1436,7 +1436,7 @@ void BrowserMainLoop::MainMessageLoopRun() { +@@ -1452,7 +1452,7 @@ void BrowserMainLoop::MainMessageLoopRun() { NOTREACHED(); #else base::RunLoop run_loop; diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index 40d67e4855d73..ee842c9332951 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -21,7 +21,7 @@ index 9b07ab4667e691c0c8db4c71251b04d0cdf71ff3..72ee7e8df3d62eca301b08586f06d517 uint64_t g_process_start_time = 0; pid_t g_pid = 0; diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc -index d18efa945502bfbb7f2d6fe659472f8e495600da..0acaaaeb6aa80747c9230ec81419cae884444c5e 100644 +index 1d0fb4f2a633fa5ddbe232ce19d716c22be78a37..5b81608d6e90f62f435302a53976fb18bbbf9e98 100644 --- a/components/crash/core/app/crash_reporter_client.cc +++ b/components/crash/core/app/crash_reporter_client.cc @@ -140,6 +140,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) { @@ -43,7 +43,7 @@ index d18efa945502bfbb7f2d6fe659472f8e495600da..0acaaaeb6aa80747c9230ec81419cae8 unsigned int CrashReporterClient::GetCrashDumpPercentage() { return 100; diff --git a/components/crash/core/app/crash_reporter_client.h b/components/crash/core/app/crash_reporter_client.h -index 1f33fd0baf1e8bed001260184e9d34cb77313b03..63c09694bedf3995235a1755d35d4d78ed32619a 100644 +index aaa9ad1d58d7f584cbf391e0cb0a61a0d25d5c69..5b02834b5ecaf4bcb7e051d9ee98cd5eb087b4fc 100644 --- a/components/crash/core/app/crash_reporter_client.h +++ b/components/crash/core/app/crash_reporter_client.h @@ -5,6 +5,7 @@ diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index 9d03219d8a850..0058b821b815d 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 e026cf1322138009de75accc0e332e1e88267030..739e3ccb60d7a81fdb9af42b50d7ef8cd2811ff3 100644 +index 5735af8289f2e23c22135485ceb6d54cee298f74..485bfc35227ea8a9147888fe5040c7bfd57d7dce 100644 --- a/content/browser/frame_host/navigation_controller_impl.cc +++ b/content/browser/frame_host/navigation_controller_impl.cc @@ -1279,8 +1279,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( @@ -46,10 +46,10 @@ index e026cf1322138009de75accc0e332e1e88267030..739e3ccb60d7a81fdb9af42b50d7ef8c // navigation. Now we know that the renderer has updated its state accordingly // and it is safe to also clear the browser side history. diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc -index b422119ff36713399358b27aff8b18423f79d954..5c223f360ca641a3e29f23e6d409d7f97414a985 100644 +index 8ec47a120d37fa14a8d6f9b417f6bfea43742c49..7a64670b0f7d22fdedba506b9cc490db1d83cbfe 100644 --- a/ui/base/clipboard/clipboard_win.cc +++ b/ui/base/clipboard/clipboard_win.cc -@@ -831,10 +831,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const { +@@ -855,10 +855,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const { void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) { UINT cf_format = format.ToFormatEtc().cfFormat; diff --git a/patches/chromium/delay_lock_the_protocol_scheme_registry.patch b/patches/chromium/delay_lock_the_protocol_scheme_registry.patch index c9f7adf9aece7..92bea7d7802f1 100644 --- a/patches/chromium/delay_lock_the_protocol_scheme_registry.patch +++ b/patches/chromium/delay_lock_the_protocol_scheme_registry.patch @@ -19,10 +19,10 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try re-submitting the patch. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 436d3628cc37df2612adbe2da6bbddd66c737ca4..51e0655bc3bce3640e26952513f1619f14cdf997 100644 +index 35683362c08735174890276cb9a573cf2949ae8a..745c2f80b8a57496d6108344d72a62fb462ebe15 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -663,7 +663,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { +@@ -645,7 +645,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { } #endif @@ -68,7 +68,7 @@ index 3038f9d25798f36811b6398f8cc0e7d83ecc41b0..68189c36c47ef85b345b0ccc40c456f8 // Re-initializes schemes for tests. CONTENT_EXPORT void ReRegisterContentSchemesForTests(); diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc -index 02985a525c98999f469906c8ff3647b740d9f962..e52e8d69c2d05b31d1f28b19752be362941e52be 100644 +index 57f1dcf106d1029a94d908f90b9f27fd96f2f888..ab4967bbcd687ff63f377c13d25b97cf395ee2f2 100644 --- a/content/public/app/content_main_delegate.cc +++ b/content/public/app/content_main_delegate.cc @@ -36,6 +36,10 @@ int ContentMainDelegate::TerminateForFatalInitializationError() { @@ -83,7 +83,7 @@ index 02985a525c98999f469906c8ff3647b740d9f962..e52e8d69c2d05b31d1f28b19752be362 return service_manager::ProcessType::kDefault; } diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h -index 0ca924769b98009264b53121dfe6a892b81e8530..606a5cb8d89216a95e9187fba2ea9b6d4121a394 100644 +index a384cd8f3688797bff4ef2e007ef40b6f93755e5..a387441cbe5bbe676ea1c2d77605c97eba3dd746 100644 --- a/content/public/app/content_main_delegate.h +++ b/content/public/app/content_main_delegate.h @@ -76,6 +76,20 @@ class CONTENT_EXPORT ContentMainDelegate { diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index ec58c650256f4..b0ee8a9c71da8 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 4cfdfcc93b4da0497271fd31e01db8485b2ec7b2..e7be846616e58631ed2a89530d02930d64336b70 100644 +index 5e8d267d868d4a8d90b7c4652c3be4d4df87d500..6838a9bb1b17d66f3653dd81dca616fee7c2ba41 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -306,6 +306,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500; @@ -62,7 +62,7 @@ index 7118ff56f0dd1c6291e4095ce7f3d8fc723f0398..5dbaab15ee1667ed1caf0b746b8e31d1 HICON GetDefaultWindowIcon() const override; HICON GetSmallWindowIcon() const override; diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h -index 98efa2b7c4033c9ce8c73f7201e68e85baf05bba..4f0897ecc675d3e366ec07df28e09698c6b6e4cf 100644 +index 7344cdd4cf7d68da617b81cbdf464a859a40fb09..9ec1f23b26b41e10a46be0ca5d254583b6534ecb 100644 --- a/ui/views/win/hwnd_message_handler_delegate.h +++ b/ui/views/win/hwnd_message_handler_delegate.h @@ -46,6 +46,8 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate { diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 033b8a329b58c..0726580f394bf 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at https://crbug.com/634542 and https://crbug.com/711107. diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc -index 5c87f4ea0d6426606a1001f51aea1aa8b0ecaa8b..16fa2e95b89b569c76b57c1a57d0336ac3b8ea54 100644 +index 89c4355b48796f7336c4fd3c949c2fbce290e92b..eb81480c353229501ce992a4fdc2e70d9d01955b 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1748,6 +1748,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1766,6 +1766,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace( gfx::ContentColorUsage content_color_usage) const { @@ -35,7 +35,7 @@ index 5c87f4ea0d6426606a1001f51aea1aa8b0ecaa8b..16fa2e95b89b569c76b57c1a57d0336a // If we are likely to software composite the resource, we use sRGB because diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h -index eaff59cabf659c0d3ffe46c394c51b6d30c05806..899be4f3d9cdb82e03d34ee940f26af89235dd31 100644 +index e5a58655788be3bd1c86e238e34bbadf8012bc48..2a2de85e89a8a0f803b7c987620a259b26281d8d 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -99,6 +99,8 @@ class CC_EXPORT LayerTreeSettings { @@ -81,10 +81,10 @@ index b06ea5f9fe36162dc9bcec32f604b1a8fc10f825..d53e7a0055dbdfe937a51939a3122723 !command_line->HasSwitch(switches::kUIDisablePartialSwap); #if defined(OS_APPLE) diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690c83e4a8c 100644 +index 21265c5bbbeb38ab58338519964fc598f8eed8e2..2be364cfc4482a5905b98e978e1d58fee272c356 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc -@@ -89,6 +89,9 @@ +@@ -87,6 +87,9 @@ using gpu::gles2::GLES2Interface; @@ -94,7 +94,7 @@ index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690 namespace viz { namespace { -@@ -596,8 +599,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, +@@ -640,8 +643,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) { SetBlendEnabled(quad->ShouldDrawWithBlending()); @@ -106,7 +106,7 @@ index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690 // Use the full quad_rect for debug quads to not move the edges based on // partial swaps. -@@ -1574,7 +1578,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, +@@ -1621,7 +1625,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, params->use_color_matrix, tint_gl_composited_content_, params->apply_shader_based_rounded_corner && ShouldApplyRoundedCorner(params->quad)), @@ -116,17 +116,27 @@ index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690 } void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) { -@@ -2045,7 +2050,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, +@@ -2095,15 +2100,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), -- quad_color_space, CurrentRenderPassColorSpace()); -+ PATCH_CS(quad_color_space), +- CurrentRenderPassColorSpace(), CurrentRenderPassColorSpace()); ++ PATCH_CS(CurrentRenderPassColorSpace()), + PATCH_CS(CurrentRenderPassColorSpace())); - SetShaderColor(color, opacity); - if (current_program_->rounded_corner_rect_location() != -1) { - SetShaderRoundedCorner( -@@ -2200,7 +2206,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, + + gfx::ColorSpace quad_color_space = gfx::ColorSpace::CreateSRGB(); + SkColor4f color_f = SkColor4f::FromColor(color); + + // Apply color transform if the color space or source and target do not match. +- if (quad_color_space != CurrentRenderPassColorSpace()) { ++ if (PATCH_CS(quad_color_space) != PATCH_CS(CurrentRenderPassColorSpace())) { + const gfx::ColorTransform* color_transform = +- GetColorTransform(quad_color_space, CurrentRenderPassColorSpace()); ++ GetColorTransform(PATCH_CS(quad_color_space), PATCH_CS(CurrentRenderPassColorSpace())); + gfx::ColorTransform::TriStim col(color_f.fR, color_f.fG, color_f.fB); + color_transform->Transform(&col, 1); + color_f.fR = col.x(); +@@ -2278,7 +2284,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, : NON_PREMULTIPLIED_ALPHA, false, false, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -136,7 +146,7 @@ index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690 if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2296,7 +2303,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, +@@ -2377,7 +2384,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, !quad->ShouldDrawWithBlending(), has_tex_clamp_rect, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -146,7 +156,7 @@ index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690 if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2397,7 +2405,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, +@@ -2487,7 +2495,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, // The source color space should never be RGB. DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB()); @@ -156,7 +166,7 @@ index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690 #if defined(OS_WIN) // Force sRGB output on Windows for overlay candidate video quads to match -@@ -2563,7 +2572,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, +@@ -2662,7 +2671,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, SetUseProgram(ProgramKey::VideoStream(tex_coord_precision, ShouldApplyRoundedCorner(quad)), @@ -166,7 +176,7 @@ index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690 DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id()); -@@ -2628,8 +2638,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { +@@ -2729,8 +2739,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR); // Bind the program to the GL state. @@ -177,7 +187,7 @@ index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690 /*adjust_src_white_level=*/draw_cache_.is_video_frame); if (current_program_->rounded_corner_rect_location() != -1) { -@@ -3376,7 +3386,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, +@@ -3547,7 +3557,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, const gfx::ColorSpace& src_color_space, const gfx::ColorSpace& dst_color_space, bool adjust_src_white_level) { @@ -188,7 +198,7 @@ index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690 gfx::ColorSpace adjusted_src_color_space = src_color_space; if (adjust_src_white_level) { // If the input color space is HDR, and it did not specify a white level, -@@ -3759,9 +3771,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( +@@ -3927,9 +3939,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple); } @@ -201,7 +211,7 @@ index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690 *new_bounds = gfx::RectF(updated_dst_rect.origin(), gfx::SizeF((*overlay_texture)->texture.size())); -@@ -3980,8 +3992,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { +@@ -4149,8 +4161,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { PrepareGeometry(SHARED_BINDING); @@ -212,14 +222,14 @@ index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690 gfx::Transform render_matrix; render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(), -@@ -4103,3 +4115,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default; +@@ -4279,3 +4291,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default; GLRenderer::OverlayTexture::~OverlayTexture() = default; } // namespace viz + +#undef PATCH_CS diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 9b200dbd44e0e5524276c8784c873fb720961baa..cef79334b88bf1b947360ed890fbf2f99eb1f483 100644 +index aeae01a0958f7909e4c9273e90110ca3b6f40bdf..9340c828ab583d2b42f93c3471b7c56339045764 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -221,6 +221,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -231,7 +241,7 @@ index 9b200dbd44e0e5524276c8784c873fb720961baa..cef79334b88bf1b947360ed890fbf2f9 sandbox::policy::switches::kGpuSandboxAllowSysVShm, sandbox::policy::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index eb99c6f7ef7ca70c6d074d2d0aecd24da383ab76..b169770b27e21ebb2cb137b45c4ee66c4f71e878 100644 +index 01ed5881a0f6a492c6b5fdae515e139a0281f432..be2039e7250ae3834ddae721f4d54963e293cba4 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -226,6 +226,7 @@ @@ -242,7 +252,7 @@ index eb99c6f7ef7ca70c6d074d2d0aecd24da383ab76..b169770b27e21ebb2cb137b45c4ee66c #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_features.h" #include "url/origin.h" -@@ -3291,6 +3292,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3318,6 +3319,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. static const char* const kSwitchNames[] = { @@ -317,7 +327,7 @@ index 95e818f1406eb1a73a746b73a608137ab5c6e894..6e1d3b3b1add4eda90560856b6915d46 // is what the renderer uses if its not threaded. settings.enable_checker_imaging = diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc -index fdb5fbcff837f989ab73c04dd45c4b1d9f78d8da..34b46fbdc36b9655eb7ea09c25f72a39d0e511a7 100644 +index 4f780768e5c606e08aad96d87c309d53154bcecd..8ddbb922399265f5d525274e7c2d01dbecfdf5a9 100644 --- a/ui/gfx/mac/io_surface.cc +++ b/ui/gfx/mac/io_surface.cc @@ -18,6 +18,7 @@ @@ -326,9 +336,9 @@ index fdb5fbcff837f989ab73c04dd45c4b1d9f78d8da..34b46fbdc36b9655eb7ea09c25f72a39 #include "ui/gfx/icc_profile.h" +#include "ui/gfx/switches.h" - #if defined(__MAC_11_0) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_16 - // https://crbug.com/1108561: This is supposed to be deprecated (but available) -@@ -140,6 +141,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) { + namespace gfx { + +@@ -127,6 +128,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) { // Common method used by IOSurfaceSetColorSpace and IOSurfaceCanSetColorSpace. bool IOSurfaceSetColorSpace(IOSurfaceRef io_surface, const ColorSpace& color_space) { @@ -343,7 +353,7 @@ index fdb5fbcff837f989ab73c04dd45c4b1d9f78d8da..34b46fbdc36b9655eb7ea09c25f72a39 // Allow but ignore invalid color spaces. if (!color_space.IsValid()) return true; -@@ -274,6 +283,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, +@@ -265,6 +274,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, DCHECK_EQ(kIOReturnSuccess, r); } diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index dc111162f6b66..c7a6048c789f7 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 764d23f23ce2c7bc8068d0fbd97da08fd81b35dd..da3aac955c09c46fb7091d606bf0c4c8e7c6fa2f 100644 +index 740cf03a50818b6a769abed1d487b0c9a6be2c26..2298589fcbdfb03474600f99763b10368b240a68 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -478,7 +478,11 @@ +@@ -480,7 +480,11 @@ return; host()->WasHidden(); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index fa1cdaaef9c8a..b95a7b89b30dc 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,10 +6,10 @@ Subject: disable_hidden.patch Electron uses this to disable background throttling for hidden windows. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 7dcc21f67320402a88b4ce7d6606a1e7d4c46ea3..77bc5b22fd03af3e576b3bec10ac8b747b013937 100644 +index ae13996e8b608187a331e0fe465cbbb961806311..ba4490916017d65c08f6f31ef8453928f37b84fd 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -739,6 +739,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -740,6 +740,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; @@ -20,10 +20,10 @@ index 7dcc21f67320402a88b4ce7d6606a1e7d4c46ea3..77bc5b22fd03af3e576b3bec10ac8b74 blink::mojom::PointerLockResult::kWrongDocument); diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h -index ec4696ba8628cef696c0a7147a0cc6c95d409089..b4cf9688ee7599f6892dd741908a056c076b6151 100644 +index b2dfde227eda70f0ccd7770608cfe7465e3b32fb..421057fb072023718f0f326c65a3dc678c29ed1d 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -175,6 +175,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -174,6 +174,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl // RenderWidgetHostImpl. static RenderWidgetHostImpl* From(RenderWidgetHost* rwh); @@ -34,10 +34,10 @@ index ec4696ba8628cef696c0a7147a0cc6c95d409089..b4cf9688ee7599f6892dd741908a056c const base::TimeDelta& delay) { new_content_rendering_delay_ = delay; diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc -index dc010ee921dd606f04c8c176f4e3d90047f2c297..f97062555915eaab5c941e1793dafd4628b94d84 100644 +index b449be00666c4aec443aa0a475bc13835b1a2a3b..6d0885f9df73a5785d2eb618a848ccf290152acd 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -622,7 +622,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -625,7 +625,7 @@ void RenderWidgetHostViewAura::HideImpl() { DCHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 15ad2882d1df6..ba818894d9696 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 f5ef11a3bed2a5eb3f699f9ee0ee37fbf5fe531a..7e01e5ef3fb8d548f2015b4de7d6834489a2bde0 100644 +index 10ba3b1ad5d8bacbfd0f8b947db139058cd2d5f8..3bdd015d6192266b8facd5d8c2c954d3ea146d5a 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1082,6 +1082,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1080,6 +1080,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,7 +51,7 @@ index f5ef11a3bed2a5eb3f699f9ee0ee37fbf5fe531a..7e01e5ef3fb8d548f2015b4de7d68344 // This may only be called on NetworkContexts created with the constructor // that calls MakeURLRequestContext(). diff --git a/services/network/network_context.h b/services/network/network_context.h -index 75531d963c4ee8bb4197b30c93623e556f404155..26eeeef6e76a8a529377889b986aaf748c51912c 100644 +index 3700f3ee61d4eb33a4574f3270c10a70b00057e3..00eacad5e1819b1710ab03ab1ef9428347e7f5a0 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -243,6 +243,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext @@ -63,10 +63,10 @@ index 75531d963c4ee8bb4197b30c93623e556f404155..26eeeef6e76a8a529377889b986aaf74 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 0b97c9fe29f24b1305740506458b0b6a02263c3c..7dc2d14d47d395e3b8046cae8788c4e04bc8e7f3 100644 +index d9227c78e4439d90dba68349e540ae42ab3c3000..113006d65c011bacd856c471d93dbff71254f034 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1061,6 +1061,9 @@ interface NetworkContext { +@@ -1073,6 +1073,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,7 +77,7 @@ index 0b97c9fe29f24b1305740506458b0b6a02263c3c..7dc2d14d47d395e3b8046cae8788c4e0 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index ff4bb599026ce57e46d5dd9d017a07308c4e83cd..8a0f77aa2b4a054d9a4b24e6e81785dd8fc6a5ea 100644 +index a00a627a2ae73bf78d4b0e1eb332c7e52319e26f..5891c62a660d8e38688e7b37131af396a6e5e120 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h @@ -105,6 +105,7 @@ class TestNetworkContext : public mojom::NetworkContext { 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 6454c41ed64be..43b7db646b7bc 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,7 +13,7 @@ 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 432c107708d5578326c4b796861d4bb662297c90..e830e10508218d1146a4b1343b2a8dc2d5e73569 100644 +index 7a9ae490f6ec0b07eedf6aea62a58a026dfef693..bc04ea8d07c4b1cd11df626f98330b64dd2f1c7f 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc @@ -253,6 +253,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors) 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 bb3a59d4c478b..e2ad6d5f9cbac 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,7 +6,7 @@ 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 79d364af3582014f71e7d0d9cff870e802f5d40b..4fd0c9fa5cf930361f45f46596463cd3d20308e2 100644 +index 0ba4a01e1384bd8b123798c89d5858a7e6de5c3e..cc851b51dc166668ecb47a6f4f289ff44204e1b3 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc @@ -525,6 +525,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { @@ -21,7 +21,7 @@ index 79d364af3582014f71e7d0d9cff870e802f5d40b..4fd0c9fa5cf930361f45f46596463cd3 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 a66502aebe95f17a7f8b562d0cf4296da77ecb38..a838821ebd19a86c32bcadd2a00000814de56e77 100644 +index 6caa848692512bef8a261e61d81d434d184b7a7d..18f3d938c94c33c1fb6b1bb7beadaf5dd7d6f729 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h @@ -110,6 +110,7 @@ class CONTENT_EXPORT RenderViewHostImpl @@ -61,10 +61,10 @@ index 50601f801e08a90d8556007617a0310bc3bfe2e3..f1f03eb2eb91567cbda2f8b9abe9979e // This interface should only be implemented inside content. friend class RenderViewHostImpl; diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index e7c03ac99a0a9cf80d65797a81065f8997cf4646..64ed7fa44cc2d04a67707459974c8568f7166a7b 100644 +index 0bda7168094b09f14a2eaee3840cd3603536b2a9..96aebbd17c810835452b6fae9cbd0c9d7396db34 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc -@@ -1148,6 +1148,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { +@@ -1131,6 +1131,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message) @@ -73,7 +73,7 @@ index e7c03ac99a0a9cf80d65797a81065f8997cf4646..64ed7fa44cc2d04a67707459974c8568 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck) IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences) IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) -@@ -1615,6 +1617,12 @@ bool RenderViewImpl::GetContentStateImmediately() { +@@ -1594,6 +1596,12 @@ bool RenderViewImpl::GetContentStateImmediately() { return send_content_state_immediately_; } @@ -87,10 +87,10 @@ index e7c03ac99a0a9cf80d65797a81065f8997cf4646..64ed7fa44cc2d04a67707459974c8568 webkit_preferences_ = prefs; ApplyWebPreferences(webkit_preferences_, GetWebView()); diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h -index 7467f976818c5614b890fa0cdaa4cc08bc10d494..4dd7f6e5949c2c749d192a88893298f89270d0bb 100644 +index 8043e377d15433543ce5c7942d57c4fc486ed63a..155950d620d25cb03c2a258007e9fad91ca602de 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h -@@ -387,6 +387,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, +@@ -380,6 +380,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 7467f976818c5614b890fa0cdaa4cc08bc10d494..4dd7f6e5949c2c749d192a88893298f8 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 9e8f2404a58687353464fa86600696e1b46e9158..b3e78fe9bb232f650a4c12bbafd36d3fc4c500b3 100644 +index 4d55813fed9251dd652781275f8892054cc7f6ca..582f16a1d14b1e949151f4ef326c2dc79036df20 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h -@@ -395,6 +395,7 @@ class WebView { +@@ -404,6 +404,7 @@ class WebView { // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -111,10 +111,10 @@ index 9e8f2404a58687353464fa86600696e1b46e9158..b3e78fe9bb232f650a4c12bbafd36d3f // 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 e42105c01b698fe891bd67a0e888e15aa805ce94..2ce7fdccf8af5f1daa2df41502ca55971dd7eb1e 100644 +index 864ad48116207b1190787d179f504bb95606a2fe..37cd63f04fb6384ef3590ddb5f173bc2ddcd6c34 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3447,6 +3447,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3538,6 +3538,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -128,7 +128,7 @@ index e42105c01b698fe891bd67a0e888e15aa805ce94..2ce7fdccf8af5f1daa2df41502ca5597 void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3457,7 +3464,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3548,7 +3555,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -139,10 +139,10 @@ index e42105c01b698fe891bd67a0e888e15aa805ce94..2ce7fdccf8af5f1daa2df41502ca5597 mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() { diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h -index dfa50fbdd17f13341fb425f7dc4b94c1abf42696..13c4e853445ed19b388caac9b98de91415f7f02f 100644 +index 753e0a7c964102e633b7fedce41090936f413034..c29e2f707c73dcadbdc83748c01bd6e102e0b145 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -339,6 +339,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -346,6 +346,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -150,7 +150,7 @@ index dfa50fbdd17f13341fb425f7dc4b94c1abf42696..13c4e853445ed19b388caac9b98de914 void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -699,6 +700,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -707,6 +708,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, // WebViewImpl::Close while handling an input event. bool debug_inside_input_handling_ = false; diff --git a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch index 15002d24dd1da..831a5fc8c24c0 100644 --- a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch +++ b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch @@ -5,7 +5,7 @@ Subject: feat: allow embedders to add observers on created hunspell dictionaries diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc -index 91f757ace16fd2b65080cd02a77f2267bc62ecaf..74387d4394e017e812821774475ee5703d134bf4 100644 +index ea9b6e90e0b29e0ef9f5bd01a3ea54dbd74f8854..205abd33258e569cc063fa470021bfb0e1cf0c79 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc @@ -455,6 +455,9 @@ void SpellcheckService::LoadDictionaries() { 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 f8b9f2a0a921a..ba74c9ad2530b 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 d991c2126b239622f5712cfde6a78139faab2ad9..b52a92991ceea74fd2153ea86ad97e25e53827e0 100644 +index 99381735d4679817196140f49d507048ccd29539..dd29ceb0550cb72c0e267c07bf0b0583620398d9 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -115,6 +115,8 @@ viz_component("service") { @@ -107,7 +107,7 @@ index d991c2126b239622f5712cfde6a78139faab2ad9..b52a92991ceea74fd2153ea86ad97e25 "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 649ecffb549639ab88ba6eba7bb720b3b56f9f82..5e7d0651b18bd3c3b29891d90e5e7631288ca262 100644 +index 2da653cc9c3c9c54fbfcd1ae92ea381bb3d0022f..3442a2d52443c5b17dacd642cbe1538b92ceca8c 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -22,6 +22,7 @@ diff --git a/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch b/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch index e4a351eb8a808..cffbbc76cfc4f 100644 --- a/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch +++ b/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch @@ -7,7 +7,7 @@ This tweaks Chrome's Accessibility support at chrome://accessibility to make it usable from Electron by removing Profile references. diff --git a/chrome/browser/accessibility/accessibility_ui.cc b/chrome/browser/accessibility/accessibility_ui.cc -index acec47527e3f14e3c4b4f262da9995a95e6d3355..3a9434cbe7d86a0e99598c64ea756f07b241f74d 100644 +index 34e1fe5d6cf8e9f44dc3def60cf40cd6de8d8d3e..98e8e8ac6cca5cffd9aafebbc06fa78e7917bb98 100644 --- a/chrome/browser/accessibility/accessibility_ui.cc +++ b/chrome/browser/accessibility/accessibility_ui.cc @@ -19,7 +19,9 @@ @@ -82,7 +82,7 @@ index acec47527e3f14e3c4b4f262da9995a95e6d3355..3a9434cbe7d86a0e99598c64ea756f07 data.Set(kBrowsersField, std::move(browser_list)); std::string json_string; -@@ -477,8 +479,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(const base::ListValue* args) { +@@ -474,8 +476,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(const base::ListValue* args) { AllowJavascript(); if (flag_name_str == kInternal) { @@ -93,7 +93,7 @@ index acec47527e3f14e3c4b4f262da9995a95e6d3355..3a9434cbe7d86a0e99598c64ea756f07 return; } -@@ -581,11 +585,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( +@@ -578,11 +582,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( content::AccessibilityTreeFormatter::PropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, content::AccessibilityTreeFormatter::PropertyFilter::DENY); @@ -108,7 +108,7 @@ index acec47527e3f14e3c4b4f262da9995a95e6d3355..3a9434cbe7d86a0e99598c64ea756f07 result->SetString(kTreeField, base::UTF16ToUTF8(accessibility_contents_utf16)); CallJavascriptFunction(request_type, *(result.get())); -@@ -626,7 +631,8 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -623,7 +628,8 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( content::AccessibilityTreeFormatter::PropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, content::AccessibilityTreeFormatter::PropertyFilter::DENY); @@ -118,7 +118,7 @@ index acec47527e3f14e3c4b4f262da9995a95e6d3355..3a9434cbe7d86a0e99598c64ea756f07 for (Browser* browser : *BrowserList::GetInstance()) { if (browser->session_id().id() == session_id) { std::unique_ptr result( -@@ -707,5 +713,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( +@@ -704,5 +710,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( // static void AccessibilityUIMessageHandler::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { 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 bb4caf22c334a..254852a896d3d 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 3ab23d0c634e8379573a4d818bbbe6200a88d073..0e16e0d4c0b84e4f6cdf73d4061a53609dcbe647 100644 +index 008f03d41669738b250ba99428bfd6d3baed1e85..14abe9e1e715d849826b07e533cb0900d6ab81e8 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2830,11 +2830,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { +@@ -2852,11 +2852,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/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index cfc9b4a0afd98..881dd9fb43d65 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -8,10 +8,10 @@ and respond with custom instance. Also allows for us to at-runtime enable or disable this patch. diff --git a/content/browser/browsing_instance.cc b/content/browser/browsing_instance.cc -index 54546d15ba4006481ca8844e26b86359d3eb8a79..7712c681170ddf6739b2825b4b2fb9284a23f4b1 100644 +index 4388cf3c8741807995e6afed3f8b13681cff08ee..6a2d743fac73d3b834e39ce215d06a2c0ea2c80a 100644 --- a/content/browser/browsing_instance.cc +++ b/content/browser/browsing_instance.cc -@@ -83,6 +83,13 @@ scoped_refptr BrowsingInstance::GetSiteInstanceForURL( +@@ -91,6 +91,13 @@ scoped_refptr BrowsingInstance::GetSiteInstanceForURL( return instance; } @@ -26,10 +26,10 @@ index 54546d15ba4006481ca8844e26b86359d3eb8a79..7712c681170ddf6739b2825b4b2fb928 bool allow_default_instance) { scoped_refptr site_instance = diff --git a/content/browser/browsing_instance.h b/content/browser/browsing_instance.h -index 7f588450c441ed2b17db06afb38075bbfadfc633..e56178401374f3c6a9536056511fb63a20195e56 100644 +index 028c197b8f25e64bf8c9a7df7fbd22a94d2d9de0..b9fd96f5b3d5e3d461b55c92b7518e75661f25cf 100644 --- a/content/browser/browsing_instance.h +++ b/content/browser/browsing_instance.h -@@ -134,6 +134,11 @@ class CONTENT_EXPORT BrowsingInstance final +@@ -144,6 +144,11 @@ class CONTENT_EXPORT BrowsingInstance final const GURL& url, bool allow_default_instance); @@ -42,10 +42,10 @@ index 7f588450c441ed2b17db06afb38075bbfadfc633..e56178401374f3c6a9536056511fb63a // 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 a6d3bafd08336a07012e46aba6d611c62e61c7cf..f7b03517380b653071384a9686924b584efadde7 100644 +index 4039355c521baea795ae2eb3ee9dda3eaf6b6863..d7d34b06ab5e5d934d1bf73d5759116875d15a4d 100644 --- a/content/browser/frame_host/navigation_request.cc +++ b/content/browser/frame_host/navigation_request.cc -@@ -1475,6 +1475,21 @@ void NavigationRequest::BeginNavigation() { +@@ -1390,6 +1390,21 @@ void NavigationRequest::BeginNavigation() { // it immediately. EnterChildTraceEvent("ResponseStarted", this); @@ -67,7 +67,7 @@ index a6d3bafd08336a07012e46aba6d611c62e61c7cf..f7b03517380b653071384a9686924b58 // Select an appropriate RenderFrameHost. render_frame_host_ = frame_tree_node_->render_manager()->GetFrameHostForNavigation(this); -@@ -5043,6 +5058,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const { +@@ -4970,6 +4985,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const { {WILL_START_REQUEST, { WILL_REDIRECT_REQUEST, WILL_PROCESS_RESPONSE, @@ -75,7 +75,7 @@ index a6d3bafd08336a07012e46aba6d611c62e61c7cf..f7b03517380b653071384a9686924b58 READY_TO_COMMIT, DID_COMMIT, CANCELING, -@@ -5056,10 +5072,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const { +@@ -4983,10 +4999,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const { WILL_FAIL_REQUEST, }}, {WILL_PROCESS_RESPONSE, { @@ -91,10 +91,10 @@ index a6d3bafd08336a07012e46aba6d611c62e61c7cf..f7b03517380b653071384a9686924b58 NOT_STARTED, DID_COMMIT, diff --git a/content/browser/frame_host/navigation_request.h b/content/browser/frame_host/navigation_request.h -index cfcc6cd6cbc2723156a2bce1cd8a98a979952a04..a6736ae58641501041a676505ea8a3680f90cdf7 100644 +index e8c07036146b0df87613b54a7ab455ad99190fc7..e0b1af16759fcafcc07f6c5a8a56d2d089f667fd 100644 --- a/content/browser/frame_host/navigation_request.h +++ b/content/browser/frame_host/navigation_request.h -@@ -162,6 +162,10 @@ class CONTENT_EXPORT NavigationRequest +@@ -129,6 +129,10 @@ class CONTENT_EXPORT NavigationRequest // asynchronous. WILL_PROCESS_RESPONSE, @@ -106,10 +106,10 @@ index cfcc6cd6cbc2723156a2bce1cd8a98a979952a04..a6736ae58641501041a676505ea8a368 READY_TO_COMMIT, diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc -index 3223378b661e6a53e62d7981c90beb67a51dc900..f83175d673e280e81ae3175d98172763f9c016ae 100644 +index 4810af6f743062086a1d9cd4d1e6c4470e128bbe..1a7e4cb9561b2347fd0a9d9a19a15ddeb3a2f7c1 100644 --- a/content/browser/frame_host/render_frame_host_manager.cc +++ b/content/browser/frame_host/render_frame_host_manager.cc -@@ -2383,6 +2383,16 @@ bool RenderFrameHostManager::InitRenderView( +@@ -2537,6 +2537,16 @@ bool RenderFrameHostManager::InitRenderView( scoped_refptr RenderFrameHostManager::GetSiteInstanceForNavigationRequest( NavigationRequest* request) { @@ -126,7 +126,7 @@ index 3223378b661e6a53e62d7981c90beb67a51dc900..f83175d673e280e81ae3175d98172763 SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance(); // All children of MHTML documents must be MHTML documents. They all live in -@@ -2402,10 +2412,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2556,10 +2566,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( // // TODO(clamy): We should also consider as a candidate SiteInstance the // speculative SiteInstance that was computed on redirects. @@ -191,7 +191,7 @@ index 3223378b661e6a53e62d7981c90beb67a51dc900..f83175d673e280e81ae3175d98172763 // Account for renderer-initiated reload as well. // Needed as a workaround for https://crbug.com/1045524, remove it when it is -@@ -2431,6 +2491,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2615,6 +2675,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -202,10 +202,10 @@ index 3223378b661e6a53e62d7981c90beb67a51dc900..f83175d673e280e81ae3175d98172763 } diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc -index b167aaf428df5feeac16c68beec3e947d44cd61f..c2ad9320b242c228b295a7fe20cc258282d95a09 100644 +index 8cac1fb3f3824713f8548d783e059354b4836197..c924fc2676c8e5875eabca474f3d125eea7032e4 100644 --- a/content/browser/site_instance_impl.cc +++ b/content/browser/site_instance_impl.cc -@@ -505,6 +505,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) { +@@ -545,6 +545,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) { return browsing_instance_->HasSiteInstance(site_info); } @@ -217,10 +217,10 @@ index b167aaf428df5feeac16c68beec3e947d44cd61f..c2ad9320b242c228b295a7fe20cc2582 const GURL& url) { return browsing_instance_->GetSiteInstanceForURL( diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h -index 9fffa8c2c602aa373400dfb0d1c817f34b75bc8f..f898ab9291f66ac0cfbf0317f47befc8d832b364 100644 +index b70ed75a6500776fedcf75b5bce1f5e044664b4f..3d581373ff0251d8dbe6c09ecfc170c3d00026c6 100644 --- a/content/browser/site_instance_impl.h +++ b/content/browser/site_instance_impl.h -@@ -184,6 +184,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance, +@@ -211,6 +211,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance, BrowserContext* GetBrowserContext() override; const GURL& GetSiteURL() override; scoped_refptr GetRelatedSiteInstance(const GURL& url) override; @@ -229,10 +229,10 @@ index 9fffa8c2c602aa373400dfb0d1c817f34b75bc8f..f898ab9291f66ac0cfbf0317f47befc8 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 0e150a89b451e7ae464f1bd5e38c412f58aa8568..187e8bc17e2dfb662c283bacaeda9764c2fdc11e 100644 +index 593aaa7d7c9a170b2961a8d2c245c81fe138bd0f..31ad15e7e35d66129f47454b1e189d3d408faf6d 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -62,6 +62,21 @@ +@@ -63,6 +63,21 @@ namespace content { @@ -255,10 +255,10 @@ index 0e150a89b451e7ae464f1bd5e38c412f58aa8568..187e8bc17e2dfb662c283bacaeda9764 const MainFunctionParams& parameters) { return nullptr; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 170beaff3f579d3fcf9c461f6a41350e8c9439cc..a29cde8ecd97077c4e60e40e2c91083275781602 100644 +index 203ae3449f4547d9ba304f8aebb66becbe70d79d..929c0873542b8eaeb2e3e05079e43cf7a3bd2fb9 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -249,8 +249,45 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -250,8 +250,45 @@ class CONTENT_EXPORT ContentBrowserClient { using IsClipboardPasteAllowedCallback = base::OnceCallback; diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index fd6c53409af76..7bdc050b0d956 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -7,10 +7,10 @@ We don't use gin to create the V8 platform, because we need to inject Node things. diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc -index 13f6369429c2715330bc921f34c4941653269078..58a0eb4b105c802f9dd336a778081ccb0ef084a0 100644 +index 73435b1c2c008a376421f8c94059fdb61d58feed..9ded78a8fd05bf4278c9800fcd0cdea6cefa2ac8 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -103,9 +103,10 @@ IsolateHolder::~IsolateHolder() { +@@ -105,9 +105,10 @@ IsolateHolder::~IsolateHolder() { // static void IsolateHolder::Initialize(ScriptMode mode, v8::ArrayBuffer::Allocator* allocator, diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index dadc127b643fb..a8b3261417805 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 b6e69f3047b967e705b895696a832adc06387b24..d5eb3c3e6ebb85868bead891e8b53f677328df49 100644 +index 1a4acc42f9ee7390e8d7355835bbb885fe603fb6..65e95e4796e203f72cec2e6afe653e3af9bf7e59 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -649,6 +649,11 @@ +@@ -665,6 +665,11 @@ "includes": [3880], }, diff --git a/patches/chromium/isolate_holder.patch b/patches/chromium/isolate_holder.patch index 5cc35ed51ad88..b697d91fde51f 100644 --- a/patches/chromium/isolate_holder.patch +++ b/patches/chromium/isolate_holder.patch @@ -8,7 +8,7 @@ needs to register on an isolate so that it can be used later down in the initialization process of an isolate. diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc -index 58a0eb4b105c802f9dd336a778081ccb0ef084a0..77e0d468f0fcb3b37f8f47134bf543db03b53a16 100644 +index 9ded78a8fd05bf4278c9800fcd0cdea6cefa2ac8..f25c4bc7aa0e13ef772294afec7d94c01c498205 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc @@ -53,7 +53,8 @@ IsolateHolder::IsolateHolder( diff --git a/patches/chromium/mas_blink_no_private_api.patch b/patches/chromium/mas_blink_no_private_api.patch index 38b83d60c1f5c..56174e45eed48 100644 --- a/patches/chromium/mas_blink_no_private_api.patch +++ b/patches/chromium/mas_blink_no_private_api.patch @@ -72,49 +72,3 @@ index 94afefcee81b87c05bf9b1199d90d3d4b5ea84a6..2ec7f04c71824b47de1ddbf1f0e8625d } } // namespace blink -diff --git a/third_party/blink/renderer/core/paint/theme_painter_mac.mm b/third_party/blink/renderer/core/paint/theme_painter_mac.mm -index 8f4ae94bc1d8188d041654c50511f3346eee79de..fa06f47abbff3dcda937bf0b794f616e4818cd30 100644 ---- a/third_party/blink/renderer/core/paint/theme_painter_mac.mm -+++ b/third_party/blink/renderer/core/paint/theme_painter_mac.mm -@@ -41,6 +41,7 @@ - - // The methods in this file are specific to the Mac OS X platform. - -+#ifndef MAS_BUILD - // Forward declare Mac SPIs. - extern "C" { - void _NSDrawCarbonThemeBezel(NSRect frame, BOOL enabled, BOOL flipped); -@@ -50,6 +51,7 @@ void _NSDrawCarbonThemeListBox(NSRect frame, - BOOL flipped, - BOOL always_yes); - } -+#endif - - namespace blink { - -@@ -95,10 +97,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame, - // behavior change while remaining a fragile solution. - // https://bugs.chromium.org/p/chromium/issues/detail?id=658085#c3 - if (!use_ns_text_field_cell) { -+#ifndef MAS_BUILD - _NSDrawCarbonThemeBezel( - CGRect(r), - LayoutTheme::IsEnabled(node) && !LayoutTheme::IsReadOnlyControl(node), - YES); -+#endif - return false; - } - -@@ -186,10 +190,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame, - const IntRect& r) { - ScopedColorSchemeAppearance appearance(style.UsedColorScheme()); - LocalCurrentGraphicsContext local_context(paint_info.context, r); -+#ifndef MAS_BUILD - _NSDrawCarbonThemeListBox( - CGRect(r), - LayoutTheme::IsEnabled(node) && !LayoutTheme::IsReadOnlyControl(node), - YES, YES); -+#endif - return false; - } - diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 360afd5bf5463..f965a5d15c9c9 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -117,7 +117,7 @@ index 82f2b94d4fe1688fd19d5321c4a4398dda3b8d33..b00517cb5b5acdce7b58552967858b93 // Used to force the NSApplication's focused accessibility element to be the // content::BrowserAccessibilityCocoa accessibility tree when the NSView for diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index c716b747db822a4dfd97c07e0abeb4d1e4b79e03..764d23f23ce2c7bc8068d0fbd97da08fd81b35dd 100644 +index 6d7cef71ce502f430479b4ad763ecee6080de397..740cf03a50818b6a769abed1d487b0c9a6be2c26 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -233,8 +233,10 @@ @@ -131,7 +131,7 @@ index c716b747db822a4dfd97c07e0abeb4d1e4b79e03..764d23f23ce2c7bc8068d0fbd97da08f // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1383,8 +1385,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1385,8 +1387,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -142,7 +142,7 @@ index c716b747db822a4dfd97c07e0abeb4d1e4b79e03..764d23f23ce2c7bc8068d0fbd97da08f return [GetInProcessNSView() window]; } -@@ -1416,9 +1420,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1418,9 +1422,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -154,7 +154,7 @@ index c716b747db822a4dfd97c07e0abeb4d1e4b79e03..764d23f23ce2c7bc8068d0fbd97da08f } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -1905,12 +1911,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1907,12 +1913,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -170,7 +170,7 @@ index c716b747db822a4dfd97c07e0abeb4d1e4b79e03..764d23f23ce2c7bc8068d0fbd97da08f /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 88883f2c90d89e719ba2c1d1541c73a13f7f2e0c..60b80facdae6eb6fed22b4a7e20a31f2928ab5fe 100644 +index 196069945632bc613070b76caf8a895ca245ac5e..e0c861592f58f21417d6c128c0b9386efdaded90 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -313,6 +313,13 @@ component("base") { diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 7640e8accbdb5..461d335647246 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -7,10 +7,10 @@ Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be excluded for people who want to submit their apps to the Mac App store. diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm -index 3846ac2e4ff654f77f8f66ace3bd87410534e34d..4cd4cd7f32f49c71134880252f5e5bdde8168d09 100644 +index f60a93dd95c451d262bd61383af965a3d6068aa8..a1ecc3010413b1c51ea24bb8fe5a9dd562e32fe9 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm +++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm -@@ -299,7 +299,7 @@ OptionalNSObject InvokeAttributeFor( +@@ -297,7 +297,7 @@ OptionalNSObject InvokeAttributeFor( 0 == strcmp([value objCType], @encode(NSRange))) { return PopulateRange([value rangeValue]); } @@ -19,7 +19,7 @@ index 3846ac2e4ff654f77f8f66ace3bd87410534e34d..4cd4cd7f32f49c71134880252f5e5bdd // AXTextMarker if (content::IsAXTextMarker(value)) { return PopulateTextPosition(content::AXTextMarkerToPosition(value).get(), -@@ -310,7 +310,7 @@ OptionalNSObject InvokeAttributeFor( +@@ -308,7 +308,7 @@ OptionalNSObject InvokeAttributeFor( if (content::IsAXTextMarkerRange(value)) { return PopulateTextMarkerRange(value, line_indexes_map); } @@ -28,7 +28,7 @@ index 3846ac2e4ff654f77f8f66ace3bd87410534e34d..4cd4cd7f32f49c71134880252f5e5bdd // Accessible object if ([value isKindOfClass:[BrowserAccessibilityCocoa class]]) { return base::Value(NodeToLineIndex(value, line_indexes_map)); -@@ -361,7 +361,7 @@ OptionalNSObject InvokeAttributeFor( +@@ -359,7 +359,7 @@ OptionalNSObject InvokeAttributeFor( kConstValuePrefix + affinity); return set; } @@ -37,7 +37,7 @@ index 3846ac2e4ff654f77f8f66ace3bd87410534e34d..4cd4cd7f32f49c71134880252f5e5bdd base::Value AccessibilityTreeFormatterMac::PopulateTextMarkerRange( id object, const LineIndexesMap& line_indexes_map) const { -@@ -376,7 +376,7 @@ OptionalNSObject InvokeAttributeFor( +@@ -374,7 +374,7 @@ OptionalNSObject InvokeAttributeFor( dict.SetPath("focus", PopulateTextPosition(range.focus(), line_indexes_map)); return dict; } @@ -47,10 +47,10 @@ index 3846ac2e4ff654f77f8f66ace3bd87410534e34d..4cd4cd7f32f49c71134880252f5e5bdd NSArray* node_array, const LineIndexesMap& line_indexes_map) const { diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm -index a6d1fc76a58b03a0a35a9724850fe9ee84fe7909..d3e251cc3273d38a8930d00615a1423b4487b8de 100644 +index 71126d0224fd796469d7865cffe336ba3178e796..e255c225c4d4202966e76594af2fb4084c8cb950 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm +++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm -@@ -153,6 +153,7 @@ +@@ -152,6 +152,7 @@ if (property_name == "AXIndexForChildUIElement") { // UIElement return OptionalNSObject::NotNilOrError(PropertyNodeToUIElement(arg_node)); } @@ -58,7 +58,7 @@ index a6d1fc76a58b03a0a35a9724850fe9ee84fe7909..d3e251cc3273d38a8930d00615a1423b if (property_name == "AXIndexForTextMarker") { // TextMarker return OptionalNSObject::NotNilOrError(PropertyNodeToTextMarker(arg_node)); } -@@ -160,6 +161,7 @@ +@@ -159,6 +160,7 @@ return OptionalNSObject::NotNilOrError( PropertyNodeToTextMarkerRange(arg_node)); } @@ -66,7 +66,7 @@ index a6d1fc76a58b03a0a35a9724850fe9ee84fe7909..d3e251cc3273d38a8930d00615a1423b return OptionalNSObject::NotApplicable(); } -@@ -226,6 +228,7 @@ +@@ -224,6 +226,7 @@ return uielement; } @@ -74,7 +74,7 @@ index a6d1fc76a58b03a0a35a9724850fe9ee84fe7909..d3e251cc3273d38a8930d00615a1423b id AttributeInvoker::DictNodeToTextMarker(const PropertyNode& dictnode) const { if (!dictnode.IsDict()) { TEXTMARKER_FAIL(dictnode, "dictionary is expected") -@@ -293,6 +296,7 @@ +@@ -291,6 +294,7 @@ return content::AXTextMarkerRangeFrom(anchor_textmarker, focus_textmarker); } @@ -369,10 +369,10 @@ index d203e3a6a80d3347e22c84384359de3df50a1f0c..7d38e86e76e1f1ae70300141091d0fb9 return nil; } diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index 87dafcd74b0c037a1aa3cdfe305d586218f12aa7..cdf2bde5ed2bd740797c7c3d422f78517937ab2d 100644 +index f77433fff5426dd174865aad3d290d787764174c..d64e4fbcf44590e9132c2338819d2aa76612db95 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm -@@ -533,6 +533,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -529,6 +529,7 @@ void PostAnnouncementNotification(NSString* announcement) { [user_info setObject:native_focus_object forKey:NSAccessibilityTextChangeElement]; @@ -380,7 +380,7 @@ index 87dafcd74b0c037a1aa3cdfe305d586218f12aa7..cdf2bde5ed2bd740797c7c3d422f7851 id selected_text = [native_focus_object selectedTextMarkerRange]; if (selected_text) { NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute = -@@ -540,6 +541,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -536,6 +537,7 @@ void PostAnnouncementNotification(NSString* announcement) { [user_info setObject:selected_text forKey:NSAccessibilitySelectedTextMarkerRangeAttribute]; } @@ -503,7 +503,7 @@ index 933483c36d94336c8e9cc56a53bc86aee01e12d0..a48b4af66fb4edcf74caef5bec68c53b void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 0e8a5903f6b24e31c2b71037e94870aafbf30112..ea6b5c203fb6b34be36b86a2a3edcd5c69549fc5 100644 +index f5279e1f51e9fcb5f700311153b67044ddc81497..2aad6e02ef356765b80141702c21bb03dc2eb977 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn @@ -171,6 +171,12 @@ source_set("audio") { @@ -533,7 +533,7 @@ index a994f74bb68d1e57ffa787e159f0a6c69e7b6953..1d84f84b59b2bae75c10c00da730022e } diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc -index 3206f81a75f4b7ea3a4257293dc92c3ada4c1327..2bcbf81008783dc8f6a10a65fac07875ee442e72 100644 +index 5a4aead0acf93db6a633fa90fac3c9943d58f6df..808ccae535c5a8473e15a7067b1e9034f3809b93 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc @@ -247,6 +247,7 @@ class DnsConfigServicePosix::Watcher { 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 d0bf3ba971a8e..0e03869ef07f6 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 448aa22f8772c4a8a6e5447a88964c9c4ef6b3e8..f5ef11a3bed2a5eb3f699f9ee0ee37fbf5fe531a 100644 +index ae873fbaf3662fa9e5c71068a5c1cad491cdb104..10ba3b1ad5d8bacbfd0f8b947db139058cd2d5f8 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -115,6 +115,11 @@ @@ -102,7 +102,7 @@ index 448aa22f8772c4a8a6e5447a88964c9c4ef6b3e8..f5ef11a3bed2a5eb3f699f9ee0ee37fb constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -565,6 +643,13 @@ void NetworkContext::SetClient( +@@ -563,6 +641,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -116,7 +116,7 @@ index 448aa22f8772c4a8a6e5447a88964c9c4ef6b3e8..f5ef11a3bed2a5eb3f699f9ee0ee37fb void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -1822,8 +1907,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -1818,8 +1903,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( "NetworkContext should pass CertVerifierServiceRemoteParams."; std::unique_ptr cert_verifier; @@ -127,7 +127,7 @@ index 448aa22f8772c4a8a6e5447a88964c9c4ef6b3e8..f5ef11a3bed2a5eb3f699f9ee0ee37fb } else { if (params_->cert_verifier_params && params_->cert_verifier_params->is_remote_params()) { -@@ -1851,14 +1937,14 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -1847,14 +1933,14 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( cert_net_fetcher_ = base::MakeRefCounted(); @@ -145,7 +145,7 @@ index 448aa22f8772c4a8a6e5447a88964c9c4ef6b3e8..f5ef11a3bed2a5eb3f699f9ee0ee37fb #if defined(OS_CHROMEOS) cert_verifier_with_trust_anchors_ = -@@ -1867,13 +1953,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -1863,13 +1949,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( UpdateAdditionalCertificates( std::move(params_->initial_additional_certificates)); cert_verifier_with_trust_anchors_->InitializeOnIOThread( @@ -178,7 +178,7 @@ index 448aa22f8772c4a8a6e5447a88964c9c4ef6b3e8..f5ef11a3bed2a5eb3f699f9ee0ee37fb std::unique_ptr network_delegate = std::make_unique( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 75a4ff5c1a45cb8a36f6b2979fc9a12a68e23953..75531d963c4ee8bb4197b30c93623e556f404155 100644 +index 2025d29440b96a30feb62ba12c62718bbd41297d..3700f3ee61d4eb33a4574f3270c10a70b00057e3 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -87,6 +87,7 @@ class DomainReliabilityMonitor; @@ -198,7 +198,7 @@ index 75a4ff5c1a45cb8a36f6b2979fc9a12a68e23953..75531d963c4ee8bb4197b30c93623e55 void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -676,6 +679,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -674,6 +677,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr; #endif @@ -208,7 +208,7 @@ index 75a4ff5c1a45cb8a36f6b2979fc9a12a68e23953..75531d963c4ee8bb4197b30c93623e55 // CertNetFetcher is not used by the current platform, or if the actual // net::CertVerifier is instantiated outside of the network service. diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index cd3e4ca306a520c519e04911a31f4cf37189ec52..0b97c9fe29f24b1305740506458b0b6a02263c3c 100644 +index 87b26150440e33c6d12f10801c5bcc68685459b4..d9227c78e4439d90dba68349e540ae42ab3c3000 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -214,6 +214,17 @@ struct CTPolicy { @@ -229,7 +229,7 @@ index cd3e4ca306a520c519e04911a31f4cf37189ec52..0b97c9fe29f24b1305740506458b0b6a // Parameters for constructing a network context. struct NetworkContextParams { // Name used by memory tools to identify the context. -@@ -867,6 +878,9 @@ interface NetworkContext { +@@ -879,6 +890,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); diff --git a/patches/chromium/no_cache_storage_check.patch b/patches/chromium/no_cache_storage_check.patch index 52bd6f2716c6d..250bf039637cf 100644 --- a/patches/chromium/no_cache_storage_check.patch +++ b/patches/chromium/no_cache_storage_check.patch @@ -7,7 +7,7 @@ Do not check for unique origin in CacheStorage, in Electron we may have scripts running without an origin. diff --git a/content/browser/cache_storage/legacy/legacy_cache_storage.cc b/content/browser/cache_storage/legacy/legacy_cache_storage.cc -index ce2326133bcef48cce318f84ca8cbc86dbd2710d..0971a66534e130b3b69642863ac3c27c43ada6c4 100644 +index 6915a3b34cfed0237155f47ca612930954d9059d..2b4e3fa53177fafd88bae4e4eeb9647dde414263 100644 --- a/content/browser/cache_storage/legacy/legacy_cache_storage.cc +++ b/content/browser/cache_storage/legacy/legacy_cache_storage.cc @@ -107,7 +107,7 @@ class LegacyCacheStorage::CacheLoader { diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 17c87b7623e6a..9fa14b3dd7073 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -108,7 +108,7 @@ index f9b6a18aa73968506ddeca13de69b368f4ca8606..d45cb1c32be1b5c76840dafcd96fd06c 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 cf4162568a83916965542ae24cec388616272390..be7f43c0ce2a6b1a696ef96415bd60532ff65fbf 100644 +index a647a101f9328c1cd9f293af8a3a4c2155922662..6380f60451affea9e801838c60842f9aaf85560d 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -2152,7 +2152,7 @@ void RenderProcessHostImpl::CreateNotificationService( diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 2ce546f0f3cb9..d39ebebf6c270 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -35,7 +35,7 @@ index e9b64a823ae7e25361f37190d247af0fa6a6f68a..43fdb0ad50d2b11a1bc28aa0f358c6dd #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/color_palette.h" diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc -index 31ea06a7cee464ee4074c80279f5bb2a02aef21c..4ee4be3ba12f7cd18b62fe72c00be10d382a4caa 100644 +index 750e1734aa9a8450c5a1616cca1e912c0023a472..55a685e31eef5fcb7d78fa1d6dd2514ac647ac19 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc @@ -19,7 +19,7 @@ diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index e25e7ff342926..1901180f8f543 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -11,10 +11,10 @@ majority of changes originally come from these PRs: This patch also fixes callback for manual user cancellation and success. diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc -index 668a14bff461e83b2c6d9d7f23d9674ff081ef12..674f141e80c0316fd47558c4d428a9706ac5a7b6 100644 +index 792f6ac614a159cd28c8ebefde627b13796a4f67..0aa8f73852aa33a174f75251d8862b0c0d355ff1 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc -@@ -353,12 +353,14 @@ void PrintJob::StartPdfToEmfConversion( +@@ -354,12 +354,14 @@ void PrintJob::StartPdfToEmfConversion( // TODO(thestig): Figure out why crbug.com/1083911 occurred, which is likely // because |web_contents| was null. As a result, this section has many more // pointer checks to avoid crashing. @@ -31,7 +31,7 @@ index 668a14bff461e83b2c6d9d7f23d9674ff081ef12..674f141e80c0316fd47558c4d428a970 using RenderMode = PdfRenderSettings::Mode; RenderMode mode; diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index 977ad787270844b218a87fbe04fea616619e84ba..592fe4459cdae22d23a933a31c452c44992feb95 100644 +index 17788cb2b506bbf04d8d5fe533e4374fddd8b9d2..a935d79806c3281fd7e75617fd226d8481fd0d80 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,7 +20,6 @@ @@ -90,7 +90,7 @@ index 977ad787270844b218a87fbe04fea616619e84ba..592fe4459cdae22d23a933a31c452c44 } diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7c18a6adc 100644 +index dc7ff3ef3447d756936f77fdcec102e06a32908f..2850bc543cb1c95da992067cabd5bf456a505d9d 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -27,10 +27,7 @@ @@ -129,8 +129,8 @@ index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7 } #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -116,12 +117,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) - printing_succeeded_(false), +@@ -114,12 +115,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) + : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); +#if 0 @@ -144,7 +144,7 @@ index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7 } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -129,7 +132,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -127,7 +130,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -156,7 +156,7 @@ index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7 DisconnectFromCurrentPrintJob(); // Don't print / print preview crashed tabs. -@@ -137,7 +143,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -135,7 +141,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { return false; SetPrintingRFH(rfh); @@ -172,7 +172,7 @@ index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7 return true; } -@@ -258,9 +271,9 @@ void PrintViewManagerBase::StartLocalPrintJob( +@@ -256,9 +269,9 @@ void PrintViewManagerBase::StartLocalPrintJob( void PrintViewManagerBase::UpdatePrintingEnabled() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); // The Unretained() is safe because ForEachFrame() is synchronous. @@ -185,7 +185,7 @@ index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7 } void PrintViewManagerBase::NavigationStopped() { -@@ -363,7 +376,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) { +@@ -361,7 +374,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) { PrintManager::OnPrintingFailed(cookie); #if BUILDFLAG(ENABLE_PRINT_PREVIEW) @@ -194,7 +194,7 @@ index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7 #endif ReleasePrinterQuery(); -@@ -382,6 +395,11 @@ void PrintViewManagerBase::OnScriptedPrint( +@@ -380,6 +393,11 @@ void PrintViewManagerBase::OnScriptedPrint( } void PrintViewManagerBase::OnShowInvalidPrinterSettingsError() { @@ -206,7 +206,7 @@ index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7 base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -463,9 +481,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent( +@@ -461,9 +479,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent( content::NotificationService::NoDetails()); break; } @@ -222,7 +222,7 @@ index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7 NOTREACHED(); break; } -@@ -560,8 +582,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -558,8 +580,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( DCHECK(!quit_inner_loop_); DCHECK(query); @@ -235,7 +235,7 @@ index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7 // We can't print if there is no renderer. if (!web_contents()->GetRenderViewHost() || -@@ -582,8 +606,6 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -580,8 +604,6 @@ bool PrintViewManagerBase::CreateNewPrintJob( print_job_->SetSource(source, /*source_id=*/""); #endif @@ -244,7 +244,7 @@ index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7 printing_succeeded_ = false; return true; } -@@ -632,14 +654,22 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -630,14 +652,22 @@ void PrintViewManagerBase::ReleasePrintJob() { content::RenderFrameHost* rfh = printing_rfh_; printing_rfh_ = nullptr; @@ -269,7 +269,7 @@ index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7 // Don't close the worker thread. print_job_ = nullptr; } -@@ -675,7 +705,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -673,7 +703,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -279,7 +279,7 @@ index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..33f48f473efd04e165ec7b9a8738b8d7 if (!cookie) { diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 9ad03ae28904050d540661038f6ba15b7a5c5c54..6d1c4f338dde79abddbaf3ad55500c4e7e8767ec 100644 +index 234f422e7b4cc0c424eefbfcb78eef8e7d7b446d..99b8f8ee8c9e9ca83728def1fccfe899e2bf0104 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h @@ -34,6 +34,8 @@ class PrintJob; @@ -305,13 +305,13 @@ index 9ad03ae28904050d540661038f6ba15b7a5c5c54..6d1c4f338dde79abddbaf3ad55500c4e // Prints the document in |print_data| with settings specified in @@ -208,9 +213,15 @@ class PrintViewManagerBase : public content::NotificationObserver, // The current RFH that is printing with a system printing dialog. - content::RenderFrameHost* printing_rfh_; + content::RenderFrameHost* printing_rfh_ = nullptr; + // Respond with success of the print job. + CompletionCallback callback_; + // Indication of success of the print job. - bool printing_succeeded_; + bool printing_succeeded_ = false; + // Indication of whether the print job was manually cancelled + bool printing_cancelled_ = false; @@ -320,18 +320,18 @@ index 9ad03ae28904050d540661038f6ba15b7a5c5c54..6d1c4f338dde79abddbaf3ad55500c4e // This means we are _blocking_ until all the necessary pages have been // rendered or the print settings are being loaded. diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc -index 64569c4c89b1e034a19b85bb3f6443d3ab76fcd8..164368028a6f3cf14ed6199e0f69717c514090a6 100644 +index f7754394876d0d5a2613ed9bfd75a0ff220a7c42..1f8150f7c65a3d3ef51144a6589c9f78334564d1 100644 --- a/chrome/browser/printing/printing_message_filter.cc +++ b/chrome/browser/printing/printing_message_filter.cc -@@ -21,6 +21,7 @@ - #include "components/keyed_service/content/browser_context_keyed_service_shutdown_notifier_factory.h" +@@ -22,6 +22,7 @@ #include "components/printing/browser/print_manager_utils.h" + #include "components/printing/common/print.mojom.h" #include "components/printing/common/print_messages.h" +#include "content/public/browser/browser_context.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" -@@ -90,19 +91,22 @@ void PrintingMessageFilter::SetDelegateForTesting(TestDelegate* delegate) { +@@ -91,19 +92,22 @@ void PrintingMessageFilter::SetDelegateForTesting(TestDelegate* delegate) { g_test_delegate = delegate; } @@ -357,7 +357,7 @@ index 64569c4c89b1e034a19b85bb3f6443d3ab76fcd8..164368028a6f3cf14ed6199e0f69717c } PrintingMessageFilter::~PrintingMessageFilter() { -@@ -137,11 +141,13 @@ bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) { +@@ -138,11 +142,13 @@ bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) { void PrintingMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) { DCHECK_CURRENTLY_ON(BrowserThread::IO); @@ -371,7 +371,7 @@ index 64569c4c89b1e034a19b85bb3f6443d3ab76fcd8..164368028a6f3cf14ed6199e0f69717c std::unique_ptr printer_query = queue_->PopPrinterQuery(0); if (!printer_query) { printer_query = -@@ -225,12 +231,13 @@ void PrintingMessageFilter::OnScriptedPrintReply( +@@ -226,12 +232,13 @@ void PrintingMessageFilter::OnScriptedPrintReply( void PrintingMessageFilter::OnUpdatePrintSettings(int document_cookie, base::Value job_settings, IPC::Message* reply_msg) { @@ -386,7 +386,7 @@ index 64569c4c89b1e034a19b85bb3f6443d3ab76fcd8..164368028a6f3cf14ed6199e0f69717c if (!job_settings.is_dict() || !job_settings.FindIntKey(kSettingPrinterType)) { // Reply with null query. -@@ -263,7 +270,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( +@@ -264,7 +271,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( std::unique_ptr printer_query, IPC::Message* reply_msg) { PrintMsg_PrintPages_Params params; @@ -397,7 +397,7 @@ index 64569c4c89b1e034a19b85bb3f6443d3ab76fcd8..164368028a6f3cf14ed6199e0f69717c params.Reset(); } else { RenderParamsFromPrintSettings(printer_query->settings(), ¶ms.params); -@@ -301,7 +310,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( +@@ -302,7 +311,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintingMessageFilter::OnCheckForCancel(const PrintHostMsg_PreviewIds& ids, bool* cancel) { @@ -407,11 +407,11 @@ index 64569c4c89b1e034a19b85bb3f6443d3ab76fcd8..164368028a6f3cf14ed6199e0f69717c #endif diff --git a/chrome/browser/printing/printing_message_filter.h b/chrome/browser/printing/printing_message_filter.h -index adb4ff6ece476a99ae12d9e3ecfb78931c04c81e..894148c8847b333be8636907e85476dcd46862e2 100644 +index 478183cd3e5c2022ad3f484daf2f56b16f091203..951cedc75abb1e4a1e6da1a1371ba42a0ecd698c 100644 --- a/chrome/browser/printing/printing_message_filter.h +++ b/chrome/browser/printing/printing_message_filter.h -@@ -24,6 +24,10 @@ struct PrintHostMsg_PreviewIds; - struct PrintHostMsg_ScriptedPrint_Params; +@@ -23,6 +23,10 @@ + struct PrintHostMsg_PreviewIds; class Profile; +namespace content { @@ -421,7 +421,7 @@ index adb4ff6ece476a99ae12d9e3ecfb78931c04c81e..894148c8847b333be8636907e85476dc namespace printing { class PrintQueriesQueue; -@@ -44,7 +48,8 @@ class PrintingMessageFilter : public content::BrowserMessageFilter { +@@ -43,7 +47,8 @@ class PrintingMessageFilter : public content::BrowserMessageFilter { static void SetDelegateForTesting(TestDelegate* delegate); @@ -432,10 +432,10 @@ index adb4ff6ece476a99ae12d9e3ecfb78931c04c81e..894148c8847b333be8636907e85476dc // content::BrowserMessageFilter: bool OnMessageReceived(const IPC::Message& message) override; diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index 948c86689c2779a8dc41b458ac670ec8a94e0efa..2e160658ff5ea814b9133c925e8b461a0d9bcfbc 100644 +index 177a590b5f4586274ad60b83262567a87052838a..5e918f733179fd12f2544db0ff11d73d6af51155 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom -@@ -197,7 +197,7 @@ interface PrintPreviewUI { +@@ -209,7 +209,7 @@ interface PrintPreviewUI { interface PrintRenderFrame { // Tells the RenderFrame to switch the CSS to print media type, render every // requested page, and then switch back the CSS to display media type. @@ -445,10 +445,10 @@ index 948c86689c2779a8dc41b458ac670ec8a94e0efa..2e160658ff5ea814b9133c925e8b461a // 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 788257825daa531d2f878c4ee53272dd265dc8aa..e25c8cb1be55df8ae3af62a5738fc3813fa5d2e0 100644 +index a33f55540de28603273876ffbcb649a3ef8e008c..6d1ae5f05077ac02bca796828f9801a313966708 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -40,6 +40,7 @@ +@@ -39,6 +39,7 @@ #include "printing/buildflags/buildflags.h" #include "printing/metafile_skia.h" #include "printing/mojom/print.mojom.h" @@ -456,17 +456,15 @@ index 788257825daa531d2f878c4ee53272dd265dc8aa..e25c8cb1be55df8ae3af62a5738fc381 #include "printing/units.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" -@@ -1156,7 +1157,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { - web_frame->DispatchBeforePrintEvent(); - if (!weak_this) - return; -- Print(web_frame, blink::WebNode(), PrintRequestType::kScripted); -+ Print(web_frame, blink::WebNode(), PrintRequestType::kScripted, -+ false /* silent */, base::DictionaryValue() /* new_settings */); +@@ -1161,6 +1162,7 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { + // Pause between onbeforeprint and onafterprint events. + // https://html.spec.whatwg.org/C/#printing-steps + Print(web_frame, blink::WebNode(), PrintRequestType::kScripted, ++ false /* silent */, base::DictionaryValue() /* new_settings */, + blink::WebScopedPagePauser::Create()); + if (weak_this) - web_frame->DispatchAfterPrintEvent(); - } -@@ -1177,7 +1179,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1189,7 +1191,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -475,25 +473,25 @@ index 788257825daa531d2f878c4ee53272dd265dc8aa..e25c8cb1be55df8ae3af62a5738fc381 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > 1) return; -@@ -1191,7 +1193,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); -- Print(frame, plugin, PrintRequestType::kRegular); -+ Print(frame, plugin, PrintRequestType::kRegular, silent, std::move(settings)); +@@ -1206,7 +1208,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { + + // Pause between onbeforeprint and onafterprint events. + // https://html.spec.whatwg.org/C/#printing-steps +- Print(frame, plugin, PrintRequestType::kRegular, ++ Print(frame, plugin, PrintRequestType::kRegular, silent, std::move(settings), + blink::WebScopedPagePauser::Create()); + if (!render_frame_gone_) - frame->DispatchAfterPrintEvent(); - // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1208,7 +1210,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { - return; - } - Print(frame, print_preview_context_.source_node(), -- PrintRequestType::kRegular); -+ PrintRequestType::kRegular, false, base::DictionaryValue()); +@@ -1228,7 +1230,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { + // Hand over control, including Print Preview's WebScopedPagePauser, to the + // system print dialog. + Print(frame, print_preview_context_.source_node(), PrintRequestType::kRegular, +- print_preview_context_.TakePauser()); ++ false, base::DictionaryValue(), print_preview_context_.TakePauser()); if (!render_frame_gone_) - frame->DispatchAfterPrintEvent(); + print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1256,6 +1258,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1276,6 +1278,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > 1) return; @@ -502,29 +500,27 @@ index 788257825daa531d2f878c4ee53272dd265dc8aa..e25c8cb1be55df8ae3af62a5738fc381 print_preview_context_.OnPrintPreview(); if (print_preview_context_.IsForArc()) { -@@ -1790,7 +1794,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1828,7 +1832,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, -- PrintRequestType::kRegular); -+ PrintRequestType::kRegular, -+ false /* silent */, -+ base::DictionaryValue() /* new_settings */); +- PrintRequestType::kRegular, blink::WebScopedPagePauser::Create()); ++ PrintRequestType::kRegular, false /* silent */, ++ base::DictionaryValue() /* new_settings */, ++ blink::WebScopedPagePauser::Create()); // Check if |this| is still valid. if (!weak_this) return; -@@ -1805,7 +1811,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { - - void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, - const blink::WebNode& node, -- PrintRequestType print_request_type) { -+ PrintRequestType print_request_type, -+ bool silent, -+ base::Value settings) { +@@ -1845,6 +1851,8 @@ void PrintRenderFrameHelper::Print( + blink::WebLocalFrame* frame, + const blink::WebNode& node, + PrintRequestType print_request_type, ++ bool silent, ++ base::Value settings, + std::unique_ptr pauser) { // If still not finished with earlier print request simply ignore. if (prep_frame_view_) - return; -@@ -1813,7 +1821,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1853,7 +1861,7 @@ void PrintRenderFrameHelper::Print( FrameReference frame_ref(frame); int expected_page_count = 0; @@ -533,7 +529,7 @@ index 788257825daa531d2f878c4ee53272dd265dc8aa..e25c8cb1be55df8ae3af62a5738fc381 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1833,8 +1841,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1873,8 +1881,11 @@ void PrintRenderFrameHelper::Print( PrintMsg_PrintPages_Params print_settings; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -547,7 +543,7 @@ index 788257825daa531d2f878c4ee53272dd265dc8aa..e25c8cb1be55df8ae3af62a5738fc381 // Check if |this| is still valid. if (!self) return; -@@ -2075,10 +2086,23 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2120,10 +2131,23 @@ void PrintRenderFrameHelper::IPCProcessed() { base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); } @@ -574,7 +570,7 @@ index 788257825daa531d2f878c4ee53272dd265dc8aa..e25c8cb1be55df8ae3af62a5738fc381 // 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. -@@ -2098,12 +2122,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { +@@ -2143,12 +2167,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { return result; } @@ -594,10 +590,10 @@ index 788257825daa531d2f878c4ee53272dd265dc8aa..e25c8cb1be55df8ae3af62a5738fc381 Send(new PrintHostMsg_ShowInvalidPrinterSettingsError(routing_id())); return false; diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index b5ec1df59c37ac18c64abe58955e676f546b3da8..6323915537c22bce36c3289fd51d73946bd72d61 100644 +index dcf833ec1ba661509b4046a2f16ee36611e6cb9b..c2b6739b268fdd05185dbee7ab40f91c3e54d413 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h -@@ -226,7 +226,7 @@ class PrintRenderFrameHelper +@@ -233,7 +233,7 @@ class PrintRenderFrameHelper mojo::PendingAssociatedReceiver receiver); // printing::mojom::PrintRenderFrame: @@ -606,18 +602,16 @@ index b5ec1df59c37ac18c64abe58955e676f546b3da8..6323915537c22bce36c3289fd51d7394 void PrintForSystemDialog() override; #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void SetPrintPreviewUI( -@@ -293,7 +293,9 @@ class PrintRenderFrameHelper - // WARNING: |this| may be gone after this method returns. +@@ -301,6 +301,8 @@ class PrintRenderFrameHelper void Print(blink::WebLocalFrame* frame, const blink::WebNode& node, -- PrintRequestType print_request_type); -+ PrintRequestType print_request_type, + PrintRequestType print_request_type, + bool silent, -+ base::Value settings); ++ base::Value settings, + std::unique_ptr pauser); // Notification when printing is done - signal tear-down/free resources. - void DidFinishPrinting(PrintingResult result); -@@ -302,12 +304,14 @@ class PrintRenderFrameHelper +@@ -310,12 +312,14 @@ class PrintRenderFrameHelper // Initialize print page settings with default settings. // Used only for native printing workflow. @@ -635,10 +629,10 @@ index b5ec1df59c37ac18c64abe58955e676f546b3da8..6323915537c22bce36c3289fd51d7394 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/printing/printing_context.cc b/printing/printing_context.cc -index 83e845e8093db6569d77255442c315920803b033..e7505757f2ea1fb8cef0b493336976768ff910d1 100644 +index 5f82472c0123c4a71be6c18561229ce2261b93e4..ed7db3d8463eb1353d7cadea33ded3c4d4ef21fe 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc -@@ -94,8 +94,6 @@ PrintingContext::Result PrintingContext::UsePdfSettings() { +@@ -95,8 +95,6 @@ PrintingContext::Result PrintingContext::UsePdfSettings() { PrintingContext::Result PrintingContext::UpdatePrintSettings( base::Value job_settings) { @@ -648,10 +642,10 @@ index 83e845e8093db6569d77255442c315920803b033..e7505757f2ea1fb8cef0b49333697676 NOTREACHED(); return OnError(); diff --git a/printing/printing_context.h b/printing/printing_context.h -index 02144650a9ede47c69fd363a3f275166774aa3de..130d6e433925c509eb9728e99de3b53fee97b95c 100644 +index 7ac9ce996ca7cbf8bcd21cb0c8161b63050ff684..43f5383bfed965c3d8cd3102dc18309a65c457ae 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h -@@ -132,12 +132,12 @@ class PRINTING_EXPORT PrintingContext { +@@ -133,12 +133,12 @@ class PRINTING_EXPORT PrintingContext { int job_id() const { return job_id_; } diff --git a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch index a6efc3aa5bd64..9823c9547b157 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -8,18 +8,18 @@ Chrome moved the SetCursor IPC message to mojo, which we use to tell OSR about ` Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779 diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h -index b11e574d6fcfada1eb31c924c016fd81f395b885..4a7c10ffc498347d4c8b3394e863e29ff5319894 100644 +index 32ffa76e3b13e67b50eed12c1b5b651e3a85a150..7faaaa3f1a728a885244b741919560649f64b531 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h -@@ -15,6 +15,7 @@ +@@ -14,6 +14,7 @@ + #include "build/build_config.h" #include "components/viz/common/vertical_scroll_direction.h" - #include "content/browser/renderer_host/input_event_shim.h" #include "content/common/content_export.h" +#include "content/common/cursors/webcursor.h" #include "content/common/drag_event_source_info.h" #include "content/public/common/drop_data.h" #include "services/metrics/public/cpp/ukm_recorder.h" -@@ -282,6 +283,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { +@@ -281,6 +282,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { // Allow the delegate to handle the cursor update. Returns true if handled. virtual bool OnUpdateDragCursor(); @@ -30,10 +30,10 @@ index b11e574d6fcfada1eb31c924c016fd81f395b885..4a7c10ffc498347d4c8b3394e863e29f // RenderWidgetHost on the main frame, and false otherwise. virtual bool IsWidgetForMainFrame(RenderWidgetHostImpl*); diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 77bc5b22fd03af3e576b3bec10ac8b747b013937..8a57bf66f24a1bf98ad3062312f7789648ee2fef 100644 +index ba4490916017d65c08f6f31ef8453928f37b84fd..f336b8c0c7b82b74a0603e6467a4ebf9f783509b 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -1713,6 +1713,8 @@ void RenderWidgetHostImpl::SetCursor(const WebCursor& cursor) { +@@ -1715,6 +1715,8 @@ void RenderWidgetHostImpl::SetCursor(const WebCursor& cursor) { if (!view_) return; view_->UpdateCursor(cursor); @@ -43,10 +43,10 @@ index 77bc5b22fd03af3e576b3bec10ac8b747b013937..8a57bf66f24a1bf98ad3062312f77896 void RenderWidgetHostImpl::OnCursorVisibilityStateChanged(bool is_visible) { diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 4d3ab221333465c3807393facbbf4727884b97b3..052f80a8df327e15e97dd956717897c8be43a1c7 100644 +index b3adfd8438c605894e55fb4786cae4fd2e70345b..0aa99ad47d4152f8849577f09a0cb1b796fde70f 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3950,6 +3950,12 @@ bool WebContentsImpl::OnUpdateDragCursor() { +@@ -3974,6 +3974,12 @@ bool WebContentsImpl::OnUpdateDragCursor() { browser_plugin_embedder_->OnUpdateDragCursor(); } @@ -60,10 +60,10 @@ index 4d3ab221333465c3807393facbbf4727884b97b3..052f80a8df327e15e97dd956717897c8 RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 0de7c43e4a4dcfb2011d93ce3bbb28ac0309abbc..0984f4db13eba71a226586e3b453e5eb1ec22d2d 100644 +index e2a8d8c8242340527e26c4193880be656158376a..588ae2e9695bd622f72c29a49c66abf005899f2b 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -934,6 +934,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -943,6 +943,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, void SendScreenRects() override; TextInputManager* GetTextInputManager() override; bool OnUpdateDragCursor() override; @@ -72,7 +72,7 @@ index 0de7c43e4a4dcfb2011d93ce3bbb28ac0309abbc..0984f4db13eba71a226586e3b453e5eb bool AddDomainInfoToRapporSample(rappor::Sample* sample) override; bool IsShowingContextMenuOnPage() const override; diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h -index 3666e0357038eb8567f219f4ae36040f97887aea..fb116b16ab37622ca93c239e8eb86b48386f2f8b 100644 +index 301fa10bcc3ead324c3982903ee5290ca1b34390..28cbcc231fa4c03c03807ea2a326b78a49d6c292 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -14,6 +14,7 @@ diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index a1d6c9202d709..07d25dbd4fcc6 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch ... something to do with OSR? and maybe as well? terrifying. diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc -index 934195fd77d2ca9bb0b38879b926f093a7a995b3..85b043d6b559870f588e030c7a5c072faa4180a7 100644 +index e0ff930b68812f221c674cbeb05dd287fbec6953..7ef5efa8b2004936c14717b57eb33668f9179e02 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -619,6 +619,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -620,6 +620,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,7 +24,7 @@ index 934195fd77d2ca9bb0b38879b926f093a7a995b3..85b043d6b559870f588e030c7a5c072f const blink::WebMouseEvent& event, const ui::LatencyInfo& latency) { diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h -index af80b343dcd999e69f80c909f62cda0741a88715..7ec814eca3ab25222c3dd36857998cb7253426f5 100644 +index 2adcb50f68f2a595db5f0b15346dcfdcac5e6569..6153763b3d620c338b9a9f37951e69f17e49f8d4 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -25,9 +25,11 @@ @@ -39,7 +39,7 @@ index af80b343dcd999e69f80c909f62cda0741a88715..7ec814eca3ab25222c3dd36857998cb7 #include "content/public/browser/render_widget_host_view.h" #include "content/public/common/widget_type.h" #include "services/viz/public/mojom/hit_test/hit_test_region_list.mojom.h" -@@ -65,9 +67,11 @@ class CursorManager; +@@ -66,9 +68,11 @@ class CursorManager; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; class RenderWidgetHostViewBaseObserver; @@ -51,7 +51,7 @@ index af80b343dcd999e69f80c909f62cda0741a88715..7ec814eca3ab25222c3dd36857998cb7 class WebCursor; class DelegatedFrameHost; struct DisplayFeature; -@@ -125,6 +129,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -126,6 +130,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase bool show_reason_unoccluded, bool show_reason_bfcache_restore) final; @@ -61,7 +61,7 @@ index af80b343dcd999e69f80c909f62cda0741a88715..7ec814eca3ab25222c3dd36857998cb7 // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. gfx::PointF TransformPointToRootCoordSpaceF( -@@ -308,6 +315,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -309,6 +316,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase virtual void ProcessGestureEvent(const blink::WebGestureEvent& event, const ui::LatencyInfo& latency); diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 38924ef9898b8..8a4735e39450a 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 2700599bbd7a2fcb4aaab43dc9ff2a2edf6dfd25..b4534a9e99734c5f47e30a2132f3b33618477994 100644 +index 14a04f524e5df852bd6aa8c54d6c1acc23dcbc34..1edfb760b119271eaf7936201970fba4439634a5 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1399,7 +1399,7 @@ if (is_chrome_branded && !is_android) { +@@ -1398,7 +1398,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 2700599bbd7a2fcb4aaab43dc9ff2a2edf6dfd25..b4534a9e99734c5f47e30a2132f3b336 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1419,6 +1419,12 @@ if (!is_android) { +@@ -1418,6 +1418,12 @@ if (!is_android) { } } diff --git a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch index 8d5c7aae94b65..a68ad72926a9d 100644 --- a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch +++ b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch @@ -9,7 +9,7 @@ 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 db7c909b99bd543048b41e516c08db13e7f9a1c8..bba8fca230f39758e1008fb2b64891e9a6f5ff67 100644 +index eb6e5d353b3333e4e4f474badebc67c672bf84a7..357c894a99c810f5653bab397960b48d47d326e2 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc @@ -1279,6 +1279,25 @@ bool ChromeContentRendererClient::AllowPopup() { @@ -92,10 +92,10 @@ index cc6101c82e659bbc5a8568c166d5a56fae0c8d64..8309bb7f3f284b0930c13a7e75a7f9de // |url|. If the function returns a valid |new_url|, the request must be // updated to use it. The |force_ignore_site_for_cookies| output parameter diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 68d2666696de00c28d57f9745f5ca902d2c16bc9..d870323c7848174c4ca8d428b8f207595f113e92 100644 +index fd2f73901ec6f565033af71f99d531aecab0233f..2f54722031d74b8a5824b27d4e7585c8b21ece54 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -5692,6 +5692,23 @@ void RenderFrameImpl::BeginNavigation( +@@ -5743,6 +5743,23 @@ void RenderFrameImpl::BeginNavigation( // we can do a per-frame check here rather than a process-wide check. bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) || (enabled_bindings_ & kWebUIBindingsPolicyMask); diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index c650dc523d3f0..e8729292413e9 100644 --- a/patches/chromium/scroll_bounce_flag.patch +++ b/patches/chromium/scroll_bounce_flag.patch @@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch Patch to make scrollBounce option work. diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc -index 5530052e8b884343c3eb7e2dc1b6b4dad82d6372..656b92f7b288c9ce637c81fc2ac50046617eadf7 100644 +index afebe5db100f9c7e6a402e3b28b3be6e3d95cf63..543ec9f2bfd5009ed24265b49f08a5ada640028f 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1305,7 +1305,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1306,7 +1306,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 09ddce95d0332..72b640a53f2e2 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 be7f43c0ce2a6b1a696ef96415bd60532ff65fbf..eb99c6f7ef7ca70c6d074d2d0aecd24da383ab76 100644 +index 6380f60451affea9e801838c60842f9aaf85560d..01ed5881a0f6a492c6b5fdae515e139a0281f432 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -412,6 +412,11 @@ class RendererSandboxedProcessLauncherDelegate diff --git a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch index cf289a46564c5..722649f84852e 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 26450f2ab984b37a6eef3d2c604a447d3c64a625..7e3cf1333f4cebd485fc43b2077cbad1a1f25dbf 100644 +index f93b4199d2b23cc88ed81a86742d3c4b1d9b5698..e98d3bb8313c705535574430045f5167ea8357fa 100644 --- a/content/browser/ppapi_plugin_process_host.cc +++ b/content/browser/ppapi_plugin_process_host.cc @@ -122,6 +122,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 909f40ecdf36b..38a3ceb9dcfe3 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 0e16e0d4c0b84e4f6cdf73d4061a53609dcbe647..4d3ab221333465c3807393facbbf4727884b97b3 100644 +index 14abe9e1e715d849826b07e533cb0900d6ab81e8..b3adfd8438c605894e55fb4786cae4fd2e70345b 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2561,6 +2561,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2583,6 +2583,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 0e16e0d4c0b84e4f6cdf73d4061a53609dcbe647..4d3ab221333465c3807393facbbf4727 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2571,6 +2577,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2593,6 +2599,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -34,10 +34,10 @@ index 0e16e0d4c0b84e4f6cdf73d4061a53609dcbe647..4d3ab221333465c3807393facbbf4727 CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index f1c25ed4cf6215bf30926237739d23c04d03654b..00ef71e1c45a24abfc8509f8ed73accc61761a42 100644 +index e282d97d9b0fac4a88d58baaf26b23320ca26a18..4399dc58404c9ce811f1c366ba5280aab78f3832 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -82,8 +82,11 @@ class BrowserContext; +@@ -83,8 +83,11 @@ class BrowserContext; class BrowserPluginGuestDelegate; class RenderFrameHost; class RenderViewHost; @@ -49,7 +49,7 @@ index f1c25ed4cf6215bf30926237739d23c04d03654b..00ef71e1c45a24abfc8509f8ed73accc class WebUI; struct CustomContextMenuContext; struct DropData; -@@ -212,6 +215,10 @@ class WebContents : public PageNavigator, +@@ -213,6 +216,10 @@ class WebContents : public PageNavigator, // Sandboxing flags set on the new WebContents. network::mojom::WebSandboxFlags starting_sandbox_flags; diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index 2e5feca8398a4..1c6b36650e733 100644 --- a/patches/chromium/webview_cross_drag.patch +++ b/patches/chromium/webview_cross_drag.patch @@ -8,7 +8,7 @@ This allows dragging and dropping between s. Originally landed in https://github.com/electron/libchromiumcontent/pull/267 diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc -index c313a006efecdea4520e74c3bff527ef987c1be5..433874c3d2de7a68a7fc0893719408fb566b0d66 100644 +index a9d0906acc95408ee524b61e595d883924d42b69..0e628599a8eb738988a770eb3b83d2af661c8100 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -789,9 +789,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const { diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index d8185bf4e7b57..a97c72ca5b12f 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,7 +26,7 @@ index 5b0784c844bd9dd448c4e660d85902f930851b72..cc6101c82e659bbc5a8568c166d5a56f // 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 c5cf22d0169584eabeea7935f45f11ae1b39027b..77f9dc9ed419672a9d3888a0643ebb4eea3ab19a 100644 +index d6375e9d16dcb5302a5c5bca2a2042d53f14f1bb..d95a5b5f31d2ca91578fff8cc0cb3378fb5d95e9 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc @@ -865,6 +865,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { @@ -43,7 +43,7 @@ index c5cf22d0169584eabeea7935f45f11ae1b39027b..77f9dc9ed419672a9d3888a0643ebb4e 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 762195ee6bbd430567dfb9b771aa4de49a6bb41b..21054bd26c400a7f33d58dc520460560bfca8f9d 100644 +index cfced914c88d81df2396aa5b87cc9f52c8ba5448..aa31e030f34a66ac2fee79b09b99c2dd3aaa1c8a 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h @@ -191,6 +191,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -67,10 +67,10 @@ index abfcd20b894191138dc0ffab48ef8749b08c69a1..614837662b2bf462e50c0bc702e4c29b const WebSecurityOrigin& script_origin) { return false; diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc -index 8d8b0a32951496dfa53c7eb2cba2b085e4bbdceb..6ab264479c63c5ce6975d30db1d14ebbe53b48c4 100644 +index ac08a8cea9c5974c2f7deba0804928b89b099378..49490b8ec83a0efb1d6420b0cd6130cb68b2a800 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -694,6 +694,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -742,6 +742,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { nested_runner_->QuitNow(); } diff --git a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch index 69c276f57f9ca..afc9b7870212e 100644 --- a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch +++ b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch @@ -35,7 +35,7 @@ index 8309bb7f3f284b0930c13a7e75a7f9de64fedb73..7c5c925cadc5caca5ef69eda80ccc047 // from the worker thread. virtual void WillDestroyWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index 77f9dc9ed419672a9d3888a0643ebb4eea3ab19a..e93ae2de96532b51bfa14127aee3b0eb44b09040 100644 +index d95a5b5f31d2ca91578fff8cc0cb3378fb5d95e9..f3e2a429d3e058d242a7e6eda8046f7366ba0e77 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc @@ -877,6 +877,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( @@ -52,7 +52,7 @@ index 77f9dc9ed419672a9d3888a0643ebb4eea3ab19a..e93ae2de96532b51bfa14127aee3b0eb const blink::WebSecurityOrigin& script_origin) { return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 21054bd26c400a7f33d58dc520460560bfca8f9d..74b046817cd218644580323c7743c9d86d6fcabc 100644 +index aa31e030f34a66ac2fee79b09b99c2dd3aaa1c8a..42ddb186cfcec7da4bed050d3b5bc57226fa15c8 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h @@ -191,6 +191,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -78,10 +78,18 @@ index 614837662b2bf462e50c0bc702e4c29bcd42c8e2..8c643f40533b63cd3b6748d9acb44460 virtual bool AllowScriptExtensionForServiceWorker( const WebSecurityOrigin& script_origin) { diff --git a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc -index c0ed21b47e6b7808115b4ddfadea58ed5b5b4987..e7e5911b24c4a247f53061a1114384329e68810a 100644 +index c0ed21b47e6b7808115b4ddfadea58ed5b5b4987..3190a99973b5f42a5ebc700f1939cdb38056e0a6 100644 --- a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc +++ b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc -@@ -331,6 +331,8 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() { +@@ -306,6 +306,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() { + V8PerContextData* per_context_data = script_state_->PerContextData(); + ignore_result(per_context_data->ConstructorForType( + global_scope_->GetWrapperTypeInfo())); ++ Platform::Current()->WorkerScriptReadyForEvaluation(script_state_->GetContext()); + #else // USE_BLINK_V8_BINDING_NEW_IDL_INTERFACE + ScriptState::Scope scope(script_state_); + v8::Local context = script_state_->GetContext(); +@@ -331,6 +332,8 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() { wrapper_type_info->InstallConditionalFeatures( context, *world_, global_object, v8::Local(), v8::Local(), global_interface_template); diff --git a/patches/v8/add_realloc.patch b/patches/v8/add_realloc.patch index 26fe6b76148c7..f8a55d347b9f1 100644 --- a/patches/v8/add_realloc.patch +++ b/patches/v8/add_realloc.patch @@ -12,10 +12,10 @@ 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 263e7da8f1ff5136382867aaebe4bc138afa0a49..913bea674bf076df2a9946752d0eacfa93bda6bf 100644 +index 60c07714d49abaa0aa4d38d823f25a6714f002da..e4c6489a74d2c75f7ceb1952a6f664ccf2b39f03 100644 --- a/include/v8.h +++ b/include/v8.h -@@ -5096,6 +5096,13 @@ class V8_EXPORT ArrayBuffer : public Object { +@@ -5089,6 +5089,13 @@ class V8_EXPORT ArrayBuffer : public Object { */ virtual void* AllocateUninitialized(size_t length) = 0; @@ -30,7 +30,7 @@ index 263e7da8f1ff5136382867aaebe4bc138afa0a49..913bea674bf076df2a9946752d0eacfa * 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 5b5985fe4adfabbdc8629ff5e9a28f0fb6e706b4..acb9b0ed3dfbb5286a9990ffaa7197045ea692fe 100644 +index d7c9bd5c5258a18ae88cf11a2b53df7108ea2b05..54e8140dbec81d829c26389aaf49a8655547dfb4 100644 --- a/src/api/api.cc +++ b/src/api/api.cc @@ -536,6 +536,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 57a1aee8bdcc2..3b592c316cfa4 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,10 +9,10 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index b1bf94f11088e0a3a3cfe0021a9d229470e774fe..b6873dbe4dbbdd8c225fbba39be1f091f8a048ec 100644 +index d123dd7918ec3fcbf6e2df6b34f19db466da6a35..1aed73c099931b602bf7ff70e84ad52971742901 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -390,7 +390,7 @@ config("internal_config") { +@@ -400,7 +400,7 @@ config("internal_config") { ":v8_header_features", ] @@ -21,7 +21,7 @@ index b1bf94f11088e0a3a3cfe0021a9d229470e774fe..b6873dbe4dbbdd8c225fbba39be1f091 defines += [ "BUILDING_V8_SHARED" ] } } -@@ -4411,7 +4411,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -4431,7 +4431,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index b1bf94f11088e0a3a3cfe0021a9d229470e774fe..b6873dbe4dbbdd8c225fbba39be1f091 deps = [ ":v8_libbase", -@@ -4444,6 +4444,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -4468,6 +4468,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/chore_add_v8_apple_silicon_patches.patch b/patches/v8/chore_add_v8_apple_silicon_patches.patch index 7c6dee3ffacdd..1b5c941e4f9e7 100644 --- a/patches/v8/chore_add_v8_apple_silicon_patches.patch +++ b/patches/v8/chore_add_v8_apple_silicon_patches.patch @@ -66,7 +66,7 @@ index 2d3e27e5302f40466917ca5ce28bd787d14d8fe9..d0d55a25a62c255096cfb0348beaae02 void TurboAssembler::CallPrintf(int arg_count, const CPURegister* args) { diff --git a/src/compiler/backend/arm64/instruction-selector-arm64.cc b/src/compiler/backend/arm64/instruction-selector-arm64.cc -index 03fbe0f0645c192dfe4b845171f354fc190ea4da..a7fe894e97243fd7e517c58f5cd9d3ebdd9ff28d 100644 +index 5f19a6bb7cbb5ace74747a0bcd780034ff4aab54..b860a88febbb6033399ca23862fd25165d5fb3e9 100644 --- a/src/compiler/backend/arm64/instruction-selector-arm64.cc +++ b/src/compiler/backend/arm64/instruction-selector-arm64.cc @@ -1884,6 +1884,7 @@ void InstructionSelector::EmitPrepareArguments( @@ -78,10 +78,10 @@ index 03fbe0f0645c192dfe4b845171f354fc190ea4da..a7fe894e97243fd7e517c58f5cd9d3eb PushParameter input1 = slot > 0 ? (*arguments)[slot - 1] : PushParameter(); // Emit a poke-pair if consecutive parameters have the same type. diff --git a/src/flags/flag-definitions.h b/src/flags/flag-definitions.h -index 508e02aa37d16dd0ad89d286054b3ecfe6056103..09c66d04d1873ad8026d031e02f5bce177ee456b 100644 +index 97f11b55ece56eda8c640e3909cdb31541afbe9b..b06cdebbd294714582b78aeb0f14bc21d3c01ff8 100644 --- a/src/flags/flag-definitions.h +++ b/src/flags/flag-definitions.h -@@ -714,7 +714,12 @@ DEFINE_INT(wasm_num_compilation_tasks, 128, +@@ -715,7 +715,12 @@ DEFINE_INT(wasm_num_compilation_tasks, 128, "maximum number of parallel compilation tasks for wasm") DEFINE_DEBUG_BOOL(trace_wasm_native_heap, false, "trace wasm native heap events") @@ -108,10 +108,10 @@ index 22cae5f668236438c9630287cbd5c6280e12d4b2..461243b4ddbcda4a7f1a3fd888b602a0 native_module->AddCompiledCode(std::move(result))); } else { diff --git a/src/wasm/wasm-code-manager.h b/src/wasm/wasm-code-manager.h -index 1fe6cd4b9ed4c4850583cf1b2310a84a38f04c1a..c48c0faef6d4db191c5dcd7efa9dab230241efe3 100644 +index 5d8abca5abb6f958b61b9922ce0e6eac80bde244..040f8cfd31a1f9f971fc866ab34657ad3f7c003a 100644 --- a/src/wasm/wasm-code-manager.h +++ b/src/wasm/wasm-code-manager.h -@@ -864,7 +864,7 @@ class V8_EXPORT_PRIVATE WasmCodeManager final { +@@ -880,7 +880,7 @@ class V8_EXPORT_PRIVATE WasmCodeManager final { // and even if we did, the resulting set of pages may be fragmented. // Currently, we try and keep the number of syscalls low. // - similar argument for debug time. @@ -121,7 +121,7 @@ index 1fe6cd4b9ed4c4850583cf1b2310a84a38f04c1a..c48c0faef6d4db191c5dcd7efa9dab23 explicit NativeModuleModificationScope(NativeModule* native_module); ~NativeModuleModificationScope(); diff --git a/src/wasm/wasm-objects.cc b/src/wasm/wasm-objects.cc -index 84db08733b4858d0c0b5d2aac25889a6acfed0f5..8400a7b579182d2cb9d1d5a27b55d0bb8f9aab7e 100644 +index 3411bb6c87cd05985f35b290dedf3920378ee68a..27d1d21f2b2f5bcab87da358246ff62587898624 100644 --- a/src/wasm/wasm-objects.cc +++ b/src/wasm/wasm-objects.cc @@ -1452,6 +1452,7 @@ void WasmInstanceObject::ImportWasmJSFunctionIntoTable( diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index fb15252a7d10c..d5bacfd99efa4 100644 --- a/patches/v8/dcheck.patch +++ b/patches/v8/dcheck.patch @@ -6,7 +6,7 @@ Subject: dcheck.patch https://github.com/auchenberg/volkswagen diff --git a/src/api/api.cc b/src/api/api.cc -index acb9b0ed3dfbb5286a9990ffaa7197045ea692fe..99c4437feb2fdf6136249a71d036c1eb40f6e1ae 100644 +index 54e8140dbec81d829c26389aaf49a8655547dfb4..efd05c07faf7fbcd2b484e83b4b6811046cd8a00 100644 --- a/src/api/api.cc +++ b/src/api/api.cc @@ -8733,7 +8733,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { @@ -19,10 +19,10 @@ index acb9b0ed3dfbb5286a9990ffaa7197045ea692fe..99c4437feb2fdf6136249a71d036c1eb isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index ec30f2aef4fbddcb720b9930ac19ae1dc6e01e80..49341b2997af3125e3ff17e7fa4de65a1bc9073f 100644 +index 6548365746e343eec95ad15271ae47728404de5e..547d5ab381ad84fe4bd79329381476b0f82bdd12 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -5609,9 +5609,9 @@ void Heap::TearDown() { +@@ -5614,9 +5614,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 b26be0ae02ab6..5bfdba6e70620 100644 --- a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch +++ b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch @@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not contain any standard C++ library exports (e.g. `std::ostringstream`). diff --git a/BUILD.gn b/BUILD.gn -index b51e174c2943f14a0c234eedc533e0366303808d..c2a10af36a91d8319d4a23dc22167aff5265c90a 100644 +index f67fc24806fd18c7226972f77252a71fc118727f..b5777024d98e1ff298c8f74227b01a2104d3e369 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -390,6 +390,10 @@ config("internal_config") { +@@ -400,6 +400,10 @@ config("internal_config") { ":v8_header_features", ] diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index 9d4c4306df872..90d70eb64645e 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 8d287f12686a7574660204fe273f92c0aa70fe77..6804a85928fa76242046bedab66efd01d7a82071 100644 +index 94bcb9a4797ede33a76f298940ef701593fca342..a2302007d27d745e5ea87d89447aa7eaec07b3d7 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -813,7 +813,7 @@ enum class KeyCollectionMode { +@@ -812,7 +812,7 @@ enum class KeyCollectionMode { // Utility superclass for stack-allocated objects that must be updated // on gc. It provides two ways for the gc to update instances, either // iterating or updating after gc. diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index 39040bd2a7601..ac362eb2e05e2 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 b6873dbe4dbbdd8c225fbba39be1f091f8a048ec..b51e174c2943f14a0c234eedc533e0366303808d 100644 +index 1aed73c099931b602bf7ff70e84ad52971742901..f67fc24806fd18c7226972f77252a71fc118727f 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -4422,7 +4422,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -4442,7 +4442,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch index 145d89f168d29..62a76ac67fbf4 100644 --- a/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch @@ -9,10 +9,10 @@ higher versions, but native module compiling with this version will have an issue. diff --git a/include/v8config.h b/include/v8config.h -index bbd1d6ce978e6c967a0e6190f345f81b38d1d5e8..9fca659632cd949dc5a93b2a8a3904dd48bca60c 100644 +index ae89edb2c9b791abd0aa2662fc7b4f3bc431b146..fdf2a690d50bb7835ce584b3b8940ed919b29b75 100644 --- a/include/v8config.h +++ b/include/v8config.h -@@ -388,10 +388,13 @@ +@@ -391,10 +391,13 @@ # define V8_NOINLINE /* NOT SUPPORTED */ #endif @@ -28,7 +28,7 @@ index bbd1d6ce978e6c967a0e6190f345f81b38d1d5e8..9fca659632cd949dc5a93b2a8a3904dd #else # define V8_DEPRECATED(message) #endif -@@ -399,7 +402,11 @@ +@@ -402,7 +405,11 @@ // A macro (V8_DEPRECATE_SOON) to make it easier to see what will be deprecated. #if defined(V8_IMMINENT_DEPRECATION_WARNINGS) diff --git a/patches/v8/fix_use_proper_page_size_for_mac_arm64.patch b/patches/v8/fix_use_proper_page_size_for_mac_arm64.patch index 95a3d210ec750..bf172e31ce808 100644 --- a/patches/v8/fix_use_proper_page_size_for_mac_arm64.patch +++ b/patches/v8/fix_use_proper_page_size_for_mac_arm64.patch @@ -7,7 +7,7 @@ This fix temporarily sets page size to 16k for mac arm64 so that mksnapshot can and generate a mac arm64 snapshot diff --git a/src/base/platform/platform-posix.cc b/src/base/platform/platform-posix.cc -index 14294019d90dd09d9d9c50454436c44f8cbf5f51..6bb35499fcca87f2bb6ae0a43ef6172b6bca3f2c 100644 +index b469f6254fad4ce7b2c14aa1476e81d103091e79..0dbee6661eaf71de2330f8b4ed8a8544ee2788ec 100644 --- a/src/base/platform/platform-posix.cc +++ b/src/base/platform/platform-posix.cc @@ -159,9 +159,19 @@ void* Allocate(void* hint, size_t size, OS::MemoryPermission access, diff --git a/patches/v8/revert_cleanup_switch_offset_of_to_offsetof_where_possible.patch b/patches/v8/revert_cleanup_switch_offset_of_to_offsetof_where_possible.patch index aa79897c720fa..cbf62bf9232b9 100644 --- a/patches/v8/revert_cleanup_switch_offset_of_to_offsetof_where_possible.patch +++ b/patches/v8/revert_cleanup_switch_offset_of_to_offsetof_where_possible.patch @@ -6,10 +6,10 @@ Subject: Revert "[cleanup] Switch {OFFSET_OF} to {offsetof} where possible." This reverts commit d287e4bc46243841c77cf9798516ee4dcc54bf43. diff --git a/src/deoptimizer/deoptimizer.h b/src/deoptimizer/deoptimizer.h -index 9bca74c7b2d682acfce63afe7b2fbff205eb19cc..ea8665b7cd8f1839e9910d3198cec584906ed687 100644 +index aa44c3532bb8d4dbc359cdd56069fd45652ab57a..734471b5d91ebcc93378779c73fc2c666a909fd7 100644 --- a/src/deoptimizer/deoptimizer.h +++ b/src/deoptimizer/deoptimizer.h -@@ -496,14 +496,14 @@ class Deoptimizer : public Malloced { +@@ -505,14 +505,14 @@ class Deoptimizer : public Malloced { DeoptimizeKind* type); // Code generation support. @@ -28,7 +28,7 @@ index 9bca74c7b2d682acfce63afe7b2fbff205eb19cc..ea8665b7cd8f1839e9910d3198cec584 } V8_EXPORT_PRIVATE static int GetDeoptimizedCodeCount(Isolate* isolate); -@@ -740,11 +740,11 @@ class FrameDescription { +@@ -749,11 +749,11 @@ class FrameDescription { int parameter_count() { return parameter_count_; } static int registers_offset() { diff --git a/shell/browser/api/electron_api_url_loader.cc b/shell/browser/api/electron_api_url_loader.cc index 543c802fe0b33..09b1d371caf33 100644 --- a/shell/browser/api/electron_api_url_loader.cc +++ b/shell/browser/api/electron_api_url_loader.cc @@ -252,7 +252,8 @@ gin::WrapperInfo SimpleURLLoaderWrapper::kWrapperInfo = { SimpleURLLoaderWrapper::SimpleURLLoaderWrapper( std::unique_ptr request, - network::mojom::URLLoaderFactory* url_loader_factory) + network::mojom::URLLoaderFactory* url_loader_factory, + int options) : id_(GetAllRequests().Add(this)) { // We slightly abuse the |render_frame_id| field in ResourceRequest so that // we can correlate any authentication events that arrive with this request. @@ -269,6 +270,7 @@ SimpleURLLoaderWrapper::SimpleURLLoaderWrapper( } loader_->SetAllowHttpErrorResults(true); + loader_->SetURLLoaderFactoryOptions(options); loader_->SetOnResponseStartedCallback(base::BindOnce( &SimpleURLLoaderWrapper::OnResponseStarted, base::Unretained(this))); loader_->SetOnRedirectCallback(base::BindRepeating( @@ -367,8 +369,10 @@ gin::Handle SimpleURLLoaderWrapper::Create( bool use_session_cookies = false; opts.Get("useSessionCookies", &use_session_cookies); + int options = 0; if (!use_session_cookies) { - request->load_flags |= net::LOAD_DO_NOT_SEND_COOKIES; + request->credentials_mode = network::mojom::CredentialsMode::kInclude; + options |= network::mojom::kURLLoadOptionBlockAllCookies; } // Chromium filters headers using browser rules, while for net module we have @@ -411,7 +415,8 @@ gin::Handle SimpleURLLoaderWrapper::Create( auto ret = gin::CreateHandle( args->isolate(), - new SimpleURLLoaderWrapper(std::move(request), url_loader_factory.get())); + new SimpleURLLoaderWrapper(std::move(request), url_loader_factory.get(), + options)); ret->Pin(); if (!chunk_pipe_getter.IsEmpty()) { ret->PinBodyGetter(chunk_pipe_getter); diff --git a/shell/browser/api/electron_api_url_loader.h b/shell/browser/api/electron_api_url_loader.h index 80ef2d8b06ab4..542eea95dad18 100644 --- a/shell/browser/api/electron_api_url_loader.h +++ b/shell/browser/api/electron_api_url_loader.h @@ -64,7 +64,8 @@ class SimpleURLLoaderWrapper private: SimpleURLLoaderWrapper(std::unique_ptr loader, - network::mojom::URLLoaderFactory* url_loader_factory); + network::mojom::URLLoaderFactory* url_loader_factory, + int options); // SimpleURLLoaderStreamConsumer: void OnDataReceived(base::StringPiece string_piece, diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index fccadab4012b5..627c3deff22d4 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -394,7 +394,7 @@ base::string16 GetDefaultPrinterAsync() { scoped_refptr backend = printing::PrintBackend::CreateInstance( - nullptr, g_browser_process->GetApplicationLocale()); + g_browser_process->GetApplicationLocale()); std::string printer_name = backend->GetDefaultPrinterName(); return base::UTF8ToUTF16(printer_name); } @@ -1558,7 +1558,7 @@ void WebContents::SetBackgroundThrottling(bool allowed) { web_contents()->GetRenderViewHost()->SetSchedulerThrottling(allowed); if (rwh_impl->is_hidden()) { - rwh_impl->WasShown(base::nullopt); + rwh_impl->WasShown({}); } } @@ -2068,8 +2068,9 @@ void WebContents::Print(gin::Arguments* args) { // Set whether to print color or greyscale bool print_color = true; options.Get("color", &print_color); - int color_setting = print_color ? printing::COLOR : printing::GRAY; - settings.SetIntKey(printing::kSettingColor, color_setting); + auto const color_model = print_color ? printing::mojom::ColorModel::kColor + : printing::mojom::ColorModel::kGray; + settings.SetIntKey(printing::kSettingColor, static_cast(color_model)); // Is the orientation landscape or portrait. bool landscape = false; @@ -2185,7 +2186,7 @@ void WebContents::Print(gin::Arguments* args) { std::vector WebContents::GetPrinterList() { std::vector printers; auto print_backend = printing::PrintBackend::CreateInstance( - nullptr, g_browser_process->GetApplicationLocale()); + g_browser_process->GetApplicationLocale()); { // TODO(deepak1556): Deprecate this api in favor of an // async version and post a non blocing task call. diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index f70997008e15e..395940556315e 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -165,10 +165,12 @@ void OverrideLinuxAppDataPath() { base::PathService::Override(DIR_APP_DATA, path); } -int BrowserX11ErrorHandler(Display* d, XErrorEvent* error) { +int BrowserX11ErrorHandler(Display* d, XErrorEvent* e) { if (!g_in_x11_io_error_handler && base::ThreadTaskRunnerHandle::IsSet()) { base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::BindOnce(&x11::LogErrorEventDescription, *error)); + FROM_HERE, + base::BindOnce(&x11::LogErrorEventDescription, e->serial, e->error_code, + e->request_code, e->minor_code)); } return 0; } diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index c18950274d3b6..5e119beb51911 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -307,10 +307,10 @@ void OffScreenRenderWidgetHostView::Show() { delegated_frame_host_->AttachToCompositor(compositor_.get()); delegated_frame_host_->WasShown( GetLocalSurfaceIdAllocation().local_surface_id(), - GetRootLayer()->bounds().size(), base::nullopt); + GetRootLayer()->bounds().size(), {}); if (render_widget_host_) - render_widget_host_->WasShown(base::nullopt); + render_widget_host_->WasShown({}); } void OffScreenRenderWidgetHostView::Hide() { diff --git a/shell/browser/ui/webui/accessibility_ui.cc b/shell/browser/ui/webui/accessibility_ui.cc index fe3c1ca92b0b0..96724e98167f7 100644 --- a/shell/browser/ui/webui/accessibility_ui.cc +++ b/shell/browser/ui/webui/accessibility_ui.cc @@ -155,15 +155,14 @@ void AddPropertyFilters( for (const std::string& attribute : base::SplitString( attributes, " ", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY)) { property_filters.push_back( - content::AccessibilityTreeFormatter::PropertyFilter( - base::ASCIIToUTF16(attribute), type)); + content::AccessibilityTreeFormatter::PropertyFilter(attribute, type)); } } bool MatchesPropertyFilters( const std::vector& property_filters, - const base::string16& text) { + const std::string& text) { bool allow = false; for (const auto& filter : property_filters) { if (base::MatchPattern(text, filter.match_str)) { @@ -172,7 +171,7 @@ bool MatchesPropertyFilters( allow = true; break; case content::AccessibilityTreeFormatter::PropertyFilter::ALLOW: - allow = (!base::MatchPattern(text, base::UTF8ToUTF16("*=''"))); + allow = (!base::MatchPattern(text, "*=''")); break; case content::AccessibilityTreeFormatter::PropertyFilter::DENY: allow = false; @@ -184,26 +183,25 @@ bool MatchesPropertyFilters( } std::string RecursiveDumpAXPlatformNodeAsString( - ui::AXPlatformNode* node, + const ui::AXPlatformNode* node, int indent, const std::vector& property_filters) { if (!node) return ""; std::string str(2 * indent, '+'); - std::string line = node->GetDelegate()->GetData().ToString(); - std::vector attributes = base::SplitString( + const std::string line = node->GetDelegate()->GetData().ToString(); + const std::vector attributes = base::SplitString( line, " ", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY); - for (std::string attribute : attributes) { - if (MatchesPropertyFilters(property_filters, - base::UTF8ToUTF16(attribute))) { + for (const std::string& attribute : attributes) { + if (MatchesPropertyFilters(property_filters, attribute)) { str += attribute + " "; } } str += "\n"; for (int i = 0; i < node->GetDelegate()->GetChildCount(); i++) { gfx::NativeViewAccessible child = node->GetDelegate()->ChildAtIndex(i); - ui::AXPlatformNode* child_node = + const ui::AXPlatformNode* child_node = ui::AXPlatformNode::FromNativeViewAccessible(child); str += RecursiveDumpAXPlatformNodeAsString(child_node, indent + 1, property_filters); diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index fb8819df06edb..9040496cca095 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -359,7 +359,7 @@ describe('webContents module', () => { let resp = null as unknown as http.ServerResponse; const s = http.createServer((req, res) => { res.writeHead(200, { 'Content-Type': 'text/html' }); - res.write(''); + res.write(''); resp = res; // don't end the response yet });