[orca/gnome-3-36] Chromium: Fix presentation of child position for Google Drive



commit 498abea6cf1c7fb84937ede6fb8c1cc3e9affc31
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Mar 2 20:25:38 2020 +0100

    Chromium: Fix presentation of child position for Google Drive
    
    (Firefox has one or two bugs which will prevent this from working there.)

 src/orca/scripts/web/script_utilities.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 70a9394a0..2cfcb695e 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -559,6 +559,13 @@ class Utilities(script_utilities.Utilities):
         if position is not None:
             return int(position)
 
+        if obj.getRole() == pyatspi.ROLE_TABLE_ROW:
+            rowindex = attrs.get('rowindex')
+            if rowindex is None and obj.childCount:
+                rowindex = self.objectAttributes(obj[0], False).get('rowindex')
+            if rowindex is not None:
+                return int(rowindex)
+
         return None
 
     def getSetSize(self, obj):
@@ -567,6 +574,11 @@ class Utilities(script_utilities.Utilities):
         if setsize is not None:
             return int(setsize)
 
+        if obj.getRole() == pyatspi.ROLE_TABLE_ROW:
+            rows, cols = self.rowAndColumnCount(self.getTable(obj))
+            if rows != -1:
+                return rows
+
         return None
 
     def _getID(self, obj):


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