[Accessibility]: Access frame going behind popup issue fix when popup is created... 48/156948/2
authorShilpa Singh <shilpa.singh@samsung.com>
Wed, 18 Oct 2017 13:31:04 +0000 (19:01 +0530)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Mon, 23 Oct 2017 04:30:07 +0000 (04:30 +0000)
Change-Id: I4e4bdf9c7ce6bd9528311319119c5f8c9e287d17

src/lib/elc_naviframe.c

index 565ffaf..fabc264 100644 (file)
@@ -687,6 +687,12 @@ _elm_naviframe_item_eo_base_destructor(Eo *eo_item, Elm_Naviframe_Item_Data *it)
           elm_object_signal_emit(VIEW(prev_it), "elm,state,visible", "elm");
         //
 
+        //TIZEN_ONLY(20171019): add state_notify api
+        if (_elm_atspi_enabled())
+           eo_do(VIEW(prev_it), elm_interface_atspi_accessible_state_notify(
+                 ATSPI_STATE(ELM_ATSPI_STATE_SHOWING) | ATSPI_STATE(ELM_ATSPI_STATE_VISIBLE), EINA_TRUE));
+        //
+
         eo_do(WIDGET(prev_it), eo_event_callback_call(ELM_NAVIFRAME_EVENT_ITEM_ACTIVATED, EO_OBJ(prev_it)));
      }
 
@@ -1293,21 +1299,6 @@ _on_item_pop_finished(void *data,
    sd->popping = eina_list_remove(sd->popping, it);
 
    eo_do(EO_OBJ(it), elm_wdg_item_del());
-
-   //TIZEN_ONLY(20161122): add state_notify api
-   Eo *eo_top = elm_naviframe_top_item_get(widget);
-   if (eo_top)
-     {
-        ELM_NAVIFRAME_ITEM_DATA_GET(eo_top, top);
-        _elm_win_default_label_obj_append(VIEW(top));
-
-        if (_elm_atspi_enabled())
-          {
-             eo_do(VIEW(top), elm_interface_atspi_accessible_state_notify(
-                   ATSPI_STATE(ELM_ATSPI_STATE_SHOWING) | ATSPI_STATE(ELM_ATSPI_STATE_VISIBLE), EINA_TRUE));
-          }
-     }
-   //
 }
 
 /* "elm,state,new,pushed",
@@ -1340,16 +1331,23 @@ _on_item_show_finished(void *data,
      evas_object_freeze_events_set(VIEW(it), EINA_FALSE);
 
    it->pushing = EINA_FALSE;
-
-   eo_do(WIDGET(it), eo_event_callback_call(ELM_NAVIFRAME_EVENT_TRANSITION_FINISHED, EO_OBJ(it)));
-
+   //TIZEN_ONLY(20161122): add state_notify api
    if (EO_OBJ(it) == elm_naviframe_top_item_get(WIDGET(it)))
      {
-        eo_do(WIDGET(it), eo_event_callback_call(ELM_NAVIFRAME_EVENT_ITEM_ACTIVATED, EO_OBJ(it)));
-        //TIZEN_ONLY(20170919): Handle default label object
         _elm_win_default_label_obj_append(VIEW(it));
-        //
+
+        if (_elm_atspi_enabled())
+          {
+             eo_do(VIEW(it), elm_interface_atspi_accessible_state_notify(
+                   ATSPI_STATE(ELM_ATSPI_STATE_SHOWING) | ATSPI_STATE(ELM_ATSPI_STATE_VISIBLE), EINA_TRUE));
+          }
      }
+   //
+
+   eo_do(WIDGET(it), eo_event_callback_call(ELM_NAVIFRAME_EVENT_TRANSITION_FINISHED, EO_OBJ(it)));
+
+   if (EO_OBJ(it) == elm_naviframe_top_item_get(WIDGET(it)))
+     eo_do(WIDGET(it), eo_event_callback_call(ELM_NAVIFRAME_EVENT_ITEM_ACTIVATED, EO_OBJ(it)));
 }
 
 static void
@@ -1899,10 +1897,10 @@ _item_push_helper(Elm_Naviframe_Item_Data *item)
 
    if (!top_item)
      {
+       //TIZEN_ONLY(20170919): Handle default label object
+       _elm_win_default_label_obj_append(VIEW(item));
+       //
         eo_do(obj, eo_event_callback_call(ELM_NAVIFRAME_EVENT_ITEM_ACTIVATED, EO_OBJ(item)));
-        //TIZEN_ONLY(20170919): Handle default label object
-        _elm_win_default_label_obj_append(VIEW(item));
-        //
      }
 }
 
@@ -2023,6 +2021,11 @@ _elm_naviframe_item_insert_after(Eo *obj, Elm_Naviframe_Data *sd, Elm_Object_Ite
         _resize_object_reset(obj, it);
         evas_object_show(VIEW(it));
         evas_object_hide(VIEW(after));
+        //TIZEN_ONLY(20171019): add state_notify api
+        if (_elm_atspi_enabled())
+           eo_do(VIEW(after), elm_interface_atspi_accessible_state_notify(
+                 ATSPI_STATE(ELM_ATSPI_STATE_SHOWING) | ATSPI_STATE(ELM_ATSPI_STATE_VISIBLE), EINA_TRUE));
+        //
         if (elm_object_focus_allow_get(VIEW(it)))
           elm_object_focus_set(VIEW(it), EINA_TRUE);
         else
@@ -2049,7 +2052,15 @@ _elm_naviframe_item_insert_after(Eo *obj, Elm_Naviframe_Data *sd, Elm_Object_Ite
    elm_layout_sizing_eval(obj);
 
    if (top_inserted)
-     eo_do(obj, eo_event_callback_call(ELM_NAVIFRAME_EVENT_ITEM_ACTIVATED, eo_item));
+     {
+        //TIZEN_ONLY(20171019): Handle default label object
+        _elm_win_default_label_obj_append(VIEW(it));
+        if (_elm_atspi_enabled())
+           eo_do(VIEW(it), elm_interface_atspi_accessible_state_notify(
+                 ATSPI_STATE(ELM_ATSPI_STATE_SHOWING) | ATSPI_STATE(ELM_ATSPI_STATE_VISIBLE), EINA_TRUE));
+        //
+        eo_do(obj, eo_event_callback_call(ELM_NAVIFRAME_EVENT_ITEM_ACTIVATED, eo_item));
+     }
 
    return eo_item;
 }