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

Issue 968923004: Use GetDisplayText() instead of text() for rendering text. (Closed)

Created:
5 years, 9 months ago by Jun Mukai
Modified:
5 years, 9 months ago
Reviewers:
msw, oshima, tapted
CC:
chromium-reviews, ckocagil, oshima, tapted
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use GetDisplayText() instead of text() for rendering text. BUG=None R=msw@chromium.org Committed: https://crrev.com/fea1a11f41748a6d2281b1017d70f618bf7b1354 Cr-Commit-Position: refs/heads/master@{#319742}

Patch Set 1 #

Patch Set 2 : add mac test #

Patch Set 3 : mac typo fix #

Total comments: 6

Patch Set 4 : static cast in mac test #

Patch Set 5 : comments addressed #

Total comments: 1

Patch Set 6 : reset text_elided_ #

Patch Set 7 : another fix #

Total comments: 8

Patch Set 8 : moar mac fixes #

Patch Set 9 : fix typo #

Patch Set 10 : possibly fix #

Patch Set 11 : fix #

Patch Set 12 : fix #

Patch Set 13 : fix #

Total comments: 9

Patch Set 14 : fix #

Total comments: 4

Patch Set 15 : fix && address oshima's comment #

Patch Set 16 : fix #

Total comments: 10

Patch Set 17 : comments addressed #

Patch Set 18 : fix #

Total comments: 1

Patch Set 19 : fix #

Patch Set 20 : rebase #

Patch Set 21 : rebase2 #

Patch Set 22 : fix failed tests #

Total comments: 2

Patch Set 23 : fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -74 lines) Patch
M ui/gfx/render_text.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 20 1 chunk +6 lines, -0 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 20 2 chunks +11 lines, -0 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 20 1 chunk +0 lines, -6 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 20 1 chunk +0 lines, -11 lines 0 comments Download
M ui/gfx/render_text_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +24 lines, -2 lines 0 comments Download
M ui/gfx/render_text_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 8 chunks +78 lines, -55 lines 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 20 2 chunks +28 lines, -0 lines 0 comments Download

Messages

Total messages: 64 (23 generated)
Jun Mukai
5 years, 9 months ago (2015-03-02 20:57:43 UTC) #1
oshima
Can you add/modify unit test to catch this?
5 years, 9 months ago (2015-03-02 21:03:44 UTC) #3
tapted
https://codereview.chromium.org/968923004/diff/40001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/40001/ui/gfx/render_text_mac.cc#newcode151 ui/gfx/render_text_mac.cc:151: base::SysUTF16ToCFStringRef(GetDisplayText())); This is one of the things I tried... ...
5 years, 9 months ago (2015-03-02 22:36:38 UTC) #4
msw
lgtm with nits https://codereview.chromium.org/968923004/diff/40001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/968923004/diff/40001/ui/gfx/render_text_unittest.cc#newcode2620 ui/gfx/render_text_unittest.cc:2620: base::string16 text(ASCIIToUTF16("This is example.")); nit: "This ...
5 years, 9 months ago (2015-03-02 22:50:55 UTC) #5
Jun Mukai
https://codereview.chromium.org/968923004/diff/40001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/40001/ui/gfx/render_text_mac.cc#newcode151 ui/gfx/render_text_mac.cc:151: base::SysUTF16ToCFStringRef(GetDisplayText())); On 2015/03/02 22:36:38, tapted wrote: > This is ...
5 years, 9 months ago (2015-03-02 23:10:37 UTC) #6
tapted
https://codereview.chromium.org/968923004/diff/80001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/968923004/diff/80001/ui/gfx/render_text_unittest.cc#newcode2628 ui/gfx/render_text_unittest.cc:2628: gfx::Size string_size = render_text.GetStringSize(); It looks like this always ...
5 years, 9 months ago (2015-03-02 23:36:11 UTC) #8
Jun Mukai
ptal the test crash happens due to out-of-range index for elided text. The latest patchset ...
5 years, 9 months ago (2015-03-03 05:23:17 UTC) #9
tapted
Unfortunately http://crbug.com/462492 still manifests :( I've done some more tracing - see below. Sadly, I ...
5 years, 9 months ago (2015-03-03 08:11:21 UTC) #10
Jun Mukai
https://codereview.chromium.org/968923004/diff/120001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/120001/ui/gfx/render_text_mac.cc#newcode116 ui/gfx/render_text_mac.cc:116: UpdateDisplayText(GetContentWidth()); On 2015/03/03 08:11:21, tapted wrote: > Gosh this ...
5 years, 9 months ago (2015-03-03 08:34:00 UTC) #11
tapted
https://codereview.chromium.org/968923004/diff/120001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/120001/ui/gfx/render_text_mac.cc#newcode116 ui/gfx/render_text_mac.cc:116: UpdateDisplayText(GetContentWidth()); On 2015/03/03 08:34:00, Jun Mukai wrote: > On ...
5 years, 9 months ago (2015-03-03 09:30:32 UTC) #12
Jun Mukai
https://codereview.chromium.org/968923004/diff/120001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/120001/ui/gfx/render_text_mac.cc#newcode116 ui/gfx/render_text_mac.cc:116: UpdateDisplayText(GetContentWidth()); On 2015/03/03 09:30:32, tapted wrote: > On 2015/03/03 ...
5 years, 9 months ago (2015-03-04 08:33:23 UTC) #13
oshima
https://codereview.chromium.org/968923004/diff/120001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/120001/ui/gfx/render_text_mac.cc#newcode116 ui/gfx/render_text_mac.cc:116: UpdateDisplayText(GetContentWidth()); On 2015/03/04 08:33:23, Jun Mukai wrote: > On ...
5 years, 9 months ago (2015-03-04 10:17:21 UTC) #14
oshima
5 years, 9 months ago (2015-03-04 10:17:23 UTC) #15
Jun Mukai
Fixed the buggy behaviors, and now I think it's back to the reviewable state. PTAL. ...
5 years, 9 months ago (2015-03-05 00:33:52 UTC) #16
tapted
nice! lgtm but wait for oshima/msw to have a look too There were some merge-conflicts, ...
5 years, 9 months ago (2015-03-05 06:32:49 UTC) #17
Jun Mukai
https://codereview.chromium.org/968923004/diff/240001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/240001/ui/gfx/render_text_mac.cc#newcode97 ui/gfx/render_text_mac.cc:97: return std::min(index, GetDisplayText().size()); On 2015/03/05 06:32:49, tapted wrote: > ...
5 years, 9 months ago (2015-03-05 18:01:38 UTC) #18
oshima
https://codereview.chromium.org/968923004/diff/260001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/260001/ui/gfx/render_text_mac.cc#newcode36 ui/gfx/render_text_mac.cc:36: EnsureStringSize(); I believe this should return the size of ...
5 years, 9 months ago (2015-03-05 18:14:21 UTC) #19
Jun Mukai
https://codereview.chromium.org/968923004/diff/240001/ui/gfx/render_text_mac.h File ui/gfx/render_text_mac.h (right): https://codereview.chromium.org/968923004/diff/240001/ui/gfx/render_text_mac.h#newcode87 ui/gfx/render_text_mac.h:87: void ApplyStyles(CFMutableAttributedStringRef attr_string, On 2015/03/05 18:01:38, Jun Mukai wrote: ...
5 years, 9 months ago (2015-03-05 18:41:38 UTC) #20
oshima
https://codereview.chromium.org/968923004/diff/300001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/300001/ui/gfx/render_text_mac.cc#newcode37 ui/gfx/render_text_mac.cc:37: return Size(std::ceil(size_f.width()), size_f.height()); nit: gfx::ToCeiledSize ? https://codereview.chromium.org/968923004/diff/300001/ui/gfx/render_text_mac.cc#newcode116 ui/gfx/render_text_mac.cc:116: UpdateDisplayText(std::ceil(GetLayoutTextSize().width())); ...
5 years, 9 months ago (2015-03-05 21:27:59 UTC) #21
msw
lgtm https://codereview.chromium.org/968923004/diff/300001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/300001/ui/gfx/render_text_mac.cc#newcode116 ui/gfx/render_text_mac.cc:116: UpdateDisplayText(std::ceil(GetLayoutTextSize().width())); On 2015/03/05 21:27:58, oshima wrote: > It's ...
5 years, 9 months ago (2015-03-05 21:55:29 UTC) #22
oshima
https://codereview.chromium.org/968923004/diff/300001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/300001/ui/gfx/render_text_mac.cc#newcode116 ui/gfx/render_text_mac.cc:116: UpdateDisplayText(std::ceil(GetLayoutTextSize().width())); On 2015/03/05 21:55:29, msw wrote: > On 2015/03/05 ...
5 years, 9 months ago (2015-03-05 23:09:11 UTC) #23
Jun Mukai
https://codereview.chromium.org/968923004/diff/300001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/300001/ui/gfx/render_text_mac.cc#newcode37 ui/gfx/render_text_mac.cc:37: return Size(std::ceil(size_f.width()), size_f.height()); On 2015/03/05 21:27:58, oshima wrote: > ...
5 years, 9 months ago (2015-03-06 01:32:38 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/968923004/320001
5 years, 9 months ago (2015-03-06 01:34:18 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/30796)
5 years, 9 months ago (2015-03-06 03:20:09 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/968923004/340001
5 years, 9 months ago (2015-03-06 06:43:09 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/30866)
5 years, 9 months ago (2015-03-06 08:11:42 UTC) #34
tapted
https://codereview.chromium.org/968923004/diff/340001/ui/gfx/render_text_mac.h File ui/gfx/render_text_mac.h (right): https://codereview.chromium.org/968923004/diff/340001/ui/gfx/render_text_mac.h#newcode23 ui/gfx/render_text_mac.h:23: class RenderTextMac : public RenderText { I think you're ...
5 years, 9 months ago (2015-03-06 11:16:18 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/968923004/360001
5 years, 9 months ago (2015-03-06 16:49:24 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/41974)
5 years, 9 months ago (2015-03-06 21:41:29 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/968923004/380001
5 years, 9 months ago (2015-03-06 22:57:52 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_TIMED_OUT, no build URL) mac_chromium_rel_ng on ...
5 years, 9 months ago (2015-03-07 00:59:38 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/968923004/380001
5 years, 9 months ago (2015-03-07 01:12:36 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_TIMED_OUT, no build URL) Timed out ...
5 years, 9 months ago (2015-03-07 03:13:51 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/968923004/400001
5 years, 9 months ago (2015-03-07 08:21:21 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_TIMED_OUT, no build URL) mac_chromium_rel_ng on ...
5 years, 9 months ago (2015-03-07 10:21:50 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/968923004/420001
5 years, 9 months ago (2015-03-09 17:13:47 UTC) #57
msw
https://codereview.chromium.org/968923004/diff/420001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/420001/ui/gfx/render_text_mac.cc#newcode37 ui/gfx/render_text_mac.cc:37: return Size(std::ceil(size_f.width(), size_f.height())); I think your parenthesis here are ...
5 years, 9 months ago (2015-03-09 17:22:10 UTC) #58
Jun Mukai
https://codereview.chromium.org/968923004/diff/420001/ui/gfx/render_text_mac.cc File ui/gfx/render_text_mac.cc (right): https://codereview.chromium.org/968923004/diff/420001/ui/gfx/render_text_mac.cc#newcode37 ui/gfx/render_text_mac.cc:37: return Size(std::ceil(size_f.width(), size_f.height())); On 2015/03/09 17:22:10, msw wrote: > ...
5 years, 9 months ago (2015-03-09 17:55:47 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/968923004/440001
5 years, 9 months ago (2015-03-09 17:57:17 UTC) #62
commit-bot: I haz the power
Committed patchset #23 (id:440001)
5 years, 9 months ago (2015-03-09 22:07:04 UTC) #63
commit-bot: I haz the power
5 years, 9 months ago (2015-03-09 22:07:44 UTC) #64
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/fea1a11f41748a6d2281b1017d70f618bf7b1354
Cr-Commit-Position: refs/heads/master@{#319742}

Powered by Google App Engine
This is Rietveld 408576698