orca r3627 - in trunk: . src/orca
- From: joanied svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r3627 - in trunk: . src/orca
- Date: Mon, 25 Feb 2008 02:02:04 +0000 (GMT)
Author: joanied
Date: Mon Feb 25 02:02:04 2008
New Revision: 3627
URL: http://svn.gnome.org/viewvc/orca?rev=3627&view=rev
Log:
* src/orca/Gecko.py:
Fix for bug #517752 - (ff3) more orca+left/right inconsistancy
Modified:
trunk/ChangeLog
trunk/src/orca/Gecko.py
Modified: trunk/src/orca/Gecko.py
==============================================================================
--- trunk/src/orca/Gecko.py (original)
+++ trunk/src/orca/Gecko.py Mon Feb 25 02:02:04 2008
@@ -9008,21 +9008,20 @@
line = self._currentLineContents \
or self.getLineContentsAtOffset(obj, characterOffset)
+ startingPoint = line
+ useful = self.getMeaningfulObjectsFromLine(line)
while line and not found:
- useful = self.getMeaningfulObjectsFromLine(line)
index = self.findObjectOnLine(prevObj, prevOffset, useful)
if not self.isSameObject(obj, prevObj):
- # We have found a different object (e.g. text before the
- # current link).
- #
- prevObj = useful[-1][0]
- prevOffset = useful[-1][1]
# The question is, have we found the beginning of this
- # object? If the offset is 0 or there's more than one object
- # on this line it's safe to assume we've found the beginning.
+ # object? If the offset is 0 or there's more than one
+ # object on this line and we started on a later line,
+ # it's safe to assume we've found the beginning.
#
- found = (prevOffset == 0 or len(useful) > 1)
+ found = (prevOffset == 0) \
+ or (len(useful) > 1 and line != startingPoint)
+
# Otherwise, we won't know for certain until we've gone
# to the line(s) before this one and found a different
# object, at which point we may have gone too far.
@@ -9035,7 +9034,9 @@
elif 0 < index < len(useful):
prevObj = useful[index - 1][0]
prevOffset = useful[index - 1][1]
- found = True
+ found = (prevOffset == 0) or (index > 1)
+ if not found:
+ mayHaveGoneTooFar = True
elif self.isSameObject(obj, prevObj) \
and 0 == prevOffset < characterOffset:
@@ -9043,9 +9044,11 @@
if not found:
self._nextLineContents = line
- [prevObj, prevOffset] = self.findPreviousLine(line[0][0],
- line[0][1])
+ prevLine = self.findPreviousLine(line[0][0], line[0][1])
line = self._currentLineContents
+ useful = self.getMeaningfulObjectsFromLine(line)
+ prevObj = useful[-1][0]
+ prevOffset = useful[-1][1]
if self._currentLineContents == self._nextLineContents:
break
@@ -9067,9 +9070,8 @@
elif mayHaveGoneTooFar and self._nextLineContents:
if not self.isSameObject(obj, prevObj):
- line = self._nextLineContents
- prevObj = line[0][0]
- prevOffset = line[0][1]
+ prevObj = useful[index][0]
+ prevOffset = useful[index][1]
if found:
self._currentLineContents = line
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]