[LayoutNG] Fix line breaker when spaces are across elements
This patch fixes NGLineBreaker not to freeze when all of the following conditions met: * 'word-wrap: break-word' is set. * 'whitespace: pre-wrap' is set. * Two or more adjacent preserved spaces are split to two or more elements, and is the last space to fit in the line. e.g., <div style="whitespace: pre-wrap; word-break: break-word"> <span>xxx <span> yyyy </div> and "yyyy" does not fit. We need to handle trailing spaces not only when spaces follow a break opportunity but also spaces are after spaces. Bug: 903909 Change-Id: Ie4346a670ec22d35cca3a290b9a423161537e4e8 Reviewed-on: https://chromium-review.googlesource.com/c/1343466Reviewed-by:Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#609709}
Showing
Please register or sign in to comment