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 3cf4db2cbf039007eeb6202e62489804c1fe57ac..bc44d953584c57a875ea312a81cd32ab89b7f4ed 100644 |
--- a/ui/accessibility/platform/ax_platform_node_mac.mm |
+++ b/ui/accessibility/platform/ax_platform_node_mac.mm |
@@ -281,6 +281,10 @@ void NotifyMacEvent(AXPlatformNodeCocoa* target, ui::AXEvent event_type) { |
return nil; |
} |
+- (ui::AXPlatformNodeBase*)getNode { |
+ return node_; |
+} |
+ |
// NSAccessibility informal protocol implementation. |
- (BOOL)accessibilityIsIgnored { |
@@ -290,7 +294,8 @@ void NotifyMacEvent(AXPlatformNodeCocoa* target, ui::AXEvent event_type) { |
- (id)accessibilityHitTest:(NSPoint)point { |
for (AXPlatformNodeCocoa* child in [self AXChildren]) { |
- if (NSPointInRect(point, child.boundsInScreen)) |
+ if (![child accessibilityIsIgnored] && |
+ NSPointInRect(point, [child boundsInScreen])) |
return [child accessibilityHitTest:point]; |
} |
return NSAccessibilityUnignoredAncestor(self); |
@@ -618,6 +623,14 @@ AXPlatformNode* AXPlatformNode::Create(AXPlatformNodeDelegate* delegate) { |
return node; |
} |
+// static |
+AX_EXPORT AXPlatformNode* AXPlatformNode::FromNativeViewAccessible( |
+ gfx::NativeViewAccessible accessible) { |
+ if ([accessible isKindOfClass:[AXPlatformNodeCocoa class]]) |
+ return [accessible getNode]; |
+ return nullptr; |
+} |
+ |
AXPlatformNodeMac::AXPlatformNodeMac() { |
} |