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

Unified Diff: ui/gfx/render_text_linux.h

Issue 7841056: fix know issues in RenderText (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix a capitalization in break_iterator.h Created 9 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
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_linux.h
===================================================================
--- ui/gfx/render_text_linux.h (revision 102037)
+++ ui/gfx/render_text_linux.h (working copy)
@@ -39,28 +39,22 @@
BreakType break_type) OVERRIDE;
virtual SelectionModel LeftEndSelectionModel() OVERRIDE;
virtual SelectionModel RightEndSelectionModel() OVERRIDE;
- virtual size_t GetIndexOfPreviousGrapheme(size_t position) OVERRIDE;
+ virtual bool IsCursorablePosition(size_t position) OVERRIDE;
private:
- enum RelativeLogicalPosition {
- PREVIOUS,
- NEXT
- };
+ virtual size_t IndexOfAdjacentGrapheme(size_t index, bool next) OVERRIDE;
- // Get the logical start index of the next grapheme after |position|.
- size_t GetIndexOfNextGrapheme(size_t position);
-
// Returns the run that contains |position|. Return NULL if not found.
GSList* GetRunContainingPosition(size_t position) const;
// Given |utf8_index_of_current_grapheme|, returns the UTF8 or UTF16 index of
- // next grapheme in the text if |pos| is NEXT, otherwise, returns the index of
- // previous grapheme. Returns 0 if there is no previous grapheme, and returns
- // the |text_| length if there is no next grapheme.
+ // next grapheme in the text if |next| is true, otherwise, returns the index
+ // of previous grapheme. Returns 0 if there is no previous grapheme, and
+ // returns the |text_| length if there is no next grapheme.
size_t Utf8IndexOfAdjacentGrapheme(size_t utf8_index_of_current_grapheme,
- RelativeLogicalPosition pos) const;
+ bool next) const;
size_t Utf16IndexOfAdjacentGrapheme(size_t utf8_index_of_current_grapheme,
- RelativeLogicalPosition pos) const;
+ bool next) const;
// Given a |run|, returns the SelectionModel that contains the logical first
// or last caret position inside (not at a boundary of) the run.
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698