orca r3906 - in trunk: . src/orca/scripts/toolkits/Gecko



Author: joanied
Date: Tue May 20 19:08:00 2008
New Revision: 3906
URL: http://svn.gnome.org/viewvc/orca?rev=3906&view=rev

Log:
* src/orca/scripts/toolkits/Gecko/script.py:
  Fix for bug #527959 - Incorrect caret movement in Firefox 3 on
  certain Web pages.



Modified:
   trunk/ChangeLog
   trunk/src/orca/scripts/toolkits/Gecko/script.py

Modified: trunk/src/orca/scripts/toolkits/Gecko/script.py
==============================================================================
--- trunk/src/orca/scripts/toolkits/Gecko/script.py	(original)
+++ trunk/src/orca/scripts/toolkits/Gecko/script.py	Tue May 20 19:08:00 2008
@@ -6007,7 +6007,12 @@
                 if childIndex >= 0:
                     child = obj[childIndex]
                     childText = self.queryNonEmptyText(child)
-                    if childText:
+                    childRole = child.getRole()
+                    # If the object represented by the EOC at the beginning
+                    # of this line is a section, it is functionally not part
+                    # of this line and should not be included here.
+                    #
+                    if childText and childRole != pyatspi.ROLE_SECTION:
                         noChars = childText.characterCount
                         [cLine, cStart, cEnd] = \
                                childText.getTextAtOffset(noChars - 1, boundary)
@@ -6016,8 +6021,9 @@
                             start = cStart
                         else:
                             start += 1
-                    elif not child.getRole() in [pyatspi.ROLE_LINK,
-                                                 pyatspi.ROLE_IMAGE]:
+                    elif not childRole in [pyatspi.ROLE_LINK,
+                                           pyatspi.ROLE_IMAGE,
+                                           pyatspi.ROLE_SECTION]:
                         text = None
                         obj = child
                     else:



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