summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text.h
diff options
context:
space:
mode:
authormukai <mukai@chromium.org>2015-02-18 17:26:16 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-19 01:27:04 +0000
commit41d94b4931866d75bdbe9b75377b7608bba63d3a (patch)
tree641a1c4fc31a04e4a00f4ee7f3845b7b1e72903d /ui/gfx/render_text.h
parent3fd8c986bd999d5f368d4296bdc8715af05fbc49 (diff)
downloadchromium_src-41d94b4931866d75bdbe9b75377b7608bba63d3a.zip
chromium_src-41d94b4931866d75bdbe9b75377b7608bba63d3a.tar.gz
chromium_src-41d94b4931866d75bdbe9b75377b7608bba63d3a.tar.bz2
Fix multiline behaviors for RTL text.
- Usually, logical first segment should appear in the first line when multi-lined. This is the reported bug as crbug.com/458219 Therefore, TextRunHarfBuzz should be added to the line breaker in the logical order. - The segment order in a line is assumed as visual order, therefore it needs to be sorted. - Modified the test expectations which support this behavior. - Added new test cases to verify where exactly the segment is drawn. BUG=458219 R=msw@chromium.org, ckocagil@chromium.org TEST=gfx_unittests Review URL: https://codereview.chromium.org/924773002 Cr-Commit-Position: refs/heads/master@{#316954}
Diffstat (limited to 'ui/gfx/render_text.h')
-rw-r--r--ui/gfx/render_text.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index 5a18253..2be04ac 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -45,10 +45,10 @@ class RenderTextTest;
namespace internal {
// Internal helper class used by derived classes to draw text through Skia.
-class SkiaTextRenderer {
+class GFX_EXPORT SkiaTextRenderer {
public:
explicit SkiaTextRenderer(Canvas* canvas);
- ~SkiaTextRenderer();
+ virtual ~SkiaTextRenderer();
void SetDrawLooper(SkDrawLooper* draw_looper);
void SetFontRenderParams(const FontRenderParams& params,
@@ -63,14 +63,14 @@ class SkiaTextRenderer {
// two metrics must be set together.
void SetUnderlineMetrics(SkScalar thickness, SkScalar position);
void DrawSelection(const std::vector<Rect>& selection, SkColor color);
- void DrawPosText(const SkPoint* pos,
- const uint16* glyphs,
- size_t glyph_count);
+ virtual void DrawPosText(const SkPoint* pos,
+ const uint16* glyphs,
+ size_t glyph_count);
// Draw underline and strike-through text decorations.
// Based on |SkCanvas::DrawTextDecorations()| and constants from:
// third_party/skia/src/core/SkTextFormatParams.h
- void DrawDecorations(int x, int y, int width, bool underline, bool strike,
- bool diagonal_strike);
+ virtual void DrawDecorations(int x, int y, int width, bool underline,
+ bool strike, bool diagonal_strike);
// Finishes any ongoing diagonal strike run.
void EndDiagonalStrike();
void DrawUnderline(int x, int y, int width);