[orca] Fix for bgo#592383 - Orca gets stuck when it encounters a paragraph in Firefox which begins with a m



commit 3e92962c0c15ab1ef3e757be886410a65ee2b21e
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Wed Aug 19 18:27:57 2009 -0400

    Fix for bgo#592383 - Orca gets stuck when it encounters a paragraph in Firefox which begins with a multi-line-high character

 src/orca/scripts/toolkits/Gecko/script.py      |    9 ++++++
 test/keystrokes/firefox/line_nav_bug_592383.py |   35 +++++++++++-------------
 2 files changed, 25 insertions(+), 19 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 8eeed97..4b33c07 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -5502,6 +5502,15 @@ class Script(default.Script):
                             # assumed anchor.
                             #
                             offset = start + 1
+                        elif obj.getRole() == pyatspi.ROLE_PARAGRAPH \
+                             and child.getRole() == pyatspi.ROLE_PARAGRAPH:
+                            # We don't normally see nested paragraphs. But
+                            # they occur at least when a paragraph begins
+                            # with a multi-line-high character. If we set
+                            # the beginning of this line to that initial
+                            # character, we'll get stuck. See bug 592383.
+                            #
+                            pass
                         else:
                             # It's a link that ends on our left. Who knows
                             # where it starts? Might be on the previous
diff --git a/test/keystrokes/firefox/line_nav_bug_592383.py b/test/keystrokes/firefox/line_nav_bug_592383.py
index 5288a1f..2092752 100644
--- a/test/keystrokes/firefox/line_nav_bug_592383.py
+++ b/test/keystrokes/firefox/line_nav_bug_592383.py
@@ -62,28 +62,25 @@ sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(utils.AssertPresentationAction(
     "3. Down",
-    ["BUG? - We're stuck",
-     "BRAILLE LINE:  'W'",
-     "     VISIBLE:  'W', cursor=1",
-     "SPEECH OUTPUT: 'W' voice=uppercase"]))
+    ["BRAILLE LINE:  '   hy did the chicken cross the road? Give up? It was to escape from the enormous capital letter at the beginning of this paragraph. These are the'",
+     "     VISIBLE:  '   hy did the chicken cross the ', cursor=1",
+     "SPEECH OUTPUT: '   hy did the chicken cross the road? Give up? It was to escape from the enormous capital letter at the beginning of this paragraph. These are the'"]))
 
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(utils.AssertPresentationAction(
     "4. Down",
-    ["BUG? - We're stuck",
-     "BRAILLE LINE:  'W'",
-     "     VISIBLE:  'W', cursor=1",
-     "SPEECH OUTPUT: 'W' voice=uppercase"]))
+    ["BRAILLE LINE:  'things that keep chickens up at night. No. Really.They are.'",
+     "     VISIBLE:  'things that keep chickens up at ', cursor=1",
+     "SPEECH OUTPUT: 'things that keep chickens up at night. No. Really.They are.'"]))
 
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(utils.AssertPresentationAction(
     "5. Down",
-    ["BUG? - We're stuck",
-     "BRAILLE LINE:  'W'",
-     "     VISIBLE:  'W', cursor=1",
-     "SPEECH OUTPUT: 'W' voice=uppercase"]))
+    ["BRAILLE LINE:  'Here's another normal paragraph.'",
+     "     VISIBLE:  'Here's another normal paragraph.', cursor=1",
+     "SPEECH OUTPUT: 'Here's another normal paragraph.'"]))
 
 ########################################################################
 # Press Control+End to move to the end.
@@ -107,13 +104,13 @@ sequence.append(utils.AssertPresentationAction(
      "     VISIBLE:  'things that keep chickens up at ', cursor=1",
      "SPEECH OUTPUT: 'things that keep chickens up at night. No. Really.They are.'"]))
 
-# BUG? - We're skipping the line at the beginning of the paragraph
-
-#sequence.append(utils.StartRecordingAction())
-#sequence.append(KeyComboAction("Up"))
-#sequence.append(utils.AssertPresentationAction(
-#    "2. Up",
-#    []))
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "2. Up",
+    ["BUG? - We're skipping the line at the beginning of the paragraph",
+     "BRAILLE LINE:  ''",
+     "     VISIBLE:  '', cursor=1"]))
 
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Up"))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]