| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 // NSAccessibility informal protocol implementation. | 289 // NSAccessibility informal protocol implementation. |
| 290 | 290 |
| 291 - (BOOL)accessibilityIsIgnored { | 291 - (BOOL)accessibilityIsIgnored { |
| 292 return [[self AXRole] isEqualToString:NSAccessibilityUnknownRole] || | 292 return [[self AXRole] isEqualToString:NSAccessibilityUnknownRole] || |
| 293 node_->GetData().HasStateFlag(ui::AX_STATE_INVISIBLE); | 293 node_->GetData().HasStateFlag(ui::AX_STATE_INVISIBLE); |
| 294 } | 294 } |
| 295 | 295 |
| 296 - (id)accessibilityHitTest:(NSPoint)point { | 296 - (id)accessibilityHitTest:(NSPoint)point { |
| 297 for (AXPlatformNodeCocoa* child in [self AXChildren]) { | 297 for (AXPlatformNodeCocoa* child in [self AXChildren]) { |
| 298 if (NSPointInRect(point, child.boundsInScreen)) | 298 if (![child accessibilityIsIgnored] && |
| 299 NSPointInRect(point, [child boundsInScreen])) { |
| 299 return [child accessibilityHitTest:point]; | 300 return [child accessibilityHitTest:point]; |
| 301 } |
| 300 } | 302 } |
| 301 return NSAccessibilityUnignoredAncestor(self); | 303 return NSAccessibilityUnignoredAncestor(self); |
| 302 } | 304 } |
| 303 | 305 |
| 304 - (BOOL)accessibilityNotifiesWhenDestroyed { | 306 - (BOOL)accessibilityNotifiesWhenDestroyed { |
| 305 return YES; | 307 return YES; |
| 306 } | 308 } |
| 307 | 309 |
| 308 - (id)accessibilityFocusedUIElement { | 310 - (id)accessibilityFocusedUIElement { |
| 309 return node_->GetDelegate()->GetFocus(); | 311 return node_->GetDelegate()->GetFocus(); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 } | 700 } |
| 699 NotifyMacEvent(native_node_, event_type); | 701 NotifyMacEvent(native_node_, event_type); |
| 700 } | 702 } |
| 701 | 703 |
| 702 int AXPlatformNodeMac::GetIndexInParent() { | 704 int AXPlatformNodeMac::GetIndexInParent() { |
| 703 // TODO(dmazzoni): implement this. http://crbug.com/396137 | 705 // TODO(dmazzoni): implement this. http://crbug.com/396137 |
| 704 return -1; | 706 return -1; |
| 705 } | 707 } |
| 706 | 708 |
| 707 } // namespace ui | 709 } // namespace ui |
| OLD | NEW |