| OLD | NEW |
| 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/accessibility/platform/ax_platform_node_mac.h" | 5 #import "ui/accessibility/platform/ax_platform_node_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 } | 277 } |
| 278 | 278 |
| 279 // NSAccessibility informal protocol implementation. | 279 // NSAccessibility informal protocol implementation. |
| 280 | 280 |
| 281 - (BOOL)accessibilityIsIgnored { | 281 - (BOOL)accessibilityIsIgnored { |
| 282 return [[self AXRole] isEqualToString:NSAccessibilityUnknownRole]; | 282 return [[self AXRole] isEqualToString:NSAccessibilityUnknownRole]; |
| 283 } | 283 } |
| 284 | 284 |
| 285 - (id)accessibilityHitTest:(NSPoint)point { | 285 - (id)accessibilityHitTest:(NSPoint)point { |
| 286 for (AXPlatformNodeCocoa* child in [self AXChildren]) { | 286 for (AXPlatformNodeCocoa* child in [self AXChildren]) { |
| 287 if (NSPointInRect(point, child.boundsInScreen)) | 287 if (NSPointInRect(point, [child boundsInScreen]) && |
| 288 ![child accessibilityIsIgnored]) |
| 288 return [child accessibilityHitTest:point]; | 289 return [child accessibilityHitTest:point]; |
| 289 } | 290 } |
| 290 return NSAccessibilityUnignoredAncestor(self); | 291 return NSAccessibilityUnignoredAncestor(self); |
| 291 } | 292 } |
| 292 | 293 |
| 293 - (BOOL)accessibilityNotifiesWhenDestroyed { | 294 - (BOOL)accessibilityNotifiesWhenDestroyed { |
| 294 return YES; | 295 return YES; |
| 295 } | 296 } |
| 296 | 297 |
| 297 - (id)accessibilityFocusedUIElement { | 298 - (id)accessibilityFocusedUIElement { |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 } | 596 } |
| 596 NotifyMacEvent(native_node_, event_type); | 597 NotifyMacEvent(native_node_, event_type); |
| 597 } | 598 } |
| 598 | 599 |
| 599 int AXPlatformNodeMac::GetIndexInParent() { | 600 int AXPlatformNodeMac::GetIndexInParent() { |
| 600 // TODO(dmazzoni): implement this. http://crbug.com/396137 | 601 // TODO(dmazzoni): implement this. http://crbug.com/396137 |
| 601 return -1; | 602 return -1; |
| 602 } | 603 } |
| 603 | 604 |
| 604 } // namespace ui | 605 } // namespace ui |
| OLD | NEW |