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

Issue 1766243003: Improve word-break: break-all and word-wrap: break-word (Closed)

Created:
4 years, 9 months ago by kojii
Modified:
4 years, 8 months ago
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@break-all
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve word-break: break-all and word-wrap: break-word This patch improves: 1. Performance of "word-wrap: break-word" and "word-break: break-all". 2. "word-wrap: break-word" no longer breaks shaping scripts when it should not (crbug.com/380667). This patch does not give a complete support when a shaped word is broken by these properties. More accurate break using the safe-to-break feature in HarfBuzz and rendering support will be in future patches. Before this patch, BreakingContext::handleText() measures all substrings to measure the correct width of joining scripts. For a "word", this means it measures "w", "wo", "wor", and "word". This method does not work when a shaped words can be shorter by adding more characters. With this patch, Blink tries normal line breaking. Then at the break point, Blink rewinds the break point to the largest number of glyphs that can fit. BUG=380667, 591793, 479370 Committed: https://crrev.com/d12b58ef0005d24dff2047f566f5ff5a5f2e45fb Cr-Commit-Position: refs/heads/master@{#385693}

Patch Set 1 #

Patch Set 2 : Making progress #

Patch Set 3 : cleanup #

Patch Set 4 : Fix unexpected break #

Patch Set 5 : More test fixes #

Patch Set 6 : Add TODO #

Patch Set 7 : Switch to offsetForPosition #

Patch Set 8 : Fixes #

Patch Set 9 : Fixes #

Patch Set 10 : Fixes #

Patch Set 11 : Gecko behavior #

Patch Set 12 : WebKit behavior #

Patch Set 13 : Back to Gecko behavior and TestExpectations #

Patch Set 14 : WebKit behavior #

Patch Set 15 : Fix trailing spaces (editing tests) #

Patch Set 16 : Add tests and TestExpectations #

Patch Set 17 : Rebase and re-upload the same CL to see if it passes bots #

Patch Set 18 : contenttype_txt.html #

Patch Set 19 : Fix whitespace-in-pre.html broke by the fix for contenttype_txt.html #

Patch Set 20 : Remove Mac10.9 from TestExpectations for crbug.com/601166 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -40 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/text/break-word-fit-content-arabic.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/text/break-word-fit-content-arabic-expected.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +8 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/text/break-word-pre-wrap.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +23 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/text/break-word-pre-wrap-expected.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 14 chunks +140 lines, -40 lines 0 comments Download

Messages

Total messages: 28 (14 generated)
kojii
I suppose you didn't mean this one, but JFYI. This one isn't ready to land ...
4 years, 9 months ago (2016-03-22 02:24:37 UTC) #3
eae
Yes, this is the one.
4 years, 9 months ago (2016-03-22 16:45:41 UTC) #4
kojii
PTAL. One failure in imported/web-platform-tests/dom does not seem to be related, I'll re-run bots later. ...
4 years, 9 months ago (2016-03-27 14:02:32 UTC) #9
leviw_travelin_and_unemployed
Howdy Kojii! I'm actually having a lot of trouble trying to understand the change you ...
4 years, 8 months ago (2016-03-28 20:31:45 UTC) #10
kojii
On 2016/03/28 at 20:31:45, leviw wrote: > Howdy Kojii! > > I'm actually having a ...
4 years, 8 months ago (2016-04-05 07:57:37 UTC) #11
kojii
On 2016/04/05 at 07:57:37, kojii wrote: > > I'll look into this further, but can ...
4 years, 8 months ago (2016-04-05 17:19:13 UTC) #12
kojii
PTAL. PS16 preserves the current behavior. Maybe 2+ space case is a bug and the ...
4 years, 8 months ago (2016-04-05 19:20:51 UTC) #14
eae
LGTM, thanks kojii!
4 years, 8 months ago (2016-04-05 20:47:20 UTC) #15
kojii
The timeout of imported/web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_txt.html was thought as flaky but turned out to be real. It ...
4 years, 8 months ago (2016-04-06 18:45:03 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1766243003/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1766243003/360001
4 years, 8 months ago (2016-04-07 07:04:35 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/165660)
4 years, 8 months ago (2016-04-07 07:17:29 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1766243003/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1766243003/380001
4 years, 8 months ago (2016-04-07 07:29:14 UTC) #24
commit-bot: I haz the power
Committed patchset #20 (id:380001)
4 years, 8 months ago (2016-04-07 08:27:51 UTC) #26
commit-bot: I haz the power
4 years, 8 months ago (2016-04-07 08:29:53 UTC) #28
Message was sent while issue was closed.
Patchset 20 (id:??) landed as
https://crrev.com/d12b58ef0005d24dff2047f566f5ff5a5f2e45fb
Cr-Commit-Position: refs/heads/master@{#385693}

Powered by Google App Engine
This is Rietveld 408576698