atspi: Improves how to find the can_highlight of the widget. 52/153752/2
authorJunsuChoi <jsuya.choi@samsung.com>
Fri, 29 Sep 2017 09:11:36 +0000 (18:11 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 29 Sep 2017 09:14:08 +0000 (18:14 +0900)
   Returns EINA_FALSE if any of parents is EINA_FALSE
   when determining can_highlight.
   To determine can_highlight for the parent of an object,
   we try to find the parent of the parent again.
   As it repeats, it traverses as much as depth size factorial (d!)
   However, if any of the parent of the object has can_highlight of the widget data is EINA_FALSE,
   it is eventually EINA_FALSE

Change-Id: I82faab2e974801039c4c7c7d003f68314f7c9d4c

src/lib/elm_widget.c

index c815a01b513679343b3233689c55132020efc62f..cee6b63fa83d6779dc710cdff7253f7643688826 100644 (file)
@@ -5066,8 +5066,8 @@ _elm_widget_item_highlightable(Elm_Object_Item *item)
    eo_do(item, parent = elm_interface_atspi_accessible_parent_get());
    while (parent && !eo_isa(parent, ELM_ATSPI_APP_OBJECT_CLASS))
      {
-        eo_do(parent, can_highlight = elm_interface_atspi_accessible_can_highlight_get());
-        if (!can_highlight) return EINA_FALSE;
+        Elm_Widget_Smart_Data *parent_wd = eo_data_scope_get(parent, ELM_WIDGET_ITEM_CLASS);
+        if (!parent_wd->can_highlight) return EINA_FALSE;
         eo_do(parent, parent = elm_interface_atspi_accessible_parent_get());
      }
    return EINA_TRUE;
@@ -6957,8 +6957,8 @@ _elm_widget_highlightable(Evas_Object *obj)
    eo_do(obj, parent = elm_interface_atspi_accessible_parent_get());
    while (parent && !eo_isa(parent, ELM_ATSPI_APP_OBJECT_CLASS))
      {
-        eo_do(parent, can_highlight = elm_interface_atspi_accessible_can_highlight_get());
-        if (!can_highlight) return EINA_FALSE;
+        Elm_Widget_Smart_Data *parent_wd = eo_data_scope_get(parent, ELM_WIDGET_CLASS);
+        if (!parent_wd->can_highlight) return EINA_FALSE;
         eo_do(parent, parent = elm_interface_atspi_accessible_parent_get());
      }
    return EINA_TRUE;