зеркало из https://github.com/mozilla/pjs.git
Bug 340665. New ATK: expose links as ATK_ROLE_LINK, if available. r=Evan.Yan
This commit is contained in:
Родитель
7fd66afad7
Коммит
6d4b2fcdc3
|
@ -445,7 +445,6 @@ interface nsIAccessible : nsISupports
|
|||
enum { ROLE_COLUMN = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_ROW = 66U }; // ATK_ROLE_UNKNOWN
|
||||
enum { ROLE_CELL = 55U }; // ATK_ROLE_TABLE_CELL
|
||||
enum { ROLE_LINK = 101U }; // ATK doesn't have such role now
|
||||
enum { ROLE_HELPBALLOON = 66U }; // ATK_ROLE_UNKNOWN
|
||||
// The object represents a cartoon-like graphic object
|
||||
enum { ROLE_CHARACTER = 26U }; // ATK_ROLE_IMAGE
|
||||
|
@ -540,6 +539,8 @@ interface nsIAccessible : nsISupports
|
|||
enum { ROLE_SECTION = 83U }; // ATK_ROLE_SECTION
|
||||
enum { ROLE_REDUNDANT_OBJECT = 84U }; // ATK_ROLE_REDUNDANT_OBJECT
|
||||
enum { ROLE_FORM = 85U }; // ATK_ROLE_FORM
|
||||
enum { ROLE_LINK = 86U }; // ATK_ROLE_LINK
|
||||
enum { ROLE_IME = 87U }; // ATK_ROLE_INPUT_METHOD_WINDOW
|
||||
#else
|
||||
// MSAA Roles - only one per nsIAccessible or IAccessible
|
||||
enum { ROLE_TITLEBAR = 1U };
|
||||
|
|
|
@ -805,6 +805,7 @@ getRoleCB(AtkObject *aAtkObj)
|
|||
if (childCount > 0)
|
||||
accRole = nsIAccessible::ROLE_MENUPOPUP;
|
||||
}
|
||||
#ifndef USE_ATK_ROLE_LINK
|
||||
else if (accRole == nsIAccessible::ROLE_LINK) {
|
||||
//ATK doesn't have role-link now
|
||||
//register it on runtime
|
||||
|
@ -814,6 +815,7 @@ getRoleCB(AtkObject *aAtkObj)
|
|||
}
|
||||
accRole = linkRole;
|
||||
}
|
||||
#endif
|
||||
else if (accRole == nsIAccessible::ROLE_TEXT_CONTAINER) {
|
||||
accRole = ATK_ROLE_TEXT;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,6 @@
|
|||
#define USE_ATK_STATE_INVALID_ENTRY
|
||||
// When should we use ROLE_AUTCOMPLETE vs. STATE_SUPPORTS_AUTOCOMPLETION?
|
||||
#define USE_ATK_STATE_SUPPORTS_AUTOCOMPLETION // XXX not currently used
|
||||
#define USE_ATK_STATE_SELECTABLE_TEXT
|
||||
#endif
|
||||
|
||||
// ATK 1.12.0 or later
|
||||
|
@ -94,6 +93,14 @@
|
|||
#define USE_ATK_DESCRIPTION_RELATIONS
|
||||
#endif
|
||||
|
||||
// ATK 1.12.1 or later
|
||||
#if ATK_MAJOR_VERSION >=2 || \
|
||||
(ATK_MAJOR_VERSION == 1 && ATK_MINOR_VERSION >= 13) || \
|
||||
(ATK_MAJOR_VERSION == 1 && ATK_MINOR_VERSION == 12 && ATK_REV_VERSION >= 1)
|
||||
#define USE_ATK_ROLE_LINK
|
||||
#define USE_ATK_STATE_SELECTABLE_TEXT
|
||||
#endif
|
||||
|
||||
struct _AtkObject;
|
||||
typedef struct _AtkObject AtkObject;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче