[orca] Do not compare paths by default in isSameObject()
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Do not compare paths by default in isSameObject()
- Date: Tue, 16 Sep 2014 19:39:52 +0000 (UTC)
commit 723e4ec2a9336ceed186fdfbfbbbfc7964a0d6ab
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Sep 16 15:38:29 2014 -0400
Do not compare paths by default in isSameObject()
Too many false positives
src/orca/script_utilities.py | 4 ++--
.../scripts/toolkits/Gecko/script_utilities.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index ebd8faa..2652068 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -897,7 +897,7 @@ class Utilities:
return path1[0:index] == path2[0:index]
- def isSameObject(self, obj1, obj2):
+ def isSameObject(self, obj1, obj2, comparePaths=False):
if (obj1 == obj2):
return True
elif (not obj1) or (not obj2):
@@ -906,7 +906,7 @@ class Utilities:
try:
if (obj1.name != obj2.name) or (obj1.getRole() != obj2.getRole()):
return False
- if self._hasSamePath(obj1, obj2):
+ if comparePaths and self._hasSamePath(obj1, obj2):
return True
else:
# Comparing the extents of objects which claim to be different
diff --git a/src/orca/scripts/toolkits/Gecko/script_utilities.py
b/src/orca/scripts/toolkits/Gecko/script_utilities.py
index fcb542c..6207cf5 100644
--- a/src/orca/scripts/toolkits/Gecko/script_utilities.py
+++ b/src/orca/scripts/toolkits/Gecko/script_utilities.py
@@ -1015,7 +1015,7 @@ class Utilities(script_utilities.Utilities):
if not (root and obj):
return None
- isSame = lambda x: x and self.isSameObject(x, obj)
+ isSame = lambda x: x and self.isSameObject(x, obj, comparePaths=True)
if isSame(root):
replicant = root
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]