2014-09-04 19:53:40 +02:00
|
|
|
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
|
2016-02-02 22:32:44 +01:00
|
|
|
index e728623..e0f051e 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- Source/web/ChromeClientImpl.cpp
|
|
|
|
+++ Source/web/ChromeClientImpl.cpp
|
2016-02-02 22:32:44 +01:00
|
|
|
@@ -825,7 +825,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
|
2015-08-14 16:41:08 +02:00
|
|
|
PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
|
2014-07-01 00:30:29 +02:00
|
|
|
{
|
2015-06-06 00:06:48 +02:00
|
|
|
notifyPopupOpeningObservers();
|
2014-07-01 00:30:29 +02:00
|
|
|
- if (WebViewImpl::useExternalPopupMenus())
|
|
|
|
+ if (m_webView->useExternalPopupMenus())
|
2015-08-14 16:41:08 +02:00
|
|
|
return adoptRefWillBeNoop(new ExternalPopupMenu(frame, select, *m_webView));
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2015-06-06 00:06:48 +02:00
|
|
|
ASSERT(RuntimeEnabledFeatures::pagePopupEnabled());
|
2014-09-04 19:53:40 +02:00
|
|
|
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
|
2016-02-02 22:32:44 +01:00
|
|
|
index 416f9d8..43934e3 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- Source/web/WebViewImpl.cpp
|
|
|
|
+++ Source/web/WebViewImpl.cpp
|
2016-01-06 20:20:54 +01:00
|
|
|
@@ -476,6 +476,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
|
2015-10-09 17:23:12 +02:00
|
|
|
, m_enableFakePageScaleAnimationForTesting(false)
|
2014-07-01 00:30:29 +02:00
|
|
|
, m_fakePageScaleAnimationPageScaleFactor(0)
|
|
|
|
, m_fakePageScaleAnimationUseAnchor(false)
|
|
|
|
+ , m_shouldUseExternalPopupMenus(shouldUseExternalPopupMenus)
|
|
|
|
, m_doingDragAndDrop(false)
|
|
|
|
, m_ignoreInputEvents(false)
|
|
|
|
, m_compositorDeviceScaleFactorOverride(0)
|
2016-02-02 22:32:44 +01:00
|
|
|
@@ -4138,9 +4139,14 @@ void WebViewImpl::pageScaleFactorChanged()
|
2015-03-19 23:06:16 +01:00
|
|
|
m_client->pageScaleFactorChanged();
|
2014-07-01 00:30:29 +02: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 19:53:40 +02:00
|
|
|
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
|
2016-02-02 22:32:44 +01:00
|
|
|
index cc4c325..b709524 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- Source/web/WebViewImpl.h
|
|
|
|
+++ Source/web/WebViewImpl.h
|
2016-02-02 22:32:44 +01:00
|
|
|
@@ -395,7 +395,8 @@ public:
|
2014-07-01 00:30: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();
|
|
|
|
|
2015-10-09 17:23:12 +02:00
|
|
|
bool shouldAutoResize() const
|
2014-07-01 00:30:29 +02:00
|
|
|
{
|
2016-02-02 22:32:44 +01:00
|
|
|
@@ -692,6 +693,8 @@ private:
|
2015-10-09 17:23:12 +02:00
|
|
|
float m_fakePageScaleAnimationPageScaleFactor;
|
|
|
|
bool m_fakePageScaleAnimationUseAnchor;
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
+ bool m_shouldUseExternalPopupMenus;
|
|
|
|
+
|
|
|
|
bool m_doingDragAndDrop;
|
|
|
|
|
|
|
|
bool m_ignoreInputEvents;
|
2014-09-04 19:53:40 +02:00
|
|
|
diff --git public/web/WebView.h public/web/WebView.h
|
2016-02-02 22:32:44 +01:00
|
|
|
index 18b2e9d..8b0b784 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- public/web/WebView.h
|
|
|
|
+++ public/web/WebView.h
|
2016-02-02 22:32:44 +01:00
|
|
|
@@ -408,6 +408,7 @@ public:
|
2014-09-04 19:53:40 +02: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;
|