diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-07-15 17:55:08 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-07-16 18:22:50 +0200 |
commit | e50e838fd4d3b7592f84ae846a9975ada5fb09c9 (patch) | |
tree | 76654b7ad97e33281d1b659a86c3aef0fe562713 /src/core/browser_accessibility_qt.cpp | |
parent | 7cf9586ca965cbc31373fcb473659cfec6178945 (diff) |
Implement accessibility hit testing
childAt needs to return any child at the given coordinates.
Change-Id: I19bfbd24a9bfc868fd1602f058cb9ce873ceef52
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/core/browser_accessibility_qt.cpp')
-rw-r--r-- | src/core/browser_accessibility_qt.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |