Chrome honors word-break and wraps preserved white-spaces when using break-all even if white-space: pre-wrap is set |
|||||||||||
Issue descriptionChrome Version: (62.0.3198.0) OS: (linux) What steps will reproduce the problem? (1) load the attached test case (2) (3) What is the expected result? Preserved white spaces are not wrapped, but they are collapsed just to prevent overflow. What happens instead? White spaces are wrapped and moved to the next line.
,
Sep 26 2017
,
Sep 26 2017
BTW, this bug is the cause of the following WPT: https://github.com/w3c/web-platform-tests/blob/master/css/css-text-3/white-space/pre-wrap-002.html It passes when loaded in Gecko/Firefox and Webkit/Safari
,
Sep 27 2017
,
Sep 27 2017
,
Sep 27 2017
,
Oct 2 2017
I think you meant 'word-break: break-all' applied to the div? I can then reproduce in the current layout engine but not with LayoutNG. We should probably import these tests too.
,
Oct 2 2017
Attached a new test case to reproduce the bug.
,
Oct 2 2017
,
Oct 4 2017
Thank you for the updated test. Confirmed in Canary, and confirmed this was fixed in LayoutNG. Given this is fixed in LayoutNG and we expect the switch isn't too far, I'm not planning to work on this. But if anyone wants to work on, or have reasons to raise the priority, I'd be happy to hear/advice/review. I guess this is about break-after-space mode, which isn't the first class citizen in the current line breaker, but we refactored in LayoutNG. The fix shouldn't be too hard.
,
Nov 5
I'm planning to work on this now.
,
Nov 5
,
Nov 13
Thank you!
,
Nov 13
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3c9ddfebad716cd1aed2386175bdd1870efa0217 commit 3c9ddfebad716cd1aed2386175bdd1870efa0217 Author: Javier Fernandez <jfernandez@igalia.com> Date: Tue Nov 13 10:43:28 2018 [css-text] Skip trailing spaces for pre-wrap even if word can be broken According to the specs, preserved white-spaces should hang, or visually collapse, when white-space is set to pre-wrap; even if word-break allows breaing the word at any point. https://www.w3.org/TR/css-text-3/#line-break-details Bug: 768363 Change-Id: I7ab356ed6f789ecef087ff469ad97c50e7af49be Reviewed-on: https://chromium-review.googlesource.com/c/1318694 Reviewed-by: Koji Ishii <kojii@chromium.org> Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Cr-Commit-Position: refs/heads/master@{#607550} [modify] https://crrev.com/3c9ddfebad716cd1aed2386175bdd1870efa0217/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/3c9ddfebad716cd1aed2386175bdd1870efa0217/third_party/WebKit/LayoutTests/editing/deleting/delete-across-editable-content-boundaries-2.html [modify] https://crrev.com/3c9ddfebad716cd1aed2386175bdd1870efa0217/third_party/WebKit/LayoutTests/external/wpt/css/css-text/white-space/pre-wrap-002.html [modify] https://crrev.com/3c9ddfebad716cd1aed2386175bdd1870efa0217/third_party/WebKit/LayoutTests/platform/linux/editing/style/table-selection-expected.png [modify] https://crrev.com/3c9ddfebad716cd1aed2386175bdd1870efa0217/third_party/WebKit/LayoutTests/platform/linux/editing/style/table-selection-expected.txt [modify] https://crrev.com/3c9ddfebad716cd1aed2386175bdd1870efa0217/third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/basic-textareas-expected.png [modify] https://crrev.com/3c9ddfebad716cd1aed2386175bdd1870efa0217/third_party/WebKit/LayoutTests/platform/mac/editing/style/table-selection-expected.png [modify] https://crrev.com/3c9ddfebad716cd1aed2386175bdd1870efa0217/third_party/WebKit/LayoutTests/platform/mac/editing/style/table-selection-expected.txt [modify] https://crrev.com/3c9ddfebad716cd1aed2386175bdd1870efa0217/third_party/WebKit/LayoutTests/platform/win/editing/style/table-selection-expected.png [modify] https://crrev.com/3c9ddfebad716cd1aed2386175bdd1870efa0217/third_party/WebKit/LayoutTests/platform/win/editing/style/table-selection-expected.txt [modify] https://crrev.com/3c9ddfebad716cd1aed2386175bdd1870efa0217/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/basic-textareas-expected.png [modify] https://crrev.com/3c9ddfebad716cd1aed2386175bdd1870efa0217/third_party/blink/renderer/core/layout/line/breaking_context_inline_headers.h
,
Nov 13
This issue should be FIXED now. |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by jfernan...@igalia.com
, Sep 26 2017