2018-04-19 17:44:42 +02:00
|
|
|
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
|
2018-12-26 16:12:11 +01:00
|
|
|
index e14420e78971..04bcef2abebf 100644
|
2018-04-19 17:44:42 +02:00
|
|
|
--- third_party/blink/public/web/web_view.h
|
|
|
|
+++ third_party/blink/public/web/web_view.h
|
2018-12-26 16:12:11 +01:00
|
|
|
@@ -329,6 +329,7 @@ class WebView {
|
2018-04-19 17:44:42 +02:00
|
|
|
|
|
|
|
// Sets whether select popup menus should be rendered by the browser.
|
|
|
|
BLINK_EXPORT static void SetUseExternalPopupMenus(bool);
|
|
|
|
+ virtual void SetUseExternalPopupMenusThisInstance(bool) = 0;
|
|
|
|
|
|
|
|
// Hides any popup (suggestions, selects...) that might be showing.
|
|
|
|
virtual void HidePopups() = 0;
|
2018-12-26 16:12:11 +01:00
|
|
|
@@ -353,6 +354,8 @@ class WebView {
|
2018-04-19 17:44:42 +02:00
|
|
|
unsigned inactive_background_color,
|
|
|
|
unsigned inactive_foreground_color) = 0;
|
|
|
|
|
2018-05-20 15:51:42 +02:00
|
|
|
+ virtual void SetBaseBackgroundColor(SkColor color) = 0;
|
2018-04-19 17:44:42 +02:00
|
|
|
+
|
|
|
|
// Modal dialog support ------------------------------------------------
|
|
|
|
|
|
|
|
// Call these methods before and after running a nested, modal event loop
|
|
|
|
diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc
|
2018-12-26 16:12:11 +01:00
|
|
|
index 9246cf14bcae..73af3c519b82 100644
|
2018-04-19 17:44:42 +02:00
|
|
|
--- third_party/blink/renderer/core/exported/web_view_impl.cc
|
|
|
|
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
|
2018-09-04 11:43:21 +02:00
|
|
|
@@ -234,8 +234,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
|
2017-09-06 23:40:58 +02:00
|
|
|
g_should_use_external_popup_menus = use_external_popup_menus;
|
|
|
|
}
|
2017-05-31 17:33:30 +02:00
|
|
|
|
2017-09-06 23:40:58 +02:00
|
|
|
-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_;
|
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2017-09-06 23:40:58 +02:00
|
|
|
namespace {
|
2018-09-04 11:43:21 +02:00
|
|
|
@@ -310,6 +315,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
|
2017-04-20 21:28:17 +02:00
|
|
|
enable_fake_page_scale_animation_for_testing_(false),
|
|
|
|
fake_page_scale_animation_page_scale_factor_(0),
|
|
|
|
fake_page_scale_animation_use_anchor_(false),
|
|
|
|
+ should_use_external_popup_menus_(g_should_use_external_popup_menus),
|
|
|
|
compositor_device_scale_factor_override_(0),
|
|
|
|
suppress_next_keypress_event_(false),
|
|
|
|
ime_accept_events_(true),
|
2018-04-19 17:44:42 +02:00
|
|
|
diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h
|
2018-12-26 16:12:11 +01:00
|
|
|
index a3c6109531c1..d3a605ff2f09 100644
|
2018-04-19 17:44:42 +02:00
|
|
|
--- third_party/blink/renderer/core/exported/web_view_impl.h
|
|
|
|
+++ third_party/blink/renderer/core/exported/web_view_impl.h
|
2018-11-30 23:21:07 +01:00
|
|
|
@@ -107,7 +107,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
2018-03-20 21:15:08 +01:00
|
|
|
static HashSet<WebViewImpl*>& AllInstances();
|
2016-10-21 21:52:29 +02:00
|
|
|
// Returns true if popup menus should be rendered by the browser, false if
|
|
|
|
// they should be rendered by WebKit (which is the default).
|
2017-04-20 21:28:17 +02:00
|
|
|
- static bool UseExternalPopupMenus();
|
2018-05-21 14:54:08 +02:00
|
|
|
+ void SetUseExternalPopupMenusThisInstance(bool) override;
|
2017-09-06 23:40:58 +02:00
|
|
|
+ bool UseExternalPopupMenus() const;
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2017-09-06 23:40:58 +02:00
|
|
|
// WebWidget methods:
|
2018-11-03 02:15:09 +01:00
|
|
|
void SetLayerTreeView(WebLayerTreeView*) override;
|
2018-12-26 16:12:11 +01:00
|
|
|
@@ -250,7 +251,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
2018-11-30 23:21:07 +01:00
|
|
|
HitTestResult CoreHitTestResultAt(const gfx::Point&);
|
2018-02-22 18:59:06 +01:00
|
|
|
void InvalidateRect(const IntRect&);
|
|
|
|
|
2018-05-20 15:51:42 +02:00
|
|
|
- void SetBaseBackgroundColor(SkColor);
|
|
|
|
+ void SetBaseBackgroundColor(SkColor) override;
|
|
|
|
void SetBaseBackgroundColorOverride(SkColor);
|
2018-02-22 18:59:06 +01:00
|
|
|
void ClearBaseBackgroundColorOverride();
|
2018-05-20 15:51:42 +02:00
|
|
|
void SetBackgroundColorOverride(SkColor);
|
2018-12-26 16:12:11 +01:00
|
|
|
@@ -599,6 +600,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
2017-04-20 21:28:17 +02:00
|
|
|
float fake_page_scale_animation_page_scale_factor_;
|
|
|
|
bool fake_page_scale_animation_use_anchor_;
|
2016-10-21 21:52:29 +02:00
|
|
|
|
2017-04-20 21:28:17 +02:00
|
|
|
+ bool should_use_external_popup_menus_;
|
2014-07-01 00:30:29 +02:00
|
|
|
+
|
2017-04-20 21:28:17 +02:00
|
|
|
float compositor_device_scale_factor_override_;
|
|
|
|
TransformationMatrix device_emulation_transform_;
|
2017-01-23 18:36:54 +01:00
|
|
|
|
2018-04-19 17:44:42 +02:00
|
|
|
diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc
|
2018-12-26 16:12:11 +01:00
|
|
|
index c7b9280cc19c..b8e22e79f957 100644
|
2018-04-19 17:44:42 +02:00
|
|
|
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
|
|
|
|
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
|
2018-12-26 16:12:11 +01:00
|
|
|
@@ -801,7 +801,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
|
2018-05-14 13:24:05 +02:00
|
|
|
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
|
|
|
HTMLSelectElement& select) {
|
2017-09-06 23:40:58 +02:00
|
|
|
NotifyPopupOpeningObservers();
|
|
|
|
- if (WebViewImpl::UseExternalPopupMenus())
|
|
|
|
+ if (web_view_->UseExternalPopupMenus())
|
2018-12-26 16:12:11 +01:00
|
|
|
return MakeGarbageCollected<ExternalPopupMenu>(frame, select, *web_view_);
|
2017-09-06 23:40:58 +02:00
|
|
|
|
|
|
|
DCHECK(RuntimeEnabledFeatures::PagePopupEnabled());
|