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

Issue 10520017: Use pango underline metrics in RenderTextLinux. (Closed)

Created:
8 years, 6 months ago by Alexei Svitkine (slow)
Modified:
8 years, 6 months ago
Reviewers:
msw, reed1
CC:
chromium-reviews
Visibility:
Public.

Description

Use pango underline metrics in RenderTextLinux. Also, changes type of SkiaTextRenderer::SetTextSize() to SkScalar to match the underlying Skia type, which is needed for future RenderTextMac implementation. BUG=126506, 125664, 105550 TEST=Eyeball underlined text in views_examples' text style example. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=141772

Patch Set 1 : #

Total comments: 6

Patch Set 2 : #

Total comments: 10

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -6 lines) Patch
M ui/gfx/render_text.h View 1 2 3 4 5 2 chunks +7 lines, -1 line 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 4 chunks +21 lines, -5 lines 0 comments Download
M ui/gfx/render_text_linux.cc View 1 2 3 4 3 chunks +19 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Alexei Svitkine (slow)
8 years, 6 months ago (2012-06-05 21:52:28 UTC) #1
msw
http://codereview.chromium.org/10520017/diff/12001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/10520017/diff/12001/ui/gfx/render_text.cc#newcode183 ui/gfx/render_text.cc:183: const SkScalar kUnderlineMetricsNotSet = -1.0f; nit: technically this applies ...
8 years, 6 months ago (2012-06-06 01:12:51 UTC) #2
Alexei Svitkine (slow)
I've addressed your comments and also fixes a few other problems with the previous patch, ...
8 years, 6 months ago (2012-06-06 14:46:27 UTC) #3
msw
Thanks for be so thorough and checking/fixing these issues before landing! http://codereview.chromium.org/10520017/diff/8004/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): ...
8 years, 6 months ago (2012-06-06 18:35:25 UTC) #4
Alexei Svitkine (slow)
http://codereview.chromium.org/10520017/diff/8004/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/10520017/diff/8004/ui/gfx/render_text.cc#newcode183 ui/gfx/render_text.cc:183: const SkScalar kUnderlineMetricNotSet = SK_ScalarNaN; On 2012/06/06 18:35:25, msw ...
8 years, 6 months ago (2012-06-06 18:46:23 UTC) #5
msw
Seems like we ought to use pango_units_to_double anyway, but LGTM either way. http://codereview.chromium.org/10520017/diff/8004/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc ...
8 years, 6 months ago (2012-06-06 18:51:52 UTC) #6
Alexei Svitkine (slow)
http://codereview.chromium.org/10520017/diff/8004/ui/gfx/render_text_linux.cc File ui/gfx/render_text_linux.cc (right): http://codereview.chromium.org/10520017/diff/8004/ui/gfx/render_text_linux.cc#newcode82 ui/gfx/render_text_linux.cc:82: renderer->SetUnderlineMetrics(PANGO_PIXELS(thickness), On 2012/06/06 18:51:52, msw wrote: > On 2012/06/06 ...
8 years, 6 months ago (2012-06-06 19:03:05 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asvitkine@chromium.org/10520017/14005
8 years, 6 months ago (2012-06-06 19:03:20 UTC) #8
commit-bot: I haz the power
Try job failure for 10520017-14005 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 6 months ago (2012-06-06 19:23:24 UTC) #9
Alexei Svitkine (slow)
Hmm, looks like there's a problem compiling code that uses SK_ScalarNaN on Windows...
8 years, 6 months ago (2012-06-06 19:29:13 UTC) #10
reed1
x == NaN; ... if (x == NaN) ... This check will always be false ...
8 years, 6 months ago (2012-06-12 19:26:58 UTC) #11
Alexei Svitkine (slow)
Updated per Mike Reed's suggestion. The CL now looks similar to my original version.
8 years, 6 months ago (2012-06-12 19:52:58 UTC) #12
msw
http://codereview.chromium.org/10520017/diff/18005/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/10520017/diff/18005/ui/gfx/render_text.cc#newcode190 ui/gfx/render_text.cc:190: underline_position_(0.0f) { You should also init this to kUnderlineMetricsNotSet. ...
8 years, 6 months ago (2012-06-12 20:44:39 UTC) #13
reed1
lgtm
8 years, 6 months ago (2012-06-12 20:46:39 UTC) #14
Alexei Svitkine (slow)
http://codereview.chromium.org/10520017/diff/18005/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/10520017/diff/18005/ui/gfx/render_text.cc#newcode323 ui/gfx/render_text.cc:323: r.fTop = y + underline_position_; On 2012/06/12 20:44:39, msw ...
8 years, 6 months ago (2012-06-12 20:47:43 UTC) #15
msw
LGTM http://codereview.chromium.org/10520017/diff/18005/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): http://codereview.chromium.org/10520017/diff/18005/ui/gfx/render_text.cc#newcode323 ui/gfx/render_text.cc:323: r.fTop = y + underline_position_; > -1.0 may ...
8 years, 6 months ago (2012-06-12 21:28:11 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asvitkine@chromium.org/10520017/21002
8 years, 6 months ago (2012-06-12 21:31:53 UTC) #17
commit-bot: I haz the power
8 years, 6 months ago (2012-06-12 22:59:42 UTC) #18
Change committed as 141772

Powered by Google App Engine
This is Rietveld 408576698