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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 static bool RangeContainsCaret(const Range& range, | 647 static bool RangeContainsCaret(const Range& range, |
648 size_t caret_pos, | 648 size_t caret_pos, |
649 LogicalCursorDirection caret_affinity); | 649 LogicalCursorDirection caret_affinity); |
650 | 650 |
651 private: | 651 private: |
652 friend class test::RenderTextTestApi; | 652 friend class test::RenderTextTestApi; |
653 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, DefaultStyles); | 653 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, DefaultStyles); |
654 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, SetStyles); | 654 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, SetStyles); |
655 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ApplyStyles); | 655 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ApplyStyles); |
656 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, AppendTextKeepsStyles); | 656 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, AppendTextKeepsStyles); |
657 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ObscuredText); | 657 FRIEND_TEST_ALL_PREFIXES(RenderTextHarfBuzzTest, ObscuredText); |
658 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, RevealObscuredText); | 658 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, RevealObscuredText); |
659 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedText); | 659 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedText); |
660 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedObscuredText); | 660 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedObscuredText); |
661 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedText); | 661 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedText); |
662 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedObscuredText); | 662 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedObscuredText); |
663 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GraphemePositions); | 663 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GraphemePositions); |
664 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, MinLineHeight); | 664 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, MinLineHeight); |
665 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, EdgeSelectionModels); | 665 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, EdgeSelectionModels); |
666 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffset); | 666 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffset); |
667 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffsetHorizontalDefaultInRTL); | 667 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffsetHorizontalDefaultInRTL); |
668 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_MinWidth); | 668 FRIEND_TEST_ALL_PREFIXES(RenderTextHarfBuzzTest, Multiline_MinWidth); |
669 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth); | 669 FRIEND_TEST_ALL_PREFIXES(RenderTextHarfBuzzTest, Multiline_NormalWidth); |
670 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_SufficientWidth); | 670 FRIEND_TEST_ALL_PREFIXES(RenderTextHarfBuzzTest, Multiline_SufficientWidth); |
671 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_Newline); | 671 FRIEND_TEST_ALL_PREFIXES(RenderTextHarfBuzzTest, Multiline_Newline); |
672 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_WordWrapBehavior); | 672 FRIEND_TEST_ALL_PREFIXES(RenderTextHarfBuzzTest, Multiline_WordWrapBehavior); |
673 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_LineBreakerBehavior); | 673 FRIEND_TEST_ALL_PREFIXES(RenderTextHarfBuzzTest, |
674 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, | 674 Multiline_LineBreakerBehavior); |
| 675 FRIEND_TEST_ALL_PREFIXES(RenderTextHarfBuzzTest, |
675 Multiline_SurrogatePairsOrCombiningChars); | 676 Multiline_SurrogatePairsOrCombiningChars); |
676 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_ZeroWidthChars); | 677 FRIEND_TEST_ALL_PREFIXES(RenderTextHarfBuzzTest, Multiline_ZeroWidthChars); |
677 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, NewlineWithoutMultilineFlag); | 678 FRIEND_TEST_ALL_PREFIXES(RenderTextHarfBuzzTest, NewlineWithoutMultilineFlag); |
678 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GlyphBounds); | 679 FRIEND_TEST_ALL_PREFIXES(RenderTextHarfBuzzTest, GlyphBounds); |
679 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_GlyphBounds); | |
680 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, | 680 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, |
681 MoveCursorLeftRight_MeiryoUILigatures); | 681 MoveCursorLeftRight_MeiryoUILigatures); |
682 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Win_LogicalClusters); | 682 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Win_LogicalClusters); |
683 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, SameFontForParentheses); | 683 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, SameFontForParentheses); |
684 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, BreakRunsByUnicodeBlocks); | 684 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, BreakRunsByUnicodeBlocks); |
685 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, PangoAttributes); | 685 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, PangoAttributes); |
686 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, StringFitsOwnWidth); | 686 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, StringFitsOwnWidth); |
687 | 687 |
688 // Set the cursor to |position|, with the caret trailing the previous | 688 // Set the cursor to |position|, with the caret trailing the previous |
689 // grapheme, or if there is no previous grapheme, leading the cursor position. | 689 // grapheme, or if there is no previous grapheme, leading the cursor position. |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 // Lines computed by EnsureLayout. These should be invalidated upon | 850 // Lines computed by EnsureLayout. These should be invalidated upon |
851 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. | 851 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. |
852 std::vector<internal::Line> lines_; | 852 std::vector<internal::Line> lines_; |
853 | 853 |
854 DISALLOW_COPY_AND_ASSIGN(RenderText); | 854 DISALLOW_COPY_AND_ASSIGN(RenderText); |
855 }; | 855 }; |
856 | 856 |
857 } // namespace gfx | 857 } // namespace gfx |
858 | 858 |
859 #endif // UI_GFX_RENDER_TEXT_H_ | 859 #endif // UI_GFX_RENDER_TEXT_H_ |
OLD | NEW |