[orca] Skip over anchors when looking for next/previous caret context
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Skip over anchors when looking for next/previous caret context
- Date: Thu, 23 Jul 2015 23:22:56 +0000 (UTC)
commit 419cb4854a0ce8817cd0e0f1c07c1d0b680a370d
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Jul 23 16:57:57 2015 -0400
Skip over anchors when looking for next/previous caret context
src/orca/scripts/web/script_utilities.py | 4 ++--
test/html/FirefoxProfile/prefs.js | 1 +
.../firefox/line_nav_empty_block_link.py | 14 ++++++--------
test/keystrokes/firefox/line_nav_sun_java.py | 1 +
test/keystrokes/firefox/line_nav_wiki_down.py | 5 +++--
5 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 109ddb2..478c618 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -2134,7 +2134,7 @@ class Utilities(script_utilities.Utilities):
allText = text.getText(0, -1)
for i in range(offset + 1, len(allText)):
child = self.getChildAtOffset(obj, i)
- if child and not self.isZombie(child):
+ if child and not self.isZombie(child) and not self.isAnchor(child):
return self.findNextCaretInOrder(child, -1)
if allText[i] != self.EMBEDDED_OBJECT_CHARACTER:
return obj, i
@@ -2186,7 +2186,7 @@ class Utilities(script_utilities.Utilities):
offset = len(allText)
for i in range(offset - 1, -1, -1):
child = self.getChildAtOffset(obj, i)
- if child and not self.isZombie(child):
+ if child and not self.isZombie(child) and not self.isAnchor(child):
return self.findPreviousCaretInOrder(child, -1)
if allText[i] != self.EMBEDDED_OBJECT_CHARACTER:
return obj, i
diff --git a/test/html/FirefoxProfile/prefs.js b/test/html/FirefoxProfile/prefs.js
index b7e0c91..522a857 100644
--- a/test/html/FirefoxProfile/prefs.js
+++ b/test/html/FirefoxProfile/prefs.js
@@ -54,6 +54,7 @@ user_pref("spellchecker.dictionary", "en_US");
user_pref("toolkit.telemetry.prompted", 2);
user_pref("toolkit.telemetry.rejected", true);
user_pref("toolkit.telemetry.enabled", false);
+user_pref("browser.reader.detectedFirstArticle", true);
pref("datareporting.healthreport.service.enabled", false);
pref("datareporting.healthreport.uploadEnabled", false);
pref("datareporting.healthreport.service.firstRun", false);
diff --git a/test/keystrokes/firefox/line_nav_empty_block_link.py
b/test/keystrokes/firefox/line_nav_empty_block_link.py
index 4499569..8f143c7 100644
--- a/test/keystrokes/firefox/line_nav_empty_block_link.py
+++ b/test/keystrokes/firefox/line_nav_empty_block_link.py
@@ -21,19 +21,17 @@ sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
"2. Line Down",
- ["KNOWN ISSUE: This is broken",
- "BRAILLE LINE: ''",
- " VISIBLE: '', cursor=0",
- "SPEECH OUTPUT: 'blank'"]))
+ ["BRAILLE LINE: 'line 2'",
+ " VISIBLE: 'line 2', cursor=1",
+ "SPEECH OUTPUT: 'line 2'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(utils.AssertPresentationAction(
"3. Line Up",
- ["KNOWN ISSUE: This is broken",
- "BRAILLE LINE: ''",
- " VISIBLE: '', cursor=0",
- "SPEECH OUTPUT: 'blank'"]))
+ ["BRAILLE LINE: 'line 1'",
+ " VISIBLE: 'line 1', cursor=1",
+ "SPEECH OUTPUT: 'line 1'"]))
sequence.append(utils.AssertionSummaryAction())
sequence.start()
diff --git a/test/keystrokes/firefox/line_nav_sun_java.py b/test/keystrokes/firefox/line_nav_sun_java.py
index af67eac..98f38d3 100644
--- a/test/keystrokes/firefox/line_nav_sun_java.py
+++ b/test/keystrokes/firefox/line_nav_sun_java.py
@@ -11,6 +11,7 @@ sequence = MacroSequence()
# run via the test harness rather than manually.
sequence.append(KeyComboAction("<Control>r"))
sequence.append(KeyComboAction("<Control>Home"))
+sequence.append(KeyComboAction("Down"))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
diff --git a/test/keystrokes/firefox/line_nav_wiki_down.py b/test/keystrokes/firefox/line_nav_wiki_down.py
index 2cc3a2f..9454775 100644
--- a/test/keystrokes/firefox/line_nav_wiki_down.py
+++ b/test/keystrokes/firefox/line_nav_wiki_down.py
@@ -13,11 +13,12 @@ sequence.append(KeyComboAction("<Control>r"))
sequence.append(PauseAction(3000))
sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyComboAction("<Control>Home"))
sequence.append(utils.StartRecordingAction())
-sequence.append(KeyComboAction("<Control>Home"))
+sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
- "1. Top of file",
+ "1. Line Down",
["BRAILLE LINE: 'Home News Projects Art Support Development Community'",
" VISIBLE: 'Home News Projects Art Support D', cursor=1",
"SPEECH OUTPUT: 'Home link'",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]