bug 673689 - fix some new places where nsIAccessibleRole::ROLE_FOO was added r=me

This commit is contained in:
Trevor Saunders 2012-01-11 23:42:47 -05:00
parent 789c87b5e0
commit 3d30db3267
4 changed files with 7 additions and 10 deletions

View File

@ -601,11 +601,9 @@ nsAccessible::VisibilityState()
do {
// We don't want background tab page content to be aggressively invisible.
// Otherwise this foils screen reader virtual buffer caches.
PRUint32 role = accessible->Role();
if (role == nsIAccessibleRole::ROLE_PROPERTYPAGE ||
role == nsIAccessibleRole::ROLE_PANE) {
roles::Role role = accessible->Role();
if (role == roles::PROPERTYPAGE || role == roles::PANE)
break;
}
nsIFrame* frame = accessible->GetFrame();
if (!frame)

View File

@ -209,9 +209,9 @@ public:
*/
inline void MaybeNotifyOfValueChange(nsAccessible* aAccessible)
{
PRUint32 role = aAccessible->Role();
if (role == nsIAccessibleRole::ROLE_ENTRY ||
role == nsIAccessibleRole::ROLE_COMBOBOX) {
mozilla::a11y::role role = aAccessible->Role();
if (role == mozilla::a11y::roles::ENTRY ||
role == mozilla::a11y::roles::COMBOBOX) {
nsRefPtr<AccEvent> valueChangeEvent =
new AccEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE, aAccessible,
eAutoDetect, AccEvent::eRemoveDupes);

View File

@ -72,7 +72,7 @@
/**
* The nsIAccessible role of our gecko accessible.
*/
PRUint32 mRole;
mozilla::a11y::role mRole;
}
// inits with the gecko owner.

View File

@ -254,8 +254,7 @@ GetLocalizedString(const nsString& aString)
if ([attribute isEqualToString:NSAccessibilityValueAttribute])
return [self value];
if ([attribute isEqualToString:NSAccessibilityRoleDescriptionAttribute]) {
if ((mRole == nsIAccessibleRole::ROLE_INTERNAL_FRAME)
|| (mRole == nsIAccessibleRole::ROLE_DOCUMENT_FRAME))
if (mRole == roles::INTERNAL_FRAME || mRole == roles::DOCUMENT_FRAME)
return GetLocalizedString(NS_LITERAL_STRING("htmlContent")) ? : @"HTML Content";
return NSAccessibilityRoleDescription([self role], nil);