From f36d3f77ceec061c6f2f0d93f849cc81f105d24b Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Wed, 13 Sep 2017 12:04:42 +0900 Subject: [PATCH] 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: Ic5f9ded9c9f6a77dae8f940c2271544d6007813d --- src/lib/elm_atspi_bridge.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c index 821a50c..00ab38e 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)) { -- 2.7.4