diff --git a/DEPS b/DEPS index d8141cfe9796..826c25393366 100644 --- a/DEPS +++ b/DEPS @@ -14,7 +14,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '3dc8e3c0f400e4ca9c0a63d7a39bd910997ad4c6', + 'b04584161e07d4ac110045b7647fa8a81f5f0709', 'node_version': 'v12.18.3', 'nan_version': diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 64282bec7d2f..e43f9e4ab97e 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -97,7 +97,6 @@ feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch use_electron_resources_in_icon_reader_service.patch fix_patch_out_profile_refs_in_accessibility_ui.patch remove_some_deps_that_do_not_work_on_arm64.patch -chore_disable_failing_blink_font_dcheck_on_big_sur.patch fix_check_issecureeventinputenabled_in_constructor_before_setting.patch skip_atk_toolchain_check.patch worker_feat_add_hook_to_notify_script_ready.patch diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index a15b163ac905..cabaf6367de3 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set. This should be upstreamed. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index 1caf9d56e76f47c42cff9e9515d5fcbc77a88d67..8b135d38c2e3604509882a15193dc8b031eeb1c2 100644 +index ed134d1d40fb23808a4cc251be50a7fbd833b49b..5aaf2356cc2c0fec9a90f3201f1e16553c69a5e3 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -255,6 +255,10 @@ int GpuMain(const MainFunctionParams& parameters) { diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 3fa7b6027827..244c95ecb56e 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -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 9ab84b4d6ef502268c21513778d0e42bd34e66fa..cf7771e9aeb4743f5412130b79a54ef0b245e96a 100644 +index 62f6c5fd2ca94ac36851a952b5c1be3430331d60..68d2666696de00c28d57f9745f5ca902d2c16bc9 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4788,6 +4788,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4940,6 +4940,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,7 +40,7 @@ index 9ab84b4d6ef502268c21513778d0e42bd34e66fa..cf7771e9aeb4743f5412130b79a54ef0 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index ede46004cffe8acb022d3f4089079c5f39e2d4c6..557b7c2e96087cd55474b609085854c3a229bd5b 100644 +index 0a1647b88f70b6a669e922fdc6bf3b55a3acd745..9befc7bd8fd78de9cdea25dbc860af651d87c042 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -729,6 +729,8 @@ class CONTENT_EXPORT RenderFrameImpl @@ -53,10 +53,10 @@ index ede46004cffe8acb022d3f4089079c5f39e2d4c6..557b7c2e96087cd55474b609085854c3 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 6d2a073ff4c52c7b5924fa5c9ab4fd0e9ba46116..80d91bbda3188caa91c30abcc0a92d7a9ac871fb 100644 +index e07d735a401ac23b3516fecef5a6a6094d2d0af3..e1d1502e839822277fef42e4e43e4f771485e335 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -533,6 +533,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -532,6 +532,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -110,10 +110,10 @@ index dd60568c183c164bede36c69260866399b7e4b79..ab05496705b4aeeedf14af4c509a32c1 int32_t world_id) override; diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h -index 0360e07b16ee6b09ea4ff64ade54b428241fe3d1..83ae67eb024d6b0f1747af08adc5fd5a20088ae3 100644 +index 831ce5ccc32676790307d49416a3a40e7e3652bc..8898a6162a759a3a4d313d8956051b6208acd4af 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -288,6 +288,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -289,6 +289,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; diff --git a/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch b/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch index 3d56c6bf0666..403b9d55ea31 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 41b4aa1426861150939fc00ee9e903d443c449bf..a87dc3c85ad46a2d32faad3711d392c27d499929 100644 +index 7dc2d14d47d395e3b8046cae8788c4e04bc8e7f3..55068e71568a022bbf335147e6b35c24402d43ad 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 41b4aa1426861150939fc00ee9e903d443c449bf..a87dc3c85ad46a2d32faad3711d392c2 interface CertVerifierClient { Verify( int32 default_error, -@@ -641,6 +660,8 @@ struct URLLoaderFactoryParams { +@@ -647,6 +666,8 @@ struct URLLoaderFactoryParams { // impact because of the extra process hops, so use should be minimized. pending_remote? header_client; @@ -49,7 +49,7 @@ index 41b4aa1426861150939fc00ee9e903d443c449bf..a87dc3c85ad46a2d32faad3711d392c2 // 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 9586b775b193485de9ef8896528cd50e274fd206..6e70307a3839eb9f10fd7f2b123e2ef1215dee96 100644 +index c209506ca5f450f4611cb339f6d9876175eb713e..d4ff5100be651655140ca024fec12a7d98baa00e 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc @@ -473,6 +473,7 @@ URLLoader::URLLoader( @@ -72,7 +72,7 @@ index 9586b775b193485de9ef8896528cd50e274fd206..6e70307a3839eb9f10fd7f2b123e2ef1 if (want_raw_headers_) { options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse | mojom::kURLLoadOptionSendSSLInfoForCertificateError; -@@ -1113,7 +1119,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, +@@ -1120,7 +1126,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, // |this| may have been deleted. return; } @@ -81,7 +81,7 @@ index 9586b775b193485de9ef8896528cd50e274fd206..6e70307a3839eb9f10fd7f2b123e2ef1 OnAuthCredentials(base::nullopt); return; } -@@ -1129,11 +1135,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, +@@ -1136,11 +1142,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, if (url_request->response_headers()) head->headers = url_request->response_headers(); head->auth_challenge_info = auth_info; diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index d2e1df8216d4..124f92ff7dc2 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -14,10 +14,10 @@ when there is code doing that. This patch reverts the change to fix the crash in Electron. diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index ebcd69c23d1b2b457591f20af481fc82131ead00..5a4d0f2adf4f950e456190d4903931440f3e61e4 100644 +index 97cd8eb72e9932797089787dc13dcd0f540f2b78..edf0e4e8786997556509c8bb997bbc9859a5147e 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -558,10 +558,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { +@@ -563,10 +563,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { } CHECK(!view_ || !view_->IsAttached()); @@ -28,7 +28,7 @@ index ebcd69c23d1b2b457591f20af481fc82131ead00..5a4d0f2adf4f950e456190d490393144 if (!Client()) return; -@@ -579,6 +575,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) { +@@ -584,6 +580,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) { // Notify ScriptController that the frame is closing, since its cleanup ends // up calling back to LocalFrameClient via WindowProxy. GetScriptController().ClearForClose(); diff --git a/patches/chromium/blink_world_context.patch b/patches/chromium/blink_world_context.patch index 60d789d1a0ca..c55730388c21 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 a2a324877c7eb2a4cd2e36736728521d438813ab..ad2e9f21837f50e4531870973b61328adb82755c 100644 +index 9bda8d2fae9929485d2278de8b7ba9d4395e24b3..73e6de07678f24b983fcc6ebfba2ef000f9eac1c 100644 --- a/third_party/blink/public/web/web_local_frame.h +++ b/third_party/blink/public/web/web_local_frame.h -@@ -349,6 +349,8 @@ class WebLocalFrame : public WebFrame { +@@ -350,6 +350,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 a2a324877c7eb2a4cd2e36736728521d438813ab..ad2e9f21837f50e4531870973b61328a // 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 e00b0c7132511eab03a8d4f19bbeb31f2c53fa92..9d5f4724241d34e1560642a8fab8cccea79531bf 100644 +index 584792c678e3f8bf965d59df16422b70a844542b..60109fdcc7499843d10c5c7e9f8e22deff6c007c 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 -@@ -936,6 +936,13 @@ v8::Local WebLocalFrameImpl::GlobalProxy() const { +@@ -950,6 +950,13 @@ v8::Local WebLocalFrameImpl::GlobalProxy() const { return MainWorldScriptContext()->Global(); } @@ -38,7 +38,7 @@ index e00b0c7132511eab03a8d4f19bbeb31f2c53fa92..9d5f4724241d34e1560642a8fab8ccce 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 08f19f7ce93a4f795c889d12bac7c714d0e01f33..a70479aff701b442ce4b31185c6124b600f6c44e 100644 +index a6c74bdad96fc535a52b40bf7927782d2198aefb..0f7e00f7ff58fbea3a797b6b1d90f316582d22af 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 23400a186d56..c6175d81cdea 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 31f563dd4d59ce23c1c6e31aa80c68089e5f2195..1a6b644ce88a5aece4382b66479da60e21194564 100644 +index 732db68d17821b29041dd387e7e00b305c52a34c..d81a915e77a4dff952e6e81df7937292f4899d7d 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 d2a8cf4f1baa..2674738df6b2 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 16c568be438a6d1bf5ed413fedaee03a5b866a6d..910020e4ec7125eaae9e0f42319ced54dd768d91 100644 +index 795238249222dd246c2254434a4454b9d2aedd7c..ca9463ee9326816fca51d1ef75634973a12cd4b9 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc -@@ -4769,6 +4769,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -4883,6 +4883,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 16c568be438a6d1bf5ed413fedaee03a5b866a6d..910020e4ec7125eaae9e0f42319ced54 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index b56ff2cbb595ac9c1b88cbd84d39dc9587faaaba..247f6fc26104c24a9d818e3606d76f17f6e4be6b 100644 +index b92cebd04eacb5b6fa3ff3d4c06388e7c8eac942..3ab23d0c634e8379573a4d818bbbe6200a88d073 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3369,9 +3369,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -3420,9 +3420,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( } if (delegate_) { @@ -36,7 +36,7 @@ index b56ff2cbb595ac9c1b88cbd84d39dc9587faaaba..247f6fc26104c24a9d818e3606d76f17 + params, new_contents_impl); } - for (auto& observer : observers_) { + observers_.ForEachObserver([&](WebContentsObserver* observer) { diff --git a/content/common/frame.mojom b/content/common/frame.mojom index c969ed9b17b915f713d9b82114c7b637c8fd90df..9530a1936b0a801a4c6152dd53ec5105d5d712e0 100644 --- a/content/common/frame.mojom @@ -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 b34393f42c6c2ba5b39d72d6a40219071bd61ff4..03fc999b46164b44a17537cc574afbeb712abfb0 100644 +index 49619a9b5683a3e53c53c9b750c6ea6a0efc92b2..e7c03ac99a0a9cf80d65797a81065f8997cf4646 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -67,6 +67,7 @@ @@ -146,7 +146,7 @@ index b34393f42c6c2ba5b39d72d6a40219071bd61ff4..03fc999b46164b44a17537cc574afbeb #include "content/renderer/media/audio/audio_device_factory.h" #include "content/renderer/render_frame_impl.h" #include "content/renderer/render_frame_proxy.h" -@@ -1215,6 +1216,10 @@ WebView* RenderViewImpl::CreateView( +@@ -1209,6 +1210,10 @@ WebView* RenderViewImpl::CreateView( } params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features); @@ -206,7 +206,7 @@ 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 f4259f5af3ab508d58b8d351da147e2d71250f07..2943be5715f2436e40049f82d954caedd1b76cc0 100644 +index 7a4451acee7822fc525d000f7b54a9922b1bd788..3c950eaa5bfb98b398a4daaec182745e87cc73d2 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, diff --git a/patches/chromium/chore_disable_failing_blink_font_dcheck_on_big_sur.patch b/patches/chromium/chore_disable_failing_blink_font_dcheck_on_big_sur.patch deleted file mode 100644 index f553455b372a..000000000000 --- a/patches/chromium/chore_disable_failing_blink_font_dcheck_on_big_sur.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Mon, 6 Jul 2020 20:52:09 -0700 -Subject: chore: disable failing blink font DCHECK on Big Sur - -Once these are available upstream we can remove this patch. - -diff --git a/third_party/blink/renderer/platform/fonts/mac/font_platform_data_mac.mm b/third_party/blink/renderer/platform/fonts/mac/font_platform_data_mac.mm -index d6abddab51bc95768467b3d84a55e07dec262f26..0678c9d30e162beb9fec6f98ae82e31b042723cf 100644 ---- a/third_party/blink/renderer/platform/fonts/mac/font_platform_data_mac.mm -+++ b/third_party/blink/renderer/platform/fonts/mac/font_platform_data_mac.mm -@@ -59,10 +59,10 @@ bool VariableAxisChangeEffective(SkTypeface* typeface, - return false; - - SkFontParameters::Variation::Axis axes_parameters[num_axes]; -- int returned_axes = -- typeface->getVariationDesignParameters(axes_parameters, num_axes); -- DCHECK_EQ(num_axes, returned_axes); -- DCHECK_GE(num_axes, 0); -+ // int returned_axes = -+ // typeface->getVariationDesignParameters(axes_parameters, num_axes); -+ // DCHECK_EQ(num_axes, returned_axes); -+ // DCHECK_GE(num_axes, 0); - - float clamped_new_value = new_value; - for (auto& axis_parameters : axes_parameters) { 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 8585bc9a6518..e5cdfcc99b5c 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 07714995a3a9f73fa4611ae1ae104be3da7bbaf9..41b9a33da6c83acca7e683ed0d754edcefc0c688 100644 +index 178c8d95431e9bcfa7a3beae42d950451d78c047..781eee7436868d164549aa2932685223cdd7aca5 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -5566,6 +5566,7 @@ static_library("browser") { +@@ -5602,6 +5602,7 @@ static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index 07a2b76b0478..9d03219d8a85 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc -index c7e29730692fa4bc1a61869b3ff43082fb23c479..164613a77c2ade72c8cb37edc1242f94f2a525bf 100644 +index e026cf1322138009de75accc0e332e1e88267030..739e3ccb60d7a81fdb9af42b50d7ef8cd2811ff3 100644 --- a/content/browser/frame_host/navigation_controller_impl.cc +++ b/content/browser/frame_host/navigation_controller_impl.cc -@@ -1271,8 +1271,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( +@@ -1279,8 +1279,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( return NAVIGATION_TYPE_NEW_SUBFRAME; } @@ -33,7 +33,7 @@ index c7e29730692fa4bc1a61869b3ff43082fb23c479..164613a77c2ade72c8cb37edc1242f94 if (rfh->GetParent()) { // All manual subframes would be did_create_new_entry and handled above, so -@@ -1528,7 +1530,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage( +@@ -1555,7 +1557,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage( new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon(); } diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 668a8b7dc90b..033b8a329b58 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 359172ddae1265542433a20c82e9e8846537d1fa..492ddfc3d716450dd3a7088408414baacd068465 100644 +index 5c87f4ea0d6426606a1001f51aea1aa8b0ecaa8b..16fa2e95b89b569c76b57c1a57d0336ac3b8ea54 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1861,6 +1861,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1748,6 +1748,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace( gfx::ContentColorUsage content_color_usage) const { @@ -231,7 +231,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 52ef5388430495bfce43bc8f65067de9bf302066..99f6bc82e59fdccb88848d1b15c759099b4e5203 100644 +index eb99c6f7ef7ca70c6d074d2d0aecd24da383ab76..b169770b27e21ebb2cb137b45c4ee66c4f71e878 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 +242,7 @@ index 52ef5388430495bfce43bc8f65067de9bf302066..99f6bc82e59fdccb88848d1b15c75909 #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_features.h" #include "url/origin.h" -@@ -3290,6 +3291,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3291,6 +3292,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 +317,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 8e8d7638a22c1874b6245d4a232cafb296023b26..5e06d0b7804e90cd044c64188ed113c9593dd8be 100644 +index fdb5fbcff837f989ab73c04dd45c4b1d9f78d8da..34b46fbdc36b9655eb7ea09c25f72a39d0e511a7 100644 --- a/ui/gfx/mac/io_surface.cc +++ b/ui/gfx/mac/io_surface.cc @@ -18,6 +18,7 @@ @@ -328,7 +328,7 @@ index 8e8d7638a22c1874b6245d4a232cafb296023b26..5e06d0b7804e90cd044c64188ed113c9 #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) -@@ -134,6 +135,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) { +@@ -140,6 +141,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 +343,7 @@ index 8e8d7638a22c1874b6245d4a232cafb296023b26..5e06d0b7804e90cd044c64188ed113c9 // Allow but ignore invalid color spaces. if (!color_space.IsValid()) return true; -@@ -268,6 +277,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, +@@ -274,6 +283,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, DCHECK_EQ(kIOReturnSuccess, r); } diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 6aa2f54962f6..fa1cdaaef9c8 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 fcbdbeb12cec8a9d1b3f23b81108e447fa57b760..318eb9d8ceda86b4859dc6cf243da538fdd07eda 100644 +index 7dcc21f67320402a88b4ce7d6606a1e7d4c46ea3..77bc5b22fd03af3e576b3bec10ac8b747b013937 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -734,6 +734,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -739,6 +739,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; @@ -20,10 +20,10 @@ index fcbdbeb12cec8a9d1b3f23b81108e447fa57b760..318eb9d8ceda86b4859dc6cf243da538 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 82362569ddb112a8ba9d7551242b2167ec47e073..8390fe9b57b871f8084907be843b4426a3911888 100644 +index ec4696ba8628cef696c0a7147a0cc6c95d409089..b4cf9688ee7599f6892dd741908a056c076b6151 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -174,6 +174,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -175,6 +175,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl // RenderWidgetHostImpl. static RenderWidgetHostImpl* From(RenderWidgetHost* rwh); @@ -34,7 +34,7 @@ index 82362569ddb112a8ba9d7551242b2167ec47e073..8390fe9b57b871f8084907be843b4426 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 879822b0372c7c79905ba78fa4c1077268fc2e93..a121519450387b606950137bb8441f4420b388d4 100644 +index dc010ee921dd606f04c8c176f4e3d90047f2c297..f97062555915eaab5c941e1793dafd4628b94d84 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() { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 57847a973618..15ad2882d1df 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -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 3580ca1bbce40fb219e900441b72d1ab6f7e61fc..41b4aa1426861150939fc00ee9e903d443c449bf 100644 +index 0b97c9fe29f24b1305740506458b0b6a02263c3c..7dc2d14d47d395e3b8046cae8788c4e04bc8e7f3 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1055,6 +1055,9 @@ interface NetworkContext { +@@ -1061,6 +1061,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); 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 57ca49389395..bb3a59d4c478 100644 --- a/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,10 +6,10 @@ Subject: feat: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 0ba74f2826bf994b32b48d27f9fbb4bcdcac6a27..dd591bc54686634a13ac4c7b675feb6a3aa2067b 100644 +index 79d364af3582014f71e7d0d9cff870e802f5d40b..4fd0c9fa5cf930361f45f46596463cd3d20308e2 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -504,6 +504,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -525,6 +525,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -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 03fc999b46164b44a17537cc574afbeb712abfb0..6e31e1ba1c21a156d9e66967cd09eceded4618f4 100644 +index e7c03ac99a0a9cf80d65797a81065f8997cf4646..64ed7fa44cc2d04a67707459974c8568f7166a7b 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc -@@ -1154,6 +1154,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { +@@ -1148,6 +1148,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message) @@ -73,7 +73,7 @@ index 03fc999b46164b44a17537cc574afbeb712abfb0..6e31e1ba1c21a156d9e66967cd09eced IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck) IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences) IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) -@@ -1621,6 +1623,12 @@ bool RenderViewImpl::GetContentStateImmediately() { +@@ -1615,6 +1617,12 @@ bool RenderViewImpl::GetContentStateImmediately() { return send_content_state_immediately_; } @@ -87,10 +87,10 @@ index 03fc999b46164b44a17537cc574afbeb712abfb0..6e31e1ba1c21a156d9e66967cd09eced webkit_preferences_ = prefs; ApplyWebPreferences(webkit_preferences_, GetWebView()); diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h -index 780c4bfb21fdad54758cc0e0a541d991c6fc2dc0..c4eeb65d883bcc85bd37673366ed1f8766aab619 100644 +index 7467f976818c5614b890fa0cdaa4cc08bc10d494..4dd7f6e5949c2c749d192a88893298f89270d0bb 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h -@@ -389,6 +389,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, +@@ -387,6 +387,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 780c4bfb21fdad54758cc0e0a541d991c6fc2dc0..c4eeb65d883bcc85bd37673366ed1f87 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 f3c18b7f6865767ac6c0732da38ca2269db62d69..35bc8947e92c7805655dceb3c368c25ba1e1798b 100644 +index 9e8f2404a58687353464fa86600696e1b46e9158..b3e78fe9bb232f650a4c12bbafd36d3fc4c500b3 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h -@@ -394,6 +394,7 @@ class WebView { +@@ -395,6 +395,7 @@ class WebView { // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -111,10 +111,10 @@ index f3c18b7f6865767ac6c0732da38ca2269db62d69..35bc8947e92c7805655dceb3c368c25b // 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 91703ebd6519bbfca215f2db8549735285dd709f..8bd8a841aecc6a1598a820e6105067f18ffeeb48 100644 +index e42105c01b698fe891bd67a0e888e15aa805ce94..2ce7fdccf8af5f1daa2df41502ca55971dd7eb1e 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3398,6 +3398,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3447,6 +3447,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -128,7 +128,7 @@ index 91703ebd6519bbfca215f2db8549735285dd709f..8bd8a841aecc6a1598a820e6105067f1 void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3408,7 +3415,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3457,7 +3464,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -139,10 +139,10 @@ index 91703ebd6519bbfca215f2db8549735285dd709f..8bd8a841aecc6a1598a820e6105067f1 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 53b6ea26751eeb09f8c7416de900e641b770ed18..3bae2c9a02b0260b597f36547ef4ad2ae7f2fbfa 100644 +index dfa50fbdd17f13341fb425f7dc4b94c1abf42696..13c4e853445ed19b388caac9b98de91415f7f02f 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -332,6 +332,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -339,6 +339,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -150,7 +150,7 @@ index 53b6ea26751eeb09f8c7416de900e641b770ed18..3bae2c9a02b0260b597f36547ef4ad2a void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -689,6 +690,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -699,6 +700,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 63eca23f40d5..15002d24dd1d 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,10 +5,10 @@ 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 c2136776f09458ddfd6265d415534f5ef9df4d8a..8354ecc34c84a1d2fa14f295f3b71fe4ee5dfa61 100644 +index 91f757ace16fd2b65080cd02a77f2267bc62ecaf..74387d4394e017e812821774475ee5703d134bf4 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc -@@ -471,6 +471,9 @@ void SpellcheckService::LoadDictionaries() { +@@ -455,6 +455,9 @@ void SpellcheckService::LoadDictionaries() { std::make_unique( dictionary, platform_spellcheck_language, context_, this)); hunspell_dictionaries_.back()->AddObserver(this); @@ -18,8 +18,8 @@ index c2136776f09458ddfd6265d415534f5ef9df4d8a..8354ecc34c84a1d2fa14f295f3b71fe4 hunspell_dictionaries_.back()->Load(); } -@@ -503,6 +506,20 @@ SpellcheckService::GetHunspellDictionaries() { - return hunspell_dictionaries_; +@@ -507,6 +510,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { + (!hunspell_dictionaries_.empty() || enable_if_uninitialized); } +void SpellcheckService::SetHunspellObserver(SpellcheckHunspellDictionary::Observer* observer) { @@ -40,19 +40,19 @@ index c2136776f09458ddfd6265d415534f5ef9df4d8a..8354ecc34c84a1d2fa14f295f3b71fe4 std::string locale, std::string path, diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h -index 28e67e5172059dfc956e8c2fa7eca5de1a348439..e297e7b6672bdcfce5d596c7bf744dc73d49dc88 100644 +index 29ea018d1df9f34204d26766fe010e6b38def7da..68af07c361ee1934e3f76497429c9d30f0212283 100644 --- a/chrome/browser/spellchecker/spellcheck_service.h +++ b/chrome/browser/spellchecker/spellcheck_service.h -@@ -137,6 +137,8 @@ class SpellcheckService : public KeyedService, - const std::vector>& - GetHunspellDictionaries(); +@@ -141,6 +141,8 @@ class SpellcheckService : public KeyedService, + // dictionaries available. + bool IsSpellcheckEnabled() const; + void SetHunspellObserver(SpellcheckHunspellDictionary::Observer* observer); + // Load a dictionary from a given path. Format specifies how the dictionary // is stored. Return value is true if successful. bool LoadExternalDictionary(std::string language, -@@ -315,6 +317,8 @@ class SpellcheckService : public KeyedService, +@@ -319,6 +321,8 @@ class SpellcheckService : public KeyedService, // A pointer to the BrowserContext which this service refers to. content::BrowserContext* context_; 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 006b4b9734be..f8b9f2a0a921 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -94,10 +94,10 @@ index 1026b739d283f0fc252fa2af83a6d4cf51bc8553..fe562ab60ce98b8bb0c5080a6428deb3 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index cc936f9ebd86bd3720de0c77dac78ecdb5b5158f..d366b930792c2abd408e0d270bd3874e54fac2ff 100644 +index d991c2126b239622f5712cfde6a78139faab2ad9..b52a92991ceea74fd2153ea86ad97e25e53827e0 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -113,6 +113,8 @@ viz_component("service") { +@@ -115,6 +115,8 @@ viz_component("service") { "display_embedder/output_surface_provider_impl.h", "display_embedder/server_shared_bitmap_manager.cc", "display_embedder/server_shared_bitmap_manager.h", 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 e682bf59b278..bb4caf22c334 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 247f6fc26104c24a9d818e3606d76f17f6e4be6b..0389722014d89c1eb6b373b28d94a16f39d9931e 100644 +index 3ab23d0c634e8379573a4d818bbbe6200a88d073..0e16e0d4c0b84e4f6cdf73d4061a53609dcbe647 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2779,11 +2779,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { +@@ -2830,11 +2830,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 a34957f972a7..cfc9b4a0afd9 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -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 9830bd1d352e93c97f55390b3f103dc297091d3e..8cc8665cf95664708ea5cc1a38bf01717275dc1f 100644 +index a6d3bafd08336a07012e46aba6d611c62e61c7cf..f7b03517380b653071384a9686924b584efadde7 100644 --- a/content/browser/frame_host/navigation_request.cc +++ b/content/browser/frame_host/navigation_request.cc -@@ -1463,6 +1463,21 @@ void NavigationRequest::BeginNavigation() { +@@ -1475,6 +1475,21 @@ void NavigationRequest::BeginNavigation() { // it immediately. EnterChildTraceEvent("ResponseStarted", this); @@ -67,7 +67,7 @@ index 9830bd1d352e93c97f55390b3f103dc297091d3e..8cc8665cf95664708ea5cc1a38bf0171 // Select an appropriate RenderFrameHost. render_frame_host_ = frame_tree_node_->render_manager()->GetFrameHostForNavigation(this); -@@ -4967,6 +4982,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const { +@@ -5043,6 +5058,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const { {WILL_START_REQUEST, { WILL_REDIRECT_REQUEST, WILL_PROCESS_RESPONSE, @@ -75,7 +75,7 @@ index 9830bd1d352e93c97f55390b3f103dc297091d3e..8cc8665cf95664708ea5cc1a38bf0171 READY_TO_COMMIT, DID_COMMIT, CANCELING, -@@ -4980,10 +4996,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const { +@@ -5056,10 +5072,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const { WILL_FAIL_REQUEST, }}, {WILL_PROCESS_RESPONSE, { @@ -91,10 +91,10 @@ index 9830bd1d352e93c97f55390b3f103dc297091d3e..8cc8665cf95664708ea5cc1a38bf0171 NOT_STARTED, DID_COMMIT, diff --git a/content/browser/frame_host/navigation_request.h b/content/browser/frame_host/navigation_request.h -index bc60e642831d6407b8c31fd923ff49baf42f45e6..37e3824e346e7b299f1be28158e9a313cb19fef9 100644 +index cfcc6cd6cbc2723156a2bce1cd8a98a979952a04..a6736ae58641501041a676505ea8a3680f90cdf7 100644 --- a/content/browser/frame_host/navigation_request.h +++ b/content/browser/frame_host/navigation_request.h -@@ -155,6 +155,10 @@ class CONTENT_EXPORT NavigationRequest +@@ -162,6 +162,10 @@ class CONTENT_EXPORT NavigationRequest // asynchronous. WILL_PROCESS_RESPONSE, @@ -106,10 +106,10 @@ index bc60e642831d6407b8c31fd923ff49baf42f45e6..37e3824e346e7b299f1be28158e9a313 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 dd3c9f1d08b8e8f931aebf0726b721666b85ce84..c353271eb33ae7d0ce9021aa052a97c4b341d970 100644 +index 3223378b661e6a53e62d7981c90beb67a51dc900..f83175d673e280e81ae3175d98172763f9c016ae 100644 --- a/content/browser/frame_host/render_frame_host_manager.cc +++ b/content/browser/frame_host/render_frame_host_manager.cc -@@ -2375,6 +2375,16 @@ bool RenderFrameHostManager::InitRenderView( +@@ -2383,6 +2383,16 @@ bool RenderFrameHostManager::InitRenderView( scoped_refptr RenderFrameHostManager::GetSiteInstanceForNavigationRequest( NavigationRequest* request) { @@ -126,7 +126,7 @@ index dd3c9f1d08b8e8f931aebf0726b721666b85ce84..c353271eb33ae7d0ce9021aa052a97c4 SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance(); // All children of MHTML documents must be MHTML documents. They all live in -@@ -2394,10 +2404,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2402,10 +2412,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 dd3c9f1d08b8e8f931aebf0726b721666b85ce84..c353271eb33ae7d0ce9021aa052a97c4 // Account for renderer-initiated reload as well. // Needed as a workaround for https://crbug.com/1045524, remove it when it is -@@ -2423,6 +2483,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2431,6 +2491,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -202,10 +202,10 @@ index dd3c9f1d08b8e8f931aebf0726b721666b85ce84..c353271eb33ae7d0ce9021aa052a97c4 } diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc -index c2aa245738446790cc61192c3ca2e5ea459df849..2fe2b639601235b1820f6f03fabcb7ba95f76a78 100644 +index b167aaf428df5feeac16c68beec3e947d44cd61f..c2ad9320b242c228b295a7fe20cc258282d95a09 100644 --- a/content/browser/site_instance_impl.cc +++ b/content/browser/site_instance_impl.cc -@@ -501,6 +501,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) { +@@ -505,6 +505,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) { return browsing_instance_->HasSiteInstance(site_info); } @@ -217,7 +217,7 @@ index c2aa245738446790cc61192c3ca2e5ea459df849..2fe2b639601235b1820f6f03fabcb7ba const GURL& url) { return browsing_instance_->GetSiteInstanceForURL( diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h -index 0fecca6137cf970ce747491b218e8cacf242758c..806852dc83e8bcfac8c117a4d8961b56b0c055d2 100644 +index 9fffa8c2c602aa373400dfb0d1c817f34b75bc8f..f898ab9291f66ac0cfbf0317f47befc8d832b364 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, diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index f9ee4c3a5bd5..360afd5bf546 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -170,10 +170,10 @@ index c716b747db822a4dfd97c07e0abeb4d1e4b79e03..764d23f23ce2c7bc8068d0fbd97da08f /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index eeef75bd149eadcf6aa2e0bfa14f457fe4dcdcc2..d05d3f616e5fa85003c0f278ef89a9b18d24064d 100644 +index 88883f2c90d89e719ba2c1d1541c73a13f7f2e0c..60b80facdae6eb6fed22b4a7e20a31f2928ab5fe 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -308,6 +308,13 @@ component("base") { +@@ -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 8e2aa5dad9d1..a3d624ab58e3 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -7,40 +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 169bf27136ff2036676cac2dcca78ee622593ba3..7bd731a24a518f7e9e65143dc307fcbef81a85d4 100644 +index 3846ac2e4ff654f77f8f66ace3bd87410534e34d..4cd4cd7f32f49c71134880252f5e5bdde8168d09 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm +++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm -@@ -315,11 +315,13 @@ id PropertyNodeToTextMarkerRange(const PropertyNode&, - param = PropertyNodeToRange(property_node); - } else if (property_name == "AXIndexForChildUIElement") { // UIElement - param = PropertyNodeToUIElement(property_node, line_indexes_map); -+#ifndef MAS_BUILD - } else if (property_name == "AXIndexForTextMarker") { // TextMarker - param = PropertyNodeToTextMarker(property_node, line_indexes_map); - } else if (property_name == - "AXStringForTextMarkerRange") { // TextMarkerRange - param = PropertyNodeToTextMarkerRange(property_node, line_indexes_map); -+#endif - } - - return param; -@@ -407,6 +409,7 @@ id PropertyNodeToTextMarkerRange(const PropertyNode&, - return uielement; - } - -+#ifndef MAS_BUILD - id AccessibilityTreeFormatterMac::DictNodeToTextMarker( - const PropertyNode& dictnode, - const LineIndexesMap& line_indexes_map) const { -@@ -486,6 +489,7 @@ id PropertyNodeToTextMarkerRange(const PropertyNode&, - - return content::AXTextMarkerRangeFrom(anchor_textmarker, focus_textmarker); - } -+#endif - - base::Value AccessibilityTreeFormatterMac::PopulateSize( - const BrowserAccessibilityCocoa* cocoa_node) const { -@@ -547,7 +551,7 @@ id PropertyNodeToTextMarkerRange(const PropertyNode&, +@@ -299,7 +299,7 @@ OptionalNSObject InvokeAttributeFor( 0 == strcmp([value objCType], @encode(NSRange))) { return PopulateRange([value rangeValue]); } @@ -49,7 +19,7 @@ index 169bf27136ff2036676cac2dcca78ee622593ba3..7bd731a24a518f7e9e65143dc307fcbe // AXTextMarker if (content::IsAXTextMarker(value)) { return PopulateTextPosition(content::AXTextMarkerToPosition(value).get(), -@@ -558,7 +562,7 @@ id PropertyNodeToTextMarkerRange(const PropertyNode&, +@@ -310,7 +310,7 @@ OptionalNSObject InvokeAttributeFor( if (content::IsAXTextMarkerRange(value)) { return PopulateTextMarkerRange(value, line_indexes_map); } @@ -58,7 +28,7 @@ index 169bf27136ff2036676cac2dcca78ee622593ba3..7bd731a24a518f7e9e65143dc307fcbe // Accessible object if ([value isKindOfClass:[BrowserAccessibilityCocoa class]]) { return base::Value(NodeToLineIndex(value, line_indexes_map)); -@@ -609,7 +613,7 @@ id PropertyNodeToTextMarkerRange(const PropertyNode&, +@@ -361,7 +361,7 @@ OptionalNSObject InvokeAttributeFor( kConstValuePrefix + affinity); return set; } @@ -67,7 +37,7 @@ index 169bf27136ff2036676cac2dcca78ee622593ba3..7bd731a24a518f7e9e65143dc307fcbe base::Value AccessibilityTreeFormatterMac::PopulateTextMarkerRange( id object, const LineIndexesMap& line_indexes_map) const { -@@ -624,7 +628,7 @@ id PropertyNodeToTextMarkerRange(const PropertyNode&, +@@ -376,7 +376,7 @@ OptionalNSObject InvokeAttributeFor( dict.SetPath("focus", PopulateTextPosition(range.focus(), line_indexes_map)); return dict; } @@ -76,6 +46,42 @@ index 169bf27136ff2036676cac2dcca78ee622593ba3..7bd731a24a518f7e9e65143dc307fcbe base::Value AccessibilityTreeFormatterMac::PopulateArray( 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 +--- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm ++++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm +@@ -153,6 +153,7 @@ + if (property_name == "AXIndexForChildUIElement") { // UIElement + return OptionalNSObject::NotNilOrError(PropertyNodeToUIElement(arg_node)); + } ++#ifndef MAS_BUILD + if (property_name == "AXIndexForTextMarker") { // TextMarker + return OptionalNSObject::NotNilOrError(PropertyNodeToTextMarker(arg_node)); + } +@@ -160,6 +161,7 @@ + return OptionalNSObject::NotNilOrError( + PropertyNodeToTextMarkerRange(arg_node)); + } ++#endif + + return OptionalNSObject::NotApplicable(); + } +@@ -226,6 +228,7 @@ + return uielement; + } + ++#ifndef MAS_BUILD + id AttributeInvoker::DictNodeToTextMarker(const PropertyNode& dictnode) const { + if (!dictnode.IsDict()) { + TEXTMARKER_FAIL(dictnode, "dictionary is expected") +@@ -293,6 +296,7 @@ + + return content::AXTextMarkerRangeFrom(anchor_textmarker, focus_textmarker); + } ++#endif + + } // namespace a11y + } // namespace content diff --git a/content/browser/accessibility/browser_accessibility_cocoa.h b/content/browser/accessibility/browser_accessibility_cocoa.h index cb253906ddd9b70df1618a1c3738fc64389b5432..318af1ec3a11ee53a1146909f76c9cea7f78be1e 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.h 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 8692cf8e7ade..d0bf3ba971a8 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -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 2c5f258b75cda71ec8f5de721266243aa8b36db0..3580ca1bbce40fb219e900441b72d1ab6f7e61fc 100644 +index cd3e4ca306a520c519e04911a31f4cf37189ec52..0b97c9fe29f24b1305740506458b0b6a02263c3c 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 2c5f258b75cda71ec8f5de721266243aa8b36db0..3580ca1bbce40fb219e900441b72d1ab // Parameters for constructing a network context. struct NetworkContextParams { // Name used by memory tools to identify the context. -@@ -861,6 +872,9 @@ interface NetworkContext { +@@ -867,6 +878,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index d9d55e402d18..17c87b7623e6 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -108,10 +108,10 @@ 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 f5c8b4836dd3f5e9d1f3882e96b590cfc6d0fcd4..06b30227928b01dc2c2167aafdff0639a014d4b7 100644 +index cf4162568a83916965542ae24cec388616272390..be7f43c0ce2a6b1a696ef96415bd60532ff65fbf 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2151,7 +2151,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2152,7 +2152,7 @@ void RenderProcessHostImpl::CreateNotificationService( mojo::PendingReceiver receiver) { DCHECK_CURRENTLY_ON(BrowserThread::UI); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index d5de1f2338ac..6a90c1db7d78 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -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 bee0596550b52abd3fe233f779247256d4ad5123..43542c1a910830b0d610c27f269add66eda71527 100644 +index 977ad787270844b218a87fbe04fea616619e84ba..592fe4459cdae22d23a933a31c452c44992feb95 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 bee0596550b52abd3fe233f779247256d4ad5123..43542c1a910830b0d610c27f269add66 } diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 37bdfd96667f1484bb1bec4057e544d263afb06d..73d96f066863b77f92f6232ce2d7b8ddd30fa6d2 100644 +index 2917e93c3f22b3bcbe683c2b944c7af25e66f950..2cdfd7cec04c979aa8ca77273f9816495cdf147a 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -27,10 +27,7 @@ @@ -279,10 +279,10 @@ index 37bdfd96667f1484bb1bec4057e544d263afb06d..73d96f066863b77f92f6232ce2d7b8dd if (!cookie) { diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 94b65e85561e1440b60086b668865bda07303d35..7044463d163fd74e55ff1a042c36739fdeff3689 100644 +index 9ad03ae28904050d540661038f6ba15b7a5c5c54..6d1c4f338dde79abddbaf3ad55500c4e7e8767ec 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h -@@ -33,6 +33,8 @@ class PrintJob; +@@ -34,6 +34,8 @@ class PrintJob; class PrintQueriesQueue; class PrinterQuery; @@ -291,7 +291,7 @@ index 94b65e85561e1440b60086b668865bda07303d35..7044463d163fd74e55ff1a042c36739f // Base class for managing the print commands for a WebContents. class PrintViewManagerBase : public content::NotificationObserver, public PrintManager { -@@ -42,7 +44,10 @@ class PrintViewManagerBase : public content::NotificationObserver, +@@ -43,7 +45,10 @@ class PrintViewManagerBase : public content::NotificationObserver, // Prints the current document immediately. Since the rendering is // asynchronous, the actual printing will not be completed on the return of // this function. Returns false if printing is impossible at the moment. @@ -303,7 +303,7 @@ index 94b65e85561e1440b60086b668865bda07303d35..7044463d163fd74e55ff1a042c36739f #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Prints the document in |print_data| with settings specified in -@@ -205,9 +210,15 @@ class PrintViewManagerBase : public content::NotificationObserver, +@@ -208,9 +213,15 @@ class PrintViewManagerBase : public content::NotificationObserver, // The current RFH that is printing with a system printing dialog. content::RenderFrameHost* printing_rfh_; @@ -320,7 +320,7 @@ index 94b65e85561e1440b60086b668865bda07303d35..7044463d163fd74e55ff1a042c36739f // 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 fb5d48349eee9469153d27084cf9ac9b08953b7a..cfd7c5162bba2771b6b5323ee179f640a9d92617 100644 +index 64569c4c89b1e034a19b85bb3f6443d3ab76fcd8..164368028a6f3cf14ed6199e0f69717c514090a6 100644 --- a/chrome/browser/printing/printing_message_filter.cc +++ b/chrome/browser/printing/printing_message_filter.cc @@ -21,6 +21,7 @@ @@ -331,7 +331,7 @@ index fb5d48349eee9469153d27084cf9ac9b08953b7a..cfd7c5162bba2771b6b5323ee179f640 #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" -@@ -89,19 +90,22 @@ void PrintingMessageFilter::SetDelegateForTesting(TestDelegate* delegate) { +@@ -90,19 +91,22 @@ void PrintingMessageFilter::SetDelegateForTesting(TestDelegate* delegate) { g_test_delegate = delegate; } @@ -357,7 +357,7 @@ index fb5d48349eee9469153d27084cf9ac9b08953b7a..cfd7c5162bba2771b6b5323ee179f640 } PrintingMessageFilter::~PrintingMessageFilter() { -@@ -136,11 +140,13 @@ bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) { +@@ -137,11 +141,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 fb5d48349eee9469153d27084cf9ac9b08953b7a..cfd7c5162bba2771b6b5323ee179f640 std::unique_ptr printer_query = queue_->PopPrinterQuery(0); if (!printer_query) { printer_query = -@@ -226,12 +232,13 @@ void PrintingMessageFilter::OnScriptedPrintReply( +@@ -225,12 +231,13 @@ void PrintingMessageFilter::OnScriptedPrintReply( void PrintingMessageFilter::OnUpdatePrintSettings(int document_cookie, base::Value job_settings, IPC::Message* reply_msg) { @@ -386,7 +386,7 @@ index fb5d48349eee9469153d27084cf9ac9b08953b7a..cfd7c5162bba2771b6b5323ee179f640 if (!job_settings.is_dict() || !job_settings.FindIntKey(kSettingPrinterType)) { // Reply with null query. -@@ -264,7 +271,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( +@@ -263,7 +270,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( std::unique_ptr printer_query, IPC::Message* reply_msg) { PrintMsg_PrintPages_Params params; @@ -397,7 +397,7 @@ index fb5d48349eee9469153d27084cf9ac9b08953b7a..cfd7c5162bba2771b6b5323ee179f640 params.Reset(); } else { RenderParamsFromPrintSettings(printer_query->settings(), ¶ms.params); -@@ -302,7 +311,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( +@@ -301,7 +310,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintingMessageFilter::OnCheckForCancel(const PrintHostMsg_PreviewIds& ids, bool* cancel) { @@ -407,11 +407,11 @@ index fb5d48349eee9469153d27084cf9ac9b08953b7a..cfd7c5162bba2771b6b5323ee179f640 #endif diff --git a/chrome/browser/printing/printing_message_filter.h b/chrome/browser/printing/printing_message_filter.h -index 9fbea6d0a2dbe55b1d600fbc217dee5aa8ae8cd5..de9bd267e408c02fd4da7d903523c0e6305088d5 100644 +index adb4ff6ece476a99ae12d9e3ecfb78931c04c81e..894148c8847b333be8636907e85476dcd46862e2 100644 --- a/chrome/browser/printing/printing_message_filter.h +++ b/chrome/browser/printing/printing_message_filter.h -@@ -24,6 +24,10 @@ struct PrintHostMsg_ScriptedPrint_Params; - struct PrintMsg_Print_Params; +@@ -24,6 +24,10 @@ struct PrintHostMsg_PreviewIds; + struct PrintHostMsg_ScriptedPrint_Params; class Profile; +namespace content { @@ -432,10 +432,10 @@ index 9fbea6d0a2dbe55b1d600fbc217dee5aa8ae8cd5..de9bd267e408c02fd4da7d903523c0e6 // content::BrowserMessageFilter: bool OnMessageReceived(const IPC::Message& message) override; diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index 8159a61d2707082461a419a344487bbd460a1d29..d5ef9c6a7064885deb7d27518448cc67b21f0b4a 100644 +index 948c86689c2779a8dc41b458ac670ec8a94e0efa..2e160658ff5ea814b9133c925e8b461a0d9bcfbc 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom -@@ -121,7 +121,7 @@ interface PrintPreviewUI { +@@ -197,7 +197,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,18 +445,18 @@ index 8159a61d2707082461a419a344487bbd460a1d29..d5ef9c6a7064885deb7d27518448cc67 // 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 ae6ff46937c9c23124dec73117ce25a0f12b5c3f..d2defe22e8498b132d082e19e2b097e5ee64bc4b 100644 +index 788257825daa531d2f878c4ee53272dd265dc8aa..e25c8cb1be55df8ae3af62a5738fc3813fa5d2e0 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -41,6 +41,7 @@ +@@ -40,6 +40,7 @@ #include "printing/buildflags/buildflags.h" #include "printing/metafile_skia.h" #include "printing/mojom/print.mojom.h" +#include "printing/print_settings.h" #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" - #include "third_party/blink/public/common/css/page_orientation.h" -@@ -1146,7 +1147,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1156,7 +1157,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { web_frame->DispatchBeforePrintEvent(); if (!weak_this) return; @@ -466,7 +466,7 @@ index ae6ff46937c9c23124dec73117ce25a0f12b5c3f..d2defe22e8498b132d082e19e2b097e5 if (weak_this) web_frame->DispatchAfterPrintEvent(); } -@@ -1167,7 +1169,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1177,7 +1179,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -475,7 +475,7 @@ index ae6ff46937c9c23124dec73117ce25a0f12b5c3f..d2defe22e8498b132d082e19e2b097e5 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > 1) return; -@@ -1181,7 +1183,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -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); @@ -484,7 +484,7 @@ index ae6ff46937c9c23124dec73117ce25a0f12b5c3f..d2defe22e8498b132d082e19e2b097e5 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1198,7 +1200,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1208,7 +1210,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { return; } Print(frame, print_preview_context_.source_node(), @@ -493,7 +493,7 @@ index ae6ff46937c9c23124dec73117ce25a0f12b5c3f..d2defe22e8498b132d082e19e2b097e5 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1246,6 +1248,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1256,6 +1258,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > 1) return; @@ -502,18 +502,18 @@ index ae6ff46937c9c23124dec73117ce25a0f12b5c3f..d2defe22e8498b132d082e19e2b097e5 print_preview_context_.OnPrintPreview(); if (print_preview_context_.IsForArc()) { -@@ -1771,7 +1775,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1790,7 +1794,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { + return; - auto self = weak_ptr_factory_.GetWeakPtr(); Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, - PrintRequestType::kRegular); + PrintRequestType::kRegular, + false /* silent */, + base::DictionaryValue() /* new_settings */); // Check if |this| is still valid. - if (!self) + if (!weak_this) return; -@@ -1782,7 +1788,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1805,7 +1811,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -524,7 +524,7 @@ index ae6ff46937c9c23124dec73117ce25a0f12b5c3f..d2defe22e8498b132d082e19e2b097e5 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1790,7 +1798,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1813,7 +1821,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); int expected_page_count = 0; @@ -533,7 +533,7 @@ index ae6ff46937c9c23124dec73117ce25a0f12b5c3f..d2defe22e8498b132d082e19e2b097e5 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1810,8 +1818,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1833,8 +1841,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, PrintMsg_PrintPages_Params print_settings; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -547,7 +547,7 @@ index ae6ff46937c9c23124dec73117ce25a0f12b5c3f..d2defe22e8498b132d082e19e2b097e5 // Check if |this| is still valid. if (!self) return; -@@ -2050,10 +2061,23 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2075,10 +2086,23 @@ void PrintRenderFrameHelper::IPCProcessed() { base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); } @@ -574,7 +574,7 @@ index ae6ff46937c9c23124dec73117ce25a0f12b5c3f..d2defe22e8498b132d082e19e2b097e5 // 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. -@@ -2073,12 +2097,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { +@@ -2098,12 +2122,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { return result; } @@ -594,10 +594,10 @@ index ae6ff46937c9c23124dec73117ce25a0f12b5c3f..d2defe22e8498b132d082e19e2b097e5 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 36418df29689f7573a44ce20460a81a2ca5b3859..234c46e9ab8f83eddbd70b69c996735e5c6d70c8 100644 +index b5ec1df59c37ac18c64abe58955e676f546b3da8..6323915537c22bce36c3289fd51d73946bd72d61 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h -@@ -225,7 +225,7 @@ class PrintRenderFrameHelper +@@ -226,7 +226,7 @@ class PrintRenderFrameHelper mojo::PendingAssociatedReceiver receiver); // printing::mojom::PrintRenderFrame: @@ -606,7 +606,7 @@ index 36418df29689f7573a44ce20460a81a2ca5b3859..234c46e9ab8f83eddbd70b69c996735e void PrintForSystemDialog() override; #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void SetPrintPreviewUI( -@@ -292,7 +292,9 @@ class PrintRenderFrameHelper +@@ -293,7 +293,9 @@ class PrintRenderFrameHelper // WARNING: |this| may be gone after this method returns. void Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -617,7 +617,7 @@ index 36418df29689f7573a44ce20460a81a2ca5b3859..234c46e9ab8f83eddbd70b69c996735e // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); -@@ -301,12 +303,14 @@ class PrintRenderFrameHelper +@@ -302,12 +304,14 @@ class PrintRenderFrameHelper // Initialize print page settings with default settings. // Used only for native printing workflow. @@ -635,7 +635,7 @@ index 36418df29689f7573a44ce20460a81a2ca5b3859..234c46e9ab8f83eddbd70b69c996735e #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 ad26397af46f024a81902949e1c7d627922ff492..e23abbac0014eac5fa0042111b920a1dec4723f8 100644 +index 83e845e8093db6569d77255442c315920803b033..e7505757f2ea1fb8cef0b493336976768ff910d1 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc @@ -94,8 +94,6 @@ PrintingContext::Result PrintingContext::UsePdfSettings() { @@ -648,10 +648,10 @@ index ad26397af46f024a81902949e1c7d627922ff492..e23abbac0014eac5fa0042111b920a1d NOTREACHED(); return OnError(); diff --git a/printing/printing_context.h b/printing/printing_context.h -index 6a5a7c90ef5ba82837095c7bb934881b108797f7..a033c58076ff229ae45ed7c454fc60a57e5707b7 100644 +index 02144650a9ede47c69fd363a3f275166774aa3de..130d6e433925c509eb9728e99de3b53fee97b95c 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h -@@ -131,12 +131,12 @@ class PRINTING_EXPORT PrintingContext { +@@ -132,12 +132,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 1b3eab4d5855..a6efc3aa5bd6 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -30,10 +30,10 @@ index 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 318eb9d8ceda86b4859dc6cf243da538fdd07eda..dbabc73d5b424d1ac881ae89ba72b270b5a5a498 100644 +index 77bc5b22fd03af3e576b3bec10ac8b747b013937..8a57bf66f24a1bf98ad3062312f7789648ee2fef 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -1708,6 +1708,8 @@ void RenderWidgetHostImpl::SetCursor(const WebCursor& cursor) { +@@ -1713,6 +1713,8 @@ void RenderWidgetHostImpl::SetCursor(const WebCursor& cursor) { if (!view_) return; view_->UpdateCursor(cursor); @@ -43,23 +43,24 @@ index 318eb9d8ceda86b4859dc6cf243da538fdd07eda..dbabc73d5b424d1ac881ae89ba72b270 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 c57f6b4f63d2155d6287d0b39fcf531d5e954656..365028ef7b2913e763059f64e16aa9eb869a7f10 100644 +index 4d3ab221333465c3807393facbbf4727884b97b3..052f80a8df327e15e97dd956717897c8be43a1c7 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3883,6 +3883,11 @@ bool WebContentsImpl::OnUpdateDragCursor() { +@@ -3950,6 +3950,12 @@ bool WebContentsImpl::OnUpdateDragCursor() { browser_plugin_embedder_->OnUpdateDragCursor(); } +void WebContentsImpl::OnCursorChanged(const WebCursor& cursor) { -+ for (auto& observer : observers_) -+ observer.OnCursorChanged(cursor); ++ observers_.ForEachObserver([&](WebContentsObserver* observer) { ++ observer->OnCursorChanged(cursor); ++ }); +} + bool WebContentsImpl::IsWidgetForMainFrame( 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 756278488e4349a3f19e3b9980a529c3e0f143ac..41f3fc573b6247a2767dfefce8cf023bb890c532 100644 +index 0de7c43e4a4dcfb2011d93ce3bbb28ac0309abbc..0984f4db13eba71a226586e3b453e5eb1ec22d2d 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, diff --git a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch index f9eda473b295..8d5c7aae94b6 100644 --- a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch +++ b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch @@ -9,10 +9,10 @@ for every navigation to keep Node.js working properly. Once Native Modules in th are required to be NAPI or context aware (Electron v11), this patch can be removed. diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc -index 48911a721341f4e27c1d30dc1709936c51afa987..6167e73a6d6208596fb38e44763b46330038dea2 100644 +index db7c909b99bd543048b41e516c08db13e7f9a1c8..bba8fca230f39758e1008fb2b64891e9a6f5ff67 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -1316,6 +1316,25 @@ bool ChromeContentRendererClient::AllowPopup() { +@@ -1279,6 +1279,25 @@ bool ChromeContentRendererClient::AllowPopup() { #endif } @@ -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 cf7771e9aeb4743f5412130b79a54ef0b245e96a..22fded5c2a3cce9f6edb397e42620cffc4c9fe23 100644 +index 68d2666696de00c28d57f9745f5ca902d2c16bc9..d870323c7848174c4ca8d428b8f207595f113e92 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -5531,6 +5531,23 @@ void RenderFrameImpl::BeginNavigation( +@@ -5692,6 +5692,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/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 4f7f50a0a26b..09ddce95d033 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 06b30227928b01dc2c2167aafdff0639a014d4b7..52ef5388430495bfce43bc8f65067de9bf302066 100644 +index be7f43c0ce2a6b1a696ef96415bd60532ff65fbf..eb99c6f7ef7ca70c6d074d2d0aecd24da383ab76 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/web_contents.patch b/patches/chromium/web_contents.patch index 35e5c12cef9c..909f40ecdf36 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 0389722014d89c1eb6b373b28d94a16f39d9931e..c57f6b4f63d2155d6287d0b39fcf531d5e954656 100644 +index 0e16e0d4c0b84e4f6cdf73d4061a53609dcbe647..4d3ab221333465c3807393facbbf4727884b97b3 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2512,6 +2512,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2561,6 +2561,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 0389722014d89c1eb6b373b28d94a16f39d9931e..c57f6b4f63d2155d6287d0b39fcf531d WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2522,6 +2528,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2571,6 +2577,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } 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 1bdae36d2756..69c276f57f9c 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 @@ -78,7 +78,7 @@ 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 e85ea76736a0712436cd8d338b55dcf45285715b..4c10d67881e8554c6c86482d5df6c9d956f3c12d 100644 +index c0ed21b47e6b7808115b4ddfadea58ed5b5b4987..e7e5911b24c4a247f53061a1114384329e68810a 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() { diff --git a/patches/v8/add_realloc.patch b/patches/v8/add_realloc.patch index 51315790dfc3..26fe6b76148c 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 f0f6472ba38595a08e98a345723f4fc80928948f..1343788434a4e735088219ec3808fd2ea5122996 100644 +index 263e7da8f1ff5136382867aaebe4bc138afa0a49..913bea674bf076df2a9946752d0eacfa93bda6bf 100644 --- a/include/v8.h +++ b/include/v8.h -@@ -5097,6 +5097,13 @@ class V8_EXPORT ArrayBuffer : public Object { +@@ -5096,6 +5096,13 @@ class V8_EXPORT ArrayBuffer : public Object { */ virtual void* AllocateUninitialized(size_t length) = 0; @@ -30,7 +30,7 @@ index f0f6472ba38595a08e98a345723f4fc80928948f..1343788434a4e735088219ec3808fd2e * 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 581259f04c86fde41cac7f4c109ccbf8383493ef..852a1d4bc353e75e7a453e8fa01c4d38483a6aee 100644 +index 5b5985fe4adfabbdc8629ff5e9a28f0fb6e706b4..acb9b0ed3dfbb5286a9990ffaa7197045ea692fe 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 9a2afe544967..57a1aee8bdcc 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 c15989ee0a72d9f39b7266b10bc0bfcc4110e0ea..4886a78cd7737f70ee002d31758dad807aad604d 100644 +index b1bf94f11088e0a3a3cfe0021a9d229470e774fe..b6873dbe4dbbdd8c225fbba39be1f091f8a048ec 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -393,7 +393,7 @@ config("internal_config") { +@@ -390,7 +390,7 @@ config("internal_config") { ":v8_header_features", ] @@ -21,7 +21,7 @@ index c15989ee0a72d9f39b7266b10bc0bfcc4110e0ea..4886a78cd7737f70ee002d31758dad80 defines += [ "BUILDING_V8_SHARED" ] } } -@@ -4417,7 +4417,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -4411,7 +4411,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index c15989ee0a72d9f39b7266b10bc0bfcc4110e0ea..4886a78cd7737f70ee002d31758dad80 deps = [ ":v8_libbase", -@@ -4450,6 +4450,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -4444,6 +4444,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 26e70c0c3f59..7c6dee3ffacd 100644 --- a/patches/v8/chore_add_v8_apple_silicon_patches.patch +++ b/patches/v8/chore_add_v8_apple_silicon_patches.patch @@ -78,7 +78,7 @@ 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 f4366b60b3e61f9e5daa1e2c0e70466467217245..4364419fbc957f7e09b2a481b14971655b5c874c 100644 +index 508e02aa37d16dd0ad89d286054b3ecfe6056103..09c66d04d1873ad8026d031e02f5bce177ee456b 100644 --- a/src/flags/flag-definitions.h +++ b/src/flags/flag-definitions.h @@ -714,7 +714,12 @@ DEFINE_INT(wasm_num_compilation_tasks, 128, @@ -96,10 +96,10 @@ index f4366b60b3e61f9e5daa1e2c0e70466467217245..4364419fbc957f7e09b2a481b1497165 DEFINE_DEBUG_BOOL(trace_wasm_serialization, false, "trace serialization/deserialization") diff --git a/src/wasm/function-compiler.cc b/src/wasm/function-compiler.cc -index 53ac7550f403357958f9ccf1e65267004bb6be27..fdf5cd9305bd97034355b5ab386cf8a2d98953d8 100644 +index 22cae5f668236438c9630287cbd5c6280e12d4b2..461243b4ddbcda4a7f1a3fd888b602a070706b24 100644 --- a/src/wasm/function-compiler.cc +++ b/src/wasm/function-compiler.cc -@@ -261,6 +261,7 @@ void WasmCompilationUnit::CompileWasmFunction(Isolate* isolate, +@@ -258,6 +258,7 @@ void WasmCompilationUnit::CompileWasmFunction(Isolate* isolate, isolate->counters(), detected); if (result.succeeded()) { WasmCodeRefScope code_ref_scope; @@ -121,10 +121,10 @@ index 1fe6cd4b9ed4c4850583cf1b2310a84a38f04c1a..c48c0faef6d4db191c5dcd7efa9dab23 explicit NativeModuleModificationScope(NativeModule* native_module); ~NativeModuleModificationScope(); diff --git a/src/wasm/wasm-objects.cc b/src/wasm/wasm-objects.cc -index b68b68b7a268bf0c29a6540096d184906293df17..b8d1672018468e82a81242a1b8193e170d9b60c6 100644 +index 84db08733b4858d0c0b5d2aac25889a6acfed0f5..8400a7b579182d2cb9d1d5a27b55d0bb8f9aab7e 100644 --- a/src/wasm/wasm-objects.cc +++ b/src/wasm/wasm-objects.cc -@@ -1451,6 +1451,7 @@ void WasmInstanceObject::ImportWasmJSFunctionIntoTable( +@@ -1452,6 +1452,7 @@ void WasmInstanceObject::ImportWasmJSFunctionIntoTable( wasm::WasmCompilationResult result = compiler::CompileWasmImportCallWrapper( isolate->wasm_engine(), &env, kind, sig, false, shared.internal_formal_parameter_count()); diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index a14b3aed9c57..fb15252a7d10 100644 --- a/patches/v8/dcheck.patch +++ b/patches/v8/dcheck.patch @@ -6,10 +6,10 @@ Subject: dcheck.patch https://github.com/auchenberg/volkswagen diff --git a/src/api/api.cc b/src/api/api.cc -index 852a1d4bc353e75e7a453e8fa01c4d38483a6aee..70851923dd8fe59173e518c5b6b39d711c5c3ec3 100644 +index acb9b0ed3dfbb5286a9990ffaa7197045ea692fe..99c4437feb2fdf6136249a71d036c1eb40f6e1ae 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -8712,7 +8712,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -8733,7 +8733,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index 852a1d4bc353e75e7a453e8fa01c4d38483a6aee..70851923dd8fe59173e518c5b6b39d71 isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index 6da43490ce9df8553064c94fbbe40da322dff87a..635c208f6ed6a87f5077173991a4e5fcc87bb834 100644 +index ec30f2aef4fbddcb720b9930ac19ae1dc6e01e80..49341b2997af3125e3ff17e7fa4de65a1bc9073f 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -5647,9 +5647,9 @@ void Heap::TearDown() { +@@ -5609,9 +5609,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 7b12a3223e3a..b26be0ae02ab 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 4d5728cb16bb87f2b01f935ba2173b19968983d2..b2de8df4529eb4e9ab3ee9740148aa05c89c08b8 100644 +index b51e174c2943f14a0c234eedc533e0366303808d..c2a10af36a91d8319d4a23dc22167aff5265c90a 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -393,6 +393,10 @@ config("internal_config") { +@@ -390,6 +390,10 @@ config("internal_config") { ":v8_header_features", ] diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index cacf722f9f1d..39040bd2a760 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 4886a78cd7737f70ee002d31758dad807aad604d..4d5728cb16bb87f2b01f935ba2173b19968983d2 100644 +index b6873dbe4dbbdd8c225fbba39be1f091f8a048ec..b51e174c2943f14a0c234eedc533e0366303808d 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -4428,7 +4428,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -4422,7 +4422,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 4facde45c60d..5b8f25cb0fa3 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -135,6 +135,10 @@ #include "shell/browser/extensions/electron_extension_web_contents_observer.h" #endif +#if BUILDFLAG(ENABLE_PRINTING) +#include "printing/mojom/print.mojom.h" +#endif + namespace gin { #if BUILDFLAG(ENABLE_PRINTING) @@ -154,26 +158,26 @@ struct Converter { }; template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - printing::MarginType* out) { + printing::mojom::MarginType* out) { std::string type; if (ConvertFromV8(isolate, val, &type)) { if (type == "default") { - *out = printing::DEFAULT_MARGINS; + *out = printing::mojom::MarginType::kDefaultMargins; return true; } if (type == "none") { - *out = printing::NO_MARGINS; + *out = printing::mojom::MarginType::kNoMargins; return true; } if (type == "printableArea") { - *out = printing::PRINTABLE_AREA_MARGINS; + *out = printing::mojom::MarginType::kPrintableAreaMargins; return true; } if (type == "custom") { - *out = printing::CUSTOM_MARGINS; + *out = printing::mojom::MarginType::kCustomMargins; return true; } } @@ -1970,11 +1974,13 @@ void WebContents::Print(gin::Arguments* args) { gin_helper::Dictionary margins = gin::Dictionary::CreateEmpty(args->isolate()); if (options.Get("margins", &margins)) { - printing::MarginType margin_type = printing::DEFAULT_MARGINS; + printing::mojom::MarginType margin_type = + printing::mojom::MarginType::kDefaultMargins; margins.Get("marginType", &margin_type); - settings.SetIntKey(printing::kSettingMarginsType, margin_type); + settings.SetIntKey(printing::kSettingMarginsType, + static_cast(margin_type)); - if (margin_type == printing::CUSTOM_MARGINS) { + if (margin_type == printing::mojom::MarginType::kCustomMargins) { base::Value custom_margins(base::Value::Type::DICTIONARY); int top = 0; margins.Get("top", &top); @@ -1992,8 +1998,9 @@ void WebContents::Print(gin::Arguments* args) { std::move(custom_margins)); } } else { - settings.SetIntKey(printing::kSettingMarginsType, - printing::DEFAULT_MARGINS); + settings.SetIntKey( + printing::kSettingMarginsType, + static_cast(printing::mojom::MarginType::kDefaultMargins)); } // Set whether to print color or greyscale