diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-07-14 12:51:02 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-07-14 14:38:13 +0200 |
commit | c75c32cc9dff47b1230366e1044bdf6b5ba6495c (patch) | |
tree | 6a5f3b9f74041d5d83a9c810c4fe5d69cc271643 /src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp | |
parent | 31f41cf9b98b1ff3dde61e667693b2106b906e2c (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/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp')
-rw-r--r-- | src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp index 24c243d20..98c6265aa 100644 --- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp @@ -97,6 +97,12 @@ QRectF RenderWidgetHostViewQtDelegateWidget::screenRect() const return QRectF(x(), y(), width(), height()); } +QRectF RenderWidgetHostViewQtDelegateWidget::contentsRect() const +{ + QPointF pos = mapToGlobal(QPoint(0, 0)); + return QRectF(pos.x(), pos.y(), width(), height()); +} + void RenderWidgetHostViewQtDelegateWidget::setKeyboardFocus() { setFocus(); |