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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_mac.mm

Issue 5097001: Support AXContents attribute on the RenderWidgetHostViewCocoa.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 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/renderer_host/render_widget_host_view_mac.mm
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_mac.mm (revision 65217)
+++ chrome/browser/renderer_host/render_widget_host_view_mac.mm (working copy)
@@ -1787,7 +1787,12 @@
- (id)accessibilityAttributeValue:(NSString *)attribute {
BrowserAccessibilityManager* manager =
renderWidgetHostView_->browser_accessibility_manager_.get();
- if ([attribute isEqualToString:NSAccessibilityChildrenAttribute] &&
+
+ // Contents specifies document view of RenderWidgetHostViewCocoa provided by
+ // BrowserAccessibilityManager. Children includes all subviews in addition to
+ // contents. Currently we do not have subviews besides the document view.
+ if (([attribute isEqualToString:NSAccessibilityChildrenAttribute] ||
+ [attribute isEqualToString:NSAccessibilityContentsAttribute]) &&
manager) {
return [NSArray arrayWithObjects:manager->
GetRoot()->toBrowserAccessibilityCocoa(), nil];
@@ -1798,6 +1803,13 @@
return ret;
}
+- (NSArray*)accessibilityAttributeNames {
+ NSMutableArray* ret = [[[NSMutableArray alloc] init] autorelease];
+ [ret addObject:NSAccessibilityContentsAttribute];
+ [ret addObjectsFromArray:[super accessibilityAttributeNames]];
+ return ret;
+}
+
- (id)accessibilityHitTest:(NSPoint)point {
if (!renderWidgetHostView_->browser_accessibility_manager_.get())
return self;
« 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