[webkit-changes] [WebKit/WebKit] 27f65a: [IFC][hanging punctuation] Fix fast/text/hanging-p...
Alan Baradlay
noreply at github.com
Sat Dec 24 07:52:26 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 27f65a2d3185e9d1f372a733eb400bef8d6473b8
https://github.com/WebKit/WebKit/commit/27f65a2d3185e9d1f372a733eb400bef8d6473b8
Author: Alan Baradlay <zalan at apple.com>
Date: 2022-12-24 (Sat, 24 Dec 2022)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h
Log Message:
-----------
[IFC][hanging punctuation] Fix fast/text/hanging-punctuation-first.html
https://bugs.webkit.org/show_bug.cgi?id=249856
Reviewed by Antti Koivisto.
Trailing hanging punctuation (this is 'last' and not allow/force-end on "stop or comma") applies to the last formatted line only.
Here we try to guess (before line breaking) if we are currently on the last line and whether the punctuation glyph should be considered hanging.
This patch ensures that trimmable whitespace (and some other "empty" inline text items) after the punctuation glyph does not
prevent hanging.
(also in this patch, the "stop-or-comma" check is removed as such trailing content can hang on every line.)
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::trailingPunctuationOrStopOrCommaWidthForLineCandiate const):
(WebCore::Layout::LineBuilder::candidateContentForLine):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h:
Canonical link: https://commits.webkit.org/258320@main
More information about the webkit-changes
mailing list