Chromium Code Reviews| 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 608 void UpdateStyleLengths(); | 608 void UpdateStyleLengths(); |
| 609 | 609 |
| 610 // A convenience function to check whether the glyph attached to the caret | 610 // A convenience function to check whether the glyph attached to the caret |
| 611 // is within the given range. | 611 // is within the given range. |
| 612 static bool RangeContainsCaret(const Range& range, | 612 static bool RangeContainsCaret(const Range& range, |
| 613 size_t caret_pos, | 613 size_t caret_pos, |
| 614 LogicalCursorDirection caret_affinity); | 614 LogicalCursorDirection caret_affinity); |
| 615 | 615 |
| 616 private: | 616 private: |
| 617 friend class RenderTextTest; | 617 friend class RenderTextTest; |
| 618 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, AppendText); | |
|
msw
2015/03/24 01:47:16
Does this test actually use anything protected or
dschuyler
2015/03/24 19:37:08
Yeah, the style arrays for the expect calls.
| |
| 618 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, DefaultStyles); | 619 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, DefaultStyles); |
| 619 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, SetStyles); | 620 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, SetStyles); |
| 620 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ApplyStyles); | 621 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ApplyStyles); |
| 621 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ObscuredText); | 622 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ObscuredText); |
| 622 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, RevealObscuredText); | 623 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, RevealObscuredText); |
| 623 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedText); | 624 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedText); |
| 624 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedObscuredText); | 625 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedObscuredText); |
| 625 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedText); | 626 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedText); |
| 626 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedObscuredText); | 627 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedObscuredText); |
| 627 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GraphemePositions); | 628 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GraphemePositions); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 799 // Lines computed by EnsureLayout. These should be invalidated upon | 800 // Lines computed by EnsureLayout. These should be invalidated upon |
| 800 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. | 801 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. |
| 801 std::vector<internal::Line> lines_; | 802 std::vector<internal::Line> lines_; |
| 802 | 803 |
| 803 DISALLOW_COPY_AND_ASSIGN(RenderText); | 804 DISALLOW_COPY_AND_ASSIGN(RenderText); |
| 804 }; | 805 }; |
| 805 | 806 |
| 806 } // namespace gfx | 807 } // namespace gfx |
| 807 | 808 |
| 808 #endif // UI_GFX_RENDER_TEXT_H_ | 809 #endif // UI_GFX_RENDER_TEXT_H_ |
| OLD | NEW |