Eina_Bool
_accessible_object_on_scroll_is(Eo* obj)
{
- if(!obj) return EINA_FALSE;
+ /* in case of genlist item, the item->view is NULL if item is unrealized.
+ this function is used to check if obj could have HIGHLIGHTABLE or not.
+ the unrealized genlist item should have HIGHLIGHTABLE state.
+ so if obj is NULL return EINA_TRUE */
+ if(!obj) return EINA_TRUE;
Evas_Object *target = obj;
Evas_Object *parent = NULL;
STATE_TYPE_SET(states, EFL_ACCESS_STATE_SHOWING);
//TIZEN_ONLY(20170207) : [ATSPI] enhance expose highlight information on atspi
- if (evas_object_visible_get(item->view))
+ /* unrealized genlist item does not have item->view,
+ and item cannot change its visibility, only widget can change the visibility */
+ if (evas_object_visible_get(item->widget))
STATE_TYPE_SET(states, EFL_ACCESS_STATE_VISIBLE);
//
return ret;
}
-static Eina_List *_valid_children_get(Eina_List *children, Eo *start)
+static Eina_List *_valid_children_get(Eina_List *children, Eo *start, Eo *root)
{
+ /* condition to find first(last) object regardless of scrollable parent.
+ looping navigation does not care scrollable parent.
+ 1. currently highlighted object exists
+ 2. both start and root are same */
+ Eo *current = _elm_object_accessibility_currently_highlighted_get();
+ if (current && start == root) return children;
+
Eo *child = NULL;
child = eina_list_nth(children, 0);
}
static void *_get_next_non_defunct_sibling(accessibility_navigation_pointer_table *table,
- void *obj, void *start, unsigned char forward)
+ void *obj, void *start, void *root, unsigned char forward)
{
if (!obj) return NULL;
void *parent = CALL(get_parent, obj);
Eina_List *children;
children = efl_access_children_get(parent);
- children = _valid_children_get(children, start);
+ children = _valid_children_get(children, start, root);
unsigned int children_count = eina_list_count(children);
if (children_count == 0)
{
while(1)
{
- void *sibling = _get_next_non_defunct_sibling(table, node, start, forward);
+ void *sibling = _get_next_non_defunct_sibling(table, node, start, root, forward);
if (sibling != NULL)
{
node = sibling;
Eina_List *children;
children = efl_access_children_get(node);
- children = _valid_children_get(children, start);
+ children = _valid_children_get(children, start, root);
// do accept:
// 1. not start node
// 3. Nodes with roles: ATSPI_ROLE_PAGE_TAB, ATSPI_ROLE_POPUP_MENU and ATSPI_ROLE_DIALOG, only when looking for first or last element.
// Objects with those roles shouldnt be reachable, when navigating next / prev.
unsigned char all_children_visited_or_moving_forward = (eina_list_count(children) == 0 || forward || all_children_visited);
- if (!force_next && node != start && all_children_visited_or_moving_forward &&
- _accept_object(table, node))
+ if (!force_next && node != start && all_children_visited_or_moving_forward && _accept_object(table, node))
{
if (start == NULL || _object_role_is_acceptable_when_navigating_next_prev(table, node))
{