DevRel-SAP: Text wrapping issue - text is split in two lines
Reported by
orit.ha...@sap.com,
Oct 13 2016
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36 Steps to reproduce the problem: 1. Open http://jsbin.com/yuvihucuwu/1/edit?html,js,output What is the expected behavior? The text should be displayed in one line. What went wrong? The text is split in two lines. Did this work before? N/A Chrome version: 54.0.2840.59 Channel: stable OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Shockwave Flash 23.0 r0 Works fine in IE11.
,
Oct 20 2016
Please do not assign bugs directly to engineers. It will get looked at much quicker if you let it go through the normal triage process.
,
Oct 20 2016
This appears to be a problem with break-word where we measure the first character "Д" and then the subsequent string "оговор" separately and add up the values. This turns out to be less than the total width. Koji, you know the break-all/word code pretty well. Would you mind taking a look? See attached minimal test case.
,
Oct 21 2016
The "white-space: pre-line" is a new combination that wasn't taken care of in the last fix. The test works good without it, interesting to know pre-line can break this scenario.
,
Oct 21 2016
Preferred width has been wrong, but it only appears in the layout result when "white-space: pre-wrap" or "white-space: pre-line".
,
Oct 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/715e724f5eb62b3517f093cadf5716e0fb3040ea commit 715e724f5eb62b3517f093cadf5716e0fb3040ea Author: kojii <kojii@chromium.org> Date: Sat Oct 22 01:35:22 2016 Fix max preferred width for LayoutText when break-all This patch fixes max preferred width for LayoutText when break-all preferred width ("word-break: break-all" or "word-break: break-word") is used. The problem only appears when the sum of character widths is not equal to the word width. However, when the sum is larger (e.g., kerning,) the difference is hardly noticeable. Also an optimization in LayoutText::width() hides the problem when !preserveNewline(), so it is visible only when "white-space: pre-wrap" or "white-space: pre-line". BUG= 655590 Review-Url: https://chromiumcodereview.appspot.com/2438683006 Cr-Commit-Position: refs/heads/master@{#426946} [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/fast/css3-text/css3-word-break/word-break-all-rtl-expected.txt [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/fast/css3-text/css3-word-break/word-break-all-rtl.html [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/platform/linux/fast/text/word-break-soft-hyphen-expected.png [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/platform/linux/fast/text/word-break-soft-hyphen-expected.txt [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/word-break-run-rounding-expected.png [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/word-break-soft-hyphen-expected.png [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/word-break-run-rounding-expected.png [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/word-break-soft-hyphen-expected.png [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/platform/mac/fast/text/word-break-run-rounding-expected.png [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/platform/mac/fast/text/word-break-run-rounding-expected.txt [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/platform/mac/fast/text/word-break-soft-hyphen-expected.png [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/platform/mac/fast/text/word-break-soft-hyphen-expected.txt [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/platform/win/fast/text/word-break-soft-hyphen-expected.png [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/LayoutTests/platform/win/fast/text/word-break-soft-hyphen-expected.txt [modify] https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea/third_party/WebKit/Source/core/layout/LayoutText.cpp
,
Oct 22 2016
,
Nov 16 2016
,
Feb 1 2017
r426946 seems to break another use case, see issue 687338 . |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by sureshkumari@chromium.org
, Oct 14 2016Labels: -Type-Bug M-56 hasbisect OS-Linux OS-Mac Type-Bug-Regression
Owner: e...@chromium.org
Status: Assigned (was: Unconfirmed)