From ecb709218601cee6fca9183dafdf17197abdd0d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Thu, 1 Oct 2015 11:06:00 +0200 Subject: [PATCH] Bug 1210441 - ProxyAccessible::IsTable* should take tabular MathML accessibles into account. r=tbsaunde --- accessible/ipc/ProxyAccessible.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/accessible/ipc/ProxyAccessible.h b/accessible/ipc/ProxyAccessible.h index efd197417a6b..bc2d84b96578 100644 --- a/accessible/ipc/ProxyAccessible.h +++ b/accessible/ipc/ProxyAccessible.h @@ -218,10 +218,25 @@ public: 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; } + // due to ARIA roles. See bug 1210477. + inline bool IsTable() const + { + return mRole == roles::TABLE || mRole == roles::MATHML_TABLE; + } + inline bool IsTableRow() const + { + return (mRole == roles::ROW || + mRole == roles::MATHML_TABLE_ROW || + mRole == roles::MATHML_LABELED_ROW); + } + inline bool IsTableCell() const + { + return (mRole == roles::CELL || + mRole == roles::COLUMNHEADER || + mRole == roles::ROWHEADER || + mRole == roles::GRID_CELL || + mRole == roles::MATHML_CELL); + } uint32_t AnchorCount(bool* aOk);