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

Issue 2879093002: [LayoutNG] Fix ShapingLineBreaker when the end of range is needed (Closed)

Created:
3 years, 7 months ago by kojii
Modified:
3 years, 6 months ago
Reviewers:
eae
CC:
atotic+reviews_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, cbiesinger, chromium-reviews, dgrogan+ng_chromium.org, eae+blinkwatch, glebl+reviews_chromium.org, jchaffraix+rendering, leviw+renderwatch, ojan+watch_chromium.org, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[LayoutNG] Fix ShapingLineBreaker when the end of range is needed This patch changes ShapingLineBreaker behavior when there is no break opportunity within the range, and all glyphs can fit in the available space. NGLineBreaker expects the ShapeResult to the end of the range, and handles breakability between the next item by itself in such case. It used to expect whether there's a break opportunity at the end or not, and the mock computed it anyway. The semantics was changed since ShapingLineBreaker does not produce as part of other computation. This patch enables ShapingLineBreaker by default, while keeping the mock under #ifdef to ease the isolation of problems. Most of test failures are ignorable, crashes turn to failures, minor differences in measuring widths, or caused by other problems (e.g., innerText.) spelling-huge-text.html looks problematic. ShapingLineBreaker is more than 10 times slower for long lines (30k characters in single text node in this case.) I have some hypothesis, but I'd like to defer the perf until we get more real safe-to-break. Current mock safe-to-break requires to reshape a lot, which is good to test reshape code, but is not appropriate to look at the perf problems. BUG=636993 Review-Url: https://codereview.chromium.org/2879093002 Cr-Commit-Position: refs/heads/master@{#478727} Committed: https://chromium.googlesource.com/chromium/src/+/2476bc2b498e006eca452652f9436cf4cb7d12c5

Patch Set 1 #

Patch Set 2 : Clamp available_width to >= 0 #

Patch Set 3 : Rebase #

Patch Set 4 : Rebase #

Patch Set 5 : Add epsilon #

Patch Set 6 : Try to change offsetForPosition #

Patch Set 7 : Add a test for failing case #

Patch Set 8 : Fix WrapLastWord case #

Patch Set 9 : clang build fix #

Patch Set 10 : Fixes to ShapeToEnd #

Patch Set 11 : Back to Epsilon #

Patch Set 12 : break_offset fix when ShapeToEnd, cleanup #

Patch Set 13 : Removed epsilon, rebased on offset CL #

Patch Set 14 : Fix ShapeToEnd, some cleanup #

Patch Set 15 : Minor cleanup, re-test #

Patch Set 16 : Fixes and TestExpectations #

Patch Set 17 : Fix ShapingLineBreakerTest.ShapeLineRangeEndMidWord #

Patch Set 18 : Rebased onto stale ComputedStyle fix #

Patch Set 19 : TestExpectation for Mac 1px diff #

Patch Set 20 : Rebase #

Total comments: 2

Messages

Total messages: 35 (28 generated)
kojii
PTAL.
3 years, 6 months ago (2017-06-08 04:44:44 UTC) #8
eae
https://codereview.chromium.org/2879093002/diff/420001/third_party/WebKit/Source/platform/fonts/shaping/ShapingLineBreaker.cpp File third_party/WebKit/Source/platform/fonts/shaping/ShapingLineBreaker.cpp (right): https://codereview.chromium.org/2879093002/diff/420001/third_party/WebKit/Source/platform/fonts/shaping/ShapingLineBreaker.cpp#newcode126 third_party/WebKit/Source/platform/fonts/shaping/ShapingLineBreaker.cpp:126: if (candidate_break >= range_end) { When would this happen?
3 years, 6 months ago (2017-06-12 16:51:37 UTC) #24
kojii
https://codereview.chromium.org/2879093002/diff/420001/third_party/WebKit/Source/platform/fonts/shaping/ShapingLineBreaker.cpp File third_party/WebKit/Source/platform/fonts/shaping/ShapingLineBreaker.cpp (right): https://codereview.chromium.org/2879093002/diff/420001/third_party/WebKit/Source/platform/fonts/shaping/ShapingLineBreaker.cpp#newcode126 third_party/WebKit/Source/platform/fonts/shaping/ShapingLineBreaker.cpp:126: if (candidate_break >= range_end) { On 2017/06/12 at 16:51:37, ...
3 years, 6 months ago (2017-06-12 16:54:34 UTC) #25
eae
On 2017/06/12 16:54:34, kojii wrote: > https://codereview.chromium.org/2879093002/diff/420001/third_party/WebKit/Source/platform/fonts/shaping/ShapingLineBreaker.cpp > File third_party/WebKit/Source/platform/fonts/shaping/ShapingLineBreaker.cpp > (right): > > https://codereview.chromium.org/2879093002/diff/420001/third_party/WebKit/Source/platform/fonts/shaping/ShapingLineBreaker.cpp#newcode126 ...
3 years, 6 months ago (2017-06-12 17:11:03 UTC) #26
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/2879093002/420001
3 years, 6 months ago (2017-06-12 17:11:55 UTC) #28
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/2879093002/420001
3 years, 6 months ago (2017-06-12 19:47:52 UTC) #32
commit-bot: I haz the power
3 years, 6 months ago (2017-06-12 19:54:26 UTC) #35
Message was sent while issue was closed.
Committed patchset #20 (id:420001) as
https://chromium.googlesource.com/chromium/src/+/2476bc2b498e006eca452652f943...

Powered by Google App Engine
This is Rietveld 408576698