From: JunsuChoi Date: Wed, 13 Sep 2017 03:04:42 +0000 (+0900) Subject: atspi : Add check for chain end object with attribute X-Git-Tag: submit/tizen/20171020.120936~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29e85c8538d21d51a5a390af6b955587aff7c6b2;p=platform%2Fupstream%2Felementary.git atspi : Add check for chain end object with attribute When searching for a neighbor object, check whether there is an "relation_chain_end" attribute. If it does, it returns the current object. Change-Id: If84cd1fd0176e16b7a5ac79f60411491cc15c952 --- diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c index 821a50c90..00ab38e7f 100644 --- a/src/lib/elm_atspi_bridge.c +++ b/src/lib/elm_atspi_bridge.c @@ -4652,8 +4652,32 @@ _deputy_of_proxy_in_parent_get(Eo *obj) return deputy; } +static Eina_Bool +_check_chain_end_with_attribute(Eo *obj, unsigned char forward) +{ + Eina_List *attrs, *l; + Elm_Atspi_Attribute *attr; + eo_do(obj, attrs = elm_interface_atspi_accessible_attributes_get()); + if (!attrs) + return EINA_FALSE; + EINA_LIST_FOREACH(attrs, l, attr) + { + if (!strcmp(attr->key, "relation_chain_end")) + { + if (((!strcmp(attr->value, "prev,end")) && forward == 0) || ((!strcmp(attr->value, "next,end")) && forward == 1) || (!strcmp(attr->value, "prev,next,end"))) + { + elm_atspi_attributes_list_free(attrs); + return EINA_TRUE; + } + } + } + elm_atspi_attributes_list_free(attrs); + return EINA_FALSE; +} + static void *_calculate_neighbor_impl(accessibility_navigation_pointer_table *table, void *root, void *start, unsigned char forward, GetNeighborSearchMode search_mode) { + if (start && _check_chain_end_with_attribute(start, forward)) return start; if (root && _object_is_defunct(table, root)) return NULL; if (start && _object_is_defunct(table, start)) {