Title: [285933] trunk/Source/WebCore
- Revision
- 285933
- Author
- [email protected]
- Date
- 2021-11-17 09:50:26 -0800 (Wed, 17 Nov 2021)
Log Message
[LFC][IFC] Incorrect use of BreakWord with preferred width computation (it's a valid value for both WordBreak and OverflowWrap)
https://bugs.webkit.org/show_bug.cgi?id=233258
Reviewed by Antti Koivisto.
This was caught by fast/text/word-break.html (note that this codepath is not yet enabled).
* layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::InlineContentBreaker::wordBreakBehavior const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (285932 => 285933)
--- trunk/Source/WebCore/ChangeLog 2021-11-17 17:27:34 UTC (rev 285932)
+++ trunk/Source/WebCore/ChangeLog 2021-11-17 17:50:26 UTC (rev 285933)
@@ -1,3 +1,15 @@
+2021-11-17 Alan Bujtas <[email protected]>
+
+ [LFC][IFC] Incorrect use of BreakWord with preferred width computation (it's a valid value for both WordBreak and OverflowWrap)
+ https://bugs.webkit.org/show_bug.cgi?id=233258
+
+ Reviewed by Antti Koivisto.
+
+ This was caught by fast/text/word-break.html (note that this codepath is not yet enabled).
+
+ * layout/formattingContexts/inline/InlineContentBreaker.cpp:
+ (WebCore::Layout::InlineContentBreaker::wordBreakBehavior const):
+
2021-11-17 Andreu Botella <[email protected]>
Fix formatting and string literals in FileInputType.cpp
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp (285932 => 285933)
--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp 2021-11-17 17:27:34 UTC (rev 285932)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp 2021-11-17 17:50:26 UTC (rev 285933)
@@ -652,15 +652,15 @@
return { };
};
- // Soft wrap opportunities introduced by break-word are not considered when calculating min-content intrinsic sizes.
- auto breakWordIsApplicable = !isInIntrinsicWidthMode();
// For compatibility with legacy content, the word-break property also supports a deprecated break-word keyword.
// 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.
- if ((breakWordIsApplicable && style.wordBreak() == WordBreak::BreakWord) && !hasWrapOpportunityAtPreviousPosition)
+ if (style.wordBreak() == WordBreak::BreakWord && !hasWrapOpportunityAtPreviousPosition)
return includeHyphenationIfAllowed(WordBreakRule::AtArbitraryPosition);
// 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.
// Note that this applies to content where CSS properties (e.g. WordBreak::KeepAll) make it unbreakable.
- if (((breakWordIsApplicable && style.overflowWrap() == OverflowWrap::BreakWord) || style.overflowWrap() == OverflowWrap::Anywhere) && !hasWrapOpportunityAtPreviousPosition)
+ // Soft wrap opportunities introduced by overflow-wrap/word-wrap: break-word are not considered when calculating min-content intrinsic sizes.
+ auto overflowWrapBreakWordIsApplicable = !isInIntrinsicWidthMode();
+ if (((overflowWrapBreakWordIsApplicable && style.overflowWrap() == OverflowWrap::BreakWord) || style.overflowWrap() == OverflowWrap::Anywhere) && !hasWrapOpportunityAtPreviousPosition)
return includeHyphenationIfAllowed(WordBreakRule::AtArbitraryPosition);
// Breaking is forbidden within “words”.
if (style.wordBreak() == WordBreak::KeepAll)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes