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 505102 - Pressing Up/Down in FF3 is moving to spaces at the end of the current line
Pressing Up/Down in FF3 is moving to spaces at the end of the current line
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.21.x
Other All
: Normal normal
: 2.22.0
Assigned To: Joanmarie Diggs (IRC: joanie)
Orca Maintainers
Depends on:
Blocks: 404403
 
 
Reported: 2007-12-22 20:14 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2008-07-22 19:33 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
proposed patch (1.50 KB, patch)
2007-12-22 20:20 UTC, Joanmarie Diggs (IRC: joanie)
none Details | Review
stop speaking the spaces as well (1.91 KB, patch)
2007-12-22 20:41 UTC, Joanmarie Diggs (IRC: joanie)
none Details | Review
include the spaces in between links (3.08 KB, patch)
2007-12-22 21:35 UTC, Joanmarie Diggs (IRC: joanie)
none Details | Review
found more spaces we were arrowing to (3.18 KB, patch)
2007-12-23 01:47 UTC, Joanmarie Diggs (IRC: joanie)
none Details | Review
trunk-compatible patch (1.61 KB, patch)
2007-12-23 05:30 UTC, Joanmarie Diggs (IRC: joanie)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2007-12-22 20:14:47 UTC
It seems that a change made to Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=405248) causes lines that end with an embedded object character to now end with a space.  We're landing on these spaces when we press Up/Down Arrow when we should be moving to the next/previous line.  We need to stop doing that. :-)
Comment 1 Joanmarie Diggs (IRC: joanie) 2007-12-22 20:20:11 UTC
Created attachment 101468 [details] [review]
proposed patch

I tested this briefly.  Seems to solve the problem and it's a pretty conservative/specific change so I think it's safe.  I've pylinted it as well.  I'm going to write some regression tests using it and hopefully kill two birds with one stone. :-)

Please test.  Thanks!
Comment 2 Joanmarie Diggs (IRC: joanie) 2007-12-22 20:41:31 UTC
Created attachment 101472 [details] [review]
stop speaking the spaces as well

The previous patch prevented us from *moving* to the spaces.  We were still speaking them.  This patch stops that as well.  Again, please test.  Thanks!
Comment 3 Joanmarie Diggs (IRC: joanie) 2007-12-22 21:35:15 UTC
Created attachment 101476 [details] [review]
include the spaces in between links

Given a line of links separated by spaces, we were speaking the spaces.  This patch catches that case as well.
Comment 4 Michael Whapples 2007-12-22 22:22:12 UTC
I have tried the patch with my local files which produced the bug and the actual website and it seems to have solved this. I am noticing the truncation problem still at the actual website, would another orca debug be useful for this as even when I use save page in firefox and it gets the associated files I can not get the problem locally and as before I can't point you to the actual site.
Comment 5 Joanmarie Diggs (IRC: joanie) 2007-12-22 22:56:36 UTC
Thanks Michael.  I think I see where the problem with truncation lies.  

I need to finish writing a bunch of regression tests to be sure subsequent changes don't break anything.  I'll look at the truncation tomorrow.  And that patch will wind up on bug 500016 as it's a direct consequence of those "performance enhancements" (whereas this bug is an adjustment due to a FF3 change).  But you're on the CC list for both, so it shouldn't be a problem. <smile>
Comment 6 Joanmarie Diggs (IRC: joanie) 2007-12-23 01:47:36 UTC
Created attachment 101480 [details] [review]
found more spaces we were arrowing to

Our new spaces are not just following embedded object characters. :-(  We're seeing them after labels as well....
Comment 7 Joanmarie Diggs (IRC: joanie) 2007-12-23 05:30:58 UTC
Created attachment 101487 [details] [review]
trunk-compatible patch

Some of the changes I had made to the last version of the patch for this bug were needed as part of some changes I needed to make related to bug 500016.  This patch now contains just the caret navigation related fix.

Mike (Pedersen), if you could hammer on this with the latest Firefox trunk that would be awesome.  Landing on the extra spaces is, I think, going to get on people's nerves.
Comment 8 Michael Whapples 2007-12-23 13:25:47 UTC
I have updated Orca to latest trunk (r3408) and added this patch (attachment 101487 [details] [review]) and I am finding some issues where up cursoring does not reveal the same as you found when down cursoring. If using the HTML and css example attached to bug 500016, up cursoring onto the line where the take course links are places the cursor on the link itself, whereas down cursoring onto that line puts the cursor in some space (two braille cells on the braille display) to the left. I personally would not say this is too much of a problem (I have the braille display to show this, but does speech alone tell this), but I have noticed that on some pages cursoring up seems to miss a line, but I suspect this may be when a table cell contains more than one line (or that is what it seems to me). I am sure I could sort out some example page to show this.
Comment 9 Joanmarie Diggs (IRC: joanie) 2007-12-23 14:43:17 UTC
> I am finding some issues where up cursoring does not reveal the
> same as you found when down cursoring. 

Yup.  I saw that the other day before I had built the latest Firefox and discovered the change reported here.  And that's been commented on on the Orca list before.  Sadly, it's an existing problem -- one I plan to address when I redo find{Next,Previous}Line().  The goal w.r.t. this bug is to deal with the new spaces we're finding without breaking anything else. <smile>

> noticed that on some pages cursoring up seems to miss a line, 

Is that only the case with this patch applied?  I suppose with all the new spaces that may be hard to say....

> seems to me). I am sure I could sort out some example page to show this.

That would be awesome!  Your example pages have already formed the basis of one of my regression tests. It's quite helpful to have them both for squashing bugs and for preventing the introduction of new ones during the refactoring.
Comment 10 Joanmarie Diggs (IRC: joanie) 2007-12-26 19:46:37 UTC
Setting the target milestone to 2.21.5 as we need to get this issue solved sooner rather than later.
Comment 11 Joanmarie Diggs (IRC: joanie) 2007-12-26 20:50:49 UTC
I just got off the phone with Mike.  He said to go ahead and check this in. Done.

Putting Will's name on it for retro-review. :-)  (I would have waited until post holiday break, but I need this and the fix to bug 504785 in place so that I can write more regression tests and then tackle the next phase of the performance enhancements).
Comment 12 Willie Walker 2008-01-02 15:08:08 UTC
(In reply to comment #11)
> Putting Will's name on it for retro-review. :-)  (I would have waited until
> post holiday break, but I need this and the fix to bug 504785 in place so that
> I can write more regression tests and then tackle the next phase of the
> performance enhancements).

Thanks Joanie!  You did a lot of awesome work this winter break.  :-)  In the patch, I was wondering what would happen if len(unicodeText) == 0.  In that case, I think the if statements would issue a "IndexError: string index out of range" error.  To avoid the error, you migght change them both from:

+            if unicodeText[-1] == " " and len(unicodeText) > 1:

to:

+            if len(unicodeText) > 1 and unicodeText[-1] == " ":
Comment 13 Joanmarie Diggs (IRC: joanie) 2008-01-02 16:54:25 UTC
Heh.  I think I just found a place where we can make a minor performance enhancement.  ;-) But in the meantime....

The if statements are each in a block that begins with:

        text = self.queryNonEmptyText(obj)
        if text and not (self.isAriaWidget(obj) \
                         and obj.getRole() == pyatspi.ROLE_LIST):
            unicodeText = self.getUnicodeText(obj)

queryNonEmptyText() only returns text if the text interface is implemented *and* there's a characterCount.  And then we call getUnicodeText() which turns around and called queryNonEmptyText() again, but anyhoo....  Is it possible for the characterCount to be greater than 0 but then become 0 as a result of being encoded?
Comment 14 Willie Walker 2008-01-02 18:33:24 UTC
> queryNonEmptyText() only returns text if the text interface is implemented
> *and* there's a characterCount.  And then we call getUnicodeText() which turns
> around and called queryNonEmptyText() again, but anyhoo....  Is it possible for
> the characterCount to be greater than 0 but then become 0 as a result of being
> encoded?

It might be possible, but probably slim.  But, it's probably best to be on the safer side and do the look before you leap thing (i.e., check for len(unicodeText) first).
Comment 15 Joanmarie Diggs (IRC: joanie) 2008-01-02 19:39:11 UTC
Sounds good.  Suggested change committed to trunk.  Moving to pending.
Comment 16 Mike Pedersen 2008-01-04 01:44:44 UTC
This one seems good now 
Comment 17 Joanmarie Diggs (IRC: joanie) 2008-01-04 04:22:48 UTC
Thanks!  Closing as FIXED.