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

Side by Side Diff: content/browser/accessibility/browser_accessibility_cocoa.mm

Issue 284113002: Always return a subrole when the Mac accessibility role is AXList. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | content/browser/accessibility/dump_accessibility_tree_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <execinfo.h> 5 #include <execinfo.h>
6 6
7 #import "content/browser/accessibility/browser_accessibility_cocoa.h" 7 #import "content/browser/accessibility/browser_accessibility_cocoa.h"
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 ui::AXRole browserAccessibilityRole = [self internalRole]; 840 ui::AXRole browserAccessibilityRole = [self internalRole];
841 if (browserAccessibilityRole == ui::AX_ROLE_TEXT_FIELD && 841 if (browserAccessibilityRole == ui::AX_ROLE_TEXT_FIELD &&
842 GetState(browserAccessibility_, ui::AX_STATE_PROTECTED)) { 842 GetState(browserAccessibility_, ui::AX_STATE_PROTECTED)) {
843 return @"AXSecureTextField"; 843 return @"AXSecureTextField";
844 } 844 }
845 845
846 NSString* htmlTag = NSStringForStringAttribute( 846 NSString* htmlTag = NSStringForStringAttribute(
847 browserAccessibility_, ui::AX_ATTR_HTML_TAG); 847 browserAccessibility_, ui::AX_ATTR_HTML_TAG);
848 848
849 if (browserAccessibilityRole == ui::AX_ROLE_LIST) { 849 if (browserAccessibilityRole == ui::AX_ROLE_LIST) {
850 if ([htmlTag isEqualToString:@"ul"] || 850 if ([htmlTag isEqualToString:@"dl"]) {
851 [htmlTag isEqualToString:@"ol"]) { 851 return @"AXDescriptionList";
852 } else {
852 return @"AXContentList"; 853 return @"AXContentList";
853 } else if ([htmlTag isEqualToString:@"dl"]) {
854 return @"AXDescriptionList";
855 } 854 }
856 } 855 }
857 856
858 return NativeSubroleFromAXRole(browserAccessibilityRole); 857 return NativeSubroleFromAXRole(browserAccessibilityRole);
859 } 858 }
860 859
861 // Returns all tabs in this subtree. 860 // Returns all tabs in this subtree.
862 - (NSArray*)tabs { 861 - (NSArray*)tabs {
863 NSMutableArray* tabSubtree = [[[NSMutableArray alloc] init] autorelease]; 862 NSMutableArray* tabSubtree = [[[NSMutableArray alloc] init] autorelease];
864 863
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 return [super hash]; 1570 return [super hash];
1572 return browserAccessibility_->GetId(); 1571 return browserAccessibility_->GetId();
1573 } 1572 }
1574 1573
1575 - (BOOL)accessibilityShouldUseUniqueId { 1574 - (BOOL)accessibilityShouldUseUniqueId {
1576 return YES; 1575 return YES;
1577 } 1576 }
1578 1577
1579 @end 1578 @end
1580 1579
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/dump_accessibility_tree_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698