Chromium Code Reviews| Index: ui/gfx/render_text.cc |
| diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc |
| index 7ccaaa6131a5ece76f65603b9c3cc7f5450b4248..14c646bd5a75a69beaf9cae9a3a9b0e2db99d154 100644 |
| --- a/ui/gfx/render_text.cc |
| +++ b/ui/gfx/render_text.cc |
| @@ -45,11 +45,6 @@ namespace gfx { |
| namespace { |
| -// All chars are replaced by this char when the password style is set. |
| -// TODO(benrg): GTK uses the first of U+25CF, U+2022, U+2731, U+273A, '*' |
| -// that's available in the font (find_invisible_char() in gtkentry.c). |
| -const base::char16 kPasswordReplacementChar = '*'; |
| - |
| // Default color used for the text and cursor. |
| const SkColor kDefaultColor = SK_ColorBLACK; |
| @@ -426,6 +421,9 @@ void ApplyRenderParams(const FontRenderParams& params, |
| } // namespace internal |
| +// static |
| +constexpr base::char16 RenderText::kPasswordReplacementChar; |
|
sky
2016/10/25 16:40:16
Are you sure this is still needed?
tapted
2016/10/25 23:09:39
drive-by: It's needed if the address is ever taken
karandeepb
2016/10/26 00:02:44
Yeah the standard calls these usages "odr-used".
|
| + |
| RenderText::~RenderText() { |
| } |
| @@ -1406,7 +1404,8 @@ void RenderText::OnTextAttributeChanged() { |
| if (obscured_) { |
| size_t obscured_text_length = |
| static_cast<size_t>(UTF16IndexToOffset(text_, 0, text_.length())); |
| - layout_text_.assign(obscured_text_length, kPasswordReplacementChar); |
| + layout_text_.assign(obscured_text_length, |
| + RenderText::kPasswordReplacementChar); |
| if (obscured_reveal_index_ >= 0 && |
| obscured_reveal_index_ < static_cast<int>(text_.length())) { |