mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
* chore: bump chromium in DEPS to 143.0.7489.0 * chore: update add_didinstallconditionalfeatures.patch no manual changes; patch applied with fuzz * chore: update allow_in-process_windows_to_have_different_web_prefs.patch patch reapplied manually due to context shear Remove BackForwardTransitions flag | https://chromium-review.googlesource.com/c/chromium/src/+/7022596 * chore: update process_singleton.patch patch reapplied manually due to context shear Use an empty prefix for socket temporary directory. | https://chromium-review.googlesource.com/c/chromium/src/+/7062192 * chore: update add_electron_deps_to_license_credits_file.patch no manual changes; patch applied with fuzz * chore: update expose_ripemd160.patch Apply modernize-use-nullptr fixes in all .cc files | https://boringssl-review.googlesource.com/c/boringssl/+/83067 * chore: update feat_expose_several_extra_cipher_functions.patch Apply modernize-use-nullptr fixes in all .cc files | https://boringssl-review.googlesource.com/c/boringssl/+/83067 * Pass Bus::Options by value with std::move. | https://chromium-review.googlesource.com/c/chromium/src/+/7056670 * chore: update patches * Remove some includes of base/callback_list.h | https://chromium-review.googlesource.com/c/chromium/src/+/7055621 * chore: run gen-libc++-filenames.js --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
30 lines
1.4 KiB
Diff
30 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samuel Attard <sattard@slack-corp.com>
|
|
Date: Mon, 8 Mar 2021 16:27:39 -0800
|
|
Subject: extend ApplyWebPreferences with Electron-specific logic
|
|
|
|
On macOS, popup menus are rendered by the main process by default.
|
|
This causes problems in OSR, since when the popup is rendered separately,
|
|
it won't be captured in the rendered image.
|
|
Offscreen can be updated at runtime, as such we need to apply the
|
|
turn on/off ExternalPopupMenu in the ApplyPreferences method.
|
|
There is no current way to attach an observer to these prefs so patching
|
|
is our only option.
|
|
|
|
Ideally we could add an embedder observer pattern here but that can be
|
|
done in future work.
|
|
|
|
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
|
index de1c308b599377dd2598a75427347dc5c980fc07..1b6bf9c45f70b904b4f5648a04067fe372d88f6c 100644
|
|
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
|
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
|
@@ -1901,6 +1901,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
|
#if BUILDFLAG(IS_MAC)
|
|
web_view_impl->SetMaximumLegibleScale(
|
|
prefs.default_maximum_page_scale_factor);
|
|
+ web_view_impl->GetChromeClient().SetUseExternalPopupMenusForTesting(
|
|
+ !prefs.offscreen);
|
|
#endif
|
|
|
|
#if BUILDFLAG(IS_WIN)
|