| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_HARFBUZZ_H_ | 5 #ifndef UI_GFX_RENDER_TEXT_HARFBUZZ_H_ |
| 6 #define UI_GFX_RENDER_TEXT_HARFBUZZ_H_ | 6 #define UI_GFX_RENDER_TEXT_HARFBUZZ_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 std::vector<Rect> GetSubstringBounds(const Range& range) override; | 166 std::vector<Rect> GetSubstringBounds(const Range& range) override; |
| 167 size_t TextIndexToDisplayIndex(size_t index) override; | 167 size_t TextIndexToDisplayIndex(size_t index) override; |
| 168 size_t DisplayIndexToTextIndex(size_t index) override; | 168 size_t DisplayIndexToTextIndex(size_t index) override; |
| 169 bool IsValidCursorIndex(size_t index) override; | 169 bool IsValidCursorIndex(size_t index) override; |
| 170 void OnLayoutTextAttributeChanged(bool text_changed) override; | 170 void OnLayoutTextAttributeChanged(bool text_changed) override; |
| 171 void OnDisplayTextAttributeChanged() override; | 171 void OnDisplayTextAttributeChanged() override; |
| 172 void EnsureLayout() override; | 172 void EnsureLayout() override; |
| 173 void DrawVisualText(internal::SkiaTextRenderer* renderer) override; | 173 void DrawVisualText(internal::SkiaTextRenderer* renderer) override; |
| 174 | 174 |
| 175 private: | 175 private: |
| 176 friend class test::RenderTextTestApi; |
| 177 |
| 176 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_HorizontalAlignment); | 178 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_HorizontalAlignment); |
| 177 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth); | 179 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth); |
| 178 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_WordWrapBehavior); | 180 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_WordWrapBehavior); |
| 179 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_RunDirection); | 181 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_RunDirection); |
| 180 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_HorizontalPositions); | 182 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_HorizontalPositions); |
| 181 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, | 183 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, |
| 182 HarfBuzz_TextPositionWithFractionalSize); | 184 HarfBuzz_TextPositionWithFractionalSize); |
| 183 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_BreakRunsByUnicodeBlocks); | 185 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_BreakRunsByUnicodeBlocks); |
| 184 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_BreakRunsByEmoji); | 186 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_BreakRunsByEmoji); |
| 185 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_BreakRunsByAscii); | 187 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_BreakRunsByAscii); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 275 |
| 274 // Fixed width of glyphs. This should only be set in test environments. | 276 // Fixed width of glyphs. This should only be set in test environments. |
| 275 float glyph_width_for_test_; | 277 float glyph_width_for_test_; |
| 276 | 278 |
| 277 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); | 279 DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); |
| 278 }; | 280 }; |
| 279 | 281 |
| 280 } // namespace gfx | 282 } // namespace gfx |
| 281 | 283 |
| 282 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ | 284 #endif // UI_GFX_RENDER_TEXT_HARFBUZZ_H_ |
| OLD | NEW |