[orca] Fix for Orca not brailling text-only inline lists from WebKitGtk.



commit 09826a42c6b0beec4bdb7124e15ade9bd341bf31
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Aug 8 20:17:57 2012 +0200

    Fix for Orca not brailling text-only inline lists from WebKitGtk.

 src/orca/scripts/toolkits/WebKitGtk/script.py      |    5 +++++
 .../scripts/toolkits/WebKitGtk/script_utilities.py |   17 ++++++++++++-----
 2 files changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/WebKitGtk/script.py b/src/orca/scripts/toolkits/WebKitGtk/script.py
index 84b6bf9..e70d5f8 100644
--- a/src/orca/scripts/toolkits/WebKitGtk/script.py
+++ b/src/orca/scripts/toolkits/WebKitGtk/script.py
@@ -708,6 +708,11 @@ class Script(default.Script):
             [regions, fRegion] = self.brailleGenerator.generateBraille(child)
             self.addBrailleRegionsToLine(regions, brailleLine)
 
+        if not brailleLine.regions:
+            [regions, fRegion] = self.brailleGenerator.generateBraille(
+                obj, role=pyatspi.ROLE_PARAGRAPH)
+            self.addBrailleRegionsToLine(regions, brailleLine)            
+
         if extraRegion:
             self.addBrailleRegionToLine(extraRegion, brailleLine)
 
diff --git a/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py b/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
index 1df2d22..1b48846 100644
--- a/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
+++ b/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
@@ -210,9 +210,16 @@ class Utilities(script_utilities.Utilities):
     def isInlineContainer(self, obj):
         """Returns True if obj is an inline/non-wrapped container."""
 
-        if not obj.getRole() == pyatspi.ROLE_LIST \
-           or obj.getState().contains(pyatspi.STATE_FOCUSABLE) \
-           or obj.childCount <= 1:
-            return False
+        if obj.getRole() == pyatspi.ROLE_LIST:
+            if obj.getState().contains(pyatspi.STATE_FOCUSABLE):
+                return False
+
+            if not obj.childCount:
+                return 'Text' in pyatspi.utils.listInterfaces(obj)
+
+            if obj.childCount == 1:
+                return False
+
+            return self.onSameLine(obj[0], obj[1])
 
-        return self.onSameLine(obj[0], obj[1])
+        return False



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