From 8a36acf4bf797c6f09319034a9b8aeefd4e86668 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Wed, 10 Jan 2018 19:15:00 +0900 Subject: [PATCH] atspi: do not accept invisible object Issue: If an object is child of scrollable parent, then the object is accepted even though the object is invisible. Solution: Do not accept invisible object. Change-Id: I60c1b7ccdbaac2239f6bd8cbdac7da1e3cf2d0ef --- src/lib/elementary/elm_atspi_bridge.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index db1c477..1203cb0 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -4290,6 +4290,12 @@ static unsigned char _object_is_highlightable(accessibility_navigation_pointer_t return _state_set_is_set(state_set, ATSPI_STATE_HIGHLIGHTABLE); } +static unsigned char _object_is_visible(accessibility_navigation_pointer_table *table, void *obj) +{ + uint64_t state_set = CALL(object_get_state_set, obj); + return _state_set_is_set(state_set, ATSPI_STATE_VISIBLE); +} + static unsigned char _object_is_showing(accessibility_navigation_pointer_table *table, void *obj) { uint64_t state_set = CALL(object_get_state_set, obj); @@ -4327,6 +4333,7 @@ static void *_get_scrollable_parent(accessibility_navigation_pointer_table *tabl static unsigned char _accept_object(accessibility_navigation_pointer_table *table, void *obj) { if (!obj) return 0; + if (!_object_is_visible(table, obj)) return 0; if (!_accept_object_check_role(table, obj)) return 0; if (CALL(get_object_in_relation_by_type, obj, ATSPI_RELATION_CONTROLLED_BY) != NULL) return 0; if (!_object_is_highlightable(table, obj)) return 0; -- 2.7.4