| 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 | 8 |
| 9 #include "base/i18n/break_iterator.h" | 9 #include "base/i18n/break_iterator.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "third_party/icu/public/common/unicode/rbbi.h" | 12 #include "third_party/icu/source/common/unicode/rbbi.h" |
| 13 #include "third_party/icu/public/common/unicode/utf16.h" | 13 #include "third_party/icu/source/common/unicode/utf16.h" |
| 14 #include "third_party/skia/include/core/SkTypeface.h" | 14 #include "third_party/skia/include/core/SkTypeface.h" |
| 15 #include "third_party/skia/include/effects/SkGradientShader.h" | 15 #include "third_party/skia/include/effects/SkGradientShader.h" |
| 16 #include "ui/base/text/text_elider.h" | 16 #include "ui/base/text/text_elider.h" |
| 17 #include "ui/base/text/utf16_indexing.h" | 17 #include "ui/base/text/utf16_indexing.h" |
| 18 #include "ui/gfx/canvas.h" | 18 #include "ui/gfx/canvas.h" |
| 19 #include "ui/gfx/insets.h" | 19 #include "ui/gfx/insets.h" |
| 20 #include "ui/gfx/skia_util.h" | 20 #include "ui/gfx/skia_util.h" |
| 21 #include "ui/gfx/text_constants.h" | 21 #include "ui/gfx/text_constants.h" |
| 22 | 22 |
| 23 namespace gfx { | 23 namespace gfx { |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 cursor_bounds_ += delta_offset; | 1016 cursor_bounds_ += delta_offset; |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 void RenderText::DrawSelection(Canvas* canvas) { | 1019 void RenderText::DrawSelection(Canvas* canvas) { |
| 1020 const std::vector<Rect> sel = GetSubstringBounds(selection()); | 1020 const std::vector<Rect> sel = GetSubstringBounds(selection()); |
| 1021 for (std::vector<Rect>::const_iterator i = sel.begin(); i < sel.end(); ++i) | 1021 for (std::vector<Rect>::const_iterator i = sel.begin(); i < sel.end(); ++i) |
| 1022 canvas->FillRect(*i, selection_background_focused_color_); | 1022 canvas->FillRect(*i, selection_background_focused_color_); |
| 1023 } | 1023 } |
| 1024 | 1024 |
| 1025 } // namespace gfx | 1025 } // namespace gfx |
| OLD | NEW |