Bug 258265 - `text-overflow: ellipsis` doesn't work with `overflow: clip`
Summary: `text-overflow: ellipsis` doesn't work with `overflow: clip`
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 16
Hardware: All All
: P2 Major
Assignee: zalan
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2023-06-18 14:02 PDT by Benoît Rouleau
Modified: 2023-06-22 21:56 PDT (History)
5 users (show)

See Also:


Attachments
HTML file showing the issue (392 bytes, text/html)
2023-06-18 14:02 PDT, Benoît Rouleau
no flags Details
Patch (3.62 KB, patch)
2023-06-22 16:47 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (4.86 KB, patch)
2023-06-22 19:34 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benoît Rouleau 2023-06-18 14:02:18 PDT
Created attachment 466747 [details]
HTML file showing the issue

See the attached HTML file. The `div` has `text-overflow: ellipsis` on it, which combined with its width that is smaller than its contents + `white-space: nowrap` + `overflow: clip`, should show an ellipsis where the text gets clipped. It works in all other major browsers (Chrome, Edge, and Firefox). In Safari, it only works if we change `overflow: clip` to `overflow: hidden`.
Comment 1 Radar WebKit Bug Importer 2023-06-22 14:36:33 PDT
<rdar://problem/111182654>
Comment 2 zalan 2023-06-22 14:47:12 PDT
I bet we accidentally started gating this on overflow: hidden and missed overflow: clip :/ 
Thank you for the report/simple test case!
Comment 3 zalan 2023-06-22 16:47:51 PDT
Created attachment 466801 [details]
Patch
Comment 4 zalan 2023-06-22 19:34:38 PDT
Created attachment 466803 [details]
Patch
Comment 5 EWS 2023-06-22 21:56:55 PDT
Committed 265445@main (ca9936559899): <https://commits.webkit.org/265445@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 466803 [details].