Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: eba977320081f41f4305deef673700d10a5e4bc7
https://github.com/WebKit/WebKit/commit/eba977320081f41f4305deef673700d10a5e4bc7
Author: Alan Baradlay <[email protected]>
Date: 2026-04-13 (Mon, 13 Apr 2026)
Changed paths:
A LayoutTests/fast/text/word-break-break-all-cjk-punctuation-expected.txt
A LayoutTests/fast/text/word-break-break-all-cjk-punctuation.html
M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp
Log Message:
-----------
[IFC] word-break: break-all allows CJK close punctuation to start a line
https://bugs.webkit.org/show_bug.cgi?id=312103
Reviewed by Antti Koivisto.
Per CSS Text 3, break-all does not affect soft wrap opportunities
around punctuation. CJK close punctuation (e.g. U+3001 ideographic
comma) should stay with the preceding character.
When the line is empty and even the first character overflows, the
content breaker takes just the first character and breaks. If the
next character is punctuation that can't start a line, it ends up
alone on the next line.
The fix extends the break past any following characters that are
prohibited from starting a line.
* LayoutTests/fast/text/word-break-break-all-cjk-punctuation-expected.txt:
Added.
* LayoutTests/fast/text/word-break-break-all-cjk-punctuation.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::canBreakBefore): Moved earlier in the file.
(WebCore::firstCharacterBreakRespectingLineStartProhibitions):
(WebCore::InlineContentBreaker::processOverflowingContent):
Canonical link: https://commits.webkit.org/311088@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications