From f19368a57f1337143a3f4e6b14907c92b2891347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Wed, 11 Jul 2012 17:29:19 -0700 Subject: [PATCH] Bug 772060 - Part 1: Implement accessibilityArrayAttributeCount for mozPaneAccessible. r=surkov,tbsaunde --- accessible/src/mac/mozActionElements.mm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/accessible/src/mac/mozActionElements.mm b/accessible/src/mac/mozActionElements.mm index f22cc992f9f0..f673d8c82107 100644 --- a/accessible/src/mac/mozActionElements.mm +++ b/accessible/src/mac/mozActionElements.mm @@ -338,6 +338,19 @@ enum CheckboxValue { @implementation mozPaneAccessible +- (NSUInteger)accessibilityArrayAttributeCount:(NSString*)attribute +{ + if (!mGeckoAccessible) + return 0; + + // By default this calls -[[mozAccessible children] count]. + // Since we don't cache mChildren. This is faster. + if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) + return mGeckoAccessible->ChildCount() ? 1 : 0; + + return [super accessibilityArrayAttributeCount:attribute]; +} + - (NSArray*)children { if (!mGeckoAccessible)