From e50e838fd4d3b7592f84ae846a9975ada5fb09c9 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Tue, 15 Jul 2014 17:55:08 +0200 Subject: Implement accessibility hit testing childAt needs to return any child at the given coordinates. Change-Id: I19bfbd24a9bfc868fd1602f058cb9ce873ceef52 Reviewed-by: Andras Becsi --- src/core/browser_accessibility_qt.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core') diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp index b48cbeeb9..106a71d4c 100644 --- a/src/core/browser_accessibility_qt.cpp +++ b/src/core/browser_accessibility_qt.cpp @@ -68,6 +68,12 @@ QObject *BrowserAccessibilityQt::object() const QAccessibleInterface *BrowserAccessibilityQt::childAt(int x, int y) const { + for (int i = 0; i < childCount(); ++i) { + QAccessibleInterface *childIface = child(i); + Q_ASSERT(childIface); + if (childIface->rect().contains(x,y)) + return childIface; + } return 0; } -- cgit v1.2.3