orca r4360 - in trunk: . src/orca src/orca/scripts/toolkits/Gecko



Author: joanied
Date: Thu Nov 20 19:21:23 2008
New Revision: 4360
URL: http://svn.gnome.org/viewvc/orca?rev=4360&view=rev

Log:
* src/orca/scripts/toolkits/Gecko/script.py:
  src/orca/liveregions.py:
  src/orca/structural_navigation.py:
  Fix for bug #558516 - Traceback when navigating on huge webpages.


Modified:
   trunk/ChangeLog
   trunk/src/orca/liveregions.py
   trunk/src/orca/scripts/toolkits/Gecko/script.py
   trunk/src/orca/structural_navigation.py

Modified: trunk/src/orca/liveregions.py
==============================================================================
--- trunk/src/orca/liveregions.py	(original)
+++ trunk/src/orca/liveregions.py	Thu Nov 20 19:21:23 2008
@@ -562,7 +562,10 @@
         else: return 'unknown'
 
     def _getAttrDictionary(self, obj):
-        return dict([attr.split(':', 1) for attr in obj.getAttributes()])
+        try:
+            return dict([attr.split(':', 1) for attr in obj.getAttributes()])
+        except:
+            return {}
     
     def _getPath(self, obj):
         """ Returns, as a tuple of integers, the path from the given object 

Modified: trunk/src/orca/scripts/toolkits/Gecko/script.py
==============================================================================
--- trunk/src/orca/scripts/toolkits/Gecko/script.py	(original)
+++ trunk/src/orca/scripts/toolkits/Gecko/script.py	Thu Nov 20 19:21:23 2008
@@ -2658,7 +2658,10 @@
         except:
             return None
         else:
-            return ihyperlink.getURI(0)
+            try:
+                return ihyperlink.getURI(0)
+            except:
+                return None
 
     def getDocumentFrameURI(self):
         """Returns the URI of the document frame that is active."""

Modified: trunk/src/orca/structural_navigation.py
==============================================================================
--- trunk/src/orca/structural_navigation.py	(original)
+++ trunk/src/orca/structural_navigation.py	Thu Nov 20 19:21:23 2008
@@ -1284,11 +1284,7 @@
         - obj: the accessible table whose caption we want.
         """
 
-        caption = None
-        for child in obj:
-            if child and (child.getRole() == pyatspi.ROLE_CAPTION):
-                caption = child
-
+        caption = obj.queryTable().caption
         try:
             caption.queryText()
         except:



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