Bug 1147079 - IPC Proxy for Table, r=tbsaunde
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Wed, 25 Mar 2015 16:16:24 +0200
changeset 235747 d92c07d1e6df5d28ef1668a2612ea2fc4d8d37f7
parent 235746 3702e7480713118515b0309ed65e0613332ce28c
child 235748 cff4597a0bf83e7581cefa39178c028f434766b3
push id57506
push useropettay@mozilla.com
push dateThu, 26 Mar 2015 10:42:13 +0000
treeherdermozilla-inbound@cff4597a0bf8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs1147079
milestone39.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 1147079 - IPC Proxy for Table, r=tbsaunde
accessible/ipc/DocAccessibleChild.cpp
accessible/ipc/DocAccessibleChild.h
accessible/ipc/PDocAccessible.ipdl
accessible/ipc/ProxyAccessible.cpp
accessible/ipc/ProxyAccessible.h
--- a/accessible/ipc/DocAccessibleChild.cpp
+++ b/accessible/ipc/DocAccessibleChild.cpp
@@ -77,16 +77,23 @@ DocAccessibleChild::IdToImageAccessible(
 
 TableCellAccessible*
 DocAccessibleChild::IdToTableCellAccessible(const uint64_t& aID) const
 {
   Accessible* acc = IdToAccessible(aID);
   return (acc && acc->IsTableCell()) ? acc->AsTableCell() : nullptr;
 }
 
+TableAccessible*
+DocAccessibleChild::IdToTableAccessible(const uint64_t& aID) const
+{
+  Accessible* acc = IdToAccessible(aID);
+  return (acc && acc->IsTable()) ? acc->AsTable() : nullptr;
+}
+
 void
 DocAccessibleChild::ShowEvent(AccShowEvent* aShowEvent)
 {
   Accessible* parent = aShowEvent->Parent();
   uint64_t parentID = parent->IsDoc() ? 0 : reinterpret_cast<uint64_t>(parent->UniqueID());
   uint32_t idxInParent = aShowEvent->GetAccessible()->IndexInParent();
   nsTArray<AccessibleData> shownTree;
   ShowEventData data(parentID, idxInParent, shownTree);
@@ -902,10 +909,400 @@ bool
 DocAccessibleChild::RecvIsCellSelected(const uint64_t& aID,
                                        bool* aSelected)
 {
   TableCellAccessible* acc = IdToTableCellAccessible(aID);
   *aSelected = acc && acc->Selected();
   return true;
 }
 
+bool
+DocAccessibleChild::RecvTableCaption(const uint64_t& aID,
+                                     uint64_t* aCaptionID,
+                                     bool* aOk)
+{
+  *aCaptionID = 0;
+  *aOk = false;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    Accessible* caption = acc->Caption();
+    if (caption) {
+      *aCaptionID = reinterpret_cast<uint64_t>(caption->UniqueID());
+      *aOk = true;
+    }
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableSummary(const uint64_t& aID,
+                                     nsString* aSummary)
+{
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    acc->Summary(*aSummary);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableColumnCount(const uint64_t& aID,
+                                         uint32_t* aColCount)
+{
+  *aColCount = 0;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aColCount = acc->ColCount();
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableRowCount(const uint64_t& aID,
+                                      uint32_t* aRowCount)
+{
+  *aRowCount = 0;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aRowCount = acc->RowCount();
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableCellAt(const uint64_t& aID,
+                                    const uint32_t& aRow,
+                                    const uint32_t& aCol,
+                                    uint64_t* aCellID,
+                                    bool* aOk)
+{
+  *aCellID = 0;
+  *aOk = false;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    Accessible* cell = acc->CellAt(aRow, aCol);
+    if (cell) {
+      *aCellID = reinterpret_cast<uint64_t>(cell->UniqueID());
+      *aOk = true;
+    }
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableCellIndexAt(const uint64_t& aID,
+                                         const uint32_t& aRow,
+                                         const uint32_t& aCol,
+                                         int32_t* aIndex)
+{
+  *aIndex = -1;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aIndex = acc->CellIndexAt(aRow, aCol);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableColumnIndexAt(const uint64_t& aID,
+                                           const uint32_t& aCellIndex,
+                                           int32_t* aCol)
+{
+  *aCol = -1;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aCol = acc->ColIndexAt(aCellIndex);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableRowIndexAt(const uint64_t& aID,
+                                        const uint32_t& aCellIndex,
+                                        int32_t* aRow)
+{
+  *aRow = -1;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aRow = acc->RowIndexAt(aCellIndex);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableRowAndColumnIndicesAt(const uint64_t& aID,
+                                                  const uint32_t& aCellIndex,
+                                                  int32_t* aRow,
+                                                  int32_t* aCol)
+{
+  *aRow = -1;
+  *aCol = -1;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    acc->RowAndColIndicesAt(aCellIndex, aRow, aCol);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableColumnExtentAt(const uint64_t& aID,
+                                            const uint32_t& aRow,
+                                            const uint32_t& aCol,
+                                            uint32_t* aExtent)
+{
+  *aExtent = 0;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aExtent = acc->ColExtentAt(aRow, aCol);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableRowExtentAt(const uint64_t& aID,
+                                         const uint32_t& aRow,
+                                         const uint32_t& aCol,
+                                         uint32_t* aExtent)
+{
+  *aExtent = 0;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aExtent = acc->RowExtentAt(aRow, aCol);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableColumnDescription(const uint64_t& aID,
+                                               const uint32_t& aCol,
+                                               nsString* aDescription)
+{
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    acc->ColDescription(aCol, *aDescription);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableRowDescription(const uint64_t& aID,
+                                            const uint32_t& aRow,
+                                            nsString* aDescription)
+{
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    acc->RowDescription(aRow, *aDescription);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableColumnSelected(const uint64_t& aID,
+                                            const uint32_t& aCol,
+                                            bool* aSelected)
+{
+  *aSelected = false;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aSelected = acc->IsColSelected(aCol);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableRowSelected(const uint64_t& aID,
+                                         const uint32_t& aRow,
+                                         bool* aSelected)
+{
+  *aSelected = false;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aSelected = acc->IsRowSelected(aRow);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableCellSelected(const uint64_t& aID,
+                                          const uint32_t& aRow,
+                                          const uint32_t& aCol,
+                                          bool* aSelected)
+{
+  *aSelected = false;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aSelected = acc->IsCellSelected(aRow, aCol);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableSelectedCellCount(const uint64_t& aID,
+                                               uint32_t* aSelectedCells)
+{
+  *aSelectedCells = 0;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aSelectedCells = acc->SelectedCellCount();
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableSelectedColumnCount(const uint64_t& aID,
+                                                 uint32_t* aSelectedColumns)
+{
+  *aSelectedColumns = 0;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aSelectedColumns = acc->SelectedColCount();
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableSelectedRowCount(const uint64_t& aID,
+                                              uint32_t* aSelectedRows)
+{
+  *aSelectedRows = 0;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aSelectedRows = acc->SelectedRowCount();
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableSelectedCells(const uint64_t& aID,
+                                           nsTArray<uint64_t>* aCellIDs)
+{
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    nsAutoTArray<Accessible*, 30> cells;
+    acc->SelectedCells(&cells);
+    aCellIDs->SetCapacity(cells.Length());
+    for (uint32_t i = 0; i < cells.Length(); ++i) {
+      aCellIDs->AppendElement(
+        reinterpret_cast<uint64_t>(cells[i]->UniqueID()));
+    }
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableSelectedCellIndices(const uint64_t& aID,
+                                                 nsTArray<uint32_t>* aCellIndices)
+{
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    acc->SelectedCellIndices(aCellIndices);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableSelectedColumnIndices(const uint64_t& aID,
+                                                   nsTArray<uint32_t>* aColumnIndices)
+{
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    acc->SelectedColIndices(aColumnIndices);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableSelectedRowIndices(const uint64_t& aID,
+                                                nsTArray<uint32_t>* aRowIndices)
+{
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    acc->SelectedRowIndices(aRowIndices);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableSelectColumn(const uint64_t& aID,
+                                          const uint32_t& aCol)
+{
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    acc->SelectCol(aCol);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableSelectRow(const uint64_t& aID,
+                                       const uint32_t& aRow)
+{
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    acc->SelectRow(aRow);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableUnselectColumn(const uint64_t& aID,
+                                            const uint32_t& aCol)
+{
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    acc->UnselectCol(aCol);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableUnselectRow(const uint64_t& aID,
+                                         const uint32_t& aRow)
+{
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    acc->UnselectRow(aRow);
+  }
+
+  return true;
+}
+
+bool
+DocAccessibleChild::RecvTableIsProbablyForLayout(const uint64_t& aID,
+                                                 bool* aForLayout)
+{
+  *aForLayout = false;
+  TableAccessible* acc = IdToTableAccessible(aID);
+  if (acc) {
+    *aForLayout = acc->IsProbablyLayoutTable();
+  }
+
+  return true;
+}
+
 }
 }
--- a/accessible/ipc/DocAccessibleChild.h
+++ b/accessible/ipc/DocAccessibleChild.h
@@ -11,17 +11,18 @@
 #include "mozilla/a11y/PDocAccessibleChild.h"
 #include "nsISupportsImpl.h"
 
 namespace mozilla {
 namespace a11y {
 class Accessible;
 class HyperTextAccessible;
 class ImageAccessible;
-
+class TableAccessible;
+class TableCellAccessible;
 class AccShowEvent;
 
   /*
    * These objects handle content side communication for an accessible document,
    * and their lifetime is the same as the document they represent.
    */
 class DocAccessibleChild : public PDocAccessibleChild
 {
@@ -240,23 +241,100 @@ public:
                                   nsTArray<uint64_t>* aCells) override;
 
   virtual bool RecvRowHeaderCells(const uint64_t& aID,
                                   nsTArray<uint64_t>* aCells) override;
 
   virtual bool RecvIsCellSelected(const uint64_t& aID,
                                   bool* aSelected) override;
 
+  virtual bool RecvTableCaption(const uint64_t& aID,
+                                uint64_t* aCaptionID,
+                                bool* aOk) override;
+  virtual bool RecvTableSummary(const uint64_t& aID,
+                                nsString* aSummary) override;
+  virtual bool RecvTableColumnCount(const uint64_t& aID,
+                                    uint32_t* aColCount) override;
+  virtual bool RecvTableRowCount(const uint64_t& aID,
+                                 uint32_t* aRowCount) override;
+  virtual bool RecvTableCellAt(const uint64_t& aID,
+                               const uint32_t& aRow,
+                               const uint32_t& aCol,
+                               uint64_t* aCellID,
+                               bool* aOk) override;
+  virtual bool RecvTableCellIndexAt(const uint64_t& aID,
+                                    const uint32_t& aRow,
+                                    const uint32_t& aCol,
+                                    int32_t* aIndex) override;
+  virtual bool RecvTableColumnIndexAt(const uint64_t& aID,
+                                      const uint32_t& aCellIndex,
+                                      int32_t* aCol) override;
+  virtual bool RecvTableRowIndexAt(const uint64_t& aID,
+                                   const uint32_t& aCellIndex,
+                                   int32_t* aRow) override;
+  virtual bool RecvTableRowAndColumnIndicesAt(const uint64_t& aID,
+                                             const uint32_t& aCellIndex,
+                                             int32_t* aRow,
+                                             int32_t* aCol) override;
+  virtual bool RecvTableColumnExtentAt(const uint64_t& aID,
+                                       const uint32_t& aRow,
+                                       const uint32_t& aCol,
+                                       uint32_t* aExtent) override;
+  virtual bool RecvTableRowExtentAt(const uint64_t& aID,
+                                    const uint32_t& aRow,
+                                    const uint32_t& aCol,
+                                    uint32_t* aExtent) override;
+  virtual bool RecvTableColumnDescription(const uint64_t& aID,
+                                          const uint32_t& aCol,
+                                          nsString* aDescription) override;
+  virtual bool RecvTableRowDescription(const uint64_t& aID,
+                                       const uint32_t& aRow,
+                                       nsString* aDescription) override;
+  virtual bool RecvTableColumnSelected(const uint64_t& aID,
+                                       const uint32_t& aCol,
+                                       bool* aSelected) override;
+  virtual bool RecvTableRowSelected(const uint64_t& aID,
+                                    const uint32_t& aRow,
+                                    bool* aSelected) override;
+  virtual bool RecvTableCellSelected(const uint64_t& aID,
+                                     const uint32_t& aRow,
+                                     const uint32_t& aCol,
+                                     bool* aSelected) override;
+  virtual bool RecvTableSelectedCellCount(const uint64_t& aID,
+                                          uint32_t* aSelectedCells) override;
+  virtual bool RecvTableSelectedColumnCount(const uint64_t& aID,
+                                            uint32_t* aSelectedColumns) override;
+  virtual bool RecvTableSelectedRowCount(const uint64_t& aID,
+                                         uint32_t* aSelectedRows) override;
+  virtual bool RecvTableSelectedCells(const uint64_t& aID,
+                                      nsTArray<uint64_t>* aCellIDs) override;
+  virtual bool RecvTableSelectedCellIndices(const uint64_t& aID,
+                                            nsTArray<uint32_t>* aCellIndices) override;
+  virtual bool RecvTableSelectedColumnIndices(const uint64_t& aID,
+                                              nsTArray<uint32_t>* aColumnIndices) override;
+  virtual bool RecvTableSelectedRowIndices(const uint64_t& aID,
+                                           nsTArray<uint32_t>* aRowIndices) override;
+  virtual bool RecvTableSelectColumn(const uint64_t& aID,
+                                     const uint32_t& aCol) override;
+  virtual bool RecvTableSelectRow(const uint64_t& aID,
+                                  const uint32_t& aRow) override;
+  virtual bool RecvTableUnselectColumn(const uint64_t& aID,
+                                       const uint32_t& aCol) override;
+  virtual bool RecvTableUnselectRow(const uint64_t& aID,
+                                    const uint32_t& aRow) override;
+  virtual bool RecvTableIsProbablyForLayout(const uint64_t& aID,
+                                            bool* aForLayout) override;
 private:
 
   Accessible* IdToAccessible(const uint64_t& aID) const;
   Accessible* IdToAccessibleLink(const uint64_t& aID) const;
   HyperTextAccessible* IdToHyperTextAccessible(const uint64_t& aID) const;
   ImageAccessible* IdToImageAccessible(const uint64_t& aID) const;
   TableCellAccessible* IdToTableCellAccessible(const uint64_t& aID) const;
+  TableAccessible* IdToTableAccessible(const uint64_t& aID) const;
 
   bool PersistentPropertiesToArray(nsIPersistentProperties* aProps,
                                    nsTArray<Attribute>* aAttributes);
 
   DocAccessible* mDoc;
 };
 
 }
--- a/accessible/ipc/PDocAccessible.ipdl
+++ b/accessible/ipc/PDocAccessible.ipdl
@@ -148,12 +148,41 @@ child:
   prio(high) sync TableOfACell(uint64_t aID) returns(uint64_t aTableID, bool aOk);
   prio(high) sync ColIdx(uint64_t aID) returns(uint32_t aIndex);
   prio(high) sync RowIdx(uint64_t aID) returns(uint32_t aIndex);
   prio(high) sync ColExtent(uint64_t aID) returns(uint32_t aExtent);
   prio(high) sync RowExtent(uint64_t aID) returns(uint32_t aExtent);
   prio(high) sync ColHeaderCells(uint64_t aID) returns(uint64_t[] aCells);
   prio(high) sync RowHeaderCells(uint64_t aID) returns(uint64_t[] aCells);
   prio(high) sync IsCellSelected(uint64_t aID) returns(bool aSelected);
+
+  prio(high) sync TableCaption(uint64_t aID) returns(uint64_t aCaptionID, bool aOk);
+  prio(high) sync TableSummary(uint64_t aID) returns(nsString aSummary);
+  prio(high) sync TableColumnCount(uint64_t aID) returns(uint32_t aColCount);
+  prio(high) sync TableRowCount(uint64_t aID) returns(uint32_t aRowCount);
+  prio(high) sync TableCellAt(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(uint64_t aCellID, bool aOk);
+  prio(high) sync TableCellIndexAt(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(int32_t aIndex);
+  prio(high) sync TableColumnIndexAt(uint64_t aID, uint32_t aCellIndex) returns(int32_t aCol);
+  prio(high) sync TableRowIndexAt(uint64_t aID, uint32_t aCellIndex) returns(int32_t aRow);
+  prio(high) sync TableRowAndColumnIndicesAt(uint64_t aID, uint32_t aCellIndex) returns(int32_t aRow, int32_t aCol);
+  prio(high) sync TableColumnExtentAt(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(uint32_t aExtent);
+  prio(high) sync TableRowExtentAt(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(uint32_t aExtent);
+  prio(high) sync TableColumnDescription(uint64_t aID, uint32_t aCol) returns(nsString aDescription);
+  prio(high) sync TableRowDescription(uint64_t aID, uint32_t aRow) returns(nsString aDescription);
+  prio(high) sync TableColumnSelected(uint64_t aID, uint32_t aCol) returns(bool aSelected);
+  prio(high) sync TableRowSelected(uint64_t aID, uint32_t aRow) returns(bool aSelected);
+  prio(high) sync TableCellSelected(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(bool aSelected);
+  prio(high) sync TableSelectedCellCount(uint64_t aID) returns(uint32_t aSelectedCells);
+  prio(high) sync TableSelectedColumnCount(uint64_t aID) returns(uint32_t aSelectedColumns);
+  prio(high) sync TableSelectedRowCount(uint64_t aID) returns(uint32_t aSelectedRows);
+  prio(high) sync TableSelectedCells(uint64_t aID) returns(uint64_t[] aCellIDs);
+  prio(high) sync TableSelectedCellIndices(uint64_t aID) returns(uint32_t[] aCellIndeces);
+  prio(high) sync TableSelectedColumnIndices(uint64_t aID) returns(uint32_t[] aColumnIndeces);
+  prio(high) sync TableSelectedRowIndices(uint64_t aID) returns(uint32_t[] aRowIndeces);
+  prio(high) sync TableSelectColumn(uint64_t aID, uint32_t aCol);
+  prio(high) sync TableSelectRow(uint64_t aID, uint32_t aRow);
+  prio(high) sync TableUnselectColumn(uint64_t aID, uint32_t aCol);
+  prio(high) sync TableUnselectRow(uint64_t aID, uint32_t aRow);
+  prio(high) sync TableIsProbablyForLayout(uint64_t aID) returns(bool aForLayout);
 };
 
 }
 }
--- a/accessible/ipc/ProxyAccessible.cpp
+++ b/accessible/ipc/ProxyAccessible.cpp
@@ -518,10 +518,218 @@ ProxyAccessible::RowHeaderCells(nsTArray
 bool
 ProxyAccessible::IsCellSelected()
 {
   bool selected = false;
   unused << mDoc->SendIsCellSelected(mID, &selected);
   return selected;
 }
 
+ProxyAccessible*
+ProxyAccessible::TableCaption()
+{
+  uint64_t captionID = 0;
+  bool ok = false;
+  unused << mDoc->SendTableCaption(mID, &captionID, &ok);
+  return ok ? mDoc->GetAccessible(captionID) : nullptr;
+}
+
+void
+ProxyAccessible::TableSummary(nsString& aSummary)
+{
+  unused << mDoc->SendTableSummary(mID, &aSummary);
+}
+
+uint32_t
+ProxyAccessible::TableColumnCount()
+{
+  uint32_t count = 0;
+  unused << mDoc->SendTableColumnCount(mID, &count);
+  return count;
+}
+
+uint32_t
+ProxyAccessible::TableRowCount()
+{
+  uint32_t count = 0;
+  unused << mDoc->SendTableRowCount(mID, &count);
+  return count;
+}
+
+ProxyAccessible*
+ProxyAccessible::TableCellAt(uint32_t aRow, uint32_t aCol)
+{
+  uint64_t cellID = 0;
+  bool ok = false;
+  unused << mDoc->SendTableCellAt(mID, aRow, aCol, &cellID, &ok);
+  return ok ? mDoc->GetAccessible(cellID) : nullptr;
+}
+
+int32_t
+ProxyAccessible::TableCellIndexAt(uint32_t aRow, uint32_t aCol)
+{
+  int32_t index = 0;
+  unused << mDoc->SendTableCellIndexAt(mID, aRow, aCol, &index);
+  return index;
+}
+
+int32_t
+ProxyAccessible::TableColumnIndexAt(uint32_t aCellIndex)
+{
+  int32_t index = 0;
+  unused << mDoc->SendTableColumnIndexAt(mID, aCellIndex, &index);
+  return index;
+}
+
+int32_t
+ProxyAccessible::TableRowIndexAt(uint32_t aCellIndex)
+{
+  int32_t index = 0;
+  unused << mDoc->SendTableRowIndexAt(mID, aCellIndex, &index);
+  return index;
+}
+
+void
+ProxyAccessible::TableRowAndColumnIndicesAt(uint32_t aCellIndex,
+                                            int32_t* aRow, int32_t* aCol)
+{
+  unused << mDoc->SendTableRowAndColumnIndicesAt(mID, aCellIndex, aRow, aCol);
+}
+
+uint32_t
+ProxyAccessible::TableColumnExtentAt(uint32_t aRow, uint32_t aCol)
+{
+  uint32_t extent = 0;
+  unused << mDoc->SendTableColumnExtentAt(mID, aRow, aCol, &extent);
+  return extent;
+}
+
+uint32_t
+ProxyAccessible::TableRowExtentAt(uint32_t aRow, uint32_t aCol)
+{
+  uint32_t extent = 0;
+  unused << mDoc->SendTableRowExtentAt(mID, aRow, aCol, &extent);
+  return extent;
+}
+
+void
+ProxyAccessible::TableColumnDescription(uint32_t aCol, nsString& aDescription)
+{
+  unused << mDoc->SendTableColumnDescription(mID, aCol, &aDescription);
+}
+
+void
+ProxyAccessible::TableRowDescription(uint32_t aRow, nsString& aDescription)
+{
+  unused << mDoc->SendTableRowDescription(mID, aRow, &aDescription);
+}
+
+bool
+ProxyAccessible::TableColumnSelected(uint32_t aCol)
+{
+  bool selected = false;
+  unused << mDoc->SendTableColumnSelected(mID, aCol, &selected);
+  return selected;
+}
+
+bool
+ProxyAccessible::TableRowSelected(uint32_t aRow)
+{
+  bool selected = false;
+  unused << mDoc->SendTableRowSelected(mID, aRow, &selected);
+  return selected;
+}
+
+bool
+ProxyAccessible::TableCellSelected(uint32_t aRow, uint32_t aCol)
+{
+  bool selected = false;
+  unused << mDoc->SendTableCellSelected(mID, aRow, aCol, &selected);
+  return selected;
+}
+
+uint32_t
+ProxyAccessible::TableSelectedCellCount()
+{
+  uint32_t count = 0;
+  unused << mDoc->SendTableSelectedCellCount(mID, &count);
+  return count;
+}
+
+uint32_t
+ProxyAccessible::TableSelectedColumnCount()
+{
+  uint32_t count = 0;
+  unused << mDoc->SendTableSelectedColumnCount(mID, &count);
+  return count;
+}
+
+uint32_t
+ProxyAccessible::TableSelectedRowCount()
+{
+  uint32_t count = 0;
+  unused << mDoc->SendTableSelectedRowCount(mID, &count);
+  return count;
+}
+
+void
+ProxyAccessible::TableSelectedCells(nsTArray<ProxyAccessible*>* aCellIDs)
+{
+  nsAutoTArray<uint64_t, 30> cellIDs;
+  unused << mDoc->SendTableSelectedCells(mID, &cellIDs);
+  aCellIDs->SetCapacity(cellIDs.Length());
+  for (uint32_t i = 0; i < cellIDs.Length(); ++i) {
+    aCellIDs->AppendElement(mDoc->GetAccessible(cellIDs[i]));
+  }
+}
+
+void
+ProxyAccessible::TableSelectedCellIndices(nsTArray<uint32_t>* aCellIndices)
+{
+  unused << mDoc->SendTableSelectedCellIndices(mID, aCellIndices);
+}
+
+void
+ProxyAccessible::TableSelectedColumnIndices(nsTArray<uint32_t>* aColumnIndices)
+{
+  unused << mDoc->SendTableSelectedColumnIndices(mID, aColumnIndices);
+}
+
+void
+ProxyAccessible::TableSelectedRowIndices(nsTArray<uint32_t>* aRowIndices)
+{
+  unused << mDoc->SendTableSelectedRowIndices(mID, aRowIndices);
+}
+
+void
+ProxyAccessible::TableSelectColumn(uint32_t aCol)
+{
+  unused << mDoc->SendTableSelectColumn(mID, aCol);
+}
+
+void
+ProxyAccessible::TableSelectRow(uint32_t aRow)
+{
+  unused << mDoc->SendTableSelectRow(mID, aRow);
+}
+
+void
+ProxyAccessible::TableUnselectColumn(uint32_t aCol)
+{
+  unused << mDoc->SendTableUnselectColumn(mID, aCol);
+}
+
+void
+ProxyAccessible::TableUnselectRow(uint32_t aRow)
+{
+  unused << mDoc->SendTableUnselectRow(mID, aRow);
+}
+
+bool
+ProxyAccessible::TableIsProbablyForLayout()
+{
+  bool forLayout = false;
+  unused << mDoc->SendTableIsProbablyForLayout(mID, &forLayout);
+  return forLayout;
+}
+
 }
 }
--- a/accessible/ipc/ProxyAccessible.h
+++ b/accessible/ipc/ProxyAccessible.h
@@ -212,16 +212,46 @@ public:
   uint32_t RowExtent();
 
   void ColHeaderCells(nsTArray<uint64_t>* aCells);
 
   void RowHeaderCells(nsTArray<uint64_t>* aCells);
 
   bool IsCellSelected();
 
+  ProxyAccessible* TableCaption();
+  void TableSummary(nsString& aSummary);
+  uint32_t TableColumnCount();
+  uint32_t TableRowCount();
+  ProxyAccessible* TableCellAt(uint32_t aRow, uint32_t aCol);
+  int32_t TableCellIndexAt(uint32_t aRow, uint32_t aCol);
+  int32_t TableColumnIndexAt(uint32_t aCellIndex);
+  int32_t TableRowIndexAt(uint32_t aCellIndex);
+  void TableRowAndColumnIndicesAt(uint32_t aCellIndex,
+                                  int32_t* aRow, int32_t* aCol);
+  uint32_t TableColumnExtentAt(uint32_t aRow, uint32_t aCol);
+  uint32_t TableRowExtentAt(uint32_t aRow, uint32_t aCol);
+  void TableColumnDescription(uint32_t aCol, nsString& aDescription);
+  void TableRowDescription(uint32_t aRow, nsString& aDescription);
+  bool TableColumnSelected(uint32_t aCol);
+  bool TableRowSelected(uint32_t aRow);
+  bool TableCellSelected(uint32_t aRow, uint32_t aCol);
+  uint32_t TableSelectedCellCount();
+  uint32_t TableSelectedColumnCount();
+  uint32_t TableSelectedRowCount();
+  void TableSelectedCells(nsTArray<ProxyAccessible*>* aCellIDs);
+  void TableSelectedCellIndices(nsTArray<uint32_t>* aCellIndices);
+  void TableSelectedColumnIndices(nsTArray<uint32_t>* aColumnIndices);
+  void TableSelectedRowIndices(nsTArray<uint32_t>* aRowIndices);
+  void TableSelectColumn(uint32_t aCol);
+  void TableSelectRow(uint32_t aRow);
+  void TableUnselectColumn(uint32_t aCol);
+  void TableUnselectRow(uint32_t aRow);
+  bool TableIsProbablyForLayout();
+
   /**
    * Allow the platform to store a pointers worth of data on us.
    */
   uintptr_t GetWrapper() const { return mWrapper; }
   void SetWrapper(uintptr_t aWrapper) { mWrapper = aWrapper; }
 
   /*
    * Return the ID of the accessible being proxied.