Bug 340773. Wrong use of ifdefs for ATK constants. Patch by Ginn Chen. r=aaronl
git-svn-id: svn://10.0.0.236/trunk@199592 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
1e6878961f
commit
0f41b3c01b
@ -536,12 +536,12 @@ nsAccessibleWrap::TranslateStates(PRUint32 aState, PRUint32 aExtState, void *aAt
|
||||
if (aState & nsIAccessible::STATE_INVALID)
|
||||
atk_state_set_add_state (state_set, ATK_STATE_INVALID);
|
||||
|
||||
#ifdef ATK_STATE_DEFAULT
|
||||
#if 0
|
||||
if (aState & nsIAccessible::STATE_DEFAULT)
|
||||
atk_state_set_add_state (state_set, ATK_STATE_DEFAULT);
|
||||
#endif
|
||||
|
||||
#ifdef ATK_STATE_REQUIRED
|
||||
#ifdef USE_ATK_STATE_REQUIRED
|
||||
if (aState & nsIAccessible::STATE_REQUIRED)
|
||||
atk_state_set_add_state (state_set, ATK_STATE_REQUIRED);
|
||||
#endif
|
||||
@ -800,12 +800,12 @@ getRoleCB(AtkObject *aAtkObj)
|
||||
}
|
||||
accRole = linkRole;
|
||||
}
|
||||
#ifndef ATK_ROLE_AUTOCOMPLETE
|
||||
#ifndef USE_ATK_ROLE_AUTOCOMPLETE
|
||||
else if (accRole == nsIAccessible::ROLE_AUTOCOMPLETE) {
|
||||
accRole = ATK_ROLE_COMBO_BOX;
|
||||
}
|
||||
#endif
|
||||
#ifndef ATK_ROLE_CAPTION
|
||||
#ifndef USE_ATK_ROLE_CAPTION
|
||||
else if (accRole == nsIAccessible::ROLE_CAPTION) {
|
||||
accRole = ATK_ROLE_LABEL;
|
||||
}
|
||||
|
||||
@ -51,6 +51,24 @@
|
||||
#define MAI_LOGGING
|
||||
#endif /* #ifdef PR_LOGGING */
|
||||
|
||||
#if ATK_MAJOR_VERSION >=2 || \
|
||||
(ATK_MAJOR_VERSION == 1 && ATK_MINOR_VERSION >= 4) || \
|
||||
(ATK_MAJOR_VERSION == 1 && ATK_MINOR_VERSION == 3 && ATK_REV_VERSION >=3)
|
||||
#define USE_ATK_ROLE_AUTOCOMPLETE
|
||||
#endif
|
||||
|
||||
#if ATK_MAJOR_VERSION >=2 || \
|
||||
(ATK_MAJOR_VERSION == 1 && ATK_MINOR_VERSION >= 12) || \
|
||||
(ATK_MAJOR_VERSION == 1 && ATK_MINOR_VERSION == 11 && ATK_REV_VERSION >=1)
|
||||
#define USE_ATK_ROLE_CAPTION
|
||||
#endif
|
||||
|
||||
#if ATK_MAJOR_VERSION >=2 || \
|
||||
(ATK_MAJOR_VERSION == 1 && ATK_MINOR_VERSION >= 11) || \
|
||||
(ATK_MAJOR_VERSION == 1 && ATK_MINOR_VERSION == 10 && ATK_REV_VERSION >=1)
|
||||
#define USE_ATK_STATE_REQUIRED
|
||||
#endif
|
||||
|
||||
struct _AtkObject;
|
||||
typedef struct _AtkObject AtkObject;
|
||||
|
||||
|
||||
@ -7674,6 +7674,13 @@ fi
|
||||
|
||||
if test "$ACCESSIBILITY" -a "$MOZ_ENABLE_GTK2" ; then
|
||||
AC_DEFINE(MOZ_ACCESSIBILITY_ATK)
|
||||
ATK_FULL_VERSION=`$PKG_CONFIG --modversion atk`
|
||||
ATK_MAJOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
|
||||
ATK_MINOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $2 }'`
|
||||
ATK_REV_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $3 }'`
|
||||
AC_DEFINE_UNQUOTED(ATK_MAJOR_VERSION, $ATK_MAJOR_VERSION)
|
||||
AC_DEFINE_UNQUOTED(ATK_MINOR_VERSION, $ATK_MINOR_VERSION)
|
||||
AC_DEFINE_UNQUOTED(ATK_REV_VERSION, $ATK_REV_VERSION)
|
||||
fi
|
||||
|
||||
# Used for LD_LIBRARY_PATH of run_viewer target
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user