[orca] Work around Gecko's multiple accessible objects for one functional window
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Work around Gecko's multiple accessible objects for one functional window
- Date: Thu, 18 Feb 2016 23:06:36 +0000 (UTC)
commit 7963344eaea09c1f0c4850286c0ca507af4fafd7
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Feb 18 18:05:06 2016 -0500
Work around Gecko's multiple accessible objects for one functional window
.../scripts/toolkits/Gecko/script_utilities.py | 27 ++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script_utilities.py
b/src/orca/scripts/toolkits/Gecko/script_utilities.py
index 65b2341..982a9c8 100644
--- a/src/orca/scripts/toolkits/Gecko/script_utilities.py
+++ b/src/orca/scripts/toolkits/Gecko/script_utilities.py
@@ -65,6 +65,33 @@ class Utilities(web.Utilities):
return int(attr[6:]) - 1
return -1
+ def isSameObject(self, obj1, obj2, comparePaths=False, ignoreNames=False):
+ if super().isSameObject(obj1, obj2, comparePaths, ignoreNames):
+ return True
+ try:
+ role1 = obj1.getRole()
+ role2 = obj2.getRole()
+ except:
+ msg = "GECKO: Exception getting role for %s and %s" % (obj1, obj2)
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return False
+
+ if not(role1 == role2 == pyatspi.ROLE_FRAME):
+ return False
+
+ try:
+ name1 = obj1.name
+ name2 = obj2.name
+ except:
+ msg = "GECKO: Exception getting name for %s and %s" % (obj1, obj2)
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return False
+
+ rv = name1 == name2
+ msg = "GECKO: Treating %s and %s as same object: %s" % (obj1, obj2, rv)
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return rv
+
def showingDescendants(self, parent):
"""Given an accessible object, returns a list of accessible children
that are actually showing/visible/pursable for flat review. We're
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]