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

Issue 1070223004: Stop combining text runs which are connected by 'COMMON' blocks. (Closed)

Created:
5 years, 8 months ago by xdai1
Modified:
5 years, 6 months ago
Reviewers:
msw, Jun Mukai, ckocagil
CC:
chromium-reviews, derat+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Split script runs at 'COMMON' blocks except for "white space" character. RTHB merges text runs if they're connected by 'COMMON' blocks (like symbols and numbers), which might cause the "tofu" issue. Also Rewrite the line breaker algorithm based on words iteration approach. However, the root reason for this issue is that partial (sub text-runs) font fallback algorithm, which will be overhauled in crbug.com/396415. BUG=473946, 448909 TEST=Manually check the website http://th.wikipedia.org/wiki/เยอรมันวิงส์_เที่ยวบินที่_9525 on device Pixel and Peach Pit. Committed: https://crrev.com/149bee40c5cc0bd72cee9a5550b0d178a449e03e Cr-Commit-Position: refs/heads/master@{#333845}

Patch Set 1 #

Patch Set 2 : Make sure multiline breaker behavior is correct. #

Total comments: 6

Patch Set 3 : Address msw's comments. Also fixed TRUNCATE_LONG_WORDS behavior. #

Patch Set 4 : Rebase #

Total comments: 6

Patch Set 5 : Delete the useless function. #

Patch Set 6 : Address Mukai's comments. #

Total comments: 9

Patch Set 7 : Fix broken tests. Address Mukai's comments. #

Total comments: 12

Patch Set 8 : Address the comments. #

Total comments: 1

Patch Set 9 : Don't break run at white space. #

Patch Set 10 : Rebase. #

Total comments: 10

Patch Set 11 : Address Mukai's comments. #

Total comments: 3

Patch Set 12 : A new implementation of HarfBuzzLineBreaker. #

Patch Set 13 : small glitches #

Total comments: 45

Patch Set 14 : Address mukai@'s comments. #

Total comments: 8

Patch Set 15 : Address Mukai's comments. #

Total comments: 62

Patch Set 16 : Address msw@'s comments. #

Total comments: 10

Patch Set 17 : Address msw@'s comments. #

Total comments: 16

Patch Set 18 : Address msw@'s comments. Rebase #

Patch Set 19 : Try to figure out the zero width space behavior on different OS... #

Patch Set 20 : fix broken unittest? #

Patch Set 21 : Fix broken unittest. #

Total comments: 11

Patch Set 22 : Address msw@'s comments. #

Patch Set 23 : Address msw@'s comments. #

Total comments: 1

Patch Set 24 : address msw@'s comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+519 lines, -286 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 17 1 chunk +4 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 17 3 chunks +11 lines, -0 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 17 18 19 20 21 22 23 17 chunks +264 lines, -207 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 18 19 20 21 22 6 chunks +163 lines, -16 lines 0 comments Download
M ui/gfx/text_elider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -4 lines 0 comments Download
M ui/gfx/text_elider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +7 lines, -59 lines 0 comments Download
M ui/gfx/text_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +10 lines, -0 lines 0 comments Download
M ui/gfx/text_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +60 lines, -0 lines 0 comments Download

Messages

Total messages: 68 (17 generated)
xdai1
Could you help to review the CL please, thanks!
5 years, 8 months ago (2015-04-16 22:47:17 UTC) #2
msw
lgtm, but please wait for Jun and hopefully Cem to review.
5 years, 8 months ago (2015-04-16 22:58:02 UTC) #4
Jun Mukai
On 2015/04/16 22:58:02, msw wrote: > lgtm, but please wait for Jun and hopefully Cem ...
5 years, 8 months ago (2015-04-16 23:02:25 UTC) #5
xdai1
On 2015/04/16 23:02:25, Jun Mukai wrote: > On 2015/04/16 22:58:02, msw wrote: > > lgtm, ...
5 years, 8 months ago (2015-04-16 23:09:33 UTC) #6
ckocagil
My biggest concern with this CL is performance. Splitting script runs at COMMON characters might ...
5 years, 8 months ago (2015-04-17 00:17:02 UTC) #7
msw
On 2015/04/17 00:17:02, ckocagil wrote: > My biggest concern with this CL is performance. Splitting ...
5 years, 8 months ago (2015-04-17 01:53:54 UTC) #8
xdai1
On 2015/04/17 01:53:54, msw wrote: > On 2015/04/17 00:17:02, ckocagil wrote: > > My biggest ...
5 years, 8 months ago (2015-04-17 17:25:13 UTC) #9
ckocagil
On 2015/04/17 17:25:13, xdai1 wrote: > On 2015/04/17 01:53:54, msw wrote: > > On 2015/04/17 ...
5 years, 8 months ago (2015-04-17 19:05:55 UTC) #10
Jun Mukai
On 2015/04/17 19:05:55, ckocagil wrote: > On 2015/04/17 17:25:13, xdai1 wrote: > > On 2015/04/17 ...
5 years, 8 months ago (2015-04-17 19:37:10 UTC) #11
Jun Mukai
On 2015/04/17 19:37:10, Jun Mukai wrote: > On 2015/04/17 19:05:55, ckocagil wrote: > > On ...
5 years, 8 months ago (2015-04-17 19:39:48 UTC) #12
xdai1
mukai@, ckocagil@, could you help to take another look at this CL? Thanks!
5 years, 8 months ago (2015-04-22 23:19:54 UTC) #13
msw
Is the line breaking change necessary to bundle with the run breaking change? https://codereview.chromium.org/1070223004/diff/20001/ui/gfx/render_text_harfbuzz.cc File ...
5 years, 8 months ago (2015-04-23 00:00:38 UTC) #14
Jun Mukai
On 2015/04/23 00:00:38, msw wrote: > Is the line breaking change necessary to bundle with ...
5 years, 8 months ago (2015-04-23 00:26:13 UTC) #15
xdai1
On 2015/04/23 00:26:13, Jun Mukai wrote: > On 2015/04/23 00:00:38, msw wrote: > > Is ...
5 years, 8 months ago (2015-04-23 00:32:35 UTC) #16
xdai1
Could you help to take another look at this CL? thanks! https://codereview.chromium.org/1070223004/diff/20001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): ...
5 years, 8 months ago (2015-04-23 22:59:42 UTC) #17
xdai1
kindly ping?
5 years, 8 months ago (2015-04-25 00:58:19 UTC) #18
Jun Mukai
https://codereview.chromium.org/1070223004/diff/60001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1070223004/diff/60001/ui/gfx/render_text_harfbuzz.cc#newcode168 ui/gfx/render_text_harfbuzz.cc:168: if (u_isUWhiteSpace(char_iterator.get())) { I am not so sure about ...
5 years, 8 months ago (2015-04-28 01:57:37 UTC) #19
xdai1
Mukai, could you please take another look at the CL? Thanks! https://codereview.chromium.org/1070223004/diff/60001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): ...
5 years, 7 months ago (2015-04-29 18:23:27 UTC) #22
Jun Mukai
Please also have a look at the failure of views_unittests in the trybots. It indicates ...
5 years, 7 months ago (2015-04-29 21:09:08 UTC) #23
xdai1
Mukai, please take another look, thanks for your review! https://codereview.chromium.org/1070223004/diff/140001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (left): https://codereview.chromium.org/1070223004/diff/140001/ui/gfx/render_text_harfbuzz.cc#oldcode331 ui/gfx/render_text_harfbuzz.cc:331: ...
5 years, 7 months ago (2015-05-05 18:27:49 UTC) #26
Jun Mukai
https://codereview.chromium.org/1070223004/diff/140001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (left): https://codereview.chromium.org/1070223004/diff/140001/ui/gfx/render_text_harfbuzz.cc#oldcode331 ui/gfx/render_text_harfbuzz.cc:331: if (*width > available_width) { On 2015/05/05 18:27:49, xdai1 ...
5 years, 7 months ago (2015-05-06 17:38:53 UTC) #27
xdai1
Mukai, please take another look, thanks! https://codereview.chromium.org/1070223004/diff/140001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (left): https://codereview.chromium.org/1070223004/diff/140001/ui/gfx/render_text_harfbuzz.cc#oldcode331 ui/gfx/render_text_harfbuzz.cc:331: if (*width > ...
5 years, 7 months ago (2015-05-06 20:23:44 UTC) #29
Jun Mukai
I see why I was confused. Please do NOT split runs at whitespaces, as ckocagil ...
5 years, 7 months ago (2015-05-06 20:47:56 UTC) #30
xdai1
Mukai, please help to take another look at the CL, thanks!
5 years, 7 months ago (2015-05-09 06:21:32 UTC) #32
Jun Mukai
https://codereview.chromium.org/1070223004/diff/290001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (left): https://codereview.chromium.org/1070223004/diff/290001/ui/gfx/render_text_harfbuzz.cc#oldcode331 ui/gfx/render_text_harfbuzz.cc:331: if (*width > available_width) { And then, you will ...
5 years, 7 months ago (2015-05-11 05:14:38 UTC) #33
xdai1
Mukai, thanks for the review, please take another look! https://codereview.chromium.org/1070223004/diff/290001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (left): https://codereview.chromium.org/1070223004/diff/290001/ui/gfx/render_text_harfbuzz.cc#oldcode331 ui/gfx/render_text_harfbuzz.cc:331: ...
5 years, 7 months ago (2015-05-11 21:55:23 UTC) #36
Jun Mukai
I still feel like very similar logic spreads around the code. Possibly the problem is ...
5 years, 7 months ago (2015-05-11 23:21:40 UTC) #37
xdai1
Mukai, could you help to take another look at this CL please? This is the ...
5 years, 7 months ago (2015-05-15 00:03:15 UTC) #38
Jun Mukai
mostly nits https://codereview.chromium.org/1070223004/diff/390001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1070223004/diff/390001/ui/gfx/render_text_harfbuzz.cc#newcode246 ui/gfx/render_text_harfbuzz.cc:246: std::vector<internal::Line> GetLines() const { return lines_; } ...
5 years, 7 months ago (2015-05-15 20:16:01 UTC) #39
xdai1
Thanks for the review! please take another look at the CL. https://codereview.chromium.org/1070223004/diff/390001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): ...
5 years, 7 months ago (2015-05-15 23:41:18 UTC) #40
Jun Mukai
almost there! https://codereview.chromium.org/1070223004/diff/390001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1070223004/diff/390001/ui/gfx/render_text_harfbuzz.cc#newcode338 ui/gfx/render_text_harfbuzz.cc:338: void AddWordToLine(std::vector<internal::LineSegment>& segments) { On 2015/05/15 23:41:18, ...
5 years, 7 months ago (2015-05-16 00:21:57 UTC) #41
xdai1
Mukai, please take another look at the CL, thanks for the review! https://codereview.chromium.org/1070223004/diff/390001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc ...
5 years, 7 months ago (2015-05-18 17:41:26 UTC) #45
Jun Mukai
lgtm! But please get yet another review from msw.
5 years, 7 months ago (2015-05-19 11:07:32 UTC) #46
xdai1
Thanks Mukai! msw@, could you help to take another look at this CL? Thanks.
5 years, 7 months ago (2015-05-19 16:14:08 UTC) #47
xdai1
On 2015/05/19 16:14:08, xdai1 wrote: > Thanks Mukai! msw@, could you help to take another ...
5 years, 7 months ago (2015-05-26 16:07:22 UTC) #48
msw
I'm really sorry for my delay here. I haven't finished looking over the main HarfBuzzLineBreaker ...
5 years, 7 months ago (2015-05-27 17:38:00 UTC) #49
msw
Some more comments, I'll wait for your response after this. https://codereview.chromium.org/1070223004/diff/490001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1070223004/diff/490001/ui/gfx/render_text_harfbuzz.cc#newcode264 ...
5 years, 6 months ago (2015-05-28 18:16:16 UTC) #50
xdai1
msw@, thanks for the review! I've addressed your comments, please take another look at the ...
5 years, 6 months ago (2015-06-01 16:51:16 UTC) #51
msw
Thanks for the clarifications and fixes. https://codereview.chromium.org/1070223004/diff/490001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1070223004/diff/490001/ui/gfx/render_text_harfbuzz.cc#newcode335 ui/gfx/render_text_harfbuzz.cc:335: if (word_segments.empty()) On ...
5 years, 6 months ago (2015-06-01 23:27:18 UTC) #52
xdai1
msw@, please help to take another look at the CL, thanks for the review! https://codereview.chromium.org/1070223004/diff/490001/ui/gfx/render_text_harfbuzz.cc ...
5 years, 6 months ago (2015-06-02 03:49:57 UTC) #53
msw
https://codereview.chromium.org/1070223004/diff/530001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1070223004/diff/530001/ui/gfx/render_text_harfbuzz.cc#newcode445 ui/gfx/render_text_harfbuzz.cc:445: // Don't separate surrogate pair or combined characters. Can ...
5 years, 6 months ago (2015-06-03 00:32:04 UTC) #54
xdai1
msw@, I've addressed your comments. Please take another look, thanks for your review. https://codereview.chromium.org/1070223004/diff/530001/ui/gfx/render_text_harfbuzz.cc File ...
5 years, 6 months ago (2015-06-06 00:05:19 UTC) #56
msw
https://codereview.chromium.org/1070223004/diff/650001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1070223004/diff/650001/ui/gfx/render_text_harfbuzz.cc#newcode447 ui/gfx/render_text_harfbuzz.cc:447: // not separate surrogate pair or combining characters. You ...
5 years, 6 months ago (2015-06-09 01:15:51 UTC) #58
xdai1
msw@, I've addressed your comments. Please take another look, thanks! https://codereview.chromium.org/1070223004/diff/650001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1070223004/diff/650001/ui/gfx/render_text_harfbuzz.cc#newcode447 ...
5 years, 6 months ago (2015-06-09 17:59:21 UTC) #59
msw
https://codereview.chromium.org/1070223004/diff/650001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1070223004/diff/650001/ui/gfx/render_text_harfbuzz.cc#newcode447 ui/gfx/render_text_harfbuzz.cc:447: // not separate surrogate pair or combining characters. On ...
5 years, 6 months ago (2015-06-09 22:51:53 UTC) #60
xdai1
msw@, please take another look, thanks! https://codereview.chromium.org/1070223004/diff/650001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1070223004/diff/650001/ui/gfx/render_text_harfbuzz.cc#newcode447 ui/gfx/render_text_harfbuzz.cc:447: // not separate ...
5 years, 6 months ago (2015-06-10 02:24:03 UTC) #61
msw
lgtm with a nit https://codereview.chromium.org/1070223004/diff/690001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1070223004/diff/690001/ui/gfx/render_text_harfbuzz.cc#newcode446 ui/gfx/render_text_harfbuzz.cc:446: width = run.GetGlyphWidthForCharRange( nit: If ...
5 years, 6 months ago (2015-06-10 18:56:48 UTC) #62
xdai1
On 2015/06/10 18:56:48, msw wrote: > lgtm with a nit > > https://codereview.chromium.org/1070223004/diff/690001/ui/gfx/render_text_harfbuzz.cc > File ...
5 years, 6 months ago (2015-06-10 20:25:16 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1070223004/710001
5 years, 6 months ago (2015-06-10 22:56:06 UTC) #66
commit-bot: I haz the power
Committed patchset #24 (id:710001)
5 years, 6 months ago (2015-06-10 23:36:27 UTC) #67
commit-bot: I haz the power
5 years, 6 months ago (2015-06-10 23:38:26 UTC) #68
Message was sent while issue was closed.
Patchset 24 (id:??) landed as
https://crrev.com/149bee40c5cc0bd72cee9a5550b0d178a449e03e
Cr-Commit-Position: refs/heads/master@{#333845}

Powered by Google App Engine
This is Rietveld 408576698