2017-09-06 23:40:58 +02:00
|
|
|
diff --git third_party/WebKit/Source/core/exported/WebViewImpl.cpp third_party/WebKit/Source/core/exported/WebViewImpl.cpp
|
2018-03-20 21:15:08 +01:00
|
|
|
index 494a9bc0f294..a766c5d047b0 100644
|
2017-09-06 23:40:58 +02:00
|
|
|
--- third_party/WebKit/Source/core/exported/WebViewImpl.cpp
|
|
|
|
+++ third_party/WebKit/Source/core/exported/WebViewImpl.cpp
|
2018-03-20 21:15:08 +01:00
|
|
|
@@ -253,8 +253,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-03-20 21:15:08 +01:00
|
|
|
@@ -345,6 +350,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),
|
2017-09-06 23:40:58 +02:00
|
|
|
diff --git third_party/WebKit/Source/core/exported/WebViewImpl.h third_party/WebKit/Source/core/exported/WebViewImpl.h
|
2018-03-20 21:15:08 +01:00
|
|
|
index 4e820e7746b7..52c6eaaf2f89 100644
|
2017-09-06 23:40:58 +02:00
|
|
|
--- third_party/WebKit/Source/core/exported/WebViewImpl.h
|
|
|
|
+++ third_party/WebKit/Source/core/exported/WebViewImpl.h
|
2018-03-20 21:15:08 +01:00
|
|
|
@@ -106,7 +106,8 @@ class CORE_EXPORT WebViewImpl final
|
|
|
|
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();
|
|
|
|
+ void SetUseExternalPopupMenusThisInstance(bool);
|
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:
|
|
|
|
void Close() override;
|
2018-02-22 18:59:06 +01:00
|
|
|
@@ -256,7 +257,7 @@ class CORE_EXPORT WebViewImpl final
|
|
|
|
HitTestResult CoreHitTestResultAt(const WebPoint&);
|
|
|
|
void InvalidateRect(const IntRect&);
|
|
|
|
|
|
|
|
- void SetBaseBackgroundColor(WebColor);
|
|
|
|
+ void SetBaseBackgroundColor(WebColor) override;
|
|
|
|
void SetBaseBackgroundColorOverride(WebColor);
|
|
|
|
void ClearBaseBackgroundColorOverride();
|
|
|
|
void SetBackgroundColorOverride(WebColor);
|
2018-03-20 21:15:08 +01:00
|
|
|
@@ -602,6 +603,8 @@ class CORE_EXPORT WebViewImpl final
|
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
|
|
|
|
2017-09-06 23:40:58 +02:00
|
|
|
diff --git third_party/WebKit/Source/core/page/ChromeClientImpl.cpp third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
|
2018-03-20 21:15:08 +01:00
|
|
|
index fd6ddf8f6c82..c953adec0b27 100644
|
2017-09-06 23:40:58 +02:00
|
|
|
--- third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
|
|
|
|
+++ third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
|
2018-03-20 21:15:08 +01:00
|
|
|
@@ -779,7 +779,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
2017-09-06 23:40:58 +02:00
|
|
|
return nullptr;
|
|
|
|
|
|
|
|
NotifyPopupOpeningObservers();
|
|
|
|
- if (WebViewImpl::UseExternalPopupMenus())
|
|
|
|
+ if (web_view_->UseExternalPopupMenus())
|
|
|
|
return new ExternalPopupMenu(frame, select, *web_view_);
|
|
|
|
|
|
|
|
DCHECK(RuntimeEnabledFeatures::PagePopupEnabled());
|
2017-04-27 03:59:52 +02:00
|
|
|
diff --git third_party/WebKit/public/web/WebView.h third_party/WebKit/public/web/WebView.h
|
2018-03-20 21:15:08 +01:00
|
|
|
index 8fc376c9973c..4f2ee40e800c 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/WebKit/public/web/WebView.h
|
|
|
|
+++ third_party/WebKit/public/web/WebView.h
|
2018-03-20 21:15:08 +01:00
|
|
|
@@ -361,6 +361,7 @@ class WebView : protected WebWidget {
|
2014-09-04 19:53:40 +02:00
|
|
|
|
2016-10-21 21:52:29 +02:00
|
|
|
// Sets whether select popup menus should be rendered by the browser.
|
2017-04-20 21:28:17 +02:00
|
|
|
BLINK_EXPORT static void SetUseExternalPopupMenus(bool);
|
|
|
|
+ virtual void SetUseExternalPopupMenusThisInstance(bool) = 0;
|
2014-09-04 19:53:40 +02:00
|
|
|
|
2016-10-21 21:52:29 +02:00
|
|
|
// Hides any popup (suggestions, selects...) that might be showing.
|
2017-04-20 21:28:17 +02:00
|
|
|
virtual void HidePopups() = 0;
|
2018-03-20 21:15:08 +01:00
|
|
|
@@ -391,6 +392,8 @@ class WebView : protected WebWidget {
|
2018-02-22 18:59:06 +01:00
|
|
|
unsigned inactive_background_color,
|
|
|
|
unsigned inactive_foreground_color) = 0;
|
|
|
|
|
|
|
|
+ virtual void SetBaseBackgroundColor(WebColor color) = 0;
|
|
|
|
+
|
|
|
|
// Modal dialog support ------------------------------------------------
|
|
|
|
|
|
|
|
// Call these methods before and after running a nested, modal event loop
|