Index: content/browser/accessibility/browser_accessibility_win.h |
diff --git a/content/browser/accessibility/browser_accessibility_win.h b/content/browser/accessibility/browser_accessibility_win.h |
index f5ca8ecd9d2ec2bf42ca8f37e200e90b3156dd9c..7bd543dc68d406f59309cd7af7cd6c57f781d678 100644 |
--- a/content/browser/accessibility/browser_accessibility_win.h |
+++ b/content/browser/accessibility/browser_accessibility_win.h |
@@ -775,6 +775,15 @@ BrowserAccessibilityWin |
int32 GetHypertextOffsetFromDescendant( |
const BrowserAccessibilityWin& descendant) const; |
+ // If the selection endpoint is either equal to or an ancestor of this object, |
dmazzoni
2015/09/30 20:09:56
Comment should mention when it returns -1 and why
|
+ // returns endpoint_offset. |
+ // If the selection endpoint is a descendant of this object, returns its |
+ // embedded character offset. Otherwise, returns either 0 or the length of the |
+ // hypertext, depending on the direction of the selection. |
+ int GetHypertextOffsetFromEndpoint( |
+ const BrowserAccessibilityWin& endpoint_object, |
+ int endpoint_offset) const; |
+ |
// The following functions retrieve the endpoints of the current selection. |
// First they checks for a local selection found on the current control, e.g. |
// when querying the selection on a textarea. |
@@ -795,7 +804,7 @@ BrowserAccessibilityWin |
// Get the text of this node for the purposes of IAccessibleText - it may |
// be the name, it may be the value, etc. depending on the role. |
- base::string16 TextForIAccessibleText(); |
+ base::string16 TextForIAccessibleText() const; |
bool IsSameHypertextCharacter(size_t old_char_index, size_t new_char_index); |
void ComputeHypertextRemovedAndInserted( |