Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9d2ed96e53fdbccd333819754c94b06e5e5328f8
      
https://github.com/WebKit/WebKit/commit/9d2ed96e53fdbccd333819754c94b06e5e5328f8
  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 after a <wbr> in a nowrap line
https://bugs.webkit.org/show_bug.cgi?id=326222
<rdar://problem/189103913>

Reviewed by Antti Koivisto.

<div style="line-clamp: 1; white-space: pre; width: 
10ch">uncharacteri<wbr>stically
second line</div>

The first line should show nothing but the block ellipsis. Under nowrap the 
<wbr> is no soft wrap opportunity,
so the ellipsis has to displace the content back to the start of the line. 
However the <wbr> still splits the
content into separate line candidates, and making room for the ellipsis only 
wrapped the last candidate
("stically"), leaving "uncharacteri..." on the line.
Now when there is no soft wrap opportunity on the line, all of its content gets 
displaced, the same way it does
on an empty line.

* LayoutTests/TestExpectations: block-ellipsis-015 passes now.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::handleInlineContent):
(WebCore::Layout::LineBuilder::processLineBreakingResult):
(WebCore::Layout::LineBuilder::revertLineToStart):

Canonical link: https://commits.webkit.org/322758@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to