Changeset 285933 in webkit
- Timestamp:
- Nov 17, 2021, 9:50:26 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
layout/formattingContexts/inline/InlineContentBreaker.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r285932 r285933 1 2021-11-17 Alan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Incorrect use of BreakWord with preferred width computation (it's a valid value for both WordBreak and OverflowWrap) 4 https://bugs.webkit.org/show_bug.cgi?id=233258 5 6 Reviewed by Antti Koivisto. 7 8 This was caught by fast/text/word-break.html (note that this codepath is not yet enabled). 9 10 * layout/formattingContexts/inline/InlineContentBreaker.cpp: 11 (WebCore::Layout::InlineContentBreaker::wordBreakBehavior const): 12 1 13 2021-11-17 Andreu Botella <andreu@andreubotella.com> 2 14 -
trunk/Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp
r285930 r285933 653 653 }; 654 654 655 // Soft wrap opportunities introduced by break-word are not considered when calculating min-content intrinsic sizes.656 auto breakWordIsApplicable = !isInIntrinsicWidthMode();657 655 // For compatibility with legacy content, the word-break property also supports a deprecated break-word keyword. 658 656 // When specified, this has the same effect as word-break: normal and overflow-wrap: anywhere, regardless of the actual value of the overflow-wrap property. 659 if ( (breakWordIsApplicable && style.wordBreak() == WordBreak::BreakWord)&& !hasWrapOpportunityAtPreviousPosition)657 if (style.wordBreak() == WordBreak::BreakWord && !hasWrapOpportunityAtPreviousPosition) 660 658 return includeHyphenationIfAllowed(WordBreakRule::AtArbitraryPosition); 661 659 // OverflowWrap::BreakWord/Anywhere An otherwise unbreakable sequence of characters may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line. 662 660 // Note that this applies to content where CSS properties (e.g. WordBreak::KeepAll) make it unbreakable. 663 if (((breakWordIsApplicable && style.overflowWrap() == OverflowWrap::BreakWord) || style.overflowWrap() == OverflowWrap::Anywhere) && !hasWrapOpportunityAtPreviousPosition) 661 // Soft wrap opportunities introduced by overflow-wrap/word-wrap: break-word are not considered when calculating min-content intrinsic sizes. 662 auto overflowWrapBreakWordIsApplicable = !isInIntrinsicWidthMode(); 663 if (((overflowWrapBreakWordIsApplicable && style.overflowWrap() == OverflowWrap::BreakWord) || style.overflowWrap() == OverflowWrap::Anywhere) && !hasWrapOpportunityAtPreviousPosition) 664 664 return includeHyphenationIfAllowed(WordBreakRule::AtArbitraryPosition); 665 665 // Breaking is forbidden within “words”.
Note:
See TracChangeset
for help on using the changeset viewer.