Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d76ff90de4ca8f637972c79e8b243529fd454086
https://github.com/WebKit/WebKit/commit/d76ff90de4ca8f637972c79e8b243529fd454086
Author: Alan Baradlay <[email protected]>
Date: 2022-11-23 (Wed, 23 Nov 2022)
Changed paths:
M
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h
Log Message:
-----------
[IFC][Line clamp] Truncate non-overflowing content when line-clamp ellipsis
does not fit the line
https://bugs.webkit.org/show_bug.cgi?id=248251
Reviewed by Antti Koivisto.
When line-clamp kicks in, the trailing ellipsis may produce content overflow.
handleLineEndingEllipsisPolicy checks if we need to truncate the initially
non-overflowing content.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::lineEndingEllipsisPolicy):
(WebCore::Layout::InlineFormattingContext::lineLayout): This is just moving
lines around. No change in logic.
(WebCore::Layout::shouldTruncateOverflow): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::computedIntrinsicWidth):
(WebCore::Layout::LineBuilder::close):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h:
Canonical link: https://commits.webkit.org/256973@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes