mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-03-22 23:10:09 +01:00
- Building on macOS now requires the 10.15 SDK. Xcode 11.3 is recommended as Xcode 11.4 is not currently supported (see https://crbug.com/1065146). - Jumbo build configuration is no longer supported. Chromium is skipping the M82 release and consequently no CEF 4085 branch will be created. For details on the Chromium decision see https://groups.google.com/a/chromium.org/d/msg/chromium-dev/Vn7uzglqLz0/JItlSrZxBAAJ
77 lines
3.7 KiB
Diff
77 lines
3.7 KiB
Diff
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
|
|
index c2c079e51358..b719cf3d0edc 100644
|
|
--- third_party/blink/public/web/web_view.h
|
|
+++ third_party/blink/public/web/web_view.h
|
|
@@ -372,6 +372,7 @@ class WebView {
|
|
|
|
// Sets whether select popup menus should be rendered by the browser.
|
|
BLINK_EXPORT static void SetUseExternalPopupMenus(bool);
|
|
+ virtual void SetUseExternalPopupMenusThisInstance(bool) = 0;
|
|
|
|
// Cancels and hides the current popup (datetime, select...) if any.
|
|
virtual void CancelPagePopup() = 0;
|
|
diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc
|
|
index bcf5d6b07b26..d66e6df02d2d 100644
|
|
--- third_party/blink/renderer/core/exported/web_view_impl.cc
|
|
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
|
|
@@ -216,8 +216,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
|
|
g_should_use_external_popup_menus = use_external_popup_menus;
|
|
}
|
|
|
|
-bool WebViewImpl::UseExternalPopupMenus() {
|
|
- return g_should_use_external_popup_menus;
|
|
+void WebViewImpl::SetUseExternalPopupMenusThisInstance(
|
|
+ bool use_external_popup_menus) {
|
|
+ should_use_external_popup_menus_ = use_external_popup_menus;
|
|
+}
|
|
+
|
|
+bool WebViewImpl::UseExternalPopupMenus() const {
|
|
+ return should_use_external_popup_menus_;
|
|
}
|
|
|
|
namespace {
|
|
@@ -280,6 +285,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
|
|
chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)),
|
|
minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)),
|
|
maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)),
|
|
+ should_use_external_popup_menus_(g_should_use_external_popup_menus),
|
|
does_composite_(does_composite),
|
|
fullscreen_controller_(std::make_unique<FullscreenController>(this)),
|
|
receiver_(this,
|
|
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
|
|
index ea6325cccfe6..c4fc56b44589 100644
|
|
--- third_party/blink/renderer/core/exported/web_view_impl.h
|
|
+++ third_party/blink/renderer/core/exported/web_view_impl.h
|
|
@@ -117,7 +117,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
|
static HashSet<WebViewImpl*>& AllInstances();
|
|
// Returns true if popup menus should be rendered by the browser, false if
|
|
// they should be rendered by WebKit (which is the default).
|
|
- static bool UseExternalPopupMenus();
|
|
+ void SetUseExternalPopupMenusThisInstance(bool) override;
|
|
+ bool UseExternalPopupMenus() const;
|
|
|
|
// Returns whether frames under this WebView are backed by a compositor.
|
|
bool does_composite() const { return does_composite_; }
|
|
@@ -618,6 +619,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
|
float fake_page_scale_animation_page_scale_factor_ = 0.f;
|
|
bool fake_page_scale_animation_use_anchor_ = false;
|
|
|
|
+ bool should_use_external_popup_menus_;
|
|
+
|
|
float compositor_device_scale_factor_override_ = 0.f;
|
|
TransformationMatrix device_emulation_transform_;
|
|
|
|
diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc
|
|
index 8285be4622c9..08b3dd25b6f4 100644
|
|
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
|
|
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
|
|
@@ -859,7 +859,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
|
|
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
|
HTMLSelectElement& select) {
|
|
NotifyPopupOpeningObservers();
|
|
- if (WebViewImpl::UseExternalPopupMenus())
|
|
+ if (web_view_->UseExternalPopupMenus())
|
|
return MakeGarbageCollected<ExternalPopupMenu>(frame, select);
|
|
|
|
DCHECK(RuntimeEnabledFeatures::PagePopupEnabled());
|