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

Issue 2942843002: RenderText: always break runs at whitespace (Closed)

Created:
3 years, 6 months ago by tapted
Modified:
3 years, 6 months ago
CC:
chromium-reviews, derat+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

RenderText: always break runs at whitespace RenderTextHarfBuzz is currently inconsistent with where it chooses to break runs around whitespace whenever non-ascii characters are involved. Currently it attaches runs of whitespace _after_ characters to the preceding run (ignoring whether there is a script/ascii/non-ascii mismatch between the run and the kind of whitespace). However, it does not always attach runs of whitespace that occur _before_ runs (even if they are both ascii). Attaching whitespace while ignoring what script that whitespace is from can cause problems. A font is not obligated to provide whitespace glyphs for all scripts. To fix this, always break at whitespace. This is closer to Blink behaviour - shorter runs without whitespace makes better use of the cache of text runs kept in blink's Font class; indexed by string (typically, a dictionary word). BUG=731563 Review-Url: https://codereview.chromium.org/2942843002 Cr-Commit-Position: refs/heads/master@{#480350} Committed: https://chromium.googlesource.com/chromium/src/+/141af5c41b4e6a777e5c6d53575f124bc838865e

Patch Set 1 #

Patch Set 2 : Fix last test #

Patch Set 3 : Test ramen #

Patch Set 4 : Handle annoying compilers #

Patch Set 5 : Specific whitespace test #

Patch Set 6 : Fix 10.9 #

Total comments: 3

Patch Set 7 : Helper method comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -30 lines) Patch
M ui/gfx/render_text_harfbuzz.cc View 1 2 2 chunks +0 lines, -4 lines 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 4 5 6 8 chunks +156 lines, -26 lines 0 comments Download

Messages

Total messages: 36 (30 generated)
tapted
https://codereview.chromium.org/2942843002/diff/100001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/2942843002/diff/100001/ui/gfx/render_text_unittest.cc#newcode3727 ui/gfx/render_text_unittest.cc:3727: EXPECT_EQ(ToString16Vec({"x", " ", "▶", " ", "y"}), GetRuns()); this ...
3 years, 6 months ago (2017-06-16 07:12:36 UTC) #24
tapted
Hi Alexei, WDYT? E.g. is there a downside to always breaking on whitespace that I've ...
3 years, 6 months ago (2017-06-16 07:12:59 UTC) #25
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/2942843002/diff/100001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/2942843002/diff/100001/ui/gfx/render_text_unittest.cc#newcode308 ui/gfx/render_text_unittest.cc:308: std::vector<base::string16> ToString16Vec( Nit: Add 1-line comments for the ...
3 years, 6 months ago (2017-06-16 14:45:33 UTC) #26
tapted
https://codereview.chromium.org/2942843002/diff/100001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/2942843002/diff/100001/ui/gfx/render_text_unittest.cc#newcode308 ui/gfx/render_text_unittest.cc:308: std::vector<base::string16> ToString16Vec( On 2017/06/16 14:45:33, Alexei Svitkine (slow) wrote: ...
3 years, 6 months ago (2017-06-19 04:10:50 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2942843002/120001
3 years, 6 months ago (2017-06-19 04:11:14 UTC) #33
commit-bot: I haz the power
3 years, 6 months ago (2017-06-19 05:07:36 UTC) #36
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/141af5c41b4e6a777e5c6d53575f...

Powered by Google App Engine
This is Rietveld 408576698