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 549664 - isDesiredFocusedItem() needs to be more flexible
isDesiredFocusedItem() needs to be more flexible
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.23.x
Other All
: Normal major
: 2.24.0
Assigned To: Joanmarie Diggs (IRC: joanie)
Orca Maintainers
Depends on:
Blocks: 404411 523452
 
 
Reported: 2008-08-28 02:55 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2009-03-10 00:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
revision 1: A given role should optionally be a list of roles (17.21 KB, patch)
2008-08-28 03:02 UTC, Joanmarie Diggs (IRC: joanie)
none Details | Review
revision 2: added updated regression tests (34.08 KB, patch)
2008-08-28 06:18 UTC, Joanmarie Diggs (IRC: joanie)
none Details | Review
results of oowriter tests with the patch (revision 2) (65.13 KB, text/plain)
2008-08-28 06:40 UTC, Joanmarie Diggs (IRC: joanie)
  Details
revision 3 (the kitchen sink version - adds the spelling stuff) (45.11 KB, patch)
2008-08-28 08:05 UTC, Joanmarie Diggs (IRC: joanie)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2008-08-28 02:55:28 UTC
The OOo guys have been changing (and inventing!!) accessible roles on us again. The result of these changes is a non-trivial amount of breakage in the soffice script because the soffice script relies heavily upon the use of isDesiredFocusedItem() -- a method which in turn relies heavily on a predictable hierarchy.

In the long term, it might be worth looking for other ways to determine if certain conditions are being met. In the short run, we should be able to restore existing functionality by making isDesiredFocusedItem() more flexible.
Comment 1 Joanmarie Diggs (IRC: joanie) 2008-08-28 03:02:46 UTC
Created attachment 117497 [details] [review]
revision 1: A given role should optionally be a list of roles

On the bright side, the OOo guys didn't change the hierarchy completely; just the roles of some of the objects in the hierarchy. They also invented the role "text frame" which pyatspi calls ROLE_EXTENDED (along with any other role with which it's unfamiliar).

This patch makes it possible to optionally specify a list of roles (rather than a single role) for a given accessible in the hierarchy. I've manually tested the bulk of the changes. This is also pylinted. Regression testing next...
Comment 2 Joanmarie Diggs (IRC: joanie) 2008-08-28 06:18:46 UTC
Created attachment 117502 [details] [review]
revision 2: added updated regression tests

Rather than open a new bug to deal with the regression tests, I figured I'd just tack the test changes on to this one. As the tests indicate, the patch for this bug doesn't solve *all* of the issues, but it gets us closer.
Comment 3 Joanmarie Diggs (IRC: joanie) 2008-08-28 06:40:42 UTC
Created attachment 117503 [details]
results of oowriter tests with the patch (revision 2)

These are the regression test results for oowriter. Of the remaining failures there are:

1. A couple of braille context differences
2. A bunch of issues around tables in Writer*
3. Spelling

w.r.t. #2, the issue seems largely the same (not speaking the cell).It just keeps cropping up test after test. Manual testing indicates that there is no difference with and without my patch.

In addition, I discovered another issue with tables in Writer: When you arrow left and right in a cell, we're not speaking anything. We are getting the caret moved events and passing them off to the default script, but the default script is discarding them because of the locusOfFocus (which seems to be the frame). This "new" issue is present in OOo 2.4 as well as 3.0, both with and without my patch.

Finally on the table front: The regression tests have a lot of "not selected"s in there for Writer tables without any BUG? marking. They've been in there a while. They are bugs. We should not be saying the selection state just because we've arrowed to some other cell in a table.

So.... Tomorrow (technically, later today) I will see what on earth is going on with tables.  Now I will see if my spelling patch solves the spelling bug. Then I will sleep. :-)

Will please review.
Comment 4 Joanmarie Diggs (IRC: joanie) 2008-08-28 08:05:25 UTC
Created attachment 117505 [details] [review]
revision 3 (the kitchen sink version - adds the spelling stuff)

Turned out there was a slight incompatibility between the spelling patch and the patch for this bug. And it's such a drag to have cross-bug patch dependencies. So I just combined the two here. The addition of the spelling code does not change the results of any of the regression tests with the exception of the spelling regression test (also updated here).

Starting the gtk-demo regression tests now just to be safe.
Comment 5 Willie Walker 2008-08-28 12:54:50 UTC
Very nice job, Joanie!  I like the clean up to remove the trailing \ characters as well.  Commit assuming no new regressions were introduced and things pylint to a 10.
Comment 6 Joanmarie Diggs (IRC: joanie) 2008-08-28 15:01:17 UTC
Already pylinted, gtk-demo tests are good. Patch committed. Woo hoo! Uh, I mean, thanks! ;-) Moving to pending.
Comment 7 Mike Pedersen 2008-09-02 19:14:59 UTC
I've tested this with many dialogs and things seem to be working much better with OOo M4. 
Comment 8 Joanmarie Diggs (IRC: joanie) 2008-09-02 19:46:27 UTC
Thanks Mike. Closing as FIXED.