[orca] Fix for bug 664557 - Orca does not always reflect the caret location in braille for WebKitGtk conten
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug 664557 - Orca does not always reflect the caret location in braille for WebKitGtk conten
- Date: Wed, 8 Aug 2012 19:23:48 +0000 (UTC)
commit c2b5a80509aefca19dbdd882105e558f4315bb10
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Aug 8 21:23:34 2012 +0200
Fix for bug 664557 - Orca does not always reflect the caret location in braille for WebKitGtk content
src/orca/scripts/toolkits/WebKitGtk/script.py | 6 ++++--
.../scripts/toolkits/WebKitGtk/script_utilities.py | 8 ++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/WebKitGtk/script.py b/src/orca/scripts/toolkits/WebKitGtk/script.py
index e70d5f8..b72de44 100644
--- a/src/orca/scripts/toolkits/WebKitGtk/script.py
+++ b/src/orca/scripts/toolkits/WebKitGtk/script.py
@@ -697,7 +697,8 @@ class Script(default.Script):
return
if not self.utilities.isWebKitGtk(obj) \
- or not self.utilities.isInlineContainer(obj):
+ or (not self.utilities.isInlineContainer(obj) \
+ and not self.utilities.isTextListItem(obj)):
default.Script.updateBraille(self, obj, extraRegion)
return
@@ -711,7 +712,8 @@ class Script(default.Script):
if not brailleLine.regions:
[regions, fRegion] = self.brailleGenerator.generateBraille(
obj, role=pyatspi.ROLE_PARAGRAPH)
- self.addBrailleRegionsToLine(regions, brailleLine)
+ self.addBrailleRegionsToLine(regions, brailleLine)
+ self.setBrailleFocus(fRegion)
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 1b48846..bc8a2b5 100644
--- a/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
+++ b/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
@@ -207,6 +207,14 @@ class Utilities(script_utilities.Utilities):
return nextObj
+ def isTextListItem(self, obj):
+ """Returns True if obj is an item in a non-selectable list."""
+
+ if obj.getRole() != pyatspi.ROLE_LIST_ITEM:
+ return False
+
+ return not obj.parent.getState().contains(pyatspi.STATE_FOCUSABLE)
+
def isInlineContainer(self, obj):
"""Returns True if obj is an inline/non-wrapped container."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]