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

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

Issue 1111163002: Fixed word and line navigation in multi-line text fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed first bunch of comments. Created 5 years, 8 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.h
diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h
index e0b18bd31f5af2d32dd3bf9401efbf230b562193..4f6b308619dc7983ae7d12d4d111ef9fa1b7dd7c 100644
--- a/content/browser/accessibility/browser_accessibility.h
+++ b/content/browser/accessibility/browser_accessibility.h
@@ -114,6 +114,14 @@ class CONTENT_EXPORT BrowserAccessibility {
// Searches in the given text and from the given offset until the start of
// the next or previous word is found and returns its position.
+ // In case there is no word boundary before or after the given offset, it
+ // returns one past the last character, i.e. the text's length.
+ // If the given offset is already at the start of a word, returns the start
+ // of the next word if the search is forwards and the given offset if it is
+ // backwards.
+ // If the start offset is equal to -1 and the search is in the forwards
+ // direction, returns the start boundary of the first word.
+ // Start offsets that are not in the range -1 to text length are invalid.
int GetWordStartBoundary(
int start, ui::TextBoundaryDirection direction) const;
« no previous file with comments | « content/browser/accessibility/accessibility_win_browsertest.cc ('k') | content/browser/accessibility/browser_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698