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

Issue 2740083002: Add support for shaper-driven line breaking to HarfBuzzShaper (Closed)

Created:
3 years, 9 months ago by eae
Modified:
3 years, 9 months ago
Reviewers:
drott, kojii
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, fmalita+watch_chromium.org, jbroman, Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support for shaper-driven line breaking to HarfBuzzShaper Shapes a line of text by finding the ideal break point based on existing shape results for the paragraph and then looking backwards until a valid and appropriate break opportunity is identified. Re-shapes the beginning and/or end of the line as needed (if the break position affect shaping). This allows for significantly faster and more efficient line breaking by only re-shaping when absolutely needed and by only measuring between the start/end of lines and the nearest suitable and valid break opportunity. The nextSafeToBreakBefore and previousSafeToBreakAfter functions will be updated to use safe-to-break information when exposed by HarfBuzz. R=drott@chromium.org, kojii@chromium.org BUG=609117 TEST=Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp Review-Url: https://codereview.chromium.org/2740083002 Cr-Commit-Position: refs/heads/master@{#459953} Committed: https://chromium.googlesource.com/chromium/src/+/b47c12e89f5134efe6a68cb45e28a92451fcdb3e

Patch Set 1 #

Patch Set 2 : WIP #

Patch Set 3 : Getting closer #

Patch Set 4 : Fix null-termination issue #

Patch Set 5 : [LayoutNG] Full on shaper-driven line breaking #

Total comments: 9

Patch Set 6 : Rebase w/HEAD and address comments #

Patch Set 7 : Try to fix test failures #

Unified diffs Side-by-side diffs Delta from patch set Stats (+515 lines, -43 lines) Patch
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.h View 1 2 2 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp View 1 2 3 4 5 3 chunks +171 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp View 1 2 3 4 5 6 13 chunks +247 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h View 1 2 4 chunks +14 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp View 1 2 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/ShapeResultInlineHeaders.h View 1 2 1 chunk +46 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (23 generated)
eae
With the caveat that we do not yet have a proper safe-to-break implementation this now ...
3 years, 9 months ago (2017-03-21 21:21:17 UTC) #12
jbroman
Noticed one thing while passing by. https://codereview.chromium.org/2740083002/diff/80001/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.h File third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.h (right): https://codereview.chromium.org/2740083002/diff/80001/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.h#newcode75 third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.h:75: const AtomicString locale, ...
3 years, 9 months ago (2017-03-21 21:30:09 UTC) #13
kojii
> I'd like to support RTL runs without having to branch all the loops but ...
3 years, 9 months ago (2017-03-22 16:15:29 UTC) #14
eae
On 2017/03/22 16:15:29, kojii wrote: > > I'd like to support RTL runs without having ...
3 years, 9 months ago (2017-03-22 17:04:37 UTC) #15
kojii
On 2017/03/22 at 17:04:37, eae wrote: > > String string(u"..."); > > Oh, that used ...
3 years, 9 months ago (2017-03-22 17:54:42 UTC) #16
drott
Innovation! Looking forward to our smarter line breaking, this looks very promising. LGTM, with some ...
3 years, 9 months ago (2017-03-22 21:01:00 UTC) #17
drott
https://codereview.chromium.org/2740083002/diff/80001/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp File third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp (right): https://codereview.chromium.org/2740083002/diff/80001/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp#newcode740 third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp:740: // TODO: This should use harf-buzz safe to break ...
3 years, 9 months ago (2017-03-22 21:01:11 UTC) #18
eae
On 2017/03/22 21:01:00, drott wrote: > Innovation! Looking forward to our smarter line breaking, this ...
3 years, 9 months ago (2017-03-27 20:09:15 UTC) #19
eae
https://codereview.chromium.org/2740083002/diff/80001/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp File third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp (right): https://codereview.chromium.org/2740083002/diff/80001/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp#newcode798 third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp:798: LayoutUnit startPosition = result->snappedStartPositionForOffset(startOffset); On 2017/03/22 21:01:11, drott wrote: ...
3 years, 9 months ago (2017-03-27 20:14:03 UTC) #20
drott
https://codereview.chromium.org/2740083002/diff/80001/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp File third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp (right): https://codereview.chromium.org/2740083002/diff/80001/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp#newcode798 third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp:798: LayoutUnit startPosition = result->snappedStartPositionForOffset(startOffset); On 2017/03/27 at 20:14:02, eae ...
3 years, 9 months ago (2017-03-27 20:24:36 UTC) #21
eae
Interestingly HarfBuzzShaperTest.ShapeResultCopyRangeIntoArabicThaiHanLatin fails on Mac (and only on Mac), looking into that now.
3 years, 9 months ago (2017-03-27 22:30:32 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/2740083002/120001
3 years, 9 months ago (2017-03-28 00:28:36 UTC) #33
commit-bot: I haz the power
3 years, 9 months ago (2017-03-28 00:42:34 UTC) #36
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/b47c12e89f5134efe6a68cb45e28...

Powered by Google App Engine
This is Rietveld 408576698