Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 848538f2e9b5f3d03e6ec8484b752ce6433ff132
      
https://github.com/WebKit/WebKit/commit/848538f2e9b5f3d03e6ec8484b752ce6433ff132
  Author: Alan Baradlay <[email protected]>
  Date:   2026-10-06 (Tue, 06 Oct 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M 
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
    M Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h

  Log Message:
  -----------
  [IFC] text-overflow truncates a unicode-bidi: plaintext line in the wrong 
direction
https://bugs.webkit.org/show_bug.cgi?id=326229
<rdar://problem/189108555>

Reviewed by Antti Koivisto.

<div dir="rtl" style="unicode-bidi: plaintext; width: 100px; overflow: hidden; 
text-overflow: ellipsis; white-space: nowrap">some long left to right 
content</div>

The paragraph is left to right (its first strong character is), so the content 
should be truncated at its end and
the ellipsis should go to the right. Instead truncation followed the direction 
property of the block (and of the
text's parent box), cutting the content on the left side.
Now truncation, ellipsis placement and the visible side of a truncated text box 
at paint time follow the inline direction of the line.

* LayoutTests/TestExpectations: text-overflow-string-008 and 
line-clamp-with-text-overflow-string-006 pass now.
* 
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
(WebCore::Layout::truncate):
(WebCore::Layout::truncateOverflowingDisplayBoxes):
(WebCore::Layout::trailingEllipsisVisualRectAfterTruncation):
(WebCore::Layout::makeRoomForLinkBoxOnClampedLineIfNeeded):
* Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h:
(WebCore::InlineIterator::BoxModernPath::selectableRange const):

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



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

Reply via email to