RESOLVED DUPLICATE of bug 250270 250071
Regression: -webkit-line-clamp with overflow: visible sizes the container to the height of the unclamped contents (IFC)
https://bugs.webkit.org/show_bug.cgi?id=250071
Summary Regression: -webkit-line-clamp with overflow: visible sizes the container to ...
Andreu Botella
Reported 2023-01-04 01:47:15 PST
Created attachment 464325 [details] Test case I recently noticed that on recent versions of WebKit, `-webkit-line-clamp` with `overflow: visible` will add an ellipsis, but it will size the container according to the block size of the full contents, which should overflow it. This is the behavior in other browsers, and the one that WebKit had before this regression. Note that with `overflow: hidden`, the container will be sized properly. This is legacy behavior, since in the current definition of `(-webkit-)line-clamp` in the CSS Overflow Level 3 spec (which is based on fragmentation), as well as in the one that's being considered in https://github.com/w3c/csswg-drafts/issues/7708 (which hides clamped content), the clamped contents never visibly overflow the container. However, in both of those proposed behaviors, the size of the container is still set to the block size of the clamped contents. This regressed in https://commits.webkit.org/256989@main (bug 248200). Although this patch is related to LFC, it also regresses without it enabled.
Attachments
Test case (1.52 KB, text/html)
2023-01-04 01:47 PST, Andreu Botella
no flags
Screenshot with the patch in bug 250270 (303.53 KB, image/png)
2023-01-09 16:02 PST, zalan
no flags
Andreu Botella
Comment 1 2023-01-04 01:59:48 PST
My bad, I thought LFC was a precondition for IFC, and therefore that IFC would not actually be enabled by default even though it is in the preferences yaml. So this regression is indeed IFC-related.
Radar WebKit Bug Importer
Comment 2 2023-01-04 06:19:18 PST
zalan
Comment 3 2023-01-09 15:48:04 PST
Thank you for the detailed description/test case!
zalan
Comment 4 2023-01-09 16:01:56 PST
I started working on bug 250270 and apparently the patch I attached fixes this issue too. I hope you don't mind if I forward dup it (should have started working on this first and dup it properly).
zalan
Comment 5 2023-01-09 16:02:32 PST
Created attachment 464429 [details] Screenshot with the patch in bug 250270
zalan
Comment 6 2023-01-09 16:03:00 PST
*** This bug has been marked as a duplicate of bug 250270 ***
Note You need to log in before you can comment on or make changes to this bug.