92 lines
4.0 KiB
Diff
92 lines
4.0 KiB
Diff
diff --git third_party/WebKit/Source/core/exported/WebViewBase.h third_party/WebKit/Source/core/exported/WebViewBase.h
|
|
index ed45829..a43bd1e 100644
|
|
--- third_party/WebKit/Source/core/exported/WebViewBase.h
|
|
+++ third_party/WebKit/Source/core/exported/WebViewBase.h
|
|
@@ -151,7 +151,7 @@ class WebViewBase : public WebView, public RefCounted<WebViewBase> {
|
|
|
|
// 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();
|
|
+ virtual bool UseExternalPopupMenus() const = 0;
|
|
|
|
virtual GraphicsLayer* RootGraphicsLayer() = 0;
|
|
virtual void RegisterViewportLayersWithCompositor() = 0;
|
|
diff --git third_party/WebKit/Source/web/ChromeClientImpl.cpp third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
|
index 2a35f2c..dded520 100644
|
|
--- third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
|
+++ third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
|
@@ -935,7 +935,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
|
return nullptr;
|
|
|
|
NotifyPopupOpeningObservers();
|
|
- if (WebViewBase::UseExternalPopupMenus())
|
|
+ if (web_view_->UseExternalPopupMenus())
|
|
return new ExternalPopupMenu(frame, select, *web_view_);
|
|
|
|
DCHECK(RuntimeEnabledFeatures::pagePopupEnabled());
|
|
diff --git third_party/WebKit/Source/web/WebViewImpl.cpp third_party/WebKit/Source/web/WebViewImpl.cpp
|
|
index bd1490b..80b61b8 100644
|
|
--- third_party/WebKit/Source/web/WebViewImpl.cpp
|
|
+++ third_party/WebKit/Source/web/WebViewImpl.cpp
|
|
@@ -353,6 +353,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
|
|
enable_fake_page_scale_animation_for_testing_(false),
|
|
fake_page_scale_animation_page_scale_factor_(0),
|
|
fake_page_scale_animation_use_anchor_(false),
|
|
+ should_use_external_popup_menus_(g_should_use_external_popup_menus),
|
|
compositor_device_scale_factor_override_(0),
|
|
suppress_next_keypress_event_(false),
|
|
ime_accept_events_(true),
|
|
@@ -3689,12 +3690,13 @@ void WebViewImpl::MainFrameScrollOffsetChanged() {
|
|
dev_tools_emulator_->MainFrameScrollOrScaleChanged();
|
|
}
|
|
|
|
-bool WebViewBase::UseExternalPopupMenus() {
|
|
- return WebViewImpl::UseExternalPopupMenus();
|
|
+void WebViewImpl::SetUseExternalPopupMenusThisInstance(
|
|
+ bool useExternalPopupMenus) {
|
|
+ should_use_external_popup_menus_ = useExternalPopupMenus;
|
|
}
|
|
|
|
-bool WebViewImpl::UseExternalPopupMenus() {
|
|
- return g_should_use_external_popup_menus;
|
|
+bool WebViewImpl::UseExternalPopupMenus() const {
|
|
+ return should_use_external_popup_menus_;
|
|
}
|
|
|
|
void WebViewImpl::SetBackgroundColorOverride(WebColor color) {
|
|
diff --git third_party/WebKit/Source/web/WebViewImpl.h third_party/WebKit/Source/web/WebViewImpl.h
|
|
index 591da9f..df2c787 100644
|
|
--- third_party/WebKit/Source/web/WebViewImpl.h
|
|
+++ third_party/WebKit/Source/web/WebViewImpl.h
|
|
@@ -357,7 +357,8 @@ class WEB_EXPORT WebViewImpl final
|
|
|
|
// 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() const override;
|
|
|
|
bool ShouldAutoResize() const override { return should_auto_resize_; }
|
|
|
|
@@ -650,6 +651,8 @@ class WEB_EXPORT WebViewImpl final
|
|
float fake_page_scale_animation_page_scale_factor_;
|
|
bool fake_page_scale_animation_use_anchor_;
|
|
|
|
+ bool should_use_external_popup_menus_;
|
|
+
|
|
float compositor_device_scale_factor_override_;
|
|
TransformationMatrix device_emulation_transform_;
|
|
|
|
diff --git third_party/WebKit/public/web/WebView.h third_party/WebKit/public/web/WebView.h
|
|
index e790df6..4e57f29 100644
|
|
--- third_party/WebKit/public/web/WebView.h
|
|
+++ third_party/WebKit/public/web/WebView.h
|
|
@@ -398,6 +398,7 @@ class WebView : protected WebWidget {
|
|
|
|
// 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;
|