Changeset 267617 in webkit
- Timestamp:
- Sep 25, 2020, 10:21:18 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/layoutformattingcontext/inlin-box-content-fits-but-the-box-does-not-expected.html (added)
-
LayoutTests/fast/layoutformattingcontext/inlin-box-content-fits-but-the-box-does-not.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/layout/inlineformatting/InlineLineBreaker.cpp (modified) (1 diff)
-
Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r267616 r267617 1 2020-09-25 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Incorrect breaking position when inline box content fits the line but the inline content itself does not. 4 https://bugs.webkit.org/show_bug.cgi?id=217007 5 6 Reviewed by Simon Fraser. 7 8 * fast/layoutformattingcontext/inlin-box-content-fits-but-the-box-does-not-expected.html: Added. 9 * fast/layoutformattingcontext/inlin-box-content-fits-but-the-box-does-not.html: Added. 10 1 11 2020-09-25 Wenson Hsieh <wenson_hsieh@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r267616 r267617 1 2020-09-25 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Incorrect breaking position when inline box content fits the line but the inline content itself does not. 4 https://bugs.webkit.org/show_bug.cgi?id=217007 5 6 Reviewed by Simon Fraser. 7 8 When the inline box does not fit the line but its text content does, the last breaking opportunity (in case of arbitrary breaking position) 9 is not the end of the text. 10 e.g 11 <div style="width: 200px; word-break: break-word;"><span style="border-right: 100px;">text_content_fits</span></div> 12 in this case the border right overflows the containing block and should be wrapped to the next available vertical position. 13 However the last breaking opportunity is not between 's' and the </span> but between 't' and 's'. 14 15 Test: fast/layoutformattingcontext/inlin-box-content-fits-but-the-box-does-not.html 16 17 * layout/inlineformatting/InlineLineBreaker.cpp: 18 (WebCore::Layout::LineBreaker::tryBreakingTextRun const): 19 * layout/inlineformatting/InlineLineBuilder.cpp: 20 (WebCore::Layout::LineCandidate::InlineContent::appendInlineItem): [container start](<span>) and [container end](</span>) runs are not collapsible. 21 1 22 2020-09-25 Wenson Hsieh <wenson_hsieh@apple.com> 2 23 -
trunk/Source/WebCore/layout/inlineformatting/InlineLineBreaker.cpp
r267494 r267617 302 302 // When the run can be split at arbitrary position, 303 303 // let's just return the entire run when it is intended to fit on the line. 304 return PartialRun { inlineTextItem.length(), overflowRun.logicalWidth, false }; 304 ASSERT(inlineTextItem.length()); 305 auto trailingPartialRunWidth = TextUtil::width(inlineTextItem, inlineTextItem.start(), inlineTextItem.end() - 1, logicalLeft); 306 return PartialRun { inlineTextItem.length() - 1, trailingPartialRunWidth, false }; 305 307 } 306 308 auto splitData = TextUtil::split(inlineTextItem.inlineTextBox(), inlineTextItem.start(), inlineTextItem.length(), overflowRun.logicalWidth, availableWidth, logicalLeft); -
trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp
r267515 r267617 248 248 return inlineTextItem.isWhitespace() && !TextUtil::shouldPreserveTrailingWhitespace(inlineTextItem.style()); 249 249 } 250 if (inlineItem.isContainerStart() || inlineItem.isContainerEnd()) 251 return false; 252 ASSERT_NOT_REACHED(); 250 253 return true; 251 254 };
Note:
See TracChangeset
for help on using the changeset viewer.