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

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

Issue 2151713002: Less strict checked state changes and introduce disabled state for content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m Created 4 years, 4 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 #include <execinfo.h> 5 #include <execinfo.h>
6 #include <stddef.h> 6 #include <stddef.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #import "content/browser/accessibility/browser_accessibility_cocoa.h" 9 #import "content/browser/accessibility/browser_accessibility_cocoa.h"
10 10
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 if (browserAccessibility_->GetHtmlAttribute("aria-dropeffect", &dropEffects)) 861 if (browserAccessibility_->GetHtmlAttribute("aria-dropeffect", &dropEffects))
862 return base::SysUTF8ToNSString(dropEffects); 862 return base::SysUTF8ToNSString(dropEffects);
863 863
864 return nil; 864 return nil;
865 } 865 }
866 866
867 - (NSNumber*)enabled { 867 - (NSNumber*)enabled {
868 if (![self instanceActive]) 868 if (![self instanceActive])
869 return nil; 869 return nil;
870 return [NSNumber numberWithBool: 870 return [NSNumber numberWithBool:
871 GetState(browserAccessibility_, ui::AX_STATE_ENABLED)]; 871 !GetState(browserAccessibility_, ui::AX_STATE_DISABLED)];
872 } 872 }
873 873
874 // Returns a text marker that points to the last character in the document that 874 // Returns a text marker that points to the last character in the document that
875 // can be selected with VoiceOver. 875 // can be selected with VoiceOver.
876 - (id)endTextMarker { 876 - (id)endTextMarker {
877 if (![self instanceActive]) 877 if (![self instanceActive])
878 return nil; 878 return nil;
879 879
880 const BrowserAccessibility* root = 880 const BrowserAccessibility* root =
881 browserAccessibility_->manager()->GetRoot(); 881 browserAccessibility_->manager()->GetRoot();
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
2715 if (![self instanceActive]) 2715 if (![self instanceActive])
2716 return [super hash]; 2716 return [super hash];
2717 return browserAccessibility_->GetId(); 2717 return browserAccessibility_->GetId();
2718 } 2718 }
2719 2719
2720 - (BOOL)accessibilityShouldUseUniqueId { 2720 - (BOOL)accessibilityShouldUseUniqueId {
2721 return YES; 2721 return YES;
2722 } 2722 }
2723 2723
2724 @end 2724 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698