[LayoutNG] Fix safe-to-break offset and its use at start of wrapped lines
This patch fixes safe-to-break offset vector in ShapeResult: 1. Fixed before the first glyph of each run to be safe-to-break. 2. Fixed before the last glyph of each run not to force safe-to-break. 3. Fixed non-cluster boundaries were off by one. Also related, two fixes are made to NGLineBreaker: 1. When the whole item can fit, it does not consider when the start of the item is not safe-to-break. The optimized code path was removed to fix this. If this seems to hit performance, we can bring it back with safe-to-break support. 2. Add |start_should_be_safe| argument to ShapingLineBreaker to make the start of wrapped line safe-to-break, but not the middle of a wrapped line (i.e., when there are previous items.) HarfBuzzShaperTest.SafeToBreakLatinDiscretionaryLigatures was fixed to match to what HarfBuzz returns as HB_GLYPH_FLAG_UNSAFE_TO_BREAK. This change causes a crash in fast/inline/absolute-positioned-inline-in-centred-block.html This is from an issue in HarfBuzzShaper, tracked in issue 817271. Bug: 816614 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng Change-Id: Id55ea10f0b6f879981e3725b7cac027b39f3f213 Reviewed-on: https://chromium-review.googlesource.com/939942 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Morten Stenshorne <mstensho@chromium.org> Reviewed-by:
Dominik Röttsches <drott@chromium.org> Cr-Commit-Position: refs/heads/master@{#539839}
Showing
58.2 KB