diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index ac1a49e953c2..5b9e62f6bfff 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -123,7 +123,7 @@ env-unittests: &env-unittests TESTS_CONFIG: src/electron/spec/configs/unittests.yml env-arm: &env-arm - GN_EXTRA_ARGS: 'target_cpu = "arm"' + GN_EXTRA_ARGS: 'target_cpu = "arm" build_tflite_with_xnnpack = false' MKSNAPSHOT_TOOLCHAIN: //build/toolchain/linux:clang_arm BUILD_NATIVE_MKSNAPSHOT: 1 TARGET_ARCH: arm diff --git a/.circleci/config/jobs/lint.yml b/.circleci/config/jobs/lint.yml index 213756654712..8bd4f80b7861 100644 --- a/.circleci/config/jobs/lint.yml +++ b/.circleci/config/jobs/lint.yml @@ -28,10 +28,10 @@ steps: command: | chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)" - sha1_path='buildtools/linux64/clang-format.sha1' - curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/${sha1_path}?format=TEXT" | base64 -d > "src/${sha1_path}" + mkdir -p src/buildtools + curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/buildtools/DEPS?format=TEXT" | base64 -d > src/buildtools/DEPS - download_from_google_storage.py --no_resume --no_auth --bucket chromium-clang-format -s "src/${sha1_path}" + gclient runhooks --spec="solutions=[{'name':'src/buildtools','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':True},'managed':False}]" - run: name: Run Lint command: | diff --git a/BUILD.gn b/BUILD.gn index bbd5e3f0949b..d774be59ec6c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -437,6 +437,7 @@ source_set("electron_lib") { "//components/certificate_transparency", "//components/compose:buildflags", "//components/embedder_support:browser_util", + "//components/input:input", "//components/language/core/browser", "//components/net_log", "//components/network_hints/browser", @@ -465,6 +466,7 @@ source_set("electron_lib") { "//gin", "//media/capture/mojom:video_capture", "//media/mojo/mojom", + "//media/mojo/mojom:web_speech_recognition", "//net:extras", "//net:net_resources", "//printing/buildflags", diff --git a/DEPS b/DEPS index 2ac398c82f0e..5ce711a08f81 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '126.0.6445.0', + '127.0.6521.0', 'node_version': 'v20.14.0', 'nan_version': diff --git a/build/args/all.gn b/build/args/all.gn index c444bb29e339..2760a93d0789 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -72,4 +72,4 @@ clang_unsafe_buffers_paths = "" # Disable snapshotting a page when printing for its content to be analyzed for # sensitive content by enterprise users. -enterprise_content_analysis = false +enterprise_cloud_content_analysis = false diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index e36c56b633de..a550b7519fce 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -186,6 +186,7 @@ static_library("chrome") { "//chrome/browser/resource_coordinator:mojo_bindings", "//chrome/browser/web_applications/mojom:mojom_web_apps_enum", "//components/enterprise/buildflags", + "//components/enterprise/common/proto:connectors_proto", "//components/safe_browsing/core/browser/db:safebrowsing_proto", "//components/vector_icons:vector_icons", "//ui/snapshot", diff --git a/filenames.libcxx.gni b/filenames.libcxx.gni index 79a5e7904fae..63fd1bcb64b0 100644 --- a/filenames.libcxx.gni +++ b/filenames.libcxx.gni @@ -283,6 +283,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__chrono/formatter.h", "//third_party/libc++/src/include/__chrono/hh_mm_ss.h", "//third_party/libc++/src/include/__chrono/high_resolution_clock.h", + "//third_party/libc++/src/include/__chrono/leap_second.h", "//third_party/libc++/src/include/__chrono/literals.h", "//third_party/libc++/src/include/__chrono/month.h", "//third_party/libc++/src/include/__chrono/month_weekday.h", @@ -291,6 +292,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__chrono/parser_std_format_spec.h", "//third_party/libc++/src/include/__chrono/statically_widen.h", "//third_party/libc++/src/include/__chrono/steady_clock.h", + "//third_party/libc++/src/include/__chrono/sys_info.h", "//third_party/libc++/src/include/__chrono/system_clock.h", "//third_party/libc++/src/include/__chrono/time_point.h", "//third_party/libc++/src/include/__chrono/time_zone.h", @@ -396,6 +398,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__format/formatter_pointer.h", "//third_party/libc++/src/include/__format/formatter_string.h", "//third_party/libc++/src/include/__format/formatter_tuple.h", + "//third_party/libc++/src/include/__format/indic_conjunct_break_table.h", "//third_party/libc++/src/include/__format/parser_std_format_spec.h", "//third_party/libc++/src/include/__format/range_default_formatter.h", "//third_party/libc++/src/include/__format/range_formatter.h", @@ -711,12 +714,12 @@ libcxx_headers = [ "//third_party/libc++/src/include/__tree", "//third_party/libc++/src/include/__tuple/find_index.h", "//third_party/libc++/src/include/__tuple/make_tuple_types.h", - "//third_party/libc++/src/include/__tuple/pair_like.h", "//third_party/libc++/src/include/__tuple/sfinae_helpers.h", "//third_party/libc++/src/include/__tuple/tuple_element.h", "//third_party/libc++/src/include/__tuple/tuple_indices.h", "//third_party/libc++/src/include/__tuple/tuple_like.h", "//third_party/libc++/src/include/__tuple/tuple_like_ext.h", + "//third_party/libc++/src/include/__tuple/tuple_like_no_subrange.h", "//third_party/libc++/src/include/__tuple/tuple_size.h", "//third_party/libc++/src/include/__tuple/tuple_types.h", "//third_party/libc++/src/include/__type_traits/add_const.h", @@ -739,6 +742,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__type_traits/datasizeof.h", "//third_party/libc++/src/include/__type_traits/decay.h", "//third_party/libc++/src/include/__type_traits/dependent_type.h", + "//third_party/libc++/src/include/__type_traits/desugars_to.h", "//third_party/libc++/src/include/__type_traits/disjunction.h", "//third_party/libc++/src/include/__type_traits/enable_if.h", "//third_party/libc++/src/include/__type_traits/extent.h", @@ -823,7 +827,6 @@ libcxx_headers = [ "//third_party/libc++/src/include/__type_traits/nat.h", "//third_party/libc++/src/include/__type_traits/negation.h", "//third_party/libc++/src/include/__type_traits/noexcept_move_assign_container.h", - "//third_party/libc++/src/include/__type_traits/operation_traits.h", "//third_party/libc++/src/include/__type_traits/promote.h", "//third_party/libc++/src/include/__type_traits/rank.h", "//third_party/libc++/src/include/__type_traits/remove_all_extents.h", @@ -862,6 +865,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__utility/pair.h", "//third_party/libc++/src/include/__utility/piecewise_construct.h", "//third_party/libc++/src/include/__utility/priority_tag.h", + "//third_party/libc++/src/include/__utility/private_constructor_tag.h", "//third_party/libc++/src/include/__utility/rel_ops.h", "//third_party/libc++/src/include/__utility/small_buffer.h", "//third_party/libc++/src/include/__utility/swap.h", diff --git a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch index 5b52635c552e..bd54e8a5eb3e 100644 --- a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch +++ b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch @@ -20,10 +20,10 @@ index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57 case ssl_open_record_error: diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc -index 98f97ebb28a06dfde00082922a1aff24f8aa154c..8ec11f0e839760ace90bd88e096ffbd17508e224 100644 +index ec0ee893e58d49890f5545d02b533d07e362309c..b1c1a77c340e7d2c9e2ef21fcf0cc01ed6e15cc0 100644 --- a/ssl/ssl_lib.cc +++ b/ssl/ssl_lib.cc -@@ -1334,7 +1334,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) { +@@ -1340,7 +1340,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) { } if (ret_code == 0) { @@ -32,7 +32,7 @@ index 98f97ebb28a06dfde00082922a1aff24f8aa154c..8ec11f0e839760ace90bd88e096ffbd1 return SSL_ERROR_ZERO_RETURN; } // An EOF was observed which violates the protocol, and the underlying -@@ -2701,13 +2701,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) { +@@ -2707,13 +2707,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) { return CRYPTO_get_ex_data(&ctx->ex_data, idx); } diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 6ce2e1cd33d9..0e44c72aac8d 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -125,8 +125,7 @@ fix_getcursorscreenpoint_wrongly_returns_0_0.patch fix_add_support_for_skipping_first_2_no-op_refreshes_in_thumb_cap.patch refactor_expose_file_system_access_blocklist.patch partially_revert_is_newly_created_to_allow_for_browser_initiated.patch -fix_use_app_launch_prefetch_namespace_for_subprocesstype.patch feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch -cherry-pick-22db6918bac9.patch fix_font_face_resolution_when_renderer_is_blocked.patch feat_enable_passing_exit_code_on_service_process_crash.patch +chore_remove_reference_to_chrome_browser_themes.patch diff --git a/patches/chromium/accelerator.patch b/patches/chromium/accelerator.patch index 108a660e18ac..3c3bada35415 100644 --- a/patches/chromium/accelerator.patch +++ b/patches/chromium/accelerator.patch @@ -10,7 +10,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc 3. Ctrl-Shift-= and Ctrl-Plus show up as such diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc -index 3094f8f1b445b639f43573af6f6b5ae5eddf7227..7c8e781cf1502bdb72ffc9f2d7ab2be684f37d5c 100644 +index e260f801eaf3ab3c2e3bbf09c94ee8a055bc8378..226338e7cfbfd002212302ba9b067551eb7b5d56 100644 --- a/ui/base/accelerators/accelerator.cc +++ b/ui/base/accelerators/accelerator.cc @@ -12,6 +12,7 @@ diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 01cbceeaff9f..3ef0970a20b4 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 ab52bde9d5ffe8a18621d3bca22fa900af8f56ab..196807d12d385d42a6e3acc7ad1bdb5dd134d48b 100644 +index bb019363bf40f8f2df7815353784c357254c0132..e994a0e7bbef2f78c642486e84aa0386cab7f794 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -266,6 +266,10 @@ int GpuMain(MainFunctionParams parameters) { +@@ -264,6 +264,10 @@ int GpuMain(MainFunctionParams parameters) { // to the GpuProcessHost once the GpuServiceImpl has started. viz::GpuServiceImpl::InstallPreInitializeLogHandler(); @@ -24,7 +24,7 @@ index ab52bde9d5ffe8a18621d3bca22fa900af8f56ab..196807d12d385d42a6e3acc7ad1bdb5d // 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 -@@ -364,7 +368,6 @@ int GpuMain(MainFunctionParams parameters) { +@@ -362,7 +366,6 @@ int GpuMain(MainFunctionParams parameters) { #endif const bool dead_on_arrival = !init_success; diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index eedd3f9f418c..33c10e8ab8e8 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,7 +23,7 @@ index 902d84ad70adc9496f3af989465a99b6f44b077a..3ce043eea32c41130aa59ab8570a05b3 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 2d7d13fc9f361bc3e4b16e4db008c042f492704a..dc96cd01365491a2384e9d27e384b680c3e86a23 100644 +index 81f42913489724e621b916f1457d2966849c0f71..f976151c380ad1a9bf75c927ca3ba228d3f5a8f1 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -4692,6 +4692,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, @@ -40,7 +40,7 @@ index 2d7d13fc9f361bc3e4b16e4db008c042f492704a..dc96cd01365491a2384e9d27e384b680 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index b4e2293651bb0e234aa8119c2afece5faa11a758..37af654883ec39c761cc4fcaab9d22061595d451 100644 +index 3c088dd974176bb740fff9e7084299fc4326eb89..8d2edc32c33dfe0e2cd1fddb97b05bad83171776 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -645,6 +645,8 @@ class CONTENT_EXPORT RenderFrameImpl @@ -53,7 +53,7 @@ index b4e2293651bb0e234aa8119c2afece5faa11a758..37af654883ec39c761cc4fcaab9d2206 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 2bb6e24cf5b83b8f6cf523d648307608ede1b538..1fe4df62e66fd10267e72d91176529fccabe83aa 100644 +index 03bf5ef3fc6664421d832ed001a613e37fa90e90..9e44146ddc56ef3627ac73da63830ea8dd188b02 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h @@ -645,6 +645,9 @@ class BLINK_EXPORT WebLocalFrameClient { @@ -67,10 +67,10 @@ index 2bb6e24cf5b83b8f6cf523d648307608ede1b538..1fe4df62e66fd10267e72d91176529fc 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 0d387e5ae2177311123789762fb2686770e78cab..6b442f0568f119bf8476a09d91a5fdd59b469399 100644 +index 7fe0374717656c4907ff33c2cbd62509173cdb96..f4b5ab6cafa3a80425d6b7c6897052dc092caba1 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 -@@ -215,6 +215,7 @@ void LocalWindowProxy::Initialize() { +@@ -216,6 +216,7 @@ void LocalWindowProxy::Initialize() { } InstallConditionalFeatures(); @@ -79,7 +79,7 @@ index 0d387e5ae2177311123789762fb2686770e78cab..6b442f0568f119bf8476a09d91a5fdd5 if (World().IsMainWorld()) { probe::DidCreateMainWorldContext(GetFrame()); diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h -index 69c46beec12f4b5abf530c2fb836d6185ee049f9..e9c0f5c0930929a5f62a34943f7619a368c551e1 100644 +index ce0f4df2259a072f08a2ee5500f40222c480a601..80f158198419c7e61bf044d6b5fdfde1fbb63848 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h @@ -306,6 +306,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { @@ -92,7 +92,7 @@ index 69c46beec12f4b5abf530c2fb836d6185ee049f9..e9c0f5c0930929a5f62a34943f7619a3 int32_t world_id) = 0; virtual bool AllowScriptExtensions() = 0; diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc -index 0cee9fc9642c4a2eac51cc7b57124d9772411b8c..4a2bd06f9f254969419d3ec00a59466f8278814c 100644 +index c136548b2b64ac9440584f23ce0aaf65a08971bd..325651979715ed39958a9bca1d6779d4b07f8148 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc @@ -293,6 +293,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( @@ -110,7 +110,7 @@ index 0cee9fc9642c4a2eac51cc7b57124d9772411b8c..4a2bd06f9f254969419d3ec00a59466f v8::Local context, int32_t world_id) { diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h -index a70c4a78a3dc740446b06a44a448760015bc9c24..be9872bdd93755bbf9e2be684cfd37efe9f4a5a8 100644 +index de6a2faab0d261d0e50656b27ce06156fddef3ae..ec4550c7ff2fd600425f4575f1c6a735811a462f 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h @@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { diff --git a/patches/chromium/add_gin_converter_support_for_arraybufferview.patch b/patches/chromium/add_gin_converter_support_for_arraybufferview.patch index 66626ecac562..045731e28f36 100644 --- a/patches/chromium/add_gin_converter_support_for_arraybufferview.patch +++ b/patches/chromium/add_gin_converter_support_for_arraybufferview.patch @@ -39,7 +39,7 @@ index 62209cadaec7314d2d4ec3e63e1bc88394afa4a9..b035bfe1fd16fb6ca8be33bf446ff857 Local val) { return val.As(); diff --git a/gin/converter.h b/gin/converter.h -index 828e59f4640e84ae9e4517b9ed9bc13b154fa9f2..c3d97c4e46fe47076299e475be7eec74cbc5783c 100644 +index 37b528f24785ee330b507e33bcdfaeb09a3ed594..76802f6d06b551f9fad0196fadae2aaf748a32cc 100644 --- a/gin/converter.h +++ b/gin/converter.h @@ -190,6 +190,15 @@ struct GIN_EXPORT Converter > { diff --git a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch index fa7f976fb27e..e13c961597d4 100644 --- a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch +++ b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch @@ -8,7 +8,7 @@ decorations in maximized mode where needed, preventing empty space caused by decoration shadows and rounded titlebars around the window while maximized. diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc -index 7b81a752ffad229a7bf1917f000b7a45f0828c36..1f08396713155eafc78a1fa9fc8fec22df350a91 100644 +index d6b7bf6496c25bd873f5e28ed38d21ef5725fee1..c4bb9b5e509907de06a4fa64370b99992f3ce5c7 100644 --- a/ui/gtk/gtk_ui.cc +++ b/ui/gtk/gtk_ui.cc @@ -562,11 +562,12 @@ std::unique_ptr GtkUi::CreateNavButtonProvider() { @@ -51,10 +51,10 @@ index 0432ea4f5906502a4f6def46ab064292a6628218..e3cbfa3a1ac8c169c429e29c1262d0dd // Objects to notify when the window frame button order changes. base::ObserverList::Unchecked diff --git a/ui/gtk/window_frame_provider_gtk.cc b/ui/gtk/window_frame_provider_gtk.cc -index 0b8fa0ec76098e0319b2e853719166d405cd3828..52615c5c119c58f17850454e98d1240b141e8a09 100644 +index e24cce85b453ecee9a4854bfdf7b8eeb6814f8c3..d3e3e9b918011c433b4ac6ded245803410ccb5d4 100644 --- a/ui/gtk/window_frame_provider_gtk.cc +++ b/ui/gtk/window_frame_provider_gtk.cc -@@ -30,20 +30,23 @@ constexpr int kMaxFrameSizeDip = 64; +@@ -29,20 +29,23 @@ constexpr int kMaxFrameSizeDip = 64; // will get an incorrect hint as to which pixels are fully opaque. constexpr int kMaxCornerRadiusDip = 32; @@ -81,7 +81,7 @@ index 0b8fa0ec76098e0319b2e853719166d405cd3828..52615c5c119c58f17850454e98d1240b // GTK4 renders the decoration directly on the window. if (!GtkCheckVersion(4)) { context = AppendCssNodeToStyleContext(context, "decoration"); -@@ -62,8 +65,8 @@ GtkCssContext DecorationContext(bool solid_frame, bool tiled, bool focused) { +@@ -61,8 +64,8 @@ GtkCssContext DecorationContext(bool solid_frame, bool tiled, bool focused) { return context; } @@ -92,7 +92,7 @@ index 0b8fa0ec76098e0319b2e853719166d405cd3828..52615c5c119c58f17850454e98d1240b context = AppendCssNodeToStyleContext(context, "headerbar.header-bar.titlebar"); if (!focused) { -@@ -120,8 +123,8 @@ int ComputeTopCornerRadius() { +@@ -117,8 +120,8 @@ int ComputeTopCornerRadius() { // need to experimentally determine the corner radius by rendering a sample. // Additionally, in GTK4, the headerbar corners get clipped by the window // rather than the headerbar having its own rounded corners. @@ -103,7 +103,7 @@ index 0b8fa0ec76098e0319b2e853719166d405cd3828..52615c5c119c58f17850454e98d1240b ApplyCssToContext(context, R"(window, headerbar { background-image: none; background-color: black; -@@ -155,7 +158,7 @@ int ComputeTopCornerRadius() { +@@ -152,7 +155,7 @@ int ComputeTopCornerRadius() { bool HeaderIsTranslucent() { // The arbitrary square size to render a sample header. constexpr int kHeaderSize = 32; @@ -112,7 +112,7 @@ index 0b8fa0ec76098e0319b2e853719166d405cd3828..52615c5c119c58f17850454e98d1240b double opacity = GetOpacityFromContext(context); if (opacity < 1.0) { return true; -@@ -189,8 +192,8 @@ WindowFrameProviderGtk::Asset& WindowFrameProviderGtk::Asset::operator=( +@@ -186,8 +189,8 @@ WindowFrameProviderGtk::Asset& WindowFrameProviderGtk::Asset::operator=( WindowFrameProviderGtk::Asset::~Asset() = default; @@ -123,7 +123,7 @@ index 0b8fa0ec76098e0319b2e853719166d405cd3828..52615c5c119c58f17850454e98d1240b GtkSettings* settings = gtk_settings_get_default(); // Unretained() is safe since WindowFrameProviderGtk will own the signals. auto callback = base::BindRepeating(&WindowFrameProviderGtk::OnThemeChanged, -@@ -340,7 +343,7 @@ void WindowFrameProviderGtk::PaintWindowFrame(gfx::Canvas* canvas, +@@ -337,7 +340,7 @@ void WindowFrameProviderGtk::PaintWindowFrame(gfx::Canvas* canvas, auto header = PaintHeaderbar({client_bounds_px.width(), top_area_height_px}, @@ -132,7 +132,7 @@ index 0b8fa0ec76098e0319b2e853719166d405cd3828..52615c5c119c58f17850454e98d1240b image = gfx::ImageSkia::CreateFrom1xBitmap(header); // In GTK4, the headerbar gets clipped by the window. if (GtkCheckVersion(4)) { -@@ -369,7 +372,7 @@ WindowFrameProviderGtk::Asset& WindowFrameProviderGtk::GetOrCreateAsset( +@@ -366,7 +369,7 @@ WindowFrameProviderGtk::Asset& WindowFrameProviderGtk::GetOrCreateAsset( gfx::Rect frame_bounds_dip(kMaxFrameSizeDip, kMaxFrameSizeDip, 2 * kMaxFrameSizeDip, 2 * kMaxFrameSizeDip); @@ -141,7 +141,7 @@ index 0b8fa0ec76098e0319b2e853719166d405cd3828..52615c5c119c58f17850454e98d1240b frame_bounds_dip.Inset(-GtkStyleContextGetPadding(focused_context)); frame_bounds_dip.Inset(-GtkStyleContextGetBorder(focused_context)); gfx::Size bitmap_size(BitmapSizePx(asset), BitmapSizePx(asset)); -@@ -377,7 +380,7 @@ WindowFrameProviderGtk::Asset& WindowFrameProviderGtk::GetOrCreateAsset( +@@ -374,7 +377,7 @@ WindowFrameProviderGtk::Asset& WindowFrameProviderGtk::GetOrCreateAsset( focused_context, scale); asset.unfocused_bitmap = PaintBitmap(bitmap_size, gfx::RectF(frame_bounds_dip), diff --git a/patches/chromium/adjust_accessibility_ui_for_electron.patch b/patches/chromium/adjust_accessibility_ui_for_electron.patch index 8f18a9bde314..dc14529f6780 100644 --- a/patches/chromium/adjust_accessibility_ui_for_electron.patch +++ b/patches/chromium/adjust_accessibility_ui_for_electron.patch @@ -10,7 +10,7 @@ usage of BrowserList and Browser as we subclass related methods and use our WindowList. diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc -index aff8a187b6d81172bf5930c6da6bfed4d7989057..5923e39ae94cabd716d845c86db5f84c3c51e2cb 100644 +index e6b380f1619cfdf346b65ff71bb1576810f3f049..e4a4bcd1b9b26457a2803ca318be64a0e512607c 100644 --- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc +++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc @@ -43,6 +43,7 @@ diff --git a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch index 48b5a053ecfc..ec54a5f4da77 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc -index 1eb0f9919a29acf9f443f15ef5e7549138d73f7b..070ad96c753bc064c1af48a934a7a3bc7483174b 100644 +index 8a921c9310b2540b4b4d7d7383406698993d40d7..348e0de3e5193e6f97a4c83f4347649701f9a131 100644 --- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc +++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc @@ -163,6 +163,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast { @@ -23,10 +23,10 @@ index 1eb0f9919a29acf9f443f15ef5e7549138d73f7b..070ad96c753bc064c1af48a934a7a3bc return receiver_.BindNewEndpointAndPassDedicatedRemote(); } diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 25350f7be707e817abb1507b5dbc7749e998419e..7d9648cbd9b7345f9eec3192157e0d140486db32 100644 +index 590024e4883a9397855374108f9b8cd1f90819f5..37cf232b23f5909b42e68735953945c3a518247e 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -714,6 +714,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -730,6 +730,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -39,7 +39,7 @@ index 25350f7be707e817abb1507b5dbc7749e998419e..7d9648cbd9b7345f9eec3192157e0d14 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 5b4e90e2a9293f6d59e92b16bd461500f8188cc7..b69f66e5cf009a340766c355d9ceea89a20546b2 100644 +index 779e90581cdfb2d1bdd904da038f7537d0477f5a..c85620ac2f30998d1b67f159e50ee72221bf0dad 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h @@ -139,6 +139,7 @@ class CONTENT_EXPORT RenderViewHostImpl @@ -51,10 +51,10 @@ index 5b4e90e2a9293f6d59e92b16bd461500f8188cc7..b69f66e5cf009a340766c355d9ceea89 void SendRendererPreferencesToRenderer( const blink::RendererPreferences& preferences); 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 ef10eb9f456f7e16566d22c9c5d674f03016585b..efc25342e674e5b37c8eac0a7f69dc700527af84 100644 +index deaa2c34322f764f3ae8e854b98a205ef6a7e834..8974181a9c33d790e8bee5fe38883af59f487a78 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -564,8 +564,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) { +@@ -570,8 +570,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) { // OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown, // which updates `visibility_`, unless the host is hidden. Make sure no update // is needed. @@ -104,10 +104,10 @@ index ed73a6fe6d146eac904f0aa0d88facf055df503e..4bbc792068db75739a7ceb8ad01c85f9 + SetSchedulerThrottling(bool allowed); }; diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h -index 6dfc5bef7ed4197067f63db2e12de9b1e1478e2e..ab8eb5352a18c514d864d6fd7c64a61e571dce3e 100644 +index a1197832494afac5207b682f187929844b0ebfd7..1c2c61d09d505eef575107201302c7be6589f3c8 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h -@@ -376,6 +376,7 @@ class BLINK_EXPORT WebView { +@@ -364,6 +364,7 @@ class BLINK_EXPORT WebView { // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -116,10 +116,10 @@ index 6dfc5bef7ed4197067f63db2e12de9b1e1478e2e..ab8eb5352a18c514d864d6fd7c64a61e // 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 d0d5030c68f39b18525a057fe0423544fac7350e..092e56e95c1e35a3a47c6e4d15d84d221a0278a2 100644 +index 65c00aae8e04a9f3202ab7d0e664e6047681d38f..5b33d4cebaa04f11c2e9f0cfffb4fbb8fd40e324 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -2433,6 +2433,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( +@@ -2422,6 +2422,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal", "old_state", old_state, "new_state", new_state); @@ -130,7 +130,7 @@ index d0d5030c68f39b18525a057fe0423544fac7350e..092e56e95c1e35a3a47c6e4d15d84d22 bool storing_in_bfcache = new_state->is_in_back_forward_cache && !old_state->is_in_back_forward_cache; bool restoring_from_bfcache = !new_state->is_in_back_forward_cache && -@@ -3939,10 +3943,23 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3932,10 +3936,23 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -155,10 +155,10 @@ index d0d5030c68f39b18525a057fe0423544fac7350e..092e56e95c1e35a3a47c6e4d15d84d22 // Do not throttle if the page should be painting. bool is_visible = diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h -index d6bfd9b670d03170c2c388bb69b2299ef3fe2286..8684fd118320d26549dbc7d0c5bdbbb4d081e0a3 100644 +index 0a1db1e8faa6b56d54627a51ab49db186a0231b9..b5036e48c48b7e88554d67cc988e2f675d5d66a3 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -451,6 +451,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -450,6 +450,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -166,7 +166,7 @@ index d6bfd9b670d03170c2c388bb69b2299ef3fe2286..8684fd118320d26549dbc7d0c5bdbbb4 void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -927,6 +928,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -928,6 +929,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, // If true, we send IPC messages when |preferred_size_| changes. bool send_preferred_size_changes_ = false; diff --git a/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch index fa8aee76b823..aec5beaaf276 100644 --- a/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch +++ b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch @@ -8,10 +8,10 @@ WebPreferences of in-process child windows, rather than relying on process-level command line switches, as before. diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc -index 6178078c6e57fa80a9b671df545c2d39c13142d6..dece2bc9ab0f767f29cac7f9d49a5c1f903d5722 100644 +index 2eb418015552910f6a5bceb117953a563e3b8c07..9974a94a6ae78f36e7baab097e710a79f817e682 100644 --- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc +++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc -@@ -149,6 +149,19 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); out->stylus_handwriting_enabled = data.stylus_handwriting_enabled(); @@ -32,7 +32,7 @@ index 6178078c6e57fa80a9b671df545c2d39c13142d6..dece2bc9ab0f767f29cac7f9d49a5c1f out->accelerated_video_decode_enabled = data.accelerated_video_decode_enabled(); diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h -index cabd505429b3d04ef0f403bdefe4abe1dbbc2564..592e6ce61fd3678ed025c3fad104f987dd7af626 100644 +index a928196b83671b7f9a6fc27f2a8436c89fe3d3e5..ef5ba7b733bfa67158cb631b5b0bb6b28ba8758d 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h @@ -10,6 +10,7 @@ @@ -43,7 +43,7 @@ index cabd505429b3d04ef0f403bdefe4abe1dbbc2564..592e6ce61fd3678ed025c3fad104f987 #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" #include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h" -@@ -431,6 +432,20 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -432,6 +433,20 @@ struct BLINK_COMMON_EXPORT WebPreferences { // blocking user's access to the background web content. bool modal_context_menu = true; @@ -65,7 +65,7 @@ index cabd505429b3d04ef0f403bdefe4abe1dbbc2564..592e6ce61fd3678ed025c3fad104f987 // chrome, except for the cases where it would require lots of extra work for // the embedder to use the same default value. diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h -index e32f89a2f97b56ea67d834774d7e36998c83698e..e4b16f8961242fca03c583d04561784cc9c96e8e 100644 +index ffddf92b78f1bc03f40969bb93260502b0887e8a..7a8f75cb6b501b90df7a1fec2b5a84667250691c 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h +++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h @@ -6,6 +6,7 @@ @@ -76,7 +76,7 @@ index e32f89a2f97b56ea67d834774d7e36998c83698e..e4b16f8961242fca03c583d04561784c #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -439,6 +440,52 @@ struct BLINK_COMMON_EXPORT StructTraitsDetach(FrameDetachType::kRemove); -@@ -156,6 +148,14 @@ bool Frame::Detach(FrameDetachType type) { +@@ -161,6 +153,14 @@ bool Frame::Detach(FrameDetachType type) { GetWindowProxyManager()->ClearForSwap(); } @@ -49,10 +49,10 @@ index 0a742bbbd5e8e1eb3610cc32f785f779e8907e75..26967019244d409dadf4533405d4d5d2 // its owning reference back to our owning LocalFrame. client_->Detached(type); diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index f1d2b1d52929a9b9d58a5749a8c3c94f67baf962..8d818e8f77d08a22a114782296ea45c622e46fd9 100644 +index e0f66dc32ee0ed5b68bf7010f2556edbcf781c3b..7385c4b848dd1550cd5c2325745a155393d5e860 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -689,10 +689,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -718,10 +718,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index f1d2b1d52929a9b9d58a5749a8c3c94f67baf962..8d818e8f77d08a22a114782296ea45c6 if (!Client()) return false; -@@ -743,6 +739,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -772,6 +768,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index 4a0ad982ccdf..cb3089e96ce9 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,10 +8,10 @@ categories in use are known / declared. This patch is required for us to introduce a new Electron category for Electron-specific tracing. diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index 8c6cf1b8c13030bc9e33c8bd6e7f81e9c0ce34e9..3d968f801c47f4b80ef571b99890d926d383a929 100644 +index a3da4353d4ea519670b4a993893851f4788cd617..6c17f541837cc8e2c18d4ecec1f463da8f7661e6 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h -@@ -87,6 +87,7 @@ +@@ -88,6 +88,7 @@ X("drm") \ X("drmcursor") \ X("dwrite") \ diff --git a/patches/chromium/build_allow_electron_to_use_exec_script.patch b/patches/chromium/build_allow_electron_to_use_exec_script.patch index b3138299ddd2..c8b4c3a4390e 100644 --- a/patches/chromium/build_allow_electron_to_use_exec_script.patch +++ b/patches/chromium/build_allow_electron_to_use_exec_script.patch @@ -6,10 +6,10 @@ Subject: build: allow electron to use exec_script This is similar to the //build usecase so we're OK adding ourselves here diff --git a/.gn b/.gn -index e6f5cbc9c49f998d63dc8974c5b4789643b2fc87..1df4bbe26fe90eef2dc1a73faaff3c2405993491 100644 +index 44a11ec90ec9b67cf22b6d529c6843e6b6af12bc..783dd77dcdf92ec32cc6594b739eab9738f3e3ba 100644 --- a/.gn +++ b/.gn -@@ -169,4 +169,8 @@ exec_script_whitelist = +@@ -172,4 +172,8 @@ exec_script_whitelist = "//tools/grit/grit_rule.gni", "//tools/gritsettings/BUILD.gn", diff --git a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch index 345eea79ec57..649a43b5a0cc 100644 --- a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch +++ b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch @@ -11,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this patch. diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index a472e9a72dc5c04e92f007e1740a4b6aaf54f63b..b7f8ae82d540ea373972678f3cd93f8d41fc8d99 100644 +index ce54376e4a56053fc8dc33ceeabcbc26f85ae40a..eef187949d45296dad0808f88652590e01bb71ee 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -189,11 +189,16 @@ if (!is_android && !is_mac) { +@@ -192,11 +192,16 @@ if (!is_android && !is_mac) { "common/crash_keys.h", ] @@ -33,10 +33,10 @@ index a472e9a72dc5c04e92f007e1740a4b6aaf54f63b..b7f8ae82d540ea373972678f3cd93f8d "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 26c26eafb1a87609d1c045c9adbdb3048afdb210..77806b6c5ea44408d3ab6ef853b410f2a6c31ce9 100644 +index 8676580bd02dc424666dc41698c1b1d638bae721..a812e9787894e2f9d7eac97118406d8d2479de87 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4868,7 +4868,7 @@ static_library("browser") { +@@ -4904,7 +4904,7 @@ static_library("browser") { # On Windows, the hashes are embedded in //chrome:chrome_initial rather # than here in :chrome_dll. @@ -46,10 +46,10 @@ index 26c26eafb1a87609d1c045c9adbdb3048afdb210..77806b6c5ea44408d3ab6ef853b410f2 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 2ffd0dbb0bccfa7fdc393a41fb4474288c1621c7..8839dc3463584c537ff7795999f4b10f1dd48d7a 100644 +index ee5eb6b794dfd944fcf94c55706a809c9f62d583..3e703e7f9ed8e286d55b54d8dd970d320a873f30 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -7265,9 +7265,12 @@ test("unit_tests") { +@@ -7395,9 +7395,12 @@ test("unit_tests") { "//chrome/browser/safe_browsing/incident_reporting/verifier_test:verifier_test_dll_2", ] @@ -63,7 +63,7 @@ index 2ffd0dbb0bccfa7fdc393a41fb4474288c1621c7..8839dc3463584c537ff7795999f4b10f "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/app:win_unit_tests", -@@ -8258,6 +8261,10 @@ test("unit_tests") { +@@ -8395,6 +8398,10 @@ test("unit_tests") { "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc", ] @@ -74,7 +74,7 @@ index 2ffd0dbb0bccfa7fdc393a41fb4474288c1621c7..8839dc3463584c537ff7795999f4b10f sources += [ # The importer code is not used on Android. "../common/importer/firefox_importer_utils_unittest.cc", -@@ -8329,7 +8336,6 @@ test("unit_tests") { +@@ -8472,7 +8479,6 @@ test("unit_tests") { } deps += [ diff --git a/patches/chromium/build_gn.patch b/patches/chromium/build_gn.patch index 7669e30e7412..45c9a58b5fb2 100644 --- a/patches/chromium/build_gn.patch +++ b/patches/chromium/build_gn.patch @@ -7,7 +7,7 @@ These are variables we add to the root BUILDCONFIG so that they're available everywhere, without having to import("//electron/.../flags.gni"). diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index 26fad5adf994a028240f690b7c6ae665558071b4..ff903cd81f731de410e093a077cc2df597a6e843 100644 +index 29625fa7af1c8840bc530c4e4547e19a3bd5f8ce..83e32e23a7bc7ae098182033f065285858293cd1 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -123,6 +123,9 @@ if (current_os == "") { diff --git a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch index 02ab2e69a628..dd65466c20f8 100644 --- a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch +++ b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch @@ -6,7 +6,7 @@ Subject: build: make libcxx_abi_unstable false for electron https://nornagon.medium.com/a-libc-odyssey-973e51649063 diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site -index de3aaa04f1e2a9081ae821b964b49414cb98b375..f9726605ac2bc9bedac46480d270cd54897cbd1f 100644 +index d3249c5c3056c77036d39b9d9604ee2984f5b51a..40dca160004a6e819374b2990f8ac0bb34e91e6a 100644 --- a/buildtools/third_party/libc++/__config_site +++ b/buildtools/third_party/libc++/__config_site @@ -13,7 +13,9 @@ diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 4bf3d784582e..bd1346d628ce 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -9,10 +9,10 @@ potentially prevent a window from being created. TODO(loc): this patch is currently broken. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 7ba21901b680d9cf3b220ba85aef3a51c42489da..804c15034d7f5beefa5144d9a7788b08c3ea4fcd 100644 +index 6a04a0ca7ce3a250eb94a9e3f3c9371f8fad24ce..048321f3142ad1c6252a1d72735d3ee5dd1a1591 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -8512,6 +8512,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -8543,6 +8543,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 7ba21901b680d9cf3b220ba85aef3a51c42489da..804c15034d7f5beefa5144d9a7788b08 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index fdef236700dfdb69ad3aaa18ae1d870257601f77..ab6a5a975cc9b88ea9ea48d213d5fc49a4efe6a9 100644 +index f43ec47a8c6504a2f1911bce5259a292b6e1aded..50a6d0835c70795a3c7865c305b9389936939ee9 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4613,6 +4613,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4713,6 +4713,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( auto* new_contents_impl = new_contents.get(); @@ -37,7 +37,7 @@ index fdef236700dfdb69ad3aaa18ae1d870257601f77..ab6a5a975cc9b88ea9ea48d213d5fc49 // If the new frame has a name, make sure any SiteInstances that can find // this named frame have proxies for it. Must be called after // SetSessionStorageNamespace, since this calls CreateRenderView, which uses -@@ -4654,12 +4660,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4754,12 +4760,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -51,10 +51,10 @@ index fdef236700dfdb69ad3aaa18ae1d870257601f77..ab6a5a975cc9b88ea9ea48d213d5fc49 new_contents_impl, opener, params.target_url, params.referrer.To(), params.disposition, diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index d72ce84100f584832b22058648e7f21ae8325236..4f010247091564573b1511f163c5d874f2d431b6 100644 +index 6df9186bcee6a56da11da8e365c7cf5b4375e366..0fdda1a6e0ac98a8c8619b4d4fab597788155d2e 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -603,6 +603,10 @@ struct CreateNewWindowParams { +@@ -605,6 +605,10 @@ struct CreateNewWindowParams { // The navigation initiator's user activation and ad status. blink.mojom.NavigationInitiatorActivationAndAdStatus initiator_activation_and_ad_status; @@ -66,10 +66,10 @@ index d72ce84100f584832b22058648e7f21ae8325236..4f010247091564573b1511f163c5d874 // 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 0de68c70e9d18aab035eed9fe1385c0ce0714184..a03833252f0b28695da35e6b51801530e2c595f2 100644 +index ac5528906494016a03df8c4b00703a1f67e87846..0c10b2095b1ce9261f700f9dc65904d48124597d 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -725,6 +725,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -735,6 +735,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -79,10 +79,10 @@ index 0de68c70e9d18aab035eed9fe1385c0ce0714184..a03833252f0b28695da35e6b51801530 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 44cdba11faf853480b8002383939e9fc07f7d080..f29755bf04da153831da14565e28ca04189c6771 100644 +index 691bb7e0bd534f54e8d204094c7cd94c345f9f66..81f617f0a8e6f6d930343ea49ecd9292f694c10e 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -186,6 +186,7 @@ class NetworkService; +@@ -187,6 +187,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -90,7 +90,7 @@ index 44cdba11faf853480b8002383939e9fc07f7d080..f29755bf04da153831da14565e28ca04 } // namespace network namespace sandbox { -@@ -1213,6 +1214,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1240,6 +1241,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -100,7 +100,7 @@ index 44cdba11faf853480b8002383939e9fc07f7d080..f29755bf04da153831da14565e28ca04 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 f4d46dafea0a08e29ae0690b2e31cd8fc438453e..2e6025fa3f4cecedb6c563eba887463aea634830 100644 +index 7351bcf45b46a3668ee5d58135c3f5b28a37aacd..fdd2c2be6bc8c75eacfd85d1b1e1531e4715f6a0 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -30,6 +30,17 @@ namespace content { @@ -122,7 +122,7 @@ index f4d46dafea0a08e29ae0690b2e31cd8fc438453e..2e6025fa3f4cecedb6c563eba887463a WebContents* source, const OpenURLParams& params, diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 7c43ffab6a865952e9cea62db031c7d7e867b10e..a093cac4660c1a3c38fc0baccee40780e0ee47cf 100644 +index fd851a9347dd6920e035bc9183991ea2a275aff4..579a796fcfdecf44ab415ceebc30b4278cda112b 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -17,6 +17,7 @@ @@ -133,7 +133,7 @@ index 7c43ffab6a865952e9cea62db031c7d7e867b10e..a093cac4660c1a3c38fc0baccee40780 #include "content/public/browser/eye_dropper.h" #include "content/public/browser/fullscreen_types.h" #include "content/public/browser/invalidate_type.h" -@@ -355,6 +356,13 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -358,6 +359,13 @@ class CONTENT_EXPORT WebContentsDelegate { const StoragePartitionConfig& partition_config, SessionStorageNamespace* session_storage_namespace); @@ -148,10 +148,10 @@ index 7c43ffab6a865952e9cea62db031c7d7e867b10e..a093cac4660c1a3c38fc0baccee40780 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index c8113196eeb34e2067b83297577eed4464e8059c..2d7d13fc9f361bc3e4b16e4db008c042f492704a 100644 +index a8d9b10d1cfc44fd7b3c76b813be6c41b9a1b827..81f42913489724e621b916f1457d2966849c0f71 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -6694,6 +6694,10 @@ WebView* RenderFrameImpl::CreateNewWindow( +@@ -6688,6 +6688,10 @@ WebView* RenderFrameImpl::CreateNewWindow( request.HasUserGesture(), GetWebFrame()->IsAdFrame(), GetWebFrame()->IsAdScriptInStack()); @@ -210,10 +210,10 @@ index 78956238f8d959580e928d2590866b2f4da3d218..806b3337ec8a8ad7c89681857b4e81dc } // 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 8e3ac9bfa91e306b0e2768f85688ccefd60110b4..93b391526c1f5cc2ad911ee36455beaeb019990d 100644 +index 679a9f2aeeebb2b238f6fabaebb40c67c60c09b9..7dee70f410e1c137b2953c112d15ad584d3c554e 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2222,6 +2222,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2251,6 +2251,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, entered_window); diff --git a/patches/chromium/cherry-pick-22db6918bac9.patch b/patches/chromium/cherry-pick-22db6918bac9.patch deleted file mode 100644 index d0382d2ad500..000000000000 --- a/patches/chromium/cherry-pick-22db6918bac9.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Josip Sokcevic -Date: Thu, 9 May 2024 18:45:52 +0000 -Subject: Add hook to delete stale files - -download_from_google_storage leaves archive data on disk, near .sha1 -files. As we move those hooks to native DEPS, we no longer need to do -that. - -Old checkouts will still have archive files around, and removing just -.gitignore entry can be confusing to our users as it will show up as -untracked file. This CL adds a hook runs that cleans up stale files left -by download_from_google_storage (and anything else in the future). This -change also removes .gitignore entry for test_fonts.tar.gz. - -R=bjoyce@chromium.org - -Bug: 336625018 -Change-Id: Id40b7f30d3353e4fa57a4c0dd172414838b483af -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5523918 -Commit-Queue: Thomas Anderson -Reviewed-by: Benjamin Joyce (Ben) -Auto-Submit: Josip Sokcevic -Reviewed-by: Dirk Pranke -Reviewed-by: Thomas Anderson -Cr-Commit-Position: refs/heads/main@{#1298764} - -diff --git a/DEPS b/DEPS -index b15e782d99659792fa03fea7cf7abf9df3425803..35690149aa76c7557a83f5d1291e41181708359b 100644 ---- a/DEPS -+++ b/DEPS -@@ -4660,6 +4660,17 @@ hooks = [ - '--disable', - ], - }, -+ { -+ # Ensure we remove any file from disk that is no longer needed (e.g. after -+ # hooks to native GCS deps migration). -+ 'name': 'remove_stale_files', -+ 'pattern': '.', -+ 'action': [ -+ 'python3', -+ 'src/tools/remove_stale_files.py', -+ 'src/third_party/test_fonts/test_fonts.tar.gz', # Remove after 20240901 -+ ], -+ }, - { - # Ensure that we don't accidentally reference any .pyc files whose - # corresponding .py files have since been deleted. -diff --git a/tools/remove_stale_files.py b/tools/remove_stale_files.py -new file mode 100755 -index 0000000000000000000000000000000000000000..5973fd57bc99e7e702346eb048985c599268c2b2 ---- /dev/null -+++ b/tools/remove_stale_files.py -@@ -0,0 +1,23 @@ -+#!/usr/bin/env python -+# Copyright 2024 The Chromium Authors -+# Use of this source code is governed by a BSD-style license that can be -+# found in the LICENSE file. -+ -+import os -+import sys -+ -+ -+def RemoveAllStaleFiles(paths): -+ """Check if any stale files (e.g. old GCS archives) are on filesystem, and -+ remove them.""" -+ for path in paths: -+ try: -+ if os.path.exists(path) and not os.path.isdir(path): -+ os.remove(path) -+ except OSError: -+ # Wrap OS calls in try/except in case another process touched this file. -+ pass -+ -+ -+if __name__ == '__main__': -+ RemoveAllStaleFiles(sys.argv[1:]) diff --git a/patches/chromium/chore_add_electron_deps_to_gitignores.patch b/patches/chromium/chore_add_electron_deps_to_gitignores.patch index 9dabe4299b52..40c06dfb069b 100644 --- a/patches/chromium/chore_add_electron_deps_to_gitignores.patch +++ b/patches/chromium/chore_add_electron_deps_to_gitignores.patch @@ -6,7 +6,7 @@ Subject: chore: add electron deps to gitignores Makes things like "git status" quicker when developing electron locally diff --git a/.gitignore b/.gitignore -index bae3d8830c54f6399b5b92c63e0ced8ab8bd4250..36aaab23105fe87fe836a7afbb86acc98d01320a 100644 +index 50992a3f4502d46a1bc2713c25bec6095c541ffa..121a09d7fa00162fe64ce901cae96d8f1c9d885e 100644 --- a/.gitignore +++ b/.gitignore @@ -213,6 +213,7 @@ vs-chromium-project.txt @@ -18,7 +18,7 @@ index bae3d8830c54f6399b5b92c63e0ced8ab8bd4250..36aaab23105fe87fe836a7afbb86acc9 /googleurl /gpu/gles2_conform_test diff --git a/third_party/.gitignore b/third_party/.gitignore -index 4bb0c9e975602b48caf5e9126edc06422464d425..85b81f5e2c0d793b5b87152277677fc7b2d0bd1b 100644 +index 4f4e8f03bb876e5745ea6bcf07c2f8ba8b12bffb..de05f778dfc2ee1dabb70242b9a6201b7eea90e3 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore @@ -51,7 +51,9 @@ @@ -31,7 +31,7 @@ index 4bb0c9e975602b48caf5e9126edc06422464d425..85b81f5e2c0d793b5b87152277677fc7 /espresso/lib/ /eyesfree/src /fuchsia-sdk/images -@@ -105,6 +107,7 @@ +@@ -106,6 +108,7 @@ /mocha /mockito/src /nacl_sdk_binaries/ @@ -39,11 +39,11 @@ index 4bb0c9e975602b48caf5e9126edc06422464d425..85b81f5e2c0d793b5b87152277677fc7 /ninja/ninja* /node/*.tar.gz /node/linux/ -@@ -150,6 +153,7 @@ - /soda-win64 - /speex +@@ -155,6 +158,7 @@ + /spirv-headers/src + /spirv-tools/src /sqlite4java/lib/ +/squirrel.mac - /subresource-filter-ruleset/data/UnindexedRules + /subresource-filter-ruleset/data/* /swift-format /swift-toolchain diff --git a/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch b/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch index 89c5b8dba039..3b06576be367 100644 --- a/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch +++ b/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch @@ -7,10 +7,10 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch actions in the non-client caption area. diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index f1a1dcead614367dfee39dce22e30e386d9d2054..d219e9a98ed57de27d8c05dd3504bdd3ae4335c9 100644 +index baa087ba8f78f79a47e71bf7c85c830b040592a7..f9a351307179ee19a56d07730d8245cb58ecce42 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -1219,6 +1219,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged( +@@ -1224,6 +1224,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged( window()->SetProperty(aura::client::kHeadlessBoundsKey, bounds); } @@ -34,10 +34,10 @@ index 8d5b01098915dd8e27ed047fa3a250169157a382..797670a6d0a34f25ee5d6f266bb2a1f5 Widget* GetWidget(); const Widget* GetWidget() const; diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index e65fcbc6be98d15f5daca87cfc32671628f1e9ab..088fbc8a376139c1497461fa072ece401563602d 100644 +index 835b6f72bd788d8e807557f9a17fb189220a695e..3eed15267074a09b375bab3418a28ee506db1f06 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3122,15 +3122,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3132,15 +3132,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, SetMsgHandled(FALSE); // We must let Windows handle the caption buttons if it's drawing them, or // they won't work. diff --git a/patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch b/patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch index 0f49da3c08ed..e859e6f6df75 100644 --- a/patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch +++ b/patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch @@ -9,7 +9,7 @@ devices is available. This should no longer be necessary if/when https://crbug.com/1096743 is completed. diff --git a/services/device/usb/usb_service_impl.cc b/services/device/usb/usb_service_impl.cc -index 5abc13a60fbcd260a4c8c73eac7f1d104c7f6f6f..ca4d5747f0cb36f19da2c5c7cad5dab2c735a00f 100644 +index fec443719f0b2588db3a306aa961a039a148496b..3da1902ccfb0f582398d3c92071e7c781eb15772 100644 --- a/services/device/usb/usb_service_impl.cc +++ b/services/device/usb/usb_service_impl.cc @@ -198,7 +198,7 @@ void UsbServiceImpl::GetDevices(GetDevicesCallback callback) { diff --git a/patches/chromium/chore_introduce_blocking_api_for_electron.patch b/patches/chromium/chore_introduce_blocking_api_for_electron.patch index 582cd0c15110..a0109b91e3cb 100644 --- a/patches/chromium/chore_introduce_blocking_api_for_electron.patch +++ b/patches/chromium/chore_introduce_blocking_api_for_electron.patch @@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor of explicitly adding ScopedAllowBlocking calls as friends. diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h -index 8447e22c20399dc754ee1815529b5d95e65b58be..de93ff999f9aa7035e47dde44c2fff79586eec9a 100644 +index fca9f03283c9b11e63d585411eb1620a20174bf6..96a4280e94988857545cd4e2bb0752077cb0132f 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h @@ -136,6 +136,7 @@ class KeyStorageLinux; @@ -18,7 +18,7 @@ index 8447e22c20399dc754ee1815529b5d95e65b58be..de93ff999f9aa7035e47dde44c2fff79 class Profile; class ProfileImpl; class ScopedAllowBlockingForProfile; -@@ -277,6 +278,9 @@ class BackendImpl; +@@ -285,6 +286,9 @@ class BackendImpl; class InFlightIO; bool CleanupDirectorySync(const base::FilePath&); } // namespace disk_cache @@ -28,7 +28,7 @@ index 8447e22c20399dc754ee1815529b5d95e65b58be..de93ff999f9aa7035e47dde44c2fff79 namespace enterprise_connectors { class LinuxKeyRotationCommand; } // namespace enterprise_connectors -@@ -579,6 +583,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking { +@@ -592,6 +596,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking { friend class ::DesktopNotificationBalloon; friend class ::FirefoxProfileLock; friend class ::GaiaConfig; @@ -36,7 +36,7 @@ index 8447e22c20399dc754ee1815529b5d95e65b58be..de93ff999f9aa7035e47dde44c2fff79 friend class ::ProfileImpl; friend class ::ScopedAllowBlockingForProfile; friend class ::StartupTabProviderImpl; -@@ -619,6 +624,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking { +@@ -632,6 +637,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking { friend class crosapi::LacrosThreadTypeDelegate; friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847 friend class drive::FakeDriveService; diff --git a/patches/chromium/chore_patch_out_profile_methods_in_chrome_browser_pdf.patch b/patches/chromium/chore_patch_out_profile_methods_in_chrome_browser_pdf.patch index 672aedb105c9..1d3d2ccd9528 100644 --- a/patches/chromium/chore_patch_out_profile_methods_in_chrome_browser_pdf.patch +++ b/patches/chromium/chore_patch_out_profile_methods_in_chrome_browser_pdf.patch @@ -9,7 +9,7 @@ Electron does not support Profiles, so this Profile::FromBrowserContext() call is not needed and will not link. This change patches it out. diff --git a/chrome/browser/pdf/chrome_pdf_stream_delegate.cc b/chrome/browser/pdf/chrome_pdf_stream_delegate.cc -index 8c2a705b69da50604fb4c441ff4e2f5207ef3230..991c622fe8af434fa28405f15eb14c27b1062d22 100644 +index 33702623b417dc11dec22eeb7e810a77506e5f3b..da734688f46b3ac97e93a44b20b06710b749968b 100644 --- a/chrome/browser/pdf/chrome_pdf_stream_delegate.cc +++ b/chrome/browser/pdf/chrome_pdf_stream_delegate.cc @@ -44,6 +44,7 @@ namespace { diff --git a/patches/chromium/chore_patch_out_profile_methods_in_profile_selections_cc.patch b/patches/chromium/chore_patch_out_profile_methods_in_profile_selections_cc.patch index 6d37d5248f59..86ef3830aaed 100644 --- a/patches/chromium/chore_patch_out_profile_methods_in_profile_selections_cc.patch +++ b/patches/chromium/chore_patch_out_profile_methods_in_profile_selections_cc.patch @@ -8,7 +8,7 @@ is therefore not a method that will compile given we don't include relevant files. diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc -index 1b5ad6fe48acf214920c018bb7acb5fc86d61455..923fe321a8cd085723a904e3b701a46e8308c2e7 100644 +index 6e2d839eb0e7ec1aa260f41904f78b1b2a2cbf73..6e2802e96da51eb0d5130c4847a07b1fddc1231d 100644 --- a/chrome/browser/profiles/profile_selections.cc +++ b/chrome/browser/profiles/profile_selections.cc @@ -13,6 +13,7 @@ diff --git a/patches/chromium/chore_patch_out_profile_methods_in_titlebar_config.patch b/patches/chromium/chore_patch_out_profile_methods_in_titlebar_config.patch index 1311ccf8bbd1..0705f4268a5b 100644 --- a/patches/chromium/chore_patch_out_profile_methods_in_titlebar_config.patch +++ b/patches/chromium/chore_patch_out_profile_methods_in_titlebar_config.patch @@ -6,10 +6,10 @@ Subject: chore: patch out Profile methods in titlebar_config Make this code linkable in Electron by removing Profile references. diff --git a/chrome/browser/win/titlebar_config.cc b/chrome/browser/win/titlebar_config.cc -index f088a7071b1e0e1e05aee5637484b1dea3e2a6fa..8d411e550f6a8ca1a4070bf5d5719703f90b3dfa 100644 +index 7898ea88ca529660e52c1f9e2517d6f016b740a5..114046912999f4ca9d21f7d5859d14ecaaab9f56 100644 --- a/chrome/browser/win/titlebar_config.cc +++ b/chrome/browser/win/titlebar_config.cc -@@ -19,8 +19,10 @@ BASE_FEATURE(kWindows11MicaTitlebar, +@@ -12,8 +12,10 @@ bool ShouldBrowserCustomDrawTitlebar(BrowserView* browser_view) { return !ShouldDefaultThemeUseMicaTitlebar() || diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index a8df97a58c28..733d58d56d9d 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -7,7 +7,7 @@ Pending upstream patch, this gives us fuller access to the window.open params so that we will be able to decide whether to cancel it or not. diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc -index ef406aa21d60c7b14745674c6dae3ca6e1e76a12..8d9b255575905c32af5c6177cae859445b71f756 100644 +index bfcdf050e603b953d15a0898200c8f031a1f84c6..b1f163b6da4d2197d404a5a0fbd31a5b346d3d69 100644 --- a/chrome/browser/media/offscreen_tab.cc +++ b/chrome/browser/media/offscreen_tab.cc @@ -286,8 +286,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden( @@ -21,7 +21,7 @@ index ef406aa21d60c7b14745674c6dae3ca6e1e76a12..8d9b255575905c32af5c6177cae85944 // uses this to spawn new windows/tabs, which is also not allowed for // offscreen tabs. diff --git a/chrome/browser/media/offscreen_tab.h b/chrome/browser/media/offscreen_tab.h -index d4ec8ff2ee39242a86b27dafc237f5fad194354d..cb6914b28203a530210d98f79e6e1d4c42807a4b 100644 +index 0163968067f2607507493a5e0816aa814de3ba0b..34b94af6a4e3f031a35520fde4173e186ebec0b7 100644 --- a/chrome/browser/media/offscreen_tab.h +++ b/chrome/browser/media/offscreen_tab.h @@ -107,8 +107,7 @@ class OffscreenTab final : public ProfileObserver, @@ -80,10 +80,10 @@ index 28cd699814f32a7a569d63936b9544567a66d9c4..fd461fa448d983481dc4c0c7d03b1945 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 1f27054a9fafcb9cbebe146889f67d6d879ec9e8..bfa74b9ac80e4d914ff773390e376cd58aca424c 100644 +index e345a4350fa8a059eaf5b30c46b801cd3ddc33aa..5eb85031c43762e2cc54429254d2c81222fa3198 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1923,12 +1923,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1983,12 +1983,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -99,10 +99,10 @@ index 1f27054a9fafcb9cbebe146889f67d6d879ec9e8..bfa74b9ac80e4d914ff773390e376cd5 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 360fbe3221df6ff9e3982b9a5f3825c83eb90083..bee87c20f380b2ce8912931bfdb98b79c53f9f95 100644 +index e1b064c185ca5c4b125b583504e5d3a34ff9462f..29dd562a64494ba702b955802850917de05e483a 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -962,8 +962,7 @@ class Browser : public TabStripModelObserver, +@@ -964,8 +964,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -141,10 +141,10 @@ index ca72b324bf7c3b81ac94b53f0ff454d2df177950..d60ef3075d126e2bbd50c8469f2bf67c // The profile used for the presentation. raw_ptr otr_profile_; diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc -index 8d7b1b4e5bc85f5ffc7af5ee3464a85a03dd87de..2318e34306ff69d66169adb6aa5e7eafb9ab1079 100644 +index e4c31867e264c4f9aa2a451a934eda705826a1a3..f6325a210aec33aa63257bdf3bc542d845f3708e 100644 --- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc +++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc -@@ -81,8 +81,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView { +@@ -75,8 +75,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView { content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -155,10 +155,10 @@ index 8d7b1b4e5bc85f5ffc7af5ee3464a85a03dd87de..2318e34306ff69d66169adb6aa5e7eaf } content::WebContents* CreateCustomWebContents( diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc -index 304527502b623404865e4104f61a17c3ef2fb473..7ca1b5b5d0e1e905c857955d2391082a68fecc0f 100644 +index 4eb165e1f38e389d9d4e4495e630b7a67b010e95..7c93f3c1a4e351669eca4a58b992ba11f784499d 100644 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc -@@ -178,14 +178,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden( +@@ -180,14 +180,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -176,7 +176,7 @@ index 304527502b623404865e4104f61a17c3ef2fb473..7ca1b5b5d0e1e905c857955d2391082a java_gurl); } diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h -index 730da226f1928c87eac66d54551d6fa4223c5fe4..3ab029f9b7c10d6c26877ebbd09b9c0c0e80bbe0 100644 +index eb1ac072d3a032f7af5afc92aeef5c5415dce7a4..24f36918eda4c9197e45a811692c5027620602ed 100644 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.h +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h @@ -81,8 +81,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate { @@ -190,7 +190,7 @@ index 730da226f1928c87eac66d54551d6fa4223c5fe4..3ab029f9b7c10d6c26877ebbd09b9c0c void SetContentsBounds(content::WebContents* source, const gfx::Rect& bounds) override; diff --git a/components/offline_pages/content/background_loader/background_loader_contents.cc b/components/offline_pages/content/background_loader/background_loader_contents.cc -index d362823b92be29432b56c7576ea329be87bd6513..9b746a2811d278384267cc9dafe871b499414452 100644 +index 0f03e7eaa757b5445cdf4995d15085894d183259..722ae09871b40e765e738201259c49f05ef8597d 100644 --- a/components/offline_pages/content/background_loader/background_loader_contents.cc +++ b/components/offline_pages/content/background_loader/background_loader_contents.cc @@ -85,8 +85,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden( @@ -218,10 +218,10 @@ index c5b0d3b23b8da318ae55fcac2515a1187f261469..16ed1f46c9afde0ff25750128b4fcff6 void AddNewContents(content::WebContents* source, std::unique_ptr new_contents, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 330d6900e5e43a22ce554f7ceaa61d986a3c001e..610db0508667be62a13bb7f8453044cfe8fac028 100644 +index 92f2823839cdfd6139a7f13684d2649b7e230964..0a548b96a53454313fe0175a2fa3da7e7b92346f 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4519,8 +4519,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4619,8 +4619,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -232,7 +232,7 @@ index 330d6900e5e43a22ce554f7ceaa61d986a3c001e..610db0508667be62a13bb7f8453044cf static_cast(delegate_->CreateCustomWebContents( opener, source_site_instance, is_new_browsing_instance, diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc -index 2e6025fa3f4cecedb6c563eba887463aea634830..c01071e1a103e20ca8f55828a7e52c1b00c93e63 100644 +index fdd2c2be6bc8c75eacfd85d1b1e1531e4715f6a0..07f4b77b2be0d96df5e6412b84273ef26b3c0230 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -140,8 +140,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( @@ -246,10 +246,10 @@ index 2e6025fa3f4cecedb6c563eba887463aea634830..c01071e1a103e20ca8f55828a7e52c1b } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index a093cac4660c1a3c38fc0baccee40780e0ee47cf..31b59d35aa1ff0ef3aaa48e16484b799a5b0241b 100644 +index 579a796fcfdecf44ab415ceebc30b4278cda112b..bb327163cd414ec862be62aa1e41f17e96d62715 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h -@@ -334,8 +334,7 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -337,8 +337,7 @@ class CONTENT_EXPORT WebContentsDelegate { SiteInstance* source_site_instance, mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -260,10 +260,10 @@ index a093cac4660c1a3c38fc0baccee40780e0ee47cf..31b59d35aa1ff0ef3aaa48e16484b799 // Allow delegate to creates a custom WebContents when // WebContents::CreateNewWindow() is called. This function is only called diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc -index 1f0f61f33c28bee49d51acefad76da8f66f75b7c..e2e53c9f16a45fe24b50d897407adba57e744644 100644 +index 4b927979ca27d4795d2629c9cd39b766823214d1..5ddb8fabc05e30ef22a76a0b7508c69271d20d91 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc -@@ -221,8 +221,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( +@@ -218,8 +218,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -288,10 +288,10 @@ index 8389455426d35b2d356c897f0f069ef1b1cba9e4..fede03e3f7df8ff45b8b3b2937a41ad7 content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index d4391f44d75627ec7229184b84ba127ed4136d8e..db25aafc5e19ac0de7873141dd8a5451c97e6743 100644 +index fad08e33e16e4408a295c3c0b755e9e050f4b48f..23fb05dac66b271ad465d548167fbd6b0bf355d9 100644 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -@@ -392,8 +392,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( +@@ -389,8 +389,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -316,7 +316,7 @@ index f0b71aba6dfb4682ce2e5b4c834b2526dcacb75c..d4b1857ca468ff97914d91d0c31298b7 content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc -index 1568736f6617ba4017a575748133cd9090401d71..d720359a092f1d21cbc216132b648c3f8319894c 100644 +index 41e911c5e383eb85b461a14b3c0543922f6f25ad..32bd05155142aec16279d5ce2e0941583ea526c8 100644 --- a/fuchsia_web/webengine/browser/frame_impl.cc +++ b/fuchsia_web/webengine/browser/frame_impl.cc @@ -574,8 +574,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( @@ -344,10 +344,10 @@ index ab81b9e60cd6334b8342a83bbffc588d256b54c7..eca73c0305617e98cc10568de036c7e7 int opener_render_process_id, int opener_render_frame_id, diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc -index c9ba0256487325454f9cfd7d4905d3ac73e24189..4cf06fbf5cbc4db60ed343ac8caada391e6d992f 100644 +index 838b3b23a4e4486f9c2d1dd2daba56f72dd2d836..421dd09166f72172668bbf3ddb883a74ed44cb66 100644 --- a/headless/lib/browser/headless_web_contents_impl.cc +++ b/headless/lib/browser/headless_web_contents_impl.cc -@@ -188,8 +188,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { +@@ -190,8 +190,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -358,10 +358,10 @@ index c9ba0256487325454f9cfd7d4905d3ac73e24189..4cf06fbf5cbc4db60ed343ac8caada39 ->options() ->block_new_web_contents(); diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc -index 435002e18997ca7d6b660d617b7da0cf9450e653..91ef1006be0bd714f0c3078bce0d60fb86130d5f 100644 +index d591a652f875273f9fc1712b9ffa3f12fe4cfd57..b610fc386e9509e55528f70f9611f87fe33a6aac 100644 --- a/ui/views/controls/webview/web_dialog_view.cc +++ b/ui/views/controls/webview/web_dialog_view.cc -@@ -442,8 +442,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( +@@ -443,8 +443,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -372,10 +372,10 @@ index 435002e18997ca7d6b660d617b7da0cf9450e653..91ef1006be0bd714f0c3078bce0d60fb return delegate_->HandleShouldOverrideWebContentsCreation(); return false; diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h -index 4803ab17d0808c80fe4e5f85fcbe3db5a8d7990b..1b2434cb920abeb5d7909db6006cee2e092572a9 100644 +index e4dd6b6acab981a3c7f1bd354932cbf57281809e..a42e4aa7f8195130b7374272f01989754633a1b6 100644 --- a/ui/views/controls/webview/web_dialog_view.h +++ b/ui/views/controls/webview/web_dialog_view.h -@@ -166,8 +166,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView, +@@ -165,8 +165,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, diff --git a/patches/chromium/chore_remove_reference_to_chrome_browser_themes.patch b/patches/chromium/chore_remove_reference_to_chrome_browser_themes.patch new file mode 100644 index 000000000000..f6e46776e65f --- /dev/null +++ b/patches/chromium/chore_remove_reference_to_chrome_browser_themes.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: John Kleinschmidt +Date: Thu, 6 Jun 2024 16:19:05 -0400 +Subject: chore: remove reference to //chrome/browser/themes + +5573603: Modularize //chrome/browser/themes introduced dependencies +on chrome\browser\extensions\extension_service.cc which broke the +Windows build. Since we don't use Chromium custom themes we do +not need this dependency. + +refs https://chromium-review.googlesource.com/c/chromium/src/+/5573603 + +diff --git a/chrome/browser/ui/color/BUILD.gn b/chrome/browser/ui/color/BUILD.gn +index 7380de8a5fad817f92c00622abbef5746893b600..b00b4bd1cab9eda28904cbb2b93b9ec43f8c2dee 100644 +--- a/chrome/browser/ui/color/BUILD.gn ++++ b/chrome/browser/ui/color/BUILD.gn +@@ -85,9 +85,6 @@ source_set("mixers") { + ] + } + +- if (is_chromeos || is_linux || is_mac || is_win) { +- deps += [ "//chrome/browser/themes" ] +- } + } + + if (!is_ios && !is_android) { diff --git a/patches/chromium/command-ismediakey.patch b/patches/chromium/command-ismediakey.patch index 10f4fecbb6b2..e7e95c0eec8f 100644 --- a/patches/chromium/command-ismediakey.patch +++ b/patches/chromium/command-ismediakey.patch @@ -87,10 +87,10 @@ index 88bfc034f4bf8f54452ebea1aae88dc83feb148c..940fd488aad20f688d82718688549000 // Create an observer that registers a hot key for |accelerator|. std::unique_ptr observer = diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc -index 330247488fcdffe3836134fb5a69e60a6123fdc4..41ee109692b7f35c6d35642daa534d95ce807e74 100644 +index 7fd996826e7968268df8184451ead9f5f0bfc23b..6f8d1243fe6b1c6dd83371ad4ff2e2d8ad6c865e 100644 --- a/content/browser/media/media_keys_listener_manager_impl.cc +++ b/content/browser/media/media_keys_listener_manager_impl.cc -@@ -405,6 +405,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() { +@@ -408,6 +408,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() { case ui::VKEY_MEDIA_STOP: browser_system_media_controls_->SetIsStopEnabled(should_enable); break; @@ -100,9 +100,9 @@ index 330247488fcdffe3836134fb5a69e60a6123fdc4..41ee109692b7f35c6d35642daa534d95 + // Do nothing. + break; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); } -@@ -447,6 +452,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() { +@@ -450,6 +455,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() { case ui::VKEY_MEDIA_STOP: smc->SetIsStopEnabled(should_enable); break; @@ -112,7 +112,7 @@ index 330247488fcdffe3836134fb5a69e60a6123fdc4..41ee109692b7f35c6d35642daa534d95 + // Do nothing. + break; default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); } diff --git a/ui/base/accelerators/media_keys_listener.cc b/ui/base/accelerators/media_keys_listener.cc index db596585cbb44b3710636e3fc013f288966f604f..6d5557ee1a2c35ee15e695e024834184a525e2a7 100644 diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index ea0371ce426d..051963cb79fe 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -89,10 +89,10 @@ index 171095381e8acff07ae29531537cdadf76b2c462..8963eade0da26f1494ed26e4b6001f37 annotations, arguments, false, false)); } else { diff --git a/components/crash/core/app/crashpad_mac.mm b/components/crash/core/app/crashpad_mac.mm -index eb5bcfe0234c39526d6d162434476fe9e32d8184..8480d07e2607eb3c8c16b54a02077c0454d11fce 100644 +index 42fe73aefe44f218d6a5e8cb1550ff48859c4b70..a1235f0c7ad44ae9c9fdc805af5b9dc5669f5aad 100644 --- a/components/crash/core/app/crashpad_mac.mm +++ b/components/crash/core/app/crashpad_mac.mm -@@ -87,6 +87,8 @@ +@@ -86,6 +86,8 @@ } // @autoreleasepool return process_annotations; }(); @@ -101,7 +101,7 @@ index eb5bcfe0234c39526d6d162434476fe9e32d8184..8480d07e2607eb3c8c16b54a02077c04 return annotations; } -@@ -157,6 +159,13 @@ bool PlatformCrashpadInitialization( +@@ -156,6 +158,13 @@ bool PlatformCrashpadInitialization( std::vector arguments; diff --git a/patches/chromium/crashpad_pid_check.patch b/patches/chromium/crashpad_pid_check.patch index 6790925e8048..d84903bc070e 100644 --- a/patches/chromium/crashpad_pid_check.patch +++ b/patches/chromium/crashpad_pid_check.patch @@ -16,10 +16,10 @@ https://github.com/electron/electron/pull/18483#discussion_r292703588 https://github.com/electron/electron/pull/18483#issuecomment-501090683 diff --git a/third_party/crashpad/crashpad/util/win/exception_handler_server.cc b/third_party/crashpad/crashpad/util/win/exception_handler_server.cc -index e641c7fb944114efdd376b2b5d6c3791669ab5dd..df252a42078b19e8423e037e1a5b6eb1a44321ec 100644 +index 8af53a62b088fececd558f1436a84d4c2c4feabd..7d9913ae189708475c08d123a404eb5b125ecccc 100644 --- a/third_party/crashpad/crashpad/util/win/exception_handler_server.cc +++ b/third_party/crashpad/crashpad/util/win/exception_handler_server.cc -@@ -447,9 +447,16 @@ bool ExceptionHandlerServer::ServiceClientConnection( +@@ -448,9 +448,16 @@ bool ExceptionHandlerServer::ServiceClientConnection( DWORD real_pid = 0; if (get_named_pipe_client_process_id(service_context.pipe(), &real_pid) && message.registration.client_process_id != real_pid) { diff --git a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch index a9b5dd31f0c6..c681dd51ed2b 100644 --- a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch +++ b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch @@ -7,7 +7,7 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 428dc65029daed374e82348f12ae06e2e4368097..cb55bd15cbe7400120addd998ff17a7d048cfcab 100644 +index a9b2453b377ec6bc7ed856991ad29d9f38d382d3..f7ef6faa8c66d17a9e7ce268cdfe6fb700fe4d05 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc @@ -40,6 +40,7 @@ @@ -18,7 +18,7 @@ index 428dc65029daed374e82348f12ae06e2e4368097..cb55bd15cbe7400120addd998ff17a7d #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/task/single_thread_task_runner.h" -@@ -255,8 +256,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) { +@@ -262,8 +263,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) { #endif @@ -33,7 +33,7 @@ index 428dc65029daed374e82348f12ae06e2e4368097..cb55bd15cbe7400120addd998ff17a7d #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) base::FileDescriptorStore& file_descriptor_store = base::FileDescriptorStore::GetInstance(); -@@ -285,11 +291,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, +@@ -292,11 +298,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, #endif // V8_USE_EXTERNAL_STARTUP_DATA @@ -48,7 +48,7 @@ index 428dc65029daed374e82348f12ae06e2e4368097..cb55bd15cbe7400120addd998ff17a7d #endif // V8_USE_EXTERNAL_STARTUP_DATA } -@@ -973,7 +980,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { +@@ -972,7 +979,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { return TerminateForFatalInitializationError(); #endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE) @@ -58,7 +58,7 @@ index 428dc65029daed374e82348f12ae06e2e4368097..cb55bd15cbe7400120addd998ff17a7d blink::TrialTokenValidator::SetOriginTrialPolicyGetter( base::BindRepeating([]() -> blink::OriginTrialPolicy* { diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc -index 9d271e5f4e366755e37367b51c4df43f780270b5..17dadba9fdf0f0d29220b2e1ef80a5987b8d1d19 100644 +index a5762a7ed48bb841a9a8a219f08e2f6703bd777a..a3905996445e1cb0d566cad31c409b5dd82e8365 100644 --- a/content/public/app/content_main_delegate.cc +++ b/content/public/app/content_main_delegate.cc @@ -5,6 +5,7 @@ @@ -69,7 +69,7 @@ index 9d271e5f4e366755e37367b51c4df43f780270b5..17dadba9fdf0f0d29220b2e1ef80a598 #include "build/build_config.h" #include "content/public/browser/content_browser_client.h" #include "content/public/common/content_client.h" -@@ -87,6 +88,10 @@ std::optional ContentMainDelegate::PostEarlyInitialization( +@@ -91,6 +92,10 @@ std::optional ContentMainDelegate::PostEarlyInitialization( return std::nullopt; } @@ -81,7 +81,7 @@ index 9d271e5f4e366755e37367b51c4df43f780270b5..17dadba9fdf0f0d29220b2e1ef80a598 return new ContentClient(); } diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h -index 2b0919b9a56bd37a398109777dfd199d777a9f74..823f44ab0303ccd6c7502ec65560ddb555b551e7 100644 +index f482ce44b4339e0cf2a57a6a4f9db4d1be5fa178..d6fd25ccd747a7a0620f103cb0f101d3137348fa 100644 --- a/content/public/app/content_main_delegate.h +++ b/content/public/app/content_main_delegate.h @@ -10,6 +10,7 @@ @@ -92,7 +92,7 @@ index 2b0919b9a56bd37a398109777dfd199d777a9f74..823f44ab0303ccd6c7502ec65560ddb5 #include "build/build_config.h" #include "content/common/content_export.h" #include "content/public/common/main_function_params.h" -@@ -168,6 +169,8 @@ class CONTENT_EXPORT ContentMainDelegate { +@@ -176,6 +177,8 @@ class CONTENT_EXPORT ContentMainDelegate { virtual bool ShouldHandleConsoleControlEvents(); #endif @@ -102,10 +102,10 @@ index 2b0919b9a56bd37a398109777dfd199d777a9f74..823f44ab0303ccd6c7502ec65560ddb5 friend class ContentClientCreator; friend class ContentClientInitializer; diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index fffa83247d337d7c920526af5e2dddeae7451062..62346a75e982271076b84b89557bea9270311f5b 100644 +index 1202c8e3e86d18212609a63ac94aa41c9318f5ee..c72515482c339758537ce068a8493901f35246aa 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -584,8 +584,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out, +@@ -585,8 +585,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out, #if defined(V8_USE_EXTERNAL_STARTUP_DATA) @@ -115,7 +115,7 @@ index fffa83247d337d7c920526af5e2dddeae7451062..62346a75e982271076b84b89557bea92 if (g_mapped_snapshot) { // TODO(crbug.com/40558459): Confirm not loading different type of snapshot // files in a process. -@@ -594,10 +593,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) { +@@ -595,10 +594,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) { base::MemoryMappedFile::Region file_region; base::File file = diff --git a/patches/chromium/custom_protocols_plzserviceworker.patch b/patches/chromium/custom_protocols_plzserviceworker.patch index 90ab6fb3429a..35c73357321d 100644 --- a/patches/chromium/custom_protocols_plzserviceworker.patch +++ b/patches/chromium/custom_protocols_plzserviceworker.patch @@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511 diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc -index 7fe97ee6ccdea41b6689ffa8e35779fb788d6654..79dcb2a11d4cce92756702067c1ac63ac16dcc0c 100644 +index d05bf1f172378351b15f1dd5412a2e3eac2373ac..544b53a99990385d6bc45368843e89050c7b8d31 100644 --- a/content/browser/service_worker/service_worker_context_wrapper.cc +++ b/content/browser/service_worker/service_worker_context_wrapper.cc -@@ -2003,6 +2003,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -2006,6 +2006,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( loader_factory_bundle_info = context()->loader_factory_bundle_for_update_check()->Clone(); @@ -38,7 +38,7 @@ index 7fe97ee6ccdea41b6689ffa8e35779fb788d6654..79dcb2a11d4cce92756702067c1ac63a if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig( browser_context(), scope)) { // If this is a Service Worker for a WebUI, the WebUI's URLDataSource -@@ -2022,9 +2042,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -2025,9 +2045,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( features::kEnableServiceWorkersForChromeScheme) && scope.scheme_piece() == kChromeUIScheme) { config->RegisterURLDataSource(browser_context()); @@ -49,7 +49,7 @@ index 7fe97ee6ccdea41b6689ffa8e35779fb788d6654..79dcb2a11d4cce92756702067c1ac63a .emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory( browser_context(), kChromeUIScheme, base::flat_set())); -@@ -2032,9 +2050,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -2035,9 +2053,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( features::kEnableServiceWorkersForChromeUntrusted) && scope.scheme_piece() == kChromeUIUntrustedScheme) { config->RegisterURLDataSource(browser_context()); diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 2166533e7b43..76e1cba8c7c0 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -22,7 +22,7 @@ index 904c3a99c7d9ab7ffccf2de596950438b2225502..7a879b2f5332f98927c5e3858dd31c5d virtual int GetSourceCount() const = 0; virtual const Source& GetSource(int index) const = 0; diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc -index 0389599ac786b6abd61ca921347fe12ddd5d0ee7..780927301744ea7312f230cec76a24a33d71f767 100644 +index 21c713b3b0f8efb17d704cd460ded4a5b15c52e4..d9943ec17ccec0220d4601ea8242ec3a9d8ba5be 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.cc +++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc @@ -69,12 +69,12 @@ void DesktopMediaListBase::StartUpdating(DesktopMediaListObserver* observer) { @@ -82,7 +82,7 @@ index afc2cf89299315cca68b50196c2377a7d474883d..52bfd487d501ef895915800b9ee83a5b const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index a3eabf92a33b15c7eaf04468f2f684b72890aafb..7a0390f2d86b334710dee16a54b9d43889d78211 100644 +index 0ac5817b7e7839cae9caf0680fc128eb88ce95df..f03e7962617111d71c5e6f4ee684805f3da945de 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc @@ -171,7 +171,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) { diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 1b0e90766a87..f87dec1da884 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,7 +6,7 @@ Subject: fix: disabling compositor recycling Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index bc878e003e17247f2255f28d41b6419034e58cae..ee653d270d37e902c604857f51418cbbe1cba0ce 100644 +index 679c9e92ef3f8e984e8cc4d6b99afbbf33383e8b..d229d1cc25e61f8934eb00cceb15c4e6cfc84782 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -557,7 +557,11 @@ diff --git a/patches/chromium/disable_freezing_flags_after_init_in_node.patch b/patches/chromium/disable_freezing_flags_after_init_in_node.patch index 992811dd4365..8889b3eeb6c8 100644 --- a/patches/chromium/disable_freezing_flags_after_init_in_node.patch +++ b/patches/chromium/disable_freezing_flags_after_init_in_node.patch @@ -15,10 +15,10 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor node initialization to not update flags after V8 initialization. diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc -index 5cb5a8cf9f04a236595465b8edee1410856991b3..96889f6f20f88e06a5a259cab33663cf770a5643 100644 +index 26df0cfa88e83685c1d37654fe329b9c11227dc4..375f48cd3bd2df034b45cc583ea2724bbdd62756 100644 --- a/content/renderer/render_process_impl.cc +++ b/content/renderer/render_process_impl.cc -@@ -208,6 +208,9 @@ RenderProcessImpl::RenderProcessImpl() +@@ -204,6 +204,9 @@ RenderProcessImpl::RenderProcessImpl() v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag)); } diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 3ae2ffea4b67..d9a7ea233477 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 a8c0e6c5efd05d155aa6d75c262e390ae9678a5e..d067f0ba15c1898707bd039c19996c8850c7aa72 100644 +index 14df0bd5469f099b328639d0849c21c1403bb5ce..3452aa6a281f2a97c2708d66fd4aa7e2bce1e1f9 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() { +@@ -775,6 +775,9 @@ void RenderWidgetHostImpl::WasHidden() { return; } @@ -20,10 +20,10 @@ index a8c0e6c5efd05d155aa6d75c262e390ae9678a5e..d067f0ba15c1898707bd039c19996c88 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 eb47f35e81ed6fd40cec6958d3f9d90b8ff27cdf..cb6143026ce0e8f56bbf09cd3779e34470e0ba3c 100644 +index 1d9eab0ed2ef26754f7bc07cdefed76a81b15d9b..ed2c41fdd25210398ebb948e7d83bad44a4bcb76 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -915,6 +915,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -923,6 +923,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl void UpdateBrowserControlsState(cc::BrowserControlsState constraints, cc::BrowserControlsState current, bool animate); @@ -33,10 +33,10 @@ index eb47f35e81ed6fd40cec6958d3f9d90b8ff27cdf..cb6143026ce0e8f56bbf09cd3779e344 void StartDragging(blink::mojom::DragDataPtr drag_data, const url::Origin& source_origin, 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 f7fc6dd0f3aff0394efd4be03e88500e2020ab7e..ef10eb9f456f7e16566d22c9c5d674f03016585b 100644 +index 1d00ea327805ddb5a5df506125d1e4fa19229a1a..deaa2c34322f764f3ae8e854b98a205ef6a7e834 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -628,7 +628,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -634,7 +634,7 @@ void RenderWidgetHostViewAura::HideImpl() { CHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index 80385cad6831..446d1c5d5335 100644 --- a/patches/chromium/disable_unload_metrics.patch +++ b/patches/chromium/disable_unload_metrics.patch @@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we should continue seeking for a real fix. diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc -index 4daa43b71dab4e0ffb743b26ab37c24f94ac3bce..34b4127e48bf0c9a9069279c2e90bf7167eb2902 100644 +index 5c1702ff0ffc3cc0f6f68d7ba3a13e5a0fd62d78..0a71f7770651377d8db21561581471ce27118644 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1326,6 +1326,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1329,6 +1329,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index 4daa43b71dab4e0ffb743b26ab37c24f94ac3bce..34b4127e48bf0c9a9069279c2e90bf71 // If this is a same-process navigation and we have timestamps for unload // durations, fill those metrics out as well. if (params.unload_start && params.unload_end && -@@ -1375,6 +1376,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1378,6 +1379,7 @@ void Navigator::RecordNavigationMetrics( first_before_unload_start_time) .InMilliseconds()); } diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index ccd6214592f7..47083d1b849a 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0 Make SetAspectRatio accept 0 as valid input, which would reset to null. diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index 8bbe240aefab39ff502ff52dae3b51a583f4be7f..f1a1dcead614367dfee39dce22e30e386d9d2054 100644 +index 288a76d86ed878ee7a5edc0579ffe139700a3639..baa087ba8f78f79a47e71bf7c85c830b040592a7 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -576,7 +576,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { +@@ -581,7 +581,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { void DesktopWindowTreeHostWin::SetAspectRatio( const gfx::SizeF& aspect_ratio, const gfx::Size& excluded_margin) { @@ -19,7 +19,7 @@ index 8bbe240aefab39ff502ff52dae3b51a583f4be7f..f1a1dcead614367dfee39dce22e30e38 excluded_margin); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index b09ecb6a116289bcf38bd5fed036cb7d8e0065e2..332904acd679c544c7c482a09527ab4d6106f3ff 100644 +index 3bfc5b22579083c0aa7fe126e03701012d2a140c..bdc9916d0668a1508dc497079f0a8caedb594f82 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -965,8 +965,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen, diff --git a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch index b0e41a795866..ddccee5a9335 100644 --- a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch +++ b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch @@ -9,7 +9,7 @@ correctly tagged with MAP_JIT we need to use gins page allocator instead of the default V8 allocator. This probably can't be usptreamed. diff --git a/gin/public/v8_platform.h b/gin/public/v8_platform.h -index cec5e3b283343586ba846a4ce58fee34e8542164..09ec66b75113d6a934d51ee5aad684281be61e8f 100644 +index a9e7ef6077b3762e58a505efea6fc7dc64c698c2..98a6f8852dc9dbe4e59e007fb608aa46da00d0ea 100644 --- a/gin/public/v8_platform.h +++ b/gin/public/v8_platform.h @@ -32,6 +32,7 @@ class GIN_EXPORT V8Platform : public v8::Platform { @@ -17,16 +17,16 @@ index cec5e3b283343586ba846a4ce58fee34e8542164..09ec66b75113d6a934d51ee5aad68428 // verified in the tests for gin::PageAllocator. PageAllocator* GetPageAllocator() override; + static PageAllocator* GetCurrentPageAllocator(); - #if BUILDFLAG(ENABLE_THREAD_ISOLATION) + #if PA_BUILDFLAG(ENABLE_THREAD_ISOLATION) ThreadIsolatedAllocator* GetThreadIsolatedAllocator() override; #endif diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc -index 0a445ec921d6a81e8d5972215a5928e368a555eb..339554921d00f79cc92f3a40443f8f5d3cee1829 100644 +index c8e4a42a0845dcfc3692506785bbb60312d9b727..186c41bb9e8add88279d968905c480396ecfa234 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc -@@ -336,6 +336,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() { +@@ -205,6 +205,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() { } - #endif // BUILDFLAG(ENABLE_THREAD_ISOLATION) + #endif // PA_BUILDFLAG(ENABLE_THREAD_ISOLATION) +PageAllocator* V8Platform::GetCurrentPageAllocator() { + return g_page_allocator.Pointer(); diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 08faae0160b9..ba007582f9dc 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4 } // namespace net diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index d69d9674d121db2775a2b3bc99940871b53a0520..dc278290eda14fd30bfa1c0dbb045f801aa8f344 100644 +index 50650759734c7ef4d683d61560caba01da6aa113..4c766a23c03350b7056c27070b79beacb07e94d4 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1621,6 +1621,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1671,6 +1671,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index d69d9674d121db2775a2b3bc99940871b53a0520..dc278290eda14fd30bfa1c0dbb045f80 // 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 62e543ca0eca806d939949573c9bddc172be4f6c..f40838545452b4ea16112165930d5b1d0082faf2 100644 +index 004354b6a74023adebc041c2f40d8989eb9f0a05..106567ae61d404ee20d552bd51caeea1f830aba7 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -315,6 +315,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -319,6 +319,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CloseIdleConnections(CloseIdleConnectionsCallback callback) override; void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override; @@ -63,7 +63,7 @@ index 62e543ca0eca806d939949573c9bddc172be4f6c..f40838545452b4ea16112165930d5b1d void SetEnableReferrers(bool enable_referrers) override; #if BUILDFLAG(IS_CT_SUPPORTED) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index d5e579e9a794a3a9ffab915d6b12ef75f80eee6b..bc2771eb8a9ad2d37dd93b469a944c202e731d60 100644 +index 6b868b5744f0250d2a566051d26d746a19a26177..3b58a45343e07a013a5d9ae759696502453c68c6 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -1266,6 +1266,9 @@ interface NetworkContext { @@ -77,7 +77,7 @@ index d5e579e9a794a3a9ffab915d6b12ef75f80eee6b..bc2771eb8a9ad2d37dd93b469a944c20 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index a832e3146baea73b77c6ca01a1f5354dbfe1c395..4a1130fac1845cbcd8fb9005159027c50b9a884f 100644 +index db21e3f02b3e0fecf4c2c494afe4d806170be3f1..d0175513938d3307662e95e20bc1f703aeaaa2cb 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h @@ -147,6 +147,7 @@ class TestNetworkContext : public mojom::NetworkContext { diff --git a/patches/chromium/expose_webblob_path_to_allow_embedders_to_get_file_paths.patch b/patches/chromium/expose_webblob_path_to_allow_embedders_to_get_file_paths.patch index 7453969a75d9..315b910d2eea 100644 --- a/patches/chromium/expose_webblob_path_to_allow_embedders_to_get_file_paths.patch +++ b/patches/chromium/expose_webblob_path_to_allow_embedders_to_get_file_paths.patch @@ -18,7 +18,7 @@ index 384a59138db11ea38028f844dd67e328ebffbe7b..f153997c2afccef1fa1b64ee5f162c28 bool IsNull() const { return private_.IsNull(); } diff --git a/third_party/blink/renderer/core/exported/web_blob.cc b/third_party/blink/renderer/core/exported/web_blob.cc -index f10a9bf39de576dfdf97d9c14447cd0de2026b89..3decbdfad72f4a08d6039555f269bcd94a47c053 100644 +index 0293e21ff874b0ea009f70820896612c1397b2b0..3eb262777b4b80e2fc74b8f4c840f7e25e68e08e 100644 --- a/third_party/blink/renderer/core/exported/web_blob.cc +++ b/third_party/blink/renderer/core/exported/web_blob.cc @@ -41,6 +41,7 @@ diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 69522f85d994..552b13db456e 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -12,10 +12,10 @@ Ideally we could add an embedder observer pattern here but that can be done in future work. diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index 092e56e95c1e35a3a47c6e4d15d84d221a0278a2..2b6c1a2db5958ec1a16013d8dcd0cac49b825e74 100644 +index 5b33d4cebaa04f11c2e9f0cfffb4fbb8fd40e324..6ba638d19b24013d9b92965f234902d019525143 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -167,6 +167,7 @@ +@@ -168,6 +168,7 @@ #include "third_party/blink/renderer/core/view_transition/view_transition_supplement.h" #include "third_party/blink/renderer/platform/fonts/font_cache.h" #include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h" @@ -23,7 +23,7 @@ index 092e56e95c1e35a3a47c6e4d15d84d221a0278a2..2b6c1a2db5958ec1a16013d8dcd0cac4 #include "third_party/blink/renderer/platform/graphics/image.h" #include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h" -@@ -1807,6 +1808,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1810,6 +1811,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); diff --git a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch index ef00a47c4ed5..a7b5f12e1057 100644 --- a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch +++ b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch @@ -63,7 +63,7 @@ index 31f5b160e4cd755cfb56a62b04261ee1bee80277..8dbc5ac458481d2f805f90101069f02a #if BUILDFLAG(IS_WIN) bool EscapeVirtualization(const base::FilePath& user_data_dir); diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 298c9c81fa110ad7900d0bd6822136bb57f0382e..f662580a6fc23d06c5e4795d5e7d41e788c8f90d 100644 +index 2205fa3ee2bd2611bad0594680a7cdee270f4f5e..b013b39c3278d539e4238fba1b143bac00c778f3 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -610,6 +610,7 @@ class ProcessSingleton::LinuxWatcher 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 b142adc4a7ff..1d3faf4ba1da 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 @@ -26,10 +26,10 @@ index f62df6eb7d12b9decea1b3c0f29f557aa0ccddac..c977daee5622f67013a52dc4e77a6fe4 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index 5a8e817d2611bc9d82f2f9207616d03f7a4f8592..c944b4ea0cfceccf58f0a1f56b64ffc3d86be30a 100644 +index fc32dfb0de44f0c174012c535dc8f06656795d5c..7011061bc8a64979cda3c558dff98aa4e3f84660 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -444,6 +444,23 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -434,6 +434,23 @@ class NATIVE_THEME_EXPORT NativeTheme { scoped_refptr custom_theme, bool use_custom_frame = true) const; @@ -53,7 +53,7 @@ index 5a8e817d2611bc9d82f2f9207616d03f7a4f8592..c944b4ea0cfceccf58f0a1f56b64ffc3 // Returns a shared instance of the native theme that should be used for web // rendering. Do not use it in a normal application context (i.e. browser). // The returned object should not be deleted by the caller. This function is -@@ -666,6 +683,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -656,6 +673,7 @@ class NATIVE_THEME_EXPORT NativeTheme { PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight; PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference; std::optional caret_blink_interval_; @@ -62,10 +62,10 @@ index 5a8e817d2611bc9d82f2f9207616d03f7a4f8592..c944b4ea0cfceccf58f0a1f56b64ffc3 SEQUENCE_CHECKER(sequence_checker_); }; diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index 547872076d126fe963650a74c0b8a72420c725a8..81f9904ac296351f9237376b79c0436050dcf98b 100644 +index b5bdcf72d8b337b53dc3adbc579b9701e649cd7d..063014273fb23544518873887283a664cb13e396 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc -@@ -675,6 +675,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { +@@ -677,6 +677,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { // ...unless --force-dark-mode was specified in which case caveat emptor. if (InForcedColorsMode() && !IsForcedDarkMode()) return false; diff --git a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch index c9949c8e0c8f..456f0d7e471e 100644 --- a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch +++ b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch @@ -13,10 +13,10 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass then refers to the list so that it can correctly determine the data source's settings. diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -index d7e736b32c66c2e6a3acb6755ce620fcfc041e44..589072f4c7551a4290c554a38603dc54b06183f7 100644 +index fefae60e6d53cd18368e27c2c76ef936e5d9fb5b..534b57c20c9fbfbd90234787ac16a67ff18474e7 100644 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -@@ -12,8 +12,10 @@ +@@ -13,8 +13,10 @@ #include "base/functional/callback_helpers.h" #include "base/location.h" #include "base/memory/raw_ptr.h" @@ -27,7 +27,7 @@ index d7e736b32c66c2e6a3acb6755ce620fcfc041e44..589072f4c7551a4290c554a38603dc54 #include "media/base/media_log.h" #include "net/base/net_errors.h" #include "third_party/blink/renderer/platform/media/buffered_data_source_host_impl.h" -@@ -62,8 +64,20 @@ const int kUpdateBufferSizeFrequency = 32; +@@ -63,8 +65,20 @@ const int kUpdateBufferSizeFrequency = 32; // How long to we delay a seek after a read? constexpr base::TimeDelta kSeekDelay = base::Milliseconds(20); @@ -48,7 +48,7 @@ index d7e736b32c66c2e6a3acb6755ce620fcfc041e44..589072f4c7551a4290c554a38603dc54 class MultiBufferDataSource::ReadOperation { public: ReadOperation() = delete; -@@ -155,7 +169,14 @@ bool MultiBufferDataSource::media_has_played() const { +@@ -156,7 +170,14 @@ bool MultiBufferDataSource::media_has_played() const { bool MultiBufferDataSource::AssumeFullyBuffered() const { DCHECK(url_data_); @@ -63,12 +63,20 @@ index d7e736b32c66c2e6a3acb6755ce620fcfc041e44..589072f4c7551a4290c554a38603dc54 + return true; } - void MultiBufferDataSource::SetReader(MultiBufferReader* reader) { + void MultiBufferDataSource::SetReader( diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h -index faad2219254615fedba155c41598478026190788..f1e8feb1f235faed58f76346622eaa22f5a351f4 100644 +index 5277d480ce3ac065501a986b323e8f3a983acd75..6666dd87cd8971c7ed05a4bc141e19b9be549e54 100644 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h -@@ -34,6 +34,8 @@ namespace blink { +@@ -17,6 +17,7 @@ + #include "media/base/data_source.h" + #include "media/base/ranges.h" + #include "media/base/tuneable.h" ++#include "third_party/blink/public/platform/web_common.h" + #include "third_party/blink/renderer/platform/media/url_index.h" + #include "third_party/blink/renderer/platform/platform_export.h" + #include "third_party/blink/renderer/platform/wtf/vector.h" +@@ -34,6 +35,8 @@ namespace blink { class BufferedDataSourceHost; class MultiBufferReader; diff --git a/patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch b/patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch index 48ec6a683c04..07cfe5a1cf29 100644 --- a/patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch +++ b/patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch @@ -11,7 +11,7 @@ This CL adds support for the following features to //shell_dialogs: This may be partially upstreamed to Chromium in the future. diff --git a/ui/gtk/select_file_dialog_linux_gtk.cc b/ui/gtk/select_file_dialog_linux_gtk.cc -index ce5fbf687698f453053e7e8accd66a9da7b206b1..fb2f3ce9ff3582ae7ee48e0fae80467bbbd981a9 100644 +index 129979e844581e68fdecde87bd52f3344f88022a..5e02a36e5e9eb4db84700dd9a0b8765dec18c236 100644 --- a/ui/gtk/select_file_dialog_linux_gtk.cc +++ b/ui/gtk/select_file_dialog_linux_gtk.cc @@ -243,6 +243,10 @@ void SelectFileDialogLinuxGtk::SelectFileImpl( diff --git a/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch b/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch index 27fa4597d9ff..029d2e54cec5 100644 --- a/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch +++ b/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch @@ -9,7 +9,7 @@ production use cases. This is unlikely to be upstreamed as the change is entirely in //chrome. diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc -index ffe938282a33e18fc1fe854d9079e3a133a73ee7..d918dec133eeba5563c0ff186c496a797f6bc38c 100644 +index 6ac76182e6a5b51ed164b1068aadb28029c4f6d4..81a637fce1e1863e1f5723a87be5593625b9d008 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc @@ -14,6 +14,7 @@ diff --git a/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch b/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch index f98014e411cc..a5aa065623f2 100644 --- a/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch +++ b/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch @@ -9,7 +9,7 @@ embedders to make custom schemes allow V8 code cache. Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/5019665 diff --git a/content/browser/code_cache/generated_code_cache.cc b/content/browser/code_cache/generated_code_cache.cc -index 8fc176cfd3a0411521c0f5e4f60b70ca333f60c8..e43f09d80bc9472a027bb11325803aab42b051a2 100644 +index a9e025b1d611c3becb983a77d20fc03da2418293..d04e399638116fef5f2b15b6510157d3a878723a 100644 --- a/content/browser/code_cache/generated_code_cache.cc +++ b/content/browser/code_cache/generated_code_cache.cc @@ -7,6 +7,7 @@ @@ -407,11 +407,11 @@ index 9dc2d5a33858da7c31fd87bbbabe3899301fa52d..ebf0bb23b9aedb7bf9eb8af52b4756db std::vector extension_schemes; // Registers a URL scheme with a predefined default custom handler. diff --git a/url/url_util.cc b/url/url_util.cc -index 16538750e1d151bbe3fd739303a4927416297221..412177467d1b3ce53ab5981c4ae7e590fd5a1f67 100644 +index 301824a7f83e9e7057279723eccd6c9c9ad44618..25e7e087e2ddf0e8fab1cd6f20a56790f7e406b2 100644 --- a/url/url_util.cc +++ b/url/url_util.cc -@@ -115,6 +115,9 @@ struct SchemeRegistry { - kAboutScheme, +@@ -133,6 +133,9 @@ struct SchemeRegistry { + kMaterializedViewScheme, }; + // Embedder schemes that have V8 code cache enabled in js and wasm scripts. @@ -420,7 +420,7 @@ index 16538750e1d151bbe3fd739303a4927416297221..412177467d1b3ce53ab5981c4ae7e590 // Schemes with a predefined default custom handler. std::vector predefined_handler_schemes; -@@ -682,6 +685,15 @@ const std::vector& GetEmptyDocumentSchemes() { +@@ -714,6 +717,15 @@ const std::vector& GetEmptyDocumentSchemes() { return GetSchemeRegistry().empty_document_schemes; } diff --git a/patches/chromium/feat_configure_launch_options_for_service_process.patch b/patches/chromium/feat_configure_launch_options_for_service_process.patch index 6db92a8a0e5b..56a573916872 100644 --- a/patches/chromium/feat_configure_launch_options_for_service_process.patch +++ b/patches/chromium/feat_configure_launch_options_for_service_process.patch @@ -84,7 +84,7 @@ index 31a2a14a95540477297943df9b09b1e4659a884d..c02a81b1bd14a300dbbb47ad7aac2d2d DCHECK(GetZygoteForLaunch()); // Environment variables could be supported in the future, but are not diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc -index e1c5d814236d306e427dc5f1bab3405c0fb4dd7e..bc991a819e20d586431115e530c44a83b231eb45 100644 +index 24f86e68b2df0a084ae2151d5cd14a356d067f94..c424edfb7c65b9c5ae542a405446f0c15fce8995 100644 --- a/content/browser/child_process_launcher_helper_mac.cc +++ b/content/browser/child_process_launcher_helper_mac.cc @@ -123,7 +123,8 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( @@ -97,7 +97,7 @@ index e1c5d814236d306e427dc5f1bab3405c0fb4dd7e..bc991a819e20d586431115e530c44a83 options->disclaim_responsibility = delegate_->DisclaimResponsibility(); options->enable_cpu_security_mitigations = delegate_->EnableCpuSecurityMitigations(); -@@ -187,6 +188,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( +@@ -193,6 +194,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( base::StringPrintf("%s%d", sandbox::switches::kSeatbeltClient, pipe)); } @@ -184,7 +184,7 @@ index be6402b33d7e0e2aab7cbb2844ba4600a166e7a9..642f8b6da39615d1c68584ff18fc57ce host->GetChildProcess()->BindServiceInterface(std::move(receiver)); } diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc -index 4bb24555db8061318a25e02590618d5557383dd5..c564b64f25c3c2bf87ed5a93b0ce601d73aab177 100644 +index 7e82cd311a6286475d149310ecd492f6114e2ba8..38bd3928ecfca0cdd47b6f91735e85a4bfbdc661 100644 --- a/content/browser/utility_process_host.cc +++ b/content/browser/utility_process_host.cc @@ -178,11 +178,13 @@ const ChildProcessData& UtilityProcessHost::GetData() { @@ -228,7 +228,7 @@ index 4bb24555db8061318a25e02590618d5557383dd5..c564b64f25c3c2bf87ed5a93b0ce601d mojom::ChildProcess* UtilityProcessHost::GetChildProcess() { return static_cast(process_->GetHost()) ->child_process(); -@@ -438,9 +458,22 @@ bool UtilityProcessHost::StartProcess() { +@@ -437,9 +457,22 @@ bool UtilityProcessHost::StartProcess() { } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) @@ -628,10 +628,10 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8 #if BUILDFLAG(IS_MAC) // Whether or not to disclaim TCC responsibility for the process, defaults to diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc -index d8d0cafa87f305fa2fab28ab582e3fa9c360bd71..ede9c798615f4f4c77de56d9d4e20a939bf0665c 100644 +index 3354330593ebcd1a9cb2f444977b37e9f79b9d90..0b38d2e5b70a0c5bb09fd003f340a52bf39e0eb4 100644 --- a/sandbox/policy/win/sandbox_win.cc +++ b/sandbox/policy/win/sandbox_win.cc -@@ -763,11 +763,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() { +@@ -765,11 +765,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() { // command line flag. ResultCode LaunchWithoutSandbox( const base::CommandLine& cmd_line, @@ -644,7 +644,7 @@ index d8d0cafa87f305fa2fab28ab582e3fa9c360bd71..ede9c798615f4f4c77de56d9d4e20a93 // Network process runs in a job even when unsandboxed. This is to ensure it // does not outlive the browser, which could happen if there is a lot of I/O // on process shutdown, in which case TerminateProcess can fail. See -@@ -998,7 +996,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) { +@@ -1000,7 +998,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) { ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( const base::CommandLine& cmd_line, const std::string& process_type, @@ -653,7 +653,7 @@ index d8d0cafa87f305fa2fab28ab582e3fa9c360bd71..ede9c798615f4f4c77de56d9d4e20a93 SandboxDelegate* delegate, TargetPolicy* policy) { const base::CommandLine& launcher_process_command_line = -@@ -1012,7 +1010,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -1014,7 +1012,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( } // Add any handles to be inherited to the policy. @@ -662,7 +662,7 @@ index d8d0cafa87f305fa2fab28ab582e3fa9c360bd71..ede9c798615f4f4c77de56d9d4e20a93 policy->AddHandleToShare(handle); if (!policy->GetConfig()->IsConfigured()) { -@@ -1027,6 +1025,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -1029,6 +1027,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( // have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS. policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE)); policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE)); @@ -676,7 +676,7 @@ index d8d0cafa87f305fa2fab28ab582e3fa9c360bd71..ede9c798615f4f4c77de56d9d4e20a93 #endif if (!delegate->PreSpawnTarget(policy)) -@@ -1039,7 +1044,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -1041,7 +1046,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( ResultCode SandboxWin::StartSandboxedProcess( const base::CommandLine& cmd_line, const std::string& process_type, @@ -685,7 +685,7 @@ index d8d0cafa87f305fa2fab28ab582e3fa9c360bd71..ede9c798615f4f4c77de56d9d4e20a93 SandboxDelegate* delegate, base::Process* process) { SandboxLaunchTimer timer; -@@ -1047,7 +1052,7 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -1049,7 +1054,7 @@ ResultCode SandboxWin::StartSandboxedProcess( // Avoid making a policy if we won't use it. if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line, *base::CommandLine::ForCurrentProcess())) { @@ -694,7 +694,7 @@ index d8d0cafa87f305fa2fab28ab582e3fa9c360bd71..ede9c798615f4f4c77de56d9d4e20a93 process); } -@@ -1055,7 +1060,7 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -1057,7 +1062,7 @@ ResultCode SandboxWin::StartSandboxedProcess( timer.OnPolicyCreated(); ResultCode result = GeneratePolicyForSandboxedProcess( 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 0890f0e62b6d..31c772acfd3b 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -8,7 +8,7 @@ rendering with the viz compositor by way of a custom HostDisplayClient and LayeredWindowUpdater. diff --git a/components/viz/host/host_display_client.cc b/components/viz/host/host_display_client.cc -index 0ef41b4efc339b5e5022927e2ee1cf1da35ad288..8e6ab35f658e59b253667370471a2eb761eb37f6 100644 +index 0ad0fcd3d3ab1f13c3fc133db39135679bf84735..94cb46494157f7683931c54e135572245da79ae0 100644 --- a/components/viz/host/host_display_client.cc +++ b/components/viz/host/host_display_client.cc @@ -48,9 +48,9 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams( @@ -37,7 +37,7 @@ index 0ef41b4efc339b5e5022927e2ee1cf1da35ad288..8e6ab35f658e59b253667370471a2eb7 +#if BUILDFLAG(IS_WIN) void HostDisplayClient::AddChildWindowToBrowser( gpu::SurfaceHandle child_window) { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h index cb16487f9fc0811ef577d455098f09e3000db86a..d67c0f8bce3c6a8f7643409e07e21e789b4bd391 100644 --- a/components/viz/host/host_display_client.h @@ -90,7 +90,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 6354ce53aab6ba907606e578a1df0b8df9c84f58..5713c742a947e5a6687370b4da99f0bc9deb80de 100644 +index aeb4e82629b7d4828a6717708112f28eb9f35079..7fbedb03db701e63dccceb272489f0d6cd4b9f86 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -167,6 +167,8 @@ viz_component("service") { @@ -117,7 +117,7 @@ index a4e6ad16fd2def9bbed7cd11ea13ba365a9f7322..20a426e6f7dff17c22dd05d75d601a56 virtual gpu::SharedImageManager* GetSharedImageManager() = 0; virtual gpu::SyncPointManager* GetSyncPointManager() = 0; 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 e8e3237bb2b8f134be81441ada743ad78f147d97..a5c5360377d9d5f6e46b0ff023ca302128bfb327 100644 +index 54a83ba9fe1e96f339117220da002987df98cd26..c89264115ea44bd7cabde7ff1123a5f05c8b0a1d 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -25,12 +25,14 @@ @@ -520,7 +520,7 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf waiting_on_draw_ack_ = true; diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -index 03baf79ada93d25ee225c0caba9bf787ca03a744..0376f4627967686425c2e6b18268dbed91a6b88f 100644 +index 4ce81412cad4ed61643e245b237aa12527edd993..f87ac9cf73ceba1735293f760b032a804ad63b89 100644 --- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc +++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc @@ -100,7 +100,8 @@ RootCompositorFrameSinkImpl::Create( @@ -562,7 +562,7 @@ index febb2718cb34ea4d9f411f068d8c01a89c7db888..be8bd51cb61c20ef3df8552972a0ac2f gpu::SyncPointManager* GetSyncPointManager() override; }; diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc -index 3634618a687b375c2b0af7922c2f70347fdc0309..cdbb787d219578e9371333f699cfd25859c483fb 100644 +index 20c29b96d4a1f14e0b7bc5ad51441fc371f16865..1f1f35f0a3a4e9dbeb1d594473e684ee4de539d1 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc @@ -385,8 +385,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( @@ -595,10 +595,10 @@ index d7deccb6e6ec63592cd840a05403f402238e645e..4c4356b8def15ed3156db38d0a593b83 // Sends the created child window to the browser process so that it can be diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom -index c9056afecb36a7a20e33458fe96459d2e957b9cf..188ca7507635d50c3b8174538d703f0e7247126d 100644 +index 3ede19b5c518c87b70333a8c94d958dc9f12b284..3daf805b8720915f6dcc7ef14afa736d643f228a 100644 --- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom +++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom -@@ -33,6 +33,7 @@ struct RootCompositorFrameSinkParams { +@@ -34,6 +34,7 @@ struct RootCompositorFrameSinkParams { bool send_swap_size_notifications = false; // Disables begin frame rate limiting for the display compositor. bool disable_frame_rate_limit = false; @@ -618,7 +618,7 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 234c0f68328a87b6b80222bdf64065ca55b246c8..48690a48e26e7acb13d2a44cf7454da9e80596df 100644 +index adb90506e6df9b934b824169cd7d9ea3f00328ce..7d529e1af98d8392a98a7dbf9f3faff90f02c8bd 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -90,6 +90,7 @@ namespace mojom { diff --git a/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch b/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch index a536f1c7bb89..9490fc53ace9 100644 --- a/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch +++ b/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch @@ -76,10 +76,10 @@ index 642f8b6da39615d1c68584ff18fc57ceb95b84b2..cb58d75aa172b5144998fc2e35512315 void ServiceProcessHost::RemoveObserver(Observer* observer) { GetServiceProcessTracker().RemoveObserver(observer); diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc -index c564b64f25c3c2bf87ed5a93b0ce601d73aab177..f2474e89f27564a2e02ba4574dd22632f03ca2e0 100644 +index 38bd3928ecfca0cdd47b6f91735e85a4bfbdc661..55075471a2d53b3b9f5907e81ab86a4ed27c28ac 100644 --- a/content/browser/utility_process_host.cc +++ b/content/browser/utility_process_host.cc -@@ -511,7 +511,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) { +@@ -510,7 +510,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) { // Take ownership of |client_| so the destructor doesn't notify it of // termination. auto client = std::move(client_); diff --git a/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch b/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch index 8aeb6cff677a..542f27efbaad 100644 --- a/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch +++ b/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch @@ -28,10 +28,10 @@ index f9d3219990dcf4f4a829567d567072df59a70ada..ca8281faaff601bf591cf5a2b185e4ba // Returns the http referrer of original request which initited this load. diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h -index b6a67a19666b86c80c40d72ad13da5b0d37b4bc9..53f95d3f7384f854d55cd72dd14f65de6eadb537 100644 +index be15dfe1288297782931c71567735328c6430209..3e78f23f30a7bd65cb53eedadf625baff1e66214 100644 --- a/third_party/blink/renderer/core/loader/document_loader.h +++ b/third_party/blink/renderer/core/loader/document_loader.h -@@ -312,7 +312,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected, +@@ -313,7 +313,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected, std::optional soft_navigation_heuristics_task_id); diff --git a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch index 2e6486f56bb0..2bd3e9af0153 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -17,56 +17,56 @@ headers, moving forward we should find a way in upstream to provide access to these headers for loader clients created on the browser process. diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc -index 4e698635af5ac40fddfb2cf46b01be01e7a7e7cd..a9a92de4b9d5c67474d8bd98304f56b72d648666 100644 +index b220ca953b1dbbb1465d87f08c140026c3fee5b0..2a5bc2735c4d632b2f3e9b76dd525ba88fd04148 100644 --- a/services/network/public/cpp/resource_request.cc +++ b/services/network/public/cpp/resource_request.cc -@@ -153,6 +153,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=( - disable_secure_dns = other.disable_secure_dns; - has_user_activation = other.has_user_activation; +@@ -155,6 +155,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=( allow_cookies_from_browser = other.allow_cookies_from_browser; + include_request_cookies_with_response = + other.include_request_cookies_with_response; + report_raw_headers = other.report_raw_headers; cookie_observer = Clone(&const_cast&>( other.cookie_observer)); -@@ -183,6 +184,7 @@ bool ResourceRequest::TrustedParams::EqualsForTesting( +@@ -185,6 +186,7 @@ bool ResourceRequest::TrustedParams::EqualsForTesting( const TrustedParams& other) const { return isolation_info.IsEqualForTesting(other.isolation_info) && disable_secure_dns == other.disable_secure_dns && + report_raw_headers == other.report_raw_headers && has_user_activation == other.has_user_activation && allow_cookies_from_browser == other.allow_cookies_from_browser && - client_security_state == other.client_security_state; + include_request_cookies_with_response == diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h -index 44ad1e89f20263b180f0a2c0388e9ef036875593..1d61b5c9008b47db9623c731ef6d5f70f8dd534b 100644 +index 0355643854d4eba4bc6061e924e3553b1499f5be..287e40c7bf6145b9ea8e48389cb7e9885a8c877f 100644 --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h -@@ -72,6 +72,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { - bool disable_secure_dns = false; +@@ -73,6 +73,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { bool has_user_activation = false; bool allow_cookies_from_browser = false; + bool include_request_cookies_with_response = false; + bool report_raw_headers = false; mojo::PendingRemote cookie_observer; mojo::PendingRemote trust_token_observer; mojo::PendingRemote diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc -index aa3d03142152af6e3ce8d0eafa8193221dac8687..bea0ddcdf60f249a0fe57ff7ec8f37b1ee4c3d69 100644 +index 821dd730ca216f5ac5b20ec434463fbeee54458e..a2f2d4d03ab40c47ed938686ea78bd6054680def 100644 --- a/services/network/public/cpp/url_request_mojom_traits.cc +++ b/services/network/public/cpp/url_request_mojom_traits.cc -@@ -93,6 +93,7 @@ bool StructTraitsdisable_secure_dns = data.disable_secure_dns(); - out->has_user_activation = data.has_user_activation(); +@@ -95,6 +95,7 @@ bool StructTraitsallow_cookies_from_browser = data.allow_cookies_from_browser(); + out->include_request_cookies_with_response = + data.include_request_cookies_with_response(); + out->report_raw_headers = data.report_raw_headers(); out->cookie_observer = data.TakeCookieObserver< mojo::PendingRemote>(); out->trust_token_observer = data.TakeTrustTokenObserver< diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h -index 1dadf5b4cac21033b096757f1bb52e0d74966a54..d52d6e48d70bf162c5022cc991c2371d1482f4bc 100644 +index 32218c469a135fe903b8fc02d6388258e144bd03..02fb800c1cc51e8371b8d5cdbce69227a91386eb 100644 --- a/services/network/public/cpp/url_request_mojom_traits.h +++ b/services/network/public/cpp/url_request_mojom_traits.h -@@ -73,6 +73,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) +@@ -77,6 +77,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) const network::ResourceRequest::TrustedParams& trusted_params) { - return trusted_params.allow_cookies_from_browser; + return trusted_params.include_request_cookies_with_response; } + static bool report_raw_headers( + const network::ResourceRequest::TrustedParams& trusted_params) { @@ -76,12 +76,12 @@ index 1dadf5b4cac21033b096757f1bb52e0d74966a54..d52d6e48d70bf162c5022cc991c2371d cookie_observer( const network::ResourceRequest::TrustedParams& trusted_params) { diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom -index 15942d6eceaa9c3ef565d35cc8e08633ea4d66b0..4622e39e0791e024ff9bfd49e8ca5fe7e1f92184 100644 +index 1d510b64f480ba516009cb1d995fbe9ca29ec164..d6d17abbb058c2e4109ab98a3db1bdf7734ba4c9 100644 --- a/services/network/public/mojom/url_request.mojom +++ b/services/network/public/mojom/url_request.mojom -@@ -74,6 +74,9 @@ struct TrustedUrlRequestParams { - // FollowRedirect(). - bool allow_cookies_from_browser; +@@ -80,6 +80,9 @@ struct TrustedUrlRequestParams { + // client which should not be able to see them. + bool include_request_cookies_with_response = false; + // [Electron] Whether to provide unfiltered response headers. + bool report_raw_headers; @@ -90,18 +90,18 @@ index 15942d6eceaa9c3ef565d35cc8e08633ea4d66b0..4622e39e0791e024ff9bfd49e8ca5fe7 // a cookie. If this is set to non-null, the observer passed to // URLLoaderFactory will be ignored. diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom -index 20c923eeca30aeba71f97a2d45ccec8a65986325..1f8fa3705e67abbe665062bad8ed97d48717d3cc 100644 +index 64ec7b5a4bfb08a2bbd75ce03a602b36e6b0f278..f726e1ccf33dee59a131f881fa000f506a772e65 100644 --- a/services/network/public/mojom/url_response_head.mojom +++ b/services/network/public/mojom/url_response_head.mojom -@@ -12,6 +12,7 @@ import "services/network/public/mojom/encoded_body_length.mojom"; - import "services/network/public/mojom/attribution.mojom"; +@@ -13,6 +13,7 @@ import "services/network/public/mojom/attribution.mojom"; import "services/network/public/mojom/fetch_api.mojom"; + import "services/network/public/mojom/http_request_headers.mojom"; import "services/network/public/mojom/ip_address_space.mojom"; +import "services/network/public/mojom/http_raw_headers.mojom"; import "services/network/public/mojom/ip_endpoint.mojom"; import "services/network/public/mojom/load_timing_info.mojom"; import "services/network/public/mojom/network_param.mojom"; -@@ -42,6 +43,9 @@ struct URLResponseHead { +@@ -44,6 +45,9 @@ struct URLResponseHead { // The response headers or NULL if the URL type does not support headers. HttpResponseHeaders headers; @@ -112,18 +112,18 @@ index 20c923eeca30aeba71f97a2d45ccec8a65986325..1f8fa3705e67abbe665062bad8ed97d4 string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 11d8e6c2d2917edab70486983f24952f510f6999..95c7d4a18290f8a02fe3d86b86a0ce9ed3ff71ae 100644 +index f5ee349b77610206ef71886555e46cbc22f699d3..9e63ff05c06e44815978289a9767965b8b6ced62 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -705,6 +705,7 @@ URLLoader::URLLoader( - has_user_activation_ = request.trusted_params->has_user_activation; - allow_cookies_from_browser_ = +@@ -707,6 +707,7 @@ URLLoader::URLLoader( request.trusted_params->allow_cookies_from_browser; + include_request_cookies_with_response_ = + request.trusted_params->include_request_cookies_with_response; + report_raw_headers_ = request.trusted_params->report_raw_headers; } // Store any cookies passed from the browser process to later attach them to -@@ -743,7 +744,7 @@ URLLoader::URLLoader( +@@ -745,7 +746,7 @@ URLLoader::URLLoader( &URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this))); } @@ -132,7 +132,7 @@ index 11d8e6c2d2917edab70486983f24952f510f6999..95c7d4a18290f8a02fe3d86b86a0ce9e url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1682,6 +1683,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1694,6 +1695,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); @@ -153,10 +153,10 @@ index 11d8e6c2d2917edab70486983f24952f510f6999..95c7d4a18290f8a02fe3d86b86a0ce9e // Parse and remove the Trust Tokens response headers, if any are expected, diff --git a/services/network/url_loader.h b/services/network/url_loader.h -index 946af13aec973a4650ffaf13cd35e31524199e65..bf8bdae3c88f455edf68c6d20c6377ca8aae3d8e 100644 +index d4d72e186dc16d73ee0beabff89a7875bd91da03..068ced0a8d72bf8a4179b88dfab1a5377307fc6c 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -656,6 +656,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -657,6 +657,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader std::unique_ptr resource_scheduler_request_handle_; diff --git a/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch b/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch index 01f78a514495..5b338ee3726d 100644 --- a/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch +++ b/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch @@ -7,7 +7,7 @@ Subject: feat: filter out non-shareable windows in the current application in This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer. This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself. This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started. There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases. diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm -index afe8c03799f61f722a276b3d0f5090c22d8b6a1e..4fb3e8eb5f34a7ee9e8b0f22a7c842129cdc31eb 100644 +index 2d05b1c438266f8e7bd6b39cf87fc297849f4b42..85f88adcf55b2d996976218d18dc94123cbb1214 100644 --- a/content/browser/media/capture/screen_capture_kit_device_mac.mm +++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm @@ -171,8 +171,17 @@ void OnShareableContentCreated(SCShareableContent* content) { diff --git a/patches/chromium/fix_activate_background_material_on_windows.patch b/patches/chromium/fix_activate_background_material_on_windows.patch index d7d4c8786057..ea25d5821a2a 100644 --- a/patches/chromium/fix_activate_background_material_on_windows.patch +++ b/patches/chromium/fix_activate_background_material_on_windows.patch @@ -14,7 +14,7 @@ This patch likely can't be upstreamed as-is, as Chromium doesn't have this use case in mind currently. diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 07588553ab2427cc8210d88ea2474e70b7810540..f5eff2575ba3ef57872b24daf5022c97b167c92e 100644 +index 846123302cc55b7f4f9cdfa2dca1835cb9392879..74fa32e9c49a8f267902a5a94032e0de88706cd9 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -907,13 +907,13 @@ void HWNDMessageHandler::FrameTypeChanged() { diff --git a/patches/chromium/fix_add_support_for_skipping_first_2_no-op_refreshes_in_thumb_cap.patch b/patches/chromium/fix_add_support_for_skipping_first_2_no-op_refreshes_in_thumb_cap.patch index 74813d443bc2..f99318ef9f8d 100644 --- a/patches/chromium/fix_add_support_for_skipping_first_2_no-op_refreshes_in_thumb_cap.patch +++ b/patches/chromium/fix_add_support_for_skipping_first_2_no-op_refreshes_in_thumb_cap.patch @@ -27,7 +27,7 @@ index 7a879b2f5332f98927c5e3858dd31c5de169e5ce..75191362088d2d875330fb2044a4682b #endif // CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_MEDIA_LIST_H_ diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc -index 780927301744ea7312f230cec76a24a33d71f767..d19b1cc9dedf839f12f4113db64293e5c8150f51 100644 +index d9943ec17ccec0220d4601ea8242ec3a9d8ba5be..5d9029538c690c3d904bd6b39949387931997fdc 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.cc +++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc @@ -230,7 +230,11 @@ uint32_t DesktopMediaListBase::GetImageHash(const gfx::Image& image) { diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index b874dcc5fb92..40ac90144e25 100644 --- a/patches/chromium/fix_aspect_ratio_with_max_size.patch +++ b/patches/chromium/fix_aspect_ratio_with_max_size.patch @@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the BrowserWindow. diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 332904acd679c544c7c482a09527ab4d6106f3ff..e65fcbc6be98d15f5daca87cfc32671628f1e9ab 100644 +index bdc9916d0668a1508dc497079f0a8caedb594f82..835b6f72bd788d8e807557f9a17fb189220a695e 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3669,14 +3669,29 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3679,14 +3679,29 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, delegate_->GetMinMaxSize(&min_window_size, &max_window_size); min_window_size = delegate_->DIPToScreenSize(min_window_size); max_window_size = delegate_->DIPToScreenSize(max_window_size); diff --git a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch index 83ba66d1f920..b8e4ea0477f5 100644 --- a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch +++ b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch @@ -23,10 +23,10 @@ Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index df5d941c3352ee6db5d45a8fa59fb58748572eb3..c7194f5de911e9889c9bcb007a78e743e98f28fc 100644 +index 9d97c3debed1c679d3c1cf2cec4dc5a26dbfffa9..f30b9ad364adac48904d82afcaa9ff91c9c46ab3 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -10406,6 +10406,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() { +@@ -10466,6 +10466,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() { } } @@ -40,10 +40,10 @@ index df5d941c3352ee6db5d45a8fa59fb58748572eb3..c7194f5de911e9889c9bcb007a78e743 // origin of |common_params.url| and/or |common_params.initiator_origin|. url::Origin resolved_origin = url::Origin::Resolve( diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc -index 3da074ee7aa19368523ad33530f3284d258a6336..4879f1b6698e6407cb0ddabefde5290b4a0a06b5 100644 +index dd529bc8c76fe77500110a423132617aa34bd85a..9bd2033a4d7e762973f6cb5c92b8a67d366f3195 100644 --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc -@@ -2179,6 +2179,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() { +@@ -2225,6 +2225,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() { scoped_refptr DocumentLoader::CalculateOrigin( Document* owner_document) { scoped_refptr origin; @@ -54,7 +54,7 @@ index 3da074ee7aa19368523ad33530f3284d258a6336..4879f1b6698e6407cb0ddabefde5290b StringBuilder debug_info_builder; // Whether the origin is newly created within this call, instead of copied // from an existing document's origin or from `origin_to_commit_`. If this is -@@ -2231,6 +2235,10 @@ scoped_refptr DocumentLoader::CalculateOrigin( +@@ -2277,6 +2281,10 @@ scoped_refptr DocumentLoader::CalculateOrigin( debug_info_builder.Append(", url="); debug_info_builder.Append(owner_document->Url().BaseAsString()); debug_info_builder.Append(")"); @@ -62,6 +62,6 @@ index 3da074ee7aa19368523ad33530f3284d258a6336..4879f1b6698e6407cb0ddabefde5290b + !is_standard) { + debug_info_builder.Append("use_url_with_non_standard_scheme"); + origin = SecurityOrigin::Create(url_); - } else if (url_.IsAboutSrcdocURL()) { - // If there's no owner_document and this is a srcdoc load, then get the - // origin from the remote parent. A srcdoc navigation with no owner_document + } else { + debug_info_builder.Append("use_url_with_precursor"); + // Otherwise, create an origin that propagates precursor information diff --git a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch index 4c673441c62d..65f565e8805c 100644 --- a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch +++ b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch @@ -13,10 +13,10 @@ This patch can be removed should we choose to support chrome.fileSystem or support it enough to fix the crash. diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts -index be4c3c82787ac575320c0f3363027a1b8fb32a0e..8e2862e25f748254b006746be4fb93b9b89c5f50 100644 +index 3272e287117dbf4762b1a607954b5d03cbec73fd..062b7dc05e3b1e0edb8c1ba6dc7eafa24eb22466 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.ts +++ b/chrome/browser/resources/pdf/pdf_viewer.ts -@@ -964,7 +964,15 @@ export class PdfViewerElement extends PdfViewerBaseElement { +@@ -1011,7 +1011,15 @@ export class PdfViewerElement extends PdfViewerBaseElement { dataArray = [result.dataToSave]; } @@ -32,15 +32,15 @@ index be4c3c82787ac575320c0f3363027a1b8fb32a0e..8e2862e25f748254b006746be4fb93b9 const fileName = this.attachments_[index].name; chrome.fileSystem.chooseEntry( {type: 'saveFile', suggestedName: fileName}, -@@ -988,6 +996,7 @@ export class PdfViewerElement extends PdfViewerBaseElement { - } +@@ -1033,6 +1041,7 @@ export class PdfViewerElement extends PdfViewerBaseElement { + // }); }); + // } /** -@@ -1095,8 +1104,15 @@ export class PdfViewerElement extends PdfViewerBaseElement { +@@ -1140,8 +1149,15 @@ export class PdfViewerElement extends PdfViewerBaseElement { fileName = fileName + '.pdf'; } @@ -57,8 +57,8 @@ index be4c3c82787ac575320c0f3363027a1b8fb32a0e..8e2862e25f748254b006746be4fb93b9 chrome.fileSystem.chooseEntry( { type: 'saveFile', -@@ -1123,6 +1139,7 @@ export class PdfViewerElement extends PdfViewerBaseElement { - } +@@ -1166,6 +1182,7 @@ export class PdfViewerElement extends PdfViewerBaseElement { + // }); }); + // diff --git a/patches/chromium/fix_disabling_background_throttling_in_compositor.patch b/patches/chromium/fix_disabling_background_throttling_in_compositor.patch index 4f526e0b8cc3..7755f74be5d4 100644 --- a/patches/chromium/fix_disabling_background_throttling_in_compositor.patch +++ b/patches/chromium/fix_disabling_background_throttling_in_compositor.patch @@ -12,7 +12,7 @@ invisible state of the `viz::DisplayScheduler` owned by the `ui::Compositor`. diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc -index 65424ae52561367e1300c43a8d6edf67e0d169dc..6e168d7022bd3147292760836553fff9bad63d14 100644 +index 582ee2eeb0b65672bfe23bae29c142a63f1289b8..13574eaac0f8a3568c1a904bb24c37ef03a7508d 100644 --- a/ui/compositor/compositor.cc +++ b/ui/compositor/compositor.cc @@ -341,7 +341,8 @@ void Compositor::SetLayerTreeFrameSink( @@ -51,7 +51,7 @@ index 65424ae52561367e1300c43a8d6edf67e0d169dc..6e168d7022bd3147292760836553fff9 + } // namespace ui diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 48690a48e26e7acb13d2a44cf7454da9e80596df..b6c4d4fe03f51f5453f0da7f4a48e19535607de2 100644 +index 7d529e1af98d8392a98a7dbf9f3faff90f02c8bd..0ca7e3a2d8009f8334caeadf944de5e8e0985be9 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -508,6 +508,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, diff --git a/patches/chromium/fix_export_zlib_symbols.patch b/patches/chromium/fix_export_zlib_symbols.patch index fcfe98d4eca0..3fa9be376ee2 100644 --- a/patches/chromium/fix_export_zlib_symbols.patch +++ b/patches/chromium/fix_export_zlib_symbols.patch @@ -6,10 +6,10 @@ Subject: fix: export zlib symbols This patch sets ZLIB_DLL so that we properly export zlib symbols. diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn -index f97ab45de2741ffb0caa3941c3cb8dd33ab78415..1a0955095bb21de7421bfe52b494ddb474d1265b 100644 +index 378bd0df75ca2283d2c87b31b3f8a50deda553ed..06dda222dd86f11fb9aa1a19bf1334d28a514bac 100644 --- a/third_party/zlib/BUILD.gn +++ b/third_party/zlib/BUILD.gn -@@ -321,6 +321,10 @@ component("zlib") { +@@ -327,6 +327,10 @@ component("zlib") { defines = [] deps = [] diff --git a/patches/chromium/fix_getcursorscreenpoint_wrongly_returns_0_0.patch b/patches/chromium/fix_getcursorscreenpoint_wrongly_returns_0_0.patch index d2e4bed589c7..2b91fb20aec8 100644 --- a/patches/chromium/fix_getcursorscreenpoint_wrongly_returns_0_0.patch +++ b/patches/chromium/fix_getcursorscreenpoint_wrongly_returns_0_0.patch @@ -10,7 +10,7 @@ This patch should be backported to e29, upstreamed to Chromium, and then removed if it lands upstream. diff --git a/ui/events/x/events_x_utils.cc b/ui/events/x/events_x_utils.cc -index aa047f2bd39643dc471b25eeb567b0dd3731e0e0..eb312fb1c115751041930539d0d5f15208461e04 100644 +index aeb7d986d8ac1b471bdd382e65d688f79aa127d3..c2e035e0ad650dc7e4ff6e415232d7dd6e077858 100644 --- a/ui/events/x/events_x_utils.cc +++ b/ui/events/x/events_x_utils.cc @@ -586,6 +586,9 @@ gfx::Point EventLocationFromXEvent(const x11::Event& xev) { diff --git a/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch b/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch index f440414846a8..2c11a7bdccd1 100644 --- a/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch +++ b/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch @@ -86,11 +86,11 @@ index e4a27a24c83dd1a478b2ada8b6c8220076790791..c76dc818f38a62fff63852dbecbc85e3 // Cut the reference from ScriptState to V8 context. diff --git a/third_party/blink/renderer/platform/bindings/script_state.h b/third_party/blink/renderer/platform/bindings/script_state.h -index 5dcd3515a6685d31cf5ecd89b37d7b850caf887e..1148f2012c4f93a4a4b41a7ef597fdbe09fc7a16 100644 +index e9b16a9c71b9631222d0745428fea06be2e74472..aba4d930a9a45fb43e0aaac26af7df4fa07fc447 100644 --- a/third_party/blink/renderer/platform/bindings/script_state.h +++ b/third_party/blink/renderer/platform/bindings/script_state.h -@@ -180,7 +180,12 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected { - static ScriptState* MaybeFrom(v8::Local context) { +@@ -184,7 +184,12 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected { + v8::Local context) { DCHECK(!context.IsEmpty()); if (context->GetNumberOfEmbedderDataFields() <= - kV8ContextPerContextDataIndex) { @@ -103,7 +103,7 @@ index 5dcd3515a6685d31cf5ecd89b37d7b850caf887e..1148f2012c4f93a4a4b41a7ef597fdbe return nullptr; } ScriptState* script_state = -@@ -247,9 +252,15 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected { +@@ -251,9 +256,15 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected { static void SetCreateCallback(CreateCallback); friend class ScriptStateImpl; diff --git a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch index 386581fa0856..29b2f2e4a648 100644 --- a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch +++ b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch @@ -11,7 +11,7 @@ counter to the design of globalShortcuts, and so we need to instead use `ui::MediaKeysListener`. diff --git a/chrome/browser/extensions/global_shortcut_listener.cc b/chrome/browser/extensions/global_shortcut_listener.cc -index fa5be7e4dbddd8333263c412b84a1d93b2d5046a..1b3c65359bff41a96ff27aef6e979ac7e6e8518d 100644 +index a8acaa1780af7a0801832e1a698ed8d03598618c..5d92376feebc94d0c0e7658496eb9742740b089d 100644 --- a/chrome/browser/extensions/global_shortcut_listener.cc +++ b/chrome/browser/extensions/global_shortcut_listener.cc @@ -7,6 +7,7 @@ @@ -59,7 +59,7 @@ index f96af14cb915c8ab92b314ac15b6dffcdd6ec607..2556abe433493251ebd48d4aeddaa6d4 // true if register successfully, or false if 1) the specificied |accelerator| // has been registered by another caller or other native applications, or diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc -index 41ee109692b7f35c6d35642daa534d95ce807e74..4addd249dba20a1c12472bfc5c3a563204859541 100644 +index 6f8d1243fe6b1c6dd83371ad4ff2e2d8ad6c865e..d9dd04769e94da14f1dcb8d4929ca2853431511c 100644 --- a/content/browser/media/media_keys_listener_manager_impl.cc +++ b/content/browser/media/media_keys_listener_manager_impl.cc @@ -88,7 +88,11 @@ bool MediaKeysListenerManagerImpl::StartWatchingMediaKey( @@ -75,7 +75,7 @@ index 41ee109692b7f35c6d35642daa534d95ce807e74..4addd249dba20a1c12472bfc5c3a5632 !media_keys_listener_->StartWatchingMediaKey(key_code)) { return false; } -@@ -354,6 +358,20 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() { +@@ -357,6 +361,20 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() { this, ui::MediaKeysListener::Scope::kGlobal); DCHECK(media_keys_listener_); } diff --git a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch index af5e2dc7a7c8..58cef13e2238 100644 --- a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch +++ b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch @@ -75,10 +75,10 @@ index ceced82cbd23b2dcd7fabf7d63028423f86e05c3..27d0b61a7b67d1c9d7e0699e287b7833 PictureInPictureOcclusionTracker* diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -index 28d3689be10469fa9f6bd8e608717c4d13a92620..9497277742369bfc53d14462ab354c31799b967e 100644 +index 62280109a74b5d606f16503151a98449147cc660..f0f66496085d189fc6240772800c2fb5c42b77b3 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -@@ -343,11 +343,13 @@ std::unique_ptr VideoOverlayWindowViews::Create( +@@ -345,11 +345,13 @@ std::unique_ptr VideoOverlayWindowViews::Create( input_scope); #endif // BUILDFLAG(IS_WIN) diff --git a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch index adc3c68ab0d1..fd3853cf7ab8 100644 --- a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch +++ b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch @@ -9,10 +9,10 @@ focus node change via TextInputManager. chromium-bug: https://crbug.com/1369605 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 efc25342e674e5b37c8eac0a7f69dc700527af84..0d2533688067461f15ab89ec58f24f89ecf30740 100644 +index 8974181a9c33d790e8bee5fe38883af59f487a78..2db3239303d59677384cfb6eeb5cdd101c7d6d5c 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -2940,6 +2940,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged( +@@ -2949,6 +2949,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged( } } @@ -26,10 +26,10 @@ index efc25342e674e5b37c8eac0a7f69dc700527af84..0d2533688067461f15ab89ec58f24f89 RenderWidgetHostViewAura* popup_child_host_view) { popup_child_host_view_ = popup_child_host_view; diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h -index c30bd4035ea279b0c54beb39a5be86cf02070c75..b7d497e15e42fd904b02025927f08a2031031d35 100644 +index 1aee557a027af3f2f2570c3f86e6f770fb93c31d..1efc5fe58900b643c15ec411f2a03b7c107127ee 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h -@@ -626,6 +626,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura +@@ -628,6 +628,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura RenderWidgetHostViewBase* updated_view) override; void OnTextSelectionChanged(TextInputManager* text_input_mangager, RenderWidgetHostViewBase* updated_view) override; @@ -39,10 +39,10 @@ index c30bd4035ea279b0c54beb39a5be86cf02070c75..b7d497e15e42fd904b02025927f08a20 // Detaches |this| from the input method object. // is_removed flag is true if this is called while the window is diff --git a/content/browser/renderer_host/text_input_manager.cc b/content/browser/renderer_host/text_input_manager.cc -index 1fd6203a11e5fef9a680e935b44226795932eea2..a3de9dc52df2f8bd2427db235a4ba4a41040ff3b 100644 +index 96af80ef11e55c86ad70ebcdd8c22387438e16e7..5f1cdec055dceff8b8fc171d07c52bccca08bd43 100644 --- a/content/browser/renderer_host/text_input_manager.cc +++ b/content/browser/renderer_host/text_input_manager.cc -@@ -166,6 +166,7 @@ void TextInputManager::UpdateTextInputState( +@@ -167,6 +167,7 @@ void TextInputManager::UpdateTextInputState( if (text_input_state.type == ui::TEXT_INPUT_TYPE_NONE && active_view_ != view) { @@ -50,7 +50,7 @@ index 1fd6203a11e5fef9a680e935b44226795932eea2..a3de9dc52df2f8bd2427db235a4ba4a4 // We reached here because an IPC is received to reset the TextInputState // for |view|. But |view| != |active_view_|, which suggests that at least // one other view has become active and we have received the corresponding -@@ -452,6 +453,12 @@ void TextInputManager::NotifyObserversAboutInputStateUpdate( +@@ -454,6 +455,12 @@ void TextInputManager::NotifyObserversAboutInputStateUpdate( observer.OnUpdateTextInputStateCalled(this, updated_view, did_update_state); } @@ -87,10 +87,10 @@ index 0c7d5b2c1d3e97420913bd643bb2a524a76fc286..653793fa480f035ce11e079b370bf5ed // The view with active text input state, i.e., a focused element. // It will be nullptr if no such view exists. Note that the active view diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 3557ad8536be31efbeeca9f014baf37e4d545d88..212e17e3f0889d090ae2bf9244279b819352f466 100644 +index f8ca743c5629c8e62a16cad3e2f7f76e17826751..d6460ccac4aaa0643cb724e3b5c04401ed82b20b 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -8949,7 +8949,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( +@@ -9085,7 +9085,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( "WebContentsImpl::OnFocusedElementChangedInFrame", "render_frame_host", frame); RenderWidgetHostViewBase* root_view = diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index 9c877c71f64a..1ae1458e94a4 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -100,7 +100,7 @@ index b935f996b137d91d82f89414122355d5db65aeb9..6d7d84cd2ea6d9197c4ff1149131658e } else { // No need to bother, we don't know how many pages are available. diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc -index 0a190a577e505729947d31c34e4d36118944d977..f0feaa4a33e5b3ec14329c7310c5c30abb281fc8 100644 +index f382b6e9b46a9c9591138a6df5ae47a7172bd10f..aa755b11d9db58d8aca6d183cb5d4387be597fba 100644 --- a/ui/gtk/printing/print_dialog_gtk.cc +++ b/ui/gtk/printing/print_dialog_gtk.cc @@ -242,6 +242,24 @@ void PrintDialogGtk::UpdateSettings( diff --git a/patches/chromium/fix_remove_caption-removing_style_call.patch b/patches/chromium/fix_remove_caption-removing_style_call.patch index e3b2acc24ac1..f0f7591eb58c 100644 --- a/patches/chromium/fix_remove_caption-removing_style_call.patch +++ b/patches/chromium/fix_remove_caption-removing_style_call.patch @@ -18,7 +18,7 @@ or resizing, but Electron does not seem to run into that issue for opaque frameless windows even with that block commented out. diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 088fbc8a376139c1497461fa072ece401563602d..07588553ab2427cc8210d88ea2474e70b7810540 100644 +index 3eed15267074a09b375bab3418a28ee506db1f06..846123302cc55b7f4f9cdfa2dca1835cb9392879 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -1740,7 +1740,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) { diff --git a/patches/chromium/fix_restore_original_resize_performance_on_macos.patch b/patches/chromium/fix_restore_original_resize_performance_on_macos.patch index 2a60772fcdd0..abe7c389f9bc 100644 --- a/patches/chromium/fix_restore_original_resize_performance_on_macos.patch +++ b/patches/chromium/fix_restore_original_resize_performance_on_macos.patch @@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop vs mobile runtimes. i.e. restore the old logic only on desktop platforms diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 6801f228e67d7931919b7eb32f20a933a673ed8b..86ca89a02f0c2374b9e363dd61734abe1bb9d995 100644 +index aa0231253c3f707a2779e773e593dede41f6287e..56e123036df2631ca0a4c5e1a80397ad7db5519e 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2104,9 +2104,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() { +@@ -2150,9 +2150,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() { void RenderWidgetHostImpl::NotifyScreenInfoChanged() { // The resize message (which may not happen immediately) will carry with it // the screen info as well as the new size (if the screen has changed scale diff --git a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch index 90334bc5f4ef..62e3db2cb157 100644 --- a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -8,10 +8,10 @@ v8::Value instead of base::Value. Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1323953 diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc -index a1c787d8404f3d91dc8b3305690efa374f24e69b..5505852a3556ecb01d1ceaf460dc17e28cfee46b 100644 +index 424b73ed6ccda8a29ddfb17e7c1ed2dbbe222711..2391a8e29a9501b7f2461867991819bb7afcaa07 100644 --- a/extensions/renderer/script_injection.cc +++ b/extensions/renderer/script_injection.cc -@@ -309,6 +309,7 @@ void ScriptInjection::InjectJs(std::set* executing_scripts, +@@ -318,6 +318,7 @@ void ScriptInjection::InjectJs(std::set* executing_scripts, blink::mojom::LoadEventBlockingOption::kBlock, base::BindOnce(&ScriptInjection::OnJsInjectionCompleted, weak_ptr_factory_.GetWeakPtr()), @@ -20,10 +20,10 @@ index a1c787d8404f3d91dc8b3305690efa374f24e69b..5505852a3556ecb01d1ceaf460dc17e2 injector_->ExpectsResults(), injector_->ShouldWaitForPromise()); } diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h -index c2760ba7a404a4f3f1053712b728e1b222b83198..ee1175595a24f202b873a82f8744d3da8dd38779 100644 +index e9a982b30c35aecd2c9bae90cf7014d8ae48153c..564f2dda56cf463a4889c8ae5bb9b166fac3d90c 100644 --- a/third_party/blink/public/web/web_local_frame.h +++ b/third_party/blink/public/web/web_local_frame.h -@@ -438,6 +438,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame { +@@ -439,6 +439,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame { mojom::EvaluationTiming, mojom::LoadEventBlockingOption, WebScriptExecutionCallback, @@ -64,10 +64,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..7a985067b1371604644d48159f2f5aa7 #endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 8d818e8f77d08a22a114782296ea45c622e46fd9..46db31f1b07f6fa70859fb4565d8e455e7dbc076 100644 +index 7385c4b848dd1550cd5c2325745a155393d5e860..50b33b854da3447d4f85f514e755e22170ec8b08 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -3008,6 +3008,7 @@ void LocalFrame::RequestExecuteScript( +@@ -3060,6 +3060,7 @@ void LocalFrame::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -75,7 +75,7 @@ index 8d818e8f77d08a22a114782296ea45c622e46fd9..46db31f1b07f6fa70859fb4565d8e455 BackForwardCacheAware back_forward_cache_aware, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_behavior) { -@@ -3041,7 +3042,7 @@ void LocalFrame::RequestExecuteScript( +@@ -3093,7 +3094,7 @@ void LocalFrame::RequestExecuteScript( PausableScriptExecutor::CreateAndRun( script_state, std::move(script_sources), execute_script_policy, user_gesture, evaluation_timing, blocking_option, want_result_option, @@ -85,7 +85,7 @@ index 8d818e8f77d08a22a114782296ea45c622e46fd9..46db31f1b07f6fa70859fb4565d8e455 void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() { diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h -index 8b7da41000213b17aaaf4945854cdb1912ff7965..849243513d417aff4fada54235e06da153169df4 100644 +index acdd52f146add6106d23ae1305ed7b610f76920e..85da7b5deb71d5d582378eb3824068d5e63c5b33 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h @@ -825,6 +825,7 @@ class CORE_EXPORT LocalFrame final @@ -97,7 +97,7 @@ index 8b7da41000213b17aaaf4945854cdb1912ff7965..849243513d417aff4fada54235e06da1 mojom::blink::WantResultOption, mojom::blink::PromiseResultOption); diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc -index f71aaa743632d3f88b004b5665c3ebdd862c3daf..597f6dc8427d9e50c809a37e6050bc774d5b25a9 100644 +index 72a5ae6c7ede80fa2f5c088c5f3acf35a7116737..acb1d814098b9526511135d4101d70a57e7b2777 100644 --- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc +++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc @@ -955,6 +955,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( @@ -109,10 +109,10 @@ index f71aaa743632d3f88b004b5665c3ebdd862c3daf..597f6dc8427d9e50c809a37e6050bc77 wants_result ? mojom::blink::WantResultOption::kWantResultDateAndRegExpAllowed diff --git a/third_party/blink/renderer/core/frame/pausable_script_executor.cc b/third_party/blink/renderer/core/frame/pausable_script_executor.cc -index c456bca706df4f22b7b1afdaf47de7afe1a3a1e3..7bdc959503911b3c394939e7a20c96be5a13039b 100644 +index f16d546304c6cdbc81096e04c73f62b17091644b..323de900832ef9109a6d301258349e91f47a5935 100644 --- a/third_party/blink/renderer/core/frame/pausable_script_executor.cc +++ b/third_party/blink/renderer/core/frame/pausable_script_executor.cc -@@ -249,7 +249,7 @@ void PausableScriptExecutor::CreateAndRun( +@@ -250,7 +250,7 @@ void PausableScriptExecutor::CreateAndRun( script_state, mojom::blink::UserActivationOption::kDoNotActivate, mojom::blink::LoadEventBlockingOption::kDoNotBlock, want_result_option, mojom::blink::PromiseResultOption::kDoNotWait, @@ -121,7 +121,7 @@ index c456bca706df4f22b7b1afdaf47de7afe1a3a1e3..7bdc959503911b3c394939e7a20c96be MakeGarbageCollected( script_state->GetIsolate(), function, receiver, argc, argv)); executor->Run(); -@@ -264,10 +264,11 @@ void PausableScriptExecutor::CreateAndRun( +@@ -265,10 +265,11 @@ void PausableScriptExecutor::CreateAndRun( mojom::blink::LoadEventBlockingOption blocking_option, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_result_option, @@ -135,7 +135,7 @@ index c456bca706df4f22b7b1afdaf47de7afe1a3a1e3..7bdc959503911b3c394939e7a20c96be MakeGarbageCollected(std::move(sources), execute_script_policy)); switch (evaluation_timing) { -@@ -289,6 +290,14 @@ void PausableScriptExecutor::ContextDestroyed() { +@@ -290,6 +291,14 @@ void PausableScriptExecutor::ContextDestroyed() { ScriptState::Scope script_scope(script_state_); std::move(callback_).Run({}, {}); } @@ -150,7 +150,7 @@ index c456bca706df4f22b7b1afdaf47de7afe1a3a1e3..7bdc959503911b3c394939e7a20c96be Dispose(); } -@@ -299,10 +308,12 @@ PausableScriptExecutor::PausableScriptExecutor( +@@ -300,10 +309,12 @@ PausableScriptExecutor::PausableScriptExecutor( mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_result_option, WebScriptExecutionCallback callback, @@ -163,7 +163,7 @@ index c456bca706df4f22b7b1afdaf47de7afe1a3a1e3..7bdc959503911b3c394939e7a20c96be user_activation_option_(user_activation_option), blocking_option_(blocking_option), want_result_option_(want_result_option), -@@ -426,6 +437,9 @@ void PausableScriptExecutor::HandleResults( +@@ -427,6 +438,9 @@ void PausableScriptExecutor::HandleResults( std::move(callback_).Run(std::move(value), start_time_); } @@ -204,10 +204,10 @@ index fa65331f40b90d812b71a489fd560e9359152d2b..390714d631dc88ef92d59ef9618a5706 const mojom::blink::UserActivationOption user_activation_option_; const mojom::blink::LoadEventBlockingOption blocking_option_; diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc -index 79ea68069bdb1ec895f9c444c7b07fc787a0594f..2850d537cc27758f5e812a1abae7d0aba97fbf31 100644 +index ff209df4d0c807e8496786a0ef41dfe2b4409474..c65abdb48068cb737d75ed469f0a33c1f5fa3d02 100644 --- a/third_party/blink/renderer/core/frame/web_frame_test.cc +++ b/third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -289,6 +289,7 @@ void ExecuteScriptsInMainWorld( +@@ -288,6 +288,7 @@ void ExecuteScriptsInMainWorld( DOMWrapperWorld::kMainWorldId, sources, user_gesture, mojom::blink::EvaluationTiming::kSynchronous, mojom::blink::LoadEventBlockingOption::kDoNotBlock, std::move(callback), @@ -216,10 +216,10 @@ index 79ea68069bdb1ec895f9c444c7b07fc787a0594f..2850d537cc27758f5e812a1abae7d0ab mojom::blink::WantResultOption::kWantResult, wait_for_promise); } 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 dd04f47ca556c3355fba092d30b0239cd03f3d4e..cbae75c48103d10b4104b5387ca51ba159f17e5e 100644 +index a143868555f4f1b82b500d8c9e558cbb2a58321e..9f8c65fee192a8d883c2bfa35c5347c0888439f0 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 -@@ -1111,14 +1111,15 @@ void WebLocalFrameImpl::RequestExecuteScript( +@@ -1084,14 +1084,15 @@ void WebLocalFrameImpl::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -238,10 +238,10 @@ index dd04f47ca556c3355fba092d30b0239cd03f3d4e..cbae75c48103d10b4104b5387ca51ba1 v8::MaybeLocal WebLocalFrameImpl::CallFunctionEvenIfScriptDisabled( 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 df5fe9ff02ef2d2e964b2acc16976adff0e83756..7e381d75342471ec905bab0fd86cd6f6c9cac4a6 100644 +index 36138c55768bed91ad67bf3b55029f1aa3957a65..bdf243a7d47dabacdb707172b52502a1f1bbf535 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 -@@ -193,6 +193,7 @@ class CORE_EXPORT WebLocalFrameImpl final +@@ -194,6 +194,7 @@ class CORE_EXPORT WebLocalFrameImpl final mojom::blink::EvaluationTiming, mojom::blink::LoadEventBlockingOption, WebScriptExecutionCallback, diff --git a/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch b/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch index 6637d604d7bf..2e42e40eab38 100644 --- a/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch +++ b/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch @@ -6,7 +6,7 @@ Subject: fix: select the first menu item when opened via keyboard This fixes an accessibility issue where the root view is 'focused' to the screen reader instead of the first menu item as with all other native menus. This patch will be upstreamed. diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc -index a3d188fdde094dfd16138897c082b53ea8ef0a8b..c09b27ab767c3cda2e6dae163880ba4073ac0f64 100644 +index 2392b7395336e72a03e08e4312041ec3f0813d3f..ab19507b2133b6164ce656410cfac9d1de4a0c7c 100644 --- a/ui/views/controls/menu/menu_controller.cc +++ b/ui/views/controls/menu/menu_controller.cc @@ -578,6 +578,7 @@ void MenuController::Run(Widget* parent, @@ -32,7 +32,7 @@ index a3d188fdde094dfd16138897c082b53ea8ef0a8b..c09b27ab767c3cda2e6dae163880ba40 if (button_controller) { pressed_lock_ = button_controller->TakeLock( false, ui::LocatedEvent::FromIfValid(event)); -@@ -2266,19 +2275,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { +@@ -2278,19 +2287,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { } item->GetSubmenu()->ShowAt(params); @@ -58,10 +58,10 @@ index a3d188fdde094dfd16138897c082b53ea8ef0a8b..c09b27ab767c3cda2e6dae163880ba40 item->GetSubmenu()->GetWidget()->SetNativeWindowProperty( diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h -index a05119513492088b92028d6756c737772cbc7a86..84f4cc26646f0897a604aa4acc1023e9e60683aa 100644 +index 4c25ffcf9ab92ac97e55acf9c115a16b3d34cdd7..94e847cd8161ebfd2b715754d6af1b4a7296ca29 100644 --- a/ui/views/controls/menu/menu_controller.h +++ b/ui/views/controls/menu/menu_controller.h -@@ -139,6 +139,7 @@ class VIEWS_EXPORT MenuController +@@ -137,6 +137,7 @@ class VIEWS_EXPORT MenuController final : public gfx::AnimationDelegate, MenuAnchorPosition position, bool context_menu, bool is_nested_drag, diff --git a/patches/chromium/fix_use_app_launch_prefetch_namespace_for_subprocesstype.patch b/patches/chromium/fix_use_app_launch_prefetch_namespace_for_subprocesstype.patch deleted file mode 100644 index 85d43d3af3f3..000000000000 --- a/patches/chromium/fix_use_app_launch_prefetch_namespace_for_subprocesstype.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Sun, 5 May 2024 16:07:58 -0700 -Subject: fix: use app_launch_prefetch namespace for SubprocessType - -This should be upstreamed, looks like Chromium doesn't have a target that builds this file? - -diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc -index e8203ff5470f91ac35a5f444f6598866e75f88bb..b046a430eee010ca634f019ece3b0394299703db 100644 ---- a/content/browser/ppapi_plugin_process_host.cc -+++ b/content/browser/ppapi_plugin_process_host.cc -@@ -237,7 +237,7 @@ bool PpapiPluginProcessHost::Init(const ContentPluginInfo& info) { - - #if BUILDFLAG(IS_WIN) - cmd_line->AppendArgNative( -- app_launch_prefetch::GetPrefetchSwitch(SubprocessType::kPpapi)); -+ app_launch_prefetch::GetPrefetchSwitch(app_launch_prefetch::SubprocessType::kPpapi)); - #endif // BUILDFLAG(IS_WIN) - - // These switches are forwarded to plugin pocesses. diff --git a/patches/chromium/fix_use_delegated_generic_capturer_when_available.patch b/patches/chromium/fix_use_delegated_generic_capturer_when_available.patch index f7d44b41d07d..95e867536683 100644 --- a/patches/chromium/fix_use_delegated_generic_capturer_when_available.patch +++ b/patches/chromium/fix_use_delegated_generic_capturer_when_available.patch @@ -15,7 +15,7 @@ capturer was window or screen-specific, as the IDs remain valid for generic capturer as well. diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc -index d4209e9beca4bce47efbb1f507b1abcab05770ea..65b6403b74f9bcb1a1bf636db440d5f212df166e 100644 +index 9d53ceaffb4ba02bdc1780854f67588a5bd2fb27..66eb47e34c10be64a671e705029979c9c66b5b6c 100644 --- a/content/browser/media/capture/desktop_capture_device.cc +++ b/content/browser/media/capture/desktop_capture_device.cc @@ -822,8 +822,14 @@ std::unique_ptr DesktopCaptureDevice::Create( diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index de721ac5f76e..ad853963954c 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -6,10 +6,10 @@ Subject: frame_host_manager.patch Allows embedder to intercept site instances created by chromium. diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc -index 02d4edd4798ccea2db1853dd42362b1492b322dc..924530baddf58a802512ae76e7dc3d3282d20d28 100644 +index 913987ca6b5e3aeac67ef8bdef405cca2608e9f1..aad201a544c47052039d5fa1bfd19eab8e290f4b 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -4344,6 +4344,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -4354,6 +4354,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index 02d4edd4798ccea2db1853dd42362b1492b322dc..924530baddf58a802512ae76e7dc3d32 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index f29755bf04da153831da14565e28ca04189c6771..ec77a16a104eda9681fccd600246234bb586275d 100644 +index 81f617f0a8e6f6d930343ea49ecd9292f694c10e..031f4a08949ea818774e1664e80c569ee18a756b 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -311,6 +311,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -312,6 +312,11 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ~ContentBrowserClient() = default; diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index fce2598e73c6..2722d5c8d119 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -7,7 +7,7 @@ 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 3c85af05bc101c6c2134ebc9e5476561534695b1..202b9f4154198b357d7fa816f7d163ffb22c1ea5 100644 +index 53599a5f245f2401bacc1b424f459c06b713b086..61d35042fcd0aa7b632c34253bce42a00c8d732d 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc @@ -151,9 +151,10 @@ void IsolateHolder::Initialize(ScriptMode mode, @@ -38,10 +38,10 @@ index c19eb72e8d37fe8145b813d07875addf793e12dc..a5db8841773618814ac90f740201d4d7 // Returns whether `Initialize` has already been invoked in the process. // Initialization is a one-way operation (i.e., this method cannot return diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index ceb53cac221dbc4991bdf6a58050d381f047e6c6..fffa83247d337d7c920526af5e2dddeae7451062 100644 +index 188bb9664a06782936cfeb82a66ded005a9ef653..1202c8e3e86d18212609a63ac94aa41c9318f5ee 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -472,7 +472,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, +@@ -473,7 +473,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, // static void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, const std::string js_command_line_flags, @@ -51,7 +51,7 @@ index ceb53cac221dbc4991bdf6a58050d381f047e6c6..fffa83247d337d7c920526af5e2dddea static bool v8_is_initialized = false; if (v8_is_initialized) return; -@@ -482,7 +483,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, +@@ -483,7 +484,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, // See https://crbug.com/v8/11043 SetFlags(mode, js_command_line_flags); diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 4c2810939d16..2a6706bb3e23 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 cf3ad5467e8d1dd618f9156b26477346507b8388..1dd701e0cef5148b1b04bc0464c3e65480c5d65b 100644 +index c0cd4f1ea237d593c4fdd0eae65632ff4eb76a54..313f0ee692d4dc82535461348cbeb118a2079ba5 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -1305,6 +1305,11 @@ +@@ -1331,6 +1331,11 @@ "includes": [8460], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index fa42a4105d94..d4069bb3f580 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -6,7 +6,7 @@ Subject: gtk_visibility.patch Allow electron to depend on GTK in the GN build. diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn -index 355067ea178bee1466f9df5a3ed146e9f09f0768..1b385d12692deece9e10722fc70215e8c645f6af 100644 +index 1ea983ca1f613a9a5b12375196fbf6a61960c90f..38d7d54ce7715ebe4e3b25e08c57d29f3be2cba8 100644 --- a/build/config/linux/gtk/BUILD.gn +++ b/build/config/linux/gtk/BUILD.gn @@ -27,6 +27,7 @@ pkg_config("gtk_internal_config") { diff --git a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch index b4a10595aefd..f9916d114adb 100644 --- a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch +++ b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch @@ -11,10 +11,10 @@ If removing this patch causes no sync failures, it's safe to delete :+1: Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903 diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py -index bdcfeb4c9cc2615227c10f4420dc44ec912dcacc..b0aadecf50b2562ae50b322a2823075499cb18e8 100755 +index 0e4cdd69a21a8227df3dec74e6830896a0bef4bf..7900321c94d5afdb7e67cde8ef58bcad243a78fd 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py -@@ -311,6 +311,8 @@ def GetDefaultHostOs(): +@@ -304,6 +304,8 @@ def GetDefaultHostOs(): 'win32': 'win', } default_host_os = _PLATFORM_HOST_OS_MAP.get(sys.platform, sys.platform) diff --git a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch index 3753f73d26db..64bf73d069fa 100644 --- a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch +++ b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch @@ -21,10 +21,10 @@ index 39e18820db0d0c1b57f4375e01d269e53c839e4e..ea4da67a9b7798822d1d5dd90d09597a properties->supports_global_application_menus = true; properties->app_modal_dialogs_use_event_blocker = true; diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h -index 9d6534449f04baa7ebfc8604286b7d5f230e259a..cf23a05ee0a49f397b3605fb1e4510a86b40885d 100644 +index bc3dce09be325a1a1754da3311f15681f74ce88d..b02e0295ecd35844d3e40b03c73955f8a64cdd9c 100644 --- a/ui/ozone/public/ozone_platform.h +++ b/ui/ozone/public/ozone_platform.h -@@ -122,6 +122,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { +@@ -121,6 +121,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { // Linux only: determines if Skia can fall back to the X11 output device. bool skia_can_fall_back_to_x11 = false; diff --git a/patches/chromium/isolate_holder.patch b/patches/chromium/isolate_holder.patch index f4f0363b9fc6..cf551c91641f 100644 --- a/patches/chromium/isolate_holder.patch +++ b/patches/chromium/isolate_holder.patch @@ -15,7 +15,7 @@ for us to register the isolate in between Isolate::Allocate and Isolate::Initialize. diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc -index 202b9f4154198b357d7fa816f7d163ffb22c1ea5..e9382614aebaab604956664b3e21ae5bbea3eb50 100644 +index 61d35042fcd0aa7b632c34253bce42a00c8d732d..db074920753e6a7aec4ffad82f8f4296f6ab854b 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc @@ -75,7 +75,8 @@ IsolateHolder::IsolateHolder( diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index 642b0e633bf5..2fcdf6d1c49b 100644 --- a/patches/chromium/load_v8_snapshot_in_browser_process.patch +++ b/patches/chromium/load_v8_snapshot_in_browser_process.patch @@ -9,10 +9,10 @@ but due to the nature of electron, we need to load the v8 snapshot in the browser process. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index a340920835ab5c90f448055f7125781dd91d9dc3..428dc65029daed374e82348f12ae06e2e4368097 100644 +index 089eefd697ae6aede0f18a7bbfc280bcafb1e702..a9b2453b377ec6bc7ed856991ad29d9f38d382d3 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -276,11 +276,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -283,11 +283,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, const std::string& process_type) { diff --git a/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch index 316f2d58ff91..e017fc211d42 100644 --- a/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch +++ b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch @@ -9,7 +9,7 @@ be created for each child process, despite logs being redirected to a file. diff --git a/content/app/content_main.cc b/content/app/content_main.cc -index f64a47c2cddc8650d00b959515dd0e15f8d00c3a..024c44267dd91f1d2d8fa58c825c8245fd9b8a7b 100644 +index 96c28a7ce318348ff9d48f5a40b9cb569ff4c43b..8174ac9b69faca99bdad7de73cf0379b70978e44 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc @@ -305,16 +305,14 @@ RunContentProcess(ContentMainParams params, diff --git a/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch b/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch index 75b6b6b3bbd8..63945ae4c4d7 100644 --- a/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch +++ b/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch @@ -35,10 +35,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to system priority. diff --git a/base/BUILD.gn b/base/BUILD.gn -index ac5832a8bf15b872b80fe1f4c1dc1eaf6151f3cb..5a06229211841b620b0b399447dc8701dcad0a6b 100644 +index 9c05322b1599410c1b04334315be29cfbb8fc6d7..18cc427e0d3c0b39d78668784c8304ab0bf87658 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1068,6 +1068,7 @@ component("base") { +@@ -1052,6 +1052,7 @@ component("base") { "//build/config/compiler:prevent_unsafe_narrowing", "//build/config/compiler:wexit_time_destructors", "//build/config/compiler:wglobal_constructors", @@ -171,7 +171,7 @@ index 4fe7a0bfaa5b3398372f55c6454e738f140efe6b..b1c70281c45aaca4ae483f1f28e9d219 if (is_win) { diff --git a/components/remote_cocoa/app_shim/BUILD.gn b/components/remote_cocoa/app_shim/BUILD.gn -index f8e3adb59709757bbf6cd777c66588f961a01656..53e3039ab30620cf398b8abc6d1ce8820fd4859c 100644 +index 459f14da45419a2a0340199d9cf311e3bba437e6..3b7908c559ddd3d6101801f8de256aa80a9411a2 100644 --- a/components/remote_cocoa/app_shim/BUILD.gn +++ b/components/remote_cocoa/app_shim/BUILD.gn @@ -16,6 +16,7 @@ component("app_shim") { @@ -183,10 +183,10 @@ index f8e3adb59709757bbf6cd777c66588f961a01656..53e3039ab30620cf398b8abc6d1ce882 "NSToolbar+Private.h", "NSToolbar+Private.mm", diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components/remote_cocoa/app_shim/application_bridge.mm -index ee110fe82749fe69808f7c53f2e028d7033e1f54..55c2d643004a5acf9297693d28c3f71b43acc570 100644 +index c8682418893584aaf61eb6db859b30c99b064698..5d1550030b519f3599dcb855007b25180f0606e9 100644 --- a/components/remote_cocoa/app_shim/application_bridge.mm +++ b/components/remote_cocoa/app_shim/application_bridge.mm -@@ -51,6 +51,7 @@ +@@ -50,6 +50,7 @@ // NativeWidgetNSWindowHostHelper: id GetNativeViewAccessible() override { @@ -194,7 +194,7 @@ index ee110fe82749fe69808f7c53f2e028d7033e1f54..55c2d643004a5acf9297693d28c3f71b if (!remote_accessibility_element_) { base::ProcessId browser_pid = base::kNullProcessId; std::vector element_token; -@@ -61,6 +62,9 @@ id GetNativeViewAccessible() override { +@@ -60,6 +61,9 @@ id GetNativeViewAccessible() override { ui::RemoteAccessibility::GetRemoteElementFromToken(element_token); } return remote_accessibility_element_; @@ -204,7 +204,7 @@ index ee110fe82749fe69808f7c53f2e028d7033e1f54..55c2d643004a5acf9297693d28c3f71b } void DispatchKeyEvent(ui::KeyEvent* event) override { bool event_handled = false; -@@ -99,7 +103,9 @@ void GetWordAt(const gfx::Point& location_in_content, +@@ -98,7 +102,9 @@ void GetWordAt(const gfx::Point& location_in_content, mojo::AssociatedRemote text_input_host_remote_; std::unique_ptr bridge_; @@ -353,7 +353,7 @@ index 6ebc4754ef986f5ae966ff7a3217ab77df78edf9..91147b8a42f731c645c318776933b4c1 bool shouldShowWindowTitle = YES; if (_bridge) diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -index e0cd6c1956cc5ac96067c3626370ceb14903f5b1..ac6834030abad73e2e7fec0c2c8e4d5f45896997 100644 +index 7fbc649a45bea2181523a1875f0112021f0b9251..e15f59c3dedf587df6664cef1913a8e789497bbd 100644 --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm @@ -627,10 +627,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { @@ -370,10 +370,10 @@ index e0cd6c1956cc5ac96067c3626370ceb14903f5b1..ac6834030abad73e2e7fec0c2c8e4d5f // Beware: This view was briefly removed (in favor of a bare CALayer) in // https://crrev.com/c/1236675. The ordering of unassociated layers relative diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 1a6fed8fa26058343d711d38833d0c6b675224f6..6354ce53aab6ba907606e578a1df0b8df9c84f58 100644 +index f28503c3bd02b51da148624b3545c7feeccad511..aeb4e82629b7d4828a6717708112f28eb9f35079 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -360,6 +360,7 @@ viz_component("service") { +@@ -362,6 +362,7 @@ viz_component("service") { "frame_sinks/external_begin_frame_source_mac.h", ] } @@ -381,7 +381,7 @@ index 1a6fed8fa26058343d711d38833d0c6b675224f6..6354ce53aab6ba907606e578a1df0b8d } if (is_android || use_ozone) { -@@ -632,6 +633,7 @@ viz_source_set("unit_tests") { +@@ -633,6 +634,7 @@ viz_source_set("unit_tests") { "display_embedder/software_output_device_mac_unittest.mm", ] frameworks = [ "IOSurface.framework" ] @@ -390,10 +390,10 @@ index 1a6fed8fa26058343d711d38833d0c6b675224f6..6354ce53aab6ba907606e578a1df0b8d if (is_win) { diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm -index 0181e431874fcd9949be755e840af5afa32fdffa..2d9598de81977c7107e5f45d321e390f89cffa25 100644 +index dbf334caa3a6d10017b69ad76802e389a011436b..0cdb0def975e457651771b43fd5432610481c7d0 100644 --- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm +++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm -@@ -64,7 +64,9 @@ explicit RenderWidgetHostNSViewBridgeOwner( +@@ -63,7 +63,9 @@ explicit RenderWidgetHostNSViewBridgeOwner( const RenderWidgetHostNSViewBridgeOwner&) = delete; private: @@ -403,7 +403,7 @@ index 0181e431874fcd9949be755e840af5afa32fdffa..2d9598de81977c7107e5f45d321e390f void OnMojoDisconnect() { delete this; } std::unique_ptr TranslateEvent( -@@ -76,6 +78,7 @@ explicit RenderWidgetHostNSViewBridgeOwner( +@@ -75,6 +77,7 @@ explicit RenderWidgetHostNSViewBridgeOwner( } id GetAccessibilityElement() override { @@ -411,7 +411,7 @@ index 0181e431874fcd9949be755e840af5afa32fdffa..2d9598de81977c7107e5f45d321e390f if (!remote_accessibility_element_) { base::ProcessId browser_pid = base::kNullProcessId; std::vector element_token; -@@ -86,6 +89,9 @@ id GetAccessibilityElement() override { +@@ -85,6 +88,9 @@ id GetAccessibilityElement() override { ui::RemoteAccessibility::GetRemoteElementFromToken(element_token); } return remote_accessibility_element_; @@ -421,7 +421,7 @@ index 0181e431874fcd9949be755e840af5afa32fdffa..2d9598de81977c7107e5f45d321e390f } // RenderWidgetHostNSViewHostHelper implementation. -@@ -104,8 +110,10 @@ id GetFocusedBrowserAccessibilityElement() override { +@@ -103,8 +109,10 @@ id GetFocusedBrowserAccessibilityElement() override { return [bridgedContentView accessibilityFocusedUIElement]; } void SetAccessibilityWindow(NSWindow* window) override { @@ -431,12 +431,12 @@ index 0181e431874fcd9949be755e840af5afa32fdffa..2d9598de81977c7107e5f45d321e390f +#endif } - void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event, + void ForwardKeyboardEvent(const input::NativeWebKeyboardEvent& key_event, diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index 53818b1885ccc5f7ba2e281b002b6e9ab4112b9d..9e088821c9164c9224605dc7ddc1ff0c2863ec84 100644 +index ea7957d89c1c44ce7cae2f0d4548fb67b60543ca..04f78e4f395df7ad3be39ff4a373e0d72811f587 100644 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -@@ -2041,15 +2041,21 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -2063,15 +2063,21 @@ - (NSAccessibilityRole)accessibilityRole { // Since this implementation doesn't have to wait any IPC calls, this doesn't // make any key-typing jank. --hbono 7/23/09 // @@ -459,7 +459,7 @@ index 53818b1885ccc5f7ba2e281b002b6e9ab4112b9d..9e088821c9164c9224605dc7ddc1ff0c return kAttributes; } diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index b1f559fad9229c5822918e14cbf6f5ec96c9ff4a..3b33b098d4617eef7dd0a8084e27a00c0d02449c 100644 +index 6d5fd4133598c17a2dfcf1a4bd2732435353ed1f..24b1ea6fc5fef18b199518ae730713baaa8c0530 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -54,6 +54,7 @@ source_set("browser") { @@ -471,10 +471,10 @@ index b1f559fad9229c5822918e14cbf6f5ec96c9ff4a..3b33b098d4617eef7dd0a8084e27a00c libs = [] frameworks = [] diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index ec784e17cead72eceea0f91a4cad89db6fab8d8e..8732d375388521ee99785da9df5b6cf6840ac2ea 100644 +index b1dd00ab48e22e1e248728e0400b00e92553e8fd..253670f014c4fc13ad99d674e8dcbf145c17fcc7 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm -@@ -21,7 +21,9 @@ +@@ -20,7 +20,9 @@ #include "ui/accessibility/ax_role_properties.h" #include "ui/accessibility/platform/ax_platform_tree_manager_delegate.h" #include "ui/accessibility/platform/ax_private_webkit_constants_mac.h" @@ -484,7 +484,7 @@ index ec784e17cead72eceea0f91a4cad89db6fab8d8e..8732d375388521ee99785da9df5b6cf6 namespace { -@@ -225,6 +227,7 @@ void PostAnnouncementNotification(NSString* announcement, +@@ -224,6 +226,7 @@ void PostAnnouncementNotification(NSString* announcement, return; } @@ -492,7 +492,7 @@ index ec784e17cead72eceea0f91a4cad89db6fab8d8e..8732d375388521ee99785da9df5b6cf6 BrowserAccessibilityManager* root_manager = GetManagerForRootFrame(); if (root_manager) { BrowserAccessibilityManagerMac* root_manager_mac = -@@ -247,6 +250,7 @@ void PostAnnouncementNotification(NSString* announcement, +@@ -246,6 +249,7 @@ void PostAnnouncementNotification(NSString* announcement, return; } } @@ -500,7 +500,7 @@ index ec784e17cead72eceea0f91a4cad89db6fab8d8e..8732d375388521ee99785da9df5b6cf6 // Use native VoiceOver support for live regions. BrowserAccessibilityCocoa* retained_node = native_node; -@@ -650,6 +654,7 @@ void PostAnnouncementNotification(NSString* announcement, +@@ -647,6 +651,7 @@ void PostAnnouncementNotification(NSString* announcement, return window == [NSApp accessibilityFocusedWindow]; } @@ -508,7 +508,7 @@ index ec784e17cead72eceea0f91a4cad89db6fab8d8e..8732d375388521ee99785da9df5b6cf6 // TODO(accessibility): We need a solution to the problem described below. // If the window is NSAccessibilityRemoteUIElement, there are some challenges: // 1. NSApp is the browser which spawned the PWA, and what it considers the -@@ -678,6 +683,7 @@ void PostAnnouncementNotification(NSString* announcement, +@@ -675,6 +680,7 @@ void PostAnnouncementNotification(NSString* announcement, if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]]) { return true; } @@ -517,7 +517,7 @@ index ec784e17cead72eceea0f91a4cad89db6fab8d8e..8732d375388521ee99785da9df5b6cf6 return false; } diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h -index 5497f4e3faa66cc0a78d449e92d54c1da0cb041c..a768ff0ad1fd0aebc14f0432b9f4b88b8a42e34a 100644 +index fe37e5d17d217ad2a7861ac9dba2e61de5a063aa..ab8c04e648f320412de16ce31c134b28c11eb01e 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h @@ -49,7 +49,9 @@ class ScopedPasswordInputEnabler; @@ -543,7 +543,7 @@ index 5497f4e3faa66cc0a78d449e92d54c1da0cb041c..a768ff0ad1fd0aebc14f0432b9f4b88b // 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 984286e99767e06a501fa4be409e35e39c0a2d59..bc878e003e17247f2255f28d41b6419034e58cae 100644 +index e9a73bafeb1ef85ef6ebbc870b66fbde2076b306..679c9e92ef3f8e984e8cc4d6b99afbbf33383e8b 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -272,8 +272,10 @@ @@ -608,10 +608,10 @@ index 984286e99767e06a501fa4be409e35e39c0a2d59..bc878e003e17247f2255f28d41b64190 /////////////////////////////////////////////////////////////////////////////// diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn -index f50b1f7c18ef9802b6bdfac09c30a0a42cfbcd4c..f820ff64a63e65b52f513ba5ab826b5bb40137d1 100644 +index 4d169795cd87c26d2264f4b89334f50c532bc4e7..365154bac05faec52591cc6b4138dcf0bbcadcbb 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn -@@ -243,6 +243,7 @@ source_set("common") { +@@ -249,6 +249,7 @@ source_set("common") { "//content:content_implementation", "//build/config:precompiled_headers", ] @@ -620,10 +620,10 @@ index f50b1f7c18ef9802b6bdfac09c30a0a42cfbcd4c..f820ff64a63e65b52f513ba5ab826b5b public_deps = [ ":mojo_bindings", diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn -index d80cdfcc88d89155825c085558772617cf33ad7e..c48d2fa394ab2c39d15ff70ebbf5d3cd5046d804 100644 +index 4acb73f39de91b9dfd9b1e6d25c911983c91dc93..22513b5aa30d0fa549d06d5d58312b0a2aa07b27 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn -@@ -228,6 +228,7 @@ target(link_target_type, "renderer") { +@@ -226,6 +226,7 @@ target(link_target_type, "renderer") { } configs += [ "//content:content_implementation" ] @@ -700,10 +700,10 @@ index a119b4439bfb9218c7aaf09dca8e78527da7f20d..faa813b003940280c6eeb87e70173019 } // namespace content diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn -index 0cf74caf8aeecf49fdc0a3a6fcc1f4964bb97cbb..dc46b42dbbceb17ce601dbd9653eace2b0faffd9 100644 +index 02b51f9dae40ed3976cf43a7d5cf837ea639d7c9..ca71960c438930e59e372ff3ad7837cb6d9e34d4 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn -@@ -496,6 +496,7 @@ static_library("test_support") { +@@ -504,6 +504,7 @@ static_library("test_support") { configs += [ "//build/config:precompiled_headers", "//v8:external_startup_data", @@ -711,7 +711,7 @@ index 0cf74caf8aeecf49fdc0a3a6fcc1f4964bb97cbb..dc46b42dbbceb17ce601dbd9653eace2 ] public_deps = [ -@@ -1102,6 +1103,7 @@ static_library("browsertest_support") { +@@ -1103,6 +1104,7 @@ static_library("browsertest_support") { } configs += [ "//v8:external_startup_data" ] @@ -719,7 +719,7 @@ index 0cf74caf8aeecf49fdc0a3a6fcc1f4964bb97cbb..dc46b42dbbceb17ce601dbd9653eace2 } mojom("content_test_mojo_bindings") { -@@ -1715,6 +1717,7 @@ test("content_browsertests") { +@@ -1718,6 +1720,7 @@ test("content_browsertests") { defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] configs += [ "//build/config:precompiled_headers" ] @@ -727,7 +727,7 @@ index 0cf74caf8aeecf49fdc0a3a6fcc1f4964bb97cbb..dc46b42dbbceb17ce601dbd9653eace2 public_deps = [ ":test_interfaces", -@@ -2953,6 +2956,7 @@ test("content_unittests") { +@@ -2971,6 +2974,7 @@ test("content_unittests") { } configs += [ "//build/config:precompiled_headers" ] @@ -736,7 +736,7 @@ index 0cf74caf8aeecf49fdc0a3a6fcc1f4964bb97cbb..dc46b42dbbceb17ce601dbd9653eace2 public_deps = [ "//content:content_resources" ] diff --git a/content/web_test/BUILD.gn b/content/web_test/BUILD.gn -index 84d0f2cd2b7366e37876ed80eef9461afedd6385..ae498eb3b2cade9729806e2be04c5a2570f5de5f 100644 +index c28458b5ddc8ef74e82125a983344b1daf65dda6..48e6d48962a2228d26444dbdbcfa1637e67a8c56 100644 --- a/content/web_test/BUILD.gn +++ b/content/web_test/BUILD.gn @@ -151,6 +151,8 @@ static_library("web_test_browser") { @@ -805,10 +805,10 @@ index cda4f747099492c306db22c6dba98249e443cd74..f63dbbe7149010efa06c9cbb215399eb base::WeakPtr diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn -index 592487f13c5c7806cf59b6653c3c4cdc7bf0a144..a96169c8861287940d55a9aabcdbfcfd23dc6056 100644 +index a4f541e3f4095a0f537137ae371555adc80c0023..f93f0b5bf8c47efbc67039d50e3bcd29e099459c 100644 --- a/gpu/ipc/service/BUILD.gn +++ b/gpu/ipc/service/BUILD.gn -@@ -133,6 +133,7 @@ component("service") { +@@ -135,6 +135,7 @@ component("service") { "QuartzCore.framework", ] defines += [ "GL_SILENCE_DEPRECATION" ] @@ -817,7 +817,7 @@ index 592487f13c5c7806cf59b6653c3c4cdc7bf0a144..a96169c8861287940d55a9aabcdbfcfd if (is_ios) { sources += [ "image_transport_surface_ios.mm" ] diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h -index 0cc98a9a797286f077b9bfa404f0f547e9966593..947baedbb6159fedd4ad38dcd03b2b6b769ebec9 100644 +index d75db1f8fbdf12cf07ba19e3f2c68136ef33f021..dc0238d5a78b434c722b84adf3dbbcebaa19e847 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.h +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h @@ -23,7 +23,9 @@ @@ -871,10 +871,10 @@ index 808f4e1c7beb03cc5377465882940eea94ad61a7..d001436c3a5a8a0fc25995519772478f } // namespace #endif diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc -index 6ec6a5b008faec2a381a85c8771f4e4d92488a1f..17c56fb2d296445440a7403ca73f1a647fd18e7c 100644 +index a5070091785d80a47d1d9d9977803cd1de8b2054..b280a0d58fc03257aa1763cd15791db4ddede7c1 100644 --- a/media/audio/mac/audio_manager_mac.cc +++ b/media/audio/mac/audio_manager_mac.cc -@@ -970,7 +970,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( +@@ -971,7 +971,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( void AudioManagerMac::InitializeOnAudioThread() { DCHECK(GetTaskRunner()->BelongsToCurrentThread()); @@ -897,10 +897,10 @@ index 63414d8db326c0fdd44ed59f99400d5c16cfc93c..d80a104451c66017750d04c776355cfa # The standard API of net/dns. diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc -index 04c2079aac882cb2913583d4692302fdf564a74d..2a03be8bb4b089473e61601323646d257da5e39e 100644 +index 70d5665ad7b9ef62370497636af919ede2508ad4..3f6816de14f4bd19422a2b04830649d1d12e9179 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc -@@ -130,8 +130,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { +@@ -135,8 +135,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { bool Watch() override { CheckOnCorrectSequence(); @@ -910,7 +910,7 @@ index 04c2079aac882cb2913583d4692302fdf564a74d..2a03be8bb4b089473e61601323646d25 if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged, base::Unretained(this)))) { LOG(ERROR) << "DNS config watch failed to start."; -@@ -148,6 +148,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { +@@ -153,6 +153,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { success = false; } #endif // !BUILDFLAG(IS_IOS) @@ -1162,7 +1162,7 @@ index 15c835e118456394c0a00ac98c11241c14ca75bd..83759e5fbc252fa57ca2fa122873dfac } // namespace sandbox diff --git a/sandbox/mac/seatbelt_extension.cc b/sandbox/mac/seatbelt_extension.cc -index 18479382a277cb2b25626ec8d31442bfd1377ee6..7d80d7fa8337523c3a70f317f883f0cc26c6f40b 100644 +index b3f017a8be25209a78ed6a1221abcdeeb7904752..506d520e41f321e02b227e07b7b41a4bbfec8d4d 100644 --- a/sandbox/mac/seatbelt_extension.cc +++ b/sandbox/mac/seatbelt_extension.cc @@ -11,6 +11,7 @@ @@ -1218,7 +1218,7 @@ index 18479382a277cb2b25626ec8d31442bfd1377ee6..7d80d7fa8337523c3a70f317f883f0cc resource.c_str(), 0); +#endif default: - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return nullptr; diff --git a/sandbox/mac/system_services.cc b/sandbox/mac/system_services.cc index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..dc30306f2c5d20503399fc3a8860773aa0044352 100644 @@ -1260,10 +1260,10 @@ index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..dc30306f2c5d20503399fc3a8860773a } // namespace sandbox diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn -index 9f1346108a24fdc93147eb31411d94c1f9064a44..238405c2f811d80ab58673d69b7a16e201e51818 100644 +index 2a9d420eabfee17a39604e525af6f0fa95fafc04..0883cfc964881922f3f5b04426923544c49a2273 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn -@@ -317,6 +317,7 @@ component("core") { +@@ -330,6 +330,7 @@ component("core") { configs -= core_config_remove configs += core_config_add configs += [ "//v8:external_startup_data" ] @@ -1329,7 +1329,7 @@ index b11c365f42dd1ddc363de0d94c387b13ac65bef3..c274340cac7aaf22321b9cd35a8fad2c // The root CALayer to display the current frame. This does not change // over the lifetime of the object. diff --git a/ui/accelerated_widget_mac/ca_layer_tree_coordinator.mm b/ui/accelerated_widget_mac/ca_layer_tree_coordinator.mm -index 4efcff17f550fc245ad13a1c80cecb40a1596f6d..d4862996b99662ca7f29d87d122a4e91f523692b 100644 +index b99461d52e3a62b58330691e65f9956748cfbf02..09abf39af3e7115744778c7260a68f13a080b162 100644 --- a/ui/accelerated_widget_mac/ca_layer_tree_coordinator.mm +++ b/ui/accelerated_widget_mac/ca_layer_tree_coordinator.mm @@ -33,6 +33,7 @@ @@ -1385,7 +1385,7 @@ index dcf493d62990018040a3f84b6f875af737bd2214..6ffffe8b3946e0427aead8be19878c53 void DisplayCALayerTree::GotIOSurfaceFrame( diff --git a/ui/accessibility/platform/BUILD.gn b/ui/accessibility/platform/BUILD.gn -index fc99800e70eb29b94ac356b55caef81a25518896..e9fe9be7f737372b0111e113bd120b520fb4568a 100644 +index 3e295499c9ddf8fbb4376e711c57855c8df5e451..c90568d1f5f67ca3e1510aafb524b99c098c455e 100644 --- a/ui/accessibility/platform/BUILD.gn +++ b/ui/accessibility/platform/BUILD.gn @@ -254,6 +254,7 @@ component("platform") { @@ -1395,7 +1395,7 @@ index fc99800e70eb29b94ac356b55caef81a25518896..e9fe9be7f737372b0111e113bd120b52 + configs += ["//electron/build/config:mas_build"] } - if (use_atk) { + if (is_ios) { diff --git a/ui/accessibility/platform/inspect/ax_transform_mac.mm b/ui/accessibility/platform/inspect/ax_transform_mac.mm index 84e156b7ff28abc2071dde155e56a2a92a53b142..bd73dac7fe3ed256cab805a0815d31d4f5e7dffc 100644 --- a/ui/accessibility/platform/inspect/ax_transform_mac.mm @@ -1417,10 +1417,10 @@ index 84e156b7ff28abc2071dde155e56a2a92a53b142..bd73dac7fe3ed256cab805a0815d31d4 // Accessible object if (AXElementWrapper::IsValidElement(value)) { diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index fa7f03026c5299f113d340728ae72991c9401bc1..806acccd8f42771f016c4167886371378e2649ca 100644 +index 70342aaf70db9d0d53494ea98c4eec5e36c58de5..ecf8c102cbb6110eabeba95053a2fdfb739c954c 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -361,6 +361,7 @@ component("base") { +@@ -363,6 +363,7 @@ component("base") { "interaction/element_tracker_mac.mm", "resource/resource_bundle_mac.mm", ] @@ -1428,7 +1428,7 @@ index fa7f03026c5299f113d340728ae72991c9401bc1..806acccd8f42771f016c416788637137 } if (is_apple) { -@@ -378,6 +379,13 @@ component("base") { +@@ -380,6 +381,13 @@ component("base") { sources += [ "resource/resource_bundle_lacros.cc" ] } @@ -1517,7 +1517,7 @@ index fc25ba79d2b0e1acdb7ba54b89e7d6e16f94771b..962df2d65d61ec0836cf465d847eb666 } // namespace diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn -index 96f0d3a75a639a69eab6ef12f27c7b23df99d508..d89c075498c060379d42f6089cddb41999f7220e 100644 +index 761d9361972720855719ae3418e19c623c465361..752744e489b9b2c184012562985e7803ef685b17 100644 --- a/ui/display/BUILD.gn +++ b/ui/display/BUILD.gn @@ -69,6 +69,10 @@ component("display") { @@ -1532,7 +1532,7 @@ index 96f0d3a75a639a69eab6ef12f27c7b23df99d508..d89c075498c060379d42f6089cddb419 if (is_win) { diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm -index 268934b96daccacd1cbd0a441d60ceb9043d7c15..6889b083f5aa314417832210f76e110cf5eb45a6 100644 +index cd08cb3b7c95a8fd418524652bb345945291112a..13c6cc142262781450d1075fe85f86ada3f9f60f 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm @@ -171,7 +171,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { @@ -1554,7 +1554,7 @@ index 268934b96daccacd1cbd0a441d60ceb9043d7c15..6889b083f5aa314417832210f76e110c // Query the display's refresh rate. { diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn -index 5ad5e8313d93b970f4b140d074b6aa319be23b26..fee30feaa460f9a14d0e28ff55ca595c8782f56e 100644 +index 060744da5ed7e6d814a94b2b8576ff672c980c85..0cdd00f78c1518e29bc935e4b35399091882de71 100644 --- a/ui/gfx/BUILD.gn +++ b/ui/gfx/BUILD.gn @@ -204,6 +204,7 @@ component("gfx") { @@ -1596,7 +1596,7 @@ index 0ab5fbd2a81d8860c73f29c08896f6755b5ca5fa..9400c6c7698258ff2834c550fb8901b4 // enough. return PlatformFontMac::SystemFontType::kGeneral; diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn -index dfb51c3303312a6fc98330896ac28f67790e6867..ea1d656585d1cd6f2ccdb7d3845791f46bdb1816 100644 +index a14ebf37508ab6e419507c41536689052d52439c..60cb9b1df27453103649deb4f6a6e26b4c9e3c89 100644 --- a/ui/views/BUILD.gn +++ b/ui/views/BUILD.gn @@ -716,6 +716,7 @@ component("views") { @@ -1607,7 +1607,7 @@ index dfb51c3303312a6fc98330896ac28f67790e6867..ea1d656585d1cd6f2ccdb7d3845791f4 } if (is_win) { -@@ -1148,6 +1149,8 @@ source_set("test_support") { +@@ -1145,6 +1146,8 @@ source_set("test_support") { "//testing/gtest", ] @@ -1713,7 +1713,7 @@ index b50e6f05254ea9e12985fa18b5468c3c020cf3cf..43051bb6a54ed56b2f920555f096494e } diff --git a/ui/views/controls/webview/BUILD.gn b/ui/views/controls/webview/BUILD.gn -index fabfde10ab21d62b0cefd6f53bd22bbb6784035f..1560165dff9f77dd77ec7d656f0613472f9e24b8 100644 +index 111d6432586f47833dde50678b908c76ad88d37a..45601d06f85ba618fe38c96ae28c47d306784e53 100644 --- a/ui/views/controls/webview/BUILD.gn +++ b/ui/views/controls/webview/BUILD.gn @@ -19,6 +19,9 @@ component("webview") { 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 db2001961932..20efbc03a633 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index aa94a653ee3fb49aa003e0d7701eca3dd66e8a3b..d69d9674d121db2775a2b3bc99940871b53a0520 100644 +index 548bcc1f870b0c94244a9d954ae37c4a01987833..50650759734c7ef4d683d61560caba01da6aa113 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -152,6 +152,11 @@ +@@ -156,6 +156,11 @@ #include "services/network/web_transport.h" #include "url/gurl.h" @@ -22,7 +22,7 @@ index aa94a653ee3fb49aa003e0d7701eca3dd66e8a3b..d69d9674d121db2775a2b3bc99940871 #if BUILDFLAG(IS_CT_SUPPORTED) // gn check does not account for BUILDFLAG(). So, for iOS builds, it will // complain about a missing dependency on the target exposing this header. Add a -@@ -518,6 +523,99 @@ bool GetFullDataFilePath( +@@ -568,6 +573,99 @@ mojom::URLLoaderFactoryParamsPtr CreateURLLoaderFactoryParamsForPrefetch() { } // namespace @@ -122,7 +122,7 @@ index aa94a653ee3fb49aa003e0d7701eca3dd66e8a3b..d69d9674d121db2775a2b3bc99940871 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::NetworkContextHttpAuthPreferences:: -@@ -885,6 +983,13 @@ void NetworkContext::SetClient( +@@ -935,6 +1033,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -136,7 +136,7 @@ index aa94a653ee3fb49aa003e0d7701eca3dd66e8a3b..d69d9674d121db2775a2b3bc99940871 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2367,6 +2472,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2417,6 +2522,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get()); #endif // BUILDFLAG(IS_CHROMEOS) @@ -147,10 +147,10 @@ index aa94a653ee3fb49aa003e0d7701eca3dd66e8a3b..d69d9674d121db2775a2b3bc99940871 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 610392bf8ead09815a1958e16274968d1ec6d843..62e543ca0eca806d939949573c9bddc172be4f6c 100644 +index f212b8a1fc95df94fc6ff3b6eccb4d5cc989441f..004354b6a74023adebc041c2f40d8989eb9f0a05 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -113,6 +113,7 @@ class URLMatcher; +@@ -114,6 +114,7 @@ class URLMatcher; namespace network { class CertVerifierWithTrustAnchors; @@ -158,7 +158,7 @@ index 610392bf8ead09815a1958e16274968d1ec6d843..62e543ca0eca806d939949573c9bddc1 class CookieManager; class HostResolver; class MdnsResponderManager; -@@ -245,6 +246,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -249,6 +250,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -167,7 +167,7 @@ index 610392bf8ead09815a1958e16274968d1ec6d843..62e543ca0eca806d939949573c9bddc1 void ResetURLLoaderFactories() override; void GetViaObliviousHttp( mojom::ObliviousHttpRequestPtr request, -@@ -897,6 +900,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -908,6 +911,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -177,7 +177,7 @@ index 610392bf8ead09815a1958e16274968d1ec6d843..62e543ca0eca806d939949573c9bddc1 std::unique_ptr internal_host_resolver_; std::set, base::UniquePtrComparator> diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 10109d4ac851f81c28296fe66183964461b0872e..d5e579e9a794a3a9ffab915d6b12ef75f80eee6b 100644 +index 5597a97f13cc0738b14f050a768605e929d07dcd..6b868b5744f0250d2a566051d26d746a19a26177 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -298,6 +298,16 @@ struct SocketBrokerRemotes { @@ -208,7 +208,7 @@ index 10109d4ac851f81c28296fe66183964461b0872e..d5e579e9a794a3a9ffab915d6b12ef75 CreateURLLoaderFactory(pending_receiver url_loader_factory, URLLoaderFactoryParams params); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index b174c53abfeff239652cfe81c89bf1e7c34a194a..a832e3146baea73b77c6ca01a1f5354dbfe1c395 100644 +index 9d7e3c953449aec6ba3009c256389480a555b24e..db21e3f02b3e0fecf4c2c494afe4d806170be3f1 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h @@ -62,6 +62,8 @@ class TestNetworkContext : public mojom::NetworkContext { diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index a4feaa7dae8c..a82a3e5072fc 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -7,10 +7,10 @@ Pass RenderFrameHost through to PlatformNotificationService so Electron can identify which renderer a notification came from. diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc -index 738563f512ac818c0c05b6617bd90ac40a50bf37..08dd8bd95b6beaf30f65bda0d0ca0e799fee1cf8 100644 +index 412e1fb55f901c573455fbea722f5f371e0c0566..725b67ea1ab00bc3a834221a77e2b722b8720032 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc -@@ -198,6 +198,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( +@@ -218,6 +218,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( // TODO(awdf): Rename to DisplayNonPersistentNotification (Similar for Close) void PlatformNotificationServiceImpl::DisplayNotification( @@ -19,7 +19,7 @@ index 738563f512ac818c0c05b6617bd90ac40a50bf37..08dd8bd95b6beaf30f65bda0d0ca0e79 const GURL& origin, const GURL& document_url, diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h -index 231a266a4c8d8a729baa701c47cb19348e199f79..8828b216e515d557e381549f1253f48e24342c33 100644 +index c173f8a6cde9ab519075987fa451afb63c6580a9..4a1f128d9252a4a858d5ba8c6991bb183de7f064 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.h +++ b/chrome/browser/notifications/platform_notification_service_impl.h @@ -57,6 +57,7 @@ class PlatformNotificationServiceImpl @@ -79,7 +79,7 @@ index e7cc73f375ada7ee8715d331c3d372e0f59a0cdf..c0a142bea4a9a30c10dbb30c72fedce9 scoped_refptr service_worker_context_; diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc -index c5413ab0ccd97092a12e594866d0594470b94ca4..6f74216cb04b293e182c1e8a3d14f6627fd23649 100644 +index fe56b0bde4480765e5dffe5afb6ddf73ca8d63c8..93de0ace3dabf526d737897d42df35a5c2accab2 100644 --- a/content/browser/notifications/blink_notification_service_impl_unittest.cc +++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc @@ -132,7 +132,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { @@ -133,10 +133,10 @@ index 38c8cf36fdf9366121c7ada96c167a4c9664952e..03b37fb62655a355e104870a088e4222 const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 9d2105bbe450961fcae3b8a6811911a0fa401f52..336cebf1aee3659f881b8edb8b9370860520c9bd 100644 +index 4b67983bc0c4fe9ddfa006a322daf559112e91b1..84fec9a7d7d013c8f9c30144179a154a2d6b6078 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2043,7 +2043,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2057,7 +2057,7 @@ void RenderProcessHostImpl::CreateNotificationService( case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker: case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -145,7 +145,7 @@ index 9d2105bbe450961fcae3b8a6811911a0fa401f52..336cebf1aee3659f881b8edb8b937086 creator_type, std::move(receiver)); break; } -@@ -2051,7 +2051,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2065,7 +2065,7 @@ void RenderProcessHostImpl::CreateNotificationService( CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch b/patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch index 339d46de9596..28db37634cc0 100644 --- a/patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch +++ b/patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch @@ -10,10 +10,10 @@ an about:blank check to this area. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876 diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index ead6fd6bc1f91282d9282164496bb74c93695e21..88afeca1cec882961f9b6910e2eabb972edc782a 100644 +index a4fd7f1370aeb113a0b07ba0e4504adf7cc1848c..6ff1c3dc0923696b029a73fdcaf5e99d8e5887a7 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -781,8 +781,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch( +@@ -786,8 +786,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch( // TODO(crbug.com/40092527): Consider adding a separate boolean that // tracks this instead of piggybacking `origin_calculation_debug_info`. if (renderer_side_origin.opaque() && diff --git a/patches/chromium/pepper_plugin_support.patch b/patches/chromium/pepper_plugin_support.patch index a2217fa5c0af..243b70cb25ac 100644 --- a/patches/chromium/pepper_plugin_support.patch +++ b/patches/chromium/pepper_plugin_support.patch @@ -7,7 +7,7 @@ This tweaks Chrome's pepper flash and PDF plugin support to make it usable from Electron. diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc -index 7004be59929ebe573e304c7e4dfb529f54889b80..99f0edae518ad00c04ce2120eca30d6cd53e7a20 100644 +index 6c0f86dc6f588891f9e4b2ff00f39727fd6e03ef..99b8a4d6fe607ce9b502985c971ce3888aee49b5 100644 --- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc +++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc @@ -7,17 +7,21 @@ @@ -94,7 +94,7 @@ index 7004be59929ebe573e304c7e4dfb529f54889b80..99f0edae518ad00c04ce2120eca30d6c - return OpenCrxFileSystem(context); + return PP_ERROR_NOTSUPPORTED; } - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); context->reply_msg = @@ -133,6 +144,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( return PP_ERROR_FAILED; diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 27d7546d03fe..d1a7d193138d 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -9,10 +9,10 @@ don't get errors for Chrome's generated resources, which are non-existent because we don't generate them in our build. diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc -index 1a0c7f5f204f00b52747ebb7800b39a3479f1178..52a1b350c8b5a13b4c0636b43f4773b72872f025 100644 +index d236578cefc347e772305ac7ec54b9734e4aa20b..6bb89cea3b6b91ec8ea351ed60c4e4056a6340bb 100644 --- a/chrome/browser/ui/views/overlay/close_image_button.cc +++ b/chrome/browser/ui/views/overlay/close_image_button.cc -@@ -4,11 +4,14 @@ +@@ -4,10 +4,13 @@ #include "chrome/browser/ui/views/overlay/close_image_button.h" @@ -21,26 +21,25 @@ index 1a0c7f5f204f00b52747ebb7800b39a3479f1178..52a1b350c8b5a13b4c0636b43f4773b7 #include "chrome/browser/ui/color/chrome_color_id.h" #include "chrome/grit/generated_resources.h" +#if BUILDFLAG(GOOGLE_CHROME_BRANDING) - #include "components/omnibox/browser/omnibox_field_trial.h" #include "components/vector_icons/vector_icons.h" +#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" -@@ -28,9 +31,11 @@ CloseImageButton::CloseImageButton(PressedCallback callback) +@@ -27,7 +30,10 @@ CloseImageButton::CloseImageButton(PressedCallback callback) + : OverlayWindowImageButton(std::move(callback)) { SetSize(gfx::Size(kCloseButtonSize, kCloseButtonSize)); - auto* icon = &views::kIcCloseIcon; +- auto* icon = &vector_icons::kCloseChromeRefreshIcon; ++ auto* icon = &views::kIcCloseIcon; +#if BUILDFLAG(GOOGLE_CHROME_BRANDING) - if (OmniboxFieldTrial::IsChromeRefreshIconsEnabled()) { - icon = &vector_icons::kCloseChromeRefreshIcon; - } ++ icon = &vector_icons::kCloseChromeRefreshIcon; +#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) SetImageModel(views::Button::STATE_NORMAL, ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground, kCloseButtonIconSize)); diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -index 8110f1c5909e8996b1d847267f0aab3eff8339fa..28d3689be10469fa9f6bd8e608717c4d13a92620 100644 +index 2de1e8257b1fb47078326774e841404f7695165a..62280109a74b5d606f16503151a98449147cc660 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc @@ -17,9 +17,11 @@ @@ -55,7 +54,7 @@ index 8110f1c5909e8996b1d847267f0aab3eff8339fa..28d3689be10469fa9f6bd8e608717c4d #include "chrome/browser/ui/color/chrome_color_id.h" #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h" #include "chrome/browser/ui/views/overlay/close_image_button.h" -@@ -58,7 +60,7 @@ +@@ -59,7 +61,7 @@ #include "ui/aura/window.h" #endif @@ -64,7 +63,7 @@ index 8110f1c5909e8996b1d847267f0aab3eff8339fa..28d3689be10469fa9f6bd8e608717c4d #include "chrome/browser/shell_integration_win.h" #include "content/public/browser/render_widget_host_view.h" #include "ui/aura/window.h" -@@ -310,7 +312,7 @@ std::unique_ptr VideoOverlayWindowViews::Create( +@@ -312,7 +314,7 @@ std::unique_ptr VideoOverlayWindowViews::Create( overlay_window->Init(std::move(params)); overlay_window->OnRootViewReady(); diff --git a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch index ae3e46888ed3..8100185f59c5 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index 40817ddda3e9acc6a753f13dd789ceb281ca4080..b8a01f8aa060862076d205350ca55a0d7dcd0b52 100644 +index ae05bb69f1792235594682441fb721558e910fc0..68d8b04c7f3a29f6408aa99241bebc9fe9aaf480 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h -@@ -411,6 +411,10 @@ +@@ -407,6 +407,10 @@ E_CPONLY(kColorRadioButtonForegroundUnchecked) \ E_CPONLY(kColorRadioButtonForegroundDisabled) \ E_CPONLY(kColorRadioButtonForegroundChecked) \ @@ -22,7 +22,7 @@ index 40817ddda3e9acc6a753f13dd789ceb281ca4080..b8a01f8aa060862076d205350ca55a0d E_CPONLY(kColorSegmentedButtonBorder) \ E_CPONLY(kColorSegmentedButtonFocus) \ E_CPONLY(kColorSegmentedButtonForegroundChecked) \ -@@ -515,6 +519,7 @@ +@@ -511,6 +515,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ @@ -31,10 +31,10 @@ index 40817ddda3e9acc6a753f13dd789ceb281ca4080..b8a01f8aa060862076d205350ca55a0d /* ui::NativeThemeBase::ControlColorId. */ \ E_CPONLY(kColorWebNativeControlAccent) \ diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc -index b4893b65b0955a76c8f4fb2d16ec21bfabe602b7..936462132d2c37a69272e11f922bcdcd71d426b9 100644 +index 6ec67f8c283779fc76d38ba15c095152bf3aba76..964cd58619476634299c067498f09d4665117c93 100644 --- a/ui/color/ui_color_mixer.cc +++ b/ui/color/ui_color_mixer.cc -@@ -200,6 +200,17 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) { +@@ -180,6 +180,17 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) { mixer[kColorProgressBarPaused] = {kColorDisabledForeground}; mixer[kColorRadioButtonForegroundChecked] = {kColorButtonForeground}; mixer[kColorRadioButtonForegroundUnchecked] = {kColorSecondaryForeground}; @@ -52,7 +52,7 @@ index b4893b65b0955a76c8f4fb2d16ec21bfabe602b7..936462132d2c37a69272e11f922bcdcd mixer[kColorSeparator] = {kColorMidground}; mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800}; mixer[kColorShadowValueAmbientShadowElevationThree] = -@@ -311,6 +322,7 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) { +@@ -291,6 +302,7 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) { mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground}; mixer[kColorTreeNodeForegroundSelectedUnfocused] = { kColorTreeNodeForegroundSelectedFocused}; diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 52ca5eb3e078..0db287ec5b97 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/BUILD.gn b/BUILD.gn -index 8f91d4fe0053d6013be38eff24a7c7df1653dd8a..ddae4d8c3fc9dd3d40cde80d810ebc5418d6e3f7 100644 +index a958dad6344b8660b38c3143f1dcf792a3bab43b..df6fd814d703bed76a7eba2ab54cacc3a79a63d0 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -969,7 +969,6 @@ if (is_win) { +@@ -978,7 +978,6 @@ if (is_win) { "//media:media_unittests", "//media/midi:midi_unittests", "//net:net_unittests", @@ -22,7 +22,7 @@ index 8f91d4fe0053d6013be38eff24a7c7df1653dd8a..ddae4d8c3fc9dd3d40cde80d810ebc54 "//sql:sql_unittests", "//third_party/breakpad:symupload($host_toolchain)", "//ui/base:ui_base_unittests", -@@ -978,6 +977,10 @@ if (is_win) { +@@ -987,6 +986,10 @@ if (is_win) { "//ui/views:views_unittests", "//url:url_unittests", ] @@ -34,7 +34,7 @@ index 8f91d4fe0053d6013be38eff24a7c7df1653dd8a..ddae4d8c3fc9dd3d40cde80d810ebc54 } diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc -index 3197e16ac26f17258bf3ef988df0f0e39c0df8ac..89d618a39c89ad3eb0069f2b5bd67f6024c3260e 100644 +index 163eacc8bb6654880d37111923a87ea5a6134485..565258e9bd4cc52e347e1f4a72ee29ec4a847690 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc @@ -97,6 +97,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) { @@ -91,7 +91,7 @@ index 3197e16ac26f17258bf3ef988df0f0e39c0df8ac..89d618a39c89ad3eb0069f2b5bd67f60 : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2835ec453 100644 +index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d28a6e5af1 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -87,6 +87,20 @@ namespace printing { @@ -187,6 +187,15 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 for (auto& observer : GetTestObservers()) { observer.OnPrintNow(rfh); +@@ -295,7 +319,7 @@ void PrintViewManagerBase::PrintDocument( + const gfx::Size& page_size, + const gfx::Rect& content_area, + const gfx::Point& offsets) { +-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS) ++#if 0 + if (content_analysis_before_printing_document_) { + std::move(content_analysis_before_printing_document_) + .Run(print_data, page_size, content_area, offsets); @@ -342,12 +366,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea( } PRINTER_LOG(EVENT) << "Paper printable area updated for vendor id " @@ -223,7 +232,34 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 set_cookie(settings->params->document_cookie); std::move(callback).Run(std::move(settings)); } -@@ -740,10 +770,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -436,7 +466,7 @@ void PrintViewManagerBase::StartLocalPrintJob( + PrinterHandler::PrintCallback callback) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + +-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS) ++#if 0 + // Populating `content_analysis_before_printing_document_` if needed should be + // done first in this function's workflow, this way other code can check if + // content analysis is going to happen and delay starting `print_job_` to +@@ -669,7 +699,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings( + + #if BUILDFLAG(ENABLE_OOP_PRINTING) + if (ShouldPrintJobOop() && +-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS) ++#if 0 + !analyzing_content_ && + #endif + !query_with_ui_client_id().has_value()) { +@@ -697,7 +727,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings( + + // Sometimes it is desired to get the PDF settings as opposed to the settings + // of the default system print driver. +-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS) ++#if 0 + bool want_pdf_settings = analyzing_content_; + #else + bool want_pdf_settings = false; +@@ -741,10 +771,7 @@ void PrintViewManagerBase::UpdatePrintSettings( // `job_settings` does not yet contain the rasterized PDF dpi, so if the user // has the print preference set, fetch it for use in // `PrintSettingsFromJobSettings()`. @@ -235,7 +271,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 if (prefs && prefs->HasPrefPath(prefs::kPrintRasterizePdfDpi)) { int value = prefs->GetInteger(prefs::kPrintRasterizePdfDpi); if (value > 0) -@@ -768,8 +795,22 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -769,8 +796,22 @@ void PrintViewManagerBase::UpdatePrintSettings( } } @@ -260,7 +296,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 // fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()` // for in-browser queries. if (printer_type == mojom::PrinterType::kLocal) { -@@ -790,8 +831,6 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -791,8 +832,6 @@ void PrintViewManagerBase::UpdatePrintSettings( } #endif @@ -269,7 +305,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 } void PrintViewManagerBase::SetAccessibilityTree( -@@ -807,7 +846,7 @@ void PrintViewManagerBase::SetAccessibilityTree( +@@ -808,7 +847,7 @@ void PrintViewManagerBase::SetAccessibilityTree( void PrintViewManagerBase::IsPrintingEnabled( IsPrintingEnabledCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -278,7 +314,16 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 } void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, -@@ -863,11 +902,9 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, +@@ -834,7 +873,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, + return; + } + #endif +-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS) ++#if 0 + std::optional + scanning_data = enterprise_data_protection::GetPrintAnalysisData( + web_contents(), enterprise_data_protection::PrintScanningContext:: +@@ -864,11 +903,9 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie, // destroyed. In such cases the error notification to the user will // have already been displayed, and a second message should not be // shown. @@ -292,7 +337,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 ReleasePrinterQuery(); } -@@ -879,15 +916,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) { +@@ -880,15 +917,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) { test_observers_.RemoveObserver(&observer); } @@ -317,7 +362,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 } void PrintViewManagerBase::RenderFrameDeleted( -@@ -935,7 +981,7 @@ void PrintViewManagerBase::SystemDialogCancelled() { +@@ -936,7 +982,7 @@ void PrintViewManagerBase::SystemDialogCancelled() { #endif bool PrintViewManagerBase::GetPrintingEnabledBooleanPref() const { @@ -326,7 +371,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 } void PrintViewManagerBase::OnDocDone(int job_id, PrintedDocument* document) { -@@ -952,7 +998,12 @@ void PrintViewManagerBase::OnJobDone() { +@@ -953,7 +999,12 @@ void PrintViewManagerBase::OnJobDone() { // Printing is done, we don't need it anymore. // print_job_->is_job_pending() may still be true, depending on the order // of object registration. @@ -340,7 +385,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 ReleasePrintJob(); } -@@ -961,9 +1012,9 @@ void PrintViewManagerBase::OnCanceling() { +@@ -962,9 +1013,9 @@ void PrintViewManagerBase::OnCanceling() { } void PrintViewManagerBase::OnFailed() { @@ -352,7 +397,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 TerminatePrintJob(true); } -@@ -973,7 +1024,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { +@@ -974,7 +1025,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() { // Is the document already complete? if (print_job_->document() && print_job_->document()->IsComplete()) { @@ -361,7 +406,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 return true; } -@@ -1026,7 +1077,10 @@ bool PrintViewManagerBase::SetupNewPrintJob( +@@ -1027,7 +1078,10 @@ bool PrintViewManagerBase::SetupNewPrintJob( // Disconnect the current `print_job_`. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -373,7 +418,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 if (!weak_this) return false; -@@ -1046,7 +1100,7 @@ bool PrintViewManagerBase::SetupNewPrintJob( +@@ -1047,7 +1101,7 @@ bool PrintViewManagerBase::SetupNewPrintJob( #endif print_job_->AddObserver(*this); @@ -382,7 +427,16 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 return true; } -@@ -1114,6 +1168,11 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -1105,7 +1159,7 @@ void PrintViewManagerBase::ReleasePrintJob() { + // Ensure that any residual registration of printing client is released. + // This might be necessary in some abnormal cases, such as the associated + // render process having terminated. +-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS) ++#if 0 + if (!analyzing_content_) { + UnregisterSystemPrintClient(); + } +@@ -1115,6 +1169,11 @@ void PrintViewManagerBase::ReleasePrintJob() { } #endif @@ -394,7 +448,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 if (!print_job_) return; -@@ -1121,7 +1180,7 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -1122,7 +1181,7 @@ void PrintViewManagerBase::ReleasePrintJob() { // printing_rfh_ should only ever point to a RenderFrameHost with a live // RenderFrame. DCHECK(rfh->IsRenderFrameLive()); @@ -403,7 +457,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 } print_job_->RemoveObserver(*this); -@@ -1163,7 +1222,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -1164,7 +1223,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -412,7 +466,16 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 return true; if (!cookie) { -@@ -1317,6 +1376,8 @@ void PrintViewManagerBase::CompleteScriptedPrint( +@@ -1187,7 +1246,7 @@ bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { + return false; + } + +-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS) ++#if 0 + // Don't start printing if enterprise checks are being performed to check if + // printing is allowed, or if content analysis is going to take place right + // before starting `print_job_`. +@@ -1318,6 +1377,8 @@ void PrintViewManagerBase::CompleteScriptedPrint( auto callback_wrapper = base::BindOnce( &PrintViewManagerBase::ScriptedPrintReply, weak_ptr_factory_.GetWeakPtr(), std::move(callback), render_process_host->GetID()); @@ -421,7 +484,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 #if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) DisableThirdPartyBlocking(); #endif -@@ -1331,7 +1392,7 @@ void PrintViewManagerBase::CompleteScriptedPrint( +@@ -1332,10 +1393,10 @@ void PrintViewManagerBase::CompleteScriptedPrint( params->expected_pages_count, params->has_selection, params->margin_type, params->is_scripted, !render_process_host->IsPdf(), base::BindOnce(&OnDidScriptedPrint, queue_, std::move(printer_query), @@ -429,9 +492,13 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2 + std::move(callback_wrapper), std::move(cancel_job_wrapper))); } - #if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS) +-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS) ++#if 0 + void PrintViewManagerBase::CompletePrintDocumentAfterContentAnalysis( + scoped_refptr print_data, + const gfx::Size& page_size, diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 1917f8b94962d7a4c83f139623a5f5d352011627..1fcc90cf6f9c143b956d9d9422098e85bbf54b21 100644 +index 1917f8b94962d7a4c83f139623a5f5d352011627..47ef610c43c4dcfee0cf528eb2e6075b579117ee 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h @@ -52,6 +52,8 @@ class PrinterQuery; @@ -480,6 +547,15 @@ index 1917f8b94962d7a4c83f139623a5f5d352011627..1fcc90cf6f9c143b956d9d9422098e85 protected: #if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS) using PrintDocumentCallback = +@@ -229,7 +243,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { + mojom::ScriptedPrintParamsPtr params, + ScriptedPrintCallback callback); + +-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS) ++#if 0 + // Helper method bound to `content_analysis_before_printing_document_` when + // content analysis should happen right before the document is to be printed. + // This method is virtual for testing purposes. @@ -293,6 +307,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { bool success); #endif @@ -555,10 +631,10 @@ index ca71560874a0189068dd11fbc039f5673bf6bd96..a8551d95e64da2afbc1685b2df8f1fc3 mojom::PrintFailureReason reason) override; diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index 4ecdb28904fac480cf102fffdff24ae008ac88cf..0d7d20c1a7920b1961585b345d30d9969411ca9e 100644 +index 3c2fdc9f9a6c60efc4b0afacbfb83eef55917791..8fd9aff538fa03da6c171927c316d4f611c46da1 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom -@@ -302,7 +302,7 @@ union PrintWithParamsResult { +@@ -303,7 +303,7 @@ union PrintWithParamsResult { 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. @@ -567,7 +643,7 @@ index 4ecdb28904fac480cf102fffdff24ae008ac88cf..0d7d20c1a7920b1961585b345d30d996 // Requests the frame to be printed with specified parameters. This is used // to programmatically produce PDF by request from the browser (e.g. over -@@ -391,6 +391,9 @@ interface PrintManagerHost { +@@ -392,6 +392,9 @@ interface PrintManagerHost { [Sync] ScriptedPrint(ScriptedPrintParams params) => (PrintPagesParams? settings); @@ -578,10 +654,10 @@ index 4ecdb28904fac480cf102fffdff24ae008ac88cf..0d7d20c1a7920b1961585b345d30d996 PrintingFailed(int32 cookie, PrintFailureReason reason); diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd7e2798cc 100644 +index 1c12ab70d993b742ee73b1235ecfdd3239125e97..b24751087f4015fc6b93518af95b0911529d3c6e 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -50,6 +50,7 @@ +@@ -51,6 +51,7 @@ #include "printing/mojom/print.mojom.h" #include "printing/page_number.h" #include "printing/print_job_constants.h" @@ -589,7 +665,7 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd #include "printing/units.h" #include "services/metrics/public/cpp/ukm_source_id.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" -@@ -1313,14 +1314,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1224,14 +1225,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { } print_in_progress_ = true; @@ -606,16 +682,39 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd if (!weak_this) { return; } -@@ -1351,7 +1352,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1262,12 +1263,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } -void PrintRenderFrameHelper::PrintRequestedPages() { +- PrintRequestedPagesInternal(/*already_notified_frame=*/false); +void PrintRenderFrameHelper::PrintRequestedPages(base::Value::Dict settings) { ++ PrintRequestedPagesInternal(/*already_notified_frame=*/false, ++ std::move(settings)); + } + + void PrintRenderFrameHelper::PrintRequestedPagesInternal( +- bool already_notified_frame) { ++ bool already_notified_frame, ++ base::Value::Dict settings) { ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); - if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) + if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) { return; -@@ -1366,7 +1367,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1284,9 +1287,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( + + is_loading_ = frame->WillPrintSoon(); + if (is_loading_) { +- on_stop_loading_closure_ = base::BindOnce( +- &PrintRenderFrameHelper::PrintRequestedPagesInternal, +- weak_ptr_factory_.GetWeakPtr(), /*already_notified_frame=*/true); ++ on_stop_loading_closure_ = ++ base::BindOnce(&PrintRenderFrameHelper::PrintRequestedPagesInternal, ++ weak_ptr_factory_.GetWeakPtr(), ++ /*already_notified_frame=*/true, std::move(settings)); + SetupOnStopLoadingTimeout(); + return; + } +@@ -1296,7 +1300,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -624,7 +723,7 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd if (render_frame_gone_) { return; -@@ -1523,6 +1524,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { +@@ -1453,6 +1457,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -633,7 +732,7 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -2110,17 +2113,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2045,17 +2051,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -656,7 +755,7 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd DidFinishPrinting(PrintingResult::kFailPrintInit); return; } -@@ -2141,8 +2146,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2076,8 +2084,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -673,7 +772,7 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd // Check if `this` is still valid. if (!self) return; -@@ -2404,29 +2416,37 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2338,29 +2353,37 @@ void PrintRenderFrameHelper::IPCProcessed() { } bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame, @@ -719,10 +818,10 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd } diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index b0ac94751454bd16b4e9bfdc071e2623813133ec..2631e9019e4c6617e2a8a90d30a21ca5552f1d67 100644 +index 14de029740ffbebe06d309651c1a2c007d9fb96b..e9bf9c5bef2a9235260e7d6c8d26d41528e38661 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h -@@ -245,7 +245,7 @@ class PrintRenderFrameHelper +@@ -251,7 +251,7 @@ class PrintRenderFrameHelper mojo::PendingAssociatedReceiver receiver); // printing::mojom::PrintRenderFrame: @@ -731,7 +830,7 @@ index b0ac94751454bd16b4e9bfdc071e2623813133ec..2631e9019e4c6617e2a8a90d30a21ca5 void PrintWithParams(mojom::PrintPagesParamsPtr params, PrintWithParamsCallback callback) override; #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -312,7 +312,8 @@ class PrintRenderFrameHelper +@@ -318,7 +318,8 @@ class PrintRenderFrameHelper // WARNING: |this| may be gone after this method returns. void Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -741,7 +840,7 @@ index b0ac94751454bd16b4e9bfdc071e2623813133ec..2631e9019e4c6617e2a8a90d30a21ca5 // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); -@@ -322,7 +323,8 @@ class PrintRenderFrameHelper +@@ -328,7 +329,8 @@ class PrintRenderFrameHelper // Initialize print page settings with default settings. // Used only for native printing workflow. bool InitPrintSettings(blink::WebLocalFrame* frame, @@ -751,11 +850,21 @@ index b0ac94751454bd16b4e9bfdc071e2623813133ec..2631e9019e4c6617e2a8a90d30a21ca5 // Calculate number of pages in source document. uint32_t CalculateNumberOfPages(blink::WebLocalFrame* frame, +@@ -625,7 +627,8 @@ class PrintRenderFrameHelper + }; + + void SetupOnStopLoadingTimeout(); +- void PrintRequestedPagesInternal(bool already_notified_frame); ++ void PrintRequestedPagesInternal(bool already_notified_frame, ++ base::Value::Dict settings); + + ScriptingThrottler scripting_throttler_; + diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 3b33b098d4617eef7dd0a8084e27a00c0d02449c..0de190f5d57634a0b5bc229f78dd820a50a8fb95 100644 +index 24b1ea6fc5fef18b199518ae730713baaa8c0530..663bce7e031c11417d9e54c78a99fdf17bb7bd13 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -2935,8 +2935,9 @@ source_set("browser") { +@@ -2963,8 +2963,9 @@ source_set("browser") { "//ppapi/shared_impl", ] @@ -768,7 +877,7 @@ index 3b33b098d4617eef7dd0a8084e27a00c0d02449c..0de190f5d57634a0b5bc229f78dd820a if (is_chromeos) { sources += [ diff --git a/printing/printing_context.cc b/printing/printing_context.cc -index 87ffdf6f44029700ef615b16366e3a9805e7d3ff..ea407211ca4e33b87de5ed6002ebe1a2ef76372f 100644 +index e9d9b148387313d8f6dd399d69a69272a511e6b4..a97983e9736daffdfeb713ae7b263f146f79ad0b 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc @@ -154,7 +154,6 @@ void PrintingContext::UsePdfSettings() { diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index 573bb5510448..907ab3e5cb03 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -51,7 +51,7 @@ index 23a8257aa2a0a671cf7af35aff9906891091606d..31f5b160e4cd755cfb56a62b04261ee1 base::win::MessageWindow window_; // The message-only window. bool is_virtualized_; // Stuck inside Microsoft Softricity VM environment. diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index f2913f2d78edb2547ae21816b34936d38f1870a9..298c9c81fa110ad7900d0bd6822136bb57f0382e 100644 +index c3cf6e083105159fbb815f3754423d276d416036..2205fa3ee2bd2611bad0594680a7cdee270f4f5e 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -54,6 +54,7 @@ @@ -90,7 +90,7 @@ index f2913f2d78edb2547ae21816b34936d38f1870a9..298c9c81fa110ad7900d0bd6822136bb ui::ScopedStartupResourceBundle ensure_startup_resource_bundle; @@ -366,6 +370,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); return false; +#endif } @@ -129,7 +129,7 @@ index f2913f2d78edb2547ae21816b34936d38f1870a9..298c9c81fa110ad7900d0bd6822136bb } ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { -@@ -1047,11 +1071,32 @@ bool ProcessSingleton::Create() { +@@ -1048,11 +1072,32 @@ bool ProcessSingleton::Create() { // Create the socket file somewhere in /tmp which is usually mounted as a // normal filesystem. Some network filesystems (notably AFS) are screwy and // do not support Unix domain sockets. diff --git a/patches/chromium/proxy_config_monitor.patch b/patches/chromium/proxy_config_monitor.patch index fa20ca345154..47fd6060a7b0 100644 --- a/patches/chromium/proxy_config_monitor.patch +++ b/patches/chromium/proxy_config_monitor.patch @@ -6,7 +6,7 @@ Subject: proxy_config_monitor.patch Allow monitoring proxy config changes for a pref service. diff --git a/chrome/browser/net/proxy_config_monitor.cc b/chrome/browser/net/proxy_config_monitor.cc -index c9281f7abfbdeaa4f0d9fe3c199b34fcb5acaf2c..10c008a225d7f88bc2cc39ae0a84580f8ef10a7d 100644 +index c2adfa2bd0f79038cb50c69607827aef8fecca59..3db9b93e7c98544de7488ab97ad4a5addefdd2cd 100644 --- a/chrome/browser/net/proxy_config_monitor.cc +++ b/chrome/browser/net/proxy_config_monitor.cc @@ -11,7 +11,9 @@ 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 b01115c44315..b9ef0a4147f4 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 a3f999654e191d925936c6dd9f041340c1d5cd30..db8a4efd188509f126962e240e9bc1f356962533 100644 +index e8738cf3a033f69a2e8eaf06f1a9f61bf83e9066..b3777cb41cb5c6b007122ae808732765c6c3e40d 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h -@@ -24,6 +24,7 @@ - #include "third_party/blink/public/mojom/input/input_handler.mojom-shared.h" +@@ -26,6 +26,7 @@ #include "third_party/blink/public/mojom/manifest/display_mode.mojom.h" #include "ui/base/ui_base_types.h" + #include "ui/gfx/mojom/delegated_ink_point_renderer.mojom.h" +#include "ui/base/cursor/cursor.h" #include "ui/gfx/native_widget_types.h" namespace blink { -@@ -271,6 +272,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { +@@ -285,6 +286,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { // Returns the associated RenderViewHostDelegateView*, if possible. virtual RenderViewHostDelegateView* GetDelegateView(); @@ -30,10 +30,10 @@ index a3f999654e191d925936c6dd9f041340c1d5cd30..db8a4efd188509f126962e240e9bc1f3 // RenderWidgetHost on the primary main frame, and false otherwise. virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*); diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index d067f0ba15c1898707bd039c19996c8850c7aa72..6801f228e67d7931919b7eb32f20a933a673ed8b 100644 +index 3452aa6a281f2a97c2708d66fd4aa7e2bce1e1f9..aa0231253c3f707a2779e773e593dede41f6287e 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2038,6 +2038,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { +@@ -2084,6 +2084,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { if (view_) { view_->UpdateCursor(cursor); } @@ -44,10 +44,10 @@ index d067f0ba15c1898707bd039c19996c8850c7aa72..6801f228e67d7931919b7eb32f20a933 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index ab6a5a975cc9b88ea9ea48d213d5fc49a4efe6a9..330d6900e5e43a22ce554f7ceaa61d986a3c001e 100644 +index 50a6d0835c70795a3c7865c305b9389936939ee9..92f2823839cdfd6139a7f13684d2649b7e230964 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5296,6 +5296,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -5404,6 +5404,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -60,10 +60,10 @@ index ab6a5a975cc9b88ea9ea48d213d5fc49a4efe6a9..330d6900e5e43a22ce554f7ceaa61d98 RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 6e8e83088b54ffe6c509faaca1fd61b16cb5874e..cf64872c2070ef511c8b06f2884fb7866061fa8e 100644 +index c00653f5cb694f07dd20f2e8f4a672e285a9a724..d469afd4bbd0013784d8a0cffa0622a6225d2c87 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1056,6 +1056,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1078,6 +1078,7 @@ class CONTENT_EXPORT WebContentsImpl void SendScreenRects() override; void SendActiveState(bool active) override; TextInputManager* GetTextInputManager() override; @@ -72,7 +72,7 @@ index 6e8e83088b54ffe6c509faaca1fd61b16cb5874e..cf64872c2070ef511c8b06f2884fb786 RenderWidgetHostImpl* render_widget_host) override; bool IsShowingContextMenuOnPage() const override; diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h -index f21a4be4f0c3dec07c33549f34002188f715ad4e..f0c2a990a0580c33f24f7918293e88f7cf2e0d86 100644 +index 33ce8386f5ca581fb5235f576b30f397cf70dc21..dded86686fb51c2d143cd07a7993ca1be2f462d9 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -33,6 +33,7 @@ @@ -83,7 +83,7 @@ index f21a4be4f0c3dec07c33549f34002188f715ad4e..f0c2a990a0580c33f24f7918293e88f7 #include "ui/base/page_transition_types.h" #include "ui/base/window_open_disposition.h" -@@ -584,6 +585,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { +@@ -592,6 +593,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { // Invoked when the primary main frame changes size. virtual void PrimaryMainFrameWasResized(bool width_changed) {} diff --git a/patches/chromium/refactor_expose_file_system_access_blocklist.patch b/patches/chromium/refactor_expose_file_system_access_blocklist.patch index e6e7746aadb4..ceb6ced3aba6 100644 --- a/patches/chromium/refactor_expose_file_system_access_blocklist.patch +++ b/patches/chromium/refactor_expose_file_system_access_blocklist.patch @@ -8,7 +8,7 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w to upstream this change to Chrome. diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -index a68fd4f139ca92e154da5293481e4d8795cfff16..920e5824b899f02f7849a9fe5dd3c54be38e82a2 100644 +index 0103c97b187815fe63be677a7dcc5db7f4b85199..6c5d0b0a8713411e3bccdc16afa1a829ad7d63b2 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc @@ -38,7 +38,6 @@ @@ -19,7 +19,7 @@ index a68fd4f139ca92e154da5293481e4d8795cfff16..920e5824b899f02f7849a9fe5dd3c54b #include "chrome/grit/generated_resources.h" #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/content_settings/core/common/content_settings.h" -@@ -222,120 +221,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) { +@@ -222,118 +221,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) { } #endif @@ -68,9 +68,7 @@ index a68fd4f139ca92e154da5293481e4d8795cfff16..920e5824b899f02f7849a9fe5dd3c54b - {chrome::DIR_DEFAULT_DOWNLOADS_SAFE, nullptr, kDontBlockChildren}, - // The Chrome installation itself should not be modified by the web. - {base::DIR_EXE, nullptr, kBlockAllChildren}, --#if !BUILDFLAG(IS_FUCHSIA) - {base::DIR_MODULE, nullptr, kBlockAllChildren}, --#endif - {base::DIR_ASSETS, nullptr, kBlockAllChildren}, - // And neither should the configuration of at least the currently running - // Chrome instance (note that this does not take --user-data-dir command @@ -145,7 +143,7 @@ index a68fd4f139ca92e154da5293481e4d8795cfff16..920e5824b899f02f7849a9fe5dd3c54b // Describes a rule for blocking a directory, which can be constructed // dynamically (based on state) or statically (from kBlockedPaths). diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h -index dfbb68029c01d29616ae73e3d36fdcd24c64f39f..bd5b673e07b2718a7377fc56363e300d9a99cfa1 100644 +index 62cbdc561d99e87feecc6f204ece7d1b8fcdee59..98d1ce1d2f4c2443cde417911249f10027f6eb0e 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h @@ -17,12 +17,13 @@ @@ -173,7 +171,7 @@ index dfbb68029c01d29616ae73e3d36fdcd24c64f39f..bd5b673e07b2718a7377fc56363e300d #include "chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.h" #include "components/enterprise/common/files_scan_data.h" #endif -@@ -331,6 +333,121 @@ class ChromeFileSystemAccessPermissionContext +@@ -334,6 +336,119 @@ class ChromeFileSystemAccessPermissionContext // chrome://settings/content/filesystem UI. static constexpr char kPermissionPathKey[] = "path"; @@ -222,9 +220,7 @@ index dfbb68029c01d29616ae73e3d36fdcd24c64f39f..bd5b673e07b2718a7377fc56363e300d + {chrome::DIR_DEFAULT_DOWNLOADS_SAFE, nullptr, kDontBlockChildren}, + // The Chrome installation itself should not be modified by the web. + {base::DIR_EXE, nullptr, kBlockAllChildren}, -+ #if !BUILDFLAG(IS_FUCHSIA) + {base::DIR_MODULE, nullptr, kBlockAllChildren}, -+ #endif + {base::DIR_ASSETS, nullptr, kBlockAllChildren}, + // And neither should the configuration of at least the currently running + // Chrome instance (note that this does not take --user-data-dir command @@ -295,7 +291,7 @@ index dfbb68029c01d29616ae73e3d36fdcd24c64f39f..bd5b673e07b2718a7377fc56363e300d protected: SEQUENCE_CHECKER(sequence_checker_); -@@ -350,7 +467,7 @@ class ChromeFileSystemAccessPermissionContext +@@ -353,7 +468,7 @@ class ChromeFileSystemAccessPermissionContext void PermissionGrantDestroyed(PermissionGrantImpl* grant); diff --git a/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch b/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch index 982d11135c3a..ad0a7a102418 100644 --- a/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch +++ b/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch @@ -7,10 +7,10 @@ Subject: refactor: expose HostImportModuleDynamically and This is so that Electron can blend Blink's and Node's implementations of these isolate handlers. diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -index a27f96ee76013afcc8ccdd81828a76fcb024ea86..9a80a208be228403a2e67c296c74d2e03ffa952a 100644 +index e3db7b29078b65f50103d0cd1b0f28756f3d80e4..639dd7afebf50d2ec542cad930dd922fdc7186a3 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -@@ -627,7 +627,9 @@ bool JavaScriptCompileHintsMagicEnabledCallback( +@@ -630,7 +630,9 @@ bool JavaScriptCompileHintsMagicEnabledCallback( execution_context); } @@ -21,7 +21,7 @@ index a27f96ee76013afcc8ccdd81828a76fcb024ea86..9a80a208be228403a2e67c296c74d2e0 v8::Local context, v8::Local v8_host_defined_options, v8::Local v8_referrer_resource_url, -@@ -704,7 +706,7 @@ v8::MaybeLocal HostImportModuleDynamically( +@@ -708,7 +710,7 @@ v8::MaybeLocal HostImportModuleDynamically( } // https://html.spec.whatwg.org/C/#hostgetimportmetaproperties @@ -29,8 +29,8 @@ index a27f96ee76013afcc8ccdd81828a76fcb024ea86..9a80a208be228403a2e67c296c74d2e0 +void V8Initializer::HostGetImportMetaProperties(v8::Local context, v8::Local module, v8::Local meta) { - ScriptState* script_state = ScriptState::From(context); -@@ -747,9 +749,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) { + v8::Isolate* isolate = context->GetIsolate(); +@@ -751,9 +753,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) { return os; } @@ -40,7 +40,7 @@ index a27f96ee76013afcc8ccdd81828a76fcb024ea86..9a80a208be228403a2e67c296c74d2e0 void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { // Set up garbage collection before setting up anything else as V8 may trigger // GCs during Blink setup. -@@ -771,9 +770,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { +@@ -775,9 +774,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) { SharedArrayBufferConstructorEnabledCallback); isolate->SetJavaScriptCompileHintsMagicEnabledCallback( JavaScriptCompileHintsMagicEnabledCallback); diff --git a/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch b/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch index 0ab73c766ea3..c04172ee0e51 100644 --- a/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch +++ b/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch @@ -23,7 +23,7 @@ index 30a7e6a641e7b17a47fb5c66fb44d3d5899b9e78..85764a533585df0abe398758e4fd510c +#endif } diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc -index f363f4a01e22131bdcc32b672c4a0d2f88ddf627..1b5ad6fe48acf214920c018bb7acb5fc86d61455 100644 +index 12b649c4fcc23318b68f3d66076d34f95fd6b07d..6e2d839eb0e7ec1aa260f41904f78b1b2a2cbf73 100644 --- a/chrome/browser/profiles/profile_selections.cc +++ b/chrome/browser/profiles/profile_selections.cc @@ -120,6 +120,7 @@ Profile* ProfileSelections::ApplyProfileSelection(Profile* profile) const { @@ -37,7 +37,7 @@ index f363f4a01e22131bdcc32b672c4a0d2f88ddf627..1b5ad6fe48acf214920c018bb7acb5fc @@ -155,6 +156,7 @@ ProfileSelection ProfileSelections::GetProfileSelection( } - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); +#endif return ProfileSelection::kNone; } diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index 193033a84f2e..d8efc1038d27 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 88452d8cdb4d9f58a23f2754fd2e79d4765feecd..8abed23ed360f266d024f468875b7f7645d66bf3 100644 +index 31fb2a66ac5bed634f3d31f4f93d040293c30c0d..ad42e2d94ab498dd30968e62aebd62e14f8161ab 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -733,6 +733,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableForIOv2For( +@@ -742,6 +742,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableForIOv2For( return false; } @@ -24,27 +24,27 @@ index 88452d8cdb4d9f58a23f2754fd2e79d4765feecd..8abed23ed360f266d024f468875b7f76 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 1a3715bb7bd6f82398cf0b4953ff8c5636233424..2ab7e8670d6795f7587b5da5d78a546adda76f5a 100644 +index 1a7932a580836bae3b92c63aa9bfeb56b250ee61..dc31ac9ef4dc708b44afb806d311e38a4f0597a3 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h -@@ -26,10 +26,13 @@ - #include "components/viz/host/hit_test/hit_test_query.h" +@@ -26,10 +26,12 @@ + #include "components/viz/common/surfaces/scoped_surface_id_allocator.h" + #include "components/viz/common/surfaces/surface_id.h" #include "content/browser/renderer_host/display_feature.h" - #include "content/browser/renderer_host/render_widget_host_view_input.h" +-#include "content/common/content_export.h" +#include "content/browser/renderer_host/visible_time_request_trigger.h" +#include "content/browser/web_contents/web_contents_view.h" - #include "content/common/content_export.h" - #include "content/common/input/event_with_latency_info.h" #include "content/common/input/input_router_impl.h" + #include "content/common/input/render_widget_host_view_input.h" #include "content/public/browser/render_frame_metadata_provider.h" +#include "content/public/browser/render_widget_host.h" #include "content/public/browser/render_widget_host_view.h" #include "content/public/common/page_visibility_state.h" #include "content/public/common/widget_type.h" -@@ -73,9 +76,11 @@ class DevicePosturePlatformProvider; +@@ -73,9 +75,11 @@ class DevicePosturePlatformProvider; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; - class RenderWidgetHostViewBaseObserver; + class RenderWidgetHostViewInputObserver; +class RenderWidgetHostViewGuest; class ScopedViewTransitionResources; class TextInputManager; @@ -53,7 +53,7 @@ index 1a3715bb7bd6f82398cf0b4953ff8c5636233424..2ab7e8670d6795f7587b5da5d78a546a class WebContentsAccessibility; class DelegatedFrameHost; -@@ -223,6 +228,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -226,6 +230,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase const gfx::Rect& keyboard_rect) override {} bool IsHTMLFormPopup() const override; @@ -63,7 +63,7 @@ index 1a3715bb7bd6f82398cf0b4953ff8c5636233424..2ab7e8670d6795f7587b5da5d78a546a // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. gfx::PointF TransformPointToRootCoordSpaceF( -@@ -273,6 +281,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -276,6 +283,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // non-embeddable derived views. virtual RenderWidgetHostViewBase* GetRootView(); diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index 1b9101be6b80..7ac12fabc714 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -8,10 +8,10 @@ respond to the first mouse click in their window, which is desirable for some kinds of utility windows. Similarly for `disableAutoHideCursor`. diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index 046c3389f20a18dc03c0a8451a1ee9afc2d302f5..53818b1885ccc5f7ba2e281b002b6e9ab4112b9d 100644 +index a89dcd1e5687a1e12d558e5b55ea4c95c4083278..ea7957d89c1c44ce7cae2f0d4548fb67b60543ca 100644 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -@@ -163,6 +163,15 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -164,6 +164,15 @@ void ExtractUnderlines(NSAttributedString* string, } // namespace @@ -27,17 +27,17 @@ index 046c3389f20a18dc03c0a8451a1ee9afc2d302f5..53818b1885ccc5f7ba2e281b002b6e9a // RenderWidgetHostViewCocoa --------------------------------------------------- // Private methods: -@@ -750,6 +759,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { +@@ -762,6 +771,9 @@ - (AcceptMouseEventsOption)acceptsMouseEventsOption { } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { + if ([self.window respondsToSelector:@selector(acceptsFirstMouse)] && + [self.window acceptsFirstMouse]) + return YES; - return [self acceptsMouseEventsWhenInactive]; + // Enable "click-through" if mouse clicks are accepted in inactive windows + return [self acceptsMouseEventsOption] > kAcceptMouseEventsInActiveWindow; } - -@@ -834,6 +846,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { +@@ -856,6 +868,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { // its parent view. BOOL hitSelf = NO; while (view) { @@ -48,7 +48,7 @@ index 046c3389f20a18dc03c0a8451a1ee9afc2d302f5..53818b1885ccc5f7ba2e281b002b6e9a if (view == self) hitSelf = YES; if ([view isKindOfClass:[self class]] && ![view isEqual:self] && -@@ -1161,6 +1177,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -1183,6 +1199,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { eventType == NSEventTypeKeyDown && !(modifierFlags & NSEventModifierFlagCommand); diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index d9319fcbbf6f..3a252ddd7dfb 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 26be1cf8348a4e1b4536ca9391ff89efdb22020b..a472e9a72dc5c04e92f007e1740a4b6aaf54f63b 100644 +index c35f1b734745addf3a495b1d69957ad13fe954fb..ce54376e4a56053fc8dc33ceeabcbc26f85ae40a 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1571,7 +1571,7 @@ if (is_chrome_branded && !is_android) { +@@ -1574,7 +1574,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 26be1cf8348a4e1b4536ca9391ff89efdb22020b..a472e9a72dc5c04e92f007e1740a4b6a chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1610,6 +1610,12 @@ if (!is_android) { +@@ -1613,6 +1613,12 @@ if (!is_android) { } } diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 228698fd545f..f38a2c34b88c 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 dd59d71b07d2efa43144e3dbdbf0501b5b5b6a0b..f3a9e4a40e23204eb6d596491067704829a4167e 100644 +index f9a5d0b80ed7e7e921b545bf6be611d9a91c833a..495b02339145e2e280bea15d9819af4b0b18a8ac 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1258,7 +1258,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1251,7 +1251,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch index 3798328776ae..113300ede365 100644 --- a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch +++ b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch @@ -15,7 +15,7 @@ short-circuit all the permissions checks in MSDC for now to allow us to unduplicate this code. diff --git a/components/webrtc/media_stream_devices_controller.cc b/components/webrtc/media_stream_devices_controller.cc -index fd5f81970957d970b7d234f45c4948395a461a7a..386599be509389c9bf850c330e76e449dd685318 100644 +index fc6ed7e7de02c6c27dd93cb40a01ab1881c98990..2e745a5cccbae20b9d1e22e2b4fe0d2d3c47a629 100644 --- a/components/webrtc/media_stream_devices_controller.cc +++ b/components/webrtc/media_stream_devices_controller.cc @@ -57,7 +57,8 @@ bool PermissionIsRequested(blink::PermissionType permission, diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 8921cfe03d42..b7f5fd8352b5 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it does touch a security-sensitive class. diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 336cebf1aee3659f881b8edb8b9370860520c9bd..f3c54b254acc4dc9b6b2c67c57c164236a89294e 100644 +index 84fec9a7d7d013c8f9c30144179a154a2d6b6078..639f7c4704c4f91630d75badc27589e205153fba 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1725,9 +1725,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1740,9 +1740,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( *cmd_line, IsPdf(), /*is_jit_disabled=*/IsPdf()); diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 91078fece4c3..eb24a92084ee 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 610db0508667be62a13bb7f8453044cfe8fac028..46e9634fd42245b59c7363046197e59a9edca385 100644 +index 0a548b96a53454313fe0175a2fa3da7e7b92346f..bfef0d4ad7d543bd0f7cc5b0e57d067c1d8fc944 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3546,6 +3546,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3609,6 +3609,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, params.main_frame_name, GetOpener(), primary_main_frame_policy, base::UnguessableToken::Create()); @@ -26,7 +26,7 @@ index 610db0508667be62a13bb7f8453044cfe8fac028..46e9634fd42245b59c7363046197e59a std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3556,6 +3563,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3619,6 +3626,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -35,7 +35,7 @@ index 610db0508667be62a13bb7f8453044cfe8fac028..46e9634fd42245b59c7363046197e59a CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index f3e2c751b2e1eadd636288a9f0d1de06a1fbfb9b..98016a7c9945c00f2d09b4e611112d1898621f1a 100644 +index 4d573eb5d291776143c7f3a32192d20df3ec99d7..370f4e32bd3a5d8a9d3ff73f90a74c5c091a802d 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -104,10 +104,13 @@ class BrowserContext; diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 466963593565..7b116b98e35a 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -15,10 +15,10 @@ Note that we also need to manually update embedder's `api::WebContents::IsFullscreenForTabOrPending` value. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 804c15034d7f5beefa5144d9a7788b08c3ea4fcd..ead6fd6bc1f91282d9282164496bb74c93695e21 100644 +index 048321f3142ad1c6252a1d72735d3ee5dd1a1591..a4fd7f1370aeb113a0b07ba0e4504adf7cc1848c 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -7663,6 +7663,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -7702,6 +7702,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } @@ -37,11 +37,11 @@ index 804c15034d7f5beefa5144d9a7788b08c3ea4fcd..ead6fd6bc1f91282d9282164496bb74c if (had_fullscreen_token && !GetView()->HasFocus()) GetView()->Focus(); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 46e9634fd42245b59c7363046197e59a9edca385..3557ad8536be31efbeeca9f014baf37e4d545d88 100644 +index bfef0d4ad7d543bd0f7cc5b0e57d067c1d8fc944..f8ca743c5629c8e62a16cad3e2f7f76e17826751 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3800,21 +3800,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( - const NativeWebKeyboardEvent& event) { +@@ -3864,21 +3864,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( + const input::NativeWebKeyboardEvent& event) { OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"), "WebContentsImpl::PreHandleKeyboardEvent"); - auto* outermost_contents = GetOutermostWebContents(); @@ -78,7 +78,7 @@ index 46e9634fd42245b59c7363046197e59a9edca385..3557ad8536be31efbeeca9f014baf37e } bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { -@@ -3949,7 +3953,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -4035,7 +4039,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame)); DCHECK(requesting_frame->IsActive()); @@ -88,7 +88,7 @@ index 46e9634fd42245b59c7363046197e59a9edca385..3557ad8536be31efbeeca9f014baf37e features::kAutomaticFullscreenContentSetting)) { // Ensure the window is made active to take input focus. The user may have diff --git a/third_party/blink/renderer/core/fullscreen/fullscreen.cc b/third_party/blink/renderer/core/fullscreen/fullscreen.cc -index 5ae0e8d63847d4233c24c9c807122c005a931ad6..310a185b68282373ebb96482463edfa507cc90c1 100644 +index 7c69e3d4fc1a115f0d2b0d318566653279fa2741..f6a7ab2e25bf3c8345c82648efaa80983b425c27 100644 --- a/third_party/blink/renderer/core/fullscreen/fullscreen.cc +++ b/third_party/blink/renderer/core/fullscreen/fullscreen.cc @@ -112,7 +112,7 @@ void FullscreenElementChanged(Document& document, diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 74948ece27ed..8d4420601d0a 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected: https://chromium-review.googlesource.com/c/chromium/src/+/1954347 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index a062418a22ec911a1b2d3032c0668e762bfa3cd9..14f98001c553e6eaac75a7d54188556c18dd1e41 100644 +index 7a9334a6cb0c77d49b87d75f7dba56715d3ba5f7..2733fe20a58af97c0fd424bf169254397c631707 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -395,6 +395,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -397,6 +397,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,10 +26,10 @@ index a062418a22ec911a1b2d3032c0668e762bfa3cd9..14f98001c553e6eaac75a7d54188556c // 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 1dfbc143a91e50a7421e28c2960f2cf8d81a5800..4cfda323ce1847ac34bc60bca22a2044e66b92fe 100644 +index 9d1b45efcc171fc8f2c4a71599aaf4f709a0ba49..3bc0313d663b3d948ae00ff5eb7fee6ddf574628 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -846,6 +846,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -840,6 +840,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index 1dfbc143a91e50a7421e28c2960f2cf8d81a5800..4cfda323ce1847ac34bc60bca22a2044 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 d5ab3967f21ccfc65171366580ba6bbd7532e5eb..00be5a58e202cf4830397f3386384f7dc8b8e19a 100644 +index 8a8faf056bee0005325b099ed0716f4c23ba3e99..8970240e31bbfbf34433641dcc675f575b86ee09 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -186,6 +186,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -188,6 +188,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -55,10 +55,10 @@ index d5ab3967f21ccfc65171366580ba6bbd7532e5eb..00be5a58e202cf4830397f3386384f7d const blink::WebSecurityOrigin& script_origin) override; blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel( diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index 38c079e1f9c371854922afccdd73dac65a75240d..f5f0b31af8c18a6e290bcc3605bf43f5fd522b66 100644 +index 86a9cc130b21534b3235091659aa1c8009287d45..f299762e90655ea1a6be4d52257c9ae65598ca98 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -632,6 +632,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -639,6 +639,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -67,10 +67,10 @@ index 38c079e1f9c371854922afccdd73dac65a75240d..f5f0b31af8c18a6e290bcc3605bf43f5 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 fc4eee1c0b3b2906ddc004d6069ff62ee5ee4a3a..587c47b92935fa740390eacdb0f73be6da5027c8 100644 +index 9adca4e4953cfa6511d17392b42726b2d2544212..2131b07c416e26e2f4b7b5add671df361f28a97b 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -756,6 +756,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -763,6 +763,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { } pause_handle_.reset(); 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 b8f6af32de53..9dc69d02d5a8 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 @@ -19,10 +19,10 @@ that clearly establishes the worker script is ready for evaluation with the scop initialized. diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 14f98001c553e6eaac75a7d54188556c18dd1e41..f0c17f9bd6f4bc411ebbd6515a5aceef539ded9e 100644 +index 2733fe20a58af97c0fd424bf169254397c631707..d251cba0c8b4a6b7b5aa1fb24488269ef2d162a9 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -395,6 +395,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -397,6 +397,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -35,10 +35,10 @@ index 14f98001c553e6eaac75a7d54188556c18dd1e41..f0c17f9bd6f4bc411ebbd6515a5aceef // 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 4cfda323ce1847ac34bc60bca22a2044e66b92fe..3cfc344489768b2bbe96f6ee0ed1d90d8f07bcf3 100644 +index 3bc0313d663b3d948ae00ff5eb7fee6ddf574628..81754497f90b774eb155c84b490f29048bed48a7 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -858,6 +858,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -852,6 +852,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index 4cfda323ce1847ac34bc60bca22a2044e66b92fe..3cfc344489768b2bbe96f6ee0ed1d90d 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 00be5a58e202cf4830397f3386384f7dc8b8e19a..f8cdff26b78a0049414ab369185bd331e488efc3 100644 +index 8970240e31bbfbf34433641dcc675f575b86ee09..f89ab57f2976ac917cb936acf392773c1fac6e16 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -186,6 +186,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -188,6 +188,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -65,10 +65,10 @@ index 00be5a58e202cf4830397f3386384f7dc8b8e19a..f8cdff26b78a0049414ab369185bd331 bool AllowScriptExtensionForServiceWorker( const blink::WebSecurityOrigin& script_origin) override; diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index f5f0b31af8c18a6e290bcc3605bf43f5fd522b66..72cc5b0ab5a846d1ffa068fa3fa831e221254ce8 100644 +index f299762e90655ea1a6be4d52257c9ae65598ca98..1f49f4566279c5a2eac0cc3e503d905e3d05a5bd 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -632,6 +632,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -639,6 +639,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch b/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch index 4c46cfae4472..a532e07340b6 100644 --- a/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch +++ b/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch @@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer patching legacy devtools code. diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts -index 1ba8a3dbdecda4c42eff0b58a1a2399846999826..d40dcc3d4336d0c0a8e82ae790f431e5ccc825e2 100644 +index 3fab27f094ca75608f4b05b179abd7f53608a013..244a78f1e92f7e749c8d42979184f53a629c487a 100644 --- a/front_end/entrypoints/main/MainImpl.ts +++ b/front_end/entrypoints/main/MainImpl.ts -@@ -728,6 +728,8 @@ export class MainImpl { +@@ -723,6 +723,8 @@ export class MainImpl { globalThis.Main = globalThis.Main || {}; // @ts-ignore Exported for Tests.js globalThis.Main.Main = MainImpl; diff --git a/patches/nan/.patches b/patches/nan/.patches index 57c827cfc9f6..6dca70c48e39 100644 --- a/patches/nan/.patches +++ b/patches/nan/.patches @@ -1,3 +1,5 @@ use_new_constructor_for_scriptorigin_when_17_x.patch api_remove_allcan_read_write.patch fix_define_nan_copyablepersistenttraits_for_v8_12_5.patch +remove_deprecated_v8_isolate_idlenotificationdeadline.patch +remove_several_apis_deprecated_in_version_12_6.patch diff --git a/patches/nan/remove_deprecated_v8_isolate_idlenotificationdeadline.patch b/patches/nan/remove_deprecated_v8_isolate_idlenotificationdeadline.patch new file mode 100644 index 000000000000..da250e402f8c --- /dev/null +++ b/patches/nan/remove_deprecated_v8_isolate_idlenotificationdeadline.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: John Kleinschmidt +Date: Thu, 6 Jun 2024 15:16:49 -0400 +Subject: Remove deprecated v8::Isolate::IdleNotificationDeadline + +See https://chromium-review.googlesource.com/c/v8/v8/+/5539852 + +Also https://github.com/nodejs/nan/issues/953#issuecomment-1791163429 + +diff --git a/nan.h b/nan.h +index 64f857c93818712ea3557f53ab4f3cad6813c43c..6a405a6fb6f89dcb2140de48dac4ce743e9f10fa 100644 +--- a/nan.h ++++ b/nan.h +@@ -685,7 +685,13 @@ inline uv_loop_t* GetCurrentEventLoop() { + v8::Isolate::GetCurrent()->SetAddHistogramSampleFunction(cb); + } + +-#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ ++#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 11 || \ ++ (V8_MAJOR_VERSION == 11 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) ++ inline bool IdleNotification(int idle_time_in_ms) { ++ v8::Isolate::GetCurrent()->MemoryPressureNotification(v8::MemoryPressureLevel::kModerate); ++ return true; ++ } ++#elif defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \ + (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 3)) + inline bool IdleNotification(int idle_time_in_ms) { + return v8::Isolate::GetCurrent()->IdleNotificationDeadline( diff --git a/patches/nan/remove_several_apis_deprecated_in_version_12_6.patch b/patches/nan/remove_several_apis_deprecated_in_version_12_6.patch new file mode 100644 index 000000000000..eb9d213975b9 --- /dev/null +++ b/patches/nan/remove_several_apis_deprecated_in_version_12_6.patch @@ -0,0 +1,41 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: John Kleinschmidt +Date: Thu, 6 Jun 2024 15:17:39 -0400 +Subject: Remove several APIs deprecated in version 12.6 + +See https://chromium-review.googlesource.com/c/v8/v8/+/5539888 + +ScriptOrigin constructor with isolate has been removed; +Deprecation instructions were to "Use constructor without the isolate." + +diff --git a/nan_scriptorigin.h b/nan_scriptorigin.h +index ce79cdf8dc931d61633c74079a4c38efd3c785ed..85202aaba148540644d39ea2cdf88de0dd101fe4 100644 +--- a/nan_scriptorigin.h ++++ b/nan_scriptorigin.h +@@ -11,7 +11,25 @@ + + class ScriptOrigin : public v8::ScriptOrigin { + public: +-#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 9 || \ ++#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || \ ++ (V8_MAJOR_VERSION == 12 && (defined(V8_MINOR_VERSION) && (V8_MINOR_VERSION > 6\ ++ || (V8_MINOR_VERSION == 7 && defined(V8_BUILD_NUMBER) \ ++ && V8_BUILD_NUMBER >= 1))))) ++ explicit ScriptOrigin(v8::Local name) : ++ v8::ScriptOrigin(name) {} ++ ++ ScriptOrigin(v8::Local name ++ , v8::Local line) : ++ v8::ScriptOrigin(name ++ , To(line).FromMaybe(0)) {} ++ ++ ScriptOrigin(v8::Local name ++ , v8::Local line ++ , v8::Local column) : ++ v8::ScriptOrigin(name ++ , To(line).FromMaybe(0) ++ , To(column).FromMaybe(0)) {} ++#elif defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 9 || \ + (V8_MAJOR_VERSION == 9 && (defined(V8_MINOR_VERSION) && (V8_MINOR_VERSION > 0\ + || (V8_MINOR_VERSION == 0 && defined(V8_BUILD_NUMBER) \ + && V8_BUILD_NUMBER >= 1))))) diff --git a/patches/nan/use_new_constructor_for_scriptorigin_when_17_x.patch b/patches/nan/use_new_constructor_for_scriptorigin_when_17_x.patch index e2c18d2e64dd..da73959ba262 100644 --- a/patches/nan/use_new_constructor_for_scriptorigin_when_17_x.patch +++ b/patches/nan/use_new_constructor_for_scriptorigin_when_17_x.patch @@ -5,8 +5,12 @@ Subject: use new constructor for ScriptOrigin when >= 17.x https://chromium-review.googlesource.com/c/v8/v8/+/3395880 +Also +See https://chromium-review.googlesource.com/c/v8/v8/+/5539888 +ScriptOrigin constructor with isolate has been removed; + diff --git a/test/cpp/news.cpp b/test/cpp/news.cpp -index a218167c7e3a5ec90c6668943cb395dba2bbe3a7..08557d5478d5400445603deffd721525ecbf746e 100644 +index a218167c7e3a5ec90c6668943cb395dba2bbe3a7..b1fa6e2a77e926e38006bf47ffcda2ae86555d17 100644 --- a/test/cpp/news.cpp +++ b/test/cpp/news.cpp @@ -115,7 +115,7 @@ NAN_METHOD(NewScript) { @@ -14,7 +18,7 @@ index a218167c7e3a5ec90c6668943cb395dba2bbe3a7..08557d5478d5400445603deffd721525 NAN_METHOD(NewScript2) { v8::ScriptOrigin origin( -#if NODE_MODULE_VERSION >= NODE_18_0_MODULE_VERSION -+#if NODE_MODULE_VERSION >= NODE_17_0_MODULE_VERSION ++#if NODE_MODULE_VERSION >= NODE_17_0_MODULE_VERSION && NODE_MODULE_VERSION < NODE_20_0_MODULE_VERSION info.GetIsolate(), #endif New("x").ToLocalChecked()); @@ -23,7 +27,7 @@ index a218167c7e3a5ec90c6668943cb395dba2bbe3a7..08557d5478d5400445603deffd721525 NAN_METHOD(CompileScript2) { v8::ScriptOrigin origin( -#if NODE_MODULE_VERSION >= NODE_18_0_MODULE_VERSION -+#if NODE_MODULE_VERSION >= NODE_17_0_MODULE_VERSION ++#if NODE_MODULE_VERSION >= NODE_17_0_MODULE_VERSION && NODE_MODULE_VERSION < NODE_20_0_MODULE_VERSION info.GetIsolate(), #endif New("x").ToLocalChecked()); diff --git a/patches/node/.patches b/patches/node/.patches index 0623bf20f44a..127dd6d951f3 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -34,7 +34,6 @@ fix_add_trusted_space_and_trusted_lo_space_to_the_v8_heap.patch win_process_avoid_assert_after_spawning_store_app_4152.patch chore_remove_use_of_deprecated_kmaxlength.patch feat_optionally_prevent_calling_v8_enablewebassemblytraphandler.patch -build_only_create_cppgc_heap_on_non-32_bit_platforms.patch src_update_default_v8_platform_to_override_functions_with_location.patch fix_capture_embedder_exceptions_before_entering_v8.patch spec_add_iterator_to_global_intrinsics.patch @@ -46,3 +45,8 @@ deprecate_vector_v8_local_in_v8.patch fix_remove_deprecated_errno_constants.patch build_enable_perfetto.patch fix_add_source_location_for_v8_task_runner.patch +cherry-pick_src_remove_calls_to_recently_deprecated_v8_apis.patch +src_do_not_use_deprecated_v8_api.patch +src_use_new_v8_api_to_define_stream_accessor.patch +src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch +test_update_v8-stats_test_for_v8_12_6.patch diff --git a/patches/node/build_only_create_cppgc_heap_on_non-32_bit_platforms.patch b/patches/node/build_only_create_cppgc_heap_on_non-32_bit_platforms.patch deleted file mode 100644 index 26c1baca4243..000000000000 --- a/patches/node/build_only_create_cppgc_heap_on_non-32_bit_platforms.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Mon, 27 Nov 2023 17:23:29 +0100 -Subject: build: only create cppgc heap on non-32 bit platforms - -Node.js crashes during heap marking when using cppgc on 32 bit platforms. Disable for now. - -Crash occurs in the following stack: -* MarkingVisitorBase::VisitEmbedderTracingSubClassWithEmbedderTracing -* MarkingWorklists::Local::PushExtractedWrapper -* CppMarkingState::MarkAndPush -* CppMarkingState::MarkAndPush -* WrappableInfo::From -* Crash - -See https://gist.github.com/codebytere/275ec8923253fd6559b3d36115f7b31b for more. - -This should be fixed and re-enabled on all platforms. - -diff --git a/BUILD.gn b/BUILD.gn -index 2ce1e8a7dcca2ba153d387d11970c72b5f43c167..590303d1b78e2c28d7c3338196b12fcf14f65b28 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -181,6 +181,10 @@ config("node_internal_config") { - } - defines += [ "NODE_ARCH=\"$node_arch\"" ] - -+ if (target_cpu == "x86" || target_cpu == "arm") { -+ defines += [ "NODE_RUNNING_32_BIT" ] -+ } -+ - if (target_os == "win") { - node_platform = "win32" - } else if (target_os == "mac") { -diff --git a/src/env.cc b/src/env.cc -index 5c75e5b99d9415163640ab90f5891c0fee067a88..5f8bb37d117d82123b81f5f4b32735150184fa74 100644 ---- a/src/env.cc -+++ b/src/env.cc -@@ -557,7 +557,8 @@ IsolateData::IsolateData(Isolate* isolate, - // for embedder ID, V8 could accidentally enable cppgc on them. So - // safe guard against this. - DCHECK_NE(descriptor.wrappable_type_index, BaseObject::kSlot); -- } else { -+ } else { -+#if !defined(NODE_RUNNING_32_BIT) - cpp_heap_ = CppHeap::Create( - platform, - CppHeapCreateParams{ -@@ -565,6 +566,7 @@ IsolateData::IsolateData(Isolate* isolate, - WrapperDescriptor( - BaseObject::kEmbedderType, BaseObject::kSlot, cppgc_id)}); - isolate->AttachCppHeap(cpp_heap_.get()); -+#endif - } - // We do not care about overflow since we just want this to be different - // from the cppgc id. diff --git a/patches/node/cherry-pick_src_remove_calls_to_recently_deprecated_v8_apis.patch b/patches/node/cherry-pick_src_remove_calls_to_recently_deprecated_v8_apis.patch new file mode 100644 index 000000000000..3e87fb1ef35c --- /dev/null +++ b/patches/node/cherry-pick_src_remove_calls_to_recently_deprecated_v8_apis.patch @@ -0,0 +1,182 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Adam Klein +Date: Wed, 15 May 2024 09:16:00 +0200 +Subject: cherry-pick: src: remove calls to recently deprecated V8 APIs + +Node.js Commit: a6d54f179d997497a95c18456bef6bc3ee15e2c4 +Node.js PR: https://github.com/nodejs/node/pull/52996 +V8 API Removal CL: https://chromium-review.googlesource.com/c/v8/v8/+/5539888 + +This patch is slightly modified from the original commit in order to +resolve conflicts due to the base commit difference between the Node.js +PR and the current upgrade roll. + +This patch is expected to be deleted once we catch up with a Node.js +upgrade that includes the original Node.js commit above. + +diff --git a/src/module_wrap.cc b/src/module_wrap.cc +index 9ad67e0993da4c3e3f8a14681edbf941cf14e2e6..29ed378d32d452518dc929e60e6038ba4ca38a5c 100644 +--- a/src/module_wrap.cc ++++ b/src/module_wrap.cc +@@ -186,8 +186,7 @@ void ModuleWrap::New(const FunctionCallbackInfo& args) { + } + + Local source_text = args[2].As(); +- ScriptOrigin origin(isolate, +- url, ++ ScriptOrigin origin(url, + line_offset, + column_offset, + true, // is cross origin +@@ -394,7 +393,6 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo& args) { + + ShouldNotAbortOnUncaughtScope no_abort_scope(realm->env()); + TryCatchScope try_catch(realm->env()); +- Isolate::SafeForTerminationScope safe_for_termination(isolate); + + bool timed_out = false; + bool received_signal = false; +diff --git a/src/node_builtins.cc b/src/node_builtins.cc +index f9a090f5c3e04403602ba383032e7f3230669a92..3f82db324d406e342abee23ab0d7f7c9807ff652 100644 +--- a/src/node_builtins.cc ++++ b/src/node_builtins.cc +@@ -267,7 +267,7 @@ MaybeLocal BuiltinLoader::LookupAndCompileInternal( + std::string filename_s = std::string("node:") + id; + Local filename = + OneByteString(isolate, filename_s.c_str(), filename_s.size()); +- ScriptOrigin origin(isolate, filename, 0, 0, true); ++ ScriptOrigin origin(filename, 0, 0, true); + + BuiltinCodeCacheData cached_data{}; + { +diff --git a/src/node_contextify.cc b/src/node_contextify.cc +index df1d9cb4fd0442ec6ce6164a136b7a5fbcbe5b67..f6969e635f692b17b4efca1dfbee086a0199db6e 100644 +--- a/src/node_contextify.cc ++++ b/src/node_contextify.cc +@@ -850,16 +850,15 @@ void ContextifyScript::New(const FunctionCallbackInfo& args) { + host_defined_options->Set( + isolate, loader::HostDefinedOptions::kID, id_symbol); + +- ScriptOrigin origin(isolate, +- filename, +- line_offset, // line offset +- column_offset, // column offset +- true, // is cross origin +- -1, // script id +- Local(), // source map URL +- false, // is opaque (?) +- false, // is WASM +- false, // is ES Module ++ ScriptOrigin origin(filename, ++ line_offset, // line offset ++ column_offset, // column offset ++ true, // is cross origin ++ -1, // script id ++ Local(), // source map URL ++ false, // is opaque (?) ++ false, // is WASM ++ false, // is ES Module + host_defined_options); + ScriptCompiler::Source source(code, origin, cached_data); + ScriptCompiler::CompileOptions compile_options = +@@ -971,7 +970,7 @@ MaybeLocal CompileFunction(Local context, + Local filename, + Local content, + std::vector>* parameters) { +- ScriptOrigin script_origin(context->GetIsolate(), filename, 0, 0, true); ++ ScriptOrigin script_origin(filename, 0, 0, true); + ScriptCompiler::Source script_source(content, script_origin); + + return ScriptCompiler::CompileFunction(context, +@@ -1081,7 +1080,6 @@ bool ContextifyScript::EvalMachine(Local context, + } + + TryCatchScope try_catch(env); +- Isolate::SafeForTerminationScope safe_for_termination(env->isolate()); + ContextifyScript* wrapped_script; + ASSIGN_OR_RETURN_UNWRAP(&wrapped_script, args.Holder(), false); + Local unbound_script = +@@ -1244,8 +1242,7 @@ void ContextifyContext::CompileFunction( + Local host_defined_options = + GetHostDefinedOptions(isolate, id_symbol); + ScriptCompiler::Source source = +- GetCommonJSSourceInstance(isolate, +- code, ++ GetCommonJSSourceInstance(code, + filename, + line_offset, + column_offset, +@@ -1300,15 +1297,13 @@ void ContextifyContext::CompileFunction( + } + + ScriptCompiler::Source ContextifyContext::GetCommonJSSourceInstance( +- Isolate* isolate, + Local code, + Local filename, + int line_offset, + int column_offset, + Local host_defined_options, + ScriptCompiler::CachedData* cached_data) { +- ScriptOrigin origin(isolate, +- filename, ++ ScriptOrigin origin(filename, + line_offset, // line offset + column_offset, // column offset + true, // is cross origin +@@ -1486,7 +1481,7 @@ void ContextifyContext::ContainsModuleSyntax( + Local host_defined_options = + GetHostDefinedOptions(isolate, id_symbol); + ScriptCompiler::Source source = GetCommonJSSourceInstance( +- isolate, code, filename, 0, 0, host_defined_options, nullptr); ++ code, filename, 0, 0, host_defined_options, nullptr); + ScriptCompiler::CompileOptions options = GetCompileOptions(source); + + std::vector> params = GetCJSParameters(env->isolate_data()); +@@ -1534,7 +1529,7 @@ void ContextifyContext::ContainsModuleSyntax( + code, + String::NewFromUtf8(isolate, "})();").ToLocalChecked()); + ScriptCompiler::Source wrapped_source = GetCommonJSSourceInstance( +- isolate, code, filename, 0, 0, host_defined_options, nullptr); ++ code, filename, 0, 0, host_defined_options, nullptr); + std::ignore = ScriptCompiler::CompileFunction( + context, + &wrapped_source, +@@ -1587,8 +1582,7 @@ static void CompileFunctionForCJSLoader( + + Local symbol = env->vm_dynamic_import_default_internal(); + Local hdo = GetHostDefinedOptions(isolate, symbol); +- ScriptOrigin origin(isolate, +- filename, ++ ScriptOrigin origin(filename, + 0, // line offset + 0, // column offset + true, // is cross origin +diff --git a/src/node_contextify.h b/src/node_contextify.h +index e96df803b7ec2aa1231d4ab5d4ae0fe863ceb672..d42b5e0c544e726fc3f6d8392a554df9aa480fe9 100644 +--- a/src/node_contextify.h ++++ b/src/node_contextify.h +@@ -95,7 +95,6 @@ class ContextifyContext : public BaseObject { + v8::Local id_symbol, + const errors::TryCatchScope& try_catch); + static v8::ScriptCompiler::Source GetCommonJSSourceInstance( +- v8::Isolate* isolate, + v8::Local code, + v8::Local filename, + int line_offset, +diff --git a/test/cctest/test_environment.cc b/test/cctest/test_environment.cc +index 64e38c83006a004ebc3519a5e9f8b04263244514..14e82cc80ff73084fb43b2ef07febfd2667a0abc 100644 +--- a/test/cctest/test_environment.cc ++++ b/test/cctest/test_environment.cc +@@ -620,12 +620,9 @@ TEST_F(EnvironmentTest, SetImmediateMicrotasks) { + + #ifndef _WIN32 // No SIGINT on Windows. + TEST_F(NodeZeroIsolateTestFixture, CtrlCWithOnlySafeTerminationTest) { +- // We need to go through the whole setup dance here because we want to +- // set only_terminate_in_safe_scope. + // Allocate and initialize Isolate. + v8::Isolate::CreateParams create_params; + create_params.array_buffer_allocator = allocator.get(); +- create_params.only_terminate_in_safe_scope = true; + v8::Isolate* isolate = v8::Isolate::Allocate(); + CHECK_NOT_NULL(isolate); + platform->RegisterIsolate(isolate, ¤t_loop); diff --git a/patches/node/src_do_not_use_deprecated_v8_api.patch b/patches/node/src_do_not_use_deprecated_v8_api.patch new file mode 100644 index 000000000000..66fa25ed98db --- /dev/null +++ b/patches/node/src_do_not_use_deprecated_v8_api.patch @@ -0,0 +1,118 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: ishell +Date: Mon, 25 Mar 2024 15:45:41 +0100 +Subject: src: do not use deprecated V8 API +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Namely: + - `v8::ObjectTemplate::SetAccessor(v8::Local, ...);` + - `v8::ObjectTemplate::SetNativeDataProperty` with `AccessControl` + +Refs: https://github.com/v8/v8/commit/46c241eb99557fe8205acac5c526650c3847d180 +Refs: https://github.com/v8/v8/commit/6ec883986bd417e2a42ddb960bd9449deb7e4639 +Co-authored-by: Michaël Zasso +PR-URL: https://github.com/nodejs/node/pull/53084 +Reviewed-By: Luigi Pinca +Reviewed-By: Tobias Nießen +Reviewed-By: James M Snell +Reviewed-By: Joyee Cheung +(cherry picked from commit 26d5cafff76d3a096ebfd7d7a6279d4b5b190230) + +diff --git a/src/base_object-inl.h b/src/base_object-inl.h +index da8fed7b3013df10ae02be2070545c74d9a978f0..518b22dabef0974c2e7ecb466669925338524059 100644 +--- a/src/base_object-inl.h ++++ b/src/base_object-inl.h +@@ -132,14 +132,14 @@ v8::EmbedderGraph::Node::Detachedness BaseObject::GetDetachedness() const { + + template + void BaseObject::InternalFieldGet( +- v8::Local property, ++ v8::Local property, + const v8::PropertyCallbackInfo& info) { + info.GetReturnValue().Set( + info.This()->GetInternalField(Field).As()); + } + +-template +-void BaseObject::InternalFieldSet(v8::Local property, ++template ++void BaseObject::InternalFieldSet(v8::Local property, + v8::Local value, + const v8::PropertyCallbackInfo& info) { + // This could be e.g. value->IsFunction(). +diff --git a/src/base_object.h b/src/base_object.h +index 5968694e8393d8434fb2ffee411dfac4c93aff29..5c16d0d1b32e2d056f4fcfa0e01781292932a0fa 100644 +--- a/src/base_object.h ++++ b/src/base_object.h +@@ -111,10 +111,10 @@ class BaseObject : public MemoryRetainer { + + // Setter/Getter pair for internal fields that can be passed to SetAccessor. + template +- static void InternalFieldGet(v8::Local property, ++ static void InternalFieldGet(v8::Local property, + const v8::PropertyCallbackInfo& info); + template +- static void InternalFieldSet(v8::Local property, ++ static void InternalFieldSet(v8::Local property, + v8::Local value, + const v8::PropertyCallbackInfo& info); + +diff --git a/src/node_builtins.cc b/src/node_builtins.cc +index 3f82db324d406e342abee23ab0d7f7c9807ff652..91ee97c0d1308e650730b9977facb924ab361bf5 100644 +--- a/src/node_builtins.cc ++++ b/src/node_builtins.cc +@@ -11,7 +11,6 @@ namespace node { + namespace builtins { + + using v8::Context; +-using v8::DEFAULT; + using v8::EscapableHandleScope; + using v8::Function; + using v8::FunctionCallbackInfo; +@@ -724,7 +723,6 @@ void BuiltinLoader::CreatePerIsolateProperties(IsolateData* isolate_data, + nullptr, + Local(), + None, +- DEFAULT, + SideEffectType::kHasNoSideEffect); + + target->SetNativeDataProperty(FIXED_ONE_BYTE_STRING(isolate, "builtinIds"), +@@ -732,7 +730,6 @@ void BuiltinLoader::CreatePerIsolateProperties(IsolateData* isolate_data, + nullptr, + Local(), + None, +- DEFAULT, + SideEffectType::kHasNoSideEffect); + + target->SetNativeDataProperty( +@@ -741,7 +738,6 @@ void BuiltinLoader::CreatePerIsolateProperties(IsolateData* isolate_data, + nullptr, + Local(), + None, +- DEFAULT, + SideEffectType::kHasNoSideEffect); + + target->SetNativeDataProperty(FIXED_ONE_BYTE_STRING(isolate, "natives"), +@@ -749,7 +745,6 @@ void BuiltinLoader::CreatePerIsolateProperties(IsolateData* isolate_data, + nullptr, + Local(), + None, +- DEFAULT, + SideEffectType::kHasNoSideEffect); + + SetMethod(isolate, target, "getCacheUsage", BuiltinLoader::GetCacheUsage); +diff --git a/src/node_external_reference.h b/src/node_external_reference.h +index 17c0b2d7e1a440b5280a090ad043858faf99f009..24f0c6771720d8a6cdb684a0d562d01564d433f7 100644 +--- a/src/node_external_reference.h ++++ b/src/node_external_reference.h +@@ -63,8 +63,6 @@ class ExternalReferenceRegistry { + V(CFunctionWithBool) \ + V(const v8::CFunctionInfo*) \ + V(v8::FunctionCallback) \ +- V(v8::AccessorGetterCallback) \ +- V(v8::AccessorSetterCallback) \ + V(v8::AccessorNameGetterCallback) \ + V(v8::AccessorNameSetterCallback) \ + V(v8::GenericNamedPropertyDefinerCallback) \ diff --git a/patches/node/src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch b/patches/node/src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch new file mode 100644 index 000000000000..117d278c3dae --- /dev/null +++ b/patches/node/src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch @@ -0,0 +1,308 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Joyee Cheung +Date: Wed, 29 May 2024 19:59:19 +0200 +Subject: src: remove dependency on wrapper-descriptor-based CppHeap + +As V8 has moved away from wrapper-descriptor-based CppHeap, this +patch: + +1. Create the CppHeap without using wrapper descirptors. +2. Deprecates node::SetCppgcReference() in favor of + v8::Object::Wrap() since the wrapper descriptor is no longer + relevant. It is still kept as a compatibility layer for addons + that need to also work on Node.js versions without + v8::Object::Wrap(). + +(cherry picked from commit 30329d06235a9f9733b1d4da479b403462d1b326) + +diff --git a/src/env-inl.h b/src/env-inl.h +index 63ce35ba68b48a55d8150395304bf86c2bf23aae..c6fc53d1666ae51e69257c9bbcaf4cbff36cbad3 100644 +--- a/src/env-inl.h ++++ b/src/env-inl.h +@@ -62,31 +62,6 @@ inline uv_loop_t* IsolateData::event_loop() const { + return event_loop_; + } + +-inline void IsolateData::SetCppgcReference(v8::Isolate* isolate, +- v8::Local object, +- void* wrappable) { +- v8::CppHeap* heap = isolate->GetCppHeap(); +- CHECK_NOT_NULL(heap); +- v8::WrapperDescriptor descriptor = heap->wrapper_descriptor(); +- uint16_t required_size = std::max(descriptor.wrappable_instance_index, +- descriptor.wrappable_type_index); +- CHECK_GT(object->InternalFieldCount(), required_size); +- +- uint16_t* id_ptr = nullptr; +- { +- Mutex::ScopedLock lock(isolate_data_mutex_); +- auto it = +- wrapper_data_map_.find(descriptor.embedder_id_for_garbage_collected); +- CHECK_NE(it, wrapper_data_map_.end()); +- id_ptr = &(it->second->cppgc_id); +- } +- +- object->SetAlignedPointerInInternalField(descriptor.wrappable_type_index, +- id_ptr); +- object->SetAlignedPointerInInternalField(descriptor.wrappable_instance_index, +- wrappable); +-} +- + inline uint16_t* IsolateData::embedder_id_for_cppgc() const { + return &(wrapper_data_->cppgc_id); + } +diff --git a/src/env.cc b/src/env.cc +index 5c75e5b99d9415163640ab90f5891c0fee067a88..17b389ae3e1eea52d02b3f3ffdf67fd489e6bf42 100644 +--- a/src/env.cc ++++ b/src/env.cc +@@ -22,6 +22,7 @@ + #include "util-inl.h" + #include "v8-cppgc.h" + #include "v8-profiler.h" ++#include "v8-sandbox.h" // v8::Object::Wrap(), v8::Object::Unwrap() + + #include + #include +@@ -68,7 +69,6 @@ using v8::TryCatch; + using v8::Uint32; + using v8::Undefined; + using v8::Value; +-using v8::WrapperDescriptor; + using worker::Worker; + + int const ContextEmbedderTag::kNodeContextTag = 0x6e6f64; +@@ -518,6 +518,14 @@ void IsolateData::CreateProperties() { + CreateEnvProxyTemplate(this); + } + ++// Previously, the general convention of the wrappable layout for cppgc in ++// the ecosystem is: ++// [ 0 ] -> embedder id ++// [ 1 ] -> wrappable instance ++// Now V8 has deprecated this layout-based tracing enablement, embedders ++// should simply use v8::Object::Wrap() and v8::Object::Unwrap(). We preserve ++// this layout only to distinguish internally how the memory of a Node.js ++// wrapper is managed or whether a wrapper is managed by Node.js. + constexpr uint16_t kDefaultCppGCEmebdderID = 0x90de; + Mutex IsolateData::isolate_data_mutex_; + std::unordered_map> +@@ -539,36 +547,16 @@ IsolateData::IsolateData(Isolate* isolate, + v8::CppHeap* cpp_heap = isolate->GetCppHeap(); + + uint16_t cppgc_id = kDefaultCppGCEmebdderID; +- if (cpp_heap != nullptr) { +- // The general convention of the wrappable layout for cppgc in the +- // ecosystem is: +- // [ 0 ] -> embedder id +- // [ 1 ] -> wrappable instance +- // If the Isolate includes a CppHeap attached by another embedder, +- // And if they also use the field 0 for the ID, we DCHECK that +- // the layout matches our layout, and record the embedder ID for cppgc +- // to avoid accidentally enabling cppgc on non-cppgc-managed wrappers . +- v8::WrapperDescriptor descriptor = cpp_heap->wrapper_descriptor(); +- if (descriptor.wrappable_type_index == BaseObject::kEmbedderType) { +- cppgc_id = descriptor.embedder_id_for_garbage_collected; +- DCHECK_EQ(descriptor.wrappable_instance_index, BaseObject::kSlot); +- } +- // If the CppHeap uses the slot we use to put non-cppgc-traced BaseObject +- // for embedder ID, V8 could accidentally enable cppgc on them. So +- // safe guard against this. +- DCHECK_NE(descriptor.wrappable_type_index, BaseObject::kSlot); +- } else { +- cpp_heap_ = CppHeap::Create( +- platform, +- CppHeapCreateParams{ +- {}, +- WrapperDescriptor( +- BaseObject::kEmbedderType, BaseObject::kSlot, cppgc_id)}); +- isolate->AttachCppHeap(cpp_heap_.get()); +- } + // We do not care about overflow since we just want this to be different + // from the cppgc id. + uint16_t non_cppgc_id = cppgc_id + 1; ++ if (cpp_heap == nullptr) { ++ cpp_heap_ = CppHeap::Create(platform, v8::CppHeapCreateParams{{}}); ++ // TODO(joyeecheung): pass it into v8::Isolate::CreateParams and let V8 ++ // own it when we can keep the isolate registered/task runner discoverable ++ // during isolate disposal. ++ isolate->AttachCppHeap(cpp_heap_.get()); ++ } + + { + // GC could still be run after the IsolateData is destroyed, so we store +@@ -600,11 +588,12 @@ IsolateData::~IsolateData() { + } + } + +-// Public API ++// Deprecated API, embedders should use v8::Object::Wrap() directly instead. + void SetCppgcReference(Isolate* isolate, + Local object, + void* wrappable) { +- IsolateData::SetCppgcReference(isolate, object, wrappable); ++ v8::Object::Wrap( ++ isolate, object, wrappable); + } + + void IsolateData::MemoryInfo(MemoryTracker* tracker) const { +diff --git a/src/env.h b/src/env.h +index 910c69b6d1d17ef25201dbb39d3d074f4f3f011f..5fd375f143dd529c83aca59348182cce47d3abf8 100644 +--- a/src/env.h ++++ b/src/env.h +@@ -164,10 +164,6 @@ class NODE_EXTERN_PRIVATE IsolateData : public MemoryRetainer { + uint16_t* embedder_id_for_cppgc() const; + uint16_t* embedder_id_for_non_cppgc() const; + +- static inline void SetCppgcReference(v8::Isolate* isolate, +- v8::Local object, +- void* wrappable); +- + inline uv_loop_t* event_loop() const; + inline MultiIsolatePlatform* platform() const; + inline const SnapshotData* snapshot_data() const; +diff --git a/src/node.h b/src/node.h +index 76e2459eceed127e69c686f26fd5bd369b81f1af..37f310cbda4b69857ff505ea25c99e43790deeb6 100644 +--- a/src/node.h ++++ b/src/node.h +@@ -1561,24 +1561,14 @@ void RegisterSignalHandler(int signal, + bool reset_handler = false); + #endif // _WIN32 + +-// Configure the layout of the JavaScript object with a cppgc::GarbageCollected +-// instance so that when the JavaScript object is reachable, the garbage +-// collected instance would have its Trace() method invoked per the cppgc +-// contract. To make it work, the process must have called +-// cppgc::InitializeProcess() before, which is usually the case for addons +-// loaded by the stand-alone Node.js executable. Embedders of Node.js can use +-// either need to call it themselves or make sure that +-// ProcessInitializationFlags::kNoInitializeCppgc is *not* set for cppgc to +-// work. +-// If the CppHeap is owned by Node.js, which is usually the case for addon, +-// the object must be created with at least two internal fields available, +-// and the first two internal fields would be configured by Node.js. +-// This may be superseded by a V8 API in the future, see +-// https://bugs.chromium.org/p/v8/issues/detail?id=13960. Until then this +-// serves as a helper for Node.js isolates. +-NODE_EXTERN void SetCppgcReference(v8::Isolate* isolate, +- v8::Local object, +- void* wrappable); ++// This is kept as a compatibility layer for addons to wrap cppgc-managed ++// objects on Node.js versions without v8::Object::Wrap(). Addons created to ++// work with only Node.js versions with v8::Object::Wrap() should use that ++// instead. ++NODE_DEPRECATED("Use v8::Object::Wrap()", ++ NODE_EXTERN void SetCppgcReference(v8::Isolate* isolate, ++ v8::Local object, ++ void* wrappable)); + + } // namespace node + +diff --git a/test/addons/cppgc-object/binding.cc b/test/addons/cppgc-object/binding.cc +index 1b70ff11dc561abdc5ac794f6280557d5c428239..7fc16a87b843ce0626ee137a07c3ccb7f4cc6493 100644 +--- a/test/addons/cppgc-object/binding.cc ++++ b/test/addons/cppgc-object/binding.cc +@@ -1,8 +1,10 @@ ++#include + #include + #include + #include + #include + #include ++#include + #include + #include + +@@ -15,8 +17,10 @@ class CppGCed : public cppgc::GarbageCollected { + static void New(const v8::FunctionCallbackInfo& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::Local js_object = args.This(); +- CppGCed* gc_object = cppgc::MakeGarbageCollected( +- isolate->GetCppHeap()->GetAllocationHandle()); ++ auto* heap = isolate->GetCppHeap(); ++ assert(heap != nullptr); ++ CppGCed* gc_object = ++ cppgc::MakeGarbageCollected(heap->GetAllocationHandle()); + node::SetCppgcReference(isolate, js_object, gc_object); + args.GetReturnValue().Set(js_object); + } +@@ -24,12 +28,6 @@ class CppGCed : public cppgc::GarbageCollected { + static v8::Local GetConstructor( + v8::Local context) { + auto ft = v8::FunctionTemplate::New(context->GetIsolate(), New); +- auto ot = ft->InstanceTemplate(); +- v8::WrapperDescriptor descriptor = +- context->GetIsolate()->GetCppHeap()->wrapper_descriptor(); +- uint16_t required_size = std::max(descriptor.wrappable_instance_index, +- descriptor.wrappable_type_index); +- ot->SetInternalFieldCount(required_size + 1); + return ft->GetFunction(context).ToLocalChecked(); + } + +diff --git a/test/cctest/test_cppgc.cc b/test/cctest/test_cppgc.cc +index 49665174615870b4f70529b1d548e593846140a1..edd413ae9b956b2e59e8166785adef6a8ff06d51 100644 +--- a/test/cctest/test_cppgc.cc ++++ b/test/cctest/test_cppgc.cc +@@ -3,16 +3,12 @@ + #include + #include + #include ++#include + #include + #include "node_test_fixture.h" + + // This tests that Node.js can work with an existing CppHeap. + +-// Mimic the Blink layout. +-static int kWrappableTypeIndex = 0; +-static int kWrappableInstanceIndex = 1; +-static uint16_t kEmbedderID = 0x1; +- + // Mimic a class that does not know about Node.js. + class CppGCed : public cppgc::GarbageCollected { + public: +@@ -23,12 +19,11 @@ class CppGCed : public cppgc::GarbageCollected { + static void New(const v8::FunctionCallbackInfo& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::Local js_object = args.This(); +- CppGCed* gc_object = cppgc::MakeGarbageCollected( +- isolate->GetCppHeap()->GetAllocationHandle()); +- js_object->SetAlignedPointerInInternalField(kWrappableTypeIndex, +- &kEmbedderID); +- js_object->SetAlignedPointerInInternalField(kWrappableInstanceIndex, +- gc_object); ++ auto* heap = isolate->GetCppHeap(); ++ CHECK_NOT_NULL(heap); ++ CppGCed* gc_object = ++ cppgc::MakeGarbageCollected(heap->GetAllocationHandle()); ++ node::SetCppgcReference(isolate, js_object, gc_object); + kConstructCount++; + args.GetReturnValue().Set(js_object); + } +@@ -36,8 +31,6 @@ class CppGCed : public cppgc::GarbageCollected { + static v8::Local GetConstructor( + v8::Local context) { + auto ft = v8::FunctionTemplate::New(context->GetIsolate(), New); +- auto ot = ft->InstanceTemplate(); +- ot->SetInternalFieldCount(2); + return ft->GetFunction(context).ToLocalChecked(); + } + +@@ -58,12 +51,12 @@ TEST_F(NodeZeroIsolateTestFixture, ExistingCppHeapTest) { + + // Create and attach the CppHeap before we set up the IsolateData so that + // it recognizes the existing heap. +- std::unique_ptr cpp_heap = v8::CppHeap::Create( +- platform.get(), +- v8::CppHeapCreateParams( +- {}, +- v8::WrapperDescriptor( +- kWrappableTypeIndex, kWrappableInstanceIndex, kEmbedderID))); ++ std::unique_ptr cpp_heap = ++ v8::CppHeap::Create(platform.get(), v8::CppHeapCreateParams{{}}); ++ ++ // TODO(joyeecheung): pass it into v8::Isolate::CreateParams and let V8 ++ // own it when we can keep the isolate registered/task runner discoverable ++ // during isolate disposal. + isolate->AttachCppHeap(cpp_heap.get()); + + // Try creating Context + IsolateData + Environment. diff --git a/patches/node/src_use_new_v8_api_to_define_stream_accessor.patch b/patches/node/src_use_new_v8_api_to_define_stream_accessor.patch new file mode 100644 index 000000000000..d4f1f399615c --- /dev/null +++ b/patches/node/src_use_new_v8_api_to_define_stream_accessor.patch @@ -0,0 +1,153 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Igor Sheludko +Date: Tue, 30 Apr 2024 15:22:06 +0200 +Subject: src: use new V8 API to define stream accessor +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Define XxxStream.prototype.onread as an accessor in JavaScript sense. + +Previously it was defined via soon-to-be-deprecated +`v8::ObjectTemplate::SetAccessor(..)` which used to call setter even +for property stores via stream object. + +The replacement V8 API `v8::ObjectTemplate::SetNativeDataProperty(..)` +defines a properly behaving data property and thus a store to a stream +object will not trigger the "onread" setter callback. + +In order to preserve the desired behavior of storing the value in the +receiver's internal field the "onread" property should be defined as +a proper JavaScript accessor. + +PR-URL: https://github.com/nodejs/node/pull/53084 +Refs: https://github.com/v8/v8/commit/46c241eb99557fe8205acac5c526650c3847d180 +Refs: https://github.com/v8/v8/commit/6ec883986bd417e2a42ddb960bd9449deb7e4639 +Reviewed-By: Luigi Pinca +Reviewed-By: Tobias Nießen +Reviewed-By: James M Snell +Reviewed-By: Joyee Cheung +(cherry picked from commit bd151552ef35b0eed415eb1c50d30dafd341cee8) + +diff --git a/src/base_object-inl.h b/src/base_object-inl.h +index 518b22dabef0974c2e7ecb466669925338524059..61f30b3cfbdb0f3d21fe8e93dc97c55162b69a69 100644 +--- a/src/base_object-inl.h ++++ b/src/base_object-inl.h +@@ -132,19 +132,18 @@ v8::EmbedderGraph::Node::Detachedness BaseObject::GetDetachedness() const { + + template + void BaseObject::InternalFieldGet( +- v8::Local property, +- const v8::PropertyCallbackInfo& info) { +- info.GetReturnValue().Set( +- info.This()->GetInternalField(Field).As()); ++ const v8::FunctionCallbackInfo& args) { ++ args.GetReturnValue().Set( ++ args.This()->GetInternalField(Field).As()); + } + + template +-void BaseObject::InternalFieldSet(v8::Local property, +- v8::Local value, +- const v8::PropertyCallbackInfo& info) { ++void BaseObject::InternalFieldSet( ++ const v8::FunctionCallbackInfo& args) { ++ v8::Local value = args[0]; + // This could be e.g. value->IsFunction(). + CHECK(((*value)->*typecheck)()); +- info.This()->SetInternalField(Field, value); ++ args.This()->SetInternalField(Field, value); + } + + bool BaseObject::has_pointer_data() const { +diff --git a/src/base_object.h b/src/base_object.h +index 5c16d0d1b32e2d056f4fcfa0e01781292932a0fa..ce6277dec5a2b9313ecd3699b39ec17585d5adc5 100644 +--- a/src/base_object.h ++++ b/src/base_object.h +@@ -111,12 +111,9 @@ class BaseObject : public MemoryRetainer { + + // Setter/Getter pair for internal fields that can be passed to SetAccessor. + template +- static void InternalFieldGet(v8::Local property, +- const v8::PropertyCallbackInfo& info); ++ static void InternalFieldGet(const v8::FunctionCallbackInfo& args); + template +- static void InternalFieldSet(v8::Local property, +- v8::Local value, +- const v8::PropertyCallbackInfo& info); ++ static void InternalFieldSet(const v8::FunctionCallbackInfo& args); + + // This is a bit of a hack. See the override in async_wrap.cc for details. + virtual bool IsDoneInitializing() const; +diff --git a/src/stream_base.cc b/src/stream_base.cc +index af714734f49b836de79ebb25e61f1376b757d5ed..a8f9f98d413c8573eb22960a4cefb47408215469 100644 +--- a/src/stream_base.cc ++++ b/src/stream_base.cc +@@ -492,6 +492,29 @@ Local StreamBase::GetObject() { + return GetAsyncWrap()->object(); + } + ++void StreamBase::AddAccessor(v8::Isolate* isolate, ++ v8::Local signature, ++ enum v8::PropertyAttribute attributes, ++ v8::Local t, ++ JSMethodFunction* getter, ++ JSMethodFunction* setter, ++ v8::Local string) { ++ Local getter_templ = ++ NewFunctionTemplate(isolate, ++ getter, ++ signature, ++ ConstructorBehavior::kThrow, ++ SideEffectType::kHasNoSideEffect); ++ Local setter_templ = ++ NewFunctionTemplate(isolate, ++ setter, ++ signature, ++ ConstructorBehavior::kThrow, ++ SideEffectType::kHasSideEffect); ++ t->PrototypeTemplate()->SetAccessorProperty( ++ string, getter_templ, setter_templ, attributes); ++} ++ + void StreamBase::AddMethod(Isolate* isolate, + Local signature, + enum PropertyAttribute attributes, +@@ -561,11 +584,14 @@ void StreamBase::AddMethods(IsolateData* isolate_data, + JSMethod<&StreamBase::WriteString>); + t->PrototypeTemplate()->Set(FIXED_ONE_BYTE_STRING(isolate, "isStreamBase"), + True(isolate)); +- t->PrototypeTemplate()->SetAccessor( +- FIXED_ONE_BYTE_STRING(isolate, "onread"), +- BaseObject::InternalFieldGet, +- BaseObject::InternalFieldSet); ++ AddAccessor(isolate, ++ sig, ++ static_cast(DontDelete | DontEnum), ++ t, ++ BaseObject::InternalFieldGet, ++ BaseObject::InternalFieldSet, ++ FIXED_ONE_BYTE_STRING(isolate, "onread")); + } + + void StreamBase::RegisterExternalReferences( +diff --git a/src/stream_base.h b/src/stream_base.h +index 62a8928e144ad6aa67eeccdbc46d44da22887fb8..ccbd769ceaf3c1e024defb3104e601d037c98b6a 100644 +--- a/src/stream_base.h ++++ b/src/stream_base.h +@@ -413,6 +413,13 @@ class StreamBase : public StreamResource { + EmitToJSStreamListener default_listener_; + + void SetWriteResult(const StreamWriteResult& res); ++ static void AddAccessor(v8::Isolate* isolate, ++ v8::Local sig, ++ enum v8::PropertyAttribute attributes, ++ v8::Local t, ++ JSMethodFunction* getter, ++ JSMethodFunction* setter, ++ v8::Local str); + static void AddMethod(v8::Isolate* isolate, + v8::Local sig, + enum v8::PropertyAttribute attributes, diff --git a/patches/node/test_update_v8-stats_test_for_v8_12_6.patch b/patches/node/test_update_v8-stats_test_for_v8_12_6.patch new file mode 100644 index 000000000000..1e0ac6eaca22 --- /dev/null +++ b/patches/node/test_update_v8-stats_test_for_v8_12_6.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "targos@protonmail.com" +Date: Thu, 9 May 2024 12:00:39 +0200 +Subject: test: update v8-stats test for V8 12.6 + +Refs: https://github.com/v8/v8/commit/e30e228ee6e034de49a40af0173113198a19b497 + +diff --git a/test/parallel/test-v8-stats.js b/test/parallel/test-v8-stats.js +index 2366cbf716c11851bb3a759dce5db47d616516dc..9d2971ba9411bb98107f6a9acc8a07ec438b76e5 100644 +--- a/test/parallel/test-v8-stats.js ++++ b/test/parallel/test-v8-stats.js +@@ -48,6 +48,8 @@ const expectedHeapSpaces = [ + 'read_only_space', + 'shared_large_object_space', + 'shared_space', ++ 'shared_trusted_large_object_space', ++ 'shared_trusted_space', + 'trusted_large_object_space', + 'trusted_space' + ]; diff --git a/patches/v8/.patches b/patches/v8/.patches index e1772bc5cc11..b4a8f3fe3704 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -1,6 +1,3 @@ chore_allow_customizing_microtask_policy_per_context.patch deps_add_v8_object_setinternalfieldfornodecore.patch revert_heap_add_checks_position_info.patch -cherry-pick-f320600cd1f4.patch -cherry-pick-b3c01ac1e60a.patch -cherry-pick-3e037e195e50.patch diff --git a/patches/v8/cherry-pick-3e037e195e50.patch b/patches/v8/cherry-pick-3e037e195e50.patch deleted file mode 100644 index d1c938e7a7fe..000000000000 --- a/patches/v8/cherry-pick-3e037e195e50.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shu-yu Guo -Date: Tue, 21 May 2024 10:06:20 -0700 -Subject: Using FunctionParsingScope for parsing class static blocks - -Class static blocks contain statements, don't inherit the -ExpressionScope stack. - -Bug: 341663589 -Change-Id: Id52a60d77781201a706fcf2290d7d103f39bed83 -Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5553030 -Commit-Queue: Shu-yu Guo -Commit-Queue: Adam Klein -Reviewed-by: Adam Klein -Cr-Commit-Position: refs/heads/main@{#94014} - -diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc -index 660fdd2e9ad30b9487eafd351b1e517d2a489204..de4df35c0addc53c5620a19e3e06a8f9eff2a8fb 100644 ---- a/src/ast/scopes.cc -+++ b/src/ast/scopes.cc -@@ -2447,7 +2447,7 @@ bool Scope::MustAllocate(Variable* var) { - var->set_is_used(); - if (inner_scope_calls_eval_ && !var->is_this()) var->SetMaybeAssigned(); - } -- DCHECK(!var->has_forced_context_allocation() || var->is_used()); -+ CHECK(!var->has_forced_context_allocation() || var->is_used()); - // Global variables do not need to be allocated. - return !var->IsGlobalObjectProperty() && var->is_used(); - } -diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h -index 78bad16404d31505e34d4d69a948ad7a689776cc..7ccf203fadcf256b4dba40f66d8e5b4d3780282c 100644 ---- a/src/parsing/parser-base.h -+++ b/src/parsing/parser-base.h -@@ -2661,6 +2661,7 @@ typename ParserBase::BlockT ParserBase::ParseClassStaticBlock( - } - - FunctionState initializer_state(&function_state_, &scope_, initializer_scope); -+ FunctionParsingScope body_parsing_scope(impl()); - AcceptINScope accept_in(this, true); - - // Each static block has its own var and lexical scope, so make a new var diff --git a/patches/v8/cherry-pick-b3c01ac1e60a.patch b/patches/v8/cherry-pick-b3c01ac1e60a.patch deleted file mode 100644 index 7b4ef2ad25f3..000000000000 --- a/patches/v8/cherry-pick-b3c01ac1e60a.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shu-yu Guo -Date: Mon, 13 May 2024 11:23:20 -0700 -Subject: Don't build AccessInfo for storing to module exports - -Bug: 340221135 -Change-Id: I5af35be6ebf6a69db1c4687107503575b23973c4 -Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5534518 -Reviewed-by: Adam Klein -Commit-Queue: Shu-yu Guo -Cr-Commit-Position: refs/heads/main@{#93872} - -diff --git a/src/compiler/access-info.cc b/src/compiler/access-info.cc -index 7cff878839c85cd9c6571ee48f1a0fce081f4471..9d022ba402d7bfdd5ca745a4193ee0de0e3d755e 100644 ---- a/src/compiler/access-info.cc -+++ b/src/compiler/access-info.cc -@@ -526,6 +526,14 @@ PropertyAccessInfo AccessorAccessInfoHelper( - Cell::cast(module_namespace->module()->exports()->Lookup( - isolate, name.object(), - Smi::ToInt(Object::GetHash(*name.object()))))); -+ if (IsAnyStore(access_mode)) { -+ // ES#sec-module-namespace-exotic-objects-set-p-v-receiver -+ // ES#sec-module-namespace-exotic-objects-defineownproperty-p-desc -+ // -+ // Storing to a module namespace object is always an error or a no-op in -+ // JS. -+ return PropertyAccessInfo::Invalid(zone); -+ } - if (IsTheHole(cell->value(kRelaxedLoad), isolate)) { - // This module has not been fully initialized yet. - return PropertyAccessInfo::Invalid(zone); -diff --git a/src/maglev/maglev-graph-builder.cc b/src/maglev/maglev-graph-builder.cc -index c5587be1e0b5d944d4b4b6f8d4f48f62c41db183..2a79c2bf27d18ee60b130bd0f8d6ff00493cab1e 100644 ---- a/src/maglev/maglev-graph-builder.cc -+++ b/src/maglev/maglev-graph-builder.cc -@@ -4116,19 +4116,28 @@ ReduceResult MaglevGraphBuilder::TryBuildPropertyStore( - access_info.holder().value()); - } - -- if (access_info.IsFastAccessorConstant()) { -- return TryBuildPropertySetterCall(access_info, receiver, -- GetAccumulatorTagged()); -- } else { -- DCHECK(access_info.IsDataField() || access_info.IsFastDataConstant()); -- ReduceResult res = TryBuildStoreField(access_info, receiver, access_mode); -- if (res.IsDone()) { -- RecordKnownProperty(receiver, name, -- current_interpreter_frame_.accumulator(), -- AccessInfoGuaranteedConst(access_info), access_mode); -- return res; -+ switch (access_info.kind()) { -+ case compiler::PropertyAccessInfo::kFastAccessorConstant: -+ return TryBuildPropertySetterCall(access_info, receiver, -+ GetAccumulatorTagged()); -+ case compiler::PropertyAccessInfo::kDataField: -+ case compiler::PropertyAccessInfo::kFastDataConstant: { -+ ReduceResult res = TryBuildStoreField(access_info, receiver, access_mode); -+ if (res.IsDone()) { -+ RecordKnownProperty( -+ receiver, name, current_interpreter_frame_.accumulator(), -+ AccessInfoGuaranteedConst(access_info), access_mode); -+ return res; -+ } -+ return ReduceResult::Fail(); - } -- return ReduceResult::Fail(); -+ case compiler::PropertyAccessInfo::kInvalid: -+ case compiler::PropertyAccessInfo::kNotFound: -+ case compiler::PropertyAccessInfo::kDictionaryProtoDataConstant: -+ case compiler::PropertyAccessInfo::kDictionaryProtoAccessorConstant: -+ case compiler::PropertyAccessInfo::kModuleExport: -+ case compiler::PropertyAccessInfo::kStringLength: -+ UNREACHABLE(); - } - } - diff --git a/patches/v8/cherry-pick-f320600cd1f4.patch b/patches/v8/cherry-pick-f320600cd1f4.patch deleted file mode 100644 index b9f4086660b7..000000000000 --- a/patches/v8/cherry-pick-f320600cd1f4.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shu-yu Guo -Date: Thu, 9 May 2024 12:03:28 -0700 -Subject: Only normalize JSObject targets in SetOrCopyDataProperties - -Bug: 339458194 -Change-Id: I4d6eebdd921971fa28d7c474535d978900ba633f -Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5527397 -Reviewed-by: Rezvan Mahdavi Hezaveh -Commit-Queue: Shu-yu Guo -Cr-Commit-Position: refs/heads/main@{#93811} - -diff --git a/src/objects/js-objects.cc b/src/objects/js-objects.cc -index a90f88a638530c565f279e249ff03d3385b01089..9cb671370b9abfd3939e382c33bae8da8491b487 100644 ---- a/src/objects/js-objects.cc -+++ b/src/objects/js-objects.cc -@@ -434,9 +434,7 @@ Maybe JSReceiver::SetOrCopyDataProperties( - Nothing()); - - if (!from->HasFastProperties() && target->HasFastProperties() && -- !IsJSGlobalProxy(*target)) { -- // JSProxy is always in slow-mode. -- DCHECK(!IsJSProxy(*target)); -+ IsJSObject(*target) && !IsJSGlobalProxy(*target)) { - // Convert to slow properties if we're guaranteed to overflow the number of - // descriptors. - int source_length; diff --git a/patches/v8/chore_allow_customizing_microtask_policy_per_context.patch b/patches/v8/chore_allow_customizing_microtask_policy_per_context.patch index 22655c8e8e67..74f00ec2d709 100644 --- a/patches/v8/chore_allow_customizing_microtask_policy_per_context.patch +++ b/patches/v8/chore_allow_customizing_microtask_policy_per_context.patch @@ -9,7 +9,7 @@ capability to switch the microtask polciy of these per context microtask queue t Node.js integration in the renderer. diff --git a/include/v8-microtask-queue.h b/include/v8-microtask-queue.h -index bc0f31d4441a3de865b260d1d715f631d3231a12..95cfbde75298354d2d7d0a02feb715512e6db6f5 100644 +index 135dfb06a3bdd11e5db21c1974a38a086a7ac9cb..f2708774bfac59703e8981d8816a97a8e61b177a 100644 --- a/include/v8-microtask-queue.h +++ b/include/v8-microtask-queue.h @@ -97,6 +97,9 @@ class V8_EXPORT MicrotaskQueue { diff --git a/patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch b/patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch index 666806e282ac..e40c1d944949 100644 --- a/patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch +++ b/patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch @@ -11,7 +11,7 @@ This is a non-ABI breaking solution added by Node.js in v20.x for: which are necessary for backporting the vm-related memory fixes in https://github.com/nodejs/node/pull/48510. diff --git a/include/v8-object.h b/include/v8-object.h -index 49a2b7dcbb05ff8670105ca280d3f6c3f5cee44f..ae2f128549048abd24e856440819db06f65e871a 100644 +index 30708c44e10a5d965d6e3ad9df607ef62edb3c5d..ee862a1eed0694f87f4348af2f94869adc942ab8 100644 --- a/include/v8-object.h +++ b/include/v8-object.h @@ -22,6 +22,8 @@ class Function; @@ -23,7 +23,7 @@ index 49a2b7dcbb05ff8670105ca280d3f6c3f5cee44f..ae2f128549048abd24e856440819db06 /** * A private symbol -@@ -538,6 +540,21 @@ class V8_EXPORT Object : public Value { +@@ -543,6 +545,21 @@ class V8_EXPORT Object : public Value { index); } @@ -46,10 +46,10 @@ index 49a2b7dcbb05ff8670105ca280d3f6c3f5cee44f..ae2f128549048abd24e856440819db06 V8_INLINE static void* GetAlignedPointerFromInternalField( const BasicTracedReference& object, int index) { diff --git a/src/api/api.cc b/src/api/api.cc -index 2fe89e5778efbc309d56c721339e64d75804fea0..f459d5b4e408e16c476e7580ba707606f85c30e0 100644 +index 732ee34a9776e516b764957525161874d9c27a2b..a544aeddd7310f60b1cbc1496174a8d2ccdf775e 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -6252,14 +6252,33 @@ Local v8::Object::SlowGetInternalField(int index) { +@@ -6293,14 +6293,33 @@ Local v8::Object::SlowGetInternalField(int index) { isolate); } diff --git a/patches/v8/revert_heap_add_checks_position_info.patch b/patches/v8/revert_heap_add_checks_position_info.patch index 91809df292ff..f7993b29caf2 100644 --- a/patches/v8/revert_heap_add_checks_position_info.patch +++ b/patches/v8/revert_heap_add_checks_position_info.patch @@ -63,10 +63,10 @@ index 27fbc04bc880f2ea68dc7a126b8091a3b5ab4025..42d9649c5250c06a4d39ba0306cbdea0 } // namespace internal } // namespace v8 diff --git a/src/objects/objects.cc b/src/objects/objects.cc -index 15e428ad2a870cae1c9efcb7fa2426b88d25b3c7..cebe0cff397e8558bdb0e77dde609fe97dc7842f 100644 +index d83783a5560a355684a866e1aca2cc081835919b..f8622e1311838df9548bc1839cd40d17af02a7d2 100644 --- a/src/objects/objects.cc +++ b/src/objects/objects.cc -@@ -4357,7 +4357,6 @@ namespace { +@@ -4361,7 +4361,6 @@ namespace { template bool GetPositionInfoSlowImpl(base::Vector source, int position, Script::PositionInfo* info) { @@ -74,7 +74,7 @@ index 15e428ad2a870cae1c9efcb7fa2426b88d25b3c7..cebe0cff397e8558bdb0e77dde609fe9 if (position < 0) { position = 0; } -@@ -4404,11 +4403,25 @@ int GetLength(const String::LineEndsVector& vector) { +@@ -4408,11 +4407,25 @@ int GetLength(const String::LineEndsVector& vector) { } int GetLength(const Tagged& array) { return array->length(); } @@ -103,7 +103,7 @@ index 15e428ad2a870cae1c9efcb7fa2426b88d25b3c7..cebe0cff397e8558bdb0e77dde609fe9 const int ends_len = GetLength(ends); if (ends_len == 0) return false; -@@ -4447,31 +4460,6 @@ bool GetLineEndsContainerPositionInfo(const LineEndsContainer& ends, +@@ -4451,31 +4464,6 @@ bool GetLineEndsContainerPositionInfo(const LineEndsContainer& ends, info->column = position - info->line_start; } @@ -135,7 +135,7 @@ index 15e428ad2a870cae1c9efcb7fa2426b88d25b3c7..cebe0cff397e8558bdb0e77dde609fe9 // Line end is position of the linebreak character. info->line_end = GetLineEnd(ends, info->line); if (info->line_end > 0) { -@@ -4540,23 +4528,6 @@ bool Script::GetPositionInfoWithLineEnds( +@@ -4544,23 +4532,6 @@ bool Script::GetPositionInfoWithLineEnds( return true; } @@ -317,10 +317,10 @@ index d04bb9bf73b4b5725c99dade26510f4964ec0d4b..bb59c92a780160c4168349bfc5d523df AddressToTraceMap address_to_trace_; }; diff --git a/src/profiler/heap-snapshot-generator.cc b/src/profiler/heap-snapshot-generator.cc -index 4f3494d4677312ebc6b7e86ef64e08b434e9f77b..bd79fcbd0867bfe693d6e09753767107c2291391 100644 +index 1b7170bd84c29d9e6228e92a8e3ad46d50967a15..417a487bd6767b15bb177394f4273af21bd64883 100644 --- a/src/profiler/heap-snapshot-generator.cc +++ b/src/profiler/heap-snapshot-generator.cc -@@ -2994,6 +2994,7 @@ bool HeapSnapshotGenerator::GenerateSnapshot() { +@@ -2999,6 +2999,7 @@ bool HeapSnapshotGenerator::GenerateSnapshot() { IsolateSafepointScope scope(heap_); Isolate* isolate = heap_->isolate(); @@ -328,7 +328,7 @@ index 4f3494d4677312ebc6b7e86ef64e08b434e9f77b..bd79fcbd0867bfe693d6e09753767107 auto temporary_global_object_tags = v8_heap_explorer_.CollectTemporaryGlobalObjectsTags(); -@@ -3005,7 +3006,6 @@ bool HeapSnapshotGenerator::GenerateSnapshot() { +@@ -3010,7 +3011,6 @@ bool HeapSnapshotGenerator::GenerateSnapshot() { // DisallowGarbageCollection scope as the HeapObjectIterator used during // snapshot creation enters a safepoint as well. However, in practice we // already enter a safepoint above so that should never trigger a GC. @@ -336,7 +336,7 @@ index 4f3494d4677312ebc6b7e86ef64e08b434e9f77b..bd79fcbd0867bfe693d6e09753767107 NullContextForSnapshotScope null_context_scope(isolate); -@@ -3016,7 +3016,6 @@ bool HeapSnapshotGenerator::GenerateSnapshot() { +@@ -3021,7 +3021,6 @@ bool HeapSnapshotGenerator::GenerateSnapshot() { snapshot_->AddSyntheticRootEntries(); @@ -344,7 +344,7 @@ index 4f3494d4677312ebc6b7e86ef64e08b434e9f77b..bd79fcbd0867bfe693d6e09753767107 if (!FillReferences()) return false; snapshot_->FillChildren(); -@@ -3087,9 +3086,12 @@ bool HeapSnapshotGenerator::FillReferences() { +@@ -3092,9 +3091,12 @@ bool HeapSnapshotGenerator::FillReferences() { const int HeapSnapshotJSONSerializer::kNodeFieldsCount = 7; void HeapSnapshotJSONSerializer::Serialize(v8::OutputStream* stream) { @@ -358,7 +358,7 @@ index 4f3494d4677312ebc6b7e86ef64e08b434e9f77b..bd79fcbd0867bfe693d6e09753767107 DCHECK_NULL(writer_); writer_ = new OutputStreamWriter(stream); SerializeImpl(); -@@ -3447,17 +3449,10 @@ void HeapSnapshotJSONSerializer::SerializeTraceNodeInfos() { +@@ -3452,17 +3454,10 @@ void HeapSnapshotJSONSerializer::SerializeTraceNodeInfos() { // The cast is safe because script id is a non-negative Smi. buffer_pos = utoa(static_cast(info->script_id), buffer, buffer_pos); @@ -379,7 +379,7 @@ index 4f3494d4677312ebc6b7e86ef64e08b434e9f77b..bd79fcbd0867bfe693d6e09753767107 buffer[buffer_pos++] = '\0'; writer_->AddString(buffer.begin()); diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc -index 6e85e2c65d5542a2a67fa078d04ed5b82a89f0ff..a9528e3452b9873fb64da6aa9528d51239cb9afa 100644 +index 4885cab74f95378a9ff884d58a8c089624985a8f..f1e869f28e00c0449e85b00f3f4626e0941e4c43 100644 --- a/test/cctest/test-heap-profiler.cc +++ b/test/cctest/test-heap-profiler.cc @@ -2841,6 +2841,8 @@ TEST(ArrayGrowLeftTrim) { diff --git a/script/lib/util.py b/script/lib/util.py index 5c73876f90da..2e91ad6afa91 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -191,7 +191,10 @@ def get_buildtools_executable(name): 'win32': 'win', 'cygwin': 'win', }[sys.platform] - path = os.path.join(buildtools, chromium_platform, name) + if name == 'clang-format': + path = os.path.join(buildtools, chromium_platform, 'format', name) + else: + path = os.path.join(buildtools, chromium_platform, name) if sys.platform == 'win32': path += '.exe' return path diff --git a/script/sysroots.json b/script/sysroots.json index e924fcb6e01a..101909cc997c 100644 --- a/script/sysroots.json +++ b/script/sysroots.json @@ -1,51 +1,51 @@ { "bullseye_amd64": { "Key": "20230329T085712Z-1", - "Sha1Sum": "dcd5767244034c6f9b42b64a85423d6cb849fa1e", + "Sha256Sum": "6a468814ee3200152b9ccda8876ac86cd9d28b442fe30a59356a22296277d3a1", "SysrootDir": "debian_bullseye_amd64-sysroot", "Tarball": "debian_bullseye_amd64_sysroot.tar.xz", "URL": "https://dev-cdn.electronjs.org/linux-sysroots" }, "bullseye_arm64": { "Key": "20230329T085712Z-1", - "Sha1Sum": "3531a8b78fa72e7939f8082a56c9041e5bff423a", + "Sha256Sum": "af4575c58e4d4222a3634db24bc6c1d158dd456f9c0ad551c2e019324e7091ff", "SysrootDir": "debian_bullseye_arm64-sysroot", "Tarball": "debian_bullseye_arm64_sysroot.tar.xz", "URL": "https://dev-cdn.electronjs.org/linux-sysroots" }, "bullseye_armel": { "Key": "20230329T085712Z-1", - "Sha1Sum": "cf3a1348649eb26f40e358459c96afbb8e58017e", + "Sha256Sum": "86fd328cf923eeb81bcbdbdb522f73ab3f3750c272201d3f4258bc95a87d2568", "SysrootDir": "debian_bullseye_armel-sysroot", "Tarball": "debian_bullseye_armel_sysroot.tar.xz", "URL": "https://dev-cdn.electronjs.org/linux-sysroots" }, "bullseye_armhf": { "Key": "20230329T085712Z-1", - "Sha1Sum": "3fe59c416d0472dd4115fa3d42a29aa34191c0bf", + "Sha256Sum": "f04411e56cc721ac5de94eb2cbc7f3845ff60f286f18b97b30ae03a583465cc3", "SysrootDir": "debian_bullseye_armhf-sysroot", "Tarball": "debian_bullseye_armhf_sysroot.tar.xz", "URL": "https://dev-cdn.electronjs.org/linux-sysroots" }, "bullseye_i386": { "Key": "20230329T085712Z-1", - "Sha1Sum": "9b158682e7c111748e16914977546120429c9287", + "Sha256Sum": "6cc59a7b46a08af691cd692bd9fa48ddc0dbee4ec94dea09b0ea043aee024b96", "SysrootDir": "debian_bullseye_i386-sysroot", "Tarball": "debian_bullseye_i386_sysroot.tar.xz", "URL": "https://dev-cdn.electronjs.org/linux-sysroots" }, "bullseye_mips64el": { "Key": "20230329T085712Z-1", - "Sha1Sum": "c0d04d577608226d9fb0649b455800493fba2cde", + "Sha256Sum": "c4ac483a88e74b8dc58ff39687478502f18fb1b356d6b8fc86d684ec1a82e670", "SysrootDir": "debian_bullseye_mips64el-sysroot", "Tarball": "debian_bullseye_mips64el_sysroot.tar.xz", "URL": "https://dev-cdn.electronjs.org/linux-sysroots" }, "bullseye_mipsel": { "Key": "20230329T085712Z-1", - "Sha1Sum": "65f095e4edf23f0e789b22290dde9eb455aa54a0", + "Sha256Sum": "561adb4d26d2cca7589fe0ae6fa75ae9b811baf77a8a641b19ae11aa4948ed58", "SysrootDir": "debian_bullseye_mipsel-sysroot", "Tarball": "debian_bullseye_mipsel_sysroot.tar.xz", "URL": "https://dev-cdn.electronjs.org/linux-sysroots" } -} \ No newline at end of file +} diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 5b0e7b0dd0f5..1b51aae4c45b 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -1569,15 +1569,6 @@ void ConfigureHostResolver(v8::Isolate* isolate, } net::SecureDnsMode secure_dns_mode = net::SecureDnsMode::kOff; std::string default_doh_templates; - if (base::FeatureList::IsEnabled(features::kDnsOverHttps)) { - if (features::kDnsOverHttpsFallbackParam.Get()) { - secure_dns_mode = net::SecureDnsMode::kAutomatic; - } else { - secure_dns_mode = net::SecureDnsMode::kSecure; - } - default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get(); - } - net::DnsOverHttpsConfig doh_config; if (!default_doh_templates.empty() && secure_dns_mode != net::SecureDnsMode::kOff) { diff --git a/shell/browser/api/electron_api_global_shortcut.cc b/shell/browser/api/electron_api_global_shortcut.cc index 278cad9529b8..da142825be71 100644 --- a/shell/browser/api/electron_api_global_shortcut.cc +++ b/shell/browser/api/electron_api_global_shortcut.cc @@ -60,7 +60,6 @@ void GlobalShortcut::OnKeyPressed(const ui::Accelerator& accelerator) { // This should never occur, because if it does, GlobalShortcutListener // notifies us with wrong accelerator. NOTREACHED(); - return; } accelerator_callback_map_[accelerator].Run(); } diff --git a/shell/browser/api/electron_api_screen.cc b/shell/browser/api/electron_api_screen.cc index ed882742051b..c008edd808df 100644 --- a/shell/browser/api/electron_api_screen.cc +++ b/shell/browser/api/electron_api_screen.cc @@ -110,10 +110,12 @@ void Screen::OnDisplayAdded(const display::Display& new_display) { "display-added", new_display)); } -void Screen::OnDisplayRemoved(const display::Display& old_display) { - base::SingleThreadTaskRunner::GetCurrentDefault()->PostNonNestableTask( - FROM_HERE, base::BindOnce(&DelayEmit, base::Unretained(this), - "display-removed", old_display)); +void Screen::OnDisplaysRemoved(const display::Displays& old_displays) { + for (const auto& old_display : old_displays) { + base::SingleThreadTaskRunner::GetCurrentDefault()->PostNonNestableTask( + FROM_HERE, base::BindOnce(&DelayEmit, base::Unretained(this), + "display-removed", old_display)); + } } void Screen::OnDisplayMetricsChanged(const display::Display& display, diff --git a/shell/browser/api/electron_api_screen.h b/shell/browser/api/electron_api_screen.h index 19ce4d40dbc6..c94d0f62b966 100644 --- a/shell/browser/api/electron_api_screen.h +++ b/shell/browser/api/electron_api_screen.h @@ -57,7 +57,7 @@ class Screen : public gin::Wrappable, // display::DisplayObserver: void OnDisplayAdded(const display::Display& new_display) override; - void OnDisplayRemoved(const display::Display& old_display) override; + void OnDisplaysRemoved(const display::Displays& removed_displays) override; void OnDisplayMetricsChanged(const display::Display& display, uint32_t changed_metrics) override; diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 2db8e9a10997..332f368343c1 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -13,6 +13,7 @@ #include #include +#include "base/base64.h" #include "base/containers/contains.h" #include "base/containers/fixed_flat_map.h" #include "base/containers/id_map.h" @@ -30,6 +31,7 @@ #include "chrome/browser/ui/views/eye_dropper/eye_dropper.h" #include "chrome/common/pref_names.h" #include "components/embedder_support/user_agent_utils.h" +#include "components/input/native_web_keyboard_event.h" #include "components/prefs/pref_service.h" #include "components/prefs/scoped_user_pref_update.h" #include "components/security_state/content/content_utils.h" @@ -58,7 +60,6 @@ #include "content/public/browser/site_instance.h" #include "content/public/browser/storage_partition.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/input/native_web_keyboard_event.h" #include "content/public/common/referrer_type_converters.h" #include "content/public/common/result_codes.h" #include "content/public/common/webplugininfo.h" @@ -600,12 +601,25 @@ base::Value::Dict CreateFileSystemValue(const FileSystem& file_system) { return value; } -void WriteToFile(const base::FilePath& path, const std::string& content) { +void WriteToFile(const base::FilePath& path, + const std::string& content, + bool is_base64) { base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::BlockingType::WILL_BLOCK); DCHECK(!path.empty()); - base::WriteFile(path, content.data(), content.size()); + if (!is_base64) { + base::WriteFile(path, content); + return; + } + + const std::optional> decoded_content = + base::Base64Decode(content); + if (decoded_content) { + base::WriteFile(path, decoded_content.value()); + } else { + LOG(ERROR) << "Invalid base64. Not writing " << path; + } } void AppendToFile(const base::FilePath& path, const std::string& content) { @@ -1244,7 +1258,7 @@ void WebContents::UpdateTargetURL(content::WebContents* source, bool WebContents::HandleKeyboardEvent( content::WebContents* source, - const content::NativeWebKeyboardEvent& event) { + const input::NativeWebKeyboardEvent& event) { if (type_ == Type::kWebView && embedder_) { // Send the unhandled keyboard events back to the embedder. return embedder_->HandleKeyboardEvent(source, event); @@ -1259,7 +1273,7 @@ bool WebContents::HandleKeyboardEvent( // code. bool WebContents::PlatformHandleKeyboardEvent( content::WebContents* source, - const content::NativeWebKeyboardEvent& event) { + const input::NativeWebKeyboardEvent& event) { // Check if the webContents has preferences and to ignore shortcuts auto* web_preferences = WebContentsPreferences::From(source); if (web_preferences && web_preferences->ShouldIgnoreMenuShortcuts()) @@ -1277,7 +1291,7 @@ bool WebContents::PlatformHandleKeyboardEvent( content::KeyboardEventProcessingResult WebContents::PreHandleKeyboardEvent( content::WebContents* source, - const content::NativeWebKeyboardEvent& event) { + const input::NativeWebKeyboardEvent& event) { if (exclusive_access_manager_.HandleUserKeyEvent(event)) return content::KeyboardEventProcessingResult::HANDLED; @@ -1285,7 +1299,7 @@ content::KeyboardEventProcessingResult WebContents::PreHandleKeyboardEvent( event.GetType() == blink::WebInputEvent::Type::kKeyUp) { // For backwards compatibility, pretend that `kRawKeyDown` events are // actually `kKeyDown`. - content::NativeWebKeyboardEvent tweaked_event(event); + input::NativeWebKeyboardEvent tweaked_event(event); if (event.GetType() == blink::WebInputEvent::Type::kRawKeyDown) tweaked_event.SetType(blink::WebInputEvent::Type::kKeyDown); bool prevent_default = Emit("before-input-event", tweaked_event); @@ -3330,7 +3344,7 @@ void WebContents::SendInputEvent(v8::Isolate* isolate, return; } } else if (blink::WebInputEvent::IsKeyboardEventType(type)) { - content::NativeWebKeyboardEvent keyboard_event( + input::NativeWebKeyboardEvent keyboard_event( blink::WebKeyboardEvent::Type::kRawKeyDown, blink::WebInputEvent::Modifiers::kNoModifiers, ui::EventTimeForNow()); if (gin::ConvertFromV8(isolate, input_event, &keyboard_event)) { @@ -3919,7 +3933,8 @@ void WebContents::ExitPictureInPicture() { void WebContents::DevToolsSaveToFile(const std::string& url, const std::string& content, - bool save_as) { + bool save_as, + bool is_base64) { base::FilePath path; auto it = saved_files_.find(url); if (it != saved_files_.end() && !save_as) { @@ -3942,8 +3957,8 @@ void WebContents::DevToolsSaveToFile(const std::string& url, inspectable_web_contents_->CallClientFunction( "DevToolsAPI", "savedURL", base::Value(url), base::Value(path.AsUTF8Unsafe())); - file_task_runner_->PostTask(FROM_HERE, - base::BindOnce(&WriteToFile, path, content)); + file_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&WriteToFile, path, content, is_base64)); } void WebContents::DevToolsAppendToFile(const std::string& url, diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 07fd3ad8daa8..e6dc60046ff8 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -568,15 +568,13 @@ class WebContents : public ExclusiveAccessContext, void CloseContents(content::WebContents* source) override; void ActivateContents(content::WebContents* contents) override; void UpdateTargetURL(content::WebContents* source, const GURL& url) override; - bool HandleKeyboardEvent( - content::WebContents* source, - const content::NativeWebKeyboardEvent& event) override; - bool PlatformHandleKeyboardEvent( - content::WebContents* source, - const content::NativeWebKeyboardEvent& event); + bool HandleKeyboardEvent(content::WebContents* source, + const input::NativeWebKeyboardEvent& event) override; + bool PlatformHandleKeyboardEvent(content::WebContents* source, + const input::NativeWebKeyboardEvent& event); content::KeyboardEventProcessingResult PreHandleKeyboardEvent( content::WebContents* source, - const content::NativeWebKeyboardEvent& event) override; + const input::NativeWebKeyboardEvent& event) override; void ContentsZoomChange(bool zoom_in) override; void EnterFullscreenModeForTab( content::RenderFrameHost* requesting_frame, @@ -738,7 +736,8 @@ class WebContents : public ExclusiveAccessContext, // InspectableWebContentsDelegate: void DevToolsSaveToFile(const std::string& url, const std::string& content, - bool save_as) override; + bool save_as, + bool is_base64) override; void DevToolsAppendToFile(const std::string& url, const std::string& content) override; void DevToolsRequestFileSystems() override; diff --git a/shell/browser/api/electron_api_web_contents_mac.mm b/shell/browser/api/electron_api_web_contents_mac.mm index f27ab28a9328..52c436283961 100644 --- a/shell/browser/api/electron_api_web_contents_mac.mm +++ b/shell/browser/api/electron_api_web_contents_mac.mm @@ -37,9 +37,9 @@ bool WebContents::IsFocused() const { bool WebContents::PlatformHandleKeyboardEvent( content::WebContents* source, - const content::NativeWebKeyboardEvent& event) { + const input::NativeWebKeyboardEvent& event) { if (event.skip_if_unhandled || - event.GetType() == content::NativeWebKeyboardEvent::Type::kChar) + event.GetType() == input::NativeWebKeyboardEvent::Type::kChar) return false; // Check if the webContents has preferences and to ignore shortcuts diff --git a/shell/browser/api/frame_subscriber.cc b/shell/browser/api/frame_subscriber.cc index cdb65c76677f..918fbef3620c 100644 --- a/shell/browser/api/frame_subscriber.cc +++ b/shell/browser/api/frame_subscriber.cc @@ -131,7 +131,7 @@ void FrameSubscriber::OnFrameCaptured( SkImageInfo::MakeN32(content_rect.width(), content_rect.height(), kPremul_SkAlphaType), pixels, - media::VideoFrame::RowBytes(media::VideoFrame::kARGBPlane, + media::VideoFrame::RowBytes(media::VideoFrame::Plane::kARGB, info->pixel_format, info->coded_size.width()), [](void* addr, void* context) { delete static_cast(context); diff --git a/shell/browser/browser_process_impl.cc b/shell/browser/browser_process_impl.cc index 5a425e95c390..f43d20475f6f 100644 --- a/shell/browser/browser_process_impl.cc +++ b/shell/browser/browser_process_impl.cc @@ -314,6 +314,10 @@ os_crypt_async::OSCryptAsync* BrowserProcessImpl::os_crypt_async() { return os_crypt_async_.get(); } +void BrowserProcessImpl::set_additional_os_crypt_async_provider_for_test( + size_t precedence, + std::unique_ptr provider) {} + void BrowserProcessImpl::SetSystemLocale(const std::string& locale) { system_locale_ = locale; } @@ -351,7 +355,6 @@ void BrowserProcessImpl::SetLinuxStorageBackend( break; case os_crypt::SelectedLinuxBackend::DEFER: NOTREACHED(); - break; } } #endif // BUILDFLAG(IS_LINUX) diff --git a/shell/browser/browser_process_impl.h b/shell/browser/browser_process_impl.h index 5b15797e4088..a5eda8efe229 100644 --- a/shell/browser/browser_process_impl.h +++ b/shell/browser/browser_process_impl.h @@ -115,6 +115,9 @@ class BrowserProcessImpl : public BrowserProcess { HidSystemTrayIcon* hid_system_tray_icon() override; UsbSystemTrayIcon* usb_system_tray_icon() override; os_crypt_async::OSCryptAsync* os_crypt_async() override; + void set_additional_os_crypt_async_provider_for_test( + size_t precedence, + std::unique_ptr provider) override; void CreateDevToolsProtocolHandler() override {} void CreateDevToolsAutoOpener() override {} void set_background_mode_manager_for_test( diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 0a50bebb302e..3c569a533fe6 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -58,6 +58,7 @@ #include "electron/fuses.h" #include "electron/shell/common/api/api.mojom.h" #include "extensions/browser/extension_navigation_ui_data.h" +#include "extensions/common/extension_id.h" #include "mojo/public/cpp/bindings/binder_map.h" #include "net/ssl/ssl_cert_request_info.h" #include "net/ssl/ssl_private_key.h" @@ -282,11 +283,10 @@ RenderProcessHostPrivilege GetPrivilegeRequiredByUrl( RenderProcessHostPrivilege GetProcessPrivilege( content::RenderProcessHost* process_host, - extensions::ProcessMap* process_map, - extensions::ExtensionRegistry* registry) { - std::set extension_ids = - process_map->GetExtensionsInProcess(process_host->GetID()); - if (extension_ids.empty()) + extensions::ProcessMap* process_map) { + std::optional extension_id = + process_map->GetExtensionIdForProcess(process_host->GetID()); + if (!extension_id.has_value()) return RenderProcessHostPrivilege::kNormal; return RenderProcessHostPrivilege::kExtension; @@ -740,8 +740,7 @@ bool ElectronBrowserClient::IsSuitableHost( // required by the site. RenderProcessHostPrivilege privilege_required = GetPrivilegeRequiredByUrl(site_url, registry); - return GetProcessPrivilege(process_host, process_map, registry) == - privilege_required; + return GetProcessPrivilege(process_host, process_map) == privilege_required; #else return content::ContentBrowserClient::IsSuitableHost(process_host, site_url); #endif diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index 39e6b90c7228..2ad408c27d28 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -6,6 +6,7 @@ #define ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_CLIENT_H_ #include +#include #include #include @@ -288,7 +289,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient, const base::RepeatingCallback& wc_getter, content::NavigationUIData* navigation_ui_data, int frame_tree_node_id, - absl::optional navigation_id) override; + std::optional navigation_id) override; base::flat_set GetPluginMimeTypesWithExternalHandlers( content::BrowserContext* browser_context) override; bool IsSuitableHost(content::RenderProcessHost* process_host, diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index 526d0cdfc28b..258eb0fbac26 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -5,6 +5,7 @@ #include "shell/browser/electron_browser_context.h" #include +#include #include @@ -156,21 +157,21 @@ media::mojom::CaptureHandlePtr CreateCaptureHandle( } // Copied from chrome/browser/media/webrtc/desktop_capture_devices_util.cc. -absl::optional GetZoomLevel(content::WebContents* capturer, - const url::Origin& capturer_origin, - const content::DesktopMediaID& captured_id) { +std::optional GetZoomLevel(content::WebContents* capturer, + const url::Origin& capturer_origin, + const content::DesktopMediaID& captured_id) { content::RenderFrameHost* const captured_rfh = content::RenderFrameHost::FromID( captured_id.web_contents_id.render_process_id, captured_id.web_contents_id.main_render_frame_id); if (!captured_rfh || !captured_rfh->IsActive()) { - return absl::nullopt; + return std::nullopt; } content::WebContents* const captured_wc = content::WebContents::FromRenderFrameHost(captured_rfh); if (!captured_wc) { - return absl::nullopt; + return std::nullopt; } double zoom_level = blink::PageZoomLevelToZoomFactor( diff --git a/shell/browser/electron_browser_main_parts_posix.cc b/shell/browser/electron_browser_main_parts_posix.cc index 1eb33ae28c98..35fa02d317df 100644 --- a/shell/browser/electron_browser_main_parts_posix.cc +++ b/shell/browser/electron_browser_main_parts_posix.cc @@ -4,6 +4,7 @@ // Most code came from: chrome/browser/chrome_browser_main_posix.cc. +#include "base/notreached.h" #include "shell/browser/electron_browser_main_parts.h" #include @@ -139,11 +140,11 @@ void ShutdownDetector::ThreadMain() { read(shutdown_fd_, reinterpret_cast(&signal) + bytes_read, sizeof(signal) - bytes_read)); if (ret < 0) { - NOTREACHED() << "Unexpected error: " << strerror(errno); + NOTREACHED_IN_MIGRATION() << "Unexpected error: " << strerror(errno); ShutdownFDReadError(); break; } else if (ret == 0) { - NOTREACHED() << "Unexpected closure of shutdown pipe."; + NOTREACHED_IN_MIGRATION() << "Unexpected closure of shutdown pipe."; ShutdownFDClosedError(); break; } diff --git a/shell/browser/electron_navigation_throttle.cc b/shell/browser/electron_navigation_throttle.cc index b278d01677fa..35ad181eee2b 100644 --- a/shell/browser/electron_navigation_throttle.cc +++ b/shell/browser/electron_navigation_throttle.cc @@ -28,7 +28,6 @@ ElectronNavigationThrottle::WillStartRequest() { auto* contents = handle->GetWebContents(); if (!contents) { NOTREACHED(); - return PROCEED; } v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); @@ -69,7 +68,6 @@ ElectronNavigationThrottle::WillRedirectRequest() { auto* contents = handle->GetWebContents(); if (!contents) { NOTREACHED(); - return PROCEED; } v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index e29498f9bd42..41a47c7eedd5 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -377,7 +377,8 @@ ElectronPermissionManager::CheckProtectedUSBClasses( blink::mojom::PermissionStatus ElectronPermissionManager::GetPermissionStatusForCurrentDocument( blink::PermissionType permission, - content::RenderFrameHost* render_frame_host) { + content::RenderFrameHost* render_frame_host, + bool /*should_include_device_status*/) { if (render_frame_host->IsNestedWithinFencedFrame()) return blink::mojom::PermissionStatus::DENIED; @@ -420,6 +421,7 @@ ElectronPermissionManager::SubscribeToPermissionStatusChange( content::RenderProcessHost* render_process_host, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, + bool should_include_device_status, base::RepeatingCallback callback) { return SubscriptionId(); } diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index bd6d2c69aaf5..49336cd672b6 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -130,7 +130,8 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { const url::Origin& embedding_origin) override; blink::mojom::PermissionStatus GetPermissionStatusForCurrentDocument( blink::PermissionType permission, - content::RenderFrameHost* render_frame_host) override; + content::RenderFrameHost* render_frame_host, + bool should_include_device_status) override; blink::mojom::PermissionStatus GetPermissionStatusForWorker( blink::PermissionType permission, content::RenderProcessHost* render_process_host, @@ -144,6 +145,7 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { content::RenderProcessHost* render_process_host, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, + bool should_include_device_status, base::RepeatingCallback callback) override; void UnsubscribeFromPermissionStatusChange(SubscriptionId id) override; diff --git a/shell/browser/electron_speech_recognition_manager_delegate.cc b/shell/browser/electron_speech_recognition_manager_delegate.cc index 432ca52bcd26..f3f033485686 100644 --- a/shell/browser/electron_speech_recognition_manager_delegate.cc +++ b/shell/browser/electron_speech_recognition_manager_delegate.cc @@ -21,9 +21,6 @@ void ElectronSpeechRecognitionManagerDelegate::OnRecognitionStart( void ElectronSpeechRecognitionManagerDelegate::OnAudioStart(int session_id) {} -void ElectronSpeechRecognitionManagerDelegate::OnEnvironmentEstimationComplete( - int session_id) {} - void ElectronSpeechRecognitionManagerDelegate::OnSoundStart(int session_id) {} void ElectronSpeechRecognitionManagerDelegate::OnSoundEnd(int session_id) {} @@ -35,11 +32,11 @@ void ElectronSpeechRecognitionManagerDelegate::OnRecognitionEnd( void ElectronSpeechRecognitionManagerDelegate::OnRecognitionResults( int session_id, - const std::vector& results) {} + const std::vector& results) {} void ElectronSpeechRecognitionManagerDelegate::OnRecognitionError( int session_id, - const blink::mojom::SpeechRecognitionError& error) {} + const media::mojom::SpeechRecognitionError& error) {} void ElectronSpeechRecognitionManagerDelegate::OnAudioLevelsChange( int session_id, diff --git a/shell/browser/electron_speech_recognition_manager_delegate.h b/shell/browser/electron_speech_recognition_manager_delegate.h index 519ac7987a7b..0143d91b3ba7 100644 --- a/shell/browser/electron_speech_recognition_manager_delegate.h +++ b/shell/browser/electron_speech_recognition_manager_delegate.h @@ -28,17 +28,16 @@ class ElectronSpeechRecognitionManagerDelegate // content::SpeechRecognitionEventListener: void OnRecognitionStart(int session_id) override; void OnAudioStart(int session_id) override; - void OnEnvironmentEstimationComplete(int session_id) override; void OnSoundStart(int session_id) override; void OnSoundEnd(int session_id) override; void OnAudioEnd(int session_id) override; void OnRecognitionEnd(int session_id) override; void OnRecognitionResults( int session_id, - const std::vector&) override; + const std::vector&) override; void OnRecognitionError( int session_id, - const blink::mojom::SpeechRecognitionError& error) override; + const media::mojom::SpeechRecognitionError& error) override; void OnAudioLevelsChange(int session_id, float volume, float noise_volume) override; diff --git a/shell/browser/extensions/api/management/electron_management_api_delegate.cc b/shell/browser/extensions/api/management/electron_management_api_delegate.cc index f0d49e0f6ae6..0a19528e6be5 100644 --- a/shell/browser/extensions/api/management/electron_management_api_delegate.cc +++ b/shell/browser/extensions/api/management/electron_management_api_delegate.cc @@ -203,12 +203,12 @@ void ElectronManagementAPIDelegate::SetLaunchType( GURL ElectronManagementAPIDelegate::GetIconURL( const extensions::Extension* extension, int icon_size, - ExtensionIconSet::MatchType match, + ExtensionIconSet::Match match, bool grayscale) const { - GURL icon_url(base::StringPrintf("%s%s/%d/%d%s", - chrome::kChromeUIExtensionIconURL, - extension->id().c_str(), icon_size, match, - grayscale ? "?grayscale=true" : "")); + GURL icon_url(base::StringPrintf( + "%s%s/%d/%d%s", chrome::kChromeUIExtensionIconURL, + extension->id().c_str(), icon_size, static_cast(match), + grayscale ? "?grayscale=true" : "")); CHECK(icon_url.is_valid()); return icon_url; } diff --git a/shell/browser/extensions/api/management/electron_management_api_delegate.h b/shell/browser/extensions/api/management/electron_management_api_delegate.h index fce21d57b19c..c60f35523787 100644 --- a/shell/browser/extensions/api/management/electron_management_api_delegate.h +++ b/shell/browser/extensions/api/management/electron_management_api_delegate.h @@ -69,7 +69,7 @@ class ElectronManagementAPIDelegate : public extensions::ManagementAPIDelegate { extensions::LaunchType launch_type) const override; GURL GetIconURL(const extensions::Extension* extension, int icon_size, - ExtensionIconSet::MatchType match, + ExtensionIconSet::Match match, bool grayscale) const override; GURL GetEffectiveUpdateURL(const extensions::Extension& extension, content::BrowserContext* context) const override; diff --git a/shell/browser/extensions/api/resources_private/resources_private_api.cc b/shell/browser/extensions/api/resources_private/resources_private_api.cc index d3f1158bd653..e9d3c26f49cc 100644 --- a/shell/browser/extensions/api/resources_private/resources_private_api.cc +++ b/shell/browser/extensions/api/resources_private/resources_private_api.cc @@ -56,10 +56,8 @@ ExtensionFunction::ResponseAction ResourcesPrivateGetStringsFunction::Run() { break; case api::resources_private::Component::kIdentity: NOTREACHED(); - break; case api::resources_private::Component::kNone: NOTREACHED(); - break; } const std::string& app_locale = g_browser_process->GetApplicationLocale(); diff --git a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc index 976bd56cdb83..be69be338f47 100644 --- a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc +++ b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc @@ -57,7 +57,6 @@ bool ElectronRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { info->os = extensions::api::runtime::PlatformOs::kOpenbsd; } else { NOTREACHED(); - return false; } const char* arch = update_client::UpdateQueryParams::GetArch(); @@ -71,7 +70,6 @@ bool ElectronRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { info->arch = extensions::api::runtime::PlatformArch::kX86_64; } else { NOTREACHED(); - return false; } const char* nacl_arch = update_client::UpdateQueryParams::GetNaclArch(); @@ -83,7 +81,6 @@ bool ElectronRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kX86_64; } else { NOTREACHED(); - return false; } return true; diff --git a/shell/browser/extensions/electron_extension_host_delegate.cc b/shell/browser/extensions/electron_extension_host_delegate.cc index d256517f2efc..02695d6897dc 100644 --- a/shell/browser/extensions/electron_extension_host_delegate.cc +++ b/shell/browser/extensions/electron_extension_host_delegate.cc @@ -36,7 +36,6 @@ ElectronExtensionHostDelegate::GetJavaScriptDialogManager() { // TODO(jamescook): Create a JavaScriptDialogManager or reuse the one from // content_shell. NOTREACHED(); - return nullptr; } void ElectronExtensionHostDelegate::CreateTab( @@ -72,7 +71,6 @@ content::PictureInPictureResult ElectronExtensionHostDelegate::EnterPictureInPicture( content::WebContents* web_contents) { NOTREACHED(); - return content::PictureInPictureResult(); } void ElectronExtensionHostDelegate::ExitPictureInPicture() { diff --git a/shell/browser/extensions/electron_extension_system.cc b/shell/browser/extensions/electron_extension_system.cc index 9468170f2a1c..66f43b700be0 100644 --- a/shell/browser/extensions/electron_extension_system.cc +++ b/shell/browser/extensions/electron_extension_system.cc @@ -190,14 +190,12 @@ void ElectronExtensionSystem::InstallUpdate( bool install_immediately, InstallUpdateCallback install_update_callback) { NOTREACHED(); - base::DeletePathRecursively(temp_dir); } bool ElectronExtensionSystem::FinishDelayedInstallationIfReady( const std::string& extension_id, bool install_immediately) { NOTREACHED(); - return false; } void ElectronExtensionSystem::PerformActionBasedOnOmahaAttributes( diff --git a/shell/browser/extensions/electron_extensions_api_client.cc b/shell/browser/extensions/electron_extensions_api_client.cc index 294fb1d97214..1831a1e2c91d 100644 --- a/shell/browser/extensions/electron_extensions_api_client.cc +++ b/shell/browser/extensions/electron_extensions_api_client.cc @@ -78,7 +78,8 @@ class ElectronMimeHandlerViewGuestDelegate } void RecordLoadMetric(bool in_main_frame, - const std::string& mime_type) override {} + const std::string& mime_type, + content::BrowserContext* browser_context) override {} }; ElectronExtensionsAPIClient::ElectronExtensionsAPIClient() = default; diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index 172a5b4f69d3..1af0a6e81537 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/shell/browser/extensions/electron_extensions_browser_client.cc @@ -270,6 +270,7 @@ ElectronExtensionsBrowserClient::GetProcessManagerDelegate() const { mojo::PendingRemote ElectronExtensionsBrowserClient::GetControlledFrameEmbedderURLLoader( + const url::Origin& app_origin, int frame_tree_node_id, content::BrowserContext* browser_context) { return mojo::PendingRemote(); diff --git a/shell/browser/extensions/electron_extensions_browser_client.h b/shell/browser/extensions/electron_extensions_browser_client.h index d50b44fe381d..f29b541c1dd4 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.h +++ b/shell/browser/extensions/electron_extensions_browser_client.h @@ -16,6 +16,7 @@ #include "mojo/public/cpp/bindings/pending_remote.h" #include "services/network/public/cpp/resource_request.h" #include "services/network/public/mojom/fetch_api.mojom.h" +#include "url/origin.h" class PrefService; @@ -104,6 +105,7 @@ class ElectronExtensionsBrowserClient const override; mojo::PendingRemote GetControlledFrameEmbedderURLLoader( + const url::Origin& app_origin, int frame_tree_node_id, content::BrowserContext* browser_context) override; std::unique_ptr diff --git a/shell/browser/javascript_environment.cc b/shell/browser/javascript_environment.cc index 05ea280b0f74..170e30536c0e 100644 --- a/shell/browser/javascript_environment.cc +++ b/shell/browser/javascript_environment.cc @@ -83,16 +83,6 @@ gin::IsolateHolder CreateIsolateHolder(v8::Isolate* isolate) { // Align behavior with V8 Isolate default for Node.js. // This is necessary for important aspects of Node.js // including heap and cpu profilers to function properly. - // - // Additional note: - // We do not want to invoke a termination exception at exit when - // we're running with only_terminate_in_safe_scope set to false. Heap and - // coverage profilers run after environment exit and if there is a pending - // exception at this stage then they will fail to generate the appropriate - // profiles. Node.js does not call node::Stop(), which calls - // isolate->TerminateExecution(), and therefore does not have this issue - // when also running with only_terminate_in_safe_scope set to false. - create_params->only_terminate_in_safe_scope = false; return gin::IsolateHolder( base::SingleThreadTaskRunner::GetCurrentDefault(), diff --git a/shell/browser/native_window.h b/shell/browser/native_window.h index f0dc4d04c3da..ff3f37f0923d 100644 --- a/shell/browser/native_window.h +++ b/shell/browser/native_window.h @@ -27,7 +27,7 @@ class SkRegion; -namespace content { +namespace input { struct NativeWebKeyboardEvent; } @@ -290,9 +290,9 @@ class NativeWindow : public base::SupportsUserData, virtual void SetWindowControlsOverlayRect(const gfx::Rect& overlay_rect); // Methods called by the WebContents. - virtual void HandleKeyboardEvent( - content::WebContents*, - const content::NativeWebKeyboardEvent& event) {} + virtual void HandleKeyboardEvent(content::WebContents*, + const input::NativeWebKeyboardEvent& event) { + } // Public API used by platform-dependent delegates and observers to send UI // related notifications. diff --git a/shell/browser/native_window_features.cc b/shell/browser/native_window_features.cc index fe5b0d7b57e0..caacff961784 100644 --- a/shell/browser/native_window_features.cc +++ b/shell/browser/native_window_features.cc @@ -5,6 +5,7 @@ #include "shell/browser/native_window_features.h" namespace features { -const base::Feature kWaylandWindowDecorations{"WaylandWindowDecorations", - base::FEATURE_ENABLED_BY_DEFAULT}; +BASE_FEATURE(kWaylandWindowDecorations, + "WaylandWindowDecorations", + base::FEATURE_ENABLED_BY_DEFAULT); } diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index a6a58e43115c..6921a877d9db 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -233,11 +233,11 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options, // Create views::Widget and assign window_ with it. // TODO(zcbenz): Get rid of the window_ in future. - views::Widget::InitParams params; - params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; + views::Widget::InitParams params( + views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET, + views::Widget::InitParams::TYPE_WINDOW); params.bounds = bounds; params.delegate = this; - params.type = views::Widget::InitParams::TYPE_WINDOW; params.headless_mode = true; params.native_widget = new ElectronNativeWidgetMac(this, windowType, styleMask, widget()); diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 5b438621d455..0b8b43c0a16e 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -268,25 +268,25 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options, widget()->AddObserver(this); - views::Widget::InitParams params; - params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; + using InitParams = views::Widget::InitParams; + auto params = InitParams{InitParams::WIDGET_OWNS_NATIVE_WIDGET, + InitParams::TYPE_WINDOW}; params.bounds = bounds; params.delegate = this; - params.type = views::Widget::InitParams::TYPE_WINDOW; params.remove_standard_frame = !has_frame() || has_client_frame(); // If a client frame, we need to draw our own shadows. if (IsTranslucent() || has_client_frame()) - params.opacity = views::Widget::InitParams::WindowOpacity::kTranslucent; + params.opacity = InitParams::WindowOpacity::kTranslucent; // The given window is most likely not rectangular since it is translucent and // has no standard frame, don't show a shadow for it. if (IsTranslucent() && !has_frame()) - params.shadow_type = views::Widget::InitParams::ShadowType::kNone; + params.shadow_type = InitParams::ShadowType::kNone; bool focusable; if (options.Get(options::kFocusable, &focusable) && !focusable) - params.activatable = views::Widget::InitParams::Activatable::kNo; + params.activatable = InitParams::Activatable::kNo; #if BUILDFLAG(IS_WIN) if (parent) @@ -1718,7 +1718,7 @@ void NativeWindowViews::OnWidgetMove() { void NativeWindowViews::HandleKeyboardEvent( content::WebContents*, - const content::NativeWebKeyboardEvent& event) { + const input::NativeWebKeyboardEvent& event) { if (widget_destroyed_) return; diff --git a/shell/browser/native_window_views.h b/shell/browser/native_window_views.h index 81c39adfc003..b2bb11beca08 100644 --- a/shell/browser/native_window_views.h +++ b/shell/browser/native_window_views.h @@ -231,9 +231,8 @@ class NativeWindowViews : public NativeWindow, void SetEnabledInternal(bool enabled); // NativeWindow: - void HandleKeyboardEvent( - content::WebContents*, - const content::NativeWebKeyboardEvent& event) override; + void HandleKeyboardEvent(content::WebContents*, + const input::NativeWebKeyboardEvent& event) override; // ui::EventHandler: void OnMouseEvent(ui::MouseEvent* event) override; diff --git a/shell/browser/net/proxying_websocket.cc b/shell/browser/net/proxying_websocket.cc index ae73b6d70f67..a14bb2a9cfbd 100644 --- a/shell/browser/net/proxying_websocket.cc +++ b/shell/browser/net/proxying_websocket.cc @@ -392,7 +392,6 @@ void ProxyingWebSocket::OnAuthRequiredComplete(AuthRequiredResponse rv) { break; case AuthRequiredResponse::kIoPending: NOTREACHED(); - break; } } diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index 641abe788dcd..53e0a17d54e3 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/shell/browser/net/system_network_context_manager.cc @@ -261,15 +261,6 @@ void SystemNetworkContextManager::OnNetworkServiceCreated( net::SecureDnsMode default_secure_dns_mode = net::SecureDnsMode::kOff; std::string default_doh_templates; - if (base::FeatureList::IsEnabled(features::kDnsOverHttps)) { - if (features::kDnsOverHttpsFallbackParam.Get()) { - default_secure_dns_mode = net::SecureDnsMode::kAutomatic; - } else { - default_secure_dns_mode = net::SecureDnsMode::kSecure; - } - default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get(); - } - net::DnsOverHttpsConfig doh_config; if (!default_doh_templates.empty() && default_secure_dns_mode != net::SecureDnsMode::kOff) { diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index 93a0541b46ba..80cbe94d58fd 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -21,9 +21,9 @@ #include "components/viz/common/frame_sinks/copy_output_request.h" #include "components/viz/common/frame_sinks/delay_based_time_source.h" #include "components/viz/common/quads/compositor_render_pass.h" -#include "content/browser/renderer_host/cursor_manager.h" // nogncheck #include "content/browser/renderer_host/render_widget_host_delegate.h" // nogncheck #include "content/browser/renderer_host/render_widget_host_owner_delegate.h" // nogncheck +#include "content/common/input/cursor_manager.h" #include "content/common/input/synthetic_gesture.h" // nogncheck #include "content/common/input/synthetic_gesture_target.h" #include "content/public/browser/browser_task_traits.h" @@ -593,7 +593,7 @@ void OffScreenRenderWidgetHostView::DidNavigate() { bool OffScreenRenderWidgetHostView::TransformPointToCoordSpaceForView( const gfx::PointF& point, - RenderWidgetHostViewBase* target_view, + RenderWidgetHostViewInput* target_view, gfx::PointF* transformed_point) { if (target_view == this) { *transformed_point = point; diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 2ce5204d9751..45b5f1f2bba7 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -174,7 +174,7 @@ class OffScreenRenderWidgetHostView bool TransformPointToCoordSpaceForView( const gfx::PointF& point, - RenderWidgetHostViewBase* target_view, + RenderWidgetHostViewInput* target_view, gfx::PointF* transformed_point) override; // RenderFrameMetadataProvider::Observer: diff --git a/shell/browser/osr/osr_video_consumer.cc b/shell/browser/osr/osr_video_consumer.cc index 939456bf8d22..818c98ef0e5d 100644 --- a/shell/browser/osr/osr_video_consumer.cc +++ b/shell/browser/osr/osr_video_consumer.cc @@ -120,7 +120,7 @@ void OffScreenVideoConsumer::OnFrameCaptured( SkImageInfo::MakeN32(content_rect.width(), content_rect.height(), kPremul_SkAlphaType), pixels, - media::VideoFrame::RowBytes(media::VideoFrame::kARGBPlane, + media::VideoFrame::RowBytes(media::VideoFrame::Plane::kARGB, info->pixel_format, info->coded_size.width()), [](void* addr, void* context) { delete static_cast(context); diff --git a/shell/browser/ui/electron_desktop_window_tree_host_linux.cc b/shell/browser/ui/electron_desktop_window_tree_host_linux.cc index 30153881739e..ec5dfccd200d 100644 --- a/shell/browser/ui/electron_desktop_window_tree_host_linux.cc +++ b/shell/browser/ui/electron_desktop_window_tree_host_linux.cc @@ -119,6 +119,7 @@ void ElectronDesktopWindowTreeHostLinux::UpdateWindowState( case ui::PlatformWindowState::kSnappedPrimary: case ui::PlatformWindowState::kSnappedSecondary: case ui::PlatformWindowState::kFloated: + case ui::PlatformWindowState::kPip: case ui::PlatformWindowState::kPinnedFullscreen: case ui::PlatformWindowState::kTrustedPinnedFullscreen: break; @@ -138,6 +139,7 @@ void ElectronDesktopWindowTreeHostLinux::UpdateWindowState( case ui::PlatformWindowState::kSnappedPrimary: case ui::PlatformWindowState::kSnappedSecondary: case ui::PlatformWindowState::kFloated: + case ui::PlatformWindowState::kPip: case ui::PlatformWindowState::kPinnedFullscreen: case ui::PlatformWindowState::kTrustedPinnedFullscreen: break; diff --git a/shell/browser/ui/file_dialog_win.cc b/shell/browser/ui/file_dialog_win.cc index 3e82b9cfad68..44ecb929ecf5 100644 --- a/shell/browser/ui/file_dialog_win.cc +++ b/shell/browser/ui/file_dialog_win.cc @@ -78,7 +78,6 @@ static HRESULT GetFileNameFromShellItem(IShellItem* pShellItem, wcscpy_s(lpstr, cchLength, lpstrName); } else { NOTREACHED(); - hRet = DISP_E_BUFFERTOOSMALL; } ::CoTaskMemFree(lpstrName); diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index e197ca01f8c7..c193b7c704d1 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -732,9 +732,10 @@ void InspectableWebContents::ShowItemInFolder( void InspectableWebContents::SaveToFile(const std::string& url, const std::string& content, - bool save_as) { + bool save_as, + bool is_base64) { if (delegate_) - delegate_->DevToolsSaveToFile(url, content, save_as); + delegate_->DevToolsSaveToFile(url, content, save_as, is_base64); } void InspectableWebContents::AppendToFile(const std::string& url, @@ -887,6 +888,12 @@ void InspectableWebContents::GetSyncInformation(DispatchCallback callback) { std::move(callback).Run(&result); } +void InspectableWebContents::GetHostConfig(DispatchCallback callback) { + base::Value::Dict response_dict; + base::Value response = base::Value(std::move(response_dict)); + std::move(callback).Run(&response); +} + void InspectableWebContents::ConnectionReady() {} void InspectableWebContents::RegisterExtensionsAPI(const std::string& origin, @@ -977,7 +984,7 @@ void InspectableWebContents::WebContentsDestroyed() { bool InspectableWebContents::HandleKeyboardEvent( content::WebContents* source, - const content::NativeWebKeyboardEvent& event) { + const input::NativeWebKeyboardEvent& event) { auto* delegate = web_contents_->GetDelegate(); return !delegate || delegate->HandleKeyboardEvent(source, event); } diff --git a/shell/browser/ui/inspectable_web_contents.h b/shell/browser/ui/inspectable_web_contents.h index 89d0d965ff58..1150bf79fada 100644 --- a/shell/browser/ui/inspectable_web_contents.h +++ b/shell/browser/ui/inspectable_web_contents.h @@ -103,7 +103,8 @@ class InspectableWebContents void ShowItemInFolder(const std::string& file_system_path) override; void SaveToFile(const std::string& url, const std::string& content, - bool save_as) override; + bool save_as, + bool is_base64) override; void AppendToFile(const std::string& url, const std::string& content) override; void RequestFileSystems() override; @@ -154,6 +155,7 @@ class InspectableWebContents void RemovePreference(const std::string& name) override; void ClearPreferences() override; void GetSyncInformation(DispatchCallback callback) override; + void GetHostConfig(DispatchCallback callback) override; void ConnectionReady() override; void RegisterExtensionsAPI(const std::string& origin, const std::string& script) override; @@ -203,7 +205,7 @@ class InspectableWebContents // content::WebContentsDelegate: bool HandleKeyboardEvent(content::WebContents*, - const content::NativeWebKeyboardEvent&) override; + const input::NativeWebKeyboardEvent&) override; void CloseContents(content::WebContents* source) override; void RunFileChooser(content::RenderFrameHost* render_frame_host, scoped_refptr listener, diff --git a/shell/browser/ui/inspectable_web_contents_delegate.h b/shell/browser/ui/inspectable_web_contents_delegate.h index 218fa0984ab2..c73a7fd74f76 100644 --- a/shell/browser/ui/inspectable_web_contents_delegate.h +++ b/shell/browser/ui/inspectable_web_contents_delegate.h @@ -20,7 +20,8 @@ class InspectableWebContentsDelegate { virtual void DevToolsReloadPage() {} virtual void DevToolsSaveToFile(const std::string& url, const std::string& content, - bool save_as) {} + bool save_as, + bool is_base64) {} virtual void DevToolsAppendToFile(const std::string& url, const std::string& content) {} virtual void DevToolsRequestFileSystems() {} diff --git a/shell/browser/ui/inspectable_web_contents_view.cc b/shell/browser/ui/inspectable_web_contents_view.cc index 411c902fd14c..8f2844850afb 100644 --- a/shell/browser/ui/inspectable_web_contents_view.cc +++ b/shell/browser/ui/inspectable_web_contents_view.cc @@ -170,8 +170,8 @@ void InspectableWebContentsView::SetIsDocked(bool docked, bool activate) { devtools_window_delegate_ = new DevToolsWindowDelegate( this, devtools_window_web_view_, devtools_window_.get()); - views::Widget::InitParams params; - params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; + views::Widget::InitParams params{ + views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET}; params.delegate = devtools_window_delegate_; params.bounds = inspectable_web_contents()->dev_tools_bounds(); diff --git a/shell/browser/ui/views/autofill_popup_view.cc b/shell/browser/ui/views/autofill_popup_view.cc index 164a282a86cf..a967b4574653 100644 --- a/shell/browser/ui/views/autofill_popup_view.cc +++ b/shell/browser/ui/views/autofill_popup_view.cc @@ -366,7 +366,7 @@ bool AutofillPopupView::AcceleratorPressed(const ui::Accelerator& accelerator) { } bool AutofillPopupView::HandleKeyPressEvent( - const content::NativeWebKeyboardEvent& event) { + const input::NativeWebKeyboardEvent& event) { if (!popup_) return false; switch (event.windows_key_code) { diff --git a/shell/browser/ui/views/autofill_popup_view.h b/shell/browser/ui/views/autofill_popup_view.h index cabc1182d567..0c5ea5c6a597 100644 --- a/shell/browser/ui/views/autofill_popup_view.h +++ b/shell/browser/ui/views/autofill_popup_view.h @@ -11,8 +11,8 @@ #include "shell/browser/ui/autofill_popup.h" #include "base/memory/raw_ptr.h" +#include "components/input/native_web_keyboard_event.h" #include "content/public/browser/render_widget_host.h" -#include "content/public/common/input/native_web_keyboard_event.h" #include "electron/buildflags/buildflags.h" #include "shell/browser/osr/osr_view_proxy.h" #include "ui/accessibility/ax_node_data.h" @@ -110,7 +110,7 @@ class AutofillPopupView : public views::WidgetDelegateView, void OnMouseReleased(const ui::MouseEvent& event) override; void OnGestureEvent(ui::GestureEvent* event) override; bool AcceleratorPressed(const ui::Accelerator& accelerator) override; - bool HandleKeyPressEvent(const content::NativeWebKeyboardEvent& event); + bool HandleKeyPressEvent(const input::NativeWebKeyboardEvent& event); // views::WidgetFocusChangeListener implementation. void OnNativeFocusChanged(gfx::NativeView focused_now) override; diff --git a/shell/browser/ui/views/client_frame_view_linux.cc b/shell/browser/ui/views/client_frame_view_linux.cc index 2b3d4be3dcce..effa5f9082f6 100644 --- a/shell/browser/ui/views/client_frame_view_linux.cc +++ b/shell/browser/ui/views/client_frame_view_linux.cc @@ -58,7 +58,6 @@ ui::NavButtonProvider::ButtonState ButtonStateToNavButtonProviderState( case views::Button::STATE_COUNT: default: NOTREACHED(); - return ui::NavButtonProvider::ButtonState::kNormal; } } @@ -258,8 +257,10 @@ void ClientFrameViewLinux::SizeConstraintsChanged() { InvalidateLayout(); } -gfx::Size ClientFrameViewLinux::CalculatePreferredSize() const { - return SizeWithDecorations(FramelessView::CalculatePreferredSize()); +gfx::Size ClientFrameViewLinux::CalculatePreferredSize( + const views::SizeBounds& available_size) const { + return SizeWithDecorations( + FramelessView::CalculatePreferredSize(available_size)); } gfx::Size ClientFrameViewLinux::GetMinimumSize() const { diff --git a/shell/browser/ui/views/client_frame_view_linux.h b/shell/browser/ui/views/client_frame_view_linux.h index 05d5b5454f0c..38fe55a58f15 100644 --- a/shell/browser/ui/views/client_frame_view_linux.h +++ b/shell/browser/ui/views/client_frame_view_linux.h @@ -71,7 +71,8 @@ class ClientFrameViewLinux : public FramelessView, void SizeConstraintsChanged() override; // Overridden from View: - gfx::Size CalculatePreferredSize() const override; + gfx::Size CalculatePreferredSize( + const views::SizeBounds& available_size) const override; gfx::Size GetMinimumSize() const override; gfx::Size GetMaximumSize() const override; void Layout(PassKey) override; diff --git a/shell/browser/ui/views/frameless_view.cc b/shell/browser/ui/views/frameless_view.cc index ce6cf372517f..9181a35d0e99 100644 --- a/shell/browser/ui/views/frameless_view.cc +++ b/shell/browser/ui/views/frameless_view.cc @@ -109,10 +109,11 @@ views::View* FramelessView::TargetForRect(views::View* root, return NonClientFrameView::TargetForRect(root, rect); } -gfx::Size FramelessView::CalculatePreferredSize() const { +gfx::Size FramelessView::CalculatePreferredSize( + const views::SizeBounds& available_size) const { return frame_->non_client_view() - ->GetWindowBoundsForClientBounds( - gfx::Rect(frame_->client_view()->GetPreferredSize())) + ->GetWindowBoundsForClientBounds(gfx::Rect( + frame_->client_view()->CalculatePreferredSize(available_size))) .size(); } diff --git a/shell/browser/ui/views/frameless_view.h b/shell/browser/ui/views/frameless_view.h index 2cc4bb4a6813..4100c5689762 100644 --- a/shell/browser/ui/views/frameless_view.h +++ b/shell/browser/ui/views/frameless_view.h @@ -54,7 +54,8 @@ class FramelessView : public views::NonClientFrameView { views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override; // views::View: - gfx::Size CalculatePreferredSize() const override; + gfx::Size CalculatePreferredSize( + const views::SizeBounds& available_size) const override; gfx::Size GetMinimumSize() const override; gfx::Size GetMaximumSize() const override; diff --git a/shell/browser/ui/views/root_view.cc b/shell/browser/ui/views/root_view.cc index e9c772316133..c5fb92868d53 100644 --- a/shell/browser/ui/views/root_view.cc +++ b/shell/browser/ui/views/root_view.cc @@ -6,7 +6,7 @@ #include -#include "content/public/common/input/native_web_keyboard_event.h" +#include "components/input/native_web_keyboard_event.h" #include "shell/browser/native_window.h" #include "shell/browser/ui/views/menu_bar.h" #include "ui/views/layout/box_layout.h" @@ -15,12 +15,12 @@ namespace electron { namespace { -bool IsAltKey(const content::NativeWebKeyboardEvent& event) { +bool IsAltKey(const input::NativeWebKeyboardEvent& event) { return event.windows_key_code == ui::VKEY_MENU; } -bool IsAltModifier(const content::NativeWebKeyboardEvent& event) { - typedef content::NativeWebKeyboardEvent::Modifiers Modifiers; +bool IsAltModifier(const input::NativeWebKeyboardEvent& event) { + using Modifiers = input::NativeWebKeyboardEvent::Modifiers; int modifiers = event.GetModifiers(); modifiers &= ~Modifiers::kNumLockOn; modifiers &= ~Modifiers::kCapsLockOn; @@ -98,7 +98,7 @@ void RootView::SetMenuBarVisibility(bool visible) { InvalidateLayout(); } -void RootView::HandleKeyEvent(const content::NativeWebKeyboardEvent& event) { +void RootView::HandleKeyEvent(const input::NativeWebKeyboardEvent& event) { if (!menu_bar_) return; diff --git a/shell/browser/ui/views/root_view.h b/shell/browser/ui/views/root_view.h index 696caaa9630d..58163544d43d 100644 --- a/shell/browser/ui/views/root_view.h +++ b/shell/browser/ui/views/root_view.h @@ -14,7 +14,7 @@ #include "ui/views/view.h" #include "ui/views/view_tracker.h" -namespace content { +namespace input { struct NativeWebKeyboardEvent; } @@ -40,7 +40,7 @@ class RootView : public views::View { bool is_menu_bar_auto_hide() const { return menu_bar_autohide_; } void SetMenuBarVisibility(bool visible); bool is_menu_bar_visible() const { return menu_bar_visible_; } - void HandleKeyEvent(const content::NativeWebKeyboardEvent& event); + void HandleKeyEvent(const input::NativeWebKeyboardEvent& event); void ResetAltState(); void RestoreFocus(); // Register/Unregister accelerators supported by the menu model. diff --git a/shell/browser/ui/views/win_caption_button.cc b/shell/browser/ui/views/win_caption_button.cc index 711c301bfb42..5d6de2460e56 100644 --- a/shell/browser/ui/views/win_caption_button.cc +++ b/shell/browser/ui/views/win_caption_button.cc @@ -46,7 +46,8 @@ std::unique_ptr WinCaptionButton::CreateIconPainter() { return std::make_unique(); } -gfx::Size WinCaptionButton::CalculatePreferredSize() const { +gfx::Size WinCaptionButton::CalculatePreferredSize( + const views::SizeBounds& available_size) const { // TODO(bsep): The sizes in this function are for 1x device scale and don't // match Windows button sizes at hidpi. @@ -138,7 +139,6 @@ int WinCaptionButton::GetButtonDisplayOrderIndex() const { break; default: NOTREACHED(); - return 0; } // Reverse the ordering if we're in RTL mode @@ -207,7 +207,6 @@ void WinCaptionButton::PaintSymbol(gfx::Canvas* canvas) { default: NOTREACHED(); - return; } } diff --git a/shell/browser/ui/views/win_caption_button.h b/shell/browser/ui/views/win_caption_button.h index 5cc313a749a1..7c48744167ad 100644 --- a/shell/browser/ui/views/win_caption_button.h +++ b/shell/browser/ui/views/win_caption_button.h @@ -36,7 +36,8 @@ class WinCaptionButton : public views::Button { WinCaptionButton& operator=(const WinCaptionButton&) = delete; // // views::Button: - gfx::Size CalculatePreferredSize() const override; + gfx::Size CalculatePreferredSize( + const views::SizeBounds& available_size) const override; void OnPaintBackground(gfx::Canvas* canvas) override; void PaintButtonContents(gfx::Canvas* canvas) override; diff --git a/shell/browser/ui/win/notify_icon_host.cc b/shell/browser/ui/win/notify_icon_host.cc index 285d6ab37a7b..e7205aa594fe 100644 --- a/shell/browser/ui/win/notify_icon_host.cc +++ b/shell/browser/ui/win/notify_icon_host.cc @@ -217,7 +217,6 @@ void NotifyIconHost::Remove(NotifyIcon* icon) { if (i == notify_icons_.end()) { NOTREACHED(); - return; } mouse_entered_exited_detector_->IconRemoved(*i); diff --git a/shell/common/api/electron_api_url_loader.cc b/shell/common/api/electron_api_url_loader.cc index 85e62c496165..d449e17f160a 100644 --- a/shell/common/api/electron_api_url_loader.cc +++ b/shell/common/api/electron_api_url_loader.cc @@ -14,6 +14,7 @@ #include "base/containers/fixed_flat_map.h" #include "base/memory/raw_ptr.h" #include "base/no_destructor.h" +#include "base/notreached.h" #include "base/sequence_checker.h" #include "base/strings/string_number_conversions.h" #include "gin/handle.h" @@ -151,7 +152,7 @@ class BufferDataSource : public mojo::DataPipeProducer::DataSource { } result.bytes_read = copyable_size; } else { - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); result.result = MOJO_RESULT_OUT_OF_RANGE; } return result; diff --git a/shell/common/extensions/electron_extensions_api_provider.cc b/shell/common/extensions/electron_extensions_api_provider.cc index 88bbdbdb8d05..4b60901ca690 100644 --- a/shell/common/extensions/electron_extensions_api_provider.cc +++ b/shell/common/extensions/electron_extensions_api_provider.cc @@ -19,6 +19,7 @@ #include "extensions/common/features/simple_feature.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/manifest_handler.h" +#include "extensions/common/manifest_handler_registry.h" #include "extensions/common/manifest_handlers/permissions_parser.h" #include "extensions/common/manifest_url_handlers.h" #include "extensions/common/permissions/permissions_info.h" diff --git a/shell/common/gin_converters/base_converter.h b/shell/common/gin_converters/base_converter.h index a584af06e268..d48da0508931 100644 --- a/shell/common/gin_converters/base_converter.h +++ b/shell/common/gin_converters/base_converter.h @@ -36,10 +36,8 @@ struct Converter { #endif case base::TERMINATION_STATUS_MAX_ENUM: NOTREACHED(); - return gin::ConvertToV8(isolate, ""); } NOTREACHED(); - return gin::ConvertToV8(isolate, ""); } }; diff --git a/shell/common/gin_converters/content_converter.cc b/shell/common/gin_converters/content_converter.cc index 774696a19673..ac4bdcdbf06b 100644 --- a/shell/common/gin_converters/content_converter.cc +++ b/shell/common/gin_converters/content_converter.cc @@ -8,9 +8,9 @@ #include #include "base/containers/fixed_flat_map.h" +#include "components/input/native_web_keyboard_event.h" #include "content/public/browser/context_menu_params.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/input/native_web_keyboard_event.h" #include "shell/browser/api/electron_api_web_contents.h" #include "shell/browser/web_contents_permission_helper.h" #include "shell/common/gin_converters/blink_converter.h" @@ -304,10 +304,10 @@ bool Converter::FromV8(v8::Isolate* isolate, } // static -bool Converter::FromV8( +bool Converter::FromV8( v8::Isolate* isolate, v8::Local val, - content::NativeWebKeyboardEvent* out) { + input::NativeWebKeyboardEvent* out) { gin_helper::Dictionary dict; if (!ConvertFromV8(isolate, val, &dict)) return false; @@ -318,9 +318,9 @@ bool Converter::FromV8( } // static -v8::Local Converter::ToV8( +v8::Local Converter::ToV8( v8::Isolate* isolate, - const content::NativeWebKeyboardEvent& in) { + const input::NativeWebKeyboardEvent& in) { return ConvertToV8(isolate, static_cast(in)); } diff --git a/shell/common/gin_converters/content_converter.h b/shell/common/gin_converters/content_converter.h index 56e127c42402..99f74e89b01b 100644 --- a/shell/common/gin_converters/content_converter.h +++ b/shell/common/gin_converters/content_converter.h @@ -17,11 +17,14 @@ namespace content { struct ContextMenuParams; -struct NativeWebKeyboardEvent; class RenderFrameHost; class WebContents; } // namespace content +namespace input { +struct NativeWebKeyboardEvent; +} + using ContextMenuParamsWithRenderFrameHost = std::pair; @@ -88,12 +91,12 @@ struct Converter { }; template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - content::NativeWebKeyboardEvent* out); + input::NativeWebKeyboardEvent* out); static v8::Local ToV8(v8::Isolate* isolate, - const content::NativeWebKeyboardEvent& in); + const input::NativeWebKeyboardEvent& in); }; } // namespace gin diff --git a/shell/common/gin_helper/dictionary.h b/shell/common/gin_helper/dictionary.h index efe36fb09997..be0e9fae72b4 100644 --- a/shell/common/gin_helper/dictionary.h +++ b/shell/common/gin_helper/dictionary.h @@ -129,7 +129,7 @@ class Dictionary : public gin::Dictionary { auto context = isolate()->GetCurrentContext(); return GetHandle() - ->SetAccessor( + ->SetNativeDataProperty( context, gin::StringToV8(isolate(), key), [](v8::Local property_name, const v8::PropertyCallbackInfo& info) { @@ -143,7 +143,7 @@ class Dictionary : public gin::Dictionary { if (gin::TryConvertToV8(info.GetIsolate(), val, &v8_value)) info.GetReturnValue().Set(v8_value); }, - nullptr, v8_value_accessor, v8::DEFAULT, attribute) + nullptr, v8_value_accessor, attribute) .ToChecked(); } diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index 2ee8c120d602..25abcc205399 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -255,7 +255,6 @@ v8::ModifyCodeGenerationFromStringsResult ModifyCodeGenerationFromStrings( // enabled. if (!electron::IsRendererProcess()) { NOTREACHED(); - return {false, {}}; } return blink::V8Initializer::CodeGenerationCheckCallbackInMainThread( context, source, is_code_like); diff --git a/shell/renderer/api/electron_api_context_bridge.cc b/shell/renderer/api/electron_api_context_bridge.cc index 13250baabbac..2c4de5d0dbad 100644 --- a/shell/renderer/api/electron_api_context_bridge.cc +++ b/shell/renderer/api/electron_api_context_bridge.cc @@ -29,9 +29,9 @@ #include "third_party/blink/public/web/web_local_frame.h" namespace features { - -const base::Feature kContextBridgeMutability{"ContextBridgeMutability", - base::FEATURE_DISABLED_BY_DEFAULT}; +BASE_FEATURE(kContextBridgeMutability, + "ContextBridgeMutability", + base::FEATURE_DISABLED_BY_DEFAULT); } namespace electron { diff --git a/shell/renderer/electron_autofill_agent.cc b/shell/renderer/electron_autofill_agent.cc index b7192ca2a88b..5adfefa68823 100644 --- a/shell/renderer/electron_autofill_agent.cc +++ b/shell/renderer/electron_autofill_agent.cc @@ -195,7 +195,8 @@ void AutofillAgent::HidePopup() { void AutofillAgent::ShowPopup(const blink::WebFormControlElement& element, const std::vector& values, const std::vector& labels) { - gfx::RectF bounds = render_frame()->ElementBoundsInWindow(element); + auto bounds = gfx::RectF{ + render_frame()->ConvertViewportToWindow(element.BoundsInWidget())}; GetAutofillDriver()->ShowAutofillPopup(bounds, values, labels); } diff --git a/spec/chromium-spec.ts b/spec/chromium-spec.ts index 0acf06cb02b1..9431056bdef6 100644 --- a/spec/chromium-spec.ts +++ b/spec/chromium-spec.ts @@ -621,7 +621,7 @@ describe('chromium features', () => { }); it('should lock the keyboard', async () => { - const w = new BrowserWindow({ show: false }); + const w = new BrowserWindow({ show: true }); await w.loadFile(path.join(fixturesPath, 'pages', 'modal.html')); // Test that without lock, with ESC: @@ -646,12 +646,17 @@ describe('chromium features', () => { // - the dialog is closed const enterFS2 = once(w, 'enter-full-screen'); await w.webContents.executeJavaScript(` - navigator.keyboard.lock(['Escape']); document.body.requestFullscreen(); `, true); await enterFS2; + // Request keyboard lock after window has gone fullscreen + // otherwise it will result in blink::kKeyboardLockRequestFailedErrorMsg. + await w.webContents.executeJavaScript(` + navigator.keyboard.lock(['Escape']); + `, true); + await w.webContents.executeJavaScript('document.getElementById(\'favDialog\').showModal()', true); const open2 = await w.webContents.executeJavaScript('document.getElementById(\'favDialog\').open'); expect(open2).to.be.true(); diff --git a/spec/webview-spec.ts b/spec/webview-spec.ts index fb3be78041aa..3c80e41ce9c6 100644 --- a/spec/webview-spec.ts +++ b/spec/webview-spec.ts @@ -849,10 +849,11 @@ describe(' tag', function () { return new Promise((resolve, reject) => { session.fromPartition(partition).setPermissionRequestHandler(function (webContents, permission, callback) { if (webContents.id === webContentsId) { - // requestMIDIAccess with sysex requests both midi and midiSysex so - // grant the first midi one and then reject the midiSysex one - if (requestedPermission === 'midiSysex' && permission === 'midi') { - return callback(true); + // All midi permission requests are blocked or allowed as midiSysex permissions + // since https://chromium-review.googlesource.com/c/chromium/src/+/5154368 + if (permission === 'midiSysex') { + const allowed = requestedPermission === 'midi' || requestedPermission === 'midiSysex'; + return callback(!allowed); } try {