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

Unified Diff: ui/gfx/render_text_harfbuzz.cc

Issue 2969623004: RenderText: Allow strike-through line thickness to be customized. (Closed)
Patch Set: Address final nits. Created 3 years, 5 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.cc ('k') | ui/gfx/render_text_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_harfbuzz.cc
diff --git a/ui/gfx/render_text_harfbuzz.cc b/ui/gfx/render_text_harfbuzz.cc
index 97dcfec8a35e8ba2c4f1ef62af5fe0120251dd8c..2f0286217a546b758e894302afbff262409ecf2c 100644
--- a/ui/gfx/render_text_harfbuzz.cc
+++ b/ui/gfx/render_text_harfbuzz.cc
@@ -1316,8 +1316,11 @@ void RenderTextHarfBuzz::DrawVisualText(internal::SkiaTextRenderer* renderer) {
? (SkFloatToScalar(segment.width()) + preceding_segment_widths +
SkIntToScalar(origin.x()))
: positions[colored_glyphs.end() - glyphs_range.start()].x());
- renderer->DrawDecorations(start_x, origin.y(), end_x - start_x,
- run.underline, run.strike);
+ if (run.underline)
+ renderer->DrawUnderline(start_x, origin.y(), end_x - start_x);
+ if (run.strike)
+ renderer->DrawStrike(start_x, origin.y(), end_x - start_x,
+ strike_thickness_factor());
}
preceding_segment_widths += SkFloatToScalar(segment.width());
}
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698