[webkit-changes] [WebKit/WebKit] e5968b: [IFC][Line clamp] Add ellipsis to InlineDisplay::L...
Alan Baradlay
noreply at github.com
Sun Nov 20 13:59:14 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e5968bc0646a7fb3893b81cf88f95913d9cc2d83
https://github.com/WebKit/WebKit/commit/e5968bc0646a7fb3893b81cf88f95913d9cc2d83
Author: Alan Baradlay <zalan at apple.com>
Date: 2022-11-20 (Sun, 20 Nov 2022)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
Log Message:
-----------
[IFC][Line clamp] Add ellipsis to InlineDisplay::Line when it's the last line for -webkit-line-clamp
https://bugs.webkit.org/show_bug.cgi?id=248123
Reviewed by Antti Koivisto.
InlineDisplayLineBuilder::trailingEllipsisRect computes the ellipsis position when the line
needs one. This patch ensures that we compute one for line-clamp even when the content does not require one (i.e. the content does not overflow).
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::shouldTruncateOverflow):
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::createDisplayContentForLine):
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
(WebCore::Layout::InlineDisplayLineBuilder::trailingEllipsisRect const):
Canonical link: https://commits.webkit.org/256895@main
More information about the webkit-changes
mailing list