2017-04-27 03:59:52 +02:00
|
|
|
diff --git third_party/WebKit/Source/web/ChromeClientImpl.cpp third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
2017-04-20 21:28:17 +02:00
|
|
|
index ba81ee3..648d7ce 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
|
|
|
+++ third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
2017-04-20 21:28:17 +02:00
|
|
|
@@ -908,7 +908,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
|
|
|
|
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
2016-10-21 21:52:29 +02:00
|
|
|
HTMLSelectElement& select) {
|
2017-04-20 21:28:17 +02:00
|
|
|
NotifyPopupOpeningObservers();
|
|
|
|
- if (WebViewImpl::UseExternalPopupMenus())
|
|
|
|
+ if (web_view_->UseExternalPopupMenus())
|
|
|
|
return new ExternalPopupMenu(frame, select, *web_view_);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2016-10-21 21:52:29 +02:00
|
|
|
DCHECK(RuntimeEnabledFeatures::pagePopupEnabled());
|
2017-04-27 03:59:52 +02:00
|
|
|
diff --git third_party/WebKit/Source/web/WebViewImpl.cpp third_party/WebKit/Source/web/WebViewImpl.cpp
|
2017-04-20 21:28:17 +02:00
|
|
|
index 16ac66b..7053b54 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/WebKit/Source/web/WebViewImpl.cpp
|
|
|
|
+++ third_party/WebKit/Source/web/WebViewImpl.cpp
|
2017-04-20 21:28:17 +02:00
|
|
|
@@ -355,6 +355,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
|
|
|
|
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),
|
|
|
|
@@ -3743,8 +3744,13 @@ void WebViewImpl::MainFrameScrollOffsetChanged() {
|
|
|
|
dev_tools_emulator_->MainFrameScrollOrScaleChanged();
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2017-04-20 21:28:17 +02:00
|
|
|
+void WebViewImpl::SetUseExternalPopupMenusThisInstance(
|
2016-10-21 21:52:29 +02:00
|
|
|
+ bool useExternalPopupMenus) {
|
2017-04-20 21:28:17 +02:00
|
|
|
+ should_use_external_popup_menus_ = useExternalPopupMenus;
|
2014-07-01 00:30:29 +02:00
|
|
|
+}
|
|
|
|
+
|
2017-04-20 21:28:17 +02:00
|
|
|
bool WebViewImpl::UseExternalPopupMenus() {
|
|
|
|
- return g_should_use_external_popup_menus;
|
|
|
|
+ return should_use_external_popup_menus_;
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2017-04-20 21:28:17 +02:00
|
|
|
void WebViewImpl::SetBackgroundColorOverride(WebColor color) {
|
2017-04-27 03:59:52 +02:00
|
|
|
diff --git third_party/WebKit/Source/web/WebViewImpl.h third_party/WebKit/Source/web/WebViewImpl.h
|
2017-04-20 21:28:17 +02:00
|
|
|
index a22ef37..33dbab4 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/WebKit/Source/web/WebViewImpl.h
|
|
|
|
+++ third_party/WebKit/Source/web/WebViewImpl.h
|
2017-04-20 21:28:17 +02:00
|
|
|
@@ -362,7 +362,8 @@ class WEB_EXPORT WebViewImpl final
|
2014-07-01 00:30:29 +02:00
|
|
|
|
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);
|
|
|
|
+ bool UseExternalPopupMenus();
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2017-04-20 21:28:17 +02:00
|
|
|
bool ShouldAutoResize() const { return should_auto_resize_; }
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2017-04-20 21:28:17 +02:00
|
|
|
@@ -647,6 +648,8 @@ class WEB_EXPORT WebViewImpl final
|
|
|
|
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-04-27 03:59:52 +02:00
|
|
|
diff --git third_party/WebKit/public/web/WebView.h third_party/WebKit/public/web/WebView.h
|
2017-04-20 21:28:17 +02:00
|
|
|
index e811392..d6d5bf8 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/WebKit/public/web/WebView.h
|
|
|
|
+++ third_party/WebKit/public/web/WebView.h
|
2017-04-20 21:28:17 +02:00
|
|
|
@@ -403,6 +403,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;
|