Chromium Code Reviews| Index: ui/accessibility/platform/ax_platform_node_mac.mm |
| diff --git a/ui/accessibility/platform/ax_platform_node_mac.mm b/ui/accessibility/platform/ax_platform_node_mac.mm |
| index be9eb9e3679d2214a2f36a34f17e09f50335b97b..9c0bf7ad0327deb3535895df506fe8899d214b69 100644 |
| --- a/ui/accessibility/platform/ax_platform_node_mac.mm |
| +++ b/ui/accessibility/platform/ax_platform_node_mac.mm |
| @@ -378,11 +378,9 @@ void NotifyMacEvent(AXPlatformNodeCocoa* target, ui::AXEvent event_type) { |
| return NO; |
| } |
| - if ([attributeName isEqualToString:NSAccessibilityValueAttribute]) |
| + if ([attributeName isEqualToString:NSAccessibilityValueAttribute] || |
| + [attributeName isEqualToString:NSAccessibilitySelectedTextAttribute]) |
| return node_->GetDelegate()->CanSetStringValue(); |
| - // TODO(patricialor): Implement and merge with conditional for value above. |
| - if ([attributeName isEqualToString:NSAccessibilitySelectedTextAttribute]) |
| - return NO; |
| if ([attributeName isEqualToString:NSAccessibilityFocusedAttribute]) { |
| if (ui::AXViewState::IsFlagSet(node_->GetData().state, |
| @@ -398,7 +396,11 @@ void NotifyMacEvent(AXPlatformNodeCocoa* target, ui::AXEvent event_type) { |
| - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { |
| if ([attribute isEqualToString:NSAccessibilityValueAttribute] && |
| [value isKindOfClass:[NSString class]]) |
|
tapted
2016/10/20 05:54:59
perhaps at the top of the function,
if (![value
Patti Lor
2016/10/24 04:31:48
This doesn't work for all attributes - e.g., NSAcc
tapted
2016/10/24 06:11:57
Acknowledged.
|
| - node_->GetDelegate()->SetStringValue(base::SysNSStringToUTF16(value)); |
| + node_->GetDelegate()->SetStringValue(base::SysNSStringToUTF16(value), |
| + false); |
|
tapted
2016/10/20 05:54:59
now that the body spans 2 lines, the `if` (and els
Patti Lor
2016/10/24 04:31:48
Done.
|
| + else if ([attribute isEqualToString:NSAccessibilitySelectedTextAttribute] && |
| + [value isKindOfClass:[NSString class]]) |
| + node_->GetDelegate()->SetStringValue(base::SysNSStringToUTF16(value), true); |
| // TODO(patricialor): Plumb through all the other writable attributes as |
| // specified in accessibilityIsAttributeSettable. |