Index: ui/gfx/render_text_harfbuzz.h |
diff --git a/ui/gfx/render_text_harfbuzz.h b/ui/gfx/render_text_harfbuzz.h |
index 7f3a1dcef7396fb5b5f84af79d7d12a7a63a3c15..f21d77fcbdd03e1c8455405a102d563d7373504b 100644 |
--- a/ui/gfx/render_text_harfbuzz.h |
+++ b/ui/gfx/render_text_harfbuzz.h |
@@ -113,6 +113,7 @@ class GFX_EXPORT RenderTextHarfBuzz : public RenderText { |
private: |
friend class RenderTextTest; |
+ FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth); |
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_RunDirection); |
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_BreakRunsByUnicodeBlocks); |
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_BreakRunsByEmoji); |
@@ -121,6 +122,11 @@ class GFX_EXPORT RenderTextHarfBuzz : public RenderText { |
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_NonExistentFont); |
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_UniscribeFallback); |
+ // Specify the width of a character for test. The width of characters is very |
msw
2015/02/05 01:09:15
nit: use "glyph" and "glyphs", not "character" and
Jun Mukai
2015/02/05 19:48:32
Done.
|
+ // platform-dependent and environment-dependent. Otherwise multiline test |
+ // will become really flaky. |
+ static void SetGlyphWidthForTest(int test_width); |
msw
2015/02/05 01:09:15
Make this a non-static value and setter on rthb in
Jun Mukai
2015/02/05 19:48:32
Done.
|
+ |
// Return the run index that contains the argument; or the length of the |
// |runs_| vector if argument exceeds the text length or width. |
size_t GetRunContainingCaret(const SelectionModel& caret) const; |
@@ -168,6 +174,9 @@ class GFX_EXPORT RenderTextHarfBuzz : public RenderText { |
// be NULL in case of an error. |
scoped_ptr<base::i18n::BreakIterator> grapheme_iterator_; |
+ // The total size of the layouted text. |
+ SizeF total_size_; |
+ |
DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz); |
}; |