From 9c198939be1ef064d1a2430a4b9991f2fe16f359 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Thu, 30 Jan 2014 18:26:21 +0100 Subject: [Widgets] RenderWidgetHostViewQtDelegate refactoring Break up the delegate implementation into two distinct subclasses. The first one offers a way for the WebPage to tap into the RenderWidgetHostView directly, while a different implementation that is backed by a top-level widget can be used to show WebUI popups on screen. This has the benefit of not having a child widget in the webview among other things. It also fixes our popups and allows them to fall outside the window frame. Change-Id: I80dc1e4f21bb91ff47c75a626d330f88eacce8c6 Reviewed-by: Jocelyn Turcotte --- src/webengine/api/qquickwebengineview_p_p.h | 1 + src/webengine/render_widget_host_view_qt_delegate_quick.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'src/webengine') diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h index f61e439d0..c7fecd477 100644 --- a/src/webengine/api/qquickwebengineview_p_p.h +++ b/src/webengine/api/qquickwebengineview_p_p.h @@ -132,6 +132,7 @@ public: UIDelegatesManager *ui(); virtual RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegate(RenderWidgetHostViewQtDelegateClient *client, RenderingMode) Q_DECL_OVERRIDE; + virtual RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegateForPopup(RenderWidgetHostViewQtDelegateClient *client, RenderingMode mode) Q_DECL_OVERRIDE { return CreateRenderWidgetHostViewQtDelegate(client, mode); } virtual void titleChanged(const QString&) Q_DECL_OVERRIDE; virtual void urlChanged(const QUrl&) Q_DECL_OVERRIDE; virtual void iconChanged(const QUrl&) Q_DECL_OVERRIDE; diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.h b/src/webengine/render_widget_host_view_qt_delegate_quick.h index 8f32689d0..9edcb1819 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.h +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.h @@ -135,6 +135,8 @@ public: return false; } + virtual void move(const QPoint&) Q_DECL_OVERRIDE {} + void focusInEvent(QFocusEvent *event) { m_client->forwardEvent(event); -- cgit v1.2.3