Bug 708106 - Remove NSAccessibility constants for pre MacOS X 10.4. r=tbsaunde

This commit is contained in:
Hub Figuiere 2011-12-09 15:25:25 +08:00
parent bee0213e42
commit 1c103a2b35
3 changed files with 12 additions and 25 deletions

View File

@ -56,13 +56,6 @@
using namespace mozilla::a11y;
// These constants are only defined in OS X SDK 10.4, so we define them in order
// to be able to use for earlier OS versions.
const NSString *kInstanceDescriptionAttribute = @"AXDescription"; // NSAccessibilityDescriptionAttribute
const NSString *kTopLevelUIElementAttribute = @"AXTopLevelUIElement"; // NSAccessibilityTopLevelUIElementAttribute
const NSString *kTextLinkSubrole = @"AXTextLink"; // NSAccessibilitySecureTextFieldSubrole
const NSString *kURLAttribute = @"AXURL";
// converts a screen-global point in the cocoa coordinate system (with origo in the bottom-left corner
// of the screen), into a top-left screen point, that gecko can use.
static inline void
@ -200,8 +193,8 @@ GetNativeFromGeckoAccessible(nsIAccessible *anAccessible)
NSAccessibilityFocusedAttribute,
NSAccessibilityHelpAttribute,
NSAccessibilityTitleUIElementAttribute,
kTopLevelUIElementAttribute,
kInstanceDescriptionAttribute,
NSAccessibilityTopLevelUIElementAttribute,
NSAccessibilityDescriptionAttribute,
nil];
}
@ -238,7 +231,7 @@ GetNativeFromGeckoAccessible(nsIAccessible *anAccessible)
return [self value];
if ([attribute isEqualToString:NSAccessibilityRoleDescriptionAttribute])
return NSAccessibilityRoleDescription([self role], nil);
if ([attribute isEqualToString: (NSString*) kInstanceDescriptionAttribute])
if ([attribute isEqualToString:NSAccessibilityDescriptionAttribute])
return [self customDescription];
if ([attribute isEqualToString:NSAccessibilityFocusedAttribute])
return [NSNumber numberWithBool:[self isFocused]];
@ -246,7 +239,7 @@ GetNativeFromGeckoAccessible(nsIAccessible *anAccessible)
return [self size];
if ([attribute isEqualToString:NSAccessibilityWindowAttribute])
return [self window];
if ([attribute isEqualToString: (NSString*) kTopLevelUIElementAttribute])
if ([attribute isEqualToString:NSAccessibilityTopLevelUIElementAttribute])
return [self window];
if ([attribute isEqualToString:NSAccessibilityTitleAttribute])
return [self title];

View File

@ -43,9 +43,6 @@
using namespace mozilla::a11y;
extern const NSString *kInstanceDescriptionAttribute; // NSAccessibilityDescriptionAttribute
extern const NSString *kTopLevelUIElementAttribute; // NSAccessibilityTopLevelUIElementAttribute
enum CheckboxValue {
// these constants correspond to the values in the OS
kUnchecked = 0,
@ -67,12 +64,12 @@ enum CheckboxValue {
NSAccessibilitySizeAttribute, // required
NSAccessibilityWindowAttribute, // required
NSAccessibilityPositionAttribute, // required
kTopLevelUIElementAttribute, // required
NSAccessibilityTopLevelUIElementAttribute, // required
NSAccessibilityHelpAttribute,
NSAccessibilityEnabledAttribute, // required
NSAccessibilityFocusedAttribute, // required
NSAccessibilityTitleAttribute, // required
kInstanceDescriptionAttribute,
NSAccessibilityDescriptionAttribute,
nil];
}
return attributes;
@ -194,13 +191,13 @@ enum CheckboxValue {
NSAccessibilityRoleAttribute, // required
NSAccessibilitySizeAttribute, // required
NSAccessibilityWindowAttribute, // required
kTopLevelUIElementAttribute, // required
NSAccessibilityTopLevelUIElementAttribute, // required
NSAccessibilityHelpAttribute,
NSAccessibilityEnabledAttribute, // required
NSAccessibilityFocusedAttribute, // required
NSAccessibilityTitleAttribute, // required for popupmenus, and for menubuttons with a title
NSAccessibilityChildrenAttribute, // required
kInstanceDescriptionAttribute, // required if it has no title attr
NSAccessibilityDescriptionAttribute, // required if it has no title attr
nil];
}
return attributes;

View File

@ -5,9 +5,6 @@
using namespace mozilla::a11y;
extern const NSString *kInstanceDescriptionAttribute; // NSAccessibilityDescriptionAttribute
extern const NSString *kTopLevelUIElementAttribute; // NSAccessibilityTopLevelUIElementAttribute
@interface mozTextAccessible (Private)
- (NSString*)subrole;
- (NSString*)selectedText;
@ -55,8 +52,8 @@ extern const NSString *kTopLevelUIElementAttribute; // NSAccessibilityTopLevel
NSAccessibilityWindowAttribute, // required
NSAccessibilityFocusedAttribute, // required
NSAccessibilityEnabledAttribute, // required
kTopLevelUIElementAttribute, // required (on OS X 10.4+)
kInstanceDescriptionAttribute, // required (on OS X 10.4+)
NSAccessibilityTopLevelUIElementAttribute, // required
NSAccessibilityDescriptionAttribute, // required
/* text-specific attributes */
NSAccessibilitySelectedTextAttribute, // required
NSAccessibilitySelectedTextRangeAttribute, // required
@ -256,8 +253,8 @@ extern const NSString *kTopLevelUIElementAttribute; // NSAccessibilityTopLevel
NSAccessibilityChildrenAttribute, // required
NSAccessibilityHelpAttribute,
// NSAccessibilityExpandedAttribute, // required
kTopLevelUIElementAttribute, // required (on OS X 10.4+)
kInstanceDescriptionAttribute, // required (on OS X 10.4+)
NSAccessibilityTopLevelUIElementAttribute, // required
NSAccessibilityDescriptionAttribute, // required
/* text-specific attributes */
NSAccessibilitySelectedTextAttribute, // required
NSAccessibilitySelectedTextRangeAttribute, // required