[css-text-3] overflow-wrap: break-word incorrectly kicks in when line breaking generate a leading white-space in lines below |
|||||
Issue descriptionChrome Version: 71.0.3573.0 What steps will reproduce the problem? (1) Load the attached test case (2) (3) What is the expected result? The text should be broken into 3 lines (expected.png), using the following breaking opportunities: "xxx | |12345|6789" What happens instead? The single leading white in the second line is not used to avoid the overflow; instead, the word is broken like this (result.png): "xxx | 1234|56789"
,
Oct 31
,
Oct 31
,
Oct 31
,
Nov 2
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4dc6641110334fe6a1807f37278ae543d2bb76ae commit 4dc6641110334fe6a1807f37278ae543d2bb76ae Author: Javier Fernandez <jfernandez@igalia.com> Date: Fri Nov 02 21:29:36 2018 [css-text] Keep track of the initial offset for each handled text In order to identify single leading white-spaces as potential line breaking opportunities we need to know the offset the iterator starts at for the current text to handle. When we landed the change in r596406 we incorrectly assumed that leading white-spaces were always at offset 1. However, this is not valid when such leading white-spaces are generated by previous broken lines. This CL solves the issue by using the stored initial offset to identify such single leading white-spaces as potential breaking opportunities. Bug: 900727 Change-Id: Ibc9dda7632d72ed82a61025015489ec3b70d6919 Reviewed-on: https://chromium-review.googlesource.com/c/1311274 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#605055} [add] https://crrev.com/4dc6641110334fe6a1807f37278ae543d2bb76ae/third_party/WebKit/LayoutTests/external/wpt/css/css-text/overflow-wrap/overflow-wrap-break-word-005.html [modify] https://crrev.com/4dc6641110334fe6a1807f37278ae543d2bb76ae/third_party/blink/renderer/core/layout/line/breaking_context_inline_headers.h
,
Nov 5
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by jfernandez@chromium.org
, Oct 31