New issue
Advanced search Search tips

Issue 668399 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug-Regression



Sign in to add a comment

`word-break: break-all` and Japanese punctuation cause text overflow

Reported by hai...@gmail.com, Nov 24 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393

Example URL:

Steps to reproduce the problem:
1. write long Japanese text
2. insert an element that has `word-break: break-all` inside 1
3. place "、" just before 2
4. change parent element width to wrap inside 2

What is the expected behavior?
Texts should fit to its parent element.

What went wrong?
Text overflows from its parent element.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 54.0.2840.99  Channel: stable
OS Version: 10.0
Flash Version:
 
cap-20161124-174659.png
12.6 KB View Download
test.html
1.0 KB View Download

Comment 1 by ajha@chromium.org, Nov 24 2016

Labels: M-54
Components: Blink>Layout
Labels: -Pri-2 -Type-Compat -M-54 hasbisect-per-revision M-56 OS-Mac Pri-1 Type-Bug-Regression
Owner: kojii@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on Windows 10 and mac 10.11.6 using chrome reported version #54.0.2840.99 and latest canary #57.0.2931.0. Unable to reproduce on Ubuntu 14.04.

Bisect Information:
=====================
Good build: 52.0.2734.0 Revision(393126)
Bad Build : 52.0.2735.0 Revision(393409) 

Change Log URL: 
https://chromium.googlesource.com/chromium/src/+log/b0023a6712afe431a21e209bf6066c2413733e19..ad66862296c227c1b74a15f96632a67d941b6643

From the above change log suspecting below change

Review url: https://codereview.chromium.org/1966703002

kojii@ - Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner.

Thanks...!!

Comment 3 by kojii@chromium.org, Dec 1 2016

Labels: -OS-Windows -OS-Mac OS-All
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f2ba82966d78cccb307a6046606a616e27c1f0df

commit f2ba82966d78cccb307a6046606a616e27c1f0df
Author: kojii <kojii@chromium.org>
Date: Fri Dec 02 10:03:59 2016

Fix break-all/word-break are applied to inline elements

This patch improves when properties that can break lines in the middle
of a word (word-break: break-all and break-word) are applied to inline
elements.

When no characters can fit but there is a break opportunity in previous
runs, the line should break at the opportunity.

Also this fix revealed that we have tests of element boundaries relying
on parent's style, and they pass only under certain conditions. This
was fixed to refer to the parent's style, as recently clarified in CSS
Text[1].

[1] https://github.com/w3c/csswg-drafts/issues/189

BUG= 668399 

Review-Url: https://codereview.chromium.org/2532393006
Cr-Commit-Position: refs/heads/master@{#435899}

[add] https://crrev.com/f2ba82966d78cccb307a6046606a616e27c1f0df/third_party/WebKit/LayoutTests/fast/css3-text/css3-word-break/word-break-break-all-in-span-expected.html
[add] https://crrev.com/f2ba82966d78cccb307a6046606a616e27c1f0df/third_party/WebKit/LayoutTests/fast/css3-text/css3-word-break/word-break-break-all-in-span.html
[modify] https://crrev.com/f2ba82966d78cccb307a6046606a616e27c1f0df/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h

Comment 5 by kojii@chromium.org, Dec 6 2016

Labels: Merge-Request-56
Status: Fixed (was: Assigned)
Thank you for reporting this issue. The fix is available in today's Canary, it'd be greatly appreciated if you could verify your pages.

Also, I took the hyphenation issue you mentioned in your blog to CSS WG:
https://github.com/w3c/csswg-drafts/issues/785
It'd be also helpful if you could follow the discussion.

Comment 6 by dimu@chromium.org, Dec 6 2016

Labels: -Merge-Request-56 Merge-Approved-56 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M56 (branch: 2924)

Comment 7 by hai...@gmail.com, Dec 6 2016

Looks great. Thank you.
cap-20161206-133956.png
12.3 KB View Download
Project Member

Comment 8 by bugdroid1@chromium.org, Dec 6 2016

Labels: -merge-approved-56 merge-merged-2924
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58e8ebffee4354ed11d2308a6dca6ea7cca6ace3

commit 58e8ebffee4354ed11d2308a6dca6ea7cca6ace3
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Dec 06 12:42:57 2016

Merge 2924: Fix break-all/word-break are applied to inline elements

This patch improves when properties that can break lines in the middle
of a word (word-break: break-all and break-word) are applied to inline
elements.

When no characters can fit but there is a break opportunity in previous
runs, the line should break at the opportunity.

Also this fix revealed that we have tests of element boundaries relying
on parent's style, and they pass only under certain conditions. This
was fixed to refer to the parent's style, as recently clarified in CSS
Text[1].

[1] https://github.com/w3c/csswg-drafts/issues/189

BUG= 668399 

Review-Url: https://codereview.chromium.org/2532393006
Cr-Commit-Position: refs/heads/master@{#435899}
(cherry picked from commit f2ba82966d78cccb307a6046606a616e27c1f0df)

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

Cr-Commit-Position: refs/branch-heads/2924@{#355}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[add] https://crrev.com/58e8ebffee4354ed11d2308a6dca6ea7cca6ace3/third_party/WebKit/LayoutTests/fast/css3-text/css3-word-break/word-break-break-all-in-span-expected.html
[add] https://crrev.com/58e8ebffee4354ed11d2308a6dca6ea7cca6ace3/third_party/WebKit/LayoutTests/fast/css3-text/css3-word-break/word-break-break-all-in-span.html
[modify] https://crrev.com/58e8ebffee4354ed11d2308a6dca6ea7cca6ace3/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h

Comment 9 by kojii@chromium.org, Dec 6 2016

Status: Verified (was: Fixed)
As per comment #7. Thank you for your quick verification.

Sign in to add a comment