[TIZEN] Check if child is visible in scrollable parent.
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / actor-accessible.cpp
index 81a0877..56125f2 100644 (file)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/actors/actor-devel.h>
+#include <dali/public-api/object/type-info.h>
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/window-devel.h>
@@ -177,6 +178,23 @@ void ActorAccessible::DoGetChildren(std::vector<Accessible*>& children)
   }
 }
 
+void ActorAccessible::UpdateAttributes(Attributes& attributes) const
+{
+  static const std::string classKey = "class";
+
+  Accessible::UpdateAttributes(attributes);
+
+  if(attributes.find(classKey) == attributes.end())
+  {
+    Dali::TypeInfo typeInfo;
+    Self().GetTypeInfo(typeInfo);
+    if(typeInfo)
+    {
+      attributes.emplace(classKey, typeInfo.GetName());
+    }
+  }
+}
+
 void ActorAccessible::UpdateChildren()
 {
   if(!mChildrenDirty)
@@ -194,7 +212,7 @@ void ActorAccessible::UpdateChildren()
   // Erase-remove idiom
   // TODO (C++20): Replace with std::erase_if
   auto it = std::remove_if(mChildren.begin(), mChildren.end(), [](const Accessible* child) {
-    return !child;
+    return !child || child->IsHidden();
   });
   mChildren.erase(it, mChildren.end());
   mChildren.shrink_to_fit();