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

Unified Diff: content/browser/accessibility/browser_accessibility_win.h

Issue 1377733002: Fixes for contenteditable caret and selection handling in Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed some more corner cases, updated tests to make them more resilient and added comments to the c… Created 5 years, 3 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/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(

Powered by Google App Engine
This is Rietveld 408576698