| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 - (NSString*)getStringAttribute:(ui::AXStringAttribute)attribute { | 272 - (NSString*)getStringAttribute:(ui::AXStringAttribute)attribute { |
| 273 std::string attributeValue; | 273 std::string attributeValue; |
| 274 if (node_->GetStringAttribute(attribute, &attributeValue)) | 274 if (node_->GetStringAttribute(attribute, &attributeValue)) |
| 275 return base::SysUTF8ToNSString(attributeValue); | 275 return base::SysUTF8ToNSString(attributeValue); |
| 276 return nil; | 276 return nil; |
| 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 node_->GetData().role == ui::AX_ROLE_IGNORED || |
| 283 node_->GetDelegate()->IsIgnored(); |
| 283 } | 284 } |
| 284 | 285 |
| 285 - (id)accessibilityHitTest:(NSPoint)point { | 286 - (id)accessibilityHitTest:(NSPoint)point { |
| 286 for (AXPlatformNodeCocoa* child in [self AXChildren]) { | 287 for (AXPlatformNodeCocoa* child in [self AXChildren]) { |
| 287 if (NSPointInRect(point, child.boundsInScreen)) | 288 if (NSPointInRect(point, child.boundsInScreen)) |
| 288 return [child accessibilityHitTest:point]; | 289 return [child accessibilityHitTest:point]; |
| 289 } | 290 } |
| 290 return NSAccessibilityUnignoredAncestor(self); | 291 return NSAccessibilityUnignoredAncestor(self); |
| 291 } | 292 } |
| 292 | 293 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 } | 583 } |
| 583 NotifyMacEvent(native_node_, event_type); | 584 NotifyMacEvent(native_node_, event_type); |
| 584 } | 585 } |
| 585 | 586 |
| 586 int AXPlatformNodeMac::GetIndexInParent() { | 587 int AXPlatformNodeMac::GetIndexInParent() { |
| 587 // TODO(dmazzoni): implement this. http://crbug.com/396137 | 588 // TODO(dmazzoni): implement this. http://crbug.com/396137 |
| 588 return -1; | 589 return -1; |
| 589 } | 590 } |
| 590 | 591 |
| 591 } // namespace ui | 592 } // namespace ui |
| OLD | NEW |