GNOME Bugzilla – Bug 549664
isDesiredFocusedItem() needs to be more flexible
Last modified: 2009-03-10 00:05:45 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.
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...
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.
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.
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.
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.
Already pylinted, gtk-demo tests are good. Patch committed. Woo hoo! Uh, I mean, thanks! ;-) Moving to pending.
I've tested this with many dialogs and things seem to be working much better with OOo M4.
Thanks Mike. Closing as FIXED.