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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 node_->GetData().HasStateFlag(ui::AX_STATE_INVISIBLE); | 283 node_->GetData().HasStateFlag(ui::AX_STATE_INVISIBLE); |
284 } | 284 } |
285 | 285 |
286 - (id)accessibilityHitTest:(NSPoint)point { | 286 - (id)accessibilityHitTest:(NSPoint)point { |
287 for (AXPlatformNodeCocoa* child in [self AXChildren]) { | 287 for (AXPlatformNodeCocoa* child in [self AXChildren]) { |
288 if (NSPointInRect(point, child.boundsInScreen)) | 288 if (NSPointInRect(point, [child boundsInScreen]) && |
289 ![child accessibilityIsIgnored]) | |
tapted
2016/12/22 02:56:36
nit: reorder these so accessibilityIsIgnored is ch
Patti Lor
2017/01/11 02:01:47
Done.
| |
289 return [child accessibilityHitTest:point]; | 290 return [child accessibilityHitTest:point]; |
290 } | 291 } |
291 return NSAccessibilityUnignoredAncestor(self); | 292 return NSAccessibilityUnignoredAncestor(self); |
292 } | 293 } |
293 | 294 |
294 - (BOOL)accessibilityNotifiesWhenDestroyed { | 295 - (BOOL)accessibilityNotifiesWhenDestroyed { |
295 return YES; | 296 return YES; |
296 } | 297 } |
297 | 298 |
298 - (id)accessibilityFocusedUIElement { | 299 - (id)accessibilityFocusedUIElement { |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
596 } | 597 } |
597 NotifyMacEvent(native_node_, event_type); | 598 NotifyMacEvent(native_node_, event_type); |
598 } | 599 } |
599 | 600 |
600 int AXPlatformNodeMac::GetIndexInParent() { | 601 int AXPlatformNodeMac::GetIndexInParent() { |
601 // TODO(dmazzoni): implement this. http://crbug.com/396137 | 602 // TODO(dmazzoni): implement this. http://crbug.com/396137 |
602 return -1; | 603 return -1; |
603 } | 604 } |
604 | 605 |
605 } // namespace ui | 606 } // namespace ui |
OLD | NEW |