[orca] Do not rely on displayedText() when determining if a table cell is blank



commit 40111b8e41774d0799ed16a5575586fc8118c83e
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Mar 11 09:56:46 2015 -0400

    Do not rely on displayedText() when determining if a table cell is blank

 src/orca/structural_navigation.py |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index f89b0e2..54c0384 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -1335,20 +1335,16 @@ class StructuralNavigation:
         - obj: the accessible table cell to examime
         """
 
-        if obj and obj.name:
+        if obj and (obj.name or obj.childCount):
             return False
 
-        text = self._script.utilities.displayedText(obj)
-        if text and len(text.strip()) and text != obj.name:
-            return False
+        try:
+            text = obj.queryText()
+        except:
+            pass
         else:
-            for child in obj:
-                if child.getRole() in [pyatspi.ROLE_TABLE, pyatspi.ROLE_PANEL]:
-                    return False
-                text = self._script.utilities.displayedText(child)
-                if text and len(text.strip()) \
-                   or child.getRole() == pyatspi.ROLE_LINK:
-                    return False
+            if text.getText(0, -1).strip():
+                return False
 
         return True
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]