Index: content/browser/accessibility/browser_accessibility_manager.cc |
diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc |
index 15e4bd22f23fab3640189a5a700969005ac26524..ad4e430ae24986c88c711555a394cc8c664da0e8 100644 |
--- a/content/browser/accessibility/browser_accessibility_manager.cc |
+++ b/content/browser/accessibility/browser_accessibility_manager.cc |
@@ -688,18 +688,15 @@ void BrowserAccessibilityManager::SetValue( |
delegate_->AccessibilityPerformAction(action_data); |
} |
-void BrowserAccessibilityManager::SetTextSelection( |
- const BrowserAccessibility& node, |
- int start_offset, |
- int end_offset) { |
- if (!delegate_) |
+void BrowserAccessibilityManager::SetSelection(AXPlatformRange range) { |
+ if (!delegate_ || range.IsNull()) |
return; |
ui::AXActionData action_data; |
- action_data.anchor_node_id = node.GetId(); |
- action_data.anchor_offset = start_offset; |
- action_data.focus_node_id = node.GetId(); |
- action_data.focus_offset = end_offset; |
+ action_data.anchor_node_id = range.anchor()->anchor_id(); |
+ action_data.anchor_offset = range.anchor()->text_offset(); |
+ action_data.focus_node_id = range.focus()->anchor_id(); |
+ action_data.focus_offset = range.focus()->text_offset(); |
action_data.action = ui::AX_ACTION_SET_SELECTION; |
delegate_->AccessibilityPerformAction(action_data); |
} |