bug 1210884 - expose the action interface on proxied accessibles r=davidb
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Fri, 02 Oct 2015 08:47:32 -0400
changeset 266747 f48787d52534533e04b574a1734e33c4b6304143
parent 266746 c45c9add2d8d081a158492936527aeabec7cddac
child 266748 3c1f5c76e1ee73826e6a89d38942033c70570922
push id29497
push usercbook@mozilla.com
push dateThu, 08 Oct 2015 13:27:17 +0000
treeherdermozilla-central@1f4cf75c8948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1210884
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1210884 - expose the action interface on proxied accessibles r=davidb
accessible/atk/AccessibleWrap.cpp
accessible/ipc/DocAccessibleChild.cpp
accessible/ipc/ProxyAccessible.h
--- a/accessible/atk/AccessibleWrap.cpp
+++ b/accessible/atk/AccessibleWrap.cpp
@@ -1123,16 +1123,20 @@ GetInterfacesForProxy(ProxyAccessible* a
 
   if (aInterfaces & Interfaces::DOCUMENT)
     interfaces |= 1 << MAI_INTERFACE_DOCUMENT;
 
   if (aInterfaces & Interfaces::SELECTION) {
     interfaces |= 1 << MAI_INTERFACE_SELECTION;
   }
 
+  if (aInterfaces & Interfaces::ACTION) {
+    interfaces |= 1 << MAI_INTERFACE_ACTION;
+  }
+
   return interfaces;
 }
 
 void
 a11y::ProxyCreated(ProxyAccessible* aProxy, uint32_t aInterfaces)
 {
   GType type = GetMaiAtkType(GetInterfacesForProxy(aProxy, aInterfaces));
   NS_ASSERTION(type, "why don't we have a type!");
--- a/accessible/ipc/DocAccessibleChild.cpp
+++ b/accessible/ipc/DocAccessibleChild.cpp
@@ -45,16 +45,20 @@ InterfacesFor(Accessible* aAcc)
 
   if (aAcc->IsDoc())
     interfaces |= Interfaces::DOCUMENT;
 
   if (aAcc->IsSelect()) {
     interfaces |= Interfaces::SELECTION;
   }
 
+  if (aAcc->ActionCount()) {
+    interfaces |= Interfaces::ACTION;
+  }
+
   return interfaces;
 }
 
 static void
 SerializeTree(Accessible* aRoot, nsTArray<AccessibleData>& aTree)
 {
   uint64_t id = reinterpret_cast<uint64_t>(aRoot->UniqueID());
   uint32_t role = aRoot->Role();
--- a/accessible/ipc/ProxyAccessible.h
+++ b/accessible/ipc/ProxyAccessible.h
@@ -390,14 +390,15 @@ enum Interfaces
   HYPERTEXT = 1,
   HYPERLINK = 2,
   IMAGE = 4,
   VALUE = 8,
   TABLE = 16,
   TABLECELL = 32,
   DOCUMENT = 64,
   SELECTION = 128,
+  ACTION = 256,
 };
 
 }
 }
 
 #endif