[AT-SPI] Add child_bus attribute to parents having remote accessibility object child 20/285420/2
authorArtur Świgoń <a.swigon@samsung.com>
Mon, 12 Dec 2022 10:24:13 +0000 (11:24 +0100)
committerLukasz Oleksak <l.oleksak@samsung.com>
Fri, 16 Dec 2022 10:32:10 +0000 (10:32 +0000)
This will allow AT-clients to query in a single dbus call (via collection iface) all busses used for UI embedding.
Result of such query may be used by AT-client to limit its dbus calls to:

a) active window process
b) processes that provide UIs embedded in active window

and avoid dbus calls to processes being in background, which respond very slowly.

Change-Id: Iacccb00087380e3f2e33cd8feb7b5120068922c7

dali-toolkit/internal/controls/web-view/web-view-impl.cpp
dali-toolkit/internal/controls/web-view/web-view-impl.h

index 632baaf..68aec5e 100755 (executable)
@@ -1288,6 +1288,18 @@ WebView::WebViewAccessible::WebViewAccessible(Dali::Actor self, Dali::WebEngine&
   }
 }
 
+Dali::Accessibility::Attributes WebView::WebViewAccessible::GetAttributes() const
+{
+  auto attributes = DevelControl::ControlAccessible::GetAttributes();
+
+  if(mRemoteChild.GetAddress())
+  {
+    attributes.insert_or_assign("child_bus", mRemoteChild.GetAddress().GetBus());
+  }
+
+  return attributes;
+}
+
 void WebView::WebViewAccessible::DoGetChildren(std::vector<Dali::Accessibility::Accessible*>& children)
 {
   if(mRemoteChild.GetAddress())
index 6f5e386..cfbb31e 100755 (executable)
@@ -689,6 +689,11 @@ protected:
 
   protected:
     /**
+     * @copydoc Dali::Accessibility::Accessible::GetAttributes()
+     */
+    Dali::Accessibility::Attributes GetAttributes() const override;
+
+    /**
      * @copydoc Dali::Accessibility::ActorAccessible::DoGetChildren()
      */
     void DoGetChildren(std::vector<Dali::Accessibility::Accessible*>& children) override;