2014-09-04 17:53:40 +00:00
|
|
|
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
|
2016-07-21 17:21:32 -04:00
|
|
|
index da897ce..c1d6cf8 100644
|
2014-09-04 17:53:40 +00:00
|
|
|
--- Source/web/ChromeClientImpl.cpp
|
|
|
|
+++ Source/web/ChromeClientImpl.cpp
|
2016-07-21 17:21:32 -04:00
|
|
|
@@ -843,7 +843,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
|
2016-04-27 16:38:52 -04:00
|
|
|
PopupMenu* ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
|
2014-06-30 22:30:29 +00:00
|
|
|
{
|
2015-06-05 18:06:48 -04:00
|
|
|
notifyPopupOpeningObservers();
|
2014-06-30 22:30:29 +00:00
|
|
|
- if (WebViewImpl::useExternalPopupMenus())
|
|
|
|
+ if (m_webView->useExternalPopupMenus())
|
2016-04-27 16:38:52 -04:00
|
|
|
return new ExternalPopupMenu(frame, select, *m_webView);
|
2014-06-30 22:30:29 +00:00
|
|
|
|
2016-04-27 16:38:52 -04:00
|
|
|
DCHECK(RuntimeEnabledFeatures::pagePopupEnabled());
|
2014-09-04 17:53:40 +00:00
|
|
|
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
|
2016-07-21 17:21:32 -04:00
|
|
|
index fcb4d10..dea498b 100644
|
2014-09-04 17:53:40 +00:00
|
|
|
--- Source/web/WebViewImpl.cpp
|
|
|
|
+++ Source/web/WebViewImpl.cpp
|
2016-07-06 15:34:09 -04:00
|
|
|
@@ -422,6 +422,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebPageVisibilityState visibilit
|
2015-10-09 11:23:12 -04:00
|
|
|
, m_enableFakePageScaleAnimationForTesting(false)
|
2014-06-30 22:30:29 +00:00
|
|
|
, m_fakePageScaleAnimationPageScaleFactor(0)
|
|
|
|
, m_fakePageScaleAnimationUseAnchor(false)
|
|
|
|
+ , m_shouldUseExternalPopupMenus(shouldUseExternalPopupMenus)
|
|
|
|
, m_doingDragAndDrop(false)
|
|
|
|
, m_ignoreInputEvents(false)
|
|
|
|
, m_compositorDeviceScaleFactorOverride(0)
|
2016-07-21 17:21:32 -04:00
|
|
|
@@ -4108,9 +4109,14 @@ void WebViewImpl::pageScaleFactorChanged()
|
2015-03-19 18:06:16 -04:00
|
|
|
m_client->pageScaleFactorChanged();
|
2014-06-30 22:30:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
+void WebViewImpl::setUseExternalPopupMenusThisInstance(bool useExternalPopupMenus)
|
|
|
|
+{
|
|
|
|
+ m_shouldUseExternalPopupMenus = useExternalPopupMenus;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
bool WebViewImpl::useExternalPopupMenus()
|
|
|
|
{
|
|
|
|
- return shouldUseExternalPopupMenus;
|
|
|
|
+ return m_shouldUseExternalPopupMenus;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WebViewImpl::startDragging(LocalFrame* frame,
|
2014-09-04 17:53:40 +00:00
|
|
|
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
|
2016-07-21 17:21:32 -04:00
|
|
|
index 5292560..08e6afe 100644
|
2014-09-04 17:53:40 +00:00
|
|
|
--- Source/web/WebViewImpl.h
|
|
|
|
+++ Source/web/WebViewImpl.h
|
2016-07-21 17:21:32 -04:00
|
|
|
@@ -382,7 +382,8 @@ public:
|
2014-06-30 22:30:29 +00: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();
|
|
|
|
|
2015-10-09 11:23:12 -04:00
|
|
|
bool shouldAutoResize() const
|
2014-06-30 22:30:29 +00:00
|
|
|
{
|
2016-07-21 17:21:32 -04:00
|
|
|
@@ -678,6 +679,8 @@ private:
|
2015-10-09 11:23:12 -04:00
|
|
|
float m_fakePageScaleAnimationPageScaleFactor;
|
|
|
|
bool m_fakePageScaleAnimationUseAnchor;
|
2014-06-30 22:30:29 +00:00
|
|
|
|
|
|
|
+ bool m_shouldUseExternalPopupMenus;
|
|
|
|
+
|
|
|
|
bool m_doingDragAndDrop;
|
|
|
|
|
|
|
|
bool m_ignoreInputEvents;
|
2014-09-04 17:53:40 +00:00
|
|
|
diff --git public/web/WebView.h public/web/WebView.h
|
2016-07-21 17:21:32 -04:00
|
|
|
index 4f81bb6..66f1b2d 100644
|
2014-09-04 17:53:40 +00:00
|
|
|
--- public/web/WebView.h
|
|
|
|
+++ public/web/WebView.h
|
2016-07-21 17:21:32 -04:00
|
|
|
@@ -437,6 +437,7 @@ public:
|
2014-09-04 17:53:40 +00: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;
|