diff --git a/BUILD.gn b/BUILD.gn index d3b715cfb12a..8ef2a5634626 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -493,15 +493,21 @@ source_set("electron_lib") { deps += [ ":libnotify_loader", "//build/config/linux/gtk", - "//chrome/browser/ui/gtk", "//dbus", "//device/bluetooth", "//third_party/breakpad:client", "//ui/events/devices/x11", "//ui/events/platform/x11", + "//ui/gtk", "//ui/views/controls/webview", "//ui/wm", ] + if (use_x11) { + deps += [ + "//ui/gfx/x", + "//ui/gtk:x", + ] + } configs += [ ":gio_unix" ] include_dirs += [ "//third_party/breakpad" ] configs += [ "//build/config/linux:x11" ] diff --git a/DEPS b/DEPS index 916150676bce..faf2ef4465d0 100644 --- a/DEPS +++ b/DEPS @@ -12,7 +12,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '0f55a0804ce1ba9678489174a6123358a7683f37', + 'e7c84a47c0598ebf6c3f0b7bd96bdb1a4b42208f', 'node_version': 'v12.16.1', 'nan_version': diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index a42512a2fdb4..2df8d3986ab6 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -51,8 +51,8 @@ static_library("chrome") { "//chrome/browser/ssl/security_state_tab_helper.cc", "//chrome/browser/ssl/security_state_tab_helper.h", "//chrome/browser/ssl/tls_deprecation_config.cc", - "//chrome/browser/ui/autofill/popup_view_common.cc", - "//chrome/browser/ui/autofill/popup_view_common.h", + "//chrome/browser/ui/views/autofill/autofill_popup_view_utils.cc", + "//chrome/browser/ui/views/autofill/autofill_popup_view_utils.h", "//chrome/browser/win/chrome_process_finder.cc", "//chrome/browser/win/chrome_process_finder.h", "//extensions/browser/app_window/size_constraints.cc", @@ -69,6 +69,7 @@ static_library("chrome") { deps = [ "//chrome/browser:resource_prefetch_predictor_proto", "//components/feature_engagement:buildflags", + "//components/optimization_guide/proto:optimization_guide_proto", ] if (is_linux) { diff --git a/filenames.hunspell.gni b/filenames.hunspell.gni index e0d918bea433..33431ccf6beb 100644 --- a/filenames.hunspell.gni +++ b/filenames.hunspell.gni @@ -44,7 +44,7 @@ hunspell_dictionaries = [ "//third_party/hunspell_dictionaries/ta-IN-3-0.bdic", "//third_party/hunspell_dictionaries/tg-TG-5-0.bdic", "//third_party/hunspell_dictionaries/tr-TR-4-0.bdic", - "//third_party/hunspell_dictionaries/uk-UA-3-0.bdic", + "//third_party/hunspell_dictionaries/uk-UA-4-0.bdic", "//third_party/hunspell_dictionaries/vi-VN-3-0.bdic", "//third_party/hunspell_dictionaries/xx-XX-3-0.bdic", ] diff --git a/lib/browser/rpc-server.js b/lib/browser/rpc-server.js index 10133095a7eb..de3eb4a06040 100644 --- a/lib/browser/rpc-server.js +++ b/lib/browser/rpc-server.js @@ -57,7 +57,7 @@ const allowedClipboardMethods = (() => { } })(); -ipcMainUtils.handleSync('ELECTRON_BROWSER_CLIPBOARD', function (event, method, ...args) { +ipcMainUtils.handleSync('ELECTRON_BROWSER_CLIPBOARD_SYNC', function (event, method, ...args) { if (!allowedClipboardMethods.has(method)) { throw new Error(`Invalid method: ${method}`); } diff --git a/lib/common/api/clipboard.js b/lib/common/api/clipboard.js index a7c49cd88488..eb8371b041c4 100644 --- a/lib/common/api/clipboard.js +++ b/lib/common/api/clipboard.js @@ -9,7 +9,7 @@ if (process.type === 'renderer') { const makeRemoteMethod = function (method) { return (...args) => { args = typeUtils.serialize(args); - const result = ipcRendererUtils.invokeSync('ELECTRON_BROWSER_CLIPBOARD', method, ...args); + const result = ipcRendererUtils.invokeSync('ELECTRON_BROWSER_CLIPBOARD_SYNC', method, ...args); return typeUtils.deserialize(result); }; }; diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 6fe222b43fae..0d9992d64670 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -11,7 +11,6 @@ dom_storage_limits.patch render_widget_host_view_base.patch render_widget_host_view_mac.patch thread_capabilities.patch -web_contents.patch webview_cross_drag.patch disable_user_gesture_requirement_for_beforeunload_dialogs.patch gin_enable_disable_v8_platform.patch @@ -49,7 +48,6 @@ command-ismediakey.patch tts.patch printing.patch support_mixed_sandbox_with_zygote.patch -autofill_size_calculation.patch fix_disable_usage_of_abort_report_np_in_mas_builds.patch fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch fix_disable_usage_of_setapplicationisdaemon_and.patch @@ -89,7 +87,7 @@ delay_lock_the_protocol_scheme_registry.patch gpu_notify_when_dxdiag_request_fails.patch feat_allow_embedders_to_add_observers_on_created_hunspell.patch feat_add_onclose_to_messageport.patch -gin_allow_passing_an_objecttemplate_to_objecttemplatebuilder.patch -gin_forward_args_when_dispatching.patch fix_undo_redo_broken_in_webviews.patch fix_account_for_print_preview_disabled_when_printing_to_pdf.patch +web_contents.patch +ui_gtk_public_header.patch diff --git a/patches/chromium/accelerator.patch b/patches/chromium/accelerator.patch index dc1fa72ec116..b63e5b59e6da 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-= should show as Ctrl-+ diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc -index d7b79feb77f3595bcc8617b6e84c566357c336fe..3b1eab14a4348eab79f486aec43783fd8f629a8f 100644 +index 291bdeec97bec510f7c86a8e8bccab22b7d5d8ac..926a705c23bd5adbfc0fe178c44617086b946a80 100644 --- a/ui/base/accelerators/accelerator.cc +++ b/ui/base/accelerators/accelerator.cc @@ -11,6 +11,7 @@ @@ -29,9 +29,9 @@ index d7b79feb77f3595bcc8617b6e84c566357c336fe..3b1eab14a4348eab79f486aec43783fd #include "ui/events/keycodes/keyboard_code_conversion.h" -#endif - namespace ui { - -@@ -154,7 +153,15 @@ base::string16 Accelerator::GetShortcutText() const { + #if defined(OS_CHROMEOS) + #include "ui/base/ui_base_features.h" +@@ -220,7 +219,15 @@ base::string16 Accelerator::GetShortcutText() const { shortcut = KeyCodeToName(); #endif @@ -47,7 +47,7 @@ index d7b79feb77f3595bcc8617b6e84c566357c336fe..3b1eab14a4348eab79f486aec43783fd #if defined(OS_WIN) // Our fallback is to try translate the key code to a regular character // unless it is one of digits (VK_0 to VK_9). Some keyboard -@@ -163,21 +170,14 @@ base::string16 Accelerator::GetShortcutText() const { +@@ -229,21 +236,14 @@ base::string16 Accelerator::GetShortcutText() const { // accent' for '0'). For display in the menu (e.g. Ctrl-0 for the // default zoom level), we leave VK_[0-9] alone without translation. wchar_t key; @@ -75,7 +75,7 @@ index d7b79feb77f3595bcc8617b6e84c566357c336fe..3b1eab14a4348eab79f486aec43783fd } #if defined(OS_MACOSX) -@@ -360,7 +360,7 @@ base::string16 Accelerator::ApplyLongFormModifiers( +@@ -426,7 +426,7 @@ base::string16 Accelerator::ApplyLongFormModifiers( // more information. if (IsCtrlDown()) shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_CTRL_KEY); diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index daf6635152e0..61e0c7104e5d 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,12 +10,12 @@ 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 24f9e8efd14ea8e4bb739655c662d01c8c4b80c5..c354891df92db510291ba351ee3bc88b07b4d990 100644 +index 0a96d09d0deca530bc9e3ab649e1a9cc5045b1fb..9b22493abbd81c2f592e75fe32f7ab7efbb281d9 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -262,6 +262,10 @@ int GpuMain(const MainFunctionParams& parameters) { - - logging::SetLogMessageHandler(GpuProcessLogMessageHandler); +@@ -248,6 +248,10 @@ int GpuMain(const MainFunctionParams& parameters) { + // to the GpuProcessHost once the GpuServiceImpl has started. + viz::GpuServiceImpl::InstallPreInitializeLogHandler(); + auto* client = GetContentClient()->gpu(); + if (client) @@ -24,7 +24,7 @@ index 24f9e8efd14ea8e4bb739655c662d01c8c4b80c5..c354891df92db510291ba351ee3bc88b // 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 -@@ -384,7 +388,6 @@ int GpuMain(const MainFunctionParams& parameters) { +@@ -369,7 +373,6 @@ int GpuMain(const MainFunctionParams& parameters) { })); #endif diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index b6d7b1b4a0eb..46fad0f691e1 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the context, which can cause some preload scripts to trip. diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h -index 156ba739a984347135857f8019fda0bfb01c97ad..f4093e9bb8b54d82c6d70375977c0ad91dc90580 100644 +index 68822e9c91633d9433c52bdf3484f6c660eb7917..c14a7b2a1897f805f072d8156765f909f1410001 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h -@@ -115,6 +115,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, +@@ -114,6 +114,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, virtual void DidHandleOnloadEvents() {} virtual void DidCreateScriptContext(v8::Local context, int32_t world_id) {} @@ -23,10 +23,10 @@ index 156ba739a984347135857f8019fda0bfb01c97ad..f4093e9bb8b54d82c6d70375977c0ad9 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index e9640890df219ebc384a7fe83559ecd865f8ccab..f15855248d6b7d2ff79d808aacc9dde158428cc8 100644 +index 863aa54c356299eedc6479f8ce3d19e55dd4d5aa..98fdc44b00c641992b194629f73072da7e5d1b17 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4921,6 +4921,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4912,6 +4912,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index e9640890df219ebc384a7fe83559ecd865f8ccab..f15855248d6b7d2ff79d808aacc9dde1 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index ac3e90f840f42a914878dcbc5c3608ac12d37175..adfb25f44ada0fc68e663bb0a3bfe01db408b941 100644 +index 1ea217b3f8a300dc08caa1d0984b7138a6674412..59c17da6495643459bb78108b4e49f0c49ed1f27 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -746,6 +746,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -754,6 +754,8 @@ class CONTENT_EXPORT RenderFrameImpl bool ShouldTrackUseCounter(const blink::WebURL& url) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -53,10 +53,10 @@ index ac3e90f840f42a914878dcbc5c3608ac12d37175..adfb25f44ada0fc68e663bb0a3bfe01d 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 d821defb3304d476dbca602a89e911416d2ddb12..e2ff4c947e6dab395fa35664a9c50ce3d67bbf81 100644 +index 4bb3e8ce0ad71b5825377f86b4f61cf692eef458..260e9e94db50fbdfe9f15fb6b4681bf2a24db90e 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -552,6 +552,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -557,6 +557,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -79,7 +79,7 @@ index 81457a2e2b5723aa2ff218b4e410d55d7b7f14f8..a62f6c58bb0aaac836edfd87ab2a6f61 if (World().IsMainWorld()) { GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld(); diff --git a/third_party/blink/renderer/core/exported/local_frame_client_impl.cc b/third_party/blink/renderer/core/exported/local_frame_client_impl.cc -index a06e52403507c2eaedf6a8cdcfae138bbf7716ed..1bc78f1e4ca712f2f9beddc6d298c49fe27b0076 100644 +index 6f6720c37f4b9854235ff784e3e6dc311c8e02f4..bc0b90a74140e9f6ba7ff4bc678fad0a1b7db468 100644 --- a/third_party/blink/renderer/core/exported/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/exported/local_frame_client_impl.cc @@ -344,6 +344,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( @@ -97,7 +97,7 @@ index a06e52403507c2eaedf6a8cdcfae138bbf7716ed..1bc78f1e4ca712f2f9beddc6d298c49f v8::Local context, int32_t world_id) { diff --git a/third_party/blink/renderer/core/exported/local_frame_client_impl.h b/third_party/blink/renderer/core/exported/local_frame_client_impl.h -index 8ff5c7ffe9737b6e1fbc2f37b2a7c3916bfef456..7679bb67e0623d074aaca586e67768c55261025a 100644 +index 47374d2a01278df9cd97819cf522a7b99ff97a5d..cf1018fdee61677e3d0980cff828940d88a98d16 100644 --- a/third_party/blink/renderer/core/exported/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/exported/local_frame_client_impl.h @@ -78,6 +78,8 @@ class LocalFrameClientImpl final : public LocalFrameClient { @@ -110,10 +110,10 @@ index 8ff5c7ffe9737b6e1fbc2f37b2a7c3916bfef456..7679bb67e0623d074aaca586e67768c5 int32_t world_id) override; diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h -index 7843fbbf746a976ff8d94caabc8dec95d49e2b09..850f1aa843e34441a05bd1785896e100f27a9eb4 100644 +index 39961b6aeea221a77b48e8fca2827175c0b759ce..6ec1bb3ec2b7ead5d3ed988e52f0a7fcf72533e4 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -286,6 +286,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -291,6 +291,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -123,10 +123,10 @@ index 7843fbbf746a976ff8d94caabc8dec95d49e2b09..850f1aa843e34441a05bd1785896e100 int32_t world_id) = 0; virtual bool AllowScriptExtensions() = 0; diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h -index ad193eee54963de001cee76153c6fafa25b814a1..d232898dfac0ba8f4b54a96b87e604dfea7ff7fc 100644 +index 1d9fcaedd580c507c9a390c933836c8af15369b0..ee7102a420947ba0c66edb2547e184cca6f451d3 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -340,6 +340,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -336,6 +336,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/add_realloc.patch b/patches/chromium/add_realloc.patch index 912ad0a74460..c069df853456 100644 --- a/patches/chromium/add_realloc.patch +++ b/patches/chromium/add_realloc.patch @@ -54,10 +54,10 @@ index 696a6170a584c1bb71c8ad253963d9f64395a13e..9677aa931cd543adfc1e9844d6afee8d ArrayBufferContents::FreeMemory(data); } diff --git a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc -index 095ca3db051362319611976b9052725ab16c1b3a..13e802a5732f0b04832d6dd8031ae43e1240b79a 100644 +index fe4485a34797c93dba0626356716d729f223d905..65cf74482128d84a0b955af49bf83d7c097b4af1 100644 --- a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc +++ b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc -@@ -126,6 +126,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size, +@@ -129,6 +129,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size, return AllocateMemoryWithFlags(size, policy, base::PartitionAllocReturnNull); } @@ -67,8 +67,8 @@ index 095ca3db051362319611976b9052725ab16c1b3a..13e802a5732f0b04832d6dd8031ae43e +} + void ArrayBufferContents::FreeMemory(void* data) { - WTF::Partitions::ArrayBufferPartition()->Free(data); - } + InstanceCounters::DecrementCounter( + InstanceCounters::kArrayBufferContentsCounter); diff --git a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h index cce802e4fc94c258607bc943d9902e6d18173c44..4f7f4eaf005aac701360e567e6faca7f2e0ff3da 100644 --- a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h diff --git a/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch b/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch index 52c1601486f8..e2b5266bcf7d 100644 --- a/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch +++ b/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch @@ -10,10 +10,10 @@ WebContents, and cancels the authentication if there's no WebContents available, which there isn't in the case of the 'net' module. diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index a46aab1db2de282e0ff3561a98bad1dac659b67a..31ce9719f63c564baf88e48c7494e030cf9d148c 100644 +index a0d035ef7cbc701916ef0e10ce33ee62bae0777e..e556caa1e1f013559130794601fb9f3c098e5553 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -159,6 +159,25 @@ struct HttpAuthStaticNetworkContextParams { +@@ -161,6 +161,25 @@ struct HttpAuthStaticNetworkContextParams { = DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS; }; @@ -39,28 +39,28 @@ index a46aab1db2de282e0ff3561a98bad1dac659b67a..31ce9719f63c564baf88e48c7494e030 interface CertVerifierClient { Verify( int32 default_error, -@@ -603,6 +622,8 @@ struct URLLoaderFactoryParams { - // interface. This still respects the per-context block lists. - CorsOriginAccessPatterns? factory_bound_access_patterns; +@@ -600,6 +619,8 @@ struct URLLoaderFactoryParams { + // impact because of the extra process hops, so use should be minimized. + pending_remote? header_client; + pending_remote? auth_client; + - // Key used to isolate shared network resources like the cache. - NetworkIsolationKey? network_isolation_key; - + // |factory_bound_access_patterns| are used for CORS checks in addition to + // the per-context allow patterns that is managed via NetworkContext + // interface. This still respects the per-context block lists. diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index fb4f8ad895c685922af873f96f62ad4662a70f24..07fa817025eae412f43f6311b68d26753c44ff50 100644 +index 2664641db02ca54ff8e95a42a90fdb02de0f4b32..417fb715a846af104086d00802abaf00f7bc226e 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -486,6 +486,7 @@ URLLoader::URLLoader( +@@ -470,6 +470,7 @@ URLLoader::URLLoader( base::WeakPtr keepalive_statistics_recorder, base::WeakPtr network_usage_accumulator, mojom::TrustedURLLoaderHeaderClient* url_loader_header_client, + mojom::TrustedURLLoaderAuthClient* url_loader_auth_client, mojom::OriginPolicyManager* origin_policy_manager, - std::unique_ptr trust_token_helper) + std::unique_ptr trust_token_helper_factory) : url_request_context_(url_request_context), -@@ -546,6 +547,11 @@ URLLoader::URLLoader( +@@ -526,6 +527,11 @@ URLLoader::URLLoader( header_client_.set_disconnect_handler( base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this))); } @@ -72,7 +72,7 @@ index fb4f8ad895c685922af873f96f62ad4662a70f24..07fa817025eae412f43f6311b68d2675 if (want_raw_headers_) { options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse | mojom::kURLLoadOptionSendSSLInfoForCertificateError; -@@ -1020,7 +1026,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request, +@@ -1015,7 +1021,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request, void URLLoader::OnAuthRequired(net::URLRequest* url_request, const net::AuthChallengeInfo& auth_info) { @@ -81,7 +81,7 @@ index fb4f8ad895c685922af873f96f62ad4662a70f24..07fa817025eae412f43f6311b68d2675 OnAuthCredentials(base::nullopt); return; } -@@ -1036,11 +1042,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, +@@ -1031,11 +1037,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, if (url_request->response_headers()) head->headers = url_request->response_headers(); head->auth_challenge_info = auth_info; @@ -108,18 +108,18 @@ index fb4f8ad895c685922af873f96f62ad4662a70f24..07fa817025eae412f43f6311b68d2675 auth_challenge_responder_receiver_.set_disconnect_handler( base::BindOnce(&URLLoader::DeleteSelf, base::Unretained(this))); diff --git a/services/network/url_loader.h b/services/network/url_loader.h -index 9a07d08baf1f52234898951f8680a8b3a5c6e82f..e99228fd574cd5291d71de6a5f77cdda2debea7c 100644 +index 8e721138c0d4e7a89e390e2bed6664effc1449a0..c8cd2c67c8635b6de61818c14c02078cacdd3fbb 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -111,6 +111,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -112,6 +112,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader base::WeakPtr keepalive_statistics_recorder, base::WeakPtr network_usage_accumulator, mojom::TrustedURLLoaderHeaderClient* url_loader_header_client, + mojom::TrustedURLLoaderAuthClient* url_loader_auth_client, mojom::OriginPolicyManager* origin_policy_manager, - std::unique_ptr trust_token_helper); - ~URLLoader() override; -@@ -422,6 +423,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader + std::unique_ptr + trust_token_helper_factory); +@@ -447,6 +448,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader base::Optional fetch_window_id_; mojo::Remote header_client_; @@ -128,10 +128,10 @@ index 9a07d08baf1f52234898951f8680a8b3a5c6e82f..e99228fd574cd5291d71de6a5f77cdda std::unique_ptr file_opener_for_upload_; diff --git a/services/network/url_loader_factory.cc b/services/network/url_loader_factory.cc -index f17117db6f2ad140d797fad6a40fcd241c9538dd..a65a15d29df7a0667db56bbd768ef85aaff71d3d 100644 +index 1c43785d9b2c19dd4129f030e3ec9475a9bb4b31..730635d7f18bf95100558c37a1d38304a22f650d 100644 --- a/services/network/url_loader_factory.cc +++ b/services/network/url_loader_factory.cc -@@ -66,6 +66,7 @@ URLLoaderFactory::URLLoaderFactory( +@@ -68,6 +68,7 @@ URLLoaderFactory::URLLoaderFactory( resource_scheduler_client_(std::move(resource_scheduler_client)), header_client_(std::move(params_->header_client)), coep_reporter_(std::move(params_->coep_reporter)), @@ -139,14 +139,14 @@ index f17117db6f2ad140d797fad6a40fcd241c9538dd..a65a15d29df7a0667db56bbd768ef85a cors_url_loader_factory_(cors_url_loader_factory) { DCHECK(context); DCHECK_NE(mojom::kInvalidProcessId, params_->process_id); -@@ -209,6 +210,7 @@ void URLLoaderFactory::CreateLoaderAndStart( +@@ -230,6 +231,7 @@ void URLLoaderFactory::CreateLoaderAndStart( std::move(keepalive_statistics_recorder), std::move(network_usage_accumulator), header_client_.is_bound() ? header_client_.get() : nullptr, + auth_client_.is_bound() ? auth_client_.get() : nullptr, - context_->origin_policy_manager(), nullptr /* trust_token_helper */); - cors_url_loader_factory_->OnLoaderCreated(std::move(loader)); - } + context_->origin_policy_manager(), + url_request.trust_token_params + ? std::make_unique( diff --git a/services/network/url_loader_factory.h b/services/network/url_loader_factory.h index 1a623585035487de061ba6476914992ea2f7ac88..caa19dcd4b99296e50f8e22bfc92a70ba14473d1 100644 --- a/services/network/url_loader_factory.h diff --git a/patches/chromium/autofill_size_calculation.patch b/patches/chromium/autofill_size_calculation.patch deleted file mode 100644 index c232597963e6..000000000000 --- a/patches/chromium/autofill_size_calculation.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Heilig Benedek -Date: Wed, 30 Jan 2019 17:04:33 +0100 -Subject: autofill_size_calculation.patch - -We don't want to call into chrome internals for autofill popup size -calculations. The default GetWindowBounds calls into chrome internal -functions to find out the size of the window - this can be overridden -but even then some methods call into the original. Let's just return -an empty gfx::Rect and do the actual job in the subclass. - -diff --git a/chrome/browser/ui/autofill/popup_view_common.cc b/chrome/browser/ui/autofill/popup_view_common.cc -index 25e2cfce4999bdf6a94d61aae4558470d18f89ed..c9880bcd639eb59ae52c38dbdabbd86ebac3b530 100644 ---- a/chrome/browser/ui/autofill/popup_view_common.cc -+++ b/chrome/browser/ui/autofill/popup_view_common.cc -@@ -8,15 +8,19 @@ - #include - - #include "build/build_config.h" -+#if 0 - #include "chrome/browser/platform_util.h" -+#endif - #include "ui/gfx/geometry/vector2d.h" - - #if defined(OS_ANDROID) - #include "ui/android/view_android.h" - #include "ui/android/window_android.h" - #else // defined(OS_ANDROID) -+#if 0 - #include "chrome/browser/ui/browser_finder.h" - #include "chrome/browser/ui/browser_window.h" -+#endif - #include "ui/views/widget/widget.h" - #endif // !defined(OS_ANDROID) - -@@ -176,14 +180,14 @@ gfx::Rect PopupViewCommon::GetWindowBounds(gfx::NativeView container_view) { - views::Widget::GetTopLevelWidgetForNativeView(container_view); - if (widget) - return widget->GetWindowBoundsInScreen(); -- -+#if 0 - // If the widget is null, try to get these bounds from a browser window. This - // is common on Mac when the window is drawn using Cocoa. - gfx::NativeWindow window = platform_util::GetTopLevel(container_view); - Browser* browser = chrome::FindBrowserWithWindow(window); - if (browser) - return browser->window()->GetBounds(); -- -+#endif - // If the browser is null, simply return an empty rect. The most common reason - // to end up here is that the NativeView has been destroyed externally, which - // can happen at any time. This happens fairly commonly on Windows (e.g., at diff --git a/patches/chromium/blink-worker-enable-csp-in-file-scheme.patch b/patches/chromium/blink-worker-enable-csp-in-file-scheme.patch index a3cbcbe2284f..a3b824555fb0 100644 --- a/patches/chromium/blink-worker-enable-csp-in-file-scheme.patch +++ b/patches/chromium/blink-worker-enable-csp-in-file-scheme.patch @@ -6,10 +6,10 @@ Subject: blink-worker-enable-csp-in-file-scheme.patch This allows file:// URLs in workers to have a CSP. diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc -index d490f57f7ad056a278bc50786e285d6757de6433..6bd0614c388dc581b50c6b01e9c6dabad5419b19 100644 +index e15412a87803f38bceca93cf460386c9fd8e8903..ac09d3997e1018d227178c29f2fd714d9bb4000a 100644 --- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc +++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc -@@ -312,7 +312,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy( +@@ -323,7 +323,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy( // document (which is implemented in WorkerMessagingProxy, and // m_contentSecurityPolicy should be left as nullptr to inherit the policy). if (!response.CurrentRequestUrl().ProtocolIs("blob") && diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 4a8fcc8983e4..e8d67e7723a0 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -14,10 +14,10 @@ when there is code doing that. This patch reverts the change to fix the crash in Electron. diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 21d0735a9ebc16a7996567d5572d8783d9eb49d9..afc9c747b108a06a2023f17bdc106a95dc02a07b 100644 +index d051a7e6621e70fb86434a000d5736fea040fe1c..0100d8ec83d86a5ca225ac08f4e7534862a5e245 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -473,10 +473,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { +@@ -472,10 +472,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { } CHECK(!view_ || !view_->IsAttached()); @@ -28,7 +28,7 @@ index 21d0735a9ebc16a7996567d5572d8783d9eb49d9..afc9c747b108a06a2023f17bdc106a95 if (!Client()) return; -@@ -494,6 +490,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) { +@@ -493,6 +489,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) { // Notify ScriptController that the frame is closing, since its cleanup ends // up calling back to LocalFrameClient via WindowProxy. GetScriptController().ClearForClose(); diff --git a/patches/chromium/blink_world_context.patch b/patches/chromium/blink_world_context.patch index 89ff639b2e54..5a281b64d5b8 100644 --- a/patches/chromium/blink_world_context.patch +++ b/patches/chromium/blink_world_context.patch @@ -7,7 +7,7 @@ This exposes a method for obtaining a reference to an isolated world, which is otherwise not available in the Blink API. diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h -index 0b154417ea7cbbf1ad4b88bc80027a67f16faa7d..c5d9cd52989c0d776ac12a5c0b88782d2c40b213 100644 +index 8a545fcae6275e77b4dcc422be52402b96ef9d1c..fb84aa2239222a1b1ed9ddd0dd4194e326758d37 100644 --- a/third_party/blink/public/web/web_local_frame.h +++ b/third_party/blink/public/web/web_local_frame.h @@ -334,6 +334,9 @@ class WebLocalFrame : public WebFrame { @@ -21,10 +21,10 @@ index 0b154417ea7cbbf1ad4b88bc80027a67f16faa7d..c5d9cd52989c0d776ac12a5c0b88782d // that the script evaluated to with callback. Script execution can be // suspend. diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -index 2660078b0ed37bc3313e645f59e38cd306b1fdca..9cb4f3d02fccd6f1098c9b8080f1057642aead5f 100644 +index 8944b0e99d757cbe3aac98af0d86ac386c62052b..a12d14bbc49e8f3f4034cb63377aa274a41f6ffd 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -@@ -922,6 +922,13 @@ v8::Local WebLocalFrameImpl::GlobalProxy() const { +@@ -924,6 +924,13 @@ v8::Local WebLocalFrameImpl::GlobalProxy() const { return MainWorldScriptContext()->Global(); } @@ -39,10 +39,10 @@ index 2660078b0ed37bc3313e645f59e38cd306b1fdca..9cb4f3d02fccd6f1098c9b8080f10576 return BindingSecurity::ShouldAllowAccessToFrame( CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()), diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h -index a8d2023b6b33f56af0dab8909f5863f4be68a311..d7582f9c2f733d4beeb294df34dcbf09ce3970ce 100644 +index 27ede2774376e2fa348be97c941ab6c6d0cba88f..9d787b5e62efdf7ac495f7ef230ce2eddc47d03d 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h -@@ -160,6 +160,8 @@ class CORE_EXPORT WebLocalFrameImpl final +@@ -161,6 +161,8 @@ class CORE_EXPORT WebLocalFrameImpl final int argc, v8::Local argv[]) override; v8::Local MainWorldScriptContext() const override; diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index 947b17eaac42..6e4a09e815b3 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 6f07209af5dce58b312d44a2bdb98d9186eab71c..51ad7bf75077308c058ba66f67daa7a9b6b2eed1 100644 +index ac67c35bbcb0e8b73e2059c1dfd5b510235449c4..648c35ba8eae74e8264f6d0e2ac74785d31460ae 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h -@@ -67,6 +67,7 @@ +@@ -68,6 +68,7 @@ X("dwrite") \ X("DXVA Decoding") \ X("EarlyJava") \ diff --git a/patches/chromium/build_gn.patch b/patches/chromium/build_gn.patch index f23f0bceb082..84bd62388ab2 100644 --- a/patches/chromium/build_gn.patch +++ b/patches/chromium/build_gn.patch @@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will rebuild the entire tree. diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index 11e0a21820f34ac99bc2e9322e0c8bd1314045c3..5301eb0b4d7947c5e797d3ba8973a3ac5ff653f3 100644 +index 6f5d5f123f89c5ef4dd601eddb6025bd4dc3b9ab..b39aa4b3181489e5ea270c6cd3f30adfbb9847a0 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -123,6 +123,9 @@ if (current_os == "") { diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 8be75d171560..2ff9cc9cd923 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -9,10 +9,10 @@ potentially prevent a window from being created. TODO(loc): this patch is currently broken. diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc -index 1a500821f9fec125935641a1d34cf2131167ade7..3aa36936a96ae2afb7c7abbd64f14e4b9bf82828 100644 +index d3aa739956bf04de6ad0882f04d030e2901ab80d..04debb0b15a068d6216ccd7e5295a417c18c8861 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc -@@ -4295,6 +4295,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -4341,6 +4341,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 1a500821f9fec125935641a1d34cf2131167ade7..3aa36936a96ae2afb7c7abbd64f14e4b &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 1e0d0a28cfe2c25b186fac6eb2d02e96730c3934..ebe258f91f77ccbb0bb0a21ad511dce9b17f4e80 100644 +index a4a2c55e3e5d7d0b36f708cb2a5345dc80787c13..7dfc42c4ed02fd42f1b744bcccf69ce858f7372a 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2944,9 +2944,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -2945,9 +2945,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( } if (delegate_) { @@ -38,10 +38,10 @@ index 1e0d0a28cfe2c25b186fac6eb2d02e96730c3934..ebe258f91f77ccbb0bb0a21ad511dce9 for (auto& observer : observers_) { diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index edf716bca261df00ac7df5a34cec8fa57c526a3c..a54941f69da3b5810084221aaa96cb39dd5f5418 100644 +index ce836b666eaca4312b01dec1cb012bbcb23b9050..9009a8b7a23e170ab0fbf81a6d157e18fa4e1769 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -304,6 +304,10 @@ struct CreateNewWindowParams { +@@ -305,6 +305,10 @@ struct CreateNewWindowParams { // The window features to use for the new window. blink.mojom.WindowFeatures features; @@ -66,7 +66,7 @@ index 89f33b33f8c848040f3bc6e34282688efda9c4db..294db724572266f54c9559bf5278920b 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 26cd6d1afcb89148ed33ab733012a778e9b75c40..c9b26a69ff139d91dd0c5deb65017eed5b9fda12 100644 +index dd059509f2565ddd08a5f8dcc1052a36bd7bb919..bb71c61a631573d8f3e4fb5d1aa8a7fcd9fad7e1 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -143,6 +143,7 @@ class NetworkService; @@ -135,7 +135,7 @@ index d10b0f458416044f0b5eaeac4160ac26a2857d94..4e3a846a3825216e1a77e17fd8e03331 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index f0cb4833442be24dee52e2e172a0d22474d1135b..2cad532229217a2cee604298713be7aebc24dda8 100644 +index 7f7ffb7fe75bb9a30bb516e39584a48183b0ba29..6ae324ea4ffd4cfaaf752f7878e2a70b5c256b0f 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -68,6 +68,7 @@ @@ -146,7 +146,7 @@ index f0cb4833442be24dee52e2e172a0d22474d1135b..2cad532229217a2cee604298713be7ae #include "content/renderer/media/audio/audio_device_factory.h" #include "content/renderer/render_frame_impl.h" #include "content/renderer/render_frame_proxy.h" -@@ -1254,6 +1255,10 @@ WebView* RenderViewImpl::CreateView( +@@ -1245,6 +1246,10 @@ WebView* RenderViewImpl::CreateView( } params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features); @@ -158,10 +158,10 @@ index f0cb4833442be24dee52e2e172a0d22474d1135b..2cad532229217a2cee604298713be7ae // moved on send. bool is_background_tab = diff --git a/content/shell/browser/web_test/web_test_content_browser_client.cc b/content/shell/browser/web_test/web_test_content_browser_client.cc -index 4cb52a0e6a50a7a4dfe7f1413a73941ccf88eee0..39f339fefc99443488c98a43fb5e1c44f0abf3fc 100644 +index a10476afec548da09e44c1ea565c0ca7c9f902db..2b9d7fe3f57fa50036e8fc2e33daaae94ccbdcda 100644 --- a/content/shell/browser/web_test/web_test_content_browser_client.cc +++ b/content/shell/browser/web_test/web_test_content_browser_client.cc -@@ -335,6 +335,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( +@@ -395,6 +395,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -171,10 +171,10 @@ index 4cb52a0e6a50a7a4dfe7f1413a73941ccf88eee0..39f339fefc99443488c98a43fb5e1c44 bool opener_suppressed, bool* no_javascript_access) { diff --git a/content/shell/browser/web_test/web_test_content_browser_client.h b/content/shell/browser/web_test/web_test_content_browser_client.h -index e8b25e58fc99e8966513f183c544317b73d75e90..6b0ba214f64cee799e4ff4cc11bd3ba6ad5a4405 100644 +index b59e7c255d90996dec1f02170ffa4e1d3ec2a0c6..56db656bd2b19ca2ae90ace6c813a719a6266217 100644 --- a/content/shell/browser/web_test/web_test_content_browser_client.h +++ b/content/shell/browser/web_test/web_test_content_browser_client.h -@@ -73,6 +73,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient { +@@ -78,6 +78,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -206,10 +206,10 @@ index 4f735ad0d97eaac9a57dad137e479f8a7ec33a36..0a3c5821962c85609b64b3625fa6b8d6 } // namespace blink diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc -index 286b15de67b7c9978cd330a4ce557db5bc705118..a47797cedcee05ec07c1e7294f3843a204f344a7 100644 +index 42c8662be3da60f6687c5078771d23745b4bd7bf..1c7272b672b32de067f088a94aa5ae90b165a4cf 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -1756,6 +1756,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -1778,6 +1778,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, } WebWindowFeatures window_features = GetWindowFeaturesFromString(features); diff --git a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch index 56134892b606..a5b584e235b9 100644 --- a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch +++ b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch @@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from Electrons grit header instead of Chromes diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 1b62c3011049b39df220c210552e9f5993d8db69..6226475ca50ef13eaaa2379f2cb2d89e3ba0a1fd 100644 +index 0723a28167732c372ca567899d48363fb61e3ba2..b2b8bc688972369f52077a76e4e70cdb89314eb7 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -5309,6 +5309,7 @@ jumbo_static_library("browser") { +@@ -5317,6 +5317,7 @@ jumbo_static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", diff --git a/patches/chromium/content_browser_main_loop.patch b/patches/chromium/content_browser_main_loop.patch index 0368c400ca97..45fe6520736c 100644 --- a/patches/chromium/content_browser_main_loop.patch +++ b/patches/chromium/content_browser_main_loop.patch @@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously in atom::CommonWebContentsDelegate::ResetManageWebContents. diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc -index b10d5f5834c47148b82f06e3963eb3836ca65aee..3ab3f3c8bfec58a06df4c58060e5d594e64b0a32 100644 +index e9609ef58a821c494232d02fc30f62150fea4c28..1c960c2b98b8ab3e8876aa974a72eedd3b46b2fc 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc -@@ -1487,7 +1487,7 @@ void BrowserMainLoop::MainMessageLoopRun() { +@@ -1492,7 +1492,7 @@ void BrowserMainLoop::MainMessageLoopRun() { NOTREACHED(); #else base::RunLoop run_loop; diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index fc56bcde8ffb..99a1a40eb2a1 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -17,7 +17,7 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc -index f950552abbe9e9a0002156b596438fe9aa4f01b9..23931899eb58432fd8eabf4d681d2294a88fd97d 100644 +index 369d15f3cde70358dc35042132a0348931ca4c59..1e1da53a5064e9454e3e8b88260c21d15871d0f8 100644 --- a/content/browser/frame_host/navigation_controller_impl.cc +++ b/content/browser/frame_host/navigation_controller_impl.cc @@ -1250,8 +1250,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( @@ -46,10 +46,10 @@ index f950552abbe9e9a0002156b596438fe9aa4f01b9..23931899eb58432fd8eabf4d681d2294 // navigation. Now we know that the renderer has updated its state accordingly // and it is safe to also clear the browser side history. diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc -index 7a80d2f2eb940a92a2711365ddb5b52f8f8f6606..4c9ca5a3635230c1db43568cfc6ddcb264179d80 100644 +index 4362daa04e89ca8f47c5e07e998fc9f1ad4f4c5b..9ecdb2e13235396aee11ae1be7e539f8e932e3f6 100644 --- a/ui/base/clipboard/clipboard_win.cc +++ b/ui/base/clipboard/clipboard_win.cc -@@ -768,10 +768,10 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap, +@@ -776,10 +776,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const { void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) { UINT cf_format = format.ToFormatEtc().cfFormat; diff --git a/patches/chromium/delay_lock_the_protocol_scheme_registry.patch b/patches/chromium/delay_lock_the_protocol_scheme_registry.patch index 3497513e596e..486f897c12e9 100644 --- a/patches/chromium/delay_lock_the_protocol_scheme_registry.patch +++ b/patches/chromium/delay_lock_the_protocol_scheme_registry.patch @@ -19,10 +19,10 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try re-submitting the patch. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index d769b656dbe9e88a3e2533f82cb8daebe871d88b..0955e03a1ff9347b1d7d692e16ff62f350453f7d 100644 +index bb72915a26e298bdb81009248fb3fb4df7bddab5..00d991ad0183ec0c82d23633c86a3c0d7a6e6754 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -670,7 +670,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { +@@ -671,7 +671,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { } #endif diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 16724065566d..539c79ebb26f 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -111,7 +111,7 @@ index ad7f766a36b1b6b2a8bc0f96369f1aaadf6681f7..f6c6c14a0937430df62c9b9c1132c591 protected: virtual ~DesktopMediaListObserver() {} diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index d415675b3f7b757f2fb7a972e1bd96032f9ddd2c..b143433c995319e35216f359c1b57331917b1271 100644 +index 224d52b83533543398757ca487f99b3e59897e21..eb50b0393ba532766867aeec5ddeab1a6acd0bc2 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc @@ -10,14 +10,15 @@ diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index e1188cf9baa3..b25d58ed4f50 100644 --- a/patches/chromium/disable-redraw-lock.patch +++ b/patches/chromium/disable-redraw-lock.patch @@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue can be found at https://github.com/electron/electron/issues/1821 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index e18afe3c8c287c4cd44ff7139c1cc4004a9704ec..281c722d81c0ad5fa7bacbe25c07a7578dfa43b6 100644 +index d887bfd2e75be9c9f3d29a6ebf6d37abb639bc4d..f9cfb7b49bd8d5eeb4d88acd99c048d06b278ccf 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -306,6 +306,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500; @@ -37,7 +37,7 @@ index e18afe3c8c287c4cd44ff7139c1cc4004a9704ec..281c722d81c0ad5fa7bacbe25c07a757 (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) || !ui::win::IsAeroGlassEnabled())) { if (should_lock_) -@@ -974,6 +979,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { +@@ -976,6 +981,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { return scoped_enable; } diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 0ed763cf3c64..e3c5e0112f8a 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at https://crbug.com/634542 and https://crbug.com/711107. diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h -index ed5484e0b05ccfef76061427a8f88a72b6f9b7fe..e893b6aba90f61ae0d05532ca925a9ff7faf2195 100644 +index 95a901678c215220b9e88db768444d48e32f6dbd..841c809b0b50c8c34a9d9c972c511bd4fd57a7b0 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h -@@ -101,6 +101,8 @@ class CC_EXPORT LayerTreeSettings { +@@ -100,6 +100,8 @@ class CC_EXPORT LayerTreeSettings { bool use_rgba_4444 = false; bool unpremultiply_and_dither_low_bit_depth_tiles = false; @@ -33,7 +33,7 @@ index ed5484e0b05ccfef76061427a8f88a72b6f9b7fe..e893b6aba90f61ae0d05532ca925a9ff // Image Decode Service and raster tiles without images until the decode is // ready. diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h -index a27d84cc640a5a2af25e8b4475a499eeb298f16a..de9ffade449dcc8652481ce98306fdd59962bfa2 100644 +index 8bde4796ebcf40f7f10c62f4005eabb84af9de04..913ab005e582b3d1ab0df8f88ac1df6245fce34e 100644 --- a/components/viz/common/display/renderer_settings.h +++ b/components/viz/common/display/renderer_settings.h @@ -23,6 +23,7 @@ class VIZ_COMMON_EXPORT RendererSettings { @@ -216,10 +216,10 @@ index d47312d5f89939eab55cfa94bd3fbd41a4bd7d2a..da2f5e9fdc0fda37c82357a12f4fa28f service_manager::switches::kGpuSandboxAllowSysVShm, service_manager::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index ea736817be4084f43ef5266e4a7aac3a8bdaa9d7..367baf4401edffdaaf66620cf17364aa2e9a5ca3 100644 +index d4bab5f58beaf7e9f3baae3024dbf69c4e248a41..63fd699b67225d9f67b78c575f5b90191a19d423 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -227,6 +227,7 @@ +@@ -228,6 +228,7 @@ #include "ui/accessibility/accessibility_switches.h" #include "ui/base/ui_base_switches.h" #include "ui/display/display_switches.h" @@ -227,7 +227,7 @@ index ea736817be4084f43ef5266e4a7aac3a8bdaa9d7..367baf4401edffdaaf66620cf17364aa #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_features.h" #include "url/origin.h" -@@ -3183,6 +3184,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3211,6 +3212,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. static const char* const kSwitchNames[] = { @@ -236,10 +236,10 @@ index ea736817be4084f43ef5266e4a7aac3a8bdaa9d7..367baf4401edffdaaf66620cf17364aa service_manager::switches::kDisableInProcessStackTraces, service_manager::switches::kDisableSeccompFilterSandbox, diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc -index 640945d6c239ee1c2d1beb190fdb92c600ee348c..c7143f9a91328a0a56038d58b50abd1aed9247fa 100644 +index 754621e31a6a07e52f9b4609c8263b2c1a17c246..95006fe1f4d1fefb51c2311d6323332d7c176fd4 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc -@@ -2681,6 +2681,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( +@@ -2673,6 +2673,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index fc5f0e9835eb..86c9fb563bd9 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 7d70d057e10ccf3301e810c8a0521d644c8e907f..591305cb57a2f89067b25189b9c33d92858f01a0 100644 +index f293a15c6145422707c22aeb5a254ad71a31900c..472869202ff8a62d854c9ca39ca9f14e2f91e8cf 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -472,7 +472,11 @@ void RenderWidgetHostViewMac::WasOccluded() { diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 7cf3533807cd..f205bc2de371 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 5ad66a6af94f07d7a989e738ea587ce467a542d6..8c54e34e716a647a72ffce78b56f94a03a5dd978 100644 +index e33060edbc5501d657884535f9e2f4a665552644..e942fad5cf830a573e254f0040a4669c9390d332 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -660,6 +660,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -657,6 +657,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; @@ -20,7 +20,7 @@ index 5ad66a6af94f07d7a989e738ea587ce467a542d6..8c54e34e716a647a72ffce78b56f94a0 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 013b2165038f1f21df394a0742f7927f26ab1671..894ddaa62fe8aa24eccbe7f9885a4dbb8db04206 100644 +index 57865bc70d3e5c50b640dffba03739019eb3fb36..fccc3086bf9936e5bcc5e54986d541f5464d80b7 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -179,6 +179,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl @@ -34,7 +34,7 @@ index 013b2165038f1f21df394a0742f7927f26ab1671..894ddaa62fe8aa24eccbe7f9885a4dbb const base::TimeDelta& delay) { new_content_rendering_delay_ = delay; diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc -index 3e2190700aee4ea6184ea59d8bb4a480cd52697b..0ccdaa8d037cb71ee3eebae027a74e96ffe1e846 100644 +index f7f9dafb97983d05b3d13af3c178aa2f392b09ef..b43d1e528acaa4f0ead02c13d13a072216e2638c 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -692,7 +692,7 @@ void RenderWidgetHostViewAura::HideImpl() { diff --git a/patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch b/patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch index b9b15bf2d4dd..41481784356d 100644 --- a/patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch +++ b/patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch @@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch See https://github.com/electron/electron/issues/10754 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc -index ca2cb0332066db76e2e120c1534c07b95e33a670..6b3ec3427fbf5f138900c23a2a0dd7308e433bbd 100644 +index 002633988171955abfa7418dddbaea10dcd99981..4be5be505bd658666f0189e4ec2ab132fc0dde32 100644 --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc -@@ -4142,7 +4142,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client, +@@ -4157,7 +4157,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client, "frame that never had a user gesture since its load. " "https://www.chromestatus.com/feature/5082396709879808"; Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message); diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index e9efd84bf0b6..a208910af58b 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970 DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings); }; diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index d0d646a42b3ee27f848dd0a47179e8f573e51d8f..35244d028375fe4d79ad41a864c38587ce02f749 100644 +index 95a9d94838debcb64993e0a2533769d96e38dc1d..a16bb8858da2160288db8e67a565869e6b6a13ee 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1008,6 +1008,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1029,6 +1029,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index d0d646a42b3ee27f848dd0a47179e8f573e51d8f..35244d028375fe4d79ad41a864c38587 // 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 9d201f1a5ef0eaf3f8b42cbb3d2593dbd068bdd6..e32997067e57098198168675ffe3160134fb838b 100644 +index fccf53cd1a7188685345764c599e16d85d8ee92b..6160cbb5f3e6d2fdcf1f205d84ca28283b6366ff 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -233,6 +233,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -236,6 +236,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CloseIdleConnections(CloseIdleConnectionsCallback callback) override; void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override; @@ -63,10 +63,10 @@ index 9d201f1a5ef0eaf3f8b42cbb3d2593dbd068bdd6..e32997067e57098198168675ffe31601 void SetEnableReferrers(bool enable_referrers) override; #if defined(OS_CHROMEOS) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 96ba4d67bcdefef44ecd246acb883824c9e842d6..a46aab1db2de282e0ff3561a98bad1dac659b67a 100644 +index 44b00a1fc341de0adba9a2c908a4ce248bc02805..a0d035ef7cbc701916ef0e10ce33ee62bae0777e 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -986,6 +986,9 @@ interface NetworkContext { +@@ -1015,6 +1015,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,10 +77,10 @@ index 96ba4d67bcdefef44ecd246acb883824c9e842d6..a46aab1db2de282e0ff3561a98bad1da SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index 4d832a7980805ac48938579ea587b474bbeb35d7..402d546fd26a91409bf4df3574b76ac8cbc32152 100644 +index 51593e249f23f37d031bcfc98a44ea538eb13dbc..2b4f72aefd0389dee85e088ed75550e92becefb2 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -99,6 +99,7 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -102,6 +102,7 @@ class TestNetworkContext : public mojom::NetworkContext { void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {} void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override {} diff --git a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch index 8cc9e9c797a6..f5e858c1127a 100644 --- a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch +++ b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch @@ -13,10 +13,10 @@ uses internally for things like menus and devtools. We can remove this patch once it has in some shape been upstreamed. diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc -index 68c0830f8a7e2f492fade824d0036a6f576da6d8..ed27dcca6e5d3bdbc353aba9830a278624c6d69d 100644 +index e0ef57531ed3c8ccaab6de2c7e012e8817e90a08..b4772976bc364248aa210a545923fcabbd5ca175 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc -@@ -221,6 +221,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors) +@@ -234,6 +234,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors) NativeTheme::~NativeTheme() = default; bool NativeTheme::ShouldUseDarkColors() const { @@ -26,10 +26,10 @@ index 68c0830f8a7e2f492fade824d0036a6f576da6d8..ed27dcca6e5d3bdbc353aba9830a2786 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index 380a8e78fdeb2ad5f40b298a3efffa82a70ed2dc..af3d29313dfd14b7c367133eb1c9afe3f0b70bcc 100644 +index 8c60a3f7ba7cd3caec127028422be32024ff586b..7bffe0caa4a55728e45f2371bb594c96855d1bc5 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -351,6 +351,22 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -363,6 +363,22 @@ class NATIVE_THEME_EXPORT NativeTheme { ColorId color_id, ColorScheme color_scheme = ColorScheme::kDefault) const; @@ -52,9 +52,9 @@ index 380a8e78fdeb2ad5f40b298a3efffa82a70ed2dc..af3d29313dfd14b7c367133eb1c9afe3 // 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 -@@ -482,6 +498,8 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -497,6 +513,8 @@ class NATIVE_THEME_EXPORT NativeTheme { + PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kNoPreference; - mutable ColorProvider* color_provider_ = nullptr; + ThemeSource theme_source_ = ThemeSource::kSystem; + @@ -62,10 +62,10 @@ index 380a8e78fdeb2ad5f40b298a3efffa82a70ed2dc..af3d29313dfd14b7c367133eb1c9afe3 }; diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index 7bc92ec1d15b9f5c9f867354f2768f6edc158a92..d6ec646352a7671fa7321f60bddec6c9c18f7476 100644 +index 06f30fa5bfff682d8dcad39d40dc9f0076fb01f2..535b8dbcf7b842f5a53aa63181d32ed2e0e62b9b 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc -@@ -729,6 +729,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { +@@ -732,6 +732,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { // ...unless --force-dark-mode was specified in which case caveat emptor. if (UsesHighContrastColors() && !IsForcedDarkMode()) return false; diff --git a/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch index 455b4977b081..0b91abe248b5 100644 --- a/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,10 +6,10 @@ Subject: feat: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index a7dc1fb163c385f1f28186ccabd5e4b9d535f43a..1b2e7f4aa70ad66769e995f6e6957aa34c48a283 100644 +index 01a4e3dc134b3cf267ec637dde1066db51ac78e7..9178621b483b3790fe41f75f40463001cde4f133 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -452,6 +452,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -458,6 +458,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -61,10 +61,10 @@ index 893c45a5c71b4e55ea323ae60e11d12ddb099efd..db9a1ff0fe1a912db83692ab17c620cf // // Returns the current WebKit preferences. Note: WebPreferences is cached, so diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index 2cad532229217a2cee604298713be7aebc24dda8..9b8b0bd7afef3e94460d3ea05437d82a9a4cc684 100644 +index 6ae324ea4ffd4cfaaf752f7878e2a70b5c256b0f..507f565898b15701e05224949bc6cf7360c275ba 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc -@@ -1183,6 +1183,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { +@@ -1174,6 +1174,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message) @@ -73,7 +73,7 @@ index 2cad532229217a2cee604298713be7aebc24dda8..9b8b0bd7afef3e94460d3ea05437d82a IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck) IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences) IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) -@@ -1700,6 +1702,12 @@ bool RenderViewImpl::GetContentStateImmediately() { +@@ -1671,6 +1673,12 @@ bool RenderViewImpl::GetContentStateImmediately() { return send_content_state_immediately_; } @@ -87,10 +87,10 @@ index 2cad532229217a2cee604298713be7aebc24dda8..9b8b0bd7afef3e94460d3ea05437d82a PageVisibilityState visibility_state, bool initial_setting) { diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h -index 701aac4f7865097899b76ee8c37db6eb32672b33..9e4ef233ce1df822d08bef03bfa5bf48774e0c24 100644 +index 19921b25a7fff60fabcff4ff4c3fa392f3cb4bc7..9e725308b800c8f44d676c1adfa63689bc7fbe41 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h -@@ -413,6 +413,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, +@@ -404,6 +404,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, void OnSetHistoryOffsetAndLength(int history_offset, int history_length); void OnSetRendererPrefs( const blink::mojom::RendererPreferences& renderer_prefs); @@ -99,10 +99,10 @@ index 701aac4f7865097899b76ee8c37db6eb32672b33..9e4ef233ce1df822d08bef03bfa5bf48 void OnUpdateTargetURLAck(); void OnUpdateWebPreferences(const WebPreferences& prefs); diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h -index 406c19b10b2e97ba05b9b3eb5c1ac0831023b3e2..dcbaf84dceee74da60ae8cc5466e08db317e3543 100644 +index 02dd65eddc778d3f60e3cbad6c1311f46c097840..5c5c15af943c00931b0615017f6bd762288ad17a 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h -@@ -402,6 +402,7 @@ class WebView { +@@ -398,6 +398,7 @@ class WebView { // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -111,10 +111,10 @@ index 406c19b10b2e97ba05b9b3eb5c1ac0831023b3e2..dcbaf84dceee74da60ae8cc5466e08db // 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 43fc2bb2de690486b38061760edec4c64cc19c0b..cd94798b733c1ea12ca60666dbabd7058aa77393 100644 +index 0fb1407597bfe394f07ff930bab3e8d7f1bc7d01..6b2c17711e6bffb59bdbf7d63c66068b36692643 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3355,12 +3355,20 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3341,12 +3341,20 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -138,10 +138,10 @@ index 43fc2bb2de690486b38061760edec4c64cc19c0b..cd94798b733c1ea12ca60666dbabd705 PageVisibilityState WebViewImpl::GetVisibilityState() { diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h -index 60cfa746367a03d308f0f26fef05839ecd6420b2..5c2b7a3aafbd72567c413be42d4bdf9665a97a2e 100644 +index 05d40d19cee2704f19a0bbd243b35d8195dee53d..88ea859e91483b673c6a75a9999b594d58f3738d 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -328,6 +328,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -326,6 +326,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -149,7 +149,7 @@ index 60cfa746367a03d308f0f26fef05839ecd6420b2..5c2b7a3aafbd72567c413be42d4bdf96 void SetVisibilityState(PageVisibilityState visibility_state, bool is_initial_state) override; PageVisibilityState GetVisibilityState() override; -@@ -696,6 +697,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -691,6 +692,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, // WebViewImpl::Close while handling an input event. bool debug_inside_input_handling_ = false; diff --git a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch index ce206e436652..34e22adf85ba 100644 --- a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch +++ b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch @@ -5,10 +5,10 @@ Subject: feat: allow embedders to add observers on created hunspell dictionaries diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc -index 7d3ddb783ca82c88b1d2fd388b9e33e20f06b833..543c8026ead55e135b923ae99cb90f117f5d7f51 100644 +index 4aea771dcad5f190a5ccd357ace0491e8c651458..dcb35b869cbb6a87110ac3e56094dce058b2f0c5 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc -@@ -283,6 +283,9 @@ void SpellcheckService::LoadHunspellDictionaries() { +@@ -363,6 +363,9 @@ void SpellcheckService::LoadHunspellDictionaries() { std::make_unique(dictionary, context_, this)); hunspell_dictionaries_.back()->AddObserver(this); @@ -18,7 +18,7 @@ index 7d3ddb783ca82c88b1d2fd388b9e33e20f06b833..543c8026ead55e135b923ae99cb90f11 hunspell_dictionaries_.back()->Load(); } -@@ -296,6 +299,20 @@ SpellcheckService::GetHunspellDictionaries() { +@@ -376,6 +379,20 @@ SpellcheckService::GetHunspellDictionaries() { return hunspell_dictionaries_; } @@ -40,10 +40,10 @@ index 7d3ddb783ca82c88b1d2fd388b9e33e20f06b833..543c8026ead55e135b923ae99cb90f11 std::string locale, std::string path, diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h -index 803c7dad0d30af2c5ebd9b3e2f200183fa20d15a..5afca1e55685efea1f17dfba98db3ebd51c849de 100644 +index 97df131375cb11eb562ac0097ab7c870755b46dd..485331591812d0f28011160b186dc2e78f1e77a7 100644 --- a/chrome/browser/spellchecker/spellcheck_service.h +++ b/chrome/browser/spellchecker/spellcheck_service.h -@@ -116,6 +116,8 @@ class SpellcheckService : public KeyedService, +@@ -123,6 +123,8 @@ class SpellcheckService : public KeyedService, const std::vector>& GetHunspellDictionaries(); @@ -52,7 +52,7 @@ index 803c7dad0d30af2c5ebd9b3e2f200183fa20d15a..5afca1e55685efea1f17dfba98db3ebd // Load a dictionary from a given path. Format specifies how the dictionary // is stored. Return value is true if successful. bool LoadExternalDictionary(std::string language, -@@ -213,6 +215,8 @@ class SpellcheckService : public KeyedService, +@@ -225,6 +227,8 @@ class SpellcheckService : public KeyedService, // A pointer to the BrowserContext which this service refers to. content::BrowserContext* context_; diff --git a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch index 0c1eab3c6107..8ebaae46568c 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -94,7 +94,7 @@ index 1026b739d283f0fc252fa2af83a6d4cf51bc8553..fe562ab60ce98b8bb0c5080a6428deb3 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 84a16ad496b5e443555ac41bb969b855f5aed091..e2a478ef9b51117316a0c1fca45c5e193053b4c0 100644 +index 596e298cb3209d5999ded58b87de037155d8681f..544f2d8452faf7b437a85a5a1f0e5311b1fcbac5 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -111,6 +111,8 @@ viz_component("service") { @@ -442,10 +442,10 @@ index 0000000000000000000000000000000000000000..48fa86caaab3c15764f105eb7ad2aecf + +#endif // COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_PROXY_H_ diff --git a/components/viz/service/display_embedder/software_output_device_win.cc b/components/viz/service/display_embedder/software_output_device_win.cc -index 94ea55487f85ab32d862e913c476bc95f388dce9..d055a18bbc186facd88d496d589be78068c4ca64 100644 +index 2bb30e5318b6b48c2e6d4b1f64a6a36c68f963d1..9e805f27a9d7d1c0aa68cdf9f48895c055ca7791 100644 --- a/components/viz/service/display_embedder/software_output_device_win.cc +++ b/components/viz/service/display_embedder/software_output_device_win.cc -@@ -268,7 +268,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( +@@ -188,7 +188,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( if (!canvas_) return; @@ -527,10 +527,10 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 3e2d2304faf75d1ec6cc830d756cbf31767dacfd..b4ec5b6e34f901ace7975e5e906e01177f04e8be 100644 +index 601c3d175ccd24161b15b2b19ecb1a9241083060..d2ca7469f2a28c8027aca74404a47364dcfe16e3 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h -@@ -70,6 +70,7 @@ class DisplayPrivate; +@@ -73,6 +73,7 @@ class DisplayPrivate; class ExternalBeginFrameController; } // namespace mojom class ContextProvider; @@ -538,7 +538,7 @@ index 3e2d2304faf75d1ec6cc830d756cbf31767dacfd..b4ec5b6e34f901ace7975e5e906e0117 class HostFrameSinkManager; class LocalSurfaceIdAllocation; class RasterContextProvider; -@@ -122,6 +123,15 @@ class COMPOSITOR_EXPORT ContextFactory { +@@ -126,6 +127,15 @@ class COMPOSITOR_EXPORT ContextFactory { virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0; }; @@ -554,7 +554,7 @@ index 3e2d2304faf75d1ec6cc830d756cbf31767dacfd..b4ec5b6e34f901ace7975e5e906e0117 // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -155,6 +165,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -160,6 +170,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -564,7 +564,7 @@ index 3e2d2304faf75d1ec6cc830d756cbf31767dacfd..b4ec5b6e34f901ace7975e5e906e0117 // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -390,6 +403,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -405,6 +418,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, std::unique_ptr pending_begin_frame_args_; diff --git a/patches/chromium/fix_account_for_print_preview_disabled_when_printing_to_pdf.patch b/patches/chromium/fix_account_for_print_preview_disabled_when_printing_to_pdf.patch index e9e8ed5ce59c..f0efc49de058 100644 --- a/patches/chromium/fix_account_for_print_preview_disabled_when_printing_to_pdf.patch +++ b/patches/chromium/fix_account_for_print_preview_disabled_when_printing_to_pdf.patch @@ -10,10 +10,10 @@ understanding, it seems like we slightly misuse the print preview API and this is fallout from using it in a way the code doesn't expect. diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index bbfab5601434cf3a050c220f237625d231c12f41..1849d0802d17e9bbe4eb669aec314a1b00351c6f 100644 +index 52a1d8d52da18e0173051fca9c5fe316c1c3ea77..235025cbd385a6ce089a247a65158d462b2e846a 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -1462,6 +1462,7 @@ PrintRenderFrameHelper::CreatePreviewDocument() { +@@ -1460,6 +1460,7 @@ PrintRenderFrameHelper::CreatePreviewDocument() { const std::vector& pages = print_pages_params_->pages; bool require_document_metafile = diff --git a/patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch b/patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch index 5c135e66c43b..965fd5ca6e9b 100644 --- a/patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch +++ b/patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch @@ -13,10 +13,10 @@ This patch can be removed once app.allowRendererProcessReuse is forced to true as then Chromiums assumptions around processes become correct. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index b106b4fdb7a1bbb95977a8a9e69baaefe56a4379..9cae89416fb89ed6d440a0bedc6187d244852cbe 100644 +index 7dfc42c4ed02fd42f1b744bcccf69ce858f7372a..d59bdb6c8a6f4c324341d7da5e7aac56b1e36f76 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2350,11 +2350,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { +@@ -2348,11 +2348,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { WebContentsImpl* outermost = GetOutermostWebContents(); if (event.button == blink::WebPointerProperties::Button::kBack && outermost->controller_.CanGoBack()) { diff --git a/patches/chromium/fix_undo_redo_broken_in_webviews.patch b/patches/chromium/fix_undo_redo_broken_in_webviews.patch index 559a09b817fc..91b911340735 100644 --- a/patches/chromium/fix_undo_redo_broken_in_webviews.patch +++ b/patches/chromium/fix_undo_redo_broken_in_webviews.patch @@ -9,7 +9,7 @@ that error. A crbug has been opened at https://bugs.chromium.org/p/chromium/issu and this patch will be removed when it has been resolved upstream. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 591305cb57a2f89067b25189b9c33d92858f01a0..a3112cb03bc73eb670631ff429f38414537f19cf 100644 +index 472869202ff8a62d854c9ca39ca9f14e2f91e8cf..1be0ad4382c735b7dcb78715528148aa2ad2d2c1 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -38,6 +38,7 @@ diff --git a/patches/chromium/fixme_grit_conflicts.patch b/patches/chromium/fixme_grit_conflicts.patch index f06ff34b1526..1367cc35d28a 100644 --- a/patches/chromium/fixme_grit_conflicts.patch +++ b/patches/chromium/fixme_grit_conflicts.patch @@ -10,10 +10,10 @@ Should be removed once grit is fixed. Tracking bug: https://crbug.com/1040605 diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec -index 9ca93ffa79d6fb8658d1d0f3581f91c229b737e0..4dbeb30632654ce6e65b0acd69a0526eae42cc54 100644 +index 84802e09d5db2d1d76118e2a1967608072e77cd5..74f88149fc7ec617a89e3b2857e31ee6b32cd8ea 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -587,15 +587,16 @@ +@@ -589,15 +589,16 @@ "includes": [3840], }, diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index e58a1ba49791..51aa579d5383 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -42,10 +42,10 @@ index 906a1ee4ac58b0744a32153bbaafeac4322a60e4..c90f4aead36cbf3767dc5094728963c2 // another SiteInstance for the same site. void RegisterSiteInstance(SiteInstanceImpl* site_instance); diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc -index dbfc24395349cfa40b5783590d60cc7e44b31205..499af1cdcf13cf57f97a0c28430cbe874c8ed7e7 100644 +index 83aa7b27e72072eecf3414fc8b8fecaf1e62c6a0..cac3fb80e0592154a2cf923689f8bfb30367fb33 100644 --- a/content/browser/frame_host/navigation_request.cc +++ b/content/browser/frame_host/navigation_request.cc -@@ -1257,6 +1257,24 @@ void NavigationRequest::BeginNavigation() { +@@ -1267,6 +1267,24 @@ void NavigationRequest::BeginNavigation() { // it immediately. EnterChildTraceEvent("ResponseStarted", this); @@ -71,7 +71,7 @@ index dbfc24395349cfa40b5783590d60cc7e44b31205..499af1cdcf13cf57f97a0c28430cbe87 render_frame_host_ = frame_tree_node_->render_manager()->GetFrameHostForNavigation(this); diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc -index 50533c338dd75f606ba542813cfe724301ad6527..3a06ae9ad9d36fea4c055e610dac5b6d66d95e7b 100644 +index f76a633c85c8e53d99c1280d359b6ddcf6bcfbbc..f1d4a349a7d4648e5ac987b24cbe2fb541fa54b6 100644 --- a/content/browser/frame_host/render_frame_host_manager.cc +++ b/content/browser/frame_host/render_frame_host_manager.cc @@ -2392,6 +2392,16 @@ bool RenderFrameHostManager::InitRenderView( @@ -156,7 +156,7 @@ index 50533c338dd75f606ba542813cfe724301ad6527..3a06ae9ad9d36fea4c055e610dac5b6d // Account for renderer-initiated reload as well. // Needed as a workaround for https://crbug.com/1045524, remove it when it is -@@ -2456,6 +2516,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2457,6 +2517,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -220,7 +220,7 @@ index 294db724572266f54c9559bf5278920b819bef03..d2e28037a4005df4a4552440cb8486f5 const MainFunctionParams& parameters) { return nullptr; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index c9b26a69ff139d91dd0c5deb65017eed5b9fda12..959384005b1d3f73b9aca03db2999e8de09b0bdb 100644 +index bb71c61a631573d8f3e4fb5d1aa8a7fcd9fad7e1..cda52523faa5dc969c995b2addc056e30a998cf0 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -233,8 +233,45 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/chromium/gin_allow_passing_an_objecttemplate_to_objecttemplatebuilder.patch b/patches/chromium/gin_allow_passing_an_objecttemplate_to_objecttemplatebuilder.patch deleted file mode 100644 index f7fcf9a487c2..000000000000 --- a/patches/chromium/gin_allow_passing_an_objecttemplate_to_objecttemplatebuilder.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Apthorp -Date: Tue, 17 Mar 2020 12:51:02 -0700 -Subject: gin: allow passing an ObjectTemplate to ObjectTemplateBuilder - -This allows us to pass an InstanceTemplate from a FunctionTemplate we -construct ourselves. In particular, this means we can customize the -prototype chain of the object. - -diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc -index 543cd694e7becec72c2e48b9f235ad02da777df8..dbc753ce357b4c18a3180528dcb3aafb86041428 100644 ---- a/gin/object_template_builder.cc -+++ b/gin/object_template_builder.cc -@@ -143,11 +143,15 @@ void IndexedPropertyEnumerator( - ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate) - : ObjectTemplateBuilder(isolate, nullptr) {} - -+ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate, const char *type_name) -+ : ObjectTemplateBuilder(isolate, nullptr, v8::ObjectTemplate::New(isolate)) {} -+ - ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate, -- const char* type_name) -+ const char* type_name, -+ v8::Local tmpl) - : isolate_(isolate), - type_name_(type_name), -- template_(v8::ObjectTemplate::New(isolate)) { -+ template_(tmpl) { - template_->SetInternalFieldCount(kNumberOfInternalFields); - } - -diff --git a/gin/object_template_builder.h b/gin/object_template_builder.h -index 6fb331cbbfe242cb871edc5eec8ab8e620e0a17d..5ac479026eb040414961fb45913c91c74f2488dc 100644 ---- a/gin/object_template_builder.h -+++ b/gin/object_template_builder.h -@@ -46,6 +46,7 @@ class GIN_EXPORT ObjectTemplateBuilder { - public: - explicit ObjectTemplateBuilder(v8::Isolate* isolate); - ObjectTemplateBuilder(v8::Isolate* isolate, const char* type_name); -+ ObjectTemplateBuilder(v8::Isolate* isolate, const char* type_name, v8::Local tmpl); - ObjectTemplateBuilder(const ObjectTemplateBuilder& other); - ~ObjectTemplateBuilder(); - diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index 48e0a7137598..b4097877f9bf 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -38,7 +38,7 @@ index f23af2d9738f3aa76e3a49301e1c3216ee4a64b4..ede178acabc63c3c33d6ce93efd5632b v8::Isolate* isolate() { return isolate_; } diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index 3a3742ed911cf49b6c93d02763d6eaa9554df62b..c53ea98d3897675c18c1eb8ad37dbce61110fa2e 100644 +index 2e2e3464a3760c39471b6897eee2b337f611cce0..d6effe50b5213b308cf59cd1c8cc7f1a62225763 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc @@ -190,12 +190,14 @@ enum LoadV8FileResult { diff --git a/patches/chromium/gin_forward_args_when_dispatching.patch b/patches/chromium/gin_forward_args_when_dispatching.patch deleted file mode 100644 index 7d8c2b6f2880..000000000000 --- a/patches/chromium/gin_forward_args_when_dispatching.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Apthorp -Date: Wed, 1 Apr 2020 01:06:45 +0000 -Subject: gin: forward args when dispatching - -This allows passing arguments with move-only semantics. - -Change-Id: I852eb343398e6f763abfe2a44e623f28353d79a5 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2129029 -Commit-Queue: Jeremy Apthorp -Reviewed-by: Jeremy Roman -Auto-Submit: Jeremy Apthorp -Cr-Commit-Position: refs/heads/master@{#755196} - -diff --git a/gin/converter_unittest.cc b/gin/converter_unittest.cc -index 6f9205f06a3e4747e70149c440c4548e54045001..162572385bdd8a54612eb64414fe80e0f9d619d1 100644 ---- a/gin/converter_unittest.cc -+++ b/gin/converter_unittest.cc -@@ -12,6 +12,7 @@ - #include "base/stl_util.h" - #include "base/strings/string16.h" - #include "base/strings/utf_string_conversions.h" -+#include "gin/function_template.h" - #include "gin/handle.h" - #include "gin/public/isolate_holder.h" - #include "gin/test/v8_test.h" -@@ -224,4 +225,45 @@ TEST_F(ConverterTest, VectorOfWrappables) { - EXPECT_THAT(out_value2, testing::ContainerEq(vector)); - } - -+namespace { -+ -+class MoveOnlyObject { -+ public: -+ MoveOnlyObject() = default; -+ MoveOnlyObject(const MoveOnlyObject&) = delete; -+ MoveOnlyObject& operator=(const MoveOnlyObject&) = delete; -+ -+ MoveOnlyObject(MoveOnlyObject&&) noexcept = default; -+ MoveOnlyObject& operator=(MoveOnlyObject&&) noexcept = default; -+}; -+ -+} // namespace -+ -+template <> -+struct Converter { -+ static v8::Local ToV8(v8::Isolate* isolate, MoveOnlyObject in) { -+ return v8::Undefined(isolate); -+ } -+ static bool FromV8(v8::Isolate* isolate, -+ v8::Local val, -+ MoveOnlyObject* out) { -+ *out = MoveOnlyObject(); -+ return true; -+ } -+}; -+ -+TEST_F(ConverterTest, MoveOnlyParameters) { -+ v8::Isolate* isolate = instance_->isolate(); -+ v8::HandleScope handle_scope(isolate); -+ -+ auto receives_move_only_obj = [](MoveOnlyObject obj) {}; -+ auto func_templ = gin::CreateFunctionTemplate( -+ isolate, base::BindRepeating(receives_move_only_obj)); -+ -+ v8::Local context = instance_->isolate()->GetCurrentContext(); -+ auto func = func_templ->GetFunction(context).ToLocalChecked(); -+ v8::Local argv[] = {v8::Undefined(isolate)}; -+ func->Call(context, v8::Undefined(isolate), 1, argv).ToLocalChecked(); -+} -+ - } // namespace gin -diff --git a/gin/function_template.h b/gin/function_template.h -index 7edcc9e20dfa6367dde5f58237cca5f4ca637f7a..8c641d934fdeebb9a90f6eb49960e4fe06217913 100644 ---- a/gin/function_template.h -+++ b/gin/function_template.h -@@ -166,14 +166,15 @@ class Invoker, ArgTypes...> - template - void DispatchToCallback( - base::RepeatingCallback callback) { -- args_->Return(callback.Run(ArgumentHolder::value...)); -+ args_->Return( -+ callback.Run(std::move(ArgumentHolder::value)...)); - } - - // In C++, you can declare the function foo(void), but you can't pass a void - // expression to foo. As a result, we must specialize the case of Callbacks - // that have the void return type. - void DispatchToCallback(base::RepeatingCallback callback) { -- callback.Run(ArgumentHolder::value...); -+ callback.Run(std::move(ArgumentHolder::value)...); - } - - private: diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index 4fabdf7c7b8e..169f4cb1d447 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -12,10 +12,10 @@ rendering and there is no signal from browser process on this event to identify it. diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc -index ba01477a3deea383f538adfe519bc53154df3321..b58f0a57e4884d87c8acc42bafc2ba86f0d1f19d 100644 +index db9780a6c0b679354a5f74b1f89e32a8ff9dd2e3..0fc50588e4776939093fb79b346ac032bf17b237 100644 --- a/content/browser/gpu/gpu_data_manager_impl.cc +++ b/content/browser/gpu/gpu_data_manager_impl.cc -@@ -151,6 +151,11 @@ void GpuDataManagerImpl::OnBrowserThreadsStarted() { +@@ -165,6 +165,11 @@ void GpuDataManagerImpl::OnBrowserThreadsStarted() { base::AutoLock auto_lock(lock_); private_->OnBrowserThreadsStarted(); } @@ -28,10 +28,10 @@ index ba01477a3deea383f538adfe519bc53154df3321..b58f0a57e4884d87c8acc42bafc2ba86 void GpuDataManagerImpl::UpdateGpuFeatureInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h -index c5515870a1dcf017b3477d890510a672e82e00e3..7848ae18cc681a3c061791166051afee49406d23 100644 +index d5595c91f4d63362e575ad31070335ee344261fa..986d21000988aa0880bac3f0a58003257f1a3ad3 100644 --- a/content/browser/gpu/gpu_data_manager_impl.h +++ b/content/browser/gpu/gpu_data_manager_impl.h -@@ -89,6 +89,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, +@@ -92,6 +92,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, bool Dx12VulkanRequested() const; // Called from BrowserMainLoop::BrowserThreadsStarted(). void OnBrowserThreadsStarted(); diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index df4bfd27f86b..9754fe64c950 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 f8e27f6df77302a9af952493ebf946349466225e..9ca93ffa79d6fb8658d1d0f3581f91c229b737e0 100644 +index 6630b0643c4cbb85ab47dc269d10cc4e85846985..84802e09d5db2d1d76118e2a1967608072e77cd5 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -593,6 +593,11 @@ +@@ -595,6 +595,11 @@ "includes": [3860], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index 1db2b31af0e2..21a84d7ae26c 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -6,12 +6,12 @@ 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 27cf4bb38f8d902927338e29e6e57c688eb77172..1f774f243324211f1e786bd78b857666661f69b6 100644 +index 9249f88e3234d0c11fe870169fc3fe8ce3c00ff1..7c4261f06c74f13d29b4cb2d2e3c047bf319b7f0 100644 --- a/build/config/linux/gtk/BUILD.gn +++ b/build/config/linux/gtk/BUILD.gn -@@ -25,6 +25,8 @@ group("gtk") { - # This is the only target in Chrome that should depend on GTK. - "//chrome/browser/ui/gtk:*", +@@ -28,6 +28,8 @@ group("gtk") { + # This should probably be moved into //ui/gtk. + "//ui/ozone/platform/wayland", + "//electron:*", + diff --git a/patches/chromium/mas-cgdisplayusesforcetogray.patch b/patches/chromium/mas-cgdisplayusesforcetogray.patch index 4516a8896825..ba87bb4c247f 100644 --- a/patches/chromium/mas-cgdisplayusesforcetogray.patch +++ b/patches/chromium/mas-cgdisplayusesforcetogray.patch @@ -6,7 +6,7 @@ Subject: mas-cgdisplayusesforcetogray.patch Removes usage of the CGDisplayUsesForceToGray private API. diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm -index de5994300fc405fe9e63f11023230f448f6109e9..78b880cd1064dc04fc9cd357d122e52179cdd90c 100644 +index 0d64613458b5da1211b8d2f8ec3088e19af0c10d..60b0680953647b410a2a7998544689ec2bf73c47 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm @@ -133,7 +133,17 @@ Display BuildDisplayForScreen(NSScreen* screen) { diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 853162ea39dd..ba409711da86 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -117,7 +117,7 @@ index 0d8a8e14328be49407d35908bacadd92182dae31..86602419d16667ff002333f848abcd77 // Used to force the NSApplication's focused accessibility element to be the // content::BrowserAccessibilityCocoa accessibility tree when the NSView for diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index de6fb32e1ff930fbb1c778b59ba18402741c8b44..7d70d057e10ccf3301e810c8a0521d644c8e907f 100644 +index 6c8313f7e09be253528ca83727b78152a17229c8..f293a15c6145422707c22aeb5a254ad71a31900c 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -231,8 +231,10 @@ RenderWidgetHostViewMac::~RenderWidgetHostViewMac() { @@ -154,7 +154,7 @@ index de6fb32e1ff930fbb1c778b59ba18402741c8b44..7d70d057e10ccf3301e810c8a0521d64 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -1866,12 +1872,14 @@ void RenderWidgetHostViewMac::StopSpeaking() { +@@ -1870,12 +1876,14 @@ void RenderWidgetHostViewMac::StopSpeaking() { void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -170,10 +170,10 @@ index de6fb32e1ff930fbb1c778b59ba18402741c8b44..7d70d057e10ccf3301e810c8a0521d64 /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 33b8a3bb7fae6941f0aa7af47aa048ac4a932b8f..49a7edc01183813d7411494a60c8dc1569961368 100644 +index a4c47479dd8a39f467e5ea8ed3e2bb934e911973..46047665d20233d22b0c8c451a1ce375dcb2567e 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -299,6 +299,13 @@ jumbo_component("base") { +@@ -305,6 +305,13 @@ jumbo_component("base") { ] } @@ -208,10 +208,10 @@ index 2a58aebabb23443a2c11364af4988c573f3909ba..3424b6011e80e9c995519b6a8d652abd + #endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_ diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h -index 1c68117a8987463e810d0d1da5e7e598ce8fc3e1..ad29e87c00db0d34ee3a7d95469fb3fbb1aa76c2 100644 +index 06427b2009ceb2cecf39d783fd1c3477cd5e66f9..1a2cd7a0e52e6345472f29283dfe94be506a338a 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h -@@ -27,7 +27,9 @@ +@@ -29,7 +29,9 @@ #include "ui/views/window/dialog_observer.h" @class NativeWidgetMacNSWindow; @@ -221,7 +221,7 @@ index 1c68117a8987463e810d0d1da5e7e598ce8fc3e1..ad29e87c00db0d34ee3a7d95469fb3fb @class NSView; namespace remote_cocoa { -@@ -406,11 +408,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost +@@ -408,11 +410,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost mojo::AssociatedRemote remote_ns_window_remote_; diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 0369ed1bcf53..9d1174e69b84 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -50,7 +50,7 @@ index 5124b17f020849671a7f03d92bda052eff84d169..f9730f71c122965f7ce7815a1b9a7b32 // is concerned. @property(nonatomic, readonly) NSString* subrole; diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm -index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d5f902d3f 100644 +index 7249acc6d7f8f05d03e0472fed0098b3388f9da9..d9a49f856b8813cbc488fedeafe7736531da80c6 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm @@ -206,6 +206,7 @@ NSString* const @@ -124,7 +124,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d {NSAccessibilitySizeAttribute, @"size"}, {NSAccessibilitySortDirectionAttribute, @"sortDirection"}, {NSAccessibilitySubroleAttribute, @"subrole"}, -@@ -1308,6 +1320,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -1306,6 +1318,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; ax::mojom::Restriction::kDisabled]; } @@ -132,7 +132,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d // Returns a text marker that points to the last character in the document that // can be selected with VoiceOver. - (id)endTextMarker { -@@ -1318,6 +1331,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -1316,6 +1329,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0); return CreateTextMarker(position->CreatePositionAtEndOfAnchor()); } @@ -140,7 +140,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d - (NSNumber*)expanded { if (![self instanceActive]) -@@ -1467,6 +1481,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -1465,6 +1479,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return nil; } @@ -149,7 +149,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d - (NSNumber*)insertionPointLineNumber { if (![self instanceActive]) return nil; -@@ -1489,6 +1505,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -1487,6 +1503,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; caretPosition->AsTextPosition()->text_offset()); return @(std::distance(lineBreaks.begin(), iterator)); } @@ -157,7 +157,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d // Returns whether or not this node should be ignored in the // accessibility tree. -@@ -2166,6 +2183,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -2164,6 +2181,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return ret; } @@ -165,7 +165,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d - (NSString*)selectedText { if (![self instanceActive]) return nil; -@@ -2177,11 +2195,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -2175,11 +2193,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return nil; return base::SysUTF16ToNSString(range.GetText()); } @@ -179,7 +179,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d - (NSValue*)selectedTextRange { if (![self instanceActive]) return nil; -@@ -2202,12 +2222,15 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -2200,12 +2220,15 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; int selLength = range.GetText().length(); return [NSValue valueWithRange:NSMakeRange(selStart, selLength)]; } @@ -195,7 +195,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d - (NSValue*)size { if (![self instanceActive]) -@@ -2240,6 +2263,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -2238,6 +2261,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return nil; } @@ -203,7 +203,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d // Returns a text marker that points to the first character in the document that // can be selected with VoiceOver. - (id)startTextMarker { -@@ -2250,6 +2274,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -2248,6 +2272,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0); return CreateTextMarker(position->CreatePositionAtStartOfAnchor()); } @@ -211,21 +211,21 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d // Returns a subrole based upon the role. - (NSString*)subrole { -@@ -2570,11 +2595,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; - NSMutableAttributedString* attributedValue = - [[[NSMutableAttributedString alloc] initWithString:value] autorelease]; - +@@ -2573,11 +2598,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; + NSMutableAttributedString* attributedInnerText = + [[[NSMutableAttributedString alloc] + initWithString:base::SysUTF16ToNSString(innerText)] autorelease]; +#ifndef MAS_BUILD if (!_owner->IsTextOnlyObject()) { AXPlatformRange ax_range(_owner->CreatePositionAt(0), - _owner->CreatePositionAt(int{text.length()})); - AddMisspelledTextAttributes(ax_range, attributedValue); + _owner->CreatePositionAt(int{innerText.length()})); + AddMisspelledTextAttributes(ax_range, attributedInnerText); } +#endif - return [attributedValue attributedSubstringFromRange:range]; + return [attributedInnerText attributedSubstringFromRange:range]; } -@@ -2677,9 +2704,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -2681,9 +2708,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return ToBrowserAccessibilityCocoa(cell); } @@ -237,7 +237,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d BrowserAccessibilityPositionInstance position = CreatePositionFromTextMarker(parameter); if (!position->IsNullPosition()) -@@ -2990,6 +3016,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -2996,6 +3022,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return CreateTextMarker(root->CreatePositionAt(index)); } @@ -245,7 +245,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d if ([attribute isEqualToString: NSAccessibilityBoundsForRangeParameterizedAttribute]) { -@@ -3025,6 +3052,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -3031,6 +3058,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return nil; } @@ -253,7 +253,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d if ([attribute isEqualToString: NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) { -@@ -3139,6 +3167,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -3145,6 +3173,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; return @(child->GetIndexInParent()); } @@ -262,10 +262,10 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d return nil; } diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index 8e8b6b785ed6e2831f107e925c387f723f55a8fc..33324bbca5953f6f2f9d829e4c7b5d7daa3f49ea 100644 +index 9a9f6dea91cecc081010f4fd6c166921b7115a6e..c049bca40fb3b428361567b8ce3613ab7f347d67 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm -@@ -534,6 +534,7 @@ NSDictionary* BrowserAccessibilityManagerMac:: +@@ -526,6 +526,7 @@ NSDictionary* BrowserAccessibilityManagerMac:: [user_info setObject:native_focus_object forKey:NSAccessibilityTextChangeElement]; @@ -273,7 +273,7 @@ index 8e8b6b785ed6e2831f107e925c387f723f55a8fc..33324bbca5953f6f2f9d829e4c7b5d7d id selected_text = [native_focus_object selectedTextMarkerRange]; if (selected_text) { NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute = -@@ -541,6 +542,7 @@ NSDictionary* BrowserAccessibilityManagerMac:: +@@ -533,6 +534,7 @@ NSDictionary* BrowserAccessibilityManagerMac:: [user_info setObject:selected_text forKey:NSAccessibilitySelectedTextMarkerRangeAttribute]; } @@ -358,10 +358,10 @@ index 7c018cce2c2d9981c94e91e5d97cff0d37548b13..cfb0fb20c81f908caac9933b820e40e0 void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index a86080cf72d23cc6004547dfaad0e4ae65a60412..230954f574802a9692c723190cba3c8325ce1ad1 100644 +index 5acdb011a1f232569b43ba2f08a21f44b3c40151..9fca5b2e8c714308a404750cc9fc64dcaffa91cc 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn -@@ -173,6 +173,12 @@ source_set("audio") { +@@ -171,6 +171,12 @@ source_set("audio") { "mac/scoped_audio_unit.cc", "mac/scoped_audio_unit.h", ] diff --git a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch index 5bd33c1c85dd..54500017ca60 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 5e37a45a033a5a01ea70d867c4fd2f50f4fd4072..d0d646a42b3ee27f848dd0a47179e8f573e51d8f 100644 +index 65fcd744438548f65cbefc0278164f7efb244394..95a9d94838debcb64993e0a2533769d96e38dc1d 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -104,6 +104,11 @@ +@@ -106,6 +106,11 @@ #include "services/network/url_loader.h" #include "services/network/url_request_context_builder_mojo.h" @@ -22,7 +22,7 @@ index 5e37a45a033a5a01ea70d867c4fd2f50f4fd4072..d0d646a42b3ee27f848dd0a47179e8f5 #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -354,6 +359,79 @@ bool UsingBuiltinCertVerifier( +@@ -356,6 +361,79 @@ bool UsingBuiltinCertVerifier( } // namespace @@ -102,7 +102,7 @@ index 5e37a45a033a5a01ea70d867c4fd2f50f4fd4072..d0d646a42b3ee27f848dd0a47179e8f5 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -522,6 +600,13 @@ void NetworkContext::SetClient( +@@ -524,6 +602,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -116,7 +116,7 @@ index 5e37a45a033a5a01ea70d867c4fd2f50f4fd4072..d0d646a42b3ee27f848dd0a47179e8f5 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -1696,6 +1781,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1701,6 +1786,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { base::CommandLine::ForCurrentProcess(); std::unique_ptr cert_verifier; @@ -124,7 +124,7 @@ index 5e37a45a033a5a01ea70d867c4fd2f50f4fd4072..d0d646a42b3ee27f848dd0a47179e8f5 if (g_cert_verifier_for_testing) { cert_verifier = std::make_unique(); } else { -@@ -1744,8 +1830,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1749,8 +1835,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { } #endif #if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) @@ -135,7 +135,7 @@ index 5e37a45a033a5a01ea70d867c4fd2f50f4fd4072..d0d646a42b3ee27f848dd0a47179e8f5 std::make_unique( std::make_unique( UsingBuiltinCertVerifier(params_->use_builtin_cert_verifier) -@@ -1755,12 +1841,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1760,12 +1846,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { cert_net_fetcher_)))); } #endif @@ -160,7 +160,7 @@ index 5e37a45a033a5a01ea70d867c4fd2f50f4fd4072..d0d646a42b3ee27f848dd0a47179e8f5 std::unique_ptr network_delegate = std::make_unique( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 00f14ca8448be93c1d4ed91db3d68a1297adc728..9d201f1a5ef0eaf3f8b42cbb3d2593dbd068bdd6 100644 +index 1c1446dae8e341c9440ea90ca2d997535cd490c1..fccf53cd1a7188685345764c599e16d85d8ee92b 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -84,6 +84,7 @@ class DomainReliabilityMonitor; @@ -180,7 +180,7 @@ index 00f14ca8448be93c1d4ed91db3d68a1297adc728..9d201f1a5ef0eaf3f8b42cbb3d2593db void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -646,6 +649,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -652,6 +655,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::unique_ptr nss_temp_certs_cache_; #endif @@ -190,10 +190,10 @@ index 00f14ca8448be93c1d4ed91db3d68a1297adc728..9d201f1a5ef0eaf3f8b42cbb3d2593db // CertNetFetcher is not used by the current platform. scoped_refptr cert_net_fetcher_; diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 9515fe92e0b1965285435f10817cdb07286dbe5e..96ba4d67bcdefef44ecd246acb883824c9e842d6 100644 +index 02675e0ce69f815cbd59349dc5ef5ae6535b829b..44b00a1fc341de0adba9a2c908a4ce248bc02805 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -159,6 +159,17 @@ struct HttpAuthStaticNetworkContextParams { +@@ -161,6 +161,17 @@ struct HttpAuthStaticNetworkContextParams { = DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS; }; @@ -211,7 +211,7 @@ index 9515fe92e0b1965285435f10817cdb07286dbe5e..96ba4d67bcdefef44ecd246acb883824 // Parameters for constructing a network context. struct NetworkContextParams { // Name used by memory tools to identify the context. -@@ -815,6 +826,9 @@ interface NetworkContext { +@@ -826,6 +837,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 7e93d7e07c65..c7e77b5f328b 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -108,10 +108,10 @@ index 4bf25bf1fa69f7d3869369172d375e2e489e62a1..f80ef2cecc8b111dc54e109646573a59 mojo::PendingReceiver receiver); diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index a3fc1532583568cdef3e97123df549850c07088c..fe60749bfdbff9dc4336ccc11006745f2c2889c3 100644 +index 1b1724ecc28bb4f6eff8c5574be8809027cb2404..8614eb1f410b276edff4915a446dbcad20ba3cbf 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2097,7 +2097,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2108,7 +2108,7 @@ void RenderProcessHostImpl::CreateNotificationService( mojo::PendingReceiver receiver) { DCHECK_CURRENTLY_ON(BrowserThread::UI); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 05ff6512f690..fe90245efc13 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -35,7 +35,7 @@ index e9b64a823ae7e25361f37190d247af0fa6a6f68a..43fdb0ad50d2b11a1bc28aa0f358c6dd #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/color_palette.h" diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc -index baf717117f81bbf76a99c0464c7b889d6ef56e31..1a97776018375b2017e56bc787e406e67f2539b5 100644 +index 883958a432fc791824e2f94cf2bcba633ac74467..c90787bbbbcd49b278490362c72a9434deed4fb4 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc @@ -19,7 +19,7 @@ diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 4af542c3ec62..08a8c0d93cf9 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -11,7 +11,7 @@ majority of changes originally come from these PRs: This patch also fixes callback for manual user cancellation and success. diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index 33e17f0df3563726767d912fb828ab959c8ec252..780967949746cbe957cd7b3487507892b3df607c 100644 +index 2f43eab3ee4381887fa3939f70162ad6b2a41970..5c463da94b43bd3c25d893a801c80b3e196b884f 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -21,7 +21,6 @@ @@ -30,25 +30,32 @@ index 33e17f0df3563726767d912fb828ab959c8ec252..780967949746cbe957cd7b3487507892 #include "printing/print_job_constants.h" #include "printing/printed_document.h" #include "printing/printing_utils.h" -@@ -222,9 +222,14 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, +@@ -222,16 +222,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, print_backend->GetPrinterDriverInfo(printer_name)); } -- PrintingContext::Result result = -- printing_context_->UpdatePrintSettings(std::move(new_settings)); +- PrintingContext::Result result; + { + #if defined(OS_WIN) + // Blocking is needed here because Windows printer drivers are oftentimes + // not thread-safe and have to be accessed on the UI thread. + base::ScopedAllowBlocking allow_blocking; + #endif +- result = printing_context_->UpdatePrintSettings(std::move(new_settings)); ++ // Reset settings from previous print job ++ printing_context_->ResetSettings(); ++ PrintingContext::Result get_default_result = printing_context_->UseDefaultSettings(); ++ if (get_default_result == PrintingContext::Result::OK) { ++ PrintingContext::Result update_result = ++ printing_context_->UpdatePrintSettings(std::move(new_settings)); ++ GetSettingsDone(std::move(callback), update_result); ++ } + } - GetSettingsDone(std::move(callback), result); -+ // Reset settings from previous print job -+ printing_context_->ResetSettings(); -+ PrintingContext::Result get_default_result = printing_context_->UseDefaultSettings(); -+ if (get_default_result == PrintingContext::Result::OK) { -+ PrintingContext::Result update_result = -+ printing_context_->UpdatePrintSettings(std::move(new_settings)); -+ GetSettingsDone(std::move(callback), update_result); -+ } } #if defined(OS_CHROMEOS) -@@ -240,6 +245,13 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD( +@@ -247,6 +252,13 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD( void PrintJobWorker::GetSettingsDone(SettingsCallback callback, PrintingContext::Result result) { @@ -63,7 +70,7 @@ index 33e17f0df3563726767d912fb828ab959c8ec252..780967949746cbe957cd7b3487507892 } diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index f008ef9a25feda763d7a5a169aae0f47bf2dc347..b3dd9836e452947c21aa404d1c24ac10a66474ab 100644 +index f767f2234e545d58365e99b0379c3a54a04ba8f0..b6e91d146498b6f268584794bf96aca9aed9f561 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -27,10 +27,7 @@ @@ -406,10 +413,10 @@ index 3695656560c54b5aa1fb08fb5e7c17d54989c597..85ffa5704d8dea809e80b1993c7c852f // Tells the RenderFrame to switch the CSS to print media type, render every // requested page using the print preview document's frame/node, and then diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d231c12f41 100644 +index fa688145f4b5e6adb71bd1e0fcd92c90dc6d32b8..52a1d8d52da18e0173051fca9c5fe316c1c3ea77 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -41,6 +41,7 @@ +@@ -40,6 +40,7 @@ #include "printing/buildflags/buildflags.h" #include "printing/metafile_skia.h" #include "printing/printing_features.h" @@ -417,7 +424,7 @@ index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d2 #include "printing/units.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" #include "third_party/blink/public/common/frame/frame_owner_element_type.h" -@@ -1146,7 +1147,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1144,7 +1145,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { web_frame->DispatchBeforePrintEvent(); if (!weak_this) return; @@ -427,7 +434,7 @@ index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d2 if (weak_this) web_frame->DispatchAfterPrintEvent(); } -@@ -1167,7 +1169,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1165,7 +1167,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -436,7 +443,7 @@ index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d2 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > 1) return; -@@ -1181,7 +1183,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1179,7 +1181,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // If we are printing a PDF extension frame, find the plugin node and print // that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -445,7 +452,7 @@ index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d2 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1198,7 +1200,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1196,7 +1198,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { return; } Print(frame, print_preview_context_.source_node(), @@ -454,7 +461,7 @@ index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d2 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1238,6 +1240,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1236,6 +1238,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > 1) return; @@ -463,7 +470,7 @@ index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d2 print_preview_context_.OnPrintPreview(); base::UmaHistogramEnumeration(print_preview_context_.IsForArc() -@@ -1742,7 +1746,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1741,7 +1745,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { auto self = weak_ptr_factory_.GetWeakPtr(); Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -474,7 +481,7 @@ index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d2 // Check if |this| is still valid. if (!self) return; -@@ -1753,7 +1759,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1752,7 +1758,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -485,7 +492,7 @@ index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d2 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1761,7 +1769,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1760,7 +1768,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); int expected_page_count = 0; @@ -494,7 +501,7 @@ index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d2 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1781,8 +1789,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1780,8 +1788,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, PrintMsg_PrintPages_Params print_settings; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -508,7 +515,7 @@ index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d2 // Check if |this| is still valid. if (!self) return; -@@ -2017,10 +2028,23 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2016,10 +2027,23 @@ void PrintRenderFrameHelper::IPCProcessed() { base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); } @@ -535,7 +542,7 @@ index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d2 // Check if the printer returned any settings, if the settings is empty, we // can safely assume there are no printer drivers configured. So we safely // terminate. -@@ -2040,12 +2064,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { +@@ -2039,12 +2063,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { return result; } diff --git a/patches/chromium/put_back_deleted_colors_for_autofill.patch b/patches/chromium/put_back_deleted_colors_for_autofill.patch index 559e167ab145..9815987d3963 100644 --- a/patches/chromium/put_back_deleted_colors_for_autofill.patch +++ b/patches/chromium/put_back_deleted_colors_for_autofill.patch @@ -7,11 +7,11 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1652925 removed colors needed in chromium but our autofill implementation uses them. This patch can be removed if we refactor our autofill implementation to work like Chromium's. -diff --git a/chrome/browser/ui/gtk/native_theme_gtk.cc b/chrome/browser/ui/gtk/native_theme_gtk.cc -index 4edbb80f12c59b329fc00eae0be4d8f04db28147..c4f550f2d394312875823acb45356f23d03e3125 100644 ---- a/chrome/browser/ui/gtk/native_theme_gtk.cc -+++ b/chrome/browser/ui/gtk/native_theme_gtk.cc -@@ -341,6 +341,29 @@ base::Optional SkColorFromColorId( +diff --git a/ui/gtk/native_theme_gtk.cc b/ui/gtk/native_theme_gtk.cc +index 0778275f0eceb30c12a9a5164eab3435e0cf9f99..93452ce9516f8a9c8bc834d40e33a7bc1092de48 100644 +--- a/ui/gtk/native_theme_gtk.cc ++++ b/ui/gtk/native_theme_gtk.cc +@@ -353,6 +353,29 @@ base::Optional SkColorFromColorId( case ui::NativeTheme::kColorId_TableHeaderSeparator: return GetBorderColor("GtkTreeView#treeview.view GtkButton#button"); @@ -42,7 +42,7 @@ index 4edbb80f12c59b329fc00eae0be4d8f04db28147..c4f550f2d394312875823acb45356f23 // TODO(thomasanderson): Render GtkSpinner directly. case ui::NativeTheme::kColorId_ThrobberSpinningColor: diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc -index c17e1fdb8a4fb0dc2ca7528855ceb69589162f9a..92129ccd86cb20cce2c6d92d9fb79bbc6dcd2f0c 100644 +index 7724c8e30ebc768c38de32cfb34432fa88989bf3..6180eec27442f303f894bceaae5bc204500f801b 100644 --- a/ui/native_theme/common_theme.cc +++ b/ui/native_theme/common_theme.cc @@ -43,7 +43,8 @@ base::Optional GetHighContrastColor( @@ -55,7 +55,7 @@ index c17e1fdb8a4fb0dc2ca7528855ceb69589162f9a..92129ccd86cb20cce2c6d92d9fb79bbc switch (color_id) { // Dialogs case NativeTheme::kColorId_WindowBackground: -@@ -55,6 +56,14 @@ base::Optional GetDarkSchemeColor(NativeTheme::ColorId color_id) { +@@ -58,6 +59,14 @@ base::Optional GetDarkSchemeColor(NativeTheme::ColorId color_id) { case NativeTheme::kColorId_BubbleFooterBackground: return SkColorSetRGB(0x32, 0x36, 0x39); @@ -70,7 +70,7 @@ index c17e1fdb8a4fb0dc2ca7528855ceb69589162f9a..92129ccd86cb20cce2c6d92d9fb79bbc // FocusableBorder case NativeTheme::kColorId_FocusedBorderColor: return SkColorSetA(gfx::kGoogleBlue300, 0x4D); -@@ -461,6 +470,18 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id, +@@ -505,6 +514,18 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id, case NativeTheme::kColorId_UnfocusedBorderColor: return gfx::kGoogleGrey300; @@ -89,7 +89,7 @@ index c17e1fdb8a4fb0dc2ca7528855ceb69589162f9a..92129ccd86cb20cce2c6d92d9fb79bbc // Material spinner/throbber case NativeTheme::kColorId_ThrobberSpinningColor: return gfx::kGoogleBlue600; -@@ -520,7 +541,7 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id, +@@ -570,7 +591,7 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id, } if (color_scheme == NativeTheme::ColorScheme::kDark) { @@ -99,10 +99,10 @@ index c17e1fdb8a4fb0dc2ca7528855ceb69589162f9a..92129ccd86cb20cce2c6d92d9fb79bbc return color.value(); } diff --git a/ui/native_theme/native_theme_color_id.h b/ui/native_theme/native_theme_color_id.h -index 19b7c255b89dabbd263b1f583dd9b5dfa64015c3..b8be61106014bb0611111ea522108afa4ba6b914 100644 +index d885e3c3f9f37a16f7ec1706c05ac3b13053625c..828ec82abd4666a94be25851aa623187914e67f2 100644 --- a/ui/native_theme/native_theme_color_id.h +++ b/ui/native_theme/native_theme_color_id.h -@@ -118,6 +118,11 @@ +@@ -132,6 +132,11 @@ OP(kColorId_TableHeaderText), \ OP(kColorId_TableHeaderBackground), \ OP(kColorId_TableHeaderSeparator), \ @@ -115,10 +115,10 @@ index 19b7c255b89dabbd263b1f583dd9b5dfa64015c3..b8be61106014bb0611111ea522108afa OP(kColorId_ThrobberSpinningColor), \ OP(kColorId_ThrobberWaitingColor), \ diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index f374882c8f2fc1241608e8d9dfa6abb85ae75314..7bc92ec1d15b9f5c9f867354f2768f6edc158a92 100644 +index 268031b024e68f64a8b65a93fcf19c974effb2c3..06f30fa5bfff682d8dcad39d40dc9f0076fb01f2 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc -@@ -642,6 +642,18 @@ SkColor NativeThemeWin::GetPlatformHighContrastColor(ColorId color_id) const { +@@ -643,6 +643,18 @@ base::Optional NativeThemeWin::GetPlatformHighContrastColor( case kColorId_ThrobberWaitingColor: return system_colors_[SystemThemeColor::kGrayText]; @@ -135,5 +135,5 @@ index f374882c8f2fc1241608e8d9dfa6abb85ae75314..7bc92ec1d15b9f5c9f867354f2768f6e + system_colors_[SystemThemeColor::kWindow], 0.5f); + // Button Background + case kColorId_ButtonColor: case kColorId_MenuBackgroundColor: - case kColorId_HighlightedMenuItemBackgroundColor: diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index 62f7c00ee373..6bc11d05792a 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 19c6b2e5c7053bebc77f4691ce03303f92de6d1b..f8e2b862f75732d9ec12ba9776f0bb01915b72e2 100644 +index f432ed3b53b8d5e1b365bf3e3223e95f05ccf13d..7998a818013dbd03a20bcd636221ccc567ecdfa9 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -618,6 +618,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -605,6 +605,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,7 +24,7 @@ index 19c6b2e5c7053bebc77f4691ce03303f92de6d1b..f8e2b862f75732d9ec12ba9776f0bb01 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 27133fd983546181253847d02db019913ebd35c0..1183a6ef62dd9477f49e98552a9d9a4d5638df70 100644 +index c27df0fe5497d0d7bde6d0c76508856a39ccb5c0..4be0ac35acadd38adba1d16162ff6590bb5eab36 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -23,9 +23,11 @@ @@ -61,7 +61,7 @@ index 27133fd983546181253847d02db019913ebd35c0..1183a6ef62dd9477f49e98552a9d9a4d // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. gfx::PointF TransformPointToRootCoordSpaceF( -@@ -319,6 +326,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -308,6 +315,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase virtual void ProcessGestureEvent(const blink::WebGestureEvent& event, const ui::LatencyInfo& latency); diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index 469d34979f84..973fea4da13d 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -10,7 +10,7 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`. Additionally, disables usage of some private APIs in MAS builds. 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 c242af13bdf58b1c830781badaf27aadc3c0179b..2ba56a1951c7a1a76c5a6ecef1d04235d49451d8 100644 +index c7fb942367100b7a371d8941c73fc608a1a39435..ab0e620e824e0a0df93b12d2ff42cc1937812fd3 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 @@ -154,6 +154,11 @@ void ExtractUnderlines(NSAttributedString* string, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 81f1b20cb6d0..6613c5c30f94 100644 --- a/patches/chromium/resource_file_conflict.patch +++ b/patches/chromium/resource_file_conflict.patch @@ -52,7 +52,7 @@ 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 dc1faa8f3a75fa958201372f2df674c44a94b4e0..747b64ca6140ec2baae32119ad3f934abeaeeff2 100644 +index d113eedf7afc704b0c2e8d112413e3bd7c58d8c7..fcd838d69b23e6799702353a551a0a7ac5c4ae15 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -1470,7 +1470,7 @@ if (is_chrome_branded && !is_android) { diff --git a/patches/chromium/revert_cleanup_remove_menu_subtitles_sublabels.patch b/patches/chromium/revert_cleanup_remove_menu_subtitles_sublabels.patch index db89f2e73392..c3d47005d11b 100644 --- a/patches/chromium/revert_cleanup_remove_menu_subtitles_sublabels.patch +++ b/patches/chromium/revert_cleanup_remove_menu_subtitles_sublabels.patch @@ -112,33 +112,35 @@ index a258d038da4a2bbfc6ec13c250781166235c1fbc..f6dbaa19cdb8938204c3452622589708 + EXPECT_EQ(7, changed_count()); } diff --git a/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc b/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc -index 326fe5abe680051a393c49ecbbdb07354ee16191..b80baf9290c054a3f254b73b4ed82f785c02b4b1 100644 +index 331f33660d682c14f7c5d096d8d1241d3670f4ee..a1699d1bd23f3dc1e063bd1dc3f2818c543f40c2 100644 --- a/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc +++ b/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc -@@ -91,8 +91,8 @@ class MenuItemViewTestInsert : public MenuTestBase { +@@ -92,8 +92,9 @@ class MenuItemViewTestInsert : public MenuTestBase { inserted_item_ = menu()->AddMenuItemAt( INSERT_INDEX, 1000, ASCIIToUTF16("inserted item"), base::string16(), -- nullptr, gfx::ImageSkia(), nullptr, views::MenuItemView::Type::kNormal, -- ui::NORMAL_SEPARATOR); -+ base::string16(), nullptr, gfx::ImageSkia(), nullptr, -+ views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR); +- ui::ThemedVectorIcon(), gfx::ImageSkia(), ui::ThemedVectorIcon(), +- views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR); ++ base::string16(), ui::ThemedVectorIcon(), gfx::ImageSkia(), ++ ui::ThemedVectorIcon(), views::MenuItemView::Type::kNormal, ++ ui::NORMAL_SEPARATOR); ASSERT_TRUE(inserted_item_); menu()->ChildrenChanged(); -@@ -186,8 +186,8 @@ class MenuItemViewTestInsertWithSubmenu : public MenuTestBase { +@@ -187,7 +188,11 @@ class MenuItemViewTestInsertWithSubmenu : public MenuTestBase { void Step2() { inserted_item_ = menu()->AddMenuItemAt( INSERT_INDEX, 1000, ASCIIToUTF16("inserted item"), base::string16(), -- nullptr, gfx::ImageSkia(), nullptr, views::MenuItemView::Type::kNormal, -- ui::NORMAL_SEPARATOR); ++<<<<<<< HEAD + ui::ThemedVectorIcon(), gfx::ImageSkia(), ui::ThemedVectorIcon(), ++======= + base::string16(), nullptr, gfx::ImageSkia(), nullptr, -+ views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR); ++>>>>>>> Revert "Cleanup: Remove Menu Subtitles/Sublabels" + views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR); ASSERT_TRUE(inserted_item_); menu()->ChildrenChanged(); - diff --git a/chrome/browser/ui/views/status_icons/concat_menu_model.cc b/chrome/browser/ui/views/status_icons/concat_menu_model.cc -index ead2226583589c2921db7a0d5e97dc6388c49b6c..d537405caad6c30af0f48a168a17252756250e46 100644 +index c6fb2f029c87391e13a9c05fe6c8f3f6e0b82779..5bf9acfa5c5ec08144b3e9e290fd19f15d307a8f 100644 --- a/chrome/browser/ui/views/status_icons/concat_menu_model.cc +++ b/chrome/browser/ui/views/status_icons/concat_menu_model.cc @@ -33,6 +33,10 @@ base::string16 ConcatMenuModel::GetLabelAt(int index) const { @@ -153,22 +155,22 @@ index ead2226583589c2921db7a0d5e97dc6388c49b6c..d537405caad6c30af0f48a168a172527 return GetterImpl(&ui::MenuModel::GetMinorTextAt, index); } diff --git a/chrome/browser/ui/views/status_icons/concat_menu_model.h b/chrome/browser/ui/views/status_icons/concat_menu_model.h -index 0ad30d57d6d13bc8d42920010145595ce0031573..7b73b5753cfd4595121e5b81fd3c95682869e17b 100644 +index bad06f01f90b2ecfec3e7478034dde83ef643e53..c4414b8cb67f99dc4b1e4ed9088204f660a63098 100644 --- a/chrome/browser/ui/views/status_icons/concat_menu_model.h +++ b/chrome/browser/ui/views/status_icons/concat_menu_model.h -@@ -23,6 +23,7 @@ class ConcatMenuModel : public ui::MenuModel { +@@ -24,6 +24,7 @@ class ConcatMenuModel : public ui::MenuModel { ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override; int GetCommandIdAt(int index) const override; base::string16 GetLabelAt(int index) const override; + base::string16 GetSublabelAt(int index) const override; base::string16 GetMinorTextAt(int index) const override; - const gfx::VectorIcon* GetMinorIconAt(int index) const override; + ui::ImageModel GetMinorIconAt(int index) const override; bool IsItemDynamicAt(int index) const override; diff --git a/ui/base/models/menu_model.cc b/ui/base/models/menu_model.cc -index 73f0ab6d84d2cab6732866a6dc4b781faf630c0e..3319d058e8303066e0159d02d27ee2e8a46b38ec 100644 +index 90a350cf9ce045b1f920ff58d84cd9a32ab4b267..e31b71712591e54a33f93d7a1e44353a8a36ffaa 100644 --- a/ui/base/models/menu_model.cc +++ b/ui/base/models/menu_model.cc -@@ -46,6 +46,10 @@ bool MenuModel::GetModelAndIndexForCommandId(int command_id, +@@ -48,6 +48,10 @@ bool MenuModel::GetModelAndIndexForCommandId(int command_id, return false; } @@ -180,10 +182,10 @@ index 73f0ab6d84d2cab6732866a6dc4b781faf630c0e..3319d058e8303066e0159d02d27ee2e8 return base::string16(); } diff --git a/ui/base/models/menu_model.h b/ui/base/models/menu_model.h -index 5bcc6204c2b579fb2cba47ba1bc156967ec87faf..34e647d56dfe583a3484fb8df0a148064eacb07b 100644 +index 887eee64e27f7437be2b308c1d74b0ea49efc745..340109357fb9840744f231d583722f369fa885d7 100644 --- a/ui/base/models/menu_model.h +++ b/ui/base/models/menu_model.h -@@ -67,6 +67,10 @@ class UI_BASE_EXPORT MenuModel : public base::SupportsWeakPtr { +@@ -65,6 +65,10 @@ class UI_BASE_EXPORT MenuModel : public base::SupportsWeakPtr { // Returns the label of the item at the specified index. virtual base::string16 GetLabelAt(int index) const = 0; @@ -195,10 +197,10 @@ index 5bcc6204c2b579fb2cba47ba1bc156967ec87faf..34e647d56dfe583a3484fb8df0a14806 // is rendered to the right of the label and using the font GetLabelFontAt(). virtual base::string16 GetMinorTextAt(int index) const; diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc -index 6a55c0f82ce3df3d8b2b31dbb67830bb5464019c..c42dee1fc9ddccf5b5556fff7282a64d14c8333d 100644 +index 6f7faa95a656e28082c9741df7c00e402b589897..cec830de8e0953e211091ad17cc80a423c95453e 100644 --- a/ui/base/models/simple_menu_model.cc +++ b/ui/base/models/simple_menu_model.cc -@@ -46,6 +46,16 @@ base::string16 SimpleMenuModel::Delegate::GetLabelForCommandId( +@@ -49,6 +49,16 @@ base::string16 SimpleMenuModel::Delegate::GetLabelForCommandId( return base::string16(); } @@ -215,7 +217,7 @@ index 6a55c0f82ce3df3d8b2b31dbb67830bb5464019c..c42dee1fc9ddccf5b5556fff7282a64d bool SimpleMenuModel::Delegate::GetIconForCommandId( int command_id, gfx::Image* image_skia) const { return false; -@@ -404,6 +414,12 @@ base::string16 SimpleMenuModel::GetLabelAt(int index) const { +@@ -371,6 +381,12 @@ base::string16 SimpleMenuModel::GetLabelAt(int index) const { return items_[ValidateItemIndex(index)].label; } @@ -229,10 +231,10 @@ index 6a55c0f82ce3df3d8b2b31dbb67830bb5464019c..c42dee1fc9ddccf5b5556fff7282a64d return items_[ValidateItemIndex(index)].minor_text; } diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h -index 1ae8909a1404a43b34b9ef585511c7a3de39fa28..0d2a74ab5e9d55201a4992d81aecf9c2a83af5b8 100644 +index a6ae50505af98383dc63ebb111c5a3724620913b..a3daaf80675a8267e3de14b8184b68fd541c59e8 100644 --- a/ui/base/models/simple_menu_model.h +++ b/ui/base/models/simple_menu_model.h -@@ -47,6 +47,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel { +@@ -48,6 +48,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel { // Some command ids have labels and icons that change over time. virtual bool IsItemForCommandIdDynamic(int command_id) const; virtual base::string16 GetLabelForCommandId(int command_id) const; @@ -240,7 +242,7 @@ index 1ae8909a1404a43b34b9ef585511c7a3de39fa28..0d2a74ab5e9d55201a4992d81aecf9c2 // Gets the icon for the item with the specified id, returning true if there // is an icon, false otherwise. virtual bool GetIconForCommandId(int command_id, -@@ -174,6 +175,9 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel { +@@ -158,6 +159,9 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel { // Sets the label for the item at |index|. void SetLabel(int index, const base::string16& label); @@ -250,43 +252,43 @@ index 1ae8909a1404a43b34b9ef585511c7a3de39fa28..0d2a74ab5e9d55201a4992d81aecf9c2 // Sets the minor text for the item at |index|. void SetMinorText(int index, const base::string16& minor_text); -@@ -200,6 +204,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel { +@@ -184,6 +188,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel { ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override; int GetCommandIdAt(int index) const override; base::string16 GetLabelAt(int index) const override; + base::string16 GetSublabelAt(int index) const override; base::string16 GetMinorTextAt(int index) const override; - const gfx::VectorIcon* GetMinorIconAt(int index) const override; + ImageModel GetMinorIconAt(int index) const override; bool IsItemDynamicAt(int index) const override; -@@ -235,6 +240,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel { +@@ -218,6 +223,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel { int command_id = 0; ItemType type = TYPE_COMMAND; base::string16 label; + base::string16 sublabel; base::string16 minor_text; - const gfx::VectorIcon* minor_icon = nullptr; - gfx::Image icon; + ImageModel minor_icon; + ImageModel icon; diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc -index c1cf9c128799d37dc69a61ca1d6bef55b3b3a660..7e32555cbd3f35f305a9686e118d3b7e0f5cdb15 100644 +index 6f45e5ac5d1cec52f6f9a434c06cd894a788e421..2167b02facb30fcff40a166038e093fc7855bf49 100644 --- a/ui/views/controls/menu/menu_item_view.cc +++ b/ui/views/controls/menu/menu_item_view.cc -@@ -279,6 +279,7 @@ MenuItemView* MenuItemView::AddMenuItemAt( +@@ -261,6 +261,7 @@ MenuItemView* MenuItemView::AddMenuItemAt( int index, int item_id, const base::string16& label, + const base::string16& sublabel, const base::string16& minor_text, - const gfx::VectorIcon* minor_icon, + const ui::ThemedVectorIcon& minor_icon, const gfx::ImageSkia& icon, -@@ -299,6 +300,7 @@ MenuItemView* MenuItemView::AddMenuItemAt( +@@ -282,6 +283,7 @@ MenuItemView* MenuItemView::AddMenuItemAt( item->SetTitle(GetDelegate()->GetLabel(item_id)); else item->SetTitle(label); + item->SetSubtitle(sublabel); item->SetMinorText(minor_text); item->SetMinorIcon(minor_icon); - if (vector_icon) { -@@ -340,21 +342,22 @@ void MenuItemView::RemoveAllMenuItems() { + if (!vector_icon.empty()) { +@@ -322,21 +324,22 @@ void MenuItemView::RemoveAllMenuItems() { MenuItemView* MenuItemView::AppendMenuItem(int item_id, const base::string16& label, const gfx::ImageSkia& icon) { @@ -309,10 +311,10 @@ index c1cf9c128799d37dc69a61ca1d6bef55b3b3a660..7e32555cbd3f35f305a9686e118d3b7e void MenuItemView::AddSeparatorAt(int index) { AddMenuItemAt(index, /*item_id=*/0, /*label=*/base::string16(), + /*sub_label=*/base::string16(), - /*minor_text=*/base::string16(), /*minor_icon=*/nullptr, - /*icon=*/gfx::ImageSkia(), /*vector_icon=*/nullptr, - /*type=*/Type::kSeparator, -@@ -363,10 +366,11 @@ void MenuItemView::AddSeparatorAt(int index) { + /*minor_text=*/base::string16(), + /*minor_icon=*/ui::ThemedVectorIcon(), + /*icon=*/gfx::ImageSkia(), +@@ -347,10 +350,11 @@ void MenuItemView::AddSeparatorAt(int index) { MenuItemView* MenuItemView::AppendMenuItemImpl(int item_id, const base::string16& label, @@ -320,12 +322,12 @@ index c1cf9c128799d37dc69a61ca1d6bef55b3b3a660..7e32555cbd3f35f305a9686e118d3b7e const gfx::ImageSkia& icon, Type type) { const int index = submenu_ ? int{submenu_->children().size()} : 0; -- return AddMenuItemAt(index, item_id, label, base::string16(), nullptr, icon, -+ return AddMenuItemAt(index, item_id, label, sublabel, base::string16(), nullptr, icon, - nullptr, type, ui::NORMAL_SEPARATOR); +- return AddMenuItemAt(index, item_id, label, base::string16(), ++ return AddMenuItemAt(index, item_id, label, sublabel, base::string16(), + ui::ThemedVectorIcon(), icon, ui::ThemedVectorIcon(), + type, ui::NORMAL_SEPARATOR); } - -@@ -399,6 +403,11 @@ void MenuItemView::SetTitle(const base::string16& title) { +@@ -383,6 +387,11 @@ void MenuItemView::SetTitle(const base::string16& title) { invalidate_dimensions(); // Triggers preferred size recalculation. } @@ -337,7 +339,7 @@ index c1cf9c128799d37dc69a61ca1d6bef55b3b3a660..7e32555cbd3f35f305a9686e118d3b7e void MenuItemView::SetMinorText(const base::string16& minor_text) { minor_text_ = minor_text; invalidate_dimensions(); // Triggers preferred size recalculation. -@@ -989,13 +998,23 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { +@@ -937,13 +946,23 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { (!delegate || delegate->ShouldReserveSpaceForSubmenuIndicator() ? item_right_margin_ : config.arrow_to_edge_padding); @@ -362,7 +364,7 @@ index c1cf9c128799d37dc69a61ca1d6bef55b3b3a660..7e32555cbd3f35f305a9686e118d3b7e PaintMinorIconAndText(canvas, style); // Set the submenu indicator (arrow) image and color. -@@ -1247,15 +1266,20 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const { +@@ -1195,15 +1214,20 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const { // Determine the length of the label text. int string_width = gfx::GetStringWidth(title_, style.font_list); @@ -387,18 +389,18 @@ index c1cf9c128799d37dc69a61ca1d6bef55b3b3a660..7e32555cbd3f35f305a9686e118d3b7e std::max(dimensions.height, MenuConfig::instance().item_min_height); diff --git a/ui/views/controls/menu/menu_item_view.h b/ui/views/controls/menu/menu_item_view.h -index 294b0ea5d2bf28a41a1ae5e114d6e68936b958a9..ae97f8d3bb4b94ea89957cb761ee63ffab78b26a 100644 +index b38a048c22e6f89dfc02d7bda2ed053519a80e29..2db46616cb9a443d6fd280947e5a2673f9ca670c 100644 --- a/ui/views/controls/menu/menu_item_view.h +++ b/ui/views/controls/menu/menu_item_view.h -@@ -153,6 +153,7 @@ class VIEWS_EXPORT MenuItemView : public View { +@@ -148,6 +148,7 @@ class VIEWS_EXPORT MenuItemView : public View { MenuItemView* AddMenuItemAt(int index, int item_id, const base::string16& label, + const base::string16& sublabel, const base::string16& minor_text, - const gfx::VectorIcon* minor_icon, + const ui::ThemedVectorIcon& minor_icon, const gfx::ImageSkia& icon, -@@ -195,6 +196,7 @@ class VIEWS_EXPORT MenuItemView : public View { +@@ -190,6 +191,7 @@ class VIEWS_EXPORT MenuItemView : public View { // All the AppendXXX methods funnel into this. MenuItemView* AppendMenuItemImpl(int item_id, const base::string16& label, @@ -406,7 +408,7 @@ index 294b0ea5d2bf28a41a1ae5e114d6e68936b958a9..ae97f8d3bb4b94ea89957cb761ee63ff const gfx::ImageSkia& icon, Type type); -@@ -219,6 +221,9 @@ class VIEWS_EXPORT MenuItemView : public View { +@@ -214,6 +216,9 @@ class VIEWS_EXPORT MenuItemView : public View { void SetTitle(const base::string16& title); const base::string16& title() const { return title_; } @@ -416,7 +418,7 @@ index 294b0ea5d2bf28a41a1ae5e114d6e68936b958a9..ae97f8d3bb4b94ea89957cb761ee63ff // Sets the minor text. void SetMinorText(const base::string16& minor_text); -@@ -427,7 +432,7 @@ class VIEWS_EXPORT MenuItemView : public View { +@@ -420,7 +425,7 @@ class VIEWS_EXPORT MenuItemView : public View { void DestroyAllMenuHosts(); // Returns the text that should be displayed on the end (right) of the menu @@ -425,7 +427,7 @@ index 294b0ea5d2bf28a41a1ae5e114d6e68936b958a9..ae97f8d3bb4b94ea89957cb761ee63ff base::string16 GetMinorText() const; // Returns the icon that should be displayed to the left of the minor text. -@@ -518,6 +523,9 @@ class VIEWS_EXPORT MenuItemView : public View { +@@ -511,6 +516,9 @@ class VIEWS_EXPORT MenuItemView : public View { // Title. base::string16 title_; @@ -436,46 +438,41 @@ index 294b0ea5d2bf28a41a1ae5e114d6e68936b958a9..ae97f8d3bb4b94ea89957cb761ee63ff base::string16 minor_text_; diff --git a/ui/views/controls/menu/menu_item_view_unittest.cc b/ui/views/controls/menu/menu_item_view_unittest.cc -index 6b5229578e0856a07c85db7d5eb36ffee812cef8..3d90eefa5345f4dc8563dfcefb2ee1376dd668d3 100644 +index 119aa4a49c32c2cb14832fd88a520e8645b732bd..e1f99e1fc7a3e42173250f5980a35378867ab298 100644 --- a/ui/views/controls/menu/menu_item_view_unittest.cc +++ b/ui/views/controls/menu/menu_item_view_unittest.cc -@@ -322,10 +322,10 @@ class MenuItemViewPaintUnitTest : public ViewsTestBase { - // Provides assertion coverage for painting minor text and icons. +@@ -324,8 +324,8 @@ class MenuItemViewPaintUnitTest : public ViewsTestBase { TEST_F(MenuItemViewPaintUnitTest, MinorTextAndIconAssertionCoverage) { auto AddItem = [this](auto label, auto minor_label, auto minor_icon) { -- menu_item_view()->AddMenuItemAt(0, 1000, base::ASCIIToUTF16(label), -- minor_label, minor_icon, gfx::ImageSkia(), -- nullptr, views::MenuItemView::Type::kNormal, -- ui::NORMAL_SEPARATOR); -+ menu_item_view()->AddMenuItemAt( + menu_item_view()->AddMenuItemAt( +- 0, 1000, base::ASCIIToUTF16(label), minor_label, minor_icon, +- gfx::ImageSkia(), ui::ThemedVectorIcon(), + 0, 1000, base::ASCIIToUTF16(label), base::string16(), minor_label, -+ minor_icon, gfx::ImageSkia(), nullptr, views::MenuItemView::Type::kNormal, -+ ui::NORMAL_SEPARATOR); ++ minor_icon, gfx::ImageSkia(), ui::ThemedVectorIcon(), + views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR); }; - AddItem("No minor content", base::string16(), nullptr); - AddItem("Minor text only", base::ASCIIToUTF16("minor text"), nullptr); + AddItem("No minor content", base::string16(), ui::ThemedVectorIcon()); diff --git a/ui/views/controls/menu/menu_model_adapter.cc b/ui/views/controls/menu/menu_model_adapter.cc -index 373ea41937feea562ed25dbcb8c1ad6546beecb5..7307ac7b82b6432343c404d19cf0cdd60557d3d5 100644 +index cbf9288765ade430451251f8f266975b2047828d..2aea7766d807120866872cbd7fa17776259f30b8 100644 --- a/ui/views/controls/menu/menu_model_adapter.cc +++ b/ui/views/controls/menu/menu_model_adapter.cc -@@ -99,8 +99,8 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model, +@@ -99,8 +99,9 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model, if (*type == MenuItemView::Type::kSeparator) { return menu->AddMenuItemAt(menu_index, item_id, base::string16(), -- base::string16(), nullptr, gfx::ImageSkia(), -- nullptr, *type, -+ base::string16(), base::string16(), nullptr, -+ gfx::ImageSkia(), nullptr, *type, +- base::string16(), ui::ThemedVectorIcon(), +- gfx::ImageSkia(), ui::ThemedVectorIcon(), *type, ++ base::string16(), base::string16(), ++ ui::ThemedVectorIcon(), gfx::ImageSkia(), ++ ui::ThemedVectorIcon(), *type, model->GetSeparatorTypeAt(model_index)); } -@@ -108,7 +108,8 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model, - model->GetIconAt(model_index, &icon); +@@ -108,6 +109,7 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model, + ui::ImageModel minor_icon = model->GetMinorIconAt(model_index); return menu->AddMenuItemAt( menu_index, item_id, model->GetLabelAt(model_index), -- model->GetMinorTextAt(model_index), model->GetMinorIconAt(model_index), -+ model->GetSublabelAt(model_index), model->GetMinorTextAt(model_index), -+ model->GetMinorIconAt(model_index), - icon.IsEmpty() ? gfx::ImageSkia() : *icon.ToImageSkia(), - icon.IsEmpty() ? model->GetVectorIconAt(model_index) : nullptr, *type, - ui::NORMAL_SEPARATOR); ++ model->GetSublabelAt(model_index), + model->GetMinorTextAt(model_index), + minor_icon.IsVectorIcon() + ? ui::ThemedVectorIcon(minor_icon.GetVectorIcon()) diff --git a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch index 978d6faa789d..00032f841f46 100644 --- a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch +++ b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch @@ -9,10 +9,10 @@ for every navigation to keep Node.js working properly. Once Native Modules in th are required to be NAPI or context aware (Electron v11), this patch can be removed. diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc -index 42383cda5a9ccb39e64ee65d0202bee60639623f..c9099e58ba6f552a83a7994529c7999e4e22cd07 100644 +index 6dd8726c5576ec23e4966f564d07f5df59e30ff5..adca28e96b974536bc1ad8791c80ef6e25747c29 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -1272,6 +1272,25 @@ bool ChromeContentRendererClient::AllowPopup() { +@@ -1281,6 +1281,25 @@ bool ChromeContentRendererClient::AllowPopup() { #endif } @@ -39,7 +39,7 @@ index 42383cda5a9ccb39e64ee65d0202bee60639623f..c9099e58ba6f552a83a7994529c7999e WebLocalFrame* frame, ui::PageTransition transition_type, diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h -index 8969adb44800e925c9066e51793463c09eb78622..d11a4fdf04f7632fb1191c28c83f1d66ce0e5bf2 100644 +index 77cf178fd26bb6abd4666ccb4b0c5eea4dff3413..68bc006ef8aa3e39e9e2131782611f9b06e22197 100644 --- a/chrome/renderer/chrome_content_renderer_client.h +++ b/chrome/renderer/chrome_content_renderer_client.h @@ -126,6 +126,11 @@ class ChromeContentRendererClient @@ -55,10 +55,10 @@ index 8969adb44800e925c9066e51793463c09eb78622..d11a4fdf04f7632fb1191c28c83f1d66 ui::PageTransition transition_type, const blink::WebURL& url, diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc -index c4c0e27127ff2976db4e78cf5a02bd22d1c667d3..a4318511d1081d4f101cb2f18ca5fa200fb9773c 100644 +index 045b6ccd9b75baa6d48e262adba9986599e4a79a..1b42aaa81ec0963ade99533c6cff8410bac32992 100644 --- a/content/public/renderer/content_renderer_client.cc +++ b/content/public/renderer/content_renderer_client.cc -@@ -104,6 +104,14 @@ bool ContentRendererClient::HandleNavigation( +@@ -105,6 +105,14 @@ bool ContentRendererClient::HandleNavigation( } #endif @@ -74,10 +74,10 @@ index c4c0e27127ff2976db4e78cf5a02bd22d1c667d3..a4318511d1081d4f101cb2f18ca5fa20 blink::WebLocalFrame* frame, ui::PageTransition transition_type, diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index ee2079537feb23869fe4f812bcef33e1d7de29a7..93287ae0928b52f9df34834ad1a8ef0e54367882 100644 +index bb990768e528ae66b340402084e9785eb1deb132..5e73a1cc9d3c35e7e69ac4ae1cbe7c20d399613e 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -213,6 +213,13 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -217,6 +217,13 @@ class CONTENT_EXPORT ContentRendererClient { bool is_redirect); #endif @@ -92,10 +92,10 @@ index ee2079537feb23869fe4f812bcef33e1d7de29a7..93287ae0928b52f9df34834ad1a8ef0e // |url|. If the function returns a valid |new_url|, the request must be // updated to use it. The |attach_same_site_cookies| output parameter diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index f15855248d6b7d2ff79d808aacc9dde158428cc8..69a7700c52c9ae3b70908dc55da1d31b98b05d0f 100644 +index 98fdc44b00c641992b194629f73072da7e5d1b17..80e283d18261f4a9676acd291fc5296467bdbb98 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -5683,6 +5683,23 @@ void RenderFrameImpl::BeginNavigation( +@@ -5695,6 +5695,23 @@ void RenderFrameImpl::BeginNavigation( int cumulative_bindings = RenderProcess::current()->GetEnabledBindings(); bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) || (cumulative_bindings & kWebUIBindingsPolicyMask); diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 8ab96dda83ea..13ff54a1e665 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 bb9c821d210e0ddb55c0f97f837e5d7500d17d64..08dee90fc0c0dfe10c9b563e073f5abc9cb38937 100644 +index 2a1d7e608cdceea9a658bbbb81f9e49c2f02d54c..36dee183a1abfe51435a8cb212addb59b030e8ff 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1351,7 +1351,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() { +@@ -1346,7 +1346,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/ssl_security_state_tab_helper.patch b/patches/chromium/ssl_security_state_tab_helper.patch index ecfa32b8bbfc..b2bf0a2afa08 100644 --- a/patches/chromium/ssl_security_state_tab_helper.patch +++ b/patches/chromium/ssl_security_state_tab_helper.patch @@ -6,7 +6,7 @@ Subject: ssl_security_state_tab_helper.patch Allows populating security tab info for devtools in Electron. diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc -index 02cfe5551f579c83b5e0d015566681704ce31e3f..779f33c17972f892e1086d1e65fb8071d7acb15f 100644 +index fd1815d4ad902bc5430fcf54297acb2262ae913a..1e56f099a8887e8aa8c542fae596455478691428 100644 --- a/chrome/browser/ssl/security_state_tab_helper.cc +++ b/chrome/browser/ssl/security_state_tab_helper.cc @@ -13,22 +13,26 @@ @@ -73,7 +73,7 @@ index 02cfe5551f579c83b5e0d015566681704ce31e3f..779f33c17972f892e1086d1e65fb8071 SecurityStateTabHelper::SecurityStateTabHelper( content::WebContents* web_contents) -@@ -162,6 +170,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() { +@@ -165,6 +173,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() { // information is still being initialized, thus no need to check for that. state->malicious_content_status = GetMaliciousContentStatus(); @@ -81,7 +81,7 @@ index 02cfe5551f579c83b5e0d015566681704ce31e3f..779f33c17972f892e1086d1e65fb8071 ReputationWebContentsObserver* reputation_web_contents_observer = ReputationWebContentsObserver::FromWebContents(web_contents()); state->safety_tip_info = -@@ -179,6 +188,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() { +@@ -182,6 +191,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() { security_state::prefs::kStricterMixedContentTreatmentEnabled)) { state->should_suppress_mixed_content_warning = true; } @@ -89,7 +89,7 @@ index 02cfe5551f579c83b5e0d015566681704ce31e3f..779f33c17972f892e1086d1e65fb8071 return state; } -@@ -229,8 +239,10 @@ void SecurityStateTabHelper::DidFinishNavigation( +@@ -245,8 +255,10 @@ void SecurityStateTabHelper::DidFinishNavigation( UMA_HISTOGRAM_BOOLEAN("interstitial.ssl.visited_site_after_warning", true); } @@ -100,7 +100,7 @@ index 02cfe5551f579c83b5e0d015566681704ce31e3f..779f33c17972f892e1086d1e65fb8071 } void SecurityStateTabHelper::DidChangeVisibleSecurityState() { -@@ -254,6 +266,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const { +@@ -270,6 +282,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const { web_contents()->GetController().GetVisibleEntry(); if (!entry) return security_state::MALICIOUS_CONTENT_STATUS_NONE; @@ -108,7 +108,7 @@ index 02cfe5551f579c83b5e0d015566681704ce31e3f..779f33c17972f892e1086d1e65fb8071 safe_browsing::SafeBrowsingService* sb_service = g_browser_process->safe_browsing_service(); if (!sb_service) -@@ -336,6 +349,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const { +@@ -352,6 +365,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const { break; } } diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index c0170f817115..c10760cbc460 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 fe60749bfdbff9dc4336ccc11006745f2c2889c3..ea736817be4084f43ef5266e4a7aac3a8bdaa9d7 100644 +index 8614eb1f410b276edff4915a446dbcad20ba3cbf..d4bab5f58beaf7e9f3baae3024dbf69c4e248a41 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -413,6 +413,11 @@ class RendererSandboxedProcessLauncherDelegate +@@ -414,6 +414,11 @@ class RendererSandboxedProcessLauncherDelegate { } @@ -37,7 +37,7 @@ index fe60749bfdbff9dc4336ccc11006745f2c2889c3..ea736817be4084f43ef5266e4a7aac3a ~RendererSandboxedProcessLauncherDelegate() override {} #if defined(OS_WIN) -@@ -434,6 +439,9 @@ class RendererSandboxedProcessLauncherDelegate +@@ -435,6 +440,9 @@ class RendererSandboxedProcessLauncherDelegate #if BUILDFLAG(USE_ZYGOTE_HANDLE) service_manager::ZygoteHandle GetZygote() override { @@ -47,7 +47,7 @@ index fe60749bfdbff9dc4336ccc11006745f2c2889c3..ea736817be4084f43ef5266e4a7aac3a const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); base::CommandLine::StringType renderer_prefix = -@@ -448,10 +456,13 @@ class RendererSandboxedProcessLauncherDelegate +@@ -449,10 +457,13 @@ class RendererSandboxedProcessLauncherDelegate return service_manager::SandboxType::kRenderer; } @@ -62,7 +62,7 @@ index fe60749bfdbff9dc4336ccc11006745f2c2889c3..ea736817be4084f43ef5266e4a7aac3a }; const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey"; -@@ -1819,11 +1830,18 @@ bool RenderProcessHostImpl::Init() { +@@ -1820,11 +1831,18 @@ bool RenderProcessHostImpl::Init() { cmd_line->PrependWrapper(renderer_prefix); AppendRendererCommandLine(cmd_line.get()); diff --git a/patches/chromium/ui_gtk_public_header.patch b/patches/chromium/ui_gtk_public_header.patch new file mode 100644 index 000000000000..ca1822005629 --- /dev/null +++ b/patches/chromium/ui_gtk_public_header.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Fri, 10 Apr 2020 17:47:18 -0700 +Subject: ui_gtk_public_header.patch + +Allow electron to depend on //ui/gtk/gtk_util.h + +diff --git a/ui/gtk/BUILD.gn b/ui/gtk/BUILD.gn +index 2dd67393ec469b9c75761d98e729818453b6ce6b..53fc63acd371eb2efd77e9f50d60ce52b0436b59 100644 +--- a/ui/gtk/BUILD.gn ++++ b/ui/gtk/BUILD.gn +@@ -22,13 +22,15 @@ component("gtk_ui_delegate") { + } + + jumbo_component("gtk") { +- public = [ "gtk_ui.h" ] ++ public = [ ++ "gtk_ui.h", ++ "gtk_util.h", ++ ] + sources = [ + "gtk_key_bindings_handler.cc", + "gtk_key_bindings_handler.h", + "gtk_ui.cc", + "gtk_util.cc", +- "gtk_util.h", + "input_method_context_impl_gtk.cc", + "input_method_context_impl_gtk.h", + "native_theme_gtk.cc", diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 12116a3e4728..17c2e8984107 100644 --- a/patches/chromium/web_contents.patch +++ b/patches/chromium/web_contents.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Anonymous -Date: Thu, 20 Sep 2018 17:46:53 -0700 +From: deepak1556 +Date: Fri, 10 Apr 2020 15:14:49 -0700 Subject: web_contents.patch This allows overriding the RenderViewHostDelegateView of a WebContents, which @@ -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 ebe258f91f77ccbb0bb0a21ad511dce9b17f4e80..b106b4fdb7a1bbb95977a8a9e69baaefe56a4379 100644 +index d59bdb6c8a6f4c324341d7da5e7aac56b1e36f76..34f4f09d72423362415237406ae2d675b69ec1f9 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2065,6 +2065,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2070,6 +2070,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -25,7 +25,7 @@ index ebe258f91f77ccbb0bb0a21ad511dce9b17f4e80..b106b4fdb7a1bbb95977a8a9e69baaef WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2075,6 +2081,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2080,6 +2086,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -34,10 +34,10 @@ index ebe258f91f77ccbb0bb0a21ad511dce9b17f4e80..b106b4fdb7a1bbb95977a8a9e69baaef CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index cf98180740c4adaf0082e987e4b7fc482b11d348..376aaaebcb45b078c59f013437ac9baf7c9dd037 100644 +index 4133778e3945550698e1b1e01367abf6fb2351d9..f906446a8aac1705473de83503c8317f06bbb8fa 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -82,9 +82,12 @@ class BrowserPluginGuestDelegate; +@@ -83,9 +83,12 @@ class BrowserPluginGuestDelegate; class InterstitialPage; class RenderFrameHost; class RenderViewHost; @@ -50,14 +50,14 @@ index cf98180740c4adaf0082e987e4b7fc482b11d348..376aaaebcb45b078c59f013437ac9baf class WebUI; struct CustomContextMenuContext; struct DropData; -@@ -209,6 +212,10 @@ class WebContents : public PageNavigator, - kInitializeAndWarmupRendererProcess, - } desired_renderer_state; +@@ -213,6 +216,10 @@ class WebContents : public PageNavigator, + // Sandboxing flags set on the new WebContents. + network::mojom::WebSandboxFlags starting_sandbox_flags; + // Optionally specify the view and delegate view. + content::WebContentsView* view = nullptr; + content::RenderViewHostDelegateView* delegate_view = nullptr; + - // Sandboxing flags set on the new WebContents. - blink::mojom::WebSandboxFlags starting_sandbox_flags; - + // Value used to set the last time the WebContents was made active, this is + // the value that'll be returned by GetLastActiveTime(). If this is left + // default initialized then the value is not passed on to the WebContents diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 9b70366310ef..ed16763484cb 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 56062bb2680a71103d3c600697dfae03e265ef15..ee2079537feb23869fe4f812bcef33e1d7de29a7 100644 +index 9c1cc56c07694f001e8408e68d5d8e85c9e731d4..bb990768e528ae66b340402084e9785eb1deb132 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -373,6 +373,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -383,6 +383,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,10 +26,10 @@ index 56062bb2680a71103d3c600697dfae03e265ef15..ee2079537feb23869fe4f812bcef33e1 // 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 8c641e6e3a6f05a87c2a0570ae4091fe7b4a0356..a2fe4cc09ffdcdf93199c01c316a4173a6f84d32 100644 +index dc11716791faf3bbd9acaca5173e5f85d5b2a900..ca5ec13e1dceb7efa5272963a4950e86bda6ff90 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -864,6 +864,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -863,6 +863,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -67,10 +67,10 @@ index c7bc68000ad0a9b49e9638e5413e0c3e4db508b0..3edcb4715c2dd8b2cf33f093710f1481 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 c43f8b1e8f4a20ee0bf267ef78f2b067837be223..b34800d0a569b31f9ecc9c62d0e93e676eddf32d 100644 +index d11b948c6de2cbb38cf09728168218fee5c63713..d736f31425d024f28fb8be63b03ab0eeb56d354c 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -688,6 +688,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -691,6 +691,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { nested_runner_->QuitNow(); } diff --git a/patches/node/.patches b/patches/node/.patches index 34264abb7d5a..62741f9c99a6 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -42,3 +42,4 @@ fix_don_t_preparemainexecution_twice.patch avoid_calling_deprecated_method.patch remove_deprecated_wasm_module_type_check.patch weakrefs_rename_finalizationgroup_to_finalizationregistry_for_js.patch +weakrefs_split_out_finalizationregistry_cleanupsome.patch diff --git a/patches/node/weakrefs_split_out_finalizationregistry_cleanupsome.patch b/patches/node/weakrefs_split_out_finalizationregistry_cleanupsome.patch new file mode 100644 index 000000000000..6ad1a0a11bb3 --- /dev/null +++ b/patches/node/weakrefs_split_out_finalizationregistry_cleanupsome.patch @@ -0,0 +1,31 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Sun, 12 Apr 2020 15:58:34 -0700 +Subject: Split out FinalizationRegistry#cleanupSome to a different flag + +https://chromium-review.googlesource.com/c/v8/v8/+/2141011 + +diff --git a/test/parallel/test-finalization-group-error.js b/test/parallel/test-finalization-group-error.js +index 46a670073b1dbba9729e54166378991a7edba5a0..0857bedd043f0436bddc6d8641c51e78a8b4c562 100644 +--- a/test/parallel/test-finalization-group-error.js ++++ b/test/parallel/test-finalization-group-error.js +@@ -1,6 +1,6 @@ + 'use strict'; + +-// Flags: --expose-gc --harmony-weak-refs ++// Flags: --expose-gc --harmony-weak-refs-with-cleanup-some + + const common = require('../common'); + const assert = require('assert'); +diff --git a/test/parallel/test-finalization-group.js b/test/parallel/test-finalization-group.js +index 4b9357e4d18e6c21d53fc6534f5af1f98805b150..95d36cd3506503b99d4b950b6b1caaf8be96b9e9 100644 +--- a/test/parallel/test-finalization-group.js ++++ b/test/parallel/test-finalization-group.js +@@ -1,6 +1,6 @@ + 'use strict'; + +-// Flags: --expose-gc --harmony-weak-refs ++// Flags: --expose-gc --harmony-weak-refs-with-cleanup-some + + const common = require('../common'); + diff --git a/patches/v8/add_realloc.patch b/patches/v8/add_realloc.patch index 4c3cc1d7554b..85f5715d6840 100644 --- a/patches/v8/add_realloc.patch +++ b/patches/v8/add_realloc.patch @@ -12,7 +12,7 @@ when we override ReallocateBufferMemory, so we therefore need to implement Realloc on the v8 side. diff --git a/include/v8.h b/include/v8.h -index 77ac5098624a9536d1036d93232a6f3565c8c6ca..21b3d0b890bb234570e1ec241be83ac50e9066c8 100644 +index 800fc0da241b50d7a6629a1839f1aa1029e42d5b..94b7004c7d26764a598ade2d0e454e049167849d 100644 --- a/include/v8.h +++ b/include/v8.h @@ -5041,6 +5041,13 @@ class V8_EXPORT ArrayBuffer : public Object { @@ -30,7 +30,7 @@ index 77ac5098624a9536d1036d93232a6f3565c8c6ca..21b3d0b890bb234570e1ec241be83ac5 * Free the memory block of size |length|, pointed to by |data|. * That memory is guaranteed to be previously allocated by |Allocate|. diff --git a/src/api/api.cc b/src/api/api.cc -index b2d6db3661a564d20f6d07a67bff627ba2ee75da..feda31f69bf53b392506bd87ac5d966b1e6b9329 100644 +index af686ca8c59d4b6ede00a78e542039b73f3ab363..ec522a513240c3fc2cbd28c0ff5dd52c420ca944 100644 --- a/src/api/api.cc +++ b/src/api/api.cc @@ -528,6 +528,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 6d7abdc9f5be..3a4c3d7a4852 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,7 +9,7 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index 1ed2de137f7cec05fe583372d6bc096a4cec8ab0..f005e7f0d819f9aa5c434829e6d16e6bd7c4797e 100644 +index 912ea284c9b30b2ae5b123e6dec0b07b0c8b4b1e..99b96d05ade62564762fa58200778d91b2c885b2 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -311,7 +311,7 @@ config("internal_config") { @@ -21,7 +21,7 @@ index 1ed2de137f7cec05fe583372d6bc096a4cec8ab0..f005e7f0d819f9aa5c434829e6d16e6b defines += [ "BUILDING_V8_SHARED" ] } } -@@ -4004,7 +4004,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -4081,7 +4081,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index 1ed2de137f7cec05fe583372d6bc096a4cec8ab0..f005e7f0d819f9aa5c434829e6d16e6b deps = [ ":v8_libbase", -@@ -4037,6 +4037,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -4114,6 +4114,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index d56553427990..6352a0047363 100644 --- a/patches/v8/dcheck.patch +++ b/patches/v8/dcheck.patch @@ -6,10 +6,10 @@ Subject: dcheck.patch https://github.com/auchenberg/volkswagen diff --git a/src/api/api.cc b/src/api/api.cc -index feda31f69bf53b392506bd87ac5d966b1e6b9329..edfb00f65d21190a65d8245f6d20dabb0b46a2cd 100644 +index ec522a513240c3fc2cbd28c0ff5dd52c420ca944..e630fa81eb510a45f8352fd2024f66f65e9d3573 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -8727,7 +8727,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -8732,7 +8732,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index feda31f69bf53b392506bd87ac5d966b1e6b9329..edfb00f65d21190a65d8245f6d20dabb isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index cf7abaa7a0defa244bd6b147b77ab9d01ff277f7..dc7b206cce6a7fb7df659710094c8beff3b83044 100644 +index 995ee61f42d436c6cd114575c15f96f18458f352..976b9f4c9cfb9330823088b973206e187e114b40 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -5474,9 +5474,9 @@ void Heap::TearDown() { +@@ -5489,9 +5489,9 @@ void Heap::TearDown() { void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback, GCType gc_type, void* data) { DCHECK_NOT_NULL(callback); diff --git a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch index b30cbe00249f..3fb004896f96 100644 --- a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch +++ b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch @@ -12,7 +12,7 @@ This patch can be safely removed if, when it is removed, `node.lib` does not contain any standard C++ library exports (e.g. `std::ostringstream`). diff --git a/BUILD.gn b/BUILD.gn -index cede99e30985e29beaa6dd51c3a8230dc02c3ef8..436810b87f77764384d045ee5a8433881ce57ff6 100644 +index 7a49655f43afc236641e033c8a3f2d2e91d956e1..a67b95e844a84c4ed1582eca6bb7c9c2d21b0cb4 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -311,6 +311,10 @@ config("internal_config") { @@ -27,7 +27,7 @@ index cede99e30985e29beaa6dd51c3a8230dc02c3ef8..436810b87f77764384d045ee5a843388 defines += [ "BUILDING_V8_SHARED" ] } diff --git a/src/base/macros.h b/src/base/macros.h -index 5f52a9893e6a564640bde19d6cf376b74ab9a429..b7f3c4e837947311cef6373bd6a7c1b589da9dc9 100644 +index e22dd00895ab7b5b79084b7c5111e7eb333da18b..e52d585fb3b88773aa75e48392bfcc5ddb98a1ec 100644 --- a/src/base/macros.h +++ b/src/base/macros.h @@ -399,13 +399,17 @@ bool is_inbounds(float_t v) { diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index b0ca0106ea7a..ce9be1dfdcfc 100644 --- a/patches/v8/export_symbols_needed_for_windows_build.patch +++ b/patches/v8/export_symbols_needed_for_windows_build.patch @@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build These symbols are required to build v8 with BUILD_V8_SHARED on Windows. diff --git a/src/objects/objects.h b/src/objects/objects.h -index ef437446fd6378e9749ce1b0d3c428f6aaac559c..3f2063d15bbdc587ea29bec4c889d1e09d7688bb 100644 +index a52865c23b37955345a4bfd75e952da472d6b68f..941c546e9a2c2efcea348667ab285b1612801183 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -811,7 +811,7 @@ enum class KeyCollectionMode { +@@ -812,7 +812,7 @@ enum class KeyCollectionMode { // Utility superclass for stack-allocated objects that must be updated // on gc. It provides two ways for the gc to update instances, either // iterating or updating after gc. diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index 0636071767ed..42edeaf83c68 100644 --- a/patches/v8/expose_mksnapshot.patch +++ b/patches/v8/expose_mksnapshot.patch @@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch Needed in order to target mksnapshot for mksnapshot zip. diff --git a/BUILD.gn b/BUILD.gn -index f005e7f0d819f9aa5c434829e6d16e6bd7c4797e..cede99e30985e29beaa6dd51c3a8230dc02c3ef8 100644 +index 99b96d05ade62564762fa58200778d91b2c885b2..7a49655f43afc236641e033c8a3f2d2e91d956e1 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -4015,7 +4015,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -4092,7 +4092,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/script/node-disabled-tests.json b/script/node-disabled-tests.json index 4cceb92fdc54..354584eb357b 100644 --- a/script/node-disabled-tests.json +++ b/script/node-disabled-tests.json @@ -37,8 +37,8 @@ "parallel/test-buffer-constructor-node-modules-paths", "parallel/test-buffer-constructor-outside-node-modules", "parallel/test-child-process-fork-exec-path", - "parallel/test-cli-node-print-help", "parallel/test-cli-eval", + "parallel/test-cli-node-print-help", "parallel/test-code-cache", "parallel/test-common-gc", "parallel/test-crypto", @@ -68,6 +68,7 @@ "parallel/test-domain-abort-on-uncaught", "parallel/test-domain-with-abort-on-uncaught-exception", "parallel/test-dummy-stdio", + "parallel/test-finalization-group-error", "parallel/test-freeze-intrinsics", "parallel/test-fs-write-sigxfsz", "parallel/test-gc-tls-external-memory", @@ -82,15 +83,16 @@ "parallel/test-inspector-async-hook-after-done", "parallel/test-inspector-esm", "parallel/test-inspector-heap-allocation-tracker", + "parallel/test-inspector-heap-allocation-tracker", "parallel/test-inspector-multisession-ws", "parallel/test-inspector-port-zero-cluster", "parallel/test-inspector-tracing-domain", + "parallel/test-inspector-tracing-domain", "parallel/test-inspector-vm-global-accessors-getter-sideeffect", "parallel/test-inspector-vm-global-accessors-sideeffects", - "parallel/test-inspector-heap-allocation-tracker", "parallel/test-module-loading-globalpaths", - "parallel/test-module-version", "parallel/test-module-run-main-monkey-patch", + "parallel/test-module-version", "parallel/test-openssl-ca-options", "parallel/test-policy-integrity", "parallel/test-preload", @@ -104,7 +106,6 @@ "parallel/test-process-external-stdio-close-spawn", "parallel/test-process-versions", "parallel/test-readline-interface", - "parallel/test-inspector-tracing-domain", "parallel/test-repl", "parallel/test-repl-harmony", "parallel/test-repl-pretty-custom-stack", @@ -138,6 +139,7 @@ "parallel/test-tls-generic-stream", "parallel/test-tls-getcipher", "parallel/test-tls-handshake-error", + "parallel/test-tls-handshake-exception", "parallel/test-tls-honorcipherorder", "parallel/test-tls-junk-server", "parallel/test-tls-key-mismatch", @@ -147,11 +149,10 @@ "parallel/test-tls-multi-pfx", "parallel/test-tls-no-cert-required", "parallel/test-tls-options-boolean-check", - "parallel/test-tls-psk-circuit", - "parallel/test-tls-handshake-exception", "parallel/test-tls-passphrase", "parallel/test-tls-peer-certificate", "parallel/test-tls-pfx-authorizationerror", + "parallel/test-tls-psk-circuit", "parallel/test-tls-server-failed-handshake-emits-clienterror", "parallel/test-tls-set-ciphers", "parallel/test-tls-set-ciphers-error", @@ -236,4 +237,4 @@ "sequential/test-tls-connect", "sequential/test-vm-timeout-rethrow", "wpt/test-encoding" -] \ 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 d5ac93194fde..1d0d70620df2 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -544,7 +544,6 @@ App::App(v8::Isolate* isolate) { static_cast(ElectronBrowserClient::Get()) ->set_delegate(this); Browser::Get()->AddObserver(this); - content::GpuDataManager::GetInstance()->AddObserver(this); base::ProcessId pid = base::GetCurrentProcId(); auto process_metric = std::make_unique( @@ -622,6 +621,21 @@ void App::OnPreMainMessageLoopRun() { } } +void App::OnPreCreateThreads() { + DCHECK(!content::GpuDataManager::Initialized()); + content::GpuDataManager* manager = content::GpuDataManager::GetInstance(); + manager->AddObserver(this); + + if (disable_hw_acceleration_) { + manager->DisableHardwareAcceleration(); + } + + if (disable_domain_blocking_for_3DAPIs_) { + content::GpuDataManagerImpl::GetInstance() + ->DisableDomainBlockingFor3DAPIsForTesting(); + } +} + void App::OnAccessibilitySupportChanged() { Emit("accessibility-support-changed", IsAccessibilitySupportEnabled()); } @@ -1031,7 +1045,11 @@ void App::DisableHardwareAcceleration(gin_helper::ErrorThrower thrower) { "before app is ready"); return; } - content::GpuDataManager::GetInstance()->DisableHardwareAcceleration(); + if (content::GpuDataManager::Initialized()) { + content::GpuDataManager::GetInstance()->DisableHardwareAcceleration(); + } else { + disable_hw_acceleration_ = true; + } } void App::DisableDomainBlockingFor3DAPIs(gin_helper::ErrorThrower thrower) { @@ -1041,8 +1059,12 @@ void App::DisableDomainBlockingFor3DAPIs(gin_helper::ErrorThrower thrower) { "before app is ready"); return; } - content::GpuDataManagerImpl::GetInstance() - ->DisableDomainBlockingFor3DAPIsForTesting(); + if (content::GpuDataManager::Initialized()) { + content::GpuDataManagerImpl::GetInstance() + ->DisableDomainBlockingFor3DAPIsForTesting(); + } else { + disable_domain_blocking_for_3DAPIs_ = true; + } } bool App::IsAccessibilitySupportEnabled() { diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index 2e9413d9ef30..8088a9abd0c4 100644 --- a/shell/browser/api/electron_api_app.h +++ b/shell/browser/api/electron_api_app.h @@ -70,7 +70,6 @@ class App : public ElectronBrowserClient::Delegate, base::FilePath GetAppPath() const; void RenderProcessReady(content::RenderProcessHost* host); void RenderProcessDisconnected(base::ProcessId host_pid); - void PreMainMessageLoopRun(); protected: explicit App(v8::Isolate* isolate); @@ -88,6 +87,7 @@ class App : public ElectronBrowserClient::Delegate, void OnFinishLaunching(const base::DictionaryValue& launch_info) override; void OnAccessibilitySupportChanged() override; void OnPreMainMessageLoopRun() override; + void OnPreCreateThreads() override; #if defined(OS_MACOSX) void OnWillContinueUserActivity(bool* prevent_default, const std::string& type) override; @@ -240,6 +240,9 @@ class App : public ElectronBrowserClient::Delegate, std::unique_ptr>; ProcessMetricMap app_metrics_; + bool disable_hw_acceleration_ = false; + bool disable_domain_blocking_for_3DAPIs_ = false; + DISALLOW_COPY_AND_ASSIGN(App); }; diff --git a/shell/browser/api/electron_api_cookies.cc b/shell/browser/api/electron_api_cookies.cc index 7b6d5dee84bb..3d17495543bb 100644 --- a/shell/browser/api/electron_api_cookies.cc +++ b/shell/browser/api/electron_api_cookies.cc @@ -248,7 +248,7 @@ v8::Local Cookies::Get(v8::Isolate* isolate, net::CookieOptions options; options.set_include_httponly(); options.set_same_site_cookie_context( - net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT); + net::CookieOptions::SameSiteCookieContext::MakeInclusive()); options.set_do_not_update_access_time(); manager->GetCookieList(GURL(url), options, @@ -332,7 +332,7 @@ v8::Local Cookies::Set(v8::Isolate* isolate, options.set_include_httponly(); } options.set_same_site_cookie_context( - net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT); + net::CookieOptions::SameSiteCookieContext::MakeInclusive()); auto* storage_partition = content::BrowserContext::GetDefaultStoragePartition(browser_context_); diff --git a/shell/browser/api/electron_api_menu.cc b/shell/browser/api/electron_api_menu.cc index 62091e921bdd..28bde8b60d1a 100644 --- a/shell/browser/api/electron_api_menu.cc +++ b/shell/browser/api/electron_api_menu.cc @@ -15,6 +15,7 @@ #include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/node_includes.h" +#include "ui/base/models/image_model.h" namespace electron { @@ -142,7 +143,7 @@ void Menu::InsertSubMenuAt(int index, } void Menu::SetIcon(int index, const gfx::Image& image) { - model_->SetIcon(index, image); + model_->SetIcon(index, ui::ImageModel::FromImage(image)); } void Menu::SetSublabel(int index, const base::string16& sublabel) { diff --git a/shell/browser/api/electron_api_native_theme.cc b/shell/browser/api/electron_api_native_theme.cc index 634bed735848..7324d233e82c 100644 --- a/shell/browser/api/electron_api_native_theme.cc +++ b/shell/browser/api/electron_api_native_theme.cc @@ -89,7 +89,8 @@ bool NativeTheme::ShouldUseInvertedColorScheme() { return false; return is_inverted; #else - return color_utils::IsInvertedColorScheme(); + return ui_theme_->GetHighContrastColorScheme() == + ui::NativeTheme::HighContrastColorScheme::kDark; #endif } diff --git a/shell/browser/api/electron_api_system_preferences.cc b/shell/browser/api/electron_api_system_preferences.cc index 7fe7a02e0bbd..1067fe3c41d6 100644 --- a/shell/browser/api/electron_api_system_preferences.cc +++ b/shell/browser/api/electron_api_system_preferences.cc @@ -37,7 +37,9 @@ bool SystemPreferences::IsDarkMode() { #endif bool SystemPreferences::IsInvertedColorScheme() { - return color_utils::IsInvertedColorScheme(); + return ui::NativeTheme::GetInstanceForNativeUi() + ->GetHighContrastColorScheme() == + ui::NativeTheme::HighContrastColorScheme::kDark; } bool SystemPreferences::IsHighContrastColorScheme() { diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 970af86312ec..bc5d33ac34ac 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -392,7 +392,8 @@ WebContents::WebContents(v8::Isolate* isolate, : content::WebContentsObserver(web_contents), type_(Type::REMOTE), weak_factory_(this) { - web_contents->SetUserAgentOverride(GetBrowserContext()->GetUserAgent(), + web_contents->SetUserAgentOverride(blink::UserAgentOverride::UserAgentOnly( + GetBrowserContext()->GetUserAgent()), false); Init(isolate); AttachAsUserData(web_contents); @@ -570,7 +571,8 @@ void WebContents::InitWithSessionAndOptions( &WebContents::OnElectronBrowserConnectionError, base::Unretained(this))); AutofillDriverFactory::CreateForWebContents(web_contents()); - web_contents()->SetUserAgentOverride(GetBrowserContext()->GetUserAgent(), + web_contents()->SetUserAgentOverride(blink::UserAgentOverride::UserAgentOnly( + GetBrowserContext()->GetUserAgent()), false); if (IsGuest()) { @@ -1491,7 +1493,8 @@ void WebContents::LoadURL(const GURL& url, std::string user_agent; if (options.Get("userAgent", &user_agent)) - web_contents()->SetUserAgentOverride(user_agent, false); + web_contents()->SetUserAgentOverride( + blink::UserAgentOverride::UserAgentOnly(user_agent), false); std::string extra_headers; if (options.Get("extraHeaders", &extra_headers)) @@ -1623,11 +1626,12 @@ bool WebContents::IsCrashed() const { void WebContents::SetUserAgent(const std::string& user_agent, gin_helper::Arguments* args) { - web_contents()->SetUserAgentOverride(user_agent, false); + web_contents()->SetUserAgentOverride( + blink::UserAgentOverride::UserAgentOnly(user_agent), false); } std::string WebContents::GetUserAgent() { - return web_contents()->GetUserAgentOverride(); + return web_contents()->GetUserAgentOverride().ua_string_override; } v8::Local WebContents::SavePage( diff --git a/shell/browser/api/frame_subscriber.cc b/shell/browser/api/frame_subscriber.cc index 2d3d1a24701c..7f1b610d37f0 100644 --- a/shell/browser/api/frame_subscriber.cc +++ b/shell/browser/api/frame_subscriber.cc @@ -145,6 +145,8 @@ void FrameSubscriber::OnFrameCaptured( void FrameSubscriber::OnStopped() {} +void FrameSubscriber::OnLog(const std::string& message) {} + void FrameSubscriber::Done(const gfx::Rect& damage, const SkBitmap& frame) { if (frame.drawsNothing()) return; diff --git a/shell/browser/api/frame_subscriber.h b/shell/browser/api/frame_subscriber.h index db9193779242..283b08aa55f3 100644 --- a/shell/browser/api/frame_subscriber.h +++ b/shell/browser/api/frame_subscriber.h @@ -6,6 +6,7 @@ #define SHELL_BROWSER_API_FRAME_SUBSCRIBER_H_ #include +#include #include "base/callback.h" #include "base/memory/weak_ptr.h" @@ -53,6 +54,7 @@ class FrameSubscriber : public content::WebContentsObserver, mojo::PendingRemote callbacks) override; void OnStopped() override; + void OnLog(const std::string& message) override; void Done(const gfx::Rect& damage, const SkBitmap& frame); diff --git a/shell/browser/browser.cc b/shell/browser/browser.cc index 85304819b555..eded680b595b 100644 --- a/shell/browser/browser.cc +++ b/shell/browser/browser.cc @@ -202,6 +202,12 @@ void Browser::PreMainMessageLoopRun() { } } +void Browser::PreCreateThreads() { + for (BrowserObserver& observer : observers_) { + observer.OnPreCreateThreads(); + } +} + void Browser::SetMainMessageLoopQuitClosure(base::OnceClosure quit_closure) { if (is_shutdown_) RunQuitClosure(std::move(quit_closure)); diff --git a/shell/browser/browser.h b/shell/browser/browser.h index 3135936cd584..4fbab02d8c42 100644 --- a/shell/browser/browser.h +++ b/shell/browser/browser.h @@ -251,6 +251,7 @@ class Browser : public WindowListObserver { void OnAccessibilitySupportChanged(); void PreMainMessageLoopRun(); + void PreCreateThreads(); // Stores the supplied |quit_closure|, to be run when the last Browser // instance is destroyed. diff --git a/shell/browser/browser_linux.cc b/shell/browser/browser_linux.cc index fb605e8e88a7..c6029854e395 100644 --- a/shell/browser/browser_linux.cc +++ b/shell/browser/browser_linux.cc @@ -16,8 +16,8 @@ #include "shell/common/application_info.h" #if defined(USE_X11) -#include "chrome/browser/ui/gtk/gtk_util.h" #include "shell/browser/linux/unity_service.h" +#include "ui/gtk/gtk_util.h" #endif namespace electron { diff --git a/shell/browser/browser_observer.h b/shell/browser/browser_observer.h index 9964924ec052..95f5064677e4 100644 --- a/shell/browser/browser_observer.h +++ b/shell/browser/browser_observer.h @@ -55,6 +55,11 @@ class BrowserObserver : public base::CheckedObserver { // The app message loop is ready virtual void OnPreMainMessageLoopRun() {} + // Called just before app threads are created, this is where first access + // to in-process GpuDataManager should be made. + // Refer https://chromium-review.googlesource.com/c/chromium/src/+/2134864 + virtual void OnPreCreateThreads() {} + #if defined(OS_MACOSX) // The browser wants to report that an user activity will resume. (macOS only) virtual void OnWillContinueUserActivity(bool* prevent_default, diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 0360a6a19c68..88c8495a63f9 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -64,11 +64,14 @@ #include "base/environment.h" #include "base/nix/xdg_util.h" #include "base/threading/thread_task_runner_handle.h" -#include "chrome/browser/ui/gtk/gtk_ui.h" -#include "chrome/browser/ui/gtk/gtk_util.h" #include "ui/base/x/x11_util.h" #include "ui/base/x/x11_util_internal.h" #include "ui/events/devices/x11/touch_factory_x11.h" +#include "ui/gfx/x/x11_types.h" +#include "ui/gtk/gtk_ui.h" +#include "ui/gtk/gtk_ui_delegate.h" +#include "ui/gtk/gtk_ui_delegate_x11.h" +#include "ui/gtk/gtk_util.h" #include "ui/views/linux_ui/linux_ui.h" #endif @@ -258,7 +261,6 @@ void ElectronBrowserMainParts::RegisterDestructionCallback( int ElectronBrowserMainParts::PreEarlyInitialization() { field_trial_list_ = std::make_unique(nullptr); #if defined(USE_X11) - views::LinuxUI::SetInstance(BuildGtkUi()); OverrideLinuxAppDataPath(); // Installs the X11 error handlers for the browser process used during @@ -343,6 +345,9 @@ int ElectronBrowserMainParts::PreCreateThreads() { fake_browser_process_->PreCreateThreads(); + // Notify observers. + Browser::Get()->PreCreateThreads(); + return 0; } @@ -365,6 +370,13 @@ void ElectronBrowserMainParts::PostDestroyThreads() { } void ElectronBrowserMainParts::ToolkitInitialized() { +#if defined(USE_X11) + // In Aura/X11, Gtk-based LinuxUI implementation is used. + gtk_ui_delegate_ = std::make_unique(gfx::GetXDisplay()); + ui::GtkUiDelegate::SetInstance(gtk_ui_delegate_.get()); + views::LinuxUI::SetInstance(BuildGtkUi(ui::GtkUiDelegate::instance())); +#endif + #if defined(USE_AURA) && defined(USE_X11) views::LinuxUI::instance()->Initialize(); #endif diff --git a/shell/browser/electron_browser_main_parts.h b/shell/browser/electron_browser_main_parts.h index e006eb1a5e8b..50ebb4ebfb34 100644 --- a/shell/browser/electron_browser_main_parts.h +++ b/shell/browser/electron_browser_main_parts.h @@ -29,6 +29,12 @@ class WMState; } #endif +#if defined(USE_X11) +namespace ui { +class GtkUiDelegate; +} +#endif + namespace electron { class ElectronBrowserContext; @@ -121,6 +127,10 @@ class ElectronBrowserMainParts : public content::BrowserMainParts { std::unique_ptr wm_state_; #endif +#if defined(USE_X11) + std::unique_ptr gtk_ui_delegate_; +#endif + std::unique_ptr layout_provider_; // A fake BrowserProcess object that used to feed the source code from chrome. diff --git a/shell/browser/extensions/electron_extension_system.cc b/shell/browser/extensions/electron_extension_system.cc index 390525209668..93ffc1413ad4 100644 --- a/shell/browser/extensions/electron_extension_system.cc +++ b/shell/browser/extensions/electron_extension_system.cc @@ -209,6 +209,12 @@ bool ElectronExtensionSystem::FinishDelayedInstallationIfReady( return false; } +void ElectronExtensionSystem::PerformActionBasedOnOmahaAttributes( + const std::string& extension_id, + const base::Value& attributes) { + NOTREACHED(); +} + void ElectronExtensionSystem::OnExtensionRegisteredWithRequestContexts( scoped_refptr extension) { ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_); diff --git a/shell/browser/extensions/electron_extension_system.h b/shell/browser/extensions/electron_extension_system.h index 4b05e4d0e30e..b8c515e1b44c 100644 --- a/shell/browser/extensions/electron_extension_system.h +++ b/shell/browser/extensions/electron_extension_system.h @@ -84,6 +84,9 @@ class ElectronExtensionSystem : public ExtensionSystem { InstallUpdateCallback install_update_callback) override; bool FinishDelayedInstallationIfReady(const std::string& extension_id, bool install_immediately) override; + void PerformActionBasedOnOmahaAttributes( + const std::string& extension_id, + const base::Value& attributes) override; private: void OnExtensionRegisteredWithRequestContexts( diff --git a/shell/browser/net/resolve_proxy_helper.cc b/shell/browser/net/resolve_proxy_helper.cc index e3da04bc6e30..b1d76c5b9207 100644 --- a/shell/browser/net/resolve_proxy_helper.cc +++ b/shell/browser/net/resolve_proxy_helper.cc @@ -94,8 +94,8 @@ ResolveProxyHelper::PendingRequest::PendingRequest( ResolveProxyHelper::PendingRequest::~PendingRequest() noexcept = default; -ResolveProxyHelper::PendingRequest& ResolveProxyHelper::PendingRequest:: -operator=(ResolveProxyHelper::PendingRequest&& pending_request) noexcept = - default; +ResolveProxyHelper::PendingRequest& +ResolveProxyHelper::PendingRequest::operator=( + ResolveProxyHelper::PendingRequest&& pending_request) noexcept = default; } // namespace electron diff --git a/shell/browser/notifications/linux/libnotify_notification.cc b/shell/browser/notifications/linux/libnotify_notification.cc index ec9aaf700faf..27f7b43059e4 100644 --- a/shell/browser/notifications/linux/libnotify_notification.cc +++ b/shell/browser/notifications/linux/libnotify_notification.cc @@ -12,12 +12,12 @@ #include "base/logging.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" -#include "chrome/browser/ui/gtk/gtk_util.h" #include "shell/browser/notifications/notification_delegate.h" #include "shell/browser/ui/gtk_util.h" #include "shell/common/application_info.h" #include "shell/common/platform_util.h" #include "third_party/skia/include/core/SkBitmap.h" +#include "ui/gtk/gtk_util.h" namespace electron { diff --git a/shell/browser/osr/osr_video_consumer.cc b/shell/browser/osr/osr_video_consumer.cc index b0bfb4524f45..4bf4d1cf5cf6 100644 --- a/shell/browser/osr/osr_video_consumer.cc +++ b/shell/browser/osr/osr_video_consumer.cc @@ -126,6 +126,8 @@ void OffScreenVideoConsumer::OnFrameCaptured( void OffScreenVideoConsumer::OnStopped() {} +void OffScreenVideoConsumer::OnLog(const std::string& message) {} + bool OffScreenVideoConsumer::CheckContentRect(const gfx::Rect& content_rect) { gfx::Size view_size = view_->SizeInPixels(); gfx::Size content_size = content_rect.size(); diff --git a/shell/browser/osr/osr_video_consumer.h b/shell/browser/osr/osr_video_consumer.h index eb8d1457f036..d275d3518382 100644 --- a/shell/browser/osr/osr_video_consumer.h +++ b/shell/browser/osr/osr_video_consumer.h @@ -6,6 +6,7 @@ #define SHELL_BROWSER_OSR_OSR_VIDEO_CONSUMER_H_ #include +#include #include "base/callback.h" #include "base/memory/weak_ptr.h" @@ -38,6 +39,7 @@ class OffScreenVideoConsumer : public viz::mojom::FrameSinkVideoConsumer { mojo::PendingRemote callbacks) override; void OnStopped() override; + void OnLog(const std::string& message) override; bool CheckContentRect(const gfx::Rect& content_rect); diff --git a/shell/browser/ui/autofill_popup.cc b/shell/browser/ui/autofill_popup.cc index 3c74ee797e7c..63aa64d7ac93 100644 --- a/shell/browser/ui/autofill_popup.cc +++ b/shell/browser/ui/autofill_popup.cc @@ -9,7 +9,7 @@ #include #include "base/i18n/rtl.h" -#include "chrome/browser/ui/autofill/popup_view_common.h" +#include "chrome/browser/ui/views/autofill/autofill_popup_view_utils.h" #include "electron/buildflags/buildflags.h" #include "mojo/public/cpp/bindings/associated_remote.h" #include "shell/browser/native_window_views.h" @@ -31,19 +31,6 @@ namespace electron { -class PopupViewCommon : public autofill::PopupViewCommon { - public: - explicit PopupViewCommon(const gfx::Rect& window_bounds) - : window_bounds_(window_bounds) {} - - gfx::Rect GetWindowBounds(gfx::NativeView container_view) override { - return window_bounds_; - } - - private: - gfx::Rect window_bounds_; -}; - AutofillPopup::AutofillPopup() { bold_font_list_ = gfx::FontList().DeriveWithWeight(gfx::Font::Weight::BOLD); smaller_font_list_ = @@ -127,10 +114,10 @@ void AutofillPopup::UpdatePopupBounds() { gfx::Rect bounds(origin, element_bounds_.size()); gfx::Rect window_bounds = parent_->GetBoundsInScreen(); - PopupViewCommon popup_view_common(window_bounds); - popup_bounds_ = popup_view_common.CalculatePopupBounds( - GetDesiredPopupWidth(), GetDesiredPopupHeight(), bounds, - gfx::NativeView(), base::i18n::IsRTL()); + gfx::Size preferred_size = + gfx::Size(GetDesiredPopupWidth(), GetDesiredPopupHeight()); + popup_bounds_ = CalculatePopupBounds(preferred_size, window_bounds, bounds, + base::i18n::IsRTL()); } gfx::Rect AutofillPopup::popup_bounds_in_view() { diff --git a/shell/browser/ui/cocoa/electron_menu_controller.mm b/shell/browser/ui/cocoa/electron_menu_controller.mm index 86b0470081a2..8212f5f4f9d9 100644 --- a/shell/browser/ui/cocoa/electron_menu_controller.mm +++ b/shell/browser/ui/cocoa/electron_menu_controller.mm @@ -236,9 +236,9 @@ static base::scoped_nsobject recentDocumentsMenuSwap_; keyEquivalent:@""]); // If the menu item has an icon, set it. - gfx::Image icon; - if (model->GetIconAt(index, &icon) && !icon.IsEmpty()) - [item setImage:icon.ToNSImage()]; + ui::ImageModel icon = model->GetIconAt(index); + if (icon.IsImage()) + [item setImage:icon.GetImage().ToNSImage()]; base::string16 toolTip = model->GetToolTipAt(index); [item setToolTip:base::SysUTF16ToNSString(toolTip)]; diff --git a/shell/browser/ui/file_dialog_gtk.cc b/shell/browser/ui/file_dialog_gtk.cc index b25b51e75116..146201f66cd0 100644 --- a/shell/browser/ui/file_dialog_gtk.cc +++ b/shell/browser/ui/file_dialog_gtk.cc @@ -10,12 +10,12 @@ #include "base/callback.h" #include "base/files/file_util.h" #include "base/strings/string_util.h" -#include "chrome/browser/ui/gtk/gtk_util.h" #include "shell/browser/native_window_views.h" #include "shell/browser/unresponsive_suppressor.h" #include "shell/common/gin_converters/file_path_converter.h" #include "ui/base/glib/glib_signal.h" -#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" +#include "ui/events/platform/x11/x11_event_source.h" +#include "ui/gtk/gtk_util.h" namespace file_dialog { diff --git a/shell/browser/ui/message_box_gtk.cc b/shell/browser/ui/message_box_gtk.cc index d7d4db9e6abb..6dbe28e86d42 100644 --- a/shell/browser/ui/message_box_gtk.cc +++ b/shell/browser/ui/message_box_gtk.cc @@ -8,14 +8,14 @@ #include "base/callback.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" -#include "chrome/browser/ui/gtk/gtk_util.h" #include "shell/browser/browser.h" #include "shell/browser/native_window_observer.h" #include "shell/browser/native_window_views.h" #include "shell/browser/unresponsive_suppressor.h" #include "ui/base/glib/glib_signal.h" +#include "ui/events/platform/x11/x11_event_source.h" #include "ui/gfx/image/image_skia.h" -#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" +#include "ui/gtk/gtk_util.h" #define ANSI_FOREGROUND_RED "\x1b[31m" #define ANSI_FOREGROUND_BLACK "\x1b[30m" diff --git a/shell/browser/ui/views/menu_bar.cc b/shell/browser/ui/views/menu_bar.cc index 80cfa3baf848..54059b228aaa 100644 --- a/shell/browser/ui/views/menu_bar.cc +++ b/shell/browser/ui/views/menu_bar.cc @@ -18,7 +18,7 @@ #include "ui/views/widget/widget.h" #if defined(USE_X11) -#include "chrome/browser/ui/gtk/gtk_util.h" +#include "ui/gtk/gtk_util.h" #endif #if defined(OS_WIN) diff --git a/shell/common/api/electron_api_clipboard.cc b/shell/common/api/electron_api_clipboard.cc index ebb5594005a4..b5cf09503058 100644 --- a/shell/common/api/electron_api_clipboard.cc +++ b/shell/common/api/electron_api_clipboard.cc @@ -180,8 +180,16 @@ void Clipboard::WriteBookmark(const base::string16& title, gfx::Image Clipboard::ReadImage(gin_helper::Arguments* args) { ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); - SkBitmap bitmap = clipboard->ReadImage(GetClipboardBuffer(args)); - return gfx::Image::CreateFrom1xBitmap(bitmap); + base::Optional image; + clipboard->ReadImage( + GetClipboardBuffer(args), + base::Bind( + [](base::Optional* image, const SkBitmap& result) { + image->emplace(gfx::Image::CreateFrom1xBitmap(result)); + }, + &image)); + DCHECK(image.has_value()); + return image.value(); } void Clipboard::WriteImage(const gfx::Image& image, diff --git a/shell/common/application_info_linux.cc b/shell/common/application_info_linux.cc index 76f0da90fb0c..44d14048405d 100644 --- a/shell/common/application_info_linux.cc +++ b/shell/common/application_info_linux.cc @@ -12,9 +12,9 @@ #include "base/environment.h" #include "base/logging.h" -#include "chrome/browser/ui/gtk/gtk_util.h" #include "electron/electron_version.h" #include "shell/common/platform_util.h" +#include "ui/gtk/gtk_util.h" namespace { diff --git a/shell/common/platform_util_linux.cc b/shell/common/platform_util_linux.cc index 2900c3fbab7d..df2a744b0e01 100644 --- a/shell/common/platform_util_linux.cc +++ b/shell/common/platform_util_linux.cc @@ -12,7 +12,7 @@ #include "base/nix/xdg_util.h" #include "base/process/kill.h" #include "base/process/launch.h" -#include "chrome/browser/ui/gtk/gtk_util.h" +#include "ui/gtk/gtk_util.h" #include "url/gurl.h" #define ELECTRON_TRASH "ELECTRON_TRASH" diff --git a/spec-main/extensions-spec.ts b/spec-main/extensions-spec.ts index 0059470ae3cf..3168dae35bba 100644 --- a/spec-main/extensions-spec.ts +++ b/spec-main/extensions-spec.ts @@ -296,7 +296,7 @@ ifdescribe(process.electronBinding('features').isExtensionsEnabled())('chrome ex const customSession = session.fromPartition(`persist:${require('uuid').v4()}`); customSession.loadExtension(path.join(fixtures, 'extensions', 'devtools-extension')); const w = new BrowserWindow({ show: true, webPreferences: { session: customSession, nodeIntegration: true } }); - await w.loadURL('data:text/html,hello'); + await w.loadURL(url); w.webContents.openDevTools(); showLastDevToolsPanel(w); await emittedOnce(ipcMain, 'winning'); diff --git a/spec-main/fixtures/pages/webview-devtools.html b/spec-main/fixtures/pages/webview-devtools.html index 47cd8719d495..a8b170f23e2c 100644 --- a/spec-main/fixtures/pages/webview-devtools.html +++ b/spec-main/fixtures/pages/webview-devtools.html @@ -4,7 +4,7 @@ - +