Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Unified Diff: ui/gfx/render_text_harfbuzz.h

Issue 924773002: Fix multiline behaviors for RTL text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/render_text.h ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_harfbuzz.h
diff --git a/ui/gfx/render_text_harfbuzz.h b/ui/gfx/render_text_harfbuzz.h
index d3cba76d561514bc1da2c6947757b603ea51fe44..23c949956a97e76f50a531e850f8af9b01901fb3 100644
--- a/ui/gfx/render_text_harfbuzz.h
+++ b/ui/gfx/render_text_harfbuzz.h
@@ -164,6 +164,9 @@ class GFX_EXPORT RenderTextHarfBuzz : public RenderText {
friend class RenderTextTest;
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_RunDirection);
+ FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_HorizontalPositions);
+ FRIEND_TEST_ALL_PREFIXES(RenderTextTest,
+ HarfBuzz_TextPositionWithFractionalSize);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_BreakRunsByUnicodeBlocks);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_BreakRunsByEmoji);
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_SubglyphGraphemeCases);
@@ -174,10 +177,13 @@ class GFX_EXPORT RenderTextHarfBuzz : public RenderText {
// Specify the width of a glyph for test. The width of glyphs is very
// platform-dependent and environment-dependent. Otherwise multiline test
// will become really flaky.
- void set_glyph_width_for_test(uint8 test_width) {
+ void set_glyph_width_for_test(float test_width) {
glyph_width_for_test_ = test_width;
}
+ // The actual implementation of the text drawing.
+ void DrawVisualTextInternal(internal::SkiaTextRenderer* renderer);
+
// 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);
@@ -256,7 +262,7 @@ class GFX_EXPORT RenderTextHarfBuzz : public RenderText {
SizeF total_size_;
// Fixed width of glyphs. This should only be set in test environments.
- uint8 glyph_width_for_test_;
+ float glyph_width_for_test_;
DISALLOW_COPY_AND_ASSIGN(RenderTextHarfBuzz);
};
« no previous file with comments | « ui/gfx/render_text.h ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698