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

Unified Diff: ui/gfx/render_text_linux.cc

Issue 8747001: Reintroduce password support to NativeTextfieldViews (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: delete more dead code, address recent comments Created 9 years 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: ui/gfx/render_text_linux.cc
diff --git a/ui/gfx/render_text_linux.cc b/ui/gfx/render_text_linux.cc
index e2f0d67b9294737cea244a7c11954c8515134553..bb6670c324302e6b26988a8db8e054a5a95efd15 100644
--- a/ui/gfx/render_text_linux.cc
+++ b/ui/gfx/render_text_linux.cc
@@ -234,7 +234,7 @@ void RenderTextLinux::EnsureLayout() {
layout_ = pango_cairo_create_layout(cr);
SetupPangoLayout(
layout_,
- text(),
+ GetObscuredText(),
default_style().font,
display_rect().width(),
base::i18n::GetFirstStrongCharacterDirection(text()),
@@ -468,7 +468,8 @@ SelectionModel RenderTextLinux::RightSelectionModel(
SelectionModel RenderTextLinux::LeftSelectionModelByWord(
const SelectionModel& selection) {
- base::i18n::BreakIterator iter(text(), base::i18n::BreakIterator::BREAK_WORD);
+ string16 txt = GetObscuredText();
+ base::i18n::BreakIterator iter(txt, base::i18n::BreakIterator::BREAK_WORD);
bool success = iter.Init();
DCHECK(success);
if (!success)
@@ -497,7 +498,8 @@ SelectionModel RenderTextLinux::LeftSelectionModelByWord(
SelectionModel RenderTextLinux::RightSelectionModelByWord(
const SelectionModel& selection) {
- base::i18n::BreakIterator iter(text(), base::i18n::BreakIterator::BREAK_WORD);
+ string16 txt = GetObscuredText();
+ base::i18n::BreakIterator iter(txt, base::i18n::BreakIterator::BREAK_WORD);
bool success = iter.Init();
DCHECK(success);
if (!success)

Powered by Google App Engine
This is Rietveld 408576698