Min-content width for 'word-break: break-word' should not be the same as 'break-all'
Reported by
jesssto...@fastmail.com,
Jan 31 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8 Example URL: https://jsfiddle.net/ticky/n2my41q5/ Steps to reproduce the problem: 1. Have a table cell element with nested non-text content nominally wider than the requested width of the table, and the following CSS styles applied to the cell; { word-break: break-word; white-space: pre-wrap; overflow-wrap: break-word; } -or- 1. go to https://jsfiddle.net/ticky/n2my41q5/ What is the expected behavior? The text should be forcibly wrapped, and the table thus capped at 900px wide. What went wrong? The text fails to wrap until the penultimate character, at which point the table is over ten times the requested width. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? Yes 55.0.2883.95 Does this work in other browsers? Yes Chrome version: 56.0.2924.76 (Official Build) (64-bit) Channel: stable OS Version: OS X 10.12.3 Flash Version: This is inconsistent with the behaviour of all other browsers, and previous Chrome versions, including latest versions of Safari (and the current Developer Preview) and Opera. In Firefox, similar behaviour is achieved using “break-all” instead of “break-word,” though neither work correctly in Chrome. Chrome 56.0.2924.76 fails this test! Chrome 58.0.2998.0 canary fails this test! Chrome 55.0.2883.95 passes this test. Opera 42.0.2393.517 passes this test. Safari 10.0.3 passes this test. Safari Technology Preview (Release 22 (Safari 10.2, WebKit 12604.1.4.2)) passes this test.
,
Feb 1 2017
Thanks for the bisect. Over to kojii@ to decide where to go from here
,
Feb 1 2017
,
Feb 7 2017
,
Feb 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eb5a8c59e9f3121d5c0dc92b2539f86f847eb295 commit eb5a8c59e9f3121d5c0dc92b2539f86f847eb295 Author: kojii <kojii@chromium.org> Date: Tue Feb 07 22:27:18 2017 Fix min-content sizing for 'word-break: break-word' This patch fixes min-content[1] sizing for 'word-break: break-word'. The fix for crbug.com/655590 computes min-content sizing for 'break-word' the same as 'break-all', even though these two values have different break opportunities as per the spec[2]. Due to this, when 'break-word' is applied to text which 'break-all' does not allow break, such as a long sequence of '.' (FULL STOP, a.k.a. period,) the min-content becomes too long. [1] https://drafts.csswg.org/css-sizing/#min-content [2] https://drafts.csswg.org/css-text-3/#word-break-property BUG= 687338 Review-Url: https://codereview.chromium.org/2681633002 Cr-Commit-Position: refs/heads/master@{#448744} [add] https://crrev.com/eb5a8c59e9f3121d5c0dc92b2539f86f847eb295/third_party/WebKit/LayoutTests/fast/css3-text/css3-word-break/word-break-break-word-fit-content-expected.html [add] https://crrev.com/eb5a8c59e9f3121d5c0dc92b2539f86f847eb295/third_party/WebKit/LayoutTests/fast/css3-text/css3-word-break/word-break-break-word-fit-content.html [modify] https://crrev.com/eb5a8c59e9f3121d5c0dc92b2539f86f847eb295/third_party/WebKit/Source/core/layout/LayoutText.cpp
,
Feb 7 2017
Thank you for reporting this issue to us. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by woxxom@gmail.com
, Feb 1 2017