summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-07-14 12:51:02 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-07-14 14:38:13 +0200
commitc75c32cc9dff47b1230366e1044bdf6b5ba6495c (patch)
tree6a5f3b9f74041d5d83a9c810c4fe5d69cc271643 /src/core
parent31f41cf9b98b1ff3dde61e667693b2106b906e2c (diff)
Fix RenderWidgetHostViewQt::GetViewBounds
GetViewBounds should return the bounds of the view, not the screen rect. The view bounds are for example used to calculate the screen position of accessible objects (which gets fixed with this patch). Change-Id: I5b342113af737847c1756a13183cd2b8b8db648a Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/render_widget_host_view_qt.cpp2
-rw-r--r--src/core/render_widget_host_view_qt_delegate.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index f29e36ae5..76d599ea2 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -316,7 +316,7 @@ bool RenderWidgetHostViewQt::IsShowing()
// Retrieve the bounds of the View, in screen coordinates.
gfx::Rect RenderWidgetHostViewQt::GetViewBounds() const
{
- QRectF p = m_delegate->screenRect();
+ QRectF p = m_delegate->contentsRect();
float s = dpiScale();
gfx::Point p1(floor(p.x() / s), floor(p.y() / s));
gfx::Point p2(ceil(p.right() /s), ceil(p.bottom() / s));
diff --git a/src/core/render_widget_host_view_qt_delegate.h b/src/core/render_widget_host_view_qt_delegate.h
index a8515e0e3..122b7c6eb 100644
--- a/src/core/render_widget_host_view_qt_delegate.h
+++ b/src/core/render_widget_host_view_qt_delegate.h
@@ -76,6 +76,7 @@ public:
virtual void initAsChild(WebContentsAdapterClient*) = 0;
virtual void initAsPopup(const QRect&) = 0;
virtual QRectF screenRect() const = 0;
+ virtual QRectF contentsRect() const = 0;
virtual void setKeyboardFocus() = 0;
virtual bool hasKeyboardFocus() = 0;
virtual void show() = 0;