Chromium Code Reviews| Index: ui/accessibility/platform/ax_platform_node_mac.mm |
| diff --git a/ui/accessibility/platform/ax_platform_node_mac.mm b/ui/accessibility/platform/ax_platform_node_mac.mm |
| index 9edb01336f2b23b0513e8bf4e20d314dc76925e0..f3ec35eb7b8db0cc4c8df9e522bbe390af5e90e0 100644 |
| --- a/ui/accessibility/platform/ax_platform_node_mac.mm |
| +++ b/ui/accessibility/platform/ax_platform_node_mac.mm |
| @@ -12,6 +12,7 @@ |
| #include "ui/accessibility/ax_action_data.h" |
| #include "ui/accessibility/ax_node_data.h" |
| #include "ui/accessibility/ax_role_properties.h" |
| +#include "ui/accessibility/platform/ax_platform_node.h" |
| #include "ui/accessibility/platform/ax_platform_node_delegate.h" |
| #include "ui/base/l10n/l10n_util.h" |
| #import "ui/gfx/mac/coordinate_conversion.h" |
| @@ -230,7 +231,11 @@ void NotifyMacEvent(AXPlatformNodeCocoa* target, ui::AXEvent event_type) { |
| - (NSString*)getStringAttribute:(ui::AXStringAttribute)attribute; |
| @end |
| -@implementation AXPlatformNodeCocoa |
| +@implementation AXPlatformNodeCocoa { |
| + ui::AXPlatformNodeBase* node_; // Weak. Retains us. |
| +} |
| + |
| +@synthesize node = node_; |
| // A mapping of AX roles to native roles. |
| + (NSString*)nativeRoleFromAXRole:(ui::AXRole)role { |
| @@ -290,7 +295,7 @@ void NotifyMacEvent(AXPlatformNodeCocoa* target, ui::AXEvent event_type) { |
| - (id)accessibilityHitTest:(NSPoint)point { |
| for (AXPlatformNodeCocoa* child in [self AXChildren]) { |
| - if (NSPointInRect(point, child.boundsInScreen)) |
| + if (NSPointInRect(point, [child boundsInScreen])) |
| return [child accessibilityHitTest:point]; |
| } |
| return NSAccessibilityUnignoredAncestor(self); |
| @@ -626,6 +631,14 @@ AXPlatformNode* AXPlatformNode::Create(AXPlatformNodeDelegate* delegate) { |
| return node; |
| } |
| +// static |
| +AX_EXPORT AXPlatformNode* AXPlatformNode::FromNativeViewAccessible( |
|
tapted
2017/03/06 01:43:09
remove AX_EXPORT
Patti Lor
2017/03/13 03:03:25
Done.
|
| + gfx::NativeViewAccessible accessible) { |
| + if ([accessible isKindOfClass:[AXPlatformNodeCocoa class]]) |
| + return [accessible node]; |
| + return nullptr; |
| +} |
| + |
| AXPlatformNodeMac::AXPlatformNodeMac() { |
| } |