Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 13742271d0ff8cab540c25a4f80d9e49dd200bcf
      
https://github.com/WebKit/WebKit/commit/13742271d0ff8cab540c25a4f80d9e49dd200bcf
  Author: Alan Baradlay <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineTypes.h
    M 
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h

  Log Message:
  -----------
  [line-clamp] The block ellipsis does not hang with hanging-punctuation
https://bugs.webkit.org/show_bug.cgi?id=326227
<rdar://problem/189105782>

Reviewed by Antti Koivisto.

<div style="line-clamp: 1 ')'; hanging-punctuation: last; width: 5ch; 
font-family: monospace">12345 678</div>

The first line should show "12345)" with the closing parenthesis hanging past 
the end of the line, as
"the ellipsis is subject to the effects of the 'hanging punctuation' property". 
Instead the ellipsis took its
full width from the line and displaced "12345".
Now the hangable trailing punctuation of the ellipsis does not take space from 
the line, and it is painted past
the end of the line.

* LayoutTests/TestExpectations: block-ellipsis-035 passes now.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
(WebCore::Layout::InlineFormattingUtils::blockEllipsisForLine const):
* Source/WebCore/layout/formattingContexts/inline/InlineLineTypes.h:
* 
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
(WebCore::Layout::trailingBlockEllipsis):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::hangablePunctuationEndWidth):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h:

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



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

Reply via email to