2014-09-04 19:53:40 +02:00
|
|
|
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
|
2014-12-13 21:18:31 +01:00
|
|
|
index d98ab12..57c2e70 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- Source/web/ChromeClientImpl.cpp
|
|
|
|
+++ Source/web/ChromeClientImpl.cpp
|
2014-12-13 21:18:31 +01:00
|
|
|
@@ -726,7 +726,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2014-09-27 01:48:19 +02:00
|
|
|
PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client) const
|
2014-07-01 00:30:29 +02:00
|
|
|
{
|
|
|
|
- if (WebViewImpl::useExternalPopupMenus())
|
|
|
|
+ if (m_webView->useExternalPopupMenus())
|
2014-09-27 01:48:19 +02:00
|
|
|
return adoptRefWillBeNoop(new ExternalPopupMenu(frame, client, *m_webView));
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2014-09-27 01:48:19 +02:00
|
|
|
return adoptRefWillBeNoop(new PopupMenuChromium(frame, client));
|
2014-09-04 19:53:40 +02:00
|
|
|
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
|
2014-12-13 21:18:31 +01:00
|
|
|
index 3626eac..91b1d66 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- Source/web/WebViewImpl.cpp
|
|
|
|
+++ Source/web/WebViewImpl.cpp
|
2014-12-13 21:18:31 +01:00
|
|
|
@@ -386,6 +386,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
|
2014-07-01 00:30:29 +02:00
|
|
|
, m_fakePageScaleAnimationPageScaleFactor(0)
|
|
|
|
, m_fakePageScaleAnimationUseAnchor(false)
|
|
|
|
, m_contextMenuAllowed(false)
|
|
|
|
+ , m_shouldUseExternalPopupMenus(shouldUseExternalPopupMenus)
|
|
|
|
, m_doingDragAndDrop(false)
|
|
|
|
, m_ignoreInputEvents(false)
|
|
|
|
, m_compositorDeviceScaleFactorOverride(0)
|
2014-12-13 21:18:31 +01:00
|
|
|
@@ -3986,9 +3987,14 @@ void WebViewImpl::deviceOrPageScaleFactorChanged()
|
2014-07-02 20:25:22 +02:00
|
|
|
m_page->inspectorController().deviceOrPageScaleFactorChanged();
|
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
|
2014-12-13 21:18:31 +01:00
|
|
|
index 8229f02..d22bb85 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- Source/web/WebViewImpl.h
|
|
|
|
+++ Source/web/WebViewImpl.h
|
2014-12-13 21:18:31 +01:00
|
|
|
@@ -380,7 +380,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();
|
|
|
|
|
|
|
|
bool contextMenuAllowed() const
|
|
|
|
{
|
2014-12-13 21:18:31 +01:00
|
|
|
@@ -672,6 +673,8 @@ private:
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
bool m_contextMenuAllowed;
|
|
|
|
|
|
|
|
+ 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
|
2014-12-13 21:18:31 +01:00
|
|
|
index e6c4924..6df09db 100644
|
2014-09-04 19:53:40 +02:00
|
|
|
--- public/web/WebView.h
|
|
|
|
+++ public/web/WebView.h
|
2014-12-13 21:18:31 +01:00
|
|
|
@@ -407,6 +407,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;
|