[orca/gnome-3-6] Fix for bug 681294 - SayAll does not work as expected when focus is on a link in WebKitGtk content
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-6] Fix for bug 681294 - SayAll does not work as expected when focus is on a link in WebKitGtk content
- Date: Mon, 6 Aug 2012 13:09:38 +0000 (UTC)
commit 17d53b9be7333dd8a43b112a9eed35a7eec78434
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Aug 6 15:08:25 2012 +0200
Fix for bug 681294 - SayAll does not work as expected when focus is on a link in WebKitGtk content
src/orca/scripts/toolkits/WebKitGtk/script.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/WebKitGtk/script.py b/src/orca/scripts/toolkits/WebKitGtk/script.py
index 8dd8367..3172b3a 100644
--- a/src/orca/scripts/toolkits/WebKitGtk/script.py
+++ b/src/orca/scripts/toolkits/WebKitGtk/script.py
@@ -534,8 +534,17 @@ class Script(default.Script):
spoken and acss is an ACSS instance for speaking the text.
"""
+ if not obj:
+ return
+
+ if obj.getRole() == pyatspi.ROLE_LINK:
+ obj = obj.parent
+
document = utils.findAncestor(
obj, lambda x: x.getRole() == pyatspi.ROLE_DOCUMENT_FRAME)
+ if not document:
+ return
+
allTextObjs = utils.findAllDescendants(
document, lambda x: 'Text' in utils.listInterfaces(x))
allTextObjs = allTextObjs[allTextObjs.index(obj):len(allTextObjs)]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]