Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1667)

Unified Diff: content/renderer/accessibility/blink_ax_tree_source.cc

Issue 2191833003: Use text affinity to return correct accessible line boundaries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bug in browser_accessibility_win.cc Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/accessibility/blink_ax_tree_source.cc
diff --git a/content/renderer/accessibility/blink_ax_tree_source.cc b/content/renderer/accessibility/blink_ax_tree_source.cc
index 31dce0711e8e71fbd4116aee02777138bfcd715e..5143b96948a2b411487fbae8008526eb2bb02098 100644
--- a/content/renderer/accessibility/blink_ax_tree_source.cc
+++ b/content/renderer/accessibility/blink_ax_tree_source.cc
@@ -150,7 +150,9 @@ bool BlinkAXTreeSource::GetTreeData(AXContentTreeData* tree_data) const {
WebAXObject anchor_object, focus_object;
int anchor_offset, focus_offset;
- root.selection(anchor_object, anchor_offset, focus_object, focus_offset);
+ blink::WebAXTextAffinity anchor_affinity, focus_affinity;
+ root.selection(anchor_object, anchor_offset, anchor_affinity,
+ focus_object, focus_offset, focus_affinity);
if (!anchor_object.isNull() && !focus_object.isNull() &&
anchor_offset >= 0 && focus_offset >= 0) {
int32_t anchor_id = anchor_object.axID();
@@ -159,6 +161,8 @@ bool BlinkAXTreeSource::GetTreeData(AXContentTreeData* tree_data) const {
tree_data->sel_anchor_offset = anchor_offset;
tree_data->sel_focus_object_id = focus_id;
tree_data->sel_focus_offset = focus_offset;
+ tree_data->sel_anchor_affinity = AXTextAffinityFromBlink(anchor_affinity);
+ tree_data->sel_focus_affinity = AXTextAffinityFromBlink(focus_affinity);
}
// Get the tree ID for this frame and the parent frame.

Powered by Google App Engine
This is Rietveld 408576698