LibWeb: Handle text-overflow: ellipsis with trailing whitespace

We should calculate whether we need to truncate text with an ellipsis
exclusive of any trailing collapsible whitespace.

This was causing issues where an inline element was automatically sized
(e.g. min-content) as we would calculate available width exclusive of
trailing collapsible whitespace and then our text chunk would be wider,
always inserting an ellipsis.

Fixes the visual element of #4048 but we still are incorrect in how we
collapse whitespace more generally
This commit is contained in:
Callum Law 2025-08-11 03:08:18 +12:00 committed by Sam Atkins
commit 027c9f53be
Notes: github-actions[bot] 2025-08-18 10:01:43 +00:00
3 changed files with 36 additions and 2 deletions

View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<span>abc</span>