[orca] Remove more hacks for Gecko and stop tripping up on hidden links
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Remove more hacks for Gecko and stop tripping up on hidden links
- Date: Thu, 21 Aug 2014 18:57:18 +0000 (UTC)
commit cef581110e9b12efab1e9de7068db75c78c70023
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Aug 21 14:55:11 2014 -0400
Remove more hacks for Gecko and stop tripping up on hidden links
src/orca/scripts/toolkits/Gecko/script.py | 19 +------
test/keystrokes/firefox/line_nav_hidden_links.py | 63 ++++------------------
2 files changed, 14 insertions(+), 68 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index d50ba90..8258231 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -2787,7 +2787,6 @@ class Script(default.Script):
# Check for things on the left.
#
- lastExtents = (0, 0, 0, 0)
done = False
while not done:
[firstObj, start, end, string] = objects[0]
@@ -2796,9 +2795,7 @@ class Script(default.Script):
break
prevExtents = self.getExtents(prevObj, pOffset, pOffset + 1)
- if self.onSameLine(extents, prevExtents) \
- and extents != prevExtents \
- and lastExtents != prevExtents:
+ if self.onSameLine(extents, prevExtents):
toAdd = self.utilities.getObjectsFromEOCs(prevObj, pOffset, boundary)
toAdd = [x for x in toAdd if x not in objects]
if not toAdd:
@@ -2808,11 +2805,8 @@ class Script(default.Script):
else:
break
- lastExtents = prevExtents
-
# Check for things on the right.
#
- lastExtents = (0, 0, 0, 0)
done = False
while not done:
[lastObj, start, end, string] = objects[-1]
@@ -2821,9 +2815,7 @@ class Script(default.Script):
break
nextExtents = self.getExtents(nextObj, nOffset, nOffset + 1)
- if self.onSameLine(extents, nextExtents) \
- and extents != nextExtents \
- and lastExtents != nextExtents:
+ if self.onSameLine(extents, nextExtents):
toAdd = self.utilities.getObjectsFromEOCs(nextObj, nOffset, boundary)
toAdd = [x for x in toAdd if x not in objects]
if not toAdd:
@@ -2833,8 +2825,6 @@ class Script(default.Script):
else:
break
- lastExtents = nextExtents
-
return objects
def getObjectContentsAtOffset(self, obj, characterOffset):
@@ -3274,13 +3264,10 @@ class Script(default.Script):
extents = self.getExtents(obj, characterOffset, characterOffset + 1)
nextObj, nextOffset = self.findNextCaretInOrder(obj, characterOffset)
nextExtents = self.getExtents(nextObj, nextOffset, nextOffset + 1)
- while nextObj and self.onSameLine(extents, nextExtents):
+ while nextObj and (nextExtents == [0, 0, 0, 0] or self.onSameLine(extents, nextExtents)):
nextObj, nextOffset = self.findNextCaretInOrder(nextObj, nextOffset)
nextExtents = self.getExtents(nextObj, nextOffset, nextOffset + 1)
- if nextObj and nextExtents == [0, 0, 0, 0]:
- nextObj, nextOffset = self.findNextCaretInOrder(nextObj, nextOffset)
-
return [nextObj, nextOffset]
def goPreviousLine(self, inputEvent):
diff --git a/test/keystrokes/firefox/line_nav_hidden_links.py
b/test/keystrokes/firefox/line_nav_hidden_links.py
index 4fcb50a..5963cbe 100644
--- a/test/keystrokes/firefox/line_nav_hidden_links.py
+++ b/test/keystrokes/firefox/line_nav_hidden_links.py
@@ -28,26 +28,6 @@ sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
"3. Line Down",
- ["KNOWN ISSUE: It currently takes us several down arrows to move past this link",
- "BRAILLE LINE: 'up vote'",
- " VISIBLE: 'up vote', cursor=1",
- "SPEECH OUTPUT: 'up vote'",
- "SPEECH OUTPUT: 'link'"]))
-
-sequence.append(utils.StartRecordingAction())
-sequence.append(KeyComboAction("Down"))
-sequence.append(utils.AssertPresentationAction(
- "4. Line Down",
- ["KNOWN ISSUE: It currently takes us several down arrows to move past this link",
- "BRAILLE LINE: 'up vote'",
- " VISIBLE: 'up vote', cursor=1",
- "SPEECH OUTPUT: 'up vote'",
- "SPEECH OUTPUT: 'link'"]))
-
-sequence.append(utils.StartRecordingAction())
-sequence.append(KeyComboAction("Down"))
-sequence.append(utils.AssertPresentationAction(
- "5. Line Down",
["BRAILLE LINE: '74'",
" VISIBLE: '74', cursor=1",
"SPEECH OUTPUT: '74'"]))
@@ -55,7 +35,7 @@ sequence.append(utils.AssertPresentationAction(
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
- "6. Line Down",
+ "4. Line Down",
["BRAILLE LINE: 'down vote'",
" VISIBLE: 'down vote', cursor=1",
"SPEECH OUTPUT: 'down vote'",
@@ -64,27 +44,7 @@ sequence.append(utils.AssertPresentationAction(
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
- "7. Line Down",
- ["KNOWN ISSUE: It currently takes us several down arrows to move past this link",
- "BRAILLE LINE: 'down vote'",
- " VISIBLE: 'down vote', cursor=1",
- "SPEECH OUTPUT: 'down vote'",
- "SPEECH OUTPUT: 'link'"]))
-
-sequence.append(utils.StartRecordingAction())
-sequence.append(KeyComboAction("Down"))
-sequence.append(utils.AssertPresentationAction(
- "8. Line Down",
- ["KNOWN ISSUE: It currently takes us several down arrows to move past this link",
- "BRAILLE LINE: 'down vote'",
- " VISIBLE: 'down vote', cursor=1",
- "SPEECH OUTPUT: 'down vote'",
- "SPEECH OUTPUT: 'link'"]))
-
-sequence.append(utils.StartRecordingAction())
-sequence.append(KeyComboAction("Down"))
-sequence.append(utils.AssertPresentationAction(
- "9. Line Down",
+ "5. Line Down",
["BRAILLE LINE: 'accepted'",
" VISIBLE: 'accepted', cursor=1",
"SPEECH OUTPUT: 'accepted'"]))
@@ -92,16 +52,15 @@ sequence.append(utils.AssertPresentationAction(
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
- "10. Line Down",
- ["KNOWN ISSUE: It currently takes us several down arrows to move past this object",
- "BRAILLE LINE: 'accepted'",
- " VISIBLE: 'accepted', cursor=7",
- "SPEECH OUTPUT: 'accepted'"]))
+ "6. Line Down",
+ ["BRAILLE LINE: 'End'",
+ " VISIBLE: 'End', cursor=1",
+ "SPEECH OUTPUT: 'End'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(utils.AssertPresentationAction(
- "11. Line Up",
+ "7. Line Up",
["BRAILLE LINE: 'accepted'",
" VISIBLE: 'accepted', cursor=1",
"SPEECH OUTPUT: 'accepted'"]))
@@ -109,7 +68,7 @@ sequence.append(utils.AssertPresentationAction(
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(utils.AssertPresentationAction(
- "12. Line Up",
+ "8. Line Up",
["BRAILLE LINE: 'down vote'",
" VISIBLE: 'down vote', cursor=1",
"SPEECH OUTPUT: 'down vote'",
@@ -118,7 +77,7 @@ sequence.append(utils.AssertPresentationAction(
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(utils.AssertPresentationAction(
- "13. Line Up",
+ "9. Line Up",
["BRAILLE LINE: '74'",
" VISIBLE: '74', cursor=1",
"SPEECH OUTPUT: '74'"]))
@@ -126,7 +85,7 @@ sequence.append(utils.AssertPresentationAction(
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(utils.AssertPresentationAction(
- "14. Line Up",
+ "10. Line Up",
["BRAILLE LINE: 'up vote'",
" VISIBLE: 'up vote', cursor=1",
"SPEECH OUTPUT: 'up vote'",
@@ -135,7 +94,7 @@ sequence.append(utils.AssertPresentationAction(
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Up"))
sequence.append(utils.AssertPresentationAction(
- "15. Line Up",
+ "11. Line Up",
["BRAILLE LINE: 'Start'",
" VISIBLE: 'Start', cursor=1",
"SPEECH OUTPUT: 'Start'"]))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]