New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 655590 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

DevRel-SAP: Text wrapping issue - text is split in two lines

Reported by orit.ha...@sap.com, Oct 13 2016

Issue description

UserAgent: 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.
 
Cc: sureshkumari@chromium.org
Labels: -Type-Bug M-56 hasbisect OS-Linux OS-Mac Type-Bug-Regression
Owner: e...@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on windows-10, Linux Ubuntu 14.04 and Mac 10.11.4 using chrome stable version 53.0.2785.143, beta 54.0.2840.59 and latest canary 55.0.2889.0.

This is regression issue broken in M49.Please find the bisect information as below
Narrow Bisect::
===============
Good :: 49.0.2573.0  --   (build revision 361233)
Bad:: 49.0.2574.0 --   (build revision 361527)

ChangeLog: https://chromium.googlesource.com/chromium/src/+log/206123a4b6cb14a8da596d2120761f1beda972fc..fa7fc32c5940dfd3d734ed3231b1295da4c3303e
================

Possible suspect
==================
fa7fc32c5940dfd3d734ed3231b1295da4c3303e

Review URL: https://codereview.chromium.org/1474673003


eae@ could you please look into this issue if it is related to your change,else please help us in finding the appropriate owner for this issue.

Thanks,

Comment 2 by e...@chromium.org, Oct 20 2016

Labels: -Type-Bug-Regression Type-Bug
Status: Started (was: Assigned)
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.

Comment 3 by e...@chromium.org, Oct 20 2016

Cc: e...@chromium.org
Owner: kojii@chromium.org
Status: Assigned (was: Started)
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.
ru.html
338 bytes View Download

Comment 4 by kojii@chromium.org, 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.

Comment 5 by kojii@chromium.org, Oct 21 2016

Components: Blink>Layout
Labels: -OS-Linux -OS-Windows -OS-Mac OS-All
Preferred width has been wrong, but it only appears in the layout result when "white-space: pre-wrap" or "white-space: pre-line".
Project Member

Comment 6 by bugdroid1@chromium.org, 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

Comment 7 by e...@chromium.org, Oct 22 2016

Status: Fixed (was: Assigned)
Cc: kojii@chromium.org rbasuvula@chromium.org
 Issue 665426  has been merged into this issue.

Comment 9 by woxxom@gmail.com, Feb 1 2017

r426946 seems to break another use case, see  issue 687338 .

Sign in to add a comment