| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/gfx/render_text_win.h" | 5 #include "ui/gfx/render_text_win.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "third_party/skia/include/core/SkTypeface.h" | 10 #include "third_party/skia/include/core/SkTypeface.h" |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 SkIntToScalar(bounds.y()), | 645 SkIntToScalar(bounds.y()), |
| 646 strike); | 646 strike); |
| 647 } | 647 } |
| 648 offset.Offset(run->width, 0); | 648 offset.Offset(run->width, 0); |
| 649 } | 649 } |
| 650 } | 650 } |
| 651 | 651 |
| 652 void RenderTextWin::DrawCursor(Canvas* canvas) { | 652 void RenderTextWin::DrawCursor(Canvas* canvas) { |
| 653 // Paint cursor. Replace cursor is drawn as rectangle for now. | 653 // Paint cursor. Replace cursor is drawn as rectangle for now. |
| 654 // TODO(msw): Draw a better cursor with a better indication of association. | 654 // TODO(msw): Draw a better cursor with a better indication of association. |
| 655 if (cursor_visible() && focused()) { | 655 if (cursor_visible() && focused()) |
| 656 Rect r(GetUpdatedCursorBounds()); | 656 canvas->DrawRect(kCursorColor, GetUpdatedCursorBounds()); |
| 657 canvas->DrawRectInt(kCursorColor, r.x(), r.y(), r.width(), r.height()); | |
| 658 } | |
| 659 } | 657 } |
| 660 | 658 |
| 661 RenderText* RenderText::CreateRenderText() { | 659 RenderText* RenderText::CreateRenderText() { |
| 662 return new RenderTextWin; | 660 return new RenderTextWin; |
| 663 } | 661 } |
| 664 | 662 |
| 665 } // namespace gfx | 663 } // namespace gfx |
| OLD | NEW |