diff options
author | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-16 00:37:09 +0000 |
---|---|---|
committer | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-16 00:37:09 +0000 |
commit | 0a12d5fdc9b861f48e0d431fa9f1887bf84246b1 (patch) | |
tree | 68aa74232007f5a106512de8a797d97a07e3a867 /ui/gfx/render_text.h | |
parent | 51dbd1c879a48c7a28deb9f6e83e1a2d7ee78cee (diff) | |
download | chromium_src-0a12d5fdc9b861f48e0d431fa9f1887bf84246b1.zip chromium_src-0a12d5fdc9b861f48e0d431fa9f1887bf84246b1.tar.gz chromium_src-0a12d5fdc9b861f48e0d431fa9f1887bf84246b1.tar.bz2 |
Rewrite RenderText::IndexOfAdjacentGrapheme() in terms of IsCursorablePosition().
This moves the implementation of IndexOfAdjacentGrapheme() entirely into the base class, removing the need for platform-specific implementations.
This rewrite exposed a couple of problems in RenderTextLinux::IsCursorablePosition() that caused some tests to fail. The fixes are also included.
Also includes additional test coverage for UTF16 surrogate pairs, which was only caught by a Linux-specific password censorship test.
BUG=125664
TEST=Existing unit tests.
Review URL: https://chromiumcodereview.appspot.com/10389148
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137320 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/render_text.h')
-rw-r--r-- | ui/gfx/render_text.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h index 4398366..f50c1d1 100644 --- a/ui/gfx/render_text.h +++ b/ui/gfx/render_text.h @@ -269,8 +269,8 @@ class UI_EXPORT RenderText { // range 0 to text().length() inclusive (the input is clamped if it is out of // that range). Always moves by at least one character index unless the // supplied index is already at the boundary of the string. - virtual size_t IndexOfAdjacentGrapheme(size_t index, - LogicalCursorDirection direction) = 0; + size_t IndexOfAdjacentGrapheme(size_t index, + LogicalCursorDirection direction); // Return a SelectionModel with the cursor at the current selection's start. // The returned value represents a cursor/caret position without a selection. |