• Koji Ishii's avatar
    [LayoutNG] Fix line width when trailing space at block end has kerning · 61abc770
    Koji Ishii authored
    ShapingLineBreaker handles trailing spaces at the end of
    wrapped lines. But when the line ends with hard break or at
    the end of a block, NGLineBreaker needs to remove the
    trailing spaces.
    
    When the trailing space is not safe-to-break; e.g., the font
    has kerning pairs between the last non-space character and
    the trailing spaces, this patch ensures that the line width
    is correct by reshaping the end.
    
    Not doing so caused min-content and max-content differ when
    there are no break opportunities, because trailing spaces for
    min-content is handled by ShapingLineBreaker while for max-
    content is handled by NGLineBreaker.
    
    Bug: 636993
    Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
    Change-Id: If8c810b7e4cfccfd7a35f6dd48d15ce67b98c036
    Reviewed-on: https://chromium-review.googlesource.com/1111749
    Commit-Queue: Emil A Eklund <eae@chromium.org>
    Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#570061}
    61abc770
t1202-counter-14-b-expected.txt 4.1 KB