atspi: make webapp work 65/250665/1 accepted/tizen/unified/20210104.130306 submit/tizen/20210103.044544 submit/tizen/20210103.212140
authorShinwoo Kim <cinoo.kim@samsung.com>
Mon, 28 Dec 2020 11:16:00 +0000 (20:16 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Thu, 31 Dec 2020 02:53:19 +0000 (11:53 +0900)
The webapp does not use evas smart object which type is (E)WebView.
The webapp is using only window. So we need to check promissed data
using the window, and create elm_atspi_ewk_wrapper.

Change-Id: Id6ab9b7fa329f40de7f1479e5a23888a80fdad6d

src/lib/elementary/efl_ui_widget.c

index 9ca05ffaaf7c2bf3b2bfbb5c114febcec15aefbf..46aea6bf555a8562e1910237111c22b41570b662 100644 (file)
@@ -5986,6 +5986,13 @@ _efl_ui_widget_efl_access_object_access_children_get(const Eo *obj EINA_UNUSED,
    Evas_Object *widget;
    Eo *proxy = NULL;
 
+   /* this is for webapp which is using window only */
+   if (efl_access_object_role_get(obj) == EFL_ACCESS_ROLE_WINDOW)
+     {
+        if (evas_object_data_get(obj, "__PlugID"))
+          elm_atspi_ewk_wrapper_a11y_init((Eo *)obj, (Eo *)obj);
+     }
+
    for (unsigned int i = 0; i < eina_array_count(pd->children); ++i)
      {
         widget = eina_array_data_get(pd->children, i);
@@ -8369,6 +8376,18 @@ _efl_ui_widget_efl_access_component_accessible_at_point_get(Eo *obj, Elm_Widget_
    switch (role)
      {
       case ELM_ATSPI_ROLE_WINDOW:
+        /* this is for webapp which is using window only */
+        if (evas_object_data_get(obj, "__PlugID"))
+          {
+             Eina_List *children;
+             Evas_Object *child;
+             children = efl_access_object_access_children_get(obj);
+             EINA_LIST_FOREACH(children, l, child)
+               {
+                  if (efl_access_object_role_get(child) == EFL_ACCESS_ROLE_EMBEDDED)
+                    return child;
+               }
+          }
       case ELM_ATSPI_ROLE_INPUT_METHOD_WINDOW:
       case ELM_ATSPI_ROLE_DIALOG:
       case ELM_ATSPI_ROLE_PAGE_TAB: