bug 1162654 - allow proxies to implement the document interface r=davidb
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Thu, 07 May 2015 13:31:56 -0400
changeset 243080 ccfb65a28a154511a32229a696ad819a6e93deda
parent 243079 60e13432ce2e86ac301b65098f734a79f75ce0fa
child 243081 fd24ed68c6426e372e0d9a148f8d35d3a9fcdb88
push id59591
push usertrev.saunders@gmail.com
push dateSat, 09 May 2015 04:03:20 +0000
treeherdermozilla-inbound@fd24ed68c642 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1162654
milestone40.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 1162654 - allow proxies to implement the document interface r=davidb
accessible/atk/AccessibleWrap.cpp
accessible/ipc/DocAccessibleChild.cpp
accessible/ipc/ProxyAccessible.h
--- a/accessible/atk/AccessibleWrap.cpp
+++ b/accessible/atk/AccessibleWrap.cpp
@@ -1048,16 +1048,19 @@ GetInterfacesForProxy(ProxyAccessible* a
     interfaces |= MAI_INTERFACE_VALUE;
 
   if (aInterfaces & Interfaces::TABLE)
     interfaces |= MAI_INTERFACE_TABLE;
 
   if (aInterfaces & Interfaces::IMAGE)
     interfaces |= MAI_INTERFACE_IMAGE;
 
+  if (aInterfaces & Interfaces::DOCUMENT)
+    interfaces |= MAI_INTERFACE_DOCUMENT;
+
   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
@@ -34,16 +34,19 @@ InterfacesFor(Accessible* aAcc)
     interfaces |= Interfaces::VALUE;
 
   if (aAcc->IsImage())
     interfaces |= Interfaces::IMAGE;
 
   if (aAcc->IsTableCell())
     interfaces |= Interfaces::TABLECELL;
 
+  if (aAcc->IsDoc())
+    interfaces |= Interfaces::DOCUMENT;
+
   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
@@ -315,14 +315,15 @@ private:
 enum Interfaces
 {
   HYPERTEXT = 1,
   HYPERLINK = 2,
   IMAGE = 4,
   VALUE = 8,
   TABLE = 16,
   TABLECELL = 32,
+  DOCUMENT = 64,
 };
 
 }
 }
 
 #endif