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

Unified Diff: ui/gfx/render_text_linux.h

Issue 8747001: Reintroduce password support to NativeTextfieldViews (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for dcommit Created 8 years, 10 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
diff --git a/ui/gfx/render_text_linux.h b/ui/gfx/render_text_linux.h
index 79c87b002d2e2494d91860400fa52ae0387b9cfd..be8224bad28d085824e58fe9e6850901b6b1c8a1 100644
--- a/ui/gfx/render_text_linux.h
+++ b/ui/gfx/render_text_linux.h
@@ -51,11 +51,11 @@ class RenderTextLinux : public RenderText {
// 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 UTF-8 index of the
- // |next| or previous grapheme in logical order. Returns 0 if there is no
- // previous grapheme, or the |text_| length if there is no next grapheme.
- size_t Utf8IndexOfAdjacentGrapheme(size_t utf8_index_of_current_grapheme,
- LogicalCursorDirection direction) const;
+ // Given |layout_index_of_current_grapheme|, returns the layout (UTF-8) index
+ // of the |next| or previous grapheme in logical order. Returns 0 if there is
+ // no previous grapheme, or the |text_| length if there is no next grapheme.
+ size_t LayoutIndexOfAdjacentGrapheme(size_t layout_index_of_current_grapheme,
+ LogicalCursorDirection direction) const;
// Given a |run|, returns the SelectionModel that contains the logical first
// or last caret position inside (not at a boundary of) the run.
@@ -75,8 +75,9 @@ class RenderTextLinux : public RenderText {
PangoAttribute* pango_attr,
PangoAttrList* attrs);
- size_t Utf16IndexToUtf8Index(size_t index) const;
- size_t Utf8IndexToUtf16Index(size_t index) const;
+ // Convert between indices into text() and indices into |layout_text_|.
+ size_t TextIndexToLayoutIndex(size_t index) const;
+ size_t LayoutIndexToTextIndex(size_t index) const;
// Calculate the visual bounds containing the logical substring within |from|
// to |to|.
« 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