Changeset 286001 in webkit
- Timestamp:
- Nov 18, 2021, 6:54:14 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
r286000 r286001 1 2021-11-18 Alan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Should not always keep the entire continuous content when the line is empty 4 https://bugs.webkit.org/show_bug.cgi?id=233303 5 6 Reviewed by Antti Koivisto. 7 8 The rule of "let's keep the first glyph on the line" should take into account when 9 the continuous content has a series of runs e.g [X][X][X] where each 'X' represents an individual inline text item. 10 In such cases we should just return the first text run as the trailing inline item with 'break' action. 11 (This patch is in preparation for enabling IFC's preferred width computation.) 12 13 * layout/formattingContexts/inline/InlineContentBreaker.cpp: 14 (WebCore::Layout::InlineContentBreaker::processOverflowingContent const): 15 * rendering/RenderBlockFlow.cpp: 16 1 17 2021-11-18 Alan Bujtas <zalan@apple.com> 2 18 -
trunk/Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp
r286000 r286001 222 222 }(); 223 223 224 if (inlineTextItem.length() <= firstCodePointLength) 225 return Result { Result::Action::Keep, IsEndOfLine::Yes }; 224 if (inlineTextItem.length() <= firstCodePointLength) { 225 if (continuousContent.runs().size() == 1) { 226 // Let's return single, leading text items as is. 227 return Result { Result::Action::Keep, IsEndOfLine::Yes }; 228 } 229 return Result { Result::Action::Break, IsEndOfLine::Yes, Result::PartialTrailingContent { leadingTextRunIndex, { } } }; 230 } 226 231 227 232 auto firstCodePointWidth = TextUtil::width(inlineTextItem, leadingTextRun.style.fontCascade(), inlineTextItem.start(), inlineTextItem.start() + firstCodePointLength, lineStatus.contentLogicalRight);
Note:
See TracChangeset
for help on using the changeset viewer.