From 3c4c50954f020671c71497bd7eaa19c8b0708f82 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 --HG-- extra : rebase_source : 4d9d87b9ffebdec3844a661a81e187a9bc130ef7 --- 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 f22cc992f9f..f673d8c8210 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)