After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 413253 - Orca cannot Up/Down Arrow past images that are links
Orca cannot Up/Down Arrow past images that are links
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.17.x
Other All
: Normal normal
: ---
Assigned To: Orca Maintainers
Orca Maintainers
Depends on:
Blocks: 404403
 
 
Reported: 2007-02-28 22:45 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2007-03-02 20:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
aforementioned test case (248 bytes, text/html)
2007-02-28 22:48 UTC, Joanmarie Diggs (IRC: joanie)
  Details
proposed patch (1.45 KB, patch)
2007-03-01 18:18 UTC, Joanmarie Diggs (IRC: joanie)
none Details | Review
corrected version (1.76 KB, patch)
2007-03-01 19:16 UTC, Joanmarie Diggs (IRC: joanie)
none Details | Review
hopefully the final version :-) (1.90 KB, patch)
2007-03-01 20:12 UTC, Joanmarie Diggs (IRC: joanie)
none Details | Review
test case to illustrate the problem from the previous comment (376 bytes, text/html)
2007-03-01 20:58 UTC, Joanmarie Diggs (IRC: joanie)
  Details
another correction (2.25 KB, patch)
2007-03-01 23:26 UTC, Joanmarie Diggs (IRC: joanie)
none Details | Review
includes a hack for the tiny text issue (2.96 KB, patch)
2007-03-02 19:47 UTC, Joanmarie Diggs (IRC: joanie)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2007-02-28 22:45:13 UTC
In the test case (to be attached), use Up/Down Arrow to navigate the page.  Orca will get stuck at the image which is also a link.  If you remove the anchor, Orca does not get stuck.
Comment 1 Joanmarie Diggs (IRC: joanie) 2007-02-28 22:48:10 UTC
Created attachment 83598 [details]
aforementioned test case
Comment 2 Joanmarie Diggs (IRC: joanie) 2007-03-01 18:18:29 UTC
Created attachment 83664 [details] [review]
proposed patch

Will, it looks like we only code reviewed the solution to bug #411261 into a coma. :-)

With the test case in question, we get just past the text and head for the image when along comes this error:

Traceback (most recent call last):
  • File "/usr/lib/python2.5/site-packages/orca/input_event.py", line 178 in processInputEvent
    consumed = self._function(script, inputEvent)
  • File "/usr/lib/python2.5/site-packages/orca/Gecko.py", line 3172 in goNextLine
    obj.text.getText(characterOffset, characterOffset + 1)
AttributeError: 'NoneType' object has no attribute 'getText'

If we actually check for obj.text before trying to use getText, we don't get the error or stuck.
Comment 3 Joanmarie Diggs (IRC: joanie) 2007-03-01 19:16:55 UTC
Created attachment 83668 [details] [review]
corrected version

Oops. Just because we don't have text doesn't mean that the following won't be the case:

            if extents != (0, 0, 0, 0):
                if not self.onSameLine(extents, lineExtents):
                    if not crossedLineBoundary:

Need to set currentChar to None outside of the while loop.
Comment 4 Joanmarie Diggs (IRC: joanie) 2007-03-01 20:12:49 UTC
Created attachment 83677 [details] [review]
hopefully the final version :-)

As Will pointed out, if there's no obj.text, previousChar should be None.

With any luck, 3rd time is charm.
Comment 5 Joanmarie Diggs (IRC: joanie) 2007-03-01 20:36:17 UTC
There seems to be another side effect of the solution to bug #411261 (as originally implemented) or in the above patch.  If you navigate up and down in the text towards the bottom of http://www.kurbad.nu/ *without the fix or patch*, things work as expected.  With the fix or the patch, arrowing down works as expected, but arrowing up causes some lines to be skipped.
Comment 6 Joanmarie Diggs (IRC: joanie) 2007-03-01 20:58:07 UTC
Created attachment 83682 [details]
test case to illustrate the problem from the previous comment

With the patch for 411261 -- whether or not you use the patch for this bug -- you can arrow down as expected through all of the text.  When you up arrow things work as expected everywhere *but* within the text that is formatted to be small.  Without the patch for 411261, this doesn't happen.
Comment 7 Willie Walker 2007-03-01 21:10:47 UTC
Ahh...good find.  This might be related to the onSameLine hackery.
Comment 8 Joanmarie Diggs (IRC: joanie) 2007-03-01 21:37:14 UTC
Possibly, still trying to figure that out.

Here's a weird discovery (at least I think so):  If you up arrow through the small text, Orca will skip over things UNLESS you move focus to a different window first.  If I do Up Arrow, then Alt Tab to another window, then Alt Tab back to Firefox, and then Up Arrow, no text gets skipped.
Comment 9 Willie Walker 2007-03-01 22:33:54 UTC
If you press Ctrl+= to enlarge the text, the problem seems to go away.  I'm still going to say onSameLine is a suspect.  ;-)
Comment 10 Joanmarie Diggs (IRC: joanie) 2007-03-01 22:45:26 UTC
Funny, I was just doing the same thing (enlarging the text).   A couple of samples going from the line that says "You get the idea" and arrowing up once:

-----------------------------------
With the text tiny:

Current char: Y, Previous char: (space), extents[1]: 261
Current char: \n, Previous char: t, extents[1]: 258

At this point, onSameLine is False.  But the current char is \n so we don't set crossedLineBoundary.  

Current char: t, Previous char: x, extents[1]: 248

AND:  onSameLine returns True.  :-(

-----------------------------------
Press Control+=:

Current char: Y, Previous char: (space), extents[1]: 281
Current char: \n, Previous char: t, extents[1]: 278

At this point, onSameLine is False.  But the current char is \n so we don't set crossedLineBoundary.  

Current char: t, Previous char: x, extents[1]: 266

AND: onSameLine is once again False, and the current char is not \n so we set crossedLineBoundary.
Comment 11 Joanmarie Diggs (IRC: joanie) 2007-03-01 23:26:06 UTC
Created attachment 83696 [details] [review]
another correction

This is what I get for saying "hopefully the final version".... If obj.text and the characterOffset  == 0, we need to set previousChar to None.  (This has nothing to do with the tiny text/onSameLine issue; just making the correction before I forget.)
Comment 12 Joanmarie Diggs (IRC: joanie) 2007-03-02 00:26:46 UTC
w.r.t.  moving focus away from Firefox and then back with Alt Tab and the problem seemingly going away:  In that instance we're not using goPreviousLine() for the initial press of Up Arrow.  I'm not sure if that's a bad thing (i.e. if Orca is controlling the caret, shouldn't it do so when the window first (re)gains focus?) or just a thing. :-)
Comment 13 Joanmarie Diggs (IRC: joanie) 2007-03-02 19:47:37 UTC
Created attachment 83749 [details] [review]
includes a hack for the tiny text issue

Before text was deemed to be on a different line if there was no overlap whatsoever between the lowestTop and the highestBottom.  Now we're allowing an overlap of 1 pixel or less in order to solve the problem of really small text being skipped when navigating by line.
Comment 14 Joanmarie Diggs (IRC: joanie) 2007-03-02 20:31:17 UTC
The patch has been checked in.
Comment 15 Joanmarie Diggs (IRC: joanie) 2007-03-02 20:44:30 UTC
Closing as FIXED.