Changeset 268821 in webkit
- Timestamp:
- Oct 21, 2020, 1:40:40 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
layout/inlineformatting/InlineContentBreaker.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r268820 r268821 1 2020-10-21 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Line may be able to fit some more content when the current candidate is trimmable 4 https://bugs.webkit.org/show_bug.cgi?id=218044 5 6 Reviewed by Antti Koivisto. 7 8 This patch addresses the cases when the candidate content is partially/fully trimmable and 9 after putting the content on the line, there's still enough room to accommodate some more content. 10 11 * layout/inlineformatting/InlineContentBreaker.cpp: 12 (WebCore::Layout::InlineContentBreaker::processOverflowingContent const): 13 1 14 2020-10-21 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/Source/WebCore/layout/inlineformatting/InlineContentBreaker.cpp
r267946 r268821 196 196 if (continuousContent.hasTrailingCollapsibleContent()) { 197 197 ASSERT(isTextContent(continuousContent)); 198 auto IsEndOfLine = isContentWrappingAllowed(continuousContent) ? IsEndOfLine::Yes : IsEndOfLine::No;199 198 // First check if the content fits without the trailing collapsible part. 200 199 if (continuousContent.nonCollapsibleLogicalWidth() <= lineStatus.availableWidth) 201 return { Result::Action::Keep, IsEndOfLine };200 return { Result::Action::Keep, IsEndOfLine::No }; 202 201 // Now check if we can trim the line too. 203 202 if (lineStatus.hasFullyCollapsibleTrailingRun && continuousContent.isFullyCollapsible()) { 204 203 // If this new content is fully collapsible, it should surely fit. 205 return { Result::Action::Keep, IsEndOfLine };204 return { Result::Action::Keep, IsEndOfLine::No }; 206 205 } 207 206 } else if (lineStatus.collapsibleWidth && isNonContentRunsOnly(continuousContent)) {
Note:
See TracChangeset
for help on using the changeset viewer.