[orca] Fix for bug 677615 - In Firefox, www.google.com links not presented in braille
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug 677615 - In Firefox, www.google.com links not presented in braille
- Date: Wed, 9 Jan 2013 20:57:00 +0000 (UTC)
commit 79417d542970de5fd7f854caa05cc4d1f07a27d0
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Jan 9 15:56:25 2013 -0500
Fix for bug 677615 - In Firefox, www.google.com links not presented in braille
src/orca/scripts/toolkits/Gecko/script.py | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index c801cab..9688cfb 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -1216,6 +1216,10 @@ class Script(default.Script):
accessible text specialization, the characterOffset value
is meaningless (and typically -1)."""
+ text = self.utilities.queryNonEmptyText(event.source)
+ if not text:
+ return
+
eventSourceRole = event.source.getRole()
eventSourceState = event.source.getState()
eventSourceInDocument = self.inDocumentContent(event.source)
@@ -3297,7 +3301,14 @@ class Script(default.Script):
return self.findFirstCaretContext(obj, characterOffset + 1)
try:
childIndex = self.getChildIndex(obj, characterOffset)
- return self.findFirstCaretContext(obj[childIndex], 0)
+
+ # Handle bogus empty paragraphs.
+ child = obj[childIndex]
+ if child.getRole() == pyatspi.ROLE_PARAGRAPH \
+ and not self.utilities.queryNonEmptyText(child):
+ return self.findFirstCaretContext(obj, characterOffset + 1)
+
+ return self.findFirstCaretContext(child, 0)
except:
return [obj, -1]
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]