New issue
Advanced search Search tips

Issue 705334 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

half-leading is missing when using -webkit-line-clamp for text ellipsis

Reported by luyuan.c...@gmail.com, Mar 27 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

Example URL:
http://jsbin.com/yofiku/edit?html,css,output

Steps to reproduce the problem:
1. Create a block element and type some text in it.
2. Set a larger line-height.
3. Use display:-webkit-box, -webkit-line-clamp:1, -webkit-box-orient:vertical, overflow:hidden on the block element.
4. Make sure '...' is display.
5. We can see the half-leading on the bottom of the block element is missing. New height is not correct.

What is the expected behavior?
The half-leading on the bottom is showing.

What went wrong?
In third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp   getHeightForLineCount function

Use lineBottomWithLeading() instead of lineBottom()

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? No
 This is a blink only bug.

Chrome version: 55.0.2883.87  Channel: stable
OS Version: 10.12.3
Flash Version: Shockwave Flash 24.0 r0
 
line_clamp_bug.diff
795 bytes Download
2017-03-27_120137.png
50.5 KB View Download

Comment 1 by tkent@chromium.org, Mar 27 2017

Components: -Blink Blink>Layout>Flexbox
Does it work with the standard flexbox, not -webkit-box?

Labels: Needs-Milestone
It doesn't work with flexbox, the implementation of line clamp is in LayoutDeprecatedFlexibleBox class.

Comment 4 by e...@chromium.org, Mar 27 2017

Status: WontFix (was: Unconfirmed)
We're trying to remove support for the non-standard -webkit-line-clamp and replace it with something that has full standard and browser support. As such we are unlikely to further enhance or fix -webkit-line-clamp at this time.

Sign in to add a comment