Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
|
tapted
2017/01/11 18:27:39
CL description nit "controls from to have" -> "con
Patti Lor
2017/02/21 03:29:16
Done.
| |
| 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" |
| 11 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 280 | 280 |
| 281 // NSAccessibility informal protocol implementation. | 281 // NSAccessibility informal protocol implementation. |
| 282 | 282 |
| 283 - (BOOL)accessibilityIsIgnored { | 283 - (BOOL)accessibilityIsIgnored { |
| 284 return [[self AXRole] isEqualToString:NSAccessibilityUnknownRole] || | 284 return [[self AXRole] isEqualToString:NSAccessibilityUnknownRole] || |
| 285 node_->GetData().HasStateFlag(ui::AX_STATE_INVISIBLE); | 285 node_->GetData().HasStateFlag(ui::AX_STATE_INVISIBLE); |
| 286 } | 286 } |
| 287 | 287 |
| 288 - (id)accessibilityHitTest:(NSPoint)point { | 288 - (id)accessibilityHitTest:(NSPoint)point { |
| 289 for (AXPlatformNodeCocoa* child in [self AXChildren]) { | 289 for (AXPlatformNodeCocoa* child in [self AXChildren]) { |
| 290 if (NSPointInRect(point, child.boundsInScreen)) | 290 if (![child accessibilityIsIgnored] && |
| 291 NSPointInRect(point, [child boundsInScreen])) | |
| 291 return [child accessibilityHitTest:point]; | 292 return [child accessibilityHitTest:point]; |
| 292 } | 293 } |
| 293 return NSAccessibilityUnignoredAncestor(self); | 294 return NSAccessibilityUnignoredAncestor(self); |
| 294 } | 295 } |
| 295 | 296 |
| 296 - (BOOL)accessibilityNotifiesWhenDestroyed { | 297 - (BOOL)accessibilityNotifiesWhenDestroyed { |
| 297 return YES; | 298 return YES; |
| 298 } | 299 } |
| 299 | 300 |
| 300 - (id)accessibilityFocusedUIElement { | 301 - (id)accessibilityFocusedUIElement { |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 598 } | 599 } |
| 599 NotifyMacEvent(native_node_, event_type); | 600 NotifyMacEvent(native_node_, event_type); |
| 600 } | 601 } |
| 601 | 602 |
| 602 int AXPlatformNodeMac::GetIndexInParent() { | 603 int AXPlatformNodeMac::GetIndexInParent() { |
| 603 // TODO(dmazzoni): implement this. http://crbug.com/396137 | 604 // TODO(dmazzoni): implement this. http://crbug.com/396137 |
| 604 return -1; | 605 return -1; |
| 605 } | 606 } |
| 606 | 607 |
| 607 } // namespace ui | 608 } // namespace ui |
| OLD | NEW |