atspi: use last appended relation information 04/166504/4
authorJunsuChoi <jsuya.choi@samsung.com>
Wed, 10 Jan 2018 11:24:09 +0000 (20:24 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Fri, 12 Jan 2018 06:31:53 +0000 (06:31 +0000)
    So far, the screen reader has used the first relation information.
    So application should remove appended relation information, before appending
    relation information newly. This is hard to use in some point of view.
    The application used *append API as *set API.
    So using last appended relation information makes more sense.

Change-Id: If83bcd2328fcda955d1eb8ea5fba600abfe1d687

src/lib/elementary/elm_atspi_bridge.c

index 1203cb0..77f65db 100644 (file)
@@ -4635,7 +4635,11 @@ static void *_get_object_in_relation_by_type_impl(struct accessibility_navigatio
        Eina_List *l;
        EINA_LIST_FOREACH(relations, l, rel)
          {
-           if (rel->type == expected_relation_type) return rel->objects ? rel->objects->data : NULL;
+           if (rel->type == expected_relation_type)
+             {
+                Eina_List *last = eina_list_last(rel->objects);
+                return eina_list_data_get(last);
+             }
          }
      }
    return NULL;