New issue
Advanced search Search tips

Issue 627715 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

When using soft hyphen (­) with long words, hyphen appears at end of word

Reported by veikk...@gmail.com, Jul 13 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Steps to reproduce the problem:
1. make div-element with very long word
2. add ­ to word. First part (before) shy must be shorter than part after ­ 
3. element width must be small enough to trigger ­

What is the expected behavior?
Expecting word to be split by ­ and hyphen to be visible only on in place of ­

What went wrong?
Hyphen appears in end of latter part of the word, see image.

Did this work before? N/A 

Chrome version: 51.0.2704.103  Channel: n/a
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 22.0 r0

http://codepen.io/anon/pen/mEqLzE
 
Screen Shot 2016-07-13 at 09.36.46.png
9.9 KB View Download
Components: -UI Blink>HTML
Labels: -OS-Mac OS-All
Status: Untriaged (was: Unconfirmed)
Summary: When using soft hyphen (­) with long words, hyphen appears at end of word (was: When using ­ with long words hyphen appears in end of word)
Confirmed on Chrome 51.0.2704.{81,103}.

Comment 2 by tkent@chromium.org, Jul 14 2016

Components: -Blink>HTML Blink>Layout

Comment 3 by e...@chromium.org, Jul 14 2016

Owner: kojii@chromium.org
Status: Assigned (was: Untriaged)

Comment 4 by kojii@chromium.org, Jul 15 2016

Looks like an old bug, reproduces on Safari too.
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 22 2016

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

commit 33af59cf0bf37f84d6e6423442fc90ffa14176cd
Author: kojii <kojii@chromium.org>
Date: Fri Jul 22 03:29:33 2016

Soft hyphens with long suffix may add unnecessary hyphens

This patch fixes unnecessary hyphens appear when soft hyphens are used
and its suffix is too long to fit.

In that case, m_lineBreak is still pointing to the last break
opportunity, which is the beginning of the line, and the character
before is on the previous line.

Also, different code doing the same logic for when the word with soft
hyphen is at the end of a text node and is not are unified.

BUG= 627715 

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

[modify] https://crrev.com/33af59cf0bf37f84d6e6423442fc90ffa14176cd/third_party/WebKit/LayoutTests/editing/selection/paint-hyphen-expected.html
[add] https://crrev.com/33af59cf0bf37f84d6e6423442fc90ffa14176cd/third_party/WebKit/LayoutTests/fast/text/soft-hyphen-overflow-expected.html
[add] https://crrev.com/33af59cf0bf37f84d6e6423442fc90ffa14176cd/third_party/WebKit/LayoutTests/fast/text/soft-hyphen-overflow.html
[modify] https://crrev.com/33af59cf0bf37f84d6e6423442fc90ffa14176cd/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 22 2016

Labels: merge-merged-2804
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/33af59cf0bf37f84d6e6423442fc90ffa14176cd

commit 33af59cf0bf37f84d6e6423442fc90ffa14176cd
Author: kojii <kojii@chromium.org>
Date: Fri Jul 22 03:29:33 2016

Soft hyphens with long suffix may add unnecessary hyphens

This patch fixes unnecessary hyphens appear when soft hyphens are used
and its suffix is too long to fit.

In that case, m_lineBreak is still pointing to the last break
opportunity, which is the beginning of the line, and the character
before is on the previous line.

Also, different code doing the same logic for when the word with soft
hyphen is at the end of a text node and is not are unified.

BUG= 627715 

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

[modify] https://crrev.com/33af59cf0bf37f84d6e6423442fc90ffa14176cd/third_party/WebKit/LayoutTests/editing/selection/paint-hyphen-expected.html
[add] https://crrev.com/33af59cf0bf37f84d6e6423442fc90ffa14176cd/third_party/WebKit/LayoutTests/fast/text/soft-hyphen-overflow-expected.html
[add] https://crrev.com/33af59cf0bf37f84d6e6423442fc90ffa14176cd/third_party/WebKit/LayoutTests/fast/text/soft-hyphen-overflow.html
[modify] https://crrev.com/33af59cf0bf37f84d6e6423442fc90ffa14176cd/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h

Comment 7 by kojii@chromium.org, Jul 22 2016

Status: Fixed (was: Assigned)

Sign in to add a comment