[orca/gnome-2-28] Fix for bgo#593594 - Orca says "blank" when Firefox returns a bogus value for getTextAtOffset
- From: Joanmarie Diggs <joanied src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [orca/gnome-2-28] Fix for bgo#593594 - Orca says "blank" when Firefox returns a bogus value for getTextAtOffset
- Date: Thu, 24 Sep 2009 23:17:41 +0000 (UTC)
commit 818cb8ac7729209425065840f8a4fbbcde391950
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Sun Aug 30 20:53:38 2009 -0400
Fix for bgo#593594 - Orca says "blank" when Firefox returns a bogus value for getTextAtOffset
src/orca/scripts/toolkits/Gecko/script.py | 10 ++++++++++
test/keystrokes/firefox/dojo_slider.py | 9 ++++-----
test/keystrokes/firefox/line_nav_bug_547573.py | 7 ++++---
3 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 4b33c07..f137c62 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -5479,6 +5479,16 @@ class Script(default.Script):
if not (start <= offset < end):
[line, start, end] = text.getTextAfterOffset(end, boundary)
+ # If we're still seeing bogusity, which we only seem to see when
+ # moving up, locate the previous character and use it instead.
+ #
+ if not (start <= offset < end):
+ pObj, pOffset = self.findPreviousCaretInOrder(obj, offset)
+ if pObj:
+ obj, offset = pObj, pOffset
+ text = self.queryNonEmptyText(obj)
+ [line, start, end] = text.getTextAtOffset(offset, boundary)
+
if start <= offset < end:
# So far so good. If the line doesn't begin with an EOC, we
# have our first character for this object.
diff --git a/test/keystrokes/firefox/dojo_slider.py b/test/keystrokes/firefox/dojo_slider.py
index 0478f91..a676810 100644
--- a/test/keystrokes/firefox/dojo_slider.py
+++ b/test/keystrokes/firefox/dojo_slider.py
@@ -192,17 +192,16 @@ sequence.append(utils.AssertPresentationAction(
########################################################################
# Tab to the next entry between the sliders.
-# [[[Bug?: not labeling properly.]]]
#
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(PauseAction(1000))
sequence.append(utils.AssertPresentationAction(
"move to entry",
- ["BRAILLE LINE: '10.0% $l rdonly'",
- " VISIBLE: '10.0% $l rdonly', cursor=0",
- "BRAILLE LINE: '10.0% $l rdonly'",
- " VISIBLE: '10.0% $l rdonly', cursor=0",
+ ["BRAILLE LINE: 'Slider1 Value: 10.0% $l rdonly'",
+ " VISIBLE: 'Slider1 Value: 10.0% $l rdonly', cursor=0",
+ "BRAILLE LINE: 'Slider1 Value: 10.0% $l rdonly'",
+ " VISIBLE: 'Slider1 Value: 10.0% $l rdonly', cursor=0",
"SPEECH OUTPUT: 'Slider1 Value: read only text 10.0% selected'"]))
########################################################################
diff --git a/test/keystrokes/firefox/line_nav_bug_547573.py b/test/keystrokes/firefox/line_nav_bug_547573.py
index 2e96531..5cd6840 100644
--- a/test/keystrokes/firefox/line_nav_bug_547573.py
+++ b/test/keystrokes/firefox/line_nav_bug_547573.py
@@ -137,7 +137,7 @@ sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
"12. Line Down",
["BRAILLE LINE: 'Â Â Â Installation of Self-Extracting Binary'",
- " VISIBLE: 'Â Â Â Installation of Self-Extracti', cursor=1",
+ " VISIBLE: 'Â Â Â Installation of Self-Extracti', cursor=2",
"SPEECH OUTPUT: 'Â Â Â Installation of Self-Extracting Binary link ",
"'"]))
@@ -1567,8 +1567,9 @@ sequence.append(KeyComboAction("Up"))
sequence.append(utils.AssertPresentationAction(
"82. Line Up",
["BRAILLE LINE: 'Installation of Self-Extracting Binary'",
- " VISIBLE: 'Installation of Self-Extracting ', cursor=0",
- "SPEECH OUTPUT: 'blank'"]))
+ " VISIBLE: 'Installation of Self-Extracting ', cursor=1",
+ "SPEECH OUTPUT: 'Installation of Self-Extracting Binary link ",
+ "'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]