Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IFC][hanging punctuation] Line::applyRunExpansion should only trim p…
…re-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
- Loading branch information
1 parent
7e5f5d8
commit c604535
Showing
2 changed files
with
20 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters