GNOME Bugzilla – Bug 436674
[lynn] flat-review only visits right-most tree nodes in SwingSet2 JTree demo
Last modified: 2008-07-22 19:27:22 UTC
1. Launch the SwingSet2 demo. 2. Launch the JTree demo and expand the tree so that tree nodes down to level 4 were visible (e.g., Music -> Classical -> Quartets -> ["Six String Quartets", "Three String Quartets", "Music"]). 3. Use the up and down arrows to navigate the tree nodes. Orca speaks the tree nodes correctly. 3. Use flat-review to navigate the tree nodes. Flat-review only visits the right-most items ("Six String Quartets", "Three String Quartets", "Music") and skips all the other nodes.
The problem appears to be caused by the MANAGES_DESCENDANTS state not being set for the SwingSet2 table. Unless there's a JDK 1.6 regression where the MANAGES_DESCENDANTS state is not set for JTables, the problem is possibly in the Java Access Bridge for GNOME. [ debug.out ] flat_review.getShowingZones (name= role=tree, state=ENABLED FOCUSABLE OPAQUE SENSITIVE SHOWING VISIBLE) As an experiment, I modified flat_review.getShowingZones to call flat_review.getShowingDescendants if (root.role == rolenames.ROLE_TABLE). if (root.state.count(atspi.Accessibility.STATE_MANAGES_DESCENDANTS) \ and (root.childCount > 50) \ or root.role == rolenames.ROLE_TREE: debug.println(debug.LEVEL_SEVERE, "calling getShowingDescendants") descendants = self.getShowingDescendants(root) debug.println(debug.LEVEL_SEVERE, "getShowingDescendants returned") for child in descendants: zones.extend(self.getShowingZones(child)) When I typed KP-8 in the SwingSet2 table demo, getShowingDescendants was called but didn't return. I didn't get any tracebacks. It's possible the getShowingZones algorithm is not appropriate for Swing JTables.
Created attachment 88043 [details] [review] proposed patch
Lynn - this looks OK to me (thanks!). The only thing I'm nervous about is that this touches a very sensitive area of the code and I'd hate for this to break something. Can you try flat reviewing in various things, such as the table and tree demos in gtk-demo to see if this breaks anything there?
I tested with gtk-demo and found no regressions. I'm going to close this as fixed as Will and I discussed yesterday.