mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			77 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			77 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
 | 
						|
index 606a744..4003e49 100644
 | 
						|
--- Source/web/ChromeClientImpl.cpp
 | 
						|
+++ Source/web/ChromeClientImpl.cpp
 | 
						|
@@ -775,7 +775,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
 | 
						|
 
 | 
						|
 PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client)
 | 
						|
 {
 | 
						|
-    if (WebViewImpl::useExternalPopupMenus())
 | 
						|
+    if (m_webView->useExternalPopupMenus())
 | 
						|
         return adoptRefWillBeNoop(new ExternalPopupMenu(frame, client, *m_webView));
 | 
						|
 
 | 
						|
     if (RuntimeEnabledFeatures::htmlPopupMenuEnabled() && RuntimeEnabledFeatures::pagePopupEnabled())
 | 
						|
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
 | 
						|
index 8ab4888..17428a5 100644
 | 
						|
--- Source/web/WebViewImpl.cpp
 | 
						|
+++ Source/web/WebViewImpl.cpp
 | 
						|
@@ -396,6 +396,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)
 | 
						|
@@ -4044,9 +4045,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 3bba907..07f8c99 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
 | 
						|
     {
 | 
						|
@@ -690,6 +691,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 a7e9f99..f671362 100644
 | 
						|
--- public/web/WebView.h
 | 
						|
+++ public/web/WebView.h
 | 
						|
@@ -403,6 +403,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;
 |