[orca] Part of the fix for bgo#608150 - Firefox 3.6's changes to the hierarchy of tables needs to be handle



commit 3d9756754b924d0ecff388e5b32e0abadd13e9be
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Sun Feb 14 16:44:31 2010 -0500

    Part of the fix for bgo#608150 - Firefox 3.6's changes to the hierarchy of tables needs to be handled by Orca
    
    One issue is that table rows can now appear as list items in the hierarchy.
    getNextCellInfo was assuming the parent of the table cell would be a table.
    This fix merely stops the traceback. Additional smarts will need to be
    added to Orca's label guessing functionality.

 src/orca/scripts/toolkits/Gecko/script.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index ca235bc..9afde54 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -3938,11 +3938,15 @@ class Script(default.Script):
         text = ""
         extents = (0, 0, 0, 0)
         isField = False
-        if not cell or cell.getRole() != pyatspi.ROLE_TABLE_CELL:
+        parentTable = self.getAncestor(cell,
+                                       [pyatspi.ROLE_TABLE],
+                                       [pyatspi.ROLE_DOCUMENT_FRAME])
+        if not cell or cell.getRole() != pyatspi.ROLE_TABLE_CELL \
+           or not parentTable:
             return [newCell, text, extents, isField]
 
         [row, col] = self.getCellCoordinates(cell)
-        table = cell.parent.queryTable()
+        table = parentTable.queryTable()
         rowspan = table.getRowExtentAt(row, col)
         colspan = table.getColumnExtentAt(row, col)
         nextCell = None



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