| 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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GraphemePositions); | 567 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GraphemePositions); |
| 568 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, EdgeSelectionModels); | 568 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, EdgeSelectionModels); |
| 569 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffset); | 569 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffset); |
| 570 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffsetHorizontalDefaultInRTL); | 570 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffsetHorizontalDefaultInRTL); |
| 571 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_MinWidth); | 571 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_MinWidth); |
| 572 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth); | 572 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth); |
| 573 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_SufficientWidth); | 573 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_SufficientWidth); |
| 574 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_Newline); | 574 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_Newline); |
| 575 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GlyphBounds); | 575 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GlyphBounds); |
| 576 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_GlyphBounds); | 576 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_GlyphBounds); |
| 577 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, |
| 578 MoveCursorLeftRight_MeiryoUILigatures); |
| 579 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Win_LogicalClusters); |
| 580 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, SameFontForParentheses); |
| 581 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, BreakRunsByUnicodeBlocks); |
| 577 | 582 |
| 578 // Creates a platform-specific RenderText instance. | 583 // Creates a platform-specific RenderText instance. |
| 579 static RenderText* CreateNativeInstance(); | 584 static RenderText* CreateNativeInstance(); |
| 580 | 585 |
| 581 // Set the cursor to |position|, with the caret trailing the previous | 586 // Set the cursor to |position|, with the caret trailing the previous |
| 582 // grapheme, or if there is no previous grapheme, leading the cursor position. | 587 // grapheme, or if there is no previous grapheme, leading the cursor position. |
| 583 // If |select| is false, the selection start is moved to the same position. | 588 // If |select| is false, the selection start is moved to the same position. |
| 584 // If the |position| is not a cursorable position (not on grapheme boundary), | 589 // If the |position| is not a cursorable position (not on grapheme boundary), |
| 585 // it is a NO-OP. | 590 // it is a NO-OP. |
| 586 void MoveCursorTo(size_t position, bool select); | 591 void MoveCursorTo(size_t position, bool select); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 // Lines computed by EnsureLayout. These should be invalidated with | 720 // Lines computed by EnsureLayout. These should be invalidated with |
| 716 // ResetLayout and on |display_rect_| changes. | 721 // ResetLayout and on |display_rect_| changes. |
| 717 std::vector<internal::Line> lines_; | 722 std::vector<internal::Line> lines_; |
| 718 | 723 |
| 719 DISALLOW_COPY_AND_ASSIGN(RenderText); | 724 DISALLOW_COPY_AND_ASSIGN(RenderText); |
| 720 }; | 725 }; |
| 721 | 726 |
| 722 } // namespace gfx | 727 } // namespace gfx |
| 723 | 728 |
| 724 #endif // UI_GFX_RENDER_TEXT_H_ | 729 #endif // UI_GFX_RENDER_TEXT_H_ |
| OLD | NEW |