From c75c32cc9dff47b1230366e1044bdf6b5ba6495c Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 14 Jul 2014 12:51:02 +0200 Subject: 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 Reviewed-by: Michael Bruning --- src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp') 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(); -- cgit v1.2.3