|
|
Chromium Code Reviews|
Created:
3 years, 6 months ago by tapted Modified:
3 years, 6 months ago Reviewers:
Alexei Svitkine (slow) CC:
chromium-reviews, derat+watch_chromium.org, chrome-apps-syd-reviews_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionRenderText: 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 #Messages
Total messages: 36 (30 generated)
The CQ bit was checked by tapted@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by tapted@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by tapted@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== RenderText: always break runs at whitespace BUG=731563 ========== to ========== 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 ==========
tapted@chromium.org changed reviewers: + asvitkine@chromium.org
Description was changed from ========== 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 ========== to ========== 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 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by tapted@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by tapted@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by tapted@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...)
https://codereview.chromium.org/2942843002/diff/100001/ui/gfx/render_text_uni... File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/2942843002/diff/100001/ui/gfx/render_text_uni... ui/gfx/render_text_unittest.cc:3727: EXPECT_EQ(ToString16Vec({"x", " ", "▶", " ", "y"}), GetRuns()); this test actually captures the old inconsistency. This line would have been written EXPECT_EQ(ToString16Vec({"x ", "▶", " ", "y"}), GetRuns()); i.e. 4 breaks, with whitespace attached to the 'x' but not attached to the 'y'.
Hi Alexei, WDYT? E.g. is there a downside to always breaking on whitespace that I've missed?. I think that's what happens in Blink.
lgtm https://codereview.chromium.org/2942843002/diff/100001/ui/gfx/render_text_uni... File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/2942843002/diff/100001/ui/gfx/render_text_uni... ui/gfx/render_text_unittest.cc:308: std::vector<base::string16> ToString16Vec( Nit: Add 1-line comments for the new helper methods you're adding.
The CQ bit was checked by tapted@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2942843002/diff/100001/ui/gfx/render_text_uni... File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/2942843002/diff/100001/ui/gfx/render_text_uni... ui/gfx/render_text_unittest.cc:308: std::vector<base::string16> ToString16Vec( On 2017/06/16 14:45:33, Alexei Svitkine (slow) wrote: > Nit: Add 1-line comments for the new helper methods you're adding. Done.
The CQ bit was unchecked by tapted@chromium.org
The CQ bit was checked by tapted@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from asvitkine@chromium.org Link to the patchset: https://codereview.chromium.org/2942843002/#ps120001 (title: "Helper method comments")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 120001, "attempt_start_ts": 1497845463210670,
"parent_rev": "df1dced217b98dc93c6744ed4df94c7a456dd803", "commit_rev":
"141af5c41b4e6a777e5c6d53575f124bc838865e"}
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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/+/141af5c41b4e6a777e5c6d53575f... ==========
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/141af5c41b4e6a777e5c6d53575f... |
