• Koji Ishii's avatar
    [LayoutNG] Implement break-after-space style line breaking · b4b56a2c
    Koji Ishii authored
    This patch implements break-after-space style line breaking. This style
    is needed for 'white-space:pre-wrap', and when in editing.
    
    The current layout engine handles this in BreakingContext. This patch
    implements the style in LazyTextBreakIterator so that ShapingLineBreaker
    can implement the behavior without additional code.
    
    The current layout engine supports 3 modes:
    1. break-before-space (most cases)
    2. break-after-space (white-space:pre-wrap)
    3. break-after-space + hanging space (editing)
    
    This patch does not support 3rd mode yet, and that editing behavior is
    slightly different from the current layout engine, closer to Edge. The
    editing test failure is caused by this difference. I'll evaluate the
    impact and the needs of the 3rd mode later.
    
    There are more tests that actually pass, but they fail for other
    reasons, such as the lack of quirks mode support.
    
    BUG=636993
    
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
    Change-Id: Iec1b684da4dcf45f10eaa408889ebf77d387e668
    Reviewed-on: https://chromium-review.googlesource.com/574903
    Commit-Queue: Koji Ishii <kojii@chromium.org>
    Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#488169}
    b4b56a2c
enable-blink-features=LayoutNG 1.44 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.