[AT-SPI] Remove Role check in AcceptObject 30/259930/4
authorMaria Bialota <m.bialota@samsung.com>
Wed, 16 Jun 2021 12:33:20 +0000 (14:33 +0200)
committerMaria Białota <m.bialota@samsung.com>
Thu, 24 Jun 2021 09:22:13 +0000 (09:22 +0000)
Removed AcceptObjectCheckRole() method and its call in AcceptObject().

Checking the AT-SPI Role of the Component to decide whether it should be
highlighted or not is not needed, as by default all Components are
non-highlightable and highlightability is decided individually
in dali-toolkit by setting the ACCESSIBILITY_HIGHLIGHTABLE property.

From now on if we want to turn on highlightability for certain
Components, we can do this in dali-toolkit on a class level
or in runtime per individual instance of a Component.

Change-Id: I4777594550765b0b8335e47cd322d7d96590fe55

dali/internal/accessibility/bridge/bridge-accessible.cpp

index ed4a81c..4fcd582 100644 (file)
@@ -58,46 +58,6 @@ void BridgeAccessible::RegisterInterfaces()
   dbusServer.addInterface("/", desc, true);
 }
 
-static bool AcceptObjectCheckRole(Component* obj)
-{
-  if(!obj)
-    return false;
-  switch(obj->GetRole())
-  {
-    case Role::APPLICATION:
-    case Role::FILLER:
-    case Role::SCROLL_PANE:
-    case Role::SPLIT_PANE:
-    case Role::WINDOW:
-    case Role::IMAGE:
-    case Role::IMAGE_MAP:
-    case Role::LIST:
-    case Role::ICON:
-    case Role::TOOL_BAR:
-    case Role::REDUNDANT_OBJECT:
-    case Role::COLOR_CHOOSER:
-    case Role::TREE_TABLE:
-    case Role::PAGE_TAB_LIST:
-    case Role::PAGE_TAB:
-    case Role::SPIN_BUTTON:
-    case Role::INPUT_METHOD_WINDOW:
-    case Role::EMBEDDED:
-    case Role::INVALID:
-    case Role::NOTIFICATION:
-    case Role::DATE_EDITOR:
-    case Role::TABLE:
-    {
-      return false;
-    }
-    default:
-    {
-      break;
-    }
-  }
-
-  return true;
-}
-
 static bool AcceptObjectCheckRelations(Component* obj)
 {
   auto r = obj->GetRelationSet();
@@ -152,8 +112,6 @@ static bool AcceptObject(Component* obj)
   const auto states = obj->GetStates();
   if(!states[State::VISIBLE])
     return false;
-  if(!AcceptObjectCheckRole(obj))
-    return false;
   if(!AcceptObjectCheckRelations(obj))
     return false;
   if(!states[State::HIGHLIGHTABLE])