[orca] Fix for bgo#591807 - Orca sometimes presents the previous line when Home/End is pressed in Gecko
- From: Joanmarie Diggs <joanied src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [orca] Fix for bgo#591807 - Orca sometimes presents the previous line when Home/End is pressed in Gecko
- Date: Fri, 14 Aug 2009 20:23:39 +0000 (UTC)
commit 359740d4e1082f3a9fe3b8910e2530731a04a98c
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Fri Aug 14 15:41:42 2009 -0400
Fix for bgo#591807 - Orca sometimes presents the previous line when Home/End is pressed in Gecko
src/orca/scripts/toolkits/Gecko/script.py | 6 ++----
test/keystrokes/firefox/bug_591807.py | 12 +++++-------
2 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index ab047c4..445b213 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -6374,8 +6374,7 @@ class Script(default.Script):
"""Positions the caret offset at the beginning of the line."""
[obj, characterOffset] = self.getCaretContext()
- line = self.currentLineContents \
- or self.getLineContentsAtOffset(obj, characterOffset)
+ line = self.getLineContentsAtOffset(obj, characterOffset)
obj, characterOffset = line[0][0], line[0][1]
self.setCaretPosition(obj, characterOffset)
if not isinstance(orca_state.lastInputEvent, input_event.BrailleEvent):
@@ -6386,8 +6385,7 @@ class Script(default.Script):
"""Positions the caret offset at the end of the line."""
[obj, characterOffset] = self.getCaretContext()
- line = self.currentLineContents \
- or self.getLineContentsAtOffset(obj, characterOffset)
+ line = self.getLineContentsAtOffset(obj, characterOffset)
obj, characterOffset = line[-1][0], line[-1][2] - 1
self.setCaretPosition(obj, characterOffset)
if not isinstance(orca_state.lastInputEvent, input_event.BrailleEvent):
diff --git a/test/keystrokes/firefox/bug_591807.py b/test/keystrokes/firefox/bug_591807.py
index e650e87..9443576 100644
--- a/test/keystrokes/firefox/bug_591807.py
+++ b/test/keystrokes/firefox/bug_591807.py
@@ -56,10 +56,9 @@ sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Home"))
sequence.append(utils.AssertPresentationAction(
"Home",
- ["BUG? - We should remain on the blank line.",
- "BRAILLE LINE: 'This is a test.'",
- " VISIBLE: 'This is a test.', cursor=1",
- "SPEECH OUTPUT: 'T'"]))
+ ["BRAILLE LINE: ''",
+ " VISIBLE: '', cursor=1",
+ "SPEECH OUTPUT: 'newline'"]))
########################################################################
# Press Control+Home to move to the top.
@@ -91,9 +90,8 @@ sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("End"))
sequence.append(utils.AssertPresentationAction(
"End",
- ["BUG? - We should remain on the blank line.",
- "BRAILLE LINE: 'This is a test.'",
- " VISIBLE: 'This is a test.', cursor=16",
+ ["BRAILLE LINE: ''",
+ " VISIBLE: '', cursor=1",
"SPEECH OUTPUT: 'newline'"]))
########################################################################
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]