cef/patch/patches/webkit_popups.patch
Marshall Greenblatt 9af98fab45 Update to Chromium revision 788460a4 (#345352)
- Mac: 10.10 SDK is now required for building (see http://crbug.com/463170#c63).
  Older SDKs can be used for a short time by setting mac_sdk_min via GYP_DEFINES.
2015-08-26 12:42:54 -04:00

77 lines
2.7 KiB
Diff

diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
index 7f94b2d..1390a1f 100644
--- Source/web/ChromeClientImpl.cpp
+++ Source/web/ChromeClientImpl.cpp
@@ -801,7 +801,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
{
notifyPopupOpeningObservers();
- if (WebViewImpl::useExternalPopupMenus())
+ if (m_webView->useExternalPopupMenus())
return adoptRefWillBeNoop(new ExternalPopupMenu(frame, select, *m_webView));
ASSERT(RuntimeEnabledFeatures::pagePopupEnabled());
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
index c1d869d..e11d102 100644
--- Source/web/WebViewImpl.cpp
+++ Source/web/WebViewImpl.cpp
@@ -427,6 +427,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_fakePageScaleAnimationPageScaleFactor(0)
, m_fakePageScaleAnimationUseAnchor(false)
, m_contextMenuAllowed(false)
+ , m_shouldUseExternalPopupMenus(shouldUseExternalPopupMenus)
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
, m_compositorDeviceScaleFactorOverride(0)
@@ -3959,9 +3960,14 @@ void WebViewImpl::pageScaleFactorChanged()
m_client->pageScaleFactorChanged();
}
+void WebViewImpl::setUseExternalPopupMenusThisInstance(bool useExternalPopupMenus)
+{
+ m_shouldUseExternalPopupMenus = useExternalPopupMenus;
+}
+
bool WebViewImpl::useExternalPopupMenus()
{
- return shouldUseExternalPopupMenus;
+ return m_shouldUseExternalPopupMenus;
}
void WebViewImpl::startDragging(LocalFrame* frame,
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
index 98268d4..9b2f03a 100644
--- Source/web/WebViewImpl.h
+++ Source/web/WebViewImpl.h
@@ -394,7 +394,8 @@ public:
// 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
{
@@ -687,6 +688,8 @@ private:
bool m_contextMenuAllowed;
+ bool m_shouldUseExternalPopupMenus;
+
bool m_doingDragAndDrop;
bool m_ignoreInputEvents;
diff --git public/web/WebView.h public/web/WebView.h
index fac145a..0fc5c23 100644
--- public/web/WebView.h
+++ public/web/WebView.h
@@ -399,6 +399,7 @@ public:
// 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;