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

Side by Side Diff: ui/views/cocoa/bridged_content_view.mm

Issue 2119413004: a11y: Exclude children of nested keyboard accessible controls from a11y tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error and final test in NativeWidgetMacTest. Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/views/cocoa/bridged_content_view.h" 5 #import "ui/views/cocoa/bridged_content_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/mac_util.h" 8 #import "base/mac/mac_util.h"
9 #import "base/mac/scoped_nsobject.h" 9 #import "base/mac/scoped_nsobject.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
11 #include "skia/ext/skia_utils_mac.h" 11 #include "skia/ext/skia_utils_mac.h"
12 #import "ui/accessibility/platform/ax_platform_node_mac.h"
12 #include "ui/base/cocoa/cocoa_base_utils.h" 13 #include "ui/base/cocoa/cocoa_base_utils.h"
13 #include "ui/base/dragdrop/drag_drop_types.h" 14 #include "ui/base/dragdrop/drag_drop_types.h"
14 #include "ui/base/dragdrop/os_exchange_data_provider_mac.h" 15 #include "ui/base/dragdrop/os_exchange_data_provider_mac.h"
15 #include "ui/base/ime/input_method.h" 16 #include "ui/base/ime/input_method.h"
16 #include "ui/base/ime/text_edit_commands.h" 17 #include "ui/base/ime/text_edit_commands.h"
17 #include "ui/base/ime/text_input_client.h" 18 #include "ui/base/ime/text_input_client.h"
18 #include "ui/compositor/canvas_painter.h" 19 #include "ui/compositor/canvas_painter.h"
19 #import "ui/events/cocoa/cocoa_event_utils.h" 20 #import "ui/events/cocoa/cocoa_event_utils.h"
20 #include "ui/events/keycodes/dom/dom_code.h" 21 #include "ui/events/keycodes/dom/dom_code.h"
21 #import "ui/events/keycodes/keyboard_code_conversion_mac.h" 22 #import "ui/events/keycodes/keyboard_code_conversion_mac.h"
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 endedAtPoint:(NSPoint)screenPoint 1345 endedAtPoint:(NSPoint)screenPoint
1345 operation:(NSDragOperation)operation { 1346 operation:(NSDragOperation)operation {
1346 views::DragDropClientMac* client = [self dragDropClient]; 1347 views::DragDropClientMac* client = [self dragDropClient];
1347 if (client) 1348 if (client)
1348 client->EndDrag(); 1349 client->EndDrag();
1349 } 1350 }
1350 1351
1351 // NSAccessibility informal protocol implementation. 1352 // NSAccessibility informal protocol implementation.
1352 1353
1353 - (id)accessibilityAttributeValue:(NSString*)attribute { 1354 - (id)accessibilityAttributeValue:(NSString*)attribute {
1354 if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) { 1355 if ([attribute isEqualToString:NSAccessibilityChildrenAttribute])
1355 return @[ hostedView_->GetNativeViewAccessible() ]; 1356 return [((AXPlatformNodeCocoa*)hostedView_->GetNativeViewAccessible())
1356 } 1357 accessibilityAttributeValue:attribute];
1358 else if ([attribute isEqualToString:NSAccessibilityParentAttribute])
1359 // BridgedContentView is the top level for Views in a Widget.
1360 return self;
1361 else if ([attribute isEqualToString:NSAccessibilityRoleAttribute])
1362 return NSAccessibilityWindowRole;
1357 1363
1358 return [super accessibilityAttributeValue:attribute]; 1364 return [super accessibilityAttributeValue:attribute];
1359 } 1365 }
1360 1366
1361 - (id)accessibilityHitTest:(NSPoint)point { 1367 - (id)accessibilityHitTest:(NSPoint)point {
1362 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; 1368 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point];
1363 } 1369 }
1364 1370
1365 @end 1371 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698