Bug 1171995 - Part 2: Add IsTable, IsTableRow, IsTableCell to proxied accessibles r=tbsaunde
authorLorien Hu <lorien@lorienhu.com>
Thu, 16 Jul 2015 17:34:51 -0400
changeset 253399 728d627656ca061daa04c663025c3d92682391ca
parent 253398 6bacbe6ab496eb63d6ad329069c92c7110ffa7b8
child 253400 5c981fda1d41e332c02ef800d3f7394db1de3916
push id29065
push userryanvm@gmail.com
push dateFri, 17 Jul 2015 14:26:32 +0000
treeherdermozilla-central@911935404233 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs1171995
milestone42.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 1171995 - Part 2: Add IsTable, IsTableRow, IsTableCell to proxied accessibles r=tbsaunde
accessible/ipc/ProxyAccessible.h
--- a/accessible/ipc/ProxyAccessible.h
+++ b/accessible/ipc/ProxyAccessible.h
@@ -189,16 +189,22 @@ public:
   nsIntSize ImageSize();
 
   uint32_t StartOffset(bool* aOk);
 
   uint32_t EndOffset(bool* aOk);
 
   bool IsLinkValid();
 
+  // XXX checking mRole alone may not result in same behavior as Accessibles
+  // due to ARIA roles
+  inline bool IsTable() const { return mRole == roles::TABLE; }
+  inline bool IsTableRow() const { return mRole == roles::ROW; }
+  inline bool IsTableCell() const { return mRole == roles::CELL; }
+
   uint32_t AnchorCount(bool* aOk);
 
   void AnchorURIAt(uint32_t aIndex, nsCString& aURI, bool* aOk);
 
   ProxyAccessible* AnchorAt(uint32_t aIndex);
 
   uint32_t LinkCount();