summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2015-12-01 16:55:12 +0100
committerLukasz Stanislawski <l.stanislaws@samsung.com>2015-12-02 11:43:58 +0100
commit0aa37178abc4409a647bbf321a346bc5c7cbf261 (patch)
tree7c9bc90691183ed23f1e138ca77c420dde44f565
parentcfc7b806193c67b79f3fb86468b5ce6ed9929aac (diff)
atspi: always use widget's subobj as accessible children
Patch fixes issue when widgets could be orphaned in accessibility tree due to overloaded accessible_children_get methods in widgets returning Elm_Object_Items. Widgets like genlist, gengrid, list and toolbar returned only items as its accessibility children so if some widget was attached directly to those widgets (like ctxpopup/popup) it become orphaned in accessibility tree.
-rw-r--r--src/lib/elm_gengrid.c32
-rw-r--r--src/lib/elm_gengrid_item.eo1
-rw-r--r--src/lib/elm_genlist.c42
-rw-r--r--src/lib/elm_genlist_item.eo1
-rw-r--r--src/lib/elm_interface_atspi_accessible.c28
-rw-r--r--src/lib/elm_list.c24
-rw-r--r--src/lib/elm_list_item.eo1
-rw-r--r--src/lib/elm_toolbar.c13
-rw-r--r--src/lib/elm_widget.c28
-rw-r--r--src/lib/elm_widget_item.eo1
-rw-r--r--src/tests/elm_test_genlist.c36
-rw-r--r--src/tests/elm_test_list.c6
12 files changed, 50 insertions, 163 deletions
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 1b6f0b432..3c6018e60 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -900,9 +900,6 @@ _item_content_realize(Elm_Gen_Item *it,
900 elm_widget_sub_object_add(WIDGET(it), content); 900 elm_widget_sub_object_add(WIDGET(it), content);
901 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get())) 901 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()))
902 elm_widget_disabled_set(content, EINA_TRUE); 902 elm_widget_disabled_set(content, EINA_TRUE);
903
904 if (_elm_config->atspi_mode && eo_isa(content, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
905 eo_do(content, elm_interface_atspi_accessible_parent_set(EO_OBJ(it)));
906 } 903 }
907 } 904 }
908} 905}
@@ -5534,27 +5531,6 @@ _elm_gengrid_item_elm_interface_atspi_accessible_name_get(Eo *eo_it EINA_UNUSED,
5534 return ret; 5531 return ret;
5535} 5532}
5536 5533
5537EOLIAN Eina_List*
5538_elm_gengrid_item_elm_interface_atspi_accessible_children_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
5539{
5540 Eina_List *ret = NULL;
5541 if (VIEW(it))
5542 {
5543 Eina_List *parts;
5544 const char *key;
5545 parts = elm_widget_stringlist_get(edje_object_data_get(VIEW(it), "contents"));
5546
5547 EINA_LIST_FREE(parts, key)
5548 {
5549 Evas_Object *part;
5550 part = edje_object_part_swallow_get(VIEW(it), key);
5551 if (part && eo_isa(part, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
5552 ret = eina_list_append(ret, part);
5553 }
5554 }
5555 return ret;
5556}
5557
5558EAPI Elm_Object_Item * 5534EAPI Elm_Object_Item *
5559elm_gengrid_nth_item_get(const Evas_Object *obj, unsigned int nth) 5535elm_gengrid_nth_item_get(const Evas_Object *obj, unsigned int nth)
5560{ 5536{
@@ -5687,15 +5663,17 @@ _elm_gengrid_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUS
5687} 5663}
5688 5664
5689EOLIAN Eina_List* 5665EOLIAN Eina_List*
5690_elm_gengrid_elm_interface_atspi_accessible_children_get(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd) 5666_elm_gengrid_elm_interface_atspi_accessible_children_get(Eo *obj, Elm_Gengrid_Data *sd)
5691{ 5667{
5692 Eina_List *ret = NULL; 5668 Eina_List *ret = NULL, *ret2 = NULL;
5693 Elm_Gen_Item *it; 5669 Elm_Gen_Item *it;
5694 5670
5695 EINA_INLIST_FOREACH(sd->items, it) 5671 EINA_INLIST_FOREACH(sd->items, it)
5696 ret = eina_list_append(ret, EO_OBJ(it)); 5672 ret = eina_list_append(ret, EO_OBJ(it));
5697 5673
5698 return ret; 5674 eo_do_super(obj, ELM_GENGRID_CLASS, ret2 = elm_interface_atspi_accessible_children_get());
5675
5676 return eina_list_merge(ret, ret2);
5699} 5677}
5700 5678
5701EOLIAN Elm_Atspi_State_Set 5679EOLIAN Elm_Atspi_State_Set
diff --git a/src/lib/elm_gengrid_item.eo b/src/lib/elm_gengrid_item.eo
index 95a079c79..0783ee576 100644
--- a/src/lib/elm_gengrid_item.eo
+++ b/src/lib/elm_gengrid_item.eo
@@ -211,6 +211,5 @@ class Elm.Gengrid_Item(Elm.Widget_Item)
211 Elm.Widget_Item.cursor_unset; 211 Elm.Widget_Item.cursor_unset;
212 Elm_Interface_Atspi_Accessible.name.get; 212 Elm_Interface_Atspi_Accessible.name.get;
213 Elm_Interface_Atspi_Accessible.state_set.get; 213 Elm_Interface_Atspi_Accessible.state_set.get;
214 Elm_Interface_Atspi_Accessible.children.get;
215 } 214 }
216} 215}
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index d2d0005f2..020ab24bb 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -381,8 +381,6 @@ _item_content_realize(Elm_Gen_Item *it,
381 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key); 381 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key);
382 if (!content) continue; 382 if (!content) continue;
383 *contents = eina_list_append(*contents, content); 383 *contents = eina_list_append(*contents, content);
384 if (_elm_config->atspi_mode && eo_isa(content, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
385 eo_do(content, elm_interface_atspi_accessible_parent_set(EO_OBJ(it)));
386 if (!edje_object_part_swallow(target, key, content)) 384 if (!edje_object_part_swallow(target, key, content))
387 { 385 {
388 ERR("%s (%p) can not be swallowed into %s", 386 ERR("%s (%p) can not be swallowed into %s",
@@ -396,12 +394,6 @@ _item_content_realize(Elm_Gen_Item *it,
396 394
397 snprintf(buf, sizeof(buf), "elm,state,%s,visible", key); 395 snprintf(buf, sizeof(buf), "elm,state,%s,visible", key);
398 edje_object_signal_emit(target, buf, "elm"); 396 edje_object_signal_emit(target, buf, "elm");
399
400 if (_elm_config->atspi_mode && eo_isa(content, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
401 {
402 eo_do(content, elm_interface_atspi_accessible_parent_set(EO_OBJ(it)));
403 elm_interface_atspi_accessible_children_changed_added_signal_emit(EO_OBJ(it), content);
404 }
405 } 397 }
406 } 398 }
407} 399}
@@ -5903,6 +5895,8 @@ _elm_genlist_item_elm_widget_item_del_pre(Eo *eo_it EINA_UNUSED,
5903 sd->items = eina_inlist_remove(sd->items, EINA_INLIST_GET(it)); 5895 sd->items = eina_inlist_remove(sd->items, EINA_INLIST_GET(it));
5904 return EINA_FALSE; 5896 return EINA_FALSE;
5905 } 5897 }
5898 if (_elm_config->atspi_mode)
5899 elm_interface_atspi_accessible_children_changed_del_signal_emit(WIDGET(it),eo_it);
5906 5900
5907 _item_del(it); 5901 _item_del(it);
5908 return EINA_TRUE; 5902 return EINA_TRUE;
@@ -8109,30 +8103,6 @@ _elm_genlist_item_elm_interface_atspi_accessible_name_get(Eo *eo_it EINA_UNUSED,
8109 return ret; 8103 return ret;
8110} 8104}
8111 8105
8112EOLIAN Eina_List*
8113_elm_genlist_item_elm_interface_atspi_accessible_children_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
8114{
8115 Eina_List *ret = NULL;
8116 if (VIEW(it))
8117 {
8118 Eina_List *parts;
8119 const char *key;
8120 parts = elm_widget_stringlist_get(edje_object_data_get(VIEW(it), "contents"));
8121
8122 EINA_LIST_FREE(parts, key)
8123 {
8124 Evas_Object *part;
8125 part = edje_object_part_swallow_get(VIEW(it), key);
8126 if (part && eo_isa(part, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
8127 {
8128 ret = eina_list_append(ret, part);
8129 eo_do(part, elm_interface_atspi_accessible_parent_set(eo_it));
8130 }
8131 }
8132 }
8133 return ret;
8134}
8135
8136EOLIAN static void 8106EOLIAN static void
8137_elm_genlist_tree_effect_enabled_set(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bool enabled) 8107_elm_genlist_tree_effect_enabled_set(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bool enabled)
8138{ 8108{
@@ -8306,15 +8276,17 @@ _elm_genlist_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUS
8306} 8276}
8307 8277
8308EOLIAN Eina_List* 8278EOLIAN Eina_List*
8309_elm_genlist_elm_interface_atspi_accessible_children_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd) 8279_elm_genlist_elm_interface_atspi_accessible_children_get(Eo *obj, Elm_Genlist_Data *sd)
8310{ 8280{
8311 Eina_List *ret = NULL; 8281 Eina_List *ret = NULL, *ret2 = NULL;
8312 Elm_Gen_Item *it; 8282 Elm_Gen_Item *it;
8313 8283
8314 EINA_INLIST_FOREACH(sd->items, it) 8284 EINA_INLIST_FOREACH(sd->items, it)
8315 ret = eina_list_append(ret, EO_OBJ(it)); 8285 ret = eina_list_append(ret, EO_OBJ(it));
8316 8286
8317 return ret; 8287 eo_do_super(obj, ELM_GENLIST_CLASS, ret2 = elm_interface_atspi_accessible_children_get());
8288
8289 return eina_list_merge(ret, ret2);
8318} 8290}
8319 8291
8320EOLIAN Elm_Atspi_State_Set 8292EOLIAN Elm_Atspi_State_Set
diff --git a/src/lib/elm_genlist_item.eo b/src/lib/elm_genlist_item.eo
index e78c95684..b8187e76b 100644
--- a/src/lib/elm_genlist_item.eo
+++ b/src/lib/elm_genlist_item.eo
@@ -436,6 +436,5 @@ class Elm.Genlist_Item(Elm.Widget_Item)
436 Elm.Widget_Item.cursor_unset; 436 Elm.Widget_Item.cursor_unset;
437 Elm_Interface_Atspi_Accessible.name.get; 437 Elm_Interface_Atspi_Accessible.name.get;
438 Elm_Interface_Atspi_Accessible.state_set.get; 438 Elm_Interface_Atspi_Accessible.state_set.get;
439 Elm_Interface_Atspi_Accessible.children.get;
440 } 439 }
441} 440}
diff --git a/src/lib/elm_interface_atspi_accessible.c b/src/lib/elm_interface_atspi_accessible.c
index 357e609f3..70f948838 100644
--- a/src/lib/elm_interface_atspi_accessible.c
+++ b/src/lib/elm_interface_atspi_accessible.c
@@ -128,7 +128,6 @@ struct _Elm_Interface_Atspi_Accessible_Data
128 const char *description; 128 const char *description;
129 const char *translation_domain; 129 const char *translation_domain;
130 Elm_Atspi_Relation_Set relations; 130 Elm_Atspi_Relation_Set relations;
131 Elm_Interface_Atspi_Accessible *parent;
132 Elm_Atspi_Type type: 2; 131 Elm_Atspi_Type type: 2;
133}; 132};
134 133
@@ -167,13 +166,11 @@ _elm_interface_atspi_accessible_index_in_parent_get(Eo *obj, Elm_Interface_Atspi
167} 166}
168 167
169EOLIAN static Elm_Interface_Atspi_Accessible * 168EOLIAN static Elm_Interface_Atspi_Accessible *
170_elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd) 169_elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd EINA_UNUSED)
171{ 170{
172 Elm_Atspi_Type type; 171 Elm_Atspi_Type type;
173 Eo *parent = obj; 172 Eo *parent = obj;
174 173
175 if (pd->parent) return pd->parent;
176
177 do { 174 do {
178 eo_do(obj, parent = eo_parent_get()); 175 eo_do(obj, parent = eo_parent_get());
179 if (eo_isa(parent, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN)) 176 if (eo_isa(parent, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
@@ -187,13 +184,10 @@ _elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, Elm_Interface_At
187} 184}
188 185
189EOLIAN static void 186EOLIAN static void
190_elm_interface_atspi_accessible_parent_set(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd EINA_UNUSED, Elm_Interface_Atspi_Accessible *new_parent) 187_elm_interface_atspi_accessible_parent_set(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd EINA_UNUSED, Elm_Interface_Atspi_Accessible *new_parent EINA_UNUSED)
191{ 188{
192 if (pd->parent != new_parent) 189 WRN("The %s object does not implement the \"accessible_parent_set\" function.",
193 { 190 eo_class_name_get(eo_class_get(obj)));
194 pd->parent = new_parent;
195 elm_interface_atspi_accessible_parent_changed_signal_emit(obj);
196 }
197} 191}
198 192
199EOLIAN Eina_List* 193EOLIAN Eina_List*
@@ -587,8 +581,20 @@ _elm_interface_atspi_accessible_type_get(Eo *obj EINA_UNUSED, Elm_Interface_Atsp
587} 581}
588 582
589EOLIAN void 583EOLIAN void
590_elm_interface_atspi_accessible_type_set(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd, Elm_Atspi_Type val) 584_elm_interface_atspi_accessible_type_set(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd, Elm_Atspi_Type val)
591{ 585{
586 if (val == pd->type)
587 return;
588
589 switch (val)
590 {
591 case ELM_ATSPI_TYPE_DISABLED:
592 case ELM_ATSPI_TYPE_SKIPPED:
593 elm_interface_atspi_accessible_removed(obj);
594 break;
595 case ELM_ATSPI_TYPE_REGULAR:
596 elm_interface_atspi_accessible_added(obj);
597 }
592 pd->type = val; 598 pd->type = val;
593} 599}
594 600
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index 00be140fb..a4fbffe21 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -2157,19 +2157,6 @@ _elm_list_item_elm_interface_atspi_accessible_name_get(Eo *eo_it EINA_UNUSED, El
2157 return data->label ? strdup(data->label) : NULL; 2157 return data->label ? strdup(data->label) : NULL;
2158} 2158}
2159 2159
2160EOLIAN static Eina_List*
2161_elm_list_item_elm_interface_atspi_accessible_children_get(Eo *eo_it EINA_UNUSED, Elm_List_Item_Data *data)
2162{
2163 Eina_List *ret = NULL;
2164
2165 if (data->icon && eo_isa(data->icon, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
2166 ret = eina_list_append(ret, data->icon);
2167 if (data->end && eo_isa(data->end, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
2168 ret = eina_list_append(ret, data->end);
2169
2170 return ret;
2171}
2172
2173static char * 2160static char *
2174_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED) 2161_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
2175{ 2162{
@@ -2337,19 +2324,19 @@ _item_new(Evas_Object *obj,
2337 2324
2338 if (it->icon) 2325 if (it->icon)
2339 { 2326 {
2340 eo_do(it->icon, elm_interface_atspi_accessible_parent_set(eo_it));
2341 elm_widget_sub_object_add(obj, it->icon); 2327 elm_widget_sub_object_add(obj, it->icon);
2342 evas_object_event_callback_add 2328 evas_object_event_callback_add
2343 (it->icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb, 2329 (it->icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb,
2344 obj); 2330 obj);
2331 eo_do(it->icon, elm_interface_atspi_accessible_type_set(ELM_ATSPI_TYPE_DISABLED));
2345 } 2332 }
2346 if (it->end) 2333 if (it->end)
2347 { 2334 {
2348 eo_do(it->end, elm_interface_atspi_accessible_parent_set(eo_it));
2349 elm_widget_sub_object_add(obj, it->end); 2335 elm_widget_sub_object_add(obj, it->end);
2350 evas_object_event_callback_add 2336 evas_object_event_callback_add
2351 (it->end, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb, 2337 (it->end, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb,
2352 obj); 2338 obj);
2339 eo_do(it->end, elm_interface_atspi_accessible_type_set(ELM_ATSPI_TYPE_DISABLED));
2353 } 2340 }
2354 2341
2355 if (_elm_config->atspi_mode) 2342 if (_elm_config->atspi_mode)
@@ -2452,6 +2439,7 @@ _elm_list_evas_object_smart_add(Eo *obj, Elm_List_Data *priv)
2452 priv->box = elm_box_add(obj); 2439 priv->box = elm_box_add(obj);
2453 evas_object_size_hint_weight_set(priv->box, EVAS_HINT_EXPAND, 0.0); 2440 evas_object_size_hint_weight_set(priv->box, EVAS_HINT_EXPAND, 0.0);
2454 evas_object_size_hint_align_set(priv->box, EVAS_HINT_FILL, 0.0); 2441 evas_object_size_hint_align_set(priv->box, EVAS_HINT_FILL, 0.0);
2442 eo_do(priv->box, elm_interface_atspi_accessible_type_set(ELM_ATSPI_TYPE_DISABLED));
2455 2443
2456 /* FIXME: change this ugly code path later */ 2444 /* FIXME: change this ugly code path later */
2457 elm_widget_on_show_region_hook_set(priv->box, _show_region_hook, obj); 2445 elm_widget_on_show_region_hook_set(priv->box, _show_region_hook, obj);
@@ -3208,9 +3196,11 @@ _elm_list_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED,
3208} 3196}
3209 3197
3210EOLIAN Eina_List* 3198EOLIAN Eina_List*
3211_elm_list_elm_interface_atspi_accessible_children_get(Eo *eo_item EINA_UNUSED, Elm_List_Data *pd) 3199_elm_list_elm_interface_atspi_accessible_children_get(Eo *obj, Elm_List_Data *pd)
3212{ 3200{
3213 return eina_list_clone(pd->items); 3201 Eina_List *ret;
3202 eo_do_super(obj, ELM_LIST_CLASS, ret = elm_interface_atspi_accessible_children_get());
3203 return eina_list_merge(eina_list_clone(pd->items), ret);
3214} 3204}
3215 3205
3216EOLIAN int 3206EOLIAN int
diff --git a/src/lib/elm_list_item.eo b/src/lib/elm_list_item.eo
index 92b8d3fda..cd57846f0 100644
--- a/src/lib/elm_list_item.eo
+++ b/src/lib/elm_list_item.eo
@@ -118,7 +118,6 @@ class Elm.List_Item(Elm.Widget_Item)
118 Elm.Widget_Item.part_content_unset; 118 Elm.Widget_Item.part_content_unset;
119 Elm_Interface_Atspi_Accessible.name.get; 119 Elm_Interface_Atspi_Accessible.name.get;
120 Elm_Interface_Atspi_Accessible.state_set.get; 120 Elm_Interface_Atspi_Accessible.state_set.get;
121 Elm_Interface_Atspi_Accessible.children.get;
122 } 121 }
123} 122}
124 123
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 024493927..4fc055bc1 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -2370,6 +2370,7 @@ _item_new(Evas_Object *obj,
2370 2370
2371 VIEW(it) = elm_layout_add(obj); 2371 VIEW(it) = elm_layout_add(obj);
2372 evas_object_data_set(VIEW(it), "item", it); 2372 evas_object_data_set(VIEW(it), "item", it);
2373 eo_do(VIEW(it), elm_interface_atspi_accessible_type_set(ELM_ATSPI_TYPE_DISABLED));
2373 2374
2374 icon_obj = elm_icon_add(VIEW(it)); 2375 icon_obj = elm_icon_add(VIEW(it));
2375 elm_icon_order_lookup_set(icon_obj, sd->lookup_order); 2376 elm_icon_order_lookup_set(icon_obj, sd->lookup_order);
@@ -2377,9 +2378,6 @@ _item_new(Evas_Object *obj,
2377 if (_elm_config->access_mode == ELM_ACCESS_MODE_ON) 2378 if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
2378 _access_widget_item_register(it); 2379 _access_widget_item_register(it);
2379 2380
2380 eo_do(icon_obj, elm_interface_atspi_accessible_parent_set(VIEW(it)));
2381 eo_do(VIEW(it), elm_interface_atspi_accessible_parent_set(eo_it));
2382
2383 if (_item_icon_set(icon_obj, "toolbar/", icon)) 2381 if (_item_icon_set(icon_obj, "toolbar/", icon))
2384 { 2382 {
2385 it->icon = icon_obj; 2383 it->icon = icon_obj;
@@ -2758,6 +2756,7 @@ _elm_toolbar_evas_object_smart_add(Eo *obj, Elm_Toolbar_Data *priv)
2758 else 2756 else
2759 elm_object_signal_emit(priv->more, "elm,orient,horizontal", "elm"); 2757 elm_object_signal_emit(priv->more, "elm,orient,horizontal", "elm");
2760 2758
2759 eo_do(priv->more, elm_interface_atspi_accessible_type_set(ELM_ATSPI_TYPE_DISABLED));
2761 elm_widget_sub_object_add(obj, priv->more); 2760 elm_widget_sub_object_add(obj, priv->more);
2762 evas_object_show(priv->more); 2761 evas_object_show(priv->more);
2763 2762
@@ -3850,24 +3849,22 @@ _elm_toolbar_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUS
3850EOLIAN static Eina_List* 3849EOLIAN static Eina_List*
3851_elm_toolbar_elm_interface_atspi_accessible_children_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) 3850_elm_toolbar_elm_interface_atspi_accessible_children_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd)
3852{ 3851{
3853 Eina_List *ret = NULL; 3852 Eina_List *ret = NULL, *ret2 = NULL;
3854 Elm_Toolbar_Item_Data *it; 3853 Elm_Toolbar_Item_Data *it;
3854 eo_do_super(obj, ELM_TOOLBAR_CLASS, ret2 = elm_interface_atspi_accessible_children_get());
3855 3855
3856 EINA_INLIST_FOREACH(sd->items, it) 3856 EINA_INLIST_FOREACH(sd->items, it)
3857 ret = eina_list_append(ret, EO_OBJ(it)); 3857 ret = eina_list_append(ret, EO_OBJ(it));
3858 3858
3859 return ret; 3859 return eina_list_merge(ret, ret2);
3860} 3860}
3861 3861
3862EOLIAN static Elm_Atspi_State_Set 3862EOLIAN static Elm_Atspi_State_Set
3863_elm_toolbar_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Toolbar_Data *sd EINA_UNUSED) 3863_elm_toolbar_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Toolbar_Data *sd EINA_UNUSED)
3864{ 3864{
3865 Elm_Atspi_State_Set ret; 3865 Elm_Atspi_State_Set ret;
3866
3867 eo_do_super(obj, ELM_TOOLBAR_CLASS, ret = elm_interface_atspi_accessible_state_set_get()); 3866 eo_do_super(obj, ELM_TOOLBAR_CLASS, ret = elm_interface_atspi_accessible_state_set_get());
3868 3867
3869 STATE_TYPE_SET(ret, ELM_ATSPI_STATE_MANAGES_DESCENDANTS);
3870
3871 return ret; 3868 return ret;
3872} 3869}
3873 3870
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 9e7e086c8..31cd752a7 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -1207,12 +1207,12 @@ _elm_widget_sub_object_add(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj
1207 1207
1208 elm_widget_display_mode_set(sobj, 1208 elm_widget_display_mode_set(sobj,
1209 evas_object_size_hint_display_mode_get(obj)); 1209 evas_object_size_hint_display_mode_get(obj));
1210 if (_elm_config->atspi_mode && !sdc->on_create) 1210 if (_elm_config->atspi_mode && !sd->on_create)
1211 { 1211 {
1212 Elm_Interface_Atspi_Accessible *aparent; 1212 Elm_Interface_Atspi_Accessible *aparent;
1213 eo_do(sobj, aparent = elm_interface_atspi_accessible_parent_get()); 1213 eo_do(sobj, aparent = elm_interface_atspi_accessible_parent_get());
1214 if (obj == aparent) 1214 if (aparent)
1215 elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, sobj); 1215 elm_interface_atspi_accessible_children_changed_added_signal_emit(aparent, sobj);
1216 } 1216 }
1217 } 1217 }
1218 1218
@@ -1289,8 +1289,8 @@ _elm_widget_sub_object_del(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj
1289 { 1289 {
1290 Elm_Interface_Atspi_Accessible *aparent; 1290 Elm_Interface_Atspi_Accessible *aparent;
1291 eo_do(sobj, aparent = elm_interface_atspi_accessible_parent_get()); 1291 eo_do(sobj, aparent = elm_interface_atspi_accessible_parent_get());
1292 if (obj == aparent) 1292 if (aparent)
1293 elm_interface_atspi_accessible_children_changed_del_signal_emit(obj, sobj); 1293 elm_interface_atspi_accessible_children_changed_del_signal_emit(aparent, sobj);
1294 } 1294 }
1295 1295
1296 ELM_WIDGET_DATA_GET(sobj, sdc); 1296 ELM_WIDGET_DATA_GET(sobj, sdc);
@@ -4474,9 +4474,6 @@ _elm_widget_item_eo_base_destructor(Eo *eo_item, Elm_Widget_Item_Data *item)
4474 elm_interface_atspi_accessible_relationships_clear() 4474 elm_interface_atspi_accessible_relationships_clear()
4475 ); 4475 );
4476 4476
4477 if (_elm_config->atspi_mode && item->widget)
4478 elm_interface_atspi_accessible_children_changed_del_signal_emit(item->widget, eo_item);
4479
4480 elm_interface_atspi_accessible_removed(eo_item); 4477 elm_interface_atspi_accessible_removed(eo_item);
4481 4478
4482 EINA_MAGIC_SET(item, EINA_MAGIC_NONE); 4479 EINA_MAGIC_SET(item, EINA_MAGIC_NONE);
@@ -4678,14 +4675,6 @@ _elm_widget_item_elm_interface_atspi_accessible_state_set_get(Eo *eo_item,
4678 return states; 4675 return states;
4679} 4676}
4680 4677
4681EOLIAN static Eo*
4682_elm_widget_item_elm_interface_atspi_accessible_parent_get(Eo *eo_item, Elm_Widget_Item_Data *item EINA_UNUSED)
4683{
4684 Eo *parent;
4685 eo_do(eo_item, parent = eo_parent_get());
4686 return parent;
4687}
4688
4689EAPI void 4678EAPI void
4690elm_object_item_data_set(Elm_Object_Item *it, void *data) 4679elm_object_item_data_set(Elm_Object_Item *it, void *data)
4691{ 4680{
@@ -5888,13 +5877,8 @@ EOLIAN static Eo*
5888_elm_widget_elm_interface_atspi_accessible_parent_get(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED) 5877_elm_widget_elm_interface_atspi_accessible_parent_get(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED)
5889{ 5878{
5890 Elm_Atspi_Type type; 5879 Elm_Atspi_Type type;
5891 Elm_Interface_Atspi_Accessible *parent; 5880 Elm_Interface_Atspi_Accessible *parent = obj;
5892
5893 eo_do_super(obj, ELM_WIDGET_CLASS, parent = elm_interface_atspi_accessible_parent_get());
5894 if (parent)
5895 return parent;
5896 5881
5897 parent = obj;
5898 do { 5882 do {
5899 ELM_WIDGET_DATA_GET_OR_RETURN(parent, wd, NULL); 5883 ELM_WIDGET_DATA_GET_OR_RETURN(parent, wd, NULL);
5900 parent = wd->parent_obj; 5884 parent = wd->parent_obj;
diff --git a/src/lib/elm_widget_item.eo b/src/lib/elm_widget_item.eo
index 9953bc8d9..a937b4ec4 100644
--- a/src/lib/elm_widget_item.eo
+++ b/src/lib/elm_widget_item.eo
@@ -530,7 +530,6 @@ class Elm.Widget_Item(Eo.Base, Elm_Interface_Atspi_Accessible,
530 Eo.Base.constructor; 530 Eo.Base.constructor;
531 Eo.Base.destructor; 531 Eo.Base.destructor;
532 Elm_Interface_Atspi_Accessible.state_set.get; 532 Elm_Interface_Atspi_Accessible.state_set.get;
533 Elm_Interface_Atspi_Accessible.parent.get;
534 Elm_Interface_Atspi_Component.extents.get; 533 Elm_Interface_Atspi_Component.extents.get;
535 Elm_Interface_Atspi_Component.extents.set; 534 Elm_Interface_Atspi_Component.extents.set;
536 Elm_Interface_Atspi_Component.alpha.get; 535 Elm_Interface_Atspi_Component.alpha.get;
diff --git a/src/tests/elm_test_genlist.c b/src/tests/elm_test_genlist.c
index 593e04cab..a2008156f 100644
--- a/src/tests/elm_test_genlist.c
+++ b/src/tests/elm_test_genlist.c
@@ -180,41 +180,6 @@ START_TEST(elm_atspi_children_events_del2)
180} 180}
181END_TEST 181END_TEST
182 182
183static Evas_Object *
184gl_content_get(void *data EINA_UNUSED, Evas_Object *obj, const char *part EINA_UNUSED)
185{
186 content = elm_button_add(obj);
187 return content;
188}
189
190/**
191 * Validate if genlist implementation properly reset AT-SPI parent to Elm_Genlist_Item
192 * from Elm_Genlist
193 */
194START_TEST(elm_atspi_children_parent)
195{
196 test_init();
197
198 evas_object_show(genlist);
199
200 Elm_Object_Item *it;
201 Elm_Interface_Atspi_Accessible *parent;
202 content = NULL;
203
204 itc.item_style = "default";
205 itc.func.content_get = gl_content_get;
206
207 it = elm_genlist_item_append(genlist, &itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
208 elm_genlist_item_fields_update(it, "*.", ELM_GENGRID_ITEM_FIELD_CONTENT);
209
210 ck_assert(content != NULL);
211 eo_do(content, parent = elm_interface_atspi_accessible_parent_get());
212 ck_assert(it == parent);
213
214 elm_shutdown();
215}
216END_TEST
217
218void elm_test_genlist(TCase *tc) 183void elm_test_genlist(TCase *tc)
219{ 184{
220 tcase_add_test(tc, elm_atspi_role_get); 185 tcase_add_test(tc, elm_atspi_role_get);
@@ -223,5 +188,4 @@ void elm_test_genlist(TCase *tc)
223 tcase_add_test(tc, elm_atspi_children_events_add); 188 tcase_add_test(tc, elm_atspi_children_events_add);
224 tcase_add_test(tc, elm_atspi_children_events_del1); 189 tcase_add_test(tc, elm_atspi_children_events_del1);
225 tcase_add_test(tc, elm_atspi_children_events_del2); 190 tcase_add_test(tc, elm_atspi_children_events_del2);
226 tcase_add_test(tc, elm_atspi_children_parent);
227} 191}
diff --git a/src/tests/elm_test_list.c b/src/tests/elm_test_list.c
index 6ae7ab54c..54665f41f 100644
--- a/src/tests/elm_test_list.c
+++ b/src/tests/elm_test_list.c
@@ -216,15 +216,15 @@ START_TEST(elm_atspi_children_parent)
216 Evas_Object *end = elm_icon_add(win); 216 Evas_Object *end = elm_icon_add(win);
217 217
218 Evas_Object *list = elm_list_add(win); 218 Evas_Object *list = elm_list_add(win);
219 Elm_Object_Item *it = elm_list_item_append(list, "First Element", icon, end, NULL, NULL); 219 elm_list_item_append(list, "First Element", icon, end, NULL, NULL);
220 220
221 evas_object_show(list); 221 evas_object_show(list);
222 222
223 eo_do(icon, parent = elm_interface_atspi_accessible_parent_get()); 223 eo_do(icon, parent = elm_interface_atspi_accessible_parent_get());
224 ck_assert(it == parent); 224 ck_assert(list == parent);
225 225
226 eo_do(end, parent = elm_interface_atspi_accessible_parent_get()); 226 eo_do(end, parent = elm_interface_atspi_accessible_parent_get());
227 ck_assert(it == parent); 227 ck_assert(list == parent);
228 228
229 elm_shutdown(); 229 elm_shutdown();
230} 230}