summaryrefslogtreecommitdiffstats
path: root/src/core/render_widget_host_view_qt.cpp
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@digia.com>2014-01-30 18:26:21 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-12 13:15:24 +0100
commit9c198939be1ef064d1a2430a4b9991f2fe16f359 (patch)
tree1b081d0379c82c8cc34a0d80aa2846e36f37951e /src/core/render_widget_host_view_qt.cpp
parentf2cd2e0a32e8da3a0fbff6271dd9c257d8e8867f (diff)
[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 <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/core/render_widget_host_view_qt.cpp')
-rw-r--r--src/core/render_widget_host_view_qt.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 4fb9a1fed..39c95098e 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -217,8 +217,8 @@ void RenderWidgetHostViewQt::SetSize(const gfx::Size& size)
void RenderWidgetHostViewQt::SetBounds(const gfx::Rect& rect)
{
// This is called when webkit has sent us a Move message.
- // if (IsPopup())
- // m_delegate->setGeometry(rect.x(), rect.y(), rect.width(), rect.height());
+ if (IsPopup())
+ m_delegate->move(QPoint(rect.x(), rect.y()));
SetSize(rect.size());
}
@@ -260,7 +260,8 @@ gfx::NativeViewAccessible RenderWidgetHostViewQt::GetNativeViewAccessible()
void RenderWidgetHostViewQt::Focus()
{
m_host->SetInputMethodActive(true);
- m_delegate->setKeyboardFocus();
+ if (!IsPopup())
+ m_delegate->setKeyboardFocus();
m_host->Focus();
}