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

Issue 1036663003: Break runs by clusters rather than iteration over code points (Closed)

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

Description

Break runs by clusters rather than iteration over code points In some languages, the current logic (iteration over code points and then get the glyphs by CharRangeToGlyphRange) makes wrong effect, because both a character and its diacritic marks can point to the same glyph range and it misunderstands the width of the word for wrapping. This CL changes the iteration logic for clusters so that it skips the code points for the diacritic marks. BUG=470073 R=msw@chromium.org, ckocagil@chromium.org TEST=the new test case covers Committed: https://crrev.com/043e7d282111711173853dcf36b258553352488b Cr-Commit-Position: refs/heads/master@{#322316}

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : GetClusterAt() #

Total comments: 9

Patch Set 4 : comments addressed #

Patch Set 5 : win/mac test fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -4 lines) Patch
M ui/gfx/render_text_harfbuzz.cc View 1 2 3 4 chunks +7 lines, -4 lines 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (4 generated)
Jun Mukai
5 years, 9 months ago (2015-03-24 22:22:28 UTC) #1
msw
Can you add a test for the fixed behavior? https://codereview.chromium.org/1036663003/diff/1/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1036663003/diff/1/ui/gfx/render_text_harfbuzz.cc#newcode331 ui/gfx/render_text_harfbuzz.cc:331: ...
5 years, 9 months ago (2015-03-24 22:52:46 UTC) #2
Jun Mukai
Added the test case. PTAL. https://codereview.chromium.org/1036663003/diff/1/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1036663003/diff/1/ui/gfx/render_text_harfbuzz.cc#newcode331 ui/gfx/render_text_harfbuzz.cc:331: // Sometimes multiple code ...
5 years, 9 months ago (2015-03-25 00:23:15 UTC) #3
msw
That's a much cleaner and clearer fix, just nits left. https://codereview.chromium.org/1036663003/diff/40001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1036663003/diff/40001/ui/gfx/render_text_harfbuzz.cc#newcode8 ...
5 years, 9 months ago (2015-03-25 20:25:17 UTC) #4
Jun Mukai
https://codereview.chromium.org/1036663003/diff/40001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1036663003/diff/40001/ui/gfx/render_text_harfbuzz.cc#newcode8 ui/gfx/render_text_harfbuzz.cc:8: #include <set> On 2015/03/25 20:25:16, msw wrote: > nit: ...
5 years, 9 months ago (2015-03-25 21:50:05 UTC) #5
msw
lgtm https://codereview.chromium.org/1036663003/diff/40001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/1036663003/diff/40001/ui/gfx/render_text_unittest.cc#newcode2590 ui/gfx/render_text_unittest.cc:2590: render_text.SetDisplayRect(gfx::Rect(0, 0, text_size.width(), 0)); On 2015/03/25 21:50:05, Jun ...
5 years, 9 months ago (2015-03-25 22:51:44 UTC) #6
Jun Mukai
updated the CL description, it described the old approach.
5 years, 9 months ago (2015-03-25 23:03:33 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1036663003/60001
5 years, 9 months ago (2015-03-25 23:04:35 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/40409)
5 years, 9 months ago (2015-03-26 01:46:57 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1036663003/80001
5 years, 9 months ago (2015-03-26 02:59:28 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 9 months ago (2015-03-26 04:27:10 UTC) #15
commit-bot: I haz the power
5 years, 9 months ago (2015-03-26 04:28:14 UTC) #16
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/043e7d282111711173853dcf36b258553352488b
Cr-Commit-Position: refs/heads/master@{#322316}

Powered by Google App Engine
This is Rietveld 408576698