From 8456de8bdef4e6b4887e4a028b8f98ea2485b29e Mon Sep 17 00:00:00 2001 From: Jonathan Wei Date: Wed, 12 Feb 2014 10:07:48 -0500 Subject: [PATCH] Bug 960382 - Accessible table rows should be of ATK_ROLE_TABLE_ROW, not ATK_ROLE_LIST_ITEM. r=tbsaunde --- accessible/src/atk/AccessibleWrap.cpp | 2 ++ accessible/src/atk/nsMai.h | 3 ++- accessible/src/base/RoleMap.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/accessible/src/atk/AccessibleWrap.cpp b/accessible/src/atk/AccessibleWrap.cpp index fef2bae5b7ec..5f98faac2cc5 100644 --- a/accessible/src/atk/AccessibleWrap.cpp +++ b/accessible/src/atk/AccessibleWrap.cpp @@ -691,6 +691,8 @@ getRoleCB(AtkObject *aAtkObj) if (aAtkObj->role == ATK_ROLE_LIST_BOX && !IsAtkVersionAtLeast(2, 1)) aAtkObj->role = ATK_ROLE_LIST; + else if (aAtkObj->role == ATK_ROLE_TABLE_ROW && !IsAtkVersionAtLeast(2, 1)) + aAtkObj->role = ATK_ROLE_LIST_ITEM; return aAtkObj->role; } diff --git a/accessible/src/atk/nsMai.h b/accessible/src/atk/nsMai.h index 903d4229f4f6..5de552ac67a5 100644 --- a/accessible/src/atk/nsMai.h +++ b/accessible/src/atk/nsMai.h @@ -39,7 +39,8 @@ extern int atkMajorVersion, atkMinorVersion; static inline bool IsAtkVersionAtLeast(int aMajor, int aMinor) { - return aMajor < atkMajorVersion && aMinor < atkMinorVersion; + return aMajor < atkMajorVersion || + (aMajor == atkMajorVersion && aMinor <= atkMinorVersion); } #endif /* __NS_MAI_H__ */ diff --git a/accessible/src/base/RoleMap.h b/accessible/src/base/RoleMap.h index 7b7706103393..70a3721b1f67 100644 --- a/accessible/src/base/RoleMap.h +++ b/accessible/src/base/RoleMap.h @@ -242,7 +242,7 @@ ROLE(COLUMN, ROLE(ROW, "row", - ATK_ROLE_LIST_ITEM, + ATK_ROLE_TABLE_ROW, NSAccessibilityRowRole, ROLE_SYSTEM_ROW, ROLE_SYSTEM_ROW,