[webkit-changes] [WebKit/WebKit] c60453: [IFC][hanging punctuation] Line::applyRunExpansion...
Alan Baradlay
noreply at github.com
Fri Dec 23 12:26:23 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c604535934c41bc58f9848f916c1fdd285366a75
https://github.com/WebKit/WebKit/commit/c604535934c41bc58f9848f916c1fdd285366a75
Author: Alan Baradlay <zalan at apple.com>
Date: 2022-12-23 (Fri, 23 Dec 2022)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLine.h
Log Message:
-----------
[IFC][hanging punctuation] Line::applyRunExpansion should only trim pre-wrap triggered hanging whitespace
https://bugs.webkit.org/show_bug.cgi?id=249846
Reviewed by Antti Koivisto.
1. Hanging content is not supposed to be taken into account when computing expansion opportunities (align justify).
2. Hanging trailing whitespace content (triggered by pre-wrap) falls outside of the line box,
but it is still part of the trailing text run (i.e. not trimmed).
3. FontCascade::expansionOpportunityCount takes text content (string) to compute the expansion opportunities.
4. We have to adjust the run's length to make sure that the hanging trailing whitespace is not part of this expansion computation.
* Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::applyRunExpansion):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
(WebCore::Layout::Line::HangingContent::resetTrailingContent):
(WebCore::Layout::Line::HangingContent::trailingWhitespaceWidth const):
(WebCore::Layout::Line::HangingContent::trailingWhitespaceLength const):
Canonical link: https://commits.webkit.org/258306@main
More information about the webkit-changes
mailing list