| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 { | 866 { |
| 867 Widget* widget = m_object->widget(); | 867 Widget* widget = m_object->widget(); |
| 868 if (!widget) | 868 if (!widget) |
| 869 return nil; | 869 return nil; |
| 870 return [(widget->platformWidget()) accessibilityAttributeValue: NSAccessibil
ityChildrenAttribute]; | 870 return [(widget->platformWidget()) accessibilityAttributeValue: NSAccessibil
ityChildrenAttribute]; |
| 871 } | 871 } |
| 872 | 872 |
| 873 static void convertToVector(NSArray* array, AccessibilityObject::AccessibilityCh
ildrenVector& vector) | 873 static void convertToVector(NSArray* array, AccessibilityObject::AccessibilityCh
ildrenVector& vector) |
| 874 { | 874 { |
| 875 unsigned length = [array count]; | 875 unsigned length = [array count]; |
| 876 vector.reserveCapacity(length); | 876 vector.reserveInitialCapacity(length); |
| 877 for (unsigned i = 0; i < length; ++i) { | 877 for (unsigned i = 0; i < length; ++i) { |
| 878 AccessibilityObject* obj = [[array objectAtIndex:i] accessibilityObject]
; | 878 AccessibilityObject* obj = [[array objectAtIndex:i] accessibilityObject]
; |
| 879 if (obj) | 879 if (obj) |
| 880 vector.append(obj); | 880 vector.append(obj); |
| 881 } | 881 } |
| 882 } | 882 } |
| 883 | 883 |
| 884 static NSMutableArray* convertToNSArray(const AccessibilityObject::Accessibility
ChildrenVector& vector) | 884 static NSMutableArray* convertToNSArray(const AccessibilityObject::Accessibility
ChildrenVector& vector) |
| 885 { | 885 { |
| 886 unsigned length = vector.size(); | 886 unsigned length = vector.size(); |
| (...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2085 return subarray; | 2085 return subarray; |
| 2086 } | 2086 } |
| 2087 | 2087 |
| 2088 return [super accessibilityArrayAttributeValues:attribute index:index maxCou
nt:maxCount]; | 2088 return [super accessibilityArrayAttributeValues:attribute index:index maxCou
nt:maxCount]; |
| 2089 } | 2089 } |
| 2090 | 2090 |
| 2091 @end | 2091 @end |
| 2092 | 2092 |
| 2093 #endif // HAVE(ACCESSIBILITY) | 2093 #endif // HAVE(ACCESSIBILITY) |
| 2094 | 2094 |
| OLD | NEW |