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

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

Issue 2799413002: Views a11y: Add AXNodeData.actions bitfield to indicate supported actions by UI. (Closed)
Patch Set: Fix tests broken from rebase. Created 3 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
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 #import "content/browser/accessibility/browser_accessibility_cocoa.h" 5 #import "content/browser/accessibility/browser_accessibility_cocoa.h"
6 6
7 #include <execinfo.h> 7 #include <execinfo.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 2767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2778 if (![self instanceActive]) 2778 if (![self instanceActive])
2779 return NO; 2779 return NO;
2780 2780
2781 if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) { 2781 if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) {
2782 if ([self internalRole] == ui::AX_ROLE_DATE_TIME) 2782 if ([self internalRole] == ui::AX_ROLE_DATE_TIME)
2783 return NO; 2783 return NO;
2784 2784
2785 return GetState(browserAccessibility_, ui::AX_STATE_FOCUSABLE); 2785 return GetState(browserAccessibility_, ui::AX_STATE_FOCUSABLE);
2786 } 2786 }
2787 2787
2788 if ([attribute isEqualToString:NSAccessibilityValueAttribute]) { 2788 if ([attribute isEqualToString:NSAccessibilityValueAttribute])
2789 return browserAccessibility_->GetBoolAttribute( 2789 return browserAccessibility_->HasAction(ui::AX_ACTION_SET_VALUE);
dmazzoni 2017/05/19 19:24:25 Love it, this is a lot cleaner!
Patti Lor 2017/05/22 00:20:59 Yay :)
2790 ui::AX_ATTR_CAN_SET_VALUE);
2791 }
2792 2790
2793 if ([attribute isEqualToString:NSAccessibilitySelectedTextRangeAttribute] && 2791 if ([attribute isEqualToString:NSAccessibilitySelectedTextRangeAttribute] &&
2794 browserAccessibility_->HasState(ui::AX_STATE_EDITABLE)) { 2792 browserAccessibility_->HasState(ui::AX_STATE_EDITABLE)) {
2795 return YES; 2793 return YES;
2796 } 2794 }
2797 2795
2798 return NO; 2796 return NO;
2799 } 2797 }
2800 2798
2801 // Returns whether or not this object should be ignored in the accessibility 2799 // Returns whether or not this object should be ignored in the accessibility
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2900 } 2898 }
2901 2899
2902 - (BOOL)accessibilityNotifiesWhenDestroyed { 2900 - (BOOL)accessibilityNotifiesWhenDestroyed {
2903 // Indicate that BrowserAccessibilityCocoa will post a notification when it's 2901 // Indicate that BrowserAccessibilityCocoa will post a notification when it's
2904 // destroyed (see -detach). This allows VoiceOver to do some internal things 2902 // destroyed (see -detach). This allows VoiceOver to do some internal things
2905 // more efficiently. 2903 // more efficiently.
2906 return YES; 2904 return YES;
2907 } 2905 }
2908 2906
2909 @end 2907 @end
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility.cc ('k') | content/browser/accessibility/browser_accessibility_com_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698