atspi: find the first, last obj using "GetNeighbor" 49/136249/1
authorShinwoo Kim <cinoo.kim@samsung.com>
Mon, 26 Jun 2017 06:25:06 +0000 (15:25 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Thu, 29 Jun 2017 00:52:58 +0000 (09:52 +0900)
The reducing IPC task overlooked functionality to get the first, last object.
This commit is related to the following commit.

[screen-reader]
commit 72e3396fac3a377f49422af454875a0e4c9a58bc

Add loop navigation feature.

Screen reader gives FOCUS_CHAIN_END_NOTIFICATION_EVENT notification if there is
no more object in its direction. If user gives next(or prev) gesture in same
direction one more time, then the first(or last) object will grab highlight.

Change-Id: I0e68c84a595396cbf7d0d2ae4d93fca4c425f0ea

src/lib/elm_atspi_bridge.c

index 05d2fd7..fe59ec2 100644 (file)
@@ -963,6 +963,10 @@ _accessible_get_neighbor(const Eldbus_Service_Interface *iface EINA_UNUSED, cons
 
    iter = eldbus_message_iter_get(ret);
 
+   if (start == root)
+     {
+        start = NULL;
+     }
    Eo *accessible = _calculate_neighbor(bridge, root, start, direction == 1, search_mode);
    _bridge_iter_object_reference_append(bridge, iter, accessible);
    _bridge_object_register(bridge, accessible);
@@ -4553,7 +4557,7 @@ static void *_calculate_neighbor_impl(accessibility_navigation_pointer_table *ta
    // that when we begin at start node and we navigate backward, then all children
    // are visited, so navigation will ignore start's children and go to
    // previous sibling available.
-   unsigned char all_children_visited = (search_mode != NEIGHBOR_SEARCH_MODE_RECURSE_FROM_ROOT && !forward);
+   unsigned char all_children_visited = start && (search_mode != NEIGHBOR_SEARCH_MODE_RECURSE_FROM_ROOT && !forward);
 
    // true, if starting element should be ignored. this is only used in rare case of
    // recursive search failing to find an object.