Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Side by Side Diff: third_party/WebKit/WebCore/page/mac/AccessibilityObjectWrapper.mm

Issue 20076: WebKit merge 40500:40539 [WebKit side] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/page/SecurityOrigin.cpp ('k') | third_party/WebKit/WebCore/platform/chromium/PopupMenuChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698