2014-09-04 19:53:40 +02:00
|
|
|
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
|
2017-03-28 20:02:31 +02:00
|
|
|
index 48385f8..a11804b 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- Source/web/ChromeClientImpl.cpp
|
|
|
|
+++ Source/web/ChromeClientImpl.cpp
|
2017-03-03 23:37:23 +01:00
|
|
|
@@ -898,7 +898,7 @@ bool ChromeClientImpl::hasOpenedPopup() const {
|
2016-10-21 21:52:29 +02:00
|
|
|
PopupMenu* ChromeClientImpl::openPopupMenu(LocalFrame& frame,
|
|
|
|
HTMLSelectElement& select) {
|
|
|
|
notifyPopupOpeningObservers();
|
|
|
|
- if (WebViewImpl::useExternalPopupMenus())
|
|
|
|
+ if (m_webView->useExternalPopupMenus())
|
|
|
|
return new ExternalPopupMenu(frame, select, *m_webView);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2016-10-21 21:52:29 +02:00
|
|
|
DCHECK(RuntimeEnabledFeatures::pagePopupEnabled());
|
2014-09-04 19:53:40 +02:00
|
|
|
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
|
2017-04-25 01:57:53 +02:00
|
|
|
index 5b5fef6..ef4f665 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- Source/web/WebViewImpl.cpp
|
|
|
|
+++ Source/web/WebViewImpl.cpp
|
2017-03-03 23:37:23 +01:00
|
|
|
@@ -357,6 +357,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
|
2016-10-21 21:52:29 +02:00
|
|
|
m_enableFakePageScaleAnimationForTesting(false),
|
|
|
|
m_fakePageScaleAnimationPageScaleFactor(0),
|
|
|
|
m_fakePageScaleAnimationUseAnchor(false),
|
|
|
|
+ m_shouldUseExternalPopupMenus(shouldUseExternalPopupMenus),
|
|
|
|
m_compositorDeviceScaleFactorOverride(0),
|
2017-01-23 18:36:54 +01:00
|
|
|
m_suppressNextKeypressEvent(false),
|
|
|
|
m_imeAcceptEvents(true),
|
2017-04-25 01:57:53 +02:00
|
|
|
@@ -3704,8 +3705,13 @@ void WebViewImpl::mainFrameScrollOffsetChanged() {
|
2016-10-21 21:52:29 +02:00
|
|
|
m_devToolsEmulator->mainFrameScrollOrScaleChanged();
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2016-10-21 21:52:29 +02:00
|
|
|
+void WebViewImpl::setUseExternalPopupMenusThisInstance(
|
|
|
|
+ bool useExternalPopupMenus) {
|
|
|
|
+ m_shouldUseExternalPopupMenus = useExternalPopupMenus;
|
2014-07-01 00:30:29 +02:00
|
|
|
+}
|
|
|
|
+
|
2016-10-21 21:52:29 +02:00
|
|
|
bool WebViewImpl::useExternalPopupMenus() {
|
|
|
|
- return shouldUseExternalPopupMenus;
|
|
|
|
+ return m_shouldUseExternalPopupMenus;
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2017-01-23 18:36:54 +01:00
|
|
|
void WebViewImpl::setBackgroundColorOverride(WebColor color) {
|
2014-09-04 19:53:40 +02:00
|
|
|
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
|
2017-04-25 01:57:53 +02:00
|
|
|
index 354e52e..c2058f3 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- Source/web/WebViewImpl.h
|
|
|
|
+++ Source/web/WebViewImpl.h
|
2017-04-25 01:57:53 +02:00
|
|
|
@@ -370,7 +370,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).
|
|
|
|
- static bool useExternalPopupMenus();
|
|
|
|
+ void setUseExternalPopupMenusThisInstance(bool);
|
|
|
|
+ bool useExternalPopupMenus();
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2016-10-21 21:52:29 +02:00
|
|
|
bool shouldAutoResize() const { return m_shouldAutoResize; }
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2017-04-25 01:57:53 +02:00
|
|
|
@@ -653,6 +654,8 @@ class WEB_EXPORT WebViewImpl final
|
2016-10-21 21:52:29 +02:00
|
|
|
float m_fakePageScaleAnimationPageScaleFactor;
|
|
|
|
bool m_fakePageScaleAnimationUseAnchor;
|
|
|
|
|
|
|
|
+ bool m_shouldUseExternalPopupMenus;
|
2014-07-01 00:30:29 +02:00
|
|
|
+
|
2017-01-23 18:36:54 +01:00
|
|
|
float m_compositorDeviceScaleFactorOverride;
|
|
|
|
TransformationMatrix m_deviceEmulationTransform;
|
|
|
|
|
2014-09-04 19:53:40 +02:00
|
|
|
diff --git public/web/WebView.h public/web/WebView.h
|
2017-03-03 23:37:23 +01:00
|
|
|
index 92bdf07..1a813a9 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- public/web/WebView.h
|
|
|
|
+++ public/web/WebView.h
|
2017-03-03 23:37:23 +01:00
|
|
|
@@ -402,6 +402,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.
|
|
|
|
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.
|
|
|
|
virtual void hidePopups() = 0;
|