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

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

Issue 1473483002: Fix really dumb mistake in Mac accessibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | 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 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 } 1942 }
1943 return NSNotFound; 1943 return NSNotFound;
1944 } 1944 }
1945 1945
1946 // Returns whether or not the specified attribute can be set by the 1946 // Returns whether or not the specified attribute can be set by the
1947 // accessibility API via |accessibilitySetValue:forAttribute:|. 1947 // accessibility API via |accessibilitySetValue:forAttribute:|.
1948 - (BOOL)accessibilityIsAttributeSettable:(NSString*)attribute { 1948 - (BOOL)accessibilityIsAttributeSettable:(NSString*)attribute {
1949 if (!browserAccessibility_) 1949 if (!browserAccessibility_)
1950 return NO; 1950 return NO;
1951 1951
1952 if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) 1952 if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) {
1953 if ([self internalRole] == ui::AX_ROLE_DATE_TIME) 1953 if ([self internalRole] == ui::AX_ROLE_DATE_TIME)
1954 return NO; 1954 return NO;
1955 return GetState(browserAccessibility_, ui::AX_STATE_FOCUSABLE); 1955 return GetState(browserAccessibility_, ui::AX_STATE_FOCUSABLE);
1956 }
1957
1956 if ([attribute isEqualToString:NSAccessibilityValueAttribute]) { 1958 if ([attribute isEqualToString:NSAccessibilityValueAttribute]) {
1957 return browserAccessibility_->GetBoolAttribute( 1959 return browserAccessibility_->GetBoolAttribute(
1958 ui::AX_ATTR_CAN_SET_VALUE); 1960 ui::AX_ATTR_CAN_SET_VALUE);
1959 } 1961 }
1960 if ([attribute isEqualToString:NSAccessibilitySelectedTextRangeAttribute] && 1962 if ([attribute isEqualToString:NSAccessibilitySelectedTextRangeAttribute] &&
1961 browserAccessibility_->IsEditableText()) 1963 browserAccessibility_->IsEditableText())
1962 return YES; 1964 return YES;
1963 1965
1964 return NO; 1966 return NO;
1965 } 1967 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2064 if (!browserAccessibility_) 2066 if (!browserAccessibility_)
2065 return [super hash]; 2067 return [super hash];
2066 return browserAccessibility_->GetId(); 2068 return browserAccessibility_->GetId();
2067 } 2069 }
2068 2070
2069 - (BOOL)accessibilityShouldUseUniqueId { 2071 - (BOOL)accessibilityShouldUseUniqueId {
2070 return YES; 2072 return YES;
2071 } 2073 }
2072 2074
2073 @end 2075 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698