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/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/i18n/break_iterator.h" | 10 #include "base/i18n/break_iterator.h" |
(...skipping 2695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2706 kTestSize); | 2706 kTestSize); |
2707 } | 2707 } |
2708 { | 2708 { |
2709 SCOPED_TRACE("TextDoesntClip Bottom Side"); | 2709 SCOPED_TRACE("TextDoesntClip Bottom Side"); |
2710 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, | 2710 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, |
2711 kTestSize + string_size.height(), | 2711 kTestSize + string_size.height(), |
2712 kCanvasSize.width(), kTestSize); | 2712 kCanvasSize.width(), kTestSize); |
2713 } | 2713 } |
2714 { | 2714 { |
2715 SCOPED_TRACE("TextDoesntClip Left Side"); | 2715 SCOPED_TRACE("TextDoesntClip Left Side"); |
2716 #if defined(OS_WIN) || defined(OS_MACOSX) | 2716 #if defined(OS_WIN) |
2717 // TODO(mukai): On Windows and Mac smoothing draws left of text. | 2717 // TODO(mukai): On Windows XP the Unicode test draws to the left edge as |
| 2718 // if it is ignoring the SetDisplayRect shift by kTestSize. |
| 2719 #elif defined(OS_MACOSX) |
| 2720 // TODO(mukai): On Windows (non-XP) and Mac smoothing draws left of text. |
2718 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, kTestSize, kTestSize - 1, | 2721 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, kTestSize, kTestSize - 1, |
2719 string_size.height()); | 2722 string_size.height()); |
2720 #else | 2723 #else |
2721 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, kTestSize, kTestSize, | 2724 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, kTestSize, kTestSize, |
2722 string_size.height()); | 2725 string_size.height()); |
2723 #endif | 2726 #endif |
2724 } | 2727 } |
2725 { | 2728 { |
2726 SCOPED_TRACE("TextDoesntClip Right Side"); | 2729 SCOPED_TRACE("TextDoesntClip Right Side"); |
2727 #if !defined(OS_MACOSX) | 2730 #if !defined(OS_MACOSX) |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2783 } | 2786 } |
2784 { | 2787 { |
2785 SCOPED_TRACE("TextDoesClip Right Side"); | 2788 SCOPED_TRACE("TextDoesClip Right Side"); |
2786 rect_buffer.EnsureSolidRect(SK_ColorWHITE, kTestSize + fake_width, | 2789 rect_buffer.EnsureSolidRect(SK_ColorWHITE, kTestSize + fake_width, |
2787 kTestSize, kTestSize, fake_height); | 2790 kTestSize, kTestSize, fake_height); |
2788 } | 2791 } |
2789 } | 2792 } |
2790 } | 2793 } |
2791 | 2794 |
2792 } // namespace gfx | 2795 } // namespace gfx |
OLD | NEW |