2017-05-31 17:33:30 +02:00
|
|
|
diff --git third_party/WebKit/Source/core/exported/WebViewBase.h third_party/WebKit/Source/core/exported/WebViewBase.h
|
2017-07-27 01:19:27 +02:00
|
|
|
index 5b6db09f..73c2260 100644
|
2017-05-31 17:33:30 +02:00
|
|
|
--- third_party/WebKit/Source/core/exported/WebViewBase.h
|
|
|
|
+++ third_party/WebKit/Source/core/exported/WebViewBase.h
|
2017-07-27 01:19:27 +02:00
|
|
|
@@ -157,7 +157,7 @@ class WebViewBase : public WebView, public RefCounted<WebViewBase> {
|
2017-05-31 17:33:30 +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).
|
|
|
|
- static bool UseExternalPopupMenus();
|
|
|
|
+ virtual bool UseExternalPopupMenus() const = 0;
|
|
|
|
|
|
|
|
virtual GraphicsLayer* RootGraphicsLayer() = 0;
|
|
|
|
virtual void RegisterViewportLayersWithCompositor() = 0;
|
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-07-27 01:19:27 +02:00
|
|
|
index cf36ed93..e508f14 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
|
|
|
+++ third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
2017-07-27 01:19:27 +02:00
|
|
|
@@ -781,7 +781,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
2017-05-31 17:33:30 +02:00
|
|
|
return nullptr;
|
|
|
|
|
2017-04-20 21:28:17 +02:00
|
|
|
NotifyPopupOpeningObservers();
|
2017-05-31 17:33:30 +02:00
|
|
|
- if (WebViewBase::UseExternalPopupMenus())
|
2017-04-20 21:28:17 +02:00
|
|
|
+ if (web_view_->UseExternalPopupMenus())
|
|
|
|
return new ExternalPopupMenu(frame, select, *web_view_);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2017-07-27 01:19:27 +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-07-27 01:19:27 +02:00
|
|
|
index f7fc7dd..7aa4f01 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/WebKit/Source/web/WebViewImpl.cpp
|
|
|
|
+++ third_party/WebKit/Source/web/WebViewImpl.cpp
|
2017-07-27 01:19:27 +02:00
|
|
|
@@ -320,6 +320,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-07-27 01:19:27 +02:00
|
|
|
@@ -3644,12 +3645,13 @@ void WebViewImpl::MainFrameScrollOffsetChanged() {
|
2017-04-20 21:28:17 +02:00
|
|
|
dev_tools_emulator_->MainFrameScrollOrScaleChanged();
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2017-05-31 17:33:30 +02:00
|
|
|
-bool WebViewBase::UseExternalPopupMenus() {
|
|
|
|
- return WebViewImpl::UseExternalPopupMenus();
|
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;
|
2017-05-31 17:33:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
-bool WebViewImpl::UseExternalPopupMenus() {
|
2017-04-20 21:28:17 +02:00
|
|
|
- return g_should_use_external_popup_menus;
|
2017-05-31 17:33:30 +02:00
|
|
|
+bool WebViewImpl::UseExternalPopupMenus() const {
|
2017-04-20 21:28:17 +02:00
|
|
|
+ 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-07-27 01:19:27 +02:00
|
|
|
index 5ea6e7b..5c7b4d8 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/WebKit/Source/web/WebViewImpl.h
|
|
|
|
+++ third_party/WebKit/Source/web/WebViewImpl.h
|
2017-07-27 01:19:27 +02:00
|
|
|
@@ -345,7 +345,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);
|
2017-05-31 17:33:30 +02:00
|
|
|
+ bool UseExternalPopupMenus() const override;
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2017-05-31 17:33:30 +02:00
|
|
|
bool ShouldAutoResize() const override { return should_auto_resize_; }
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2017-07-27 01:19:27 +02:00
|
|
|
@@ -637,6 +638,8 @@ class WEB_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-04-27 03:59:52 +02:00
|
|
|
diff --git third_party/WebKit/public/web/WebView.h third_party/WebKit/public/web/WebView.h
|
2017-07-27 01:19:27 +02:00
|
|
|
index 1917509..536c147 100644
|
2017-04-27 03:59:52 +02:00
|
|
|
--- third_party/WebKit/public/web/WebView.h
|
|
|
|
+++ third_party/WebKit/public/web/WebView.h
|
2017-07-27 01:19:27 +02:00
|
|
|
@@ -374,6 +374,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;
|