[orca] Chromium: Clear the cache of the status bar before examining find results



commit 60718ef0df8c5acc17222a120b4bffdf0b94b64d
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Aug 1 13:55:45 2019 -0400

    Chromium: Clear the cache of the status bar before examining find results

 src/orca/scripts/toolkits/Chromium/script_utilities.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Chromium/script_utilities.py 
b/src/orca/scripts/toolkits/Chromium/script_utilities.py
index b81eac102..b03e5cab0 100644
--- a/src/orca/scripts/toolkits/Chromium/script_utilities.py
+++ b/src/orca/scripts/toolkits/Chromium/script_utilities.py
@@ -367,12 +367,14 @@ class Utilities(web.Utilities):
         if not root:
             return ""
 
-        isMatch = lambda x: x and x.getRole() == pyatspi.ROLE_STATUS_BAR \
-                  and len(re.findall("\d+", x.name)) == 2
+        isMatch = lambda x: x and x.getRole() == pyatspi.ROLE_STATUS_BAR
         statusBars = self.findAllDescendants(root, isMatch)
-        if len(statusBars) == 1:
-            statusBars[0].clearCache()
-            return statusBars[0].name
+        if len(statusBars) != 1:
+            return ""
+
+        bar = statusBars[0]
+        if len(re.findall("\d+", bar.name)) == 2:
+            return bar.name
 
         return ""
 


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