New issue
Advanced search Search tips

Issue 663542 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Nov 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Line break after minus ('−') sign when followed by currency symbol ('$')

Project Member Reported by npc@google.com, Nov 8 2016

Issue description

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

Example URL:
https://jsfiddle.net/f6mL30ms/

Steps to reproduce the problem:
1. Have an element containing a minus sign character (U+2212) followed by a currency symbol (e.g. '), and optionally some digits
2. Narrow the element such that line breaking occurs
3. Note that there is a line break after the minus sign

What is the expected behavior?
http://unicode.org/reports/tr14/#PR suggests that line breaks should not occur after a minus sign when followed by a currency symbol as it is still considered to be a 'numeric context'

What went wrong?
The line broke after the minus sign

Does it occur on multiple sites: Yes

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.71  Channel: n/a
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 23.0 r0

The line break does not occur on firefox (49.0.1 on mac OSX)
 
Components: -Blink Blink>Layout

Comment 2 by xing...@intel.com, Nov 10 2016

Hi, I am interested with this and is preparing a cl for this.
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 11 2016

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

commit bebd7123bbffb4d99b2e4b74c96dc394df92fa70
Author: xing.xu <xing.xu@intel.com>
Date: Fri Nov 11 00:46:40 2016

No line break when dollar sign follows minus

Spec: http://unicode.org/reports/tr14/#PR.
"Many currency signs can appear on both sides, or even the middle, of a numeric expression.
Therefore the line breaking algorithm, by default, does not break between PR and numbers or
letters on either side."
Here PR refers to:
002B    PLUS SIGN
005C    REVERSE SOLIDUS
00B1    PLUS-MINUS
2116    NUMERO SIGN
2212    MINUS SIGN
2213    MINUS-OR-PLUS-SIGN

BUG= 663542 

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

[modify] https://crrev.com/bebd7123bbffb4d99b2e4b74c96dc394df92fa70/third_party/WebKit/LayoutTests/fast/css3-text/css3-word-break/word-break-all-ascii-expected.txt
[modify] https://crrev.com/bebd7123bbffb4d99b2e4b74c96dc394df92fa70/third_party/WebKit/LayoutTests/fast/text/line-break-ascii-expected.txt
[add] https://crrev.com/bebd7123bbffb4d99b2e4b74c96dc394df92fa70/third_party/WebKit/LayoutTests/fast/text/line-break-dollar-after-minus-expected.html
[add] https://crrev.com/bebd7123bbffb4d99b2e4b74c96dc394df92fa70/third_party/WebKit/LayoutTests/fast/text/line-break-dollar-after-minus.html
[modify] https://crrev.com/bebd7123bbffb4d99b2e4b74c96dc394df92fa70/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp

Comment 4 by xing...@intel.com, Nov 11 2016

Status: Fixed (was: Unconfirmed)

Sign in to add a comment