| Index: views/controls/textfield/native_textfield_views.cc
|
| diff --git a/views/controls/textfield/native_textfield_views.cc b/views/controls/textfield/native_textfield_views.cc
|
| index 31c7e4d226f48b9d8edbf130601a00702e3ecf59..0ab85aa8bd80f57e771266ce169ac01ac775bfea 100644
|
| --- a/views/controls/textfield/native_textfield_views.cc
|
| +++ b/views/controls/textfield/native_textfield_views.cc
|
| @@ -16,6 +16,7 @@
|
| #include "ui/base/range/range.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/insets.h"
|
| +#include "ui/gfx/render_text.h"
|
| #include "views/background.h"
|
| #include "views/border.h"
|
| #include "views/controls/focusable_border.h"
|
| @@ -819,6 +820,18 @@ void NativeTextfieldViews::PaintTextAndCursor(gfx::Canvas* canvas) {
|
| canvas->ClipRectInt(insets.left(), insets.top(),
|
| width() - insets.width(), height() - insets.height());
|
|
|
| + // TODO(msw): Fix... integrate, etc...
|
| + int x = text_offset_ + insets.left();
|
| + int y = insets.top();
|
| + int w = GetFont().GetStringWidth(model_->text());
|
| + int h = height() - insets.height();
|
| + gfx::Rect display_bounds = gfx::Rect(x, y, w, h);
|
| + gfx::RenderText* render_text = gfx::RenderText::CreateRenderText(
|
| + model_->text(), GetFont(), GetTextColor(), display_bounds, 0);
|
| +
|
| + canvas->DrawStringInt(*render_text);
|
| +
|
| +/* TODO(msw): Fix... integrate, etc...
|
| // TODO(oshima): bidi support
|
| // TODO(varunjain): re-implement this so only that dirty text is painted.
|
| TextfieldViewsModel::TextFragments fragments;
|
| @@ -863,6 +876,7 @@ void NativeTextfieldViews::PaintTextAndCursor(gfx::Canvas* canvas) {
|
| cursor_bounds_.y(),
|
| cursor_bounds_.width(),
|
| cursor_bounds_.height());
|
| +*/
|
| }
|
|
|
| bool NativeTextfieldViews::HandleKeyEvent(const KeyEvent& key_event) {
|
|
|