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

Unified Diff: chrome/browser/accessibility/browser_accessibility_cocoa.mm

Issue 5579004: Exclude text controls from exposing the press action. Structure PerformActio... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/accessibility/browser_accessibility_cocoa.mm
===================================================================
--- chrome/browser/accessibility/browser_accessibility_cocoa.mm (revision 68193)
+++ chrome/browser/accessibility/browser_accessibility_cocoa.mm (working copy)
@@ -300,8 +300,11 @@
[ret addObject:NSAccessibilityShowMenuAction];
// TODO(dtseng): this should only get set when there's a default action.
- if ([self role] != NSAccessibilityStaticTextRole)
+ if ([self role] != NSAccessibilityStaticTextRole &&
+ [self role] != NSAccessibilityTextAreaRole &&
+ [self role] != NSAccessibilityTextFieldRole) {
[ret addObject:NSAccessibilityPressAction];
+ }
return ret;
}
@@ -410,7 +413,11 @@
// that backs this object.
- (void)accessibilityPerformAction:(NSString*)action {
// TODO(feldstein): Support more actions.
- [delegate_ doDefaultAction:browserAccessibility_->renderer_id()];
+ if ([action isEqualToString:NSAccessibilityPressAction]) {
+ [delegate_ doDefaultAction:browserAccessibility_->renderer_id()];
+ } else if ([action isEqualToString:NSAccessibilityShowMenuAction]) {
+ // TODO(dtseng): implement.
+ }
}
// Returns the description of the given action.
« 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