| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.h" | 5 #include "ui/gfx/render_text.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <climits> | 8 #include <climits> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/i18n/break_iterator.h" | 11 #include "base/i18n/break_iterator.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
| 14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "third_party/icu/source/common/unicode/rbbi.h" | 16 #include "third_party/icu/source/common/unicode/rbbi.h" |
| 17 #include "third_party/icu/source/common/unicode/utf16.h" | 17 #include "third_party/icu/source/common/unicode/utf16.h" |
| 18 #include "third_party/skia/include/core/SkTypeface.h" | 18 #include "third_party/skia/include/core/SkTypeface.h" |
| 19 #include "third_party/skia/include/effects/SkGradientShader.h" | 19 #include "third_party/skia/include/effects/SkGradientShader.h" |
| 20 #include "ui/gfx/canvas.h" | 20 #include "ui/gfx/canvas.h" |
| 21 #include "ui/gfx/insets.h" | 21 #include "ui/gfx/geometry/insets.h" |
| 22 #include "ui/gfx/render_text_harfbuzz.h" | 22 #include "ui/gfx/render_text_harfbuzz.h" |
| 23 #include "ui/gfx/scoped_canvas.h" | 23 #include "ui/gfx/scoped_canvas.h" |
| 24 #include "ui/gfx/skia_util.h" | 24 #include "ui/gfx/skia_util.h" |
| 25 #include "ui/gfx/switches.h" | 25 #include "ui/gfx/switches.h" |
| 26 #include "ui/gfx/text_elider.h" | 26 #include "ui/gfx/text_elider.h" |
| 27 #include "ui/gfx/text_utils.h" | 27 #include "ui/gfx/text_utils.h" |
| 28 #include "ui/gfx/utf16_indexing.h" | 28 #include "ui/gfx/utf16_indexing.h" |
| 29 | 29 |
| 30 namespace gfx { | 30 namespace gfx { |
| 31 | 31 |
| (...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1423 cursor_bounds_ += delta_offset; | 1423 cursor_bounds_ += delta_offset; |
| 1424 } | 1424 } |
| 1425 | 1425 |
| 1426 void RenderText::DrawSelection(Canvas* canvas) { | 1426 void RenderText::DrawSelection(Canvas* canvas) { |
| 1427 const std::vector<Rect> sel = GetSubstringBounds(selection()); | 1427 const std::vector<Rect> sel = GetSubstringBounds(selection()); |
| 1428 for (std::vector<Rect>::const_iterator i = sel.begin(); i < sel.end(); ++i) | 1428 for (std::vector<Rect>::const_iterator i = sel.begin(); i < sel.end(); ++i) |
| 1429 canvas->FillRect(*i, selection_background_focused_color_); | 1429 canvas->FillRect(*i, selection_background_focused_color_); |
| 1430 } | 1430 } |
| 1431 | 1431 |
| 1432 } // namespace gfx | 1432 } // namespace gfx |
| OLD | NEW |