Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e4458a3a7b8de8de3951c971d23d73f6ba1eb403
https://github.com/WebKit/WebKit/commit/e4458a3a7b8de8de3951c971d23d73f6ba1eb403
Author: Alan Baradlay <[email protected]>
Date: 2026-10-05 (Mon, 05 Oct 2026)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
Log Message:
-----------
[line-clamp] The block ellipsis goes on a line that only has a float
https://bugs.webkit.org/show_bug.cgi?id=326301
<rdar://problem/189151667>
Reviewed by Antti Koivisto.
<div style="line-clamp: 4; width: 200px; white-space: pre-wrap">Line 1
Line 2
Line 3
<div style="float: left; width: 300px">Float</div>Line 4
Line 5</div>
Line 4 should show "Line 4..." below the float. The float takes up the whole
width of the fourth line, so "Line 4"
does not fit next to it and normally wraps below it, leaving the float alone on
a line that does not count as a line box.
With the block ellipsis on that line, the wrap was taken as the ellipsis
displacing all of the line's content: the
float was taken off the line, the line got nothing but the ellipsis (next to
where the float would be), and the float never got placed.
Now a line that floats leave no room for the block ellipsis on is not taken as
the clamped line: as a line box "too
small to contain any content", its content wraps below the floats as usual and
the next line gets the ellipsis.
* LayoutTests/TestExpectations: line-clamp-auto-016 passes now.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::processLineBreakingResult):
Canonical link: https://commits.webkit.org/322791@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications