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 #ifndef UI_GFX_RENDER_TEXT_H_ | 5 #ifndef UI_GFX_RENDER_TEXT_H_ |
6 #define UI_GFX_RENDER_TEXT_H_ | 6 #define UI_GFX_RENDER_TEXT_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <cstring> | 9 #include <cstring> |
10 #include <string> | 10 #include <string> |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, DefaultStyle); | 554 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, DefaultStyle); |
555 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, SetColorAndStyle); | 555 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, SetColorAndStyle); |
556 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ApplyColorAndStyle); | 556 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ApplyColorAndStyle); |
557 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ObscuredText); | 557 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ObscuredText); |
558 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, RevealObscuredText); | 558 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, RevealObscuredText); |
559 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedText); | 559 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedText); |
560 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedObscuredText); | 560 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedObscuredText); |
561 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedText); | 561 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedText); |
562 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedObscuredText); | 562 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedObscuredText); |
563 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GraphemePositions); | 563 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GraphemePositions); |
| 564 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, FindCursorPosition); |
564 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, EdgeSelectionModels); | 565 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, EdgeSelectionModels); |
565 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffset); | 566 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffset); |
566 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffsetHorizontalDefaultInRTL); | 567 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffsetHorizontalDefaultInRTL); |
567 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_MinWidth); | 568 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_MinWidth); |
568 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth); | 569 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth); |
569 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_SufficientWidth); | 570 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_SufficientWidth); |
570 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_Newline); | 571 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_Newline); |
571 | 572 |
572 // Set the cursor to |position|, with the caret trailing the previous | 573 // Set the cursor to |position|, with the caret trailing the previous |
573 // grapheme, or if there is no previous grapheme, leading the cursor position. | 574 // grapheme, or if there is no previous grapheme, leading the cursor position. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 // Lines computed by EnsureLayout. These should be invalidated with | 704 // Lines computed by EnsureLayout. These should be invalidated with |
704 // ResetLayout and on |display_rect_| changes. | 705 // ResetLayout and on |display_rect_| changes. |
705 std::vector<internal::Line> lines_; | 706 std::vector<internal::Line> lines_; |
706 | 707 |
707 DISALLOW_COPY_AND_ASSIGN(RenderText); | 708 DISALLOW_COPY_AND_ASSIGN(RenderText); |
708 }; | 709 }; |
709 | 710 |
710 } // namespace gfx | 711 } // namespace gfx |
711 | 712 |
712 #endif // UI_GFX_RENDER_TEXT_H_ | 713 #endif // UI_GFX_RENDER_TEXT_H_ |
OLD | NEW |