bug 1305402 - add new IPC messages needed for AtkTableCell interface r=davidb
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Wed, 28 Sep 2016 11:07:11 -0400
changeset 318517 bcabd365e0de99d2e1b3613e092e249dbd1b272c
parent 318516 0c5938913dcd055e2d014db2db73eeb802f164ed
child 318518 4e5f6ceea72b4c1c120e054b390fb67ff778c3bb
push id20725
push userphilringnalda@gmail.com
push dateThu, 20 Oct 2016 01:36:01 +0000
treeherderfx-team@998ad5a74da8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1305402
milestone52.0a1
bug 1305402 - add new IPC messages needed for AtkTableCell interface r=davidb To implement the interface with 1 IPC message per method we need these new messages.
accessible/ipc/ProxyAccessibleShared.h
accessible/ipc/other/DocAccessibleChild.cpp
accessible/ipc/other/DocAccessibleChild.h
accessible/ipc/other/PDocAccessible.ipdl
accessible/ipc/other/ProxyAccessible.cpp
--- a/accessible/ipc/ProxyAccessibleShared.h
+++ b/accessible/ipc/ProxyAccessibleShared.h
@@ -170,20 +170,25 @@ int32_t LinkIndexOf(ProxyAccessible* aLi
 int32_t LinkIndexAtOffset(uint32_t aOffset);
 
 ProxyAccessible* TableOfACell();
 
 uint32_t ColIdx();
 
 uint32_t RowIdx();
 
+void GetPosition(uint32_t* aColIdx, uint32_t* aRowIdx);
+
 uint32_t ColExtent();
 
 uint32_t RowExtent();
 
+void GetColRowExtents(uint32_t* aColIdx, uint32_t* aRowIdx,
+                      uint32_t* aColExtent, uint32_t* aRowExtent);
+
 void ColHeaderCells(nsTArray<ProxyAccessible*>* aCells);
 
 void RowHeaderCells(nsTArray<ProxyAccessible*>* aCells);
 
 bool IsCellSelected();
 
 ProxyAccessible* TableCaption();
 void TableSummary(nsString& aSummary);
--- a/accessible/ipc/other/DocAccessibleChild.cpp
+++ b/accessible/ipc/other/DocAccessibleChild.cpp
@@ -947,16 +947,51 @@ DocAccessibleChild::RecvRowIdx(const uin
   if (acc) {
     *aIndex = acc->RowIdx();
   }
 
   return true;
 }
 
 bool
+DocAccessibleChild::RecvGetPosition(const uint64_t& aID,
+                               uint32_t* aColIdx, uint32_t* aRowIdx)
+{
+  *aColIdx = 0;
+  *aRowIdx = 0;
+  TableCellAccessible* acc = IdToTableCellAccessible(aID);
+  if (acc) {
+    *aColIdx = acc->ColIdx();
+    *aRowIdx = acc->RowIdx();
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvGetColRowExtents(const uint64_t& aID,
+                                         uint32_t* aColIdx, uint32_t* aRowIdx,
+                                         uint32_t* aColExtent, uint32_t* aRowExtent)
+{
+  *aColIdx = 0;
+  *aRowIdx = 0;
+  *aColExtent = 0;
+  *aRowExtent = 0;
+  TableCellAccessible* acc = IdToTableCellAccessible(aID);
+  if (acc) {
+    *aColIdx = acc->ColIdx();
+    *aRowIdx = acc->RowIdx();
+    *aColExtent = acc->ColExtent();
+    *aRowExtent = acc->RowExtent();
+  }
+
+  return true;
+}
+
+bool
 DocAccessibleChild::RecvColExtent(const uint64_t& aID,
                                   uint32_t* aExtent)
 {
   *aExtent = 0;
   TableCellAccessible* acc = IdToTableCellAccessible(aID);
   if (acc) {
     *aExtent = acc->ColExtent();
   }
--- a/accessible/ipc/other/DocAccessibleChild.h
+++ b/accessible/ipc/other/DocAccessibleChild.h
@@ -254,16 +254,23 @@ public:
                                 bool* aOk) override;
 
   virtual bool RecvColIdx(const uint64_t& aID, uint32_t* aIndex) override;
 
   virtual bool RecvRowIdx(const uint64_t& aID, uint32_t* aIndex) override;
 
   virtual bool RecvColExtent(const uint64_t& aID, uint32_t* aExtent) override;
 
+  virtual bool RecvGetPosition(const uint64_t& aID,
+                               uint32_t* aColIdx, uint32_t* aRowIdx) override;
+
+  virtual bool RecvGetColRowExtents(const uint64_t& aID,
+                                  uint32_t* aColIdx, uint32_t* aRowIdx,
+                                  uint32_t* aColExtent, uint32_t* aRowExtent) override;
+
   virtual bool RecvRowExtent(const uint64_t& aID, uint32_t* aExtent) override;
 
   virtual bool RecvColHeaderCells(const uint64_t& aID,
                                   nsTArray<uint64_t>* aCells) override;
 
   virtual bool RecvRowHeaderCells(const uint64_t& aID,
                                   nsTArray<uint64_t>* aCells) override;
 
--- a/accessible/ipc/other/PDocAccessible.ipdl
+++ b/accessible/ipc/other/PDocAccessible.ipdl
@@ -168,18 +168,21 @@ child:
   nested(inside_sync) sync LinkCount(uint64_t aID) returns(uint32_t aCount);
   nested(inside_sync) sync LinkAt(uint64_t aID, uint32_t aIndex) returns(uint64_t aIDOfLink, bool aOk);
   nested(inside_sync) sync LinkIndexOf(uint64_t aID, uint64_t aLinkID) returns(int32_t aIndex);
   nested(inside_sync) sync LinkIndexAtOffset(uint64_t aID, uint32_t aOffset) returns(int32_t aIndex);
 
   nested(inside_sync) sync TableOfACell(uint64_t aID) returns(uint64_t aTableID, bool aOk);
   nested(inside_sync) sync ColIdx(uint64_t aID) returns(uint32_t aIndex);
   nested(inside_sync) sync RowIdx(uint64_t aID) returns(uint32_t aIndex);
+  nested(inside_sync) sync GetPosition(uint64_t aID) returns(uint32_t aRow, uint32_t aCol);
   nested(inside_sync) sync ColExtent(uint64_t aID) returns(uint32_t aExtent);
   nested(inside_sync) sync RowExtent(uint64_t aID) returns(uint32_t aExtent);
+  nested(inside_sync) sync GetColRowExtents(uint64_t aID)
+    returns(uint32_t aCol, uint32_t aRow, uint32_t aColExtent, uint32_t aRowExtent);
   nested(inside_sync) sync ColHeaderCells(uint64_t aID) returns(uint64_t[] aCells);
   nested(inside_sync) sync RowHeaderCells(uint64_t aID) returns(uint64_t[] aCells);
   nested(inside_sync) sync IsCellSelected(uint64_t aID) returns(bool aSelected);
 
   nested(inside_sync) sync TableCaption(uint64_t aID) returns(uint64_t aCaptionID, bool aOk);
   nested(inside_sync) sync TableSummary(uint64_t aID) returns(nsString aSummary);
   nested(inside_sync) sync TableColumnCount(uint64_t aID) returns(uint32_t aColCount);
   nested(inside_sync) sync TableRowCount(uint64_t aID) returns(uint32_t aRowCount);
--- a/accessible/ipc/other/ProxyAccessible.cpp
+++ b/accessible/ipc/other/ProxyAccessible.cpp
@@ -512,16 +512,29 @@ ProxyAccessible::ColIdx()
 uint32_t
 ProxyAccessible::RowIdx()
 {
   uint32_t index = 0;
   Unused << mDoc->SendRowIdx(mID, &index);
   return index;
 }
 
+void
+ProxyAccessible::GetColRowExtents(uint32_t* aColIdx, uint32_t* aRowIdx,
+                                  uint32_t* aColExtent, uint32_t* aRowExtent)
+{
+  Unused << mDoc->SendGetColRowExtents(mID, aColIdx, aRowIdx, aColExtent, aRowExtent);
+}
+
+void
+ProxyAccessible::GetPosition(uint32_t* aColIdx, uint32_t* aRowIdx)
+{
+  Unused << mDoc->SendGetPosition(mID, aColIdx, aRowIdx);
+}
+
 uint32_t
 ProxyAccessible::ColExtent()
 {
   uint32_t extent = 0;
   Unused << mDoc->SendColExtent(mID, &extent);
   return extent;
 }