New issue
Advanced search Search tips

Issue 923644 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[LayoutNG] WBR tag doesn't break the text with a standard ellipsis overflow

Reported by woxxom@gmail.com, Jan 19 (3 days ago)

Issue description

Chrome: 73
OS: all

================================================

<div style="
  width: 3em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis
">aaaaaaaaaaa<wbr>bbbbbbbbbbb</div>

================================================

Repro: 
1. run chrome --enable-blink-features=LayoutNG
2. open the attached test.html or use the HTML above

Expected: two lines are shown
aaaa...
bbb...

Observed: one line is shown
aaaa...

================================================

Bisected to 527799 (good) - 527804 (bad)
https://chromium.googlesource.com/chromium/src/+log/a9439b92..1ae219d8?pretty=fuller

Suspecting r527802 = crrev.com/c/854372
Reland "Reland "[LayoutNG] Handle trailing spaces""
Landed in 65.0.3316.0
 

Comment 1 by woxxom@gmail.com, Jan 19 (3 days ago)

test.html
136 bytes View Download

Comment 2 by e...@chromium.org, Jan 21 (2 days ago)

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

Comment 3 by kojii@chromium.org, Yesterday (46 hours ago)

Thank you for reporting the problem.

Is there a real site that is affected by this change? The spec is not clear but I believe this is not an intentional behavior. If there are many sites that rely on this behavior, I think we need to discuss at W3C.

Comment 4 by woxxom@gmail.com, Yesterday (45 hours ago)

This is a breaking change for something very useful (is there even a reasonable alternative?) that worked for more than 10 years (at least since Chrome 0.2 r1625) and is thus highly likely to be used by lots of sites so I doubt my personal experience or knowledge of a few such sites is relevant but FWIW I'm using it in my personal userscripts that augment other sites.

Comment 5 by kojii@chromium.org, Yesterday (45 hours ago)

Can you share URLs you know? I'd like to share them with W3C.

Comment 6 by woxxom@gmail.com, Yesterday (45 hours ago)

I'm using it in my userscripts, I didn't investigate the real world usage, I'm not aware of such sites at the moment, I don't know how to investigate it. If you really want to break the historical behavior and remove the only(?) way to have a multi-line ellipsis overflow, maybe you can add a histogram like these first: https://www.chromestatus.com/metrics/feature/popularity

Comment 7 by kojii@chromium.org, Yesterday (45 hours ago)

You're right that we can collect usage data but we don't have a way to collect real URLs. Will you be able to share URLs? If not easy, I can still report to W3C that we could not get one.

Comment 8 by kojii@chromium.org, Yesterday (45 hours ago)

BTW, we're discussing to add multi-line ellipsis (for the last line, not the one you have). If it has a use case, W3C would like to discuss that. This behavior works in Safari but not in Firefox because it's not a defined behavior.

Comment 9 by woxxom@gmail.com, Yesterday (45 hours ago)

>If it has a use case

How else do we wrap something that's semantically is a single entity like a multi-word name to a narrower width in a responsive layout and have the overflow on *each* part of it? Currently we can do it in Chrome with WBR.

The multi-line ellipsis for the last line doesn't seem to help here as it probably assumes each word in the preceding lines is fully visible (wrapped via word-break:break-all which would be terrible) or hidden without an ellipsis (which would be terrible).

Comment 10 by woxxom@gmail.com, Yesterday (44 hours ago)

re 9, self-answering my "how else" - we would have to wrap each word in a block element with an ellipsis overflow. Not really a tragedy but still increases the amount of DOM nodes and CSS rules for the narrow and wide modes.

Comment 11 by kojii@chromium.org, Yesterday (44 hours ago)

I'm not arguing whichever. When some browsers behave differently for something not clearly defined, we usually discuss at W3C, and browser implementers who need to change their engines would appreciate examples if there were one.

Sign in to add a comment